diff --git a/.appveyor.yml b/.appveyor.yml deleted file mode 100644 index b08c47b9d3..0000000000 --- a/.appveyor.yml +++ /dev/null @@ -1,108 +0,0 @@ -# Windows Build Configuration for AppVeyor -# http://www.appveyor.com/docs/appveyor-yml - -# build version format -version: "{build}" - -os: Visual Studio 2015 - -platform: - - x64 - -configuration: - - Debug - - Release - -branches: - only: - - master - -# changes to these files don't need to trigger testing -skip_commits: - files: - - README.md - - README-spirv-remap.txt - - LICENSE.txt - - CODE_OF_CONDUCT.md - - BUILD.* - - WORKSPACE - - kokoro/* - - make-revision - - Android.mk - - _config.yml - -# Travis advances the master-tot tag to current top of the tree after -# each push into the master branch, because it relies on that tag to -# upload build artifacts to the master-tot release. This will cause -# double testing for each push on Appveyor: one for the push, one for -# the tag advance. Disable testing tags. -skip_tags: true - -clone_depth: 5 - -matrix: - fast_finish: true # Show final status immediately if a test fails. - -# scripts that run after cloning repository -install: - - C:/Python27/python.exe update_glslang_sources.py - - set PATH=C:\ninja;C:\Python36;%PATH% - - git clone https://github.com/google/googletest.git External/googletest - -build: - parallel: true # enable MSBuild parallel builds - verbosity: minimal - -build_script: - - mkdir build && cd build - - cmake -G "Visual Studio 14 2015 Win64" -DCMAKE_INSTALL_PREFIX=install .. - - cmake --build . --config %CONFIGURATION% --target install - -test_script: - - ctest -C %CONFIGURATION% --output-on-failure - - cd ../Test && bash runtests - - cd ../build - -after_test: - # For debug build, the generated dll has a postfix "d" in its name. - - ps: >- - If ($env:configuration -Match "Debug") { - $env:SUFFIX="d" - } Else { - $env:SUFFIX="" - } - - cd install - # Zip all glslang artifacts for uploading and deploying - - 7z a glslang-master-windows-"%PLATFORM%"-"%CONFIGURATION%".zip - bin\glslangValidator.exe - bin\spirv-remap.exe - include\glslang\* - lib\GenericCodeGen%SUFFIX%.lib - lib\glslang%SUFFIX%.lib - lib\glslang-default-resource-limits%SUFFIX%.lib - lib\HLSL%SUFFIX%.lib - lib\MachineIndependent%SUFFIX%.lib - lib\OGLCompiler%SUFFIX%.lib - lib\OSDependent%SUFFIX%.lib - lib\SPIRV%SUFFIX%.lib - lib\SPVRemapper%SUFFIX%.lib - lib\SPIRV-Tools%SUFFIX%.lib - lib\SPIRV-Tools-opt%SUFFIX%.lib - -artifacts: - - path: build\install\*.zip - name: artifacts-zip - -deploy: - - provider: GitHub - auth_token: - secure: YglcSYdl0TylEa59H4K6lylBEDr586NAt2EMgZquSo+iuPrwgZQuJLPCoihSm9y6 - release: master-tot - description: "Continuous build of the latest master branch by Appveyor and Github" - artifact: artifacts-zip - draft: false - prerelease: false - force_update: true - on: - branch: master - APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2015 diff --git a/.github/dependabot.yml b/.github/dependabot.yml new file mode 100644 index 0000000000..2190055972 --- /dev/null +++ b/.github/dependabot.yml @@ -0,0 +1,22 @@ +# Copyright 2023 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +version: 2 +updates: + - package-ecosystem: "github-actions" # Necessary to update action hashes + directory: "/" + schedule: + interval: "weekly" + # Allow up to 3 opened pull requests for github-actions versions + open-pull-requests-limit: 3 diff --git a/.github/workflows/continuous_deployment.yml b/.github/workflows/continuous_deployment.yml index c375ac4505..68cad7a3d3 100644 --- a/.github/workflows/continuous_deployment.yml +++ b/.github/workflows/continuous_deployment.yml @@ -20,11 +20,26 @@ on: workflow_dispatch: push: branches: - - master + - main + paths-ignore: + - 'README.md' + - 'README-spirv-remap.txt' + - 'LICENSE.txt' + - 'CODE_OF_CONDUCT.md' + - 'BUILD.*' + - 'WORKSPACE' + - 'kokoro/*' + - 'make-revision' + - 'Android.mk' + - '_config.yml' + +permissions: read-all jobs: linux: runs-on: ${{matrix.os.genus}} + permissions: + contents: write strategy: fail-fast: false matrix: @@ -32,8 +47,9 @@ jobs: compiler: [{cc: clang, cxx: clang++}, {cc: gcc, cxx: g++}] cmake_build_type: [Debug, Release] steps: - - uses: actions/checkout@v2 - - uses: actions/setup-python@v2 + - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0 + - uses: lukka/get-cmake@8be6cca406b575906541e8e3b885d46f416bba39 # v3.27.7 + - uses: actions/setup-python@61a6322f88396a6271a6ee3565807d608ecaddd1 # v4.7.0 with: python-version: '3.7' - name: Install Ubuntu Package Dependencies @@ -71,10 +87,11 @@ jobs: - name: Zip if: ${{ matrix.compiler.cc == 'clang' }} env: - ARCHIVE: glslang-master-${{matrix.os.family}}-${{matrix.cmake_build_type}}.zip + ARCHIVE: glslang-main-${{matrix.os.family}}-${{matrix.cmake_build_type}}.zip run: | cd build/install zip ${ARCHIVE} \ + bin/glslang \ bin/glslangValidator \ include/glslang/* \ include/glslang/**/* \ @@ -92,8 +109,8 @@ jobs: - name: Deploy if: ${{ matrix.compiler.cc == 'clang' }} env: - ARCHIVE: glslang-master-${{matrix.os.family}}-${{matrix.cmake_build_type}}.zip - uses: actions/github-script@v5 + ARCHIVE: glslang-main-${{matrix.os.family}}-${{matrix.cmake_build_type}}.zip + uses: actions/github-script@d7906e4ad0b1822421a7e6a35d5ca353c962f410 # v6.4.1 with: script: | const script = require('.github/workflows/deploy.js') @@ -101,6 +118,8 @@ jobs: macos: runs-on: ${{matrix.os.genus}} + permissions: + contents: write strategy: fail-fast: false matrix: @@ -108,8 +127,9 @@ jobs: compiler: [{cc: clang, cxx: clang++}] cmake_build_type: [Debug, Release] steps: - - uses: actions/checkout@v2 - - uses: actions/setup-python@v2 + - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0 + - uses: lukka/get-cmake@8be6cca406b575906541e8e3b885d46f416bba39 # v3.27.7 + - uses: actions/setup-python@61a6322f88396a6271a6ee3565807d608ecaddd1 # v4.7.0 with: python-version: '3.7' - name: Install GoogleTest @@ -142,10 +162,11 @@ jobs: cd ../Test && ./runtests - name: Zip env: - ARCHIVE: glslang-master-${{matrix.os.family}}-${{matrix.cmake_build_type}}.zip + ARCHIVE: glslang-main-${{matrix.os.family}}-${{matrix.cmake_build_type}}.zip run: | cd build/install zip ${ARCHIVE} \ + bin/glslang \ bin/glslangValidator \ include/glslang/* \ include/glslang/**/* \ @@ -160,10 +181,102 @@ jobs: lib/libSPVRemapper.a \ lib/libSPIRV-Tools.a \ lib/libSPIRV-Tools-opt.a + - name: Deploy + env: + ARCHIVE: glslang-main-${{matrix.os.family}}-${{matrix.cmake_build_type}}.zip + uses: actions/github-script@d7906e4ad0b1822421a7e6a35d5ca353c962f410 # v6.4.1 + with: + script: | + const script = require('.github/workflows/deploy.js') + await script({github, context, core}) + + windows: + 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@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0 + - uses: lukka/get-cmake@8be6cca406b575906541e8e3b885d46f416bba39 # v3.27.7 + - uses: actions/setup-python@61a6322f88396a6271a6ee3565807d608ecaddd1 # v4.7.0 + with: + python-version: '3.7' + - name: Install GoogleTest + run: | + # check out pre-breakage version of googletest; can be deleted when + # issue 3128 is fixed + # git clone --depth=1 https://github.com/google/googletest.git External/googletest + mkdir -p External/googletest + cd External/googletest + git init + git remote add origin https://github.com/google/googletest.git + git fetch --depth 1 origin 0c400f67fcf305869c5fb113dd296eca266c9725 + git reset --hard FETCH_HEAD + cd ../.. + - name: Update Glslang Sources + 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" + cmake --build build --config ${{matrix.cmake_build_type}} --target install + - name: Test + 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: + ARCHIVE: glslang-master-${{matrix.os.family}}-Debug.zip + run: | + cd build/install + 7z a ${{env.ARCHIVE}} ` + bin/glslang.exe ` + bin/glslangValidator.exe ` + bin/spirv-remap.exe ` + include/glslang/* ` + lib/GenericCodeGend.lib ` + lib/glslangd.lib ` + lib/glslang-default-resource-limitsd.lib ` + lib/HLSLd.lib ` + lib/MachineIndependentd.lib ` + lib/OGLCompilerd.lib ` + lib/OSDependentd.lib ` + lib/SPIRVd.lib ` + lib/SPVRemapperd.lib ` + lib/SPIRV-Toolsd.lib ` + lib/SPIRV-Tools-optd.lib + - name: Zip + if: ${{ matrix.cmake_build_type == 'Release' }} + env: + ARCHIVE: glslang-master-${{matrix.os.family}}-Release.zip + run: | + cd build/install + 7z a ${{env.ARCHIVE}} ` + bin/glslang.exe ` + bin/glslangValidator.exe ` + bin/spirv-remap.exe ` + include/glslang/* ` + lib/GenericCodeGen.lib ` + lib/glslang.lib ` + lib/glslang-default-resource-limits.lib ` + lib/HLSL.lib ` + lib/MachineIndependent.lib ` + lib/OGLCompiler.lib ` + lib/OSDependent.lib ` + lib/SPIRV.lib ` + lib/SPVRemapper.lib ` + lib/SPIRV-Tools.lib ` + lib/SPIRV-Tools-opt.lib - name: Deploy env: ARCHIVE: glslang-master-${{matrix.os.family}}-${{matrix.cmake_build_type}}.zip - uses: actions/github-script@v5 + uses: actions/github-script@d7906e4ad0b1822421a7e6a35d5ca353c962f410 # v6.4.1 with: script: | const script = require('.github/workflows/deploy.js') diff --git a/.github/workflows/continuous_integration.yml b/.github/workflows/continuous_integration.yml index 7c36c68843..ca0b9a42b5 100644 --- a/.github/workflows/continuous_integration.yml +++ b/.github/workflows/continuous_integration.yml @@ -10,26 +10,28 @@ on: workflow_dispatch: pull_request: branches: - - master + - main + +permissions: read-all jobs: linux: - runs-on: ${{matrix.os}} + runs-on: ubuntu-22.04 strategy: fail-fast: false matrix: - os: [ubuntu-20.04] compiler: [{cc: clang, cxx: clang++}, {cc: gcc, cxx: g++}] cmake_build_type: [Debug, Release] steps: - - uses: actions/checkout@v2 - - uses: actions/setup-python@v2 + - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0 + - uses: lukka/get-cmake@8be6cca406b575906541e8e3b885d46f416bba39 # v3.27.7 + - uses: actions/setup-python@61a6322f88396a6271a6ee3565807d608ecaddd1 # v4.7.0 with: python-version: '3.7' - - name: Install Ubuntu Package Dependencies - run: | - sudo apt-get -qq update - sudo apt-get install -y clang-6.0 + - name: Setup ccache + uses: hendrikmuhs/ccache-action@6d1841ec156c39a52b1b23a810da917ab98da1f4 # v1.2.10 + with: + key: ubuntu-22-${{ matrix.cmake_build_type }}-${{ matrix.compiler.cc }}-${{matrix.compiler.cxx}} - name: Install GoogleTest run: | # check out pre-breakage version of googletest; can be deleted when @@ -43,35 +45,137 @@ jobs: git reset --hard FETCH_HEAD cd ../.. - name: Update Glslang Sources - run: | - ./update_glslang_sources.py - - name: Build + run: ./update_glslang_sources.py + - name: Configure + run: cmake -S . -B build -D CMAKE_BUILD_TYPE=${{ matrix.cmake_build_type }} env: - CC: ${{matrix.compiler.cc}} - CXX: ${{matrix.compiler.cxx}} + 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: | + cd build + ctest --output-on-failure && + cd ../Test && ./runtests + + linux-asan: + runs-on: ubuntu-22.04 + strategy: + fail-fast: false + matrix: + compiler: [{cc: gcc, cxx: g++}] + cmake_build_type: [Debug] + flags: ['-fsanitize=address', '-fsanitize=thread'] + steps: + - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0 + - uses: lukka/get-cmake@8be6cca406b575906541e8e3b885d46f416bba39 # v3.27.7 + - uses: actions/setup-python@61a6322f88396a6271a6ee3565807d608ecaddd1 # v4.7.0 + with: + python-version: '3.7' + - name: Setup ccache + uses: hendrikmuhs/ccache-action@6d1841ec156c39a52b1b23a810da917ab98da1f4 # v1.2.10 + with: + key: ubuntu-22-${{ matrix.cmake_build_type }}-${{ matrix.compiler.cc }}-${{matrix.compiler.cxx}}-${{matrix.flags}} + - name: Install GoogleTest run: | - mkdir build && cd build - cmake -DCMAKE_BUILD_TYPE=${{matrix.cmake_build_type}} -DCMAKE_INSTALL_PREFIX=`pwd`/install .. - make -j4 install + # check out pre-breakage version of googletest; can be deleted when + # issue 3128 is fixed + # git clone --depth=1 https://github.com/google/googletest.git External/googletest + mkdir -p External/googletest + cd External/googletest + git init + git remote add origin https://github.com/google/googletest.git + git fetch --depth 1 origin 0c400f67fcf305869c5fb113dd296eca266c9725 + git reset --hard FETCH_HEAD + cd ../.. + - name: Update Glslang Sources + run: ./update_glslang_sources.py + - name: Configure + run: cmake -S . -B build -D CMAKE_BUILD_TYPE=${{ matrix.cmake_build_type }} + env: + CC: ${{matrix.compiler.cc}} + CXX: ${{matrix.compiler.cxx}} + CMAKE_GENERATOR: Ninja + CMAKE_C_COMPILER_LAUNCHER: ccache + CMAKE_CXX_COMPILER_LAUNCHER: ccache + CFLAGS: ${{matrix.flags}} + CXXFLAGS: ${{matrix.flags}} + LDFLAGS: ${{matrix.flags}} + - name: Build + run: cmake --build build + - name: Install + run: cmake --install build --prefix build/install - name: Test run: | cd build ctest --output-on-failure && 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@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0 + - uses: actions/setup-python@61a6322f88396a6271a6ee3565807d608ecaddd1 # v4.7.0 + with: + python-version: '3.7' + - uses: lukka/get-cmake@8be6cca406b575906541e8e3b885d46f416bba39 # v3.27.7 + with: + cmakeVersion: 3.17.2 + - name: Setup ccache + uses: hendrikmuhs/ccache-action@6d1841ec156c39a52b1b23a810da917ab98da1f4 # v1.2.10 + with: + key: linux_backcompat + - name: Install GoogleTest + run: | + # check out pre-breakage version of googletest; can be deleted when + # issue 3128 is fixed + # git clone --depth=1 https://github.com/google/googletest.git External/googletest + mkdir -p External/googletest + cd External/googletest + git init + git remote add origin https://github.com/google/googletest.git + git fetch --depth 1 origin 0c400f67fcf305869c5fb113dd296eca266c9725 + git reset --hard FETCH_HEAD + cd ../.. + - name: Update Glslang Sources + run: ./update_glslang_sources.py + - name: Configure + run: cmake -S . -B build -D CMAKE_BUILD_TYPE=Release + env: + 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: | + cd build + ctest --output-on-failure && + cd ../Test && ./runtests + macos: runs-on: ${{matrix.os}} strategy: fail-fast: false matrix: - os: [macos-11] - compiler: [{cc: clang, cxx: clang++}] + os: [macos-11, macos-12] + compiler: [{cc: clang, cxx: clang++}, {cc: gcc, cxx: g++}] cmake_build_type: [Debug, Release] steps: - - uses: actions/checkout@v2 - - uses: actions/setup-python@v2 + - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0 + - uses: actions/setup-python@61a6322f88396a6271a6ee3565807d608ecaddd1 # v4.7.0 with: python-version: '3.7' + - uses: lukka/get-cmake@8be6cca406b575906541e8e3b885d46f416bba39 # v3.27.7 - name: Install GoogleTest run: | # check out pre-breakage version of googletest; can be deleted when @@ -85,49 +189,37 @@ jobs: git reset --hard FETCH_HEAD cd ../.. - name: Update Glslang Sources - run: | - ./update_glslang_sources.py - - name: Build + run: ./update_glslang_sources.py + - name: Configure + run: cmake -S . -B build -D CMAKE_BUILD_TYPE=${{matrix.cmake_build_type}} -G "Ninja" env: CC: ${{matrix.compiler.cc}} CXX: ${{matrix.compiler.cxx}} - run: | - mkdir build && cd build - cmake -DCMAKE_BUILD_TYPE=${{matrix.cmake_build_type}} -DCMAKE_INSTALL_PREFIX=`pwd`/install .. - make -j4 install + - name: Build + run: cmake --build build + - name: Install + run: cmake --install build --prefix build/install - name: Test run: | cd build ctest --output-on-failure && cd ../Test && ./runtests - android: - runs-on: ${{matrix.os}} + windows: + runs-on: ${{matrix.os.genus}} + permissions: + contents: write strategy: fail-fast: false matrix: - os: [ubuntu-20.04] - compiler: [{cc: clang, cxx: clang++}] - cmake_build_type: [Release] + os: [{genus: windows-2019, family: windows}] + cmake_build_type: [Debug, Release] steps: - - uses: actions/checkout@v2 - - uses: actions/setup-python@v2 + - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0 + - uses: lukka/get-cmake@8be6cca406b575906541e8e3b885d46f416bba39 # v3.27.7 + - uses: actions/setup-python@61a6322f88396a6271a6ee3565807d608ecaddd1 # v4.7.0 with: python-version: '3.7' - - name: Install Ubuntu Package Dependencies - if: ${{matrix.os == 'ubuntu-20.04'}} - run: | - sudo apt-get -qq update - sudo apt-get install -y clang-6.0 - - name: Install Android NDK - run: | - export ANDROID_NDK=$HOME/android-ndk - git init $ANDROID_NDK - pushd $ANDROID_NDK - git remote add dneto0 https://github.com/dneto0/android-ndk.git - git fetch --depth=1 dneto0 r17b-strip - git checkout FETCH_HEAD - popd - name: Install GoogleTest run: | # check out pre-breakage version of googletest; can be deleted when @@ -142,16 +234,74 @@ jobs: cd ../.. - name: Update Glslang Sources run: | - ./update_glslang_sources.py + python update_glslang_sources.py - name: Build - env: - CC: ${{matrix.compiler.cc}} - CXX: ${{matrix.compiler.cxx}} run: | - export ANDROID_NDK=$HOME/android-ndk - export TOOLCHAIN_PATH=$ANDROID_NDK/build/cmake/android.toolchain.cmake - echo $ANDROID_NDK - echo $TOOLCHAIN_PATH - mkdir build && cd build - cmake -DCMAKE_TOOLCHAIN_FILE=${TOOLCHAIN_PATH} -DANDROID_NATIVE_API_LEVEL=android-14 -DCMAKE_BUILD_TYPE=${{matrix.cmake_build_type}} -DANDROID_ABI="armeabi-v7a with NEON" -DBUILD_TESTING=OFF .. - make -j4 + cmake -S. -Bbuild -G "Visual Studio 16 2019" -A x64 -DCMAKE_INSTALL_PREFIX="$PWD/build/install" + cmake --build build --config ${{matrix.cmake_build_type}} --target install + - name: Test + run: | + cd build + ctest -C ${{matrix.cmake_build_type}} --output-on-failure + cd ../Test && bash runtests + + android: + runs-on: ubuntu-22.04 + strategy: + matrix: + # Android NDK currently offers 2 different toolchains. + # Test both to ensure we are compatible with either approach. + LEGACY: [ON, OFF] + # Oldest/newest NDK currently provided by GitHub runners + # https://github.com/actions/runner-images/blob/main/images/linux/Ubuntu2204-Readme.md#android + NDK: [23.2.8568313, 25.2.9519653] + steps: + - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0 + - uses: actions/setup-python@61a6322f88396a6271a6ee3565807d608ecaddd1 # v4.7.0 + with: + python-version: '3.7' + - uses: lukka/get-cmake@8be6cca406b575906541e8e3b885d46f416bba39 # v3.27.7 + - name: Setup ccache + uses: hendrikmuhs/ccache-action@6d1841ec156c39a52b1b23a810da917ab98da1f4 # v1.2.10 + with: + key: android-${{ matrix.LEGACY }}-${{ matrix.NDK }} + - name: Update Glslang Sources + run: ./update_glslang_sources.py + - name: Configure + run: | + cmake -S . -B build/ \ + --toolchain $ANDROID_HOME/ndk/${{ matrix.NDK }}/build/cmake/android.toolchain.cmake \ + -D CMAKE_BUILD_TYPE=Release \ + -D ANDROID_ABI=armeabi-v7a \ + -D ANDROID_USE_LEGACY_TOOLCHAIN_FILE=${{ matrix.LEGACY }} \ + -D BUILD_TESTING=OFF + env: + CMAKE_GENERATOR: Ninja + CMAKE_C_COMPILER_LAUNCHER: ccache + CMAKE_CXX_COMPILER_LAUNCHER: ccache + - name: Build + run: cmake --build build/ + + emscripten: + runs-on: ubuntu-22.04 + steps: + - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0 + - uses: actions/setup-python@61a6322f88396a6271a6ee3565807d608ecaddd1 # v4.7.0 + with: + python-version: '3.7' + - uses: lukka/get-cmake@8be6cca406b575906541e8e3b885d46f416bba39 # v3.27.7 + - name: Setup ccache + uses: hendrikmuhs/ccache-action@6d1841ec156c39a52b1b23a810da917ab98da1f4 # v1.2.10 + with: + key: ubuntu-emscripten + - uses: mymindstorm/setup-emsdk@ab889da2abbcbb280f91ec4c215d3bb4f3a8f775 # v12 + - name: Update Glslang Sources + run: ./update_glslang_sources.py + - name: Configure + run: emcmake cmake -GNinja -Bbuild/web -DCMAKE_BUILD_TYPE=Release -DENABLE_GLSLANG_JS=ON -DBUILD_TESTING=OFF -DENABLE_OPT=OFF + env: + CMAKE_GENERATOR: Ninja + CMAKE_C_COMPILER_LAUNCHER: ccache + CMAKE_CXX_COMPILER_LAUNCHER: ccache + - name: Build + run: cmake --build build/web diff --git a/.github/workflows/deploy.js b/.github/workflows/deploy.js index 9f8d24249c..3f1b7e4b4e 100644 --- a/.github/workflows/deploy.js +++ b/.github/workflows/deploy.js @@ -3,11 +3,11 @@ module.exports = async ({github, context, core}) => { await github.rest.git.updateRef({ owner: context.repo.owner, repo: context.repo.repo, - ref: 'tags/master-tot', + ref: 'tags/main-tot', sha: context.sha }) } catch (error) { - core.setFailed(`upload master-tot tag; ${error.name}; ${error.message}`) + core.setFailed(`upload main-tot tag; ${error.name}; ${error.message}`) } let release @@ -15,10 +15,10 @@ module.exports = async ({github, context, core}) => { release = await github.rest.repos.getReleaseByTag({ owner: context.repo.owner, repo: context.repo.repo, - tag: 'master-tot' + tag: 'main-tot' }) } catch (error) { - core.setFailed(`get the master release; ${error.name}; ${error.message}`) + core.setFailed(`get the main release; ${error.name}; ${error.message}`) } try { @@ -28,7 +28,7 @@ module.exports = async ({github, context, core}) => { release_id: release.data.id }) } catch (error) { - core.setFailed(`update the master release; ${error.name}; ${error.message}`) + core.setFailed(`update the main release; ${error.name}; ${error.message}`) } let release_assets diff --git a/.github/workflows/scorecard.yml b/.github/workflows/scorecard.yml new file mode 100644 index 0000000000..fe3833a5ba --- /dev/null +++ b/.github/workflows/scorecard.yml @@ -0,0 +1,53 @@ +name: Scorecard supply-chain security +on: + # For Branch-Protection check. Only the default branch is supported. See + # https://github.com/ossf/scorecard/blob/main/docs/checks.md#branch-protection + branch_protection_rule: + # To guarantee Maintained check is occasionally updated. See + # https://github.com/ossf/scorecard/blob/main/docs/checks.md#maintained + schedule: + - cron: '36 17 * * 5' + push: + branches: [ "main" ] + +# Declare default permissions as read only. +permissions: read-all + +jobs: + analysis: + name: Scorecard analysis + runs-on: ubuntu-latest + permissions: + security-events: write # to upload the results to code-scanning dashboard + id-token: write # to publish results and get a badge + + steps: + - name: "Checkout code" + uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0 + with: + persist-credentials: false + + - name: "Run analysis" + uses: ossf/scorecard-action@483ef80eb98fb506c348f7d62e28055e49fe2398 # v2.3.0 + with: + results_file: results.sarif + results_format: sarif + # To enable Branch-Protection uncomment the `repo_token` line below + # To create the Fine-grained PAT, follow the steps in https://github.com/ossf/scorecard-action#authentication-with-fine-grained-pat-optional. + # repo_token: ${{ secrets.SCORECARD_TOKEN }} + publish_results: true # allows the repo to include the Scorecard badge + + # 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@a8a3f3ad30e3422c9c7b888a15615d19a852ae32 # v3.1.3 + with: + name: SARIF file + path: results.sarif + retention-days: 5 + + # Upload the results to GitHub's code scanning dashboard. + - name: "Upload to code-scanning" + uses: github/codeql-action/upload-sarif@2cb752a87e96af96708ab57187ab6372ee1973ab # v2.22.0 + with: + sarif_file: results.sarif diff --git a/.gitignore b/.gitignore index 333fb76272..732b345973 100644 --- a/.gitignore +++ b/.gitignore @@ -11,6 +11,7 @@ Test/localResults/ External/googletest External/spirv-tools out/ +CMakeUserPresets.json # GN generated files .cipd/ diff --git a/.mailmap b/.mailmap new file mode 100644 index 0000000000..946b24095f --- /dev/null +++ b/.mailmap @@ -0,0 +1,3 @@ +Faith Ekstrand +Faith Ekstrand +Faith Ekstrand diff --git a/Android.mk b/Android.mk index 40cddb7584..6787a972a7 100644 --- a/Android.mk +++ b/Android.mk @@ -1,4 +1,4 @@ -# Copyright (C) 2020 The Khronos Group Inc. +# Copyright (C) 2020-2023 The Khronos Group Inc. # # All rights reserved. # @@ -53,11 +53,11 @@ $(eval $(call gen_glslang_build_info_h)) GLSLANG_OS_FLAGS := -DGLSLANG_OSINCLUDE_UNIX # AMD and NV extensions are turned on by default in upstream Glslang. -GLSLANG_DEFINES:= -DAMD_EXTENSIONS -DNV_EXTENSIONS -DENABLE_HLSL $(GLSLANG_OS_FLAGS) +GLSLANG_DEFINES:= -DENABLE_HLSL $(GLSLANG_OS_FLAGS) include $(CLEAR_VARS) LOCAL_MODULE:=OSDependent -LOCAL_CXXFLAGS:=-std=c++11 -fno-exceptions -fno-rtti $(GLSLANG_DEFINES) +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/ @@ -66,7 +66,7 @@ include $(BUILD_STATIC_LIBRARY) include $(CLEAR_VARS) LOCAL_MODULE:=OGLCompiler -LOCAL_CXXFLAGS:=-std=c++11 -fno-exceptions -fno-rtti $(GLSLANG_DEFINES) +LOCAL_CXXFLAGS:=-std=c++17 -fno-exceptions -fno-rtti $(GLSLANG_DEFINES) LOCAL_EXPORT_C_INCLUDES:=$(LOCAL_PATH) LOCAL_SRC_FILES:=OGLCompilersDLL/InitializeDll.cpp LOCAL_C_INCLUDES:=$(LOCAL_PATH)/OGLCompiler @@ -78,7 +78,7 @@ include $(BUILD_STATIC_LIBRARY) # instead. include $(CLEAR_VARS) LOCAL_MODULE:=HLSL -LOCAL_CXXFLAGS:=-std=c++11 -fno-exceptions -fno-rtti $(GLSLANG_DEFINES) +LOCAL_CXXFLAGS:=-std=c++17 -fno-exceptions -fno-rtti $(GLSLANG_DEFINES) LOCAL_SRC_FILES:= \ hlsl/stub.cpp LOCAL_C_INCLUDES:=$(LOCAL_PATH) \ @@ -93,7 +93,7 @@ $(LOCAL_PATH)/glslang/MachineIndependent/ShaderLang.cpp: \ $(GLSLANG_BUILD_INFO_H) LOCAL_MODULE:=glslang -LOCAL_CXXFLAGS:=-std=c++11 -fno-exceptions -fno-rtti $(GLSLANG_DEFINES) +LOCAL_CXXFLAGS:=-std=c++17 -fno-exceptions -fno-rtti $(GLSLANG_DEFINES) LOCAL_EXPORT_C_INCLUDES:=$(LOCAL_PATH) LOCAL_SRC_FILES:= \ glslang/CInterface/glslang_c_interface.cpp \ @@ -148,7 +148,7 @@ $(LOCAL_PATH)/SPIRV/GlslangToSpv.cpp: \ $(GLSLANG_BUILD_INFO_H) LOCAL_MODULE:=SPIRV -LOCAL_CXXFLAGS:=-std=c++11 -fno-exceptions -fno-rtti -Werror $(GLSLANG_DEFINES) +LOCAL_CXXFLAGS:=-std=c++17 -fno-exceptions -fno-rtti -Werror $(GLSLANG_DEFINES) LOCAL_SRC_FILES:= \ SPIRV/CInterface/spirv_c_interface.cpp \ SPIRV/GlslangToSpv.cpp \ diff --git a/BUILD.bazel b/BUILD.bazel deleted file mode 100644 index 1115b7de82..0000000000 --- a/BUILD.bazel +++ /dev/null @@ -1,309 +0,0 @@ -# Copyright (C) 2020 The Khronos Group Inc. -# -# All rights reserved. -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions -# are met: -# -# Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# -# Redistributions in binary form must reproduce the above -# copyright notice, this list of conditions and the following -# disclaimer in the documentation and/or other materials provided -# with the distribution. -# -# Neither the name of The Khronos Group Inc. nor the names of its -# contributors may be used to endorse or promote products derived -# from this software without specific prior written permission. -# -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS -# FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE -# COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, -# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, -# BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -# LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER -# CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT -# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN -# ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE -# POSSIBILITY OF SUCH DAMAGE. - -package( - default_visibility = ["//visibility:public"], -) - -# Description: -# -# Khronos reference front-end for GLSL and ESSL, and sample SPIR-V generator. - -licenses(["notice"]) - -exports_files(["LICENSE"]) - -# Build information generation script -py_binary( - name = "build_info", - srcs = ["build_info.py"], -) - -py_binary( - name = "gen_extension_headers", - srcs = ["gen_extension_headers.py"], -) - -genrule( - name = "gen_build_info_h", - srcs = ["CHANGES.md", "build_info.h.tmpl"], - outs = ["glslang/build_info.h"], - cmd_bash = "$(location build_info) $$(dirname $(location CHANGES.md)) -i $(location build_info.h.tmpl) -o $(location glslang/build_info.h)", - cmd_bat = "for %F in ($(location CHANGES.md)) do $(location build_info) %~dpF -i $(location build_info.h.tmpl) -o $(location glslang/build_info.h)", - tools = [":build_info"], -) - -genrule( - name = "gen_extension_headers_h", - srcs = ["glslang/ExtensionHeaders", "gen_extension_headers.py"], - outs = ["glslang/glsl_intrinsic_header.h"], - cmd_bash = "$(location gen_extension_headers) -i $(location glslang/ExtensionHeaders) -o $(location glslang/glsl_intrinsic_header.h)", - tools = [":gen_extension_headers"], -) - -COMMON_COPTS = select({ - "@bazel_tools//src/conditions:windows": [""], - "//conditions:default": [ - "-Wall", - "-Wuninitialized", - "-Wunused", - "-Wunused-local-typedefs", - "-Wunused-parameter", - "-Wunused-value", - "-Wunused-variable", - "-Wno-reorder", - "-std=c++11", - "-fvisibility=hidden", - "-fvisibility-inlines-hidden", - "-fno-exceptions", - "-fno-rtti", - ], -}) - -cc_library( - name = "glslang", - srcs = glob( - [ - "glslang/GenericCodeGen/*.cpp", - "glslang/HLSL/*.cpp", - "glslang/MachineIndependent/*.cpp", - "glslang/MachineIndependent/preprocessor/*.cpp", - ], - exclude = [ - "glslang/HLSL/pch.h", - "glslang/MachineIndependent/pch.h", - ], - ) + [ - "OGLCompilersDLL/InitializeDll.cpp", - ] + select({ - "@bazel_tools//src/conditions:windows": - ["glslang/OSDependent/Windows/ossource.cpp"], - "//conditions:default": - ["glslang/OSDependent/Unix/ossource.cpp"], - }), - hdrs = glob([ - "glslang/HLSL/*.h", - "glslang/Include/*.h", - "glslang/MachineIndependent/*.h", - "glslang/MachineIndependent/preprocessor/*.h", - ]) + [ - "OGLCompilersDLL/InitializeDll.h", - "StandAlone/DirStackFileIncluder.h", - "glslang/OSDependent/osinclude.h", - "glslang/Public/ShaderLang.h", - ":gen_build_info_h", - ], - copts = COMMON_COPTS, - defines = [ - "AMD_EXTENSIONS", - "ENABLE_HLSL=0", - "ENABLE_OPT=0", - "NV_EXTENSIONS", - ], - linkopts = select({ - "@bazel_tools//src/conditions:windows": [""], - "//conditions:default": ["-lm", "-lpthread"], - }), - linkstatic = 1, -) - -genrule( - name = "export_spirv_headers", - srcs = [ - "SPIRV/GLSL.ext.AMD.h", - "SPIRV/GLSL.ext.EXT.h", - "SPIRV/GLSL.ext.KHR.h", - "SPIRV/GLSL.ext.NV.h", - "SPIRV/GLSL.std.450.h", - "SPIRV/NonSemanticDebugPrintf.h", - "SPIRV/spirv.hpp", - ], - outs = [ - "include/SPIRV/GLSL.ext.AMD.h", - "include/SPIRV/GLSL.ext.EXT.h", - "include/SPIRV/GLSL.ext.KHR.h", - "include/SPIRV/GLSL.ext.NV.h", - "include/SPIRV/GLSL.std.450.h", - "include/SPIRV/NonSemanticDebugPrintf.h", - "include/SPIRV/spirv.hpp", - ], - cmd_bash = "mkdir -p $(@D)/include/SPIRV && cp $(SRCS) $(@D)/include/SPIRV/", - cmd_bat = "(if not exist $(@D)\\include\\SPIRV mkdir $(@D)\\include\\SPIRV) && (for %S in ($(SRCS)) do @xcopy /q %S $(@D)\\include\\SPIRV\\ >NUL)", -) - -cc_library( - name = "SPIRV_headers", - hdrs = [":export_spirv_headers"], - copts = COMMON_COPTS, - includes = [ - "include", - "include/SPIRV", - ], - linkstatic = 1, -) - -cc_library( - name = "SPIRV", - srcs = glob( - ["SPIRV/*.cpp"], - exclude = [ - "SPIRV/SpvTools.cpp", - ], - ), - hdrs = [ - "SPIRV/GlslangToSpv.h", - "SPIRV/Logger.h", - "SPIRV/SPVRemapper.h", - "SPIRV/SpvBuilder.h", - "SPIRV/SpvTools.h", - "SPIRV/bitutils.h", - "SPIRV/disassemble.h", - "SPIRV/doc.h", - "SPIRV/hex_float.h", - "SPIRV/spvIR.h", - ], - copts = COMMON_COPTS, - includes = ["SPIRV"], - linkopts = select({ - "@bazel_tools//src/conditions:windows": [""], - "//conditions:default": ["-lm"], - }), - linkstatic = 1, - deps = [ - ":SPIRV_headers", - ":glslang", - ], -) - -cc_library( - name = "glslang-default-resource-limits", - srcs = ["StandAlone/ResourceLimits.cpp"], - hdrs = ["StandAlone/ResourceLimits.h"], - copts = COMMON_COPTS, - linkstatic = 1, - deps = [":glslang"], -) - -cc_binary( - name = "glslangValidator", - srcs = [ - "StandAlone/StandAlone.cpp", - "StandAlone/Worklist.h", - ":glslang/glsl_intrinsic_header.h" - ], - copts = COMMON_COPTS, - deps = [ - ":SPIRV", - ":glslang", - ":glslang-default-resource-limits", - ], -) - -cc_binary( - name = "spirv-remap", - srcs = ["StandAlone/spirv-remap.cpp"], - copts = COMMON_COPTS, - deps = [ - ":SPIRV", - ":glslang", - ":glslang-default-resource-limits", - ], -) - -filegroup( - name = "test_files", - srcs = glob( - ["Test/**"], - exclude = [ - "Test/bump", - "Test/glslangValidator", - "Test/runtests", - ], - ), -) - -cc_library( - name = "glslang_test_lib", - testonly = 1, - srcs = [ - "gtests/HexFloat.cpp", - "gtests/Initializer.h", - "gtests/Settings.cpp", - "gtests/Settings.h", - "gtests/TestFixture.cpp", - "gtests/TestFixture.h", - "gtests/main.cpp", - ], - copts = COMMON_COPTS, - data = [":test_files"], - defines = select({ - # Unfortunately we can't use $(location) in cc_library at the moment. - # See https://github.com/bazelbuild/bazel/issues/1023 - # So we'll specify the path manually. - "@bazel_tools//src/conditions:windows": - ["GLSLANG_TEST_DIRECTORY='\"../../../../../Test\"'"], - "//conditions:default": - ["GLSLANG_TEST_DIRECTORY='\"Test\"'"], - }), - linkstatic = 1, - deps = [ - ":SPIRV", - ":glslang", - ":glslang-default-resource-limits", - "@com_google_googletest//:gtest", - ], -) - -GLSLANG_TESTS = glob( - ["gtests/*.FromFile.cpp"], - # Since we are not building the SPIRV-Tools dependency, the following tests - # cannot be performed. - exclude = [ - "gtests/Hlsl.FromFile.cpp", - "gtests/Spv.FromFile.cpp", - ], -) - -[cc_test( - name = test_file.replace("gtests/", "").replace(".FromFile.cpp", "") + "_test", - srcs = [test_file], - copts = COMMON_COPTS, - data = [ - ":test_files", - ], - deps = [ - ":SPIRV", - ":glslang", - ":glslang_test_lib", - ], -) for test_file in GLSLANG_TESTS] diff --git a/BUILD.gn b/BUILD.gn index 4dd0a55396..0bb0d42ec8 100644 --- a/BUILD.gn +++ b/BUILD.gn @@ -96,9 +96,6 @@ action("glslang_extension_headers") { } spirv_tools_dir = glslang_spirv_tools_dir -if (!defined(glslang_angle)) { - glslang_angle = false -} config("glslang_public") { include_dirs = [ "." ] @@ -126,6 +123,8 @@ template("glslang_sources_common") { "SPIRV/GLSL.ext.EXT.h", "SPIRV/GLSL.ext.KHR.h", "SPIRV/GLSL.ext.NV.h", + "SPIRV/GLSL.ext.ARM.h", + "SPIRV/GLSL.ext.QCOM.h", "SPIRV/GLSL.std.450.h", "SPIRV/GlslangToSpv.cpp", "SPIRV/GlslangToSpv.h", @@ -133,6 +132,7 @@ template("glslang_sources_common") { "SPIRV/Logger.cpp", "SPIRV/Logger.h", "SPIRV/NonSemanticDebugPrintf.h", + "SPIRV/NonSemanticShaderDebugInfo100.h", "SPIRV/SPVRemapper.cpp", "SPIRV/SPVRemapper.h", "SPIRV/SpvBuilder.cpp", @@ -241,9 +241,6 @@ template("glslang_sources_common") { sources += [ "SPIRV/SpvTools.cpp" ] defines += [ "ENABLE_OPT=1" ] } - if (invoker.is_angle) { - defines += [ "GLSLANG_ANGLE" ] - } if (is_win) { sources += [ "glslang/OSDependent/Windows/ossource.cpp" ] @@ -292,21 +289,19 @@ template("glslang_sources_common") { } glslang_sources_common("glslang_lib_sources") { - enable_opt = !glslang_angle - enable_hlsl = !glslang_angle - is_angle = glslang_angle + enable_opt = true + enable_hlsl = true } glslang_sources_common("glslang_sources") { enable_opt = true enable_hlsl = true - is_angle = false } source_set("glslang_default_resource_limits_sources") { sources = [ - "StandAlone/ResourceLimits.cpp", - "StandAlone/ResourceLimits.h", + "glslang/ResourceLimits/ResourceLimits.cpp", + "glslang/Public/ResourceLimits.h", "glslang/Include/ResourceLimits.h", ] public_configs = [ ":glslang_public" ] diff --git a/CHANGES.md b/CHANGES.md index 292147c3c9..8a97ff4f72 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -3,6 +3,109 @@ All notable changes to this project will be documented in this file. This project adheres to [Semantic Versioning](https://semver.org/). +## 13.1.1 2023-10-16 +* Initialize compile_only field in C interface + +## 13.1.0 2023-10-13 +* Support GL_EXT_texture_shadow_lod +* Support GL_NV_displacement_micromap +* Fix ByteAddressBuffer when used a function parameter +* Add more verbose messages if SPIRV-Tools is not found +* Fix names for explicitly sized types when emitting nonsemantic debug info +* Emit error for r-value arguments in atomic memory operations +* Add --no-link option +* Beautify preprocessor output format +* Fix race condition in glslangValidator +* Only set LocalSizeId mode when necessary +* Don't emit invalid debug info for buffer references + +## 13.0.0 2023-08-23 + +### Breaking changes +* Simplify PoolAlloc via thread_local + * Remove InitializeDLL functions + * Remove OSDependent TLS functions +* Remove GLSLANG_WEB and GLSLANG_WEB_DEVEL code paths + +### Other changes +* Raise CMAKE minimum to 3.17.2 +* Support GL_KHR_cooperative_matrix +* Support GL_QCOM_image_processing_support +* Support outputting each module to a filename with spirv-remap +* Generate an error when gl_PrimitiveShaderRateEXT is used without enabling the extension +* Improve layout checking when GL_EXT_spirv_intrinsics is enabled + +## 12.3.1 2023-07-20 + +### Other changes +* Improve backward compatibility for glslangValidator rename on Windows + +## 12.3.0 2023-07-19 + +### Other changes +* Rename glslangValidator to glslang and create glslangValidator symlink +* Support HLSL binary literals +* Add missing initialization members for web +* Improve push_constant upgrading +* Fix race condition in spirv remap +* Support pre and post HLSL qualifier validation +* Force generateDebugInfo when non-semantic debug info is enabled +* Exit with error if output file cannot be written +* Fix struct member buffer reference decorations + +## 12.2.0 2023-05-17 + +### Other changes +* Support GLSL_EXT_shader_tile_image +* Support GL_EXT_ray_tracing_position_fetch +* Support custom include callbacks via the C API +* Add preamble-text command-line option +* Accept variables as parameters of spirv_decorate_id +* Fix generation of conditionals with a struct result +* Fix double expansion of macros +* Fix DebugCompilationUnit scope +* Improve line information + +## 12.1.0 2023-03-21 + +### Other changes +* Reject non-float inputs/outputs for version less than 120 +* Fix invalid BufferBlock decoration for SPIR-V 1.3 and above +* Add HLSL relaxed-precision float/int matrix expansions +* Block decorate Vulkan structs with RuntimeArrays +* Support InterlockedAdd on float types + +## 12.0.0 2023-01-18 + +### Breaking changes +* An ABI was accidentally broken in #3014. Consequently, we have incremented the major revision number. + +### Other changes +* Add support for ARB_bindless_texture. +* Add support for GL_NV_shader_invocation_reorder. +* Fix const parameter debug types when using NonSemantic.Shader.DebugInfo.100. +* Fix NonSemantic.Shader.DebugInfo.100 disassembly. +* Fix MaxDualSourceDrawBuffersEXT usage. +* Fix structure member reference crash. + +## 11.13.0 2022-12-06 + +### Other changes +* Make HelperInvocation accesses volatile for SPIR-V 1.6. +* Improve forward compatibility of ResourceLimits interface +* Remove GLSLANG_ANGLE + +## 11.12.0 2022-10-12 + +### Other changes +* Update generator version +* Add support for GL_EXT_mesh_shader +* Add support for NonSemantic.Shader.DebugInfo.100 +* Make OpEmitMeshTasksEXT a terminal instruction +* Make gl_SubGroupARB a flat in int in Vulkan +* Add support for GL_EXT_opacity_micromap +* Add preamble support to C interface + ## 11.11.0 2022-08-11 ### Other changes diff --git a/CMakeLists.txt b/CMakeLists.txt index a01168603a..a734ad1f87 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,4 +1,4 @@ -# Copyright (C) 2020 The Khronos Group Inc. +# Copyright (C) 2020-2023 The Khronos Group Inc. # # All rights reserved. # @@ -30,24 +30,11 @@ # LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN # ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE # POSSIBILITY OF SUCH DAMAGE. - -# increase to 3.1 once all major distributions -# include a version of CMake >= 3.1 -cmake_minimum_required(VERSION 3.14.0) -if (POLICY CMP0048) - cmake_policy(SET CMP0048 NEW) -endif() -if(POLICY CMP0054) - cmake_policy(SET CMP0054 NEW) -endif() - -project(glslang LANGUAGES CXX) +cmake_minimum_required(VERSION 3.17.2) +project(glslang) set_property(GLOBAL PROPERTY USE_FOLDERS ON) -# Enable compile commands database -set(CMAKE_EXPORT_COMPILE_COMMANDS ON) - # Adhere to GNU filesystem layout conventions include(GNUInstallDirs) include(CMakePackageConfigHelpers) @@ -78,18 +65,10 @@ if(NOT ${SKIP_GLSLANG_INSTALL}) endif() option(ENABLE_SPVREMAPPER "Enables building of SPVRemapper" ON) -option(ENABLE_GLSLANG_BINARIES "Builds glslangValidator and spirv-remap" ON) +option(ENABLE_GLSLANG_BINARIES "Builds glslang and spirv-remap" ON) option(ENABLE_GLSLANG_JS "If using Emscripten, build glslang.js. Otherwise, builds a sample executable for binary-size testing." OFF) -CMAKE_DEPENDENT_OPTION(ENABLE_GLSLANG_WEBMIN - "Reduces glslang to minimum needed for web use" - OFF "ENABLE_GLSLANG_JS" - OFF) -CMAKE_DEPENDENT_OPTION(ENABLE_GLSLANG_WEBMIN_DEVEL - "For ENABLE_GLSLANG_WEBMIN builds, enables compilation error messages" - OFF "ENABLE_GLSLANG_WEBMIN" - OFF) CMAKE_DEPENDENT_OPTION(ENABLE_EMSCRIPTEN_SINGLE_FILE "If using Emscripten, enables SINGLE_FILE build" OFF "ENABLE_GLSLANG_JS AND EMSCRIPTEN" @@ -99,11 +78,7 @@ CMAKE_DEPENDENT_OPTION(ENABLE_EMSCRIPTEN_ENVIRONMENT_NODE OFF "ENABLE_GLSLANG_JS AND EMSCRIPTEN" OFF) -CMAKE_DEPENDENT_OPTION(ENABLE_HLSL - "Enables HLSL input support" - ON "NOT ENABLE_GLSLANG_WEBMIN" - OFF) - +option(ENABLE_HLSL "Enables HLSL input support" ON) option(ENABLE_RTTI "Enables RTTI" OFF) option(ENABLE_EXCEPTIONS "Enables Exceptions" OFF) option(ENABLE_OPT "Enables spirv-opt capability if present" ON) @@ -117,18 +92,6 @@ else() endif() option(ENABLE_CTEST "Enables testing" ON) -if(ENABLE_GLSLANG_INSTALL AND CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT AND WIN32) - set(CMAKE_INSTALL_PREFIX "install" CACHE STRING "..." FORCE) -endif() - -option(USE_CCACHE "Use ccache" OFF) -if(USE_CCACHE) - find_program(CCACHE_FOUND ccache) - if(CCACHE_FOUND) - set_property(GLOBAL PROPERTY RULE_LAUNCH_COMPILE ccache) - endif() -endif() - if(ENABLE_CTEST) include(CTest) endif() @@ -137,13 +100,6 @@ if(ENABLE_HLSL) add_definitions(-DENABLE_HLSL) endif() -if(ENABLE_GLSLANG_WEBMIN) - add_definitions(-DGLSLANG_WEB) - if(ENABLE_GLSLANG_WEBMIN_DEVEL) - add_definitions(-DGLSLANG_WEB_DEVEL) - endif() -endif() - if(WIN32) set(CMAKE_DEBUG_POSTFIX "d") option(OVERRIDE_MSVCCRT "Overrides runtime of MSVC " ON) @@ -151,7 +107,7 @@ if(WIN32) include(ChooseMSVCCRT.cmake) endif() add_definitions(-DGLSLANG_OSINCLUDE_WIN32) -elseif(UNIX) +elseif(UNIX OR ANDROID) add_definitions(-DGLSLANG_OSINCLUDE_UNIX) else() message("unknown platform") @@ -160,7 +116,6 @@ endif() if(${CMAKE_CXX_COMPILER_ID} MATCHES "GNU") add_compile_options(-Wall -Wmaybe-uninitialized -Wuninitialized -Wunused -Wunused-local-typedefs -Wunused-parameter -Wunused-value -Wunused-variable -Wunused-but-set-parameter -Wunused-but-set-variable -fno-exceptions) - add_compile_options(-Wno-reorder) # disable this from -Wall, since it happens all over. if(NOT ENABLE_RTTI) add_compile_options(-fno-rtti) endif() @@ -171,16 +126,13 @@ if(${CMAKE_CXX_COMPILER_ID} MATCHES "GNU") add_compile_options(-Werror=deprecated-copy) endif() - if(NOT CMAKE_VERSION VERSION_LESS "3.13" AND NOT CMAKE_SYSTEM_NAME STREQUAL "Darwin") + if(NOT CMAKE_SYSTEM_NAME STREQUAL "OpenBSD" AND NOT CMAKE_SYSTEM_NAME STREQUAL "Darwin") # Error if there's symbols that are not found at link time. - # add_link_options() was added in CMake 3.13 - if using an earlier - # version don't set this - it should be caught by presubmits anyway. add_link_options("-Wl,--no-undefined") endif() elseif(${CMAKE_CXX_COMPILER_ID} MATCHES "Clang" AND NOT MSVC) add_compile_options(-Wall -Wuninitialized -Wunused -Wunused-local-typedefs -Wunused-parameter -Wunused-value -Wunused-variable) - add_compile_options(-Wno-reorder) # disable this from -Wall, since it happens all over. if(NOT ENABLE_RTTI) add_compile_options(-fno-rtti) endif() @@ -188,14 +140,12 @@ elseif(${CMAKE_CXX_COMPILER_ID} MATCHES "Clang" AND NOT MSVC) add_compile_options(-fno-exceptions) endif() - if(NOT CMAKE_VERSION VERSION_LESS "3.13") - # Error if there's symbols that are not found at link time. - # add_link_options() was added in CMake 3.13 - if using an earlier - # version don't set this - it should be caught by presubmits anyway. - if (WIN32) - add_link_options("-Wl,--no-undefined") - else() + if(NOT (CMAKE_SYSTEM_NAME STREQUAL "OpenBSD" OR CMAKE_SYSTEM_NAME STREQUAL "Emscripten")) + # Error if there's symbols that are not found at link time. Some linkers do not support this flag. + if (CMAKE_CXX_COMPILER_ID STREQUAL "AppleClang") add_link_options("-Wl,-undefined,error") + elseif(NOT APPLE) + add_link_options("-Wl,--no-undefined") endif() endif() elseif(MSVC) @@ -227,21 +177,16 @@ if(ENABLE_GLSLANG_JS) endif() endif() -# Request C++11 -if(${CMAKE_VERSION} VERSION_LESS 3.1) - # CMake versions before 3.1 do not understand CMAKE_CXX_STANDARD - # remove this block once CMake >=3.1 has fixated in the ecosystem - set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11") -else() - set(CMAKE_CXX_STANDARD 11) - set(CMAKE_CXX_STANDARD_REQUIRED ON) - set(CMAKE_CXX_EXTENSIONS OFF) -endif() +# Request C++17 +set(CMAKE_CXX_STANDARD 17) +set(CMAKE_CXX_STANDARD_REQUIRED ON) +set(CMAKE_CXX_EXTENSIONS OFF) function(glslang_set_link_args TARGET) # For MinGW compiles, statically link against the GCC and C++ runtimes. # This avoids the need to ship those runtimes as DLLs. - if(WIN32 AND ${CMAKE_CXX_COMPILER_ID} MATCHES "GNU") + # This is supported by GCC and Clang. + if(WIN32 AND NOT MSVC) set_target_properties(${TARGET} PROPERTIES LINK_FLAGS "-static -static-libgcc -static-libstdc++") endif() @@ -289,10 +234,9 @@ 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) if(WIN32) target_compile_definitions(${target} PRIVATE "GLSLANG_EXPORTING=1") - else() - target_compile_options(${target} PRIVATE "-fvisibility=hidden") endif() endif() endfunction() @@ -313,14 +257,30 @@ else() endif() if(BUILD_EXTERNAL AND IS_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/External) - find_host_package(PythonInterp 3 REQUIRED) + find_host_package(Python3 REQUIRED) # We depend on these for later projects, so they should come first. add_subdirectory(External) endif() +option(ALLOW_EXTERNAL_SPIRV_TOOLS "Allows to build against installed SPIRV-Tools-opt" OFF) if(NOT TARGET SPIRV-Tools-opt) - set(ENABLE_OPT OFF) + if(ALLOW_EXTERNAL_SPIRV_TOOLS) + # Look for external SPIR-V Tools build, if not building in-tree + message(STATUS "Trying to find local SPIR-V tools") + find_package(SPIRV-Tools-opt) + if(NOT TARGET SPIRV-Tools-opt) + if(ENABLE_OPT) + message(WARNING "ENABLE_OPT set but SPIR-V tools not found! Disabling SPIR-V optimization.") + endif() + set(ENABLE_OPT OFF) + endif() + else() + if(ENABLE_OPT) + message(SEND_ERROR "ENABLE_OPT set but SPIR-V tools not found. Please run update_glslang_sources.py, " + "set the ALLOW_EXTERNAL_SPIRV_TOOLS option to use a local install of SPIRV-Tools, or set ENABLE_OPT=0.") + endif() + endif() endif() if(ENABLE_OPT) @@ -355,12 +315,12 @@ if(ENABLE_CTEST AND BUILD_TESTING) endif() if (CMAKE_CONFIGURATION_TYPES) - set(RESULTS_PATH ${CMAKE_CURRENT_BINARY_DIR}/$/localResults) - set(VALIDATOR_PATH ${CMAKE_CURRENT_BINARY_DIR}/StandAlone/$/glslangValidator) - set(REMAP_PATH ${CMAKE_CURRENT_BINARY_DIR}/StandAlone/$/spirv-remap) + set(RESULTS_PATH ${CMAKE_CURRENT_BINARY_DIR}/$/localResults) + set(VALIDATOR_PATH ${CMAKE_CURRENT_BINARY_DIR}/StandAlone/$/glslang) + set(REMAP_PATH ${CMAKE_CURRENT_BINARY_DIR}/StandAlone/$/spirv-remap) else() set(RESULTS_PATH ${CMAKE_CURRENT_BINARY_DIR}/localResults) - set(VALIDATOR_PATH ${CMAKE_CURRENT_BINARY_DIR}/StandAlone/glslangValidator) + set(VALIDATOR_PATH ${CMAKE_CURRENT_BINARY_DIR}/StandAlone/glslang) set(REMAP_PATH ${CMAKE_CURRENT_BINARY_DIR}/StandAlone/spirv-remap) endif() @@ -372,34 +332,42 @@ endif() if(ENABLE_GLSLANG_INSTALL) file(WRITE "${CMAKE_CURRENT_BINARY_DIR}/glslang-config.cmake.in" [=[ @PACKAGE_INIT@ + @INSTALL_CONFIG_UNIX@ include("@PACKAGE_PATH_EXPORT_TARGETS@") ]=]) - - set(PATH_EXPORT_TARGETS "${CMAKE_INSTALL_DATADIR}/${PROJECT_NAME}/glslang-targets.cmake") + + set(PATH_EXPORT_TARGETS "${CMAKE_INSTALL_LIBDIR}/cmake/${PROJECT_NAME}/glslang-targets.cmake") + if(UNIX OR "${CMAKE_SYSTEM_NAME}" STREQUAL "Fuchsia") + set(INSTALL_CONFIG_UNIX [=[ + include(CMakeFindDependencyMacro) + set(THREADS_PREFER_PTHREAD_FLAG ON) + find_dependency(Threads REQUIRED) + ]=]) + endif() configure_package_config_file( "${CMAKE_CURRENT_BINARY_DIR}/glslang-config.cmake.in" "${CMAKE_CURRENT_BINARY_DIR}/glslang-config.cmake" PATH_VARS PATH_EXPORT_TARGETS - INSTALL_DESTINATION ${CMAKE_INSTALL_DATADIR}/${PROJECT_NAME} + INSTALL_DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/${PROJECT_NAME} ) - + write_basic_package_version_file("${CMAKE_CURRENT_BINARY_DIR}/glslang-config-version.cmake" VERSION ${GLSLANG_VERSION} COMPATIBILITY SameMajorVersion ) - + install( EXPORT glslang-targets NAMESPACE "glslang::" - DESTINATION "${CMAKE_INSTALL_DATADIR}/${PROJECT_NAME}" + DESTINATION "${CMAKE_INSTALL_LIBDIR}/cmake/${PROJECT_NAME}" ) - + install( FILES "${CMAKE_CURRENT_BINARY_DIR}/glslang-config.cmake" "${CMAKE_CURRENT_BINARY_DIR}/glslang-config-version.cmake" DESTINATION - "${CMAKE_INSTALL_DATADIR}/${PROJECT_NAME}" + "${CMAKE_INSTALL_LIBDIR}/cmake/${PROJECT_NAME}" ) -endif() \ No newline at end of file +endif() diff --git a/OGLCompilersDLL/CMakeLists.txt b/OGLCompilersDLL/CMakeLists.txt index 8c0e2ba5c7..71a5675d15 100644 --- a/OGLCompilersDLL/CMakeLists.txt +++ b/OGLCompilersDLL/CMakeLists.txt @@ -41,7 +41,7 @@ if(WIN32) source_group("Source" FILES ${SOURCES}) endif(WIN32) -if(ENABLE_GLSLANG_INSTALL) +if(ENABLE_GLSLANG_INSTALL AND NOT BUILD_SHARED_LIBS) install(TARGETS OGLCompiler EXPORT glslang-targets) # Backward compatibility @@ -49,11 +49,11 @@ if(ENABLE_GLSLANG_INSTALL) message(WARNING \"Using `OGLCompilerTargets.cmake` is deprecated: use `find_package(glslang)` to find glslang CMake targets.\") if (NOT TARGET glslang::OGLCompiler) - include(\"\${CMAKE_CURRENT_LIST_DIR}/../../${CMAKE_INSTALL_DATADIR}/${PROJECT_NAME}/glslang-targets.cmake\") + include(\"${CMAKE_INSTALL_FULL_LIBDIR}/cmake/${PROJECT_NAME}/glslang-targets.cmake\") endif() add_library(OGLCompiler ALIAS glslang::OGLCompiler) ") install(FILES "${CMAKE_CURRENT_BINARY_DIR}/OGLCompilerTargets.cmake" DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake) -endif(ENABLE_GLSLANG_INSTALL) +endif() diff --git a/OGLCompilersDLL/InitializeDll.cpp b/OGLCompilersDLL/InitializeDll.cpp index abea9108b1..ab3762e011 100644 --- a/OGLCompilersDLL/InitializeDll.cpp +++ b/OGLCompilersDLL/InitializeDll.cpp @@ -32,134 +32,6 @@ // POSSIBILITY OF SUCH DAMAGE. // -#define SH_EXPORTING - -#include - -#include "InitializeDll.h" -#include "../glslang/Include/InitializeGlobals.h" -#include "../glslang/Public/ShaderLang.h" -#include "../glslang/Include/PoolAlloc.h" - namespace glslang { -OS_TLSIndex ThreadInitializeIndex = OS_INVALID_TLS_INDEX; - -// Per-process initialization. -// Needs to be called at least once before parsing, etc. is done. -// Will also do thread initialization for the calling thread; other -// threads will need to do that explicitly. -bool InitProcess() -{ - glslang::GetGlobalLock(); - - if (ThreadInitializeIndex != OS_INVALID_TLS_INDEX) { - // - // Function is re-entrant. - // - - glslang::ReleaseGlobalLock(); - return true; - } - - ThreadInitializeIndex = OS_AllocTLSIndex(); - - if (ThreadInitializeIndex == OS_INVALID_TLS_INDEX) { - assert(0 && "InitProcess(): Failed to allocate TLS area for init flag"); - - glslang::ReleaseGlobalLock(); - return false; - } - - if (! InitializePoolIndex()) { - assert(0 && "InitProcess(): Failed to initialize global pool"); - - glslang::ReleaseGlobalLock(); - return false; - } - - if (! InitThread()) { - assert(0 && "InitProcess(): Failed to initialize thread"); - - glslang::ReleaseGlobalLock(); - return false; - } - - glslang::ReleaseGlobalLock(); - return true; -} - -// Per-thread scoped initialization. -// Must be called at least once by each new thread sharing the -// symbol tables, etc., needed to parse. -bool InitThread() -{ - // - // This function is re-entrant - // - if (ThreadInitializeIndex == OS_INVALID_TLS_INDEX) { - assert(0 && "InitThread(): Process hasn't been initalised."); - return false; - } - - if (OS_GetTLSValue(ThreadInitializeIndex) != 0) - return true; - - if (! OS_SetTLSValue(ThreadInitializeIndex, (void *)1)) { - assert(0 && "InitThread(): Unable to set init flag."); - return false; - } - - glslang::SetThreadPoolAllocator(nullptr); - - return true; -} - -// Not necessary to call this: InitThread() is reentrant, and the need -// to do per thread tear down has been removed. -// -// This is kept, with memory management removed, to satisfy any exiting -// calls to it that rely on it. -bool DetachThread() -{ - bool success = true; - - if (ThreadInitializeIndex == OS_INVALID_TLS_INDEX) - return true; - - // - // Function is re-entrant and this thread may not have been initialized. - // - if (OS_GetTLSValue(ThreadInitializeIndex) != 0) { - if (!OS_SetTLSValue(ThreadInitializeIndex, (void *)0)) { - assert(0 && "DetachThread(): Unable to clear init flag."); - success = false; - } - } - - return success; -} - -// Not necessary to call this: InitProcess() is reentrant. -// -// This is kept, with memory management removed, to satisfy any exiting -// calls to it that rely on it. -// -// Users of glslang should call shFinalize() or glslang::FinalizeProcess() for -// process-scoped memory tear down. -bool DetachProcess() -{ - bool success = true; - - if (ThreadInitializeIndex == OS_INVALID_TLS_INDEX) - return true; - - success = DetachThread(); - - OS_FreeTLSIndex(ThreadInitializeIndex); - ThreadInitializeIndex = OS_INVALID_TLS_INDEX; - - return success; -} - } // end namespace glslang diff --git a/OGLCompilersDLL/InitializeDll.h b/OGLCompilersDLL/InitializeDll.h index 661cee4d24..b18e2ab3c5 100644 --- a/OGLCompilersDLL/InitializeDll.h +++ b/OGLCompilersDLL/InitializeDll.h @@ -38,10 +38,10 @@ namespace glslang { -bool InitProcess(); -bool InitThread(); -bool DetachThread(); // not called from standalone, perhaps other tools rely on parts of it -bool DetachProcess(); // not called from standalone, perhaps other tools rely on parts of it +inline bool InitProcess() { return true; } // DEPRECATED +inline bool InitThread() { return true; } // DEPRECATED +inline bool DetachThread() { return true; } // DEPRECATED +inline bool DetachProcess() { return true; } // DEPRECATED } // end namespace glslang diff --git a/README-spirv-remap.txt b/README-spirv-remap.txt index 3e5288aac5..f3efee8368 100644 --- a/README-spirv-remap.txt +++ b/README-spirv-remap.txt @@ -112,7 +112,7 @@ BUILD DEPENDENCIES: BUILDING -------------------------------------------------------------------------------- -The standalone remapper is built along side glslangValidator through its +The standalone remapper is built along side glslang through its normal build process. diff --git a/README.md b/README.md index 5e642e6908..ea1e867b46 100644 --- a/README.md +++ b/README.md @@ -1,26 +1,19 @@ # News -1. Visual Studio 2013 is no longer supported +1. [As discussed in #3107](https://github.com/KhronosGroup/glslang/issues/3107), the default branch of this repository is now 'main'. This change should be transparent to repository users, since github rewrites many references to the old 'master' branch to 'main'. However, if you have a checked-out local clone, you may wish to take the following steps as recommended by github: - [As scheduled](https://github.com/KhronosGroup/glslang/blob/9eef54b2513ca6b40b47b07d24f453848b65c0df/README.md#planned-deprecationsremovals), -Microsoft Visual Studio 2013 is no longer officially supported. \ - Please upgrade to at least Visual Studio 2015. - -2. The versioning scheme is being improved, and you might notice some differences. This is currently WIP, but will be coming soon. See, for example, PR #2277. - -3. If you get a new **compilation error due to a missing header**, it might be caused by this planned removal: - -**SPIRV Folder, 1-May, 2020.** Glslang, when installed through CMake, -will install a `SPIRV` folder into `${CMAKE_INSTALL_INCLUDEDIR}`. -This `SPIRV` folder is being moved to `glslang/SPIRV`. -During the transition the `SPIRV` folder will be installed into both locations. -The old install of `SPIRV/` will be removed as a CMake install target no sooner than May 1, 2020. -See issue #1964. +```sh +git branch -m master main +git fetch origin +git branch -u origin/main main +git remote set-head origin -a +``` -If people are only using this location to get spirv.hpp, I recommend they get that from [SPIRV-Headers](https://github.com/KhronosGroup/SPIRV-Headers) instead. +2. C++17 (all platforms) and Visual Studio 2019 (Windows) are now required. This change was driven by the external dependency on SPIRV-Tools. -[![appveyor status](https://ci.appveyor.com/api/projects/status/q6fi9cb0qnhkla68/branch/master?svg=true)](https://ci.appveyor.com/project/Khronoswebmaster/glslang/branch/master) +![Continuous Integration](https://github.com/KhronosGroup/glslang/actions/workflows/continuous_integration.yml/badge.svg) ![Continuous Deployment](https://github.com/KhronosGroup/glslang/actions/workflows/continuous_deployment.yml/badge.svg) +[![OpenSSF Scorecard](https://api.securityscorecards.dev/projects/github.com/KhronosGroup/glslang/badge)](https://securityscorecards.dev/viewer/?uri=github.com/KhronosGroup/glslang) # Glslang Components and Status @@ -55,7 +48,7 @@ An API for getting reflection information from the AST, reflection types/variabl ### Standalone Wrapper -`glslangValidator` is command-line tool for accessing the functionality above. +`glslang` is command-line tool for accessing the functionality above. Status: Complete. @@ -73,7 +66,7 @@ The above page, while not kept up to date, includes additional information regar ## Execution of Standalone Wrapper -To use the standalone binary form, execute `glslangValidator`, and it will print +To use the standalone binary form, execute `glslang`, and it will print a usage statement. Basic operation is to give it a file containing a shader, and it will print out warnings/errors and optionally an AST. @@ -99,15 +92,15 @@ There is also a non-shader extension: ## Building (CMake) Instead of building manually, you can also download the binaries for your -platform directly from the [master-tot release][master-tot-release] on GitHub. +platform directly from the [main-tot release][main-tot-release] on GitHub. Those binaries are automatically uploaded by the buildbots after successful -testing and they always reflect the current top of the tree of the master +testing and they always reflect the current top of the tree of the main branch. ### Dependencies -* A C++11 compiler. - (For MSVS: use 2015 or later.) +* A C++17 compiler. + (For MSVS: use 2019 or later.) * [CMake][cmake]: for generating compilation targets. * make: _Linux_, ninja is an alternative, if configured. * [Python 3.x][python]: for executing SPIRV-Tools scripts. (Optional if not using SPIRV-Tools and the 'External' subdirectory does not exist.) @@ -242,16 +235,13 @@ changes are quite infrequent. For windows you can get binaries from The command to rebuild is: ```bash -m4 -P MachineIndependent/glslang.m4 > MachineIndependent/glslang.y bison --defines=MachineIndependent/glslang_tab.cpp.h -t MachineIndependent/glslang.y -o MachineIndependent/glslang_tab.cpp ``` -The above commands are also available in the bash script in `updateGrammar`, +The above command is also available in the bash script in `updateGrammar`, when executed from the glslang subdirectory of the glslang repository. -With no arguments it builds the full grammar, and with a "web" argument, -the web grammar subset (see more about the web subset in the next section). ### Building to WASM for the Web and Node ### Building a standalone JS/WASM library for the Web and Node @@ -261,15 +251,9 @@ Use the steps in [Build Steps](#build-steps), with the following notes/exception Bash-like environments: + [Instructions located here](https://emscripten.org/docs/getting_started/downloads.html#sdk-download-and-install) * Wrap cmake call: `emcmake cmake` -* Set `-DBUILD_TESTING=OFF -DENABLE_OPT=OFF -DINSTALL_GTEST=OFF`. +* Set `-DBUILD_TESTING=OFF -DENABLE_OPT=OFF`. * Set `-DENABLE_HLSL=OFF` if HLSL is not needed. * For a standalone JS/WASM library, turn on `-DENABLE_GLSLANG_JS=ON`. -* For building a minimum-size web subset of core glslang: - + turn on `-DENABLE_GLSLANG_WEBMIN=ON` (disables HLSL) - + execute `updateGrammar web` from the glslang subdirectory - (or if using your own scripts, `m4` needs a `-DGLSLANG_WEB` argument) - + optionally, for GLSL compilation error messages, turn on - `-DENABLE_GLSLANG_WEBMIN_DEVEL=ON` * To get a fully minimized build, make sure to use `brotli` to compress the .js and .wasm files @@ -277,7 +261,7 @@ Example: ```sh emcmake cmake -DCMAKE_BUILD_TYPE=Release -DENABLE_GLSLANG_JS=ON \ - -DENABLE_HLSL=OFF -DBUILD_TESTING=OFF -DENABLE_OPT=OFF -DINSTALL_GTEST=OFF .. + -DENABLE_HLSL=OFF -DBUILD_TESTING=OFF -DENABLE_OPT=OFF .. ``` ## Building glslang - Using vcpkg @@ -433,9 +417,18 @@ warning/error and other options for controlling compilation. This interface is located `glslang_c_interface.h` and exposes functionality similar to the C++ interface. The following snippet is a complete example showing how to compile GLSL into SPIR-V 1.5 for Vulkan 1.2. -```cxx -std::vector compileShaderToSPIRV_Vulkan(glslang_stage_t stage, const char* shaderSource, const char* fileName) -{ +```c +#include + +// Required for use of glslang_default_resource +#include + +typedef struct SpirVBinary { + uint32_t *words; // SPIR-V words + int size; // number of words in SPIR-V binary +} SpirVBinary; + +SpirVBinary compileShaderToSPIRV_Vulkan(glslang_stage_t stage, const char* shaderSource, const char* fileName) { const glslang_input_t input = { .language = GLSLANG_SOURCE_GLSL, .stage = stage, @@ -449,18 +442,22 @@ std::vector compileShaderToSPIRV_Vulkan(glslang_stage_t stage, const c .force_default_version_and_profile = false, .forward_compatible = false, .messages = GLSLANG_MSG_DEFAULT_BIT, - .resource = reinterpret_cast(&glslang::DefaultTBuiltInResource), + .resource = glslang_default_resource(), }; glslang_shader_t* shader = glslang_shader_create(&input); + SpirVBinary bin = { + .words = NULL, + .size = 0, + }; if (!glslang_shader_preprocess(shader, &input)) { printf("GLSL preprocessing failed %s\n", fileName); printf("%s\n", glslang_shader_get_info_log(shader)); printf("%s\n", glslang_shader_get_info_debug_log(shader)); printf("%s\n", input.code); glslang_shader_delete(shader); - return std::vector(); + return bin; } if (!glslang_shader_parse(shader, &input)) { @@ -469,7 +466,7 @@ std::vector compileShaderToSPIRV_Vulkan(glslang_stage_t stage, const c printf("%s\n", glslang_shader_get_info_debug_log(shader)); printf("%s\n", glslang_shader_get_preprocessed_code(shader)); glslang_shader_delete(shader); - return std::vector(); + return bin; } glslang_program_t* program = glslang_program_create(); @@ -481,13 +478,14 @@ std::vector compileShaderToSPIRV_Vulkan(glslang_stage_t stage, const c printf("%s\n", glslang_program_get_info_debug_log(program)); glslang_program_delete(program); glslang_shader_delete(shader); - return std::vector(); + return bin; } glslang_program_SPIRV_generate(program, stage); - std::vector outShaderModule(glslang_program_SPIRV_get_size(program)); - glslang_program_SPIRV_get(program, outShaderModule.data()); + bin.size = glslang_program_SPIRV_get_size(program); + bin.words = malloc(bin.size * sizeof(uint32_t)); + glslang_program_SPIRV_get(program, bin.words); const char* spirv_messages = glslang_program_SPIRV_get_messages(program); if (spirv_messages) @@ -496,7 +494,7 @@ std::vector compileShaderToSPIRV_Vulkan(glslang_stage_t stage, const c glslang_program_delete(program); glslang_shader_delete(shader); - return outShaderModule; + return bin; } ``` @@ -555,4 +553,4 @@ std::vector compileShaderToSPIRV_Vulkan(glslang_stage_t stage, const c [bison]: https://www.gnu.org/software/bison/ [googletest]: https://github.com/google/googletest [bison-gnu-win32]: http://gnuwin32.sourceforge.net/packages/bison.htm -[master-tot-release]: https://github.com/KhronosGroup/glslang/releases/tag/master-tot +[main-tot-release]: https://github.com/KhronosGroup/glslang/releases/tag/main-tot diff --git a/SECURITY.md b/SECURITY.md new file mode 100644 index 0000000000..ffa39bf7a2 --- /dev/null +++ b/SECURITY.md @@ -0,0 +1,6 @@ +# Security Policy + +To report a security issue, please disclose it at [security advisory](https://github.com/KhronosGroup/glslang/security/advisories/new). + +This project is maintained by a team of volunteers on a reasonable-effort basis. As +such, please give us at least 90 days to work on a fix before public exposure. diff --git a/SPIRV/CInterface/spirv_c_interface.cpp b/SPIRV/CInterface/spirv_c_interface.cpp index d9312bbbdb..5e7316e4fa 100644 --- a/SPIRV/CInterface/spirv_c_interface.cpp +++ b/SPIRV/CInterface/spirv_c_interface.cpp @@ -59,22 +59,22 @@ static EShLanguage c_shader_stage(glslang_stage_t stage) return EShLangFragment; case GLSLANG_STAGE_COMPUTE: return EShLangCompute; - case GLSLANG_STAGE_RAYGEN_NV: + case GLSLANG_STAGE_RAYGEN: return EShLangRayGen; - case GLSLANG_STAGE_INTERSECT_NV: + case GLSLANG_STAGE_INTERSECT: return EShLangIntersect; - case GLSLANG_STAGE_ANYHIT_NV: + case GLSLANG_STAGE_ANYHIT: return EShLangAnyHit; - case GLSLANG_STAGE_CLOSESTHIT_NV: + case GLSLANG_STAGE_CLOSESTHIT: return EShLangClosestHit; - case GLSLANG_STAGE_MISS_NV: + case GLSLANG_STAGE_MISS: return EShLangMiss; - case GLSLANG_STAGE_CALLABLE_NV: + case GLSLANG_STAGE_CALLABLE: return EShLangCallable; - case GLSLANG_STAGE_TASK_NV: - return EShLangTaskNV; - case GLSLANG_STAGE_MESH_NV: - return EShLangMeshNV; + case GLSLANG_STAGE_TASK: + return EShLangTask; + case GLSLANG_STAGE_MESH: + return EShLangMesh; default: break; } @@ -86,10 +86,13 @@ GLSLANG_EXPORT void glslang_program_SPIRV_generate(glslang_program_t* program, g glslang_spv_options_t spv_options; spv_options.generate_debug_info = false; spv_options.strip_debug_info = false; + spv_options.emit_nonsemantic_shader_debug_info = false; + spv_options.emit_nonsemantic_shader_debug_source = false; spv_options.disable_optimizer = true; spv_options.optimize_size = false; spv_options.disassemble = false; spv_options.validate = true; + spv_options.compile_only = false; glslang_program_SPIRV_generate_with_options(program, stage, &spv_options); } diff --git a/SPIRV/CMakeLists.txt b/SPIRV/CMakeLists.txt index c26e310da7..a80e74ed03 100644 --- a/SPIRV/CMakeLists.txt +++ b/SPIRV/CMakeLists.txt @@ -62,15 +62,20 @@ set(HEADERS disassemble.h GLSL.ext.AMD.h GLSL.ext.NV.h - NonSemanticDebugPrintf.h) + GLSL.ext.ARM.h + NonSemanticDebugPrintf.h + NonSemanticShaderDebugInfo100.h) set(SPVREMAP_HEADERS SPVRemapper.h doc.h) add_library(SPIRV ${LIB_TYPE} ${SOURCES} ${HEADERS}) -set_property(TARGET SPIRV PROPERTY FOLDER glslang) -set_property(TARGET SPIRV PROPERTY POSITION_INDEPENDENT_CODE ON) +set_target_properties(SPIRV PROPERTIES + FOLDER glslang + POSITION_INDEPENDENT_CODE ON + VERSION "${GLSLANG_VERSION}" + SOVERSION "${GLSLANG_VERSION_MAJOR}") target_include_directories(SPIRV PUBLIC $ $) @@ -79,8 +84,11 @@ glslang_add_build_info_dependency(SPIRV) if (ENABLE_SPVREMAPPER) add_library(SPVRemapper ${LIB_TYPE} ${SPVREMAP_SOURCES} ${SPVREMAP_HEADERS}) - set_property(TARGET SPVRemapper PROPERTY FOLDER glslang) - set_property(TARGET SPVRemapper PROPERTY POSITION_INDEPENDENT_CODE ON) + set_target_properties(SPVRemapper PROPERTIES + FOLDER glslang + POSITION_INDEPENDENT_CODE ON + VERSION "${GLSLANG_VERSION}" + SOVERSION "${GLSLANG_VERSION_MAJOR}") endif() if(WIN32 AND BUILD_SHARED_LIBS) @@ -121,7 +129,7 @@ if(ENABLE_GLSLANG_INSTALL) message(WARNING \"Using `SPVRemapperTargets.cmake` is deprecated: use `find_package(glslang)` to find glslang CMake targets.\") if (NOT TARGET glslang::SPVRemapper) - include(\"\${CMAKE_CURRENT_LIST_DIR}/../../${CMAKE_INSTALL_DATADIR}/${PROJECT_NAME}/glslang-targets.cmake\") + include(\"${CMAKE_INSTALL_FULL_LIBDIR}/cmake/${PROJECT_NAME}/glslang-targets.cmake\") endif() add_library(SPVRemapper ALIAS glslang::SPVRemapper) @@ -133,7 +141,7 @@ if(ENABLE_GLSLANG_INSTALL) message(WARNING \"Using `SPIRVTargets.cmake` is deprecated: use `find_package(glslang)` to find glslang CMake targets.\") if (NOT TARGET glslang::SPIRV) - include(\"\${CMAKE_CURRENT_LIST_DIR}/../../${CMAKE_INSTALL_DATADIR}/${PROJECT_NAME}/glslang-targets.cmake\") + include(\"${CMAKE_INSTALL_FULL_LIBDIR}/cmake/${PROJECT_NAME}/glslang-targets.cmake\") endif() add_library(SPIRV ALIAS glslang::SPIRV) diff --git a/SPIRV/GLSL.ext.ARM.h b/SPIRV/GLSL.ext.ARM.h new file mode 100644 index 0000000000..14425be1e3 --- /dev/null +++ b/SPIRV/GLSL.ext.ARM.h @@ -0,0 +1,35 @@ +/* +** Copyright (c) 2022 ARM Limited +** +** Permission is hereby granted, free of charge, to any person obtaining a copy +** of this software and/or associated documentation files (the "Materials"), +** to deal in the Materials without restriction, including without limitation +** the rights to use, copy, modify, merge, publish, distribute, sublicense, +** and/or sell copies of the Materials, and to permit persons to whom the +** Materials are furnished to do so, subject to the following conditions: +** +** The above copyright notice and this permission notice shall be included in +** all copies or substantial portions of the Materials. +** +** MODIFICATIONS TO THIS FILE MAY MEAN IT NO LONGER ACCURATELY REFLECTS KHRONOS +** STANDARDS. THE UNMODIFIED, NORMATIVE VERSIONS OF KHRONOS SPECIFICATIONS AND +** HEADER INFORMATION ARE LOCATED AT https://www.khronos.org/registry/ +** +** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +** OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +** FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL +** THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +** LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +** FROM,OUT OF OR IN CONNECTION WITH THE MATERIALS OR THE USE OR OTHER DEALINGS +** IN THE MATERIALS. +*/ + +#ifndef GLSLextARM_H +#define GLSLextARM_H + +static const int GLSLextARMVersion = 100; +static const int GLSLextARMRevision = 1; + +static const char * const E_SPV_ARM_core_builtins = "SPV_ARM_core_builtins"; + +#endif // #ifndef GLSLextARM_H diff --git a/SPIRV/GLSL.ext.EXT.h b/SPIRV/GLSL.ext.EXT.h index f48f1304d6..caab279382 100644 --- a/SPIRV/GLSL.ext.EXT.h +++ b/SPIRV/GLSL.ext.EXT.h @@ -39,5 +39,7 @@ static const char* const E_SPV_EXT_shader_atomic_float_add = "SPV_EXT_shader_ato static const char* const E_SPV_EXT_shader_atomic_float16_add = "SPV_EXT_shader_atomic_float16_add"; static const char* const E_SPV_EXT_shader_atomic_float_min_max = "SPV_EXT_shader_atomic_float_min_max"; static const char* const E_SPV_EXT_shader_image_int64 = "SPV_EXT_shader_image_int64"; +static const char* const E_SPV_EXT_shader_tile_image = "SPV_EXT_shader_tile_image"; +static const char* const E_SPV_EXT_mesh_shader = "SPV_EXT_mesh_shader"; #endif // #ifndef GLSLextEXT_H diff --git a/SPIRV/GLSL.ext.KHR.h b/SPIRV/GLSL.ext.KHR.h index d5c670f0e1..121defa16a 100644 --- a/SPIRV/GLSL.ext.KHR.h +++ b/SPIRV/GLSL.ext.KHR.h @@ -54,5 +54,7 @@ static const char* const E_SPV_KHR_workgroup_memory_explicit_layout = "SPV_KHR_w static const char* const E_SPV_KHR_subgroup_uniform_control_flow = "SPV_KHR_subgroup_uniform_control_flow"; static const char* const E_SPV_KHR_fragment_shader_barycentric = "SPV_KHR_fragment_shader_barycentric"; static const char* const E_SPV_AMD_shader_early_and_late_fragment_tests = "SPV_AMD_shader_early_and_late_fragment_tests"; +static const char* const E_SPV_KHR_ray_tracing_position_fetch = "SPV_KHR_ray_tracing_position_fetch"; +static const char* const E_SPV_KHR_cooperative_matrix = "SPV_KHR_cooperative_matrix"; #endif // #ifndef GLSLextKHR_H diff --git a/SPIRV/GLSL.ext.NV.h b/SPIRV/GLSL.ext.NV.h index 93c98bf626..9889bc9f9b 100644 --- a/SPIRV/GLSL.ext.NV.h +++ b/SPIRV/GLSL.ext.NV.h @@ -81,4 +81,10 @@ const char* const E_SPV_NV_cooperative_matrix = "SPV_NV_cooperative_matrix"; //SPV_NV_shader_sm_builtins const char* const E_SPV_NV_shader_sm_builtins = "SPV_NV_shader_sm_builtins"; +//SPV_NV_shader_execution_reorder +const char* const E_SPV_NV_shader_invocation_reorder = "SPV_NV_shader_invocation_reorder"; + +//SPV_NV_displacement_micromap +const char* const E_SPV_NV_displacement_micromap = "SPV_NV_displacement_micromap"; + #endif // #ifndef GLSLextNV_H diff --git a/SPIRV/GLSL.ext.QCOM.h b/SPIRV/GLSL.ext.QCOM.h new file mode 100644 index 0000000000..f13bb69359 --- /dev/null +++ b/SPIRV/GLSL.ext.QCOM.h @@ -0,0 +1,41 @@ +/* +** Copyright (c) 2021 The Khronos Group Inc. +** +** Permission is hereby granted, free of charge, to any person obtaining a copy +** of this software and/or associated documentation files (the "Materials"), +** to deal in the Materials without restriction, including without limitation +** the rights to use, copy, modify, merge, publish, distribute, sublicense, +** and/or sell copies of the Materials, and to permit persons to whom the +** Materials are furnished to do so, subject to the following conditions: +** +** The above copyright notice and this permission notice shall be included in +** all copies or substantial portions of the Materials. +** +** MODIFICATIONS TO THIS FILE MAY MEAN IT NO LONGER ACCURATELY REFLECTS KHRONOS +** STANDARDS. THE UNMODIFIED, NORMATIVE VERSIONS OF KHRONOS SPECIFICATIONS AND +** HEADER INFORMATION ARE LOCATED AT https://www.khronos.org/registry/ +** +** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +** OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +** FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL +** THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +** LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +** FROM,OUT OF OR IN CONNECTION WITH THE MATERIALS OR THE USE OR OTHER DEALINGS +** IN THE MATERIALS. +*/ + +#ifndef GLSLextQCOM_H +#define GLSLextQCOM_H + +enum BuiltIn; +enum Decoration; +enum Op; +enum Capability; + +static const int GLSLextQCOMVersion = 100; +static const int GLSLextQCOMRevision = 1; + +//SPV_QCOM_image_processing +const char* const E_SPV_QCOM_image_processing = "SPV_QCOM_image_processing"; + +#endif // #ifndef GLSLextQCOM_H diff --git a/SPIRV/GLSL.std.450.h b/SPIRV/GLSL.std.450.h index df31092bec..86d3da8065 100644 --- a/SPIRV/GLSL.std.450.h +++ b/SPIRV/GLSL.std.450.h @@ -13,7 +13,7 @@ ** ** MODIFICATIONS TO THIS FILE MAY MEAN IT NO LONGER ACCURATELY REFLECTS KHRONOS ** STANDARDS. THE UNMODIFIED, NORMATIVE VERSIONS OF KHRONOS SPECIFICATIONS AND -** HEADER INFORMATION ARE LOCATED AT https://www.khronos.org/registry/ +** HEADER INFORMATION ARE LOCATED AT https://www.khronos.org/registry/ ** ** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS ** OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, diff --git a/SPIRV/GlslangToSpv.cpp b/SPIRV/GlslangToSpv.cpp old mode 100644 new mode 100755 index 75fff35656..576c680f96 --- a/SPIRV/GlslangToSpv.cpp +++ b/SPIRV/GlslangToSpv.cpp @@ -49,6 +49,8 @@ namespace spv { #include "GLSL.ext.EXT.h" #include "GLSL.ext.AMD.h" #include "GLSL.ext.NV.h" + #include "GLSL.ext.ARM.h" + #include "GLSL.ext.QCOM.h" #include "NonSemanticDebugPrintf.h" } @@ -94,26 +96,18 @@ struct OpDecorations { public: OpDecorations(spv::Decoration precision, spv::Decoration noContraction, spv::Decoration nonUniform) : precision(precision) -#ifndef GLSLANG_WEB , noContraction(noContraction), nonUniform(nonUniform) -#endif { } spv::Decoration precision; -#ifdef GLSLANG_WEB - void addNoContraction(spv::Builder&, spv::Id) const { } - void addNonUniform(spv::Builder&, spv::Id) const { } -#else void addNoContraction(spv::Builder& builder, spv::Id t) { builder.addDecoration(t, noContraction); } void addNonUniform(spv::Builder& builder, spv::Id t) { builder.addDecoration(t, nonUniform); } protected: spv::Decoration noContraction; spv::Decoration nonUniform; -#endif - }; } // namespace @@ -139,7 +133,7 @@ class TGlslangToSpvTraverser : public glslang::TIntermTraverser { bool visitLoop(glslang::TVisit, glslang::TIntermLoop*); bool visitBranch(glslang::TVisit visit, glslang::TIntermBranch*); - void finishSpv(); + void finishSpv(bool compileOnly); void dumpSpv(std::vector& out); protected: @@ -173,9 +167,10 @@ class TGlslangToSpvTraverser : public glslang::TIntermTraverser { bool filterMember(const glslang::TType& member); spv::Id convertGlslangStructToSpvType(const glslang::TType&, const glslang::TTypeList* glslangStruct, glslang::TLayoutPacking, const glslang::TQualifier&); + spv::LinkageType convertGlslangLinkageToSpv(glslang::TLinkType glslangLinkType); void decorateStructType(const glslang::TType&, const glslang::TTypeList* glslangStruct, glslang::TLayoutPacking, - const glslang::TQualifier&, spv::Id); - spv::Id makeArraySizeId(const glslang::TArraySizes&, int dim); + const glslang::TQualifier&, spv::Id, const std::vector& spvMembers); + spv::Id makeArraySizeId(const glslang::TArraySizes&, int dim, bool allowZero = false); spv::Id accessChainLoad(const glslang::TType& type); void accessChainStore(const glslang::TType& type, spv::Id rvalue); void multiTypeStore(const glslang::TType&, spv::Id rValue); @@ -211,7 +206,7 @@ class TGlslangToSpvTraverser : public glslang::TIntermTraverser { glslang::TBasicType typeProxy); spv::Id createConversion(glslang::TOperator op, OpDecorations&, spv::Id destTypeId, spv::Id operand, glslang::TBasicType typeProxy); - spv::Id createIntWidthConversion(glslang::TOperator op, spv::Id operand, int vectorSize); + spv::Id createIntWidthConversion(glslang::TOperator op, spv::Id operand, int vectorSize, spv::Id destType); spv::Id makeSmearedConstant(spv::Id constant, int vectorSize); spv::Id createAtomicOperation(glslang::TOperator op, spv::Decoration precision, spv::Id typeId, std::vector& operands, glslang::TBasicType typeProxy, @@ -227,6 +222,7 @@ class TGlslangToSpvTraverser : public glslang::TIntermTraverser { spv::Id createNoArgOperation(glslang::TOperator op, spv::Decoration precision, spv::Id typeId); spv::Id getSymbolId(const glslang::TIntermSymbol* node); void addMeshNVDecoration(spv::Id id, int member, const glslang::TQualifier & qualifier); + void addImageProcessingQCOMDecoration(spv::Id id, spv::Decoration decor); spv::Id createSpvConstant(const glslang::TIntermTyped&); spv::Id createSpvConstantFromConstUnionArray(const glslang::TType& type, const glslang::TConstUnionArray&, int& nextConst, bool specConstant); @@ -277,9 +273,10 @@ class TGlslangToSpvTraverser : public glslang::TIntermTraverser { // requiring local translation to and from SPIR-V type on every access. // Maps AST-required-type-id> std::unordered_map forceType; - - // Used later for generating OpTraceKHR/OpExecuteCallableKHR - std::unordered_map locationToSymbol[2]; + // Used by Task shader while generating opearnds for OpEmitMeshTasksEXT + spv::Id taskPayloadID; + // Used later for generating OpTraceKHR/OpExecuteCallableKHR/OpHitObjectRecordHit*/OpHitObjectGetShaderBindingTableData + std::unordered_map locationToSymbol[4]; }; // @@ -289,12 +286,6 @@ class TGlslangToSpvTraverser : public glslang::TIntermTraverser { // Translate glslang profile to SPIR-V source language. spv::SourceLanguage TranslateSourceLanguage(glslang::EShSource source, EProfile profile) { -#ifdef GLSLANG_WEB - return spv::SourceLanguageESSL; -#elif defined(GLSLANG_ANGLE) - return spv::SourceLanguageGLSL; -#endif - switch (source) { case glslang::EShSourceGlsl: switch (profile) { @@ -315,13 +306,12 @@ spv::SourceLanguage TranslateSourceLanguage(glslang::EShSource source, EProfile } // Translate glslang language (stage) to SPIR-V execution model. -spv::ExecutionModel TranslateExecutionModel(EShLanguage stage) +spv::ExecutionModel TranslateExecutionModel(EShLanguage stage, bool isMeshShaderEXT = false) { switch (stage) { case EShLangVertex: return spv::ExecutionModelVertex; case EShLangFragment: return spv::ExecutionModelFragment; case EShLangCompute: return spv::ExecutionModelGLCompute; -#ifndef GLSLANG_WEB case EShLangTessControl: return spv::ExecutionModelTessellationControl; case EShLangTessEvaluation: return spv::ExecutionModelTessellationEvaluation; case EShLangGeometry: return spv::ExecutionModelGeometry; @@ -331,9 +321,8 @@ spv::ExecutionModel TranslateExecutionModel(EShLanguage stage) case EShLangClosestHit: return spv::ExecutionModelClosestHitKHR; case EShLangMiss: return spv::ExecutionModelMissKHR; case EShLangCallable: return spv::ExecutionModelCallableKHR; - case EShLangTaskNV: return spv::ExecutionModelTaskNV; - case EShLangMeshNV: return spv::ExecutionModelMeshNV; -#endif + case EShLangTask: return (isMeshShaderEXT)? spv::ExecutionModelTaskEXT : spv::ExecutionModelTaskNV; + case EShLangMesh: return (isMeshShaderEXT)? spv::ExecutionModelMeshEXT: spv::ExecutionModelMeshNV; default: assert(0); return spv::ExecutionModelFragment; @@ -351,6 +340,7 @@ spv::Dim TranslateDimensionality(const glslang::TSampler& sampler) case glslang::EsdRect: return spv::DimRect; case glslang::EsdBuffer: return spv::DimBuffer; case glslang::EsdSubpass: return spv::DimSubpassData; + case glslang::EsdAttachmentEXT: return spv::DimTileImageDataEXT; default: assert(0); return spv::Dim2D; @@ -375,26 +365,23 @@ spv::Decoration TranslatePrecisionDecoration(const glslang::TType& type) } // Translate glslang type to SPIR-V block decorations. -spv::Decoration TranslateBlockDecoration(const glslang::TType& type, bool useStorageBuffer) +spv::Decoration TranslateBlockDecoration(const glslang::TStorageQualifier storage, bool useStorageBuffer) { - if (type.getBasicType() == glslang::EbtBlock) { - switch (type.getQualifier().storage) { - case glslang::EvqUniform: return spv::DecorationBlock; - case glslang::EvqBuffer: return useStorageBuffer ? spv::DecorationBlock : spv::DecorationBufferBlock; - case glslang::EvqVaryingIn: return spv::DecorationBlock; - case glslang::EvqVaryingOut: return spv::DecorationBlock; - case glslang::EvqShared: return spv::DecorationBlock; -#ifndef GLSLANG_WEB - case glslang::EvqPayload: return spv::DecorationBlock; - case glslang::EvqPayloadIn: return spv::DecorationBlock; - case glslang::EvqHitAttr: return spv::DecorationBlock; - case glslang::EvqCallableData: return spv::DecorationBlock; - case glslang::EvqCallableDataIn: return spv::DecorationBlock; -#endif - default: - assert(0); - break; - } + switch (storage) { + case glslang::EvqUniform: return spv::DecorationBlock; + case glslang::EvqBuffer: return useStorageBuffer ? spv::DecorationBlock : spv::DecorationBufferBlock; + case glslang::EvqVaryingIn: return spv::DecorationBlock; + case glslang::EvqVaryingOut: return spv::DecorationBlock; + case glslang::EvqShared: return spv::DecorationBlock; + case glslang::EvqPayload: return spv::DecorationBlock; + case glslang::EvqPayloadIn: return spv::DecorationBlock; + case glslang::EvqHitAttr: return spv::DecorationBlock; + case glslang::EvqCallableData: return spv::DecorationBlock; + case glslang::EvqCallableDataIn: return spv::DecorationBlock; + case glslang::EvqHitObjectAttrNV: return spv::DecorationBlock; + default: + assert(0); + break; } return spv::DecorationMax; @@ -461,14 +448,13 @@ spv::Decoration TranslateLayoutDecoration(const glslang::TType& type, glslang::T assert(type.getQualifier().layoutPacking == glslang::ElpNone); } return spv::DecorationMax; -#ifndef GLSLANG_WEB case glslang::EvqPayload: case glslang::EvqPayloadIn: case glslang::EvqHitAttr: case glslang::EvqCallableData: case glslang::EvqCallableDataIn: + case glslang::EvqHitObjectAttrNV: return spv::DecorationMax; -#endif default: assert(0); return spv::DecorationMax; @@ -504,14 +490,12 @@ spv::Decoration TGlslangToSpvTraverser::TranslateAuxiliaryStorageDecoration(cons { if (qualifier.centroid) return spv::DecorationCentroid; -#ifndef GLSLANG_WEB else if (qualifier.patch) return spv::DecorationPatch; else if (qualifier.sample) { builder.addCapability(spv::CapabilitySampleRateShading); return spv::DecorationSample; } -#endif return spv::DecorationMax; } @@ -528,24 +512,20 @@ spv::Decoration TranslateInvariantDecoration(const glslang::TQualifier& qualifie // If glslang type is noContraction, return SPIR-V NoContraction decoration. spv::Decoration TranslateNoContractionDecoration(const glslang::TQualifier& qualifier) { -#ifndef GLSLANG_WEB if (qualifier.isNoContraction()) return spv::DecorationNoContraction; else -#endif return spv::DecorationMax; } // If glslang type is nonUniform, return SPIR-V NonUniform decoration. spv::Decoration TGlslangToSpvTraverser::TranslateNonUniformDecoration(const glslang::TQualifier& qualifier) { -#ifndef GLSLANG_WEB if (qualifier.isNonUniform()) { builder.addIncorporatedExtension("SPV_EXT_descriptor_indexing", spv::Spv_1_5); builder.addCapability(spv::CapabilityShaderNonUniformEXT); return spv::DecorationNonUniformEXT; } else -#endif return spv::DecorationMax; } @@ -553,13 +533,11 @@ spv::Decoration TGlslangToSpvTraverser::TranslateNonUniformDecoration(const glsl spv::Decoration TGlslangToSpvTraverser::TranslateNonUniformDecoration( const spv::Builder::AccessChain::CoherentFlags& coherentFlags) { -#ifndef GLSLANG_WEB if (coherentFlags.isNonUniform()) { builder.addIncorporatedExtension("SPV_EXT_descriptor_indexing", spv::Spv_1_5); builder.addCapability(spv::CapabilityShaderNonUniformEXT); return spv::DecorationNonUniformEXT; } else -#endif return spv::DecorationMax; } @@ -568,7 +546,6 @@ spv::MemoryAccessMask TGlslangToSpvTraverser::TranslateMemoryAccess( { spv::MemoryAccessMask mask = spv::MemoryAccessMaskNone; -#ifndef GLSLANG_WEB if (!glslangIntermediate->usingVulkanMemoryModel() || coherentFlags.isImage) return mask; @@ -586,7 +563,6 @@ spv::MemoryAccessMask TGlslangToSpvTraverser::TranslateMemoryAccess( if (mask != spv::MemoryAccessMaskNone) { builder.addCapability(spv::CapabilityVulkanMemoryModelKHR); } -#endif return mask; } @@ -596,7 +572,6 @@ spv::ImageOperandsMask TGlslangToSpvTraverser::TranslateImageOperands( { spv::ImageOperandsMask mask = spv::ImageOperandsMaskNone; -#ifndef GLSLANG_WEB if (!glslangIntermediate->usingVulkanMemoryModel()) return mask; @@ -614,7 +589,6 @@ spv::ImageOperandsMask TGlslangToSpvTraverser::TranslateImageOperands( if (mask != spv::ImageOperandsMaskNone) { builder.addCapability(spv::CapabilityVulkanMemoryModelKHR); } -#endif return mask; } @@ -622,7 +596,6 @@ spv::ImageOperandsMask TGlslangToSpvTraverser::TranslateImageOperands( spv::Builder::AccessChain::CoherentFlags TGlslangToSpvTraverser::TranslateCoherent(const glslang::TType& type) { spv::Builder::AccessChain::CoherentFlags flags = {}; -#ifndef GLSLANG_WEB flags.coherent = type.getQualifier().coherent; flags.devicecoherent = type.getQualifier().devicecoherent; flags.queuefamilycoherent = type.getQualifier().queuefamilycoherent; @@ -637,7 +610,6 @@ spv::Builder::AccessChain::CoherentFlags TGlslangToSpvTraverser::TranslateCohere flags.anyCoherent() || flags.volatil; flags.isImage = type.getBasicType() == glslang::EbtSampler; -#endif flags.nonUniform = type.getQualifier().nonUniform; return flags; } @@ -647,7 +619,6 @@ spv::Scope TGlslangToSpvTraverser::TranslateMemoryScope( { spv::Scope scope = spv::ScopeMax; -#ifndef GLSLANG_WEB if (coherentFlags.volatil || coherentFlags.coherent) { // coherent defaults to Device scope in the old model, QueueFamilyKHR scope in the new model scope = glslangIntermediate->usingVulkanMemoryModel() ? spv::ScopeQueueFamilyKHR : spv::ScopeDevice; @@ -665,7 +636,6 @@ spv::Scope TGlslangToSpvTraverser::TranslateMemoryScope( if (glslangIntermediate->usingVulkanMemoryModel() && scope == spv::ScopeDevice) { builder.addCapability(spv::CapabilityVulkanMemoryModelDeviceScopeKHR); } -#endif return scope; } @@ -680,7 +650,6 @@ spv::BuiltIn TGlslangToSpvTraverser::TranslateBuiltInDecoration(glslang::TBuiltI { switch (builtIn) { case glslang::EbvPointSize: -#ifndef GLSLANG_WEB // Defer adding the capability until the built-in is actually used. if (! memberDeclaration) { switch (glslangIntermediate->getStage()) { @@ -695,7 +664,6 @@ spv::BuiltIn TGlslangToSpvTraverser::TranslateBuiltInDecoration(glslang::TBuiltI break; } } -#endif return spv::BuiltInPointSize; case glslang::EbvPosition: return spv::BuiltInPosition; @@ -716,7 +684,6 @@ spv::BuiltIn TGlslangToSpvTraverser::TranslateBuiltInDecoration(glslang::TBuiltI case glslang::EbvLocalInvocationIndex: return spv::BuiltInLocalInvocationIndex; case glslang::EbvGlobalInvocationId: return spv::BuiltInGlobalInvocationId; -#ifndef GLSLANG_WEB // These *Distance capabilities logically belong here, but if the member is declared and // then never used, consumers of SPIR-V prefer the capability not be declared. // They are now generated when used, rather than here when declared. @@ -763,7 +730,7 @@ spv::BuiltIn TGlslangToSpvTraverser::TranslateBuiltInDecoration(glslang::TBuiltI return spv::BuiltInSampleMask; case glslang::EbvLayer: - if (glslangIntermediate->getStage() == EShLangMeshNV) { + if (glslangIntermediate->getStage() == EShLangMesh) { return spv::BuiltInLayer; } if (glslangIntermediate->getStage() == EShLangGeometry || @@ -1010,6 +977,8 @@ spv::BuiltIn TGlslangToSpvTraverser::TranslateBuiltInDecoration(glslang::TBuiltI return spv::BuiltInRayTmaxKHR; case glslang::EbvCullMask: return spv::BuiltInCullMaskKHR; + case glslang::EbvPositionFetch: + return spv::BuiltInHitTriangleVertexPositionsKHR; case glslang::EbvInstanceCustomIndex: return spv::BuiltInInstanceCustomIndexKHR; case glslang::EbvHitT: @@ -1040,6 +1009,22 @@ spv::BuiltIn TGlslangToSpvTraverser::TranslateBuiltInDecoration(glslang::TBuiltI builder.addExtension(spv::E_SPV_NV_ray_tracing_motion_blur); builder.addCapability(spv::CapabilityRayTracingMotionBlurNV); return spv::BuiltInCurrentRayTimeNV; + case glslang::EbvMicroTrianglePositionNV: + builder.addCapability(spv::CapabilityRayTracingDisplacementMicromapNV); + builder.addExtension("SPV_NV_displacement_micromap"); + return spv::BuiltInHitMicroTriangleVertexPositionsNV; + case glslang::EbvMicroTriangleBaryNV: + builder.addCapability(spv::CapabilityRayTracingDisplacementMicromapNV); + builder.addExtension("SPV_NV_displacement_micromap"); + return spv::BuiltInHitMicroTriangleVertexBarycentricsNV; + case glslang::EbvHitKindFrontFacingMicroTriangleNV: + builder.addCapability(spv::CapabilityRayTracingDisplacementMicromapNV); + builder.addExtension("SPV_NV_displacement_micromap"); + return spv::BuiltInHitKindFrontFacingMicroTriangleNV; + case glslang::EbvHitKindBackFacingMicroTriangleNV: + builder.addCapability(spv::CapabilityRayTracingDisplacementMicromapNV); + builder.addExtension("SPV_NV_displacement_micromap"); + return spv::BuiltInHitKindBackFacingMicroTriangleNV; // barycentrics case glslang::EbvBaryCoordNV: @@ -1078,6 +1063,16 @@ spv::BuiltIn TGlslangToSpvTraverser::TranslateBuiltInDecoration(glslang::TBuiltI case glslang::EbvMeshViewIndicesNV: return spv::BuiltInMeshViewIndicesNV; + // SPV_EXT_mesh_shader + case glslang::EbvPrimitivePointIndicesEXT: + return spv::BuiltInPrimitivePointIndicesEXT; + case glslang::EbvPrimitiveLineIndicesEXT: + return spv::BuiltInPrimitiveLineIndicesEXT; + case glslang::EbvPrimitiveTriangleIndicesEXT: + return spv::BuiltInPrimitiveTriangleIndicesEXT; + case glslang::EbvCullPrimitiveEXT: + return spv::BuiltInCullPrimitiveEXT; + // sm builtins case glslang::EbvWarpsPerSM: builder.addExtension(spv::E_SPV_NV_shader_sm_builtins); @@ -1095,7 +1090,28 @@ spv::BuiltIn TGlslangToSpvTraverser::TranslateBuiltInDecoration(glslang::TBuiltI builder.addExtension(spv::E_SPV_NV_shader_sm_builtins); builder.addCapability(spv::CapabilityShaderSMBuiltinsNV); return spv::BuiltInSMIDNV; -#endif + + // ARM builtins + case glslang::EbvCoreCountARM: + builder.addExtension(spv::E_SPV_ARM_core_builtins); + builder.addCapability(spv::CapabilityCoreBuiltinsARM); + return spv::BuiltInCoreCountARM; + case glslang::EbvCoreIDARM: + builder.addExtension(spv::E_SPV_ARM_core_builtins); + builder.addCapability(spv::CapabilityCoreBuiltinsARM); + return spv::BuiltInCoreIDARM; + case glslang::EbvCoreMaxIDARM: + builder.addExtension(spv::E_SPV_ARM_core_builtins); + builder.addCapability(spv::CapabilityCoreBuiltinsARM); + return spv::BuiltInCoreMaxIDARM; + case glslang::EbvWarpIDARM: + builder.addExtension(spv::E_SPV_ARM_core_builtins); + builder.addCapability(spv::CapabilityCoreBuiltinsARM); + return spv::BuiltInWarpIDARM; + case glslang::EbvWarpMaxIDARM: + builder.addExtension(spv::E_SPV_ARM_core_builtins); + builder.addCapability(spv::CapabilityCoreBuiltinsARM); + return spv::BuiltInWarpMaxIDARM; default: return spv::BuiltInMax; @@ -1107,10 +1123,6 @@ spv::ImageFormat TGlslangToSpvTraverser::TranslateImageFormat(const glslang::TTy { assert(type.getBasicType() == glslang::EbtSampler); -#ifdef GLSLANG_WEB - return spv::ImageFormatUnknown; -#endif - // Check for capabilities switch (type.getQualifier().getFormat()) { case glslang::ElfRg32f: @@ -1265,24 +1277,27 @@ spv::LoopControlMask TGlslangToSpvTraverser::TranslateLoopControl(const glslang: // Translate glslang type to SPIR-V storage class. spv::StorageClass TGlslangToSpvTraverser::TranslateStorageClass(const glslang::TType& type) { - if (type.getBasicType() == glslang::EbtRayQuery) + if (type.getBasicType() == glslang::EbtRayQuery || type.getBasicType() == glslang::EbtHitObjectNV) return spv::StorageClassPrivate; -#ifndef GLSLANG_WEB if (type.getQualifier().isSpirvByReference()) { if (type.getQualifier().isParamInput() || type.getQualifier().isParamOutput()) return spv::StorageClassFunction; } -#endif if (type.getQualifier().isPipeInput()) return spv::StorageClassInput; if (type.getQualifier().isPipeOutput()) return spv::StorageClassOutput; + if (type.getQualifier().storage == glslang::EvqTileImageEXT || type.isAttachmentEXT()) { + builder.addExtension(spv::E_SPV_EXT_shader_tile_image); + builder.addCapability(spv::CapabilityTileImageColorReadAccessEXT); + return spv::StorageClassTileImageEXT; + } if (glslangIntermediate->getSource() != glslang::EShSourceHlsl || type.getQualifier().storage == glslang::EvqUniform) { if (type.isAtomic()) return spv::StorageClassAtomicCounter; - if (type.containsOpaque()) + if (type.containsOpaque() && !glslangIntermediate->getBindlessMode()) return spv::StorageClassUniformConstant; } @@ -1315,14 +1330,14 @@ spv::StorageClass TGlslangToSpvTraverser::TranslateStorageClass(const glslang::T case glslang::EvqConstReadOnly: return spv::StorageClassFunction; case glslang::EvqTemporary: return spv::StorageClassFunction; case glslang::EvqShared: return spv::StorageClassWorkgroup; -#ifndef GLSLANG_WEB case glslang::EvqPayload: return spv::StorageClassRayPayloadKHR; case glslang::EvqPayloadIn: return spv::StorageClassIncomingRayPayloadKHR; case glslang::EvqHitAttr: return spv::StorageClassHitAttributeKHR; case glslang::EvqCallableData: return spv::StorageClassCallableDataKHR; case glslang::EvqCallableDataIn: return spv::StorageClassIncomingCallableDataKHR; + case glslang::EvqtaskPayloadSharedEXT : return spv::StorageClassTaskPayloadWorkgroupEXT; + case glslang::EvqHitObjectAttrNV: return spv::StorageClassHitObjectAttributeNV; case glslang::EvqSpirvStorageClass: return static_cast(type.getQualifier().spirvStorageClass); -#endif default: assert(0); break; @@ -1338,7 +1353,9 @@ void TGlslangToSpvTraverser::TranslateLiterals(const glslang::TVectorgetBasicType() == glslang::EbtFloat) { float floatValue = static_cast(constant->getConstArray()[0].getDConst()); - unsigned literal = *reinterpret_cast(&floatValue); + unsigned literal; + static_assert(sizeof(literal) == sizeof(floatValue), "sizeof(unsigned) != sizeof(float)"); + memcpy(&literal, &floatValue, sizeof(literal)); literals.push_back(literal); } else if (constant->getBasicType() == glslang::EbtInt) { unsigned literal = constant->getConstArray()[0].getIConst(); @@ -1381,7 +1398,6 @@ void TGlslangToSpvTraverser::TranslateLiterals(const glslang::TVectorgetNanMinMaxClamp()), - nonSemanticDebugPrintf(0) + nonSemanticDebugPrintf(0), + taskPayloadID(0) { - spv::ExecutionModel executionModel = TranslateExecutionModel(glslangIntermediate->getStage()); + bool isMeshShaderExt = (glslangIntermediate->getRequestedExtensions().find(glslang::E_GL_EXT_mesh_shader) != + glslangIntermediate->getRequestedExtensions().end()); + spv::ExecutionModel executionModel = TranslateExecutionModel(glslangIntermediate->getStage(), isMeshShaderExt); builder.clearAccessChain(); builder.setSource(TranslateSourceLanguage(glslangIntermediate->getSource(), glslangIntermediate->getProfile()), glslangIntermediate->getVersion()); - if (options.generateDebugInfo) { + if (options.emitNonSemanticShaderDebugSource) + this->options.emitNonSemanticShaderDebugInfo = true; + if (options.emitNonSemanticShaderDebugInfo) + this->options.generateDebugInfo = true; + + if (this->options.generateDebugInfo) { builder.setEmitOpLines(); builder.setSourceFile(glslangIntermediate->getSourceFile()); @@ -1557,6 +1580,10 @@ TGlslangToSpvTraverser::TGlslangToSpvTraverser(unsigned int spvVersion, for (auto iItr = include_txt.begin(); iItr != include_txt.end(); ++iItr) builder.addInclude(iItr->first, iItr->second); } + + builder.setEmitNonSemanticShaderDebugInfo(this->options.emitNonSemanticShaderDebugInfo); + builder.setEmitNonSemanticShaderDebugSource(this->options.emitNonSemanticShaderDebugSource); + stdBuiltins = builder.import("GLSL.std.450"); spv::AddressingModel addressingModel = spv::AddressingModelLogical; @@ -1578,8 +1605,12 @@ TGlslangToSpvTraverser::TGlslangToSpvTraverser(unsigned int spvVersion, builder.addCapability(spv::CapabilityVariablePointers); } - shaderEntry = builder.makeEntryPoint(glslangIntermediate->getEntryPointName().c_str()); - entryPoint = builder.addEntryPoint(executionModel, shaderEntry, glslangIntermediate->getEntryPointName().c_str()); + // If not linking, there is no entry point + if (!options.compileOnly) { + shaderEntry = builder.makeEntryPoint(glslangIntermediate->getEntryPointName().c_str()); + entryPoint = + builder.addEntryPoint(executionModel, shaderEntry, glslangIntermediate->getEntryPointName().c_str()); + } // Add the source extensions const auto& sourceExtensions = glslangIntermediate->getRequestedExtensions(); @@ -1597,12 +1628,10 @@ TGlslangToSpvTraverser::TGlslangToSpvTraverser(unsigned int spvVersion, builder.addCapability(spv::CapabilityRayTraversalPrimitiveCullingKHR); } -#ifndef GLSLANG_WEB if (glslangIntermediate->getSubgroupUniformControlFlow()) { builder.addExtension(spv::E_SPV_KHR_subgroup_uniform_control_flow); builder.addExecutionMode(shaderEntry, spv::ExecutionModeSubgroupUniformControlFlowKHR); } -#endif unsigned int mode; switch (glslangIntermediate->getStage()) { @@ -1635,14 +1664,30 @@ TGlslangToSpvTraverser::TGlslangToSpvTraverser(unsigned int spvVersion, builder.addExtension(spv::E_SPV_KHR_post_depth_coverage); } + if (glslangIntermediate->getNonCoherentColorAttachmentReadEXT()) { + builder.addCapability(spv::CapabilityTileImageColorReadAccessEXT); + builder.addExecutionMode(shaderEntry, spv::ExecutionModeNonCoherentColorAttachmentReadEXT); + builder.addExtension(spv::E_SPV_EXT_shader_tile_image); + } + + if (glslangIntermediate->getNonCoherentDepthAttachmentReadEXT()) { + builder.addCapability(spv::CapabilityTileImageDepthReadAccessEXT); + builder.addExecutionMode(shaderEntry, spv::ExecutionModeNonCoherentDepthAttachmentReadEXT); + builder.addExtension(spv::E_SPV_EXT_shader_tile_image); + } + + if (glslangIntermediate->getNonCoherentStencilAttachmentReadEXT()) { + builder.addCapability(spv::CapabilityTileImageStencilReadAccessEXT); + builder.addExecutionMode(shaderEntry, spv::ExecutionModeNonCoherentStencilAttachmentReadEXT); + builder.addExtension(spv::E_SPV_EXT_shader_tile_image); + } + if (glslangIntermediate->isDepthReplacing()) builder.addExecutionMode(shaderEntry, spv::ExecutionModeDepthReplacing); if (glslangIntermediate->isStencilReplacing()) builder.addExecutionMode(shaderEntry, spv::ExecutionModeStencilRefReplacingEXT); -#ifndef GLSLANG_WEB - switch(glslangIntermediate->getDepth()) { case glslang::EldGreater: mode = spv::ExecutionModeDepthGreater; break; case glslang::EldLess: mode = spv::ExecutionModeDepthLess; break; @@ -1694,26 +1739,33 @@ TGlslangToSpvTraverser::TGlslangToSpvTraverser(unsigned int spvVersion, } builder.addExtension(spv::E_SPV_EXT_fragment_shader_interlock); } -#endif break; - case EShLangCompute: + case EShLangCompute: { builder.addCapability(spv::CapabilityShader); - if (glslangIntermediate->getSpv().spv >= glslang::EShTargetSpv_1_6) { - std::vector dimConstId; - for (int dim = 0; dim < 3; ++dim) { - bool specConst = (glslangIntermediate->getLocalSizeSpecId(dim) != glslang::TQualifier::layoutNotSet); - dimConstId.push_back(builder.makeUintConstant(glslangIntermediate->getLocalSize(dim), specConst)); - if (specConst) { - builder.addDecoration(dimConstId.back(), spv::DecorationSpecId, - glslangIntermediate->getLocalSizeSpecId(dim)); + bool needSizeId = false; + for (int dim = 0; dim < 3; ++dim) { + if ((glslangIntermediate->getLocalSizeSpecId(dim) != glslang::TQualifier::layoutNotSet)) { + needSizeId = true; + break; + } + } + if (glslangIntermediate->getSpv().spv >= glslang::EShTargetSpv_1_6 && needSizeId) { + std::vector dimConstId; + for (int dim = 0; dim < 3; ++dim) { + bool specConst = (glslangIntermediate->getLocalSizeSpecId(dim) != glslang::TQualifier::layoutNotSet); + dimConstId.push_back(builder.makeUintConstant(glslangIntermediate->getLocalSize(dim), specConst)); + if (specConst) { + builder.addDecoration(dimConstId.back(), spv::DecorationSpecId, + glslangIntermediate->getLocalSizeSpecId(dim)); + needSizeId = true; + } } - } - builder.addExecutionModeId(shaderEntry, spv::ExecutionModeLocalSizeId, dimConstId); + builder.addExecutionModeId(shaderEntry, spv::ExecutionModeLocalSizeId, dimConstId); } else { - builder.addExecutionMode(shaderEntry, spv::ExecutionModeLocalSize, glslangIntermediate->getLocalSize(0), - glslangIntermediate->getLocalSize(1), - glslangIntermediate->getLocalSize(2)); + builder.addExecutionMode(shaderEntry, spv::ExecutionModeLocalSize, glslangIntermediate->getLocalSize(0), + glslangIntermediate->getLocalSize(1), + glslangIntermediate->getLocalSize(2)); } if (glslangIntermediate->getLayoutDerivativeModeNone() == glslang::LayoutDerivativeGroupQuads) { builder.addCapability(spv::CapabilityComputeDerivativeGroupQuadsNV); @@ -1725,7 +1777,7 @@ TGlslangToSpvTraverser::TGlslangToSpvTraverser(unsigned int spvVersion, builder.addExtension(spv::E_SPV_NV_compute_shader_derivatives); } break; -#ifndef GLSLANG_WEB + } case EShLangTessEvaluation: case EShLangTessControl: builder.addCapability(spv::CapabilityTessellation); @@ -1801,7 +1853,7 @@ TGlslangToSpvTraverser::TGlslangToSpvTraverser(unsigned int spvVersion, case EShLangAnyHit: case EShLangClosestHit: case EShLangMiss: - case EShLangCallable: + case EShLangCallable: { auto& extensions = glslangIntermediate->getRequestedExtensions(); if (extensions.find("GL_NV_ray_tracing") == extensions.end()) { @@ -1812,19 +1864,27 @@ TGlslangToSpvTraverser::TGlslangToSpvTraverser(unsigned int spvVersion, builder.addCapability(spv::CapabilityRayTracingNV); builder.addExtension("SPV_NV_ray_tracing"); } - if (glslangIntermediate->getStage() != EShLangRayGen && glslangIntermediate->getStage() != EShLangCallable) - { - if (extensions.find("GL_EXT_ray_cull_mask") != extensions.end()) { - builder.addCapability(spv::CapabilityRayCullMaskKHR); - builder.addExtension("SPV_KHR_ray_cull_mask"); - } - } + if (glslangIntermediate->getStage() != EShLangRayGen && glslangIntermediate->getStage() != EShLangCallable) { + if (extensions.find("GL_EXT_ray_cull_mask") != extensions.end()) { + builder.addCapability(spv::CapabilityRayCullMaskKHR); + builder.addExtension("SPV_KHR_ray_cull_mask"); + } + if (extensions.find("GL_EXT_ray_tracing_position_fetch") != extensions.end()) { + builder.addCapability(spv::CapabilityRayTracingPositionFetchKHR); + builder.addExtension("SPV_KHR_ray_tracing_position_fetch"); + } + } break; } - case EShLangTaskNV: - case EShLangMeshNV: - builder.addCapability(spv::CapabilityMeshShadingNV); - builder.addExtension(spv::E_SPV_NV_mesh_shader); + case EShLangTask: + case EShLangMesh: + if(isMeshShaderExt) { + builder.addCapability(spv::CapabilityMeshShadingEXT); + builder.addExtension(spv::E_SPV_EXT_mesh_shader); + } else { + builder.addCapability(spv::CapabilityMeshShadingNV); + builder.addExtension(spv::E_SPV_NV_mesh_shader); + } if (glslangIntermediate->getSpv().spv >= glslang::EShTargetSpv_1_6) { std::vector dimConstId; for (int dim = 0; dim < 3; ++dim) { @@ -1841,7 +1901,7 @@ TGlslangToSpvTraverser::TGlslangToSpvTraverser(unsigned int spvVersion, glslangIntermediate->getLocalSize(1), glslangIntermediate->getLocalSize(2)); } - if (glslangIntermediate->getStage() == EShLangMeshNV) { + if (glslangIntermediate->getStage() == EShLangMesh) { builder.addExecutionMode(shaderEntry, spv::ExecutionModeOutputVertices, glslangIntermediate->getVertices()); builder.addExecutionMode(shaderEntry, spv::ExecutionModeOutputPrimitivesNV, @@ -1857,13 +1917,11 @@ TGlslangToSpvTraverser::TGlslangToSpvTraverser(unsigned int spvVersion, builder.addExecutionMode(shaderEntry, (spv::ExecutionMode)mode); } break; -#endif default: break; } -#ifndef GLSLANG_WEB // // Add SPIR-V requirements (GL_EXT_spirv_intrinsics) // @@ -1908,27 +1966,29 @@ TGlslangToSpvTraverser::TGlslangToSpvTraverser(unsigned int spvVersion, builder.addExecutionModeId(shaderEntry, static_cast(modeId.first), operandIds); } } -#endif } // Finish creating SPV, after the traversal is complete. -void TGlslangToSpvTraverser::finishSpv() +void TGlslangToSpvTraverser::finishSpv(bool compileOnly) { - // Finish the entry point function - if (! entryPointTerminated) { - builder.setBuildPoint(shaderEntry->getLastBlock()); - builder.leaveFunction(); - } + // If not linking, an entry point is not expected + if (!compileOnly) { + // Finish the entry point function + if (!entryPointTerminated) { + builder.setBuildPoint(shaderEntry->getLastBlock()); + builder.leaveFunction(); + } - // finish off the entry-point SPV instruction by adding the Input/Output - for (auto it = iOSet.cbegin(); it != iOSet.cend(); ++it) - entryPoint->addIdOperand(*it); + // finish off the entry-point SPV instruction by adding the Input/Output + for (auto it = iOSet.cbegin(); it != iOSet.cend(); ++it) + entryPoint->addIdOperand(*it); + } // Add capabilities, extensions, remove unneeded decorations, etc., // based on the resulting SPIR-V. // Note: WebGPU code generation must have the opportunity to aggressively // prune unreachable merge blocks and continue targets. - builder.postProcess(); + builder.postProcess(compileOnly); } // Write the SPV into 'out'. @@ -1954,13 +2014,16 @@ void TGlslangToSpvTraverser::dumpSpv(std::vector& out) // void TGlslangToSpvTraverser::visitSymbol(glslang::TIntermSymbol* symbol) { + // We update the line information even though no code might be generated here + // This is helpful to yield correct lines for control flow instructions + builder.setLine(symbol->getLoc().line, symbol->getLoc().getFilename()); + SpecConstantOpModeGuard spec_constant_op_mode_setter(&builder); if (symbol->getType().isStruct()) glslangTypeToIdMap[symbol->getType().getStruct()] = symbol->getId(); if (symbol->getType().getQualifier().isSpecConstant()) spec_constant_op_mode_setter.turnOnSpecConstantOpMode(); - #ifdef ENABLE_HLSL // Skip symbol handling if it is string-typed if (symbol->getBasicType() == glslang::EbtString) @@ -1971,6 +2034,9 @@ void TGlslangToSpvTraverser::visitSymbol(glslang::TIntermSymbol* symbol) // Formal function parameters were mapped during makeFunctions(). spv::Id id = getSymbolId(symbol); + if (symbol->getType().getQualifier().isTaskPayload()) + taskPayloadID = id; // cache the taskPayloadID to be used it as operand for OpEmitMeshTasksEXT + if (builder.isPointer(id)) { if (!symbol->getType().getQualifier().isParamInput() && !symbol->getType().getQualifier().isParamOutput()) { @@ -1981,7 +2047,7 @@ void TGlslangToSpvTraverser::visitSymbol(glslang::TIntermSymbol* symbol) spv::StorageClass sc = builder.getStorageClass(id); // Before SPIR-V 1.4, we only want to include Input and Output. // Starting with SPIR-V 1.4, we want all globals. - if ((glslangIntermediate->getSpv().spv >= glslang::EShTargetSpv_1_4 && builder.isGlobalStorage(id)) || + if ((glslangIntermediate->getSpv().spv >= glslang::EShTargetSpv_1_4 && builder.isGlobalVariable(id)) || (sc == spv::StorageClassInput || sc == spv::StorageClassOutput)) { iOSet.insert(id); } @@ -2103,6 +2169,9 @@ bool TGlslangToSpvTraverser::visitBinary(glslang::TVisit /* visit */, glslang::T node->getRight()->traverse(this); spv::Id rValue = accessChainLoad(node->getRight()->getType()); + // reset line number for assignment + builder.setLine(node->getLoc().line, node->getLoc().getFilename()); + if (node->getOp() != glslang::EOpAssign) { // the left is also an r-value builder.setAccessChain(lValue); @@ -2467,12 +2536,15 @@ bool TGlslangToSpvTraverser::visitUnary(glslang::TVisit /* visit */, glslang::TI spv::Id length; if (node->getOperand()->getType().isCoopMat()) { - spec_constant_op_mode_setter.turnOnSpecConstantOpMode(); - spv::Id typeId = convertGlslangToSpvType(node->getOperand()->getType()); assert(builder.isCooperativeMatrixType(typeId)); - length = builder.createCooperativeMatrixLength(typeId); + if (node->getOperand()->getType().isCoopMatKHR()) { + length = builder.createCooperativeMatrixLengthKHR(typeId); + } else { + spec_constant_op_mode_setter.turnOnSpecConstantOpMode(); + length = builder.createCooperativeMatrixLengthNV(typeId); + } } else { glslang::TIntermTyped* block = node->getOperand()->getAsBinaryNode()->getLeft(); block->traverse(this); @@ -2498,6 +2570,14 @@ bool TGlslangToSpvTraverser::visitUnary(glslang::TVisit /* visit */, glslang::TI return false; } + // Force variable declaration - Debug Mode Only + if (node->getOp() == glslang::EOpDeclare) { + builder.clearAccessChain(); + node->getOperand()->traverse(this); + builder.clearAccessChain(); + return false; + } + // Start by evaluating the operand // Does it need a swizzle inversion? If so, evaluation is inverted; @@ -2514,14 +2594,42 @@ bool TGlslangToSpvTraverser::visitUnary(glslang::TVisit /* visit */, glslang::TI operandNode = node->getOperand()->getAsBinaryNode()->getLeft(); else operandNode = node->getOperand(); - + operandNode->traverse(this); spv::Id operand = spv::NoResult; spv::Builder::AccessChain::CoherentFlags lvalueCoherentFlags; -#ifndef GLSLANG_WEB + const auto hitObjectOpsWithLvalue = [](glslang::TOperator op) { + switch(op) { + case glslang::EOpReorderThreadNV: + case glslang::EOpHitObjectGetCurrentTimeNV: + case glslang::EOpHitObjectGetHitKindNV: + case glslang::EOpHitObjectGetPrimitiveIndexNV: + case glslang::EOpHitObjectGetGeometryIndexNV: + case glslang::EOpHitObjectGetInstanceIdNV: + case glslang::EOpHitObjectGetInstanceCustomIndexNV: + case glslang::EOpHitObjectGetObjectRayDirectionNV: + case glslang::EOpHitObjectGetObjectRayOriginNV: + case glslang::EOpHitObjectGetWorldRayDirectionNV: + case glslang::EOpHitObjectGetWorldRayOriginNV: + case glslang::EOpHitObjectGetWorldToObjectNV: + case glslang::EOpHitObjectGetObjectToWorldNV: + case glslang::EOpHitObjectGetRayTMaxNV: + case glslang::EOpHitObjectGetRayTMinNV: + case glslang::EOpHitObjectIsEmptyNV: + case glslang::EOpHitObjectIsHitNV: + case glslang::EOpHitObjectIsMissNV: + case glslang::EOpHitObjectRecordEmptyNV: + case glslang::EOpHitObjectGetShaderBindingTableRecordIndexNV: + case glslang::EOpHitObjectGetShaderRecordBufferHandleNV: + return true; + default: + return false; + } + }; + if (node->getOp() == glslang::EOpAtomicCounterIncrement || node->getOp() == glslang::EOpAtomicCounterDecrement || node->getOp() == glslang::EOpAtomicCounter || @@ -2535,16 +2643,15 @@ bool TGlslangToSpvTraverser::visitUnary(glslang::TVisit /* visit */, glslang::TI node->getOp() == glslang::EOpRayQueryGetIntersectionCandidateAABBOpaque || node->getOp() == glslang::EOpRayQueryTerminate || node->getOp() == glslang::EOpRayQueryConfirmIntersection || - (node->getOp() == glslang::EOpSpirvInst && operandNode->getAsTyped()->getQualifier().isSpirvByReference())) { + (node->getOp() == glslang::EOpSpirvInst && operandNode->getAsTyped()->getQualifier().isSpirvByReference()) || + hitObjectOpsWithLvalue(node->getOp())) { operand = builder.accessChainGetLValue(); // Special case l-value operands lvalueCoherentFlags = builder.getAccessChain().coherentFlags; lvalueCoherentFlags |= TranslateCoherent(operandNode->getAsTyped()->getType()); } else if (operandNode->getAsTyped()->getQualifier().isSpirvLiteral()) { // Will be translated to a literal value, make a placeholder here operand = spv::NoResult; - } else -#endif - { + } else { operand = accessChainLoad(node->getOperand()->getType()); } @@ -2562,7 +2669,6 @@ bool TGlslangToSpvTraverser::visitUnary(glslang::TVisit /* visit */, glslang::TI result = createUnaryOperation(node->getOp(), decorations, resultType(), operand, node->getOperand()->getBasicType(), lvalueCoherentFlags); -#ifndef GLSLANG_WEB // it could be attached to a SPIR-V intruction if (!result) { if (node->getOp() == glslang::EOpSpirvInst) { @@ -2592,7 +2698,6 @@ bool TGlslangToSpvTraverser::visitUnary(glslang::TVisit /* visit */, glslang::TI return false; // done with this node } } -#endif if (result) { if (invertedType) { @@ -2617,7 +2722,6 @@ bool TGlslangToSpvTraverser::visitUnary(glslang::TVisit /* visit */, glslang::TI spv::Id one = 0; if (node->getBasicType() == glslang::EbtFloat) one = builder.makeFloatConstant(1.0F); -#ifndef GLSLANG_WEB else if (node->getBasicType() == glslang::EbtDouble) one = builder.makeDoubleConstant(1.0); else if (node->getBasicType() == glslang::EbtFloat16) @@ -2628,7 +2732,6 @@ bool TGlslangToSpvTraverser::visitUnary(glslang::TVisit /* visit */, glslang::TI one = builder.makeInt16Constant(1); else if (node->getBasicType() == glslang::EbtInt64 || node->getBasicType() == glslang::EbtUint64) one = builder.makeInt64Constant(1); -#endif else one = builder.makeIntConstant(1); glslang::TOperator op; @@ -2657,7 +2760,6 @@ bool TGlslangToSpvTraverser::visitUnary(glslang::TVisit /* visit */, glslang::TI return false; -#ifndef GLSLANG_WEB case glslang::EOpEmitStreamVertex: builder.createNoResultOp(spv::OpEmitStreamVertex, operand); return false; @@ -2670,7 +2772,12 @@ bool TGlslangToSpvTraverser::visitUnary(glslang::TVisit /* visit */, glslang::TI case glslang::EOpRayQueryConfirmIntersection: builder.createNoResultOp(spv::OpRayQueryConfirmIntersectionKHR, operand); return false; -#endif + case glslang::EOpReorderThreadNV: + builder.createNoResultOp(spv::OpReorderThreadWithHitObjectNV, operand); + return false; + case glslang::EOpHitObjectRecordEmptyNV: + builder.createNoResultOp(spv::OpHitObjectRecordEmptyNV, operand); + return false; default: logger->missingFunctionality("unknown glslang unary"); @@ -2735,15 +2842,12 @@ bool TGlslangToSpvTraverser::visitAggregate(glslang::TVisit visit, glslang::TInt builder.setAccessChainRValue(result); return false; - } -#ifndef GLSLANG_WEB - else if (node->getOp() == glslang::EOpImageStore || + } else if (node->getOp() == glslang::EOpImageStore || node->getOp() == glslang::EOpImageStoreLod || node->getOp() == glslang::EOpImageAtomicStore) { // "imageStore" is a special case, which has no result return false; } -#endif glslang::TOperator binOp = glslang::EOpNull; bool reduceComparison = true; @@ -2758,32 +2862,41 @@ bool TGlslangToSpvTraverser::visitAggregate(glslang::TVisit visit, glslang::TInt spv::Decoration precision = TranslatePrecisionDecoration(node->getOperationPrecision()); switch (node->getOp()) { + case glslang::EOpScope: case glslang::EOpSequence: { - if (preVisit) + if (visit == glslang::EvPreVisit) { ++sequenceDepth; - else - --sequenceDepth; - - if (sequenceDepth == 1) { - // If this is the parent node of all the functions, we want to see them - // early, so all call points have actual SPIR-V functions to reference. - // In all cases, still let the traverser visit the children for us. - makeFunctions(node->getAsAggregate()->getSequence()); - - // Also, we want all globals initializers to go into the beginning of the entry point, before - // anything else gets there, so visit out of order, doing them all now. - makeGlobalInitializers(node->getAsAggregate()->getSequence()); + if (sequenceDepth == 1) { + // If this is the parent node of all the functions, we want to see them + // early, so all call points have actual SPIR-V functions to reference. + // In all cases, still let the traverser visit the children for us. + makeFunctions(node->getAsAggregate()->getSequence()); + + // Global initializers is specific to the shader entry point, which does not exist in compile-only mode + if (!options.compileOnly) { + // Also, we want all globals initializers to go into the beginning of the entry point, before + // anything else gets there, so visit out of order, doing them all now. + makeGlobalInitializers(node->getAsAggregate()->getSequence()); + } - //Pre process linker objects for ray tracing stages - if (glslangIntermediate->isRayTracingStage()) - collectRayTracingLinkerObjects(); + //Pre process linker objects for ray tracing stages + if (glslangIntermediate->isRayTracingStage()) + collectRayTracingLinkerObjects(); - // Initializers are done, don't want to visit again, but functions and link objects need to be processed, - // so do them manually. - visitFunctions(node->getAsAggregate()->getSequence()); + // Initializers are done, don't want to visit again, but functions and link objects need to be processed, + // so do them manually. + visitFunctions(node->getAsAggregate()->getSequence()); - return false; + return false; + } else { + if (node->getOp() == glslang::EOpScope) + builder.enterScope(0); + } + } else { + if (sequenceDepth > 1 && node->getOp() == glslang::EOpScope) + builder.leaveScope(); + --sequenceDepth; } return true; @@ -2812,13 +2925,16 @@ bool TGlslangToSpvTraverser::visitAggregate(glslang::TVisit visit, glslang::TInt if (isShaderEntryPoint(node)) { inEntryPoint = true; builder.setBuildPoint(shaderEntry->getLastBlock()); + builder.enterFunction(shaderEntry); currentFunction = shaderEntry; } else { handleFunctionEntry(node); } if (options.generateDebugInfo) { const auto& loc = node->getLoc(); - currentFunction->setDebugLineInfo(builder.getSourceFile(), loc.line, loc.column); + const char* sourceFileName = loc.getFilename(); + spv::Id sourceFileId = sourceFileName ? builder.getStringId(sourceFileName) : builder.getSourceFile(); + currentFunction->setDebugLineInfo(sourceFileId, loc.line, loc.column); } } else { if (inEntryPoint) @@ -2953,7 +3069,8 @@ bool TGlslangToSpvTraverser::visitAggregate(glslang::TVisit visit, glslang::TInt case glslang::EOpConstructStruct: case glslang::EOpConstructTextureSampler: case glslang::EOpConstructReference: - case glslang::EOpConstructCooperativeMatrix: + case glslang::EOpConstructCooperativeMatrixNV: + case glslang::EOpConstructCooperativeMatrixKHR: { builder.setLine(node->getLoc().line, node->getLoc().getFilename()); std::vector arguments; @@ -2970,7 +3087,8 @@ bool TGlslangToSpvTraverser::visitAggregate(glslang::TVisit visit, glslang::TInt } else constructed = builder.createOp(spv::OpSampledImage, resultType(), arguments); } else if (node->getOp() == glslang::EOpConstructStruct || - node->getOp() == glslang::EOpConstructCooperativeMatrix || + node->getOp() == glslang::EOpConstructCooperativeMatrixNV || + node->getOp() == glslang::EOpConstructCooperativeMatrixKHR || node->getType().isArray()) { std::vector constituents; for (int c = 0; c < (int)arguments.size(); ++c) @@ -3068,7 +3186,6 @@ bool TGlslangToSpvTraverser::visitAggregate(glslang::TVisit visit, glslang::TInt atomic = true; break; -#ifndef GLSLANG_WEB case glslang::EOpAtomicStore: noReturnValue = true; // fallthrough @@ -3109,6 +3226,8 @@ bool TGlslangToSpvTraverser::visitAggregate(glslang::TVisit visit, glslang::TInt case glslang::EOpExecuteCallableNV: case glslang::EOpExecuteCallableKHR: case glslang::EOpWritePackedPrimitiveIndices4x8NV: + case glslang::EOpEmitMeshTasksEXT: + case glslang::EOpSetMeshOutputsEXT: noReturnValue = true; break; case glslang::EOpRayQueryInitialize: @@ -3143,6 +3262,8 @@ bool TGlslangToSpvTraverser::visitAggregate(glslang::TVisit visit, glslang::TInt break; case glslang::EOpCooperativeMatrixLoad: case glslang::EOpCooperativeMatrixStore: + case glslang::EOpCooperativeMatrixLoadNV: + case glslang::EOpCooperativeMatrixStoreNV: noReturnValue = true; break; case glslang::EOpBeginInvocationInterlock: @@ -3150,7 +3271,68 @@ bool TGlslangToSpvTraverser::visitAggregate(glslang::TVisit visit, glslang::TInt builder.addExtension(spv::E_SPV_EXT_fragment_shader_interlock); noReturnValue = true; break; -#endif + + case glslang::EOpHitObjectTraceRayNV: + case glslang::EOpHitObjectTraceRayMotionNV: + case glslang::EOpHitObjectGetAttributesNV: + case glslang::EOpHitObjectExecuteShaderNV: + case glslang::EOpHitObjectRecordEmptyNV: + case glslang::EOpHitObjectRecordMissNV: + case glslang::EOpHitObjectRecordMissMotionNV: + case glslang::EOpHitObjectRecordHitNV: + case glslang::EOpHitObjectRecordHitMotionNV: + case glslang::EOpHitObjectRecordHitWithIndexNV: + case glslang::EOpHitObjectRecordHitWithIndexMotionNV: + case glslang::EOpReorderThreadNV: + noReturnValue = true; + //Fallthrough + case glslang::EOpHitObjectIsEmptyNV: + case glslang::EOpHitObjectIsMissNV: + case glslang::EOpHitObjectIsHitNV: + case glslang::EOpHitObjectGetRayTMinNV: + case glslang::EOpHitObjectGetRayTMaxNV: + case glslang::EOpHitObjectGetObjectRayOriginNV: + case glslang::EOpHitObjectGetObjectRayDirectionNV: + case glslang::EOpHitObjectGetWorldRayOriginNV: + case glslang::EOpHitObjectGetWorldRayDirectionNV: + case glslang::EOpHitObjectGetObjectToWorldNV: + case glslang::EOpHitObjectGetWorldToObjectNV: + case glslang::EOpHitObjectGetInstanceCustomIndexNV: + case glslang::EOpHitObjectGetInstanceIdNV: + case glslang::EOpHitObjectGetGeometryIndexNV: + case glslang::EOpHitObjectGetPrimitiveIndexNV: + case glslang::EOpHitObjectGetHitKindNV: + case glslang::EOpHitObjectGetCurrentTimeNV: + case glslang::EOpHitObjectGetShaderBindingTableRecordIndexNV: + case glslang::EOpHitObjectGetShaderRecordBufferHandleNV: + builder.addExtension(spv::E_SPV_NV_shader_invocation_reorder); + builder.addCapability(spv::CapabilityShaderInvocationReorderNV); + break; + case glslang::EOpRayQueryGetIntersectionTriangleVertexPositionsEXT: + builder.addExtension(spv::E_SPV_KHR_ray_tracing_position_fetch); + builder.addCapability(spv::CapabilityRayQueryPositionFetchKHR); + noReturnValue = true; + break; + + case glslang::EOpImageSampleWeightedQCOM: + builder.addCapability(spv::CapabilityTextureSampleWeightedQCOM); + builder.addExtension(spv::E_SPV_QCOM_image_processing); + break; + case glslang::EOpImageBoxFilterQCOM: + builder.addCapability(spv::CapabilityTextureBoxFilterQCOM); + builder.addExtension(spv::E_SPV_QCOM_image_processing); + break; + case glslang::EOpImageBlockMatchSADQCOM: + case glslang::EOpImageBlockMatchSSDQCOM: + builder.addCapability(spv::CapabilityTextureBlockMatchQCOM); + builder.addExtension(spv::E_SPV_QCOM_image_processing); + break; + + case glslang::EOpFetchMicroTriangleVertexPositionNV: + case glslang::EOpFetchMicroTriangleVertexBarycentricNV: + builder.addExtension(spv::E_SPV_NV_displacement_micromap); + builder.addCapability(spv::CapabilityDisplacementMicromapNV); + break; case glslang::EOpDebugPrintf: noReturnValue = true; @@ -3207,6 +3389,22 @@ bool TGlslangToSpvTraverser::visitAggregate(glslang::TVisit visit, glslang::TInt lvalue = true; break; + + + case glslang::EOpHitObjectRecordHitNV: + case glslang::EOpHitObjectRecordHitMotionNV: + case glslang::EOpHitObjectRecordHitWithIndexNV: + case glslang::EOpHitObjectRecordHitWithIndexMotionNV: + case glslang::EOpHitObjectTraceRayNV: + case glslang::EOpHitObjectTraceRayMotionNV: + case glslang::EOpHitObjectExecuteShaderNV: + case glslang::EOpHitObjectRecordMissNV: + case glslang::EOpHitObjectRecordMissMotionNV: + case glslang::EOpHitObjectGetAttributesNV: + if (arg == 0) + lvalue = true; + break; + case glslang::EOpRayQueryInitialize: case glslang::EOpRayQueryTerminate: case glslang::EOpRayQueryConfirmIntersection: @@ -3242,7 +3440,6 @@ bool TGlslangToSpvTraverser::visitAggregate(glslang::TVisit visit, glslang::TInt lvalue = true; break; -#ifndef GLSLANG_WEB case glslang::EOpFrexp: if (arg == 1) lvalue = true; @@ -3296,10 +3493,12 @@ bool TGlslangToSpvTraverser::visitAggregate(glslang::TVisit visit, glslang::TInt lvalue = true; break; case glslang::EOpCooperativeMatrixLoad: + case glslang::EOpCooperativeMatrixLoadNV: if (arg == 0 || arg == 1) lvalue = true; break; case glslang::EOpCooperativeMatrixStore: + case glslang::EOpCooperativeMatrixStoreNV: if (arg == 1) lvalue = true; break; @@ -3307,7 +3506,15 @@ bool TGlslangToSpvTraverser::visitAggregate(glslang::TVisit visit, glslang::TInt if (glslangOperands[arg]->getAsTyped()->getQualifier().isSpirvByReference()) lvalue = true; break; -#endif + case glslang::EOpReorderThreadNV: + //Three variants of reorderThreadNV, two of them use hitObjectNV + if (arg == 0 && glslangOperands.size() != 2) + lvalue = true; + break; + case glslang::EOpRayQueryGetIntersectionTriangleVertexPositionsEXT: + if (arg == 0 || arg == 2) + lvalue = true; + break; default: break; } @@ -3317,9 +3524,10 @@ bool TGlslangToSpvTraverser::visitAggregate(glslang::TVisit visit, glslang::TInt else glslangOperands[arg]->traverse(this); -#ifndef GLSLANG_WEB if (node->getOp() == glslang::EOpCooperativeMatrixLoad || - node->getOp() == glslang::EOpCooperativeMatrixStore) { + node->getOp() == glslang::EOpCooperativeMatrixStore || + node->getOp() == glslang::EOpCooperativeMatrixLoadNV || + node->getOp() == glslang::EOpCooperativeMatrixStoreNV) { if (arg == 1) { // fold "element" parameter into the access chain @@ -3340,9 +3548,11 @@ bool TGlslangToSpvTraverser::visitAggregate(glslang::TVisit visit, glslang::TInt unsigned int alignment = builder.getAccessChain().alignment; int memoryAccess = TranslateMemoryAccess(coherentFlags); - if (node->getOp() == glslang::EOpCooperativeMatrixLoad) + if (node->getOp() == glslang::EOpCooperativeMatrixLoad || + node->getOp() == glslang::EOpCooperativeMatrixLoadNV) memoryAccess &= ~spv::MemoryAccessMakePointerAvailableKHRMask; - if (node->getOp() == glslang::EOpCooperativeMatrixStore) + if (node->getOp() == glslang::EOpCooperativeMatrixStore || + node->getOp() == glslang::EOpCooperativeMatrixStoreNV) memoryAccess &= ~spv::MemoryAccessMakePointerVisibleKHRMask; if (builder.getStorageClass(builder.getAccessChain().base) == spv::StorageClassPhysicalStorageBufferEXT) { @@ -3364,7 +3574,6 @@ bool TGlslangToSpvTraverser::visitAggregate(glslang::TVisit visit, glslang::TInt continue; } } -#endif // for l-values, pass the address, for r-values, pass the value if (lvalue) { @@ -3399,26 +3608,37 @@ bool TGlslangToSpvTraverser::visitAggregate(glslang::TVisit visit, glslang::TInt glslangOp == glslang::EOpRayQueryGetIntersectionObjectRayDirection || glslangOp == glslang::EOpRayQueryGetIntersectionObjectRayOrigin || glslangOp == glslang::EOpRayQueryGetIntersectionObjectToWorld || - glslangOp == glslang::EOpRayQueryGetIntersectionWorldToObject + glslangOp == glslang::EOpRayQueryGetIntersectionWorldToObject || + glslangOp == glslang::EOpRayQueryGetIntersectionTriangleVertexPositionsEXT )) { bool cond = glslangOperands[arg]->getAsConstantUnion()->getConstArray()[0].getBConst(); operands.push_back(builder.makeIntConstant(cond ? 1 : 0)); } else if ((arg == 10 && glslangOp == glslang::EOpTraceKHR) || (arg == 11 && glslangOp == glslang::EOpTraceRayMotionNV) || - (arg == 1 && glslangOp == glslang::EOpExecuteCallableKHR)) { - const int opdNum = glslangOp == glslang::EOpTraceKHR ? 10 : (glslangOp == glslang::EOpTraceRayMotionNV ? 11 : 1); + (arg == 1 && glslangOp == glslang::EOpExecuteCallableKHR) || + (arg == 1 && glslangOp == glslang::EOpHitObjectExecuteShaderNV) || + (arg == 11 && glslangOp == glslang::EOpHitObjectTraceRayNV) || + (arg == 12 && glslangOp == glslang::EOpHitObjectTraceRayMotionNV)) { const int set = glslangOp == glslang::EOpExecuteCallableKHR ? 1 : 0; - - const int location = glslangOperands[opdNum]->getAsConstantUnion()->getConstArray()[0].getUConst(); + const int location = glslangOperands[arg]->getAsConstantUnion()->getConstArray()[0].getUConst(); + auto itNode = locationToSymbol[set].find(location); + visitSymbol(itNode->second); + spv::Id symId = getSymbolId(itNode->second); + operands.push_back(symId); + } else if ((arg == 12 && glslangOp == glslang::EOpHitObjectRecordHitNV) || + (arg == 13 && glslangOp == glslang::EOpHitObjectRecordHitMotionNV) || + (arg == 11 && glslangOp == glslang::EOpHitObjectRecordHitWithIndexNV) || + (arg == 12 && glslangOp == glslang::EOpHitObjectRecordHitWithIndexMotionNV) || + (arg == 1 && glslangOp == glslang::EOpHitObjectGetAttributesNV)) { + const int location = glslangOperands[arg]->getAsConstantUnion()->getConstArray()[0].getUConst(); + const int set = 2; auto itNode = locationToSymbol[set].find(location); visitSymbol(itNode->second); spv::Id symId = getSymbolId(itNode->second); operands.push_back(symId); -#ifndef GLSLANG_WEB } else if (glslangOperands[arg]->getAsTyped()->getQualifier().isSpirvLiteral()) { // Will be translated to a literal value, make a placeholder here operands.push_back(spv::NoResult); -#endif } else { operands.push_back(accessChainLoad(glslangOperands[arg]->getAsTyped()->getType())); } @@ -3426,42 +3646,97 @@ bool TGlslangToSpvTraverser::visitAggregate(glslang::TVisit visit, glslang::TInt } builder.setLine(node->getLoc().line, node->getLoc().getFilename()); -#ifndef GLSLANG_WEB - if (node->getOp() == glslang::EOpCooperativeMatrixLoad) { + if (node->getOp() == glslang::EOpCooperativeMatrixLoad || + node->getOp() == glslang::EOpCooperativeMatrixLoadNV) { std::vector idImmOps; idImmOps.push_back(spv::IdImmediate(true, operands[1])); // buf - idImmOps.push_back(spv::IdImmediate(true, operands[2])); // stride - idImmOps.push_back(spv::IdImmediate(true, operands[3])); // colMajor + if (node->getOp() == glslang::EOpCooperativeMatrixLoad) { + idImmOps.push_back(spv::IdImmediate(true, operands[3])); // matrixLayout + idImmOps.push_back(spv::IdImmediate(true, operands[2])); // stride + } else { + idImmOps.push_back(spv::IdImmediate(true, operands[2])); // stride + idImmOps.push_back(spv::IdImmediate(true, operands[3])); // colMajor + } idImmOps.insert(idImmOps.end(), memoryAccessOperands.begin(), memoryAccessOperands.end()); // get the pointee type spv::Id typeId = builder.getContainedTypeId(builder.getTypeId(operands[0])); assert(builder.isCooperativeMatrixType(typeId)); // do the op - spv::Id result = builder.createOp(spv::OpCooperativeMatrixLoadNV, typeId, idImmOps); + spv::Id result = node->getOp() == glslang::EOpCooperativeMatrixLoad + ? builder.createOp(spv::OpCooperativeMatrixLoadKHR, typeId, idImmOps) + : builder.createOp(spv::OpCooperativeMatrixLoadNV, typeId, idImmOps); // store the result to the pointer (out param 'm') builder.createStore(result, operands[0]); result = 0; - } else if (node->getOp() == glslang::EOpCooperativeMatrixStore) { + } else if (node->getOp() == glslang::EOpCooperativeMatrixStore || + node->getOp() == glslang::EOpCooperativeMatrixStoreNV) { std::vector idImmOps; idImmOps.push_back(spv::IdImmediate(true, operands[1])); // buf idImmOps.push_back(spv::IdImmediate(true, operands[0])); // object - idImmOps.push_back(spv::IdImmediate(true, operands[2])); // stride - idImmOps.push_back(spv::IdImmediate(true, operands[3])); // colMajor + if (node->getOp() == glslang::EOpCooperativeMatrixStore) { + idImmOps.push_back(spv::IdImmediate(true, operands[3])); // matrixLayout + idImmOps.push_back(spv::IdImmediate(true, operands[2])); // stride + } else { + idImmOps.push_back(spv::IdImmediate(true, operands[2])); // stride + idImmOps.push_back(spv::IdImmediate(true, operands[3])); // colMajor + } idImmOps.insert(idImmOps.end(), memoryAccessOperands.begin(), memoryAccessOperands.end()); - builder.createNoResultOp(spv::OpCooperativeMatrixStoreNV, idImmOps); + if (node->getOp() == glslang::EOpCooperativeMatrixStore) + builder.createNoResultOp(spv::OpCooperativeMatrixStoreKHR, idImmOps); + else + builder.createNoResultOp(spv::OpCooperativeMatrixStoreNV, idImmOps); result = 0; - } else -#endif - if (atomic) { + } else if (node->getOp() == glslang::EOpRayQueryGetIntersectionTriangleVertexPositionsEXT) { + std::vector idImmOps; + + idImmOps.push_back(spv::IdImmediate(true, operands[0])); // q + idImmOps.push_back(spv::IdImmediate(true, operands[1])); // committed + + spv::Id typeId = builder.makeArrayType(builder.makeVectorType(builder.makeFloatType(32), 3), + builder.makeUintConstant(3), 0); + // do the op + + spv::Op spvOp = spv::OpRayQueryGetIntersectionTriangleVertexPositionsKHR; + + spv::Id result = builder.createOp(spvOp, typeId, idImmOps); + // store the result to the pointer (out param 'm') + builder.createStore(result, operands[2]); + result = 0; + } else if (node->getOp() == glslang::EOpCooperativeMatrixMulAdd) { + uint32_t matrixOperands = 0; + + // If the optional operand is present, initialize matrixOperands to that value. + if (glslangOperands.size() == 4 && glslangOperands[3]->getAsConstantUnion()) { + matrixOperands = glslangOperands[3]->getAsConstantUnion()->getConstArray()[0].getIConst(); + } + + // Determine Cooperative Matrix Operands bits from the signedness of the types. + if (isTypeSignedInt(glslangOperands[0]->getAsTyped()->getBasicType())) + matrixOperands |= spv::CooperativeMatrixOperandsMatrixASignedComponentsMask; + if (isTypeSignedInt(glslangOperands[1]->getAsTyped()->getBasicType())) + matrixOperands |= spv::CooperativeMatrixOperandsMatrixBSignedComponentsMask; + if (isTypeSignedInt(glslangOperands[2]->getAsTyped()->getBasicType())) + matrixOperands |= spv::CooperativeMatrixOperandsMatrixCSignedComponentsMask; + if (isTypeSignedInt(node->getBasicType())) + matrixOperands |= spv::CooperativeMatrixOperandsMatrixResultSignedComponentsMask; + + std::vector idImmOps; + idImmOps.push_back(spv::IdImmediate(true, operands[0])); + idImmOps.push_back(spv::IdImmediate(true, operands[1])); + idImmOps.push_back(spv::IdImmediate(true, operands[2])); + if (matrixOperands != 0) + idImmOps.push_back(spv::IdImmediate(false, matrixOperands)); + + result = builder.createOp(spv::OpCooperativeMatrixMulAddKHR, resultType(), idImmOps); + } else if (atomic) { // Handle all atomics glslang::TBasicType typeProxy = (node->getOp() == glslang::EOpAtomicStore) ? node->getSequence()[0]->getAsTyped()->getBasicType() : node->getBasicType(); result = createAtomicOperation(node->getOp(), precision, resultType(), operands, typeProxy, lvalueCoherentFlags); -#ifndef GLSLANG_WEB } else if (node->getOp() == glslang::EOpSpirvInst) { const auto& spirvInst = node->getSpirvInstruction(); if (spirvInst.set == "") { @@ -3488,7 +3763,6 @@ bool TGlslangToSpvTraverser::visitAggregate(glslang::TVisit visit, glslang::TInt spirvInst.id, operands); } noReturnValue = node->getBasicType() == glslang::EbtVoid; -#endif } else if (node->getOp() == glslang::EOpDebugPrintf) { if (!nonSemanticDebugPrintf) { nonSemanticDebugPrintf = builder.import("NonSemantic.DebugPrintf"); @@ -3503,7 +3777,7 @@ bool TGlslangToSpvTraverser::visitAggregate(glslang::TVisit visit, glslang::TInt break; case 1: { - OpDecorations decorations = { precision, + OpDecorations decorations = { precision, TranslateNoContractionDecoration(node->getType().getQualifier()), TranslateNonUniformDecoration(node->getType().getQualifier()) }; result = createUnaryOperation( @@ -3605,10 +3879,11 @@ bool TGlslangToSpvTraverser::visitSelection(glslang::TVisit /* visit */, glslang // Find a way of executing both sides and selecting the right result. const auto executeBothSides = [&]() -> void { // execute both sides + spv::Id resultType = convertGlslangToSpvType(node->getType()); node->getTrueBlock()->traverse(this); spv::Id trueValue = accessChainLoad(node->getTrueBlock()->getAsTyped()->getType()); node->getFalseBlock()->traverse(this); - spv::Id falseValue = accessChainLoad(node->getTrueBlock()->getAsTyped()->getType()); + spv::Id falseValue = accessChainLoad(node->getFalseBlock()->getAsTyped()->getType()); builder.setLine(node->getLoc().line, node->getLoc().getFilename()); @@ -3617,23 +3892,31 @@ bool TGlslangToSpvTraverser::visitSelection(glslang::TVisit /* visit */, glslang return; // emit code to select between trueValue and falseValue - - // see if OpSelect can handle it + // see if OpSelect can handle the result type, and that the SPIR-V types + // of the inputs match the result type. if (isOpSelectable()) { // Emit OpSelect for this selection. // smear condition to vector, if necessary (AST is always scalar) // Before 1.4, smear like for mix(), starting with 1.4, keep it scalar if (glslangIntermediate->getSpv().spv < glslang::EShTargetSpv_1_4 && builder.isVector(trueValue)) { - condition = builder.smearScalar(spv::NoPrecision, condition, + condition = builder.smearScalar(spv::NoPrecision, condition, builder.makeVectorType(builder.makeBoolType(), builder.getNumComponents(trueValue))); } + // If the types do not match, it is because of mismatched decorations on aggregates. + // Since isOpSelectable only lets us get here for SPIR-V >= 1.4, we can use OpCopyObject + // to get matching types. + if (builder.getTypeId(trueValue) != resultType) { + trueValue = builder.createUnaryOp(spv::OpCopyLogical, resultType, trueValue); + } + if (builder.getTypeId(falseValue) != resultType) { + falseValue = builder.createUnaryOp(spv::OpCopyLogical, resultType, falseValue); + } + // OpSelect - result = builder.createTriOp(spv::OpSelect, - convertGlslangToSpvType(node->getType()), condition, - trueValue, falseValue); + result = builder.createTriOp(spv::OpSelect, resultType, condition, trueValue, falseValue); builder.clearAccessChain(); builder.setAccessChainRValue(result); @@ -3641,7 +3924,7 @@ bool TGlslangToSpvTraverser::visitSelection(glslang::TVisit /* visit */, glslang // We need control flow to select the result. // TODO: Once SPIR-V OpSelect allows arbitrary types, eliminate this path. result = builder.createVariable(TranslatePrecisionDecoration(node->getType()), - spv::StorageClassFunction, convertGlslangToSpvType(node->getType())); + spv::StorageClassFunction, resultType); // Selection control: const spv::SelectionControlMask control = TranslateSelectionControl(*node); @@ -3650,10 +3933,15 @@ bool TGlslangToSpvTraverser::visitSelection(glslang::TVisit /* visit */, glslang spv::Builder::If ifBuilder(condition, control, builder); // emit the "then" statement - builder.createStore(trueValue, result); + builder.clearAccessChain(); + builder.setAccessChainLValue(result); + multiTypeStore(node->getType(), trueValue); + ifBuilder.makeBeginElse(); // emit the "else" statement - builder.createStore(falseValue, result); + builder.clearAccessChain(); + builder.setAccessChainLValue(result); + multiTypeStore(node->getType(), falseValue); // finish off the control flow ifBuilder.makeEndIf(); @@ -3680,16 +3968,26 @@ bool TGlslangToSpvTraverser::visitSelection(glslang::TVisit /* visit */, glslang // emit the "then" statement if (node->getTrueBlock() != nullptr) { node->getTrueBlock()->traverse(this); - if (result != spv::NoResult) - builder.createStore(accessChainLoad(node->getTrueBlock()->getAsTyped()->getType()), result); + if (result != spv::NoResult) { + spv::Id load = accessChainLoad(node->getTrueBlock()->getAsTyped()->getType()); + + builder.clearAccessChain(); + builder.setAccessChainLValue(result); + multiTypeStore(node->getType(), load); + } } if (node->getFalseBlock() != nullptr) { ifBuilder.makeBeginElse(); // emit the "else" statement node->getFalseBlock()->traverse(this); - if (result != spv::NoResult) - builder.createStore(accessChainLoad(node->getFalseBlock()->getAsTyped()->getType()), result); + if (result != spv::NoResult) { + spv::Id load = accessChainLoad(node->getFalseBlock()->getAsTyped()->getType()); + + builder.clearAccessChain(); + builder.setAccessChainLValue(result); + multiTypeStore(node->getType(), load); + } } // finish off the control flow @@ -3769,10 +4067,8 @@ bool TGlslangToSpvTraverser::visitSwitch(glslang::TVisit /* visit */, glslang::T void TGlslangToSpvTraverser::visitConstantUnion(glslang::TIntermConstantUnion* node) { -#ifndef GLSLANG_WEB if (node->getQualifier().isSpirvLiteral()) return; // Translated to a literal value, skip further processing -#endif int nextConst = 0; spv::Id constant = createSpvConstantFromConstUnionArray(node->getType(), node->getConstArray(), nextConst, false); @@ -3796,8 +4092,8 @@ bool TGlslangToSpvTraverser::visitLoop(glslang::TVisit /* visit */, glslang::TIn // by a block-ending branch. But we don't want to put any other body/test // instructions in it, since the body/test may have arbitrary instructions, // including merges of its own. - builder.setLine(node->getLoc().line, node->getLoc().getFilename()); builder.setBuildPoint(&blocks.head); + builder.setLine(node->getLoc().line, node->getLoc().getFilename()); builder.createLoopMerge(&blocks.merge, &blocks.continue_target, control, operands); if (node->testFirst() && node->getTest()) { spv::Block& test = builder.makeNewBlock(); @@ -3903,7 +4199,6 @@ bool TGlslangToSpvTraverser::visitBranch(glslang::TVisit /* visit */, glslang::T builder.clearAccessChain(); break; -#ifndef GLSLANG_WEB case glslang::EOpDemote: builder.createNoResultOp(spv::OpDemoteToHelperInvocationEXT); builder.addExtension(spv::E_SPV_EXT_demote_to_helper_invocation); @@ -3915,7 +4210,6 @@ bool TGlslangToSpvTraverser::visitBranch(glslang::TVisit /* visit */, glslang::T case glslang::EOpIgnoreIntersectionKHR: builder.makeStatementTerminator(spv::OpIgnoreIntersectionKHR, "post-ignoreIntersectionKHR"); break; -#endif default: assert(0); @@ -3957,7 +4251,6 @@ spv::Id TGlslangToSpvTraverser::createSpvVariable(const glslang::TIntermSymbol* else builder.addCapability(spv::CapabilityStorageUniform16); break; -#ifndef GLSLANG_WEB case spv::StorageClassPushConstant: builder.addIncorporatedExtension(spv::E_SPV_KHR_16bit_storage, spv::Spv_1_3); builder.addCapability(spv::CapabilityStoragePushConstant16); @@ -3967,7 +4260,6 @@ spv::Id TGlslangToSpvTraverser::createSpvVariable(const glslang::TIntermSymbol* builder.addIncorporatedExtension(spv::E_SPV_KHR_16bit_storage, spv::Spv_1_3); builder.addCapability(spv::CapabilityStorageUniformBufferBlock16); break; -#endif default: if (storageClass == spv::StorageClassWorkgroup && node->getType().getBasicType() == glslang::EbtBlock) { @@ -4016,7 +4308,7 @@ spv::Id TGlslangToSpvTraverser::createSpvVariable(const glslang::TIntermSymbol* initializer = builder.makeNullConstant(spvType); } - return builder.createVariable(spv::NoPrecision, storageClass, spvType, name, initializer); + return builder.createVariable(spv::NoPrecision, storageClass, spvType, name, initializer, false); } // Return type Id of the sampled type. @@ -4026,7 +4318,6 @@ spv::Id TGlslangToSpvTraverser::getSampledType(const glslang::TSampler& sampler) case glslang::EbtInt: return builder.makeIntType(32); case glslang::EbtUint: return builder.makeUintType(32); case glslang::EbtFloat: return builder.makeFloatType(32); -#ifndef GLSLANG_WEB case glslang::EbtFloat16: builder.addExtension(spv::E_SPV_AMD_gpu_shader_half_float_fetch); builder.addCapability(spv::CapabilityFloat16ImageAMD); @@ -4039,7 +4330,6 @@ spv::Id TGlslangToSpvTraverser::getSampledType(const glslang::TSampler& sampler) builder.addExtension(spv::E_SPV_EXT_shader_image_int64); builder.addCapability(spv::CapabilityInt64ImageEXT); return builder.makeUintType(64); -#endif default: assert(0); return builder.makeFloatType(32); @@ -4084,6 +4374,16 @@ spv::Id TGlslangToSpvTraverser::convertGlslangToSpvType(const glslang::TType& ty return convertGlslangToSpvType(type, getExplicitLayout(type), type.getQualifier(), false, forwardReferenceOnly); } +spv::LinkageType TGlslangToSpvTraverser::convertGlslangLinkageToSpv(glslang::TLinkType linkType) +{ + switch (linkType) { + case glslang::ELinkExport: + return spv::LinkageTypeExport; + default: + return spv::LinkageTypeMax; + } +} + // Do full recursive conversion of an arbitrary glslang type to a SPIR-V Id. // explicitLayout can be kept the same throughout the hierarchical recursive walk. // Mutually recursive with convertGlslangStructToSpvType(). @@ -4104,7 +4404,7 @@ spv::Id TGlslangToSpvTraverser::convertGlslangToSpvType(const glslang::TType& ty if (explicitLayout != glslang::ElpNone) spvType = builder.makeUintType(32); else - spvType = builder.makeBoolType(); + spvType = builder.makeBoolType(false); break; case glslang::EbtInt: spvType = builder.makeIntType(32); @@ -4115,7 +4415,6 @@ spv::Id TGlslangToSpvTraverser::convertGlslangToSpvType(const glslang::TType& ty case glslang::EbtFloat: spvType = builder.makeFloatType(32); break; -#ifndef GLSLANG_WEB case glslang::EbtDouble: spvType = builder.makeFloatType(64); break; @@ -4193,7 +4492,6 @@ spv::Id TGlslangToSpvTraverser::convertGlslangToSpvType(const glslang::TType& ty } } break; -#endif case glslang::EbtSampler: { const glslang::TSampler& sampler = type.getSampler(); @@ -4204,7 +4502,7 @@ spv::Id TGlslangToSpvTraverser::convertGlslangToSpvType(const glslang::TType& ty spvType = builder.makeImageType(getSampledType(sampler), TranslateDimensionality(sampler), sampler.isShadow(), sampler.isArrayed(), sampler.isMultiSample(), sampler.isImageClass() ? 2 : 1, TranslateImageFormat(type)); - if (sampler.isCombined() && + if (sampler.isCombined() && (!sampler.isBuffer() || glslangIntermediate->getSpv().spv < glslang::EShTargetSpv_1_6)) { // Already has both image and sampler, make the combined type. Only combine sampler to // buffer if before SPIR-V 1.6. @@ -4235,7 +4533,13 @@ spv::Id TGlslangToSpvTraverser::convertGlslangToSpvType(const glslang::TType& ty case glslang::EbtString: // no type used for OpString return 0; -#ifndef GLSLANG_WEB + + case glslang::EbtHitObjectNV: { + builder.addExtension(spv::E_SPV_NV_shader_invocation_reorder); + builder.addCapability(spv::CapabilityShaderInvocationReorderNV); + spvType = builder.makeHitObjectNVType(); + } + break; case glslang::EbtSpirvType: { // GL_EXT_spirv_intrinsics const auto& spirvType = type.getSpirvType(); @@ -4243,48 +4547,57 @@ spv::Id TGlslangToSpvTraverser::convertGlslangToSpvType(const glslang::TType& ty std::vector operands; for (const auto& typeParam : spirvType.typeParams) { - // Constant expression - if (typeParam.constant->isLiteral()) { - if (typeParam.constant->getBasicType() == glslang::EbtFloat) { - float floatValue = static_cast(typeParam.constant->getConstArray()[0].getDConst()); - unsigned literal = *reinterpret_cast(&floatValue); - operands.push_back({false, literal}); - } else if (typeParam.constant->getBasicType() == glslang::EbtInt) { - unsigned literal = typeParam.constant->getConstArray()[0].getIConst(); - operands.push_back({false, literal}); - } else if (typeParam.constant->getBasicType() == glslang::EbtUint) { - unsigned literal = typeParam.constant->getConstArray()[0].getUConst(); - operands.push_back({false, literal}); - } else if (typeParam.constant->getBasicType() == glslang::EbtBool) { - unsigned literal = typeParam.constant->getConstArray()[0].getBConst(); - operands.push_back({false, literal}); - } else if (typeParam.constant->getBasicType() == glslang::EbtString) { - auto str = typeParam.constant->getConstArray()[0].getSConst()->c_str(); - unsigned literal = 0; - char* literalPtr = reinterpret_cast(&literal); - unsigned charCount = 0; - char ch = 0; - do { - ch = *(str++); - *(literalPtr++) = ch; - ++charCount; - if (charCount == 4) { + if (typeParam.getAsConstant() != nullptr) { + // Constant expression + auto constant = typeParam.getAsConstant(); + if (constant->isLiteral()) { + if (constant->getBasicType() == glslang::EbtFloat) { + float floatValue = static_cast(constant->getConstArray()[0].getDConst()); + unsigned literal; + static_assert(sizeof(literal) == sizeof(floatValue), "sizeof(unsigned) != sizeof(float)"); + memcpy(&literal, &floatValue, sizeof(literal)); + operands.push_back({false, literal}); + } else if (constant->getBasicType() == glslang::EbtInt) { + unsigned literal = constant->getConstArray()[0].getIConst(); + operands.push_back({false, literal}); + } else if (constant->getBasicType() == glslang::EbtUint) { + unsigned literal = constant->getConstArray()[0].getUConst(); + operands.push_back({false, literal}); + } else if (constant->getBasicType() == glslang::EbtBool) { + unsigned literal = constant->getConstArray()[0].getBConst(); + operands.push_back({false, literal}); + } else if (constant->getBasicType() == glslang::EbtString) { + auto str = constant->getConstArray()[0].getSConst()->c_str(); + unsigned literal = 0; + char* literalPtr = reinterpret_cast(&literal); + unsigned charCount = 0; + char ch = 0; + do { + ch = *(str++); + *(literalPtr++) = ch; + ++charCount; + if (charCount == 4) { + operands.push_back({false, literal}); + literalPtr = reinterpret_cast(&literal); + charCount = 0; + } + } while (ch != 0); + + // Partial literal is padded with 0 + if (charCount > 0) { + for (; charCount < 4; ++charCount) + *(literalPtr++) = 0; operands.push_back({false, literal}); - literalPtr = reinterpret_cast(&literal); - charCount = 0; } - } while (ch != 0); - - // Partial literal is padded with 0 - if (charCount > 0) { - for (; charCount < 4; ++charCount) - *(literalPtr++) = 0; - operands.push_back({false, literal}); - } + } else + assert(0); // Unexpected type } else - assert(0); // Unexpected type - } else - operands.push_back({true, createSpvConstant(*typeParam.constant)}); + operands.push_back({true, createSpvConstant(*constant)}); + } else { + // Type specifier + assert(typeParam.getAsType() != nullptr); + operands.push_back({true, convertGlslangToSpvType(*typeParam.getAsType())}); + } } assert(spirvInst.set == ""); // Currently, couldn't be extended instructions. @@ -4292,7 +4605,6 @@ spv::Id TGlslangToSpvTraverser::convertGlslangToSpvType(const glslang::TType& ty break; } -#endif default: assert(0); break; @@ -4306,9 +4618,10 @@ spv::Id TGlslangToSpvTraverser::convertGlslangToSpvType(const glslang::TType& ty spvType = builder.makeVectorType(spvType, type.getVectorSize()); } - if (type.isCoopMat()) { + if (type.isCoopMatNV()) { builder.addCapability(spv::CapabilityCooperativeMatrixNV); builder.addExtension(spv::E_SPV_NV_cooperative_matrix); + if (type.getBasicType() == glslang::EbtFloat16) builder.addCapability(spv::CapabilityFloat16); if (type.getBasicType() == glslang::EbtUint8 || @@ -4316,11 +4629,29 @@ spv::Id TGlslangToSpvTraverser::convertGlslangToSpvType(const glslang::TType& ty builder.addCapability(spv::CapabilityInt8); } - spv::Id scope = makeArraySizeId(*type.getTypeParameters(), 1); - spv::Id rows = makeArraySizeId(*type.getTypeParameters(), 2); - spv::Id cols = makeArraySizeId(*type.getTypeParameters(), 3); + spv::Id scope = makeArraySizeId(*type.getTypeParameters()->arraySizes, 1); + spv::Id rows = makeArraySizeId(*type.getTypeParameters()->arraySizes, 2); + spv::Id cols = makeArraySizeId(*type.getTypeParameters()->arraySizes, 3); + + spvType = builder.makeCooperativeMatrixTypeNV(spvType, scope, rows, cols); + } + + if (type.isCoopMatKHR()) { + builder.addCapability(spv::CapabilityCooperativeMatrixKHR); + builder.addExtension(spv::E_SPV_KHR_cooperative_matrix); + + if (type.getBasicType() == glslang::EbtFloat16) + builder.addCapability(spv::CapabilityFloat16); + if (type.getBasicType() == glslang::EbtUint8 || type.getBasicType() == glslang::EbtInt8) { + builder.addCapability(spv::CapabilityInt8); + } + + spv::Id scope = makeArraySizeId(*type.getTypeParameters()->arraySizes, 0); + spv::Id rows = makeArraySizeId(*type.getTypeParameters()->arraySizes, 1); + spv::Id cols = makeArraySizeId(*type.getTypeParameters()->arraySizes, 2); + spv::Id use = builder.makeUintConstant(type.getCoopMatKHRuse()); - spvType = builder.makeCooperativeMatrixType(spvType, scope, rows, cols); + spvType = builder.makeCooperativeMatrixTypeKHR(spvType, scope, rows, cols, use); } if (type.isArray()) { @@ -4361,12 +4692,10 @@ spv::Id TGlslangToSpvTraverser::convertGlslangToSpvType(const glslang::TType& ty if (type.isSizedArray()) spvType = builder.makeArrayType(spvType, makeArraySizeId(*type.getArraySizes(), 0), stride); else { -#ifndef GLSLANG_WEB if (!lastBufferBlockMember) { builder.addIncorporatedExtension("SPV_EXT_descriptor_indexing", spv::Spv_1_5); builder.addCapability(spv::CapabilityRuntimeDescriptorArrayEXT); } -#endif spvType = builder.makeRuntimeArray(spvType); } if (stride > 0) @@ -4382,7 +4711,6 @@ spv::Id TGlslangToSpvTraverser::convertGlslangToSpvType(const glslang::TType& ty // bool TGlslangToSpvTraverser::filterMember(const glslang::TType& member) { -#ifndef GLSLANG_WEB auto& extensions = glslangIntermediate->getRequestedExtensions(); if (member.getFieldName() == "gl_SecondaryViewportMaskNV" && @@ -4392,7 +4720,13 @@ bool TGlslangToSpvTraverser::filterMember(const glslang::TType& member) extensions.find("GL_NV_stereo_view_rendering") == extensions.end()) return true; - if (glslangIntermediate->getStage() != EShLangMeshNV) { + if (glslangIntermediate->getStage() == EShLangMesh) { + if (member.getFieldName() == "gl_PrimitiveShadingRateEXT" && + extensions.find("GL_EXT_fragment_shading_rate") == extensions.end()) + return true; + } + + if (glslangIntermediate->getStage() != EShLangMesh) { if (member.getFieldName() == "gl_ViewportMask" && extensions.find("GL_NV_viewport_array2") == extensions.end()) return true; @@ -4403,7 +4737,6 @@ bool TGlslangToSpvTraverser::filterMember(const glslang::TType& member) extensions.find("GL_NVX_multiview_per_view_attributes") == extensions.end()) return true; } -#endif return false; }; @@ -4422,14 +4755,14 @@ spv::Id TGlslangToSpvTraverser::convertGlslangStructToSpvType(const glslang::TTy // except sometimes for blocks std::vector > deferredForwardPointers; for (int i = 0; i < (int)glslangMembers->size(); i++) { - glslang::TType& glslangMember = *(*glslangMembers)[i].type; - if (glslangMember.hiddenMember()) { + auto& glslangMember = (*glslangMembers)[i]; + if (glslangMember.type->hiddenMember()) { ++memberDelta; if (type.getBasicType() == glslang::EbtBlock) memberRemapper[glslangTypeToIdMap[glslangMembers]][i] = -1; } else { if (type.getBasicType() == glslang::EbtBlock) { - if (filterMember(glslangMember)) { + if (filterMember(*glslangMember.type)) { memberDelta++; memberRemapper[glslangTypeToIdMap[glslangMembers]][i] = -1; continue; @@ -4437,7 +4770,7 @@ spv::Id TGlslangToSpvTraverser::convertGlslangStructToSpvType(const glslang::TTy memberRemapper[glslangTypeToIdMap[glslangMembers]][i] = i - memberDelta; } // modify just this child's view of the qualifier - glslang::TQualifier memberQualifier = glslangMember.getQualifier(); + glslang::TQualifier memberQualifier = glslangMember.type->getQualifier(); InheritQualifiers(memberQualifier, qualifier); // manually inherit location @@ -4448,30 +4781,43 @@ spv::Id TGlslangToSpvTraverser::convertGlslangStructToSpvType(const glslang::TTy bool lastBufferBlockMember = qualifier.storage == glslang::EvqBuffer && i == (int)glslangMembers->size() - 1; - // Make forward pointers for any pointer members, and create a list of members to - // convert to spirv types after creating the struct. - if (glslangMember.isReference()) { - if (forwardPointers.find(glslangMember.getReferentType()) == forwardPointers.end()) { - deferredForwardPointers.push_back(std::make_pair(&glslangMember, memberQualifier)); - } - spvMembers.push_back( - convertGlslangToSpvType(glslangMember, explicitLayout, memberQualifier, lastBufferBlockMember, - true)); - } else { - spvMembers.push_back( - convertGlslangToSpvType(glslangMember, explicitLayout, memberQualifier, lastBufferBlockMember, - false)); + // Make forward pointers for any pointer members. + if (glslangMember.type->isReference() && + forwardPointers.find(glslangMember.type->getReferentType()) == forwardPointers.end()) { + deferredForwardPointers.push_back(std::make_pair(glslangMember.type, memberQualifier)); + } + + // Create the member type. + auto const spvMember = convertGlslangToSpvType(*glslangMember.type, explicitLayout, memberQualifier, lastBufferBlockMember, + glslangMember.type->isReference()); + spvMembers.push_back(spvMember); + + // Update the builder with the type's location so that we can create debug types for the structure members. + // There doesn't exist a "clean" entry point for this information to be passed along to the builder so, for now, + // it is stored in the builder and consumed during the construction of composite debug types. + // TODO: This probably warrants further investigation. This approach was decided to be the least ugly of the + // quick and dirty approaches that were tried. + // Advantages of this approach: + // + Relatively clean. No direct calls into debug type system. + // + Handles nested recursive structures. + // Disadvantages of this approach: + // + Not as clean as desired. Traverser queries/sets persistent state. This is fragile. + // + Table lookup during creation of composite debug types. This really shouldn't be necessary. + if(options.emitNonSemanticShaderDebugInfo) { + builder.debugTypeLocs[spvMember].name = glslangMember.type->getFieldName().c_str(); + builder.debugTypeLocs[spvMember].line = glslangMember.loc.line; + builder.debugTypeLocs[spvMember].column = glslangMember.loc.column; } } } // Make the SPIR-V type - spv::Id spvType = builder.makeStructType(spvMembers, type.getTypeName().c_str()); + spv::Id spvType = builder.makeStructType(spvMembers, type.getTypeName().c_str(), false); if (! HasNonLayoutQualifiers(type, qualifier)) structMap[explicitLayout][qualifier.layoutMatrix][glslangMembers] = spvType; // Decorate it - decorateStructType(type, glslangMembers, explicitLayout, qualifier, spvType); + decorateStructType(type, glslangMembers, explicitLayout, qualifier, spvType, spvMembers); for (int i = 0; i < (int)deferredForwardPointers.size(); ++i) { auto it = deferredForwardPointers[i]; @@ -4485,7 +4831,8 @@ void TGlslangToSpvTraverser::decorateStructType(const glslang::TType& type, const glslang::TTypeList* glslangMembers, glslang::TLayoutPacking explicitLayout, const glslang::TQualifier& qualifier, - spv::Id spvType) + spv::Id spvType, + const std::vector& spvMembers) { // Name and decorate the non-hidden members int offset = -1; @@ -4520,14 +4867,11 @@ void TGlslangToSpvTraverser::decorateStructType(const glslang::TType& type, glslangIntermediate->getSource() == glslang::EShSourceHlsl) { builder.addMemberDecoration(spvType, member, TranslateInterpolationDecoration(memberQualifier)); builder.addMemberDecoration(spvType, member, TranslateAuxiliaryStorageDecoration(memberQualifier)); -#ifndef GLSLANG_WEB addMeshNVDecoration(spvType, member, memberQualifier); -#endif } } builder.addMemberDecoration(spvType, member, TranslateInvariantDecoration(memberQualifier)); -#ifndef GLSLANG_WEB if (type.getBasicType() == glslang::EbtBlock && qualifier.storage == glslang::EvqBuffer) { // Add memory decorations only to top-level members of shader storage block @@ -4537,8 +4881,6 @@ void TGlslangToSpvTraverser::decorateStructType(const glslang::TType& type, builder.addMemberDecoration(spvType, member, memory[i]); } -#endif - // Location assignment was already completed correctly by the front end, // just track whether a member needs to be decorated. // Ignore member locations if the container is an array, as that's @@ -4571,7 +4913,6 @@ void TGlslangToSpvTraverser::decorateStructType(const glslang::TType& type, if (builtIn != spv::BuiltInMax) builder.addMemberDecoration(spvType, member, spv::DecorationBuiltIn, (int)builtIn); -#ifndef GLSLANG_WEB // nonuniform builder.addMemberDecoration(spvType, member, TranslateNonUniformDecoration(glslangMember.getQualifier())); @@ -4633,19 +4974,30 @@ void TGlslangToSpvTraverser::decorateStructType(const glslang::TType& type, builder.addDecoration(spvType, static_cast(decorateString.first), strings); } } -#endif } // Decorate the structure builder.addDecoration(spvType, TranslateLayoutDecoration(type, qualifier.layoutMatrix)); - builder.addDecoration(spvType, TranslateBlockDecoration(type, glslangIntermediate->usingStorageBuffer())); + const auto basicType = type.getBasicType(); + const auto typeStorageQualifier = type.getQualifier().storage; + if (basicType == glslang::EbtBlock) { + builder.addDecoration(spvType, TranslateBlockDecoration(typeStorageQualifier, glslangIntermediate->usingStorageBuffer())); + } else if (basicType == glslang::EbtStruct && glslangIntermediate->getSpv().vulkan > 0) { + const auto hasRuntimeArray = !spvMembers.empty() && builder.getOpCode(spvMembers.back()) == spv::OpTypeRuntimeArray; + if (hasRuntimeArray) { + builder.addDecoration(spvType, TranslateBlockDecoration(typeStorageQualifier, glslangIntermediate->usingStorageBuffer())); + } + } + + if (qualifier.hasHitObjectShaderRecordNV()) + builder.addDecoration(spvType, spv::DecorationHitObjectShaderRecordBufferNV); } // Turn the expression forming the array size into an id. // This is not quite trivial, because of specialization constants. // Sometimes, a raw constant is turned into an Id, and sometimes // a specialization constant expression is. -spv::Id TGlslangToSpvTraverser::makeArraySizeId(const glslang::TArraySizes& arraySizes, int dim) +spv::Id TGlslangToSpvTraverser::makeArraySizeId(const glslang::TArraySizes& arraySizes, int dim, bool allowZero) { // First, see if this is sized with a node, meaning a specialization constant: glslang::TIntermTyped* specNode = arraySizes.getDimNode(dim); @@ -4659,7 +5011,10 @@ spv::Id TGlslangToSpvTraverser::makeArraySizeId(const glslang::TArraySizes& arra // Otherwise, need a compile-time (front end) size, get it: int size = arraySizes.getDimSize(dim); - assert(size > 0); + + if (!allowZero) + assert(size > 0); + return builder.makeUintConstant(size); } @@ -4675,6 +5030,16 @@ spv::Id TGlslangToSpvTraverser::accessChainLoad(const glslang::TType& type) spv::Builder::AccessChain::CoherentFlags coherentFlags = builder.getAccessChain().coherentFlags; coherentFlags |= TranslateCoherent(type); + spv::MemoryAccessMask accessMask = spv::MemoryAccessMask(TranslateMemoryAccess(coherentFlags) & ~spv::MemoryAccessMakePointerAvailableKHRMask); + // If the value being loaded is HelperInvocation, SPIR-V 1.6 is being generated (so that + // SPV_EXT_demote_to_helper_invocation is in core) and the memory model is in use, add + // the Volatile MemoryAccess semantic. + if (type.getQualifier().builtIn == glslang::EbvHelperInvocation && + glslangIntermediate->usingVulkanMemoryModel() && + glslangIntermediate->getSpv().spv >= glslang::EShTargetSpv_1_6) { + accessMask = spv::MemoryAccessMask(accessMask | spv::MemoryAccessVolatileMask); + } + unsigned int alignment = builder.getAccessChain().alignment; alignment |= type.getBufferReferenceAlignment(); @@ -4682,7 +5047,7 @@ spv::Id TGlslangToSpvTraverser::accessChainLoad(const glslang::TType& type) TranslateNonUniformDecoration(builder.getAccessChain().coherentFlags), TranslateNonUniformDecoration(type.getQualifier()), nominalTypeId, - spv::MemoryAccessMask(TranslateMemoryAccess(coherentFlags) & ~spv::MemoryAccessMakePointerAvailableKHRMask), + accessMask, TranslateMemoryScope(coherentFlags), alignment); @@ -4954,7 +5319,6 @@ void TGlslangToSpvTraverser::declareUseOfStructMember(const glslang::TTypeList& switch (glslangBuiltIn) { case glslang::EbvPointSize: -#ifndef GLSLANG_WEB case glslang::EbvClipDistance: case glslang::EbvCullDistance: case glslang::EbvViewportMaskNV: @@ -4970,7 +5334,6 @@ void TGlslangToSpvTraverser::declareUseOfStructMember(const glslang::TTypeList& case glslang::EbvLayerPerViewNV: case glslang::EbvMeshViewCountNV: case glslang::EbvMeshViewIndicesNV: -#endif // Generate the associated capability. Delegate to TranslateBuiltInDecoration. // Alternately, we could just call this for any glslang built-in, since the // capability already guards against duplicates. @@ -5009,10 +5372,8 @@ bool TGlslangToSpvTraverser::originalParam(glslang::TStorageQualifier qualifier, return true; if (glslangIntermediate->getSource() == glslang::EShSourceHlsl) return paramType.getBasicType() == glslang::EbtBlock; - return paramType.containsOpaque() || // sampler, etc. -#ifndef GLSLANG_WEB + return (paramType.containsOpaque() && !glslangIntermediate->getBindlessMode()) || // sampler, etc. paramType.getQualifier().isSpirvByReference() || // spirv_by_reference -#endif (paramType.getBasicType() == glslang::EbtBlock && qualifier == glslang::EvqBuffer); // SSBO } @@ -5060,6 +5421,7 @@ void TGlslangToSpvTraverser::makeFunctions(const glslang::TIntermSequence& glslF // GLSL has copy-in/copy-out semantics. They can be handled though with a pointer to a copy. std::vector paramTypes; + std::vector paramNames; std::vector> paramDecorations; // list of decorations per parameter glslang::TIntermSequence& parameters = glslFunction->getSequence()[0]->getAsAggregate()->getSequence(); @@ -5084,11 +5446,15 @@ void TGlslangToSpvTraverser::makeFunctions(const glslang::TIntermSequence& glslF paramTypes.push_back(typeId); } + for (auto const parameter:parameters) { + paramNames.push_back(parameter->getAsSymbolNode()->getName().c_str()); + } + spv::Block* functionBlock; - spv::Function *function = builder.makeFunctionEntry(TranslatePrecisionDecoration(glslFunction->getType()), - convertGlslangToSpvType(glslFunction->getType()), - glslFunction->getName().c_str(), paramTypes, - paramDecorations, &functionBlock); + spv::Function* function = builder.makeFunctionEntry( + TranslatePrecisionDecoration(glslFunction->getType()), convertGlslangToSpvType(glslFunction->getType()), + glslFunction->getName().c_str(), convertGlslangLinkageToSpv(glslFunction->getLinkType()), paramTypes, + paramNames, paramDecorations, &functionBlock); if (implicitThis) function->setImplicitThis(); @@ -5151,6 +5517,10 @@ void TGlslangToSpvTraverser::collectRayTracingLinkerObjects() set = 1; break; + case glslang::EvqHitObjectAttrNV: + set = 2; + break; + default: set = -1; } @@ -5177,6 +5547,7 @@ void TGlslangToSpvTraverser::handleFunctionEntry(const glslang::TIntermAggregate currentFunction = functionMap[node->getName().c_str()]; spv::Block* functionBlock = currentFunction->getEntryBlock(); builder.setBuildPoint(functionBlock); + builder.enterFunction(currentFunction); } void TGlslangToSpvTraverser::translateArguments(const glslang::TIntermAggregate& node, std::vector& arguments, @@ -5186,23 +5557,18 @@ void TGlslangToSpvTraverser::translateArguments(const glslang::TIntermAggregate& glslang::TSampler sampler = {}; bool cubeCompare = false; -#ifndef GLSLANG_WEB bool f16ShadowCompare = false; -#endif if (node.isTexture() || node.isImage()) { sampler = glslangArguments[0]->getAsTyped()->getType().getSampler(); cubeCompare = sampler.dim == glslang::EsdCube && sampler.arrayed && sampler.shadow; -#ifndef GLSLANG_WEB f16ShadowCompare = sampler.shadow && glslangArguments[1]->getAsTyped()->getType().getBasicType() == glslang::EbtFloat16; -#endif } for (int i = 0; i < (int)glslangArguments.size(); ++i) { builder.clearAccessChain(); glslangArguments[i]->traverse(this); -#ifndef GLSLANG_WEB // Special case l-value operands bool lvalue = false; switch (node.getOp()) { @@ -5298,6 +5664,10 @@ void TGlslangToSpvTraverser::translateArguments(const glslang::TIntermAggregate& if (i == 7) lvalue = true; break; + case glslang::EOpRayQueryGetIntersectionTriangleVertexPositionsEXT: + if (i == 2) + lvalue = true; + break; default: break; } @@ -5309,7 +5679,6 @@ void TGlslangToSpvTraverser::translateArguments(const glslang::TIntermAggregate& builder.addDecoration(lvalue_id, TranslateNonUniformDecoration(lvalueCoherentFlags)); lvalueCoherentFlags |= TranslateCoherent(glslangArguments[i]->getAsTyped()->getType()); } else -#endif arguments.push_back(accessChainLoad(glslangArguments[i]->getAsTyped()->getType())); } } @@ -5334,13 +5703,9 @@ spv::Id TGlslangToSpvTraverser::createImageTextureFunctionCall(glslang::TIntermO ? node->getAsAggregate()->getSequence()[0]->getAsTyped()->getType() : node->getAsUnaryNode()->getOperand()->getAsTyped()->getType(); const glslang::TSampler sampler = imageType.getSampler(); -#ifdef GLSLANG_WEB - const bool f16ShadowCompare = false; -#else bool f16ShadowCompare = (sampler.shadow && node->getAsAggregate()) ? node->getAsAggregate()->getSequence()[1]->getAsTyped()->getType().getBasicType() == glslang::EbtFloat16 : false; -#endif const auto signExtensionMask = [&]() { if (builder.getSpvVersion() >= spv::Spv_1_4) { @@ -5386,7 +5751,6 @@ spv::Id TGlslangToSpvTraverser::createImageTextureFunctionCall(glslang::TIntermO return builder.createTextureQueryCall(spv::OpImageQuerySizeLod, params, isUnsignedResult); } else return builder.createTextureQueryCall(spv::OpImageQuerySize, params, isUnsignedResult); -#ifndef GLSLANG_WEB case glslang::EOpImageQuerySamples: case glslang::EOpTextureQuerySamples: return builder.createTextureQueryCall(spv::OpImageQuerySamples, params, isUnsignedResult); @@ -5397,7 +5761,6 @@ spv::Id TGlslangToSpvTraverser::createImageTextureFunctionCall(glslang::TIntermO return builder.createTextureQueryCall(spv::OpImageQueryLevels, params, isUnsignedResult); case glslang::EOpSparseTexelsResident: return builder.createUnaryOp(spv::OpImageSparseTexelsResident, builder.makeBoolType(), arguments[0]); -#endif default: assert(0); break; @@ -5457,6 +5820,17 @@ spv::Id TGlslangToSpvTraverser::createImageTextureFunctionCall(glslang::TIntermO return result; } + if (cracked.attachmentEXT) { + if (opIt != arguments.end()) { + spv::IdImmediate sample = { true, *opIt }; + operands.push_back(sample); + } + spv::Id result = builder.createOp(spv::OpColorAttachmentReadEXT, resultType(), operands); + builder.addExtension(spv::E_SPV_EXT_shader_tile_image); + builder.setPrecision(result, precision); + return result; + } + spv::IdImmediate coord = { true, *(opIt++) }; operands.push_back(coord); if (node->getOp() == glslang::EOpImageLoad || node->getOp() == glslang::EOpImageLoadLod) { @@ -5628,7 +6002,6 @@ spv::Id TGlslangToSpvTraverser::createImageTextureFunctionCall(glslang::TIntermO } } -#ifndef GLSLANG_WEB // Check for fragment mask functions other than queries if (cracked.fragMask) { assert(sampler.ms); @@ -5662,7 +6035,6 @@ spv::Id TGlslangToSpvTraverser::createImageTextureFunctionCall(glslang::TIntermO builder.addCapability(spv::CapabilityFragmentMaskAMD); return builder.createOp(fragMaskOp, resultType(), operands); } -#endif // Check for texture functions other than queries bool sparse = node->isSparseTexture(); @@ -5696,7 +6068,6 @@ spv::Id TGlslangToSpvTraverser::createImageTextureFunctionCall(glslang::TIntermO bias = true; } -#ifndef GLSLANG_WEB if (cracked.gather) { const auto& sourceExtensions = glslangIntermediate->getRequestedExtensions(); if (bias || cracked.lod || @@ -5705,7 +6076,6 @@ spv::Id TGlslangToSpvTraverser::createImageTextureFunctionCall(glslang::TIntermO builder.addCapability(spv::CapabilityImageGatherBiasLodAMD); } } -#endif // set the rest of the arguments @@ -5765,7 +6135,6 @@ spv::Id TGlslangToSpvTraverser::createImageTextureFunctionCall(glslang::TIntermO ++extraArgs; } -#ifndef GLSLANG_WEB // lod clamp if (cracked.lodClamp) { params.lodClamp = arguments[2 + extraArgs]; @@ -5794,14 +6163,13 @@ spv::Id TGlslangToSpvTraverser::createImageTextureFunctionCall(glslang::TIntermO resultStruct = arguments[4 + extraArgs]; extraArgs += 3; } -#endif + // bias if (bias) { params.bias = arguments[2 + extraArgs]; ++extraArgs; } -#ifndef GLSLANG_WEB if (imageFootprint) { builder.addExtension(spv::E_SPV_NV_shader_image_footprint); builder.addCapability(spv::CapabilityImageFootprintNV); @@ -5827,10 +6195,10 @@ spv::Id TGlslangToSpvTraverser::createImageTextureFunctionCall(glslang::TIntermO assert(builder.isStructType(resultStructType)); //resType (SPIR-V type) contains 6 elements: - //Member 0 must be a Boolean type scalar(LOD), - //Member 1 must be a vector of integer type, whose Signedness operand is 0(anchor), - //Member 2 must be a vector of integer type, whose Signedness operand is 0(offset), - //Member 3 must be a vector of integer type, whose Signedness operand is 0(mask), + //Member 0 must be a Boolean type scalar(LOD), + //Member 1 must be a vector of integer type, whose Signedness operand is 0(anchor), + //Member 2 must be a vector of integer type, whose Signedness operand is 0(offset), + //Member 3 must be a vector of integer type, whose Signedness operand is 0(mask), //Member 4 must be a scalar of integer type, whose Signedness operand is 0(lod), //Member 5 must be a scalar of integer type, whose Signedness operand is 0(granularity). std::vector members; @@ -5843,7 +6211,7 @@ spv::Id TGlslangToSpvTraverser::createImageTextureFunctionCall(glslang::TIntermO //call ImageFootprintNV spv::Id res = builder.createTextureCall(precision, resType, sparse, cracked.fetch, cracked.proj, cracked.gather, noImplicitLod, params, signExtensionMask()); - + //copy resType (SPIR-V type) to resultStructType(OpenGL type) for (int i = 0; i < 5; i++) { builder.clearAccessChain(); @@ -5859,7 +6227,6 @@ spv::Id TGlslangToSpvTraverser::createImageTextureFunctionCall(glslang::TIntermO } return builder.createCompositeExtract(res, resultType(), 0); } -#endif // projective component (might not to move) // GLSL: "The texture coordinates consumed from P, not including the last component of P, @@ -5884,7 +6251,6 @@ spv::Id TGlslangToSpvTraverser::createImageTextureFunctionCall(glslang::TIntermO } } -#ifndef GLSLANG_WEB // nonprivate if (imageType.getQualifier().nonprivate) { params.nonprivate = true; @@ -5894,9 +6260,8 @@ spv::Id TGlslangToSpvTraverser::createImageTextureFunctionCall(glslang::TIntermO if (imageType.getQualifier().volatil) { params.volatil = true; } -#endif - std::vector result( 1, + std::vector result( 1, builder.createTextureCall(precision, resultType(), sparse, cracked.fetch, cracked.proj, cracked.gather, noImplicitLod, params, signExtensionMask()) ); @@ -6548,7 +6913,6 @@ spv::Id TGlslangToSpvTraverser::createUnaryOperation(glslang::TOperator op, OpDe case glslang::EOpUnpackHalf2x16: libCall = spv::GLSLstd450UnpackHalf2x16; break; -#ifndef GLSLANG_WEB case glslang::EOpPackSnorm4x8: libCall = spv::GLSLstd450PackSnorm4x8; break; @@ -6567,7 +6931,6 @@ spv::Id TGlslangToSpvTraverser::createUnaryOperation(glslang::TOperator op, OpDe case glslang::EOpUnpackDouble2x32: libCall = spv::GLSLstd450UnpackDouble2x32; break; -#endif case glslang::EOpPackInt2x32: case glslang::EOpUnpackInt2x32: @@ -6622,7 +6985,6 @@ spv::Id TGlslangToSpvTraverser::createUnaryOperation(glslang::TOperator op, OpDe libCall = spv::GLSLstd450SSign; break; -#ifndef GLSLANG_WEB case glslang::EOpDPdxFine: unaryOp = spv::OpDPdxFine; break; @@ -6794,12 +7156,108 @@ spv::Id TGlslangToSpvTraverser::createUnaryOperation(glslang::TOperator op, OpDe case glslang::EOpConvUvec2ToAccStruct: unaryOp = spv::OpConvertUToAccelerationStructureKHR; break; -#endif + + case glslang::EOpHitObjectIsEmptyNV: + unaryOp = spv::OpHitObjectIsEmptyNV; + break; + + case glslang::EOpHitObjectIsMissNV: + unaryOp = spv::OpHitObjectIsMissNV; + break; + + case glslang::EOpHitObjectIsHitNV: + unaryOp = spv::OpHitObjectIsHitNV; + break; + + case glslang::EOpHitObjectGetObjectRayOriginNV: + unaryOp = spv::OpHitObjectGetObjectRayOriginNV; + break; + + case glslang::EOpHitObjectGetObjectRayDirectionNV: + unaryOp = spv::OpHitObjectGetObjectRayDirectionNV; + break; + + case glslang::EOpHitObjectGetWorldRayOriginNV: + unaryOp = spv::OpHitObjectGetWorldRayOriginNV; + break; + + case glslang::EOpHitObjectGetWorldRayDirectionNV: + unaryOp = spv::OpHitObjectGetWorldRayDirectionNV; + break; + + case glslang::EOpHitObjectGetObjectToWorldNV: + unaryOp = spv::OpHitObjectGetObjectToWorldNV; + break; + + case glslang::EOpHitObjectGetWorldToObjectNV: + unaryOp = spv::OpHitObjectGetWorldToObjectNV; + break; + + case glslang::EOpHitObjectGetRayTMinNV: + unaryOp = spv::OpHitObjectGetRayTMinNV; + break; + + case glslang::EOpHitObjectGetRayTMaxNV: + unaryOp = spv::OpHitObjectGetRayTMaxNV; + break; + + case glslang::EOpHitObjectGetPrimitiveIndexNV: + unaryOp = spv::OpHitObjectGetPrimitiveIndexNV; + break; + + case glslang::EOpHitObjectGetInstanceIdNV: + unaryOp = spv::OpHitObjectGetInstanceIdNV; + break; + + case glslang::EOpHitObjectGetInstanceCustomIndexNV: + unaryOp = spv::OpHitObjectGetInstanceCustomIndexNV; + break; + + case glslang::EOpHitObjectGetGeometryIndexNV: + unaryOp = spv::OpHitObjectGetGeometryIndexNV; + break; + + case glslang::EOpHitObjectGetHitKindNV: + unaryOp = spv::OpHitObjectGetHitKindNV; + break; + + case glslang::EOpHitObjectGetCurrentTimeNV: + unaryOp = spv::OpHitObjectGetCurrentTimeNV; + break; + + case glslang::EOpHitObjectGetShaderBindingTableRecordIndexNV: + unaryOp = spv::OpHitObjectGetShaderBindingTableRecordIndexNV; + break; + + case glslang::EOpHitObjectGetShaderRecordBufferHandleNV: + unaryOp = spv::OpHitObjectGetShaderRecordBufferHandleNV; + break; + + case glslang::EOpFetchMicroTriangleVertexPositionNV: + unaryOp = spv::OpFetchMicroTriangleVertexPositionNV; + break; + + case glslang::EOpFetchMicroTriangleVertexBarycentricNV: + unaryOp = spv::OpFetchMicroTriangleVertexBarycentricNV; + break; case glslang::EOpCopyObject: unaryOp = spv::OpCopyObject; break; + case glslang::EOpDepthAttachmentReadEXT: + builder.addExtension(spv::E_SPV_EXT_shader_tile_image); + builder.addCapability(spv::CapabilityTileImageDepthReadAccessEXT); + unaryOp = spv::OpDepthAttachmentReadEXT; + decorations.precision = spv::NoPrecision; + break; + case glslang::EOpStencilAttachmentReadEXT: + builder.addExtension(spv::E_SPV_EXT_shader_tile_image); + builder.addCapability(spv::CapabilityTileImageStencilReadAccessEXT); + unaryOp = spv::OpStencilAttachmentReadEXT; + decorations.precision = spv::DecorationRelaxedPrecision; + break; + default: return 0; } @@ -6856,7 +7314,9 @@ spv::Id TGlslangToSpvTraverser::createUnaryMatrixOperation(spv::Op op, OpDecorat // For converting integers where both the bitwidth and the signedness could // change, but only do the width change here. The caller is still responsible // for the signedness conversion. -spv::Id TGlslangToSpvTraverser::createIntWidthConversion(glslang::TOperator op, spv::Id operand, int vectorSize) +// destType is the final type that will be converted to, but this function +// may only be doing part of that conversion. +spv::Id TGlslangToSpvTraverser::createIntWidthConversion(glslang::TOperator op, spv::Id operand, int vectorSize, spv::Id destType) { // Get the result type width, based on the type to convert to. int width = 32; @@ -6927,6 +7387,11 @@ spv::Id TGlslangToSpvTraverser::createIntWidthConversion(glslang::TOperator op, if (vectorSize > 0) type = builder.makeVectorType(type, vectorSize); + else if (builder.getOpCode(destType) == spv::OpTypeCooperativeMatrixKHR || + builder.getOpCode(destType) == spv::OpTypeCooperativeMatrixNV) { + + type = builder.makeCooperativeMatrixTypeWithSameShape(type, destType); + } return builder.createUnaryOp(convOp, type, operand); } @@ -6958,13 +7423,10 @@ spv::Id TGlslangToSpvTraverser::createConversion(glslang::TOperator op, OpDecora case glslang::EOpConvBoolToInt: case glslang::EOpConvBoolToInt64: -#ifndef GLSLANG_WEB if (op == glslang::EOpConvBoolToInt64) { zero = builder.makeInt64Constant(0); one = builder.makeInt64Constant(1); - } else -#endif - { + } else { zero = builder.makeIntConstant(0); one = builder.makeIntConstant(1); } @@ -6974,13 +7436,10 @@ spv::Id TGlslangToSpvTraverser::createConversion(glslang::TOperator op, OpDecora case glslang::EOpConvBoolToUint: case glslang::EOpConvBoolToUint64: -#ifndef GLSLANG_WEB if (op == glslang::EOpConvBoolToUint64) { zero = builder.makeUint64Constant(0); one = builder.makeUint64Constant(1); - } else -#endif - { + } else { zero = builder.makeUintConstant(0); one = builder.makeUintConstant(1); } @@ -7043,16 +7502,13 @@ spv::Id TGlslangToSpvTraverser::createConversion(glslang::TOperator op, OpDecora case glslang::EOpConvInt64ToUint64: if (builder.isInSpecConstCodeGenMode()) { // Build zero scalar or vector for OpIAdd. -#ifndef GLSLANG_WEB if(op == glslang::EOpConvUint8ToInt8 || op == glslang::EOpConvInt8ToUint8) { zero = builder.makeUint8Constant(0); } else if (op == glslang::EOpConvUint16ToInt16 || op == glslang::EOpConvInt16ToUint16) { zero = builder.makeUint16Constant(0); } else if (op == glslang::EOpConvUint64ToInt64 || op == glslang::EOpConvInt64ToUint64) { zero = builder.makeUint64Constant(0); - } else -#endif - { + } else { zero = builder.makeUintConstant(0); } zero = makeSmearedConstant(zero, vectorSize); @@ -7079,7 +7535,6 @@ spv::Id TGlslangToSpvTraverser::createConversion(glslang::TOperator op, OpDecora convOp = spv::OpConvertFToU; break; -#ifndef GLSLANG_WEB case glslang::EOpConvInt8ToBool: case glslang::EOpConvUint8ToBool: zero = builder.makeUint8Constant(0); @@ -7199,7 +7654,7 @@ spv::Id TGlslangToSpvTraverser::createConversion(glslang::TOperator op, OpDecora case glslang::EOpConvUint64ToInt16: case glslang::EOpConvUint64ToInt: // OpSConvert/OpUConvert + OpBitCast - operand = createIntWidthConversion(op, operand, vectorSize); + operand = createIntWidthConversion(op, operand, vectorSize, destType); if (builder.isInSpecConstCodeGenMode()) { // Build zero scalar or vector for OpIAdd. @@ -7258,7 +7713,6 @@ spv::Id TGlslangToSpvTraverser::createConversion(glslang::TOperator op, OpDecora case glslang::EOpConvUvec2ToPtr: convOp = spv::OpBitcast; break; -#endif default: break; @@ -7419,7 +7873,7 @@ spv::Id TGlslangToSpvTraverser::createAtomicOperation(glslang::TOperator op, spv } else { scopeId = builder.makeUintConstant(spv::ScopeDevice); } - // semantics default to relaxed + // semantics default to relaxed spv::Id semanticsId = builder.makeUintConstant(lvalueCoherentFlags.isVolatile() && glslangIntermediate->usingVulkanMemoryModel() ? spv::MemorySemanticsVolatileMask : @@ -8250,7 +8704,6 @@ spv::Id TGlslangToSpvTraverser::createMiscOperation(glslang::TOperator op, spv:: } break; -#ifndef GLSLANG_WEB case glslang::EOpInterpolateAtSample: if (typeProxy == glslang::EbtFloat16) builder.addExtension(spv::E_SPV_AMD_gpu_shader_half_float); @@ -8523,10 +8976,166 @@ spv::Id TGlslangToSpvTraverser::createMiscOperation(glslang::TOperator op, spv:: case glslang::EOpWritePackedPrimitiveIndices4x8NV: builder.createNoResultOp(spv::OpWritePackedPrimitiveIndices4x8NV, operands); return 0; - case glslang::EOpCooperativeMatrixMulAdd: + case glslang::EOpEmitMeshTasksEXT: + if (taskPayloadID) + operands.push_back(taskPayloadID); + // As per SPV_EXT_mesh_shader make it a terminating instruction in the current block + builder.makeStatementTerminator(spv::OpEmitMeshTasksEXT, operands, "post-OpEmitMeshTasksEXT"); + return 0; + case glslang::EOpSetMeshOutputsEXT: + builder.createNoResultOp(spv::OpSetMeshOutputsEXT, operands); + return 0; + case glslang::EOpCooperativeMatrixMulAddNV: opCode = spv::OpCooperativeMatrixMulAddNV; break; -#endif // GLSLANG_WEB + case glslang::EOpHitObjectTraceRayNV: + builder.createNoResultOp(spv::OpHitObjectTraceRayNV, operands); + return 0; + case glslang::EOpHitObjectTraceRayMotionNV: + builder.createNoResultOp(spv::OpHitObjectTraceRayMotionNV, operands); + return 0; + case glslang::EOpHitObjectRecordHitNV: + builder.createNoResultOp(spv::OpHitObjectRecordHitNV, operands); + return 0; + case glslang::EOpHitObjectRecordHitMotionNV: + builder.createNoResultOp(spv::OpHitObjectRecordHitMotionNV, operands); + return 0; + case glslang::EOpHitObjectRecordHitWithIndexNV: + builder.createNoResultOp(spv::OpHitObjectRecordHitWithIndexNV, operands); + return 0; + case glslang::EOpHitObjectRecordHitWithIndexMotionNV: + builder.createNoResultOp(spv::OpHitObjectRecordHitWithIndexMotionNV, operands); + return 0; + case glslang::EOpHitObjectRecordMissNV: + builder.createNoResultOp(spv::OpHitObjectRecordMissNV, operands); + return 0; + case glslang::EOpHitObjectRecordMissMotionNV: + builder.createNoResultOp(spv::OpHitObjectRecordMissMotionNV, operands); + return 0; + case glslang::EOpHitObjectExecuteShaderNV: + builder.createNoResultOp(spv::OpHitObjectExecuteShaderNV, operands); + return 0; + case glslang::EOpHitObjectIsEmptyNV: + typeId = builder.makeBoolType(); + opCode = spv::OpHitObjectIsEmptyNV; + break; + case glslang::EOpHitObjectIsMissNV: + typeId = builder.makeBoolType(); + opCode = spv::OpHitObjectIsMissNV; + break; + case glslang::EOpHitObjectIsHitNV: + typeId = builder.makeBoolType(); + opCode = spv::OpHitObjectIsHitNV; + break; + case glslang::EOpHitObjectGetRayTMinNV: + typeId = builder.makeFloatType(32); + opCode = spv::OpHitObjectGetRayTMinNV; + break; + case glslang::EOpHitObjectGetRayTMaxNV: + typeId = builder.makeFloatType(32); + opCode = spv::OpHitObjectGetRayTMaxNV; + break; + case glslang::EOpHitObjectGetObjectRayOriginNV: + typeId = builder.makeVectorType(builder.makeFloatType(32), 3); + opCode = spv::OpHitObjectGetObjectRayOriginNV; + break; + case glslang::EOpHitObjectGetObjectRayDirectionNV: + typeId = builder.makeVectorType(builder.makeFloatType(32), 3); + opCode = spv::OpHitObjectGetObjectRayDirectionNV; + break; + case glslang::EOpHitObjectGetWorldRayOriginNV: + typeId = builder.makeVectorType(builder.makeFloatType(32), 3); + opCode = spv::OpHitObjectGetWorldRayOriginNV; + break; + case glslang::EOpHitObjectGetWorldRayDirectionNV: + typeId = builder.makeVectorType(builder.makeFloatType(32), 3); + opCode = spv::OpHitObjectGetWorldRayDirectionNV; + break; + case glslang::EOpHitObjectGetWorldToObjectNV: + typeId = builder.makeMatrixType(builder.makeFloatType(32), 4, 3); + opCode = spv::OpHitObjectGetWorldToObjectNV; + break; + case glslang::EOpHitObjectGetObjectToWorldNV: + typeId = builder.makeMatrixType(builder.makeFloatType(32), 4, 3); + opCode = spv::OpHitObjectGetObjectToWorldNV; + break; + case glslang::EOpHitObjectGetInstanceCustomIndexNV: + typeId = builder.makeIntegerType(32, 1); + opCode = spv::OpHitObjectGetInstanceCustomIndexNV; + break; + case glslang::EOpHitObjectGetInstanceIdNV: + typeId = builder.makeIntegerType(32, 1); + opCode = spv::OpHitObjectGetInstanceIdNV; + break; + case glslang::EOpHitObjectGetGeometryIndexNV: + typeId = builder.makeIntegerType(32, 1); + opCode = spv::OpHitObjectGetGeometryIndexNV; + break; + case glslang::EOpHitObjectGetPrimitiveIndexNV: + typeId = builder.makeIntegerType(32, 1); + opCode = spv::OpHitObjectGetPrimitiveIndexNV; + break; + case glslang::EOpHitObjectGetHitKindNV: + typeId = builder.makeIntegerType(32, 0); + opCode = spv::OpHitObjectGetHitKindNV; + break; + case glslang::EOpHitObjectGetCurrentTimeNV: + typeId = builder.makeFloatType(32); + opCode = spv::OpHitObjectGetCurrentTimeNV; + break; + case glslang::EOpHitObjectGetShaderBindingTableRecordIndexNV: + typeId = builder.makeIntegerType(32, 0); + opCode = spv::OpHitObjectGetShaderBindingTableRecordIndexNV; + return 0; + case glslang::EOpHitObjectGetAttributesNV: + builder.createNoResultOp(spv::OpHitObjectGetAttributesNV, operands); + return 0; + case glslang::EOpHitObjectGetShaderRecordBufferHandleNV: + typeId = builder.makeVectorType(builder.makeUintType(32), 2); + opCode = spv::OpHitObjectGetShaderRecordBufferHandleNV; + break; + case glslang::EOpReorderThreadNV: { + if (operands.size() == 2) { + builder.createNoResultOp(spv::OpReorderThreadWithHintNV, operands); + } else { + builder.createNoResultOp(spv::OpReorderThreadWithHitObjectNV, operands); + } + return 0; + + } + + case glslang::EOpImageSampleWeightedQCOM: + typeId = builder.makeVectorType(builder.makeFloatType(32), 4); + opCode = spv::OpImageSampleWeightedQCOM; + addImageProcessingQCOMDecoration(operands[2], spv::DecorationWeightTextureQCOM); + break; + case glslang::EOpImageBoxFilterQCOM: + typeId = builder.makeVectorType(builder.makeFloatType(32), 4); + opCode = spv::OpImageBoxFilterQCOM; + break; + case glslang::EOpImageBlockMatchSADQCOM: + typeId = builder.makeVectorType(builder.makeFloatType(32), 4); + opCode = spv::OpImageBlockMatchSADQCOM; + addImageProcessingQCOMDecoration(operands[0], spv::DecorationBlockMatchTextureQCOM); + addImageProcessingQCOMDecoration(operands[2], spv::DecorationBlockMatchTextureQCOM); + break; + case glslang::EOpImageBlockMatchSSDQCOM: + typeId = builder.makeVectorType(builder.makeFloatType(32), 4); + opCode = spv::OpImageBlockMatchSSDQCOM; + addImageProcessingQCOMDecoration(operands[0], spv::DecorationBlockMatchTextureQCOM); + addImageProcessingQCOMDecoration(operands[2], spv::DecorationBlockMatchTextureQCOM); + break; + + case glslang::EOpFetchMicroTriangleVertexBarycentricNV: + typeId = builder.makeVectorType(builder.makeFloatType(32), 2); + opCode = spv::OpFetchMicroTriangleVertexBarycentricNV; + break; + + case glslang::EOpFetchMicroTriangleVertexPositionNV: + typeId = builder.makeVectorType(builder.makeFloatType(32), 3); + opCode = spv::OpFetchMicroTriangleVertexPositionNV; + break; + default: return 0; } @@ -8570,7 +9179,6 @@ spv::Id TGlslangToSpvTraverser::createMiscOperation(glslang::TOperator op, spv:: } } -#ifndef GLSLANG_WEB // Decode the return types that were structures switch (op) { case glslang::EOpAddCarry: @@ -8600,7 +9208,6 @@ spv::Id TGlslangToSpvTraverser::createMiscOperation(glslang::TOperator op, spv:: default: break; } -#endif return builder.setPrecision(id, precision); } @@ -8645,7 +9252,6 @@ spv::Id TGlslangToSpvTraverser::createNoArgOperation(glslang::TOperator op, spv: builder.createMemoryBarrier(spv::ScopeWorkgroup, spv::MemorySemanticsAllMemory | spv::MemorySemanticsAcquireReleaseMask); return 0; -#ifndef GLSLANG_WEB case glslang::EOpMemoryBarrierAtomicCounter: builder.createMemoryBarrier(memoryBarrierScope, spv::MemorySemanticsAtomicCounterMemoryMask | spv::MemorySemanticsAcquireReleaseMask); @@ -8764,7 +9370,30 @@ spv::Id TGlslangToSpvTraverser::createNoArgOperation(glslang::TOperator op, spv: builder.addCapability(spv::CapabilityShaderClockKHR); return builder.createOp(spv::OpReadClockKHR, typeId, args); } -#endif + case glslang::EOpStencilAttachmentReadEXT: + case glslang::EOpDepthAttachmentReadEXT: + { + builder.addExtension(spv::E_SPV_EXT_shader_tile_image); + + spv::Decoration precision; + spv::Op spv_op; + if (op == glslang::EOpStencilAttachmentReadEXT) + { + precision = spv::DecorationRelaxedPrecision; + spv_op = spv::OpStencilAttachmentReadEXT; + builder.addCapability(spv::CapabilityTileImageStencilReadAccessEXT); + } + else + { + precision = spv::NoPrecision; + spv_op = spv::OpDepthAttachmentReadEXT; + builder.addCapability(spv::CapabilityTileImageDepthReadAccessEXT); + } + + std::vector args; // Dummy args + spv::Id result = builder.createOp(spv_op, typeId, args); + return builder.setPrecision(result, precision); + } default: break; } @@ -8820,13 +9449,11 @@ spv::Id TGlslangToSpvTraverser::getSymbolId(const glslang::TIntermSymbol* symbol builder.addDecoration(id, TranslatePrecisionDecoration(symbol->getType())); builder.addDecoration(id, TranslateInterpolationDecoration(symbol->getType().getQualifier())); builder.addDecoration(id, TranslateAuxiliaryStorageDecoration(symbol->getType().getQualifier())); -#ifndef GLSLANG_WEB addMeshNVDecoration(id, /*member*/ -1, symbol->getType().getQualifier()); if (symbol->getQualifier().hasComponent()) builder.addDecoration(id, spv::DecorationComponent, symbol->getQualifier().layoutComponent); if (symbol->getQualifier().hasIndex()) builder.addDecoration(id, spv::DecorationIndex, symbol->getQualifier().layoutIndex); -#endif if (symbol->getType().getQualifier().hasSpecConstantId()) builder.addDecoration(id, spv::DecorationSpecId, symbol->getType().getQualifier().layoutSpecConstantId); // atomic counters use this: @@ -8835,13 +9462,17 @@ spv::Id TGlslangToSpvTraverser::getSymbolId(const glslang::TIntermSymbol* symbol } if (symbol->getQualifier().hasLocation()) { - if (!(glslangIntermediate->isRayTracingStage() && glslangIntermediate->IsRequestedExtension(glslang::E_GL_EXT_ray_tracing) + if (!(glslangIntermediate->isRayTracingStage() && + (glslangIntermediate->IsRequestedExtension(glslang::E_GL_EXT_ray_tracing) || + glslangIntermediate->IsRequestedExtension(glslang::E_GL_NV_shader_invocation_reorder)) && (builder.getStorageClass(id) == spv::StorageClassRayPayloadKHR || builder.getStorageClass(id) == spv::StorageClassIncomingRayPayloadKHR || builder.getStorageClass(id) == spv::StorageClassCallableDataKHR || - builder.getStorageClass(id) == spv::StorageClassIncomingCallableDataKHR))) { - // Location values are used to link TraceRayKHR and ExecuteCallableKHR to corresponding variables - // but are not valid in SPIRV since they are supported only for Input/Output Storage classes. + builder.getStorageClass(id) == spv::StorageClassIncomingCallableDataKHR || + builder.getStorageClass(id) == spv::StorageClassHitObjectAttributeNV))) { + // Location values are used to link TraceRayKHR/ExecuteCallableKHR/HitObjectGetAttributesNV + // to corresponding variables but are not valid in SPIRV since they are supported only + // for Input/Output Storage classes. builder.addDecoration(id, spv::DecorationLocation, symbol->getQualifier().layoutLocation); } } @@ -8887,11 +9518,11 @@ spv::Id TGlslangToSpvTraverser::getSymbolId(const glslang::TIntermSymbol* symbol // Add volatile decoration to HelperInvocation for spirv1.6 and beyond if (builtIn == spv::BuiltInHelperInvocation && + !glslangIntermediate->usingVulkanMemoryModel() && glslangIntermediate->getSpv().spv >= glslang::EShTargetSpv_1_6) { builder.addDecoration(id, spv::DecorationVolatile); } -#ifndef GLSLANG_WEB // Subgroup builtins which have input storage class are volatile for ray tracing stages. if (symbol->getType().isImage() || symbol->getQualifier().isPipeInput()) { std::vector memory; @@ -8979,10 +9610,10 @@ spv::Id TGlslangToSpvTraverser::getSymbolId(const glslang::TIntermSymbol* symbol std::vector operandIds; assert(!decorateId.second.empty()); for (auto extraOperand : decorateId.second) { - if (extraOperand->getQualifier().isSpecConstant()) - operandIds.push_back(getSymbolId(extraOperand->getAsSymbolNode())); - else + if (extraOperand->getQualifier().isFrontEndConstant()) operandIds.push_back(createSpvConstant(*extraOperand)); + else + operandIds.push_back(getSymbolId(extraOperand->getAsSymbolNode())); } builder.addDecorationId(id, static_cast(decorateId.first), operandIds); } @@ -8998,22 +9629,28 @@ spv::Id TGlslangToSpvTraverser::getSymbolId(const glslang::TIntermSymbol* symbol builder.addDecoration(id, static_cast(decorateString.first), strings); } } -#endif return id; } -#ifndef GLSLANG_WEB // add per-primitive, per-view. per-task decorations to a struct member (member >= 0) or an object void TGlslangToSpvTraverser::addMeshNVDecoration(spv::Id id, int member, const glslang::TQualifier& qualifier) { + bool isMeshShaderExt = (glslangIntermediate->getRequestedExtensions().find(glslang::E_GL_EXT_mesh_shader) != + glslangIntermediate->getRequestedExtensions().end()); + if (member >= 0) { if (qualifier.perPrimitiveNV) { // Need to add capability/extension for fragment shader. // Mesh shader already adds this by default. if (glslangIntermediate->getStage() == EShLangFragment) { - builder.addCapability(spv::CapabilityMeshShadingNV); - builder.addExtension(spv::E_SPV_NV_mesh_shader); + if(isMeshShaderExt) { + builder.addCapability(spv::CapabilityMeshShadingEXT); + builder.addExtension(spv::E_SPV_EXT_mesh_shader); + } else { + builder.addCapability(spv::CapabilityMeshShadingNV); + builder.addExtension(spv::E_SPV_NV_mesh_shader); + } } builder.addMemberDecoration(id, (unsigned)member, spv::DecorationPerPrimitiveNV); } @@ -9026,8 +9663,13 @@ void TGlslangToSpvTraverser::addMeshNVDecoration(spv::Id id, int member, const g // Need to add capability/extension for fragment shader. // Mesh shader already adds this by default. if (glslangIntermediate->getStage() == EShLangFragment) { - builder.addCapability(spv::CapabilityMeshShadingNV); - builder.addExtension(spv::E_SPV_NV_mesh_shader); + if(isMeshShaderExt) { + builder.addCapability(spv::CapabilityMeshShadingEXT); + builder.addExtension(spv::E_SPV_EXT_mesh_shader); + } else { + builder.addCapability(spv::CapabilityMeshShadingNV); + builder.addExtension(spv::E_SPV_NV_mesh_shader); + } } builder.addDecoration(id, spv::DecorationPerPrimitiveNV); } @@ -9037,7 +9679,20 @@ void TGlslangToSpvTraverser::addMeshNVDecoration(spv::Id id, int member, const g builder.addDecoration(id, spv::DecorationPerTaskNV); } } -#endif + +void TGlslangToSpvTraverser::addImageProcessingQCOMDecoration(spv::Id id, spv::Decoration decor) +{ + spv::Op opc = builder.getOpCode(id); + if (opc == spv::OpSampledImage) { + id = builder.getIdOperand(id, 0); + opc = builder.getOpCode(id); + } + + if (opc == spv::OpLoad) { + spv::Id texid = builder.getIdOperand(id, 0); + builder.addDecoration(texid, decor); + } +} // Make a full tree of instructions to build a SPIR-V specialization constant, // or regular constant if possible. @@ -9165,7 +9820,6 @@ spv::Id TGlslangToSpvTraverser::createSpvConstantFromConstUnionArray(const glsla case glslang::EbtBool: spvConsts.push_back(builder.makeBoolConstant(zero ? false : consts[nextConst].getBConst())); break; -#ifndef GLSLANG_WEB case glslang::EbtInt8: builder.addCapability(spv::CapabilityInt8); spvConsts.push_back(builder.makeInt8Constant(zero ? 0 : consts[nextConst].getI8Const())); @@ -9195,7 +9849,6 @@ spv::Id TGlslangToSpvTraverser::createSpvConstantFromConstUnionArray(const glsla builder.addCapability(spv::CapabilityFloat16); spvConsts.push_back(builder.makeFloat16Constant(zero ? 0.0F : (float)consts[nextConst].getDConst())); break; -#endif default: assert(0); break; @@ -9219,7 +9872,6 @@ spv::Id TGlslangToSpvTraverser::createSpvConstantFromConstUnionArray(const glsla case glslang::EbtBool: scalar = builder.makeBoolConstant(zero ? false : consts[nextConst].getBConst(), specConstant); break; -#ifndef GLSLANG_WEB case glslang::EbtInt8: builder.addCapability(spv::CapabilityInt8); scalar = builder.makeInt8Constant(zero ? 0 : consts[nextConst].getI8Const(), specConstant); @@ -9253,7 +9905,6 @@ spv::Id TGlslangToSpvTraverser::createSpvConstantFromConstUnionArray(const glsla scalar = builder.makeUint64Constant(zero ? 0 : consts[nextConst].getU64Const(), specConstant); scalar = builder.createUnaryOp(spv::OpBitcast, typeId, scalar); break; -#endif case glslang::EbtString: scalar = builder.getStringId(consts[nextConst].getSConst()->c_str()); break; @@ -9401,7 +10052,6 @@ spv::Id TGlslangToSpvTraverser::createShortCircuit(glslang::TOperator op, glslan return builder.createOp(spv::OpPhi, boolTypeId, phiOperands); } -#ifndef GLSLANG_WEB // Return type Id of the imported set of extended instructions corresponds to the name. // Import this set if it has not been imported yet. spv::Id TGlslangToSpvTraverser::getExtBuiltins(const char* name) @@ -9415,7 +10065,6 @@ spv::Id TGlslangToSpvTraverser::getExtBuiltins(const char* name) return extBuiltins; } } -#endif }; // end anonymous namespace @@ -9444,31 +10093,36 @@ int GetSpirvGeneratorVersion() // return 7; // GLSL volatile keyword maps to both SPIR-V decorations Volatile and Coherent // return 8; // switch to new dead block eliminator; use OpUnreachable // return 9; // don't include opaque function parameters in OpEntryPoint global's operand list - return 10; // Generate OpFUnordNotEqual for != comparisons + // return 10; // Generate OpFUnordNotEqual for != comparisons + return 11; // Make OpEmitMeshTasksEXT a terminal instruction } // Write SPIR-V out to a binary file -void OutputSpvBin(const std::vector& spirv, const char* baseName) +bool OutputSpvBin(const std::vector& spirv, const char* baseName) { std::ofstream out; out.open(baseName, std::ios::binary | std::ios::out); - if (out.fail()) + if (out.fail()) { printf("ERROR: Failed to open file: %s\n", baseName); + return false; + } for (int i = 0; i < (int)spirv.size(); ++i) { unsigned int word = spirv[i]; out.write((const char*)&word, 4); } out.close(); + return true; } // Write SPIR-V out to a text file with 32-bit hexadecimal words -void OutputSpvHex(const std::vector& spirv, const char* baseName, const char* varName) +bool OutputSpvHex(const std::vector& spirv, const char* baseName, const char* varName) { -#if !defined(GLSLANG_WEB) && !defined(GLSLANG_ANGLE) std::ofstream out; out.open(baseName, std::ios::binary | std::ios::out); - if (out.fail()) + if (out.fail()) { printf("ERROR: Failed to open file: %s\n", baseName); + return false; + } out << "\t// " << GetSpirvGeneratorVersion() << GLSLANG_VERSION_MAJOR << "." << GLSLANG_VERSION_MINOR << "." << GLSLANG_VERSION_PATCH << @@ -9494,7 +10148,7 @@ void OutputSpvHex(const std::vector& spirv, const char* baseName, out << std::endl; } out.close(); -#endif + return true; } // @@ -9511,7 +10165,7 @@ void GlslangToSpv(const TIntermediate& intermediate, std::vector& { TIntermNode* root = intermediate.getTreeRoot(); - if (root == 0) + if (root == nullptr) return; SpvOptions defaultOptions; @@ -9522,7 +10176,7 @@ void GlslangToSpv(const TIntermediate& intermediate, std::vector& TGlslangToSpvTraverser it(intermediate.getSpv().spv, &intermediate, logger, *options); root->traverse(&it); - it.finishSpv(); + it.finishSpv(options->compileOnly); it.dumpSpv(spirv); #if ENABLE_OPT diff --git a/SPIRV/GlslangToSpv.h b/SPIRV/GlslangToSpv.h index 3907be43b7..b9736d7c98 100644 --- a/SPIRV/GlslangToSpv.h +++ b/SPIRV/GlslangToSpv.h @@ -55,7 +55,7 @@ void GlslangToSpv(const glslang::TIntermediate& intermediate, std::vector& spirv, spv::SpvBuildLogger* logger, SpvOptions* options = nullptr); -void OutputSpvBin(const std::vector& spirv, const char* baseName); -void OutputSpvHex(const std::vector& spirv, const char* baseName, const char* varName); +bool OutputSpvBin(const std::vector& spirv, const char* baseName); +bool OutputSpvHex(const std::vector& spirv, const char* baseName, const char* varName); } diff --git a/SPIRV/Logger.cpp b/SPIRV/Logger.cpp index cdc8469c44..48bd4e3ade 100644 --- a/SPIRV/Logger.cpp +++ b/SPIRV/Logger.cpp @@ -32,8 +32,6 @@ // ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE // POSSIBILITY OF SUCH DAMAGE. -#ifndef GLSLANG_WEB - #include "Logger.h" #include @@ -68,5 +66,3 @@ std::string SpvBuildLogger::getAllMessages() const { } } // end spv namespace - -#endif diff --git a/SPIRV/Logger.h b/SPIRV/Logger.h index 411367c030..2e4ddaf517 100644 --- a/SPIRV/Logger.h +++ b/SPIRV/Logger.h @@ -46,14 +46,6 @@ class SpvBuildLogger { public: SpvBuildLogger() {} -#ifdef GLSLANG_WEB - void tbdFunctionality(const std::string& f) { } - void missingFunctionality(const std::string& f) { } - void warning(const std::string& w) { } - void error(const std::string& e) { errors.push_back(e); } - std::string getAllMessages() { return ""; } -#else - // Registers a TBD functionality. void tbdFunctionality(const std::string& f); // Registers a missing functionality. @@ -67,7 +59,6 @@ class SpvBuildLogger { // Returns all messages accumulated in the order of: // TBD functionalities, missing functionalities, warnings, errors. std::string getAllMessages() const; -#endif private: SpvBuildLogger(const SpvBuildLogger&); diff --git a/SPIRV/NonSemanticDebugPrintf.h b/SPIRV/NonSemanticDebugPrintf.h index 83796d75e5..3ca7247f2b 100644 --- a/SPIRV/NonSemanticDebugPrintf.h +++ b/SPIRV/NonSemanticDebugPrintf.h @@ -1,5 +1,5 @@ // Copyright (c) 2020 The Khronos Group Inc. -// +// // Permission is hereby granted, free of charge, to any person obtaining a // copy of this software and/or associated documentation files (the // "Materials"), to deal in the Materials without restriction, including @@ -7,15 +7,15 @@ // distribute, sublicense, and/or sell copies of the Materials, and to // permit persons to whom the Materials are furnished to do so, subject to // the following conditions: -// +// // The above copyright notice and this permission notice shall be included // in all copies or substantial portions of the Materials. -// +// // MODIFICATIONS TO THIS FILE MAY MEAN IT NO LONGER ACCURATELY REFLECTS // KHRONOS STANDARDS. THE UNMODIFIED, NORMATIVE VERSIONS OF KHRONOS // SPECIFICATIONS AND HEADER INFORMATION ARE LOCATED AT // https://www.khronos.org/registry/ -// +// // THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, // EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. @@ -23,7 +23,7 @@ // CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, // TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE // MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS. -// +// #ifndef SPIRV_UNIFIED1_NonSemanticDebugPrintf_H_ #define SPIRV_UNIFIED1_NonSemanticDebugPrintf_H_ diff --git a/SPIRV/NonSemanticShaderDebugInfo100.h b/SPIRV/NonSemanticShaderDebugInfo100.h new file mode 100644 index 0000000000..f74abcb646 --- /dev/null +++ b/SPIRV/NonSemanticShaderDebugInfo100.h @@ -0,0 +1,171 @@ +// Copyright (c) 2018 The Khronos Group Inc. +// +// Permission is hereby granted, free of charge, to any person obtaining a copy +// of this software and/or associated documentation files (the "Materials"), +// to deal in the Materials without restriction, including without limitation +// the rights to use, copy, modify, merge, publish, distribute, sublicense, +// and/or sell copies of the Materials, and to permit persons to whom the +// Materials are furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in +// all copies or substantial portions of the Materials. +// +// MODIFICATIONS TO THIS FILE MAY MEAN IT NO LONGER ACCURATELY REFLECTS KHRONOS +// STANDARDS. THE UNMODIFIED, NORMATIVE VERSIONS OF KHRONOS SPECIFICATIONS AND +// HEADER INFORMATION ARE LOCATED AT https://www.khronos.org/registry/ +// +// THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL +// THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +// FROM,OUT OF OR IN CONNECTION WITH THE MATERIALS OR THE USE OR OTHER DEALINGS +// IN THE MATERIALS. + +#ifndef SPIRV_UNIFIED1_NonSemanticShaderDebugInfo100_H_ +#define SPIRV_UNIFIED1_NonSemanticShaderDebugInfo100_H_ + +#ifdef __cplusplus +extern "C" { +#endif + +enum { + NonSemanticShaderDebugInfo100Version = 100, + NonSemanticShaderDebugInfo100Version_BitWidthPadding = 0x7fffffff +}; +enum { + NonSemanticShaderDebugInfo100Revision = 6, + NonSemanticShaderDebugInfo100Revision_BitWidthPadding = 0x7fffffff +}; + +enum NonSemanticShaderDebugInfo100Instructions { + NonSemanticShaderDebugInfo100DebugInfoNone = 0, + NonSemanticShaderDebugInfo100DebugCompilationUnit = 1, + NonSemanticShaderDebugInfo100DebugTypeBasic = 2, + NonSemanticShaderDebugInfo100DebugTypePointer = 3, + NonSemanticShaderDebugInfo100DebugTypeQualifier = 4, + NonSemanticShaderDebugInfo100DebugTypeArray = 5, + NonSemanticShaderDebugInfo100DebugTypeVector = 6, + NonSemanticShaderDebugInfo100DebugTypedef = 7, + NonSemanticShaderDebugInfo100DebugTypeFunction = 8, + NonSemanticShaderDebugInfo100DebugTypeEnum = 9, + NonSemanticShaderDebugInfo100DebugTypeComposite = 10, + NonSemanticShaderDebugInfo100DebugTypeMember = 11, + NonSemanticShaderDebugInfo100DebugTypeInheritance = 12, + NonSemanticShaderDebugInfo100DebugTypePtrToMember = 13, + NonSemanticShaderDebugInfo100DebugTypeTemplate = 14, + NonSemanticShaderDebugInfo100DebugTypeTemplateParameter = 15, + NonSemanticShaderDebugInfo100DebugTypeTemplateTemplateParameter = 16, + NonSemanticShaderDebugInfo100DebugTypeTemplateParameterPack = 17, + NonSemanticShaderDebugInfo100DebugGlobalVariable = 18, + NonSemanticShaderDebugInfo100DebugFunctionDeclaration = 19, + NonSemanticShaderDebugInfo100DebugFunction = 20, + NonSemanticShaderDebugInfo100DebugLexicalBlock = 21, + NonSemanticShaderDebugInfo100DebugLexicalBlockDiscriminator = 22, + NonSemanticShaderDebugInfo100DebugScope = 23, + NonSemanticShaderDebugInfo100DebugNoScope = 24, + NonSemanticShaderDebugInfo100DebugInlinedAt = 25, + NonSemanticShaderDebugInfo100DebugLocalVariable = 26, + NonSemanticShaderDebugInfo100DebugInlinedVariable = 27, + NonSemanticShaderDebugInfo100DebugDeclare = 28, + NonSemanticShaderDebugInfo100DebugValue = 29, + NonSemanticShaderDebugInfo100DebugOperation = 30, + NonSemanticShaderDebugInfo100DebugExpression = 31, + NonSemanticShaderDebugInfo100DebugMacroDef = 32, + NonSemanticShaderDebugInfo100DebugMacroUndef = 33, + NonSemanticShaderDebugInfo100DebugImportedEntity = 34, + NonSemanticShaderDebugInfo100DebugSource = 35, + NonSemanticShaderDebugInfo100DebugFunctionDefinition = 101, + NonSemanticShaderDebugInfo100DebugSourceContinued = 102, + NonSemanticShaderDebugInfo100DebugLine = 103, + NonSemanticShaderDebugInfo100DebugNoLine = 104, + NonSemanticShaderDebugInfo100DebugBuildIdentifier = 105, + NonSemanticShaderDebugInfo100DebugStoragePath = 106, + NonSemanticShaderDebugInfo100DebugEntryPoint = 107, + NonSemanticShaderDebugInfo100DebugTypeMatrix = 108, + NonSemanticShaderDebugInfo100InstructionsMax = 0x7fffffff +}; + + +enum NonSemanticShaderDebugInfo100DebugInfoFlags { + NonSemanticShaderDebugInfo100None = 0x0000, + NonSemanticShaderDebugInfo100FlagIsProtected = 0x01, + NonSemanticShaderDebugInfo100FlagIsPrivate = 0x02, + NonSemanticShaderDebugInfo100FlagIsPublic = 0x03, + NonSemanticShaderDebugInfo100FlagIsLocal = 0x04, + NonSemanticShaderDebugInfo100FlagIsDefinition = 0x08, + NonSemanticShaderDebugInfo100FlagFwdDecl = 0x10, + NonSemanticShaderDebugInfo100FlagArtificial = 0x20, + NonSemanticShaderDebugInfo100FlagExplicit = 0x40, + NonSemanticShaderDebugInfo100FlagPrototyped = 0x80, + NonSemanticShaderDebugInfo100FlagObjectPointer = 0x100, + NonSemanticShaderDebugInfo100FlagStaticMember = 0x200, + NonSemanticShaderDebugInfo100FlagIndirectVariable = 0x400, + NonSemanticShaderDebugInfo100FlagLValueReference = 0x800, + NonSemanticShaderDebugInfo100FlagRValueReference = 0x1000, + NonSemanticShaderDebugInfo100FlagIsOptimized = 0x2000, + NonSemanticShaderDebugInfo100FlagIsEnumClass = 0x4000, + NonSemanticShaderDebugInfo100FlagTypePassByValue = 0x8000, + NonSemanticShaderDebugInfo100FlagTypePassByReference = 0x10000, + NonSemanticShaderDebugInfo100FlagUnknownPhysicalLayout = 0x20000, + NonSemanticShaderDebugInfo100DebugInfoFlagsMax = 0x7fffffff +}; + +enum NonSemanticShaderDebugInfo100BuildIdentifierFlags { + NonSemanticShaderDebugInfo100IdentifierPossibleDuplicates = 0x01, + NonSemanticShaderDebugInfo100BuildIdentifierFlagsMax = 0x7fffffff +}; + +enum NonSemanticShaderDebugInfo100DebugBaseTypeAttributeEncoding { + NonSemanticShaderDebugInfo100Unspecified = 0, + NonSemanticShaderDebugInfo100Address = 1, + NonSemanticShaderDebugInfo100Boolean = 2, + NonSemanticShaderDebugInfo100Float = 3, + NonSemanticShaderDebugInfo100Signed = 4, + NonSemanticShaderDebugInfo100SignedChar = 5, + NonSemanticShaderDebugInfo100Unsigned = 6, + NonSemanticShaderDebugInfo100UnsignedChar = 7, + NonSemanticShaderDebugInfo100DebugBaseTypeAttributeEncodingMax = 0x7fffffff +}; + +enum NonSemanticShaderDebugInfo100DebugCompositeType { + NonSemanticShaderDebugInfo100Class = 0, + NonSemanticShaderDebugInfo100Structure = 1, + NonSemanticShaderDebugInfo100Union = 2, + NonSemanticShaderDebugInfo100DebugCompositeTypeMax = 0x7fffffff +}; + +enum NonSemanticShaderDebugInfo100DebugTypeQualifier { + NonSemanticShaderDebugInfo100ConstType = 0, + NonSemanticShaderDebugInfo100VolatileType = 1, + NonSemanticShaderDebugInfo100RestrictType = 2, + NonSemanticShaderDebugInfo100AtomicType = 3, + NonSemanticShaderDebugInfo100DebugTypeQualifierMax = 0x7fffffff +}; + +enum NonSemanticShaderDebugInfo100DebugOperation { + NonSemanticShaderDebugInfo100Deref = 0, + NonSemanticShaderDebugInfo100Plus = 1, + NonSemanticShaderDebugInfo100Minus = 2, + NonSemanticShaderDebugInfo100PlusUconst = 3, + NonSemanticShaderDebugInfo100BitPiece = 4, + NonSemanticShaderDebugInfo100Swap = 5, + NonSemanticShaderDebugInfo100Xderef = 6, + NonSemanticShaderDebugInfo100StackValue = 7, + NonSemanticShaderDebugInfo100Constu = 8, + NonSemanticShaderDebugInfo100Fragment = 9, + NonSemanticShaderDebugInfo100DebugOperationMax = 0x7fffffff +}; + +enum NonSemanticShaderDebugInfo100DebugImportedEntity { + NonSemanticShaderDebugInfo100ImportedModule = 0, + NonSemanticShaderDebugInfo100ImportedDeclaration = 1, + NonSemanticShaderDebugInfo100DebugImportedEntityMax = 0x7fffffff +}; + + +#ifdef __cplusplus +} +#endif + +#endif // SPIRV_UNIFIED1_NonSemanticShaderDebugInfo100_H_ diff --git a/SPIRV/SPVRemapper.cpp b/SPIRV/SPVRemapper.cpp index 6aca8cbcf0..f8f50a9516 100644 --- a/SPIRV/SPVRemapper.cpp +++ b/SPIRV/SPVRemapper.cpp @@ -36,10 +36,6 @@ #include "SPVRemapper.h" #include "doc.h" -#if !defined (use_cpp11) -// ... not supported before C++11 -#else // defined (use_cpp11) - #include #include #include "../glslang/Include/Common.h" @@ -684,6 +680,7 @@ namespace spv { case spv::OperandKernelEnqueueFlags: case spv::OperandKernelProfilingInfo: case spv::OperandCapability: + case spv::OperandCooperativeMatrixOperands: ++word; break; @@ -1528,5 +1525,3 @@ namespace spv { } // namespace SPV -#endif // defined (use_cpp11) - diff --git a/SPIRV/SPVRemapper.h b/SPIRV/SPVRemapper.h index d21694635a..42b01686ee 100644 --- a/SPIRV/SPVRemapper.h +++ b/SPIRV/SPVRemapper.h @@ -43,12 +43,6 @@ namespace spv { -// MSVC defines __cplusplus as an older value, even when it supports almost all of 11. -// We handle that here by making our own symbol. -#if __cplusplus >= 201103L || (defined(_MSC_VER) && _MSC_VER >= 1700) -# define use_cpp11 1 -#endif - class spirvbin_base_t { public: @@ -74,27 +68,6 @@ class spirvbin_base_t } // namespace SPV -#if !defined (use_cpp11) -#include -#include - -namespace spv { -class spirvbin_t : public spirvbin_base_t -{ -public: - spirvbin_t(int /*verbose = 0*/) { } - - void remap(std::vector& /*spv*/, unsigned int /*opts = 0*/) - { - printf("Tool not compiled for C++11, which is required for SPIR-V remapping.\n"); - exit(5); - } -}; - -} // namespace SPV - -#else // defined (use_cpp11) - #include #include #include @@ -308,5 +281,4 @@ class spirvbin_t : public spirvbin_base_t } // namespace SPV -#endif // defined (use_cpp11) #endif // SPIRVREMAPPER_H diff --git a/SPIRV/SpvBuilder.cpp b/SPIRV/SpvBuilder.cpp index 36a3f09744..d42f728816 100644 --- a/SPIRV/SpvBuilder.cpp +++ b/SPIRV/SpvBuilder.cpp @@ -46,10 +46,7 @@ #include #include "SpvBuilder.h" - -#ifndef GLSLANG_WEB #include "hex_float.h" -#endif #ifndef _WIN32 #include @@ -59,18 +56,21 @@ namespace spv { Builder::Builder(unsigned int spvVersion, unsigned int magicNumber, SpvBuildLogger* buildLogger) : spvVersion(spvVersion), - source(SourceLanguageUnknown), + sourceLang(SourceLanguageUnknown), sourceVersion(0), sourceFileStringId(NoResult), currentLine(0), currentFile(nullptr), + currentFileId(NoResult), + lastDebugScopeId(NoResult), emitOpLines(false), + emitNonSemanticShaderDebugInfo(false), addressModel(AddressingModelLogical), memoryModel(MemoryModelGLSL450), builderNumber(magicNumber), - buildPoint(0), + buildPoint(nullptr), uniqueId(0), - entryPointFunction(0), + entryPointFunction(nullptr), generatingOpCodeForSpecConst(false), logger(buildLogger) { @@ -98,8 +98,12 @@ void Builder::setLine(int lineNum) { if (lineNum != 0 && lineNum != currentLine) { currentLine = lineNum; - if (emitOpLines) - addLine(sourceFileStringId, currentLine, 0); + if (emitOpLines) { + if (emitNonSemanticShaderDebugInfo) + addDebugScopeAndLine(currentFileId, currentLine, 0); + else + addLine(sourceFileStringId, currentLine, 0); + } } } @@ -118,7 +122,10 @@ void Builder::setLine(int lineNum, const char* filename) currentFile = filename; if (emitOpLines) { spv::Id strId = getStringId(filename); - addLine(strId, currentLine, 0); + if (emitNonSemanticShaderDebugInfo) + addDebugScopeAndLine(strId, currentLine, 0); + else + addLine(strId, currentLine, 0); } } } @@ -132,22 +139,50 @@ void Builder::addLine(Id fileName, int lineNum, int column) buildPoint->addInstruction(std::unique_ptr(line)); } +void Builder::addDebugScopeAndLine(Id fileName, int lineNum, int column) +{ + assert(!currentDebugScopeId.empty()); + if (currentDebugScopeId.top() != lastDebugScopeId) { + spv::Id resultId = getUniqueId(); + Instruction* scopeInst = new Instruction(resultId, makeVoidType(), OpExtInst); + scopeInst->addIdOperand(nonSemanticShaderDebugInfo); + scopeInst->addImmediateOperand(NonSemanticShaderDebugInfo100DebugScope); + scopeInst->addIdOperand(currentDebugScopeId.top()); + buildPoint->addInstruction(std::unique_ptr(scopeInst)); + lastDebugScopeId = currentDebugScopeId.top(); + } + spv::Id resultId = getUniqueId(); + Instruction* lineInst = new Instruction(resultId, makeVoidType(), OpExtInst); + lineInst->addIdOperand(nonSemanticShaderDebugInfo); + lineInst->addImmediateOperand(NonSemanticShaderDebugInfo100DebugLine); + lineInst->addIdOperand(makeDebugSource(fileName)); + lineInst->addIdOperand(makeUintConstant(lineNum)); + lineInst->addIdOperand(makeUintConstant(lineNum)); + lineInst->addIdOperand(makeUintConstant(column)); + lineInst->addIdOperand(makeUintConstant(column)); + buildPoint->addInstruction(std::unique_ptr(lineInst)); +} + // For creating new groupedTypes (will return old type if the requested one was already made). Id Builder::makeVoidType() { Instruction* type; if (groupedTypes[OpTypeVoid].size() == 0) { - type = new Instruction(getUniqueId(), NoType, OpTypeVoid); + Id typeId = getUniqueId(); + type = new Instruction(typeId, NoType, OpTypeVoid); groupedTypes[OpTypeVoid].push_back(type); constantsTypesGlobals.push_back(std::unique_ptr(type)); module.mapInstruction(type); + // Core OpTypeVoid used for debug void type + if (emitNonSemanticShaderDebugInfo) + debugId[typeId] = typeId; } else type = groupedTypes[OpTypeVoid].back(); return type->getResultId(); } -Id Builder::makeBoolType() +Id Builder::makeBoolType(bool const compilerGenerated) { Instruction* type; if (groupedTypes[OpTypeBool].size() == 0) { @@ -158,6 +193,12 @@ Id Builder::makeBoolType() } else type = groupedTypes[OpTypeBool].back(); + if (emitNonSemanticShaderDebugInfo && !compilerGenerated) + { + auto const debugResultId = makeBoolDebugType(32); + debugId[type->getResultId()] = debugResultId; + } + return type->getResultId(); } @@ -172,6 +213,12 @@ Id Builder::makeSamplerType() } else type = groupedTypes[OpTypeSampler].back(); + if (emitNonSemanticShaderDebugInfo) + { + auto const debugResultId = makeCompositeDebugType({}, "type.sampler", NonSemanticShaderDebugInfo100Structure, true); + debugId[type->getResultId()] = debugResultId; + } + return type->getResultId(); } @@ -233,11 +280,6 @@ Id Builder::makePointerFromForwardPointer(StorageClass storageClass, Id forwardP Id Builder::makeIntegerType(int width, bool hasSign) { -#ifdef GLSLANG_WEB - assert(width == 32); - width = 32; -#endif - // try to find it Instruction* type; for (int t = 0; t < (int)groupedTypes[OpTypeInt].size(); ++t) { @@ -268,16 +310,17 @@ Id Builder::makeIntegerType(int width, bool hasSign) break; } + if (emitNonSemanticShaderDebugInfo) + { + auto const debugResultId = makeIntegerDebugType(width, hasSign); + debugId[type->getResultId()] = debugResultId; + } + return type->getResultId(); } Id Builder::makeFloatType(int width) { -#ifdef GLSLANG_WEB - assert(width == 32); - width = 32; -#endif - // try to find it Instruction* type; for (int t = 0; t < (int)groupedTypes[OpTypeFloat].size(); ++t) { @@ -305,6 +348,12 @@ Id Builder::makeFloatType(int width) break; } + if (emitNonSemanticShaderDebugInfo) + { + auto const debugResultId = makeFloatDebugType(width); + debugId[type->getResultId()] = debugResultId; + } + return type->getResultId(); } @@ -312,7 +361,7 @@ Id Builder::makeFloatType(int width) // See makeStructResultType() for non-decorated structs // needed as the result of some instructions, which does // check for duplicates. -Id Builder::makeStructType(const std::vector& members, const char* name) +Id Builder::makeStructType(const std::vector& members, const char* name, bool const compilerGenerated) { // Don't look for previous one, because in the general case, // structs can be duplicated except for decorations. @@ -326,6 +375,12 @@ Id Builder::makeStructType(const std::vector& members, const char* name) module.mapInstruction(type); addName(type->getResultId(), name); + if (emitNonSemanticShaderDebugInfo && !compilerGenerated) + { + auto const debugResultId = makeCompositeDebugType(members, name, NonSemanticShaderDebugInfo100Structure); + debugId[type->getResultId()] = debugResultId; + } + return type->getResultId(); } @@ -372,6 +427,12 @@ Id Builder::makeVectorType(Id component, int size) constantsTypesGlobals.push_back(std::unique_ptr(type)); module.mapInstruction(type); + if (emitNonSemanticShaderDebugInfo) + { + auto const debugResultId = makeVectorDebugType(component, size); + debugId[type->getResultId()] = debugResultId; + } + return type->getResultId(); } @@ -398,18 +459,50 @@ Id Builder::makeMatrixType(Id component, int cols, int rows) constantsTypesGlobals.push_back(std::unique_ptr(type)); module.mapInstruction(type); + if (emitNonSemanticShaderDebugInfo) + { + auto const debugResultId = makeMatrixDebugType(column, cols); + debugId[type->getResultId()] = debugResultId; + } + return type->getResultId(); } -Id Builder::makeCooperativeMatrixType(Id component, Id scope, Id rows, Id cols) +Id Builder::makeCooperativeMatrixTypeKHR(Id component, Id scope, Id rows, Id cols, Id use) { // try to find it Instruction* type; - for (int t = 0; t < (int)groupedTypes[OpTypeCooperativeMatrixNV].size(); ++t) { - type = groupedTypes[OpTypeCooperativeMatrixNV][t]; + for (int t = 0; t < (int)groupedTypes[OpTypeCooperativeMatrixKHR].size(); ++t) { + type = groupedTypes[OpTypeCooperativeMatrixKHR][t]; if (type->getIdOperand(0) == component && type->getIdOperand(1) == scope && type->getIdOperand(2) == rows && + type->getIdOperand(3) == cols && + type->getIdOperand(4) == use) + return type->getResultId(); + } + + // not found, make it + type = new Instruction(getUniqueId(), NoType, OpTypeCooperativeMatrixKHR); + type->addIdOperand(component); + type->addIdOperand(scope); + type->addIdOperand(rows); + type->addIdOperand(cols); + type->addIdOperand(use); + groupedTypes[OpTypeCooperativeMatrixKHR].push_back(type); + constantsTypesGlobals.push_back(std::unique_ptr(type)); + module.mapInstruction(type); + + return type->getResultId(); +} + +Id Builder::makeCooperativeMatrixTypeNV(Id component, Id scope, Id rows, Id cols) +{ + // try to find it + Instruction* type; + for (int t = 0; t < (int)groupedTypes[OpTypeCooperativeMatrixNV].size(); ++t) { + type = groupedTypes[OpTypeCooperativeMatrixNV][t]; + if (type->getIdOperand(0) == component && type->getIdOperand(1) == scope && type->getIdOperand(2) == rows && type->getIdOperand(3) == cols) return type->getResultId(); } @@ -427,6 +520,17 @@ Id Builder::makeCooperativeMatrixType(Id component, Id scope, Id rows, Id cols) return type->getResultId(); } +Id Builder::makeCooperativeMatrixTypeWithSameShape(Id component, Id otherType) +{ + Instruction* instr = module.getInstruction(otherType); + if (instr->getOpCode() == OpTypeCooperativeMatrixNV) { + return makeCooperativeMatrixTypeNV(component, instr->getIdOperand(1), instr->getIdOperand(2), instr->getIdOperand(3)); + } else { + assert(instr->getOpCode() == OpTypeCooperativeMatrixKHR); + return makeCooperativeMatrixTypeKHR(component, instr->getIdOperand(1), instr->getIdOperand(2), instr->getIdOperand(3), instr->getIdOperand(4)); + } +} + Id Builder::makeGenericType(spv::Op opcode, std::vector& operands) { // try to find it @@ -484,6 +588,12 @@ Id Builder::makeArrayType(Id element, Id sizeId, int stride) constantsTypesGlobals.push_back(std::unique_ptr(type)); module.mapInstruction(type); + if (emitNonSemanticShaderDebugInfo) + { + auto const debugResultId = makeArrayDebugType(element, sizeId); + debugId[type->getResultId()] = debugResultId; + } + return type->getResultId(); } @@ -494,6 +604,12 @@ Id Builder::makeRuntimeArray(Id element) constantsTypesGlobals.push_back(std::unique_ptr(type)); module.mapInstruction(type); + if (emitNonSemanticShaderDebugInfo) + { + auto const debugResultId = makeArrayDebugType(element, makeUintConstant(0)); + debugId[type->getResultId()] = debugResultId; + } + return type->getResultId(); } @@ -513,11 +629,25 @@ Id Builder::makeFunctionType(Id returnType, const std::vector& paramTypes) } } if (! mismatch) + { + // If compiling HLSL, glslang will create a wrapper function around the entrypoint. Accordingly, a void(void) + // function type is created for the wrapper function. However, nonsemantic shader debug information is disabled + // while creating the HLSL wrapper. Consequently, if we encounter another void(void) function, we need to create + // the associated debug function type if it hasn't been created yet. + if(emitNonSemanticShaderDebugInfo && debugId[type->getResultId()] == 0) { + assert(sourceLang == spv::SourceLanguageHLSL); + assert(getTypeClass(returnType) == OpTypeVoid && paramTypes.size() == 0); + + Id debugTypeId = makeDebugFunctionType(returnType, {}); + debugId[type->getResultId()] = debugTypeId; + } return type->getResultId(); + } } // not found, make it - type = new Instruction(getUniqueId(), NoType, OpTypeFunction); + Id typeId = getUniqueId(); + type = new Instruction(typeId, NoType, OpTypeFunction); type->addIdOperand(returnType); for (int p = 0; p < (int)paramTypes.size(); ++p) type->addIdOperand(paramTypes[p]); @@ -525,9 +655,38 @@ Id Builder::makeFunctionType(Id returnType, const std::vector& paramTypes) constantsTypesGlobals.push_back(std::unique_ptr(type)); module.mapInstruction(type); + // make debug type and map it + if (emitNonSemanticShaderDebugInfo) { + Id debugTypeId = makeDebugFunctionType(returnType, paramTypes); + debugId[typeId] = debugTypeId; + } + return type->getResultId(); } +Id Builder::makeDebugFunctionType(Id returnType, const std::vector& paramTypes) +{ + assert(debugId[returnType] != 0); + + Id typeId = getUniqueId(); + auto type = new Instruction(typeId, makeVoidType(), OpExtInst); + type->addIdOperand(nonSemanticShaderDebugInfo); + type->addImmediateOperand(NonSemanticShaderDebugInfo100DebugTypeFunction); + type->addIdOperand(makeUintConstant(NonSemanticShaderDebugInfo100FlagIsPublic)); + type->addIdOperand(debugId[returnType]); + for (auto const paramType : paramTypes) { + if (isPointerType(paramType) || isArrayType(paramType)) { + type->addIdOperand(debugId[getContainedTypeId(paramType)]); + } + else { + type->addIdOperand(debugId[paramType]); + } + } + constantsTypesGlobals.push_back(std::unique_ptr(type)); + module.mapInstruction(type); + return typeId; +} + Id Builder::makeImageType(Id sampledType, Dim dim, bool depth, bool arrayed, bool ms, unsigned sampled, ImageFormat format) { @@ -561,7 +720,6 @@ Id Builder::makeImageType(Id sampledType, Dim dim, bool depth, bool arrayed, boo constantsTypesGlobals.push_back(std::unique_ptr(type)); module.mapInstruction(type); -#ifndef GLSLANG_WEB // deal with capabilities switch (dim) { case DimBuffer: @@ -607,7 +765,22 @@ Id Builder::makeImageType(Id sampledType, Dim dim, bool depth, bool arrayed, boo addCapability(CapabilityImageMSArray); } } -#endif + + if (emitNonSemanticShaderDebugInfo) + { + auto TypeName = [&dim]() -> char const* { + switch (dim) { + case Dim1D: return "type.1d.image"; + case Dim2D: return "type.2d.image"; + case Dim3D: return "type.3d.image"; + case DimCube: return "type.cube.image"; + default: return "type.image"; + } + }; + + auto const debugResultId = makeCompositeDebugType({}, TypeName(), NonSemanticShaderDebugInfo100Class, true); + debugId[type->getResultId()] = debugResultId; + } return type->getResultId(); } @@ -630,10 +803,398 @@ Id Builder::makeSampledImageType(Id imageType) constantsTypesGlobals.push_back(std::unique_ptr(type)); module.mapInstruction(type); + if (emitNonSemanticShaderDebugInfo) + { + auto const debugResultId = makeCompositeDebugType({}, "type.sampled.image", NonSemanticShaderDebugInfo100Class, true); + debugId[type->getResultId()] = debugResultId; + } + + return type->getResultId(); +} + +Id Builder::makeDebugInfoNone() +{ + if (debugInfoNone != 0) + return debugInfoNone; + + Instruction* inst = new Instruction(getUniqueId(), makeVoidType(), OpExtInst); + inst->addIdOperand(nonSemanticShaderDebugInfo); + inst->addImmediateOperand(NonSemanticShaderDebugInfo100DebugInfoNone); + + constantsTypesGlobals.push_back(std::unique_ptr(inst)); + module.mapInstruction(inst); + + debugInfoNone = inst->getResultId(); + + return debugInfoNone; +} + +Id Builder::makeBoolDebugType(int const size) +{ + // try to find it + Instruction* type; + for (int t = 0; t < (int)groupedDebugTypes[NonSemanticShaderDebugInfo100DebugTypeBasic].size(); ++t) { + type = groupedDebugTypes[NonSemanticShaderDebugInfo100DebugTypeBasic][t]; + if (type->getIdOperand(0) == getStringId("bool") && + type->getIdOperand(1) == static_cast(size) && + type->getIdOperand(2) == NonSemanticShaderDebugInfo100Boolean) + return type->getResultId(); + } + + type = new Instruction(getUniqueId(), makeVoidType(), OpExtInst); + type->addIdOperand(nonSemanticShaderDebugInfo); + type->addImmediateOperand(NonSemanticShaderDebugInfo100DebugTypeBasic); + + type->addIdOperand(getStringId("bool")); // name id + type->addIdOperand(makeUintConstant(size)); // size id + type->addIdOperand(makeUintConstant(NonSemanticShaderDebugInfo100Boolean)); // encoding id + type->addIdOperand(makeUintConstant(NonSemanticShaderDebugInfo100None)); // flags id + + groupedDebugTypes[NonSemanticShaderDebugInfo100DebugTypeBasic].push_back(type); + constantsTypesGlobals.push_back(std::unique_ptr(type)); + module.mapInstruction(type); + + return type->getResultId(); +} + +Id Builder::makeIntegerDebugType(int const width, bool const hasSign) +{ + const char* typeName = nullptr; + switch (width) { + case 8: typeName = hasSign ? "int8_t" : "uint8_t"; break; + case 16: typeName = hasSign ? "int16_t" : "uint16_t"; break; + case 64: typeName = hasSign ? "int64_t" : "uint64_t"; break; + default: typeName = hasSign ? "int" : "uint"; + } + auto nameId = getStringId(typeName); + // try to find it + Instruction* type; + for (int t = 0; t < (int)groupedDebugTypes[NonSemanticShaderDebugInfo100DebugTypeBasic].size(); ++t) { + type = groupedDebugTypes[NonSemanticShaderDebugInfo100DebugTypeBasic][t]; + if (type->getIdOperand(0) == nameId && + type->getIdOperand(1) == static_cast(width) && + type->getIdOperand(2) == (hasSign ? NonSemanticShaderDebugInfo100Signed : NonSemanticShaderDebugInfo100Unsigned)) + return type->getResultId(); + } + + // not found, make it + type = new Instruction(getUniqueId(), makeVoidType(), OpExtInst); + type->addIdOperand(nonSemanticShaderDebugInfo); + type->addImmediateOperand(NonSemanticShaderDebugInfo100DebugTypeBasic); + type->addIdOperand(nameId); // name id + type->addIdOperand(makeUintConstant(width)); // size id + if(hasSign == true) { + type->addIdOperand(makeUintConstant(NonSemanticShaderDebugInfo100Signed)); // encoding id + } else { + type->addIdOperand(makeUintConstant(NonSemanticShaderDebugInfo100Unsigned)); // encoding id + } + type->addIdOperand(makeUintConstant(NonSemanticShaderDebugInfo100None)); // flags id + + groupedDebugTypes[NonSemanticShaderDebugInfo100DebugTypeBasic].push_back(type); + constantsTypesGlobals.push_back(std::unique_ptr(type)); + module.mapInstruction(type); + return type->getResultId(); } -#ifndef GLSLANG_WEB +Id Builder::makeFloatDebugType(int const width) +{ + const char* typeName = nullptr; + switch (width) { + case 16: typeName = "float16_t"; break; + case 64: typeName = "double"; break; + default: typeName = "float"; break; + } + auto nameId = getStringId(typeName); + // try to find it + Instruction* type; + for (int t = 0; t < (int)groupedDebugTypes[NonSemanticShaderDebugInfo100DebugTypeBasic].size(); ++t) { + type = groupedDebugTypes[NonSemanticShaderDebugInfo100DebugTypeBasic][t]; + if (type->getIdOperand(0) == nameId && + type->getIdOperand(1) == static_cast(width) && + type->getIdOperand(2) == NonSemanticShaderDebugInfo100Float) + return type->getResultId(); + } + + // not found, make it + type = new Instruction(getUniqueId(), makeVoidType(), OpExtInst); + type->addIdOperand(nonSemanticShaderDebugInfo); + type->addImmediateOperand(NonSemanticShaderDebugInfo100DebugTypeBasic); + type->addIdOperand(nameId); // name id + type->addIdOperand(makeUintConstant(width)); // size id + type->addIdOperand(makeUintConstant(NonSemanticShaderDebugInfo100Float)); // encoding id + type->addIdOperand(makeUintConstant(NonSemanticShaderDebugInfo100None)); // flags id + + groupedDebugTypes[NonSemanticShaderDebugInfo100DebugTypeBasic].push_back(type); + constantsTypesGlobals.push_back(std::unique_ptr(type)); + module.mapInstruction(type); + + return type->getResultId(); +} + +Id Builder::makeSequentialDebugType(Id const baseType, Id const componentCount, NonSemanticShaderDebugInfo100Instructions const sequenceType) +{ + assert(sequenceType == NonSemanticShaderDebugInfo100DebugTypeArray || + sequenceType == NonSemanticShaderDebugInfo100DebugTypeVector); + + // try to find it + Instruction* type; + for (int t = 0; t < (int)groupedDebugTypes[sequenceType].size(); ++t) { + type = groupedDebugTypes[sequenceType][t]; + if (type->getIdOperand(0) == baseType && + type->getIdOperand(1) == makeUintConstant(componentCount)) + return type->getResultId(); + } + + // not found, make it + type = new Instruction(getUniqueId(), makeVoidType(), OpExtInst); + type->addIdOperand(nonSemanticShaderDebugInfo); + type->addImmediateOperand(sequenceType); + type->addIdOperand(debugId[baseType]); // base type + type->addIdOperand(componentCount); // component count + + groupedDebugTypes[sequenceType].push_back(type); + constantsTypesGlobals.push_back(std::unique_ptr(type)); + module.mapInstruction(type); + + return type->getResultId(); +} + +Id Builder::makeArrayDebugType(Id const baseType, Id const componentCount) +{ + return makeSequentialDebugType(baseType, componentCount, NonSemanticShaderDebugInfo100DebugTypeArray); +} + +Id Builder::makeVectorDebugType(Id const baseType, int const componentCount) +{ + return makeSequentialDebugType(baseType, makeUintConstant(componentCount), NonSemanticShaderDebugInfo100DebugTypeVector); +} + +Id Builder::makeMatrixDebugType(Id const vectorType, int const vectorCount, bool columnMajor) +{ + // try to find it + Instruction* type; + for (int t = 0; t < (int)groupedDebugTypes[NonSemanticShaderDebugInfo100DebugTypeMatrix].size(); ++t) { + type = groupedDebugTypes[NonSemanticShaderDebugInfo100DebugTypeMatrix][t]; + if (type->getIdOperand(0) == vectorType && + type->getIdOperand(1) == makeUintConstant(vectorCount)) + return type->getResultId(); + } + + // not found, make it + type = new Instruction(getUniqueId(), makeVoidType(), OpExtInst); + type->addIdOperand(nonSemanticShaderDebugInfo); + type->addImmediateOperand(NonSemanticShaderDebugInfo100DebugTypeMatrix); + type->addIdOperand(debugId[vectorType]); // vector type id + type->addIdOperand(makeUintConstant(vectorCount)); // component count id + type->addIdOperand(makeBoolConstant(columnMajor)); // column-major id + + groupedDebugTypes[NonSemanticShaderDebugInfo100DebugTypeMatrix].push_back(type); + constantsTypesGlobals.push_back(std::unique_ptr(type)); + module.mapInstruction(type); + + return type->getResultId(); +} + +Id Builder::makeMemberDebugType(Id const memberType, DebugTypeLoc const& debugTypeLoc) +{ + assert(debugId[memberType] != 0); + + Instruction* type = new Instruction(getUniqueId(), makeVoidType(), OpExtInst); + type->addIdOperand(nonSemanticShaderDebugInfo); + type->addImmediateOperand(NonSemanticShaderDebugInfo100DebugTypeMember); + type->addIdOperand(getStringId(debugTypeLoc.name)); // name id + type->addIdOperand(debugId[memberType]); // type id + type->addIdOperand(makeDebugSource(sourceFileStringId)); // source id TODO: verify this works across include directives + type->addIdOperand(makeUintConstant(debugTypeLoc.line)); // line id TODO: currentLine is always zero + type->addIdOperand(makeUintConstant(debugTypeLoc.column)); // TODO: column id + type->addIdOperand(makeUintConstant(0)); // TODO: offset id + type->addIdOperand(makeUintConstant(0)); // TODO: size id + type->addIdOperand(makeUintConstant(NonSemanticShaderDebugInfo100FlagIsPublic)); // flags id + + groupedDebugTypes[NonSemanticShaderDebugInfo100DebugTypeMember].push_back(type); + constantsTypesGlobals.push_back(std::unique_ptr(type)); + module.mapInstruction(type); + + return type->getResultId(); +} + +// Note: To represent a source language opaque type, this instruction must have no Members operands, Size operand must be +// DebugInfoNone, and Name must start with @ to avoid clashes with user defined names. +Id Builder::makeCompositeDebugType(std::vector const& memberTypes, char const*const name, + NonSemanticShaderDebugInfo100DebugCompositeType const tag, bool const isOpaqueType) +{ + // Create the debug member types. + std::vector memberDebugTypes; + for(auto const memberType : memberTypes) { + assert(debugTypeLocs.find(memberType) != debugTypeLocs.end()); + + // There _should_ be debug types for all the member types but currently buffer references + // do not have member debug info generated. + if (debugId[memberType]) + memberDebugTypes.emplace_back(makeMemberDebugType(memberType, debugTypeLocs[memberType])); + + // TODO: Need to rethink this method of passing location information. + // debugTypeLocs.erase(memberType); + } + + // Create The structure debug type. + Instruction* type = new Instruction(getUniqueId(), makeVoidType(), OpExtInst); + type->addIdOperand(nonSemanticShaderDebugInfo); + type->addImmediateOperand(NonSemanticShaderDebugInfo100DebugTypeComposite); + type->addIdOperand(getStringId(name)); // name id + type->addIdOperand(makeUintConstant(tag)); // tag id + type->addIdOperand(makeDebugSource(sourceFileStringId)); // source id TODO: verify this works across include directives + type->addIdOperand(makeUintConstant(currentLine)); // line id TODO: currentLine always zero? + type->addIdOperand(makeUintConstant(0)); // TODO: column id + type->addIdOperand(makeDebugCompilationUnit()); // scope id + if(isOpaqueType == true) { + // Prepend '@' to opaque types. + type->addIdOperand(getStringId('@' + std::string(name))); // linkage name id + type->addIdOperand(makeDebugInfoNone()); // size id + } else { + type->addIdOperand(getStringId(name)); // linkage name id + type->addIdOperand(makeUintConstant(0)); // TODO: size id + } + type->addIdOperand(makeUintConstant(NonSemanticShaderDebugInfo100FlagIsPublic)); // flags id + assert(isOpaqueType == false || (isOpaqueType == true && memberDebugTypes.empty())); + for(auto const memberDebugType : memberDebugTypes) { + type->addIdOperand(memberDebugType); + } + + groupedDebugTypes[NonSemanticShaderDebugInfo100DebugTypeComposite].push_back(type); + constantsTypesGlobals.push_back(std::unique_ptr(type)); + module.mapInstruction(type); + + return type->getResultId(); +} + +Id Builder::makeDebugSource(const Id fileName) { + if (debugSourceId.find(fileName) != debugSourceId.end()) + return debugSourceId[fileName]; + spv::Id resultId = getUniqueId(); + Instruction* sourceInst = new Instruction(resultId, makeVoidType(), OpExtInst); + sourceInst->addIdOperand(nonSemanticShaderDebugInfo); + sourceInst->addImmediateOperand(NonSemanticShaderDebugInfo100DebugSource); + sourceInst->addIdOperand(fileName); + if (emitNonSemanticShaderDebugSource) { + spv::Id sourceId = 0; + if (fileName == sourceFileStringId) { + sourceId = getStringId(sourceText); + } else { + auto incItr = includeFiles.find(fileName); + assert(incItr != includeFiles.end()); + sourceId = getStringId(*incItr->second); + } + sourceInst->addIdOperand(sourceId); + } + constantsTypesGlobals.push_back(std::unique_ptr(sourceInst)); + module.mapInstruction(sourceInst); + debugSourceId[fileName] = resultId; + return resultId; +} + +Id Builder::makeDebugCompilationUnit() { + if (nonSemanticShaderCompilationUnitId != 0) + return nonSemanticShaderCompilationUnitId; + spv::Id resultId = getUniqueId(); + Instruction* sourceInst = new Instruction(resultId, makeVoidType(), OpExtInst); + sourceInst->addIdOperand(nonSemanticShaderDebugInfo); + sourceInst->addImmediateOperand(NonSemanticShaderDebugInfo100DebugCompilationUnit); + sourceInst->addIdOperand(makeUintConstant(1)); // TODO(greg-lunarg): Get rid of magic number + sourceInst->addIdOperand(makeUintConstant(4)); // TODO(greg-lunarg): Get rid of magic number + sourceInst->addIdOperand(makeDebugSource(sourceFileStringId)); + sourceInst->addIdOperand(makeUintConstant(sourceLang)); + constantsTypesGlobals.push_back(std::unique_ptr(sourceInst)); + module.mapInstruction(sourceInst); + nonSemanticShaderCompilationUnitId = resultId; + + // We can reasonably assume that makeDebugCompilationUnit will be called before any of + // debug-scope stack. Function scopes and lexical scopes will occur afterward. + assert(currentDebugScopeId.empty()); + currentDebugScopeId.push(nonSemanticShaderCompilationUnitId); + + return resultId; +} + +Id Builder::createDebugGlobalVariable(Id const type, char const*const name, Id const variable) +{ + assert(type != 0); + + Instruction* inst = new Instruction(getUniqueId(), makeVoidType(), OpExtInst); + inst->addIdOperand(nonSemanticShaderDebugInfo); + inst->addImmediateOperand(NonSemanticShaderDebugInfo100DebugGlobalVariable); + inst->addIdOperand(getStringId(name)); // name id + inst->addIdOperand(type); // type id + inst->addIdOperand(makeDebugSource(sourceFileStringId)); // source id + inst->addIdOperand(makeUintConstant(currentLine)); // line id TODO: currentLine always zero? + inst->addIdOperand(makeUintConstant(0)); // TODO: column id + inst->addIdOperand(makeDebugCompilationUnit()); // scope id + inst->addIdOperand(getStringId(name)); // linkage name id + inst->addIdOperand(variable); // variable id + inst->addIdOperand(makeUintConstant(NonSemanticShaderDebugInfo100FlagIsDefinition)); // flags id + + constantsTypesGlobals.push_back(std::unique_ptr(inst)); + module.mapInstruction(inst); + + return inst->getResultId(); +} + +Id Builder::createDebugLocalVariable(Id type, char const*const name, size_t const argNumber) +{ + assert(name != nullptr); + assert(!currentDebugScopeId.empty()); + + Instruction* inst = new Instruction(getUniqueId(), makeVoidType(), OpExtInst); + inst->addIdOperand(nonSemanticShaderDebugInfo); + inst->addImmediateOperand(NonSemanticShaderDebugInfo100DebugLocalVariable); + inst->addIdOperand(getStringId(name)); // name id + inst->addIdOperand(type); // type id + inst->addIdOperand(makeDebugSource(sourceFileStringId)); // source id + inst->addIdOperand(makeUintConstant(currentLine)); // line id + inst->addIdOperand(makeUintConstant(0)); // TODO: column id + inst->addIdOperand(currentDebugScopeId.top()); // scope id + inst->addIdOperand(makeUintConstant(NonSemanticShaderDebugInfo100FlagIsLocal)); // flags id + if(argNumber != 0) { + inst->addIdOperand(makeUintConstant(argNumber)); + } + + constantsTypesGlobals.push_back(std::unique_ptr(inst)); + module.mapInstruction(inst); + + return inst->getResultId(); +} + +Id Builder::makeDebugExpression() +{ + if (debugExpression != 0) + return debugExpression; + + Instruction* inst = new Instruction(getUniqueId(), makeVoidType(), OpExtInst); + inst->addIdOperand(nonSemanticShaderDebugInfo); + inst->addImmediateOperand(NonSemanticShaderDebugInfo100DebugExpression); + + constantsTypesGlobals.push_back(std::unique_ptr(inst)); + module.mapInstruction(inst); + + debugExpression = inst->getResultId(); + + return debugExpression; +} + +Id Builder::makeDebugDeclare(Id const debugLocalVariable, Id const localVariable) +{ + Instruction* inst = new Instruction(getUniqueId(), makeVoidType(), OpExtInst); + inst->addIdOperand(nonSemanticShaderDebugInfo); + inst->addImmediateOperand(NonSemanticShaderDebugInfo100DebugDeclare); + inst->addIdOperand(debugLocalVariable); // debug local variable id + inst->addIdOperand(localVariable); // local variable id + inst->addIdOperand(makeDebugExpression()); // expression id + buildPoint->addInstruction(std::unique_ptr(inst)); + + return inst->getResultId(); +} + Id Builder::makeAccelerationStructureType() { Instruction *type; @@ -663,7 +1224,21 @@ Id Builder::makeRayQueryType() return type->getResultId(); } -#endif + +Id Builder::makeHitObjectNVType() +{ + Instruction *type; + if (groupedTypes[OpTypeHitObjectNV].size() == 0) { + type = new Instruction(getUniqueId(), NoType, OpTypeHitObjectNV); + groupedTypes[OpTypeHitObjectNV].push_back(type); + constantsTypesGlobals.push_back(std::unique_ptr(type)); + module.mapInstruction(type); + } else { + type = groupedTypes[OpTypeHitObjectNV].back(); + } + + return type->getResultId(); +} Id Builder::getDerefTypeId(Id resultId) const { @@ -713,6 +1288,7 @@ int Builder::getNumTypeConstituents(Id typeId) const } case OpTypeStruct: return instr->getNumOperands(); + case OpTypeCooperativeMatrixKHR: case OpTypeCooperativeMatrixNV: // has only one constituent when used with OpCompositeConstruct. return 1; @@ -762,6 +1338,7 @@ Id Builder::getContainedTypeId(Id typeId, int member) const case OpTypeMatrix: case OpTypeArray: case OpTypeRuntimeArray: + case OpTypeCooperativeMatrixKHR: case OpTypeCooperativeMatrixNV: return instr->getIdOperand(0); case OpTypePointer: @@ -832,7 +1409,7 @@ bool Builder::containsType(Id typeId, spv::Op typeOp, unsigned int width) const } // return true if the type is a pointer to PhysicalStorageBufferEXT or an -// array of such pointers. These require restrict/aliased decorations. +// contains such a pointer. These require restrict/aliased decorations. bool Builder::containsPhysicalStorageBufferOrArray(Id typeId) const { const Instruction& instr = *module.getInstruction(typeId); @@ -844,6 +1421,12 @@ bool Builder::containsPhysicalStorageBufferOrArray(Id typeId) const return getTypeStorageClass(typeId) == StorageClassPhysicalStorageBufferEXT; case OpTypeArray: return containsPhysicalStorageBufferOrArray(getContainedTypeId(typeId)); + case OpTypeStruct: + for (int m = 0; m < instr.getNumOperands(); ++m) { + if (containsPhysicalStorageBufferOrArray(instr.getIdOperand(m))) + return true; + } + return false; default: return false; } @@ -920,6 +1503,17 @@ bool Builder::isSpecConstantOpCode(Op opcode) const } } +bool Builder::isRayTracingOpCode(Op opcode) const +{ + switch (opcode) { + case OpTypeAccelerationStructureKHR: + case OpTypeRayQueryKHR: + return true; + default: + return false; + } +} + Id Builder::makeNullConstant(Id typeId) { Instruction* constant; @@ -1046,10 +1640,6 @@ Id Builder::makeFloatConstant(float f, bool specConstant) Id Builder::makeDoubleConstant(double d, bool specConstant) { -#ifdef GLSLANG_WEB - assert(0); - return NoResult; -#else Op opcode = specConstant ? OpSpecConstant : OpConstant; Id typeId = makeFloatType(64); union { double db; unsigned long long ull; } u; @@ -1074,15 +1664,10 @@ Id Builder::makeDoubleConstant(double d, bool specConstant) module.mapInstruction(c); return c->getResultId(); -#endif } Id Builder::makeFloat16Constant(float f16, bool specConstant) { -#ifdef GLSLANG_WEB - assert(0); - return NoResult; -#else Op opcode = specConstant ? OpSpecConstant : OpConstant; Id typeId = makeFloatType(16); @@ -1107,17 +1692,11 @@ Id Builder::makeFloat16Constant(float f16, bool specConstant) module.mapInstruction(c); return c->getResultId(); -#endif } Id Builder::makeFpConstant(Id type, double d, bool specConstant) { -#ifdef GLSLANG_WEB - const int width = 32; - assert(width == getScalarTypeWidth(type)); -#else const int width = getScalarTypeWidth(type); -#endif assert(isFloatType(type)); @@ -1136,9 +1715,22 @@ Id Builder::makeFpConstant(Id type, double d, bool specConstant) return NoResult; } +Id Builder::importNonSemanticShaderDebugInfoInstructions() +{ + assert(emitNonSemanticShaderDebugInfo == true); + + if(nonSemanticShaderDebugInfo == 0) + { + this->addExtension(spv::E_SPV_KHR_non_semantic_info); + nonSemanticShaderDebugInfo = this->import("NonSemantic.Shader.DebugInfo.100"); + } + + return nonSemanticShaderDebugInfo; +} + Id Builder::findCompositeConstant(Op typeClass, Id typeId, const std::vector& comps) { - Instruction* constant = 0; + Instruction* constant = nullptr; bool found = false; for (int i = 0; i < (int)groupedConstants[typeClass].size(); ++i) { constant = groupedConstants[typeClass][i]; @@ -1165,7 +1757,7 @@ Id Builder::findCompositeConstant(Op typeClass, Id typeId, const std::vector Id Builder::findStructConstant(Id typeId, const std::vector& comps) { - Instruction* constant = 0; + Instruction* constant = nullptr; bool found = false; for (int i = 0; i < (int)groupedStructConstants[typeId].size(); ++i) { constant = groupedStructConstants[typeId][i]; @@ -1198,6 +1790,7 @@ Id Builder::makeCompositeConstant(Id typeId, const std::vector& members, boo case OpTypeVector: case OpTypeArray: case OpTypeMatrix: + case OpTypeCooperativeMatrixKHR: case OpTypeCooperativeMatrixNV: if (! specConstant) { Id existing = findCompositeConstant(typeClass, typeId, members); @@ -1245,6 +1838,10 @@ Instruction* Builder::addEntryPoint(ExecutionModel model, Function* function, co // Currently relying on the fact that all 'value' of interest are small non-negative values. void Builder::addExecutionMode(Function* entryPoint, ExecutionMode mode, int value1, int value2, int value3) { + // entryPoint can be null if we are in compile-only mode + if (!entryPoint) + return; + Instruction* instr = new Instruction(OpExecutionMode); instr->addIdOperand(entryPoint->getId()); instr->addImmediateOperand(mode); @@ -1260,6 +1857,10 @@ void Builder::addExecutionMode(Function* entryPoint, ExecutionMode mode, int val void Builder::addExecutionMode(Function* entryPoint, ExecutionMode mode, const std::vector& literals) { + // entryPoint can be null if we are in compile-only mode + if (!entryPoint) + return; + Instruction* instr = new Instruction(OpExecutionMode); instr->addIdOperand(entryPoint->getId()); instr->addImmediateOperand(mode); @@ -1271,6 +1872,10 @@ void Builder::addExecutionMode(Function* entryPoint, ExecutionMode mode, const s void Builder::addExecutionModeId(Function* entryPoint, ExecutionMode mode, const std::vector& operandIds) { + // entryPoint can be null if we are in compile-only mode + if (!entryPoint) + return; + Instruction* instr = new Instruction(OpExecutionModeId); instr->addIdOperand(entryPoint->getId()); instr->addImmediateOperand(mode); @@ -1354,6 +1959,16 @@ void Builder::addDecoration(Id id, Decoration decoration, const std::vector(dec)); } +void Builder::addLinkageDecoration(Id id, const char* name, spv::LinkageType linkType) { + Instruction* dec = new Instruction(OpDecorate); + dec->addIdOperand(id); + dec->addImmediateOperand(spv::DecorationLinkageAttributes); + dec->addStringOperand(name); + dec->addImmediateOperand(linkType); + + decorations.push_back(std::unique_ptr(dec)); +} + void Builder::addDecorationId(Id id, Decoration decoration, Id idDecoration) { if (decoration == spv::DecorationMax) @@ -1447,23 +2062,34 @@ Function* Builder::makeEntryPoint(const char* entryPoint) assert(! entryPointFunction); Block* entry; - std::vector params; + std::vector paramsTypes; + std::vector paramNames; std::vector> decorations; - entryPointFunction = makeFunctionEntry(NoPrecision, makeVoidType(), entryPoint, params, decorations, &entry); + auto const returnType = makeVoidType(); + + restoreNonSemanticShaderDebugInfo = emitNonSemanticShaderDebugInfo; + if(sourceLang == spv::SourceLanguageHLSL) { + emitNonSemanticShaderDebugInfo = false; + } + + entryPointFunction = makeFunctionEntry(NoPrecision, returnType, entryPoint, LinkageTypeMax, paramsTypes, paramNames, decorations, &entry); + + emitNonSemanticShaderDebugInfo = restoreNonSemanticShaderDebugInfo; return entryPointFunction; } // Comments in header -Function* Builder::makeFunctionEntry(Decoration precision, Id returnType, const char* name, - const std::vector& paramTypes, +Function* Builder::makeFunctionEntry(Decoration precision, Id returnType, const char* name, LinkageType linkType, + const std::vector& paramTypes, const std::vector& paramNames, const std::vector>& decorations, Block **entry) { // Make the function and initial instructions in it Id typeId = makeFunctionType(returnType, paramTypes); Id firstParamId = paramTypes.size() == 0 ? 0 : getUniqueIds((int)paramTypes.size()); - Function* function = new Function(getUniqueId(), returnType, typeId, firstParamId, module); + Id funcId = getUniqueId(); + Function* function = new Function(funcId, returnType, typeId, firstParamId, linkType, name, module); // Set up the precisions setPrecision(function->getId(), precision); @@ -1475,11 +2101,44 @@ Function* Builder::makeFunctionEntry(Decoration precision, Id returnType, const } } + // Make the debug function instruction + if (emitNonSemanticShaderDebugInfo) { + Id nameId = getStringId(unmangleFunctionName(name)); + Id debugFuncId = makeDebugFunction(function, nameId, typeId); + debugId[funcId] = debugFuncId; + currentDebugScopeId.push(debugFuncId); + lastDebugScopeId = NoResult; + } + // CFG - if (entry) { - *entry = new Block(getUniqueId(), *function); - function->addBlock(*entry); - setBuildPoint(*entry); + assert(entry != nullptr); + *entry = new Block(getUniqueId(), *function); + function->addBlock(*entry); + setBuildPoint(*entry); + + // DebugScope and DebugLine for parameter DebugDeclares + if (emitNonSemanticShaderDebugInfo && (int)paramTypes.size() > 0) { + addDebugScopeAndLine(currentFileId, currentLine, 0); + } + + if (emitNonSemanticShaderDebugInfo) { + assert(paramTypes.size() == paramNames.size()); + for(size_t p = 0; p < paramTypes.size(); ++p) + { + auto getParamTypeId = [this](Id const& typeId) { + if (isPointerType(typeId) || isArrayType(typeId)) { + return getContainedTypeId(typeId); + } + else { + return typeId; + } + }; + auto const& paramName = paramNames[p]; + auto const debugLocalVariableId = createDebugLocalVariable(debugId[getParamTypeId(paramTypes[p])], paramName, p+1); + debugId[firstParamId + p] = debugLocalVariableId; + + makeDebugDeclare(debugLocalVariableId, firstParamId + p); + } } if (name) @@ -1487,9 +2146,65 @@ Function* Builder::makeFunctionEntry(Decoration precision, Id returnType, const functions.push_back(std::unique_ptr(function)); + // Clear debug scope stack + if (emitNonSemanticShaderDebugInfo) + currentDebugScopeId.pop(); + return function; } +Id Builder::makeDebugFunction([[maybe_unused]] Function* function, Id nameId, Id funcTypeId) +{ + assert(function != nullptr); + assert(nameId != 0); + assert(funcTypeId != 0); + assert(debugId[funcTypeId] != 0); + + Id funcId = getUniqueId(); + auto type = new Instruction(funcId, makeVoidType(), OpExtInst); + type->addIdOperand(nonSemanticShaderDebugInfo); + type->addImmediateOperand(NonSemanticShaderDebugInfo100DebugFunction); + type->addIdOperand(nameId); + type->addIdOperand(debugId[funcTypeId]); + type->addIdOperand(makeDebugSource(currentFileId)); // Will be fixed later when true filename available + type->addIdOperand(makeUintConstant(currentLine)); // Will be fixed later when true line available + type->addIdOperand(makeUintConstant(0)); // column + type->addIdOperand(makeDebugCompilationUnit()); // scope + type->addIdOperand(nameId); // linkage name + type->addIdOperand(makeUintConstant(NonSemanticShaderDebugInfo100FlagIsPublic)); + type->addIdOperand(makeUintConstant(currentLine)); // TODO(greg-lunarg): correct scope line + constantsTypesGlobals.push_back(std::unique_ptr(type)); + module.mapInstruction(type); + return funcId; +} + +Id Builder::makeDebugLexicalBlock(uint32_t line) { + assert(!currentDebugScopeId.empty()); + + Id lexId = getUniqueId(); + auto lex = new Instruction(lexId, makeVoidType(), OpExtInst); + lex->addIdOperand(nonSemanticShaderDebugInfo); + lex->addImmediateOperand(NonSemanticShaderDebugInfo100DebugLexicalBlock); + lex->addIdOperand(makeDebugSource(currentFileId)); + lex->addIdOperand(makeUintConstant(line)); + lex->addIdOperand(makeUintConstant(0)); // column + lex->addIdOperand(currentDebugScopeId.top()); // scope + constantsTypesGlobals.push_back(std::unique_ptr(lex)); + module.mapInstruction(lex); + return lexId; +} + +std::string Builder::unmangleFunctionName(std::string const& name) const +{ + assert(name.length() > 0); + + if(name.rfind('(') != std::string::npos) { + return name.substr(0, name.rfind('(')); + } else { + return name; + } +} + // Comments in header void Builder::makeReturn(bool implicit, Id retVal) { @@ -1504,6 +2219,54 @@ void Builder::makeReturn(bool implicit, Id retVal) createAndSetNoPredecessorBlock("post-return"); } +// Comments in header +void Builder::enterScope(uint32_t line) +{ + // Generate new lexical scope debug instruction + Id lexId = makeDebugLexicalBlock(line); + currentDebugScopeId.push(lexId); + lastDebugScopeId = NoResult; +} + +// Comments in header +void Builder::leaveScope() +{ + // Pop current scope from stack and clear current scope + currentDebugScopeId.pop(); + lastDebugScopeId = NoResult; +} + +// Comments in header +void Builder::enterFunction(Function const* function) +{ + // Save and disable debugInfo for HLSL entry point function. It is a wrapper + // function with no user code in it. + restoreNonSemanticShaderDebugInfo = emitNonSemanticShaderDebugInfo; + if (sourceLang == spv::SourceLanguageHLSL && function == entryPointFunction) { + emitNonSemanticShaderDebugInfo = false; + } + + if (emitNonSemanticShaderDebugInfo) { + // Initialize scope state + Id funcId = function->getFuncId(); + currentDebugScopeId.push(debugId[funcId]); + // Create DebugFunctionDefinition + spv::Id resultId = getUniqueId(); + Instruction* defInst = new Instruction(resultId, makeVoidType(), OpExtInst); + defInst->addIdOperand(nonSemanticShaderDebugInfo); + defInst->addImmediateOperand(NonSemanticShaderDebugInfo100DebugFunctionDefinition); + defInst->addIdOperand(debugId[funcId]); + defInst->addIdOperand(funcId); + buildPoint->addInstruction(std::unique_ptr(defInst)); + } + + if (auto linkType = function->getLinkType(); linkType != LinkageTypeMax) { + Id funcId = function->getFuncId(); + addCapability(CapabilityLinkage); + addLinkageDecoration(funcId, function->getExportName(), linkType); + } +} + // Comments in header void Builder::leaveFunction() { @@ -1519,6 +2282,12 @@ void Builder::leaveFunction() makeReturn(true, createUndefined(function.getReturnType())); } } + + // Clear function scope from debug scope stack + if (emitNonSemanticShaderDebugInfo) + currentDebugScopeId.pop(); + + emitNonSemanticShaderDebugInfo = restoreNonSemanticShaderDebugInfo; } // Comments in header @@ -1529,7 +2298,18 @@ void Builder::makeStatementTerminator(spv::Op opcode, const char *name) } // Comments in header -Id Builder::createVariable(Decoration precision, StorageClass storageClass, Id type, const char* name, Id initializer) +void Builder::makeStatementTerminator(spv::Op opcode, const std::vector& operands, const char* name) +{ + // It's assumed that the terminator instruction is always of void return type + // However in future if there is a need for non void return type, new helper + // methods can be created. + createNoResultOp(opcode, operands); + createAndSetNoPredecessorBlock(name); +} + +// Comments in header +Id Builder::createVariable(Decoration precision, StorageClass storageClass, Id type, const char* name, Id initializer, + bool const compilerGenerated) { Id pointerType = makePointer(storageClass, type); Instruction* inst = new Instruction(getUniqueId(), pointerType, OpVariable); @@ -1541,11 +2321,26 @@ Id Builder::createVariable(Decoration precision, StorageClass storageClass, Id t case StorageClassFunction: // Validation rules require the declaration in the entry block buildPoint->getParent().addLocalVariable(std::unique_ptr(inst)); + + if (emitNonSemanticShaderDebugInfo && !compilerGenerated) + { + auto const debugLocalVariableId = createDebugLocalVariable(debugId[type], name); + debugId[inst->getResultId()] = debugLocalVariableId; + + makeDebugDeclare(debugLocalVariableId, inst->getResultId()); + } + break; default: constantsTypesGlobals.push_back(std::unique_ptr(inst)); module.mapInstruction(inst); + + if (emitNonSemanticShaderDebugInfo && !isRayTracingOpCode(getOpCode(type))) + { + auto const debugResultId = createDebugGlobalVariable(debugId[type], name, inst->getResultId()); + debugId[inst->getResultId()] = debugResultId; + } break; } @@ -1575,7 +2370,7 @@ spv::MemoryAccessMask Builder::sanitizeMemoryAccessForStorageClass(spv::MemoryAc case spv::StorageClassPhysicalStorageBufferEXT: break; default: - memoryAccess = spv::MemoryAccessMask(memoryAccess & + memoryAccess = spv::MemoryAccessMask(memoryAccess & ~(spv::MemoryAccessMakePointerAvailableKHRMask | spv::MemoryAccessMakePointerVisibleKHRMask | spv::MemoryAccessNonPrivatePointerKHRMask)); @@ -1660,7 +2455,24 @@ Id Builder::createArrayLength(Id base, unsigned int member) return length->getResultId(); } -Id Builder::createCooperativeMatrixLength(Id type) +Id Builder::createCooperativeMatrixLengthKHR(Id type) +{ + spv::Id intType = makeUintType(32); + + // Generate code for spec constants if in spec constant operation + // generation mode. + if (generatingOpCodeForSpecConst) { + return createSpecConstantOp(OpCooperativeMatrixLengthKHR, intType, std::vector(1, type), std::vector()); + } + + Instruction* length = new Instruction(getUniqueId(), intType, OpCooperativeMatrixLengthKHR); + length->addIdOperand(type); + buildPoint->addInstruction(std::unique_ptr(length)); + + return length->getResultId(); +} + +Id Builder::createCooperativeMatrixLengthNV(Id type) { spv::Id intType = makeUintType(32); @@ -2031,52 +2843,47 @@ Id Builder::createBuiltinCall(Id resultType, Id builtins, int entryPoint, const Id Builder::createTextureCall(Decoration precision, Id resultType, bool sparse, bool fetch, bool proj, bool gather, bool noImplicitLod, const TextureParameters& parameters, ImageOperandsMask signExtensionMask) { - static const int maxTextureArgs = 10; - Id texArgs[maxTextureArgs] = {}; + std::vector texArgs; // // Set up the fixed arguments // - int numArgs = 0; bool explicitLod = false; - texArgs[numArgs++] = parameters.sampler; - texArgs[numArgs++] = parameters.coords; + texArgs.push_back(parameters.sampler); + texArgs.push_back(parameters.coords); if (parameters.Dref != NoResult) - texArgs[numArgs++] = parameters.Dref; + texArgs.push_back(parameters.Dref); if (parameters.component != NoResult) - texArgs[numArgs++] = parameters.component; + texArgs.push_back(parameters.component); -#ifndef GLSLANG_WEB if (parameters.granularity != NoResult) - texArgs[numArgs++] = parameters.granularity; + texArgs.push_back(parameters.granularity); if (parameters.coarse != NoResult) - texArgs[numArgs++] = parameters.coarse; -#endif + texArgs.push_back(parameters.coarse); // // Set up the optional arguments // - int optArgNum = numArgs; // track which operand, if it exists, is the mask of optional arguments - ++numArgs; // speculatively make room for the mask operand + size_t optArgNum = texArgs.size(); // the position of the mask for the optional arguments, if any. ImageOperandsMask mask = ImageOperandsMaskNone; // the mask operand if (parameters.bias) { mask = (ImageOperandsMask)(mask | ImageOperandsBiasMask); - texArgs[numArgs++] = parameters.bias; + texArgs.push_back(parameters.bias); } if (parameters.lod) { mask = (ImageOperandsMask)(mask | ImageOperandsLodMask); - texArgs[numArgs++] = parameters.lod; + texArgs.push_back(parameters.lod); explicitLod = true; } else if (parameters.gradX) { mask = (ImageOperandsMask)(mask | ImageOperandsGradMask); - texArgs[numArgs++] = parameters.gradX; - texArgs[numArgs++] = parameters.gradY; + texArgs.push_back(parameters.gradX); + texArgs.push_back(parameters.gradY); explicitLod = true; } else if (noImplicitLod && ! fetch && ! gather) { // have to explicitly use lod of 0 if not allowed to have them be implicit, and // we would otherwise be about to issue an implicit instruction mask = (ImageOperandsMask)(mask | ImageOperandsLodMask); - texArgs[numArgs++] = makeFloatConstant(0.0); + texArgs.push_back(makeFloatConstant(0.0)); explicitLod = true; } if (parameters.offset) { @@ -2086,24 +2893,23 @@ Id Builder::createTextureCall(Decoration precision, Id resultType, bool sparse, addCapability(CapabilityImageGatherExtended); mask = (ImageOperandsMask)(mask | ImageOperandsOffsetMask); } - texArgs[numArgs++] = parameters.offset; + texArgs.push_back(parameters.offset); } if (parameters.offsets) { addCapability(CapabilityImageGatherExtended); mask = (ImageOperandsMask)(mask | ImageOperandsConstOffsetsMask); - texArgs[numArgs++] = parameters.offsets; + texArgs.push_back(parameters.offsets); } -#ifndef GLSLANG_WEB if (parameters.sample) { mask = (ImageOperandsMask)(mask | ImageOperandsSampleMask); - texArgs[numArgs++] = parameters.sample; + texArgs.push_back(parameters.sample); } if (parameters.lodClamp) { // capability if this bit is used addCapability(CapabilityMinLod); mask = (ImageOperandsMask)(mask | ImageOperandsMinLodMask); - texArgs[numArgs++] = parameters.lodClamp; + texArgs.push_back(parameters.lodClamp); } if (parameters.nonprivate) { mask = mask | ImageOperandsNonPrivateTexelKHRMask; @@ -2111,12 +2917,10 @@ Id Builder::createTextureCall(Decoration precision, Id resultType, bool sparse, if (parameters.volatil) { mask = mask | ImageOperandsVolatileTexelKHRMask; } -#endif mask = mask | signExtensionMask; - if (mask == ImageOperandsMaskNone) - --numArgs; // undo speculative reservation for the mask argument - else - texArgs[optArgNum] = mask; + // insert the operand for the mask, if any bits were set. + if (mask != ImageOperandsMaskNone) + texArgs.insert(texArgs.begin() + optArgNum, mask); // // Set up the instruction @@ -2127,7 +2931,6 @@ Id Builder::createTextureCall(Decoration precision, Id resultType, bool sparse, opCode = OpImageSparseFetch; else opCode = OpImageFetch; -#ifndef GLSLANG_WEB } else if (parameters.granularity && parameters.coarse) { opCode = OpImageSampleFootprintNV; } else if (gather) { @@ -2141,7 +2944,6 @@ Id Builder::createTextureCall(Decoration precision, Id resultType, bool sparse, opCode = OpImageSparseGather; else opCode = OpImageGather; -#endif } else if (explicitLod) { if (parameters.Dref) { if (proj) @@ -2220,11 +3022,11 @@ Id Builder::createTextureCall(Decoration precision, Id resultType, bool sparse, // Build the SPIR-V instruction Instruction* textureInst = new Instruction(getUniqueId(), resultType, opCode); - for (int op = 0; op < optArgNum; ++op) + for (size_t op = 0; op < optArgNum; ++op) textureInst->addIdOperand(texArgs[op]); - if (optArgNum < numArgs) + if (optArgNum < texArgs.size()) textureInst->addImmediateOperand(texArgs[optArgNum]); - for (int op = optArgNum + 1; op < numArgs; ++op) + for (size_t op = optArgNum + 1; op < texArgs.size(); ++op) textureInst->addIdOperand(texArgs[op]); setPrecision(textureInst->getResultId(), precision); buildPoint->addInstruction(std::unique_ptr(textureInst)); @@ -2504,12 +3306,7 @@ Id Builder::createMatrixConstructor(Decoration precision, const std::vector& int numRows = getTypeNumRows(resultTypeId); Instruction* instr = module.getInstruction(componentTypeId); -#ifdef GLSLANG_WEB - const unsigned bitCount = 32; - assert(bitCount == instr->getImmediateOperand(0)); -#else const unsigned bitCount = instr->getImmediateOperand(0); -#endif // Optimize matrix constructed from a bigger matrix if (isMatrix(sources[0]) && getNumColumns(sources[0]) >= numCols && getNumRows(sources[0]) >= numRows) { @@ -2629,7 +3426,7 @@ Builder::If::If(Id cond, unsigned int ctrl, Builder& gb) : builder(gb), condition(cond), control(ctrl), - elseBlock(0) + elseBlock(nullptr) { function = &builder.getBuildPoint()->getParent(); @@ -3271,10 +4068,10 @@ void Builder::dumpSourceInstructions(const spv::Id fileId, const std::string& te const int opSourceWordCount = 4; const int nonNullBytesPerInstruction = 4 * (maxWordCount - opSourceWordCount) - 1; - if (source != SourceLanguageUnknown) { + if (sourceLang != SourceLanguageUnknown) { // OpSource Language Version File Source Instruction sourceInst(NoResult, NoType, OpSource); - sourceInst.addImmediateOperand(source); + sourceInst.addImmediateOperand(sourceLang); sourceInst.addImmediateOperand(sourceVersion); // File operand if (fileId != NoResult) { @@ -3307,6 +4104,7 @@ void Builder::dumpSourceInstructions(const spv::Id fileId, const std::string& te // Dump an OpSource[Continued] sequence for the source and every include file void Builder::dumpSourceInstructions(std::vector& out) const { + if (emitNonSemanticShaderDebugInfo) return; dumpSourceInstructions(sourceFileStringId, sourceText, out); for (auto iItr = includeFiles.begin(); iItr != includeFiles.end(); ++iItr) dumpSourceInstructions(iItr->first, *iItr->second, out); @@ -3329,4 +4127,4 @@ void Builder::dumpModuleProcesses(std::vector& out) const } } -}; // end spv namespace +} // end spv namespace diff --git a/SPIRV/SpvBuilder.h b/SPIRV/SpvBuilder.h index 0d6bce631f..2e1c07d49d 100644 --- a/SPIRV/SpvBuilder.h +++ b/SPIRV/SpvBuilder.h @@ -50,6 +50,10 @@ #include "Logger.h" #include "spirv.hpp" #include "spvIR.h" +namespace spv { + #include "GLSL.ext.KHR.h" + #include "NonSemanticShaderDebugInfo100.h" +} #include #include @@ -82,7 +86,7 @@ class Builder { void setSource(spv::SourceLanguage lang, int version) { - source = lang; + sourceLang = lang; sourceVersion = version; } spv::Id getStringId(const std::string& str) @@ -99,18 +103,32 @@ class Builder { stringIds[file_c_str] = strId; return strId; } - spv::Id getSourceFile() const + spv::Id getSourceFile() const { return sourceFileStringId; } void setSourceFile(const std::string& file) { sourceFileStringId = getStringId(file); + currentFileId = sourceFileStringId; } void setSourceText(const std::string& text) { sourceText = text; } void addSourceExtension(const char* ext) { sourceExtensions.push_back(ext); } void addModuleProcessed(const std::string& p) { moduleProcesses.push_back(p.c_str()); } void setEmitOpLines() { emitOpLines = true; } + void setEmitNonSemanticShaderDebugInfo(bool const emit) + { + emitNonSemanticShaderDebugInfo = emit; + + if(emit) + { + importNonSemanticShaderDebugInfoInstructions(); + } + } + void setEmitNonSemanticShaderDebugSource(bool const src) + { + emitNonSemanticShaderDebugSource = src; + } void addExtension(const char* ext) { extensions.insert(ext); } void removeExtension(const char* ext) { @@ -163,10 +181,11 @@ class Builder { void setLine(int line, const char* filename); // Low-level OpLine. See setLine() for a layered helper. void addLine(Id fileName, int line, int column); + void addDebugScopeAndLine(Id fileName, int line, int column); // For creating new types (will return old type if the requested one was already made). Id makeVoidType(); - Id makeBoolType(); + Id makeBoolType(bool const compilerGenerated = true); Id makePointer(StorageClass, Id pointee); Id makeForwardPointer(StorageClass); Id makePointerFromForwardPointer(StorageClass, Id forwardPointerType, Id pointee); @@ -174,7 +193,7 @@ class Builder { Id makeIntType(int width) { return makeIntegerType(width, true); } Id makeUintType(int width) { return makeIntegerType(width, false); } Id makeFloatType(int width); - Id makeStructType(const std::vector& members, const char*); + Id makeStructType(const std::vector& members, const char* name, bool const compilerGenerated = true); Id makeStructResultType(Id type0, Id type1); Id makeVectorType(Id component, int size); Id makeMatrixType(Id component, int cols, int rows); @@ -184,13 +203,47 @@ class Builder { Id makeImageType(Id sampledType, Dim, bool depth, bool arrayed, bool ms, unsigned sampled, ImageFormat format); Id makeSamplerType(); Id makeSampledImageType(Id imageType); - Id makeCooperativeMatrixType(Id component, Id scope, Id rows, Id cols); + Id makeCooperativeMatrixTypeKHR(Id component, Id scope, Id rows, Id cols, Id use); + Id makeCooperativeMatrixTypeNV(Id component, Id scope, Id rows, Id cols); + Id makeCooperativeMatrixTypeWithSameShape(Id component, Id otherType); Id makeGenericType(spv::Op opcode, std::vector& operands); + // SPIR-V NonSemantic Shader DebugInfo Instructions + struct DebugTypeLoc { + std::string name {}; + int line {0}; + int column {0}; + }; + std::unordered_map debugTypeLocs; + Id makeDebugInfoNone(); + Id makeBoolDebugType(int const size); + Id makeIntegerDebugType(int const width, bool const hasSign); + Id makeFloatDebugType(int const width); + Id makeSequentialDebugType(Id const baseType, Id const componentCount, NonSemanticShaderDebugInfo100Instructions const sequenceType); + Id makeArrayDebugType(Id const baseType, Id const componentCount); + Id makeVectorDebugType(Id const baseType, int const componentCount); + Id makeMatrixDebugType(Id const vectorType, int const vectorCount, bool columnMajor = true); + Id makeMemberDebugType(Id const memberType, DebugTypeLoc const& debugTypeLoc); + Id makeCompositeDebugType(std::vector const& memberTypes, char const*const name, + NonSemanticShaderDebugInfo100DebugCompositeType const tag, bool const isOpaqueType = false); + Id makeDebugSource(const Id fileName); + Id makeDebugCompilationUnit(); + Id createDebugGlobalVariable(Id const type, char const*const name, Id const variable); + Id createDebugLocalVariable(Id type, char const*const name, size_t const argNumber = 0); + Id makeDebugExpression(); + Id makeDebugDeclare(Id const debugLocalVariable, Id const localVariable); + Id makeDebugValue(Id const debugLocalVariable, Id const value); + Id makeDebugFunctionType(Id returnType, const std::vector& paramTypes); + Id makeDebugFunction(Function* function, Id nameId, Id funcTypeId); + Id makeDebugLexicalBlock(uint32_t line); + std::string unmangleFunctionName(std::string const& name) const; + // accelerationStructureNV type Id makeAccelerationStructureType(); // rayQueryEXT type Id makeRayQueryType(); + // hitObjectNV type + Id makeHitObjectNVType(); // For querying about types. Id getTypeId(Id resultId) const { return module.getTypeId(resultId); } @@ -208,6 +261,7 @@ class Builder { ImageFormat getImageTypeFormat(Id typeId) const { return (ImageFormat)module.getInstruction(typeId)->getImmediateOperand(6); } Id getResultingAccessChainType() const; + Id getIdOperand(Id resultId, int idx) { return module.getInstruction(resultId)->getIdOperand(idx); } bool isPointer(Id resultId) const { return isPointerType(getTypeId(resultId)); } bool isScalar(Id resultId) const { return isScalarType(getTypeId(resultId)); } @@ -232,11 +286,10 @@ class Builder { bool isMatrixType(Id typeId) const { return getTypeClass(typeId) == OpTypeMatrix; } bool isStructType(Id typeId) const { return getTypeClass(typeId) == OpTypeStruct; } bool isArrayType(Id typeId) const { return getTypeClass(typeId) == OpTypeArray; } -#ifdef GLSLANG_WEB - bool isCooperativeMatrixType(Id typeId)const { return false; } -#else - bool isCooperativeMatrixType(Id typeId)const { return getTypeClass(typeId) == OpTypeCooperativeMatrixNV; } -#endif + bool isCooperativeMatrixType(Id typeId)const + { + return getTypeClass(typeId) == OpTypeCooperativeMatrixKHR || getTypeClass(typeId) == OpTypeCooperativeMatrixNV; + } bool isAggregateType(Id typeId) const { return isArrayType(typeId) || isStructType(typeId) || isCooperativeMatrixType(typeId); } bool isImageType(Id typeId) const { return getTypeClass(typeId) == OpTypeImage; } @@ -261,6 +314,8 @@ class Builder { // See if a resultId is valid for use as an initializer. bool isValidInitializer(Id resultId) const { return isConstant(resultId) || isGlobalVariable(resultId); } + bool isRayTracingOpCode(Op opcode) const; + int getScalarTypeWidth(Id typeId) const { Id scalarTypeId = getScalarTypeId(typeId); @@ -322,6 +377,8 @@ class Builder { Id makeFloat16Constant(float f16, bool specConstant = false); Id makeFpConstant(Id type, double d, bool specConstant = false); + Id importNonSemanticShaderDebugInfoInstructions(); + // Turn the array of constants into a proper spv constant of the requested type. Id makeCompositeConstant(Id type, const std::vector& comps, bool specConst = false); @@ -336,6 +393,7 @@ class Builder { void addDecoration(Id, Decoration, const char*); void addDecoration(Id, Decoration, const std::vector& literals); void addDecoration(Id, Decoration, const std::vector& strings); + void addLinkageDecoration(Id id, const char* name, spv::LinkageType linkType); void addDecorationId(Id id, Decoration, Id idDecoration); void addDecorationId(Id id, Decoration, const std::vector& operandIds); void addMemberDecoration(Id, unsigned int member, Decoration, int num = -1); @@ -344,7 +402,12 @@ class Builder { void addMemberDecoration(Id, unsigned int member, Decoration, const std::vector& strings); // At the end of what block do the next create*() instructions go? - void setBuildPoint(Block* bp) { buildPoint = bp; } + // Also reset current last DebugScope and current source line to unknown + void setBuildPoint(Block* bp) { + buildPoint = bp; + lastDebugScopeId = NoResult; + currentLine = 0; + } Block* getBuildPoint() const { return buildPoint; } // Make the entry-point function. The returned pointer is only valid @@ -355,12 +418,23 @@ class Builder { // Return the function, pass back the entry. // The returned pointer is only valid for the lifetime of this builder. Function* makeFunctionEntry(Decoration precision, Id returnType, const char* name, - const std::vector& paramTypes, const std::vector>& precisions, Block **entry = 0); + LinkageType linkType, const std::vector& paramTypes, + const std::vector& paramNames, + const std::vector>& precisions, Block **entry = nullptr); // Create a return. An 'implicit' return is one not appearing in the source // code. In the case of an implicit return, no post-return block is inserted. void makeReturn(bool implicit, Id retVal = 0); + // Initialize state and generate instructions for new lexical scope + void enterScope(uint32_t line); + + // Set state and generate instructions to exit current lexical scope + void leaveScope(); + + // Prepare builder for generation of instructions for a function. + void enterFunction(Function const* function); + // Generate all the code needed to finish up a function. void leaveFunction(); @@ -368,9 +442,13 @@ class Builder { // discard, terminate-invocation, terminateRayEXT, or ignoreIntersectionEXT void makeStatementTerminator(spv::Op opcode, const char *name); + // Create block terminator instruction for statements that have input operands + // such as OpEmitMeshTasksEXT + void makeStatementTerminator(spv::Op opcode, const std::vector& operands, const char* name); + // Create a global or function local or IO variable. - Id createVariable(Decoration precision, StorageClass, Id type, const char* name = nullptr, - Id initializer = NoResult); + Id createVariable(Decoration precision, StorageClass storageClass, Id type, const char* name = nullptr, + Id initializer = NoResult, bool const compilerGenerated = true); // Create an intermediate with an undefined value. Id createUndefined(Id type); @@ -390,8 +468,10 @@ class Builder { // Create an OpArrayLength instruction Id createArrayLength(Id base, unsigned int member); + // Create an OpCooperativeMatrixLengthKHR instruction + Id createCooperativeMatrixLengthKHR(Id type); // Create an OpCooperativeMatrixLengthNV instruction - Id createCooperativeMatrixLength(Id type); + Id createCooperativeMatrixLengthNV(Id type); // Create an OpCompositeExtract instruction Id createCompositeExtract(Id composite, Id typeId, unsigned index); @@ -626,11 +706,6 @@ class Builder { // Accumulate whether anything in the chain of structures has coherent decorations. struct CoherentFlags { CoherentFlags() { clear(); } -#ifdef GLSLANG_WEB - void clear() { } - bool isVolatile() const { return false; } - CoherentFlags operator |=(const CoherentFlags &other) { return *this; } -#else bool isVolatile() const { return volatil; } bool isNonUniform() const { return nonUniform; } bool anyCoherent() const { @@ -675,7 +750,6 @@ class Builder { nonUniform |= other.nonUniform; return *this; } -#endif }; CoherentFlags coherentFlags; }; @@ -756,19 +830,17 @@ class Builder { // Add capabilities, extensions, remove unneeded decorations, etc., // based on the resulting SPIR-V. - void postProcess(); + void postProcess(bool compileOnly); // Prune unreachable blocks in the CFG and remove unneeded decorations. void postProcessCFG(); -#ifndef GLSLANG_WEB // Add capabilities, extensions based on instructions in the module. void postProcessFeatures(); // Hook to visit each instruction in a block in a function void postProcess(Instruction&); // Hook to visit each non-32-bit sized float/int operation in a block. void postProcessType(const Instruction&, spv::Id typeId); -#endif void dump(std::vector&) const; @@ -805,13 +877,23 @@ class Builder { const; unsigned int spvVersion; // the version of SPIR-V to emit in the header - SourceLanguage source; + SourceLanguage sourceLang; int sourceVersion; spv::Id sourceFileStringId; + spv::Id nonSemanticShaderCompilationUnitId {0}; + spv::Id nonSemanticShaderDebugInfo {0}; + spv::Id debugInfoNone {0}; + spv::Id debugExpression {0}; // Debug expression with zero operations. std::string sourceText; int currentLine; const char* currentFile; + spv::Id currentFileId; + std::stack currentDebugScopeId; + spv::Id lastDebugScopeId; bool emitOpLines; + bool emitNonSemanticShaderDebugInfo; + bool restoreNonSemanticShaderDebugInfo; + bool emitNonSemanticShaderDebugSource; std::set extensions; std::vector sourceExtensions; std::vector moduleProcesses; @@ -845,6 +927,8 @@ class Builder { std::unordered_map> groupedStructConstants; // map type opcodes to type instructions std::unordered_map> groupedTypes; + // map type opcodes to debug type instructions + std::unordered_map> groupedDebugTypes; // list of OpConstantNull instructions std::vector nullConstants; @@ -860,6 +944,12 @@ class Builder { // map from include file name ids to their contents std::map includeFiles; + // map from core id to debug id + std::map debugId; + + // map from file name string id to DebugSource id + std::unordered_map debugSourceId; + // The stream for outputting warnings and errors. SpvBuildLogger* logger; }; // end Builder class diff --git a/SPIRV/SpvPostProcess.cpp b/SPIRV/SpvPostProcess.cpp index dd6dabce0d..13001a67a1 100644 --- a/SPIRV/SpvPostProcess.cpp +++ b/SPIRV/SpvPostProcess.cpp @@ -52,11 +52,12 @@ namespace spv { #include "GLSL.ext.EXT.h" #include "GLSL.ext.AMD.h" #include "GLSL.ext.NV.h" + #include "GLSL.ext.ARM.h" + #include "GLSL.ext.QCOM.h" } namespace spv { -#ifndef GLSLANG_WEB // Hook to visit each operand type and result type of an instruction. // Will be called multiple times for one instruction, once for each typed // operand and the result. @@ -333,7 +334,6 @@ void Builder::postProcess(Instruction& inst) } } } -#endif // comment in header void Builder::postProcessCFG() @@ -394,7 +394,6 @@ void Builder::postProcessCFG() decorations.end()); } -#ifndef GLSLANG_WEB // comment in header void Builder::postProcessFeatures() { // Add per-instruction capabilities, extensions, etc., @@ -482,14 +481,15 @@ void Builder::postProcessFeatures() { } } } -#endif // comment in header -void Builder::postProcess() { - postProcessCFG(); -#ifndef GLSLANG_WEB - postProcessFeatures(); -#endif +void Builder::postProcess(bool compileOnly) +{ + // postProcessCFG needs an entrypoint to determine what is reachable, but if we are not creating an "executable" shader, we don't have an entrypoint + if (!compileOnly) + postProcessCFG(); + + postProcessFeatures(); } }; // end spv namespace diff --git a/SPIRV/SpvTools.cpp b/SPIRV/SpvTools.cpp index 8cc17cca93..ff04f4f967 100644 --- a/SPIRV/SpvTools.cpp +++ b/SPIRV/SpvTools.cpp @@ -212,7 +212,7 @@ void SpirvToolsTransform(const glslang::TIntermediate& intermediate, std::vector optimizer.RegisterPass(spvtools::CreateInterpolateFixupPass()); if (options->optimizeSize) { optimizer.RegisterPass(spvtools::CreateRedundancyEliminationPass()); - optimizer.RegisterPass(spvtools::CreateEliminateDeadInputComponentsPass()); + optimizer.RegisterPass(spvtools::CreateEliminateDeadInputComponentsSafePass()); } optimizer.RegisterPass(spvtools::CreateAggressiveDCEPass()); optimizer.RegisterPass(spvtools::CreateCFGCleanupPass()); @@ -223,6 +223,56 @@ void SpirvToolsTransform(const glslang::TIntermediate& intermediate, std::vector optimizer.Run(spirv.data(), spirv.size(), &spirv, spvOptOptions); } +bool SpirvToolsAnalyzeDeadOutputStores(spv_target_env target_env, std::vector& spirv, + std::unordered_set* live_locs, + std::unordered_set* live_builtins, + spv::SpvBuildLogger*) +{ + spvtools::Optimizer optimizer(target_env); + optimizer.SetMessageConsumer(OptimizerMesssageConsumer); + + optimizer.RegisterPass(spvtools::CreateAnalyzeLiveInputPass(live_locs, live_builtins)); + + spvtools::OptimizerOptions spvOptOptions; + optimizer.SetTargetEnv(target_env); + spvOptOptions.set_run_validator(false); + return optimizer.Run(spirv.data(), spirv.size(), &spirv, spvOptOptions); +} + +void SpirvToolsEliminateDeadOutputStores(spv_target_env target_env, std::vector& spirv, + std::unordered_set* live_locs, + std::unordered_set* live_builtins, + spv::SpvBuildLogger*) +{ + spvtools::Optimizer optimizer(target_env); + optimizer.SetMessageConsumer(OptimizerMesssageConsumer); + + optimizer.RegisterPass(spvtools::CreateEliminateDeadOutputStoresPass(live_locs, live_builtins)); + optimizer.RegisterPass(spvtools::CreateAggressiveDCEPass(false, true)); + optimizer.RegisterPass(spvtools::CreateEliminateDeadOutputComponentsPass()); + optimizer.RegisterPass(spvtools::CreateAggressiveDCEPass(false, true)); + + spvtools::OptimizerOptions spvOptOptions; + optimizer.SetTargetEnv(target_env); + spvOptOptions.set_run_validator(false); + optimizer.Run(spirv.data(), spirv.size(), &spirv, spvOptOptions); +} + +void SpirvToolsEliminateDeadInputComponents(spv_target_env target_env, std::vector& spirv, + spv::SpvBuildLogger*) +{ + spvtools::Optimizer optimizer(target_env); + optimizer.SetMessageConsumer(OptimizerMesssageConsumer); + + optimizer.RegisterPass(spvtools::CreateEliminateDeadInputComponentsPass()); + optimizer.RegisterPass(spvtools::CreateAggressiveDCEPass()); + + spvtools::OptimizerOptions spvOptOptions; + optimizer.SetTargetEnv(target_env); + spvOptOptions.set_run_validator(false); + optimizer.Run(spirv.data(), spirv.size(), &spirv, spvOptOptions); +} + // 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. diff --git a/SPIRV/SpvTools.h b/SPIRV/SpvTools.h index 3fb3cbacd3..a4ce11b887 100644 --- a/SPIRV/SpvTools.h +++ b/SPIRV/SpvTools.h @@ -53,18 +53,22 @@ namespace glslang { struct SpvOptions { - SpvOptions() : generateDebugInfo(false), stripDebugInfo(false), disableOptimizer(true), - optimizeSize(false), disassemble(false), validate(false) { } - bool generateDebugInfo; - bool stripDebugInfo; - bool disableOptimizer; - bool optimizeSize; - bool disassemble; - bool validate; + bool generateDebugInfo {false}; + bool stripDebugInfo {false}; + bool disableOptimizer {true}; + bool optimizeSize {false}; + bool disassemble {false}; + bool validate {false}; + bool emitNonSemanticShaderDebugInfo {false}; + bool emitNonSemanticShaderDebugSource{ false }; + bool compileOnly{false}; }; #if ENABLE_OPT +// Translate glslang's view of target versioning to what SPIRV-Tools uses. +spv_target_env MapToSpirvToolsEnv(const SpvVersion& spvVersion, 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& spirv); @@ -80,6 +84,22 @@ void SpirvToolsValidate(const glslang::TIntermediate& intermediate, std::vector< void SpirvToolsTransform(const glslang::TIntermediate& intermediate, std::vector& 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& 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& spirv, + std::unordered_set* live_locs, + std::unordered_set* 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& spirv, + std::unordered_set* live_locs, + std::unordered_set* 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. diff --git a/SPIRV/disassemble.cpp b/SPIRV/disassemble.cpp index 74dd605409..c5e961cf02 100644 --- a/SPIRV/disassemble.cpp +++ b/SPIRV/disassemble.cpp @@ -54,6 +54,9 @@ namespace spv { #include "GLSL.std.450.h" #include "GLSL.ext.AMD.h" #include "GLSL.ext.NV.h" + #include "GLSL.ext.ARM.h" + #include "NonSemanticShaderDebugInfo100.h" + #include "GLSL.ext.QCOM.h" } } const char* GlslStd450DebugNames[spv::GLSLstd450Count]; @@ -62,6 +65,7 @@ namespace spv { static const char* GLSLextAMDGetDebugNames(const char*, unsigned); static const char* GLSLextNVGetDebugNames(const char*, unsigned); +static const char* NonSemanticShaderDebugInfo100GetDebugNames(unsigned); static void Kill(std::ostream& out, const char* message) { @@ -76,6 +80,7 @@ enum ExtInstSet { GLSLextNVInst, OpenCLExtInst, NonSemanticDebugPrintfExtInst, + NonSemanticShaderDebugInfo100 }; // Container class for a single instance of a SPIR-V stream, with methods for disassembly. @@ -501,6 +506,8 @@ void SpirvStream::disassembleInstruction(Id resultId, Id /*typeId*/, Op opCode, extInstSet = OpenCLExtInst; } else if (strcmp("NonSemantic.DebugPrintf", name) == 0) { extInstSet = NonSemanticDebugPrintfExtInst; + } else if (strcmp("NonSemantic.Shader.DebugInfo.100", name) == 0) { + extInstSet = NonSemanticShaderDebugInfo100; } else if (strcmp(spv::E_SPV_AMD_shader_ballot, name) == 0 || strcmp(spv::E_SPV_AMD_shader_trinary_minmax, name) == 0 || strcmp(spv::E_SPV_AMD_shader_explicit_vertex_parameter, name) == 0 || @@ -509,7 +516,7 @@ void SpirvStream::disassembleInstruction(Id resultId, Id /*typeId*/, Op opCode, } else if (strcmp(spv::E_SPV_NV_sample_mask_override_coverage, name) == 0 || strcmp(spv::E_SPV_NV_geometry_shader_passthrough, name) == 0 || strcmp(spv::E_SPV_NV_viewport_array2, name) == 0 || - strcmp(spv::E_SPV_NVX_multiview_per_view_attributes, name) == 0 || + strcmp(spv::E_SPV_NVX_multiview_per_view_attributes, name) == 0 || strcmp(spv::E_SPV_NV_fragment_shader_barycentric, name) == 0 || strcmp(spv::E_SPV_NV_mesh_shader, name) == 0) { extInstSet = GLSLextNVInst; @@ -526,6 +533,8 @@ void SpirvStream::disassembleInstruction(Id resultId, Id /*typeId*/, Op opCode, out << "(" << GLSLextNVGetDebugNames(name, entrypoint) << ")"; } else if (extInstSet == NonSemanticDebugPrintfExtInst) { out << "(DebugPrintf)"; + } else if (extInstSet == NonSemanticShaderDebugInfo100) { + out << "(" << NonSemanticShaderDebugInfo100GetDebugNames(entrypoint) << ")"; } } break; @@ -749,6 +758,59 @@ static const char* GLSLextNVGetDebugNames(const char* name, unsigned entrypoint) return "Bad"; } +static const char* NonSemanticShaderDebugInfo100GetDebugNames(unsigned entrypoint) +{ + switch (entrypoint) { + case NonSemanticShaderDebugInfo100DebugInfoNone: return "DebugInfoNone"; + case NonSemanticShaderDebugInfo100DebugCompilationUnit: return "DebugCompilationUnit"; + case NonSemanticShaderDebugInfo100DebugTypeBasic: return "DebugTypeBasic"; + case NonSemanticShaderDebugInfo100DebugTypePointer: return "DebugTypePointer"; + case NonSemanticShaderDebugInfo100DebugTypeQualifier: return "DebugTypeQualifier"; + case NonSemanticShaderDebugInfo100DebugTypeArray: return "DebugTypeArray"; + case NonSemanticShaderDebugInfo100DebugTypeVector: return "DebugTypeVector"; + case NonSemanticShaderDebugInfo100DebugTypedef: return "DebugTypedef"; + case NonSemanticShaderDebugInfo100DebugTypeFunction: return "DebugTypeFunction"; + case NonSemanticShaderDebugInfo100DebugTypeEnum: return "DebugTypeEnum"; + case NonSemanticShaderDebugInfo100DebugTypeComposite: return "DebugTypeComposite"; + case NonSemanticShaderDebugInfo100DebugTypeMember: return "DebugTypeMember"; + case NonSemanticShaderDebugInfo100DebugTypeInheritance: return "DebugTypeInheritance"; + case NonSemanticShaderDebugInfo100DebugTypePtrToMember: return "DebugTypePtrToMember"; + case NonSemanticShaderDebugInfo100DebugTypeTemplate: return "DebugTypeTemplate"; + case NonSemanticShaderDebugInfo100DebugTypeTemplateParameter: return "DebugTypeTemplateParameter"; + case NonSemanticShaderDebugInfo100DebugTypeTemplateTemplateParameter: return "DebugTypeTemplateTemplateParameter"; + case NonSemanticShaderDebugInfo100DebugTypeTemplateParameterPack: return "DebugTypeTemplateParameterPack"; + case NonSemanticShaderDebugInfo100DebugGlobalVariable: return "DebugGlobalVariable"; + case NonSemanticShaderDebugInfo100DebugFunctionDeclaration: return "DebugFunctionDeclaration"; + case NonSemanticShaderDebugInfo100DebugFunction: return "DebugFunction"; + case NonSemanticShaderDebugInfo100DebugLexicalBlock: return "DebugLexicalBlock"; + case NonSemanticShaderDebugInfo100DebugLexicalBlockDiscriminator: return "DebugLexicalBlockDiscriminator"; + case NonSemanticShaderDebugInfo100DebugScope: return "DebugScope"; + case NonSemanticShaderDebugInfo100DebugNoScope: return "DebugNoScope"; + case NonSemanticShaderDebugInfo100DebugInlinedAt: return "DebugInlinedAt"; + case NonSemanticShaderDebugInfo100DebugLocalVariable: return "DebugLocalVariable"; + case NonSemanticShaderDebugInfo100DebugInlinedVariable: return "DebugInlinedVariable"; + case NonSemanticShaderDebugInfo100DebugDeclare: return "DebugDeclare"; + case NonSemanticShaderDebugInfo100DebugValue: return "DebugValue"; + case NonSemanticShaderDebugInfo100DebugOperation: return "DebugOperation"; + case NonSemanticShaderDebugInfo100DebugExpression: return "DebugExpression"; + case NonSemanticShaderDebugInfo100DebugMacroDef: return "DebugMacroDef"; + case NonSemanticShaderDebugInfo100DebugMacroUndef: return "DebugMacroUndef"; + case NonSemanticShaderDebugInfo100DebugImportedEntity: return "DebugImportedEntity"; + case NonSemanticShaderDebugInfo100DebugSource: return "DebugSource"; + case NonSemanticShaderDebugInfo100DebugFunctionDefinition: return "DebugFunctionDefinition"; + case NonSemanticShaderDebugInfo100DebugSourceContinued: return "DebugSourceContinued"; + case NonSemanticShaderDebugInfo100DebugLine: return "DebugLine"; + case NonSemanticShaderDebugInfo100DebugNoLine: return "DebugNoLine"; + case NonSemanticShaderDebugInfo100DebugBuildIdentifier: return "DebugBuildIdentifier"; + case NonSemanticShaderDebugInfo100DebugStoragePath: return "DebugStoragePath"; + case NonSemanticShaderDebugInfo100DebugEntryPoint: return "DebugEntryPoint"; + case NonSemanticShaderDebugInfo100DebugTypeMatrix: return "DebugTypeMatrix"; + default: return "Bad"; + } + + return "Bad"; +} + void Disassemble(std::ostream& out, const std::vector& stream) { SpirvStream SpirvStream(out, stream); diff --git a/SPIRV/doc.cpp b/SPIRV/doc.cpp old mode 100644 new mode 100755 index 9cc26541dc..53ce9e152b --- a/SPIRV/doc.cpp +++ b/SPIRV/doc.cpp @@ -45,6 +45,7 @@ #include #include #include +#include namespace spv { extern "C" { @@ -53,6 +54,8 @@ namespace spv { #include "GLSL.ext.EXT.h" #include "GLSL.ext.AMD.h" #include "GLSL.ext.NV.h" + #include "GLSL.ext.ARM.h" + #include "GLSL.ext.QCOM.h" } } @@ -97,6 +100,8 @@ const char* ExecutionModelString(int model) case 6: return "Kernel"; case ExecutionModelTaskNV: return "TaskNV"; case ExecutionModelMeshNV: return "MeshNV"; + case ExecutionModelTaskEXT: return "TaskEXT"; + case ExecutionModelMeshEXT: return "MeshEXT"; default: return "Bad"; @@ -212,6 +217,10 @@ const char* ExecutionModeString(int mode) case ExecutionModeNoGlobalOffsetINTEL: return "NoGlobalOffsetINTEL"; case ExecutionModeNumSIMDWorkitemsINTEL: return "NumSIMDWorkitemsINTEL"; + case ExecutionModeNonCoherentColorAttachmentReadEXT: return "NonCoherentColorAttachmentReadEXT"; + case ExecutionModeNonCoherentDepthAttachmentReadEXT: return "NonCoherentDepthAttachmentReadEXT"; + case ExecutionModeNonCoherentStencilAttachmentReadEXT: return "NonCoherentStencilAttachmentReadEXT"; + case ExecutionModeCeiling: default: return "Bad"; } @@ -242,7 +251,9 @@ const char* StorageClassString(int StorageClass) case StorageClassIncomingCallableDataKHR: return "IncomingCallableDataKHR"; case StorageClassPhysicalStorageBufferEXT: return "PhysicalStorageBufferEXT"; - + case StorageClassTaskPayloadWorkgroupEXT: return "TaskPayloadWorkgroupEXT"; + case StorageClassHitObjectAttributeNV: return "HitObjectAttributeNV"; + case StorageClassTileImageEXT: return "TileImageEXT"; default: return "Bad"; } } @@ -301,7 +312,9 @@ const char* DecorationString(int decoration) case DecorationCeiling: default: return "Bad"; - case DecorationExplicitInterpAMD: return "ExplicitInterpAMD"; + case DecorationWeightTextureQCOM: return "DecorationWeightTextureQCOM"; + case DecorationBlockMatchTextureQCOM: return "DecorationBlockMatchTextureQCOM"; + case DecorationExplicitInterpAMD: return "ExplicitInterpAMD"; case DecorationOverrideCoverageNV: return "OverrideCoverageNV"; case DecorationPassthroughNV: return "PassthroughNV"; case DecorationViewportRelativeNV: return "ViewportRelativeNV"; @@ -309,7 +322,7 @@ const char* DecorationString(int decoration) case DecorationPerPrimitiveNV: return "PerPrimitiveNV"; case DecorationPerViewNV: return "PerViewNV"; case DecorationPerTaskNV: return "PerTaskNV"; - + case DecorationPerVertexKHR: return "PerVertexKHR"; case DecorationNonUniformEXT: return "DecorationNonUniformEXT"; @@ -317,6 +330,8 @@ const char* DecorationString(int decoration) case DecorationHlslSemanticGOOGLE: return "DecorationHlslSemanticGOOGLE"; case DecorationRestrictPointerEXT: return "DecorationRestrictPointerEXT"; case DecorationAliasedPointerEXT: return "DecorationAliasedPointerEXT"; + + case DecorationHitObjectShaderRecordBufferNV: return "DecorationHitObjectShaderRecordBufferNV"; } } @@ -398,6 +413,11 @@ const char* BuiltInString(int builtIn) case BuiltInRayTminKHR: return "RayTminKHR"; case BuiltInRayTmaxKHR: return "RayTmaxKHR"; case BuiltInCullMaskKHR: return "CullMaskKHR"; + case BuiltInHitTriangleVertexPositionsKHR: return "HitTriangleVertexPositionsKHR"; + case BuiltInHitMicroTriangleVertexPositionsNV: return "HitMicroTriangleVertexPositionsNV"; + case BuiltInHitMicroTriangleVertexBarycentricsNV: return "HitMicroTriangleVertexBarycentricsNV"; + case BuiltInHitKindFrontFacingMicroTriangleNV: return "HitKindFrontFacingMicroTriangleNV"; + case BuiltInHitKindBackFacingMicroTriangleNV: return "HitKindBackFacingMicroTriangleNV"; case BuiltInInstanceCustomIndexKHR: return "InstanceCustomIndexKHR"; case BuiltInRayGeometryIndexKHR: return "RayGeometryIndexKHR"; case BuiltInObjectToWorldKHR: return "ObjectToWorldKHR"; @@ -433,6 +453,15 @@ const char* BuiltInString(int builtIn) case BuiltInWarpIDNV: return "WarpIDNV"; case BuiltInSMIDNV: return "SMIDNV"; case BuiltInCurrentRayTimeNV: return "CurrentRayTimeNV"; + case BuiltInPrimitivePointIndicesEXT: return "PrimitivePointIndicesEXT"; + case BuiltInPrimitiveLineIndicesEXT: return "PrimitiveLineIndicesEXT"; + case BuiltInPrimitiveTriangleIndicesEXT: return "PrimitiveTriangleIndicesEXT"; + case BuiltInCullPrimitiveEXT: return "CullPrimitiveEXT"; + case BuiltInCoreCountARM: return "CoreCountARM"; + case BuiltInCoreIDARM: return "CoreIDARM"; + case BuiltInCoreMaxIDARM: return "CoreMaxIDARM"; + case BuiltInWarpIDARM: return "WarpIDARM"; + case BuiltInWarpMaxIDARM: return "BuiltInWarpMaxIDARM"; default: return "Bad"; } @@ -448,6 +477,7 @@ const char* DimensionString(int dim) case 4: return "Rect"; case 5: return "Buffer"; case 6: return "SubpassData"; + case DimTileImageDataEXT: return "TileImageDataEXT"; default: return "Bad"; } @@ -562,7 +592,7 @@ const char* ImageChannelOrderString(int format) case 17: return "sRGBA"; case 18: return "sBGRA"; - default: + default: return "Bad"; } } @@ -767,6 +797,21 @@ const char* MemoryAccessString(int mem) } } +const int CooperativeMatrixOperandsCeiling = 6; + +const char* CooperativeMatrixOperandsString(int op) +{ + switch (op) { + case CooperativeMatrixOperandsMatrixASignedComponentsShift: return "ASignedComponents"; + case CooperativeMatrixOperandsMatrixBSignedComponentsShift: return "BSignedComponents"; + case CooperativeMatrixOperandsMatrixCSignedComponentsShift: return "CSignedComponents"; + case CooperativeMatrixOperandsMatrixResultSignedComponentsShift: return "ResultSignedComponents"; + case CooperativeMatrixOperandsSaturatingAccumulationShift: return "SaturatingAccumulation"; + + default: return "Bad"; + } +} + const char* ScopeString(int mem) { switch (mem) { @@ -848,7 +893,7 @@ const char* CapabilityString(int info) case 22: return "Int16"; case 23: return "TessellationPointSize"; case 24: return "GeometryPointSize"; - case 25: return "ImageGatherExtended"; + case 25: return "ImageGatherExtended"; case 26: return "Bad"; case 27: return "StorageImageMultisample"; case 28: return "UniformBufferArrayDynamicIndexing"; @@ -935,11 +980,16 @@ const char* CapabilityString(int info) case CapabilityRayQueryKHR: return "RayQueryKHR"; case CapabilityRayTracingProvisionalKHR: return "RayTracingProvisionalKHR"; case CapabilityRayTraversalPrimitiveCullingKHR: return "RayTraversalPrimitiveCullingKHR"; + case CapabilityRayTracingPositionFetchKHR: return "RayTracingPositionFetchKHR"; + case CapabilityDisplacementMicromapNV: return "DisplacementMicromapNV"; + case CapabilityRayTracingDisplacementMicromapNV: return "CapabilityRayTracingDisplacementMicromapNV"; + case CapabilityRayQueryPositionFetchKHR: return "RayQueryPositionFetchKHR"; case CapabilityComputeDerivativeGroupQuadsNV: return "ComputeDerivativeGroupQuadsNV"; case CapabilityComputeDerivativeGroupLinearNV: return "ComputeDerivativeGroupLinearNV"; case CapabilityFragmentBarycentricKHR: return "FragmentBarycentricKHR"; case CapabilityMeshShadingNV: return "MeshShadingNV"; case CapabilityImageFootprintNV: return "ImageFootprintNV"; + case CapabilityMeshShadingEXT: return "MeshShadingEXT"; // case CapabilityShadingRateNV: return "ShadingRateNV"; // superseded by FragmentDensityEXT case CapabilitySampleMaskOverrideCoverageNV: return "SampleMaskOverrideCoverageNV"; case CapabilityFragmentDensityEXT: return "FragmentDensityEXT"; @@ -967,12 +1017,17 @@ const char* CapabilityString(int info) case CapabilityVariablePointers: return "VariablePointers"; case CapabilityCooperativeMatrixNV: return "CooperativeMatrixNV"; + case CapabilityCooperativeMatrixKHR: return "CooperativeMatrixKHR"; case CapabilityShaderSMBuiltinsNV: return "ShaderSMBuiltinsNV"; case CapabilityFragmentShaderSampleInterlockEXT: return "CapabilityFragmentShaderSampleInterlockEXT"; case CapabilityFragmentShaderPixelInterlockEXT: return "CapabilityFragmentShaderPixelInterlockEXT"; case CapabilityFragmentShaderShadingRateInterlockEXT: return "CapabilityFragmentShaderShadingRateInterlockEXT"; + case CapabilityTileImageColorReadAccessEXT: return "TileImageColorReadAccessEXT"; + case CapabilityTileImageDepthReadAccessEXT: return "TileImageDepthReadAccessEXT"; + case CapabilityTileImageStencilReadAccessEXT: return "TileImageStencilReadAccessEXT"; + case CapabilityFragmentShadingRateKHR: return "FragmentShadingRateKHR"; case CapabilityDemoteToHelperInvocationEXT: return "DemoteToHelperInvocationEXT"; @@ -991,6 +1046,13 @@ const char* CapabilityString(int info) case CapabilityWorkgroupMemoryExplicitLayoutKHR: return "CapabilityWorkgroupMemoryExplicitLayoutKHR"; case CapabilityWorkgroupMemoryExplicitLayout8BitAccessKHR: return "CapabilityWorkgroupMemoryExplicitLayout8BitAccessKHR"; case CapabilityWorkgroupMemoryExplicitLayout16BitAccessKHR: return "CapabilityWorkgroupMemoryExplicitLayout16BitAccessKHR"; + case CapabilityCoreBuiltinsARM: return "CoreBuiltinsARM"; + + case CapabilityShaderInvocationReorderNV: return "ShaderInvocationReorderNV"; + + case CapabilityTextureSampleWeightedQCOM: return "TextureSampleWeightedQCOM"; + case CapabilityTextureBoxFilterQCOM: return "TextureBoxFilterQCOM"; + case CapabilityTextureBlockMatchQCOM: return "TextureBlockMatchQCOM"; default: return "Bad"; } @@ -1407,6 +1469,8 @@ const char* OpcodeString(int op) case OpGroupNonUniformPartitionNV: return "OpGroupNonUniformPartitionNV"; case OpImageSampleFootprintNV: return "OpImageSampleFootprintNV"; case OpWritePackedPrimitiveIndices4x8NV: return "OpWritePackedPrimitiveIndices4x8NV"; + case OpEmitMeshTasksEXT: return "OpEmitMeshTasksEXT"; + case OpSetMeshOutputsEXT: return "OpSetMeshOutputsEXT"; case OpTypeRayQueryKHR: return "OpTypeRayQueryKHR"; case OpRayQueryInitializeKHR: return "OpRayQueryInitializeKHR"; @@ -1432,18 +1496,70 @@ const char* OpcodeString(int op) case OpRayQueryGetWorldRayOriginKHR: return "OpRayQueryGetWorldRayOriginKHR"; case OpRayQueryGetIntersectionObjectToWorldKHR: return "OpRayQueryGetIntersectionObjectToWorldKHR"; case OpRayQueryGetIntersectionWorldToObjectKHR: return "OpRayQueryGetIntersectionWorldToObjectKHR"; + case OpRayQueryGetIntersectionTriangleVertexPositionsKHR: return "OpRayQueryGetIntersectionTriangleVertexPositionsKHR"; case OpTypeCooperativeMatrixNV: return "OpTypeCooperativeMatrixNV"; case OpCooperativeMatrixLoadNV: return "OpCooperativeMatrixLoadNV"; case OpCooperativeMatrixStoreNV: return "OpCooperativeMatrixStoreNV"; case OpCooperativeMatrixMulAddNV: return "OpCooperativeMatrixMulAddNV"; case OpCooperativeMatrixLengthNV: return "OpCooperativeMatrixLengthNV"; + case OpTypeCooperativeMatrixKHR: return "OpTypeCooperativeMatrixKHR"; + case OpCooperativeMatrixLoadKHR: return "OpCooperativeMatrixLoadKHR"; + case OpCooperativeMatrixStoreKHR: return "OpCooperativeMatrixStoreKHR"; + case OpCooperativeMatrixMulAddKHR: return "OpCooperativeMatrixMulAddKHR"; + case OpCooperativeMatrixLengthKHR: return "OpCooperativeMatrixLengthKHR"; case OpDemoteToHelperInvocationEXT: return "OpDemoteToHelperInvocationEXT"; case OpIsHelperInvocationEXT: return "OpIsHelperInvocationEXT"; case OpBeginInvocationInterlockEXT: return "OpBeginInvocationInterlockEXT"; case OpEndInvocationInterlockEXT: return "OpEndInvocationInterlockEXT"; + case OpTypeHitObjectNV: return "OpTypeHitObjectNV"; + case OpHitObjectTraceRayNV: return "OpHitObjectTraceRayNV"; + case OpHitObjectTraceRayMotionNV: return "OpHitObjectTraceRayMotionNV"; + case OpHitObjectRecordHitNV: return "OpHitObjectRecordHitNV"; + case OpHitObjectRecordHitMotionNV: return "OpHitObjectRecordHitMotionNV"; + case OpHitObjectRecordHitWithIndexNV: return "OpHitObjectRecordHitWithIndexNV"; + case OpHitObjectRecordHitWithIndexMotionNV: return "OpHitObjectRecordHitWithIndexMotionNV"; + case OpHitObjectRecordMissNV: return "OpHitObjectRecordMissNV"; + case OpHitObjectRecordMissMotionNV: return "OpHitObjectRecordMissMotionNV"; + case OpHitObjectRecordEmptyNV: return "OpHitObjectRecordEmptyNV"; + case OpHitObjectExecuteShaderNV: return "OpHitObjectExecuteShaderNV"; + case OpReorderThreadWithHintNV: return "OpReorderThreadWithHintNV"; + case OpReorderThreadWithHitObjectNV: return "OpReorderThreadWithHitObjectNV"; + case OpHitObjectGetCurrentTimeNV: return "OpHitObjectGetCurrentTimeNV"; + case OpHitObjectGetAttributesNV: return "OpHitObjectGetAttributesNV"; + case OpHitObjectGetHitKindNV: return "OpHitObjectGetFrontFaceNV"; + case OpHitObjectGetPrimitiveIndexNV: return "OpHitObjectGetPrimitiveIndexNV"; + case OpHitObjectGetGeometryIndexNV: return "OpHitObjectGetGeometryIndexNV"; + case OpHitObjectGetInstanceIdNV: return "OpHitObjectGetInstanceIdNV"; + case OpHitObjectGetInstanceCustomIndexNV: return "OpHitObjectGetInstanceCustomIndexNV"; + case OpHitObjectGetObjectRayDirectionNV: return "OpHitObjectGetObjectRayDirectionNV"; + case OpHitObjectGetObjectRayOriginNV: return "OpHitObjectGetObjectRayOriginNV"; + case OpHitObjectGetWorldRayDirectionNV: return "OpHitObjectGetWorldRayDirectionNV"; + case OpHitObjectGetWorldRayOriginNV: return "OpHitObjectGetWorldRayOriginNV"; + case OpHitObjectGetWorldToObjectNV: return "OpHitObjectGetWorldToObjectNV"; + case OpHitObjectGetObjectToWorldNV: return "OpHitObjectGetObjectToWorldNV"; + case OpHitObjectGetRayTMaxNV: return "OpHitObjectGetRayTMaxNV"; + case OpHitObjectGetRayTMinNV: return "OpHitObjectGetRayTMinNV"; + case OpHitObjectIsEmptyNV: return "OpHitObjectIsEmptyNV"; + case OpHitObjectIsHitNV: return "OpHitObjectIsHitNV"; + case OpHitObjectIsMissNV: return "OpHitObjectIsMissNV"; + case OpHitObjectGetShaderBindingTableRecordIndexNV: return "OpHitObjectGetShaderBindingTableRecordIndexNV"; + case OpHitObjectGetShaderRecordBufferHandleNV: return "OpHitObjectGetShaderRecordBufferHandleNV"; + + case OpFetchMicroTriangleVertexBarycentricNV: return "OpFetchMicroTriangleVertexBarycentricNV"; + case OpFetchMicroTriangleVertexPositionNV: return "OpFetchMicroTriangleVertexPositionNV"; + + case OpColorAttachmentReadEXT: return "OpColorAttachmentReadEXT"; + case OpDepthAttachmentReadEXT: return "OpDepthAttachmentReadEXT"; + case OpStencilAttachmentReadEXT: return "OpStencilAttachmentReadEXT"; + + case OpImageSampleWeightedQCOM: return "OpImageSampleWeightedQCOM"; + case OpImageBoxFilterQCOM: return "OpImageBoxFilterQCOM"; + case OpImageBlockMatchSADQCOM: return "OpImageBlockMatchSADQCOM"; + case OpImageBlockMatchSSDQCOM: return "OpImageBlockMatchSSDQCOM"; + default: return "Bad"; } @@ -1463,1553 +1579,1831 @@ EnumParameters LoopControlParams[FunctionControlCeiling]; EnumParameters SelectionControlParams[SelectControlCeiling]; EnumParameters FunctionControlParams[FunctionControlCeiling]; EnumParameters MemoryAccessParams[MemoryAccessCeiling]; +EnumParameters CooperativeMatrixOperandsParams[CooperativeMatrixOperandsCeiling]; // Set up all the parameterizing descriptions of the opcodes, operands, etc. void Parameterize() { // only do this once. - static bool initialized = false; - if (initialized) - return; - initialized = true; - - // Exceptions to having a result and a resulting type . - // (Everything is initialized to have both). - - InstructionDesc[OpNop].setResultAndType(false, false); - InstructionDesc[OpSource].setResultAndType(false, false); - InstructionDesc[OpSourceContinued].setResultAndType(false, false); - InstructionDesc[OpSourceExtension].setResultAndType(false, false); - InstructionDesc[OpExtension].setResultAndType(false, false); - InstructionDesc[OpExtInstImport].setResultAndType(true, false); - InstructionDesc[OpCapability].setResultAndType(false, false); - InstructionDesc[OpMemoryModel].setResultAndType(false, false); - InstructionDesc[OpEntryPoint].setResultAndType(false, false); - InstructionDesc[OpExecutionMode].setResultAndType(false, false); - InstructionDesc[OpExecutionModeId].setResultAndType(false, false); - InstructionDesc[OpTypeVoid].setResultAndType(true, false); - InstructionDesc[OpTypeBool].setResultAndType(true, false); - InstructionDesc[OpTypeInt].setResultAndType(true, false); - InstructionDesc[OpTypeFloat].setResultAndType(true, false); - InstructionDesc[OpTypeVector].setResultAndType(true, false); - InstructionDesc[OpTypeMatrix].setResultAndType(true, false); - InstructionDesc[OpTypeImage].setResultAndType(true, false); - InstructionDesc[OpTypeSampler].setResultAndType(true, false); - InstructionDesc[OpTypeSampledImage].setResultAndType(true, false); - InstructionDesc[OpTypeArray].setResultAndType(true, false); - InstructionDesc[OpTypeRuntimeArray].setResultAndType(true, false); - InstructionDesc[OpTypeStruct].setResultAndType(true, false); - InstructionDesc[OpTypeOpaque].setResultAndType(true, false); - InstructionDesc[OpTypePointer].setResultAndType(true, false); - InstructionDesc[OpTypeForwardPointer].setResultAndType(false, false); - InstructionDesc[OpTypeFunction].setResultAndType(true, false); - InstructionDesc[OpTypeEvent].setResultAndType(true, false); - InstructionDesc[OpTypeDeviceEvent].setResultAndType(true, false); - InstructionDesc[OpTypeReserveId].setResultAndType(true, false); - InstructionDesc[OpTypeQueue].setResultAndType(true, false); - InstructionDesc[OpTypePipe].setResultAndType(true, false); - InstructionDesc[OpFunctionEnd].setResultAndType(false, false); - InstructionDesc[OpStore].setResultAndType(false, false); - InstructionDesc[OpImageWrite].setResultAndType(false, false); - InstructionDesc[OpDecorationGroup].setResultAndType(true, false); - InstructionDesc[OpDecorate].setResultAndType(false, false); - InstructionDesc[OpDecorateId].setResultAndType(false, false); - InstructionDesc[OpDecorateStringGOOGLE].setResultAndType(false, false); - InstructionDesc[OpMemberDecorate].setResultAndType(false, false); - InstructionDesc[OpMemberDecorateStringGOOGLE].setResultAndType(false, false); - InstructionDesc[OpGroupDecorate].setResultAndType(false, false); - InstructionDesc[OpGroupMemberDecorate].setResultAndType(false, false); - InstructionDesc[OpName].setResultAndType(false, false); - InstructionDesc[OpMemberName].setResultAndType(false, false); - InstructionDesc[OpString].setResultAndType(true, false); - InstructionDesc[OpLine].setResultAndType(false, false); - InstructionDesc[OpNoLine].setResultAndType(false, false); - InstructionDesc[OpCopyMemory].setResultAndType(false, false); - InstructionDesc[OpCopyMemorySized].setResultAndType(false, false); - InstructionDesc[OpEmitVertex].setResultAndType(false, false); - InstructionDesc[OpEndPrimitive].setResultAndType(false, false); - InstructionDesc[OpEmitStreamVertex].setResultAndType(false, false); - InstructionDesc[OpEndStreamPrimitive].setResultAndType(false, false); - InstructionDesc[OpControlBarrier].setResultAndType(false, false); - InstructionDesc[OpMemoryBarrier].setResultAndType(false, false); - InstructionDesc[OpAtomicStore].setResultAndType(false, false); - InstructionDesc[OpLoopMerge].setResultAndType(false, false); - InstructionDesc[OpSelectionMerge].setResultAndType(false, false); - InstructionDesc[OpLabel].setResultAndType(true, false); - InstructionDesc[OpBranch].setResultAndType(false, false); - InstructionDesc[OpBranchConditional].setResultAndType(false, false); - InstructionDesc[OpSwitch].setResultAndType(false, false); - InstructionDesc[OpKill].setResultAndType(false, false); - InstructionDesc[OpTerminateInvocation].setResultAndType(false, false); - InstructionDesc[OpReturn].setResultAndType(false, false); - InstructionDesc[OpReturnValue].setResultAndType(false, false); - InstructionDesc[OpUnreachable].setResultAndType(false, false); - InstructionDesc[OpLifetimeStart].setResultAndType(false, false); - InstructionDesc[OpLifetimeStop].setResultAndType(false, false); - InstructionDesc[OpCommitReadPipe].setResultAndType(false, false); - InstructionDesc[OpCommitWritePipe].setResultAndType(false, false); - InstructionDesc[OpGroupCommitWritePipe].setResultAndType(false, false); - InstructionDesc[OpGroupCommitReadPipe].setResultAndType(false, false); - InstructionDesc[OpCaptureEventProfilingInfo].setResultAndType(false, false); - InstructionDesc[OpSetUserEventStatus].setResultAndType(false, false); - InstructionDesc[OpRetainEvent].setResultAndType(false, false); - InstructionDesc[OpReleaseEvent].setResultAndType(false, false); - InstructionDesc[OpGroupWaitEvents].setResultAndType(false, false); - InstructionDesc[OpAtomicFlagClear].setResultAndType(false, false); - InstructionDesc[OpModuleProcessed].setResultAndType(false, false); - InstructionDesc[OpTypeCooperativeMatrixNV].setResultAndType(true, false); - InstructionDesc[OpCooperativeMatrixStoreNV].setResultAndType(false, false); - InstructionDesc[OpBeginInvocationInterlockEXT].setResultAndType(false, false); - InstructionDesc[OpEndInvocationInterlockEXT].setResultAndType(false, false); - - // Specific additional context-dependent operands - - ExecutionModeOperands[ExecutionModeInvocations].push(OperandLiteralNumber, "'Number of <>'"); - - ExecutionModeOperands[ExecutionModeLocalSize].push(OperandLiteralNumber, "'x size'"); - ExecutionModeOperands[ExecutionModeLocalSize].push(OperandLiteralNumber, "'y size'"); - ExecutionModeOperands[ExecutionModeLocalSize].push(OperandLiteralNumber, "'z size'"); - - ExecutionModeOperands[ExecutionModeLocalSizeHint].push(OperandLiteralNumber, "'x size'"); - ExecutionModeOperands[ExecutionModeLocalSizeHint].push(OperandLiteralNumber, "'y size'"); - ExecutionModeOperands[ExecutionModeLocalSizeHint].push(OperandLiteralNumber, "'z size'"); - - ExecutionModeOperands[ExecutionModeOutputVertices].push(OperandLiteralNumber, "'Vertex count'"); - ExecutionModeOperands[ExecutionModeVecTypeHint].push(OperandLiteralNumber, "'Vector type'"); - - DecorationOperands[DecorationStream].push(OperandLiteralNumber, "'Stream Number'"); - DecorationOperands[DecorationLocation].push(OperandLiteralNumber, "'Location'"); - DecorationOperands[DecorationComponent].push(OperandLiteralNumber, "'Component'"); - DecorationOperands[DecorationIndex].push(OperandLiteralNumber, "'Index'"); - DecorationOperands[DecorationBinding].push(OperandLiteralNumber, "'Binding Point'"); - DecorationOperands[DecorationDescriptorSet].push(OperandLiteralNumber, "'Descriptor Set'"); - DecorationOperands[DecorationOffset].push(OperandLiteralNumber, "'Byte Offset'"); - DecorationOperands[DecorationXfbBuffer].push(OperandLiteralNumber, "'XFB Buffer Number'"); - DecorationOperands[DecorationXfbStride].push(OperandLiteralNumber, "'XFB Stride'"); - DecorationOperands[DecorationArrayStride].push(OperandLiteralNumber, "'Array Stride'"); - DecorationOperands[DecorationMatrixStride].push(OperandLiteralNumber, "'Matrix Stride'"); - DecorationOperands[DecorationBuiltIn].push(OperandLiteralNumber, "See <>"); - DecorationOperands[DecorationFPRoundingMode].push(OperandFPRoundingMode, "'Floating-Point Rounding Mode'"); - DecorationOperands[DecorationFPFastMathMode].push(OperandFPFastMath, "'Fast-Math Mode'"); - DecorationOperands[DecorationLinkageAttributes].push(OperandLiteralString, "'Name'"); - DecorationOperands[DecorationLinkageAttributes].push(OperandLinkageType, "'Linkage Type'"); - DecorationOperands[DecorationFuncParamAttr].push(OperandFuncParamAttr, "'Function Parameter Attribute'"); - DecorationOperands[DecorationSpecId].push(OperandLiteralNumber, "'Specialization Constant ID'"); - DecorationOperands[DecorationInputAttachmentIndex].push(OperandLiteralNumber, "'Attachment Index'"); - DecorationOperands[DecorationAlignment].push(OperandLiteralNumber, "'Alignment'"); - - OperandClassParams[OperandSource].set(0, SourceString, 0); - OperandClassParams[OperandExecutionModel].set(0, ExecutionModelString, nullptr); - OperandClassParams[OperandAddressing].set(0, AddressingString, nullptr); - OperandClassParams[OperandMemory].set(0, MemoryString, nullptr); - OperandClassParams[OperandExecutionMode].set(ExecutionModeCeiling, ExecutionModeString, ExecutionModeParams); - OperandClassParams[OperandExecutionMode].setOperands(ExecutionModeOperands); - OperandClassParams[OperandStorage].set(0, StorageClassString, nullptr); - OperandClassParams[OperandDimensionality].set(0, DimensionString, nullptr); - OperandClassParams[OperandSamplerAddressingMode].set(0, SamplerAddressingModeString, nullptr); - OperandClassParams[OperandSamplerFilterMode].set(0, SamplerFilterModeString, nullptr); - OperandClassParams[OperandSamplerImageFormat].set(0, ImageFormatString, nullptr); - OperandClassParams[OperandImageChannelOrder].set(0, ImageChannelOrderString, nullptr); - OperandClassParams[OperandImageChannelDataType].set(0, ImageChannelDataTypeString, nullptr); - OperandClassParams[OperandImageOperands].set(ImageOperandsCeiling, ImageOperandsString, ImageOperandsParams, true); - OperandClassParams[OperandFPFastMath].set(0, FPFastMathString, nullptr, true); - OperandClassParams[OperandFPRoundingMode].set(0, FPRoundingModeString, nullptr); - OperandClassParams[OperandLinkageType].set(0, LinkageTypeString, nullptr); - OperandClassParams[OperandFuncParamAttr].set(0, FuncParamAttrString, nullptr); - OperandClassParams[OperandAccessQualifier].set(0, AccessQualifierString, nullptr); - OperandClassParams[OperandDecoration].set(DecorationCeiling, DecorationString, DecorationParams); - OperandClassParams[OperandDecoration].setOperands(DecorationOperands); - OperandClassParams[OperandBuiltIn].set(0, BuiltInString, nullptr); - OperandClassParams[OperandSelect].set(SelectControlCeiling, SelectControlString, SelectionControlParams, true); - OperandClassParams[OperandLoop].set(LoopControlCeiling, LoopControlString, LoopControlParams, true); - OperandClassParams[OperandFunction].set(FunctionControlCeiling, FunctionControlString, FunctionControlParams, true); - OperandClassParams[OperandMemorySemantics].set(0, MemorySemanticsString, nullptr, true); - OperandClassParams[OperandMemoryAccess].set(MemoryAccessCeiling, MemoryAccessString, MemoryAccessParams, true); - OperandClassParams[OperandScope].set(0, ScopeString, nullptr); - OperandClassParams[OperandGroupOperation].set(0, GroupOperationString, nullptr); - OperandClassParams[OperandKernelEnqueueFlags].set(0, KernelEnqueueFlagsString, nullptr); - OperandClassParams[OperandKernelProfilingInfo].set(0, KernelProfilingInfoString, nullptr, true); - OperandClassParams[OperandCapability].set(0, CapabilityString, nullptr); - OperandClassParams[OperandOpcode].set(OpCodeMask + 1, OpcodeString, 0); - - // set name of operator, an initial set of style operands, and the description - - InstructionDesc[OpSource].operands.push(OperandSource, ""); - InstructionDesc[OpSource].operands.push(OperandLiteralNumber, "'Version'"); - InstructionDesc[OpSource].operands.push(OperandId, "'File'", true); - InstructionDesc[OpSource].operands.push(OperandLiteralString, "'Source'", true); - - InstructionDesc[OpSourceContinued].operands.push(OperandLiteralString, "'Continued Source'"); - - InstructionDesc[OpSourceExtension].operands.push(OperandLiteralString, "'Extension'"); - - InstructionDesc[OpName].operands.push(OperandId, "'Target'"); - InstructionDesc[OpName].operands.push(OperandLiteralString, "'Name'"); - - InstructionDesc[OpMemberName].operands.push(OperandId, "'Type'"); - InstructionDesc[OpMemberName].operands.push(OperandLiteralNumber, "'Member'"); - InstructionDesc[OpMemberName].operands.push(OperandLiteralString, "'Name'"); - - InstructionDesc[OpString].operands.push(OperandLiteralString, "'String'"); - - InstructionDesc[OpLine].operands.push(OperandId, "'File'"); - InstructionDesc[OpLine].operands.push(OperandLiteralNumber, "'Line'"); - InstructionDesc[OpLine].operands.push(OperandLiteralNumber, "'Column'"); - - InstructionDesc[OpExtension].operands.push(OperandLiteralString, "'Name'"); - - InstructionDesc[OpExtInstImport].operands.push(OperandLiteralString, "'Name'"); - - InstructionDesc[OpCapability].operands.push(OperandCapability, "'Capability'"); + static std::once_flag initialized; + std::call_once(initialized, [](){ + + // Exceptions to having a result and a resulting type . + // (Everything is initialized to have both). + + InstructionDesc[OpNop].setResultAndType(false, false); + InstructionDesc[OpSource].setResultAndType(false, false); + InstructionDesc[OpSourceContinued].setResultAndType(false, false); + InstructionDesc[OpSourceExtension].setResultAndType(false, false); + InstructionDesc[OpExtension].setResultAndType(false, false); + InstructionDesc[OpExtInstImport].setResultAndType(true, false); + InstructionDesc[OpCapability].setResultAndType(false, false); + InstructionDesc[OpMemoryModel].setResultAndType(false, false); + InstructionDesc[OpEntryPoint].setResultAndType(false, false); + InstructionDesc[OpExecutionMode].setResultAndType(false, false); + InstructionDesc[OpExecutionModeId].setResultAndType(false, false); + InstructionDesc[OpTypeVoid].setResultAndType(true, false); + InstructionDesc[OpTypeBool].setResultAndType(true, false); + InstructionDesc[OpTypeInt].setResultAndType(true, false); + InstructionDesc[OpTypeFloat].setResultAndType(true, false); + InstructionDesc[OpTypeVector].setResultAndType(true, false); + InstructionDesc[OpTypeMatrix].setResultAndType(true, false); + InstructionDesc[OpTypeImage].setResultAndType(true, false); + InstructionDesc[OpTypeSampler].setResultAndType(true, false); + InstructionDesc[OpTypeSampledImage].setResultAndType(true, false); + InstructionDesc[OpTypeArray].setResultAndType(true, false); + InstructionDesc[OpTypeRuntimeArray].setResultAndType(true, false); + InstructionDesc[OpTypeStruct].setResultAndType(true, false); + InstructionDesc[OpTypeOpaque].setResultAndType(true, false); + InstructionDesc[OpTypePointer].setResultAndType(true, false); + InstructionDesc[OpTypeForwardPointer].setResultAndType(false, false); + InstructionDesc[OpTypeFunction].setResultAndType(true, false); + InstructionDesc[OpTypeEvent].setResultAndType(true, false); + InstructionDesc[OpTypeDeviceEvent].setResultAndType(true, false); + InstructionDesc[OpTypeReserveId].setResultAndType(true, false); + InstructionDesc[OpTypeQueue].setResultAndType(true, false); + InstructionDesc[OpTypePipe].setResultAndType(true, false); + InstructionDesc[OpFunctionEnd].setResultAndType(false, false); + InstructionDesc[OpStore].setResultAndType(false, false); + InstructionDesc[OpImageWrite].setResultAndType(false, false); + InstructionDesc[OpDecorationGroup].setResultAndType(true, false); + InstructionDesc[OpDecorate].setResultAndType(false, false); + InstructionDesc[OpDecorateId].setResultAndType(false, false); + InstructionDesc[OpDecorateStringGOOGLE].setResultAndType(false, false); + InstructionDesc[OpMemberDecorate].setResultAndType(false, false); + InstructionDesc[OpMemberDecorateStringGOOGLE].setResultAndType(false, false); + InstructionDesc[OpGroupDecorate].setResultAndType(false, false); + InstructionDesc[OpGroupMemberDecorate].setResultAndType(false, false); + InstructionDesc[OpName].setResultAndType(false, false); + InstructionDesc[OpMemberName].setResultAndType(false, false); + InstructionDesc[OpString].setResultAndType(true, false); + InstructionDesc[OpLine].setResultAndType(false, false); + InstructionDesc[OpNoLine].setResultAndType(false, false); + InstructionDesc[OpCopyMemory].setResultAndType(false, false); + InstructionDesc[OpCopyMemorySized].setResultAndType(false, false); + InstructionDesc[OpEmitVertex].setResultAndType(false, false); + InstructionDesc[OpEndPrimitive].setResultAndType(false, false); + InstructionDesc[OpEmitStreamVertex].setResultAndType(false, false); + InstructionDesc[OpEndStreamPrimitive].setResultAndType(false, false); + InstructionDesc[OpControlBarrier].setResultAndType(false, false); + InstructionDesc[OpMemoryBarrier].setResultAndType(false, false); + InstructionDesc[OpAtomicStore].setResultAndType(false, false); + InstructionDesc[OpLoopMerge].setResultAndType(false, false); + InstructionDesc[OpSelectionMerge].setResultAndType(false, false); + InstructionDesc[OpLabel].setResultAndType(true, false); + InstructionDesc[OpBranch].setResultAndType(false, false); + InstructionDesc[OpBranchConditional].setResultAndType(false, false); + InstructionDesc[OpSwitch].setResultAndType(false, false); + InstructionDesc[OpKill].setResultAndType(false, false); + InstructionDesc[OpTerminateInvocation].setResultAndType(false, false); + InstructionDesc[OpReturn].setResultAndType(false, false); + InstructionDesc[OpReturnValue].setResultAndType(false, false); + InstructionDesc[OpUnreachable].setResultAndType(false, false); + InstructionDesc[OpLifetimeStart].setResultAndType(false, false); + InstructionDesc[OpLifetimeStop].setResultAndType(false, false); + InstructionDesc[OpCommitReadPipe].setResultAndType(false, false); + InstructionDesc[OpCommitWritePipe].setResultAndType(false, false); + InstructionDesc[OpGroupCommitWritePipe].setResultAndType(false, false); + InstructionDesc[OpGroupCommitReadPipe].setResultAndType(false, false); + InstructionDesc[OpCaptureEventProfilingInfo].setResultAndType(false, false); + InstructionDesc[OpSetUserEventStatus].setResultAndType(false, false); + InstructionDesc[OpRetainEvent].setResultAndType(false, false); + InstructionDesc[OpReleaseEvent].setResultAndType(false, false); + InstructionDesc[OpGroupWaitEvents].setResultAndType(false, false); + InstructionDesc[OpAtomicFlagClear].setResultAndType(false, false); + InstructionDesc[OpModuleProcessed].setResultAndType(false, false); + InstructionDesc[OpTypeCooperativeMatrixNV].setResultAndType(true, false); + InstructionDesc[OpCooperativeMatrixStoreNV].setResultAndType(false, false); + InstructionDesc[OpTypeCooperativeMatrixKHR].setResultAndType(true, false); + InstructionDesc[OpCooperativeMatrixStoreKHR].setResultAndType(false, false); + InstructionDesc[OpBeginInvocationInterlockEXT].setResultAndType(false, false); + InstructionDesc[OpEndInvocationInterlockEXT].setResultAndType(false, false); + + // Specific additional context-dependent operands + + ExecutionModeOperands[ExecutionModeInvocations].push(OperandLiteralNumber, "'Number of <>'"); + + ExecutionModeOperands[ExecutionModeLocalSize].push(OperandLiteralNumber, "'x size'"); + ExecutionModeOperands[ExecutionModeLocalSize].push(OperandLiteralNumber, "'y size'"); + ExecutionModeOperands[ExecutionModeLocalSize].push(OperandLiteralNumber, "'z size'"); + + ExecutionModeOperands[ExecutionModeLocalSizeHint].push(OperandLiteralNumber, "'x size'"); + ExecutionModeOperands[ExecutionModeLocalSizeHint].push(OperandLiteralNumber, "'y size'"); + ExecutionModeOperands[ExecutionModeLocalSizeHint].push(OperandLiteralNumber, "'z size'"); + + ExecutionModeOperands[ExecutionModeOutputVertices].push(OperandLiteralNumber, "'Vertex count'"); + ExecutionModeOperands[ExecutionModeVecTypeHint].push(OperandLiteralNumber, "'Vector type'"); + + DecorationOperands[DecorationStream].push(OperandLiteralNumber, "'Stream Number'"); + DecorationOperands[DecorationLocation].push(OperandLiteralNumber, "'Location'"); + DecorationOperands[DecorationComponent].push(OperandLiteralNumber, "'Component'"); + DecorationOperands[DecorationIndex].push(OperandLiteralNumber, "'Index'"); + DecorationOperands[DecorationBinding].push(OperandLiteralNumber, "'Binding Point'"); + DecorationOperands[DecorationDescriptorSet].push(OperandLiteralNumber, "'Descriptor Set'"); + DecorationOperands[DecorationOffset].push(OperandLiteralNumber, "'Byte Offset'"); + DecorationOperands[DecorationXfbBuffer].push(OperandLiteralNumber, "'XFB Buffer Number'"); + DecorationOperands[DecorationXfbStride].push(OperandLiteralNumber, "'XFB Stride'"); + DecorationOperands[DecorationArrayStride].push(OperandLiteralNumber, "'Array Stride'"); + DecorationOperands[DecorationMatrixStride].push(OperandLiteralNumber, "'Matrix Stride'"); + DecorationOperands[DecorationBuiltIn].push(OperandLiteralNumber, "See <>"); + DecorationOperands[DecorationFPRoundingMode].push(OperandFPRoundingMode, "'Floating-Point Rounding Mode'"); + DecorationOperands[DecorationFPFastMathMode].push(OperandFPFastMath, "'Fast-Math Mode'"); + DecorationOperands[DecorationLinkageAttributes].push(OperandLiteralString, "'Name'"); + DecorationOperands[DecorationLinkageAttributes].push(OperandLinkageType, "'Linkage Type'"); + DecorationOperands[DecorationFuncParamAttr].push(OperandFuncParamAttr, "'Function Parameter Attribute'"); + DecorationOperands[DecorationSpecId].push(OperandLiteralNumber, "'Specialization Constant ID'"); + DecorationOperands[DecorationInputAttachmentIndex].push(OperandLiteralNumber, "'Attachment Index'"); + DecorationOperands[DecorationAlignment].push(OperandLiteralNumber, "'Alignment'"); + + OperandClassParams[OperandSource].set(0, SourceString, nullptr); + OperandClassParams[OperandExecutionModel].set(0, ExecutionModelString, nullptr); + OperandClassParams[OperandAddressing].set(0, AddressingString, nullptr); + OperandClassParams[OperandMemory].set(0, MemoryString, nullptr); + OperandClassParams[OperandExecutionMode].set(ExecutionModeCeiling, ExecutionModeString, ExecutionModeParams); + OperandClassParams[OperandExecutionMode].setOperands(ExecutionModeOperands); + OperandClassParams[OperandStorage].set(0, StorageClassString, nullptr); + OperandClassParams[OperandDimensionality].set(0, DimensionString, nullptr); + OperandClassParams[OperandSamplerAddressingMode].set(0, SamplerAddressingModeString, nullptr); + OperandClassParams[OperandSamplerFilterMode].set(0, SamplerFilterModeString, nullptr); + OperandClassParams[OperandSamplerImageFormat].set(0, ImageFormatString, nullptr); + OperandClassParams[OperandImageChannelOrder].set(0, ImageChannelOrderString, nullptr); + OperandClassParams[OperandImageChannelDataType].set(0, ImageChannelDataTypeString, nullptr); + OperandClassParams[OperandImageOperands].set(ImageOperandsCeiling, ImageOperandsString, ImageOperandsParams, true); + OperandClassParams[OperandFPFastMath].set(0, FPFastMathString, nullptr, true); + OperandClassParams[OperandFPRoundingMode].set(0, FPRoundingModeString, nullptr); + OperandClassParams[OperandLinkageType].set(0, LinkageTypeString, nullptr); + OperandClassParams[OperandFuncParamAttr].set(0, FuncParamAttrString, nullptr); + OperandClassParams[OperandAccessQualifier].set(0, AccessQualifierString, nullptr); + OperandClassParams[OperandDecoration].set(DecorationCeiling, DecorationString, DecorationParams); + OperandClassParams[OperandDecoration].setOperands(DecorationOperands); + OperandClassParams[OperandBuiltIn].set(0, BuiltInString, nullptr); + OperandClassParams[OperandSelect].set(SelectControlCeiling, SelectControlString, SelectionControlParams, true); + OperandClassParams[OperandLoop].set(LoopControlCeiling, LoopControlString, LoopControlParams, true); + OperandClassParams[OperandFunction].set(FunctionControlCeiling, FunctionControlString, FunctionControlParams, true); + OperandClassParams[OperandMemorySemantics].set(0, MemorySemanticsString, nullptr, true); + OperandClassParams[OperandMemoryAccess].set(MemoryAccessCeiling, MemoryAccessString, MemoryAccessParams, true); + OperandClassParams[OperandScope].set(0, ScopeString, nullptr); + OperandClassParams[OperandGroupOperation].set(0, GroupOperationString, nullptr); + OperandClassParams[OperandKernelEnqueueFlags].set(0, KernelEnqueueFlagsString, nullptr); + OperandClassParams[OperandKernelProfilingInfo].set(0, KernelProfilingInfoString, nullptr, true); + OperandClassParams[OperandCapability].set(0, CapabilityString, nullptr); + OperandClassParams[OperandCooperativeMatrixOperands].set(CooperativeMatrixOperandsCeiling, CooperativeMatrixOperandsString, CooperativeMatrixOperandsParams, true); + OperandClassParams[OperandOpcode].set(OpCodeMask + 1, OpcodeString, nullptr); + + // set name of operator, an initial set of style operands, and the description + + InstructionDesc[OpSource].operands.push(OperandSource, ""); + InstructionDesc[OpSource].operands.push(OperandLiteralNumber, "'Version'"); + InstructionDesc[OpSource].operands.push(OperandId, "'File'", true); + InstructionDesc[OpSource].operands.push(OperandLiteralString, "'Source'", true); + + InstructionDesc[OpSourceContinued].operands.push(OperandLiteralString, "'Continued Source'"); + + InstructionDesc[OpSourceExtension].operands.push(OperandLiteralString, "'Extension'"); + + InstructionDesc[OpName].operands.push(OperandId, "'Target'"); + InstructionDesc[OpName].operands.push(OperandLiteralString, "'Name'"); + + InstructionDesc[OpMemberName].operands.push(OperandId, "'Type'"); + InstructionDesc[OpMemberName].operands.push(OperandLiteralNumber, "'Member'"); + InstructionDesc[OpMemberName].operands.push(OperandLiteralString, "'Name'"); + + InstructionDesc[OpString].operands.push(OperandLiteralString, "'String'"); + + InstructionDesc[OpLine].operands.push(OperandId, "'File'"); + InstructionDesc[OpLine].operands.push(OperandLiteralNumber, "'Line'"); + InstructionDesc[OpLine].operands.push(OperandLiteralNumber, "'Column'"); + + InstructionDesc[OpExtension].operands.push(OperandLiteralString, "'Name'"); + + InstructionDesc[OpExtInstImport].operands.push(OperandLiteralString, "'Name'"); + + InstructionDesc[OpCapability].operands.push(OperandCapability, "'Capability'"); + + InstructionDesc[OpMemoryModel].operands.push(OperandAddressing, ""); + InstructionDesc[OpMemoryModel].operands.push(OperandMemory, ""); + + InstructionDesc[OpEntryPoint].operands.push(OperandExecutionModel, ""); + InstructionDesc[OpEntryPoint].operands.push(OperandId, "'Entry Point'"); + InstructionDesc[OpEntryPoint].operands.push(OperandLiteralString, "'Name'"); + InstructionDesc[OpEntryPoint].operands.push(OperandVariableIds, "'Interface'"); + + InstructionDesc[OpExecutionMode].operands.push(OperandId, "'Entry Point'"); + InstructionDesc[OpExecutionMode].operands.push(OperandExecutionMode, "'Mode'"); + InstructionDesc[OpExecutionMode].operands.push(OperandOptionalLiteral, "See <>"); + + InstructionDesc[OpExecutionModeId].operands.push(OperandId, "'Entry Point'"); + InstructionDesc[OpExecutionModeId].operands.push(OperandExecutionMode, "'Mode'"); + InstructionDesc[OpExecutionModeId].operands.push(OperandVariableIds, "See <>"); + + InstructionDesc[OpTypeInt].operands.push(OperandLiteralNumber, "'Width'"); + InstructionDesc[OpTypeInt].operands.push(OperandLiteralNumber, "'Signedness'"); + + InstructionDesc[OpTypeFloat].operands.push(OperandLiteralNumber, "'Width'"); + + InstructionDesc[OpTypeVector].operands.push(OperandId, "'Component Type'"); + InstructionDesc[OpTypeVector].operands.push(OperandLiteralNumber, "'Component Count'"); + + InstructionDesc[OpTypeMatrix].operands.push(OperandId, "'Column Type'"); + InstructionDesc[OpTypeMatrix].operands.push(OperandLiteralNumber, "'Column Count'"); + + InstructionDesc[OpTypeImage].operands.push(OperandId, "'Sampled Type'"); + InstructionDesc[OpTypeImage].operands.push(OperandDimensionality, ""); + InstructionDesc[OpTypeImage].operands.push(OperandLiteralNumber, "'Depth'"); + InstructionDesc[OpTypeImage].operands.push(OperandLiteralNumber, "'Arrayed'"); + InstructionDesc[OpTypeImage].operands.push(OperandLiteralNumber, "'MS'"); + InstructionDesc[OpTypeImage].operands.push(OperandLiteralNumber, "'Sampled'"); + InstructionDesc[OpTypeImage].operands.push(OperandSamplerImageFormat, ""); + InstructionDesc[OpTypeImage].operands.push(OperandAccessQualifier, "", true); + + InstructionDesc[OpTypeSampledImage].operands.push(OperandId, "'Image Type'"); + + InstructionDesc[OpTypeArray].operands.push(OperandId, "'Element Type'"); + InstructionDesc[OpTypeArray].operands.push(OperandId, "'Length'"); + + InstructionDesc[OpTypeRuntimeArray].operands.push(OperandId, "'Element Type'"); + + InstructionDesc[OpTypeStruct].operands.push(OperandVariableIds, "'Member 0 type', +\n'member 1 type', +\n..."); + + InstructionDesc[OpTypeOpaque].operands.push(OperandLiteralString, "The name of the opaque type."); + + InstructionDesc[OpTypePointer].operands.push(OperandStorage, ""); + InstructionDesc[OpTypePointer].operands.push(OperandId, "'Type'"); + + InstructionDesc[OpTypeForwardPointer].operands.push(OperandId, "'Pointer Type'"); + InstructionDesc[OpTypeForwardPointer].operands.push(OperandStorage, ""); + + InstructionDesc[OpTypePipe].operands.push(OperandAccessQualifier, "'Qualifier'"); + + InstructionDesc[OpTypeFunction].operands.push(OperandId, "'Return Type'"); + InstructionDesc[OpTypeFunction].operands.push(OperandVariableIds, "'Parameter 0 Type', +\n'Parameter 1 Type', +\n..."); + + InstructionDesc[OpConstant].operands.push(OperandVariableLiterals, "'Value'"); + + InstructionDesc[OpConstantComposite].operands.push(OperandVariableIds, "'Constituents'"); - InstructionDesc[OpMemoryModel].operands.push(OperandAddressing, ""); - InstructionDesc[OpMemoryModel].operands.push(OperandMemory, ""); - - InstructionDesc[OpEntryPoint].operands.push(OperandExecutionModel, ""); - InstructionDesc[OpEntryPoint].operands.push(OperandId, "'Entry Point'"); - InstructionDesc[OpEntryPoint].operands.push(OperandLiteralString, "'Name'"); - InstructionDesc[OpEntryPoint].operands.push(OperandVariableIds, "'Interface'"); - - InstructionDesc[OpExecutionMode].operands.push(OperandId, "'Entry Point'"); - InstructionDesc[OpExecutionMode].operands.push(OperandExecutionMode, "'Mode'"); - InstructionDesc[OpExecutionMode].operands.push(OperandOptionalLiteral, "See <>"); - - InstructionDesc[OpExecutionModeId].operands.push(OperandId, "'Entry Point'"); - InstructionDesc[OpExecutionModeId].operands.push(OperandExecutionMode, "'Mode'"); - InstructionDesc[OpExecutionModeId].operands.push(OperandVariableIds, "See <>"); - - InstructionDesc[OpTypeInt].operands.push(OperandLiteralNumber, "'Width'"); - InstructionDesc[OpTypeInt].operands.push(OperandLiteralNumber, "'Signedness'"); - - InstructionDesc[OpTypeFloat].operands.push(OperandLiteralNumber, "'Width'"); - - InstructionDesc[OpTypeVector].operands.push(OperandId, "'Component Type'"); - InstructionDesc[OpTypeVector].operands.push(OperandLiteralNumber, "'Component Count'"); + InstructionDesc[OpConstantSampler].operands.push(OperandSamplerAddressingMode, ""); + InstructionDesc[OpConstantSampler].operands.push(OperandLiteralNumber, "'Param'"); + InstructionDesc[OpConstantSampler].operands.push(OperandSamplerFilterMode, ""); - InstructionDesc[OpTypeMatrix].operands.push(OperandId, "'Column Type'"); - InstructionDesc[OpTypeMatrix].operands.push(OperandLiteralNumber, "'Column Count'"); + InstructionDesc[OpSpecConstant].operands.push(OperandVariableLiterals, "'Value'"); - InstructionDesc[OpTypeImage].operands.push(OperandId, "'Sampled Type'"); - InstructionDesc[OpTypeImage].operands.push(OperandDimensionality, ""); - InstructionDesc[OpTypeImage].operands.push(OperandLiteralNumber, "'Depth'"); - InstructionDesc[OpTypeImage].operands.push(OperandLiteralNumber, "'Arrayed'"); - InstructionDesc[OpTypeImage].operands.push(OperandLiteralNumber, "'MS'"); - InstructionDesc[OpTypeImage].operands.push(OperandLiteralNumber, "'Sampled'"); - InstructionDesc[OpTypeImage].operands.push(OperandSamplerImageFormat, ""); - InstructionDesc[OpTypeImage].operands.push(OperandAccessQualifier, "", true); + InstructionDesc[OpSpecConstantComposite].operands.push(OperandVariableIds, "'Constituents'"); - InstructionDesc[OpTypeSampledImage].operands.push(OperandId, "'Image Type'"); + InstructionDesc[OpSpecConstantOp].operands.push(OperandLiteralNumber, "'Opcode'"); + InstructionDesc[OpSpecConstantOp].operands.push(OperandVariableIds, "'Operands'"); - InstructionDesc[OpTypeArray].operands.push(OperandId, "'Element Type'"); - InstructionDesc[OpTypeArray].operands.push(OperandId, "'Length'"); + InstructionDesc[OpVariable].operands.push(OperandStorage, ""); + InstructionDesc[OpVariable].operands.push(OperandId, "'Initializer'", true); - InstructionDesc[OpTypeRuntimeArray].operands.push(OperandId, "'Element Type'"); + InstructionDesc[OpFunction].operands.push(OperandFunction, ""); + InstructionDesc[OpFunction].operands.push(OperandId, "'Function Type'"); - InstructionDesc[OpTypeStruct].operands.push(OperandVariableIds, "'Member 0 type', +\n'member 1 type', +\n..."); + InstructionDesc[OpFunctionCall].operands.push(OperandId, "'Function'"); + InstructionDesc[OpFunctionCall].operands.push(OperandVariableIds, "'Argument 0', +\n'Argument 1', +\n..."); - InstructionDesc[OpTypeOpaque].operands.push(OperandLiteralString, "The name of the opaque type."); + InstructionDesc[OpExtInst].operands.push(OperandId, "'Set'"); + InstructionDesc[OpExtInst].operands.push(OperandLiteralNumber, "'Instruction'"); + InstructionDesc[OpExtInst].operands.push(OperandVariableIds, "'Operand 1', +\n'Operand 2', +\n..."); - InstructionDesc[OpTypePointer].operands.push(OperandStorage, ""); - InstructionDesc[OpTypePointer].operands.push(OperandId, "'Type'"); + InstructionDesc[OpLoad].operands.push(OperandId, "'Pointer'"); + InstructionDesc[OpLoad].operands.push(OperandMemoryAccess, "", true); + InstructionDesc[OpLoad].operands.push(OperandLiteralNumber, "", true); + InstructionDesc[OpLoad].operands.push(OperandId, "", true); - InstructionDesc[OpTypeForwardPointer].operands.push(OperandId, "'Pointer Type'"); - InstructionDesc[OpTypeForwardPointer].operands.push(OperandStorage, ""); + InstructionDesc[OpStore].operands.push(OperandId, "'Pointer'"); + InstructionDesc[OpStore].operands.push(OperandId, "'Object'"); + InstructionDesc[OpStore].operands.push(OperandMemoryAccess, "", true); + InstructionDesc[OpStore].operands.push(OperandLiteralNumber, "", true); + InstructionDesc[OpStore].operands.push(OperandId, "", true); - InstructionDesc[OpTypePipe].operands.push(OperandAccessQualifier, "'Qualifier'"); + InstructionDesc[OpPhi].operands.push(OperandVariableIds, "'Variable, Parent, ...'"); - InstructionDesc[OpTypeFunction].operands.push(OperandId, "'Return Type'"); - InstructionDesc[OpTypeFunction].operands.push(OperandVariableIds, "'Parameter 0 Type', +\n'Parameter 1 Type', +\n..."); + InstructionDesc[OpDecorate].operands.push(OperandId, "'Target'"); + InstructionDesc[OpDecorate].operands.push(OperandDecoration, ""); + InstructionDesc[OpDecorate].operands.push(OperandVariableLiterals, "See <>."); - InstructionDesc[OpConstant].operands.push(OperandVariableLiterals, "'Value'"); + InstructionDesc[OpDecorateId].operands.push(OperandId, "'Target'"); + InstructionDesc[OpDecorateId].operands.push(OperandDecoration, ""); + InstructionDesc[OpDecorateId].operands.push(OperandVariableIds, "See <>."); - InstructionDesc[OpConstantComposite].operands.push(OperandVariableIds, "'Constituents'"); + InstructionDesc[OpDecorateStringGOOGLE].operands.push(OperandId, "'Target'"); + InstructionDesc[OpDecorateStringGOOGLE].operands.push(OperandDecoration, ""); + InstructionDesc[OpDecorateStringGOOGLE].operands.push(OperandVariableLiteralStrings, "'Literal Strings'"); - InstructionDesc[OpConstantSampler].operands.push(OperandSamplerAddressingMode, ""); - InstructionDesc[OpConstantSampler].operands.push(OperandLiteralNumber, "'Param'"); - InstructionDesc[OpConstantSampler].operands.push(OperandSamplerFilterMode, ""); + InstructionDesc[OpMemberDecorate].operands.push(OperandId, "'Structure Type'"); + InstructionDesc[OpMemberDecorate].operands.push(OperandLiteralNumber, "'Member'"); + InstructionDesc[OpMemberDecorate].operands.push(OperandDecoration, ""); + InstructionDesc[OpMemberDecorate].operands.push(OperandVariableLiterals, "See <>."); - InstructionDesc[OpSpecConstant].operands.push(OperandVariableLiterals, "'Value'"); + InstructionDesc[OpMemberDecorateStringGOOGLE].operands.push(OperandId, "'Structure Type'"); + InstructionDesc[OpMemberDecorateStringGOOGLE].operands.push(OperandLiteralNumber, "'Member'"); + InstructionDesc[OpMemberDecorateStringGOOGLE].operands.push(OperandDecoration, ""); + InstructionDesc[OpMemberDecorateStringGOOGLE].operands.push(OperandVariableLiteralStrings, "'Literal Strings'"); - InstructionDesc[OpSpecConstantComposite].operands.push(OperandVariableIds, "'Constituents'"); + InstructionDesc[OpGroupDecorate].operands.push(OperandId, "'Decoration Group'"); + InstructionDesc[OpGroupDecorate].operands.push(OperandVariableIds, "'Targets'"); - InstructionDesc[OpSpecConstantOp].operands.push(OperandLiteralNumber, "'Opcode'"); - InstructionDesc[OpSpecConstantOp].operands.push(OperandVariableIds, "'Operands'"); + InstructionDesc[OpGroupMemberDecorate].operands.push(OperandId, "'Decoration Group'"); + InstructionDesc[OpGroupMemberDecorate].operands.push(OperandVariableIdLiteral, "'Targets'"); - InstructionDesc[OpVariable].operands.push(OperandStorage, ""); - InstructionDesc[OpVariable].operands.push(OperandId, "'Initializer'", true); + InstructionDesc[OpVectorExtractDynamic].operands.push(OperandId, "'Vector'"); + InstructionDesc[OpVectorExtractDynamic].operands.push(OperandId, "'Index'"); - InstructionDesc[OpFunction].operands.push(OperandFunction, ""); - InstructionDesc[OpFunction].operands.push(OperandId, "'Function Type'"); + InstructionDesc[OpVectorInsertDynamic].operands.push(OperandId, "'Vector'"); + InstructionDesc[OpVectorInsertDynamic].operands.push(OperandId, "'Component'"); + InstructionDesc[OpVectorInsertDynamic].operands.push(OperandId, "'Index'"); - InstructionDesc[OpFunctionCall].operands.push(OperandId, "'Function'"); - InstructionDesc[OpFunctionCall].operands.push(OperandVariableIds, "'Argument 0', +\n'Argument 1', +\n..."); + InstructionDesc[OpVectorShuffle].operands.push(OperandId, "'Vector 1'"); + InstructionDesc[OpVectorShuffle].operands.push(OperandId, "'Vector 2'"); + InstructionDesc[OpVectorShuffle].operands.push(OperandVariableLiterals, "'Components'"); - InstructionDesc[OpExtInst].operands.push(OperandId, "'Set'"); - InstructionDesc[OpExtInst].operands.push(OperandLiteralNumber, "'Instruction'"); - InstructionDesc[OpExtInst].operands.push(OperandVariableIds, "'Operand 1', +\n'Operand 2', +\n..."); + InstructionDesc[OpCompositeConstruct].operands.push(OperandVariableIds, "'Constituents'"); - InstructionDesc[OpLoad].operands.push(OperandId, "'Pointer'"); - InstructionDesc[OpLoad].operands.push(OperandMemoryAccess, "", true); - InstructionDesc[OpLoad].operands.push(OperandLiteralNumber, "", true); - InstructionDesc[OpLoad].operands.push(OperandId, "", true); + InstructionDesc[OpCompositeExtract].operands.push(OperandId, "'Composite'"); + InstructionDesc[OpCompositeExtract].operands.push(OperandVariableLiterals, "'Indexes'"); - InstructionDesc[OpStore].operands.push(OperandId, "'Pointer'"); - InstructionDesc[OpStore].operands.push(OperandId, "'Object'"); - InstructionDesc[OpStore].operands.push(OperandMemoryAccess, "", true); - InstructionDesc[OpStore].operands.push(OperandLiteralNumber, "", true); - InstructionDesc[OpStore].operands.push(OperandId, "", true); + InstructionDesc[OpCompositeInsert].operands.push(OperandId, "'Object'"); + InstructionDesc[OpCompositeInsert].operands.push(OperandId, "'Composite'"); + InstructionDesc[OpCompositeInsert].operands.push(OperandVariableLiterals, "'Indexes'"); - InstructionDesc[OpPhi].operands.push(OperandVariableIds, "'Variable, Parent, ...'"); + InstructionDesc[OpCopyObject].operands.push(OperandId, "'Operand'"); - InstructionDesc[OpDecorate].operands.push(OperandId, "'Target'"); - InstructionDesc[OpDecorate].operands.push(OperandDecoration, ""); - InstructionDesc[OpDecorate].operands.push(OperandVariableLiterals, "See <>."); + InstructionDesc[OpCopyMemory].operands.push(OperandId, "'Target'"); + InstructionDesc[OpCopyMemory].operands.push(OperandId, "'Source'"); + InstructionDesc[OpCopyMemory].operands.push(OperandMemoryAccess, "", true); - InstructionDesc[OpDecorateId].operands.push(OperandId, "'Target'"); - InstructionDesc[OpDecorateId].operands.push(OperandDecoration, ""); - InstructionDesc[OpDecorateId].operands.push(OperandVariableIds, "See <>."); + InstructionDesc[OpCopyMemorySized].operands.push(OperandId, "'Target'"); + InstructionDesc[OpCopyMemorySized].operands.push(OperandId, "'Source'"); + InstructionDesc[OpCopyMemorySized].operands.push(OperandId, "'Size'"); + InstructionDesc[OpCopyMemorySized].operands.push(OperandMemoryAccess, "", true); + + InstructionDesc[OpSampledImage].operands.push(OperandId, "'Image'"); + InstructionDesc[OpSampledImage].operands.push(OperandId, "'Sampler'"); + + InstructionDesc[OpImage].operands.push(OperandId, "'Sampled Image'"); + + InstructionDesc[OpImageRead].operands.push(OperandId, "'Image'"); + InstructionDesc[OpImageRead].operands.push(OperandId, "'Coordinate'"); + InstructionDesc[OpImageRead].operands.push(OperandImageOperands, "", true); + InstructionDesc[OpImageRead].operands.push(OperandVariableIds, "", true); + + InstructionDesc[OpImageWrite].operands.push(OperandId, "'Image'"); + InstructionDesc[OpImageWrite].operands.push(OperandId, "'Coordinate'"); + InstructionDesc[OpImageWrite].operands.push(OperandId, "'Texel'"); + InstructionDesc[OpImageWrite].operands.push(OperandImageOperands, "", true); + InstructionDesc[OpImageWrite].operands.push(OperandVariableIds, "", true); + + InstructionDesc[OpImageSampleImplicitLod].operands.push(OperandId, "'Sampled Image'"); + InstructionDesc[OpImageSampleImplicitLod].operands.push(OperandId, "'Coordinate'"); + InstructionDesc[OpImageSampleImplicitLod].operands.push(OperandImageOperands, "", true); + InstructionDesc[OpImageSampleImplicitLod].operands.push(OperandVariableIds, "", true); + + InstructionDesc[OpImageSampleExplicitLod].operands.push(OperandId, "'Sampled Image'"); + InstructionDesc[OpImageSampleExplicitLod].operands.push(OperandId, "'Coordinate'"); + InstructionDesc[OpImageSampleExplicitLod].operands.push(OperandImageOperands, "", true); + InstructionDesc[OpImageSampleExplicitLod].operands.push(OperandVariableIds, "", true); + + InstructionDesc[OpImageSampleDrefImplicitLod].operands.push(OperandId, "'Sampled Image'"); + InstructionDesc[OpImageSampleDrefImplicitLod].operands.push(OperandId, "'Coordinate'"); + InstructionDesc[OpImageSampleDrefImplicitLod].operands.push(OperandId, "'D~ref~'"); + InstructionDesc[OpImageSampleDrefImplicitLod].operands.push(OperandImageOperands, "", true); + InstructionDesc[OpImageSampleDrefImplicitLod].operands.push(OperandVariableIds, "", true); + + InstructionDesc[OpImageSampleDrefExplicitLod].operands.push(OperandId, "'Sampled Image'"); + InstructionDesc[OpImageSampleDrefExplicitLod].operands.push(OperandId, "'Coordinate'"); + InstructionDesc[OpImageSampleDrefExplicitLod].operands.push(OperandId, "'D~ref~'"); + InstructionDesc[OpImageSampleDrefExplicitLod].operands.push(OperandImageOperands, "", true); + InstructionDesc[OpImageSampleDrefExplicitLod].operands.push(OperandVariableIds, "", true); + + InstructionDesc[OpImageSampleProjImplicitLod].operands.push(OperandId, "'Sampled Image'"); + InstructionDesc[OpImageSampleProjImplicitLod].operands.push(OperandId, "'Coordinate'"); + InstructionDesc[OpImageSampleProjImplicitLod].operands.push(OperandImageOperands, "", true); + InstructionDesc[OpImageSampleProjImplicitLod].operands.push(OperandVariableIds, "", true); + + InstructionDesc[OpImageSampleProjExplicitLod].operands.push(OperandId, "'Sampled Image'"); + InstructionDesc[OpImageSampleProjExplicitLod].operands.push(OperandId, "'Coordinate'"); + InstructionDesc[OpImageSampleProjExplicitLod].operands.push(OperandImageOperands, "", true); + InstructionDesc[OpImageSampleProjExplicitLod].operands.push(OperandVariableIds, "", true); + + InstructionDesc[OpImageSampleProjDrefImplicitLod].operands.push(OperandId, "'Sampled Image'"); + InstructionDesc[OpImageSampleProjDrefImplicitLod].operands.push(OperandId, "'Coordinate'"); + InstructionDesc[OpImageSampleProjDrefImplicitLod].operands.push(OperandId, "'D~ref~'"); + InstructionDesc[OpImageSampleProjDrefImplicitLod].operands.push(OperandImageOperands, "", true); + InstructionDesc[OpImageSampleProjDrefImplicitLod].operands.push(OperandVariableIds, "", true); + + InstructionDesc[OpImageSampleProjDrefExplicitLod].operands.push(OperandId, "'Sampled Image'"); + InstructionDesc[OpImageSampleProjDrefExplicitLod].operands.push(OperandId, "'Coordinate'"); + InstructionDesc[OpImageSampleProjDrefExplicitLod].operands.push(OperandId, "'D~ref~'"); + InstructionDesc[OpImageSampleProjDrefExplicitLod].operands.push(OperandImageOperands, "", true); + InstructionDesc[OpImageSampleProjDrefExplicitLod].operands.push(OperandVariableIds, "", true); + + InstructionDesc[OpImageFetch].operands.push(OperandId, "'Image'"); + InstructionDesc[OpImageFetch].operands.push(OperandId, "'Coordinate'"); + InstructionDesc[OpImageFetch].operands.push(OperandImageOperands, "", true); + InstructionDesc[OpImageFetch].operands.push(OperandVariableIds, "", true); + + InstructionDesc[OpImageGather].operands.push(OperandId, "'Sampled Image'"); + InstructionDesc[OpImageGather].operands.push(OperandId, "'Coordinate'"); + InstructionDesc[OpImageGather].operands.push(OperandId, "'Component'"); + InstructionDesc[OpImageGather].operands.push(OperandImageOperands, "", true); + InstructionDesc[OpImageGather].operands.push(OperandVariableIds, "", true); + + InstructionDesc[OpImageDrefGather].operands.push(OperandId, "'Sampled Image'"); + InstructionDesc[OpImageDrefGather].operands.push(OperandId, "'Coordinate'"); + InstructionDesc[OpImageDrefGather].operands.push(OperandId, "'D~ref~'"); + InstructionDesc[OpImageDrefGather].operands.push(OperandImageOperands, "", true); + InstructionDesc[OpImageDrefGather].operands.push(OperandVariableIds, "", true); + + InstructionDesc[OpImageSparseSampleImplicitLod].operands.push(OperandId, "'Sampled Image'"); + InstructionDesc[OpImageSparseSampleImplicitLod].operands.push(OperandId, "'Coordinate'"); + InstructionDesc[OpImageSparseSampleImplicitLod].operands.push(OperandImageOperands, "", true); + InstructionDesc[OpImageSparseSampleImplicitLod].operands.push(OperandVariableIds, "", true); + + InstructionDesc[OpImageSparseSampleExplicitLod].operands.push(OperandId, "'Sampled Image'"); + InstructionDesc[OpImageSparseSampleExplicitLod].operands.push(OperandId, "'Coordinate'"); + InstructionDesc[OpImageSparseSampleExplicitLod].operands.push(OperandImageOperands, "", true); + InstructionDesc[OpImageSparseSampleExplicitLod].operands.push(OperandVariableIds, "", true); + + InstructionDesc[OpImageSparseSampleDrefImplicitLod].operands.push(OperandId, "'Sampled Image'"); + InstructionDesc[OpImageSparseSampleDrefImplicitLod].operands.push(OperandId, "'Coordinate'"); + InstructionDesc[OpImageSparseSampleDrefImplicitLod].operands.push(OperandId, "'D~ref~'"); + InstructionDesc[OpImageSparseSampleDrefImplicitLod].operands.push(OperandImageOperands, "", true); + InstructionDesc[OpImageSparseSampleDrefImplicitLod].operands.push(OperandVariableIds, "", true); - InstructionDesc[OpDecorateStringGOOGLE].operands.push(OperandId, "'Target'"); - InstructionDesc[OpDecorateStringGOOGLE].operands.push(OperandDecoration, ""); - InstructionDesc[OpDecorateStringGOOGLE].operands.push(OperandVariableLiteralStrings, "'Literal Strings'"); + InstructionDesc[OpImageSparseSampleDrefExplicitLod].operands.push(OperandId, "'Sampled Image'"); + InstructionDesc[OpImageSparseSampleDrefExplicitLod].operands.push(OperandId, "'Coordinate'"); + InstructionDesc[OpImageSparseSampleDrefExplicitLod].operands.push(OperandId, "'D~ref~'"); + InstructionDesc[OpImageSparseSampleDrefExplicitLod].operands.push(OperandImageOperands, "", true); + InstructionDesc[OpImageSparseSampleDrefExplicitLod].operands.push(OperandVariableIds, "", true); - InstructionDesc[OpMemberDecorate].operands.push(OperandId, "'Structure Type'"); - InstructionDesc[OpMemberDecorate].operands.push(OperandLiteralNumber, "'Member'"); - InstructionDesc[OpMemberDecorate].operands.push(OperandDecoration, ""); - InstructionDesc[OpMemberDecorate].operands.push(OperandVariableLiterals, "See <>."); + InstructionDesc[OpImageSparseSampleProjImplicitLod].operands.push(OperandId, "'Sampled Image'"); + InstructionDesc[OpImageSparseSampleProjImplicitLod].operands.push(OperandId, "'Coordinate'"); + InstructionDesc[OpImageSparseSampleProjImplicitLod].operands.push(OperandImageOperands, "", true); + InstructionDesc[OpImageSparseSampleProjImplicitLod].operands.push(OperandVariableIds, "", true); - InstructionDesc[OpMemberDecorateStringGOOGLE].operands.push(OperandId, "'Structure Type'"); - InstructionDesc[OpMemberDecorateStringGOOGLE].operands.push(OperandLiteralNumber, "'Member'"); - InstructionDesc[OpMemberDecorateStringGOOGLE].operands.push(OperandDecoration, ""); - InstructionDesc[OpMemberDecorateStringGOOGLE].operands.push(OperandVariableLiteralStrings, "'Literal Strings'"); + InstructionDesc[OpImageSparseSampleProjExplicitLod].operands.push(OperandId, "'Sampled Image'"); + InstructionDesc[OpImageSparseSampleProjExplicitLod].operands.push(OperandId, "'Coordinate'"); + InstructionDesc[OpImageSparseSampleProjExplicitLod].operands.push(OperandImageOperands, "", true); + InstructionDesc[OpImageSparseSampleProjExplicitLod].operands.push(OperandVariableIds, "", true); - InstructionDesc[OpGroupDecorate].operands.push(OperandId, "'Decoration Group'"); - InstructionDesc[OpGroupDecorate].operands.push(OperandVariableIds, "'Targets'"); + InstructionDesc[OpImageSparseSampleProjDrefImplicitLod].operands.push(OperandId, "'Sampled Image'"); + InstructionDesc[OpImageSparseSampleProjDrefImplicitLod].operands.push(OperandId, "'Coordinate'"); + InstructionDesc[OpImageSparseSampleProjDrefImplicitLod].operands.push(OperandId, "'D~ref~'"); + InstructionDesc[OpImageSparseSampleProjDrefImplicitLod].operands.push(OperandImageOperands, "", true); + InstructionDesc[OpImageSparseSampleProjDrefImplicitLod].operands.push(OperandVariableIds, "", true); - InstructionDesc[OpGroupMemberDecorate].operands.push(OperandId, "'Decoration Group'"); - InstructionDesc[OpGroupMemberDecorate].operands.push(OperandVariableIdLiteral, "'Targets'"); + InstructionDesc[OpImageSparseSampleProjDrefExplicitLod].operands.push(OperandId, "'Sampled Image'"); + InstructionDesc[OpImageSparseSampleProjDrefExplicitLod].operands.push(OperandId, "'Coordinate'"); + InstructionDesc[OpImageSparseSampleProjDrefExplicitLod].operands.push(OperandId, "'D~ref~'"); + InstructionDesc[OpImageSparseSampleProjDrefExplicitLod].operands.push(OperandImageOperands, "", true); + InstructionDesc[OpImageSparseSampleProjDrefExplicitLod].operands.push(OperandVariableIds, "", true); - InstructionDesc[OpVectorExtractDynamic].operands.push(OperandId, "'Vector'"); - InstructionDesc[OpVectorExtractDynamic].operands.push(OperandId, "'Index'"); + InstructionDesc[OpImageSparseFetch].operands.push(OperandId, "'Image'"); + InstructionDesc[OpImageSparseFetch].operands.push(OperandId, "'Coordinate'"); + InstructionDesc[OpImageSparseFetch].operands.push(OperandImageOperands, "", true); + InstructionDesc[OpImageSparseFetch].operands.push(OperandVariableIds, "", true); - InstructionDesc[OpVectorInsertDynamic].operands.push(OperandId, "'Vector'"); - InstructionDesc[OpVectorInsertDynamic].operands.push(OperandId, "'Component'"); - InstructionDesc[OpVectorInsertDynamic].operands.push(OperandId, "'Index'"); + InstructionDesc[OpImageSparseGather].operands.push(OperandId, "'Sampled Image'"); + InstructionDesc[OpImageSparseGather].operands.push(OperandId, "'Coordinate'"); + InstructionDesc[OpImageSparseGather].operands.push(OperandId, "'Component'"); + InstructionDesc[OpImageSparseGather].operands.push(OperandImageOperands, "", true); + InstructionDesc[OpImageSparseGather].operands.push(OperandVariableIds, "", true); - InstructionDesc[OpVectorShuffle].operands.push(OperandId, "'Vector 1'"); - InstructionDesc[OpVectorShuffle].operands.push(OperandId, "'Vector 2'"); - InstructionDesc[OpVectorShuffle].operands.push(OperandVariableLiterals, "'Components'"); + InstructionDesc[OpImageSparseDrefGather].operands.push(OperandId, "'Sampled Image'"); + InstructionDesc[OpImageSparseDrefGather].operands.push(OperandId, "'Coordinate'"); + InstructionDesc[OpImageSparseDrefGather].operands.push(OperandId, "'D~ref~'"); + InstructionDesc[OpImageSparseDrefGather].operands.push(OperandImageOperands, "", true); + InstructionDesc[OpImageSparseDrefGather].operands.push(OperandVariableIds, "", true); - InstructionDesc[OpCompositeConstruct].operands.push(OperandVariableIds, "'Constituents'"); + InstructionDesc[OpImageSparseRead].operands.push(OperandId, "'Image'"); + InstructionDesc[OpImageSparseRead].operands.push(OperandId, "'Coordinate'"); + InstructionDesc[OpImageSparseRead].operands.push(OperandImageOperands, "", true); + InstructionDesc[OpImageSparseRead].operands.push(OperandVariableIds, "", true); - InstructionDesc[OpCompositeExtract].operands.push(OperandId, "'Composite'"); - InstructionDesc[OpCompositeExtract].operands.push(OperandVariableLiterals, "'Indexes'"); + InstructionDesc[OpImageSparseTexelsResident].operands.push(OperandId, "'Resident Code'"); - InstructionDesc[OpCompositeInsert].operands.push(OperandId, "'Object'"); - InstructionDesc[OpCompositeInsert].operands.push(OperandId, "'Composite'"); - InstructionDesc[OpCompositeInsert].operands.push(OperandVariableLiterals, "'Indexes'"); + InstructionDesc[OpImageQuerySizeLod].operands.push(OperandId, "'Image'"); + InstructionDesc[OpImageQuerySizeLod].operands.push(OperandId, "'Level of Detail'"); - InstructionDesc[OpCopyObject].operands.push(OperandId, "'Operand'"); + InstructionDesc[OpImageQuerySize].operands.push(OperandId, "'Image'"); - InstructionDesc[OpCopyMemory].operands.push(OperandId, "'Target'"); - InstructionDesc[OpCopyMemory].operands.push(OperandId, "'Source'"); - InstructionDesc[OpCopyMemory].operands.push(OperandMemoryAccess, "", true); + InstructionDesc[OpImageQueryLod].operands.push(OperandId, "'Image'"); + InstructionDesc[OpImageQueryLod].operands.push(OperandId, "'Coordinate'"); - InstructionDesc[OpCopyMemorySized].operands.push(OperandId, "'Target'"); - InstructionDesc[OpCopyMemorySized].operands.push(OperandId, "'Source'"); - InstructionDesc[OpCopyMemorySized].operands.push(OperandId, "'Size'"); - InstructionDesc[OpCopyMemorySized].operands.push(OperandMemoryAccess, "", true); - - InstructionDesc[OpSampledImage].operands.push(OperandId, "'Image'"); - InstructionDesc[OpSampledImage].operands.push(OperandId, "'Sampler'"); - - InstructionDesc[OpImage].operands.push(OperandId, "'Sampled Image'"); - - InstructionDesc[OpImageRead].operands.push(OperandId, "'Image'"); - InstructionDesc[OpImageRead].operands.push(OperandId, "'Coordinate'"); - InstructionDesc[OpImageRead].operands.push(OperandImageOperands, "", true); - InstructionDesc[OpImageRead].operands.push(OperandVariableIds, "", true); - - InstructionDesc[OpImageWrite].operands.push(OperandId, "'Image'"); - InstructionDesc[OpImageWrite].operands.push(OperandId, "'Coordinate'"); - InstructionDesc[OpImageWrite].operands.push(OperandId, "'Texel'"); - InstructionDesc[OpImageWrite].operands.push(OperandImageOperands, "", true); - InstructionDesc[OpImageWrite].operands.push(OperandVariableIds, "", true); - - InstructionDesc[OpImageSampleImplicitLod].operands.push(OperandId, "'Sampled Image'"); - InstructionDesc[OpImageSampleImplicitLod].operands.push(OperandId, "'Coordinate'"); - InstructionDesc[OpImageSampleImplicitLod].operands.push(OperandImageOperands, "", true); - InstructionDesc[OpImageSampleImplicitLod].operands.push(OperandVariableIds, "", true); - - InstructionDesc[OpImageSampleExplicitLod].operands.push(OperandId, "'Sampled Image'"); - InstructionDesc[OpImageSampleExplicitLod].operands.push(OperandId, "'Coordinate'"); - InstructionDesc[OpImageSampleExplicitLod].operands.push(OperandImageOperands, "", true); - InstructionDesc[OpImageSampleExplicitLod].operands.push(OperandVariableIds, "", true); - - InstructionDesc[OpImageSampleDrefImplicitLod].operands.push(OperandId, "'Sampled Image'"); - InstructionDesc[OpImageSampleDrefImplicitLod].operands.push(OperandId, "'Coordinate'"); - InstructionDesc[OpImageSampleDrefImplicitLod].operands.push(OperandId, "'D~ref~'"); - InstructionDesc[OpImageSampleDrefImplicitLod].operands.push(OperandImageOperands, "", true); - InstructionDesc[OpImageSampleDrefImplicitLod].operands.push(OperandVariableIds, "", true); - - InstructionDesc[OpImageSampleDrefExplicitLod].operands.push(OperandId, "'Sampled Image'"); - InstructionDesc[OpImageSampleDrefExplicitLod].operands.push(OperandId, "'Coordinate'"); - InstructionDesc[OpImageSampleDrefExplicitLod].operands.push(OperandId, "'D~ref~'"); - InstructionDesc[OpImageSampleDrefExplicitLod].operands.push(OperandImageOperands, "", true); - InstructionDesc[OpImageSampleDrefExplicitLod].operands.push(OperandVariableIds, "", true); - - InstructionDesc[OpImageSampleProjImplicitLod].operands.push(OperandId, "'Sampled Image'"); - InstructionDesc[OpImageSampleProjImplicitLod].operands.push(OperandId, "'Coordinate'"); - InstructionDesc[OpImageSampleProjImplicitLod].operands.push(OperandImageOperands, "", true); - InstructionDesc[OpImageSampleProjImplicitLod].operands.push(OperandVariableIds, "", true); - - InstructionDesc[OpImageSampleProjExplicitLod].operands.push(OperandId, "'Sampled Image'"); - InstructionDesc[OpImageSampleProjExplicitLod].operands.push(OperandId, "'Coordinate'"); - InstructionDesc[OpImageSampleProjExplicitLod].operands.push(OperandImageOperands, "", true); - InstructionDesc[OpImageSampleProjExplicitLod].operands.push(OperandVariableIds, "", true); - - InstructionDesc[OpImageSampleProjDrefImplicitLod].operands.push(OperandId, "'Sampled Image'"); - InstructionDesc[OpImageSampleProjDrefImplicitLod].operands.push(OperandId, "'Coordinate'"); - InstructionDesc[OpImageSampleProjDrefImplicitLod].operands.push(OperandId, "'D~ref~'"); - InstructionDesc[OpImageSampleProjDrefImplicitLod].operands.push(OperandImageOperands, "", true); - InstructionDesc[OpImageSampleProjDrefImplicitLod].operands.push(OperandVariableIds, "", true); - - InstructionDesc[OpImageSampleProjDrefExplicitLod].operands.push(OperandId, "'Sampled Image'"); - InstructionDesc[OpImageSampleProjDrefExplicitLod].operands.push(OperandId, "'Coordinate'"); - InstructionDesc[OpImageSampleProjDrefExplicitLod].operands.push(OperandId, "'D~ref~'"); - InstructionDesc[OpImageSampleProjDrefExplicitLod].operands.push(OperandImageOperands, "", true); - InstructionDesc[OpImageSampleProjDrefExplicitLod].operands.push(OperandVariableIds, "", true); - - InstructionDesc[OpImageFetch].operands.push(OperandId, "'Image'"); - InstructionDesc[OpImageFetch].operands.push(OperandId, "'Coordinate'"); - InstructionDesc[OpImageFetch].operands.push(OperandImageOperands, "", true); - InstructionDesc[OpImageFetch].operands.push(OperandVariableIds, "", true); - - InstructionDesc[OpImageGather].operands.push(OperandId, "'Sampled Image'"); - InstructionDesc[OpImageGather].operands.push(OperandId, "'Coordinate'"); - InstructionDesc[OpImageGather].operands.push(OperandId, "'Component'"); - InstructionDesc[OpImageGather].operands.push(OperandImageOperands, "", true); - InstructionDesc[OpImageGather].operands.push(OperandVariableIds, "", true); - - InstructionDesc[OpImageDrefGather].operands.push(OperandId, "'Sampled Image'"); - InstructionDesc[OpImageDrefGather].operands.push(OperandId, "'Coordinate'"); - InstructionDesc[OpImageDrefGather].operands.push(OperandId, "'D~ref~'"); - InstructionDesc[OpImageDrefGather].operands.push(OperandImageOperands, "", true); - InstructionDesc[OpImageDrefGather].operands.push(OperandVariableIds, "", true); - - InstructionDesc[OpImageSparseSampleImplicitLod].operands.push(OperandId, "'Sampled Image'"); - InstructionDesc[OpImageSparseSampleImplicitLod].operands.push(OperandId, "'Coordinate'"); - InstructionDesc[OpImageSparseSampleImplicitLod].operands.push(OperandImageOperands, "", true); - InstructionDesc[OpImageSparseSampleImplicitLod].operands.push(OperandVariableIds, "", true); - - InstructionDesc[OpImageSparseSampleExplicitLod].operands.push(OperandId, "'Sampled Image'"); - InstructionDesc[OpImageSparseSampleExplicitLod].operands.push(OperandId, "'Coordinate'"); - InstructionDesc[OpImageSparseSampleExplicitLod].operands.push(OperandImageOperands, "", true); - InstructionDesc[OpImageSparseSampleExplicitLod].operands.push(OperandVariableIds, "", true); - - InstructionDesc[OpImageSparseSampleDrefImplicitLod].operands.push(OperandId, "'Sampled Image'"); - InstructionDesc[OpImageSparseSampleDrefImplicitLod].operands.push(OperandId, "'Coordinate'"); - InstructionDesc[OpImageSparseSampleDrefImplicitLod].operands.push(OperandId, "'D~ref~'"); - InstructionDesc[OpImageSparseSampleDrefImplicitLod].operands.push(OperandImageOperands, "", true); - InstructionDesc[OpImageSparseSampleDrefImplicitLod].operands.push(OperandVariableIds, "", true); + InstructionDesc[OpImageQueryLevels].operands.push(OperandId, "'Image'"); - InstructionDesc[OpImageSparseSampleDrefExplicitLod].operands.push(OperandId, "'Sampled Image'"); - InstructionDesc[OpImageSparseSampleDrefExplicitLod].operands.push(OperandId, "'Coordinate'"); - InstructionDesc[OpImageSparseSampleDrefExplicitLod].operands.push(OperandId, "'D~ref~'"); - InstructionDesc[OpImageSparseSampleDrefExplicitLod].operands.push(OperandImageOperands, "", true); - InstructionDesc[OpImageSparseSampleDrefExplicitLod].operands.push(OperandVariableIds, "", true); + InstructionDesc[OpImageQuerySamples].operands.push(OperandId, "'Image'"); - InstructionDesc[OpImageSparseSampleProjImplicitLod].operands.push(OperandId, "'Sampled Image'"); - InstructionDesc[OpImageSparseSampleProjImplicitLod].operands.push(OperandId, "'Coordinate'"); - InstructionDesc[OpImageSparseSampleProjImplicitLod].operands.push(OperandImageOperands, "", true); - InstructionDesc[OpImageSparseSampleProjImplicitLod].operands.push(OperandVariableIds, "", true); + InstructionDesc[OpImageQueryFormat].operands.push(OperandId, "'Image'"); - InstructionDesc[OpImageSparseSampleProjExplicitLod].operands.push(OperandId, "'Sampled Image'"); - InstructionDesc[OpImageSparseSampleProjExplicitLod].operands.push(OperandId, "'Coordinate'"); - InstructionDesc[OpImageSparseSampleProjExplicitLod].operands.push(OperandImageOperands, "", true); - InstructionDesc[OpImageSparseSampleProjExplicitLod].operands.push(OperandVariableIds, "", true); + InstructionDesc[OpImageQueryOrder].operands.push(OperandId, "'Image'"); - InstructionDesc[OpImageSparseSampleProjDrefImplicitLod].operands.push(OperandId, "'Sampled Image'"); - InstructionDesc[OpImageSparseSampleProjDrefImplicitLod].operands.push(OperandId, "'Coordinate'"); - InstructionDesc[OpImageSparseSampleProjDrefImplicitLod].operands.push(OperandId, "'D~ref~'"); - InstructionDesc[OpImageSparseSampleProjDrefImplicitLod].operands.push(OperandImageOperands, "", true); - InstructionDesc[OpImageSparseSampleProjDrefImplicitLod].operands.push(OperandVariableIds, "", true); + InstructionDesc[OpAccessChain].operands.push(OperandId, "'Base'"); + InstructionDesc[OpAccessChain].operands.push(OperandVariableIds, "'Indexes'"); - InstructionDesc[OpImageSparseSampleProjDrefExplicitLod].operands.push(OperandId, "'Sampled Image'"); - InstructionDesc[OpImageSparseSampleProjDrefExplicitLod].operands.push(OperandId, "'Coordinate'"); - InstructionDesc[OpImageSparseSampleProjDrefExplicitLod].operands.push(OperandId, "'D~ref~'"); - InstructionDesc[OpImageSparseSampleProjDrefExplicitLod].operands.push(OperandImageOperands, "", true); - InstructionDesc[OpImageSparseSampleProjDrefExplicitLod].operands.push(OperandVariableIds, "", true); + InstructionDesc[OpInBoundsAccessChain].operands.push(OperandId, "'Base'"); + InstructionDesc[OpInBoundsAccessChain].operands.push(OperandVariableIds, "'Indexes'"); - InstructionDesc[OpImageSparseFetch].operands.push(OperandId, "'Image'"); - InstructionDesc[OpImageSparseFetch].operands.push(OperandId, "'Coordinate'"); - InstructionDesc[OpImageSparseFetch].operands.push(OperandImageOperands, "", true); - InstructionDesc[OpImageSparseFetch].operands.push(OperandVariableIds, "", true); + InstructionDesc[OpPtrAccessChain].operands.push(OperandId, "'Base'"); + InstructionDesc[OpPtrAccessChain].operands.push(OperandId, "'Element'"); + InstructionDesc[OpPtrAccessChain].operands.push(OperandVariableIds, "'Indexes'"); - InstructionDesc[OpImageSparseGather].operands.push(OperandId, "'Sampled Image'"); - InstructionDesc[OpImageSparseGather].operands.push(OperandId, "'Coordinate'"); - InstructionDesc[OpImageSparseGather].operands.push(OperandId, "'Component'"); - InstructionDesc[OpImageSparseGather].operands.push(OperandImageOperands, "", true); - InstructionDesc[OpImageSparseGather].operands.push(OperandVariableIds, "", true); + InstructionDesc[OpInBoundsPtrAccessChain].operands.push(OperandId, "'Base'"); + InstructionDesc[OpInBoundsPtrAccessChain].operands.push(OperandId, "'Element'"); + InstructionDesc[OpInBoundsPtrAccessChain].operands.push(OperandVariableIds, "'Indexes'"); - InstructionDesc[OpImageSparseDrefGather].operands.push(OperandId, "'Sampled Image'"); - InstructionDesc[OpImageSparseDrefGather].operands.push(OperandId, "'Coordinate'"); - InstructionDesc[OpImageSparseDrefGather].operands.push(OperandId, "'D~ref~'"); - InstructionDesc[OpImageSparseDrefGather].operands.push(OperandImageOperands, "", true); - InstructionDesc[OpImageSparseDrefGather].operands.push(OperandVariableIds, "", true); + InstructionDesc[OpSNegate].operands.push(OperandId, "'Operand'"); - InstructionDesc[OpImageSparseRead].operands.push(OperandId, "'Image'"); - InstructionDesc[OpImageSparseRead].operands.push(OperandId, "'Coordinate'"); - InstructionDesc[OpImageSparseRead].operands.push(OperandImageOperands, "", true); - InstructionDesc[OpImageSparseRead].operands.push(OperandVariableIds, "", true); + InstructionDesc[OpFNegate].operands.push(OperandId, "'Operand'"); - InstructionDesc[OpImageSparseTexelsResident].operands.push(OperandId, "'Resident Code'"); + InstructionDesc[OpNot].operands.push(OperandId, "'Operand'"); - InstructionDesc[OpImageQuerySizeLod].operands.push(OperandId, "'Image'"); - InstructionDesc[OpImageQuerySizeLod].operands.push(OperandId, "'Level of Detail'"); + InstructionDesc[OpAny].operands.push(OperandId, "'Vector'"); - InstructionDesc[OpImageQuerySize].operands.push(OperandId, "'Image'"); + InstructionDesc[OpAll].operands.push(OperandId, "'Vector'"); - InstructionDesc[OpImageQueryLod].operands.push(OperandId, "'Image'"); - InstructionDesc[OpImageQueryLod].operands.push(OperandId, "'Coordinate'"); + InstructionDesc[OpConvertFToU].operands.push(OperandId, "'Float Value'"); - InstructionDesc[OpImageQueryLevels].operands.push(OperandId, "'Image'"); + InstructionDesc[OpConvertFToS].operands.push(OperandId, "'Float Value'"); - InstructionDesc[OpImageQuerySamples].operands.push(OperandId, "'Image'"); + InstructionDesc[OpConvertSToF].operands.push(OperandId, "'Signed Value'"); - InstructionDesc[OpImageQueryFormat].operands.push(OperandId, "'Image'"); + InstructionDesc[OpConvertUToF].operands.push(OperandId, "'Unsigned Value'"); - InstructionDesc[OpImageQueryOrder].operands.push(OperandId, "'Image'"); + InstructionDesc[OpUConvert].operands.push(OperandId, "'Unsigned Value'"); - InstructionDesc[OpAccessChain].operands.push(OperandId, "'Base'"); - InstructionDesc[OpAccessChain].operands.push(OperandVariableIds, "'Indexes'"); + InstructionDesc[OpSConvert].operands.push(OperandId, "'Signed Value'"); - InstructionDesc[OpInBoundsAccessChain].operands.push(OperandId, "'Base'"); - InstructionDesc[OpInBoundsAccessChain].operands.push(OperandVariableIds, "'Indexes'"); + InstructionDesc[OpFConvert].operands.push(OperandId, "'Float Value'"); - InstructionDesc[OpPtrAccessChain].operands.push(OperandId, "'Base'"); - InstructionDesc[OpPtrAccessChain].operands.push(OperandId, "'Element'"); - InstructionDesc[OpPtrAccessChain].operands.push(OperandVariableIds, "'Indexes'"); + InstructionDesc[OpSatConvertSToU].operands.push(OperandId, "'Signed Value'"); - InstructionDesc[OpInBoundsPtrAccessChain].operands.push(OperandId, "'Base'"); - InstructionDesc[OpInBoundsPtrAccessChain].operands.push(OperandId, "'Element'"); - InstructionDesc[OpInBoundsPtrAccessChain].operands.push(OperandVariableIds, "'Indexes'"); + InstructionDesc[OpSatConvertUToS].operands.push(OperandId, "'Unsigned Value'"); - InstructionDesc[OpSNegate].operands.push(OperandId, "'Operand'"); + InstructionDesc[OpConvertPtrToU].operands.push(OperandId, "'Pointer'"); - InstructionDesc[OpFNegate].operands.push(OperandId, "'Operand'"); + InstructionDesc[OpConvertUToPtr].operands.push(OperandId, "'Integer Value'"); - InstructionDesc[OpNot].operands.push(OperandId, "'Operand'"); + InstructionDesc[OpPtrCastToGeneric].operands.push(OperandId, "'Pointer'"); - InstructionDesc[OpAny].operands.push(OperandId, "'Vector'"); + InstructionDesc[OpGenericCastToPtr].operands.push(OperandId, "'Pointer'"); - InstructionDesc[OpAll].operands.push(OperandId, "'Vector'"); + InstructionDesc[OpGenericCastToPtrExplicit].operands.push(OperandId, "'Pointer'"); + InstructionDesc[OpGenericCastToPtrExplicit].operands.push(OperandStorage, "'Storage'"); - InstructionDesc[OpConvertFToU].operands.push(OperandId, "'Float Value'"); + InstructionDesc[OpGenericPtrMemSemantics].operands.push(OperandId, "'Pointer'"); - InstructionDesc[OpConvertFToS].operands.push(OperandId, "'Float Value'"); + InstructionDesc[OpBitcast].operands.push(OperandId, "'Operand'"); - InstructionDesc[OpConvertSToF].operands.push(OperandId, "'Signed Value'"); + InstructionDesc[OpQuantizeToF16].operands.push(OperandId, "'Value'"); - InstructionDesc[OpConvertUToF].operands.push(OperandId, "'Unsigned Value'"); + InstructionDesc[OpTranspose].operands.push(OperandId, "'Matrix'"); - InstructionDesc[OpUConvert].operands.push(OperandId, "'Unsigned Value'"); + InstructionDesc[OpCopyLogical].operands.push(OperandId, "'Operand'"); - InstructionDesc[OpSConvert].operands.push(OperandId, "'Signed Value'"); + InstructionDesc[OpIsNan].operands.push(OperandId, "'x'"); - InstructionDesc[OpFConvert].operands.push(OperandId, "'Float Value'"); + InstructionDesc[OpIsInf].operands.push(OperandId, "'x'"); - InstructionDesc[OpSatConvertSToU].operands.push(OperandId, "'Signed Value'"); + InstructionDesc[OpIsFinite].operands.push(OperandId, "'x'"); - InstructionDesc[OpSatConvertUToS].operands.push(OperandId, "'Unsigned Value'"); + InstructionDesc[OpIsNormal].operands.push(OperandId, "'x'"); - InstructionDesc[OpConvertPtrToU].operands.push(OperandId, "'Pointer'"); + InstructionDesc[OpSignBitSet].operands.push(OperandId, "'x'"); - InstructionDesc[OpConvertUToPtr].operands.push(OperandId, "'Integer Value'"); + InstructionDesc[OpLessOrGreater].operands.push(OperandId, "'x'"); + InstructionDesc[OpLessOrGreater].operands.push(OperandId, "'y'"); - InstructionDesc[OpPtrCastToGeneric].operands.push(OperandId, "'Pointer'"); + InstructionDesc[OpOrdered].operands.push(OperandId, "'x'"); + InstructionDesc[OpOrdered].operands.push(OperandId, "'y'"); - InstructionDesc[OpGenericCastToPtr].operands.push(OperandId, "'Pointer'"); + InstructionDesc[OpUnordered].operands.push(OperandId, "'x'"); + InstructionDesc[OpUnordered].operands.push(OperandId, "'y'"); - InstructionDesc[OpGenericCastToPtrExplicit].operands.push(OperandId, "'Pointer'"); - InstructionDesc[OpGenericCastToPtrExplicit].operands.push(OperandStorage, "'Storage'"); + InstructionDesc[OpArrayLength].operands.push(OperandId, "'Structure'"); + InstructionDesc[OpArrayLength].operands.push(OperandLiteralNumber, "'Array member'"); - InstructionDesc[OpGenericPtrMemSemantics].operands.push(OperandId, "'Pointer'"); + InstructionDesc[OpIAdd].operands.push(OperandId, "'Operand 1'"); + InstructionDesc[OpIAdd].operands.push(OperandId, "'Operand 2'"); - InstructionDesc[OpBitcast].operands.push(OperandId, "'Operand'"); + InstructionDesc[OpFAdd].operands.push(OperandId, "'Operand 1'"); + InstructionDesc[OpFAdd].operands.push(OperandId, "'Operand 2'"); - InstructionDesc[OpQuantizeToF16].operands.push(OperandId, "'Value'"); + InstructionDesc[OpISub].operands.push(OperandId, "'Operand 1'"); + InstructionDesc[OpISub].operands.push(OperandId, "'Operand 2'"); - InstructionDesc[OpTranspose].operands.push(OperandId, "'Matrix'"); + InstructionDesc[OpFSub].operands.push(OperandId, "'Operand 1'"); + InstructionDesc[OpFSub].operands.push(OperandId, "'Operand 2'"); - InstructionDesc[OpCopyLogical].operands.push(OperandId, "'Operand'"); + InstructionDesc[OpIMul].operands.push(OperandId, "'Operand 1'"); + InstructionDesc[OpIMul].operands.push(OperandId, "'Operand 2'"); - InstructionDesc[OpIsNan].operands.push(OperandId, "'x'"); + InstructionDesc[OpFMul].operands.push(OperandId, "'Operand 1'"); + InstructionDesc[OpFMul].operands.push(OperandId, "'Operand 2'"); - InstructionDesc[OpIsInf].operands.push(OperandId, "'x'"); + InstructionDesc[OpUDiv].operands.push(OperandId, "'Operand 1'"); + InstructionDesc[OpUDiv].operands.push(OperandId, "'Operand 2'"); - InstructionDesc[OpIsFinite].operands.push(OperandId, "'x'"); + InstructionDesc[OpSDiv].operands.push(OperandId, "'Operand 1'"); + InstructionDesc[OpSDiv].operands.push(OperandId, "'Operand 2'"); - InstructionDesc[OpIsNormal].operands.push(OperandId, "'x'"); + InstructionDesc[OpFDiv].operands.push(OperandId, "'Operand 1'"); + InstructionDesc[OpFDiv].operands.push(OperandId, "'Operand 2'"); - InstructionDesc[OpSignBitSet].operands.push(OperandId, "'x'"); + InstructionDesc[OpUMod].operands.push(OperandId, "'Operand 1'"); + InstructionDesc[OpUMod].operands.push(OperandId, "'Operand 2'"); - InstructionDesc[OpLessOrGreater].operands.push(OperandId, "'x'"); - InstructionDesc[OpLessOrGreater].operands.push(OperandId, "'y'"); + InstructionDesc[OpSRem].operands.push(OperandId, "'Operand 1'"); + InstructionDesc[OpSRem].operands.push(OperandId, "'Operand 2'"); - InstructionDesc[OpOrdered].operands.push(OperandId, "'x'"); - InstructionDesc[OpOrdered].operands.push(OperandId, "'y'"); + InstructionDesc[OpSMod].operands.push(OperandId, "'Operand 1'"); + InstructionDesc[OpSMod].operands.push(OperandId, "'Operand 2'"); - InstructionDesc[OpUnordered].operands.push(OperandId, "'x'"); - InstructionDesc[OpUnordered].operands.push(OperandId, "'y'"); + InstructionDesc[OpFRem].operands.push(OperandId, "'Operand 1'"); + InstructionDesc[OpFRem].operands.push(OperandId, "'Operand 2'"); - InstructionDesc[OpArrayLength].operands.push(OperandId, "'Structure'"); - InstructionDesc[OpArrayLength].operands.push(OperandLiteralNumber, "'Array member'"); + InstructionDesc[OpFMod].operands.push(OperandId, "'Operand 1'"); + InstructionDesc[OpFMod].operands.push(OperandId, "'Operand 2'"); - InstructionDesc[OpIAdd].operands.push(OperandId, "'Operand 1'"); - InstructionDesc[OpIAdd].operands.push(OperandId, "'Operand 2'"); + InstructionDesc[OpVectorTimesScalar].operands.push(OperandId, "'Vector'"); + InstructionDesc[OpVectorTimesScalar].operands.push(OperandId, "'Scalar'"); - InstructionDesc[OpFAdd].operands.push(OperandId, "'Operand 1'"); - InstructionDesc[OpFAdd].operands.push(OperandId, "'Operand 2'"); + InstructionDesc[OpMatrixTimesScalar].operands.push(OperandId, "'Matrix'"); + InstructionDesc[OpMatrixTimesScalar].operands.push(OperandId, "'Scalar'"); - InstructionDesc[OpISub].operands.push(OperandId, "'Operand 1'"); - InstructionDesc[OpISub].operands.push(OperandId, "'Operand 2'"); + InstructionDesc[OpVectorTimesMatrix].operands.push(OperandId, "'Vector'"); + InstructionDesc[OpVectorTimesMatrix].operands.push(OperandId, "'Matrix'"); - InstructionDesc[OpFSub].operands.push(OperandId, "'Operand 1'"); - InstructionDesc[OpFSub].operands.push(OperandId, "'Operand 2'"); + InstructionDesc[OpMatrixTimesVector].operands.push(OperandId, "'Matrix'"); + InstructionDesc[OpMatrixTimesVector].operands.push(OperandId, "'Vector'"); - InstructionDesc[OpIMul].operands.push(OperandId, "'Operand 1'"); - InstructionDesc[OpIMul].operands.push(OperandId, "'Operand 2'"); + InstructionDesc[OpMatrixTimesMatrix].operands.push(OperandId, "'LeftMatrix'"); + InstructionDesc[OpMatrixTimesMatrix].operands.push(OperandId, "'RightMatrix'"); - InstructionDesc[OpFMul].operands.push(OperandId, "'Operand 1'"); - InstructionDesc[OpFMul].operands.push(OperandId, "'Operand 2'"); + InstructionDesc[OpOuterProduct].operands.push(OperandId, "'Vector 1'"); + InstructionDesc[OpOuterProduct].operands.push(OperandId, "'Vector 2'"); - InstructionDesc[OpUDiv].operands.push(OperandId, "'Operand 1'"); - InstructionDesc[OpUDiv].operands.push(OperandId, "'Operand 2'"); + InstructionDesc[OpDot].operands.push(OperandId, "'Vector 1'"); + InstructionDesc[OpDot].operands.push(OperandId, "'Vector 2'"); - InstructionDesc[OpSDiv].operands.push(OperandId, "'Operand 1'"); - InstructionDesc[OpSDiv].operands.push(OperandId, "'Operand 2'"); + InstructionDesc[OpIAddCarry].operands.push(OperandId, "'Operand 1'"); + InstructionDesc[OpIAddCarry].operands.push(OperandId, "'Operand 2'"); - InstructionDesc[OpFDiv].operands.push(OperandId, "'Operand 1'"); - InstructionDesc[OpFDiv].operands.push(OperandId, "'Operand 2'"); + InstructionDesc[OpISubBorrow].operands.push(OperandId, "'Operand 1'"); + InstructionDesc[OpISubBorrow].operands.push(OperandId, "'Operand 2'"); - InstructionDesc[OpUMod].operands.push(OperandId, "'Operand 1'"); - InstructionDesc[OpUMod].operands.push(OperandId, "'Operand 2'"); + InstructionDesc[OpUMulExtended].operands.push(OperandId, "'Operand 1'"); + InstructionDesc[OpUMulExtended].operands.push(OperandId, "'Operand 2'"); - InstructionDesc[OpSRem].operands.push(OperandId, "'Operand 1'"); - InstructionDesc[OpSRem].operands.push(OperandId, "'Operand 2'"); + InstructionDesc[OpSMulExtended].operands.push(OperandId, "'Operand 1'"); + InstructionDesc[OpSMulExtended].operands.push(OperandId, "'Operand 2'"); - InstructionDesc[OpSMod].operands.push(OperandId, "'Operand 1'"); - InstructionDesc[OpSMod].operands.push(OperandId, "'Operand 2'"); + InstructionDesc[OpShiftRightLogical].operands.push(OperandId, "'Base'"); + InstructionDesc[OpShiftRightLogical].operands.push(OperandId, "'Shift'"); - InstructionDesc[OpFRem].operands.push(OperandId, "'Operand 1'"); - InstructionDesc[OpFRem].operands.push(OperandId, "'Operand 2'"); + InstructionDesc[OpShiftRightArithmetic].operands.push(OperandId, "'Base'"); + InstructionDesc[OpShiftRightArithmetic].operands.push(OperandId, "'Shift'"); - InstructionDesc[OpFMod].operands.push(OperandId, "'Operand 1'"); - InstructionDesc[OpFMod].operands.push(OperandId, "'Operand 2'"); + InstructionDesc[OpShiftLeftLogical].operands.push(OperandId, "'Base'"); + InstructionDesc[OpShiftLeftLogical].operands.push(OperandId, "'Shift'"); - InstructionDesc[OpVectorTimesScalar].operands.push(OperandId, "'Vector'"); - InstructionDesc[OpVectorTimesScalar].operands.push(OperandId, "'Scalar'"); + InstructionDesc[OpLogicalOr].operands.push(OperandId, "'Operand 1'"); + InstructionDesc[OpLogicalOr].operands.push(OperandId, "'Operand 2'"); - InstructionDesc[OpMatrixTimesScalar].operands.push(OperandId, "'Matrix'"); - InstructionDesc[OpMatrixTimesScalar].operands.push(OperandId, "'Scalar'"); + InstructionDesc[OpLogicalAnd].operands.push(OperandId, "'Operand 1'"); + InstructionDesc[OpLogicalAnd].operands.push(OperandId, "'Operand 2'"); - InstructionDesc[OpVectorTimesMatrix].operands.push(OperandId, "'Vector'"); - InstructionDesc[OpVectorTimesMatrix].operands.push(OperandId, "'Matrix'"); + InstructionDesc[OpLogicalEqual].operands.push(OperandId, "'Operand 1'"); + InstructionDesc[OpLogicalEqual].operands.push(OperandId, "'Operand 2'"); - InstructionDesc[OpMatrixTimesVector].operands.push(OperandId, "'Matrix'"); - InstructionDesc[OpMatrixTimesVector].operands.push(OperandId, "'Vector'"); + InstructionDesc[OpLogicalNotEqual].operands.push(OperandId, "'Operand 1'"); + InstructionDesc[OpLogicalNotEqual].operands.push(OperandId, "'Operand 2'"); - InstructionDesc[OpMatrixTimesMatrix].operands.push(OperandId, "'LeftMatrix'"); - InstructionDesc[OpMatrixTimesMatrix].operands.push(OperandId, "'RightMatrix'"); + InstructionDesc[OpLogicalNot].operands.push(OperandId, "'Operand'"); - InstructionDesc[OpOuterProduct].operands.push(OperandId, "'Vector 1'"); - InstructionDesc[OpOuterProduct].operands.push(OperandId, "'Vector 2'"); + InstructionDesc[OpBitwiseOr].operands.push(OperandId, "'Operand 1'"); + InstructionDesc[OpBitwiseOr].operands.push(OperandId, "'Operand 2'"); - InstructionDesc[OpDot].operands.push(OperandId, "'Vector 1'"); - InstructionDesc[OpDot].operands.push(OperandId, "'Vector 2'"); + InstructionDesc[OpBitwiseXor].operands.push(OperandId, "'Operand 1'"); + InstructionDesc[OpBitwiseXor].operands.push(OperandId, "'Operand 2'"); - InstructionDesc[OpIAddCarry].operands.push(OperandId, "'Operand 1'"); - InstructionDesc[OpIAddCarry].operands.push(OperandId, "'Operand 2'"); + InstructionDesc[OpBitwiseAnd].operands.push(OperandId, "'Operand 1'"); + InstructionDesc[OpBitwiseAnd].operands.push(OperandId, "'Operand 2'"); - InstructionDesc[OpISubBorrow].operands.push(OperandId, "'Operand 1'"); - InstructionDesc[OpISubBorrow].operands.push(OperandId, "'Operand 2'"); + InstructionDesc[OpBitFieldInsert].operands.push(OperandId, "'Base'"); + InstructionDesc[OpBitFieldInsert].operands.push(OperandId, "'Insert'"); + InstructionDesc[OpBitFieldInsert].operands.push(OperandId, "'Offset'"); + InstructionDesc[OpBitFieldInsert].operands.push(OperandId, "'Count'"); - InstructionDesc[OpUMulExtended].operands.push(OperandId, "'Operand 1'"); - InstructionDesc[OpUMulExtended].operands.push(OperandId, "'Operand 2'"); + InstructionDesc[OpBitFieldSExtract].operands.push(OperandId, "'Base'"); + InstructionDesc[OpBitFieldSExtract].operands.push(OperandId, "'Offset'"); + InstructionDesc[OpBitFieldSExtract].operands.push(OperandId, "'Count'"); - InstructionDesc[OpSMulExtended].operands.push(OperandId, "'Operand 1'"); - InstructionDesc[OpSMulExtended].operands.push(OperandId, "'Operand 2'"); + InstructionDesc[OpBitFieldUExtract].operands.push(OperandId, "'Base'"); + InstructionDesc[OpBitFieldUExtract].operands.push(OperandId, "'Offset'"); + InstructionDesc[OpBitFieldUExtract].operands.push(OperandId, "'Count'"); - InstructionDesc[OpShiftRightLogical].operands.push(OperandId, "'Base'"); - InstructionDesc[OpShiftRightLogical].operands.push(OperandId, "'Shift'"); + InstructionDesc[OpBitReverse].operands.push(OperandId, "'Base'"); - InstructionDesc[OpShiftRightArithmetic].operands.push(OperandId, "'Base'"); - InstructionDesc[OpShiftRightArithmetic].operands.push(OperandId, "'Shift'"); + InstructionDesc[OpBitCount].operands.push(OperandId, "'Base'"); - InstructionDesc[OpShiftLeftLogical].operands.push(OperandId, "'Base'"); - InstructionDesc[OpShiftLeftLogical].operands.push(OperandId, "'Shift'"); + InstructionDesc[OpSelect].operands.push(OperandId, "'Condition'"); + InstructionDesc[OpSelect].operands.push(OperandId, "'Object 1'"); + InstructionDesc[OpSelect].operands.push(OperandId, "'Object 2'"); - InstructionDesc[OpLogicalOr].operands.push(OperandId, "'Operand 1'"); - InstructionDesc[OpLogicalOr].operands.push(OperandId, "'Operand 2'"); + InstructionDesc[OpIEqual].operands.push(OperandId, "'Operand 1'"); + InstructionDesc[OpIEqual].operands.push(OperandId, "'Operand 2'"); - InstructionDesc[OpLogicalAnd].operands.push(OperandId, "'Operand 1'"); - InstructionDesc[OpLogicalAnd].operands.push(OperandId, "'Operand 2'"); + InstructionDesc[OpFOrdEqual].operands.push(OperandId, "'Operand 1'"); + InstructionDesc[OpFOrdEqual].operands.push(OperandId, "'Operand 2'"); - InstructionDesc[OpLogicalEqual].operands.push(OperandId, "'Operand 1'"); - InstructionDesc[OpLogicalEqual].operands.push(OperandId, "'Operand 2'"); + InstructionDesc[OpFUnordEqual].operands.push(OperandId, "'Operand 1'"); + InstructionDesc[OpFUnordEqual].operands.push(OperandId, "'Operand 2'"); - InstructionDesc[OpLogicalNotEqual].operands.push(OperandId, "'Operand 1'"); - InstructionDesc[OpLogicalNotEqual].operands.push(OperandId, "'Operand 2'"); + InstructionDesc[OpINotEqual].operands.push(OperandId, "'Operand 1'"); + InstructionDesc[OpINotEqual].operands.push(OperandId, "'Operand 2'"); - InstructionDesc[OpLogicalNot].operands.push(OperandId, "'Operand'"); + InstructionDesc[OpFOrdNotEqual].operands.push(OperandId, "'Operand 1'"); + InstructionDesc[OpFOrdNotEqual].operands.push(OperandId, "'Operand 2'"); - InstructionDesc[OpBitwiseOr].operands.push(OperandId, "'Operand 1'"); - InstructionDesc[OpBitwiseOr].operands.push(OperandId, "'Operand 2'"); + InstructionDesc[OpFUnordNotEqual].operands.push(OperandId, "'Operand 1'"); + InstructionDesc[OpFUnordNotEqual].operands.push(OperandId, "'Operand 2'"); - InstructionDesc[OpBitwiseXor].operands.push(OperandId, "'Operand 1'"); - InstructionDesc[OpBitwiseXor].operands.push(OperandId, "'Operand 2'"); + InstructionDesc[OpULessThan].operands.push(OperandId, "'Operand 1'"); + InstructionDesc[OpULessThan].operands.push(OperandId, "'Operand 2'"); - InstructionDesc[OpBitwiseAnd].operands.push(OperandId, "'Operand 1'"); - InstructionDesc[OpBitwiseAnd].operands.push(OperandId, "'Operand 2'"); + InstructionDesc[OpSLessThan].operands.push(OperandId, "'Operand 1'"); + InstructionDesc[OpSLessThan].operands.push(OperandId, "'Operand 2'"); - InstructionDesc[OpBitFieldInsert].operands.push(OperandId, "'Base'"); - InstructionDesc[OpBitFieldInsert].operands.push(OperandId, "'Insert'"); - InstructionDesc[OpBitFieldInsert].operands.push(OperandId, "'Offset'"); - InstructionDesc[OpBitFieldInsert].operands.push(OperandId, "'Count'"); + InstructionDesc[OpFOrdLessThan].operands.push(OperandId, "'Operand 1'"); + InstructionDesc[OpFOrdLessThan].operands.push(OperandId, "'Operand 2'"); - InstructionDesc[OpBitFieldSExtract].operands.push(OperandId, "'Base'"); - InstructionDesc[OpBitFieldSExtract].operands.push(OperandId, "'Offset'"); - InstructionDesc[OpBitFieldSExtract].operands.push(OperandId, "'Count'"); - - InstructionDesc[OpBitFieldUExtract].operands.push(OperandId, "'Base'"); - InstructionDesc[OpBitFieldUExtract].operands.push(OperandId, "'Offset'"); - InstructionDesc[OpBitFieldUExtract].operands.push(OperandId, "'Count'"); - - InstructionDesc[OpBitReverse].operands.push(OperandId, "'Base'"); + InstructionDesc[OpFUnordLessThan].operands.push(OperandId, "'Operand 1'"); + InstructionDesc[OpFUnordLessThan].operands.push(OperandId, "'Operand 2'"); - InstructionDesc[OpBitCount].operands.push(OperandId, "'Base'"); + InstructionDesc[OpUGreaterThan].operands.push(OperandId, "'Operand 1'"); + InstructionDesc[OpUGreaterThan].operands.push(OperandId, "'Operand 2'"); - InstructionDesc[OpSelect].operands.push(OperandId, "'Condition'"); - InstructionDesc[OpSelect].operands.push(OperandId, "'Object 1'"); - InstructionDesc[OpSelect].operands.push(OperandId, "'Object 2'"); + InstructionDesc[OpSGreaterThan].operands.push(OperandId, "'Operand 1'"); + InstructionDesc[OpSGreaterThan].operands.push(OperandId, "'Operand 2'"); - InstructionDesc[OpIEqual].operands.push(OperandId, "'Operand 1'"); - InstructionDesc[OpIEqual].operands.push(OperandId, "'Operand 2'"); + InstructionDesc[OpFOrdGreaterThan].operands.push(OperandId, "'Operand 1'"); + InstructionDesc[OpFOrdGreaterThan].operands.push(OperandId, "'Operand 2'"); - InstructionDesc[OpFOrdEqual].operands.push(OperandId, "'Operand 1'"); - InstructionDesc[OpFOrdEqual].operands.push(OperandId, "'Operand 2'"); + InstructionDesc[OpFUnordGreaterThan].operands.push(OperandId, "'Operand 1'"); + InstructionDesc[OpFUnordGreaterThan].operands.push(OperandId, "'Operand 2'"); - InstructionDesc[OpFUnordEqual].operands.push(OperandId, "'Operand 1'"); - InstructionDesc[OpFUnordEqual].operands.push(OperandId, "'Operand 2'"); + InstructionDesc[OpULessThanEqual].operands.push(OperandId, "'Operand 1'"); + InstructionDesc[OpULessThanEqual].operands.push(OperandId, "'Operand 2'"); - InstructionDesc[OpINotEqual].operands.push(OperandId, "'Operand 1'"); - InstructionDesc[OpINotEqual].operands.push(OperandId, "'Operand 2'"); + InstructionDesc[OpSLessThanEqual].operands.push(OperandId, "'Operand 1'"); + InstructionDesc[OpSLessThanEqual].operands.push(OperandId, "'Operand 2'"); - InstructionDesc[OpFOrdNotEqual].operands.push(OperandId, "'Operand 1'"); - InstructionDesc[OpFOrdNotEqual].operands.push(OperandId, "'Operand 2'"); + InstructionDesc[OpFOrdLessThanEqual].operands.push(OperandId, "'Operand 1'"); + InstructionDesc[OpFOrdLessThanEqual].operands.push(OperandId, "'Operand 2'"); - InstructionDesc[OpFUnordNotEqual].operands.push(OperandId, "'Operand 1'"); - InstructionDesc[OpFUnordNotEqual].operands.push(OperandId, "'Operand 2'"); + InstructionDesc[OpFUnordLessThanEqual].operands.push(OperandId, "'Operand 1'"); + InstructionDesc[OpFUnordLessThanEqual].operands.push(OperandId, "'Operand 2'"); - InstructionDesc[OpULessThan].operands.push(OperandId, "'Operand 1'"); - InstructionDesc[OpULessThan].operands.push(OperandId, "'Operand 2'"); + InstructionDesc[OpUGreaterThanEqual].operands.push(OperandId, "'Operand 1'"); + InstructionDesc[OpUGreaterThanEqual].operands.push(OperandId, "'Operand 2'"); - InstructionDesc[OpSLessThan].operands.push(OperandId, "'Operand 1'"); - InstructionDesc[OpSLessThan].operands.push(OperandId, "'Operand 2'"); + InstructionDesc[OpSGreaterThanEqual].operands.push(OperandId, "'Operand 1'"); + InstructionDesc[OpSGreaterThanEqual].operands.push(OperandId, "'Operand 2'"); - InstructionDesc[OpFOrdLessThan].operands.push(OperandId, "'Operand 1'"); - InstructionDesc[OpFOrdLessThan].operands.push(OperandId, "'Operand 2'"); + InstructionDesc[OpFOrdGreaterThanEqual].operands.push(OperandId, "'Operand 1'"); + InstructionDesc[OpFOrdGreaterThanEqual].operands.push(OperandId, "'Operand 2'"); - InstructionDesc[OpFUnordLessThan].operands.push(OperandId, "'Operand 1'"); - InstructionDesc[OpFUnordLessThan].operands.push(OperandId, "'Operand 2'"); + InstructionDesc[OpFUnordGreaterThanEqual].operands.push(OperandId, "'Operand 1'"); + InstructionDesc[OpFUnordGreaterThanEqual].operands.push(OperandId, "'Operand 2'"); - InstructionDesc[OpUGreaterThan].operands.push(OperandId, "'Operand 1'"); - InstructionDesc[OpUGreaterThan].operands.push(OperandId, "'Operand 2'"); + InstructionDesc[OpDPdx].operands.push(OperandId, "'P'"); - InstructionDesc[OpSGreaterThan].operands.push(OperandId, "'Operand 1'"); - InstructionDesc[OpSGreaterThan].operands.push(OperandId, "'Operand 2'"); + InstructionDesc[OpDPdy].operands.push(OperandId, "'P'"); - InstructionDesc[OpFOrdGreaterThan].operands.push(OperandId, "'Operand 1'"); - InstructionDesc[OpFOrdGreaterThan].operands.push(OperandId, "'Operand 2'"); + InstructionDesc[OpFwidth].operands.push(OperandId, "'P'"); - InstructionDesc[OpFUnordGreaterThan].operands.push(OperandId, "'Operand 1'"); - InstructionDesc[OpFUnordGreaterThan].operands.push(OperandId, "'Operand 2'"); + InstructionDesc[OpDPdxFine].operands.push(OperandId, "'P'"); - InstructionDesc[OpULessThanEqual].operands.push(OperandId, "'Operand 1'"); - InstructionDesc[OpULessThanEqual].operands.push(OperandId, "'Operand 2'"); + InstructionDesc[OpDPdyFine].operands.push(OperandId, "'P'"); - InstructionDesc[OpSLessThanEqual].operands.push(OperandId, "'Operand 1'"); - InstructionDesc[OpSLessThanEqual].operands.push(OperandId, "'Operand 2'"); + InstructionDesc[OpFwidthFine].operands.push(OperandId, "'P'"); - InstructionDesc[OpFOrdLessThanEqual].operands.push(OperandId, "'Operand 1'"); - InstructionDesc[OpFOrdLessThanEqual].operands.push(OperandId, "'Operand 2'"); + InstructionDesc[OpDPdxCoarse].operands.push(OperandId, "'P'"); - InstructionDesc[OpFUnordLessThanEqual].operands.push(OperandId, "'Operand 1'"); - InstructionDesc[OpFUnordLessThanEqual].operands.push(OperandId, "'Operand 2'"); + InstructionDesc[OpDPdyCoarse].operands.push(OperandId, "'P'"); - InstructionDesc[OpUGreaterThanEqual].operands.push(OperandId, "'Operand 1'"); - InstructionDesc[OpUGreaterThanEqual].operands.push(OperandId, "'Operand 2'"); + InstructionDesc[OpFwidthCoarse].operands.push(OperandId, "'P'"); - InstructionDesc[OpSGreaterThanEqual].operands.push(OperandId, "'Operand 1'"); - InstructionDesc[OpSGreaterThanEqual].operands.push(OperandId, "'Operand 2'"); + InstructionDesc[OpEmitStreamVertex].operands.push(OperandId, "'Stream'"); - InstructionDesc[OpFOrdGreaterThanEqual].operands.push(OperandId, "'Operand 1'"); - InstructionDesc[OpFOrdGreaterThanEqual].operands.push(OperandId, "'Operand 2'"); + InstructionDesc[OpEndStreamPrimitive].operands.push(OperandId, "'Stream'"); - InstructionDesc[OpFUnordGreaterThanEqual].operands.push(OperandId, "'Operand 1'"); - InstructionDesc[OpFUnordGreaterThanEqual].operands.push(OperandId, "'Operand 2'"); + InstructionDesc[OpControlBarrier].operands.push(OperandScope, "'Execution'"); + InstructionDesc[OpControlBarrier].operands.push(OperandScope, "'Memory'"); + InstructionDesc[OpControlBarrier].operands.push(OperandMemorySemantics, "'Semantics'"); - InstructionDesc[OpDPdx].operands.push(OperandId, "'P'"); + InstructionDesc[OpMemoryBarrier].operands.push(OperandScope, "'Memory'"); + InstructionDesc[OpMemoryBarrier].operands.push(OperandMemorySemantics, "'Semantics'"); - InstructionDesc[OpDPdy].operands.push(OperandId, "'P'"); + InstructionDesc[OpImageTexelPointer].operands.push(OperandId, "'Image'"); + InstructionDesc[OpImageTexelPointer].operands.push(OperandId, "'Coordinate'"); + InstructionDesc[OpImageTexelPointer].operands.push(OperandId, "'Sample'"); - InstructionDesc[OpFwidth].operands.push(OperandId, "'P'"); + InstructionDesc[OpAtomicLoad].operands.push(OperandId, "'Pointer'"); + InstructionDesc[OpAtomicLoad].operands.push(OperandScope, "'Scope'"); + InstructionDesc[OpAtomicLoad].operands.push(OperandMemorySemantics, "'Semantics'"); - InstructionDesc[OpDPdxFine].operands.push(OperandId, "'P'"); + InstructionDesc[OpAtomicStore].operands.push(OperandId, "'Pointer'"); + InstructionDesc[OpAtomicStore].operands.push(OperandScope, "'Scope'"); + InstructionDesc[OpAtomicStore].operands.push(OperandMemorySemantics, "'Semantics'"); + InstructionDesc[OpAtomicStore].operands.push(OperandId, "'Value'"); - InstructionDesc[OpDPdyFine].operands.push(OperandId, "'P'"); + InstructionDesc[OpAtomicExchange].operands.push(OperandId, "'Pointer'"); + InstructionDesc[OpAtomicExchange].operands.push(OperandScope, "'Scope'"); + InstructionDesc[OpAtomicExchange].operands.push(OperandMemorySemantics, "'Semantics'"); + InstructionDesc[OpAtomicExchange].operands.push(OperandId, "'Value'"); - InstructionDesc[OpFwidthFine].operands.push(OperandId, "'P'"); + InstructionDesc[OpAtomicCompareExchange].operands.push(OperandId, "'Pointer'"); + InstructionDesc[OpAtomicCompareExchange].operands.push(OperandScope, "'Scope'"); + InstructionDesc[OpAtomicCompareExchange].operands.push(OperandMemorySemantics, "'Equal'"); + InstructionDesc[OpAtomicCompareExchange].operands.push(OperandMemorySemantics, "'Unequal'"); + InstructionDesc[OpAtomicCompareExchange].operands.push(OperandId, "'Value'"); + InstructionDesc[OpAtomicCompareExchange].operands.push(OperandId, "'Comparator'"); - InstructionDesc[OpDPdxCoarse].operands.push(OperandId, "'P'"); + InstructionDesc[OpAtomicCompareExchangeWeak].operands.push(OperandId, "'Pointer'"); + InstructionDesc[OpAtomicCompareExchangeWeak].operands.push(OperandScope, "'Scope'"); + InstructionDesc[OpAtomicCompareExchangeWeak].operands.push(OperandMemorySemantics, "'Equal'"); + InstructionDesc[OpAtomicCompareExchangeWeak].operands.push(OperandMemorySemantics, "'Unequal'"); + InstructionDesc[OpAtomicCompareExchangeWeak].operands.push(OperandId, "'Value'"); + InstructionDesc[OpAtomicCompareExchangeWeak].operands.push(OperandId, "'Comparator'"); - InstructionDesc[OpDPdyCoarse].operands.push(OperandId, "'P'"); + InstructionDesc[OpAtomicIIncrement].operands.push(OperandId, "'Pointer'"); + InstructionDesc[OpAtomicIIncrement].operands.push(OperandScope, "'Scope'"); + InstructionDesc[OpAtomicIIncrement].operands.push(OperandMemorySemantics, "'Semantics'"); - InstructionDesc[OpFwidthCoarse].operands.push(OperandId, "'P'"); + InstructionDesc[OpAtomicIDecrement].operands.push(OperandId, "'Pointer'"); + InstructionDesc[OpAtomicIDecrement].operands.push(OperandScope, "'Scope'"); + InstructionDesc[OpAtomicIDecrement].operands.push(OperandMemorySemantics, "'Semantics'"); - InstructionDesc[OpEmitStreamVertex].operands.push(OperandId, "'Stream'"); + InstructionDesc[OpAtomicIAdd].operands.push(OperandId, "'Pointer'"); + InstructionDesc[OpAtomicIAdd].operands.push(OperandScope, "'Scope'"); + InstructionDesc[OpAtomicIAdd].operands.push(OperandMemorySemantics, "'Semantics'"); + InstructionDesc[OpAtomicIAdd].operands.push(OperandId, "'Value'"); - InstructionDesc[OpEndStreamPrimitive].operands.push(OperandId, "'Stream'"); + InstructionDesc[OpAtomicFAddEXT].operands.push(OperandId, "'Pointer'"); + InstructionDesc[OpAtomicFAddEXT].operands.push(OperandScope, "'Scope'"); + InstructionDesc[OpAtomicFAddEXT].operands.push(OperandMemorySemantics, "'Semantics'"); + InstructionDesc[OpAtomicFAddEXT].operands.push(OperandId, "'Value'"); - InstructionDesc[OpControlBarrier].operands.push(OperandScope, "'Execution'"); - InstructionDesc[OpControlBarrier].operands.push(OperandScope, "'Memory'"); - InstructionDesc[OpControlBarrier].operands.push(OperandMemorySemantics, "'Semantics'"); + InstructionDesc[OpAtomicISub].operands.push(OperandId, "'Pointer'"); + InstructionDesc[OpAtomicISub].operands.push(OperandScope, "'Scope'"); + InstructionDesc[OpAtomicISub].operands.push(OperandMemorySemantics, "'Semantics'"); + InstructionDesc[OpAtomicISub].operands.push(OperandId, "'Value'"); - InstructionDesc[OpMemoryBarrier].operands.push(OperandScope, "'Memory'"); - InstructionDesc[OpMemoryBarrier].operands.push(OperandMemorySemantics, "'Semantics'"); + InstructionDesc[OpAtomicUMin].operands.push(OperandId, "'Pointer'"); + InstructionDesc[OpAtomicUMin].operands.push(OperandScope, "'Scope'"); + InstructionDesc[OpAtomicUMin].operands.push(OperandMemorySemantics, "'Semantics'"); + InstructionDesc[OpAtomicUMin].operands.push(OperandId, "'Value'"); - InstructionDesc[OpImageTexelPointer].operands.push(OperandId, "'Image'"); - InstructionDesc[OpImageTexelPointer].operands.push(OperandId, "'Coordinate'"); - InstructionDesc[OpImageTexelPointer].operands.push(OperandId, "'Sample'"); + InstructionDesc[OpAtomicUMax].operands.push(OperandId, "'Pointer'"); + InstructionDesc[OpAtomicUMax].operands.push(OperandScope, "'Scope'"); + InstructionDesc[OpAtomicUMax].operands.push(OperandMemorySemantics, "'Semantics'"); + InstructionDesc[OpAtomicUMax].operands.push(OperandId, "'Value'"); - InstructionDesc[OpAtomicLoad].operands.push(OperandId, "'Pointer'"); - InstructionDesc[OpAtomicLoad].operands.push(OperandScope, "'Scope'"); - InstructionDesc[OpAtomicLoad].operands.push(OperandMemorySemantics, "'Semantics'"); + InstructionDesc[OpAtomicSMin].operands.push(OperandId, "'Pointer'"); + InstructionDesc[OpAtomicSMin].operands.push(OperandScope, "'Scope'"); + InstructionDesc[OpAtomicSMin].operands.push(OperandMemorySemantics, "'Semantics'"); + InstructionDesc[OpAtomicSMin].operands.push(OperandId, "'Value'"); - InstructionDesc[OpAtomicStore].operands.push(OperandId, "'Pointer'"); - InstructionDesc[OpAtomicStore].operands.push(OperandScope, "'Scope'"); - InstructionDesc[OpAtomicStore].operands.push(OperandMemorySemantics, "'Semantics'"); - InstructionDesc[OpAtomicStore].operands.push(OperandId, "'Value'"); + InstructionDesc[OpAtomicSMax].operands.push(OperandId, "'Pointer'"); + InstructionDesc[OpAtomicSMax].operands.push(OperandScope, "'Scope'"); + InstructionDesc[OpAtomicSMax].operands.push(OperandMemorySemantics, "'Semantics'"); + InstructionDesc[OpAtomicSMax].operands.push(OperandId, "'Value'"); - InstructionDesc[OpAtomicExchange].operands.push(OperandId, "'Pointer'"); - InstructionDesc[OpAtomicExchange].operands.push(OperandScope, "'Scope'"); - InstructionDesc[OpAtomicExchange].operands.push(OperandMemorySemantics, "'Semantics'"); - InstructionDesc[OpAtomicExchange].operands.push(OperandId, "'Value'"); + InstructionDesc[OpAtomicFMinEXT].operands.push(OperandId, "'Pointer'"); + InstructionDesc[OpAtomicFMinEXT].operands.push(OperandScope, "'Scope'"); + InstructionDesc[OpAtomicFMinEXT].operands.push(OperandMemorySemantics, "'Semantics'"); + InstructionDesc[OpAtomicFMinEXT].operands.push(OperandId, "'Value'"); - InstructionDesc[OpAtomicCompareExchange].operands.push(OperandId, "'Pointer'"); - InstructionDesc[OpAtomicCompareExchange].operands.push(OperandScope, "'Scope'"); - InstructionDesc[OpAtomicCompareExchange].operands.push(OperandMemorySemantics, "'Equal'"); - InstructionDesc[OpAtomicCompareExchange].operands.push(OperandMemorySemantics, "'Unequal'"); - InstructionDesc[OpAtomicCompareExchange].operands.push(OperandId, "'Value'"); - InstructionDesc[OpAtomicCompareExchange].operands.push(OperandId, "'Comparator'"); + InstructionDesc[OpAtomicFMaxEXT].operands.push(OperandId, "'Pointer'"); + InstructionDesc[OpAtomicFMaxEXT].operands.push(OperandScope, "'Scope'"); + InstructionDesc[OpAtomicFMaxEXT].operands.push(OperandMemorySemantics, "'Semantics'"); + InstructionDesc[OpAtomicFMaxEXT].operands.push(OperandId, "'Value'"); - InstructionDesc[OpAtomicCompareExchangeWeak].operands.push(OperandId, "'Pointer'"); - InstructionDesc[OpAtomicCompareExchangeWeak].operands.push(OperandScope, "'Scope'"); - InstructionDesc[OpAtomicCompareExchangeWeak].operands.push(OperandMemorySemantics, "'Equal'"); - InstructionDesc[OpAtomicCompareExchangeWeak].operands.push(OperandMemorySemantics, "'Unequal'"); - InstructionDesc[OpAtomicCompareExchangeWeak].operands.push(OperandId, "'Value'"); - InstructionDesc[OpAtomicCompareExchangeWeak].operands.push(OperandId, "'Comparator'"); + InstructionDesc[OpAtomicAnd].operands.push(OperandId, "'Pointer'"); + InstructionDesc[OpAtomicAnd].operands.push(OperandScope, "'Scope'"); + InstructionDesc[OpAtomicAnd].operands.push(OperandMemorySemantics, "'Semantics'"); + InstructionDesc[OpAtomicAnd].operands.push(OperandId, "'Value'"); + + InstructionDesc[OpAtomicOr].operands.push(OperandId, "'Pointer'"); + InstructionDesc[OpAtomicOr].operands.push(OperandScope, "'Scope'"); + InstructionDesc[OpAtomicOr].operands.push(OperandMemorySemantics, "'Semantics'"); + InstructionDesc[OpAtomicOr].operands.push(OperandId, "'Value'"); + + InstructionDesc[OpAtomicXor].operands.push(OperandId, "'Pointer'"); + InstructionDesc[OpAtomicXor].operands.push(OperandScope, "'Scope'"); + InstructionDesc[OpAtomicXor].operands.push(OperandMemorySemantics, "'Semantics'"); + InstructionDesc[OpAtomicXor].operands.push(OperandId, "'Value'"); + + InstructionDesc[OpAtomicFlagTestAndSet].operands.push(OperandId, "'Pointer'"); + InstructionDesc[OpAtomicFlagTestAndSet].operands.push(OperandScope, "'Scope'"); + InstructionDesc[OpAtomicFlagTestAndSet].operands.push(OperandMemorySemantics, "'Semantics'"); + + InstructionDesc[OpAtomicFlagClear].operands.push(OperandId, "'Pointer'"); + InstructionDesc[OpAtomicFlagClear].operands.push(OperandScope, "'Scope'"); + InstructionDesc[OpAtomicFlagClear].operands.push(OperandMemorySemantics, "'Semantics'"); + + InstructionDesc[OpLoopMerge].operands.push(OperandId, "'Merge Block'"); + InstructionDesc[OpLoopMerge].operands.push(OperandId, "'Continue Target'"); + InstructionDesc[OpLoopMerge].operands.push(OperandLoop, ""); + InstructionDesc[OpLoopMerge].operands.push(OperandOptionalLiteral, ""); + + InstructionDesc[OpSelectionMerge].operands.push(OperandId, "'Merge Block'"); + InstructionDesc[OpSelectionMerge].operands.push(OperandSelect, ""); + + InstructionDesc[OpBranch].operands.push(OperandId, "'Target Label'"); + + InstructionDesc[OpBranchConditional].operands.push(OperandId, "'Condition'"); + InstructionDesc[OpBranchConditional].operands.push(OperandId, "'True Label'"); + InstructionDesc[OpBranchConditional].operands.push(OperandId, "'False Label'"); + InstructionDesc[OpBranchConditional].operands.push(OperandVariableLiterals, "'Branch weights'"); + + InstructionDesc[OpSwitch].operands.push(OperandId, "'Selector'"); + InstructionDesc[OpSwitch].operands.push(OperandId, "'Default'"); + InstructionDesc[OpSwitch].operands.push(OperandVariableLiteralId, "'Target'"); + + + InstructionDesc[OpReturnValue].operands.push(OperandId, "'Value'"); + + InstructionDesc[OpLifetimeStart].operands.push(OperandId, "'Pointer'"); + InstructionDesc[OpLifetimeStart].operands.push(OperandLiteralNumber, "'Size'"); + + InstructionDesc[OpLifetimeStop].operands.push(OperandId, "'Pointer'"); + InstructionDesc[OpLifetimeStop].operands.push(OperandLiteralNumber, "'Size'"); + + InstructionDesc[OpGroupAsyncCopy].operands.push(OperandScope, "'Execution'"); + InstructionDesc[OpGroupAsyncCopy].operands.push(OperandId, "'Destination'"); + InstructionDesc[OpGroupAsyncCopy].operands.push(OperandId, "'Source'"); + InstructionDesc[OpGroupAsyncCopy].operands.push(OperandId, "'Num Elements'"); + InstructionDesc[OpGroupAsyncCopy].operands.push(OperandId, "'Stride'"); + InstructionDesc[OpGroupAsyncCopy].operands.push(OperandId, "'Event'"); + + InstructionDesc[OpGroupWaitEvents].operands.push(OperandScope, "'Execution'"); + InstructionDesc[OpGroupWaitEvents].operands.push(OperandId, "'Num Events'"); + InstructionDesc[OpGroupWaitEvents].operands.push(OperandId, "'Events List'"); + + InstructionDesc[OpGroupAll].operands.push(OperandScope, "'Execution'"); + InstructionDesc[OpGroupAll].operands.push(OperandId, "'Predicate'"); + + InstructionDesc[OpGroupAny].operands.push(OperandScope, "'Execution'"); + InstructionDesc[OpGroupAny].operands.push(OperandId, "'Predicate'"); + + InstructionDesc[OpGroupBroadcast].operands.push(OperandScope, "'Execution'"); + InstructionDesc[OpGroupBroadcast].operands.push(OperandId, "'Value'"); + InstructionDesc[OpGroupBroadcast].operands.push(OperandId, "'LocalId'"); + + InstructionDesc[OpGroupIAdd].operands.push(OperandScope, "'Execution'"); + InstructionDesc[OpGroupIAdd].operands.push(OperandGroupOperation, "'Operation'"); + InstructionDesc[OpGroupIAdd].operands.push(OperandId, "'X'"); + + InstructionDesc[OpGroupFAdd].operands.push(OperandScope, "'Execution'"); + InstructionDesc[OpGroupFAdd].operands.push(OperandGroupOperation, "'Operation'"); + InstructionDesc[OpGroupFAdd].operands.push(OperandId, "'X'"); + + InstructionDesc[OpGroupUMin].operands.push(OperandScope, "'Execution'"); + InstructionDesc[OpGroupUMin].operands.push(OperandGroupOperation, "'Operation'"); + InstructionDesc[OpGroupUMin].operands.push(OperandId, "'X'"); + + InstructionDesc[OpGroupSMin].operands.push(OperandScope, "'Execution'"); + InstructionDesc[OpGroupSMin].operands.push(OperandGroupOperation, "'Operation'"); + InstructionDesc[OpGroupSMin].operands.push(OperandId, "X"); + + InstructionDesc[OpGroupFMin].operands.push(OperandScope, "'Execution'"); + InstructionDesc[OpGroupFMin].operands.push(OperandGroupOperation, "'Operation'"); + InstructionDesc[OpGroupFMin].operands.push(OperandId, "X"); + + InstructionDesc[OpGroupUMax].operands.push(OperandScope, "'Execution'"); + InstructionDesc[OpGroupUMax].operands.push(OperandGroupOperation, "'Operation'"); + InstructionDesc[OpGroupUMax].operands.push(OperandId, "X"); + + InstructionDesc[OpGroupSMax].operands.push(OperandScope, "'Execution'"); + InstructionDesc[OpGroupSMax].operands.push(OperandGroupOperation, "'Operation'"); + InstructionDesc[OpGroupSMax].operands.push(OperandId, "X"); + + InstructionDesc[OpGroupFMax].operands.push(OperandScope, "'Execution'"); + InstructionDesc[OpGroupFMax].operands.push(OperandGroupOperation, "'Operation'"); + InstructionDesc[OpGroupFMax].operands.push(OperandId, "X"); + + InstructionDesc[OpReadPipe].operands.push(OperandId, "'Pipe'"); + InstructionDesc[OpReadPipe].operands.push(OperandId, "'Pointer'"); + InstructionDesc[OpReadPipe].operands.push(OperandId, "'Packet Size'"); + InstructionDesc[OpReadPipe].operands.push(OperandId, "'Packet Alignment'"); + + InstructionDesc[OpWritePipe].operands.push(OperandId, "'Pipe'"); + InstructionDesc[OpWritePipe].operands.push(OperandId, "'Pointer'"); + InstructionDesc[OpWritePipe].operands.push(OperandId, "'Packet Size'"); + InstructionDesc[OpWritePipe].operands.push(OperandId, "'Packet Alignment'"); + + InstructionDesc[OpReservedReadPipe].operands.push(OperandId, "'Pipe'"); + InstructionDesc[OpReservedReadPipe].operands.push(OperandId, "'Reserve Id'"); + InstructionDesc[OpReservedReadPipe].operands.push(OperandId, "'Index'"); + InstructionDesc[OpReservedReadPipe].operands.push(OperandId, "'Pointer'"); + InstructionDesc[OpReservedReadPipe].operands.push(OperandId, "'Packet Size'"); + InstructionDesc[OpReservedReadPipe].operands.push(OperandId, "'Packet Alignment'"); + + InstructionDesc[OpReservedWritePipe].operands.push(OperandId, "'Pipe'"); + InstructionDesc[OpReservedWritePipe].operands.push(OperandId, "'Reserve Id'"); + InstructionDesc[OpReservedWritePipe].operands.push(OperandId, "'Index'"); + InstructionDesc[OpReservedWritePipe].operands.push(OperandId, "'Pointer'"); + InstructionDesc[OpReservedWritePipe].operands.push(OperandId, "'Packet Size'"); + InstructionDesc[OpReservedWritePipe].operands.push(OperandId, "'Packet Alignment'"); + + InstructionDesc[OpReserveReadPipePackets].operands.push(OperandId, "'Pipe'"); + InstructionDesc[OpReserveReadPipePackets].operands.push(OperandId, "'Num Packets'"); + InstructionDesc[OpReserveReadPipePackets].operands.push(OperandId, "'Packet Size'"); + InstructionDesc[OpReserveReadPipePackets].operands.push(OperandId, "'Packet Alignment'"); + + InstructionDesc[OpReserveWritePipePackets].operands.push(OperandId, "'Pipe'"); + InstructionDesc[OpReserveWritePipePackets].operands.push(OperandId, "'Num Packets'"); + InstructionDesc[OpReserveWritePipePackets].operands.push(OperandId, "'Packet Size'"); + InstructionDesc[OpReserveWritePipePackets].operands.push(OperandId, "'Packet Alignment'"); + + InstructionDesc[OpCommitReadPipe].operands.push(OperandId, "'Pipe'"); + InstructionDesc[OpCommitReadPipe].operands.push(OperandId, "'Reserve Id'"); + InstructionDesc[OpCommitReadPipe].operands.push(OperandId, "'Packet Size'"); + InstructionDesc[OpCommitReadPipe].operands.push(OperandId, "'Packet Alignment'"); + + InstructionDesc[OpCommitWritePipe].operands.push(OperandId, "'Pipe'"); + InstructionDesc[OpCommitWritePipe].operands.push(OperandId, "'Reserve Id'"); + InstructionDesc[OpCommitWritePipe].operands.push(OperandId, "'Packet Size'"); + InstructionDesc[OpCommitWritePipe].operands.push(OperandId, "'Packet Alignment'"); + + InstructionDesc[OpIsValidReserveId].operands.push(OperandId, "'Reserve Id'"); + + InstructionDesc[OpGetNumPipePackets].operands.push(OperandId, "'Pipe'"); + InstructionDesc[OpGetNumPipePackets].operands.push(OperandId, "'Packet Size'"); + InstructionDesc[OpGetNumPipePackets].operands.push(OperandId, "'Packet Alignment'"); + + InstructionDesc[OpGetMaxPipePackets].operands.push(OperandId, "'Pipe'"); + InstructionDesc[OpGetMaxPipePackets].operands.push(OperandId, "'Packet Size'"); + InstructionDesc[OpGetMaxPipePackets].operands.push(OperandId, "'Packet Alignment'"); + + InstructionDesc[OpGroupReserveReadPipePackets].operands.push(OperandScope, "'Execution'"); + InstructionDesc[OpGroupReserveReadPipePackets].operands.push(OperandId, "'Pipe'"); + InstructionDesc[OpGroupReserveReadPipePackets].operands.push(OperandId, "'Num Packets'"); + InstructionDesc[OpGroupReserveReadPipePackets].operands.push(OperandId, "'Packet Size'"); + InstructionDesc[OpGroupReserveReadPipePackets].operands.push(OperandId, "'Packet Alignment'"); + + InstructionDesc[OpGroupReserveWritePipePackets].operands.push(OperandScope, "'Execution'"); + InstructionDesc[OpGroupReserveWritePipePackets].operands.push(OperandId, "'Pipe'"); + InstructionDesc[OpGroupReserveWritePipePackets].operands.push(OperandId, "'Num Packets'"); + InstructionDesc[OpGroupReserveWritePipePackets].operands.push(OperandId, "'Packet Size'"); + InstructionDesc[OpGroupReserveWritePipePackets].operands.push(OperandId, "'Packet Alignment'"); + + InstructionDesc[OpGroupCommitReadPipe].operands.push(OperandScope, "'Execution'"); + InstructionDesc[OpGroupCommitReadPipe].operands.push(OperandId, "'Pipe'"); + InstructionDesc[OpGroupCommitReadPipe].operands.push(OperandId, "'Reserve Id'"); + InstructionDesc[OpGroupCommitReadPipe].operands.push(OperandId, "'Packet Size'"); + InstructionDesc[OpGroupCommitReadPipe].operands.push(OperandId, "'Packet Alignment'"); + + InstructionDesc[OpGroupCommitWritePipe].operands.push(OperandScope, "'Execution'"); + InstructionDesc[OpGroupCommitWritePipe].operands.push(OperandId, "'Pipe'"); + InstructionDesc[OpGroupCommitWritePipe].operands.push(OperandId, "'Reserve Id'"); + InstructionDesc[OpGroupCommitWritePipe].operands.push(OperandId, "'Packet Size'"); + InstructionDesc[OpGroupCommitWritePipe].operands.push(OperandId, "'Packet Alignment'"); + + InstructionDesc[OpBuildNDRange].operands.push(OperandId, "'GlobalWorkSize'"); + InstructionDesc[OpBuildNDRange].operands.push(OperandId, "'LocalWorkSize'"); + InstructionDesc[OpBuildNDRange].operands.push(OperandId, "'GlobalWorkOffset'"); + + InstructionDesc[OpCaptureEventProfilingInfo].operands.push(OperandId, "'Event'"); + InstructionDesc[OpCaptureEventProfilingInfo].operands.push(OperandId, "'Profiling Info'"); + InstructionDesc[OpCaptureEventProfilingInfo].operands.push(OperandId, "'Value'"); + + InstructionDesc[OpSetUserEventStatus].operands.push(OperandId, "'Event'"); + InstructionDesc[OpSetUserEventStatus].operands.push(OperandId, "'Status'"); + + InstructionDesc[OpIsValidEvent].operands.push(OperandId, "'Event'"); + + InstructionDesc[OpRetainEvent].operands.push(OperandId, "'Event'"); + + InstructionDesc[OpReleaseEvent].operands.push(OperandId, "'Event'"); + + InstructionDesc[OpGetKernelWorkGroupSize].operands.push(OperandId, "'Invoke'"); + InstructionDesc[OpGetKernelWorkGroupSize].operands.push(OperandId, "'Param'"); + InstructionDesc[OpGetKernelWorkGroupSize].operands.push(OperandId, "'Param Size'"); + InstructionDesc[OpGetKernelWorkGroupSize].operands.push(OperandId, "'Param Align'"); + + InstructionDesc[OpGetKernelPreferredWorkGroupSizeMultiple].operands.push(OperandId, "'Invoke'"); + InstructionDesc[OpGetKernelPreferredWorkGroupSizeMultiple].operands.push(OperandId, "'Param'"); + InstructionDesc[OpGetKernelPreferredWorkGroupSizeMultiple].operands.push(OperandId, "'Param Size'"); + InstructionDesc[OpGetKernelPreferredWorkGroupSizeMultiple].operands.push(OperandId, "'Param Align'"); + + InstructionDesc[OpGetKernelNDrangeSubGroupCount].operands.push(OperandId, "'ND Range'"); + InstructionDesc[OpGetKernelNDrangeSubGroupCount].operands.push(OperandId, "'Invoke'"); + InstructionDesc[OpGetKernelNDrangeSubGroupCount].operands.push(OperandId, "'Param'"); + InstructionDesc[OpGetKernelNDrangeSubGroupCount].operands.push(OperandId, "'Param Size'"); + InstructionDesc[OpGetKernelNDrangeSubGroupCount].operands.push(OperandId, "'Param Align'"); + + InstructionDesc[OpGetKernelNDrangeMaxSubGroupSize].operands.push(OperandId, "'ND Range'"); + InstructionDesc[OpGetKernelNDrangeMaxSubGroupSize].operands.push(OperandId, "'Invoke'"); + InstructionDesc[OpGetKernelNDrangeMaxSubGroupSize].operands.push(OperandId, "'Param'"); + InstructionDesc[OpGetKernelNDrangeMaxSubGroupSize].operands.push(OperandId, "'Param Size'"); + InstructionDesc[OpGetKernelNDrangeMaxSubGroupSize].operands.push(OperandId, "'Param Align'"); + + InstructionDesc[OpEnqueueKernel].operands.push(OperandId, "'Queue'"); + InstructionDesc[OpEnqueueKernel].operands.push(OperandId, "'Flags'"); + InstructionDesc[OpEnqueueKernel].operands.push(OperandId, "'ND Range'"); + InstructionDesc[OpEnqueueKernel].operands.push(OperandId, "'Num Events'"); + InstructionDesc[OpEnqueueKernel].operands.push(OperandId, "'Wait Events'"); + InstructionDesc[OpEnqueueKernel].operands.push(OperandId, "'Ret Event'"); + InstructionDesc[OpEnqueueKernel].operands.push(OperandId, "'Invoke'"); + InstructionDesc[OpEnqueueKernel].operands.push(OperandId, "'Param'"); + InstructionDesc[OpEnqueueKernel].operands.push(OperandId, "'Param Size'"); + InstructionDesc[OpEnqueueKernel].operands.push(OperandId, "'Param Align'"); + InstructionDesc[OpEnqueueKernel].operands.push(OperandVariableIds, "'Local Size'"); + + InstructionDesc[OpEnqueueMarker].operands.push(OperandId, "'Queue'"); + InstructionDesc[OpEnqueueMarker].operands.push(OperandId, "'Num Events'"); + InstructionDesc[OpEnqueueMarker].operands.push(OperandId, "'Wait Events'"); + InstructionDesc[OpEnqueueMarker].operands.push(OperandId, "'Ret Event'"); + + InstructionDesc[OpGroupNonUniformElect].operands.push(OperandScope, "'Execution'"); + + InstructionDesc[OpGroupNonUniformAll].operands.push(OperandScope, "'Execution'"); + InstructionDesc[OpGroupNonUniformAll].operands.push(OperandId, "X"); + + InstructionDesc[OpGroupNonUniformAny].operands.push(OperandScope, "'Execution'"); + InstructionDesc[OpGroupNonUniformAny].operands.push(OperandId, "X"); + + InstructionDesc[OpGroupNonUniformAllEqual].operands.push(OperandScope, "'Execution'"); + InstructionDesc[OpGroupNonUniformAllEqual].operands.push(OperandId, "X"); + + InstructionDesc[OpGroupNonUniformBroadcast].operands.push(OperandScope, "'Execution'"); + InstructionDesc[OpGroupNonUniformBroadcast].operands.push(OperandId, "X"); + InstructionDesc[OpGroupNonUniformBroadcast].operands.push(OperandId, "ID"); + + InstructionDesc[OpGroupNonUniformBroadcastFirst].operands.push(OperandScope, "'Execution'"); + InstructionDesc[OpGroupNonUniformBroadcastFirst].operands.push(OperandId, "X"); + + InstructionDesc[OpGroupNonUniformBallot].operands.push(OperandScope, "'Execution'"); + InstructionDesc[OpGroupNonUniformBallot].operands.push(OperandId, "X"); + + InstructionDesc[OpGroupNonUniformInverseBallot].operands.push(OperandScope, "'Execution'"); + InstructionDesc[OpGroupNonUniformInverseBallot].operands.push(OperandId, "X"); + + InstructionDesc[OpGroupNonUniformBallotBitExtract].operands.push(OperandScope, "'Execution'"); + InstructionDesc[OpGroupNonUniformBallotBitExtract].operands.push(OperandId, "X"); + InstructionDesc[OpGroupNonUniformBallotBitExtract].operands.push(OperandId, "Bit"); + + InstructionDesc[OpGroupNonUniformBallotBitCount].operands.push(OperandScope, "'Execution'"); + InstructionDesc[OpGroupNonUniformBallotBitCount].operands.push(OperandGroupOperation, "'Operation'"); + InstructionDesc[OpGroupNonUniformBallotBitCount].operands.push(OperandId, "X"); + + InstructionDesc[OpGroupNonUniformBallotFindLSB].operands.push(OperandScope, "'Execution'"); + InstructionDesc[OpGroupNonUniformBallotFindLSB].operands.push(OperandId, "X"); + + InstructionDesc[OpGroupNonUniformBallotFindMSB].operands.push(OperandScope, "'Execution'"); + InstructionDesc[OpGroupNonUniformBallotFindMSB].operands.push(OperandId, "X"); + + InstructionDesc[OpGroupNonUniformShuffle].operands.push(OperandScope, "'Execution'"); + InstructionDesc[OpGroupNonUniformShuffle].operands.push(OperandId, "X"); + InstructionDesc[OpGroupNonUniformShuffle].operands.push(OperandId, "'Id'"); + + InstructionDesc[OpGroupNonUniformShuffleXor].operands.push(OperandScope, "'Execution'"); + InstructionDesc[OpGroupNonUniformShuffleXor].operands.push(OperandId, "X"); + InstructionDesc[OpGroupNonUniformShuffleXor].operands.push(OperandId, "Mask"); + + InstructionDesc[OpGroupNonUniformShuffleUp].operands.push(OperandScope, "'Execution'"); + InstructionDesc[OpGroupNonUniformShuffleUp].operands.push(OperandId, "X"); + InstructionDesc[OpGroupNonUniformShuffleUp].operands.push(OperandId, "Offset"); + + InstructionDesc[OpGroupNonUniformShuffleDown].operands.push(OperandScope, "'Execution'"); + InstructionDesc[OpGroupNonUniformShuffleDown].operands.push(OperandId, "X"); + InstructionDesc[OpGroupNonUniformShuffleDown].operands.push(OperandId, "Offset"); + + InstructionDesc[OpGroupNonUniformIAdd].operands.push(OperandScope, "'Execution'"); + InstructionDesc[OpGroupNonUniformIAdd].operands.push(OperandGroupOperation, "'Operation'"); + InstructionDesc[OpGroupNonUniformIAdd].operands.push(OperandId, "X"); + InstructionDesc[OpGroupNonUniformIAdd].operands.push(OperandId, "'ClusterSize'", true); + + InstructionDesc[OpGroupNonUniformFAdd].operands.push(OperandScope, "'Execution'"); + InstructionDesc[OpGroupNonUniformFAdd].operands.push(OperandGroupOperation, "'Operation'"); + InstructionDesc[OpGroupNonUniformFAdd].operands.push(OperandId, "X"); + InstructionDesc[OpGroupNonUniformFAdd].operands.push(OperandId, "'ClusterSize'", true); + + InstructionDesc[OpGroupNonUniformIMul].operands.push(OperandScope, "'Execution'"); + InstructionDesc[OpGroupNonUniformIMul].operands.push(OperandGroupOperation, "'Operation'"); + InstructionDesc[OpGroupNonUniformIMul].operands.push(OperandId, "X"); + InstructionDesc[OpGroupNonUniformIMul].operands.push(OperandId, "'ClusterSize'", true); + + InstructionDesc[OpGroupNonUniformFMul].operands.push(OperandScope, "'Execution'"); + InstructionDesc[OpGroupNonUniformFMul].operands.push(OperandGroupOperation, "'Operation'"); + InstructionDesc[OpGroupNonUniformFMul].operands.push(OperandId, "X"); + InstructionDesc[OpGroupNonUniformFMul].operands.push(OperandId, "'ClusterSize'", true); + + InstructionDesc[OpGroupNonUniformSMin].operands.push(OperandScope, "'Execution'"); + InstructionDesc[OpGroupNonUniformSMin].operands.push(OperandGroupOperation, "'Operation'"); + InstructionDesc[OpGroupNonUniformSMin].operands.push(OperandId, "X"); + InstructionDesc[OpGroupNonUniformSMin].operands.push(OperandId, "'ClusterSize'", true); + + InstructionDesc[OpGroupNonUniformUMin].operands.push(OperandScope, "'Execution'"); + InstructionDesc[OpGroupNonUniformUMin].operands.push(OperandGroupOperation, "'Operation'"); + InstructionDesc[OpGroupNonUniformUMin].operands.push(OperandId, "X"); + InstructionDesc[OpGroupNonUniformUMin].operands.push(OperandId, "'ClusterSize'", true); + + InstructionDesc[OpGroupNonUniformFMin].operands.push(OperandScope, "'Execution'"); + InstructionDesc[OpGroupNonUniformFMin].operands.push(OperandGroupOperation, "'Operation'"); + InstructionDesc[OpGroupNonUniformFMin].operands.push(OperandId, "X"); + InstructionDesc[OpGroupNonUniformFMin].operands.push(OperandId, "'ClusterSize'", true); - InstructionDesc[OpAtomicIIncrement].operands.push(OperandId, "'Pointer'"); - InstructionDesc[OpAtomicIIncrement].operands.push(OperandScope, "'Scope'"); - InstructionDesc[OpAtomicIIncrement].operands.push(OperandMemorySemantics, "'Semantics'"); + InstructionDesc[OpGroupNonUniformSMax].operands.push(OperandScope, "'Execution'"); + InstructionDesc[OpGroupNonUniformSMax].operands.push(OperandGroupOperation, "'Operation'"); + InstructionDesc[OpGroupNonUniformSMax].operands.push(OperandId, "X"); + InstructionDesc[OpGroupNonUniformSMax].operands.push(OperandId, "'ClusterSize'", true); - InstructionDesc[OpAtomicIDecrement].operands.push(OperandId, "'Pointer'"); - InstructionDesc[OpAtomicIDecrement].operands.push(OperandScope, "'Scope'"); - InstructionDesc[OpAtomicIDecrement].operands.push(OperandMemorySemantics, "'Semantics'"); + InstructionDesc[OpGroupNonUniformUMax].operands.push(OperandScope, "'Execution'"); + InstructionDesc[OpGroupNonUniformUMax].operands.push(OperandGroupOperation, "'Operation'"); + InstructionDesc[OpGroupNonUniformUMax].operands.push(OperandId, "X"); + InstructionDesc[OpGroupNonUniformUMax].operands.push(OperandId, "'ClusterSize'", true); - InstructionDesc[OpAtomicIAdd].operands.push(OperandId, "'Pointer'"); - InstructionDesc[OpAtomicIAdd].operands.push(OperandScope, "'Scope'"); - InstructionDesc[OpAtomicIAdd].operands.push(OperandMemorySemantics, "'Semantics'"); - InstructionDesc[OpAtomicIAdd].operands.push(OperandId, "'Value'"); + InstructionDesc[OpGroupNonUniformFMax].operands.push(OperandScope, "'Execution'"); + InstructionDesc[OpGroupNonUniformFMax].operands.push(OperandGroupOperation, "'Operation'"); + InstructionDesc[OpGroupNonUniformFMax].operands.push(OperandId, "X"); + InstructionDesc[OpGroupNonUniformFMax].operands.push(OperandId, "'ClusterSize'", true); - InstructionDesc[OpAtomicFAddEXT].operands.push(OperandId, "'Pointer'"); - InstructionDesc[OpAtomicFAddEXT].operands.push(OperandScope, "'Scope'"); - InstructionDesc[OpAtomicFAddEXT].operands.push(OperandMemorySemantics, "'Semantics'"); - InstructionDesc[OpAtomicFAddEXT].operands.push(OperandId, "'Value'"); + InstructionDesc[OpGroupNonUniformBitwiseAnd].operands.push(OperandScope, "'Execution'"); + InstructionDesc[OpGroupNonUniformBitwiseAnd].operands.push(OperandGroupOperation, "'Operation'"); + InstructionDesc[OpGroupNonUniformBitwiseAnd].operands.push(OperandId, "X"); + InstructionDesc[OpGroupNonUniformBitwiseAnd].operands.push(OperandId, "'ClusterSize'", true); - InstructionDesc[OpAtomicISub].operands.push(OperandId, "'Pointer'"); - InstructionDesc[OpAtomicISub].operands.push(OperandScope, "'Scope'"); - InstructionDesc[OpAtomicISub].operands.push(OperandMemorySemantics, "'Semantics'"); - InstructionDesc[OpAtomicISub].operands.push(OperandId, "'Value'"); + InstructionDesc[OpGroupNonUniformBitwiseOr].operands.push(OperandScope, "'Execution'"); + InstructionDesc[OpGroupNonUniformBitwiseOr].operands.push(OperandGroupOperation, "'Operation'"); + InstructionDesc[OpGroupNonUniformBitwiseOr].operands.push(OperandId, "X"); + InstructionDesc[OpGroupNonUniformBitwiseOr].operands.push(OperandId, "'ClusterSize'", true); + + InstructionDesc[OpGroupNonUniformBitwiseXor].operands.push(OperandScope, "'Execution'"); + InstructionDesc[OpGroupNonUniformBitwiseXor].operands.push(OperandGroupOperation, "'Operation'"); + InstructionDesc[OpGroupNonUniformBitwiseXor].operands.push(OperandId, "X"); + InstructionDesc[OpGroupNonUniformBitwiseXor].operands.push(OperandId, "'ClusterSize'", true); + + InstructionDesc[OpGroupNonUniformLogicalAnd].operands.push(OperandScope, "'Execution'"); + InstructionDesc[OpGroupNonUniformLogicalAnd].operands.push(OperandGroupOperation, "'Operation'"); + InstructionDesc[OpGroupNonUniformLogicalAnd].operands.push(OperandId, "X"); + InstructionDesc[OpGroupNonUniformLogicalAnd].operands.push(OperandId, "'ClusterSize'", true); + + InstructionDesc[OpGroupNonUniformLogicalOr].operands.push(OperandScope, "'Execution'"); + InstructionDesc[OpGroupNonUniformLogicalOr].operands.push(OperandGroupOperation, "'Operation'"); + InstructionDesc[OpGroupNonUniformLogicalOr].operands.push(OperandId, "X"); + InstructionDesc[OpGroupNonUniformLogicalOr].operands.push(OperandId, "'ClusterSize'", true); + + InstructionDesc[OpGroupNonUniformLogicalXor].operands.push(OperandScope, "'Execution'"); + InstructionDesc[OpGroupNonUniformLogicalXor].operands.push(OperandGroupOperation, "'Operation'"); + InstructionDesc[OpGroupNonUniformLogicalXor].operands.push(OperandId, "X"); + InstructionDesc[OpGroupNonUniformLogicalXor].operands.push(OperandId, "'ClusterSize'", true); + + InstructionDesc[OpGroupNonUniformQuadBroadcast].operands.push(OperandScope, "'Execution'"); + InstructionDesc[OpGroupNonUniformQuadBroadcast].operands.push(OperandId, "X"); + InstructionDesc[OpGroupNonUniformQuadBroadcast].operands.push(OperandId, "'Id'"); + + InstructionDesc[OpGroupNonUniformQuadSwap].operands.push(OperandScope, "'Execution'"); + InstructionDesc[OpGroupNonUniformQuadSwap].operands.push(OperandId, "X"); + InstructionDesc[OpGroupNonUniformQuadSwap].operands.push(OperandId, "'Direction'"); + + InstructionDesc[OpSubgroupBallotKHR].operands.push(OperandId, "'Predicate'"); + + InstructionDesc[OpSubgroupFirstInvocationKHR].operands.push(OperandId, "'Value'"); + + InstructionDesc[OpSubgroupAnyKHR].operands.push(OperandScope, "'Execution'"); + InstructionDesc[OpSubgroupAnyKHR].operands.push(OperandId, "'Predicate'"); + + InstructionDesc[OpSubgroupAllKHR].operands.push(OperandScope, "'Execution'"); + InstructionDesc[OpSubgroupAllKHR].operands.push(OperandId, "'Predicate'"); + + InstructionDesc[OpSubgroupAllEqualKHR].operands.push(OperandScope, "'Execution'"); + InstructionDesc[OpSubgroupAllEqualKHR].operands.push(OperandId, "'Predicate'"); + + InstructionDesc[OpSubgroupReadInvocationKHR].operands.push(OperandId, "'Value'"); + InstructionDesc[OpSubgroupReadInvocationKHR].operands.push(OperandId, "'Index'"); + + InstructionDesc[OpModuleProcessed].operands.push(OperandLiteralString, "'process'"); + + InstructionDesc[OpGroupIAddNonUniformAMD].operands.push(OperandScope, "'Execution'"); + InstructionDesc[OpGroupIAddNonUniformAMD].operands.push(OperandGroupOperation, "'Operation'"); + InstructionDesc[OpGroupIAddNonUniformAMD].operands.push(OperandId, "'X'"); + + InstructionDesc[OpGroupFAddNonUniformAMD].operands.push(OperandScope, "'Execution'"); + InstructionDesc[OpGroupFAddNonUniformAMD].operands.push(OperandGroupOperation, "'Operation'"); + InstructionDesc[OpGroupFAddNonUniformAMD].operands.push(OperandId, "'X'"); + + InstructionDesc[OpGroupUMinNonUniformAMD].operands.push(OperandScope, "'Execution'"); + InstructionDesc[OpGroupUMinNonUniformAMD].operands.push(OperandGroupOperation, "'Operation'"); + InstructionDesc[OpGroupUMinNonUniformAMD].operands.push(OperandId, "'X'"); + + InstructionDesc[OpGroupSMinNonUniformAMD].operands.push(OperandScope, "'Execution'"); + InstructionDesc[OpGroupSMinNonUniformAMD].operands.push(OperandGroupOperation, "'Operation'"); + InstructionDesc[OpGroupSMinNonUniformAMD].operands.push(OperandId, "X"); + + InstructionDesc[OpGroupFMinNonUniformAMD].operands.push(OperandScope, "'Execution'"); + InstructionDesc[OpGroupFMinNonUniformAMD].operands.push(OperandGroupOperation, "'Operation'"); + InstructionDesc[OpGroupFMinNonUniformAMD].operands.push(OperandId, "X"); + + InstructionDesc[OpGroupUMaxNonUniformAMD].operands.push(OperandScope, "'Execution'"); + InstructionDesc[OpGroupUMaxNonUniformAMD].operands.push(OperandGroupOperation, "'Operation'"); + InstructionDesc[OpGroupUMaxNonUniformAMD].operands.push(OperandId, "X"); + + InstructionDesc[OpGroupSMaxNonUniformAMD].operands.push(OperandScope, "'Execution'"); + InstructionDesc[OpGroupSMaxNonUniformAMD].operands.push(OperandGroupOperation, "'Operation'"); + InstructionDesc[OpGroupSMaxNonUniformAMD].operands.push(OperandId, "X"); + + InstructionDesc[OpGroupFMaxNonUniformAMD].operands.push(OperandScope, "'Execution'"); + InstructionDesc[OpGroupFMaxNonUniformAMD].operands.push(OperandGroupOperation, "'Operation'"); + InstructionDesc[OpGroupFMaxNonUniformAMD].operands.push(OperandId, "X"); + + InstructionDesc[OpFragmentMaskFetchAMD].operands.push(OperandId, "'Image'"); + InstructionDesc[OpFragmentMaskFetchAMD].operands.push(OperandId, "'Coordinate'"); + + InstructionDesc[OpFragmentFetchAMD].operands.push(OperandId, "'Image'"); + InstructionDesc[OpFragmentFetchAMD].operands.push(OperandId, "'Coordinate'"); + InstructionDesc[OpFragmentFetchAMD].operands.push(OperandId, "'Fragment Index'"); + + InstructionDesc[OpGroupNonUniformPartitionNV].operands.push(OperandId, "X"); + + InstructionDesc[OpTypeAccelerationStructureKHR].setResultAndType(true, false); + + InstructionDesc[OpTraceNV].operands.push(OperandId, "'Acceleration Structure'"); + InstructionDesc[OpTraceNV].operands.push(OperandId, "'Ray Flags'"); + InstructionDesc[OpTraceNV].operands.push(OperandId, "'Cull Mask'"); + InstructionDesc[OpTraceNV].operands.push(OperandId, "'SBT Record Offset'"); + InstructionDesc[OpTraceNV].operands.push(OperandId, "'SBT Record Stride'"); + InstructionDesc[OpTraceNV].operands.push(OperandId, "'Miss Index'"); + InstructionDesc[OpTraceNV].operands.push(OperandId, "'Ray Origin'"); + InstructionDesc[OpTraceNV].operands.push(OperandId, "'TMin'"); + InstructionDesc[OpTraceNV].operands.push(OperandId, "'Ray Direction'"); + InstructionDesc[OpTraceNV].operands.push(OperandId, "'TMax'"); + InstructionDesc[OpTraceNV].operands.push(OperandId, "'Payload'"); + InstructionDesc[OpTraceNV].setResultAndType(false, false); + + InstructionDesc[OpTraceRayMotionNV].operands.push(OperandId, "'Acceleration Structure'"); + InstructionDesc[OpTraceRayMotionNV].operands.push(OperandId, "'Ray Flags'"); + InstructionDesc[OpTraceRayMotionNV].operands.push(OperandId, "'Cull Mask'"); + InstructionDesc[OpTraceRayMotionNV].operands.push(OperandId, "'SBT Record Offset'"); + InstructionDesc[OpTraceRayMotionNV].operands.push(OperandId, "'SBT Record Stride'"); + InstructionDesc[OpTraceRayMotionNV].operands.push(OperandId, "'Miss Index'"); + InstructionDesc[OpTraceRayMotionNV].operands.push(OperandId, "'Ray Origin'"); + InstructionDesc[OpTraceRayMotionNV].operands.push(OperandId, "'TMin'"); + InstructionDesc[OpTraceRayMotionNV].operands.push(OperandId, "'Ray Direction'"); + InstructionDesc[OpTraceRayMotionNV].operands.push(OperandId, "'TMax'"); + InstructionDesc[OpTraceRayMotionNV].operands.push(OperandId, "'Time'"); + InstructionDesc[OpTraceRayMotionNV].operands.push(OperandId, "'Payload'"); + InstructionDesc[OpTraceRayMotionNV].setResultAndType(false, false); + + InstructionDesc[OpTraceRayKHR].operands.push(OperandId, "'Acceleration Structure'"); + InstructionDesc[OpTraceRayKHR].operands.push(OperandId, "'Ray Flags'"); + InstructionDesc[OpTraceRayKHR].operands.push(OperandId, "'Cull Mask'"); + InstructionDesc[OpTraceRayKHR].operands.push(OperandId, "'SBT Record Offset'"); + InstructionDesc[OpTraceRayKHR].operands.push(OperandId, "'SBT Record Stride'"); + InstructionDesc[OpTraceRayKHR].operands.push(OperandId, "'Miss Index'"); + InstructionDesc[OpTraceRayKHR].operands.push(OperandId, "'Ray Origin'"); + InstructionDesc[OpTraceRayKHR].operands.push(OperandId, "'TMin'"); + InstructionDesc[OpTraceRayKHR].operands.push(OperandId, "'Ray Direction'"); + InstructionDesc[OpTraceRayKHR].operands.push(OperandId, "'TMax'"); + InstructionDesc[OpTraceRayKHR].operands.push(OperandId, "'Payload'"); + InstructionDesc[OpTraceRayKHR].setResultAndType(false, false); + + InstructionDesc[OpReportIntersectionKHR].operands.push(OperandId, "'Hit Parameter'"); + InstructionDesc[OpReportIntersectionKHR].operands.push(OperandId, "'Hit Kind'"); + + InstructionDesc[OpIgnoreIntersectionNV].setResultAndType(false, false); + + InstructionDesc[OpIgnoreIntersectionKHR].setResultAndType(false, false); + + InstructionDesc[OpTerminateRayNV].setResultAndType(false, false); + + InstructionDesc[OpTerminateRayKHR].setResultAndType(false, false); + + InstructionDesc[OpExecuteCallableNV].operands.push(OperandId, "SBT Record Index"); + InstructionDesc[OpExecuteCallableNV].operands.push(OperandId, "CallableData ID"); + InstructionDesc[OpExecuteCallableNV].setResultAndType(false, false); + + InstructionDesc[OpExecuteCallableKHR].operands.push(OperandId, "SBT Record Index"); + InstructionDesc[OpExecuteCallableKHR].operands.push(OperandId, "CallableData"); + InstructionDesc[OpExecuteCallableKHR].setResultAndType(false, false); + + InstructionDesc[OpConvertUToAccelerationStructureKHR].operands.push(OperandId, "Value"); + InstructionDesc[OpConvertUToAccelerationStructureKHR].setResultAndType(true, true); + + // Ray Query + InstructionDesc[OpTypeAccelerationStructureKHR].setResultAndType(true, false); + InstructionDesc[OpTypeRayQueryKHR].setResultAndType(true, false); + + InstructionDesc[OpRayQueryInitializeKHR].operands.push(OperandId, "'RayQuery'"); + InstructionDesc[OpRayQueryInitializeKHR].operands.push(OperandId, "'AccelerationS'"); + InstructionDesc[OpRayQueryInitializeKHR].operands.push(OperandId, "'RayFlags'"); + InstructionDesc[OpRayQueryInitializeKHR].operands.push(OperandId, "'CullMask'"); + InstructionDesc[OpRayQueryInitializeKHR].operands.push(OperandId, "'Origin'"); + InstructionDesc[OpRayQueryInitializeKHR].operands.push(OperandId, "'Tmin'"); + InstructionDesc[OpRayQueryInitializeKHR].operands.push(OperandId, "'Direction'"); + InstructionDesc[OpRayQueryInitializeKHR].operands.push(OperandId, "'Tmax'"); + InstructionDesc[OpRayQueryInitializeKHR].setResultAndType(false, false); + + InstructionDesc[OpRayQueryTerminateKHR].operands.push(OperandId, "'RayQuery'"); + InstructionDesc[OpRayQueryTerminateKHR].setResultAndType(false, false); + + InstructionDesc[OpRayQueryGenerateIntersectionKHR].operands.push(OperandId, "'RayQuery'"); + InstructionDesc[OpRayQueryGenerateIntersectionKHR].operands.push(OperandId, "'THit'"); + InstructionDesc[OpRayQueryGenerateIntersectionKHR].setResultAndType(false, false); + + InstructionDesc[OpRayQueryConfirmIntersectionKHR].operands.push(OperandId, "'RayQuery'"); + InstructionDesc[OpRayQueryConfirmIntersectionKHR].setResultAndType(false, false); + + InstructionDesc[OpRayQueryProceedKHR].operands.push(OperandId, "'RayQuery'"); + InstructionDesc[OpRayQueryProceedKHR].setResultAndType(true, true); + + InstructionDesc[OpRayQueryGetIntersectionTypeKHR].operands.push(OperandId, "'RayQuery'"); + InstructionDesc[OpRayQueryGetIntersectionTypeKHR].operands.push(OperandId, "'Committed'"); + InstructionDesc[OpRayQueryGetIntersectionTypeKHR].setResultAndType(true, true); + + InstructionDesc[OpRayQueryGetRayTMinKHR].operands.push(OperandId, "'RayQuery'"); + InstructionDesc[OpRayQueryGetRayTMinKHR].setResultAndType(true, true); + + InstructionDesc[OpRayQueryGetRayFlagsKHR].operands.push(OperandId, "'RayQuery'"); + InstructionDesc[OpRayQueryGetRayFlagsKHR].setResultAndType(true, true); + + InstructionDesc[OpRayQueryGetIntersectionTKHR].operands.push(OperandId, "'RayQuery'"); + InstructionDesc[OpRayQueryGetIntersectionTKHR].operands.push(OperandId, "'Committed'"); + InstructionDesc[OpRayQueryGetIntersectionTKHR].setResultAndType(true, true); + + InstructionDesc[OpRayQueryGetIntersectionInstanceCustomIndexKHR].operands.push(OperandId, "'RayQuery'"); + InstructionDesc[OpRayQueryGetIntersectionInstanceCustomIndexKHR].operands.push(OperandId, "'Committed'"); + InstructionDesc[OpRayQueryGetIntersectionInstanceCustomIndexKHR].setResultAndType(true, true); + + InstructionDesc[OpRayQueryGetIntersectionInstanceIdKHR].operands.push(OperandId, "'RayQuery'"); + InstructionDesc[OpRayQueryGetIntersectionInstanceIdKHR].operands.push(OperandId, "'Committed'"); + InstructionDesc[OpRayQueryGetIntersectionInstanceIdKHR].setResultAndType(true, true); + + InstructionDesc[OpRayQueryGetIntersectionInstanceShaderBindingTableRecordOffsetKHR].operands.push(OperandId, "'RayQuery'"); + InstructionDesc[OpRayQueryGetIntersectionInstanceShaderBindingTableRecordOffsetKHR].operands.push(OperandId, "'Committed'"); + InstructionDesc[OpRayQueryGetIntersectionInstanceShaderBindingTableRecordOffsetKHR].setResultAndType(true, true); + + InstructionDesc[OpRayQueryGetIntersectionGeometryIndexKHR].operands.push(OperandId, "'RayQuery'"); + InstructionDesc[OpRayQueryGetIntersectionGeometryIndexKHR].operands.push(OperandId, "'Committed'"); + InstructionDesc[OpRayQueryGetIntersectionGeometryIndexKHR].setResultAndType(true, true); + + InstructionDesc[OpRayQueryGetIntersectionPrimitiveIndexKHR].operands.push(OperandId, "'RayQuery'"); + InstructionDesc[OpRayQueryGetIntersectionPrimitiveIndexKHR].operands.push(OperandId, "'Committed'"); + InstructionDesc[OpRayQueryGetIntersectionPrimitiveIndexKHR].setResultAndType(true, true); + + InstructionDesc[OpRayQueryGetIntersectionBarycentricsKHR].operands.push(OperandId, "'RayQuery'"); + InstructionDesc[OpRayQueryGetIntersectionBarycentricsKHR].operands.push(OperandId, "'Committed'"); + InstructionDesc[OpRayQueryGetIntersectionBarycentricsKHR].setResultAndType(true, true); + + InstructionDesc[OpRayQueryGetIntersectionFrontFaceKHR].operands.push(OperandId, "'RayQuery'"); + InstructionDesc[OpRayQueryGetIntersectionFrontFaceKHR].operands.push(OperandId, "'Committed'"); + InstructionDesc[OpRayQueryGetIntersectionFrontFaceKHR].setResultAndType(true, true); + + InstructionDesc[OpRayQueryGetIntersectionCandidateAABBOpaqueKHR].operands.push(OperandId, "'RayQuery'"); + InstructionDesc[OpRayQueryGetIntersectionCandidateAABBOpaqueKHR].setResultAndType(true, true); + + InstructionDesc[OpRayQueryGetIntersectionObjectRayDirectionKHR].operands.push(OperandId, "'RayQuery'"); + InstructionDesc[OpRayQueryGetIntersectionObjectRayDirectionKHR].operands.push(OperandId, "'Committed'"); + InstructionDesc[OpRayQueryGetIntersectionObjectRayDirectionKHR].setResultAndType(true, true); - InstructionDesc[OpAtomicUMin].operands.push(OperandId, "'Pointer'"); - InstructionDesc[OpAtomicUMin].operands.push(OperandScope, "'Scope'"); - InstructionDesc[OpAtomicUMin].operands.push(OperandMemorySemantics, "'Semantics'"); - InstructionDesc[OpAtomicUMin].operands.push(OperandId, "'Value'"); + InstructionDesc[OpRayQueryGetIntersectionObjectRayOriginKHR].operands.push(OperandId, "'RayQuery'"); + InstructionDesc[OpRayQueryGetIntersectionObjectRayOriginKHR].operands.push(OperandId, "'Committed'"); + InstructionDesc[OpRayQueryGetIntersectionObjectRayOriginKHR].setResultAndType(true, true); - InstructionDesc[OpAtomicUMax].operands.push(OperandId, "'Pointer'"); - InstructionDesc[OpAtomicUMax].operands.push(OperandScope, "'Scope'"); - InstructionDesc[OpAtomicUMax].operands.push(OperandMemorySemantics, "'Semantics'"); - InstructionDesc[OpAtomicUMax].operands.push(OperandId, "'Value'"); + InstructionDesc[OpRayQueryGetWorldRayDirectionKHR].operands.push(OperandId, "'RayQuery'"); + InstructionDesc[OpRayQueryGetWorldRayDirectionKHR].setResultAndType(true, true); - InstructionDesc[OpAtomicSMin].operands.push(OperandId, "'Pointer'"); - InstructionDesc[OpAtomicSMin].operands.push(OperandScope, "'Scope'"); - InstructionDesc[OpAtomicSMin].operands.push(OperandMemorySemantics, "'Semantics'"); - InstructionDesc[OpAtomicSMin].operands.push(OperandId, "'Value'"); + InstructionDesc[OpRayQueryGetWorldRayOriginKHR].operands.push(OperandId, "'RayQuery'"); + InstructionDesc[OpRayQueryGetWorldRayOriginKHR].setResultAndType(true, true); - InstructionDesc[OpAtomicSMax].operands.push(OperandId, "'Pointer'"); - InstructionDesc[OpAtomicSMax].operands.push(OperandScope, "'Scope'"); - InstructionDesc[OpAtomicSMax].operands.push(OperandMemorySemantics, "'Semantics'"); - InstructionDesc[OpAtomicSMax].operands.push(OperandId, "'Value'"); + InstructionDesc[OpRayQueryGetIntersectionObjectToWorldKHR].operands.push(OperandId, "'RayQuery'"); + InstructionDesc[OpRayQueryGetIntersectionObjectToWorldKHR].operands.push(OperandId, "'Committed'"); + InstructionDesc[OpRayQueryGetIntersectionObjectToWorldKHR].setResultAndType(true, true); + + InstructionDesc[OpRayQueryGetIntersectionWorldToObjectKHR].operands.push(OperandId, "'RayQuery'"); + InstructionDesc[OpRayQueryGetIntersectionWorldToObjectKHR].operands.push(OperandId, "'Committed'"); + InstructionDesc[OpRayQueryGetIntersectionWorldToObjectKHR].setResultAndType(true, true); + + InstructionDesc[OpRayQueryGetIntersectionTriangleVertexPositionsKHR].operands.push(OperandId, "'RayQuery'"); + InstructionDesc[OpRayQueryGetIntersectionTriangleVertexPositionsKHR].operands.push(OperandId, "'Committed'"); + InstructionDesc[OpRayQueryGetIntersectionTriangleVertexPositionsKHR].setResultAndType(true, true); + + InstructionDesc[OpImageSampleFootprintNV].operands.push(OperandId, "'Sampled Image'"); + InstructionDesc[OpImageSampleFootprintNV].operands.push(OperandId, "'Coordinate'"); + InstructionDesc[OpImageSampleFootprintNV].operands.push(OperandId, "'Granularity'"); + InstructionDesc[OpImageSampleFootprintNV].operands.push(OperandId, "'Coarse'"); + InstructionDesc[OpImageSampleFootprintNV].operands.push(OperandImageOperands, "", true); + InstructionDesc[OpImageSampleFootprintNV].operands.push(OperandVariableIds, "", true); + + InstructionDesc[OpWritePackedPrimitiveIndices4x8NV].operands.push(OperandId, "'Index Offset'"); + InstructionDesc[OpWritePackedPrimitiveIndices4x8NV].operands.push(OperandId, "'Packed Indices'"); - InstructionDesc[OpAtomicFMinEXT].operands.push(OperandId, "'Pointer'"); - InstructionDesc[OpAtomicFMinEXT].operands.push(OperandScope, "'Scope'"); - InstructionDesc[OpAtomicFMinEXT].operands.push(OperandMemorySemantics, "'Semantics'"); - InstructionDesc[OpAtomicFMinEXT].operands.push(OperandId, "'Value'"); + InstructionDesc[OpEmitMeshTasksEXT].operands.push(OperandId, "'groupCountX'"); + InstructionDesc[OpEmitMeshTasksEXT].operands.push(OperandId, "'groupCountY'"); + InstructionDesc[OpEmitMeshTasksEXT].operands.push(OperandId, "'groupCountZ'"); + InstructionDesc[OpEmitMeshTasksEXT].operands.push(OperandId, "'Payload'"); + InstructionDesc[OpEmitMeshTasksEXT].setResultAndType(false, false); - InstructionDesc[OpAtomicFMaxEXT].operands.push(OperandId, "'Pointer'"); - InstructionDesc[OpAtomicFMaxEXT].operands.push(OperandScope, "'Scope'"); - InstructionDesc[OpAtomicFMaxEXT].operands.push(OperandMemorySemantics, "'Semantics'"); - InstructionDesc[OpAtomicFMaxEXT].operands.push(OperandId, "'Value'"); + InstructionDesc[OpSetMeshOutputsEXT].operands.push(OperandId, "'vertexCount'"); + InstructionDesc[OpSetMeshOutputsEXT].operands.push(OperandId, "'primitiveCount'"); + InstructionDesc[OpSetMeshOutputsEXT].setResultAndType(false, false); - InstructionDesc[OpAtomicAnd].operands.push(OperandId, "'Pointer'"); - InstructionDesc[OpAtomicAnd].operands.push(OperandScope, "'Scope'"); - InstructionDesc[OpAtomicAnd].operands.push(OperandMemorySemantics, "'Semantics'"); - InstructionDesc[OpAtomicAnd].operands.push(OperandId, "'Value'"); - - InstructionDesc[OpAtomicOr].operands.push(OperandId, "'Pointer'"); - InstructionDesc[OpAtomicOr].operands.push(OperandScope, "'Scope'"); - InstructionDesc[OpAtomicOr].operands.push(OperandMemorySemantics, "'Semantics'"); - InstructionDesc[OpAtomicOr].operands.push(OperandId, "'Value'"); - - InstructionDesc[OpAtomicXor].operands.push(OperandId, "'Pointer'"); - InstructionDesc[OpAtomicXor].operands.push(OperandScope, "'Scope'"); - InstructionDesc[OpAtomicXor].operands.push(OperandMemorySemantics, "'Semantics'"); - InstructionDesc[OpAtomicXor].operands.push(OperandId, "'Value'"); - - InstructionDesc[OpAtomicFlagTestAndSet].operands.push(OperandId, "'Pointer'"); - InstructionDesc[OpAtomicFlagTestAndSet].operands.push(OperandScope, "'Scope'"); - InstructionDesc[OpAtomicFlagTestAndSet].operands.push(OperandMemorySemantics, "'Semantics'"); - - InstructionDesc[OpAtomicFlagClear].operands.push(OperandId, "'Pointer'"); - InstructionDesc[OpAtomicFlagClear].operands.push(OperandScope, "'Scope'"); - InstructionDesc[OpAtomicFlagClear].operands.push(OperandMemorySemantics, "'Semantics'"); - - InstructionDesc[OpLoopMerge].operands.push(OperandId, "'Merge Block'"); - InstructionDesc[OpLoopMerge].operands.push(OperandId, "'Continue Target'"); - InstructionDesc[OpLoopMerge].operands.push(OperandLoop, ""); - InstructionDesc[OpLoopMerge].operands.push(OperandOptionalLiteral, ""); - - InstructionDesc[OpSelectionMerge].operands.push(OperandId, "'Merge Block'"); - InstructionDesc[OpSelectionMerge].operands.push(OperandSelect, ""); - - InstructionDesc[OpBranch].operands.push(OperandId, "'Target Label'"); - - InstructionDesc[OpBranchConditional].operands.push(OperandId, "'Condition'"); - InstructionDesc[OpBranchConditional].operands.push(OperandId, "'True Label'"); - InstructionDesc[OpBranchConditional].operands.push(OperandId, "'False Label'"); - InstructionDesc[OpBranchConditional].operands.push(OperandVariableLiterals, "'Branch weights'"); - - InstructionDesc[OpSwitch].operands.push(OperandId, "'Selector'"); - InstructionDesc[OpSwitch].operands.push(OperandId, "'Default'"); - InstructionDesc[OpSwitch].operands.push(OperandVariableLiteralId, "'Target'"); - - - InstructionDesc[OpReturnValue].operands.push(OperandId, "'Value'"); - - InstructionDesc[OpLifetimeStart].operands.push(OperandId, "'Pointer'"); - InstructionDesc[OpLifetimeStart].operands.push(OperandLiteralNumber, "'Size'"); - - InstructionDesc[OpLifetimeStop].operands.push(OperandId, "'Pointer'"); - InstructionDesc[OpLifetimeStop].operands.push(OperandLiteralNumber, "'Size'"); - - InstructionDesc[OpGroupAsyncCopy].operands.push(OperandScope, "'Execution'"); - InstructionDesc[OpGroupAsyncCopy].operands.push(OperandId, "'Destination'"); - InstructionDesc[OpGroupAsyncCopy].operands.push(OperandId, "'Source'"); - InstructionDesc[OpGroupAsyncCopy].operands.push(OperandId, "'Num Elements'"); - InstructionDesc[OpGroupAsyncCopy].operands.push(OperandId, "'Stride'"); - InstructionDesc[OpGroupAsyncCopy].operands.push(OperandId, "'Event'"); - - InstructionDesc[OpGroupWaitEvents].operands.push(OperandScope, "'Execution'"); - InstructionDesc[OpGroupWaitEvents].operands.push(OperandId, "'Num Events'"); - InstructionDesc[OpGroupWaitEvents].operands.push(OperandId, "'Events List'"); - - InstructionDesc[OpGroupAll].operands.push(OperandScope, "'Execution'"); - InstructionDesc[OpGroupAll].operands.push(OperandId, "'Predicate'"); - - InstructionDesc[OpGroupAny].operands.push(OperandScope, "'Execution'"); - InstructionDesc[OpGroupAny].operands.push(OperandId, "'Predicate'"); - - InstructionDesc[OpGroupBroadcast].operands.push(OperandScope, "'Execution'"); - InstructionDesc[OpGroupBroadcast].operands.push(OperandId, "'Value'"); - InstructionDesc[OpGroupBroadcast].operands.push(OperandId, "'LocalId'"); - - InstructionDesc[OpGroupIAdd].operands.push(OperandScope, "'Execution'"); - InstructionDesc[OpGroupIAdd].operands.push(OperandGroupOperation, "'Operation'"); - InstructionDesc[OpGroupIAdd].operands.push(OperandId, "'X'"); - - InstructionDesc[OpGroupFAdd].operands.push(OperandScope, "'Execution'"); - InstructionDesc[OpGroupFAdd].operands.push(OperandGroupOperation, "'Operation'"); - InstructionDesc[OpGroupFAdd].operands.push(OperandId, "'X'"); - - InstructionDesc[OpGroupUMin].operands.push(OperandScope, "'Execution'"); - InstructionDesc[OpGroupUMin].operands.push(OperandGroupOperation, "'Operation'"); - InstructionDesc[OpGroupUMin].operands.push(OperandId, "'X'"); - - InstructionDesc[OpGroupSMin].operands.push(OperandScope, "'Execution'"); - InstructionDesc[OpGroupSMin].operands.push(OperandGroupOperation, "'Operation'"); - InstructionDesc[OpGroupSMin].operands.push(OperandId, "X"); - - InstructionDesc[OpGroupFMin].operands.push(OperandScope, "'Execution'"); - InstructionDesc[OpGroupFMin].operands.push(OperandGroupOperation, "'Operation'"); - InstructionDesc[OpGroupFMin].operands.push(OperandId, "X"); - - InstructionDesc[OpGroupUMax].operands.push(OperandScope, "'Execution'"); - InstructionDesc[OpGroupUMax].operands.push(OperandGroupOperation, "'Operation'"); - InstructionDesc[OpGroupUMax].operands.push(OperandId, "X"); - - InstructionDesc[OpGroupSMax].operands.push(OperandScope, "'Execution'"); - InstructionDesc[OpGroupSMax].operands.push(OperandGroupOperation, "'Operation'"); - InstructionDesc[OpGroupSMax].operands.push(OperandId, "X"); - - InstructionDesc[OpGroupFMax].operands.push(OperandScope, "'Execution'"); - InstructionDesc[OpGroupFMax].operands.push(OperandGroupOperation, "'Operation'"); - InstructionDesc[OpGroupFMax].operands.push(OperandId, "X"); - - InstructionDesc[OpReadPipe].operands.push(OperandId, "'Pipe'"); - InstructionDesc[OpReadPipe].operands.push(OperandId, "'Pointer'"); - InstructionDesc[OpReadPipe].operands.push(OperandId, "'Packet Size'"); - InstructionDesc[OpReadPipe].operands.push(OperandId, "'Packet Alignment'"); - - InstructionDesc[OpWritePipe].operands.push(OperandId, "'Pipe'"); - InstructionDesc[OpWritePipe].operands.push(OperandId, "'Pointer'"); - InstructionDesc[OpWritePipe].operands.push(OperandId, "'Packet Size'"); - InstructionDesc[OpWritePipe].operands.push(OperandId, "'Packet Alignment'"); - - InstructionDesc[OpReservedReadPipe].operands.push(OperandId, "'Pipe'"); - InstructionDesc[OpReservedReadPipe].operands.push(OperandId, "'Reserve Id'"); - InstructionDesc[OpReservedReadPipe].operands.push(OperandId, "'Index'"); - InstructionDesc[OpReservedReadPipe].operands.push(OperandId, "'Pointer'"); - InstructionDesc[OpReservedReadPipe].operands.push(OperandId, "'Packet Size'"); - InstructionDesc[OpReservedReadPipe].operands.push(OperandId, "'Packet Alignment'"); - - InstructionDesc[OpReservedWritePipe].operands.push(OperandId, "'Pipe'"); - InstructionDesc[OpReservedWritePipe].operands.push(OperandId, "'Reserve Id'"); - InstructionDesc[OpReservedWritePipe].operands.push(OperandId, "'Index'"); - InstructionDesc[OpReservedWritePipe].operands.push(OperandId, "'Pointer'"); - InstructionDesc[OpReservedWritePipe].operands.push(OperandId, "'Packet Size'"); - InstructionDesc[OpReservedWritePipe].operands.push(OperandId, "'Packet Alignment'"); - - InstructionDesc[OpReserveReadPipePackets].operands.push(OperandId, "'Pipe'"); - InstructionDesc[OpReserveReadPipePackets].operands.push(OperandId, "'Num Packets'"); - InstructionDesc[OpReserveReadPipePackets].operands.push(OperandId, "'Packet Size'"); - InstructionDesc[OpReserveReadPipePackets].operands.push(OperandId, "'Packet Alignment'"); - - InstructionDesc[OpReserveWritePipePackets].operands.push(OperandId, "'Pipe'"); - InstructionDesc[OpReserveWritePipePackets].operands.push(OperandId, "'Num Packets'"); - InstructionDesc[OpReserveWritePipePackets].operands.push(OperandId, "'Packet Size'"); - InstructionDesc[OpReserveWritePipePackets].operands.push(OperandId, "'Packet Alignment'"); - - InstructionDesc[OpCommitReadPipe].operands.push(OperandId, "'Pipe'"); - InstructionDesc[OpCommitReadPipe].operands.push(OperandId, "'Reserve Id'"); - InstructionDesc[OpCommitReadPipe].operands.push(OperandId, "'Packet Size'"); - InstructionDesc[OpCommitReadPipe].operands.push(OperandId, "'Packet Alignment'"); - - InstructionDesc[OpCommitWritePipe].operands.push(OperandId, "'Pipe'"); - InstructionDesc[OpCommitWritePipe].operands.push(OperandId, "'Reserve Id'"); - InstructionDesc[OpCommitWritePipe].operands.push(OperandId, "'Packet Size'"); - InstructionDesc[OpCommitWritePipe].operands.push(OperandId, "'Packet Alignment'"); - - InstructionDesc[OpIsValidReserveId].operands.push(OperandId, "'Reserve Id'"); - - InstructionDesc[OpGetNumPipePackets].operands.push(OperandId, "'Pipe'"); - InstructionDesc[OpGetNumPipePackets].operands.push(OperandId, "'Packet Size'"); - InstructionDesc[OpGetNumPipePackets].operands.push(OperandId, "'Packet Alignment'"); - - InstructionDesc[OpGetMaxPipePackets].operands.push(OperandId, "'Pipe'"); - InstructionDesc[OpGetMaxPipePackets].operands.push(OperandId, "'Packet Size'"); - InstructionDesc[OpGetMaxPipePackets].operands.push(OperandId, "'Packet Alignment'"); - - InstructionDesc[OpGroupReserveReadPipePackets].operands.push(OperandScope, "'Execution'"); - InstructionDesc[OpGroupReserveReadPipePackets].operands.push(OperandId, "'Pipe'"); - InstructionDesc[OpGroupReserveReadPipePackets].operands.push(OperandId, "'Num Packets'"); - InstructionDesc[OpGroupReserveReadPipePackets].operands.push(OperandId, "'Packet Size'"); - InstructionDesc[OpGroupReserveReadPipePackets].operands.push(OperandId, "'Packet Alignment'"); - - InstructionDesc[OpGroupReserveWritePipePackets].operands.push(OperandScope, "'Execution'"); - InstructionDesc[OpGroupReserveWritePipePackets].operands.push(OperandId, "'Pipe'"); - InstructionDesc[OpGroupReserveWritePipePackets].operands.push(OperandId, "'Num Packets'"); - InstructionDesc[OpGroupReserveWritePipePackets].operands.push(OperandId, "'Packet Size'"); - InstructionDesc[OpGroupReserveWritePipePackets].operands.push(OperandId, "'Packet Alignment'"); - - InstructionDesc[OpGroupCommitReadPipe].operands.push(OperandScope, "'Execution'"); - InstructionDesc[OpGroupCommitReadPipe].operands.push(OperandId, "'Pipe'"); - InstructionDesc[OpGroupCommitReadPipe].operands.push(OperandId, "'Reserve Id'"); - InstructionDesc[OpGroupCommitReadPipe].operands.push(OperandId, "'Packet Size'"); - InstructionDesc[OpGroupCommitReadPipe].operands.push(OperandId, "'Packet Alignment'"); - - InstructionDesc[OpGroupCommitWritePipe].operands.push(OperandScope, "'Execution'"); - InstructionDesc[OpGroupCommitWritePipe].operands.push(OperandId, "'Pipe'"); - InstructionDesc[OpGroupCommitWritePipe].operands.push(OperandId, "'Reserve Id'"); - InstructionDesc[OpGroupCommitWritePipe].operands.push(OperandId, "'Packet Size'"); - InstructionDesc[OpGroupCommitWritePipe].operands.push(OperandId, "'Packet Alignment'"); - - InstructionDesc[OpBuildNDRange].operands.push(OperandId, "'GlobalWorkSize'"); - InstructionDesc[OpBuildNDRange].operands.push(OperandId, "'LocalWorkSize'"); - InstructionDesc[OpBuildNDRange].operands.push(OperandId, "'GlobalWorkOffset'"); - - InstructionDesc[OpCaptureEventProfilingInfo].operands.push(OperandId, "'Event'"); - InstructionDesc[OpCaptureEventProfilingInfo].operands.push(OperandId, "'Profiling Info'"); - InstructionDesc[OpCaptureEventProfilingInfo].operands.push(OperandId, "'Value'"); - - InstructionDesc[OpSetUserEventStatus].operands.push(OperandId, "'Event'"); - InstructionDesc[OpSetUserEventStatus].operands.push(OperandId, "'Status'"); - - InstructionDesc[OpIsValidEvent].operands.push(OperandId, "'Event'"); - - InstructionDesc[OpRetainEvent].operands.push(OperandId, "'Event'"); - - InstructionDesc[OpReleaseEvent].operands.push(OperandId, "'Event'"); - - InstructionDesc[OpGetKernelWorkGroupSize].operands.push(OperandId, "'Invoke'"); - InstructionDesc[OpGetKernelWorkGroupSize].operands.push(OperandId, "'Param'"); - InstructionDesc[OpGetKernelWorkGroupSize].operands.push(OperandId, "'Param Size'"); - InstructionDesc[OpGetKernelWorkGroupSize].operands.push(OperandId, "'Param Align'"); - - InstructionDesc[OpGetKernelPreferredWorkGroupSizeMultiple].operands.push(OperandId, "'Invoke'"); - InstructionDesc[OpGetKernelPreferredWorkGroupSizeMultiple].operands.push(OperandId, "'Param'"); - InstructionDesc[OpGetKernelPreferredWorkGroupSizeMultiple].operands.push(OperandId, "'Param Size'"); - InstructionDesc[OpGetKernelPreferredWorkGroupSizeMultiple].operands.push(OperandId, "'Param Align'"); - - InstructionDesc[OpGetKernelNDrangeSubGroupCount].operands.push(OperandId, "'ND Range'"); - InstructionDesc[OpGetKernelNDrangeSubGroupCount].operands.push(OperandId, "'Invoke'"); - InstructionDesc[OpGetKernelNDrangeSubGroupCount].operands.push(OperandId, "'Param'"); - InstructionDesc[OpGetKernelNDrangeSubGroupCount].operands.push(OperandId, "'Param Size'"); - InstructionDesc[OpGetKernelNDrangeSubGroupCount].operands.push(OperandId, "'Param Align'"); - - InstructionDesc[OpGetKernelNDrangeMaxSubGroupSize].operands.push(OperandId, "'ND Range'"); - InstructionDesc[OpGetKernelNDrangeMaxSubGroupSize].operands.push(OperandId, "'Invoke'"); - InstructionDesc[OpGetKernelNDrangeMaxSubGroupSize].operands.push(OperandId, "'Param'"); - InstructionDesc[OpGetKernelNDrangeMaxSubGroupSize].operands.push(OperandId, "'Param Size'"); - InstructionDesc[OpGetKernelNDrangeMaxSubGroupSize].operands.push(OperandId, "'Param Align'"); - - InstructionDesc[OpEnqueueKernel].operands.push(OperandId, "'Queue'"); - InstructionDesc[OpEnqueueKernel].operands.push(OperandId, "'Flags'"); - InstructionDesc[OpEnqueueKernel].operands.push(OperandId, "'ND Range'"); - InstructionDesc[OpEnqueueKernel].operands.push(OperandId, "'Num Events'"); - InstructionDesc[OpEnqueueKernel].operands.push(OperandId, "'Wait Events'"); - InstructionDesc[OpEnqueueKernel].operands.push(OperandId, "'Ret Event'"); - InstructionDesc[OpEnqueueKernel].operands.push(OperandId, "'Invoke'"); - InstructionDesc[OpEnqueueKernel].operands.push(OperandId, "'Param'"); - InstructionDesc[OpEnqueueKernel].operands.push(OperandId, "'Param Size'"); - InstructionDesc[OpEnqueueKernel].operands.push(OperandId, "'Param Align'"); - InstructionDesc[OpEnqueueKernel].operands.push(OperandVariableIds, "'Local Size'"); - - InstructionDesc[OpEnqueueMarker].operands.push(OperandId, "'Queue'"); - InstructionDesc[OpEnqueueMarker].operands.push(OperandId, "'Num Events'"); - InstructionDesc[OpEnqueueMarker].operands.push(OperandId, "'Wait Events'"); - InstructionDesc[OpEnqueueMarker].operands.push(OperandId, "'Ret Event'"); - - InstructionDesc[OpGroupNonUniformElect].operands.push(OperandScope, "'Execution'"); - - InstructionDesc[OpGroupNonUniformAll].operands.push(OperandScope, "'Execution'"); - InstructionDesc[OpGroupNonUniformAll].operands.push(OperandId, "X"); - - InstructionDesc[OpGroupNonUniformAny].operands.push(OperandScope, "'Execution'"); - InstructionDesc[OpGroupNonUniformAny].operands.push(OperandId, "X"); - - InstructionDesc[OpGroupNonUniformAllEqual].operands.push(OperandScope, "'Execution'"); - InstructionDesc[OpGroupNonUniformAllEqual].operands.push(OperandId, "X"); - - InstructionDesc[OpGroupNonUniformBroadcast].operands.push(OperandScope, "'Execution'"); - InstructionDesc[OpGroupNonUniformBroadcast].operands.push(OperandId, "X"); - InstructionDesc[OpGroupNonUniformBroadcast].operands.push(OperandId, "ID"); - - InstructionDesc[OpGroupNonUniformBroadcastFirst].operands.push(OperandScope, "'Execution'"); - InstructionDesc[OpGroupNonUniformBroadcastFirst].operands.push(OperandId, "X"); - - InstructionDesc[OpGroupNonUniformBallot].operands.push(OperandScope, "'Execution'"); - InstructionDesc[OpGroupNonUniformBallot].operands.push(OperandId, "X"); - - InstructionDesc[OpGroupNonUniformInverseBallot].operands.push(OperandScope, "'Execution'"); - InstructionDesc[OpGroupNonUniformInverseBallot].operands.push(OperandId, "X"); - - InstructionDesc[OpGroupNonUniformBallotBitExtract].operands.push(OperandScope, "'Execution'"); - InstructionDesc[OpGroupNonUniformBallotBitExtract].operands.push(OperandId, "X"); - InstructionDesc[OpGroupNonUniformBallotBitExtract].operands.push(OperandId, "Bit"); - - InstructionDesc[OpGroupNonUniformBallotBitCount].operands.push(OperandScope, "'Execution'"); - InstructionDesc[OpGroupNonUniformBallotBitCount].operands.push(OperandGroupOperation, "'Operation'"); - InstructionDesc[OpGroupNonUniformBallotBitCount].operands.push(OperandId, "X"); - - InstructionDesc[OpGroupNonUniformBallotFindLSB].operands.push(OperandScope, "'Execution'"); - InstructionDesc[OpGroupNonUniformBallotFindLSB].operands.push(OperandId, "X"); - - InstructionDesc[OpGroupNonUniformBallotFindMSB].operands.push(OperandScope, "'Execution'"); - InstructionDesc[OpGroupNonUniformBallotFindMSB].operands.push(OperandId, "X"); - - InstructionDesc[OpGroupNonUniformShuffle].operands.push(OperandScope, "'Execution'"); - InstructionDesc[OpGroupNonUniformShuffle].operands.push(OperandId, "X"); - InstructionDesc[OpGroupNonUniformShuffle].operands.push(OperandId, "'Id'"); - - InstructionDesc[OpGroupNonUniformShuffleXor].operands.push(OperandScope, "'Execution'"); - InstructionDesc[OpGroupNonUniformShuffleXor].operands.push(OperandId, "X"); - InstructionDesc[OpGroupNonUniformShuffleXor].operands.push(OperandId, "Mask"); - - InstructionDesc[OpGroupNonUniformShuffleUp].operands.push(OperandScope, "'Execution'"); - InstructionDesc[OpGroupNonUniformShuffleUp].operands.push(OperandId, "X"); - InstructionDesc[OpGroupNonUniformShuffleUp].operands.push(OperandId, "Offset"); - - InstructionDesc[OpGroupNonUniformShuffleDown].operands.push(OperandScope, "'Execution'"); - InstructionDesc[OpGroupNonUniformShuffleDown].operands.push(OperandId, "X"); - InstructionDesc[OpGroupNonUniformShuffleDown].operands.push(OperandId, "Offset"); - - InstructionDesc[OpGroupNonUniformIAdd].operands.push(OperandScope, "'Execution'"); - InstructionDesc[OpGroupNonUniformIAdd].operands.push(OperandGroupOperation, "'Operation'"); - InstructionDesc[OpGroupNonUniformIAdd].operands.push(OperandId, "X"); - InstructionDesc[OpGroupNonUniformIAdd].operands.push(OperandId, "'ClusterSize'", true); - - InstructionDesc[OpGroupNonUniformFAdd].operands.push(OperandScope, "'Execution'"); - InstructionDesc[OpGroupNonUniformFAdd].operands.push(OperandGroupOperation, "'Operation'"); - InstructionDesc[OpGroupNonUniformFAdd].operands.push(OperandId, "X"); - InstructionDesc[OpGroupNonUniformFAdd].operands.push(OperandId, "'ClusterSize'", true); - - InstructionDesc[OpGroupNonUniformIMul].operands.push(OperandScope, "'Execution'"); - InstructionDesc[OpGroupNonUniformIMul].operands.push(OperandGroupOperation, "'Operation'"); - InstructionDesc[OpGroupNonUniformIMul].operands.push(OperandId, "X"); - InstructionDesc[OpGroupNonUniformIMul].operands.push(OperandId, "'ClusterSize'", true); - - InstructionDesc[OpGroupNonUniformFMul].operands.push(OperandScope, "'Execution'"); - InstructionDesc[OpGroupNonUniformFMul].operands.push(OperandGroupOperation, "'Operation'"); - InstructionDesc[OpGroupNonUniformFMul].operands.push(OperandId, "X"); - InstructionDesc[OpGroupNonUniformFMul].operands.push(OperandId, "'ClusterSize'", true); - - InstructionDesc[OpGroupNonUniformSMin].operands.push(OperandScope, "'Execution'"); - InstructionDesc[OpGroupNonUniformSMin].operands.push(OperandGroupOperation, "'Operation'"); - InstructionDesc[OpGroupNonUniformSMin].operands.push(OperandId, "X"); - InstructionDesc[OpGroupNonUniformSMin].operands.push(OperandId, "'ClusterSize'", true); - - InstructionDesc[OpGroupNonUniformUMin].operands.push(OperandScope, "'Execution'"); - InstructionDesc[OpGroupNonUniformUMin].operands.push(OperandGroupOperation, "'Operation'"); - InstructionDesc[OpGroupNonUniformUMin].operands.push(OperandId, "X"); - InstructionDesc[OpGroupNonUniformUMin].operands.push(OperandId, "'ClusterSize'", true); - - InstructionDesc[OpGroupNonUniformFMin].operands.push(OperandScope, "'Execution'"); - InstructionDesc[OpGroupNonUniformFMin].operands.push(OperandGroupOperation, "'Operation'"); - InstructionDesc[OpGroupNonUniformFMin].operands.push(OperandId, "X"); - InstructionDesc[OpGroupNonUniformFMin].operands.push(OperandId, "'ClusterSize'", true); - InstructionDesc[OpGroupNonUniformSMax].operands.push(OperandScope, "'Execution'"); - InstructionDesc[OpGroupNonUniformSMax].operands.push(OperandGroupOperation, "'Operation'"); - InstructionDesc[OpGroupNonUniformSMax].operands.push(OperandId, "X"); - InstructionDesc[OpGroupNonUniformSMax].operands.push(OperandId, "'ClusterSize'", true); + InstructionDesc[OpTypeCooperativeMatrixNV].operands.push(OperandId, "'Component Type'"); + InstructionDesc[OpTypeCooperativeMatrixNV].operands.push(OperandId, "'Scope'"); + InstructionDesc[OpTypeCooperativeMatrixNV].operands.push(OperandId, "'Rows'"); + InstructionDesc[OpTypeCooperativeMatrixNV].operands.push(OperandId, "'Columns'"); - InstructionDesc[OpGroupNonUniformUMax].operands.push(OperandScope, "'Execution'"); - InstructionDesc[OpGroupNonUniformUMax].operands.push(OperandGroupOperation, "'Operation'"); - InstructionDesc[OpGroupNonUniformUMax].operands.push(OperandId, "X"); - InstructionDesc[OpGroupNonUniformUMax].operands.push(OperandId, "'ClusterSize'", true); + InstructionDesc[OpCooperativeMatrixLoadNV].operands.push(OperandId, "'Pointer'"); + InstructionDesc[OpCooperativeMatrixLoadNV].operands.push(OperandId, "'Stride'"); + InstructionDesc[OpCooperativeMatrixLoadNV].operands.push(OperandId, "'Column Major'"); + InstructionDesc[OpCooperativeMatrixLoadNV].operands.push(OperandMemoryAccess, "'Memory Access'"); + InstructionDesc[OpCooperativeMatrixLoadNV].operands.push(OperandLiteralNumber, "", true); + InstructionDesc[OpCooperativeMatrixLoadNV].operands.push(OperandId, "", true); - InstructionDesc[OpGroupNonUniformFMax].operands.push(OperandScope, "'Execution'"); - InstructionDesc[OpGroupNonUniformFMax].operands.push(OperandGroupOperation, "'Operation'"); - InstructionDesc[OpGroupNonUniformFMax].operands.push(OperandId, "X"); - InstructionDesc[OpGroupNonUniformFMax].operands.push(OperandId, "'ClusterSize'", true); + InstructionDesc[OpCooperativeMatrixStoreNV].operands.push(OperandId, "'Pointer'"); + InstructionDesc[OpCooperativeMatrixStoreNV].operands.push(OperandId, "'Object'"); + InstructionDesc[OpCooperativeMatrixStoreNV].operands.push(OperandId, "'Stride'"); + InstructionDesc[OpCooperativeMatrixStoreNV].operands.push(OperandId, "'Column Major'"); + InstructionDesc[OpCooperativeMatrixStoreNV].operands.push(OperandMemoryAccess, "'Memory Access'"); + InstructionDesc[OpCooperativeMatrixStoreNV].operands.push(OperandLiteralNumber, "", true); + InstructionDesc[OpCooperativeMatrixStoreNV].operands.push(OperandId, "", true); - InstructionDesc[OpGroupNonUniformBitwiseAnd].operands.push(OperandScope, "'Execution'"); - InstructionDesc[OpGroupNonUniformBitwiseAnd].operands.push(OperandGroupOperation, "'Operation'"); - InstructionDesc[OpGroupNonUniformBitwiseAnd].operands.push(OperandId, "X"); - InstructionDesc[OpGroupNonUniformBitwiseAnd].operands.push(OperandId, "'ClusterSize'", true); + InstructionDesc[OpCooperativeMatrixMulAddNV].operands.push(OperandId, "'A'"); + InstructionDesc[OpCooperativeMatrixMulAddNV].operands.push(OperandId, "'B'"); + InstructionDesc[OpCooperativeMatrixMulAddNV].operands.push(OperandId, "'C'"); - InstructionDesc[OpGroupNonUniformBitwiseOr].operands.push(OperandScope, "'Execution'"); - InstructionDesc[OpGroupNonUniformBitwiseOr].operands.push(OperandGroupOperation, "'Operation'"); - InstructionDesc[OpGroupNonUniformBitwiseOr].operands.push(OperandId, "X"); - InstructionDesc[OpGroupNonUniformBitwiseOr].operands.push(OperandId, "'ClusterSize'", true); - - InstructionDesc[OpGroupNonUniformBitwiseXor].operands.push(OperandScope, "'Execution'"); - InstructionDesc[OpGroupNonUniformBitwiseXor].operands.push(OperandGroupOperation, "'Operation'"); - InstructionDesc[OpGroupNonUniformBitwiseXor].operands.push(OperandId, "X"); - InstructionDesc[OpGroupNonUniformBitwiseXor].operands.push(OperandId, "'ClusterSize'", true); - - InstructionDesc[OpGroupNonUniformLogicalAnd].operands.push(OperandScope, "'Execution'"); - InstructionDesc[OpGroupNonUniformLogicalAnd].operands.push(OperandGroupOperation, "'Operation'"); - InstructionDesc[OpGroupNonUniformLogicalAnd].operands.push(OperandId, "X"); - InstructionDesc[OpGroupNonUniformLogicalAnd].operands.push(OperandId, "'ClusterSize'", true); - - InstructionDesc[OpGroupNonUniformLogicalOr].operands.push(OperandScope, "'Execution'"); - InstructionDesc[OpGroupNonUniformLogicalOr].operands.push(OperandGroupOperation, "'Operation'"); - InstructionDesc[OpGroupNonUniformLogicalOr].operands.push(OperandId, "X"); - InstructionDesc[OpGroupNonUniformLogicalOr].operands.push(OperandId, "'ClusterSize'", true); - - InstructionDesc[OpGroupNonUniformLogicalXor].operands.push(OperandScope, "'Execution'"); - InstructionDesc[OpGroupNonUniformLogicalXor].operands.push(OperandGroupOperation, "'Operation'"); - InstructionDesc[OpGroupNonUniformLogicalXor].operands.push(OperandId, "X"); - InstructionDesc[OpGroupNonUniformLogicalXor].operands.push(OperandId, "'ClusterSize'", true); - - InstructionDesc[OpGroupNonUniformQuadBroadcast].operands.push(OperandScope, "'Execution'"); - InstructionDesc[OpGroupNonUniformQuadBroadcast].operands.push(OperandId, "X"); - InstructionDesc[OpGroupNonUniformQuadBroadcast].operands.push(OperandId, "'Id'"); - - InstructionDesc[OpGroupNonUniformQuadSwap].operands.push(OperandScope, "'Execution'"); - InstructionDesc[OpGroupNonUniformQuadSwap].operands.push(OperandId, "X"); - InstructionDesc[OpGroupNonUniformQuadSwap].operands.push(OperandId, "'Direction'"); - - InstructionDesc[OpSubgroupBallotKHR].operands.push(OperandId, "'Predicate'"); - - InstructionDesc[OpSubgroupFirstInvocationKHR].operands.push(OperandId, "'Value'"); - - InstructionDesc[OpSubgroupAnyKHR].operands.push(OperandScope, "'Execution'"); - InstructionDesc[OpSubgroupAnyKHR].operands.push(OperandId, "'Predicate'"); - - InstructionDesc[OpSubgroupAllKHR].operands.push(OperandScope, "'Execution'"); - InstructionDesc[OpSubgroupAllKHR].operands.push(OperandId, "'Predicate'"); - - InstructionDesc[OpSubgroupAllEqualKHR].operands.push(OperandScope, "'Execution'"); - InstructionDesc[OpSubgroupAllEqualKHR].operands.push(OperandId, "'Predicate'"); - - InstructionDesc[OpSubgroupReadInvocationKHR].operands.push(OperandId, "'Value'"); - InstructionDesc[OpSubgroupReadInvocationKHR].operands.push(OperandId, "'Index'"); - - InstructionDesc[OpModuleProcessed].operands.push(OperandLiteralString, "'process'"); - - InstructionDesc[OpGroupIAddNonUniformAMD].operands.push(OperandScope, "'Execution'"); - InstructionDesc[OpGroupIAddNonUniformAMD].operands.push(OperandGroupOperation, "'Operation'"); - InstructionDesc[OpGroupIAddNonUniformAMD].operands.push(OperandId, "'X'"); - - InstructionDesc[OpGroupFAddNonUniformAMD].operands.push(OperandScope, "'Execution'"); - InstructionDesc[OpGroupFAddNonUniformAMD].operands.push(OperandGroupOperation, "'Operation'"); - InstructionDesc[OpGroupFAddNonUniformAMD].operands.push(OperandId, "'X'"); - - InstructionDesc[OpGroupUMinNonUniformAMD].operands.push(OperandScope, "'Execution'"); - InstructionDesc[OpGroupUMinNonUniformAMD].operands.push(OperandGroupOperation, "'Operation'"); - InstructionDesc[OpGroupUMinNonUniformAMD].operands.push(OperandId, "'X'"); - - InstructionDesc[OpGroupSMinNonUniformAMD].operands.push(OperandScope, "'Execution'"); - InstructionDesc[OpGroupSMinNonUniformAMD].operands.push(OperandGroupOperation, "'Operation'"); - InstructionDesc[OpGroupSMinNonUniformAMD].operands.push(OperandId, "X"); - - InstructionDesc[OpGroupFMinNonUniformAMD].operands.push(OperandScope, "'Execution'"); - InstructionDesc[OpGroupFMinNonUniformAMD].operands.push(OperandGroupOperation, "'Operation'"); - InstructionDesc[OpGroupFMinNonUniformAMD].operands.push(OperandId, "X"); - - InstructionDesc[OpGroupUMaxNonUniformAMD].operands.push(OperandScope, "'Execution'"); - InstructionDesc[OpGroupUMaxNonUniformAMD].operands.push(OperandGroupOperation, "'Operation'"); - InstructionDesc[OpGroupUMaxNonUniformAMD].operands.push(OperandId, "X"); - - InstructionDesc[OpGroupSMaxNonUniformAMD].operands.push(OperandScope, "'Execution'"); - InstructionDesc[OpGroupSMaxNonUniformAMD].operands.push(OperandGroupOperation, "'Operation'"); - InstructionDesc[OpGroupSMaxNonUniformAMD].operands.push(OperandId, "X"); - - InstructionDesc[OpGroupFMaxNonUniformAMD].operands.push(OperandScope, "'Execution'"); - InstructionDesc[OpGroupFMaxNonUniformAMD].operands.push(OperandGroupOperation, "'Operation'"); - InstructionDesc[OpGroupFMaxNonUniformAMD].operands.push(OperandId, "X"); - - InstructionDesc[OpFragmentMaskFetchAMD].operands.push(OperandId, "'Image'"); - InstructionDesc[OpFragmentMaskFetchAMD].operands.push(OperandId, "'Coordinate'"); - - InstructionDesc[OpFragmentFetchAMD].operands.push(OperandId, "'Image'"); - InstructionDesc[OpFragmentFetchAMD].operands.push(OperandId, "'Coordinate'"); - InstructionDesc[OpFragmentFetchAMD].operands.push(OperandId, "'Fragment Index'"); - - InstructionDesc[OpGroupNonUniformPartitionNV].operands.push(OperandId, "X"); - - InstructionDesc[OpTypeAccelerationStructureKHR].setResultAndType(true, false); - - InstructionDesc[OpTraceNV].operands.push(OperandId, "'Acceleration Structure'"); - InstructionDesc[OpTraceNV].operands.push(OperandId, "'Ray Flags'"); - InstructionDesc[OpTraceNV].operands.push(OperandId, "'Cull Mask'"); - InstructionDesc[OpTraceNV].operands.push(OperandId, "'SBT Record Offset'"); - InstructionDesc[OpTraceNV].operands.push(OperandId, "'SBT Record Stride'"); - InstructionDesc[OpTraceNV].operands.push(OperandId, "'Miss Index'"); - InstructionDesc[OpTraceNV].operands.push(OperandId, "'Ray Origin'"); - InstructionDesc[OpTraceNV].operands.push(OperandId, "'TMin'"); - InstructionDesc[OpTraceNV].operands.push(OperandId, "'Ray Direction'"); - InstructionDesc[OpTraceNV].operands.push(OperandId, "'TMax'"); - InstructionDesc[OpTraceNV].operands.push(OperandId, "'Payload'"); - InstructionDesc[OpTraceNV].setResultAndType(false, false); - - InstructionDesc[OpTraceRayMotionNV].operands.push(OperandId, "'Acceleration Structure'"); - InstructionDesc[OpTraceRayMotionNV].operands.push(OperandId, "'Ray Flags'"); - InstructionDesc[OpTraceRayMotionNV].operands.push(OperandId, "'Cull Mask'"); - InstructionDesc[OpTraceRayMotionNV].operands.push(OperandId, "'SBT Record Offset'"); - InstructionDesc[OpTraceRayMotionNV].operands.push(OperandId, "'SBT Record Stride'"); - InstructionDesc[OpTraceRayMotionNV].operands.push(OperandId, "'Miss Index'"); - InstructionDesc[OpTraceRayMotionNV].operands.push(OperandId, "'Ray Origin'"); - InstructionDesc[OpTraceRayMotionNV].operands.push(OperandId, "'TMin'"); - InstructionDesc[OpTraceRayMotionNV].operands.push(OperandId, "'Ray Direction'"); - InstructionDesc[OpTraceRayMotionNV].operands.push(OperandId, "'TMax'"); - InstructionDesc[OpTraceRayMotionNV].operands.push(OperandId, "'Time'"); - InstructionDesc[OpTraceRayMotionNV].operands.push(OperandId, "'Payload'"); - InstructionDesc[OpTraceRayMotionNV].setResultAndType(false, false); - - InstructionDesc[OpTraceRayKHR].operands.push(OperandId, "'Acceleration Structure'"); - InstructionDesc[OpTraceRayKHR].operands.push(OperandId, "'Ray Flags'"); - InstructionDesc[OpTraceRayKHR].operands.push(OperandId, "'Cull Mask'"); - InstructionDesc[OpTraceRayKHR].operands.push(OperandId, "'SBT Record Offset'"); - InstructionDesc[OpTraceRayKHR].operands.push(OperandId, "'SBT Record Stride'"); - InstructionDesc[OpTraceRayKHR].operands.push(OperandId, "'Miss Index'"); - InstructionDesc[OpTraceRayKHR].operands.push(OperandId, "'Ray Origin'"); - InstructionDesc[OpTraceRayKHR].operands.push(OperandId, "'TMin'"); - InstructionDesc[OpTraceRayKHR].operands.push(OperandId, "'Ray Direction'"); - InstructionDesc[OpTraceRayKHR].operands.push(OperandId, "'TMax'"); - InstructionDesc[OpTraceRayKHR].operands.push(OperandId, "'Payload'"); - InstructionDesc[OpTraceRayKHR].setResultAndType(false, false); - - InstructionDesc[OpReportIntersectionKHR].operands.push(OperandId, "'Hit Parameter'"); - InstructionDesc[OpReportIntersectionKHR].operands.push(OperandId, "'Hit Kind'"); - - InstructionDesc[OpIgnoreIntersectionNV].setResultAndType(false, false); - - InstructionDesc[OpIgnoreIntersectionKHR].setResultAndType(false, false); - - InstructionDesc[OpTerminateRayNV].setResultAndType(false, false); - - InstructionDesc[OpTerminateRayKHR].setResultAndType(false, false); - - InstructionDesc[OpExecuteCallableNV].operands.push(OperandId, "SBT Record Index"); - InstructionDesc[OpExecuteCallableNV].operands.push(OperandId, "CallableData ID"); - InstructionDesc[OpExecuteCallableNV].setResultAndType(false, false); - - InstructionDesc[OpExecuteCallableKHR].operands.push(OperandId, "SBT Record Index"); - InstructionDesc[OpExecuteCallableKHR].operands.push(OperandId, "CallableData"); - InstructionDesc[OpExecuteCallableKHR].setResultAndType(false, false); - - InstructionDesc[OpConvertUToAccelerationStructureKHR].operands.push(OperandId, "Value"); - InstructionDesc[OpConvertUToAccelerationStructureKHR].setResultAndType(true, true); - - // Ray Query - InstructionDesc[OpTypeAccelerationStructureKHR].setResultAndType(true, false); - InstructionDesc[OpTypeRayQueryKHR].setResultAndType(true, false); - - InstructionDesc[OpRayQueryInitializeKHR].operands.push(OperandId, "'RayQuery'"); - InstructionDesc[OpRayQueryInitializeKHR].operands.push(OperandId, "'AccelerationS'"); - InstructionDesc[OpRayQueryInitializeKHR].operands.push(OperandId, "'RayFlags'"); - InstructionDesc[OpRayQueryInitializeKHR].operands.push(OperandId, "'CullMask'"); - InstructionDesc[OpRayQueryInitializeKHR].operands.push(OperandId, "'Origin'"); - InstructionDesc[OpRayQueryInitializeKHR].operands.push(OperandId, "'Tmin'"); - InstructionDesc[OpRayQueryInitializeKHR].operands.push(OperandId, "'Direction'"); - InstructionDesc[OpRayQueryInitializeKHR].operands.push(OperandId, "'Tmax'"); - InstructionDesc[OpRayQueryInitializeKHR].setResultAndType(false, false); - - InstructionDesc[OpRayQueryTerminateKHR].operands.push(OperandId, "'RayQuery'"); - InstructionDesc[OpRayQueryTerminateKHR].setResultAndType(false, false); - - InstructionDesc[OpRayQueryGenerateIntersectionKHR].operands.push(OperandId, "'RayQuery'"); - InstructionDesc[OpRayQueryGenerateIntersectionKHR].operands.push(OperandId, "'THit'"); - InstructionDesc[OpRayQueryGenerateIntersectionKHR].setResultAndType(false, false); - - InstructionDesc[OpRayQueryConfirmIntersectionKHR].operands.push(OperandId, "'RayQuery'"); - InstructionDesc[OpRayQueryConfirmIntersectionKHR].setResultAndType(false, false); - - InstructionDesc[OpRayQueryProceedKHR].operands.push(OperandId, "'RayQuery'"); - InstructionDesc[OpRayQueryProceedKHR].setResultAndType(true, true); - - InstructionDesc[OpRayQueryGetIntersectionTypeKHR].operands.push(OperandId, "'RayQuery'"); - InstructionDesc[OpRayQueryGetIntersectionTypeKHR].operands.push(OperandId, "'Committed'"); - InstructionDesc[OpRayQueryGetIntersectionTypeKHR].setResultAndType(true, true); - - InstructionDesc[OpRayQueryGetRayTMinKHR].operands.push(OperandId, "'RayQuery'"); - InstructionDesc[OpRayQueryGetRayTMinKHR].setResultAndType(true, true); - - InstructionDesc[OpRayQueryGetRayFlagsKHR].operands.push(OperandId, "'RayQuery'"); - InstructionDesc[OpRayQueryGetRayFlagsKHR].setResultAndType(true, true); - - InstructionDesc[OpRayQueryGetIntersectionTKHR].operands.push(OperandId, "'RayQuery'"); - InstructionDesc[OpRayQueryGetIntersectionTKHR].operands.push(OperandId, "'Committed'"); - InstructionDesc[OpRayQueryGetIntersectionTKHR].setResultAndType(true, true); - - InstructionDesc[OpRayQueryGetIntersectionInstanceCustomIndexKHR].operands.push(OperandId, "'RayQuery'"); - InstructionDesc[OpRayQueryGetIntersectionInstanceCustomIndexKHR].operands.push(OperandId, "'Committed'"); - InstructionDesc[OpRayQueryGetIntersectionInstanceCustomIndexKHR].setResultAndType(true, true); - - InstructionDesc[OpRayQueryGetIntersectionInstanceIdKHR].operands.push(OperandId, "'RayQuery'"); - InstructionDesc[OpRayQueryGetIntersectionInstanceIdKHR].operands.push(OperandId, "'Committed'"); - InstructionDesc[OpRayQueryGetIntersectionInstanceIdKHR].setResultAndType(true, true); - - InstructionDesc[OpRayQueryGetIntersectionInstanceShaderBindingTableRecordOffsetKHR].operands.push(OperandId, "'RayQuery'"); - InstructionDesc[OpRayQueryGetIntersectionInstanceShaderBindingTableRecordOffsetKHR].operands.push(OperandId, "'Committed'"); - InstructionDesc[OpRayQueryGetIntersectionInstanceShaderBindingTableRecordOffsetKHR].setResultAndType(true, true); - - InstructionDesc[OpRayQueryGetIntersectionGeometryIndexKHR].operands.push(OperandId, "'RayQuery'"); - InstructionDesc[OpRayQueryGetIntersectionGeometryIndexKHR].operands.push(OperandId, "'Committed'"); - InstructionDesc[OpRayQueryGetIntersectionGeometryIndexKHR].setResultAndType(true, true); - - InstructionDesc[OpRayQueryGetIntersectionPrimitiveIndexKHR].operands.push(OperandId, "'RayQuery'"); - InstructionDesc[OpRayQueryGetIntersectionPrimitiveIndexKHR].operands.push(OperandId, "'Committed'"); - InstructionDesc[OpRayQueryGetIntersectionPrimitiveIndexKHR].setResultAndType(true, true); - - InstructionDesc[OpRayQueryGetIntersectionBarycentricsKHR].operands.push(OperandId, "'RayQuery'"); - InstructionDesc[OpRayQueryGetIntersectionBarycentricsKHR].operands.push(OperandId, "'Committed'"); - InstructionDesc[OpRayQueryGetIntersectionBarycentricsKHR].setResultAndType(true, true); - - InstructionDesc[OpRayQueryGetIntersectionFrontFaceKHR].operands.push(OperandId, "'RayQuery'"); - InstructionDesc[OpRayQueryGetIntersectionFrontFaceKHR].operands.push(OperandId, "'Committed'"); - InstructionDesc[OpRayQueryGetIntersectionFrontFaceKHR].setResultAndType(true, true); - - InstructionDesc[OpRayQueryGetIntersectionCandidateAABBOpaqueKHR].operands.push(OperandId, "'RayQuery'"); - InstructionDesc[OpRayQueryGetIntersectionCandidateAABBOpaqueKHR].setResultAndType(true, true); - - InstructionDesc[OpRayQueryGetIntersectionObjectRayDirectionKHR].operands.push(OperandId, "'RayQuery'"); - InstructionDesc[OpRayQueryGetIntersectionObjectRayDirectionKHR].operands.push(OperandId, "'Committed'"); - InstructionDesc[OpRayQueryGetIntersectionObjectRayDirectionKHR].setResultAndType(true, true); + InstructionDesc[OpCooperativeMatrixLengthNV].operands.push(OperandId, "'Type'"); - InstructionDesc[OpRayQueryGetIntersectionObjectRayOriginKHR].operands.push(OperandId, "'RayQuery'"); - InstructionDesc[OpRayQueryGetIntersectionObjectRayOriginKHR].operands.push(OperandId, "'Committed'"); - InstructionDesc[OpRayQueryGetIntersectionObjectRayOriginKHR].setResultAndType(true, true); + InstructionDesc[OpTypeCooperativeMatrixKHR].operands.push(OperandId, "'Component Type'"); + InstructionDesc[OpTypeCooperativeMatrixKHR].operands.push(OperandId, "'Scope'"); + InstructionDesc[OpTypeCooperativeMatrixKHR].operands.push(OperandId, "'Rows'"); + InstructionDesc[OpTypeCooperativeMatrixKHR].operands.push(OperandId, "'Columns'"); + InstructionDesc[OpTypeCooperativeMatrixKHR].operands.push(OperandId, "'Use'"); - InstructionDesc[OpRayQueryGetWorldRayDirectionKHR].operands.push(OperandId, "'RayQuery'"); - InstructionDesc[OpRayQueryGetWorldRayDirectionKHR].setResultAndType(true, true); + InstructionDesc[OpCooperativeMatrixLoadKHR].operands.push(OperandId, "'Pointer'"); + InstructionDesc[OpCooperativeMatrixLoadKHR].operands.push(OperandId, "'Memory Layout'"); + InstructionDesc[OpCooperativeMatrixLoadKHR].operands.push(OperandId, "'Stride'"); + InstructionDesc[OpCooperativeMatrixLoadKHR].operands.push(OperandMemoryAccess, "'Memory Access'"); + InstructionDesc[OpCooperativeMatrixLoadKHR].operands.push(OperandLiteralNumber, "", true); + InstructionDesc[OpCooperativeMatrixLoadKHR].operands.push(OperandId, "", true); - InstructionDesc[OpRayQueryGetWorldRayOriginKHR].operands.push(OperandId, "'RayQuery'"); - InstructionDesc[OpRayQueryGetWorldRayOriginKHR].setResultAndType(true, true); - - InstructionDesc[OpRayQueryGetIntersectionObjectToWorldKHR].operands.push(OperandId, "'RayQuery'"); - InstructionDesc[OpRayQueryGetIntersectionObjectToWorldKHR].operands.push(OperandId, "'Committed'"); - InstructionDesc[OpRayQueryGetIntersectionObjectToWorldKHR].setResultAndType(true, true); - - InstructionDesc[OpRayQueryGetIntersectionWorldToObjectKHR].operands.push(OperandId, "'RayQuery'"); - InstructionDesc[OpRayQueryGetIntersectionWorldToObjectKHR].operands.push(OperandId, "'Committed'"); - InstructionDesc[OpRayQueryGetIntersectionWorldToObjectKHR].setResultAndType(true, true); - - InstructionDesc[OpImageSampleFootprintNV].operands.push(OperandId, "'Sampled Image'"); - InstructionDesc[OpImageSampleFootprintNV].operands.push(OperandId, "'Coordinate'"); - InstructionDesc[OpImageSampleFootprintNV].operands.push(OperandId, "'Granularity'"); - InstructionDesc[OpImageSampleFootprintNV].operands.push(OperandId, "'Coarse'"); - InstructionDesc[OpImageSampleFootprintNV].operands.push(OperandImageOperands, "", true); - InstructionDesc[OpImageSampleFootprintNV].operands.push(OperandVariableIds, "", true); - - InstructionDesc[OpWritePackedPrimitiveIndices4x8NV].operands.push(OperandId, "'Index Offset'"); - InstructionDesc[OpWritePackedPrimitiveIndices4x8NV].operands.push(OperandId, "'Packed Indices'"); - - InstructionDesc[OpTypeCooperativeMatrixNV].operands.push(OperandId, "'Component Type'"); - InstructionDesc[OpTypeCooperativeMatrixNV].operands.push(OperandId, "'Scope'"); - InstructionDesc[OpTypeCooperativeMatrixNV].operands.push(OperandId, "'Rows'"); - InstructionDesc[OpTypeCooperativeMatrixNV].operands.push(OperandId, "'Columns'"); - - InstructionDesc[OpCooperativeMatrixLoadNV].operands.push(OperandId, "'Pointer'"); - InstructionDesc[OpCooperativeMatrixLoadNV].operands.push(OperandId, "'Stride'"); - InstructionDesc[OpCooperativeMatrixLoadNV].operands.push(OperandId, "'Column Major'"); - InstructionDesc[OpCooperativeMatrixLoadNV].operands.push(OperandMemoryAccess, "'Memory Access'"); - InstructionDesc[OpCooperativeMatrixLoadNV].operands.push(OperandLiteralNumber, "", true); - InstructionDesc[OpCooperativeMatrixLoadNV].operands.push(OperandId, "", true); + InstructionDesc[OpCooperativeMatrixStoreKHR].operands.push(OperandId, "'Pointer'"); + InstructionDesc[OpCooperativeMatrixStoreKHR].operands.push(OperandId, "'Object'"); + InstructionDesc[OpCooperativeMatrixStoreKHR].operands.push(OperandId, "'Memory Layout'"); + InstructionDesc[OpCooperativeMatrixStoreKHR].operands.push(OperandId, "'Stride'"); + InstructionDesc[OpCooperativeMatrixStoreKHR].operands.push(OperandMemoryAccess, "'Memory Access'"); + InstructionDesc[OpCooperativeMatrixStoreKHR].operands.push(OperandLiteralNumber, "", true); + InstructionDesc[OpCooperativeMatrixStoreKHR].operands.push(OperandId, "", true); - InstructionDesc[OpCooperativeMatrixStoreNV].operands.push(OperandId, "'Pointer'"); - InstructionDesc[OpCooperativeMatrixStoreNV].operands.push(OperandId, "'Object'"); - InstructionDesc[OpCooperativeMatrixStoreNV].operands.push(OperandId, "'Stride'"); - InstructionDesc[OpCooperativeMatrixStoreNV].operands.push(OperandId, "'Column Major'"); - InstructionDesc[OpCooperativeMatrixStoreNV].operands.push(OperandMemoryAccess, "'Memory Access'"); - InstructionDesc[OpCooperativeMatrixStoreNV].operands.push(OperandLiteralNumber, "", true); - InstructionDesc[OpCooperativeMatrixStoreNV].operands.push(OperandId, "", true); + InstructionDesc[OpCooperativeMatrixMulAddKHR].operands.push(OperandId, "'A'"); + InstructionDesc[OpCooperativeMatrixMulAddKHR].operands.push(OperandId, "'B'"); + InstructionDesc[OpCooperativeMatrixMulAddKHR].operands.push(OperandId, "'C'"); + InstructionDesc[OpCooperativeMatrixMulAddKHR].operands.push(OperandCooperativeMatrixOperands, "'Cooperative Matrix Operands'", true); - InstructionDesc[OpCooperativeMatrixMulAddNV].operands.push(OperandId, "'A'"); - InstructionDesc[OpCooperativeMatrixMulAddNV].operands.push(OperandId, "'B'"); - InstructionDesc[OpCooperativeMatrixMulAddNV].operands.push(OperandId, "'C'"); - - InstructionDesc[OpCooperativeMatrixLengthNV].operands.push(OperandId, "'Type'"); - - InstructionDesc[OpDemoteToHelperInvocationEXT].setResultAndType(false, false); - - InstructionDesc[OpReadClockKHR].operands.push(OperandScope, "'Scope'"); + InstructionDesc[OpCooperativeMatrixLengthKHR].operands.push(OperandId, "'Type'"); + + InstructionDesc[OpDemoteToHelperInvocationEXT].setResultAndType(false, false); + + InstructionDesc[OpReadClockKHR].operands.push(OperandScope, "'Scope'"); + + InstructionDesc[OpTypeHitObjectNV].setResultAndType(true, false); + + InstructionDesc[OpHitObjectGetShaderRecordBufferHandleNV].operands.push(OperandId, "'HitObject'"); + InstructionDesc[OpHitObjectGetShaderRecordBufferHandleNV].setResultAndType(true, true); + + InstructionDesc[OpReorderThreadWithHintNV].operands.push(OperandId, "'Hint'"); + InstructionDesc[OpReorderThreadWithHintNV].operands.push(OperandId, "'Bits'"); + InstructionDesc[OpReorderThreadWithHintNV].setResultAndType(false, false); + + InstructionDesc[OpReorderThreadWithHitObjectNV].operands.push(OperandId, "'HitObject'"); + InstructionDesc[OpReorderThreadWithHitObjectNV].operands.push(OperandId, "'Hint'"); + InstructionDesc[OpReorderThreadWithHitObjectNV].operands.push(OperandId, "'Bits'"); + InstructionDesc[OpReorderThreadWithHitObjectNV].setResultAndType(false, false); + + InstructionDesc[OpHitObjectGetCurrentTimeNV].operands.push(OperandId, "'HitObject'"); + InstructionDesc[OpHitObjectGetCurrentTimeNV].setResultAndType(true, true); + + InstructionDesc[OpHitObjectGetHitKindNV].operands.push(OperandId, "'HitObject'"); + InstructionDesc[OpHitObjectGetHitKindNV].setResultAndType(true, true); + + InstructionDesc[OpHitObjectGetPrimitiveIndexNV].operands.push(OperandId, "'HitObject'"); + InstructionDesc[OpHitObjectGetPrimitiveIndexNV].setResultAndType(true, true); + + InstructionDesc[OpHitObjectGetGeometryIndexNV].operands.push(OperandId, "'HitObject'"); + InstructionDesc[OpHitObjectGetGeometryIndexNV].setResultAndType(true, true); + + InstructionDesc[OpHitObjectGetInstanceIdNV].operands.push(OperandId, "'HitObject'"); + InstructionDesc[OpHitObjectGetInstanceIdNV].setResultAndType(true, true); + + InstructionDesc[OpHitObjectGetInstanceCustomIndexNV].operands.push(OperandId, "'HitObject'"); + InstructionDesc[OpHitObjectGetInstanceCustomIndexNV].setResultAndType(true, true); + + InstructionDesc[OpHitObjectGetObjectRayDirectionNV].operands.push(OperandId, "'HitObject'"); + InstructionDesc[OpHitObjectGetObjectRayDirectionNV].setResultAndType(true, true); + + InstructionDesc[OpHitObjectGetObjectRayOriginNV].operands.push(OperandId, "'HitObject'"); + InstructionDesc[OpHitObjectGetObjectRayOriginNV].setResultAndType(true, true); + + InstructionDesc[OpHitObjectGetWorldRayDirectionNV].operands.push(OperandId, "'HitObject'"); + InstructionDesc[OpHitObjectGetWorldRayDirectionNV].setResultAndType(true, true); + + InstructionDesc[OpHitObjectGetWorldRayOriginNV].operands.push(OperandId, "'HitObject'"); + InstructionDesc[OpHitObjectGetWorldRayOriginNV].setResultAndType(true, true); + + InstructionDesc[OpHitObjectGetWorldToObjectNV].operands.push(OperandId, "'HitObject'"); + InstructionDesc[OpHitObjectGetWorldToObjectNV].setResultAndType(true, true); + + InstructionDesc[OpHitObjectGetObjectToWorldNV].operands.push(OperandId, "'HitObject'"); + InstructionDesc[OpHitObjectGetObjectToWorldNV].setResultAndType(true, true); + + InstructionDesc[OpHitObjectGetRayTMaxNV].operands.push(OperandId, "'HitObject'"); + InstructionDesc[OpHitObjectGetRayTMaxNV].setResultAndType(true, true); + + InstructionDesc[OpHitObjectGetRayTMinNV].operands.push(OperandId, "'HitObject'"); + InstructionDesc[OpHitObjectGetRayTMinNV].setResultAndType(true, true); + + InstructionDesc[OpHitObjectGetShaderBindingTableRecordIndexNV].operands.push(OperandId, "'HitObject'"); + InstructionDesc[OpHitObjectGetShaderBindingTableRecordIndexNV].setResultAndType(true, true); + + InstructionDesc[OpHitObjectIsEmptyNV].operands.push(OperandId, "'HitObject'"); + InstructionDesc[OpHitObjectIsEmptyNV].setResultAndType(true, true); + + InstructionDesc[OpHitObjectIsHitNV].operands.push(OperandId, "'HitObject'"); + InstructionDesc[OpHitObjectIsHitNV].setResultAndType(true, true); + + InstructionDesc[OpHitObjectIsMissNV].operands.push(OperandId, "'HitObject'"); + InstructionDesc[OpHitObjectIsMissNV].setResultAndType(true, true); + + InstructionDesc[OpHitObjectGetAttributesNV].operands.push(OperandId, "'HitObject'"); + InstructionDesc[OpHitObjectGetAttributesNV].operands.push(OperandId, "'HitObjectAttribute'"); + InstructionDesc[OpHitObjectGetAttributesNV].setResultAndType(false, false); + + InstructionDesc[OpHitObjectExecuteShaderNV].operands.push(OperandId, "'HitObject'"); + InstructionDesc[OpHitObjectExecuteShaderNV].operands.push(OperandId, "'Payload'"); + InstructionDesc[OpHitObjectExecuteShaderNV].setResultAndType(false, false); + + InstructionDesc[OpHitObjectRecordHitNV].operands.push(OperandId, "'HitObject'"); + InstructionDesc[OpHitObjectRecordHitNV].operands.push(OperandId, "'Acceleration Structure'"); + InstructionDesc[OpHitObjectRecordHitNV].operands.push(OperandId, "'InstanceId'"); + InstructionDesc[OpHitObjectRecordHitNV].operands.push(OperandId, "'PrimitiveId'"); + InstructionDesc[OpHitObjectRecordHitNV].operands.push(OperandId, "'GeometryIndex'"); + InstructionDesc[OpHitObjectRecordHitNV].operands.push(OperandId, "'HitKind'"); + InstructionDesc[OpHitObjectRecordHitNV].operands.push(OperandId, "'SBT Record Offset'"); + InstructionDesc[OpHitObjectRecordHitNV].operands.push(OperandId, "'SBT Record Stride'"); + InstructionDesc[OpHitObjectRecordHitNV].operands.push(OperandId, "'Origin'"); + InstructionDesc[OpHitObjectRecordHitNV].operands.push(OperandId, "'TMin'"); + InstructionDesc[OpHitObjectRecordHitNV].operands.push(OperandId, "'Direction'"); + InstructionDesc[OpHitObjectRecordHitNV].operands.push(OperandId, "'TMax'"); + InstructionDesc[OpHitObjectRecordHitNV].operands.push(OperandId, "'HitObject Attribute'"); + InstructionDesc[OpHitObjectRecordHitNV].setResultAndType(false, false); + + InstructionDesc[OpHitObjectRecordHitMotionNV].operands.push(OperandId, "'HitObject'"); + InstructionDesc[OpHitObjectRecordHitMotionNV].operands.push(OperandId, "'Acceleration Structure'"); + InstructionDesc[OpHitObjectRecordHitMotionNV].operands.push(OperandId, "'InstanceId'"); + InstructionDesc[OpHitObjectRecordHitMotionNV].operands.push(OperandId, "'PrimitiveId'"); + InstructionDesc[OpHitObjectRecordHitMotionNV].operands.push(OperandId, "'GeometryIndex'"); + InstructionDesc[OpHitObjectRecordHitMotionNV].operands.push(OperandId, "'HitKind'"); + InstructionDesc[OpHitObjectRecordHitMotionNV].operands.push(OperandId, "'SBT Record Offset'"); + InstructionDesc[OpHitObjectRecordHitMotionNV].operands.push(OperandId, "'SBT Record Stride'"); + InstructionDesc[OpHitObjectRecordHitMotionNV].operands.push(OperandId, "'Origin'"); + InstructionDesc[OpHitObjectRecordHitMotionNV].operands.push(OperandId, "'TMin'"); + InstructionDesc[OpHitObjectRecordHitMotionNV].operands.push(OperandId, "'Direction'"); + InstructionDesc[OpHitObjectRecordHitMotionNV].operands.push(OperandId, "'TMax'"); + InstructionDesc[OpHitObjectRecordHitMotionNV].operands.push(OperandId, "'Current Time'"); + InstructionDesc[OpHitObjectRecordHitMotionNV].operands.push(OperandId, "'HitObject Attribute'"); + InstructionDesc[OpHitObjectRecordHitMotionNV].setResultAndType(false, false); + + InstructionDesc[OpHitObjectRecordHitWithIndexNV].operands.push(OperandId, "'HitObject'"); + InstructionDesc[OpHitObjectRecordHitWithIndexNV].operands.push(OperandId, "'Acceleration Structure'"); + InstructionDesc[OpHitObjectRecordHitWithIndexNV].operands.push(OperandId, "'InstanceId'"); + InstructionDesc[OpHitObjectRecordHitWithIndexNV].operands.push(OperandId, "'PrimitiveId'"); + InstructionDesc[OpHitObjectRecordHitWithIndexNV].operands.push(OperandId, "'GeometryIndex'"); + InstructionDesc[OpHitObjectRecordHitWithIndexNV].operands.push(OperandId, "'HitKind'"); + InstructionDesc[OpHitObjectRecordHitWithIndexNV].operands.push(OperandId, "'SBT Record Index'"); + InstructionDesc[OpHitObjectRecordHitWithIndexNV].operands.push(OperandId, "'Origin'"); + InstructionDesc[OpHitObjectRecordHitWithIndexNV].operands.push(OperandId, "'TMin'"); + InstructionDesc[OpHitObjectRecordHitWithIndexNV].operands.push(OperandId, "'Direction'"); + InstructionDesc[OpHitObjectRecordHitWithIndexNV].operands.push(OperandId, "'TMax'"); + InstructionDesc[OpHitObjectRecordHitWithIndexNV].operands.push(OperandId, "'HitObject Attribute'"); + InstructionDesc[OpHitObjectRecordHitWithIndexNV].setResultAndType(false, false); + + InstructionDesc[OpHitObjectRecordHitWithIndexMotionNV].operands.push(OperandId, "'HitObject'"); + InstructionDesc[OpHitObjectRecordHitWithIndexMotionNV].operands.push(OperandId, "'Acceleration Structure'"); + InstructionDesc[OpHitObjectRecordHitWithIndexMotionNV].operands.push(OperandId, "'InstanceId'"); + InstructionDesc[OpHitObjectRecordHitWithIndexMotionNV].operands.push(OperandId, "'PrimitiveId'"); + InstructionDesc[OpHitObjectRecordHitWithIndexMotionNV].operands.push(OperandId, "'GeometryIndex'"); + InstructionDesc[OpHitObjectRecordHitWithIndexMotionNV].operands.push(OperandId, "'HitKind'"); + InstructionDesc[OpHitObjectRecordHitWithIndexMotionNV].operands.push(OperandId, "'SBT Record Index'"); + InstructionDesc[OpHitObjectRecordHitWithIndexMotionNV].operands.push(OperandId, "'Origin'"); + InstructionDesc[OpHitObjectRecordHitWithIndexMotionNV].operands.push(OperandId, "'TMin'"); + InstructionDesc[OpHitObjectRecordHitWithIndexMotionNV].operands.push(OperandId, "'Direction'"); + InstructionDesc[OpHitObjectRecordHitWithIndexMotionNV].operands.push(OperandId, "'TMax'"); + InstructionDesc[OpHitObjectRecordHitWithIndexMotionNV].operands.push(OperandId, "'Current Time'"); + InstructionDesc[OpHitObjectRecordHitWithIndexMotionNV].operands.push(OperandId, "'HitObject Attribute'"); + InstructionDesc[OpHitObjectRecordHitWithIndexMotionNV].setResultAndType(false, false); + + InstructionDesc[OpHitObjectRecordMissNV].operands.push(OperandId, "'HitObject'"); + InstructionDesc[OpHitObjectRecordMissNV].operands.push(OperandId, "'SBT Index'"); + InstructionDesc[OpHitObjectRecordMissNV].operands.push(OperandId, "'Origin'"); + InstructionDesc[OpHitObjectRecordMissNV].operands.push(OperandId, "'TMin'"); + InstructionDesc[OpHitObjectRecordMissNV].operands.push(OperandId, "'Direction'"); + InstructionDesc[OpHitObjectRecordMissNV].operands.push(OperandId, "'TMax'"); + InstructionDesc[OpHitObjectRecordMissNV].setResultAndType(false, false); + + InstructionDesc[OpHitObjectRecordMissMotionNV].operands.push(OperandId, "'HitObject'"); + InstructionDesc[OpHitObjectRecordMissMotionNV].operands.push(OperandId, "'SBT Index'"); + InstructionDesc[OpHitObjectRecordMissMotionNV].operands.push(OperandId, "'Origin'"); + InstructionDesc[OpHitObjectRecordMissMotionNV].operands.push(OperandId, "'TMin'"); + InstructionDesc[OpHitObjectRecordMissMotionNV].operands.push(OperandId, "'Direction'"); + InstructionDesc[OpHitObjectRecordMissMotionNV].operands.push(OperandId, "'TMax'"); + InstructionDesc[OpHitObjectRecordMissMotionNV].operands.push(OperandId, "'Current Time'"); + InstructionDesc[OpHitObjectRecordMissMotionNV].setResultAndType(false, false); + + InstructionDesc[OpHitObjectRecordEmptyNV].operands.push(OperandId, "'HitObject'"); + InstructionDesc[OpHitObjectRecordEmptyNV].setResultAndType(false, false); + + InstructionDesc[OpHitObjectTraceRayNV].operands.push(OperandId, "'HitObject'"); + InstructionDesc[OpHitObjectTraceRayNV].operands.push(OperandId, "'Acceleration Structure'"); + InstructionDesc[OpHitObjectTraceRayNV].operands.push(OperandId, "'RayFlags'"); + InstructionDesc[OpHitObjectTraceRayNV].operands.push(OperandId, "'Cullmask'"); + InstructionDesc[OpHitObjectTraceRayNV].operands.push(OperandId, "'SBT Record Offset'"); + InstructionDesc[OpHitObjectTraceRayNV].operands.push(OperandId, "'SBT Record Stride'"); + InstructionDesc[OpHitObjectTraceRayNV].operands.push(OperandId, "'Miss Index'"); + InstructionDesc[OpHitObjectTraceRayNV].operands.push(OperandId, "'Origin'"); + InstructionDesc[OpHitObjectTraceRayNV].operands.push(OperandId, "'TMin'"); + InstructionDesc[OpHitObjectTraceRayNV].operands.push(OperandId, "'Direction'"); + InstructionDesc[OpHitObjectTraceRayNV].operands.push(OperandId, "'TMax'"); + InstructionDesc[OpHitObjectTraceRayNV].operands.push(OperandId, "'Payload'"); + InstructionDesc[OpHitObjectTraceRayNV].setResultAndType(false, false); + + InstructionDesc[OpHitObjectTraceRayMotionNV].operands.push(OperandId, "'HitObject'"); + InstructionDesc[OpHitObjectTraceRayMotionNV].operands.push(OperandId, "'Acceleration Structure'"); + InstructionDesc[OpHitObjectTraceRayMotionNV].operands.push(OperandId, "'RayFlags'"); + InstructionDesc[OpHitObjectTraceRayMotionNV].operands.push(OperandId, "'Cullmask'"); + InstructionDesc[OpHitObjectTraceRayMotionNV].operands.push(OperandId, "'SBT Record Offset'"); + InstructionDesc[OpHitObjectTraceRayMotionNV].operands.push(OperandId, "'SBT Record Stride'"); + InstructionDesc[OpHitObjectTraceRayMotionNV].operands.push(OperandId, "'Miss Index'"); + InstructionDesc[OpHitObjectTraceRayMotionNV].operands.push(OperandId, "'Origin'"); + InstructionDesc[OpHitObjectTraceRayMotionNV].operands.push(OperandId, "'TMin'"); + InstructionDesc[OpHitObjectTraceRayMotionNV].operands.push(OperandId, "'Direction'"); + InstructionDesc[OpHitObjectTraceRayMotionNV].operands.push(OperandId, "'TMax'"); + InstructionDesc[OpHitObjectTraceRayMotionNV].operands.push(OperandId, "'Time'"); + InstructionDesc[OpHitObjectTraceRayMotionNV].operands.push(OperandId, "'Payload'"); + InstructionDesc[OpHitObjectTraceRayMotionNV].setResultAndType(false, false); + + InstructionDesc[OpFetchMicroTriangleVertexBarycentricNV].operands.push(OperandId, "'Acceleration Structure'"); + InstructionDesc[OpFetchMicroTriangleVertexBarycentricNV].operands.push(OperandId, "'Instance ID'"); + InstructionDesc[OpFetchMicroTriangleVertexBarycentricNV].operands.push(OperandId, "'Geometry Index'"); + InstructionDesc[OpFetchMicroTriangleVertexBarycentricNV].operands.push(OperandId, "'Primitive Index'"); + InstructionDesc[OpFetchMicroTriangleVertexBarycentricNV].operands.push(OperandId, "'Barycentrics'"); + InstructionDesc[OpFetchMicroTriangleVertexBarycentricNV].setResultAndType(true, true); + + InstructionDesc[OpFetchMicroTriangleVertexPositionNV].operands.push(OperandId, "'Acceleration Structure'"); + InstructionDesc[OpFetchMicroTriangleVertexPositionNV].operands.push(OperandId, "'Instance ID'"); + InstructionDesc[OpFetchMicroTriangleVertexPositionNV].operands.push(OperandId, "'Geometry Index'"); + InstructionDesc[OpFetchMicroTriangleVertexPositionNV].operands.push(OperandId, "'Primitive Index'"); + InstructionDesc[OpFetchMicroTriangleVertexPositionNV].operands.push(OperandId, "'Barycentrics'"); + InstructionDesc[OpFetchMicroTriangleVertexPositionNV].setResultAndType(true, true); + + InstructionDesc[OpColorAttachmentReadEXT].operands.push(OperandId, "'Attachment'"); + InstructionDesc[OpColorAttachmentReadEXT].operands.push(OperandId, "'Sample'", true); + InstructionDesc[OpStencilAttachmentReadEXT].operands.push(OperandId, "'Sample'", true); + InstructionDesc[OpDepthAttachmentReadEXT].operands.push(OperandId, "'Sample'", true); + + InstructionDesc[OpImageSampleWeightedQCOM].operands.push(OperandId, "'source texture'"); + InstructionDesc[OpImageSampleWeightedQCOM].operands.push(OperandId, "'texture coordinates'"); + InstructionDesc[OpImageSampleWeightedQCOM].operands.push(OperandId, "'weights texture'"); + InstructionDesc[OpImageSampleWeightedQCOM].operands.push(OperandImageOperands, "", true); + InstructionDesc[OpImageSampleWeightedQCOM].setResultAndType(true, true); + + InstructionDesc[OpImageBoxFilterQCOM].operands.push(OperandId, "'source texture'"); + InstructionDesc[OpImageBoxFilterQCOM].operands.push(OperandId, "'texture coordinates'"); + InstructionDesc[OpImageBoxFilterQCOM].operands.push(OperandId, "'box size'"); + InstructionDesc[OpImageBoxFilterQCOM].operands.push(OperandImageOperands, "", true); + InstructionDesc[OpImageBoxFilterQCOM].setResultAndType(true, true); + + InstructionDesc[OpImageBlockMatchSADQCOM].operands.push(OperandId, "'target texture'"); + InstructionDesc[OpImageBlockMatchSADQCOM].operands.push(OperandId, "'target coordinates'"); + InstructionDesc[OpImageBlockMatchSADQCOM].operands.push(OperandId, "'reference texture'"); + InstructionDesc[OpImageBlockMatchSADQCOM].operands.push(OperandId, "'reference coordinates'"); + InstructionDesc[OpImageBlockMatchSADQCOM].operands.push(OperandId, "'block size'"); + InstructionDesc[OpImageBlockMatchSADQCOM].operands.push(OperandImageOperands, "", true); + InstructionDesc[OpImageBlockMatchSADQCOM].setResultAndType(true, true); + + InstructionDesc[OpImageBlockMatchSSDQCOM].operands.push(OperandId, "'target texture'"); + InstructionDesc[OpImageBlockMatchSSDQCOM].operands.push(OperandId, "'target coordinates'"); + InstructionDesc[OpImageBlockMatchSSDQCOM].operands.push(OperandId, "'reference texture'"); + InstructionDesc[OpImageBlockMatchSSDQCOM].operands.push(OperandId, "'reference coordinates'"); + InstructionDesc[OpImageBlockMatchSSDQCOM].operands.push(OperandId, "'block size'"); + InstructionDesc[OpImageBlockMatchSSDQCOM].operands.push(OperandImageOperands, "", true); + InstructionDesc[OpImageBlockMatchSSDQCOM].setResultAndType(true, true); + }); } }; // end spv namespace diff --git a/SPIRV/doc.h b/SPIRV/doc.h index 2a0b28c6b3..b60ad34018 100644 --- a/SPIRV/doc.h +++ b/SPIRV/doc.h @@ -156,6 +156,7 @@ enum OperandClass { OperandKernelEnqueueFlags, OperandKernelProfilingInfo, OperandCapability, + OperandCooperativeMatrixOperands, OperandOpcode, @@ -190,15 +191,15 @@ class OperandParameters { // Parameterize an enumerant class EnumParameters { public: - EnumParameters() : desc(0) { } + EnumParameters() : desc(nullptr) { } const char* desc; }; // Parameterize a set of enumerants that form an enum class EnumDefinition : public EnumParameters { public: - EnumDefinition() : - ceiling(0), bitmask(false), getName(0), enumParams(0), operandParams(0) { } + EnumDefinition() : + ceiling(0), bitmask(false), getName(nullptr), enumParams(nullptr), operandParams(nullptr) { } void set(int ceil, const char* (*name)(int), EnumParameters* ep, bool mask = false) { ceiling = ceil; diff --git a/SPIRV/hex_float.h b/SPIRV/hex_float.h index 8be8e9f7e3..785e8af11f 100644 --- a/SPIRV/hex_float.h +++ b/SPIRV/hex_float.h @@ -23,19 +23,6 @@ #include #include -#if defined(_MSC_VER) && _MSC_VER < 1800 -namespace std { -bool isnan(double f) -{ - return ::_isnan(f) != 0; -} -bool isinf(double f) -{ - return ::_finite(f) == 0; -} -} -#endif - #include "bitutils.h" namespace spvutils { diff --git a/SPIRV/spirv.hpp b/SPIRV/spirv.hpp index 9afd8a90be..02c1eded73 100644 --- a/SPIRV/spirv.hpp +++ b/SPIRV/spirv.hpp @@ -1,2518 +1,2796 @@ -// Copyright (c) 2014-2020 The Khronos Group Inc. -// -// Permission is hereby granted, free of charge, to any person obtaining a copy -// of this software and/or associated documentation files (the "Materials"), -// to deal in the Materials without restriction, including without limitation -// the rights to use, copy, modify, merge, publish, distribute, sublicense, -// and/or sell copies of the Materials, and to permit persons to whom the -// Materials are furnished to do so, subject to the following conditions: -// -// The above copyright notice and this permission notice shall be included in -// all copies or substantial portions of the Materials. -// -// MODIFICATIONS TO THIS FILE MAY MEAN IT NO LONGER ACCURATELY REFLECTS KHRONOS -// STANDARDS. THE UNMODIFIED, NORMATIVE VERSIONS OF KHRONOS SPECIFICATIONS AND -// HEADER INFORMATION ARE LOCATED AT https://www.khronos.org/registry/ -// -// THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS -// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL -// THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING -// FROM,OUT OF OR IN CONNECTION WITH THE MATERIALS OR THE USE OR OTHER DEALINGS -// IN THE MATERIALS. - -// This header is automatically generated by the same tool that creates -// the Binary Section of the SPIR-V specification. - -// Enumeration tokens for SPIR-V, in various styles: -// C, C++, C++11, JSON, Lua, Python, C#, D -// -// - C will have tokens with a "Spv" prefix, e.g.: SpvSourceLanguageGLSL -// - C++ will have tokens in the "spv" name space, e.g.: spv::SourceLanguageGLSL -// - C++11 will use enum classes in the spv namespace, e.g.: spv::SourceLanguage::GLSL -// - Lua will use tables, e.g.: spv.SourceLanguage.GLSL -// - Python will use dictionaries, e.g.: spv['SourceLanguage']['GLSL'] -// - C# will use enum classes in the Specification class located in the "Spv" namespace, -// e.g.: Spv.Specification.SourceLanguage.GLSL -// - D will have tokens under the "spv" module, e.g: spv.SourceLanguage.GLSL -// -// Some tokens act like mask values, which can be OR'd together, -// while others are mutually exclusive. The mask-like ones have -// "Mask" in their name, and a parallel enum that has the shift -// amount (1 << x) for each corresponding enumerant. - -#ifndef spirv_HPP -#define spirv_HPP - -namespace spv { - -typedef unsigned int Id; - -#define SPV_VERSION 0x10600 -#define SPV_REVISION 1 - -static const unsigned int MagicNumber = 0x07230203; -static const unsigned int Version = 0x00010600; -static const unsigned int Revision = 1; -static const unsigned int OpCodeMask = 0xffff; -static const unsigned int WordCountShift = 16; - -enum SourceLanguage { - SourceLanguageUnknown = 0, - SourceLanguageESSL = 1, - SourceLanguageGLSL = 2, - SourceLanguageOpenCL_C = 3, - SourceLanguageOpenCL_CPP = 4, - SourceLanguageHLSL = 5, - SourceLanguageCPP_for_OpenCL = 6, - SourceLanguageMax = 0x7fffffff, -}; - -enum ExecutionModel { - ExecutionModelVertex = 0, - ExecutionModelTessellationControl = 1, - ExecutionModelTessellationEvaluation = 2, - ExecutionModelGeometry = 3, - ExecutionModelFragment = 4, - ExecutionModelGLCompute = 5, - ExecutionModelKernel = 6, - ExecutionModelTaskNV = 5267, - ExecutionModelMeshNV = 5268, - ExecutionModelRayGenerationKHR = 5313, - ExecutionModelRayGenerationNV = 5313, - ExecutionModelIntersectionKHR = 5314, - ExecutionModelIntersectionNV = 5314, - ExecutionModelAnyHitKHR = 5315, - ExecutionModelAnyHitNV = 5315, - ExecutionModelClosestHitKHR = 5316, - ExecutionModelClosestHitNV = 5316, - ExecutionModelMissKHR = 5317, - ExecutionModelMissNV = 5317, - ExecutionModelCallableKHR = 5318, - ExecutionModelCallableNV = 5318, - ExecutionModelMax = 0x7fffffff, -}; - -enum AddressingModel { - AddressingModelLogical = 0, - AddressingModelPhysical32 = 1, - AddressingModelPhysical64 = 2, - AddressingModelPhysicalStorageBuffer64 = 5348, - AddressingModelPhysicalStorageBuffer64EXT = 5348, - AddressingModelMax = 0x7fffffff, -}; - -enum MemoryModel { - MemoryModelSimple = 0, - MemoryModelGLSL450 = 1, - MemoryModelOpenCL = 2, - MemoryModelVulkan = 3, - MemoryModelVulkanKHR = 3, - MemoryModelMax = 0x7fffffff, -}; - -enum ExecutionMode { - ExecutionModeInvocations = 0, - ExecutionModeSpacingEqual = 1, - ExecutionModeSpacingFractionalEven = 2, - ExecutionModeSpacingFractionalOdd = 3, - ExecutionModeVertexOrderCw = 4, - ExecutionModeVertexOrderCcw = 5, - ExecutionModePixelCenterInteger = 6, - ExecutionModeOriginUpperLeft = 7, - ExecutionModeOriginLowerLeft = 8, - ExecutionModeEarlyFragmentTests = 9, - ExecutionModePointMode = 10, - ExecutionModeXfb = 11, - ExecutionModeDepthReplacing = 12, - ExecutionModeDepthGreater = 14, - ExecutionModeDepthLess = 15, - ExecutionModeDepthUnchanged = 16, - ExecutionModeLocalSize = 17, - ExecutionModeLocalSizeHint = 18, - ExecutionModeInputPoints = 19, - ExecutionModeInputLines = 20, - ExecutionModeInputLinesAdjacency = 21, - ExecutionModeTriangles = 22, - ExecutionModeInputTrianglesAdjacency = 23, - ExecutionModeQuads = 24, - ExecutionModeIsolines = 25, - ExecutionModeOutputVertices = 26, - ExecutionModeOutputPoints = 27, - ExecutionModeOutputLineStrip = 28, - ExecutionModeOutputTriangleStrip = 29, - ExecutionModeVecTypeHint = 30, - ExecutionModeContractionOff = 31, - ExecutionModeInitializer = 33, - ExecutionModeFinalizer = 34, - ExecutionModeSubgroupSize = 35, - ExecutionModeSubgroupsPerWorkgroup = 36, - ExecutionModeSubgroupsPerWorkgroupId = 37, - ExecutionModeLocalSizeId = 38, - ExecutionModeLocalSizeHintId = 39, - ExecutionModeSubgroupUniformControlFlowKHR = 4421, - ExecutionModePostDepthCoverage = 4446, - ExecutionModeDenormPreserve = 4459, - ExecutionModeDenormFlushToZero = 4460, - ExecutionModeSignedZeroInfNanPreserve = 4461, - ExecutionModeRoundingModeRTE = 4462, - ExecutionModeRoundingModeRTZ = 4463, - ExecutionModeEarlyAndLateFragmentTestsAMD = 5017, - ExecutionModeStencilRefReplacingEXT = 5027, - ExecutionModeStencilRefUnchangedFrontAMD = 5079, - ExecutionModeStencilRefGreaterFrontAMD = 5080, - ExecutionModeStencilRefLessFrontAMD = 5081, - ExecutionModeStencilRefUnchangedBackAMD = 5082, - ExecutionModeStencilRefGreaterBackAMD = 5083, - ExecutionModeStencilRefLessBackAMD = 5084, - ExecutionModeOutputLinesNV = 5269, - ExecutionModeOutputPrimitivesNV = 5270, - ExecutionModeDerivativeGroupQuadsNV = 5289, - ExecutionModeDerivativeGroupLinearNV = 5290, - ExecutionModeOutputTrianglesNV = 5298, - ExecutionModePixelInterlockOrderedEXT = 5366, - ExecutionModePixelInterlockUnorderedEXT = 5367, - ExecutionModeSampleInterlockOrderedEXT = 5368, - ExecutionModeSampleInterlockUnorderedEXT = 5369, - ExecutionModeShadingRateInterlockOrderedEXT = 5370, - ExecutionModeShadingRateInterlockUnorderedEXT = 5371, - ExecutionModeSharedLocalMemorySizeINTEL = 5618, - ExecutionModeRoundingModeRTPINTEL = 5620, - ExecutionModeRoundingModeRTNINTEL = 5621, - ExecutionModeFloatingPointModeALTINTEL = 5622, - ExecutionModeFloatingPointModeIEEEINTEL = 5623, - ExecutionModeMaxWorkgroupSizeINTEL = 5893, - ExecutionModeMaxWorkDimINTEL = 5894, - ExecutionModeNoGlobalOffsetINTEL = 5895, - ExecutionModeNumSIMDWorkitemsINTEL = 5896, - ExecutionModeSchedulerTargetFmaxMhzINTEL = 5903, - ExecutionModeMax = 0x7fffffff, -}; - -enum StorageClass { - StorageClassUniformConstant = 0, - StorageClassInput = 1, - StorageClassUniform = 2, - StorageClassOutput = 3, - StorageClassWorkgroup = 4, - StorageClassCrossWorkgroup = 5, - StorageClassPrivate = 6, - StorageClassFunction = 7, - StorageClassGeneric = 8, - StorageClassPushConstant = 9, - StorageClassAtomicCounter = 10, - StorageClassImage = 11, - StorageClassStorageBuffer = 12, - StorageClassCallableDataKHR = 5328, - StorageClassCallableDataNV = 5328, - StorageClassIncomingCallableDataKHR = 5329, - StorageClassIncomingCallableDataNV = 5329, - StorageClassRayPayloadKHR = 5338, - StorageClassRayPayloadNV = 5338, - StorageClassHitAttributeKHR = 5339, - StorageClassHitAttributeNV = 5339, - StorageClassIncomingRayPayloadKHR = 5342, - StorageClassIncomingRayPayloadNV = 5342, - StorageClassShaderRecordBufferKHR = 5343, - StorageClassShaderRecordBufferNV = 5343, - StorageClassPhysicalStorageBuffer = 5349, - StorageClassPhysicalStorageBufferEXT = 5349, - StorageClassCodeSectionINTEL = 5605, - StorageClassDeviceOnlyINTEL = 5936, - StorageClassHostOnlyINTEL = 5937, - StorageClassMax = 0x7fffffff, -}; - -enum Dim { - Dim1D = 0, - Dim2D = 1, - Dim3D = 2, - DimCube = 3, - DimRect = 4, - DimBuffer = 5, - DimSubpassData = 6, - DimMax = 0x7fffffff, -}; - -enum SamplerAddressingMode { - SamplerAddressingModeNone = 0, - SamplerAddressingModeClampToEdge = 1, - SamplerAddressingModeClamp = 2, - SamplerAddressingModeRepeat = 3, - SamplerAddressingModeRepeatMirrored = 4, - SamplerAddressingModeMax = 0x7fffffff, -}; - -enum SamplerFilterMode { - SamplerFilterModeNearest = 0, - SamplerFilterModeLinear = 1, - SamplerFilterModeMax = 0x7fffffff, -}; - -enum ImageFormat { - ImageFormatUnknown = 0, - ImageFormatRgba32f = 1, - ImageFormatRgba16f = 2, - ImageFormatR32f = 3, - ImageFormatRgba8 = 4, - ImageFormatRgba8Snorm = 5, - ImageFormatRg32f = 6, - ImageFormatRg16f = 7, - ImageFormatR11fG11fB10f = 8, - ImageFormatR16f = 9, - ImageFormatRgba16 = 10, - ImageFormatRgb10A2 = 11, - ImageFormatRg16 = 12, - ImageFormatRg8 = 13, - ImageFormatR16 = 14, - ImageFormatR8 = 15, - ImageFormatRgba16Snorm = 16, - ImageFormatRg16Snorm = 17, - ImageFormatRg8Snorm = 18, - ImageFormatR16Snorm = 19, - ImageFormatR8Snorm = 20, - ImageFormatRgba32i = 21, - ImageFormatRgba16i = 22, - ImageFormatRgba8i = 23, - ImageFormatR32i = 24, - ImageFormatRg32i = 25, - ImageFormatRg16i = 26, - ImageFormatRg8i = 27, - ImageFormatR16i = 28, - ImageFormatR8i = 29, - ImageFormatRgba32ui = 30, - ImageFormatRgba16ui = 31, - ImageFormatRgba8ui = 32, - ImageFormatR32ui = 33, - ImageFormatRgb10a2ui = 34, - ImageFormatRg32ui = 35, - ImageFormatRg16ui = 36, - ImageFormatRg8ui = 37, - ImageFormatR16ui = 38, - ImageFormatR8ui = 39, - ImageFormatR64ui = 40, - ImageFormatR64i = 41, - ImageFormatMax = 0x7fffffff, -}; - -enum ImageChannelOrder { - ImageChannelOrderR = 0, - ImageChannelOrderA = 1, - ImageChannelOrderRG = 2, - ImageChannelOrderRA = 3, - ImageChannelOrderRGB = 4, - ImageChannelOrderRGBA = 5, - ImageChannelOrderBGRA = 6, - ImageChannelOrderARGB = 7, - ImageChannelOrderIntensity = 8, - ImageChannelOrderLuminance = 9, - ImageChannelOrderRx = 10, - ImageChannelOrderRGx = 11, - ImageChannelOrderRGBx = 12, - ImageChannelOrderDepth = 13, - ImageChannelOrderDepthStencil = 14, - ImageChannelOrdersRGB = 15, - ImageChannelOrdersRGBx = 16, - ImageChannelOrdersRGBA = 17, - ImageChannelOrdersBGRA = 18, - ImageChannelOrderABGR = 19, - ImageChannelOrderMax = 0x7fffffff, -}; - -enum ImageChannelDataType { - ImageChannelDataTypeSnormInt8 = 0, - ImageChannelDataTypeSnormInt16 = 1, - ImageChannelDataTypeUnormInt8 = 2, - ImageChannelDataTypeUnormInt16 = 3, - ImageChannelDataTypeUnormShort565 = 4, - ImageChannelDataTypeUnormShort555 = 5, - ImageChannelDataTypeUnormInt101010 = 6, - ImageChannelDataTypeSignedInt8 = 7, - ImageChannelDataTypeSignedInt16 = 8, - ImageChannelDataTypeSignedInt32 = 9, - ImageChannelDataTypeUnsignedInt8 = 10, - ImageChannelDataTypeUnsignedInt16 = 11, - ImageChannelDataTypeUnsignedInt32 = 12, - ImageChannelDataTypeHalfFloat = 13, - ImageChannelDataTypeFloat = 14, - ImageChannelDataTypeUnormInt24 = 15, - ImageChannelDataTypeUnormInt101010_2 = 16, - ImageChannelDataTypeMax = 0x7fffffff, -}; - -enum ImageOperandsShift { - ImageOperandsBiasShift = 0, - ImageOperandsLodShift = 1, - ImageOperandsGradShift = 2, - ImageOperandsConstOffsetShift = 3, - ImageOperandsOffsetShift = 4, - ImageOperandsConstOffsetsShift = 5, - ImageOperandsSampleShift = 6, - ImageOperandsMinLodShift = 7, - ImageOperandsMakeTexelAvailableShift = 8, - ImageOperandsMakeTexelAvailableKHRShift = 8, - ImageOperandsMakeTexelVisibleShift = 9, - ImageOperandsMakeTexelVisibleKHRShift = 9, - ImageOperandsNonPrivateTexelShift = 10, - ImageOperandsNonPrivateTexelKHRShift = 10, - ImageOperandsVolatileTexelShift = 11, - ImageOperandsVolatileTexelKHRShift = 11, - ImageOperandsSignExtendShift = 12, - ImageOperandsZeroExtendShift = 13, - ImageOperandsNontemporalShift = 14, - ImageOperandsOffsetsShift = 16, - ImageOperandsMax = 0x7fffffff, -}; - -enum ImageOperandsMask { - ImageOperandsMaskNone = 0, - ImageOperandsBiasMask = 0x00000001, - ImageOperandsLodMask = 0x00000002, - ImageOperandsGradMask = 0x00000004, - ImageOperandsConstOffsetMask = 0x00000008, - ImageOperandsOffsetMask = 0x00000010, - ImageOperandsConstOffsetsMask = 0x00000020, - ImageOperandsSampleMask = 0x00000040, - ImageOperandsMinLodMask = 0x00000080, - ImageOperandsMakeTexelAvailableMask = 0x00000100, - ImageOperandsMakeTexelAvailableKHRMask = 0x00000100, - ImageOperandsMakeTexelVisibleMask = 0x00000200, - ImageOperandsMakeTexelVisibleKHRMask = 0x00000200, - ImageOperandsNonPrivateTexelMask = 0x00000400, - ImageOperandsNonPrivateTexelKHRMask = 0x00000400, - ImageOperandsVolatileTexelMask = 0x00000800, - ImageOperandsVolatileTexelKHRMask = 0x00000800, - ImageOperandsSignExtendMask = 0x00001000, - ImageOperandsZeroExtendMask = 0x00002000, - ImageOperandsNontemporalMask = 0x00004000, - ImageOperandsOffsetsMask = 0x00010000, -}; - -enum FPFastMathModeShift { - FPFastMathModeNotNaNShift = 0, - FPFastMathModeNotInfShift = 1, - FPFastMathModeNSZShift = 2, - FPFastMathModeAllowRecipShift = 3, - FPFastMathModeFastShift = 4, - FPFastMathModeAllowContractFastINTELShift = 16, - FPFastMathModeAllowReassocINTELShift = 17, - FPFastMathModeMax = 0x7fffffff, -}; - -enum FPFastMathModeMask { - FPFastMathModeMaskNone = 0, - FPFastMathModeNotNaNMask = 0x00000001, - FPFastMathModeNotInfMask = 0x00000002, - FPFastMathModeNSZMask = 0x00000004, - FPFastMathModeAllowRecipMask = 0x00000008, - FPFastMathModeFastMask = 0x00000010, - FPFastMathModeAllowContractFastINTELMask = 0x00010000, - FPFastMathModeAllowReassocINTELMask = 0x00020000, -}; - -enum FPRoundingMode { - FPRoundingModeRTE = 0, - FPRoundingModeRTZ = 1, - FPRoundingModeRTP = 2, - FPRoundingModeRTN = 3, - FPRoundingModeMax = 0x7fffffff, -}; - -enum LinkageType { - LinkageTypeExport = 0, - LinkageTypeImport = 1, - LinkageTypeLinkOnceODR = 2, - LinkageTypeMax = 0x7fffffff, -}; - -enum AccessQualifier { - AccessQualifierReadOnly = 0, - AccessQualifierWriteOnly = 1, - AccessQualifierReadWrite = 2, - AccessQualifierMax = 0x7fffffff, -}; - -enum FunctionParameterAttribute { - FunctionParameterAttributeZext = 0, - FunctionParameterAttributeSext = 1, - FunctionParameterAttributeByVal = 2, - FunctionParameterAttributeSret = 3, - FunctionParameterAttributeNoAlias = 4, - FunctionParameterAttributeNoCapture = 5, - FunctionParameterAttributeNoWrite = 6, - FunctionParameterAttributeNoReadWrite = 7, - FunctionParameterAttributeMax = 0x7fffffff, -}; - -enum Decoration { - DecorationRelaxedPrecision = 0, - DecorationSpecId = 1, - DecorationBlock = 2, - DecorationBufferBlock = 3, - DecorationRowMajor = 4, - DecorationColMajor = 5, - DecorationArrayStride = 6, - DecorationMatrixStride = 7, - DecorationGLSLShared = 8, - DecorationGLSLPacked = 9, - DecorationCPacked = 10, - DecorationBuiltIn = 11, - DecorationNoPerspective = 13, - DecorationFlat = 14, - DecorationPatch = 15, - DecorationCentroid = 16, - DecorationSample = 17, - DecorationInvariant = 18, - DecorationRestrict = 19, - DecorationAliased = 20, - DecorationVolatile = 21, - DecorationConstant = 22, - DecorationCoherent = 23, - DecorationNonWritable = 24, - DecorationNonReadable = 25, - DecorationUniform = 26, - DecorationUniformId = 27, - DecorationSaturatedConversion = 28, - DecorationStream = 29, - DecorationLocation = 30, - DecorationComponent = 31, - DecorationIndex = 32, - DecorationBinding = 33, - DecorationDescriptorSet = 34, - DecorationOffset = 35, - DecorationXfbBuffer = 36, - DecorationXfbStride = 37, - DecorationFuncParamAttr = 38, - DecorationFPRoundingMode = 39, - DecorationFPFastMathMode = 40, - DecorationLinkageAttributes = 41, - DecorationNoContraction = 42, - DecorationInputAttachmentIndex = 43, - DecorationAlignment = 44, - DecorationMaxByteOffset = 45, - DecorationAlignmentId = 46, - DecorationMaxByteOffsetId = 47, - DecorationNoSignedWrap = 4469, - DecorationNoUnsignedWrap = 4470, - DecorationExplicitInterpAMD = 4999, - DecorationOverrideCoverageNV = 5248, - DecorationPassthroughNV = 5250, - DecorationViewportRelativeNV = 5252, - DecorationSecondaryViewportRelativeNV = 5256, - DecorationPerPrimitiveNV = 5271, - DecorationPerViewNV = 5272, - DecorationPerTaskNV = 5273, - DecorationPerVertexKHR = 5285, - DecorationPerVertexNV = 5285, - DecorationNonUniform = 5300, - DecorationNonUniformEXT = 5300, - DecorationRestrictPointer = 5355, - DecorationRestrictPointerEXT = 5355, - DecorationAliasedPointer = 5356, - DecorationAliasedPointerEXT = 5356, - DecorationBindlessSamplerNV = 5398, - DecorationBindlessImageNV = 5399, - DecorationBoundSamplerNV = 5400, - DecorationBoundImageNV = 5401, - DecorationSIMTCallINTEL = 5599, - DecorationReferencedIndirectlyINTEL = 5602, - DecorationClobberINTEL = 5607, - DecorationSideEffectsINTEL = 5608, - DecorationVectorComputeVariableINTEL = 5624, - DecorationFuncParamIOKindINTEL = 5625, - DecorationVectorComputeFunctionINTEL = 5626, - DecorationStackCallINTEL = 5627, - DecorationGlobalVariableOffsetINTEL = 5628, - DecorationCounterBuffer = 5634, - DecorationHlslCounterBufferGOOGLE = 5634, - DecorationHlslSemanticGOOGLE = 5635, - DecorationUserSemantic = 5635, - DecorationUserTypeGOOGLE = 5636, - DecorationFunctionRoundingModeINTEL = 5822, - DecorationFunctionDenormModeINTEL = 5823, - DecorationRegisterINTEL = 5825, - DecorationMemoryINTEL = 5826, - DecorationNumbanksINTEL = 5827, - DecorationBankwidthINTEL = 5828, - DecorationMaxPrivateCopiesINTEL = 5829, - DecorationSinglepumpINTEL = 5830, - DecorationDoublepumpINTEL = 5831, - DecorationMaxReplicatesINTEL = 5832, - DecorationSimpleDualPortINTEL = 5833, - DecorationMergeINTEL = 5834, - DecorationBankBitsINTEL = 5835, - DecorationForcePow2DepthINTEL = 5836, - DecorationBurstCoalesceINTEL = 5899, - DecorationCacheSizeINTEL = 5900, - DecorationDontStaticallyCoalesceINTEL = 5901, - DecorationPrefetchINTEL = 5902, - DecorationStallEnableINTEL = 5905, - DecorationFuseLoopsInFunctionINTEL = 5907, - DecorationBufferLocationINTEL = 5921, - DecorationIOPipeStorageINTEL = 5944, - DecorationFunctionFloatingPointModeINTEL = 6080, - DecorationSingleElementVectorINTEL = 6085, - DecorationVectorComputeCallableFunctionINTEL = 6087, - DecorationMediaBlockIOINTEL = 6140, - DecorationMax = 0x7fffffff, -}; - -enum BuiltIn { - BuiltInPosition = 0, - BuiltInPointSize = 1, - BuiltInClipDistance = 3, - BuiltInCullDistance = 4, - BuiltInVertexId = 5, - BuiltInInstanceId = 6, - BuiltInPrimitiveId = 7, - BuiltInInvocationId = 8, - BuiltInLayer = 9, - BuiltInViewportIndex = 10, - BuiltInTessLevelOuter = 11, - BuiltInTessLevelInner = 12, - BuiltInTessCoord = 13, - BuiltInPatchVertices = 14, - BuiltInFragCoord = 15, - BuiltInPointCoord = 16, - BuiltInFrontFacing = 17, - BuiltInSampleId = 18, - BuiltInSamplePosition = 19, - BuiltInSampleMask = 20, - BuiltInFragDepth = 22, - BuiltInHelperInvocation = 23, - BuiltInNumWorkgroups = 24, - BuiltInWorkgroupSize = 25, - BuiltInWorkgroupId = 26, - BuiltInLocalInvocationId = 27, - BuiltInGlobalInvocationId = 28, - BuiltInLocalInvocationIndex = 29, - BuiltInWorkDim = 30, - BuiltInGlobalSize = 31, - BuiltInEnqueuedWorkgroupSize = 32, - BuiltInGlobalOffset = 33, - BuiltInGlobalLinearId = 34, - BuiltInSubgroupSize = 36, - BuiltInSubgroupMaxSize = 37, - BuiltInNumSubgroups = 38, - BuiltInNumEnqueuedSubgroups = 39, - BuiltInSubgroupId = 40, - BuiltInSubgroupLocalInvocationId = 41, - BuiltInVertexIndex = 42, - BuiltInInstanceIndex = 43, - BuiltInSubgroupEqMask = 4416, - BuiltInSubgroupEqMaskKHR = 4416, - BuiltInSubgroupGeMask = 4417, - BuiltInSubgroupGeMaskKHR = 4417, - BuiltInSubgroupGtMask = 4418, - BuiltInSubgroupGtMaskKHR = 4418, - BuiltInSubgroupLeMask = 4419, - BuiltInSubgroupLeMaskKHR = 4419, - BuiltInSubgroupLtMask = 4420, - BuiltInSubgroupLtMaskKHR = 4420, - BuiltInBaseVertex = 4424, - BuiltInBaseInstance = 4425, - BuiltInDrawIndex = 4426, - BuiltInPrimitiveShadingRateKHR = 4432, - BuiltInDeviceIndex = 4438, - BuiltInViewIndex = 4440, - BuiltInShadingRateKHR = 4444, - BuiltInBaryCoordNoPerspAMD = 4992, - BuiltInBaryCoordNoPerspCentroidAMD = 4993, - BuiltInBaryCoordNoPerspSampleAMD = 4994, - BuiltInBaryCoordSmoothAMD = 4995, - BuiltInBaryCoordSmoothCentroidAMD = 4996, - BuiltInBaryCoordSmoothSampleAMD = 4997, - BuiltInBaryCoordPullModelAMD = 4998, - BuiltInFragStencilRefEXT = 5014, - BuiltInViewportMaskNV = 5253, - BuiltInSecondaryPositionNV = 5257, - BuiltInSecondaryViewportMaskNV = 5258, - BuiltInPositionPerViewNV = 5261, - BuiltInViewportMaskPerViewNV = 5262, - BuiltInFullyCoveredEXT = 5264, - BuiltInTaskCountNV = 5274, - BuiltInPrimitiveCountNV = 5275, - BuiltInPrimitiveIndicesNV = 5276, - BuiltInClipDistancePerViewNV = 5277, - BuiltInCullDistancePerViewNV = 5278, - BuiltInLayerPerViewNV = 5279, - BuiltInMeshViewCountNV = 5280, - BuiltInMeshViewIndicesNV = 5281, - BuiltInBaryCoordKHR = 5286, - BuiltInBaryCoordNV = 5286, - BuiltInBaryCoordNoPerspKHR = 5287, - BuiltInBaryCoordNoPerspNV = 5287, - BuiltInFragSizeEXT = 5292, - BuiltInFragmentSizeNV = 5292, - BuiltInFragInvocationCountEXT = 5293, - BuiltInInvocationsPerPixelNV = 5293, - BuiltInLaunchIdKHR = 5319, - BuiltInLaunchIdNV = 5319, - BuiltInLaunchSizeKHR = 5320, - BuiltInLaunchSizeNV = 5320, - BuiltInWorldRayOriginKHR = 5321, - BuiltInWorldRayOriginNV = 5321, - BuiltInWorldRayDirectionKHR = 5322, - BuiltInWorldRayDirectionNV = 5322, - BuiltInObjectRayOriginKHR = 5323, - BuiltInObjectRayOriginNV = 5323, - BuiltInObjectRayDirectionKHR = 5324, - BuiltInObjectRayDirectionNV = 5324, - BuiltInRayTminKHR = 5325, - BuiltInRayTminNV = 5325, - BuiltInRayTmaxKHR = 5326, - BuiltInRayTmaxNV = 5326, - BuiltInInstanceCustomIndexKHR = 5327, - BuiltInInstanceCustomIndexNV = 5327, - BuiltInObjectToWorldKHR = 5330, - BuiltInObjectToWorldNV = 5330, - BuiltInWorldToObjectKHR = 5331, - BuiltInWorldToObjectNV = 5331, - BuiltInHitTNV = 5332, - BuiltInHitKindKHR = 5333, - BuiltInHitKindNV = 5333, - BuiltInCurrentRayTimeNV = 5334, - BuiltInIncomingRayFlagsKHR = 5351, - BuiltInIncomingRayFlagsNV = 5351, - BuiltInRayGeometryIndexKHR = 5352, - BuiltInWarpsPerSMNV = 5374, - BuiltInSMCountNV = 5375, - BuiltInWarpIDNV = 5376, - BuiltInSMIDNV = 5377, - BuiltInCullMaskKHR = 6021, - BuiltInMax = 0x7fffffff, -}; - -enum SelectionControlShift { - SelectionControlFlattenShift = 0, - SelectionControlDontFlattenShift = 1, - SelectionControlMax = 0x7fffffff, -}; - -enum SelectionControlMask { - SelectionControlMaskNone = 0, - SelectionControlFlattenMask = 0x00000001, - SelectionControlDontFlattenMask = 0x00000002, -}; - -enum LoopControlShift { - LoopControlUnrollShift = 0, - LoopControlDontUnrollShift = 1, - LoopControlDependencyInfiniteShift = 2, - LoopControlDependencyLengthShift = 3, - LoopControlMinIterationsShift = 4, - LoopControlMaxIterationsShift = 5, - LoopControlIterationMultipleShift = 6, - LoopControlPeelCountShift = 7, - LoopControlPartialCountShift = 8, - LoopControlInitiationIntervalINTELShift = 16, - LoopControlMaxConcurrencyINTELShift = 17, - LoopControlDependencyArrayINTELShift = 18, - LoopControlPipelineEnableINTELShift = 19, - LoopControlLoopCoalesceINTELShift = 20, - LoopControlMaxInterleavingINTELShift = 21, - LoopControlSpeculatedIterationsINTELShift = 22, - LoopControlNoFusionINTELShift = 23, - LoopControlMax = 0x7fffffff, -}; - -enum LoopControlMask { - LoopControlMaskNone = 0, - LoopControlUnrollMask = 0x00000001, - LoopControlDontUnrollMask = 0x00000002, - LoopControlDependencyInfiniteMask = 0x00000004, - LoopControlDependencyLengthMask = 0x00000008, - LoopControlMinIterationsMask = 0x00000010, - LoopControlMaxIterationsMask = 0x00000020, - LoopControlIterationMultipleMask = 0x00000040, - LoopControlPeelCountMask = 0x00000080, - LoopControlPartialCountMask = 0x00000100, - LoopControlInitiationIntervalINTELMask = 0x00010000, - LoopControlMaxConcurrencyINTELMask = 0x00020000, - LoopControlDependencyArrayINTELMask = 0x00040000, - LoopControlPipelineEnableINTELMask = 0x00080000, - LoopControlLoopCoalesceINTELMask = 0x00100000, - LoopControlMaxInterleavingINTELMask = 0x00200000, - LoopControlSpeculatedIterationsINTELMask = 0x00400000, - LoopControlNoFusionINTELMask = 0x00800000, -}; - -enum FunctionControlShift { - FunctionControlInlineShift = 0, - FunctionControlDontInlineShift = 1, - FunctionControlPureShift = 2, - FunctionControlConstShift = 3, - FunctionControlOptNoneINTELShift = 16, - FunctionControlMax = 0x7fffffff, -}; - -enum FunctionControlMask { - FunctionControlMaskNone = 0, - FunctionControlInlineMask = 0x00000001, - FunctionControlDontInlineMask = 0x00000002, - FunctionControlPureMask = 0x00000004, - FunctionControlConstMask = 0x00000008, - FunctionControlOptNoneINTELMask = 0x00010000, -}; - -enum MemorySemanticsShift { - MemorySemanticsAcquireShift = 1, - MemorySemanticsReleaseShift = 2, - MemorySemanticsAcquireReleaseShift = 3, - MemorySemanticsSequentiallyConsistentShift = 4, - MemorySemanticsUniformMemoryShift = 6, - MemorySemanticsSubgroupMemoryShift = 7, - MemorySemanticsWorkgroupMemoryShift = 8, - MemorySemanticsCrossWorkgroupMemoryShift = 9, - MemorySemanticsAtomicCounterMemoryShift = 10, - MemorySemanticsImageMemoryShift = 11, - MemorySemanticsOutputMemoryShift = 12, - MemorySemanticsOutputMemoryKHRShift = 12, - MemorySemanticsMakeAvailableShift = 13, - MemorySemanticsMakeAvailableKHRShift = 13, - MemorySemanticsMakeVisibleShift = 14, - MemorySemanticsMakeVisibleKHRShift = 14, - MemorySemanticsVolatileShift = 15, - MemorySemanticsMax = 0x7fffffff, -}; - -enum MemorySemanticsMask { - MemorySemanticsMaskNone = 0, - MemorySemanticsAcquireMask = 0x00000002, - MemorySemanticsReleaseMask = 0x00000004, - MemorySemanticsAcquireReleaseMask = 0x00000008, - MemorySemanticsSequentiallyConsistentMask = 0x00000010, - MemorySemanticsUniformMemoryMask = 0x00000040, - MemorySemanticsSubgroupMemoryMask = 0x00000080, - MemorySemanticsWorkgroupMemoryMask = 0x00000100, - MemorySemanticsCrossWorkgroupMemoryMask = 0x00000200, - MemorySemanticsAtomicCounterMemoryMask = 0x00000400, - MemorySemanticsImageMemoryMask = 0x00000800, - MemorySemanticsOutputMemoryMask = 0x00001000, - MemorySemanticsOutputMemoryKHRMask = 0x00001000, - MemorySemanticsMakeAvailableMask = 0x00002000, - MemorySemanticsMakeAvailableKHRMask = 0x00002000, - MemorySemanticsMakeVisibleMask = 0x00004000, - MemorySemanticsMakeVisibleKHRMask = 0x00004000, - MemorySemanticsVolatileMask = 0x00008000, -}; - -enum MemoryAccessShift { - MemoryAccessVolatileShift = 0, - MemoryAccessAlignedShift = 1, - MemoryAccessNontemporalShift = 2, - MemoryAccessMakePointerAvailableShift = 3, - MemoryAccessMakePointerAvailableKHRShift = 3, - MemoryAccessMakePointerVisibleShift = 4, - MemoryAccessMakePointerVisibleKHRShift = 4, - MemoryAccessNonPrivatePointerShift = 5, - MemoryAccessNonPrivatePointerKHRShift = 5, - MemoryAccessMax = 0x7fffffff, -}; - -enum MemoryAccessMask { - MemoryAccessMaskNone = 0, - MemoryAccessVolatileMask = 0x00000001, - MemoryAccessAlignedMask = 0x00000002, - MemoryAccessNontemporalMask = 0x00000004, - MemoryAccessMakePointerAvailableMask = 0x00000008, - MemoryAccessMakePointerAvailableKHRMask = 0x00000008, - MemoryAccessMakePointerVisibleMask = 0x00000010, - MemoryAccessMakePointerVisibleKHRMask = 0x00000010, - MemoryAccessNonPrivatePointerMask = 0x00000020, - MemoryAccessNonPrivatePointerKHRMask = 0x00000020, -}; - -enum Scope { - ScopeCrossDevice = 0, - ScopeDevice = 1, - ScopeWorkgroup = 2, - ScopeSubgroup = 3, - ScopeInvocation = 4, - ScopeQueueFamily = 5, - ScopeQueueFamilyKHR = 5, - ScopeShaderCallKHR = 6, - ScopeMax = 0x7fffffff, -}; - -enum GroupOperation { - GroupOperationReduce = 0, - GroupOperationInclusiveScan = 1, - GroupOperationExclusiveScan = 2, - GroupOperationClusteredReduce = 3, - GroupOperationPartitionedReduceNV = 6, - GroupOperationPartitionedInclusiveScanNV = 7, - GroupOperationPartitionedExclusiveScanNV = 8, - GroupOperationMax = 0x7fffffff, -}; - -enum KernelEnqueueFlags { - KernelEnqueueFlagsNoWait = 0, - KernelEnqueueFlagsWaitKernel = 1, - KernelEnqueueFlagsWaitWorkGroup = 2, - KernelEnqueueFlagsMax = 0x7fffffff, -}; - -enum KernelProfilingInfoShift { - KernelProfilingInfoCmdExecTimeShift = 0, - KernelProfilingInfoMax = 0x7fffffff, -}; - -enum KernelProfilingInfoMask { - KernelProfilingInfoMaskNone = 0, - KernelProfilingInfoCmdExecTimeMask = 0x00000001, -}; - -enum Capability { - CapabilityMatrix = 0, - CapabilityShader = 1, - CapabilityGeometry = 2, - CapabilityTessellation = 3, - CapabilityAddresses = 4, - CapabilityLinkage = 5, - CapabilityKernel = 6, - CapabilityVector16 = 7, - CapabilityFloat16Buffer = 8, - CapabilityFloat16 = 9, - CapabilityFloat64 = 10, - CapabilityInt64 = 11, - CapabilityInt64Atomics = 12, - CapabilityImageBasic = 13, - CapabilityImageReadWrite = 14, - CapabilityImageMipmap = 15, - CapabilityPipes = 17, - CapabilityGroups = 18, - CapabilityDeviceEnqueue = 19, - CapabilityLiteralSampler = 20, - CapabilityAtomicStorage = 21, - CapabilityInt16 = 22, - CapabilityTessellationPointSize = 23, - CapabilityGeometryPointSize = 24, - CapabilityImageGatherExtended = 25, - CapabilityStorageImageMultisample = 27, - CapabilityUniformBufferArrayDynamicIndexing = 28, - CapabilitySampledImageArrayDynamicIndexing = 29, - CapabilityStorageBufferArrayDynamicIndexing = 30, - CapabilityStorageImageArrayDynamicIndexing = 31, - CapabilityClipDistance = 32, - CapabilityCullDistance = 33, - CapabilityImageCubeArray = 34, - CapabilitySampleRateShading = 35, - CapabilityImageRect = 36, - CapabilitySampledRect = 37, - CapabilityGenericPointer = 38, - CapabilityInt8 = 39, - CapabilityInputAttachment = 40, - CapabilitySparseResidency = 41, - CapabilityMinLod = 42, - CapabilitySampled1D = 43, - CapabilityImage1D = 44, - CapabilitySampledCubeArray = 45, - CapabilitySampledBuffer = 46, - CapabilityImageBuffer = 47, - CapabilityImageMSArray = 48, - CapabilityStorageImageExtendedFormats = 49, - CapabilityImageQuery = 50, - CapabilityDerivativeControl = 51, - CapabilityInterpolationFunction = 52, - CapabilityTransformFeedback = 53, - CapabilityGeometryStreams = 54, - CapabilityStorageImageReadWithoutFormat = 55, - CapabilityStorageImageWriteWithoutFormat = 56, - CapabilityMultiViewport = 57, - CapabilitySubgroupDispatch = 58, - CapabilityNamedBarrier = 59, - CapabilityPipeStorage = 60, - CapabilityGroupNonUniform = 61, - CapabilityGroupNonUniformVote = 62, - CapabilityGroupNonUniformArithmetic = 63, - CapabilityGroupNonUniformBallot = 64, - CapabilityGroupNonUniformShuffle = 65, - CapabilityGroupNonUniformShuffleRelative = 66, - CapabilityGroupNonUniformClustered = 67, - CapabilityGroupNonUniformQuad = 68, - CapabilityShaderLayer = 69, - CapabilityShaderViewportIndex = 70, - CapabilityUniformDecoration = 71, - CapabilityFragmentShadingRateKHR = 4422, - CapabilitySubgroupBallotKHR = 4423, - CapabilityDrawParameters = 4427, - CapabilityWorkgroupMemoryExplicitLayoutKHR = 4428, - CapabilityWorkgroupMemoryExplicitLayout8BitAccessKHR = 4429, - CapabilityWorkgroupMemoryExplicitLayout16BitAccessKHR = 4430, - CapabilitySubgroupVoteKHR = 4431, - CapabilityStorageBuffer16BitAccess = 4433, - CapabilityStorageUniformBufferBlock16 = 4433, - CapabilityStorageUniform16 = 4434, - CapabilityUniformAndStorageBuffer16BitAccess = 4434, - CapabilityStoragePushConstant16 = 4435, - CapabilityStorageInputOutput16 = 4436, - CapabilityDeviceGroup = 4437, - CapabilityMultiView = 4439, - CapabilityVariablePointersStorageBuffer = 4441, - CapabilityVariablePointers = 4442, - CapabilityAtomicStorageOps = 4445, - CapabilitySampleMaskPostDepthCoverage = 4447, - CapabilityStorageBuffer8BitAccess = 4448, - CapabilityUniformAndStorageBuffer8BitAccess = 4449, - CapabilityStoragePushConstant8 = 4450, - CapabilityDenormPreserve = 4464, - CapabilityDenormFlushToZero = 4465, - CapabilitySignedZeroInfNanPreserve = 4466, - CapabilityRoundingModeRTE = 4467, - CapabilityRoundingModeRTZ = 4468, - CapabilityRayQueryProvisionalKHR = 4471, - CapabilityRayQueryKHR = 4472, - CapabilityRayTraversalPrimitiveCullingKHR = 4478, - CapabilityRayTracingKHR = 4479, - CapabilityFloat16ImageAMD = 5008, - CapabilityImageGatherBiasLodAMD = 5009, - CapabilityFragmentMaskAMD = 5010, - CapabilityStencilExportEXT = 5013, - CapabilityImageReadWriteLodAMD = 5015, - CapabilityInt64ImageEXT = 5016, - CapabilityShaderClockKHR = 5055, - CapabilitySampleMaskOverrideCoverageNV = 5249, - CapabilityGeometryShaderPassthroughNV = 5251, - CapabilityShaderViewportIndexLayerEXT = 5254, - CapabilityShaderViewportIndexLayerNV = 5254, - CapabilityShaderViewportMaskNV = 5255, - CapabilityShaderStereoViewNV = 5259, - CapabilityPerViewAttributesNV = 5260, - CapabilityFragmentFullyCoveredEXT = 5265, - CapabilityMeshShadingNV = 5266, - CapabilityImageFootprintNV = 5282, - CapabilityFragmentBarycentricKHR = 5284, - CapabilityFragmentBarycentricNV = 5284, - CapabilityComputeDerivativeGroupQuadsNV = 5288, - CapabilityFragmentDensityEXT = 5291, - CapabilityShadingRateNV = 5291, - CapabilityGroupNonUniformPartitionedNV = 5297, - CapabilityShaderNonUniform = 5301, - CapabilityShaderNonUniformEXT = 5301, - CapabilityRuntimeDescriptorArray = 5302, - CapabilityRuntimeDescriptorArrayEXT = 5302, - CapabilityInputAttachmentArrayDynamicIndexing = 5303, - CapabilityInputAttachmentArrayDynamicIndexingEXT = 5303, - CapabilityUniformTexelBufferArrayDynamicIndexing = 5304, - CapabilityUniformTexelBufferArrayDynamicIndexingEXT = 5304, - CapabilityStorageTexelBufferArrayDynamicIndexing = 5305, - CapabilityStorageTexelBufferArrayDynamicIndexingEXT = 5305, - CapabilityUniformBufferArrayNonUniformIndexing = 5306, - CapabilityUniformBufferArrayNonUniformIndexingEXT = 5306, - CapabilitySampledImageArrayNonUniformIndexing = 5307, - CapabilitySampledImageArrayNonUniformIndexingEXT = 5307, - CapabilityStorageBufferArrayNonUniformIndexing = 5308, - CapabilityStorageBufferArrayNonUniformIndexingEXT = 5308, - CapabilityStorageImageArrayNonUniformIndexing = 5309, - CapabilityStorageImageArrayNonUniformIndexingEXT = 5309, - CapabilityInputAttachmentArrayNonUniformIndexing = 5310, - CapabilityInputAttachmentArrayNonUniformIndexingEXT = 5310, - CapabilityUniformTexelBufferArrayNonUniformIndexing = 5311, - CapabilityUniformTexelBufferArrayNonUniformIndexingEXT = 5311, - CapabilityStorageTexelBufferArrayNonUniformIndexing = 5312, - CapabilityStorageTexelBufferArrayNonUniformIndexingEXT = 5312, - CapabilityRayTracingNV = 5340, - CapabilityRayTracingMotionBlurNV = 5341, - CapabilityVulkanMemoryModel = 5345, - CapabilityVulkanMemoryModelKHR = 5345, - CapabilityVulkanMemoryModelDeviceScope = 5346, - CapabilityVulkanMemoryModelDeviceScopeKHR = 5346, - CapabilityPhysicalStorageBufferAddresses = 5347, - CapabilityPhysicalStorageBufferAddressesEXT = 5347, - CapabilityComputeDerivativeGroupLinearNV = 5350, - CapabilityRayTracingProvisionalKHR = 5353, - CapabilityCooperativeMatrixNV = 5357, - CapabilityFragmentShaderSampleInterlockEXT = 5363, - CapabilityFragmentShaderShadingRateInterlockEXT = 5372, - CapabilityShaderSMBuiltinsNV = 5373, - CapabilityFragmentShaderPixelInterlockEXT = 5378, - CapabilityDemoteToHelperInvocation = 5379, - CapabilityDemoteToHelperInvocationEXT = 5379, - CapabilityBindlessTextureNV = 5390, - CapabilitySubgroupShuffleINTEL = 5568, - CapabilitySubgroupBufferBlockIOINTEL = 5569, - CapabilitySubgroupImageBlockIOINTEL = 5570, - CapabilitySubgroupImageMediaBlockIOINTEL = 5579, - CapabilityRoundToInfinityINTEL = 5582, - CapabilityFloatingPointModeINTEL = 5583, - CapabilityIntegerFunctions2INTEL = 5584, - CapabilityFunctionPointersINTEL = 5603, - CapabilityIndirectReferencesINTEL = 5604, - CapabilityAsmINTEL = 5606, - CapabilityAtomicFloat32MinMaxEXT = 5612, - CapabilityAtomicFloat64MinMaxEXT = 5613, - CapabilityAtomicFloat16MinMaxEXT = 5616, - CapabilityVectorComputeINTEL = 5617, - CapabilityVectorAnyINTEL = 5619, - CapabilityExpectAssumeKHR = 5629, - CapabilitySubgroupAvcMotionEstimationINTEL = 5696, - CapabilitySubgroupAvcMotionEstimationIntraINTEL = 5697, - CapabilitySubgroupAvcMotionEstimationChromaINTEL = 5698, - CapabilityVariableLengthArrayINTEL = 5817, - CapabilityFunctionFloatControlINTEL = 5821, - CapabilityFPGAMemoryAttributesINTEL = 5824, - CapabilityFPFastMathModeINTEL = 5837, - CapabilityArbitraryPrecisionIntegersINTEL = 5844, - CapabilityArbitraryPrecisionFloatingPointINTEL = 5845, - CapabilityUnstructuredLoopControlsINTEL = 5886, - CapabilityFPGALoopControlsINTEL = 5888, - CapabilityKernelAttributesINTEL = 5892, - CapabilityFPGAKernelAttributesINTEL = 5897, - CapabilityFPGAMemoryAccessesINTEL = 5898, - CapabilityFPGAClusterAttributesINTEL = 5904, - CapabilityLoopFuseINTEL = 5906, - CapabilityFPGABufferLocationINTEL = 5920, - CapabilityArbitraryPrecisionFixedPointINTEL = 5922, - CapabilityUSMStorageClassesINTEL = 5935, - CapabilityIOPipesINTEL = 5943, - CapabilityBlockingPipesINTEL = 5945, - CapabilityFPGARegINTEL = 5948, - CapabilityDotProductInputAll = 6016, - CapabilityDotProductInputAllKHR = 6016, - CapabilityDotProductInput4x8Bit = 6017, - CapabilityDotProductInput4x8BitKHR = 6017, - CapabilityDotProductInput4x8BitPacked = 6018, - CapabilityDotProductInput4x8BitPackedKHR = 6018, - CapabilityDotProduct = 6019, - CapabilityDotProductKHR = 6019, - CapabilityRayCullMaskKHR = 6020, - CapabilityBitInstructions = 6025, - CapabilityAtomicFloat32AddEXT = 6033, - CapabilityAtomicFloat64AddEXT = 6034, - CapabilityLongConstantCompositeINTEL = 6089, - CapabilityOptNoneINTEL = 6094, - CapabilityAtomicFloat16AddEXT = 6095, - CapabilityDebugInfoModuleINTEL = 6114, - CapabilityMax = 0x7fffffff, -}; - -enum RayFlagsShift { - RayFlagsOpaqueKHRShift = 0, - RayFlagsNoOpaqueKHRShift = 1, - RayFlagsTerminateOnFirstHitKHRShift = 2, - RayFlagsSkipClosestHitShaderKHRShift = 3, - RayFlagsCullBackFacingTrianglesKHRShift = 4, - RayFlagsCullFrontFacingTrianglesKHRShift = 5, - RayFlagsCullOpaqueKHRShift = 6, - RayFlagsCullNoOpaqueKHRShift = 7, - RayFlagsSkipTrianglesKHRShift = 8, - RayFlagsSkipAABBsKHRShift = 9, - RayFlagsMax = 0x7fffffff, -}; - -enum RayFlagsMask { - RayFlagsMaskNone = 0, - RayFlagsOpaqueKHRMask = 0x00000001, - RayFlagsNoOpaqueKHRMask = 0x00000002, - RayFlagsTerminateOnFirstHitKHRMask = 0x00000004, - RayFlagsSkipClosestHitShaderKHRMask = 0x00000008, - RayFlagsCullBackFacingTrianglesKHRMask = 0x00000010, - RayFlagsCullFrontFacingTrianglesKHRMask = 0x00000020, - RayFlagsCullOpaqueKHRMask = 0x00000040, - RayFlagsCullNoOpaqueKHRMask = 0x00000080, - RayFlagsSkipTrianglesKHRMask = 0x00000100, - RayFlagsSkipAABBsKHRMask = 0x00000200, -}; - -enum RayQueryIntersection { - RayQueryIntersectionRayQueryCandidateIntersectionKHR = 0, - RayQueryIntersectionRayQueryCommittedIntersectionKHR = 1, - RayQueryIntersectionMax = 0x7fffffff, -}; - -enum RayQueryCommittedIntersectionType { - RayQueryCommittedIntersectionTypeRayQueryCommittedIntersectionNoneKHR = 0, - RayQueryCommittedIntersectionTypeRayQueryCommittedIntersectionTriangleKHR = 1, - RayQueryCommittedIntersectionTypeRayQueryCommittedIntersectionGeneratedKHR = 2, - RayQueryCommittedIntersectionTypeMax = 0x7fffffff, -}; - -enum RayQueryCandidateIntersectionType { - RayQueryCandidateIntersectionTypeRayQueryCandidateIntersectionTriangleKHR = 0, - RayQueryCandidateIntersectionTypeRayQueryCandidateIntersectionAABBKHR = 1, - RayQueryCandidateIntersectionTypeMax = 0x7fffffff, -}; - -enum FragmentShadingRateShift { - FragmentShadingRateVertical2PixelsShift = 0, - FragmentShadingRateVertical4PixelsShift = 1, - FragmentShadingRateHorizontal2PixelsShift = 2, - FragmentShadingRateHorizontal4PixelsShift = 3, - FragmentShadingRateMax = 0x7fffffff, -}; - -enum FragmentShadingRateMask { - FragmentShadingRateMaskNone = 0, - FragmentShadingRateVertical2PixelsMask = 0x00000001, - FragmentShadingRateVertical4PixelsMask = 0x00000002, - FragmentShadingRateHorizontal2PixelsMask = 0x00000004, - FragmentShadingRateHorizontal4PixelsMask = 0x00000008, -}; - -enum FPDenormMode { - FPDenormModePreserve = 0, - FPDenormModeFlushToZero = 1, - FPDenormModeMax = 0x7fffffff, -}; - -enum FPOperationMode { - FPOperationModeIEEE = 0, - FPOperationModeALT = 1, - FPOperationModeMax = 0x7fffffff, -}; - -enum QuantizationModes { - QuantizationModesTRN = 0, - QuantizationModesTRN_ZERO = 1, - QuantizationModesRND = 2, - QuantizationModesRND_ZERO = 3, - QuantizationModesRND_INF = 4, - QuantizationModesRND_MIN_INF = 5, - QuantizationModesRND_CONV = 6, - QuantizationModesRND_CONV_ODD = 7, - QuantizationModesMax = 0x7fffffff, -}; - -enum OverflowModes { - OverflowModesWRAP = 0, - OverflowModesSAT = 1, - OverflowModesSAT_ZERO = 2, - OverflowModesSAT_SYM = 3, - OverflowModesMax = 0x7fffffff, -}; - -enum PackedVectorFormat { - PackedVectorFormatPackedVectorFormat4x8Bit = 0, - PackedVectorFormatPackedVectorFormat4x8BitKHR = 0, - PackedVectorFormatMax = 0x7fffffff, -}; - -enum Op { - OpNop = 0, - OpUndef = 1, - OpSourceContinued = 2, - OpSource = 3, - OpSourceExtension = 4, - OpName = 5, - OpMemberName = 6, - OpString = 7, - OpLine = 8, - OpExtension = 10, - OpExtInstImport = 11, - OpExtInst = 12, - OpMemoryModel = 14, - OpEntryPoint = 15, - OpExecutionMode = 16, - OpCapability = 17, - OpTypeVoid = 19, - OpTypeBool = 20, - OpTypeInt = 21, - OpTypeFloat = 22, - OpTypeVector = 23, - OpTypeMatrix = 24, - OpTypeImage = 25, - OpTypeSampler = 26, - OpTypeSampledImage = 27, - OpTypeArray = 28, - OpTypeRuntimeArray = 29, - OpTypeStruct = 30, - OpTypeOpaque = 31, - OpTypePointer = 32, - OpTypeFunction = 33, - OpTypeEvent = 34, - OpTypeDeviceEvent = 35, - OpTypeReserveId = 36, - OpTypeQueue = 37, - OpTypePipe = 38, - OpTypeForwardPointer = 39, - OpConstantTrue = 41, - OpConstantFalse = 42, - OpConstant = 43, - OpConstantComposite = 44, - OpConstantSampler = 45, - OpConstantNull = 46, - OpSpecConstantTrue = 48, - OpSpecConstantFalse = 49, - OpSpecConstant = 50, - OpSpecConstantComposite = 51, - OpSpecConstantOp = 52, - OpFunction = 54, - OpFunctionParameter = 55, - OpFunctionEnd = 56, - OpFunctionCall = 57, - OpVariable = 59, - OpImageTexelPointer = 60, - OpLoad = 61, - OpStore = 62, - OpCopyMemory = 63, - OpCopyMemorySized = 64, - OpAccessChain = 65, - OpInBoundsAccessChain = 66, - OpPtrAccessChain = 67, - OpArrayLength = 68, - OpGenericPtrMemSemantics = 69, - OpInBoundsPtrAccessChain = 70, - OpDecorate = 71, - OpMemberDecorate = 72, - OpDecorationGroup = 73, - OpGroupDecorate = 74, - OpGroupMemberDecorate = 75, - OpVectorExtractDynamic = 77, - OpVectorInsertDynamic = 78, - OpVectorShuffle = 79, - OpCompositeConstruct = 80, - OpCompositeExtract = 81, - OpCompositeInsert = 82, - OpCopyObject = 83, - OpTranspose = 84, - OpSampledImage = 86, - OpImageSampleImplicitLod = 87, - OpImageSampleExplicitLod = 88, - OpImageSampleDrefImplicitLod = 89, - OpImageSampleDrefExplicitLod = 90, - OpImageSampleProjImplicitLod = 91, - OpImageSampleProjExplicitLod = 92, - OpImageSampleProjDrefImplicitLod = 93, - OpImageSampleProjDrefExplicitLod = 94, - OpImageFetch = 95, - OpImageGather = 96, - OpImageDrefGather = 97, - OpImageRead = 98, - OpImageWrite = 99, - OpImage = 100, - OpImageQueryFormat = 101, - OpImageQueryOrder = 102, - OpImageQuerySizeLod = 103, - OpImageQuerySize = 104, - OpImageQueryLod = 105, - OpImageQueryLevels = 106, - OpImageQuerySamples = 107, - OpConvertFToU = 109, - OpConvertFToS = 110, - OpConvertSToF = 111, - OpConvertUToF = 112, - OpUConvert = 113, - OpSConvert = 114, - OpFConvert = 115, - OpQuantizeToF16 = 116, - OpConvertPtrToU = 117, - OpSatConvertSToU = 118, - OpSatConvertUToS = 119, - OpConvertUToPtr = 120, - OpPtrCastToGeneric = 121, - OpGenericCastToPtr = 122, - OpGenericCastToPtrExplicit = 123, - OpBitcast = 124, - OpSNegate = 126, - OpFNegate = 127, - OpIAdd = 128, - OpFAdd = 129, - OpISub = 130, - OpFSub = 131, - OpIMul = 132, - OpFMul = 133, - OpUDiv = 134, - OpSDiv = 135, - OpFDiv = 136, - OpUMod = 137, - OpSRem = 138, - OpSMod = 139, - OpFRem = 140, - OpFMod = 141, - OpVectorTimesScalar = 142, - OpMatrixTimesScalar = 143, - OpVectorTimesMatrix = 144, - OpMatrixTimesVector = 145, - OpMatrixTimesMatrix = 146, - OpOuterProduct = 147, - OpDot = 148, - OpIAddCarry = 149, - OpISubBorrow = 150, - OpUMulExtended = 151, - OpSMulExtended = 152, - OpAny = 154, - OpAll = 155, - OpIsNan = 156, - OpIsInf = 157, - OpIsFinite = 158, - OpIsNormal = 159, - OpSignBitSet = 160, - OpLessOrGreater = 161, - OpOrdered = 162, - OpUnordered = 163, - OpLogicalEqual = 164, - OpLogicalNotEqual = 165, - OpLogicalOr = 166, - OpLogicalAnd = 167, - OpLogicalNot = 168, - OpSelect = 169, - OpIEqual = 170, - OpINotEqual = 171, - OpUGreaterThan = 172, - OpSGreaterThan = 173, - OpUGreaterThanEqual = 174, - OpSGreaterThanEqual = 175, - OpULessThan = 176, - OpSLessThan = 177, - OpULessThanEqual = 178, - OpSLessThanEqual = 179, - OpFOrdEqual = 180, - OpFUnordEqual = 181, - OpFOrdNotEqual = 182, - OpFUnordNotEqual = 183, - OpFOrdLessThan = 184, - OpFUnordLessThan = 185, - OpFOrdGreaterThan = 186, - OpFUnordGreaterThan = 187, - OpFOrdLessThanEqual = 188, - OpFUnordLessThanEqual = 189, - OpFOrdGreaterThanEqual = 190, - OpFUnordGreaterThanEqual = 191, - OpShiftRightLogical = 194, - OpShiftRightArithmetic = 195, - OpShiftLeftLogical = 196, - OpBitwiseOr = 197, - OpBitwiseXor = 198, - OpBitwiseAnd = 199, - OpNot = 200, - OpBitFieldInsert = 201, - OpBitFieldSExtract = 202, - OpBitFieldUExtract = 203, - OpBitReverse = 204, - OpBitCount = 205, - OpDPdx = 207, - OpDPdy = 208, - OpFwidth = 209, - OpDPdxFine = 210, - OpDPdyFine = 211, - OpFwidthFine = 212, - OpDPdxCoarse = 213, - OpDPdyCoarse = 214, - OpFwidthCoarse = 215, - OpEmitVertex = 218, - OpEndPrimitive = 219, - OpEmitStreamVertex = 220, - OpEndStreamPrimitive = 221, - OpControlBarrier = 224, - OpMemoryBarrier = 225, - OpAtomicLoad = 227, - OpAtomicStore = 228, - OpAtomicExchange = 229, - OpAtomicCompareExchange = 230, - OpAtomicCompareExchangeWeak = 231, - OpAtomicIIncrement = 232, - OpAtomicIDecrement = 233, - OpAtomicIAdd = 234, - OpAtomicISub = 235, - OpAtomicSMin = 236, - OpAtomicUMin = 237, - OpAtomicSMax = 238, - OpAtomicUMax = 239, - OpAtomicAnd = 240, - OpAtomicOr = 241, - OpAtomicXor = 242, - OpPhi = 245, - OpLoopMerge = 246, - OpSelectionMerge = 247, - OpLabel = 248, - OpBranch = 249, - OpBranchConditional = 250, - OpSwitch = 251, - OpKill = 252, - OpReturn = 253, - OpReturnValue = 254, - OpUnreachable = 255, - OpLifetimeStart = 256, - OpLifetimeStop = 257, - OpGroupAsyncCopy = 259, - OpGroupWaitEvents = 260, - OpGroupAll = 261, - OpGroupAny = 262, - OpGroupBroadcast = 263, - OpGroupIAdd = 264, - OpGroupFAdd = 265, - OpGroupFMin = 266, - OpGroupUMin = 267, - OpGroupSMin = 268, - OpGroupFMax = 269, - OpGroupUMax = 270, - OpGroupSMax = 271, - OpReadPipe = 274, - OpWritePipe = 275, - OpReservedReadPipe = 276, - OpReservedWritePipe = 277, - OpReserveReadPipePackets = 278, - OpReserveWritePipePackets = 279, - OpCommitReadPipe = 280, - OpCommitWritePipe = 281, - OpIsValidReserveId = 282, - OpGetNumPipePackets = 283, - OpGetMaxPipePackets = 284, - OpGroupReserveReadPipePackets = 285, - OpGroupReserveWritePipePackets = 286, - OpGroupCommitReadPipe = 287, - OpGroupCommitWritePipe = 288, - OpEnqueueMarker = 291, - OpEnqueueKernel = 292, - OpGetKernelNDrangeSubGroupCount = 293, - OpGetKernelNDrangeMaxSubGroupSize = 294, - OpGetKernelWorkGroupSize = 295, - OpGetKernelPreferredWorkGroupSizeMultiple = 296, - OpRetainEvent = 297, - OpReleaseEvent = 298, - OpCreateUserEvent = 299, - OpIsValidEvent = 300, - OpSetUserEventStatus = 301, - OpCaptureEventProfilingInfo = 302, - OpGetDefaultQueue = 303, - OpBuildNDRange = 304, - OpImageSparseSampleImplicitLod = 305, - OpImageSparseSampleExplicitLod = 306, - OpImageSparseSampleDrefImplicitLod = 307, - OpImageSparseSampleDrefExplicitLod = 308, - OpImageSparseSampleProjImplicitLod = 309, - OpImageSparseSampleProjExplicitLod = 310, - OpImageSparseSampleProjDrefImplicitLod = 311, - OpImageSparseSampleProjDrefExplicitLod = 312, - OpImageSparseFetch = 313, - OpImageSparseGather = 314, - OpImageSparseDrefGather = 315, - OpImageSparseTexelsResident = 316, - OpNoLine = 317, - OpAtomicFlagTestAndSet = 318, - OpAtomicFlagClear = 319, - OpImageSparseRead = 320, - OpSizeOf = 321, - OpTypePipeStorage = 322, - OpConstantPipeStorage = 323, - OpCreatePipeFromPipeStorage = 324, - OpGetKernelLocalSizeForSubgroupCount = 325, - OpGetKernelMaxNumSubgroups = 326, - OpTypeNamedBarrier = 327, - OpNamedBarrierInitialize = 328, - OpMemoryNamedBarrier = 329, - OpModuleProcessed = 330, - OpExecutionModeId = 331, - OpDecorateId = 332, - OpGroupNonUniformElect = 333, - OpGroupNonUniformAll = 334, - OpGroupNonUniformAny = 335, - OpGroupNonUniformAllEqual = 336, - OpGroupNonUniformBroadcast = 337, - OpGroupNonUniformBroadcastFirst = 338, - OpGroupNonUniformBallot = 339, - OpGroupNonUniformInverseBallot = 340, - OpGroupNonUniformBallotBitExtract = 341, - OpGroupNonUniformBallotBitCount = 342, - OpGroupNonUniformBallotFindLSB = 343, - OpGroupNonUniformBallotFindMSB = 344, - OpGroupNonUniformShuffle = 345, - OpGroupNonUniformShuffleXor = 346, - OpGroupNonUniformShuffleUp = 347, - OpGroupNonUniformShuffleDown = 348, - OpGroupNonUniformIAdd = 349, - OpGroupNonUniformFAdd = 350, - OpGroupNonUniformIMul = 351, - OpGroupNonUniformFMul = 352, - OpGroupNonUniformSMin = 353, - OpGroupNonUniformUMin = 354, - OpGroupNonUniformFMin = 355, - OpGroupNonUniformSMax = 356, - OpGroupNonUniformUMax = 357, - OpGroupNonUniformFMax = 358, - OpGroupNonUniformBitwiseAnd = 359, - OpGroupNonUniformBitwiseOr = 360, - OpGroupNonUniformBitwiseXor = 361, - OpGroupNonUniformLogicalAnd = 362, - OpGroupNonUniformLogicalOr = 363, - OpGroupNonUniformLogicalXor = 364, - OpGroupNonUniformQuadBroadcast = 365, - OpGroupNonUniformQuadSwap = 366, - OpCopyLogical = 400, - OpPtrEqual = 401, - OpPtrNotEqual = 402, - OpPtrDiff = 403, - OpTerminateInvocation = 4416, - OpSubgroupBallotKHR = 4421, - OpSubgroupFirstInvocationKHR = 4422, - OpSubgroupAllKHR = 4428, - OpSubgroupAnyKHR = 4429, - OpSubgroupAllEqualKHR = 4430, - OpSubgroupReadInvocationKHR = 4432, - OpTraceRayKHR = 4445, - OpExecuteCallableKHR = 4446, - OpConvertUToAccelerationStructureKHR = 4447, - OpIgnoreIntersectionKHR = 4448, - OpTerminateRayKHR = 4449, - OpSDot = 4450, - OpSDotKHR = 4450, - OpUDot = 4451, - OpUDotKHR = 4451, - OpSUDot = 4452, - OpSUDotKHR = 4452, - OpSDotAccSat = 4453, - OpSDotAccSatKHR = 4453, - OpUDotAccSat = 4454, - OpUDotAccSatKHR = 4454, - OpSUDotAccSat = 4455, - OpSUDotAccSatKHR = 4455, - OpTypeRayQueryKHR = 4472, - OpRayQueryInitializeKHR = 4473, - OpRayQueryTerminateKHR = 4474, - OpRayQueryGenerateIntersectionKHR = 4475, - OpRayQueryConfirmIntersectionKHR = 4476, - OpRayQueryProceedKHR = 4477, - OpRayQueryGetIntersectionTypeKHR = 4479, - OpGroupIAddNonUniformAMD = 5000, - OpGroupFAddNonUniformAMD = 5001, - OpGroupFMinNonUniformAMD = 5002, - OpGroupUMinNonUniformAMD = 5003, - OpGroupSMinNonUniformAMD = 5004, - OpGroupFMaxNonUniformAMD = 5005, - OpGroupUMaxNonUniformAMD = 5006, - OpGroupSMaxNonUniformAMD = 5007, - OpFragmentMaskFetchAMD = 5011, - OpFragmentFetchAMD = 5012, - OpReadClockKHR = 5056, - OpImageSampleFootprintNV = 5283, - OpGroupNonUniformPartitionNV = 5296, - OpWritePackedPrimitiveIndices4x8NV = 5299, - OpReportIntersectionKHR = 5334, - OpReportIntersectionNV = 5334, - OpIgnoreIntersectionNV = 5335, - OpTerminateRayNV = 5336, - OpTraceNV = 5337, - OpTraceMotionNV = 5338, - OpTraceRayMotionNV = 5339, - OpTypeAccelerationStructureKHR = 5341, - OpTypeAccelerationStructureNV = 5341, - OpExecuteCallableNV = 5344, - OpTypeCooperativeMatrixNV = 5358, - OpCooperativeMatrixLoadNV = 5359, - OpCooperativeMatrixStoreNV = 5360, - OpCooperativeMatrixMulAddNV = 5361, - OpCooperativeMatrixLengthNV = 5362, - OpBeginInvocationInterlockEXT = 5364, - OpEndInvocationInterlockEXT = 5365, - OpDemoteToHelperInvocation = 5380, - OpDemoteToHelperInvocationEXT = 5380, - OpIsHelperInvocationEXT = 5381, - OpConvertUToImageNV = 5391, - OpConvertUToSamplerNV = 5392, - OpConvertImageToUNV = 5393, - OpConvertSamplerToUNV = 5394, - OpConvertUToSampledImageNV = 5395, - OpConvertSampledImageToUNV = 5396, - OpSamplerImageAddressingModeNV = 5397, - OpSubgroupShuffleINTEL = 5571, - OpSubgroupShuffleDownINTEL = 5572, - OpSubgroupShuffleUpINTEL = 5573, - OpSubgroupShuffleXorINTEL = 5574, - OpSubgroupBlockReadINTEL = 5575, - OpSubgroupBlockWriteINTEL = 5576, - OpSubgroupImageBlockReadINTEL = 5577, - OpSubgroupImageBlockWriteINTEL = 5578, - OpSubgroupImageMediaBlockReadINTEL = 5580, - OpSubgroupImageMediaBlockWriteINTEL = 5581, - OpUCountLeadingZerosINTEL = 5585, - OpUCountTrailingZerosINTEL = 5586, - OpAbsISubINTEL = 5587, - OpAbsUSubINTEL = 5588, - OpIAddSatINTEL = 5589, - OpUAddSatINTEL = 5590, - OpIAverageINTEL = 5591, - OpUAverageINTEL = 5592, - OpIAverageRoundedINTEL = 5593, - OpUAverageRoundedINTEL = 5594, - OpISubSatINTEL = 5595, - OpUSubSatINTEL = 5596, - OpIMul32x16INTEL = 5597, - OpUMul32x16INTEL = 5598, - OpConstantFunctionPointerINTEL = 5600, - OpFunctionPointerCallINTEL = 5601, - OpAsmTargetINTEL = 5609, - OpAsmINTEL = 5610, - OpAsmCallINTEL = 5611, - OpAtomicFMinEXT = 5614, - OpAtomicFMaxEXT = 5615, - OpAssumeTrueKHR = 5630, - OpExpectKHR = 5631, - OpDecorateString = 5632, - OpDecorateStringGOOGLE = 5632, - OpMemberDecorateString = 5633, - OpMemberDecorateStringGOOGLE = 5633, - OpVmeImageINTEL = 5699, - OpTypeVmeImageINTEL = 5700, - OpTypeAvcImePayloadINTEL = 5701, - OpTypeAvcRefPayloadINTEL = 5702, - OpTypeAvcSicPayloadINTEL = 5703, - OpTypeAvcMcePayloadINTEL = 5704, - OpTypeAvcMceResultINTEL = 5705, - OpTypeAvcImeResultINTEL = 5706, - OpTypeAvcImeResultSingleReferenceStreamoutINTEL = 5707, - OpTypeAvcImeResultDualReferenceStreamoutINTEL = 5708, - OpTypeAvcImeSingleReferenceStreaminINTEL = 5709, - OpTypeAvcImeDualReferenceStreaminINTEL = 5710, - OpTypeAvcRefResultINTEL = 5711, - OpTypeAvcSicResultINTEL = 5712, - OpSubgroupAvcMceGetDefaultInterBaseMultiReferencePenaltyINTEL = 5713, - OpSubgroupAvcMceSetInterBaseMultiReferencePenaltyINTEL = 5714, - OpSubgroupAvcMceGetDefaultInterShapePenaltyINTEL = 5715, - OpSubgroupAvcMceSetInterShapePenaltyINTEL = 5716, - OpSubgroupAvcMceGetDefaultInterDirectionPenaltyINTEL = 5717, - OpSubgroupAvcMceSetInterDirectionPenaltyINTEL = 5718, - OpSubgroupAvcMceGetDefaultIntraLumaShapePenaltyINTEL = 5719, - OpSubgroupAvcMceGetDefaultInterMotionVectorCostTableINTEL = 5720, - OpSubgroupAvcMceGetDefaultHighPenaltyCostTableINTEL = 5721, - OpSubgroupAvcMceGetDefaultMediumPenaltyCostTableINTEL = 5722, - OpSubgroupAvcMceGetDefaultLowPenaltyCostTableINTEL = 5723, - OpSubgroupAvcMceSetMotionVectorCostFunctionINTEL = 5724, - OpSubgroupAvcMceGetDefaultIntraLumaModePenaltyINTEL = 5725, - OpSubgroupAvcMceGetDefaultNonDcLumaIntraPenaltyINTEL = 5726, - OpSubgroupAvcMceGetDefaultIntraChromaModeBasePenaltyINTEL = 5727, - OpSubgroupAvcMceSetAcOnlyHaarINTEL = 5728, - OpSubgroupAvcMceSetSourceInterlacedFieldPolarityINTEL = 5729, - OpSubgroupAvcMceSetSingleReferenceInterlacedFieldPolarityINTEL = 5730, - OpSubgroupAvcMceSetDualReferenceInterlacedFieldPolaritiesINTEL = 5731, - OpSubgroupAvcMceConvertToImePayloadINTEL = 5732, - OpSubgroupAvcMceConvertToImeResultINTEL = 5733, - OpSubgroupAvcMceConvertToRefPayloadINTEL = 5734, - OpSubgroupAvcMceConvertToRefResultINTEL = 5735, - OpSubgroupAvcMceConvertToSicPayloadINTEL = 5736, - OpSubgroupAvcMceConvertToSicResultINTEL = 5737, - OpSubgroupAvcMceGetMotionVectorsINTEL = 5738, - OpSubgroupAvcMceGetInterDistortionsINTEL = 5739, - OpSubgroupAvcMceGetBestInterDistortionsINTEL = 5740, - OpSubgroupAvcMceGetInterMajorShapeINTEL = 5741, - OpSubgroupAvcMceGetInterMinorShapeINTEL = 5742, - OpSubgroupAvcMceGetInterDirectionsINTEL = 5743, - OpSubgroupAvcMceGetInterMotionVectorCountINTEL = 5744, - OpSubgroupAvcMceGetInterReferenceIdsINTEL = 5745, - OpSubgroupAvcMceGetInterReferenceInterlacedFieldPolaritiesINTEL = 5746, - OpSubgroupAvcImeInitializeINTEL = 5747, - OpSubgroupAvcImeSetSingleReferenceINTEL = 5748, - OpSubgroupAvcImeSetDualReferenceINTEL = 5749, - OpSubgroupAvcImeRefWindowSizeINTEL = 5750, - OpSubgroupAvcImeAdjustRefOffsetINTEL = 5751, - OpSubgroupAvcImeConvertToMcePayloadINTEL = 5752, - OpSubgroupAvcImeSetMaxMotionVectorCountINTEL = 5753, - OpSubgroupAvcImeSetUnidirectionalMixDisableINTEL = 5754, - OpSubgroupAvcImeSetEarlySearchTerminationThresholdINTEL = 5755, - OpSubgroupAvcImeSetWeightedSadINTEL = 5756, - OpSubgroupAvcImeEvaluateWithSingleReferenceINTEL = 5757, - OpSubgroupAvcImeEvaluateWithDualReferenceINTEL = 5758, - OpSubgroupAvcImeEvaluateWithSingleReferenceStreaminINTEL = 5759, - OpSubgroupAvcImeEvaluateWithDualReferenceStreaminINTEL = 5760, - OpSubgroupAvcImeEvaluateWithSingleReferenceStreamoutINTEL = 5761, - OpSubgroupAvcImeEvaluateWithDualReferenceStreamoutINTEL = 5762, - OpSubgroupAvcImeEvaluateWithSingleReferenceStreaminoutINTEL = 5763, - OpSubgroupAvcImeEvaluateWithDualReferenceStreaminoutINTEL = 5764, - OpSubgroupAvcImeConvertToMceResultINTEL = 5765, - OpSubgroupAvcImeGetSingleReferenceStreaminINTEL = 5766, - OpSubgroupAvcImeGetDualReferenceStreaminINTEL = 5767, - OpSubgroupAvcImeStripSingleReferenceStreamoutINTEL = 5768, - OpSubgroupAvcImeStripDualReferenceStreamoutINTEL = 5769, - OpSubgroupAvcImeGetStreamoutSingleReferenceMajorShapeMotionVectorsINTEL = 5770, - OpSubgroupAvcImeGetStreamoutSingleReferenceMajorShapeDistortionsINTEL = 5771, - OpSubgroupAvcImeGetStreamoutSingleReferenceMajorShapeReferenceIdsINTEL = 5772, - OpSubgroupAvcImeGetStreamoutDualReferenceMajorShapeMotionVectorsINTEL = 5773, - OpSubgroupAvcImeGetStreamoutDualReferenceMajorShapeDistortionsINTEL = 5774, - OpSubgroupAvcImeGetStreamoutDualReferenceMajorShapeReferenceIdsINTEL = 5775, - OpSubgroupAvcImeGetBorderReachedINTEL = 5776, - OpSubgroupAvcImeGetTruncatedSearchIndicationINTEL = 5777, - OpSubgroupAvcImeGetUnidirectionalEarlySearchTerminationINTEL = 5778, - OpSubgroupAvcImeGetWeightingPatternMinimumMotionVectorINTEL = 5779, - OpSubgroupAvcImeGetWeightingPatternMinimumDistortionINTEL = 5780, - OpSubgroupAvcFmeInitializeINTEL = 5781, - OpSubgroupAvcBmeInitializeINTEL = 5782, - OpSubgroupAvcRefConvertToMcePayloadINTEL = 5783, - OpSubgroupAvcRefSetBidirectionalMixDisableINTEL = 5784, - OpSubgroupAvcRefSetBilinearFilterEnableINTEL = 5785, - OpSubgroupAvcRefEvaluateWithSingleReferenceINTEL = 5786, - OpSubgroupAvcRefEvaluateWithDualReferenceINTEL = 5787, - OpSubgroupAvcRefEvaluateWithMultiReferenceINTEL = 5788, - OpSubgroupAvcRefEvaluateWithMultiReferenceInterlacedINTEL = 5789, - OpSubgroupAvcRefConvertToMceResultINTEL = 5790, - OpSubgroupAvcSicInitializeINTEL = 5791, - OpSubgroupAvcSicConfigureSkcINTEL = 5792, - OpSubgroupAvcSicConfigureIpeLumaINTEL = 5793, - OpSubgroupAvcSicConfigureIpeLumaChromaINTEL = 5794, - OpSubgroupAvcSicGetMotionVectorMaskINTEL = 5795, - OpSubgroupAvcSicConvertToMcePayloadINTEL = 5796, - OpSubgroupAvcSicSetIntraLumaShapePenaltyINTEL = 5797, - OpSubgroupAvcSicSetIntraLumaModeCostFunctionINTEL = 5798, - OpSubgroupAvcSicSetIntraChromaModeCostFunctionINTEL = 5799, - OpSubgroupAvcSicSetBilinearFilterEnableINTEL = 5800, - OpSubgroupAvcSicSetSkcForwardTransformEnableINTEL = 5801, - OpSubgroupAvcSicSetBlockBasedRawSkipSadINTEL = 5802, - OpSubgroupAvcSicEvaluateIpeINTEL = 5803, - OpSubgroupAvcSicEvaluateWithSingleReferenceINTEL = 5804, - OpSubgroupAvcSicEvaluateWithDualReferenceINTEL = 5805, - OpSubgroupAvcSicEvaluateWithMultiReferenceINTEL = 5806, - OpSubgroupAvcSicEvaluateWithMultiReferenceInterlacedINTEL = 5807, - OpSubgroupAvcSicConvertToMceResultINTEL = 5808, - OpSubgroupAvcSicGetIpeLumaShapeINTEL = 5809, - OpSubgroupAvcSicGetBestIpeLumaDistortionINTEL = 5810, - OpSubgroupAvcSicGetBestIpeChromaDistortionINTEL = 5811, - OpSubgroupAvcSicGetPackedIpeLumaModesINTEL = 5812, - OpSubgroupAvcSicGetIpeChromaModeINTEL = 5813, - OpSubgroupAvcSicGetPackedSkcLumaCountThresholdINTEL = 5814, - OpSubgroupAvcSicGetPackedSkcLumaSumThresholdINTEL = 5815, - OpSubgroupAvcSicGetInterRawSadsINTEL = 5816, - OpVariableLengthArrayINTEL = 5818, - OpSaveMemoryINTEL = 5819, - OpRestoreMemoryINTEL = 5820, - OpArbitraryFloatSinCosPiINTEL = 5840, - OpArbitraryFloatCastINTEL = 5841, - OpArbitraryFloatCastFromIntINTEL = 5842, - OpArbitraryFloatCastToIntINTEL = 5843, - OpArbitraryFloatAddINTEL = 5846, - OpArbitraryFloatSubINTEL = 5847, - OpArbitraryFloatMulINTEL = 5848, - OpArbitraryFloatDivINTEL = 5849, - OpArbitraryFloatGTINTEL = 5850, - OpArbitraryFloatGEINTEL = 5851, - OpArbitraryFloatLTINTEL = 5852, - OpArbitraryFloatLEINTEL = 5853, - OpArbitraryFloatEQINTEL = 5854, - OpArbitraryFloatRecipINTEL = 5855, - OpArbitraryFloatRSqrtINTEL = 5856, - OpArbitraryFloatCbrtINTEL = 5857, - OpArbitraryFloatHypotINTEL = 5858, - OpArbitraryFloatSqrtINTEL = 5859, - OpArbitraryFloatLogINTEL = 5860, - OpArbitraryFloatLog2INTEL = 5861, - OpArbitraryFloatLog10INTEL = 5862, - OpArbitraryFloatLog1pINTEL = 5863, - OpArbitraryFloatExpINTEL = 5864, - OpArbitraryFloatExp2INTEL = 5865, - OpArbitraryFloatExp10INTEL = 5866, - OpArbitraryFloatExpm1INTEL = 5867, - OpArbitraryFloatSinINTEL = 5868, - OpArbitraryFloatCosINTEL = 5869, - OpArbitraryFloatSinCosINTEL = 5870, - OpArbitraryFloatSinPiINTEL = 5871, - OpArbitraryFloatCosPiINTEL = 5872, - OpArbitraryFloatASinINTEL = 5873, - OpArbitraryFloatASinPiINTEL = 5874, - OpArbitraryFloatACosINTEL = 5875, - OpArbitraryFloatACosPiINTEL = 5876, - OpArbitraryFloatATanINTEL = 5877, - OpArbitraryFloatATanPiINTEL = 5878, - OpArbitraryFloatATan2INTEL = 5879, - OpArbitraryFloatPowINTEL = 5880, - OpArbitraryFloatPowRINTEL = 5881, - OpArbitraryFloatPowNINTEL = 5882, - OpLoopControlINTEL = 5887, - OpFixedSqrtINTEL = 5923, - OpFixedRecipINTEL = 5924, - OpFixedRsqrtINTEL = 5925, - OpFixedSinINTEL = 5926, - OpFixedCosINTEL = 5927, - OpFixedSinCosINTEL = 5928, - OpFixedSinPiINTEL = 5929, - OpFixedCosPiINTEL = 5930, - OpFixedSinCosPiINTEL = 5931, - OpFixedLogINTEL = 5932, - OpFixedExpINTEL = 5933, - OpPtrCastToCrossWorkgroupINTEL = 5934, - OpCrossWorkgroupCastToPtrINTEL = 5938, - OpReadPipeBlockingINTEL = 5946, - OpWritePipeBlockingINTEL = 5947, - OpFPGARegINTEL = 5949, - OpRayQueryGetRayTMinKHR = 6016, - OpRayQueryGetRayFlagsKHR = 6017, - OpRayQueryGetIntersectionTKHR = 6018, - OpRayQueryGetIntersectionInstanceCustomIndexKHR = 6019, - OpRayQueryGetIntersectionInstanceIdKHR = 6020, - OpRayQueryGetIntersectionInstanceShaderBindingTableRecordOffsetKHR = 6021, - OpRayQueryGetIntersectionGeometryIndexKHR = 6022, - OpRayQueryGetIntersectionPrimitiveIndexKHR = 6023, - OpRayQueryGetIntersectionBarycentricsKHR = 6024, - OpRayQueryGetIntersectionFrontFaceKHR = 6025, - OpRayQueryGetIntersectionCandidateAABBOpaqueKHR = 6026, - OpRayQueryGetIntersectionObjectRayDirectionKHR = 6027, - OpRayQueryGetIntersectionObjectRayOriginKHR = 6028, - OpRayQueryGetWorldRayDirectionKHR = 6029, - OpRayQueryGetWorldRayOriginKHR = 6030, - OpRayQueryGetIntersectionObjectToWorldKHR = 6031, - OpRayQueryGetIntersectionWorldToObjectKHR = 6032, - OpAtomicFAddEXT = 6035, - OpTypeBufferSurfaceINTEL = 6086, - OpTypeStructContinuedINTEL = 6090, - OpConstantCompositeContinuedINTEL = 6091, - OpSpecConstantCompositeContinuedINTEL = 6092, - OpMax = 0x7fffffff, -}; - -#ifdef SPV_ENABLE_UTILITY_CODE -inline void HasResultAndType(Op opcode, bool *hasResult, bool *hasResultType) { - *hasResult = *hasResultType = false; - switch (opcode) { - default: /* unknown opcode */ break; - case OpNop: *hasResult = false; *hasResultType = false; break; - case OpUndef: *hasResult = true; *hasResultType = true; break; - case OpSourceContinued: *hasResult = false; *hasResultType = false; break; - case OpSource: *hasResult = false; *hasResultType = false; break; - case OpSourceExtension: *hasResult = false; *hasResultType = false; break; - case OpName: *hasResult = false; *hasResultType = false; break; - case OpMemberName: *hasResult = false; *hasResultType = false; break; - case OpString: *hasResult = true; *hasResultType = false; break; - case OpLine: *hasResult = false; *hasResultType = false; break; - case OpExtension: *hasResult = false; *hasResultType = false; break; - case OpExtInstImport: *hasResult = true; *hasResultType = false; break; - case OpExtInst: *hasResult = true; *hasResultType = true; break; - case OpMemoryModel: *hasResult = false; *hasResultType = false; break; - case OpEntryPoint: *hasResult = false; *hasResultType = false; break; - case OpExecutionMode: *hasResult = false; *hasResultType = false; break; - case OpCapability: *hasResult = false; *hasResultType = false; break; - case OpTypeVoid: *hasResult = true; *hasResultType = false; break; - case OpTypeBool: *hasResult = true; *hasResultType = false; break; - case OpTypeInt: *hasResult = true; *hasResultType = false; break; - case OpTypeFloat: *hasResult = true; *hasResultType = false; break; - case OpTypeVector: *hasResult = true; *hasResultType = false; break; - case OpTypeMatrix: *hasResult = true; *hasResultType = false; break; - case OpTypeImage: *hasResult = true; *hasResultType = false; break; - case OpTypeSampler: *hasResult = true; *hasResultType = false; break; - case OpTypeSampledImage: *hasResult = true; *hasResultType = false; break; - case OpTypeArray: *hasResult = true; *hasResultType = false; break; - case OpTypeRuntimeArray: *hasResult = true; *hasResultType = false; break; - case OpTypeStruct: *hasResult = true; *hasResultType = false; break; - case OpTypeOpaque: *hasResult = true; *hasResultType = false; break; - case OpTypePointer: *hasResult = true; *hasResultType = false; break; - case OpTypeFunction: *hasResult = true; *hasResultType = false; break; - case OpTypeEvent: *hasResult = true; *hasResultType = false; break; - case OpTypeDeviceEvent: *hasResult = true; *hasResultType = false; break; - case OpTypeReserveId: *hasResult = true; *hasResultType = false; break; - case OpTypeQueue: *hasResult = true; *hasResultType = false; break; - case OpTypePipe: *hasResult = true; *hasResultType = false; break; - case OpTypeForwardPointer: *hasResult = false; *hasResultType = false; break; - case OpConstantTrue: *hasResult = true; *hasResultType = true; break; - case OpConstantFalse: *hasResult = true; *hasResultType = true; break; - case OpConstant: *hasResult = true; *hasResultType = true; break; - case OpConstantComposite: *hasResult = true; *hasResultType = true; break; - case OpConstantSampler: *hasResult = true; *hasResultType = true; break; - case OpConstantNull: *hasResult = true; *hasResultType = true; break; - case OpSpecConstantTrue: *hasResult = true; *hasResultType = true; break; - case OpSpecConstantFalse: *hasResult = true; *hasResultType = true; break; - case OpSpecConstant: *hasResult = true; *hasResultType = true; break; - case OpSpecConstantComposite: *hasResult = true; *hasResultType = true; break; - case OpSpecConstantOp: *hasResult = true; *hasResultType = true; break; - case OpFunction: *hasResult = true; *hasResultType = true; break; - case OpFunctionParameter: *hasResult = true; *hasResultType = true; break; - case OpFunctionEnd: *hasResult = false; *hasResultType = false; break; - case OpFunctionCall: *hasResult = true; *hasResultType = true; break; - case OpVariable: *hasResult = true; *hasResultType = true; break; - case OpImageTexelPointer: *hasResult = true; *hasResultType = true; break; - case OpLoad: *hasResult = true; *hasResultType = true; break; - case OpStore: *hasResult = false; *hasResultType = false; break; - case OpCopyMemory: *hasResult = false; *hasResultType = false; break; - case OpCopyMemorySized: *hasResult = false; *hasResultType = false; break; - case OpAccessChain: *hasResult = true; *hasResultType = true; break; - case OpInBoundsAccessChain: *hasResult = true; *hasResultType = true; break; - case OpPtrAccessChain: *hasResult = true; *hasResultType = true; break; - case OpArrayLength: *hasResult = true; *hasResultType = true; break; - case OpGenericPtrMemSemantics: *hasResult = true; *hasResultType = true; break; - case OpInBoundsPtrAccessChain: *hasResult = true; *hasResultType = true; break; - case OpDecorate: *hasResult = false; *hasResultType = false; break; - case OpMemberDecorate: *hasResult = false; *hasResultType = false; break; - case OpDecorationGroup: *hasResult = true; *hasResultType = false; break; - case OpGroupDecorate: *hasResult = false; *hasResultType = false; break; - case OpGroupMemberDecorate: *hasResult = false; *hasResultType = false; break; - case OpVectorExtractDynamic: *hasResult = true; *hasResultType = true; break; - case OpVectorInsertDynamic: *hasResult = true; *hasResultType = true; break; - case OpVectorShuffle: *hasResult = true; *hasResultType = true; break; - case OpCompositeConstruct: *hasResult = true; *hasResultType = true; break; - case OpCompositeExtract: *hasResult = true; *hasResultType = true; break; - case OpCompositeInsert: *hasResult = true; *hasResultType = true; break; - case OpCopyObject: *hasResult = true; *hasResultType = true; break; - case OpTranspose: *hasResult = true; *hasResultType = true; break; - case OpSampledImage: *hasResult = true; *hasResultType = true; break; - case OpImageSampleImplicitLod: *hasResult = true; *hasResultType = true; break; - case OpImageSampleExplicitLod: *hasResult = true; *hasResultType = true; break; - case OpImageSampleDrefImplicitLod: *hasResult = true; *hasResultType = true; break; - case OpImageSampleDrefExplicitLod: *hasResult = true; *hasResultType = true; break; - case OpImageSampleProjImplicitLod: *hasResult = true; *hasResultType = true; break; - case OpImageSampleProjExplicitLod: *hasResult = true; *hasResultType = true; break; - case OpImageSampleProjDrefImplicitLod: *hasResult = true; *hasResultType = true; break; - case OpImageSampleProjDrefExplicitLod: *hasResult = true; *hasResultType = true; break; - case OpImageFetch: *hasResult = true; *hasResultType = true; break; - case OpImageGather: *hasResult = true; *hasResultType = true; break; - case OpImageDrefGather: *hasResult = true; *hasResultType = true; break; - case OpImageRead: *hasResult = true; *hasResultType = true; break; - case OpImageWrite: *hasResult = false; *hasResultType = false; break; - case OpImage: *hasResult = true; *hasResultType = true; break; - case OpImageQueryFormat: *hasResult = true; *hasResultType = true; break; - case OpImageQueryOrder: *hasResult = true; *hasResultType = true; break; - case OpImageQuerySizeLod: *hasResult = true; *hasResultType = true; break; - case OpImageQuerySize: *hasResult = true; *hasResultType = true; break; - case OpImageQueryLod: *hasResult = true; *hasResultType = true; break; - case OpImageQueryLevels: *hasResult = true; *hasResultType = true; break; - case OpImageQuerySamples: *hasResult = true; *hasResultType = true; break; - case OpConvertFToU: *hasResult = true; *hasResultType = true; break; - case OpConvertFToS: *hasResult = true; *hasResultType = true; break; - case OpConvertSToF: *hasResult = true; *hasResultType = true; break; - case OpConvertUToF: *hasResult = true; *hasResultType = true; break; - case OpUConvert: *hasResult = true; *hasResultType = true; break; - case OpSConvert: *hasResult = true; *hasResultType = true; break; - case OpFConvert: *hasResult = true; *hasResultType = true; break; - case OpQuantizeToF16: *hasResult = true; *hasResultType = true; break; - case OpConvertPtrToU: *hasResult = true; *hasResultType = true; break; - case OpSatConvertSToU: *hasResult = true; *hasResultType = true; break; - case OpSatConvertUToS: *hasResult = true; *hasResultType = true; break; - case OpConvertUToPtr: *hasResult = true; *hasResultType = true; break; - case OpPtrCastToGeneric: *hasResult = true; *hasResultType = true; break; - case OpGenericCastToPtr: *hasResult = true; *hasResultType = true; break; - case OpGenericCastToPtrExplicit: *hasResult = true; *hasResultType = true; break; - case OpBitcast: *hasResult = true; *hasResultType = true; break; - case OpSNegate: *hasResult = true; *hasResultType = true; break; - case OpFNegate: *hasResult = true; *hasResultType = true; break; - case OpIAdd: *hasResult = true; *hasResultType = true; break; - case OpFAdd: *hasResult = true; *hasResultType = true; break; - case OpISub: *hasResult = true; *hasResultType = true; break; - case OpFSub: *hasResult = true; *hasResultType = true; break; - case OpIMul: *hasResult = true; *hasResultType = true; break; - case OpFMul: *hasResult = true; *hasResultType = true; break; - case OpUDiv: *hasResult = true; *hasResultType = true; break; - case OpSDiv: *hasResult = true; *hasResultType = true; break; - case OpFDiv: *hasResult = true; *hasResultType = true; break; - case OpUMod: *hasResult = true; *hasResultType = true; break; - case OpSRem: *hasResult = true; *hasResultType = true; break; - case OpSMod: *hasResult = true; *hasResultType = true; break; - case OpFRem: *hasResult = true; *hasResultType = true; break; - case OpFMod: *hasResult = true; *hasResultType = true; break; - case OpVectorTimesScalar: *hasResult = true; *hasResultType = true; break; - case OpMatrixTimesScalar: *hasResult = true; *hasResultType = true; break; - case OpVectorTimesMatrix: *hasResult = true; *hasResultType = true; break; - case OpMatrixTimesVector: *hasResult = true; *hasResultType = true; break; - case OpMatrixTimesMatrix: *hasResult = true; *hasResultType = true; break; - case OpOuterProduct: *hasResult = true; *hasResultType = true; break; - case OpDot: *hasResult = true; *hasResultType = true; break; - case OpIAddCarry: *hasResult = true; *hasResultType = true; break; - case OpISubBorrow: *hasResult = true; *hasResultType = true; break; - case OpUMulExtended: *hasResult = true; *hasResultType = true; break; - case OpSMulExtended: *hasResult = true; *hasResultType = true; break; - case OpAny: *hasResult = true; *hasResultType = true; break; - case OpAll: *hasResult = true; *hasResultType = true; break; - case OpIsNan: *hasResult = true; *hasResultType = true; break; - case OpIsInf: *hasResult = true; *hasResultType = true; break; - case OpIsFinite: *hasResult = true; *hasResultType = true; break; - case OpIsNormal: *hasResult = true; *hasResultType = true; break; - case OpSignBitSet: *hasResult = true; *hasResultType = true; break; - case OpLessOrGreater: *hasResult = true; *hasResultType = true; break; - case OpOrdered: *hasResult = true; *hasResultType = true; break; - case OpUnordered: *hasResult = true; *hasResultType = true; break; - case OpLogicalEqual: *hasResult = true; *hasResultType = true; break; - case OpLogicalNotEqual: *hasResult = true; *hasResultType = true; break; - case OpLogicalOr: *hasResult = true; *hasResultType = true; break; - case OpLogicalAnd: *hasResult = true; *hasResultType = true; break; - case OpLogicalNot: *hasResult = true; *hasResultType = true; break; - case OpSelect: *hasResult = true; *hasResultType = true; break; - case OpIEqual: *hasResult = true; *hasResultType = true; break; - case OpINotEqual: *hasResult = true; *hasResultType = true; break; - case OpUGreaterThan: *hasResult = true; *hasResultType = true; break; - case OpSGreaterThan: *hasResult = true; *hasResultType = true; break; - case OpUGreaterThanEqual: *hasResult = true; *hasResultType = true; break; - case OpSGreaterThanEqual: *hasResult = true; *hasResultType = true; break; - case OpULessThan: *hasResult = true; *hasResultType = true; break; - case OpSLessThan: *hasResult = true; *hasResultType = true; break; - case OpULessThanEqual: *hasResult = true; *hasResultType = true; break; - case OpSLessThanEqual: *hasResult = true; *hasResultType = true; break; - case OpFOrdEqual: *hasResult = true; *hasResultType = true; break; - case OpFUnordEqual: *hasResult = true; *hasResultType = true; break; - case OpFOrdNotEqual: *hasResult = true; *hasResultType = true; break; - case OpFUnordNotEqual: *hasResult = true; *hasResultType = true; break; - case OpFOrdLessThan: *hasResult = true; *hasResultType = true; break; - case OpFUnordLessThan: *hasResult = true; *hasResultType = true; break; - case OpFOrdGreaterThan: *hasResult = true; *hasResultType = true; break; - case OpFUnordGreaterThan: *hasResult = true; *hasResultType = true; break; - case OpFOrdLessThanEqual: *hasResult = true; *hasResultType = true; break; - case OpFUnordLessThanEqual: *hasResult = true; *hasResultType = true; break; - case OpFOrdGreaterThanEqual: *hasResult = true; *hasResultType = true; break; - case OpFUnordGreaterThanEqual: *hasResult = true; *hasResultType = true; break; - case OpShiftRightLogical: *hasResult = true; *hasResultType = true; break; - case OpShiftRightArithmetic: *hasResult = true; *hasResultType = true; break; - case OpShiftLeftLogical: *hasResult = true; *hasResultType = true; break; - case OpBitwiseOr: *hasResult = true; *hasResultType = true; break; - case OpBitwiseXor: *hasResult = true; *hasResultType = true; break; - case OpBitwiseAnd: *hasResult = true; *hasResultType = true; break; - case OpNot: *hasResult = true; *hasResultType = true; break; - case OpBitFieldInsert: *hasResult = true; *hasResultType = true; break; - case OpBitFieldSExtract: *hasResult = true; *hasResultType = true; break; - case OpBitFieldUExtract: *hasResult = true; *hasResultType = true; break; - case OpBitReverse: *hasResult = true; *hasResultType = true; break; - case OpBitCount: *hasResult = true; *hasResultType = true; break; - case OpDPdx: *hasResult = true; *hasResultType = true; break; - case OpDPdy: *hasResult = true; *hasResultType = true; break; - case OpFwidth: *hasResult = true; *hasResultType = true; break; - case OpDPdxFine: *hasResult = true; *hasResultType = true; break; - case OpDPdyFine: *hasResult = true; *hasResultType = true; break; - case OpFwidthFine: *hasResult = true; *hasResultType = true; break; - case OpDPdxCoarse: *hasResult = true; *hasResultType = true; break; - case OpDPdyCoarse: *hasResult = true; *hasResultType = true; break; - case OpFwidthCoarse: *hasResult = true; *hasResultType = true; break; - case OpEmitVertex: *hasResult = false; *hasResultType = false; break; - case OpEndPrimitive: *hasResult = false; *hasResultType = false; break; - case OpEmitStreamVertex: *hasResult = false; *hasResultType = false; break; - case OpEndStreamPrimitive: *hasResult = false; *hasResultType = false; break; - case OpControlBarrier: *hasResult = false; *hasResultType = false; break; - case OpMemoryBarrier: *hasResult = false; *hasResultType = false; break; - case OpAtomicLoad: *hasResult = true; *hasResultType = true; break; - case OpAtomicStore: *hasResult = false; *hasResultType = false; break; - case OpAtomicExchange: *hasResult = true; *hasResultType = true; break; - case OpAtomicCompareExchange: *hasResult = true; *hasResultType = true; break; - case OpAtomicCompareExchangeWeak: *hasResult = true; *hasResultType = true; break; - case OpAtomicIIncrement: *hasResult = true; *hasResultType = true; break; - case OpAtomicIDecrement: *hasResult = true; *hasResultType = true; break; - case OpAtomicIAdd: *hasResult = true; *hasResultType = true; break; - case OpAtomicISub: *hasResult = true; *hasResultType = true; break; - case OpAtomicSMin: *hasResult = true; *hasResultType = true; break; - case OpAtomicUMin: *hasResult = true; *hasResultType = true; break; - case OpAtomicSMax: *hasResult = true; *hasResultType = true; break; - case OpAtomicUMax: *hasResult = true; *hasResultType = true; break; - case OpAtomicAnd: *hasResult = true; *hasResultType = true; break; - case OpAtomicOr: *hasResult = true; *hasResultType = true; break; - case OpAtomicXor: *hasResult = true; *hasResultType = true; break; - case OpPhi: *hasResult = true; *hasResultType = true; break; - case OpLoopMerge: *hasResult = false; *hasResultType = false; break; - case OpSelectionMerge: *hasResult = false; *hasResultType = false; break; - case OpLabel: *hasResult = true; *hasResultType = false; break; - case OpBranch: *hasResult = false; *hasResultType = false; break; - case OpBranchConditional: *hasResult = false; *hasResultType = false; break; - case OpSwitch: *hasResult = false; *hasResultType = false; break; - case OpKill: *hasResult = false; *hasResultType = false; break; - case OpReturn: *hasResult = false; *hasResultType = false; break; - case OpReturnValue: *hasResult = false; *hasResultType = false; break; - case OpUnreachable: *hasResult = false; *hasResultType = false; break; - case OpLifetimeStart: *hasResult = false; *hasResultType = false; break; - case OpLifetimeStop: *hasResult = false; *hasResultType = false; break; - case OpGroupAsyncCopy: *hasResult = true; *hasResultType = true; break; - case OpGroupWaitEvents: *hasResult = false; *hasResultType = false; break; - case OpGroupAll: *hasResult = true; *hasResultType = true; break; - case OpGroupAny: *hasResult = true; *hasResultType = true; break; - case OpGroupBroadcast: *hasResult = true; *hasResultType = true; break; - case OpGroupIAdd: *hasResult = true; *hasResultType = true; break; - case OpGroupFAdd: *hasResult = true; *hasResultType = true; break; - case OpGroupFMin: *hasResult = true; *hasResultType = true; break; - case OpGroupUMin: *hasResult = true; *hasResultType = true; break; - case OpGroupSMin: *hasResult = true; *hasResultType = true; break; - case OpGroupFMax: *hasResult = true; *hasResultType = true; break; - case OpGroupUMax: *hasResult = true; *hasResultType = true; break; - case OpGroupSMax: *hasResult = true; *hasResultType = true; break; - case OpReadPipe: *hasResult = true; *hasResultType = true; break; - case OpWritePipe: *hasResult = true; *hasResultType = true; break; - case OpReservedReadPipe: *hasResult = true; *hasResultType = true; break; - case OpReservedWritePipe: *hasResult = true; *hasResultType = true; break; - case OpReserveReadPipePackets: *hasResult = true; *hasResultType = true; break; - case OpReserveWritePipePackets: *hasResult = true; *hasResultType = true; break; - case OpCommitReadPipe: *hasResult = false; *hasResultType = false; break; - case OpCommitWritePipe: *hasResult = false; *hasResultType = false; break; - case OpIsValidReserveId: *hasResult = true; *hasResultType = true; break; - case OpGetNumPipePackets: *hasResult = true; *hasResultType = true; break; - case OpGetMaxPipePackets: *hasResult = true; *hasResultType = true; break; - case OpGroupReserveReadPipePackets: *hasResult = true; *hasResultType = true; break; - case OpGroupReserveWritePipePackets: *hasResult = true; *hasResultType = true; break; - case OpGroupCommitReadPipe: *hasResult = false; *hasResultType = false; break; - case OpGroupCommitWritePipe: *hasResult = false; *hasResultType = false; break; - case OpEnqueueMarker: *hasResult = true; *hasResultType = true; break; - case OpEnqueueKernel: *hasResult = true; *hasResultType = true; break; - case OpGetKernelNDrangeSubGroupCount: *hasResult = true; *hasResultType = true; break; - case OpGetKernelNDrangeMaxSubGroupSize: *hasResult = true; *hasResultType = true; break; - case OpGetKernelWorkGroupSize: *hasResult = true; *hasResultType = true; break; - case OpGetKernelPreferredWorkGroupSizeMultiple: *hasResult = true; *hasResultType = true; break; - case OpRetainEvent: *hasResult = false; *hasResultType = false; break; - case OpReleaseEvent: *hasResult = false; *hasResultType = false; break; - case OpCreateUserEvent: *hasResult = true; *hasResultType = true; break; - case OpIsValidEvent: *hasResult = true; *hasResultType = true; break; - case OpSetUserEventStatus: *hasResult = false; *hasResultType = false; break; - case OpCaptureEventProfilingInfo: *hasResult = false; *hasResultType = false; break; - case OpGetDefaultQueue: *hasResult = true; *hasResultType = true; break; - case OpBuildNDRange: *hasResult = true; *hasResultType = true; break; - case OpImageSparseSampleImplicitLod: *hasResult = true; *hasResultType = true; break; - case OpImageSparseSampleExplicitLod: *hasResult = true; *hasResultType = true; break; - case OpImageSparseSampleDrefImplicitLod: *hasResult = true; *hasResultType = true; break; - case OpImageSparseSampleDrefExplicitLod: *hasResult = true; *hasResultType = true; break; - case OpImageSparseSampleProjImplicitLod: *hasResult = true; *hasResultType = true; break; - case OpImageSparseSampleProjExplicitLod: *hasResult = true; *hasResultType = true; break; - case OpImageSparseSampleProjDrefImplicitLod: *hasResult = true; *hasResultType = true; break; - case OpImageSparseSampleProjDrefExplicitLod: *hasResult = true; *hasResultType = true; break; - case OpImageSparseFetch: *hasResult = true; *hasResultType = true; break; - case OpImageSparseGather: *hasResult = true; *hasResultType = true; break; - case OpImageSparseDrefGather: *hasResult = true; *hasResultType = true; break; - case OpImageSparseTexelsResident: *hasResult = true; *hasResultType = true; break; - case OpNoLine: *hasResult = false; *hasResultType = false; break; - case OpAtomicFlagTestAndSet: *hasResult = true; *hasResultType = true; break; - case OpAtomicFlagClear: *hasResult = false; *hasResultType = false; break; - case OpImageSparseRead: *hasResult = true; *hasResultType = true; break; - case OpSizeOf: *hasResult = true; *hasResultType = true; break; - case OpTypePipeStorage: *hasResult = true; *hasResultType = false; break; - case OpConstantPipeStorage: *hasResult = true; *hasResultType = true; break; - case OpCreatePipeFromPipeStorage: *hasResult = true; *hasResultType = true; break; - case OpGetKernelLocalSizeForSubgroupCount: *hasResult = true; *hasResultType = true; break; - case OpGetKernelMaxNumSubgroups: *hasResult = true; *hasResultType = true; break; - case OpTypeNamedBarrier: *hasResult = true; *hasResultType = false; break; - case OpNamedBarrierInitialize: *hasResult = true; *hasResultType = true; break; - case OpMemoryNamedBarrier: *hasResult = false; *hasResultType = false; break; - case OpModuleProcessed: *hasResult = false; *hasResultType = false; break; - case OpExecutionModeId: *hasResult = false; *hasResultType = false; break; - case OpDecorateId: *hasResult = false; *hasResultType = false; break; - case OpGroupNonUniformElect: *hasResult = true; *hasResultType = true; break; - case OpGroupNonUniformAll: *hasResult = true; *hasResultType = true; break; - case OpGroupNonUniformAny: *hasResult = true; *hasResultType = true; break; - case OpGroupNonUniformAllEqual: *hasResult = true; *hasResultType = true; break; - case OpGroupNonUniformBroadcast: *hasResult = true; *hasResultType = true; break; - case OpGroupNonUniformBroadcastFirst: *hasResult = true; *hasResultType = true; break; - case OpGroupNonUniformBallot: *hasResult = true; *hasResultType = true; break; - case OpGroupNonUniformInverseBallot: *hasResult = true; *hasResultType = true; break; - case OpGroupNonUniformBallotBitExtract: *hasResult = true; *hasResultType = true; break; - case OpGroupNonUniformBallotBitCount: *hasResult = true; *hasResultType = true; break; - case OpGroupNonUniformBallotFindLSB: *hasResult = true; *hasResultType = true; break; - case OpGroupNonUniformBallotFindMSB: *hasResult = true; *hasResultType = true; break; - case OpGroupNonUniformShuffle: *hasResult = true; *hasResultType = true; break; - case OpGroupNonUniformShuffleXor: *hasResult = true; *hasResultType = true; break; - case OpGroupNonUniformShuffleUp: *hasResult = true; *hasResultType = true; break; - case OpGroupNonUniformShuffleDown: *hasResult = true; *hasResultType = true; break; - case OpGroupNonUniformIAdd: *hasResult = true; *hasResultType = true; break; - case OpGroupNonUniformFAdd: *hasResult = true; *hasResultType = true; break; - case OpGroupNonUniformIMul: *hasResult = true; *hasResultType = true; break; - case OpGroupNonUniformFMul: *hasResult = true; *hasResultType = true; break; - case OpGroupNonUniformSMin: *hasResult = true; *hasResultType = true; break; - case OpGroupNonUniformUMin: *hasResult = true; *hasResultType = true; break; - case OpGroupNonUniformFMin: *hasResult = true; *hasResultType = true; break; - case OpGroupNonUniformSMax: *hasResult = true; *hasResultType = true; break; - case OpGroupNonUniformUMax: *hasResult = true; *hasResultType = true; break; - case OpGroupNonUniformFMax: *hasResult = true; *hasResultType = true; break; - case OpGroupNonUniformBitwiseAnd: *hasResult = true; *hasResultType = true; break; - case OpGroupNonUniformBitwiseOr: *hasResult = true; *hasResultType = true; break; - case OpGroupNonUniformBitwiseXor: *hasResult = true; *hasResultType = true; break; - case OpGroupNonUniformLogicalAnd: *hasResult = true; *hasResultType = true; break; - case OpGroupNonUniformLogicalOr: *hasResult = true; *hasResultType = true; break; - case OpGroupNonUniformLogicalXor: *hasResult = true; *hasResultType = true; break; - case OpGroupNonUniformQuadBroadcast: *hasResult = true; *hasResultType = true; break; - case OpGroupNonUniformQuadSwap: *hasResult = true; *hasResultType = true; break; - case OpCopyLogical: *hasResult = true; *hasResultType = true; break; - case OpPtrEqual: *hasResult = true; *hasResultType = true; break; - case OpPtrNotEqual: *hasResult = true; *hasResultType = true; break; - case OpPtrDiff: *hasResult = true; *hasResultType = true; break; - case OpTerminateInvocation: *hasResult = false; *hasResultType = false; break; - case OpSubgroupBallotKHR: *hasResult = true; *hasResultType = true; break; - case OpSubgroupFirstInvocationKHR: *hasResult = true; *hasResultType = true; break; - case OpSubgroupAllKHR: *hasResult = true; *hasResultType = true; break; - case OpSubgroupAnyKHR: *hasResult = true; *hasResultType = true; break; - case OpSubgroupAllEqualKHR: *hasResult = true; *hasResultType = true; break; - case OpSubgroupReadInvocationKHR: *hasResult = true; *hasResultType = true; break; - case OpTraceRayKHR: *hasResult = false; *hasResultType = false; break; - case OpExecuteCallableKHR: *hasResult = false; *hasResultType = false; break; - case OpConvertUToAccelerationStructureKHR: *hasResult = true; *hasResultType = true; break; - case OpIgnoreIntersectionKHR: *hasResult = false; *hasResultType = false; break; - case OpTerminateRayKHR: *hasResult = false; *hasResultType = false; break; - case OpSDot: *hasResult = true; *hasResultType = true; break; - case OpUDot: *hasResult = true; *hasResultType = true; break; - case OpSUDot: *hasResult = true; *hasResultType = true; break; - case OpSDotAccSat: *hasResult = true; *hasResultType = true; break; - case OpUDotAccSat: *hasResult = true; *hasResultType = true; break; - case OpSUDotAccSat: *hasResult = true; *hasResultType = true; break; - case OpTypeRayQueryKHR: *hasResult = true; *hasResultType = false; break; - case OpRayQueryInitializeKHR: *hasResult = false; *hasResultType = false; break; - case OpRayQueryTerminateKHR: *hasResult = false; *hasResultType = false; break; - case OpRayQueryGenerateIntersectionKHR: *hasResult = false; *hasResultType = false; break; - case OpRayQueryConfirmIntersectionKHR: *hasResult = false; *hasResultType = false; break; - case OpRayQueryProceedKHR: *hasResult = true; *hasResultType = true; break; - case OpRayQueryGetIntersectionTypeKHR: *hasResult = true; *hasResultType = true; break; - case OpGroupIAddNonUniformAMD: *hasResult = true; *hasResultType = true; break; - case OpGroupFAddNonUniformAMD: *hasResult = true; *hasResultType = true; break; - case OpGroupFMinNonUniformAMD: *hasResult = true; *hasResultType = true; break; - case OpGroupUMinNonUniformAMD: *hasResult = true; *hasResultType = true; break; - case OpGroupSMinNonUniformAMD: *hasResult = true; *hasResultType = true; break; - case OpGroupFMaxNonUniformAMD: *hasResult = true; *hasResultType = true; break; - case OpGroupUMaxNonUniformAMD: *hasResult = true; *hasResultType = true; break; - case OpGroupSMaxNonUniformAMD: *hasResult = true; *hasResultType = true; break; - case OpFragmentMaskFetchAMD: *hasResult = true; *hasResultType = true; break; - case OpFragmentFetchAMD: *hasResult = true; *hasResultType = true; break; - case OpReadClockKHR: *hasResult = true; *hasResultType = true; break; - case OpImageSampleFootprintNV: *hasResult = true; *hasResultType = true; break; - case OpGroupNonUniformPartitionNV: *hasResult = true; *hasResultType = true; break; - case OpWritePackedPrimitiveIndices4x8NV: *hasResult = false; *hasResultType = false; break; - case OpReportIntersectionNV: *hasResult = true; *hasResultType = true; break; - case OpIgnoreIntersectionNV: *hasResult = false; *hasResultType = false; break; - case OpTerminateRayNV: *hasResult = false; *hasResultType = false; break; - case OpTraceNV: *hasResult = false; *hasResultType = false; break; - case OpTraceMotionNV: *hasResult = false; *hasResultType = false; break; - case OpTraceRayMotionNV: *hasResult = false; *hasResultType = false; break; - case OpTypeAccelerationStructureNV: *hasResult = true; *hasResultType = false; break; - case OpExecuteCallableNV: *hasResult = false; *hasResultType = false; break; - case OpTypeCooperativeMatrixNV: *hasResult = true; *hasResultType = false; break; - case OpCooperativeMatrixLoadNV: *hasResult = true; *hasResultType = true; break; - case OpCooperativeMatrixStoreNV: *hasResult = false; *hasResultType = false; break; - case OpCooperativeMatrixMulAddNV: *hasResult = true; *hasResultType = true; break; - case OpCooperativeMatrixLengthNV: *hasResult = true; *hasResultType = true; break; - case OpBeginInvocationInterlockEXT: *hasResult = false; *hasResultType = false; break; - case OpEndInvocationInterlockEXT: *hasResult = false; *hasResultType = false; break; - case OpDemoteToHelperInvocation: *hasResult = false; *hasResultType = false; break; - case OpIsHelperInvocationEXT: *hasResult = true; *hasResultType = true; break; - case OpConvertUToImageNV: *hasResult = true; *hasResultType = true; break; - case OpConvertUToSamplerNV: *hasResult = true; *hasResultType = true; break; - case OpConvertImageToUNV: *hasResult = true; *hasResultType = true; break; - case OpConvertSamplerToUNV: *hasResult = true; *hasResultType = true; break; - case OpConvertUToSampledImageNV: *hasResult = true; *hasResultType = true; break; - case OpConvertSampledImageToUNV: *hasResult = true; *hasResultType = true; break; - case OpSamplerImageAddressingModeNV: *hasResult = false; *hasResultType = false; break; - case OpSubgroupShuffleINTEL: *hasResult = true; *hasResultType = true; break; - case OpSubgroupShuffleDownINTEL: *hasResult = true; *hasResultType = true; break; - case OpSubgroupShuffleUpINTEL: *hasResult = true; *hasResultType = true; break; - case OpSubgroupShuffleXorINTEL: *hasResult = true; *hasResultType = true; break; - case OpSubgroupBlockReadINTEL: *hasResult = true; *hasResultType = true; break; - case OpSubgroupBlockWriteINTEL: *hasResult = false; *hasResultType = false; break; - case OpSubgroupImageBlockReadINTEL: *hasResult = true; *hasResultType = true; break; - case OpSubgroupImageBlockWriteINTEL: *hasResult = false; *hasResultType = false; break; - case OpSubgroupImageMediaBlockReadINTEL: *hasResult = true; *hasResultType = true; break; - case OpSubgroupImageMediaBlockWriteINTEL: *hasResult = false; *hasResultType = false; break; - case OpUCountLeadingZerosINTEL: *hasResult = true; *hasResultType = true; break; - case OpUCountTrailingZerosINTEL: *hasResult = true; *hasResultType = true; break; - case OpAbsISubINTEL: *hasResult = true; *hasResultType = true; break; - case OpAbsUSubINTEL: *hasResult = true; *hasResultType = true; break; - case OpIAddSatINTEL: *hasResult = true; *hasResultType = true; break; - case OpUAddSatINTEL: *hasResult = true; *hasResultType = true; break; - case OpIAverageINTEL: *hasResult = true; *hasResultType = true; break; - case OpUAverageINTEL: *hasResult = true; *hasResultType = true; break; - case OpIAverageRoundedINTEL: *hasResult = true; *hasResultType = true; break; - case OpUAverageRoundedINTEL: *hasResult = true; *hasResultType = true; break; - case OpISubSatINTEL: *hasResult = true; *hasResultType = true; break; - case OpUSubSatINTEL: *hasResult = true; *hasResultType = true; break; - case OpIMul32x16INTEL: *hasResult = true; *hasResultType = true; break; - case OpUMul32x16INTEL: *hasResult = true; *hasResultType = true; break; - case OpConstantFunctionPointerINTEL: *hasResult = true; *hasResultType = true; break; - case OpFunctionPointerCallINTEL: *hasResult = true; *hasResultType = true; break; - case OpAsmTargetINTEL: *hasResult = true; *hasResultType = true; break; - case OpAsmINTEL: *hasResult = true; *hasResultType = true; break; - case OpAsmCallINTEL: *hasResult = true; *hasResultType = true; break; - case OpAtomicFMinEXT: *hasResult = true; *hasResultType = true; break; - case OpAtomicFMaxEXT: *hasResult = true; *hasResultType = true; break; - case OpAssumeTrueKHR: *hasResult = false; *hasResultType = false; break; - case OpExpectKHR: *hasResult = true; *hasResultType = true; break; - case OpDecorateString: *hasResult = false; *hasResultType = false; break; - case OpMemberDecorateString: *hasResult = false; *hasResultType = false; break; - case OpVmeImageINTEL: *hasResult = true; *hasResultType = true; break; - case OpTypeVmeImageINTEL: *hasResult = true; *hasResultType = false; break; - case OpTypeAvcImePayloadINTEL: *hasResult = true; *hasResultType = false; break; - case OpTypeAvcRefPayloadINTEL: *hasResult = true; *hasResultType = false; break; - case OpTypeAvcSicPayloadINTEL: *hasResult = true; *hasResultType = false; break; - case OpTypeAvcMcePayloadINTEL: *hasResult = true; *hasResultType = false; break; - case OpTypeAvcMceResultINTEL: *hasResult = true; *hasResultType = false; break; - case OpTypeAvcImeResultINTEL: *hasResult = true; *hasResultType = false; break; - case OpTypeAvcImeResultSingleReferenceStreamoutINTEL: *hasResult = true; *hasResultType = false; break; - case OpTypeAvcImeResultDualReferenceStreamoutINTEL: *hasResult = true; *hasResultType = false; break; - case OpTypeAvcImeSingleReferenceStreaminINTEL: *hasResult = true; *hasResultType = false; break; - case OpTypeAvcImeDualReferenceStreaminINTEL: *hasResult = true; *hasResultType = false; break; - case OpTypeAvcRefResultINTEL: *hasResult = true; *hasResultType = false; break; - case OpTypeAvcSicResultINTEL: *hasResult = true; *hasResultType = false; break; - case OpSubgroupAvcMceGetDefaultInterBaseMultiReferencePenaltyINTEL: *hasResult = true; *hasResultType = true; break; - case OpSubgroupAvcMceSetInterBaseMultiReferencePenaltyINTEL: *hasResult = true; *hasResultType = true; break; - case OpSubgroupAvcMceGetDefaultInterShapePenaltyINTEL: *hasResult = true; *hasResultType = true; break; - case OpSubgroupAvcMceSetInterShapePenaltyINTEL: *hasResult = true; *hasResultType = true; break; - case OpSubgroupAvcMceGetDefaultInterDirectionPenaltyINTEL: *hasResult = true; *hasResultType = true; break; - case OpSubgroupAvcMceSetInterDirectionPenaltyINTEL: *hasResult = true; *hasResultType = true; break; - case OpSubgroupAvcMceGetDefaultIntraLumaShapePenaltyINTEL: *hasResult = true; *hasResultType = true; break; - case OpSubgroupAvcMceGetDefaultInterMotionVectorCostTableINTEL: *hasResult = true; *hasResultType = true; break; - case OpSubgroupAvcMceGetDefaultHighPenaltyCostTableINTEL: *hasResult = true; *hasResultType = true; break; - case OpSubgroupAvcMceGetDefaultMediumPenaltyCostTableINTEL: *hasResult = true; *hasResultType = true; break; - case OpSubgroupAvcMceGetDefaultLowPenaltyCostTableINTEL: *hasResult = true; *hasResultType = true; break; - case OpSubgroupAvcMceSetMotionVectorCostFunctionINTEL: *hasResult = true; *hasResultType = true; break; - case OpSubgroupAvcMceGetDefaultIntraLumaModePenaltyINTEL: *hasResult = true; *hasResultType = true; break; - case OpSubgroupAvcMceGetDefaultNonDcLumaIntraPenaltyINTEL: *hasResult = true; *hasResultType = true; break; - case OpSubgroupAvcMceGetDefaultIntraChromaModeBasePenaltyINTEL: *hasResult = true; *hasResultType = true; break; - case OpSubgroupAvcMceSetAcOnlyHaarINTEL: *hasResult = true; *hasResultType = true; break; - case OpSubgroupAvcMceSetSourceInterlacedFieldPolarityINTEL: *hasResult = true; *hasResultType = true; break; - case OpSubgroupAvcMceSetSingleReferenceInterlacedFieldPolarityINTEL: *hasResult = true; *hasResultType = true; break; - case OpSubgroupAvcMceSetDualReferenceInterlacedFieldPolaritiesINTEL: *hasResult = true; *hasResultType = true; break; - case OpSubgroupAvcMceConvertToImePayloadINTEL: *hasResult = true; *hasResultType = true; break; - case OpSubgroupAvcMceConvertToImeResultINTEL: *hasResult = true; *hasResultType = true; break; - case OpSubgroupAvcMceConvertToRefPayloadINTEL: *hasResult = true; *hasResultType = true; break; - case OpSubgroupAvcMceConvertToRefResultINTEL: *hasResult = true; *hasResultType = true; break; - case OpSubgroupAvcMceConvertToSicPayloadINTEL: *hasResult = true; *hasResultType = true; break; - case OpSubgroupAvcMceConvertToSicResultINTEL: *hasResult = true; *hasResultType = true; break; - case OpSubgroupAvcMceGetMotionVectorsINTEL: *hasResult = true; *hasResultType = true; break; - case OpSubgroupAvcMceGetInterDistortionsINTEL: *hasResult = true; *hasResultType = true; break; - case OpSubgroupAvcMceGetBestInterDistortionsINTEL: *hasResult = true; *hasResultType = true; break; - case OpSubgroupAvcMceGetInterMajorShapeINTEL: *hasResult = true; *hasResultType = true; break; - case OpSubgroupAvcMceGetInterMinorShapeINTEL: *hasResult = true; *hasResultType = true; break; - case OpSubgroupAvcMceGetInterDirectionsINTEL: *hasResult = true; *hasResultType = true; break; - case OpSubgroupAvcMceGetInterMotionVectorCountINTEL: *hasResult = true; *hasResultType = true; break; - case OpSubgroupAvcMceGetInterReferenceIdsINTEL: *hasResult = true; *hasResultType = true; break; - case OpSubgroupAvcMceGetInterReferenceInterlacedFieldPolaritiesINTEL: *hasResult = true; *hasResultType = true; break; - case OpSubgroupAvcImeInitializeINTEL: *hasResult = true; *hasResultType = true; break; - case OpSubgroupAvcImeSetSingleReferenceINTEL: *hasResult = true; *hasResultType = true; break; - case OpSubgroupAvcImeSetDualReferenceINTEL: *hasResult = true; *hasResultType = true; break; - case OpSubgroupAvcImeRefWindowSizeINTEL: *hasResult = true; *hasResultType = true; break; - case OpSubgroupAvcImeAdjustRefOffsetINTEL: *hasResult = true; *hasResultType = true; break; - case OpSubgroupAvcImeConvertToMcePayloadINTEL: *hasResult = true; *hasResultType = true; break; - case OpSubgroupAvcImeSetMaxMotionVectorCountINTEL: *hasResult = true; *hasResultType = true; break; - case OpSubgroupAvcImeSetUnidirectionalMixDisableINTEL: *hasResult = true; *hasResultType = true; break; - case OpSubgroupAvcImeSetEarlySearchTerminationThresholdINTEL: *hasResult = true; *hasResultType = true; break; - case OpSubgroupAvcImeSetWeightedSadINTEL: *hasResult = true; *hasResultType = true; break; - case OpSubgroupAvcImeEvaluateWithSingleReferenceINTEL: *hasResult = true; *hasResultType = true; break; - case OpSubgroupAvcImeEvaluateWithDualReferenceINTEL: *hasResult = true; *hasResultType = true; break; - case OpSubgroupAvcImeEvaluateWithSingleReferenceStreaminINTEL: *hasResult = true; *hasResultType = true; break; - case OpSubgroupAvcImeEvaluateWithDualReferenceStreaminINTEL: *hasResult = true; *hasResultType = true; break; - case OpSubgroupAvcImeEvaluateWithSingleReferenceStreamoutINTEL: *hasResult = true; *hasResultType = true; break; - case OpSubgroupAvcImeEvaluateWithDualReferenceStreamoutINTEL: *hasResult = true; *hasResultType = true; break; - case OpSubgroupAvcImeEvaluateWithSingleReferenceStreaminoutINTEL: *hasResult = true; *hasResultType = true; break; - case OpSubgroupAvcImeEvaluateWithDualReferenceStreaminoutINTEL: *hasResult = true; *hasResultType = true; break; - case OpSubgroupAvcImeConvertToMceResultINTEL: *hasResult = true; *hasResultType = true; break; - case OpSubgroupAvcImeGetSingleReferenceStreaminINTEL: *hasResult = true; *hasResultType = true; break; - case OpSubgroupAvcImeGetDualReferenceStreaminINTEL: *hasResult = true; *hasResultType = true; break; - case OpSubgroupAvcImeStripSingleReferenceStreamoutINTEL: *hasResult = true; *hasResultType = true; break; - case OpSubgroupAvcImeStripDualReferenceStreamoutINTEL: *hasResult = true; *hasResultType = true; break; - case OpSubgroupAvcImeGetStreamoutSingleReferenceMajorShapeMotionVectorsINTEL: *hasResult = true; *hasResultType = true; break; - case OpSubgroupAvcImeGetStreamoutSingleReferenceMajorShapeDistortionsINTEL: *hasResult = true; *hasResultType = true; break; - case OpSubgroupAvcImeGetStreamoutSingleReferenceMajorShapeReferenceIdsINTEL: *hasResult = true; *hasResultType = true; break; - case OpSubgroupAvcImeGetStreamoutDualReferenceMajorShapeMotionVectorsINTEL: *hasResult = true; *hasResultType = true; break; - case OpSubgroupAvcImeGetStreamoutDualReferenceMajorShapeDistortionsINTEL: *hasResult = true; *hasResultType = true; break; - case OpSubgroupAvcImeGetStreamoutDualReferenceMajorShapeReferenceIdsINTEL: *hasResult = true; *hasResultType = true; break; - case OpSubgroupAvcImeGetBorderReachedINTEL: *hasResult = true; *hasResultType = true; break; - case OpSubgroupAvcImeGetTruncatedSearchIndicationINTEL: *hasResult = true; *hasResultType = true; break; - case OpSubgroupAvcImeGetUnidirectionalEarlySearchTerminationINTEL: *hasResult = true; *hasResultType = true; break; - case OpSubgroupAvcImeGetWeightingPatternMinimumMotionVectorINTEL: *hasResult = true; *hasResultType = true; break; - case OpSubgroupAvcImeGetWeightingPatternMinimumDistortionINTEL: *hasResult = true; *hasResultType = true; break; - case OpSubgroupAvcFmeInitializeINTEL: *hasResult = true; *hasResultType = true; break; - case OpSubgroupAvcBmeInitializeINTEL: *hasResult = true; *hasResultType = true; break; - case OpSubgroupAvcRefConvertToMcePayloadINTEL: *hasResult = true; *hasResultType = true; break; - case OpSubgroupAvcRefSetBidirectionalMixDisableINTEL: *hasResult = true; *hasResultType = true; break; - case OpSubgroupAvcRefSetBilinearFilterEnableINTEL: *hasResult = true; *hasResultType = true; break; - case OpSubgroupAvcRefEvaluateWithSingleReferenceINTEL: *hasResult = true; *hasResultType = true; break; - case OpSubgroupAvcRefEvaluateWithDualReferenceINTEL: *hasResult = true; *hasResultType = true; break; - case OpSubgroupAvcRefEvaluateWithMultiReferenceINTEL: *hasResult = true; *hasResultType = true; break; - case OpSubgroupAvcRefEvaluateWithMultiReferenceInterlacedINTEL: *hasResult = true; *hasResultType = true; break; - case OpSubgroupAvcRefConvertToMceResultINTEL: *hasResult = true; *hasResultType = true; break; - case OpSubgroupAvcSicInitializeINTEL: *hasResult = true; *hasResultType = true; break; - case OpSubgroupAvcSicConfigureSkcINTEL: *hasResult = true; *hasResultType = true; break; - case OpSubgroupAvcSicConfigureIpeLumaINTEL: *hasResult = true; *hasResultType = true; break; - case OpSubgroupAvcSicConfigureIpeLumaChromaINTEL: *hasResult = true; *hasResultType = true; break; - case OpSubgroupAvcSicGetMotionVectorMaskINTEL: *hasResult = true; *hasResultType = true; break; - case OpSubgroupAvcSicConvertToMcePayloadINTEL: *hasResult = true; *hasResultType = true; break; - case OpSubgroupAvcSicSetIntraLumaShapePenaltyINTEL: *hasResult = true; *hasResultType = true; break; - case OpSubgroupAvcSicSetIntraLumaModeCostFunctionINTEL: *hasResult = true; *hasResultType = true; break; - case OpSubgroupAvcSicSetIntraChromaModeCostFunctionINTEL: *hasResult = true; *hasResultType = true; break; - case OpSubgroupAvcSicSetBilinearFilterEnableINTEL: *hasResult = true; *hasResultType = true; break; - case OpSubgroupAvcSicSetSkcForwardTransformEnableINTEL: *hasResult = true; *hasResultType = true; break; - case OpSubgroupAvcSicSetBlockBasedRawSkipSadINTEL: *hasResult = true; *hasResultType = true; break; - case OpSubgroupAvcSicEvaluateIpeINTEL: *hasResult = true; *hasResultType = true; break; - case OpSubgroupAvcSicEvaluateWithSingleReferenceINTEL: *hasResult = true; *hasResultType = true; break; - case OpSubgroupAvcSicEvaluateWithDualReferenceINTEL: *hasResult = true; *hasResultType = true; break; - case OpSubgroupAvcSicEvaluateWithMultiReferenceINTEL: *hasResult = true; *hasResultType = true; break; - case OpSubgroupAvcSicEvaluateWithMultiReferenceInterlacedINTEL: *hasResult = true; *hasResultType = true; break; - case OpSubgroupAvcSicConvertToMceResultINTEL: *hasResult = true; *hasResultType = true; break; - case OpSubgroupAvcSicGetIpeLumaShapeINTEL: *hasResult = true; *hasResultType = true; break; - case OpSubgroupAvcSicGetBestIpeLumaDistortionINTEL: *hasResult = true; *hasResultType = true; break; - case OpSubgroupAvcSicGetBestIpeChromaDistortionINTEL: *hasResult = true; *hasResultType = true; break; - case OpSubgroupAvcSicGetPackedIpeLumaModesINTEL: *hasResult = true; *hasResultType = true; break; - case OpSubgroupAvcSicGetIpeChromaModeINTEL: *hasResult = true; *hasResultType = true; break; - case OpSubgroupAvcSicGetPackedSkcLumaCountThresholdINTEL: *hasResult = true; *hasResultType = true; break; - case OpSubgroupAvcSicGetPackedSkcLumaSumThresholdINTEL: *hasResult = true; *hasResultType = true; break; - case OpSubgroupAvcSicGetInterRawSadsINTEL: *hasResult = true; *hasResultType = true; break; - case OpVariableLengthArrayINTEL: *hasResult = true; *hasResultType = true; break; - case OpSaveMemoryINTEL: *hasResult = true; *hasResultType = true; break; - case OpRestoreMemoryINTEL: *hasResult = false; *hasResultType = false; break; - case OpArbitraryFloatSinCosPiINTEL: *hasResult = true; *hasResultType = true; break; - case OpArbitraryFloatCastINTEL: *hasResult = true; *hasResultType = true; break; - case OpArbitraryFloatCastFromIntINTEL: *hasResult = true; *hasResultType = true; break; - case OpArbitraryFloatCastToIntINTEL: *hasResult = true; *hasResultType = true; break; - case OpArbitraryFloatAddINTEL: *hasResult = true; *hasResultType = true; break; - case OpArbitraryFloatSubINTEL: *hasResult = true; *hasResultType = true; break; - case OpArbitraryFloatMulINTEL: *hasResult = true; *hasResultType = true; break; - case OpArbitraryFloatDivINTEL: *hasResult = true; *hasResultType = true; break; - case OpArbitraryFloatGTINTEL: *hasResult = true; *hasResultType = true; break; - case OpArbitraryFloatGEINTEL: *hasResult = true; *hasResultType = true; break; - case OpArbitraryFloatLTINTEL: *hasResult = true; *hasResultType = true; break; - case OpArbitraryFloatLEINTEL: *hasResult = true; *hasResultType = true; break; - case OpArbitraryFloatEQINTEL: *hasResult = true; *hasResultType = true; break; - case OpArbitraryFloatRecipINTEL: *hasResult = true; *hasResultType = true; break; - case OpArbitraryFloatRSqrtINTEL: *hasResult = true; *hasResultType = true; break; - case OpArbitraryFloatCbrtINTEL: *hasResult = true; *hasResultType = true; break; - case OpArbitraryFloatHypotINTEL: *hasResult = true; *hasResultType = true; break; - case OpArbitraryFloatSqrtINTEL: *hasResult = true; *hasResultType = true; break; - case OpArbitraryFloatLogINTEL: *hasResult = true; *hasResultType = true; break; - case OpArbitraryFloatLog2INTEL: *hasResult = true; *hasResultType = true; break; - case OpArbitraryFloatLog10INTEL: *hasResult = true; *hasResultType = true; break; - case OpArbitraryFloatLog1pINTEL: *hasResult = true; *hasResultType = true; break; - case OpArbitraryFloatExpINTEL: *hasResult = true; *hasResultType = true; break; - case OpArbitraryFloatExp2INTEL: *hasResult = true; *hasResultType = true; break; - case OpArbitraryFloatExp10INTEL: *hasResult = true; *hasResultType = true; break; - case OpArbitraryFloatExpm1INTEL: *hasResult = true; *hasResultType = true; break; - case OpArbitraryFloatSinINTEL: *hasResult = true; *hasResultType = true; break; - case OpArbitraryFloatCosINTEL: *hasResult = true; *hasResultType = true; break; - case OpArbitraryFloatSinCosINTEL: *hasResult = true; *hasResultType = true; break; - case OpArbitraryFloatSinPiINTEL: *hasResult = true; *hasResultType = true; break; - case OpArbitraryFloatCosPiINTEL: *hasResult = true; *hasResultType = true; break; - case OpArbitraryFloatASinINTEL: *hasResult = true; *hasResultType = true; break; - case OpArbitraryFloatASinPiINTEL: *hasResult = true; *hasResultType = true; break; - case OpArbitraryFloatACosINTEL: *hasResult = true; *hasResultType = true; break; - case OpArbitraryFloatACosPiINTEL: *hasResult = true; *hasResultType = true; break; - case OpArbitraryFloatATanINTEL: *hasResult = true; *hasResultType = true; break; - case OpArbitraryFloatATanPiINTEL: *hasResult = true; *hasResultType = true; break; - case OpArbitraryFloatATan2INTEL: *hasResult = true; *hasResultType = true; break; - case OpArbitraryFloatPowINTEL: *hasResult = true; *hasResultType = true; break; - case OpArbitraryFloatPowRINTEL: *hasResult = true; *hasResultType = true; break; - case OpArbitraryFloatPowNINTEL: *hasResult = true; *hasResultType = true; break; - case OpLoopControlINTEL: *hasResult = false; *hasResultType = false; break; - case OpFixedSqrtINTEL: *hasResult = true; *hasResultType = true; break; - case OpFixedRecipINTEL: *hasResult = true; *hasResultType = true; break; - case OpFixedRsqrtINTEL: *hasResult = true; *hasResultType = true; break; - case OpFixedSinINTEL: *hasResult = true; *hasResultType = true; break; - case OpFixedCosINTEL: *hasResult = true; *hasResultType = true; break; - case OpFixedSinCosINTEL: *hasResult = true; *hasResultType = true; break; - case OpFixedSinPiINTEL: *hasResult = true; *hasResultType = true; break; - case OpFixedCosPiINTEL: *hasResult = true; *hasResultType = true; break; - case OpFixedSinCosPiINTEL: *hasResult = true; *hasResultType = true; break; - case OpFixedLogINTEL: *hasResult = true; *hasResultType = true; break; - case OpFixedExpINTEL: *hasResult = true; *hasResultType = true; break; - case OpPtrCastToCrossWorkgroupINTEL: *hasResult = true; *hasResultType = true; break; - case OpCrossWorkgroupCastToPtrINTEL: *hasResult = true; *hasResultType = true; break; - case OpReadPipeBlockingINTEL: *hasResult = true; *hasResultType = true; break; - case OpWritePipeBlockingINTEL: *hasResult = true; *hasResultType = true; break; - case OpFPGARegINTEL: *hasResult = true; *hasResultType = true; break; - case OpRayQueryGetRayTMinKHR: *hasResult = true; *hasResultType = true; break; - case OpRayQueryGetRayFlagsKHR: *hasResult = true; *hasResultType = true; break; - case OpRayQueryGetIntersectionTKHR: *hasResult = true; *hasResultType = true; break; - case OpRayQueryGetIntersectionInstanceCustomIndexKHR: *hasResult = true; *hasResultType = true; break; - case OpRayQueryGetIntersectionInstanceIdKHR: *hasResult = true; *hasResultType = true; break; - case OpRayQueryGetIntersectionInstanceShaderBindingTableRecordOffsetKHR: *hasResult = true; *hasResultType = true; break; - case OpRayQueryGetIntersectionGeometryIndexKHR: *hasResult = true; *hasResultType = true; break; - case OpRayQueryGetIntersectionPrimitiveIndexKHR: *hasResult = true; *hasResultType = true; break; - case OpRayQueryGetIntersectionBarycentricsKHR: *hasResult = true; *hasResultType = true; break; - case OpRayQueryGetIntersectionFrontFaceKHR: *hasResult = true; *hasResultType = true; break; - case OpRayQueryGetIntersectionCandidateAABBOpaqueKHR: *hasResult = true; *hasResultType = true; break; - case OpRayQueryGetIntersectionObjectRayDirectionKHR: *hasResult = true; *hasResultType = true; break; - case OpRayQueryGetIntersectionObjectRayOriginKHR: *hasResult = true; *hasResultType = true; break; - case OpRayQueryGetWorldRayDirectionKHR: *hasResult = true; *hasResultType = true; break; - case OpRayQueryGetWorldRayOriginKHR: *hasResult = true; *hasResultType = true; break; - case OpRayQueryGetIntersectionObjectToWorldKHR: *hasResult = true; *hasResultType = true; break; - case OpRayQueryGetIntersectionWorldToObjectKHR: *hasResult = true; *hasResultType = true; break; - case OpAtomicFAddEXT: *hasResult = true; *hasResultType = true; break; - case OpTypeBufferSurfaceINTEL: *hasResult = true; *hasResultType = false; break; - case OpTypeStructContinuedINTEL: *hasResult = false; *hasResultType = false; break; - case OpConstantCompositeContinuedINTEL: *hasResult = false; *hasResultType = false; break; - case OpSpecConstantCompositeContinuedINTEL: *hasResult = false; *hasResultType = false; break; - } -} -#endif /* SPV_ENABLE_UTILITY_CODE */ - -// Overload operator| for mask bit combining - -inline ImageOperandsMask operator|(ImageOperandsMask a, ImageOperandsMask b) { return ImageOperandsMask(unsigned(a) | unsigned(b)); } -inline FPFastMathModeMask operator|(FPFastMathModeMask a, FPFastMathModeMask b) { return FPFastMathModeMask(unsigned(a) | unsigned(b)); } -inline SelectionControlMask operator|(SelectionControlMask a, SelectionControlMask b) { return SelectionControlMask(unsigned(a) | unsigned(b)); } -inline LoopControlMask operator|(LoopControlMask a, LoopControlMask b) { return LoopControlMask(unsigned(a) | unsigned(b)); } -inline FunctionControlMask operator|(FunctionControlMask a, FunctionControlMask b) { return FunctionControlMask(unsigned(a) | unsigned(b)); } -inline MemorySemanticsMask operator|(MemorySemanticsMask a, MemorySemanticsMask b) { return MemorySemanticsMask(unsigned(a) | unsigned(b)); } -inline MemoryAccessMask operator|(MemoryAccessMask a, MemoryAccessMask b) { return MemoryAccessMask(unsigned(a) | unsigned(b)); } -inline KernelProfilingInfoMask operator|(KernelProfilingInfoMask a, KernelProfilingInfoMask b) { return KernelProfilingInfoMask(unsigned(a) | unsigned(b)); } -inline RayFlagsMask operator|(RayFlagsMask a, RayFlagsMask b) { return RayFlagsMask(unsigned(a) | unsigned(b)); } -inline FragmentShadingRateMask operator|(FragmentShadingRateMask a, FragmentShadingRateMask b) { return FragmentShadingRateMask(unsigned(a) | unsigned(b)); } - -} // end namespace spv - -#endif // #ifndef spirv_HPP - +// Copyright (c) 2014-2020 The Khronos Group Inc. +// +// Permission is hereby granted, free of charge, to any person obtaining a copy +// of this software and/or associated documentation files (the "Materials"), +// to deal in the Materials without restriction, including without limitation +// the rights to use, copy, modify, merge, publish, distribute, sublicense, +// and/or sell copies of the Materials, and to permit persons to whom the +// Materials are furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in +// all copies or substantial portions of the Materials. +// +// MODIFICATIONS TO THIS FILE MAY MEAN IT NO LONGER ACCURATELY REFLECTS KHRONOS +// STANDARDS. THE UNMODIFIED, NORMATIVE VERSIONS OF KHRONOS SPECIFICATIONS AND +// HEADER INFORMATION ARE LOCATED AT https://www.khronos.org/registry/ +// +// THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL +// THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +// FROM,OUT OF OR IN CONNECTION WITH THE MATERIALS OR THE USE OR OTHER DEALINGS +// IN THE MATERIALS. + +// This header is automatically generated by the same tool that creates +// the Binary Section of the SPIR-V specification. + +// Enumeration tokens for SPIR-V, in various styles: +// C, C++, C++11, JSON, Lua, Python, C#, D, Beef +// +// - C will have tokens with a "Spv" prefix, e.g.: SpvSourceLanguageGLSL +// - C++ will have tokens in the "spv" name space, e.g.: spv::SourceLanguageGLSL +// - C++11 will use enum classes in the spv namespace, e.g.: spv::SourceLanguage::GLSL +// - Lua will use tables, e.g.: spv.SourceLanguage.GLSL +// - Python will use dictionaries, e.g.: spv['SourceLanguage']['GLSL'] +// - C# will use enum classes in the Specification class located in the "Spv" namespace, +// e.g.: Spv.Specification.SourceLanguage.GLSL +// - D will have tokens under the "spv" module, e.g: spv.SourceLanguage.GLSL +// - Beef will use enum classes in the Specification class located in the "Spv" namespace, +// e.g.: Spv.Specification.SourceLanguage.GLSL +// +// Some tokens act like mask values, which can be OR'd together, +// while others are mutually exclusive. The mask-like ones have +// "Mask" in their name, and a parallel enum that has the shift +// amount (1 << x) for each corresponding enumerant. + +#ifndef spirv_HPP +#define spirv_HPP + +namespace spv { + +typedef unsigned int Id; + +#define SPV_VERSION 0x10600 +#define SPV_REVISION 1 + +static const unsigned int MagicNumber = 0x07230203; +static const unsigned int Version = 0x00010600; +static const unsigned int Revision = 1; +static const unsigned int OpCodeMask = 0xffff; +static const unsigned int WordCountShift = 16; + +enum SourceLanguage { + SourceLanguageUnknown = 0, + SourceLanguageESSL = 1, + SourceLanguageGLSL = 2, + SourceLanguageOpenCL_C = 3, + SourceLanguageOpenCL_CPP = 4, + SourceLanguageHLSL = 5, + SourceLanguageCPP_for_OpenCL = 6, + SourceLanguageSYCL = 7, + SourceLanguageMax = 0x7fffffff, +}; + +enum ExecutionModel { + ExecutionModelVertex = 0, + ExecutionModelTessellationControl = 1, + ExecutionModelTessellationEvaluation = 2, + ExecutionModelGeometry = 3, + ExecutionModelFragment = 4, + ExecutionModelGLCompute = 5, + ExecutionModelKernel = 6, + ExecutionModelTaskNV = 5267, + ExecutionModelMeshNV = 5268, + ExecutionModelRayGenerationKHR = 5313, + ExecutionModelRayGenerationNV = 5313, + ExecutionModelIntersectionKHR = 5314, + ExecutionModelIntersectionNV = 5314, + ExecutionModelAnyHitKHR = 5315, + ExecutionModelAnyHitNV = 5315, + ExecutionModelClosestHitKHR = 5316, + ExecutionModelClosestHitNV = 5316, + ExecutionModelMissKHR = 5317, + ExecutionModelMissNV = 5317, + ExecutionModelCallableKHR = 5318, + ExecutionModelCallableNV = 5318, + ExecutionModelTaskEXT = 5364, + ExecutionModelMeshEXT = 5365, + ExecutionModelMax = 0x7fffffff, +}; + +enum AddressingModel { + AddressingModelLogical = 0, + AddressingModelPhysical32 = 1, + AddressingModelPhysical64 = 2, + AddressingModelPhysicalStorageBuffer64 = 5348, + AddressingModelPhysicalStorageBuffer64EXT = 5348, + AddressingModelMax = 0x7fffffff, +}; + +enum MemoryModel { + MemoryModelSimple = 0, + MemoryModelGLSL450 = 1, + MemoryModelOpenCL = 2, + MemoryModelVulkan = 3, + MemoryModelVulkanKHR = 3, + MemoryModelMax = 0x7fffffff, +}; + +enum ExecutionMode { + ExecutionModeInvocations = 0, + ExecutionModeSpacingEqual = 1, + ExecutionModeSpacingFractionalEven = 2, + ExecutionModeSpacingFractionalOdd = 3, + ExecutionModeVertexOrderCw = 4, + ExecutionModeVertexOrderCcw = 5, + ExecutionModePixelCenterInteger = 6, + ExecutionModeOriginUpperLeft = 7, + ExecutionModeOriginLowerLeft = 8, + ExecutionModeEarlyFragmentTests = 9, + ExecutionModePointMode = 10, + ExecutionModeXfb = 11, + ExecutionModeDepthReplacing = 12, + ExecutionModeDepthGreater = 14, + ExecutionModeDepthLess = 15, + ExecutionModeDepthUnchanged = 16, + ExecutionModeLocalSize = 17, + ExecutionModeLocalSizeHint = 18, + ExecutionModeInputPoints = 19, + ExecutionModeInputLines = 20, + ExecutionModeInputLinesAdjacency = 21, + ExecutionModeTriangles = 22, + ExecutionModeInputTrianglesAdjacency = 23, + ExecutionModeQuads = 24, + ExecutionModeIsolines = 25, + ExecutionModeOutputVertices = 26, + ExecutionModeOutputPoints = 27, + ExecutionModeOutputLineStrip = 28, + ExecutionModeOutputTriangleStrip = 29, + ExecutionModeVecTypeHint = 30, + ExecutionModeContractionOff = 31, + ExecutionModeInitializer = 33, + ExecutionModeFinalizer = 34, + ExecutionModeSubgroupSize = 35, + ExecutionModeSubgroupsPerWorkgroup = 36, + ExecutionModeSubgroupsPerWorkgroupId = 37, + ExecutionModeLocalSizeId = 38, + ExecutionModeLocalSizeHintId = 39, + ExecutionModeNonCoherentColorAttachmentReadEXT = 4169, + ExecutionModeNonCoherentDepthAttachmentReadEXT = 4170, + ExecutionModeNonCoherentStencilAttachmentReadEXT = 4171, + ExecutionModeSubgroupUniformControlFlowKHR = 4421, + ExecutionModePostDepthCoverage = 4446, + ExecutionModeDenormPreserve = 4459, + ExecutionModeDenormFlushToZero = 4460, + ExecutionModeSignedZeroInfNanPreserve = 4461, + ExecutionModeRoundingModeRTE = 4462, + ExecutionModeRoundingModeRTZ = 4463, + ExecutionModeEarlyAndLateFragmentTestsAMD = 5017, + ExecutionModeStencilRefReplacingEXT = 5027, + ExecutionModeStencilRefUnchangedFrontAMD = 5079, + ExecutionModeStencilRefGreaterFrontAMD = 5080, + ExecutionModeStencilRefLessFrontAMD = 5081, + ExecutionModeStencilRefUnchangedBackAMD = 5082, + ExecutionModeStencilRefGreaterBackAMD = 5083, + ExecutionModeStencilRefLessBackAMD = 5084, + ExecutionModeOutputLinesEXT = 5269, + ExecutionModeOutputLinesNV = 5269, + ExecutionModeOutputPrimitivesEXT = 5270, + ExecutionModeOutputPrimitivesNV = 5270, + ExecutionModeDerivativeGroupQuadsNV = 5289, + ExecutionModeDerivativeGroupLinearNV = 5290, + ExecutionModeOutputTrianglesEXT = 5298, + ExecutionModeOutputTrianglesNV = 5298, + ExecutionModePixelInterlockOrderedEXT = 5366, + ExecutionModePixelInterlockUnorderedEXT = 5367, + ExecutionModeSampleInterlockOrderedEXT = 5368, + ExecutionModeSampleInterlockUnorderedEXT = 5369, + ExecutionModeShadingRateInterlockOrderedEXT = 5370, + ExecutionModeShadingRateInterlockUnorderedEXT = 5371, + ExecutionModeSharedLocalMemorySizeINTEL = 5618, + ExecutionModeRoundingModeRTPINTEL = 5620, + ExecutionModeRoundingModeRTNINTEL = 5621, + ExecutionModeFloatingPointModeALTINTEL = 5622, + ExecutionModeFloatingPointModeIEEEINTEL = 5623, + ExecutionModeMaxWorkgroupSizeINTEL = 5893, + ExecutionModeMaxWorkDimINTEL = 5894, + ExecutionModeNoGlobalOffsetINTEL = 5895, + ExecutionModeNumSIMDWorkitemsINTEL = 5896, + ExecutionModeSchedulerTargetFmaxMhzINTEL = 5903, + ExecutionModeStreamingInterfaceINTEL = 6154, + ExecutionModeNamedBarrierCountINTEL = 6417, + ExecutionModeMax = 0x7fffffff, +}; + +enum StorageClass { + StorageClassUniformConstant = 0, + StorageClassInput = 1, + StorageClassUniform = 2, + StorageClassOutput = 3, + StorageClassWorkgroup = 4, + StorageClassCrossWorkgroup = 5, + StorageClassPrivate = 6, + StorageClassFunction = 7, + StorageClassGeneric = 8, + StorageClassPushConstant = 9, + StorageClassAtomicCounter = 10, + StorageClassImage = 11, + StorageClassStorageBuffer = 12, + StorageClassTileImageEXT = 4172, + StorageClassCallableDataKHR = 5328, + StorageClassCallableDataNV = 5328, + StorageClassIncomingCallableDataKHR = 5329, + StorageClassIncomingCallableDataNV = 5329, + StorageClassRayPayloadKHR = 5338, + StorageClassRayPayloadNV = 5338, + StorageClassHitAttributeKHR = 5339, + StorageClassHitAttributeNV = 5339, + StorageClassIncomingRayPayloadKHR = 5342, + StorageClassIncomingRayPayloadNV = 5342, + StorageClassShaderRecordBufferKHR = 5343, + StorageClassShaderRecordBufferNV = 5343, + StorageClassPhysicalStorageBuffer = 5349, + StorageClassPhysicalStorageBufferEXT = 5349, + StorageClassHitObjectAttributeNV = 5385, + StorageClassTaskPayloadWorkgroupEXT = 5402, + StorageClassCodeSectionINTEL = 5605, + StorageClassDeviceOnlyINTEL = 5936, + StorageClassHostOnlyINTEL = 5937, + StorageClassMax = 0x7fffffff, +}; + +enum Dim { + Dim1D = 0, + Dim2D = 1, + Dim3D = 2, + DimCube = 3, + DimRect = 4, + DimBuffer = 5, + DimSubpassData = 6, + DimTileImageDataEXT = 4173, + DimMax = 0x7fffffff, +}; + +enum SamplerAddressingMode { + SamplerAddressingModeNone = 0, + SamplerAddressingModeClampToEdge = 1, + SamplerAddressingModeClamp = 2, + SamplerAddressingModeRepeat = 3, + SamplerAddressingModeRepeatMirrored = 4, + SamplerAddressingModeMax = 0x7fffffff, +}; + +enum SamplerFilterMode { + SamplerFilterModeNearest = 0, + SamplerFilterModeLinear = 1, + SamplerFilterModeMax = 0x7fffffff, +}; + +enum ImageFormat { + ImageFormatUnknown = 0, + ImageFormatRgba32f = 1, + ImageFormatRgba16f = 2, + ImageFormatR32f = 3, + ImageFormatRgba8 = 4, + ImageFormatRgba8Snorm = 5, + ImageFormatRg32f = 6, + ImageFormatRg16f = 7, + ImageFormatR11fG11fB10f = 8, + ImageFormatR16f = 9, + ImageFormatRgba16 = 10, + ImageFormatRgb10A2 = 11, + ImageFormatRg16 = 12, + ImageFormatRg8 = 13, + ImageFormatR16 = 14, + ImageFormatR8 = 15, + ImageFormatRgba16Snorm = 16, + ImageFormatRg16Snorm = 17, + ImageFormatRg8Snorm = 18, + ImageFormatR16Snorm = 19, + ImageFormatR8Snorm = 20, + ImageFormatRgba32i = 21, + ImageFormatRgba16i = 22, + ImageFormatRgba8i = 23, + ImageFormatR32i = 24, + ImageFormatRg32i = 25, + ImageFormatRg16i = 26, + ImageFormatRg8i = 27, + ImageFormatR16i = 28, + ImageFormatR8i = 29, + ImageFormatRgba32ui = 30, + ImageFormatRgba16ui = 31, + ImageFormatRgba8ui = 32, + ImageFormatR32ui = 33, + ImageFormatRgb10a2ui = 34, + ImageFormatRg32ui = 35, + ImageFormatRg16ui = 36, + ImageFormatRg8ui = 37, + ImageFormatR16ui = 38, + ImageFormatR8ui = 39, + ImageFormatR64ui = 40, + ImageFormatR64i = 41, + ImageFormatMax = 0x7fffffff, +}; + +enum ImageChannelOrder { + ImageChannelOrderR = 0, + ImageChannelOrderA = 1, + ImageChannelOrderRG = 2, + ImageChannelOrderRA = 3, + ImageChannelOrderRGB = 4, + ImageChannelOrderRGBA = 5, + ImageChannelOrderBGRA = 6, + ImageChannelOrderARGB = 7, + ImageChannelOrderIntensity = 8, + ImageChannelOrderLuminance = 9, + ImageChannelOrderRx = 10, + ImageChannelOrderRGx = 11, + ImageChannelOrderRGBx = 12, + ImageChannelOrderDepth = 13, + ImageChannelOrderDepthStencil = 14, + ImageChannelOrdersRGB = 15, + ImageChannelOrdersRGBx = 16, + ImageChannelOrdersRGBA = 17, + ImageChannelOrdersBGRA = 18, + ImageChannelOrderABGR = 19, + ImageChannelOrderMax = 0x7fffffff, +}; + +enum ImageChannelDataType { + ImageChannelDataTypeSnormInt8 = 0, + ImageChannelDataTypeSnormInt16 = 1, + ImageChannelDataTypeUnormInt8 = 2, + ImageChannelDataTypeUnormInt16 = 3, + ImageChannelDataTypeUnormShort565 = 4, + ImageChannelDataTypeUnormShort555 = 5, + ImageChannelDataTypeUnormInt101010 = 6, + ImageChannelDataTypeSignedInt8 = 7, + ImageChannelDataTypeSignedInt16 = 8, + ImageChannelDataTypeSignedInt32 = 9, + ImageChannelDataTypeUnsignedInt8 = 10, + ImageChannelDataTypeUnsignedInt16 = 11, + ImageChannelDataTypeUnsignedInt32 = 12, + ImageChannelDataTypeHalfFloat = 13, + ImageChannelDataTypeFloat = 14, + ImageChannelDataTypeUnormInt24 = 15, + ImageChannelDataTypeUnormInt101010_2 = 16, + ImageChannelDataTypeMax = 0x7fffffff, +}; + +enum ImageOperandsShift { + ImageOperandsBiasShift = 0, + ImageOperandsLodShift = 1, + ImageOperandsGradShift = 2, + ImageOperandsConstOffsetShift = 3, + ImageOperandsOffsetShift = 4, + ImageOperandsConstOffsetsShift = 5, + ImageOperandsSampleShift = 6, + ImageOperandsMinLodShift = 7, + ImageOperandsMakeTexelAvailableShift = 8, + ImageOperandsMakeTexelAvailableKHRShift = 8, + ImageOperandsMakeTexelVisibleShift = 9, + ImageOperandsMakeTexelVisibleKHRShift = 9, + ImageOperandsNonPrivateTexelShift = 10, + ImageOperandsNonPrivateTexelKHRShift = 10, + ImageOperandsVolatileTexelShift = 11, + ImageOperandsVolatileTexelKHRShift = 11, + ImageOperandsSignExtendShift = 12, + ImageOperandsZeroExtendShift = 13, + ImageOperandsNontemporalShift = 14, + ImageOperandsOffsetsShift = 16, + ImageOperandsMax = 0x7fffffff, +}; + +enum ImageOperandsMask { + ImageOperandsMaskNone = 0, + ImageOperandsBiasMask = 0x00000001, + ImageOperandsLodMask = 0x00000002, + ImageOperandsGradMask = 0x00000004, + ImageOperandsConstOffsetMask = 0x00000008, + ImageOperandsOffsetMask = 0x00000010, + ImageOperandsConstOffsetsMask = 0x00000020, + ImageOperandsSampleMask = 0x00000040, + ImageOperandsMinLodMask = 0x00000080, + ImageOperandsMakeTexelAvailableMask = 0x00000100, + ImageOperandsMakeTexelAvailableKHRMask = 0x00000100, + ImageOperandsMakeTexelVisibleMask = 0x00000200, + ImageOperandsMakeTexelVisibleKHRMask = 0x00000200, + ImageOperandsNonPrivateTexelMask = 0x00000400, + ImageOperandsNonPrivateTexelKHRMask = 0x00000400, + ImageOperandsVolatileTexelMask = 0x00000800, + ImageOperandsVolatileTexelKHRMask = 0x00000800, + ImageOperandsSignExtendMask = 0x00001000, + ImageOperandsZeroExtendMask = 0x00002000, + ImageOperandsNontemporalMask = 0x00004000, + ImageOperandsOffsetsMask = 0x00010000, +}; + +enum FPFastMathModeShift { + FPFastMathModeNotNaNShift = 0, + FPFastMathModeNotInfShift = 1, + FPFastMathModeNSZShift = 2, + FPFastMathModeAllowRecipShift = 3, + FPFastMathModeFastShift = 4, + FPFastMathModeAllowContractFastINTELShift = 16, + FPFastMathModeAllowReassocINTELShift = 17, + FPFastMathModeMax = 0x7fffffff, +}; + +enum FPFastMathModeMask { + FPFastMathModeMaskNone = 0, + FPFastMathModeNotNaNMask = 0x00000001, + FPFastMathModeNotInfMask = 0x00000002, + FPFastMathModeNSZMask = 0x00000004, + FPFastMathModeAllowRecipMask = 0x00000008, + FPFastMathModeFastMask = 0x00000010, + FPFastMathModeAllowContractFastINTELMask = 0x00010000, + FPFastMathModeAllowReassocINTELMask = 0x00020000, +}; + +enum FPRoundingMode { + FPRoundingModeRTE = 0, + FPRoundingModeRTZ = 1, + FPRoundingModeRTP = 2, + FPRoundingModeRTN = 3, + FPRoundingModeMax = 0x7fffffff, +}; + +enum LinkageType { + LinkageTypeExport = 0, + LinkageTypeImport = 1, + LinkageTypeLinkOnceODR = 2, + LinkageTypeMax = 0x7fffffff, +}; + +enum AccessQualifier { + AccessQualifierReadOnly = 0, + AccessQualifierWriteOnly = 1, + AccessQualifierReadWrite = 2, + AccessQualifierMax = 0x7fffffff, +}; + +enum FunctionParameterAttribute { + FunctionParameterAttributeZext = 0, + FunctionParameterAttributeSext = 1, + FunctionParameterAttributeByVal = 2, + FunctionParameterAttributeSret = 3, + FunctionParameterAttributeNoAlias = 4, + FunctionParameterAttributeNoCapture = 5, + FunctionParameterAttributeNoWrite = 6, + FunctionParameterAttributeNoReadWrite = 7, + FunctionParameterAttributeRuntimeAlignedINTEL = 5940, + FunctionParameterAttributeMax = 0x7fffffff, +}; + +enum Decoration { + DecorationRelaxedPrecision = 0, + DecorationSpecId = 1, + DecorationBlock = 2, + DecorationBufferBlock = 3, + DecorationRowMajor = 4, + DecorationColMajor = 5, + DecorationArrayStride = 6, + DecorationMatrixStride = 7, + DecorationGLSLShared = 8, + DecorationGLSLPacked = 9, + DecorationCPacked = 10, + DecorationBuiltIn = 11, + DecorationNoPerspective = 13, + DecorationFlat = 14, + DecorationPatch = 15, + DecorationCentroid = 16, + DecorationSample = 17, + DecorationInvariant = 18, + DecorationRestrict = 19, + DecorationAliased = 20, + DecorationVolatile = 21, + DecorationConstant = 22, + DecorationCoherent = 23, + DecorationNonWritable = 24, + DecorationNonReadable = 25, + DecorationUniform = 26, + DecorationUniformId = 27, + DecorationSaturatedConversion = 28, + DecorationStream = 29, + DecorationLocation = 30, + DecorationComponent = 31, + DecorationIndex = 32, + DecorationBinding = 33, + DecorationDescriptorSet = 34, + DecorationOffset = 35, + DecorationXfbBuffer = 36, + DecorationXfbStride = 37, + DecorationFuncParamAttr = 38, + DecorationFPRoundingMode = 39, + DecorationFPFastMathMode = 40, + DecorationLinkageAttributes = 41, + DecorationNoContraction = 42, + DecorationInputAttachmentIndex = 43, + DecorationAlignment = 44, + DecorationMaxByteOffset = 45, + DecorationAlignmentId = 46, + DecorationMaxByteOffsetId = 47, + DecorationNoSignedWrap = 4469, + DecorationNoUnsignedWrap = 4470, + DecorationWeightTextureQCOM = 4487, + DecorationBlockMatchTextureQCOM = 4488, + DecorationExplicitInterpAMD = 4999, + DecorationOverrideCoverageNV = 5248, + DecorationPassthroughNV = 5250, + DecorationViewportRelativeNV = 5252, + DecorationSecondaryViewportRelativeNV = 5256, + DecorationPerPrimitiveEXT = 5271, + DecorationPerPrimitiveNV = 5271, + DecorationPerViewNV = 5272, + DecorationPerTaskNV = 5273, + DecorationPerVertexKHR = 5285, + DecorationPerVertexNV = 5285, + DecorationNonUniform = 5300, + DecorationNonUniformEXT = 5300, + DecorationRestrictPointer = 5355, + DecorationRestrictPointerEXT = 5355, + DecorationAliasedPointer = 5356, + DecorationAliasedPointerEXT = 5356, + DecorationHitObjectShaderRecordBufferNV = 5386, + DecorationBindlessSamplerNV = 5398, + DecorationBindlessImageNV = 5399, + DecorationBoundSamplerNV = 5400, + DecorationBoundImageNV = 5401, + DecorationSIMTCallINTEL = 5599, + DecorationReferencedIndirectlyINTEL = 5602, + DecorationClobberINTEL = 5607, + DecorationSideEffectsINTEL = 5608, + DecorationVectorComputeVariableINTEL = 5624, + DecorationFuncParamIOKindINTEL = 5625, + DecorationVectorComputeFunctionINTEL = 5626, + DecorationStackCallINTEL = 5627, + DecorationGlobalVariableOffsetINTEL = 5628, + DecorationCounterBuffer = 5634, + DecorationHlslCounterBufferGOOGLE = 5634, + DecorationHlslSemanticGOOGLE = 5635, + DecorationUserSemantic = 5635, + DecorationUserTypeGOOGLE = 5636, + DecorationFunctionRoundingModeINTEL = 5822, + DecorationFunctionDenormModeINTEL = 5823, + DecorationRegisterINTEL = 5825, + DecorationMemoryINTEL = 5826, + DecorationNumbanksINTEL = 5827, + DecorationBankwidthINTEL = 5828, + DecorationMaxPrivateCopiesINTEL = 5829, + DecorationSinglepumpINTEL = 5830, + DecorationDoublepumpINTEL = 5831, + DecorationMaxReplicatesINTEL = 5832, + DecorationSimpleDualPortINTEL = 5833, + DecorationMergeINTEL = 5834, + DecorationBankBitsINTEL = 5835, + DecorationForcePow2DepthINTEL = 5836, + DecorationBurstCoalesceINTEL = 5899, + DecorationCacheSizeINTEL = 5900, + DecorationDontStaticallyCoalesceINTEL = 5901, + DecorationPrefetchINTEL = 5902, + DecorationStallEnableINTEL = 5905, + DecorationFuseLoopsInFunctionINTEL = 5907, + DecorationMathOpDSPModeINTEL = 5909, + DecorationAliasScopeINTEL = 5914, + DecorationNoAliasINTEL = 5915, + DecorationInitiationIntervalINTEL = 5917, + DecorationMaxConcurrencyINTEL = 5918, + DecorationPipelineEnableINTEL = 5919, + DecorationBufferLocationINTEL = 5921, + DecorationIOPipeStorageINTEL = 5944, + DecorationFunctionFloatingPointModeINTEL = 6080, + DecorationSingleElementVectorINTEL = 6085, + DecorationVectorComputeCallableFunctionINTEL = 6087, + DecorationMediaBlockIOINTEL = 6140, + DecorationConduitKernelArgumentINTEL = 6175, + DecorationRegisterMapKernelArgumentINTEL = 6176, + DecorationMMHostInterfaceAddressWidthINTEL = 6177, + DecorationMMHostInterfaceDataWidthINTEL = 6178, + DecorationMMHostInterfaceLatencyINTEL = 6179, + DecorationMMHostInterfaceReadWriteModeINTEL = 6180, + DecorationMMHostInterfaceMaxBurstINTEL = 6181, + DecorationMMHostInterfaceWaitRequestINTEL = 6182, + DecorationStableKernelArgumentINTEL = 6183, + DecorationMax = 0x7fffffff, +}; + +enum BuiltIn { + BuiltInPosition = 0, + BuiltInPointSize = 1, + BuiltInClipDistance = 3, + BuiltInCullDistance = 4, + BuiltInVertexId = 5, + BuiltInInstanceId = 6, + BuiltInPrimitiveId = 7, + BuiltInInvocationId = 8, + BuiltInLayer = 9, + BuiltInViewportIndex = 10, + BuiltInTessLevelOuter = 11, + BuiltInTessLevelInner = 12, + BuiltInTessCoord = 13, + BuiltInPatchVertices = 14, + BuiltInFragCoord = 15, + BuiltInPointCoord = 16, + BuiltInFrontFacing = 17, + BuiltInSampleId = 18, + BuiltInSamplePosition = 19, + BuiltInSampleMask = 20, + BuiltInFragDepth = 22, + BuiltInHelperInvocation = 23, + BuiltInNumWorkgroups = 24, + BuiltInWorkgroupSize = 25, + BuiltInWorkgroupId = 26, + BuiltInLocalInvocationId = 27, + BuiltInGlobalInvocationId = 28, + BuiltInLocalInvocationIndex = 29, + BuiltInWorkDim = 30, + BuiltInGlobalSize = 31, + BuiltInEnqueuedWorkgroupSize = 32, + BuiltInGlobalOffset = 33, + BuiltInGlobalLinearId = 34, + BuiltInSubgroupSize = 36, + BuiltInSubgroupMaxSize = 37, + BuiltInNumSubgroups = 38, + BuiltInNumEnqueuedSubgroups = 39, + BuiltInSubgroupId = 40, + BuiltInSubgroupLocalInvocationId = 41, + BuiltInVertexIndex = 42, + BuiltInInstanceIndex = 43, + BuiltInCoreIDARM = 4160, + BuiltInCoreCountARM = 4161, + BuiltInCoreMaxIDARM = 4162, + BuiltInWarpIDARM = 4163, + BuiltInWarpMaxIDARM = 4164, + BuiltInSubgroupEqMask = 4416, + BuiltInSubgroupEqMaskKHR = 4416, + BuiltInSubgroupGeMask = 4417, + BuiltInSubgroupGeMaskKHR = 4417, + BuiltInSubgroupGtMask = 4418, + BuiltInSubgroupGtMaskKHR = 4418, + BuiltInSubgroupLeMask = 4419, + BuiltInSubgroupLeMaskKHR = 4419, + BuiltInSubgroupLtMask = 4420, + BuiltInSubgroupLtMaskKHR = 4420, + BuiltInBaseVertex = 4424, + BuiltInBaseInstance = 4425, + BuiltInDrawIndex = 4426, + BuiltInPrimitiveShadingRateKHR = 4432, + BuiltInDeviceIndex = 4438, + BuiltInViewIndex = 4440, + BuiltInShadingRateKHR = 4444, + BuiltInBaryCoordNoPerspAMD = 4992, + BuiltInBaryCoordNoPerspCentroidAMD = 4993, + BuiltInBaryCoordNoPerspSampleAMD = 4994, + BuiltInBaryCoordSmoothAMD = 4995, + BuiltInBaryCoordSmoothCentroidAMD = 4996, + BuiltInBaryCoordSmoothSampleAMD = 4997, + BuiltInBaryCoordPullModelAMD = 4998, + BuiltInFragStencilRefEXT = 5014, + BuiltInViewportMaskNV = 5253, + BuiltInSecondaryPositionNV = 5257, + BuiltInSecondaryViewportMaskNV = 5258, + BuiltInPositionPerViewNV = 5261, + BuiltInViewportMaskPerViewNV = 5262, + BuiltInFullyCoveredEXT = 5264, + BuiltInTaskCountNV = 5274, + BuiltInPrimitiveCountNV = 5275, + BuiltInPrimitiveIndicesNV = 5276, + BuiltInClipDistancePerViewNV = 5277, + BuiltInCullDistancePerViewNV = 5278, + BuiltInLayerPerViewNV = 5279, + BuiltInMeshViewCountNV = 5280, + BuiltInMeshViewIndicesNV = 5281, + BuiltInBaryCoordKHR = 5286, + BuiltInBaryCoordNV = 5286, + BuiltInBaryCoordNoPerspKHR = 5287, + BuiltInBaryCoordNoPerspNV = 5287, + BuiltInFragSizeEXT = 5292, + BuiltInFragmentSizeNV = 5292, + BuiltInFragInvocationCountEXT = 5293, + BuiltInInvocationsPerPixelNV = 5293, + BuiltInPrimitivePointIndicesEXT = 5294, + BuiltInPrimitiveLineIndicesEXT = 5295, + BuiltInPrimitiveTriangleIndicesEXT = 5296, + BuiltInCullPrimitiveEXT = 5299, + BuiltInLaunchIdKHR = 5319, + BuiltInLaunchIdNV = 5319, + BuiltInLaunchSizeKHR = 5320, + BuiltInLaunchSizeNV = 5320, + BuiltInWorldRayOriginKHR = 5321, + BuiltInWorldRayOriginNV = 5321, + BuiltInWorldRayDirectionKHR = 5322, + BuiltInWorldRayDirectionNV = 5322, + BuiltInObjectRayOriginKHR = 5323, + BuiltInObjectRayOriginNV = 5323, + BuiltInObjectRayDirectionKHR = 5324, + BuiltInObjectRayDirectionNV = 5324, + BuiltInRayTminKHR = 5325, + BuiltInRayTminNV = 5325, + BuiltInRayTmaxKHR = 5326, + BuiltInRayTmaxNV = 5326, + BuiltInInstanceCustomIndexKHR = 5327, + BuiltInInstanceCustomIndexNV = 5327, + BuiltInObjectToWorldKHR = 5330, + BuiltInObjectToWorldNV = 5330, + BuiltInWorldToObjectKHR = 5331, + BuiltInWorldToObjectNV = 5331, + BuiltInHitTNV = 5332, + BuiltInHitKindKHR = 5333, + BuiltInHitKindNV = 5333, + BuiltInCurrentRayTimeNV = 5334, + BuiltInHitTriangleVertexPositionsKHR = 5335, + BuiltInHitMicroTriangleVertexPositionsNV = 5337, + BuiltInHitMicroTriangleVertexBarycentricsNV = 5344, + BuiltInHitKindFrontFacingMicroTriangleNV = 5405, + BuiltInHitKindBackFacingMicroTriangleNV = 5406, + BuiltInIncomingRayFlagsKHR = 5351, + BuiltInIncomingRayFlagsNV = 5351, + BuiltInRayGeometryIndexKHR = 5352, + BuiltInWarpsPerSMNV = 5374, + BuiltInSMCountNV = 5375, + BuiltInWarpIDNV = 5376, + BuiltInSMIDNV = 5377, + BuiltInCullMaskKHR = 6021, + BuiltInMax = 0x7fffffff, +}; + +enum SelectionControlShift { + SelectionControlFlattenShift = 0, + SelectionControlDontFlattenShift = 1, + SelectionControlMax = 0x7fffffff, +}; + +enum SelectionControlMask { + SelectionControlMaskNone = 0, + SelectionControlFlattenMask = 0x00000001, + SelectionControlDontFlattenMask = 0x00000002, +}; + +enum LoopControlShift { + LoopControlUnrollShift = 0, + LoopControlDontUnrollShift = 1, + LoopControlDependencyInfiniteShift = 2, + LoopControlDependencyLengthShift = 3, + LoopControlMinIterationsShift = 4, + LoopControlMaxIterationsShift = 5, + LoopControlIterationMultipleShift = 6, + LoopControlPeelCountShift = 7, + LoopControlPartialCountShift = 8, + LoopControlInitiationIntervalINTELShift = 16, + LoopControlMaxConcurrencyINTELShift = 17, + LoopControlDependencyArrayINTELShift = 18, + LoopControlPipelineEnableINTELShift = 19, + LoopControlLoopCoalesceINTELShift = 20, + LoopControlMaxInterleavingINTELShift = 21, + LoopControlSpeculatedIterationsINTELShift = 22, + LoopControlNoFusionINTELShift = 23, + LoopControlLoopCountINTELShift = 24, + LoopControlMaxReinvocationDelayINTELShift = 25, + LoopControlMax = 0x7fffffff, +}; + +enum LoopControlMask { + LoopControlMaskNone = 0, + LoopControlUnrollMask = 0x00000001, + LoopControlDontUnrollMask = 0x00000002, + LoopControlDependencyInfiniteMask = 0x00000004, + LoopControlDependencyLengthMask = 0x00000008, + LoopControlMinIterationsMask = 0x00000010, + LoopControlMaxIterationsMask = 0x00000020, + LoopControlIterationMultipleMask = 0x00000040, + LoopControlPeelCountMask = 0x00000080, + LoopControlPartialCountMask = 0x00000100, + LoopControlInitiationIntervalINTELMask = 0x00010000, + LoopControlMaxConcurrencyINTELMask = 0x00020000, + LoopControlDependencyArrayINTELMask = 0x00040000, + LoopControlPipelineEnableINTELMask = 0x00080000, + LoopControlLoopCoalesceINTELMask = 0x00100000, + LoopControlMaxInterleavingINTELMask = 0x00200000, + LoopControlSpeculatedIterationsINTELMask = 0x00400000, + LoopControlNoFusionINTELMask = 0x00800000, + LoopControlLoopCountINTELMask = 0x01000000, + LoopControlMaxReinvocationDelayINTELMask = 0x02000000, +}; + +enum FunctionControlShift { + FunctionControlInlineShift = 0, + FunctionControlDontInlineShift = 1, + FunctionControlPureShift = 2, + FunctionControlConstShift = 3, + FunctionControlOptNoneINTELShift = 16, + FunctionControlMax = 0x7fffffff, +}; + +enum FunctionControlMask { + FunctionControlMaskNone = 0, + FunctionControlInlineMask = 0x00000001, + FunctionControlDontInlineMask = 0x00000002, + FunctionControlPureMask = 0x00000004, + FunctionControlConstMask = 0x00000008, + FunctionControlOptNoneINTELMask = 0x00010000, +}; + +enum MemorySemanticsShift { + MemorySemanticsAcquireShift = 1, + MemorySemanticsReleaseShift = 2, + MemorySemanticsAcquireReleaseShift = 3, + MemorySemanticsSequentiallyConsistentShift = 4, + MemorySemanticsUniformMemoryShift = 6, + MemorySemanticsSubgroupMemoryShift = 7, + MemorySemanticsWorkgroupMemoryShift = 8, + MemorySemanticsCrossWorkgroupMemoryShift = 9, + MemorySemanticsAtomicCounterMemoryShift = 10, + MemorySemanticsImageMemoryShift = 11, + MemorySemanticsOutputMemoryShift = 12, + MemorySemanticsOutputMemoryKHRShift = 12, + MemorySemanticsMakeAvailableShift = 13, + MemorySemanticsMakeAvailableKHRShift = 13, + MemorySemanticsMakeVisibleShift = 14, + MemorySemanticsMakeVisibleKHRShift = 14, + MemorySemanticsVolatileShift = 15, + MemorySemanticsMax = 0x7fffffff, +}; + +enum MemorySemanticsMask { + MemorySemanticsMaskNone = 0, + MemorySemanticsAcquireMask = 0x00000002, + MemorySemanticsReleaseMask = 0x00000004, + MemorySemanticsAcquireReleaseMask = 0x00000008, + MemorySemanticsSequentiallyConsistentMask = 0x00000010, + MemorySemanticsUniformMemoryMask = 0x00000040, + MemorySemanticsSubgroupMemoryMask = 0x00000080, + MemorySemanticsWorkgroupMemoryMask = 0x00000100, + MemorySemanticsCrossWorkgroupMemoryMask = 0x00000200, + MemorySemanticsAtomicCounterMemoryMask = 0x00000400, + MemorySemanticsImageMemoryMask = 0x00000800, + MemorySemanticsOutputMemoryMask = 0x00001000, + MemorySemanticsOutputMemoryKHRMask = 0x00001000, + MemorySemanticsMakeAvailableMask = 0x00002000, + MemorySemanticsMakeAvailableKHRMask = 0x00002000, + MemorySemanticsMakeVisibleMask = 0x00004000, + MemorySemanticsMakeVisibleKHRMask = 0x00004000, + MemorySemanticsVolatileMask = 0x00008000, +}; + +enum MemoryAccessShift { + MemoryAccessVolatileShift = 0, + MemoryAccessAlignedShift = 1, + MemoryAccessNontemporalShift = 2, + MemoryAccessMakePointerAvailableShift = 3, + MemoryAccessMakePointerAvailableKHRShift = 3, + MemoryAccessMakePointerVisibleShift = 4, + MemoryAccessMakePointerVisibleKHRShift = 4, + MemoryAccessNonPrivatePointerShift = 5, + MemoryAccessNonPrivatePointerKHRShift = 5, + MemoryAccessAliasScopeINTELMaskShift = 16, + MemoryAccessNoAliasINTELMaskShift = 17, + MemoryAccessMax = 0x7fffffff, +}; + +enum MemoryAccessMask { + MemoryAccessMaskNone = 0, + MemoryAccessVolatileMask = 0x00000001, + MemoryAccessAlignedMask = 0x00000002, + MemoryAccessNontemporalMask = 0x00000004, + MemoryAccessMakePointerAvailableMask = 0x00000008, + MemoryAccessMakePointerAvailableKHRMask = 0x00000008, + MemoryAccessMakePointerVisibleMask = 0x00000010, + MemoryAccessMakePointerVisibleKHRMask = 0x00000010, + MemoryAccessNonPrivatePointerMask = 0x00000020, + MemoryAccessNonPrivatePointerKHRMask = 0x00000020, + MemoryAccessAliasScopeINTELMaskMask = 0x00010000, + MemoryAccessNoAliasINTELMaskMask = 0x00020000, +}; + +enum Scope { + ScopeCrossDevice = 0, + ScopeDevice = 1, + ScopeWorkgroup = 2, + ScopeSubgroup = 3, + ScopeInvocation = 4, + ScopeQueueFamily = 5, + ScopeQueueFamilyKHR = 5, + ScopeShaderCallKHR = 6, + ScopeMax = 0x7fffffff, +}; + +enum GroupOperation { + GroupOperationReduce = 0, + GroupOperationInclusiveScan = 1, + GroupOperationExclusiveScan = 2, + GroupOperationClusteredReduce = 3, + GroupOperationPartitionedReduceNV = 6, + GroupOperationPartitionedInclusiveScanNV = 7, + GroupOperationPartitionedExclusiveScanNV = 8, + GroupOperationMax = 0x7fffffff, +}; + +enum KernelEnqueueFlags { + KernelEnqueueFlagsNoWait = 0, + KernelEnqueueFlagsWaitKernel = 1, + KernelEnqueueFlagsWaitWorkGroup = 2, + KernelEnqueueFlagsMax = 0x7fffffff, +}; + +enum KernelProfilingInfoShift { + KernelProfilingInfoCmdExecTimeShift = 0, + KernelProfilingInfoMax = 0x7fffffff, +}; + +enum KernelProfilingInfoMask { + KernelProfilingInfoMaskNone = 0, + KernelProfilingInfoCmdExecTimeMask = 0x00000001, +}; + +enum Capability { + CapabilityMatrix = 0, + CapabilityShader = 1, + CapabilityGeometry = 2, + CapabilityTessellation = 3, + CapabilityAddresses = 4, + CapabilityLinkage = 5, + CapabilityKernel = 6, + CapabilityVector16 = 7, + CapabilityFloat16Buffer = 8, + CapabilityFloat16 = 9, + CapabilityFloat64 = 10, + CapabilityInt64 = 11, + CapabilityInt64Atomics = 12, + CapabilityImageBasic = 13, + CapabilityImageReadWrite = 14, + CapabilityImageMipmap = 15, + CapabilityPipes = 17, + CapabilityGroups = 18, + CapabilityDeviceEnqueue = 19, + CapabilityLiteralSampler = 20, + CapabilityAtomicStorage = 21, + CapabilityInt16 = 22, + CapabilityTessellationPointSize = 23, + CapabilityGeometryPointSize = 24, + CapabilityImageGatherExtended = 25, + CapabilityStorageImageMultisample = 27, + CapabilityUniformBufferArrayDynamicIndexing = 28, + CapabilitySampledImageArrayDynamicIndexing = 29, + CapabilityStorageBufferArrayDynamicIndexing = 30, + CapabilityStorageImageArrayDynamicIndexing = 31, + CapabilityClipDistance = 32, + CapabilityCullDistance = 33, + CapabilityImageCubeArray = 34, + CapabilitySampleRateShading = 35, + CapabilityImageRect = 36, + CapabilitySampledRect = 37, + CapabilityGenericPointer = 38, + CapabilityInt8 = 39, + CapabilityInputAttachment = 40, + CapabilitySparseResidency = 41, + CapabilityMinLod = 42, + CapabilitySampled1D = 43, + CapabilityImage1D = 44, + CapabilitySampledCubeArray = 45, + CapabilitySampledBuffer = 46, + CapabilityImageBuffer = 47, + CapabilityImageMSArray = 48, + CapabilityStorageImageExtendedFormats = 49, + CapabilityImageQuery = 50, + CapabilityDerivativeControl = 51, + CapabilityInterpolationFunction = 52, + CapabilityTransformFeedback = 53, + CapabilityGeometryStreams = 54, + CapabilityStorageImageReadWithoutFormat = 55, + CapabilityStorageImageWriteWithoutFormat = 56, + CapabilityMultiViewport = 57, + CapabilitySubgroupDispatch = 58, + CapabilityNamedBarrier = 59, + CapabilityPipeStorage = 60, + CapabilityGroupNonUniform = 61, + CapabilityGroupNonUniformVote = 62, + CapabilityGroupNonUniformArithmetic = 63, + CapabilityGroupNonUniformBallot = 64, + CapabilityGroupNonUniformShuffle = 65, + CapabilityGroupNonUniformShuffleRelative = 66, + CapabilityGroupNonUniformClustered = 67, + CapabilityGroupNonUniformQuad = 68, + CapabilityShaderLayer = 69, + CapabilityShaderViewportIndex = 70, + CapabilityUniformDecoration = 71, + CapabilityCoreBuiltinsARM = 4165, + CapabilityTileImageColorReadAccessEXT = 4166, + CapabilityTileImageDepthReadAccessEXT = 4167, + CapabilityTileImageStencilReadAccessEXT = 4168, + CapabilityFragmentShadingRateKHR = 4422, + CapabilitySubgroupBallotKHR = 4423, + CapabilityDrawParameters = 4427, + CapabilityWorkgroupMemoryExplicitLayoutKHR = 4428, + CapabilityWorkgroupMemoryExplicitLayout8BitAccessKHR = 4429, + CapabilityWorkgroupMemoryExplicitLayout16BitAccessKHR = 4430, + CapabilitySubgroupVoteKHR = 4431, + CapabilityStorageBuffer16BitAccess = 4433, + CapabilityStorageUniformBufferBlock16 = 4433, + CapabilityStorageUniform16 = 4434, + CapabilityUniformAndStorageBuffer16BitAccess = 4434, + CapabilityStoragePushConstant16 = 4435, + CapabilityStorageInputOutput16 = 4436, + CapabilityDeviceGroup = 4437, + CapabilityMultiView = 4439, + CapabilityVariablePointersStorageBuffer = 4441, + CapabilityVariablePointers = 4442, + CapabilityAtomicStorageOps = 4445, + CapabilitySampleMaskPostDepthCoverage = 4447, + CapabilityStorageBuffer8BitAccess = 4448, + CapabilityUniformAndStorageBuffer8BitAccess = 4449, + CapabilityStoragePushConstant8 = 4450, + CapabilityDenormPreserve = 4464, + CapabilityDenormFlushToZero = 4465, + CapabilitySignedZeroInfNanPreserve = 4466, + CapabilityRoundingModeRTE = 4467, + CapabilityRoundingModeRTZ = 4468, + CapabilityRayQueryProvisionalKHR = 4471, + CapabilityRayQueryKHR = 4472, + CapabilityRayTraversalPrimitiveCullingKHR = 4478, + CapabilityRayTracingKHR = 4479, + CapabilityTextureSampleWeightedQCOM = 4484, + CapabilityTextureBoxFilterQCOM = 4485, + CapabilityTextureBlockMatchQCOM = 4486, + CapabilityFloat16ImageAMD = 5008, + CapabilityImageGatherBiasLodAMD = 5009, + CapabilityFragmentMaskAMD = 5010, + CapabilityStencilExportEXT = 5013, + CapabilityImageReadWriteLodAMD = 5015, + CapabilityInt64ImageEXT = 5016, + CapabilityShaderClockKHR = 5055, + CapabilitySampleMaskOverrideCoverageNV = 5249, + CapabilityGeometryShaderPassthroughNV = 5251, + CapabilityShaderViewportIndexLayerEXT = 5254, + CapabilityShaderViewportIndexLayerNV = 5254, + CapabilityShaderViewportMaskNV = 5255, + CapabilityShaderStereoViewNV = 5259, + CapabilityPerViewAttributesNV = 5260, + CapabilityFragmentFullyCoveredEXT = 5265, + CapabilityMeshShadingNV = 5266, + CapabilityImageFootprintNV = 5282, + CapabilityMeshShadingEXT = 5283, + CapabilityFragmentBarycentricKHR = 5284, + CapabilityFragmentBarycentricNV = 5284, + CapabilityComputeDerivativeGroupQuadsNV = 5288, + CapabilityFragmentDensityEXT = 5291, + CapabilityShadingRateNV = 5291, + CapabilityGroupNonUniformPartitionedNV = 5297, + CapabilityShaderNonUniform = 5301, + CapabilityShaderNonUniformEXT = 5301, + CapabilityRuntimeDescriptorArray = 5302, + CapabilityRuntimeDescriptorArrayEXT = 5302, + CapabilityInputAttachmentArrayDynamicIndexing = 5303, + CapabilityInputAttachmentArrayDynamicIndexingEXT = 5303, + CapabilityUniformTexelBufferArrayDynamicIndexing = 5304, + CapabilityUniformTexelBufferArrayDynamicIndexingEXT = 5304, + CapabilityStorageTexelBufferArrayDynamicIndexing = 5305, + CapabilityStorageTexelBufferArrayDynamicIndexingEXT = 5305, + CapabilityUniformBufferArrayNonUniformIndexing = 5306, + CapabilityUniformBufferArrayNonUniformIndexingEXT = 5306, + CapabilitySampledImageArrayNonUniformIndexing = 5307, + CapabilitySampledImageArrayNonUniformIndexingEXT = 5307, + CapabilityStorageBufferArrayNonUniformIndexing = 5308, + CapabilityStorageBufferArrayNonUniformIndexingEXT = 5308, + CapabilityStorageImageArrayNonUniformIndexing = 5309, + CapabilityStorageImageArrayNonUniformIndexingEXT = 5309, + CapabilityInputAttachmentArrayNonUniformIndexing = 5310, + CapabilityInputAttachmentArrayNonUniformIndexingEXT = 5310, + CapabilityUniformTexelBufferArrayNonUniformIndexing = 5311, + CapabilityUniformTexelBufferArrayNonUniformIndexingEXT = 5311, + CapabilityStorageTexelBufferArrayNonUniformIndexing = 5312, + CapabilityStorageTexelBufferArrayNonUniformIndexingEXT = 5312, + CapabilityRayTracingPositionFetchKHR = 5336, + CapabilityRayTracingNV = 5340, + CapabilityRayTracingMotionBlurNV = 5341, + CapabilityVulkanMemoryModel = 5345, + CapabilityVulkanMemoryModelKHR = 5345, + CapabilityVulkanMemoryModelDeviceScope = 5346, + CapabilityVulkanMemoryModelDeviceScopeKHR = 5346, + CapabilityPhysicalStorageBufferAddresses = 5347, + CapabilityPhysicalStorageBufferAddressesEXT = 5347, + CapabilityComputeDerivativeGroupLinearNV = 5350, + CapabilityRayTracingProvisionalKHR = 5353, + CapabilityCooperativeMatrixNV = 5357, + CapabilityFragmentShaderSampleInterlockEXT = 5363, + CapabilityFragmentShaderShadingRateInterlockEXT = 5372, + CapabilityShaderSMBuiltinsNV = 5373, + CapabilityFragmentShaderPixelInterlockEXT = 5378, + CapabilityDemoteToHelperInvocation = 5379, + CapabilityDemoteToHelperInvocationEXT = 5379, + CapabilityDisplacementMicromapNV = 5380, + CapabilityRayTracingDisplacementMicromapNV = 5409, + CapabilityRayTracingOpacityMicromapEXT = 5381, + CapabilityShaderInvocationReorderNV = 5383, + CapabilityBindlessTextureNV = 5390, + CapabilityRayQueryPositionFetchKHR = 5391, + CapabilitySubgroupShuffleINTEL = 5568, + CapabilitySubgroupBufferBlockIOINTEL = 5569, + CapabilitySubgroupImageBlockIOINTEL = 5570, + CapabilitySubgroupImageMediaBlockIOINTEL = 5579, + CapabilityRoundToInfinityINTEL = 5582, + CapabilityFloatingPointModeINTEL = 5583, + CapabilityIntegerFunctions2INTEL = 5584, + CapabilityFunctionPointersINTEL = 5603, + CapabilityIndirectReferencesINTEL = 5604, + CapabilityAsmINTEL = 5606, + CapabilityAtomicFloat32MinMaxEXT = 5612, + CapabilityAtomicFloat64MinMaxEXT = 5613, + CapabilityAtomicFloat16MinMaxEXT = 5616, + CapabilityVectorComputeINTEL = 5617, + CapabilityVectorAnyINTEL = 5619, + CapabilityExpectAssumeKHR = 5629, + CapabilitySubgroupAvcMotionEstimationINTEL = 5696, + CapabilitySubgroupAvcMotionEstimationIntraINTEL = 5697, + CapabilitySubgroupAvcMotionEstimationChromaINTEL = 5698, + CapabilityVariableLengthArrayINTEL = 5817, + CapabilityFunctionFloatControlINTEL = 5821, + CapabilityFPGAMemoryAttributesINTEL = 5824, + CapabilityFPFastMathModeINTEL = 5837, + CapabilityArbitraryPrecisionIntegersINTEL = 5844, + CapabilityArbitraryPrecisionFloatingPointINTEL = 5845, + CapabilityUnstructuredLoopControlsINTEL = 5886, + CapabilityFPGALoopControlsINTEL = 5888, + CapabilityKernelAttributesINTEL = 5892, + CapabilityFPGAKernelAttributesINTEL = 5897, + CapabilityFPGAMemoryAccessesINTEL = 5898, + CapabilityFPGAClusterAttributesINTEL = 5904, + CapabilityLoopFuseINTEL = 5906, + CapabilityFPGADSPControlINTEL = 5908, + CapabilityMemoryAccessAliasingINTEL = 5910, + CapabilityFPGAInvocationPipeliningAttributesINTEL = 5916, + CapabilityFPGABufferLocationINTEL = 5920, + CapabilityArbitraryPrecisionFixedPointINTEL = 5922, + CapabilityUSMStorageClassesINTEL = 5935, + CapabilityRuntimeAlignedAttributeINTEL = 5939, + CapabilityIOPipesINTEL = 5943, + CapabilityBlockingPipesINTEL = 5945, + CapabilityFPGARegINTEL = 5948, + CapabilityDotProductInputAll = 6016, + CapabilityDotProductInputAllKHR = 6016, + CapabilityDotProductInput4x8Bit = 6017, + CapabilityDotProductInput4x8BitKHR = 6017, + CapabilityDotProductInput4x8BitPacked = 6018, + CapabilityDotProductInput4x8BitPackedKHR = 6018, + CapabilityDotProduct = 6019, + CapabilityDotProductKHR = 6019, + CapabilityRayCullMaskKHR = 6020, + CapabilityCooperativeMatrixKHR = 6022, + CapabilityBitInstructions = 6025, + CapabilityGroupNonUniformRotateKHR = 6026, + CapabilityAtomicFloat32AddEXT = 6033, + CapabilityAtomicFloat64AddEXT = 6034, + CapabilityLongConstantCompositeINTEL = 6089, + CapabilityOptNoneINTEL = 6094, + CapabilityAtomicFloat16AddEXT = 6095, + CapabilityDebugInfoModuleINTEL = 6114, + CapabilitySplitBarrierINTEL = 6141, + CapabilityFPGAArgumentInterfacesINTEL = 6174, + CapabilityGroupUniformArithmeticKHR = 6400, + CapabilityMax = 0x7fffffff, +}; + +enum RayFlagsShift { + RayFlagsOpaqueKHRShift = 0, + RayFlagsNoOpaqueKHRShift = 1, + RayFlagsTerminateOnFirstHitKHRShift = 2, + RayFlagsSkipClosestHitShaderKHRShift = 3, + RayFlagsCullBackFacingTrianglesKHRShift = 4, + RayFlagsCullFrontFacingTrianglesKHRShift = 5, + RayFlagsCullOpaqueKHRShift = 6, + RayFlagsCullNoOpaqueKHRShift = 7, + RayFlagsSkipTrianglesKHRShift = 8, + RayFlagsSkipAABBsKHRShift = 9, + RayFlagsForceOpacityMicromap2StateEXTShift = 10, + RayFlagsMax = 0x7fffffff, +}; + +enum RayFlagsMask { + RayFlagsMaskNone = 0, + RayFlagsOpaqueKHRMask = 0x00000001, + RayFlagsNoOpaqueKHRMask = 0x00000002, + RayFlagsTerminateOnFirstHitKHRMask = 0x00000004, + RayFlagsSkipClosestHitShaderKHRMask = 0x00000008, + RayFlagsCullBackFacingTrianglesKHRMask = 0x00000010, + RayFlagsCullFrontFacingTrianglesKHRMask = 0x00000020, + RayFlagsCullOpaqueKHRMask = 0x00000040, + RayFlagsCullNoOpaqueKHRMask = 0x00000080, + RayFlagsSkipTrianglesKHRMask = 0x00000100, + RayFlagsSkipAABBsKHRMask = 0x00000200, + RayFlagsForceOpacityMicromap2StateEXTMask = 0x00000400, +}; + +enum RayQueryIntersection { + RayQueryIntersectionRayQueryCandidateIntersectionKHR = 0, + RayQueryIntersectionRayQueryCommittedIntersectionKHR = 1, + RayQueryIntersectionMax = 0x7fffffff, +}; + +enum RayQueryCommittedIntersectionType { + RayQueryCommittedIntersectionTypeRayQueryCommittedIntersectionNoneKHR = 0, + RayQueryCommittedIntersectionTypeRayQueryCommittedIntersectionTriangleKHR = 1, + RayQueryCommittedIntersectionTypeRayQueryCommittedIntersectionGeneratedKHR = 2, + RayQueryCommittedIntersectionTypeMax = 0x7fffffff, +}; + +enum RayQueryCandidateIntersectionType { + RayQueryCandidateIntersectionTypeRayQueryCandidateIntersectionTriangleKHR = 0, + RayQueryCandidateIntersectionTypeRayQueryCandidateIntersectionAABBKHR = 1, + RayQueryCandidateIntersectionTypeMax = 0x7fffffff, +}; + +enum FragmentShadingRateShift { + FragmentShadingRateVertical2PixelsShift = 0, + FragmentShadingRateVertical4PixelsShift = 1, + FragmentShadingRateHorizontal2PixelsShift = 2, + FragmentShadingRateHorizontal4PixelsShift = 3, + FragmentShadingRateMax = 0x7fffffff, +}; + +enum FragmentShadingRateMask { + FragmentShadingRateMaskNone = 0, + FragmentShadingRateVertical2PixelsMask = 0x00000001, + FragmentShadingRateVertical4PixelsMask = 0x00000002, + FragmentShadingRateHorizontal2PixelsMask = 0x00000004, + FragmentShadingRateHorizontal4PixelsMask = 0x00000008, +}; + +enum FPDenormMode { + FPDenormModePreserve = 0, + FPDenormModeFlushToZero = 1, + FPDenormModeMax = 0x7fffffff, +}; + +enum FPOperationMode { + FPOperationModeIEEE = 0, + FPOperationModeALT = 1, + FPOperationModeMax = 0x7fffffff, +}; + +enum QuantizationModes { + QuantizationModesTRN = 0, + QuantizationModesTRN_ZERO = 1, + QuantizationModesRND = 2, + QuantizationModesRND_ZERO = 3, + QuantizationModesRND_INF = 4, + QuantizationModesRND_MIN_INF = 5, + QuantizationModesRND_CONV = 6, + QuantizationModesRND_CONV_ODD = 7, + QuantizationModesMax = 0x7fffffff, +}; + +enum OverflowModes { + OverflowModesWRAP = 0, + OverflowModesSAT = 1, + OverflowModesSAT_ZERO = 2, + OverflowModesSAT_SYM = 3, + OverflowModesMax = 0x7fffffff, +}; + +enum PackedVectorFormat { + PackedVectorFormatPackedVectorFormat4x8Bit = 0, + PackedVectorFormatPackedVectorFormat4x8BitKHR = 0, + PackedVectorFormatMax = 0x7fffffff, +}; + +enum CooperativeMatrixOperandsShift { + CooperativeMatrixOperandsMatrixASignedComponentsShift = 0, + CooperativeMatrixOperandsMatrixBSignedComponentsShift = 1, + CooperativeMatrixOperandsMatrixCSignedComponentsShift = 2, + CooperativeMatrixOperandsMatrixResultSignedComponentsShift = 3, + CooperativeMatrixOperandsSaturatingAccumulationShift = 4, + CooperativeMatrixOperandsMax = 0x7fffffff, +}; + +enum CooperativeMatrixOperandsMask { + CooperativeMatrixOperandsMaskNone = 0, + CooperativeMatrixOperandsMatrixASignedComponentsMask = 0x00000001, + CooperativeMatrixOperandsMatrixBSignedComponentsMask = 0x00000002, + CooperativeMatrixOperandsMatrixCSignedComponentsMask = 0x00000004, + CooperativeMatrixOperandsMatrixResultSignedComponentsMask = 0x00000008, + CooperativeMatrixOperandsSaturatingAccumulationMask = 0x00000010, +}; + +enum CooperativeMatrixLayout { + CooperativeMatrixLayoutCooperativeMatrixRowMajorKHR = 0, + CooperativeMatrixLayoutCooperativeMatrixColumnMajorKHR = 1, + CooperativeMatrixLayoutMax = 0x7fffffff, +}; + +enum CooperativeMatrixUse { + CooperativeMatrixUseMatrixAKHR = 0, + CooperativeMatrixUseMatrixBKHR = 1, + CooperativeMatrixUseMatrixAccumulatorKHR = 2, + CooperativeMatrixUseMax = 0x7fffffff, +}; + +enum Op { + OpNop = 0, + OpUndef = 1, + OpSourceContinued = 2, + OpSource = 3, + OpSourceExtension = 4, + OpName = 5, + OpMemberName = 6, + OpString = 7, + OpLine = 8, + OpExtension = 10, + OpExtInstImport = 11, + OpExtInst = 12, + OpMemoryModel = 14, + OpEntryPoint = 15, + OpExecutionMode = 16, + OpCapability = 17, + OpTypeVoid = 19, + OpTypeBool = 20, + OpTypeInt = 21, + OpTypeFloat = 22, + OpTypeVector = 23, + OpTypeMatrix = 24, + OpTypeImage = 25, + OpTypeSampler = 26, + OpTypeSampledImage = 27, + OpTypeArray = 28, + OpTypeRuntimeArray = 29, + OpTypeStruct = 30, + OpTypeOpaque = 31, + OpTypePointer = 32, + OpTypeFunction = 33, + OpTypeEvent = 34, + OpTypeDeviceEvent = 35, + OpTypeReserveId = 36, + OpTypeQueue = 37, + OpTypePipe = 38, + OpTypeForwardPointer = 39, + OpConstantTrue = 41, + OpConstantFalse = 42, + OpConstant = 43, + OpConstantComposite = 44, + OpConstantSampler = 45, + OpConstantNull = 46, + OpSpecConstantTrue = 48, + OpSpecConstantFalse = 49, + OpSpecConstant = 50, + OpSpecConstantComposite = 51, + OpSpecConstantOp = 52, + OpFunction = 54, + OpFunctionParameter = 55, + OpFunctionEnd = 56, + OpFunctionCall = 57, + OpVariable = 59, + OpImageTexelPointer = 60, + OpLoad = 61, + OpStore = 62, + OpCopyMemory = 63, + OpCopyMemorySized = 64, + OpAccessChain = 65, + OpInBoundsAccessChain = 66, + OpPtrAccessChain = 67, + OpArrayLength = 68, + OpGenericPtrMemSemantics = 69, + OpInBoundsPtrAccessChain = 70, + OpDecorate = 71, + OpMemberDecorate = 72, + OpDecorationGroup = 73, + OpGroupDecorate = 74, + OpGroupMemberDecorate = 75, + OpVectorExtractDynamic = 77, + OpVectorInsertDynamic = 78, + OpVectorShuffle = 79, + OpCompositeConstruct = 80, + OpCompositeExtract = 81, + OpCompositeInsert = 82, + OpCopyObject = 83, + OpTranspose = 84, + OpSampledImage = 86, + OpImageSampleImplicitLod = 87, + OpImageSampleExplicitLod = 88, + OpImageSampleDrefImplicitLod = 89, + OpImageSampleDrefExplicitLod = 90, + OpImageSampleProjImplicitLod = 91, + OpImageSampleProjExplicitLod = 92, + OpImageSampleProjDrefImplicitLod = 93, + OpImageSampleProjDrefExplicitLod = 94, + OpImageFetch = 95, + OpImageGather = 96, + OpImageDrefGather = 97, + OpImageRead = 98, + OpImageWrite = 99, + OpImage = 100, + OpImageQueryFormat = 101, + OpImageQueryOrder = 102, + OpImageQuerySizeLod = 103, + OpImageQuerySize = 104, + OpImageQueryLod = 105, + OpImageQueryLevels = 106, + OpImageQuerySamples = 107, + OpConvertFToU = 109, + OpConvertFToS = 110, + OpConvertSToF = 111, + OpConvertUToF = 112, + OpUConvert = 113, + OpSConvert = 114, + OpFConvert = 115, + OpQuantizeToF16 = 116, + OpConvertPtrToU = 117, + OpSatConvertSToU = 118, + OpSatConvertUToS = 119, + OpConvertUToPtr = 120, + OpPtrCastToGeneric = 121, + OpGenericCastToPtr = 122, + OpGenericCastToPtrExplicit = 123, + OpBitcast = 124, + OpSNegate = 126, + OpFNegate = 127, + OpIAdd = 128, + OpFAdd = 129, + OpISub = 130, + OpFSub = 131, + OpIMul = 132, + OpFMul = 133, + OpUDiv = 134, + OpSDiv = 135, + OpFDiv = 136, + OpUMod = 137, + OpSRem = 138, + OpSMod = 139, + OpFRem = 140, + OpFMod = 141, + OpVectorTimesScalar = 142, + OpMatrixTimesScalar = 143, + OpVectorTimesMatrix = 144, + OpMatrixTimesVector = 145, + OpMatrixTimesMatrix = 146, + OpOuterProduct = 147, + OpDot = 148, + OpIAddCarry = 149, + OpISubBorrow = 150, + OpUMulExtended = 151, + OpSMulExtended = 152, + OpAny = 154, + OpAll = 155, + OpIsNan = 156, + OpIsInf = 157, + OpIsFinite = 158, + OpIsNormal = 159, + OpSignBitSet = 160, + OpLessOrGreater = 161, + OpOrdered = 162, + OpUnordered = 163, + OpLogicalEqual = 164, + OpLogicalNotEqual = 165, + OpLogicalOr = 166, + OpLogicalAnd = 167, + OpLogicalNot = 168, + OpSelect = 169, + OpIEqual = 170, + OpINotEqual = 171, + OpUGreaterThan = 172, + OpSGreaterThan = 173, + OpUGreaterThanEqual = 174, + OpSGreaterThanEqual = 175, + OpULessThan = 176, + OpSLessThan = 177, + OpULessThanEqual = 178, + OpSLessThanEqual = 179, + OpFOrdEqual = 180, + OpFUnordEqual = 181, + OpFOrdNotEqual = 182, + OpFUnordNotEqual = 183, + OpFOrdLessThan = 184, + OpFUnordLessThan = 185, + OpFOrdGreaterThan = 186, + OpFUnordGreaterThan = 187, + OpFOrdLessThanEqual = 188, + OpFUnordLessThanEqual = 189, + OpFOrdGreaterThanEqual = 190, + OpFUnordGreaterThanEqual = 191, + OpShiftRightLogical = 194, + OpShiftRightArithmetic = 195, + OpShiftLeftLogical = 196, + OpBitwiseOr = 197, + OpBitwiseXor = 198, + OpBitwiseAnd = 199, + OpNot = 200, + OpBitFieldInsert = 201, + OpBitFieldSExtract = 202, + OpBitFieldUExtract = 203, + OpBitReverse = 204, + OpBitCount = 205, + OpDPdx = 207, + OpDPdy = 208, + OpFwidth = 209, + OpDPdxFine = 210, + OpDPdyFine = 211, + OpFwidthFine = 212, + OpDPdxCoarse = 213, + OpDPdyCoarse = 214, + OpFwidthCoarse = 215, + OpEmitVertex = 218, + OpEndPrimitive = 219, + OpEmitStreamVertex = 220, + OpEndStreamPrimitive = 221, + OpControlBarrier = 224, + OpMemoryBarrier = 225, + OpAtomicLoad = 227, + OpAtomicStore = 228, + OpAtomicExchange = 229, + OpAtomicCompareExchange = 230, + OpAtomicCompareExchangeWeak = 231, + OpAtomicIIncrement = 232, + OpAtomicIDecrement = 233, + OpAtomicIAdd = 234, + OpAtomicISub = 235, + OpAtomicSMin = 236, + OpAtomicUMin = 237, + OpAtomicSMax = 238, + OpAtomicUMax = 239, + OpAtomicAnd = 240, + OpAtomicOr = 241, + OpAtomicXor = 242, + OpPhi = 245, + OpLoopMerge = 246, + OpSelectionMerge = 247, + OpLabel = 248, + OpBranch = 249, + OpBranchConditional = 250, + OpSwitch = 251, + OpKill = 252, + OpReturn = 253, + OpReturnValue = 254, + OpUnreachable = 255, + OpLifetimeStart = 256, + OpLifetimeStop = 257, + OpGroupAsyncCopy = 259, + OpGroupWaitEvents = 260, + OpGroupAll = 261, + OpGroupAny = 262, + OpGroupBroadcast = 263, + OpGroupIAdd = 264, + OpGroupFAdd = 265, + OpGroupFMin = 266, + OpGroupUMin = 267, + OpGroupSMin = 268, + OpGroupFMax = 269, + OpGroupUMax = 270, + OpGroupSMax = 271, + OpReadPipe = 274, + OpWritePipe = 275, + OpReservedReadPipe = 276, + OpReservedWritePipe = 277, + OpReserveReadPipePackets = 278, + OpReserveWritePipePackets = 279, + OpCommitReadPipe = 280, + OpCommitWritePipe = 281, + OpIsValidReserveId = 282, + OpGetNumPipePackets = 283, + OpGetMaxPipePackets = 284, + OpGroupReserveReadPipePackets = 285, + OpGroupReserveWritePipePackets = 286, + OpGroupCommitReadPipe = 287, + OpGroupCommitWritePipe = 288, + OpEnqueueMarker = 291, + OpEnqueueKernel = 292, + OpGetKernelNDrangeSubGroupCount = 293, + OpGetKernelNDrangeMaxSubGroupSize = 294, + OpGetKernelWorkGroupSize = 295, + OpGetKernelPreferredWorkGroupSizeMultiple = 296, + OpRetainEvent = 297, + OpReleaseEvent = 298, + OpCreateUserEvent = 299, + OpIsValidEvent = 300, + OpSetUserEventStatus = 301, + OpCaptureEventProfilingInfo = 302, + OpGetDefaultQueue = 303, + OpBuildNDRange = 304, + OpImageSparseSampleImplicitLod = 305, + OpImageSparseSampleExplicitLod = 306, + OpImageSparseSampleDrefImplicitLod = 307, + OpImageSparseSampleDrefExplicitLod = 308, + OpImageSparseSampleProjImplicitLod = 309, + OpImageSparseSampleProjExplicitLod = 310, + OpImageSparseSampleProjDrefImplicitLod = 311, + OpImageSparseSampleProjDrefExplicitLod = 312, + OpImageSparseFetch = 313, + OpImageSparseGather = 314, + OpImageSparseDrefGather = 315, + OpImageSparseTexelsResident = 316, + OpNoLine = 317, + OpAtomicFlagTestAndSet = 318, + OpAtomicFlagClear = 319, + OpImageSparseRead = 320, + OpSizeOf = 321, + OpTypePipeStorage = 322, + OpConstantPipeStorage = 323, + OpCreatePipeFromPipeStorage = 324, + OpGetKernelLocalSizeForSubgroupCount = 325, + OpGetKernelMaxNumSubgroups = 326, + OpTypeNamedBarrier = 327, + OpNamedBarrierInitialize = 328, + OpMemoryNamedBarrier = 329, + OpModuleProcessed = 330, + OpExecutionModeId = 331, + OpDecorateId = 332, + OpGroupNonUniformElect = 333, + OpGroupNonUniformAll = 334, + OpGroupNonUniformAny = 335, + OpGroupNonUniformAllEqual = 336, + OpGroupNonUniformBroadcast = 337, + OpGroupNonUniformBroadcastFirst = 338, + OpGroupNonUniformBallot = 339, + OpGroupNonUniformInverseBallot = 340, + OpGroupNonUniformBallotBitExtract = 341, + OpGroupNonUniformBallotBitCount = 342, + OpGroupNonUniformBallotFindLSB = 343, + OpGroupNonUniformBallotFindMSB = 344, + OpGroupNonUniformShuffle = 345, + OpGroupNonUniformShuffleXor = 346, + OpGroupNonUniformShuffleUp = 347, + OpGroupNonUniformShuffleDown = 348, + OpGroupNonUniformIAdd = 349, + OpGroupNonUniformFAdd = 350, + OpGroupNonUniformIMul = 351, + OpGroupNonUniformFMul = 352, + OpGroupNonUniformSMin = 353, + OpGroupNonUniformUMin = 354, + OpGroupNonUniformFMin = 355, + OpGroupNonUniformSMax = 356, + OpGroupNonUniformUMax = 357, + OpGroupNonUniformFMax = 358, + OpGroupNonUniformBitwiseAnd = 359, + OpGroupNonUniformBitwiseOr = 360, + OpGroupNonUniformBitwiseXor = 361, + OpGroupNonUniformLogicalAnd = 362, + OpGroupNonUniformLogicalOr = 363, + OpGroupNonUniformLogicalXor = 364, + OpGroupNonUniformQuadBroadcast = 365, + OpGroupNonUniformQuadSwap = 366, + OpCopyLogical = 400, + OpPtrEqual = 401, + OpPtrNotEqual = 402, + OpPtrDiff = 403, + OpColorAttachmentReadEXT = 4160, + OpDepthAttachmentReadEXT = 4161, + OpStencilAttachmentReadEXT = 4162, + OpTerminateInvocation = 4416, + OpSubgroupBallotKHR = 4421, + OpSubgroupFirstInvocationKHR = 4422, + OpSubgroupAllKHR = 4428, + OpSubgroupAnyKHR = 4429, + OpSubgroupAllEqualKHR = 4430, + OpGroupNonUniformRotateKHR = 4431, + OpSubgroupReadInvocationKHR = 4432, + OpTraceRayKHR = 4445, + OpExecuteCallableKHR = 4446, + OpConvertUToAccelerationStructureKHR = 4447, + OpIgnoreIntersectionKHR = 4448, + OpTerminateRayKHR = 4449, + OpSDot = 4450, + OpSDotKHR = 4450, + OpUDot = 4451, + OpUDotKHR = 4451, + OpSUDot = 4452, + OpSUDotKHR = 4452, + OpSDotAccSat = 4453, + OpSDotAccSatKHR = 4453, + OpUDotAccSat = 4454, + OpUDotAccSatKHR = 4454, + OpSUDotAccSat = 4455, + OpSUDotAccSatKHR = 4455, + OpTypeCooperativeMatrixKHR = 4456, + OpCooperativeMatrixLoadKHR = 4457, + OpCooperativeMatrixStoreKHR = 4458, + OpCooperativeMatrixMulAddKHR = 4459, + OpCooperativeMatrixLengthKHR = 4460, + OpTypeRayQueryKHR = 4472, + OpRayQueryInitializeKHR = 4473, + OpRayQueryTerminateKHR = 4474, + OpRayQueryGenerateIntersectionKHR = 4475, + OpRayQueryConfirmIntersectionKHR = 4476, + OpRayQueryProceedKHR = 4477, + OpRayQueryGetIntersectionTypeKHR = 4479, + OpImageSampleWeightedQCOM = 4480, + OpImageBoxFilterQCOM = 4481, + OpImageBlockMatchSSDQCOM = 4482, + OpImageBlockMatchSADQCOM = 4483, + OpGroupIAddNonUniformAMD = 5000, + OpGroupFAddNonUniformAMD = 5001, + OpGroupFMinNonUniformAMD = 5002, + OpGroupUMinNonUniformAMD = 5003, + OpGroupSMinNonUniformAMD = 5004, + OpGroupFMaxNonUniformAMD = 5005, + OpGroupUMaxNonUniformAMD = 5006, + OpGroupSMaxNonUniformAMD = 5007, + OpFragmentMaskFetchAMD = 5011, + OpFragmentFetchAMD = 5012, + OpReadClockKHR = 5056, + OpHitObjectRecordHitMotionNV = 5249, + OpHitObjectRecordHitWithIndexMotionNV = 5250, + OpHitObjectRecordMissMotionNV = 5251, + OpHitObjectGetWorldToObjectNV = 5252, + OpHitObjectGetObjectToWorldNV = 5253, + OpHitObjectGetObjectRayDirectionNV = 5254, + OpHitObjectGetObjectRayOriginNV = 5255, + OpHitObjectTraceRayMotionNV = 5256, + OpHitObjectGetShaderRecordBufferHandleNV = 5257, + OpHitObjectGetShaderBindingTableRecordIndexNV = 5258, + OpHitObjectRecordEmptyNV = 5259, + OpHitObjectTraceRayNV = 5260, + OpHitObjectRecordHitNV = 5261, + OpHitObjectRecordHitWithIndexNV = 5262, + OpHitObjectRecordMissNV = 5263, + OpHitObjectExecuteShaderNV = 5264, + OpHitObjectGetCurrentTimeNV = 5265, + OpHitObjectGetAttributesNV = 5266, + OpHitObjectGetHitKindNV = 5267, + OpHitObjectGetPrimitiveIndexNV = 5268, + OpHitObjectGetGeometryIndexNV = 5269, + OpHitObjectGetInstanceIdNV = 5270, + OpHitObjectGetInstanceCustomIndexNV = 5271, + OpHitObjectGetWorldRayDirectionNV = 5272, + OpHitObjectGetWorldRayOriginNV = 5273, + OpHitObjectGetRayTMaxNV = 5274, + OpHitObjectGetRayTMinNV = 5275, + OpHitObjectIsEmptyNV = 5276, + OpHitObjectIsHitNV = 5277, + OpHitObjectIsMissNV = 5278, + OpReorderThreadWithHitObjectNV = 5279, + OpReorderThreadWithHintNV = 5280, + OpTypeHitObjectNV = 5281, + OpImageSampleFootprintNV = 5283, + OpEmitMeshTasksEXT = 5294, + OpSetMeshOutputsEXT = 5295, + OpGroupNonUniformPartitionNV = 5296, + OpWritePackedPrimitiveIndices4x8NV = 5299, + OpFetchMicroTriangleVertexPositionNV = 5300, + OpFetchMicroTriangleVertexBarycentricNV = 5301, + OpReportIntersectionKHR = 5334, + OpReportIntersectionNV = 5334, + OpIgnoreIntersectionNV = 5335, + OpTerminateRayNV = 5336, + OpTraceNV = 5337, + OpTraceMotionNV = 5338, + OpTraceRayMotionNV = 5339, + OpRayQueryGetIntersectionTriangleVertexPositionsKHR = 5340, + OpTypeAccelerationStructureKHR = 5341, + OpTypeAccelerationStructureNV = 5341, + OpExecuteCallableNV = 5344, + OpTypeCooperativeMatrixNV = 5358, + OpCooperativeMatrixLoadNV = 5359, + OpCooperativeMatrixStoreNV = 5360, + OpCooperativeMatrixMulAddNV = 5361, + OpCooperativeMatrixLengthNV = 5362, + OpBeginInvocationInterlockEXT = 5364, + OpEndInvocationInterlockEXT = 5365, + OpDemoteToHelperInvocation = 5380, + OpDemoteToHelperInvocationEXT = 5380, + OpIsHelperInvocationEXT = 5381, + OpConvertUToImageNV = 5391, + OpConvertUToSamplerNV = 5392, + OpConvertImageToUNV = 5393, + OpConvertSamplerToUNV = 5394, + OpConvertUToSampledImageNV = 5395, + OpConvertSampledImageToUNV = 5396, + OpSamplerImageAddressingModeNV = 5397, + OpSubgroupShuffleINTEL = 5571, + OpSubgroupShuffleDownINTEL = 5572, + OpSubgroupShuffleUpINTEL = 5573, + OpSubgroupShuffleXorINTEL = 5574, + OpSubgroupBlockReadINTEL = 5575, + OpSubgroupBlockWriteINTEL = 5576, + OpSubgroupImageBlockReadINTEL = 5577, + OpSubgroupImageBlockWriteINTEL = 5578, + OpSubgroupImageMediaBlockReadINTEL = 5580, + OpSubgroupImageMediaBlockWriteINTEL = 5581, + OpUCountLeadingZerosINTEL = 5585, + OpUCountTrailingZerosINTEL = 5586, + OpAbsISubINTEL = 5587, + OpAbsUSubINTEL = 5588, + OpIAddSatINTEL = 5589, + OpUAddSatINTEL = 5590, + OpIAverageINTEL = 5591, + OpUAverageINTEL = 5592, + OpIAverageRoundedINTEL = 5593, + OpUAverageRoundedINTEL = 5594, + OpISubSatINTEL = 5595, + OpUSubSatINTEL = 5596, + OpIMul32x16INTEL = 5597, + OpUMul32x16INTEL = 5598, + OpConstantFunctionPointerINTEL = 5600, + OpFunctionPointerCallINTEL = 5601, + OpAsmTargetINTEL = 5609, + OpAsmINTEL = 5610, + OpAsmCallINTEL = 5611, + OpAtomicFMinEXT = 5614, + OpAtomicFMaxEXT = 5615, + OpAssumeTrueKHR = 5630, + OpExpectKHR = 5631, + OpDecorateString = 5632, + OpDecorateStringGOOGLE = 5632, + OpMemberDecorateString = 5633, + OpMemberDecorateStringGOOGLE = 5633, + OpVmeImageINTEL = 5699, + OpTypeVmeImageINTEL = 5700, + OpTypeAvcImePayloadINTEL = 5701, + OpTypeAvcRefPayloadINTEL = 5702, + OpTypeAvcSicPayloadINTEL = 5703, + OpTypeAvcMcePayloadINTEL = 5704, + OpTypeAvcMceResultINTEL = 5705, + OpTypeAvcImeResultINTEL = 5706, + OpTypeAvcImeResultSingleReferenceStreamoutINTEL = 5707, + OpTypeAvcImeResultDualReferenceStreamoutINTEL = 5708, + OpTypeAvcImeSingleReferenceStreaminINTEL = 5709, + OpTypeAvcImeDualReferenceStreaminINTEL = 5710, + OpTypeAvcRefResultINTEL = 5711, + OpTypeAvcSicResultINTEL = 5712, + OpSubgroupAvcMceGetDefaultInterBaseMultiReferencePenaltyINTEL = 5713, + OpSubgroupAvcMceSetInterBaseMultiReferencePenaltyINTEL = 5714, + OpSubgroupAvcMceGetDefaultInterShapePenaltyINTEL = 5715, + OpSubgroupAvcMceSetInterShapePenaltyINTEL = 5716, + OpSubgroupAvcMceGetDefaultInterDirectionPenaltyINTEL = 5717, + OpSubgroupAvcMceSetInterDirectionPenaltyINTEL = 5718, + OpSubgroupAvcMceGetDefaultIntraLumaShapePenaltyINTEL = 5719, + OpSubgroupAvcMceGetDefaultInterMotionVectorCostTableINTEL = 5720, + OpSubgroupAvcMceGetDefaultHighPenaltyCostTableINTEL = 5721, + OpSubgroupAvcMceGetDefaultMediumPenaltyCostTableINTEL = 5722, + OpSubgroupAvcMceGetDefaultLowPenaltyCostTableINTEL = 5723, + OpSubgroupAvcMceSetMotionVectorCostFunctionINTEL = 5724, + OpSubgroupAvcMceGetDefaultIntraLumaModePenaltyINTEL = 5725, + OpSubgroupAvcMceGetDefaultNonDcLumaIntraPenaltyINTEL = 5726, + OpSubgroupAvcMceGetDefaultIntraChromaModeBasePenaltyINTEL = 5727, + OpSubgroupAvcMceSetAcOnlyHaarINTEL = 5728, + OpSubgroupAvcMceSetSourceInterlacedFieldPolarityINTEL = 5729, + OpSubgroupAvcMceSetSingleReferenceInterlacedFieldPolarityINTEL = 5730, + OpSubgroupAvcMceSetDualReferenceInterlacedFieldPolaritiesINTEL = 5731, + OpSubgroupAvcMceConvertToImePayloadINTEL = 5732, + OpSubgroupAvcMceConvertToImeResultINTEL = 5733, + OpSubgroupAvcMceConvertToRefPayloadINTEL = 5734, + OpSubgroupAvcMceConvertToRefResultINTEL = 5735, + OpSubgroupAvcMceConvertToSicPayloadINTEL = 5736, + OpSubgroupAvcMceConvertToSicResultINTEL = 5737, + OpSubgroupAvcMceGetMotionVectorsINTEL = 5738, + OpSubgroupAvcMceGetInterDistortionsINTEL = 5739, + OpSubgroupAvcMceGetBestInterDistortionsINTEL = 5740, + OpSubgroupAvcMceGetInterMajorShapeINTEL = 5741, + OpSubgroupAvcMceGetInterMinorShapeINTEL = 5742, + OpSubgroupAvcMceGetInterDirectionsINTEL = 5743, + OpSubgroupAvcMceGetInterMotionVectorCountINTEL = 5744, + OpSubgroupAvcMceGetInterReferenceIdsINTEL = 5745, + OpSubgroupAvcMceGetInterReferenceInterlacedFieldPolaritiesINTEL = 5746, + OpSubgroupAvcImeInitializeINTEL = 5747, + OpSubgroupAvcImeSetSingleReferenceINTEL = 5748, + OpSubgroupAvcImeSetDualReferenceINTEL = 5749, + OpSubgroupAvcImeRefWindowSizeINTEL = 5750, + OpSubgroupAvcImeAdjustRefOffsetINTEL = 5751, + OpSubgroupAvcImeConvertToMcePayloadINTEL = 5752, + OpSubgroupAvcImeSetMaxMotionVectorCountINTEL = 5753, + OpSubgroupAvcImeSetUnidirectionalMixDisableINTEL = 5754, + OpSubgroupAvcImeSetEarlySearchTerminationThresholdINTEL = 5755, + OpSubgroupAvcImeSetWeightedSadINTEL = 5756, + OpSubgroupAvcImeEvaluateWithSingleReferenceINTEL = 5757, + OpSubgroupAvcImeEvaluateWithDualReferenceINTEL = 5758, + OpSubgroupAvcImeEvaluateWithSingleReferenceStreaminINTEL = 5759, + OpSubgroupAvcImeEvaluateWithDualReferenceStreaminINTEL = 5760, + OpSubgroupAvcImeEvaluateWithSingleReferenceStreamoutINTEL = 5761, + OpSubgroupAvcImeEvaluateWithDualReferenceStreamoutINTEL = 5762, + OpSubgroupAvcImeEvaluateWithSingleReferenceStreaminoutINTEL = 5763, + OpSubgroupAvcImeEvaluateWithDualReferenceStreaminoutINTEL = 5764, + OpSubgroupAvcImeConvertToMceResultINTEL = 5765, + OpSubgroupAvcImeGetSingleReferenceStreaminINTEL = 5766, + OpSubgroupAvcImeGetDualReferenceStreaminINTEL = 5767, + OpSubgroupAvcImeStripSingleReferenceStreamoutINTEL = 5768, + OpSubgroupAvcImeStripDualReferenceStreamoutINTEL = 5769, + OpSubgroupAvcImeGetStreamoutSingleReferenceMajorShapeMotionVectorsINTEL = 5770, + OpSubgroupAvcImeGetStreamoutSingleReferenceMajorShapeDistortionsINTEL = 5771, + OpSubgroupAvcImeGetStreamoutSingleReferenceMajorShapeReferenceIdsINTEL = 5772, + OpSubgroupAvcImeGetStreamoutDualReferenceMajorShapeMotionVectorsINTEL = 5773, + OpSubgroupAvcImeGetStreamoutDualReferenceMajorShapeDistortionsINTEL = 5774, + OpSubgroupAvcImeGetStreamoutDualReferenceMajorShapeReferenceIdsINTEL = 5775, + OpSubgroupAvcImeGetBorderReachedINTEL = 5776, + OpSubgroupAvcImeGetTruncatedSearchIndicationINTEL = 5777, + OpSubgroupAvcImeGetUnidirectionalEarlySearchTerminationINTEL = 5778, + OpSubgroupAvcImeGetWeightingPatternMinimumMotionVectorINTEL = 5779, + OpSubgroupAvcImeGetWeightingPatternMinimumDistortionINTEL = 5780, + OpSubgroupAvcFmeInitializeINTEL = 5781, + OpSubgroupAvcBmeInitializeINTEL = 5782, + OpSubgroupAvcRefConvertToMcePayloadINTEL = 5783, + OpSubgroupAvcRefSetBidirectionalMixDisableINTEL = 5784, + OpSubgroupAvcRefSetBilinearFilterEnableINTEL = 5785, + OpSubgroupAvcRefEvaluateWithSingleReferenceINTEL = 5786, + OpSubgroupAvcRefEvaluateWithDualReferenceINTEL = 5787, + OpSubgroupAvcRefEvaluateWithMultiReferenceINTEL = 5788, + OpSubgroupAvcRefEvaluateWithMultiReferenceInterlacedINTEL = 5789, + OpSubgroupAvcRefConvertToMceResultINTEL = 5790, + OpSubgroupAvcSicInitializeINTEL = 5791, + OpSubgroupAvcSicConfigureSkcINTEL = 5792, + OpSubgroupAvcSicConfigureIpeLumaINTEL = 5793, + OpSubgroupAvcSicConfigureIpeLumaChromaINTEL = 5794, + OpSubgroupAvcSicGetMotionVectorMaskINTEL = 5795, + OpSubgroupAvcSicConvertToMcePayloadINTEL = 5796, + OpSubgroupAvcSicSetIntraLumaShapePenaltyINTEL = 5797, + OpSubgroupAvcSicSetIntraLumaModeCostFunctionINTEL = 5798, + OpSubgroupAvcSicSetIntraChromaModeCostFunctionINTEL = 5799, + OpSubgroupAvcSicSetBilinearFilterEnableINTEL = 5800, + OpSubgroupAvcSicSetSkcForwardTransformEnableINTEL = 5801, + OpSubgroupAvcSicSetBlockBasedRawSkipSadINTEL = 5802, + OpSubgroupAvcSicEvaluateIpeINTEL = 5803, + OpSubgroupAvcSicEvaluateWithSingleReferenceINTEL = 5804, + OpSubgroupAvcSicEvaluateWithDualReferenceINTEL = 5805, + OpSubgroupAvcSicEvaluateWithMultiReferenceINTEL = 5806, + OpSubgroupAvcSicEvaluateWithMultiReferenceInterlacedINTEL = 5807, + OpSubgroupAvcSicConvertToMceResultINTEL = 5808, + OpSubgroupAvcSicGetIpeLumaShapeINTEL = 5809, + OpSubgroupAvcSicGetBestIpeLumaDistortionINTEL = 5810, + OpSubgroupAvcSicGetBestIpeChromaDistortionINTEL = 5811, + OpSubgroupAvcSicGetPackedIpeLumaModesINTEL = 5812, + OpSubgroupAvcSicGetIpeChromaModeINTEL = 5813, + OpSubgroupAvcSicGetPackedSkcLumaCountThresholdINTEL = 5814, + OpSubgroupAvcSicGetPackedSkcLumaSumThresholdINTEL = 5815, + OpSubgroupAvcSicGetInterRawSadsINTEL = 5816, + OpVariableLengthArrayINTEL = 5818, + OpSaveMemoryINTEL = 5819, + OpRestoreMemoryINTEL = 5820, + OpArbitraryFloatSinCosPiINTEL = 5840, + OpArbitraryFloatCastINTEL = 5841, + OpArbitraryFloatCastFromIntINTEL = 5842, + OpArbitraryFloatCastToIntINTEL = 5843, + OpArbitraryFloatAddINTEL = 5846, + OpArbitraryFloatSubINTEL = 5847, + OpArbitraryFloatMulINTEL = 5848, + OpArbitraryFloatDivINTEL = 5849, + OpArbitraryFloatGTINTEL = 5850, + OpArbitraryFloatGEINTEL = 5851, + OpArbitraryFloatLTINTEL = 5852, + OpArbitraryFloatLEINTEL = 5853, + OpArbitraryFloatEQINTEL = 5854, + OpArbitraryFloatRecipINTEL = 5855, + OpArbitraryFloatRSqrtINTEL = 5856, + OpArbitraryFloatCbrtINTEL = 5857, + OpArbitraryFloatHypotINTEL = 5858, + OpArbitraryFloatSqrtINTEL = 5859, + OpArbitraryFloatLogINTEL = 5860, + OpArbitraryFloatLog2INTEL = 5861, + OpArbitraryFloatLog10INTEL = 5862, + OpArbitraryFloatLog1pINTEL = 5863, + OpArbitraryFloatExpINTEL = 5864, + OpArbitraryFloatExp2INTEL = 5865, + OpArbitraryFloatExp10INTEL = 5866, + OpArbitraryFloatExpm1INTEL = 5867, + OpArbitraryFloatSinINTEL = 5868, + OpArbitraryFloatCosINTEL = 5869, + OpArbitraryFloatSinCosINTEL = 5870, + OpArbitraryFloatSinPiINTEL = 5871, + OpArbitraryFloatCosPiINTEL = 5872, + OpArbitraryFloatASinINTEL = 5873, + OpArbitraryFloatASinPiINTEL = 5874, + OpArbitraryFloatACosINTEL = 5875, + OpArbitraryFloatACosPiINTEL = 5876, + OpArbitraryFloatATanINTEL = 5877, + OpArbitraryFloatATanPiINTEL = 5878, + OpArbitraryFloatATan2INTEL = 5879, + OpArbitraryFloatPowINTEL = 5880, + OpArbitraryFloatPowRINTEL = 5881, + OpArbitraryFloatPowNINTEL = 5882, + OpLoopControlINTEL = 5887, + OpAliasDomainDeclINTEL = 5911, + OpAliasScopeDeclINTEL = 5912, + OpAliasScopeListDeclINTEL = 5913, + OpFixedSqrtINTEL = 5923, + OpFixedRecipINTEL = 5924, + OpFixedRsqrtINTEL = 5925, + OpFixedSinINTEL = 5926, + OpFixedCosINTEL = 5927, + OpFixedSinCosINTEL = 5928, + OpFixedSinPiINTEL = 5929, + OpFixedCosPiINTEL = 5930, + OpFixedSinCosPiINTEL = 5931, + OpFixedLogINTEL = 5932, + OpFixedExpINTEL = 5933, + OpPtrCastToCrossWorkgroupINTEL = 5934, + OpCrossWorkgroupCastToPtrINTEL = 5938, + OpReadPipeBlockingINTEL = 5946, + OpWritePipeBlockingINTEL = 5947, + OpFPGARegINTEL = 5949, + OpRayQueryGetRayTMinKHR = 6016, + OpRayQueryGetRayFlagsKHR = 6017, + OpRayQueryGetIntersectionTKHR = 6018, + OpRayQueryGetIntersectionInstanceCustomIndexKHR = 6019, + OpRayQueryGetIntersectionInstanceIdKHR = 6020, + OpRayQueryGetIntersectionInstanceShaderBindingTableRecordOffsetKHR = 6021, + OpRayQueryGetIntersectionGeometryIndexKHR = 6022, + OpRayQueryGetIntersectionPrimitiveIndexKHR = 6023, + OpRayQueryGetIntersectionBarycentricsKHR = 6024, + OpRayQueryGetIntersectionFrontFaceKHR = 6025, + OpRayQueryGetIntersectionCandidateAABBOpaqueKHR = 6026, + OpRayQueryGetIntersectionObjectRayDirectionKHR = 6027, + OpRayQueryGetIntersectionObjectRayOriginKHR = 6028, + OpRayQueryGetWorldRayDirectionKHR = 6029, + OpRayQueryGetWorldRayOriginKHR = 6030, + OpRayQueryGetIntersectionObjectToWorldKHR = 6031, + OpRayQueryGetIntersectionWorldToObjectKHR = 6032, + OpAtomicFAddEXT = 6035, + OpTypeBufferSurfaceINTEL = 6086, + OpTypeStructContinuedINTEL = 6090, + OpConstantCompositeContinuedINTEL = 6091, + OpSpecConstantCompositeContinuedINTEL = 6092, + OpControlBarrierArriveINTEL = 6142, + OpControlBarrierWaitINTEL = 6143, + OpGroupIMulKHR = 6401, + OpGroupFMulKHR = 6402, + OpGroupBitwiseAndKHR = 6403, + OpGroupBitwiseOrKHR = 6404, + OpGroupBitwiseXorKHR = 6405, + OpGroupLogicalAndKHR = 6406, + OpGroupLogicalOrKHR = 6407, + OpGroupLogicalXorKHR = 6408, + OpMax = 0x7fffffff, +}; + +#ifdef SPV_ENABLE_UTILITY_CODE +#ifndef __cplusplus +#include +#endif +inline void HasResultAndType(Op opcode, bool *hasResult, bool *hasResultType) { + *hasResult = *hasResultType = false; + switch (opcode) { + default: /* unknown opcode */ break; + case OpNop: *hasResult = false; *hasResultType = false; break; + case OpUndef: *hasResult = true; *hasResultType = true; break; + case OpSourceContinued: *hasResult = false; *hasResultType = false; break; + case OpSource: *hasResult = false; *hasResultType = false; break; + case OpSourceExtension: *hasResult = false; *hasResultType = false; break; + case OpName: *hasResult = false; *hasResultType = false; break; + case OpMemberName: *hasResult = false; *hasResultType = false; break; + case OpString: *hasResult = true; *hasResultType = false; break; + case OpLine: *hasResult = false; *hasResultType = false; break; + case OpExtension: *hasResult = false; *hasResultType = false; break; + case OpExtInstImport: *hasResult = true; *hasResultType = false; break; + case OpExtInst: *hasResult = true; *hasResultType = true; break; + case OpMemoryModel: *hasResult = false; *hasResultType = false; break; + case OpEntryPoint: *hasResult = false; *hasResultType = false; break; + case OpExecutionMode: *hasResult = false; *hasResultType = false; break; + case OpCapability: *hasResult = false; *hasResultType = false; break; + case OpTypeVoid: *hasResult = true; *hasResultType = false; break; + case OpTypeBool: *hasResult = true; *hasResultType = false; break; + case OpTypeInt: *hasResult = true; *hasResultType = false; break; + case OpTypeFloat: *hasResult = true; *hasResultType = false; break; + case OpTypeVector: *hasResult = true; *hasResultType = false; break; + case OpTypeMatrix: *hasResult = true; *hasResultType = false; break; + case OpTypeImage: *hasResult = true; *hasResultType = false; break; + case OpTypeSampler: *hasResult = true; *hasResultType = false; break; + case OpTypeSampledImage: *hasResult = true; *hasResultType = false; break; + case OpTypeArray: *hasResult = true; *hasResultType = false; break; + case OpTypeRuntimeArray: *hasResult = true; *hasResultType = false; break; + case OpTypeStruct: *hasResult = true; *hasResultType = false; break; + case OpTypeOpaque: *hasResult = true; *hasResultType = false; break; + case OpTypePointer: *hasResult = true; *hasResultType = false; break; + case OpTypeFunction: *hasResult = true; *hasResultType = false; break; + case OpTypeEvent: *hasResult = true; *hasResultType = false; break; + case OpTypeDeviceEvent: *hasResult = true; *hasResultType = false; break; + case OpTypeReserveId: *hasResult = true; *hasResultType = false; break; + case OpTypeQueue: *hasResult = true; *hasResultType = false; break; + case OpTypePipe: *hasResult = true; *hasResultType = false; break; + case OpTypeForwardPointer: *hasResult = false; *hasResultType = false; break; + case OpConstantTrue: *hasResult = true; *hasResultType = true; break; + case OpConstantFalse: *hasResult = true; *hasResultType = true; break; + case OpConstant: *hasResult = true; *hasResultType = true; break; + case OpConstantComposite: *hasResult = true; *hasResultType = true; break; + case OpConstantSampler: *hasResult = true; *hasResultType = true; break; + case OpConstantNull: *hasResult = true; *hasResultType = true; break; + case OpSpecConstantTrue: *hasResult = true; *hasResultType = true; break; + case OpSpecConstantFalse: *hasResult = true; *hasResultType = true; break; + case OpSpecConstant: *hasResult = true; *hasResultType = true; break; + case OpSpecConstantComposite: *hasResult = true; *hasResultType = true; break; + case OpSpecConstantOp: *hasResult = true; *hasResultType = true; break; + case OpFunction: *hasResult = true; *hasResultType = true; break; + case OpFunctionParameter: *hasResult = true; *hasResultType = true; break; + case OpFunctionEnd: *hasResult = false; *hasResultType = false; break; + case OpFunctionCall: *hasResult = true; *hasResultType = true; break; + case OpVariable: *hasResult = true; *hasResultType = true; break; + case OpImageTexelPointer: *hasResult = true; *hasResultType = true; break; + case OpLoad: *hasResult = true; *hasResultType = true; break; + case OpStore: *hasResult = false; *hasResultType = false; break; + case OpCopyMemory: *hasResult = false; *hasResultType = false; break; + case OpCopyMemorySized: *hasResult = false; *hasResultType = false; break; + case OpAccessChain: *hasResult = true; *hasResultType = true; break; + case OpInBoundsAccessChain: *hasResult = true; *hasResultType = true; break; + case OpPtrAccessChain: *hasResult = true; *hasResultType = true; break; + case OpArrayLength: *hasResult = true; *hasResultType = true; break; + case OpGenericPtrMemSemantics: *hasResult = true; *hasResultType = true; break; + case OpInBoundsPtrAccessChain: *hasResult = true; *hasResultType = true; break; + case OpDecorate: *hasResult = false; *hasResultType = false; break; + case OpMemberDecorate: *hasResult = false; *hasResultType = false; break; + case OpDecorationGroup: *hasResult = true; *hasResultType = false; break; + case OpGroupDecorate: *hasResult = false; *hasResultType = false; break; + case OpGroupMemberDecorate: *hasResult = false; *hasResultType = false; break; + case OpVectorExtractDynamic: *hasResult = true; *hasResultType = true; break; + case OpVectorInsertDynamic: *hasResult = true; *hasResultType = true; break; + case OpVectorShuffle: *hasResult = true; *hasResultType = true; break; + case OpCompositeConstruct: *hasResult = true; *hasResultType = true; break; + case OpCompositeExtract: *hasResult = true; *hasResultType = true; break; + case OpCompositeInsert: *hasResult = true; *hasResultType = true; break; + case OpCopyObject: *hasResult = true; *hasResultType = true; break; + case OpTranspose: *hasResult = true; *hasResultType = true; break; + case OpSampledImage: *hasResult = true; *hasResultType = true; break; + case OpImageSampleImplicitLod: *hasResult = true; *hasResultType = true; break; + case OpImageSampleExplicitLod: *hasResult = true; *hasResultType = true; break; + case OpImageSampleDrefImplicitLod: *hasResult = true; *hasResultType = true; break; + case OpImageSampleDrefExplicitLod: *hasResult = true; *hasResultType = true; break; + case OpImageSampleProjImplicitLod: *hasResult = true; *hasResultType = true; break; + case OpImageSampleProjExplicitLod: *hasResult = true; *hasResultType = true; break; + case OpImageSampleProjDrefImplicitLod: *hasResult = true; *hasResultType = true; break; + case OpImageSampleProjDrefExplicitLod: *hasResult = true; *hasResultType = true; break; + case OpImageFetch: *hasResult = true; *hasResultType = true; break; + case OpImageGather: *hasResult = true; *hasResultType = true; break; + case OpImageDrefGather: *hasResult = true; *hasResultType = true; break; + case OpImageRead: *hasResult = true; *hasResultType = true; break; + case OpImageWrite: *hasResult = false; *hasResultType = false; break; + case OpImage: *hasResult = true; *hasResultType = true; break; + case OpImageQueryFormat: *hasResult = true; *hasResultType = true; break; + case OpImageQueryOrder: *hasResult = true; *hasResultType = true; break; + case OpImageQuerySizeLod: *hasResult = true; *hasResultType = true; break; + case OpImageQuerySize: *hasResult = true; *hasResultType = true; break; + case OpImageQueryLod: *hasResult = true; *hasResultType = true; break; + case OpImageQueryLevels: *hasResult = true; *hasResultType = true; break; + case OpImageQuerySamples: *hasResult = true; *hasResultType = true; break; + case OpConvertFToU: *hasResult = true; *hasResultType = true; break; + case OpConvertFToS: *hasResult = true; *hasResultType = true; break; + case OpConvertSToF: *hasResult = true; *hasResultType = true; break; + case OpConvertUToF: *hasResult = true; *hasResultType = true; break; + case OpUConvert: *hasResult = true; *hasResultType = true; break; + case OpSConvert: *hasResult = true; *hasResultType = true; break; + case OpFConvert: *hasResult = true; *hasResultType = true; break; + case OpQuantizeToF16: *hasResult = true; *hasResultType = true; break; + case OpConvertPtrToU: *hasResult = true; *hasResultType = true; break; + case OpSatConvertSToU: *hasResult = true; *hasResultType = true; break; + case OpSatConvertUToS: *hasResult = true; *hasResultType = true; break; + case OpConvertUToPtr: *hasResult = true; *hasResultType = true; break; + case OpPtrCastToGeneric: *hasResult = true; *hasResultType = true; break; + case OpGenericCastToPtr: *hasResult = true; *hasResultType = true; break; + case OpGenericCastToPtrExplicit: *hasResult = true; *hasResultType = true; break; + case OpBitcast: *hasResult = true; *hasResultType = true; break; + case OpSNegate: *hasResult = true; *hasResultType = true; break; + case OpFNegate: *hasResult = true; *hasResultType = true; break; + case OpIAdd: *hasResult = true; *hasResultType = true; break; + case OpFAdd: *hasResult = true; *hasResultType = true; break; + case OpISub: *hasResult = true; *hasResultType = true; break; + case OpFSub: *hasResult = true; *hasResultType = true; break; + case OpIMul: *hasResult = true; *hasResultType = true; break; + case OpFMul: *hasResult = true; *hasResultType = true; break; + case OpUDiv: *hasResult = true; *hasResultType = true; break; + case OpSDiv: *hasResult = true; *hasResultType = true; break; + case OpFDiv: *hasResult = true; *hasResultType = true; break; + case OpUMod: *hasResult = true; *hasResultType = true; break; + case OpSRem: *hasResult = true; *hasResultType = true; break; + case OpSMod: *hasResult = true; *hasResultType = true; break; + case OpFRem: *hasResult = true; *hasResultType = true; break; + case OpFMod: *hasResult = true; *hasResultType = true; break; + case OpVectorTimesScalar: *hasResult = true; *hasResultType = true; break; + case OpMatrixTimesScalar: *hasResult = true; *hasResultType = true; break; + case OpVectorTimesMatrix: *hasResult = true; *hasResultType = true; break; + case OpMatrixTimesVector: *hasResult = true; *hasResultType = true; break; + case OpMatrixTimesMatrix: *hasResult = true; *hasResultType = true; break; + case OpOuterProduct: *hasResult = true; *hasResultType = true; break; + case OpDot: *hasResult = true; *hasResultType = true; break; + case OpIAddCarry: *hasResult = true; *hasResultType = true; break; + case OpISubBorrow: *hasResult = true; *hasResultType = true; break; + case OpUMulExtended: *hasResult = true; *hasResultType = true; break; + case OpSMulExtended: *hasResult = true; *hasResultType = true; break; + case OpAny: *hasResult = true; *hasResultType = true; break; + case OpAll: *hasResult = true; *hasResultType = true; break; + case OpIsNan: *hasResult = true; *hasResultType = true; break; + case OpIsInf: *hasResult = true; *hasResultType = true; break; + case OpIsFinite: *hasResult = true; *hasResultType = true; break; + case OpIsNormal: *hasResult = true; *hasResultType = true; break; + case OpSignBitSet: *hasResult = true; *hasResultType = true; break; + case OpLessOrGreater: *hasResult = true; *hasResultType = true; break; + case OpOrdered: *hasResult = true; *hasResultType = true; break; + case OpUnordered: *hasResult = true; *hasResultType = true; break; + case OpLogicalEqual: *hasResult = true; *hasResultType = true; break; + case OpLogicalNotEqual: *hasResult = true; *hasResultType = true; break; + case OpLogicalOr: *hasResult = true; *hasResultType = true; break; + case OpLogicalAnd: *hasResult = true; *hasResultType = true; break; + case OpLogicalNot: *hasResult = true; *hasResultType = true; break; + case OpSelect: *hasResult = true; *hasResultType = true; break; + case OpIEqual: *hasResult = true; *hasResultType = true; break; + case OpINotEqual: *hasResult = true; *hasResultType = true; break; + case OpUGreaterThan: *hasResult = true; *hasResultType = true; break; + case OpSGreaterThan: *hasResult = true; *hasResultType = true; break; + case OpUGreaterThanEqual: *hasResult = true; *hasResultType = true; break; + case OpSGreaterThanEqual: *hasResult = true; *hasResultType = true; break; + case OpULessThan: *hasResult = true; *hasResultType = true; break; + case OpSLessThan: *hasResult = true; *hasResultType = true; break; + case OpULessThanEqual: *hasResult = true; *hasResultType = true; break; + case OpSLessThanEqual: *hasResult = true; *hasResultType = true; break; + case OpFOrdEqual: *hasResult = true; *hasResultType = true; break; + case OpFUnordEqual: *hasResult = true; *hasResultType = true; break; + case OpFOrdNotEqual: *hasResult = true; *hasResultType = true; break; + case OpFUnordNotEqual: *hasResult = true; *hasResultType = true; break; + case OpFOrdLessThan: *hasResult = true; *hasResultType = true; break; + case OpFUnordLessThan: *hasResult = true; *hasResultType = true; break; + case OpFOrdGreaterThan: *hasResult = true; *hasResultType = true; break; + case OpFUnordGreaterThan: *hasResult = true; *hasResultType = true; break; + case OpFOrdLessThanEqual: *hasResult = true; *hasResultType = true; break; + case OpFUnordLessThanEqual: *hasResult = true; *hasResultType = true; break; + case OpFOrdGreaterThanEqual: *hasResult = true; *hasResultType = true; break; + case OpFUnordGreaterThanEqual: *hasResult = true; *hasResultType = true; break; + case OpShiftRightLogical: *hasResult = true; *hasResultType = true; break; + case OpShiftRightArithmetic: *hasResult = true; *hasResultType = true; break; + case OpShiftLeftLogical: *hasResult = true; *hasResultType = true; break; + case OpBitwiseOr: *hasResult = true; *hasResultType = true; break; + case OpBitwiseXor: *hasResult = true; *hasResultType = true; break; + case OpBitwiseAnd: *hasResult = true; *hasResultType = true; break; + case OpNot: *hasResult = true; *hasResultType = true; break; + case OpBitFieldInsert: *hasResult = true; *hasResultType = true; break; + case OpBitFieldSExtract: *hasResult = true; *hasResultType = true; break; + case OpBitFieldUExtract: *hasResult = true; *hasResultType = true; break; + case OpBitReverse: *hasResult = true; *hasResultType = true; break; + case OpBitCount: *hasResult = true; *hasResultType = true; break; + case OpDPdx: *hasResult = true; *hasResultType = true; break; + case OpDPdy: *hasResult = true; *hasResultType = true; break; + case OpFwidth: *hasResult = true; *hasResultType = true; break; + case OpDPdxFine: *hasResult = true; *hasResultType = true; break; + case OpDPdyFine: *hasResult = true; *hasResultType = true; break; + case OpFwidthFine: *hasResult = true; *hasResultType = true; break; + case OpDPdxCoarse: *hasResult = true; *hasResultType = true; break; + case OpDPdyCoarse: *hasResult = true; *hasResultType = true; break; + case OpFwidthCoarse: *hasResult = true; *hasResultType = true; break; + case OpEmitVertex: *hasResult = false; *hasResultType = false; break; + case OpEndPrimitive: *hasResult = false; *hasResultType = false; break; + case OpEmitStreamVertex: *hasResult = false; *hasResultType = false; break; + case OpEndStreamPrimitive: *hasResult = false; *hasResultType = false; break; + case OpControlBarrier: *hasResult = false; *hasResultType = false; break; + case OpMemoryBarrier: *hasResult = false; *hasResultType = false; break; + case OpAtomicLoad: *hasResult = true; *hasResultType = true; break; + case OpAtomicStore: *hasResult = false; *hasResultType = false; break; + case OpAtomicExchange: *hasResult = true; *hasResultType = true; break; + case OpAtomicCompareExchange: *hasResult = true; *hasResultType = true; break; + case OpAtomicCompareExchangeWeak: *hasResult = true; *hasResultType = true; break; + case OpAtomicIIncrement: *hasResult = true; *hasResultType = true; break; + case OpAtomicIDecrement: *hasResult = true; *hasResultType = true; break; + case OpAtomicIAdd: *hasResult = true; *hasResultType = true; break; + case OpAtomicISub: *hasResult = true; *hasResultType = true; break; + case OpAtomicSMin: *hasResult = true; *hasResultType = true; break; + case OpAtomicUMin: *hasResult = true; *hasResultType = true; break; + case OpAtomicSMax: *hasResult = true; *hasResultType = true; break; + case OpAtomicUMax: *hasResult = true; *hasResultType = true; break; + case OpAtomicAnd: *hasResult = true; *hasResultType = true; break; + case OpAtomicOr: *hasResult = true; *hasResultType = true; break; + case OpAtomicXor: *hasResult = true; *hasResultType = true; break; + case OpPhi: *hasResult = true; *hasResultType = true; break; + case OpLoopMerge: *hasResult = false; *hasResultType = false; break; + case OpSelectionMerge: *hasResult = false; *hasResultType = false; break; + case OpLabel: *hasResult = true; *hasResultType = false; break; + case OpBranch: *hasResult = false; *hasResultType = false; break; + case OpBranchConditional: *hasResult = false; *hasResultType = false; break; + case OpSwitch: *hasResult = false; *hasResultType = false; break; + case OpKill: *hasResult = false; *hasResultType = false; break; + case OpReturn: *hasResult = false; *hasResultType = false; break; + case OpReturnValue: *hasResult = false; *hasResultType = false; break; + case OpUnreachable: *hasResult = false; *hasResultType = false; break; + case OpLifetimeStart: *hasResult = false; *hasResultType = false; break; + case OpLifetimeStop: *hasResult = false; *hasResultType = false; break; + case OpGroupAsyncCopy: *hasResult = true; *hasResultType = true; break; + case OpGroupWaitEvents: *hasResult = false; *hasResultType = false; break; + case OpGroupAll: *hasResult = true; *hasResultType = true; break; + case OpGroupAny: *hasResult = true; *hasResultType = true; break; + case OpGroupBroadcast: *hasResult = true; *hasResultType = true; break; + case OpGroupIAdd: *hasResult = true; *hasResultType = true; break; + case OpGroupFAdd: *hasResult = true; *hasResultType = true; break; + case OpGroupFMin: *hasResult = true; *hasResultType = true; break; + case OpGroupUMin: *hasResult = true; *hasResultType = true; break; + case OpGroupSMin: *hasResult = true; *hasResultType = true; break; + case OpGroupFMax: *hasResult = true; *hasResultType = true; break; + case OpGroupUMax: *hasResult = true; *hasResultType = true; break; + case OpGroupSMax: *hasResult = true; *hasResultType = true; break; + case OpReadPipe: *hasResult = true; *hasResultType = true; break; + case OpWritePipe: *hasResult = true; *hasResultType = true; break; + case OpReservedReadPipe: *hasResult = true; *hasResultType = true; break; + case OpReservedWritePipe: *hasResult = true; *hasResultType = true; break; + case OpReserveReadPipePackets: *hasResult = true; *hasResultType = true; break; + case OpReserveWritePipePackets: *hasResult = true; *hasResultType = true; break; + case OpCommitReadPipe: *hasResult = false; *hasResultType = false; break; + case OpCommitWritePipe: *hasResult = false; *hasResultType = false; break; + case OpIsValidReserveId: *hasResult = true; *hasResultType = true; break; + case OpGetNumPipePackets: *hasResult = true; *hasResultType = true; break; + case OpGetMaxPipePackets: *hasResult = true; *hasResultType = true; break; + case OpGroupReserveReadPipePackets: *hasResult = true; *hasResultType = true; break; + case OpGroupReserveWritePipePackets: *hasResult = true; *hasResultType = true; break; + case OpGroupCommitReadPipe: *hasResult = false; *hasResultType = false; break; + case OpGroupCommitWritePipe: *hasResult = false; *hasResultType = false; break; + case OpEnqueueMarker: *hasResult = true; *hasResultType = true; break; + case OpEnqueueKernel: *hasResult = true; *hasResultType = true; break; + case OpGetKernelNDrangeSubGroupCount: *hasResult = true; *hasResultType = true; break; + case OpGetKernelNDrangeMaxSubGroupSize: *hasResult = true; *hasResultType = true; break; + case OpGetKernelWorkGroupSize: *hasResult = true; *hasResultType = true; break; + case OpGetKernelPreferredWorkGroupSizeMultiple: *hasResult = true; *hasResultType = true; break; + case OpRetainEvent: *hasResult = false; *hasResultType = false; break; + case OpReleaseEvent: *hasResult = false; *hasResultType = false; break; + case OpCreateUserEvent: *hasResult = true; *hasResultType = true; break; + case OpIsValidEvent: *hasResult = true; *hasResultType = true; break; + case OpSetUserEventStatus: *hasResult = false; *hasResultType = false; break; + case OpCaptureEventProfilingInfo: *hasResult = false; *hasResultType = false; break; + case OpGetDefaultQueue: *hasResult = true; *hasResultType = true; break; + case OpBuildNDRange: *hasResult = true; *hasResultType = true; break; + case OpImageSparseSampleImplicitLod: *hasResult = true; *hasResultType = true; break; + case OpImageSparseSampleExplicitLod: *hasResult = true; *hasResultType = true; break; + case OpImageSparseSampleDrefImplicitLod: *hasResult = true; *hasResultType = true; break; + case OpImageSparseSampleDrefExplicitLod: *hasResult = true; *hasResultType = true; break; + case OpImageSparseSampleProjImplicitLod: *hasResult = true; *hasResultType = true; break; + case OpImageSparseSampleProjExplicitLod: *hasResult = true; *hasResultType = true; break; + case OpImageSparseSampleProjDrefImplicitLod: *hasResult = true; *hasResultType = true; break; + case OpImageSparseSampleProjDrefExplicitLod: *hasResult = true; *hasResultType = true; break; + case OpImageSparseFetch: *hasResult = true; *hasResultType = true; break; + case OpImageSparseGather: *hasResult = true; *hasResultType = true; break; + case OpImageSparseDrefGather: *hasResult = true; *hasResultType = true; break; + case OpImageSparseTexelsResident: *hasResult = true; *hasResultType = true; break; + case OpNoLine: *hasResult = false; *hasResultType = false; break; + case OpAtomicFlagTestAndSet: *hasResult = true; *hasResultType = true; break; + case OpAtomicFlagClear: *hasResult = false; *hasResultType = false; break; + case OpImageSparseRead: *hasResult = true; *hasResultType = true; break; + case OpSizeOf: *hasResult = true; *hasResultType = true; break; + case OpTypePipeStorage: *hasResult = true; *hasResultType = false; break; + case OpConstantPipeStorage: *hasResult = true; *hasResultType = true; break; + case OpCreatePipeFromPipeStorage: *hasResult = true; *hasResultType = true; break; + case OpGetKernelLocalSizeForSubgroupCount: *hasResult = true; *hasResultType = true; break; + case OpGetKernelMaxNumSubgroups: *hasResult = true; *hasResultType = true; break; + case OpTypeNamedBarrier: *hasResult = true; *hasResultType = false; break; + case OpNamedBarrierInitialize: *hasResult = true; *hasResultType = true; break; + case OpMemoryNamedBarrier: *hasResult = false; *hasResultType = false; break; + case OpModuleProcessed: *hasResult = false; *hasResultType = false; break; + case OpExecutionModeId: *hasResult = false; *hasResultType = false; break; + case OpDecorateId: *hasResult = false; *hasResultType = false; break; + case OpGroupNonUniformElect: *hasResult = true; *hasResultType = true; break; + case OpGroupNonUniformAll: *hasResult = true; *hasResultType = true; break; + case OpGroupNonUniformAny: *hasResult = true; *hasResultType = true; break; + case OpGroupNonUniformAllEqual: *hasResult = true; *hasResultType = true; break; + case OpGroupNonUniformBroadcast: *hasResult = true; *hasResultType = true; break; + case OpGroupNonUniformBroadcastFirst: *hasResult = true; *hasResultType = true; break; + case OpGroupNonUniformBallot: *hasResult = true; *hasResultType = true; break; + case OpGroupNonUniformInverseBallot: *hasResult = true; *hasResultType = true; break; + case OpGroupNonUniformBallotBitExtract: *hasResult = true; *hasResultType = true; break; + case OpGroupNonUniformBallotBitCount: *hasResult = true; *hasResultType = true; break; + case OpGroupNonUniformBallotFindLSB: *hasResult = true; *hasResultType = true; break; + case OpGroupNonUniformBallotFindMSB: *hasResult = true; *hasResultType = true; break; + case OpGroupNonUniformShuffle: *hasResult = true; *hasResultType = true; break; + case OpGroupNonUniformShuffleXor: *hasResult = true; *hasResultType = true; break; + case OpGroupNonUniformShuffleUp: *hasResult = true; *hasResultType = true; break; + case OpGroupNonUniformShuffleDown: *hasResult = true; *hasResultType = true; break; + case OpGroupNonUniformIAdd: *hasResult = true; *hasResultType = true; break; + case OpGroupNonUniformFAdd: *hasResult = true; *hasResultType = true; break; + case OpGroupNonUniformIMul: *hasResult = true; *hasResultType = true; break; + case OpGroupNonUniformFMul: *hasResult = true; *hasResultType = true; break; + case OpGroupNonUniformSMin: *hasResult = true; *hasResultType = true; break; + case OpGroupNonUniformUMin: *hasResult = true; *hasResultType = true; break; + case OpGroupNonUniformFMin: *hasResult = true; *hasResultType = true; break; + case OpGroupNonUniformSMax: *hasResult = true; *hasResultType = true; break; + case OpGroupNonUniformUMax: *hasResult = true; *hasResultType = true; break; + case OpGroupNonUniformFMax: *hasResult = true; *hasResultType = true; break; + case OpGroupNonUniformBitwiseAnd: *hasResult = true; *hasResultType = true; break; + case OpGroupNonUniformBitwiseOr: *hasResult = true; *hasResultType = true; break; + case OpGroupNonUniformBitwiseXor: *hasResult = true; *hasResultType = true; break; + case OpGroupNonUniformLogicalAnd: *hasResult = true; *hasResultType = true; break; + case OpGroupNonUniformLogicalOr: *hasResult = true; *hasResultType = true; break; + case OpGroupNonUniformLogicalXor: *hasResult = true; *hasResultType = true; break; + case OpGroupNonUniformQuadBroadcast: *hasResult = true; *hasResultType = true; break; + case OpGroupNonUniformQuadSwap: *hasResult = true; *hasResultType = true; break; + case OpCopyLogical: *hasResult = true; *hasResultType = true; break; + case OpPtrEqual: *hasResult = true; *hasResultType = true; break; + case OpPtrNotEqual: *hasResult = true; *hasResultType = true; break; + case OpPtrDiff: *hasResult = true; *hasResultType = true; break; + case OpColorAttachmentReadEXT: *hasResult = true; *hasResultType = true; break; + case OpDepthAttachmentReadEXT: *hasResult = true; *hasResultType = true; break; + case OpStencilAttachmentReadEXT: *hasResult = true; *hasResultType = true; break; + case OpTerminateInvocation: *hasResult = false; *hasResultType = false; break; + case OpSubgroupBallotKHR: *hasResult = true; *hasResultType = true; break; + case OpSubgroupFirstInvocationKHR: *hasResult = true; *hasResultType = true; break; + case OpSubgroupAllKHR: *hasResult = true; *hasResultType = true; break; + case OpSubgroupAnyKHR: *hasResult = true; *hasResultType = true; break; + case OpSubgroupAllEqualKHR: *hasResult = true; *hasResultType = true; break; + case OpGroupNonUniformRotateKHR: *hasResult = true; *hasResultType = true; break; + case OpSubgroupReadInvocationKHR: *hasResult = true; *hasResultType = true; break; + case OpTraceRayKHR: *hasResult = false; *hasResultType = false; break; + case OpExecuteCallableKHR: *hasResult = false; *hasResultType = false; break; + case OpConvertUToAccelerationStructureKHR: *hasResult = true; *hasResultType = true; break; + case OpIgnoreIntersectionKHR: *hasResult = false; *hasResultType = false; break; + case OpTerminateRayKHR: *hasResult = false; *hasResultType = false; break; + case OpSDot: *hasResult = true; *hasResultType = true; break; + case OpUDot: *hasResult = true; *hasResultType = true; break; + case OpSUDot: *hasResult = true; *hasResultType = true; break; + case OpSDotAccSat: *hasResult = true; *hasResultType = true; break; + case OpUDotAccSat: *hasResult = true; *hasResultType = true; break; + case OpSUDotAccSat: *hasResult = true; *hasResultType = true; break; + case OpTypeCooperativeMatrixKHR: *hasResult = true; *hasResultType = false; break; + case OpCooperativeMatrixLoadKHR: *hasResult = true; *hasResultType = true; break; + case OpCooperativeMatrixStoreKHR: *hasResult = false; *hasResultType = false; break; + case OpCooperativeMatrixMulAddKHR: *hasResult = true; *hasResultType = true; break; + case OpCooperativeMatrixLengthKHR: *hasResult = true; *hasResultType = true; break; + case OpTypeRayQueryKHR: *hasResult = true; *hasResultType = false; break; + case OpRayQueryInitializeKHR: *hasResult = false; *hasResultType = false; break; + case OpRayQueryTerminateKHR: *hasResult = false; *hasResultType = false; break; + case OpRayQueryGenerateIntersectionKHR: *hasResult = false; *hasResultType = false; break; + case OpRayQueryConfirmIntersectionKHR: *hasResult = false; *hasResultType = false; break; + case OpRayQueryProceedKHR: *hasResult = true; *hasResultType = true; break; + case OpRayQueryGetIntersectionTypeKHR: *hasResult = true; *hasResultType = true; break; + case OpImageSampleWeightedQCOM: *hasResult = true; *hasResultType = true; break; + case OpImageBoxFilterQCOM: *hasResult = true; *hasResultType = true; break; + case OpImageBlockMatchSSDQCOM: *hasResult = true; *hasResultType = true; break; + case OpImageBlockMatchSADQCOM: *hasResult = true; *hasResultType = true; break; + case OpGroupIAddNonUniformAMD: *hasResult = true; *hasResultType = true; break; + case OpGroupFAddNonUniformAMD: *hasResult = true; *hasResultType = true; break; + case OpGroupFMinNonUniformAMD: *hasResult = true; *hasResultType = true; break; + case OpGroupUMinNonUniformAMD: *hasResult = true; *hasResultType = true; break; + case OpGroupSMinNonUniformAMD: *hasResult = true; *hasResultType = true; break; + case OpGroupFMaxNonUniformAMD: *hasResult = true; *hasResultType = true; break; + case OpGroupUMaxNonUniformAMD: *hasResult = true; *hasResultType = true; break; + case OpGroupSMaxNonUniformAMD: *hasResult = true; *hasResultType = true; break; + case OpFragmentMaskFetchAMD: *hasResult = true; *hasResultType = true; break; + case OpFragmentFetchAMD: *hasResult = true; *hasResultType = true; break; + case OpReadClockKHR: *hasResult = true; *hasResultType = true; break; + case OpHitObjectRecordHitMotionNV: *hasResult = false; *hasResultType = false; break; + case OpHitObjectRecordHitWithIndexMotionNV: *hasResult = false; *hasResultType = false; break; + case OpHitObjectRecordMissMotionNV: *hasResult = false; *hasResultType = false; break; + case OpHitObjectGetWorldToObjectNV: *hasResult = true; *hasResultType = true; break; + case OpHitObjectGetObjectToWorldNV: *hasResult = true; *hasResultType = true; break; + case OpHitObjectGetObjectRayDirectionNV: *hasResult = true; *hasResultType = true; break; + case OpHitObjectGetObjectRayOriginNV: *hasResult = true; *hasResultType = true; break; + case OpHitObjectTraceRayMotionNV: *hasResult = false; *hasResultType = false; break; + case OpHitObjectGetShaderRecordBufferHandleNV: *hasResult = true; *hasResultType = true; break; + case OpHitObjectGetShaderBindingTableRecordIndexNV: *hasResult = true; *hasResultType = true; break; + case OpHitObjectRecordEmptyNV: *hasResult = false; *hasResultType = false; break; + case OpHitObjectTraceRayNV: *hasResult = false; *hasResultType = false; break; + case OpHitObjectRecordHitNV: *hasResult = false; *hasResultType = false; break; + case OpHitObjectRecordHitWithIndexNV: *hasResult = false; *hasResultType = false; break; + case OpHitObjectRecordMissNV: *hasResult = false; *hasResultType = false; break; + case OpHitObjectExecuteShaderNV: *hasResult = false; *hasResultType = false; break; + case OpHitObjectGetCurrentTimeNV: *hasResult = true; *hasResultType = true; break; + case OpHitObjectGetAttributesNV: *hasResult = false; *hasResultType = false; break; + case OpHitObjectGetHitKindNV: *hasResult = true; *hasResultType = true; break; + case OpHitObjectGetPrimitiveIndexNV: *hasResult = true; *hasResultType = true; break; + case OpHitObjectGetGeometryIndexNV: *hasResult = true; *hasResultType = true; break; + case OpHitObjectGetInstanceIdNV: *hasResult = true; *hasResultType = true; break; + case OpHitObjectGetInstanceCustomIndexNV: *hasResult = true; *hasResultType = true; break; + case OpHitObjectGetWorldRayDirectionNV: *hasResult = true; *hasResultType = true; break; + case OpHitObjectGetWorldRayOriginNV: *hasResult = true; *hasResultType = true; break; + case OpHitObjectGetRayTMaxNV: *hasResult = true; *hasResultType = true; break; + case OpHitObjectGetRayTMinNV: *hasResult = true; *hasResultType = true; break; + case OpHitObjectIsEmptyNV: *hasResult = true; *hasResultType = true; break; + case OpHitObjectIsHitNV: *hasResult = true; *hasResultType = true; break; + case OpHitObjectIsMissNV: *hasResult = true; *hasResultType = true; break; + case OpReorderThreadWithHitObjectNV: *hasResult = false; *hasResultType = false; break; + case OpReorderThreadWithHintNV: *hasResult = false; *hasResultType = false; break; + case OpTypeHitObjectNV: *hasResult = true; *hasResultType = false; break; + case OpImageSampleFootprintNV: *hasResult = true; *hasResultType = true; break; + case OpEmitMeshTasksEXT: *hasResult = false; *hasResultType = false; break; + case OpSetMeshOutputsEXT: *hasResult = false; *hasResultType = false; break; + case OpGroupNonUniformPartitionNV: *hasResult = true; *hasResultType = true; break; + case OpWritePackedPrimitiveIndices4x8NV: *hasResult = false; *hasResultType = false; break; + case OpReportIntersectionNV: *hasResult = true; *hasResultType = true; break; + case OpIgnoreIntersectionNV: *hasResult = false; *hasResultType = false; break; + case OpTerminateRayNV: *hasResult = false; *hasResultType = false; break; + case OpTraceNV: *hasResult = false; *hasResultType = false; break; + case OpTraceMotionNV: *hasResult = false; *hasResultType = false; break; + case OpTraceRayMotionNV: *hasResult = false; *hasResultType = false; break; + case OpRayQueryGetIntersectionTriangleVertexPositionsKHR: *hasResult = true; *hasResultType = true; break; + case OpTypeAccelerationStructureNV: *hasResult = true; *hasResultType = false; break; + case OpExecuteCallableNV: *hasResult = false; *hasResultType = false; break; + case OpTypeCooperativeMatrixNV: *hasResult = true; *hasResultType = false; break; + case OpCooperativeMatrixLoadNV: *hasResult = true; *hasResultType = true; break; + case OpCooperativeMatrixStoreNV: *hasResult = false; *hasResultType = false; break; + case OpCooperativeMatrixMulAddNV: *hasResult = true; *hasResultType = true; break; + case OpCooperativeMatrixLengthNV: *hasResult = true; *hasResultType = true; break; + case OpBeginInvocationInterlockEXT: *hasResult = false; *hasResultType = false; break; + case OpEndInvocationInterlockEXT: *hasResult = false; *hasResultType = false; break; + case OpDemoteToHelperInvocation: *hasResult = false; *hasResultType = false; break; + case OpIsHelperInvocationEXT: *hasResult = true; *hasResultType = true; break; + case OpConvertUToImageNV: *hasResult = true; *hasResultType = true; break; + case OpConvertUToSamplerNV: *hasResult = true; *hasResultType = true; break; + case OpConvertImageToUNV: *hasResult = true; *hasResultType = true; break; + case OpConvertSamplerToUNV: *hasResult = true; *hasResultType = true; break; + case OpConvertUToSampledImageNV: *hasResult = true; *hasResultType = true; break; + case OpConvertSampledImageToUNV: *hasResult = true; *hasResultType = true; break; + case OpSamplerImageAddressingModeNV: *hasResult = false; *hasResultType = false; break; + case OpSubgroupShuffleINTEL: *hasResult = true; *hasResultType = true; break; + case OpSubgroupShuffleDownINTEL: *hasResult = true; *hasResultType = true; break; + case OpSubgroupShuffleUpINTEL: *hasResult = true; *hasResultType = true; break; + case OpSubgroupShuffleXorINTEL: *hasResult = true; *hasResultType = true; break; + case OpSubgroupBlockReadINTEL: *hasResult = true; *hasResultType = true; break; + case OpSubgroupBlockWriteINTEL: *hasResult = false; *hasResultType = false; break; + case OpSubgroupImageBlockReadINTEL: *hasResult = true; *hasResultType = true; break; + case OpSubgroupImageBlockWriteINTEL: *hasResult = false; *hasResultType = false; break; + case OpSubgroupImageMediaBlockReadINTEL: *hasResult = true; *hasResultType = true; break; + case OpSubgroupImageMediaBlockWriteINTEL: *hasResult = false; *hasResultType = false; break; + case OpUCountLeadingZerosINTEL: *hasResult = true; *hasResultType = true; break; + case OpUCountTrailingZerosINTEL: *hasResult = true; *hasResultType = true; break; + case OpAbsISubINTEL: *hasResult = true; *hasResultType = true; break; + case OpAbsUSubINTEL: *hasResult = true; *hasResultType = true; break; + case OpIAddSatINTEL: *hasResult = true; *hasResultType = true; break; + case OpUAddSatINTEL: *hasResult = true; *hasResultType = true; break; + case OpIAverageINTEL: *hasResult = true; *hasResultType = true; break; + case OpUAverageINTEL: *hasResult = true; *hasResultType = true; break; + case OpIAverageRoundedINTEL: *hasResult = true; *hasResultType = true; break; + case OpUAverageRoundedINTEL: *hasResult = true; *hasResultType = true; break; + case OpISubSatINTEL: *hasResult = true; *hasResultType = true; break; + case OpUSubSatINTEL: *hasResult = true; *hasResultType = true; break; + case OpIMul32x16INTEL: *hasResult = true; *hasResultType = true; break; + case OpUMul32x16INTEL: *hasResult = true; *hasResultType = true; break; + case OpConstantFunctionPointerINTEL: *hasResult = true; *hasResultType = true; break; + case OpFunctionPointerCallINTEL: *hasResult = true; *hasResultType = true; break; + case OpAsmTargetINTEL: *hasResult = true; *hasResultType = true; break; + case OpAsmINTEL: *hasResult = true; *hasResultType = true; break; + case OpAsmCallINTEL: *hasResult = true; *hasResultType = true; break; + case OpAtomicFMinEXT: *hasResult = true; *hasResultType = true; break; + case OpAtomicFMaxEXT: *hasResult = true; *hasResultType = true; break; + case OpAssumeTrueKHR: *hasResult = false; *hasResultType = false; break; + case OpExpectKHR: *hasResult = true; *hasResultType = true; break; + case OpDecorateString: *hasResult = false; *hasResultType = false; break; + case OpMemberDecorateString: *hasResult = false; *hasResultType = false; break; + case OpVmeImageINTEL: *hasResult = true; *hasResultType = true; break; + case OpTypeVmeImageINTEL: *hasResult = true; *hasResultType = false; break; + case OpTypeAvcImePayloadINTEL: *hasResult = true; *hasResultType = false; break; + case OpTypeAvcRefPayloadINTEL: *hasResult = true; *hasResultType = false; break; + case OpTypeAvcSicPayloadINTEL: *hasResult = true; *hasResultType = false; break; + case OpTypeAvcMcePayloadINTEL: *hasResult = true; *hasResultType = false; break; + case OpTypeAvcMceResultINTEL: *hasResult = true; *hasResultType = false; break; + case OpTypeAvcImeResultINTEL: *hasResult = true; *hasResultType = false; break; + case OpTypeAvcImeResultSingleReferenceStreamoutINTEL: *hasResult = true; *hasResultType = false; break; + case OpTypeAvcImeResultDualReferenceStreamoutINTEL: *hasResult = true; *hasResultType = false; break; + case OpTypeAvcImeSingleReferenceStreaminINTEL: *hasResult = true; *hasResultType = false; break; + case OpTypeAvcImeDualReferenceStreaminINTEL: *hasResult = true; *hasResultType = false; break; + case OpTypeAvcRefResultINTEL: *hasResult = true; *hasResultType = false; break; + case OpTypeAvcSicResultINTEL: *hasResult = true; *hasResultType = false; break; + case OpSubgroupAvcMceGetDefaultInterBaseMultiReferencePenaltyINTEL: *hasResult = true; *hasResultType = true; break; + case OpSubgroupAvcMceSetInterBaseMultiReferencePenaltyINTEL: *hasResult = true; *hasResultType = true; break; + case OpSubgroupAvcMceGetDefaultInterShapePenaltyINTEL: *hasResult = true; *hasResultType = true; break; + case OpSubgroupAvcMceSetInterShapePenaltyINTEL: *hasResult = true; *hasResultType = true; break; + case OpSubgroupAvcMceGetDefaultInterDirectionPenaltyINTEL: *hasResult = true; *hasResultType = true; break; + case OpSubgroupAvcMceSetInterDirectionPenaltyINTEL: *hasResult = true; *hasResultType = true; break; + case OpSubgroupAvcMceGetDefaultIntraLumaShapePenaltyINTEL: *hasResult = true; *hasResultType = true; break; + case OpSubgroupAvcMceGetDefaultInterMotionVectorCostTableINTEL: *hasResult = true; *hasResultType = true; break; + case OpSubgroupAvcMceGetDefaultHighPenaltyCostTableINTEL: *hasResult = true; *hasResultType = true; break; + case OpSubgroupAvcMceGetDefaultMediumPenaltyCostTableINTEL: *hasResult = true; *hasResultType = true; break; + case OpSubgroupAvcMceGetDefaultLowPenaltyCostTableINTEL: *hasResult = true; *hasResultType = true; break; + case OpSubgroupAvcMceSetMotionVectorCostFunctionINTEL: *hasResult = true; *hasResultType = true; break; + case OpSubgroupAvcMceGetDefaultIntraLumaModePenaltyINTEL: *hasResult = true; *hasResultType = true; break; + case OpSubgroupAvcMceGetDefaultNonDcLumaIntraPenaltyINTEL: *hasResult = true; *hasResultType = true; break; + case OpSubgroupAvcMceGetDefaultIntraChromaModeBasePenaltyINTEL: *hasResult = true; *hasResultType = true; break; + case OpSubgroupAvcMceSetAcOnlyHaarINTEL: *hasResult = true; *hasResultType = true; break; + case OpSubgroupAvcMceSetSourceInterlacedFieldPolarityINTEL: *hasResult = true; *hasResultType = true; break; + case OpSubgroupAvcMceSetSingleReferenceInterlacedFieldPolarityINTEL: *hasResult = true; *hasResultType = true; break; + case OpSubgroupAvcMceSetDualReferenceInterlacedFieldPolaritiesINTEL: *hasResult = true; *hasResultType = true; break; + case OpSubgroupAvcMceConvertToImePayloadINTEL: *hasResult = true; *hasResultType = true; break; + case OpSubgroupAvcMceConvertToImeResultINTEL: *hasResult = true; *hasResultType = true; break; + case OpSubgroupAvcMceConvertToRefPayloadINTEL: *hasResult = true; *hasResultType = true; break; + case OpSubgroupAvcMceConvertToRefResultINTEL: *hasResult = true; *hasResultType = true; break; + case OpSubgroupAvcMceConvertToSicPayloadINTEL: *hasResult = true; *hasResultType = true; break; + case OpSubgroupAvcMceConvertToSicResultINTEL: *hasResult = true; *hasResultType = true; break; + case OpSubgroupAvcMceGetMotionVectorsINTEL: *hasResult = true; *hasResultType = true; break; + case OpSubgroupAvcMceGetInterDistortionsINTEL: *hasResult = true; *hasResultType = true; break; + case OpSubgroupAvcMceGetBestInterDistortionsINTEL: *hasResult = true; *hasResultType = true; break; + case OpSubgroupAvcMceGetInterMajorShapeINTEL: *hasResult = true; *hasResultType = true; break; + case OpSubgroupAvcMceGetInterMinorShapeINTEL: *hasResult = true; *hasResultType = true; break; + case OpSubgroupAvcMceGetInterDirectionsINTEL: *hasResult = true; *hasResultType = true; break; + case OpSubgroupAvcMceGetInterMotionVectorCountINTEL: *hasResult = true; *hasResultType = true; break; + case OpSubgroupAvcMceGetInterReferenceIdsINTEL: *hasResult = true; *hasResultType = true; break; + case OpSubgroupAvcMceGetInterReferenceInterlacedFieldPolaritiesINTEL: *hasResult = true; *hasResultType = true; break; + case OpSubgroupAvcImeInitializeINTEL: *hasResult = true; *hasResultType = true; break; + case OpSubgroupAvcImeSetSingleReferenceINTEL: *hasResult = true; *hasResultType = true; break; + case OpSubgroupAvcImeSetDualReferenceINTEL: *hasResult = true; *hasResultType = true; break; + case OpSubgroupAvcImeRefWindowSizeINTEL: *hasResult = true; *hasResultType = true; break; + case OpSubgroupAvcImeAdjustRefOffsetINTEL: *hasResult = true; *hasResultType = true; break; + case OpSubgroupAvcImeConvertToMcePayloadINTEL: *hasResult = true; *hasResultType = true; break; + case OpSubgroupAvcImeSetMaxMotionVectorCountINTEL: *hasResult = true; *hasResultType = true; break; + case OpSubgroupAvcImeSetUnidirectionalMixDisableINTEL: *hasResult = true; *hasResultType = true; break; + case OpSubgroupAvcImeSetEarlySearchTerminationThresholdINTEL: *hasResult = true; *hasResultType = true; break; + case OpSubgroupAvcImeSetWeightedSadINTEL: *hasResult = true; *hasResultType = true; break; + case OpSubgroupAvcImeEvaluateWithSingleReferenceINTEL: *hasResult = true; *hasResultType = true; break; + case OpSubgroupAvcImeEvaluateWithDualReferenceINTEL: *hasResult = true; *hasResultType = true; break; + case OpSubgroupAvcImeEvaluateWithSingleReferenceStreaminINTEL: *hasResult = true; *hasResultType = true; break; + case OpSubgroupAvcImeEvaluateWithDualReferenceStreaminINTEL: *hasResult = true; *hasResultType = true; break; + case OpSubgroupAvcImeEvaluateWithSingleReferenceStreamoutINTEL: *hasResult = true; *hasResultType = true; break; + case OpSubgroupAvcImeEvaluateWithDualReferenceStreamoutINTEL: *hasResult = true; *hasResultType = true; break; + case OpSubgroupAvcImeEvaluateWithSingleReferenceStreaminoutINTEL: *hasResult = true; *hasResultType = true; break; + case OpSubgroupAvcImeEvaluateWithDualReferenceStreaminoutINTEL: *hasResult = true; *hasResultType = true; break; + case OpSubgroupAvcImeConvertToMceResultINTEL: *hasResult = true; *hasResultType = true; break; + case OpSubgroupAvcImeGetSingleReferenceStreaminINTEL: *hasResult = true; *hasResultType = true; break; + case OpSubgroupAvcImeGetDualReferenceStreaminINTEL: *hasResult = true; *hasResultType = true; break; + case OpSubgroupAvcImeStripSingleReferenceStreamoutINTEL: *hasResult = true; *hasResultType = true; break; + case OpSubgroupAvcImeStripDualReferenceStreamoutINTEL: *hasResult = true; *hasResultType = true; break; + case OpSubgroupAvcImeGetStreamoutSingleReferenceMajorShapeMotionVectorsINTEL: *hasResult = true; *hasResultType = true; break; + case OpSubgroupAvcImeGetStreamoutSingleReferenceMajorShapeDistortionsINTEL: *hasResult = true; *hasResultType = true; break; + case OpSubgroupAvcImeGetStreamoutSingleReferenceMajorShapeReferenceIdsINTEL: *hasResult = true; *hasResultType = true; break; + case OpSubgroupAvcImeGetStreamoutDualReferenceMajorShapeMotionVectorsINTEL: *hasResult = true; *hasResultType = true; break; + case OpSubgroupAvcImeGetStreamoutDualReferenceMajorShapeDistortionsINTEL: *hasResult = true; *hasResultType = true; break; + case OpSubgroupAvcImeGetStreamoutDualReferenceMajorShapeReferenceIdsINTEL: *hasResult = true; *hasResultType = true; break; + case OpSubgroupAvcImeGetBorderReachedINTEL: *hasResult = true; *hasResultType = true; break; + case OpSubgroupAvcImeGetTruncatedSearchIndicationINTEL: *hasResult = true; *hasResultType = true; break; + case OpSubgroupAvcImeGetUnidirectionalEarlySearchTerminationINTEL: *hasResult = true; *hasResultType = true; break; + case OpSubgroupAvcImeGetWeightingPatternMinimumMotionVectorINTEL: *hasResult = true; *hasResultType = true; break; + case OpSubgroupAvcImeGetWeightingPatternMinimumDistortionINTEL: *hasResult = true; *hasResultType = true; break; + case OpSubgroupAvcFmeInitializeINTEL: *hasResult = true; *hasResultType = true; break; + case OpSubgroupAvcBmeInitializeINTEL: *hasResult = true; *hasResultType = true; break; + case OpSubgroupAvcRefConvertToMcePayloadINTEL: *hasResult = true; *hasResultType = true; break; + case OpSubgroupAvcRefSetBidirectionalMixDisableINTEL: *hasResult = true; *hasResultType = true; break; + case OpSubgroupAvcRefSetBilinearFilterEnableINTEL: *hasResult = true; *hasResultType = true; break; + case OpSubgroupAvcRefEvaluateWithSingleReferenceINTEL: *hasResult = true; *hasResultType = true; break; + case OpSubgroupAvcRefEvaluateWithDualReferenceINTEL: *hasResult = true; *hasResultType = true; break; + case OpSubgroupAvcRefEvaluateWithMultiReferenceINTEL: *hasResult = true; *hasResultType = true; break; + case OpSubgroupAvcRefEvaluateWithMultiReferenceInterlacedINTEL: *hasResult = true; *hasResultType = true; break; + case OpSubgroupAvcRefConvertToMceResultINTEL: *hasResult = true; *hasResultType = true; break; + case OpSubgroupAvcSicInitializeINTEL: *hasResult = true; *hasResultType = true; break; + case OpSubgroupAvcSicConfigureSkcINTEL: *hasResult = true; *hasResultType = true; break; + case OpSubgroupAvcSicConfigureIpeLumaINTEL: *hasResult = true; *hasResultType = true; break; + case OpSubgroupAvcSicConfigureIpeLumaChromaINTEL: *hasResult = true; *hasResultType = true; break; + case OpSubgroupAvcSicGetMotionVectorMaskINTEL: *hasResult = true; *hasResultType = true; break; + case OpSubgroupAvcSicConvertToMcePayloadINTEL: *hasResult = true; *hasResultType = true; break; + case OpSubgroupAvcSicSetIntraLumaShapePenaltyINTEL: *hasResult = true; *hasResultType = true; break; + case OpSubgroupAvcSicSetIntraLumaModeCostFunctionINTEL: *hasResult = true; *hasResultType = true; break; + case OpSubgroupAvcSicSetIntraChromaModeCostFunctionINTEL: *hasResult = true; *hasResultType = true; break; + case OpSubgroupAvcSicSetBilinearFilterEnableINTEL: *hasResult = true; *hasResultType = true; break; + case OpSubgroupAvcSicSetSkcForwardTransformEnableINTEL: *hasResult = true; *hasResultType = true; break; + case OpSubgroupAvcSicSetBlockBasedRawSkipSadINTEL: *hasResult = true; *hasResultType = true; break; + case OpSubgroupAvcSicEvaluateIpeINTEL: *hasResult = true; *hasResultType = true; break; + case OpSubgroupAvcSicEvaluateWithSingleReferenceINTEL: *hasResult = true; *hasResultType = true; break; + case OpSubgroupAvcSicEvaluateWithDualReferenceINTEL: *hasResult = true; *hasResultType = true; break; + case OpSubgroupAvcSicEvaluateWithMultiReferenceINTEL: *hasResult = true; *hasResultType = true; break; + case OpSubgroupAvcSicEvaluateWithMultiReferenceInterlacedINTEL: *hasResult = true; *hasResultType = true; break; + case OpSubgroupAvcSicConvertToMceResultINTEL: *hasResult = true; *hasResultType = true; break; + case OpSubgroupAvcSicGetIpeLumaShapeINTEL: *hasResult = true; *hasResultType = true; break; + case OpSubgroupAvcSicGetBestIpeLumaDistortionINTEL: *hasResult = true; *hasResultType = true; break; + case OpSubgroupAvcSicGetBestIpeChromaDistortionINTEL: *hasResult = true; *hasResultType = true; break; + case OpSubgroupAvcSicGetPackedIpeLumaModesINTEL: *hasResult = true; *hasResultType = true; break; + case OpSubgroupAvcSicGetIpeChromaModeINTEL: *hasResult = true; *hasResultType = true; break; + case OpSubgroupAvcSicGetPackedSkcLumaCountThresholdINTEL: *hasResult = true; *hasResultType = true; break; + case OpSubgroupAvcSicGetPackedSkcLumaSumThresholdINTEL: *hasResult = true; *hasResultType = true; break; + case OpSubgroupAvcSicGetInterRawSadsINTEL: *hasResult = true; *hasResultType = true; break; + case OpVariableLengthArrayINTEL: *hasResult = true; *hasResultType = true; break; + case OpSaveMemoryINTEL: *hasResult = true; *hasResultType = true; break; + case OpRestoreMemoryINTEL: *hasResult = false; *hasResultType = false; break; + case OpArbitraryFloatSinCosPiINTEL: *hasResult = true; *hasResultType = true; break; + case OpArbitraryFloatCastINTEL: *hasResult = true; *hasResultType = true; break; + case OpArbitraryFloatCastFromIntINTEL: *hasResult = true; *hasResultType = true; break; + case OpArbitraryFloatCastToIntINTEL: *hasResult = true; *hasResultType = true; break; + case OpArbitraryFloatAddINTEL: *hasResult = true; *hasResultType = true; break; + case OpArbitraryFloatSubINTEL: *hasResult = true; *hasResultType = true; break; + case OpArbitraryFloatMulINTEL: *hasResult = true; *hasResultType = true; break; + case OpArbitraryFloatDivINTEL: *hasResult = true; *hasResultType = true; break; + case OpArbitraryFloatGTINTEL: *hasResult = true; *hasResultType = true; break; + case OpArbitraryFloatGEINTEL: *hasResult = true; *hasResultType = true; break; + case OpArbitraryFloatLTINTEL: *hasResult = true; *hasResultType = true; break; + case OpArbitraryFloatLEINTEL: *hasResult = true; *hasResultType = true; break; + case OpArbitraryFloatEQINTEL: *hasResult = true; *hasResultType = true; break; + case OpArbitraryFloatRecipINTEL: *hasResult = true; *hasResultType = true; break; + case OpArbitraryFloatRSqrtINTEL: *hasResult = true; *hasResultType = true; break; + case OpArbitraryFloatCbrtINTEL: *hasResult = true; *hasResultType = true; break; + case OpArbitraryFloatHypotINTEL: *hasResult = true; *hasResultType = true; break; + case OpArbitraryFloatSqrtINTEL: *hasResult = true; *hasResultType = true; break; + case OpArbitraryFloatLogINTEL: *hasResult = true; *hasResultType = true; break; + case OpArbitraryFloatLog2INTEL: *hasResult = true; *hasResultType = true; break; + case OpArbitraryFloatLog10INTEL: *hasResult = true; *hasResultType = true; break; + case OpArbitraryFloatLog1pINTEL: *hasResult = true; *hasResultType = true; break; + case OpArbitraryFloatExpINTEL: *hasResult = true; *hasResultType = true; break; + case OpArbitraryFloatExp2INTEL: *hasResult = true; *hasResultType = true; break; + case OpArbitraryFloatExp10INTEL: *hasResult = true; *hasResultType = true; break; + case OpArbitraryFloatExpm1INTEL: *hasResult = true; *hasResultType = true; break; + case OpArbitraryFloatSinINTEL: *hasResult = true; *hasResultType = true; break; + case OpArbitraryFloatCosINTEL: *hasResult = true; *hasResultType = true; break; + case OpArbitraryFloatSinCosINTEL: *hasResult = true; *hasResultType = true; break; + case OpArbitraryFloatSinPiINTEL: *hasResult = true; *hasResultType = true; break; + case OpArbitraryFloatCosPiINTEL: *hasResult = true; *hasResultType = true; break; + case OpArbitraryFloatASinINTEL: *hasResult = true; *hasResultType = true; break; + case OpArbitraryFloatASinPiINTEL: *hasResult = true; *hasResultType = true; break; + case OpArbitraryFloatACosINTEL: *hasResult = true; *hasResultType = true; break; + case OpArbitraryFloatACosPiINTEL: *hasResult = true; *hasResultType = true; break; + case OpArbitraryFloatATanINTEL: *hasResult = true; *hasResultType = true; break; + case OpArbitraryFloatATanPiINTEL: *hasResult = true; *hasResultType = true; break; + case OpArbitraryFloatATan2INTEL: *hasResult = true; *hasResultType = true; break; + case OpArbitraryFloatPowINTEL: *hasResult = true; *hasResultType = true; break; + case OpArbitraryFloatPowRINTEL: *hasResult = true; *hasResultType = true; break; + case OpArbitraryFloatPowNINTEL: *hasResult = true; *hasResultType = true; break; + case OpLoopControlINTEL: *hasResult = false; *hasResultType = false; break; + case OpAliasDomainDeclINTEL: *hasResult = true; *hasResultType = false; break; + case OpAliasScopeDeclINTEL: *hasResult = true; *hasResultType = false; break; + case OpAliasScopeListDeclINTEL: *hasResult = true; *hasResultType = false; break; + case OpFixedSqrtINTEL: *hasResult = true; *hasResultType = true; break; + case OpFixedRecipINTEL: *hasResult = true; *hasResultType = true; break; + case OpFixedRsqrtINTEL: *hasResult = true; *hasResultType = true; break; + case OpFixedSinINTEL: *hasResult = true; *hasResultType = true; break; + case OpFixedCosINTEL: *hasResult = true; *hasResultType = true; break; + case OpFixedSinCosINTEL: *hasResult = true; *hasResultType = true; break; + case OpFixedSinPiINTEL: *hasResult = true; *hasResultType = true; break; + case OpFixedCosPiINTEL: *hasResult = true; *hasResultType = true; break; + case OpFixedSinCosPiINTEL: *hasResult = true; *hasResultType = true; break; + case OpFixedLogINTEL: *hasResult = true; *hasResultType = true; break; + case OpFixedExpINTEL: *hasResult = true; *hasResultType = true; break; + case OpPtrCastToCrossWorkgroupINTEL: *hasResult = true; *hasResultType = true; break; + case OpCrossWorkgroupCastToPtrINTEL: *hasResult = true; *hasResultType = true; break; + case OpReadPipeBlockingINTEL: *hasResult = true; *hasResultType = true; break; + case OpWritePipeBlockingINTEL: *hasResult = true; *hasResultType = true; break; + case OpFPGARegINTEL: *hasResult = true; *hasResultType = true; break; + case OpRayQueryGetRayTMinKHR: *hasResult = true; *hasResultType = true; break; + case OpRayQueryGetRayFlagsKHR: *hasResult = true; *hasResultType = true; break; + case OpRayQueryGetIntersectionTKHR: *hasResult = true; *hasResultType = true; break; + case OpRayQueryGetIntersectionInstanceCustomIndexKHR: *hasResult = true; *hasResultType = true; break; + case OpRayQueryGetIntersectionInstanceIdKHR: *hasResult = true; *hasResultType = true; break; + case OpRayQueryGetIntersectionInstanceShaderBindingTableRecordOffsetKHR: *hasResult = true; *hasResultType = true; break; + case OpRayQueryGetIntersectionGeometryIndexKHR: *hasResult = true; *hasResultType = true; break; + case OpRayQueryGetIntersectionPrimitiveIndexKHR: *hasResult = true; *hasResultType = true; break; + case OpRayQueryGetIntersectionBarycentricsKHR: *hasResult = true; *hasResultType = true; break; + case OpRayQueryGetIntersectionFrontFaceKHR: *hasResult = true; *hasResultType = true; break; + case OpRayQueryGetIntersectionCandidateAABBOpaqueKHR: *hasResult = true; *hasResultType = true; break; + case OpRayQueryGetIntersectionObjectRayDirectionKHR: *hasResult = true; *hasResultType = true; break; + case OpRayQueryGetIntersectionObjectRayOriginKHR: *hasResult = true; *hasResultType = true; break; + case OpRayQueryGetWorldRayDirectionKHR: *hasResult = true; *hasResultType = true; break; + case OpRayQueryGetWorldRayOriginKHR: *hasResult = true; *hasResultType = true; break; + case OpRayQueryGetIntersectionObjectToWorldKHR: *hasResult = true; *hasResultType = true; break; + case OpRayQueryGetIntersectionWorldToObjectKHR: *hasResult = true; *hasResultType = true; break; + case OpAtomicFAddEXT: *hasResult = true; *hasResultType = true; break; + case OpTypeBufferSurfaceINTEL: *hasResult = true; *hasResultType = false; break; + case OpTypeStructContinuedINTEL: *hasResult = false; *hasResultType = false; break; + case OpConstantCompositeContinuedINTEL: *hasResult = false; *hasResultType = false; break; + case OpSpecConstantCompositeContinuedINTEL: *hasResult = false; *hasResultType = false; break; + case OpControlBarrierArriveINTEL: *hasResult = false; *hasResultType = false; break; + case OpControlBarrierWaitINTEL: *hasResult = false; *hasResultType = false; break; + case OpGroupIMulKHR: *hasResult = true; *hasResultType = true; break; + case OpGroupFMulKHR: *hasResult = true; *hasResultType = true; break; + case OpGroupBitwiseAndKHR: *hasResult = true; *hasResultType = true; break; + case OpGroupBitwiseOrKHR: *hasResult = true; *hasResultType = true; break; + case OpGroupBitwiseXorKHR: *hasResult = true; *hasResultType = true; break; + case OpGroupLogicalAndKHR: *hasResult = true; *hasResultType = true; break; + case OpGroupLogicalOrKHR: *hasResult = true; *hasResultType = true; break; + case OpGroupLogicalXorKHR: *hasResult = true; *hasResultType = true; break; + } +} +#endif /* SPV_ENABLE_UTILITY_CODE */ + +// Overload bitwise operators for mask bit combining + +inline ImageOperandsMask operator|(ImageOperandsMask a, ImageOperandsMask b) { return ImageOperandsMask(unsigned(a) | unsigned(b)); } +inline ImageOperandsMask operator&(ImageOperandsMask a, ImageOperandsMask b) { return ImageOperandsMask(unsigned(a) & unsigned(b)); } +inline ImageOperandsMask operator^(ImageOperandsMask a, ImageOperandsMask b) { return ImageOperandsMask(unsigned(a) ^ unsigned(b)); } +inline ImageOperandsMask operator~(ImageOperandsMask a) { return ImageOperandsMask(~unsigned(a)); } +inline FPFastMathModeMask operator|(FPFastMathModeMask a, FPFastMathModeMask b) { return FPFastMathModeMask(unsigned(a) | unsigned(b)); } +inline FPFastMathModeMask operator&(FPFastMathModeMask a, FPFastMathModeMask b) { return FPFastMathModeMask(unsigned(a) & unsigned(b)); } +inline FPFastMathModeMask operator^(FPFastMathModeMask a, FPFastMathModeMask b) { return FPFastMathModeMask(unsigned(a) ^ unsigned(b)); } +inline FPFastMathModeMask operator~(FPFastMathModeMask a) { return FPFastMathModeMask(~unsigned(a)); } +inline SelectionControlMask operator|(SelectionControlMask a, SelectionControlMask b) { return SelectionControlMask(unsigned(a) | unsigned(b)); } +inline SelectionControlMask operator&(SelectionControlMask a, SelectionControlMask b) { return SelectionControlMask(unsigned(a) & unsigned(b)); } +inline SelectionControlMask operator^(SelectionControlMask a, SelectionControlMask b) { return SelectionControlMask(unsigned(a) ^ unsigned(b)); } +inline SelectionControlMask operator~(SelectionControlMask a) { return SelectionControlMask(~unsigned(a)); } +inline LoopControlMask operator|(LoopControlMask a, LoopControlMask b) { return LoopControlMask(unsigned(a) | unsigned(b)); } +inline LoopControlMask operator&(LoopControlMask a, LoopControlMask b) { return LoopControlMask(unsigned(a) & unsigned(b)); } +inline LoopControlMask operator^(LoopControlMask a, LoopControlMask b) { return LoopControlMask(unsigned(a) ^ unsigned(b)); } +inline LoopControlMask operator~(LoopControlMask a) { return LoopControlMask(~unsigned(a)); } +inline FunctionControlMask operator|(FunctionControlMask a, FunctionControlMask b) { return FunctionControlMask(unsigned(a) | unsigned(b)); } +inline FunctionControlMask operator&(FunctionControlMask a, FunctionControlMask b) { return FunctionControlMask(unsigned(a) & unsigned(b)); } +inline FunctionControlMask operator^(FunctionControlMask a, FunctionControlMask b) { return FunctionControlMask(unsigned(a) ^ unsigned(b)); } +inline FunctionControlMask operator~(FunctionControlMask a) { return FunctionControlMask(~unsigned(a)); } +inline MemorySemanticsMask operator|(MemorySemanticsMask a, MemorySemanticsMask b) { return MemorySemanticsMask(unsigned(a) | unsigned(b)); } +inline MemorySemanticsMask operator&(MemorySemanticsMask a, MemorySemanticsMask b) { return MemorySemanticsMask(unsigned(a) & unsigned(b)); } +inline MemorySemanticsMask operator^(MemorySemanticsMask a, MemorySemanticsMask b) { return MemorySemanticsMask(unsigned(a) ^ unsigned(b)); } +inline MemorySemanticsMask operator~(MemorySemanticsMask a) { return MemorySemanticsMask(~unsigned(a)); } +inline MemoryAccessMask operator|(MemoryAccessMask a, MemoryAccessMask b) { return MemoryAccessMask(unsigned(a) | unsigned(b)); } +inline MemoryAccessMask operator&(MemoryAccessMask a, MemoryAccessMask b) { return MemoryAccessMask(unsigned(a) & unsigned(b)); } +inline MemoryAccessMask operator^(MemoryAccessMask a, MemoryAccessMask b) { return MemoryAccessMask(unsigned(a) ^ unsigned(b)); } +inline MemoryAccessMask operator~(MemoryAccessMask a) { return MemoryAccessMask(~unsigned(a)); } +inline KernelProfilingInfoMask operator|(KernelProfilingInfoMask a, KernelProfilingInfoMask b) { return KernelProfilingInfoMask(unsigned(a) | unsigned(b)); } +inline KernelProfilingInfoMask operator&(KernelProfilingInfoMask a, KernelProfilingInfoMask b) { return KernelProfilingInfoMask(unsigned(a) & unsigned(b)); } +inline KernelProfilingInfoMask operator^(KernelProfilingInfoMask a, KernelProfilingInfoMask b) { return KernelProfilingInfoMask(unsigned(a) ^ unsigned(b)); } +inline KernelProfilingInfoMask operator~(KernelProfilingInfoMask a) { return KernelProfilingInfoMask(~unsigned(a)); } +inline RayFlagsMask operator|(RayFlagsMask a, RayFlagsMask b) { return RayFlagsMask(unsigned(a) | unsigned(b)); } +inline RayFlagsMask operator&(RayFlagsMask a, RayFlagsMask b) { return RayFlagsMask(unsigned(a) & unsigned(b)); } +inline RayFlagsMask operator^(RayFlagsMask a, RayFlagsMask b) { return RayFlagsMask(unsigned(a) ^ unsigned(b)); } +inline RayFlagsMask operator~(RayFlagsMask a) { return RayFlagsMask(~unsigned(a)); } +inline FragmentShadingRateMask operator|(FragmentShadingRateMask a, FragmentShadingRateMask b) { return FragmentShadingRateMask(unsigned(a) | unsigned(b)); } +inline FragmentShadingRateMask operator&(FragmentShadingRateMask a, FragmentShadingRateMask b) { return FragmentShadingRateMask(unsigned(a) & unsigned(b)); } +inline FragmentShadingRateMask operator^(FragmentShadingRateMask a, FragmentShadingRateMask b) { return FragmentShadingRateMask(unsigned(a) ^ unsigned(b)); } +inline FragmentShadingRateMask operator~(FragmentShadingRateMask a) { return FragmentShadingRateMask(~unsigned(a)); } +inline CooperativeMatrixOperandsMask operator|(CooperativeMatrixOperandsMask a, CooperativeMatrixOperandsMask b) { return CooperativeMatrixOperandsMask(unsigned(a) | unsigned(b)); } +inline CooperativeMatrixOperandsMask operator&(CooperativeMatrixOperandsMask a, CooperativeMatrixOperandsMask b) { return CooperativeMatrixOperandsMask(unsigned(a) & unsigned(b)); } +inline CooperativeMatrixOperandsMask operator^(CooperativeMatrixOperandsMask a, CooperativeMatrixOperandsMask b) { return CooperativeMatrixOperandsMask(unsigned(a) ^ unsigned(b)); } +inline CooperativeMatrixOperandsMask operator~(CooperativeMatrixOperandsMask a) { return CooperativeMatrixOperandsMask(~unsigned(a)); } + +} // end namespace spv + +#endif // #ifndef spirv_HPP + diff --git a/SPIRV/spvIR.h b/SPIRV/spvIR.h index 57e7d378b9..1f8e28ff46 100644 --- a/SPIRV/spvIR.h +++ b/SPIRV/spvIR.h @@ -97,6 +97,8 @@ class Instruction { explicit Instruction(Op opCode) : resultId(NoResult), typeId(NoType), opCode(opCode), block(nullptr) { } virtual ~Instruction() {} void addIdOperand(Id id) { + // ids can't be 0 + assert(id); operands.push_back(id); idOperand.push_back(true); } @@ -321,7 +323,7 @@ void inReadableOrder(Block* root, std::function& getBlocks() const { return blocks; } void addLocalVariable(std::unique_ptr inst); Id getReturnType() const { return functionInstruction.getTypeId(); } + Id getFuncId() const { return functionInstruction.getResultId(); } void setReturnPrecision(Decoration precision) { if (precision == DecorationRelaxedPrecision) @@ -385,7 +388,7 @@ class Function { if (lineInstruction != nullptr) { lineInstruction->dump(out); } - + // OpFunction functionInstruction.dump(out); @@ -399,6 +402,9 @@ class Function { end.dump(out); } + LinkageType getLinkType() const { return linkType; } + const char* getExportName() const { return exportName.c_str(); } + protected: Function(const Function&); Function& operator=(Function&); @@ -411,6 +417,8 @@ class Function { bool implicitThis; // true if this is a member function expecting to be passed a 'this' as the first argument bool reducedPrecisionReturn; std::set reducedPrecisionParams; // list of parameter indexes that need a relaxed precision arg + LinkageType linkType; + std::string exportName; }; // @@ -470,10 +478,11 @@ class Module { // Add both // - the OpFunction instruction // - all the OpFunctionParameter instructions -__inline Function::Function(Id id, Id resultType, Id functionType, Id firstParamId, Module& parent) +__inline Function::Function(Id id, Id resultType, Id functionType, Id firstParamId, LinkageType linkage, const std::string& name, Module& parent) : parent(parent), lineInstruction(nullptr), functionInstruction(id, resultType, OpFunction), implicitThis(false), - reducedPrecisionReturn(false) + reducedPrecisionReturn(false), + linkType(linkage) { // OpFunction functionInstruction.addImmediateOperand(FunctionControlMaskNone); @@ -489,6 +498,11 @@ __inline Function::Function(Id id, Id resultType, Id functionType, Id firstParam parent.mapInstruction(param); parameterInstructions.push_back(param); } + + // If importing/exporting, save the function name (without the mangled parameters) for the linkage decoration + if (linkType != LinkageTypeMax) { + exportName = name.substr(0, name.find_first_of('(')); + } } __inline void Function::addLocalVariable(std::unique_ptr inst) diff --git a/StandAlone/CMakeLists.txt b/StandAlone/CMakeLists.txt index 027575047f..ad88442c91 100644 --- a/StandAlone/CMakeLists.txt +++ b/StandAlone/CMakeLists.txt @@ -1,4 +1,4 @@ -# Copyright (C) 2020 The Khronos Group Inc. +# Copyright (C) 2020-2023 The Khronos Group Inc. # # All rights reserved. # @@ -31,7 +31,7 @@ # ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE # POSSIBILITY OF SUCH DAMAGE. -find_host_package(PythonInterp 3 REQUIRED) +find_host_package(Python3 REQUIRED) set(GLSLANG_INTRINSIC_H "${GLSLANG_GENERATED_INCLUDEDIR}/glslang/glsl_intrinsic_header.h") set(GLSLANG_INTRINSIC_PY "${CMAKE_CURRENT_SOURCE_DIR}/../gen_extension_headers.py") @@ -39,54 +39,40 @@ set(GLSLANG_INTRINSIC_HEADER_DIR "${CMAKE_CURRENT_SOURCE_DIR}/../glslang/Extensi add_custom_command( OUTPUT ${GLSLANG_INTRINSIC_H} - COMMAND ${PYTHON_EXECUTABLE} "${GLSLANG_INTRINSIC_PY}" + COMMAND Python3::Interpreter "${GLSLANG_INTRINSIC_PY}" "-i" ${GLSLANG_INTRINSIC_HEADER_DIR} "-o" ${GLSLANG_INTRINSIC_H} DEPENDS ${GLSLANG_INTRINSIC_PY} COMMENT "Generating ${GLSLANG_INTRINSIC_H}") -#add_custom_target(glslangValidator DEPENDS ${GLSLANG_INTRINSIC_H}) - -add_library(glslang-default-resource-limits - ${CMAKE_CURRENT_SOURCE_DIR}/ResourceLimits.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/resource_limits_c.cpp) -set_property(TARGET glslang-default-resource-limits PROPERTY FOLDER glslang) -set_property(TARGET glslang-default-resource-limits PROPERTY POSITION_INDEPENDENT_CODE ON) - -target_include_directories(glslang-default-resource-limits - PUBLIC $ - PUBLIC $) - set(SOURCES StandAlone.cpp DirStackFileIncluder.h ${GLSLANG_INTRINSIC_H}) -add_executable(glslangValidator ${SOURCES}) -set_property(TARGET glslangValidator PROPERTY FOLDER tools) -glslang_set_link_args(glslangValidator) +add_executable(glslang-standalone ${SOURCES}) +set_property(TARGET glslang-standalone PROPERTY FOLDER tools) +set_property(TARGET glslang-standalone PROPERTY OUTPUT_NAME glslang) +glslang_set_link_args(glslang-standalone) set(LIBRARIES glslang + OSDependent SPIRV glslang-default-resource-limits) -if(ENABLE_SPVREMAPPER) - set(LIBRARIES ${LIBRARIES} SPVRemapper) -endif() - if(WIN32) set(LIBRARIES ${LIBRARIES} psapi) elseif(UNIX) - if(NOT ANDROID) + if(NOT ANDROID AND NOT QNX) set(LIBRARIES ${LIBRARIES} pthread) endif() endif() -target_link_libraries(glslangValidator ${LIBRARIES}) -target_include_directories(glslangValidator PUBLIC +target_link_libraries(glslang-standalone ${LIBRARIES}) +target_include_directories(glslang-standalone PUBLIC $ $) if(ENABLE_OPT) - target_include_directories(glslangValidator + target_include_directories(glslang-standalone PRIVATE ${spirv-tools_SOURCE_DIR}/include ) endif() @@ -96,7 +82,7 @@ if(ENABLE_SPVREMAPPER) add_executable(spirv-remap ${REMAPPER_SOURCES}) set_property(TARGET spirv-remap PROPERTY FOLDER tools) glslang_set_link_args(spirv-remap) - target_link_libraries(spirv-remap ${LIBRARIES}) + target_link_libraries(spirv-remap SPVRemapper ${LIBRARIES}) endif() if(WIN32) @@ -104,19 +90,35 @@ if(WIN32) endif() if(ENABLE_GLSLANG_INSTALL) - install(TARGETS glslangValidator EXPORT glslang-targets) + install(TARGETS glslang-standalone EXPORT glslang-targets) # Backward compatibility - file(WRITE "${CMAKE_CURRENT_BINARY_DIR}/glslangValidatorTargets.cmake" " - message(WARNING \"Using `glslangValidatorTargets.cmake` is deprecated: use `find_package(glslang)` to find glslang CMake targets.\") + file(WRITE "${CMAKE_CURRENT_BINARY_DIR}/glslang-standaloneTargets.cmake" " + message(WARNING \"Using `glslang-standaloneTargets.cmake` is deprecated: use `find_package(glslang)` to find glslang CMake targets.\") - if (NOT TARGET glslang::glslangValidator) - include(\"\${CMAKE_CURRENT_LIST_DIR}/../../${CMAKE_INSTALL_DATADIR}/${PROJECT_NAME}/glslang-targets.cmake\") + if (NOT TARGET glslang::glslang-standalone) + include(\"${CMAKE_INSTALL_FULL_LIBDIR}/cmake/${PROJECT_NAME}/glslang-targets.cmake\") endif() - add_library(glslangValidator ALIAS glslang::glslangValidator) + add_library(glslang-standalone ALIAS glslang::glslang-standalone) ") - install(FILES "${CMAKE_CURRENT_BINARY_DIR}/glslangValidatorTargets.cmake" DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake) + install(FILES "${CMAKE_CURRENT_BINARY_DIR}/glslang-standaloneTargets.cmake" DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake) + + # Create a symbolic link to glslang named glslangValidator for backwards compatibility + set(legacy_glslang_name "glslangValidator${CMAKE_EXECUTABLE_SUFFIX}") + 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} $ ${legacy_glslang_name} + WORKING_DIRECTORY $) + + # Create the same symlink at install time + install(CODE "execute_process( \ + COMMAND ${CMAKE_COMMAND} -E ${link_method} $ ${legacy_glslang_name} \ + WORKING_DIRECTORY \$ENV{DESTDIR}${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_BINDIR})") if(ENABLE_SPVREMAPPER) install(TARGETS spirv-remap EXPORT glslang-targets) @@ -126,7 +128,7 @@ if(ENABLE_GLSLANG_INSTALL) message(WARNING \"Using `spirv-remapTargets.cmake` is deprecated: use `find_package(glslang)` to find glslang CMake targets.\") if (NOT TARGET glslang::spirv-remap) - include(\"\${CMAKE_CURRENT_LIST_DIR}/../../${CMAKE_INSTALL_DATADIR}/${PROJECT_NAME}/glslang-targets.cmake\") + include(\"${CMAKE_INSTALL_FULL_LIBDIR}/cmake/${PROJECT_NAME}/glslang-targets.cmake\") endif() add_library(spirv-remap ALIAS glslang::spirv-remap) @@ -134,18 +136,4 @@ if(ENABLE_GLSLANG_INSTALL) install(FILES "${CMAKE_CURRENT_BINARY_DIR}/spirv-remapTargets.cmake" DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake) endif() - install(TARGETS glslang-default-resource-limits EXPORT glslang-targets) - - # Backward compatibility - file(WRITE "${CMAKE_CURRENT_BINARY_DIR}/glslang-default-resource-limitsTargets.cmake" " - message(WARNING \"Using `glslang-default-resource-limitsTargets.cmake` is deprecated: use `find_package(glslang)` to find glslang CMake targets.\") - - if (NOT TARGET glslang::glslang-default-resource-limits) - include(\"\${CMAKE_CURRENT_LIST_DIR}/../../${CMAKE_INSTALL_DATADIR}/${PROJECT_NAME}/glslang-targets.cmake\") - endif() - - add_library(glslang-default-resource-limits ALIAS glslang::glslang-default-resource-limits) - ") - install(FILES "${CMAKE_CURRENT_BINARY_DIR}/glslang-default-resource-limitsTargets.cmake" DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake) - endif() diff --git a/StandAlone/StandAlone.cpp b/StandAlone/StandAlone.cpp index 37282f2d01..b31a644941 100644 --- a/StandAlone/StandAlone.cpp +++ b/StandAlone/StandAlone.cpp @@ -41,7 +41,7 @@ #define _CRT_SECURE_NO_WARNINGS #endif -#include "ResourceLimits.h" +#include "glslang/Public/ResourceLimits.h" #include "Worklist.h" #include "DirStackFileIncluder.h" #include "./../glslang/Include/ShHandle.h" @@ -51,15 +51,16 @@ #include "../SPIRV/doc.h" #include "../SPIRV/disassemble.h" -#include -#include +#include +#include #include #include -#include +#include +#include #include #include -#include #include +#include #include "../glslang/OSDependent/osinclude.h" @@ -73,46 +74,49 @@ extern "C" { } // Command-line options -enum TOptions { - EOptionNone = 0, - EOptionIntermediate = (1 << 0), - EOptionSuppressInfolog = (1 << 1), - EOptionMemoryLeakMode = (1 << 2), - EOptionRelaxedErrors = (1 << 3), - EOptionGiveWarnings = (1 << 4), - EOptionLinkProgram = (1 << 5), - EOptionMultiThreaded = (1 << 6), - EOptionDumpConfig = (1 << 7), - EOptionDumpReflection = (1 << 8), - EOptionSuppressWarnings = (1 << 9), - EOptionDumpVersions = (1 << 10), - EOptionSpv = (1 << 11), - EOptionHumanReadableSpv = (1 << 12), - EOptionVulkanRules = (1 << 13), - EOptionDefaultDesktop = (1 << 14), - EOptionOutputPreprocessed = (1 << 15), - EOptionOutputHexadecimal = (1 << 16), - EOptionReadHlsl = (1 << 17), - EOptionCascadingErrors = (1 << 18), - EOptionAutoMapBindings = (1 << 19), - EOptionFlattenUniformArrays = (1 << 20), - EOptionNoStorageFormat = (1 << 21), - EOptionKeepUncalled = (1 << 22), - EOptionHlslOffsets = (1 << 23), - EOptionHlslIoMapping = (1 << 24), - EOptionAutoMapLocations = (1 << 25), - EOptionDebug = (1 << 26), - EOptionStdin = (1 << 27), - EOptionOptimizeDisable = (1 << 28), - EOptionOptimizeSize = (1 << 29), - EOptionInvertY = (1 << 30), - EOptionDumpBareVersion = (1 << 31), +enum TOptions : uint64_t { + EOptionNone = 0, + EOptionIntermediate = (1ull << 0), + EOptionSuppressInfolog = (1ull << 1), + EOptionMemoryLeakMode = (1ull << 2), + EOptionRelaxedErrors = (1ull << 3), + EOptionGiveWarnings = (1ull << 4), + EOptionLinkProgram = (1ull << 5), + EOptionMultiThreaded = (1ull << 6), + EOptionDumpConfig = (1ull << 7), + EOptionDumpReflection = (1ull << 8), + EOptionSuppressWarnings = (1ull << 9), + EOptionDumpVersions = (1ull << 10), + EOptionSpv = (1ull << 11), + EOptionHumanReadableSpv = (1ull << 12), + EOptionVulkanRules = (1ull << 13), + EOptionDefaultDesktop = (1ull << 14), + EOptionOutputPreprocessed = (1ull << 15), + EOptionOutputHexadecimal = (1ull << 16), + EOptionReadHlsl = (1ull << 17), + EOptionCascadingErrors = (1ull << 18), + EOptionAutoMapBindings = (1ull << 19), + EOptionFlattenUniformArrays = (1ull << 20), + EOptionNoStorageFormat = (1ull << 21), + EOptionKeepUncalled = (1ull << 22), + EOptionHlslOffsets = (1ull << 23), + EOptionHlslIoMapping = (1ull << 24), + EOptionAutoMapLocations = (1ull << 25), + EOptionDebug = (1ull << 26), + EOptionStdin = (1ull << 27), + EOptionOptimizeDisable = (1ull << 28), + EOptionOptimizeSize = (1ull << 29), + EOptionInvertY = (1ull << 30), + EOptionDumpBareVersion = (1ull << 31), + EOptionCompileOnly = (1ull << 32), }; bool targetHlslFunctionality1 = false; bool SpvToolsDisassembler = false; bool SpvToolsValidate = false; bool NaNClamp = false; bool stripDebugInfo = false; +bool emitNonSemanticShaderDebugInfo = false; +bool emitNonSemanticShaderDebugSource = false; bool beQuiet = false; bool VulkanRulesRelaxed = false; bool autoSampledTextures = false; @@ -141,13 +145,13 @@ void FreeFileData(char* data); void InfoLogMsg(const char* msg, const char* name, const int num); // Globally track if any compile or link failure. -bool CompileFailed = false; -bool LinkFailed = false; +std::atomic CompileFailed{0}; +std::atomic LinkFailed{0}; +std::atomic CompileOrLinkFailed{0}; // array of unique places to leave the shader names and infologs for the asynchronous compiles std::vector> WorkItems; -TBuiltInResource Resources; std::string ConfigFile; // @@ -156,18 +160,16 @@ std::string ConfigFile; void ProcessConfigFile() { if (ConfigFile.size() == 0) - Resources = glslang::DefaultTBuiltInResource; -#ifndef GLSLANG_WEB + *GetResources() = *GetDefaultResources(); else { char* configString = ReadFileData(ConfigFile.c_str()); - glslang::DecodeResourceLimits(&Resources, configString); + DecodeResourceLimits(GetResources(), configString); FreeFileData(configString); } -#endif } int ReflectOptions = EShReflectionDefault; -int Options = 0; +std::underlying_type_t Options = EOptionNone; const char* ExecutableName = nullptr; const char* binaryFileName = nullptr; const char* depencyFileName = nullptr; @@ -257,6 +259,17 @@ class TPreamble { text.append("\n"); } + void addText(std::string preambleText) + { + fixLine(preambleText); + + Processes.push_back("preamble-text"); + Processes.back().append(preambleText); + + text.append(preambleText); + text.append("\n"); + } + protected: void fixLine(std::string& line) { @@ -293,8 +306,8 @@ const char* GetBinaryName(EShLanguage stage) case EShLangClosestHit: name = "rchit.spv"; break; case EShLangMiss: name = "rmiss.spv"; break; case EShLangCallable: name = "rcall.spv"; break; - case EShLangMeshNV: name = "mesh.spv"; break; - case EShLangTaskNV: name = "task.spv"; break; + case EShLangMesh : name = "mesh.spv"; break; + case EShLangTask : name = "task.spv"; break; default: name = "unknown"; break; } } else @@ -503,7 +516,7 @@ void ProcessGlobalBlockSettings(int& argc, char**& argv, std::string* name, unsi if (set) { errno = 0; - int setVal = ::strtol(argv[curArg], NULL, 10); + int setVal = ::strtol(argv[curArg], nullptr, 10); if (errno || setVal < 0) { printf("%s: invalid set\n", argv[curArg]); usage(); @@ -515,7 +528,7 @@ void ProcessGlobalBlockSettings(int& argc, char**& argv, std::string* name, unsi if (binding) { errno = 0; - int bindingVal = ::strtol(argv[curArg], NULL, 10); + int bindingVal = ::strtol(argv[curArg], nullptr, 10); if (errno || bindingVal < 0) { printf("%s: invalid binding\n", argv[curArg]); usage(); @@ -593,12 +606,12 @@ void ProcessArguments(std::vector>& workItem const auto getUniformOverride = [getStringOperand]() { const char *arg = getStringOperand("-u:"); const char *split = strchr(arg, ':'); - if (split == NULL) { + if (split == nullptr) { printf("%s: missing location\n", arg); exit(EFailUsage); } errno = 0; - int location = ::strtol(split + 1, NULL, 10); + int location = ::strtol(split + 1, nullptr, 10); if (errno) { printf("%s: invalid location\n", arg); exit(EFailUsage); @@ -625,7 +638,7 @@ void ProcessArguments(std::vector>& workItem } else if (lowerword == "uniform-base") { if (argc <= 1) Error("no provided", lowerword.c_str()); - uniformBase = ::strtol(argv[1], NULL, 10); + uniformBase = ::strtol(argv[1], nullptr, 10); bumpArg(); break; } else if (lowerword == "client") { @@ -713,7 +726,7 @@ void ProcessArguments(std::vector>& workItem HlslDxPositionW = true; } else if (lowerword == "enhanced-msgs") { EnhancedMsgs = true; - } else if (lowerword == "auto-sampled-textures") { + } else if (lowerword == "auto-sampled-textures") { autoSampledTextures = true; } else if (lowerword == "invert-y" || // synonyms lowerword == "iy") { @@ -726,6 +739,13 @@ void ProcessArguments(std::vector>& workItem } else if (lowerword == "no-storage-format" || // synonyms lowerword == "nsf") { Options |= EOptionNoStorageFormat; + } else if (lowerword == "preamble-text" || + lowerword == "p") { + if (argc > 1) + UserPreamble.addText(argv[1]); + else + Error("expects ", argv[0]); + bumpArg(); } else if (lowerword == "relaxed-errors") { Options |= EOptionRelaxedErrors; } else if (lowerword == "reflect-strict-array-suffix") { @@ -872,6 +892,8 @@ void ProcessArguments(std::vector>& workItem bumpArg(); } else if (lowerword == "version") { Options |= EOptionDumpVersions; + } else if (lowerword == "no-link") { + Options |= EOptionCompileOnly; } else if (lowerword == "help") { usage(); break; @@ -925,6 +947,9 @@ void ProcessArguments(std::vector>& workItem else Error("unknown -O option"); break; + case 'P': + UserPreamble.addText(getStringOperand("-P")); + break; case 'R': VulkanRulesRelaxed = true; break; @@ -969,11 +994,21 @@ void ProcessArguments(std::vector>& workItem case 'g': // Override previous -g or -g0 argument stripDebugInfo = false; + emitNonSemanticShaderDebugInfo = false; Options &= ~EOptionDebug; if (argv[0][2] == '0') stripDebugInfo = true; - else + else { Options |= EOptionDebug; + if (argv[0][2] == 'V') { + emitNonSemanticShaderDebugInfo = true; + if (argv[0][3] == 'S') { + emitNonSemanticShaderDebugSource = true; + } else { + emitNonSemanticShaderDebugSource = false; + } + } + } break; case 'h': usage(); @@ -1133,6 +1168,7 @@ void CompileShaders(glslang::TWorklist& worklist) if (Options & EOptionDebug) Error("cannot generate debug information unless linking to generate code"); + // NOTE: TWorkList::remove is thread-safe glslang::TWorkItem* workItem; if (Options & EOptionStdin) { if (worklist.remove(workItem)) { @@ -1150,7 +1186,7 @@ void CompileShaders(glslang::TWorklist& worklist) } else { while (worklist.remove(workItem)) { ShHandle compiler = ShConstructCompiler(FindLanguage(workItem->name), Options); - if (compiler == 0) + if (compiler == nullptr) return; CompileFile(workItem->name.c_str(), compiler); @@ -1280,13 +1316,14 @@ void CompileAndLinkShaderUnits(std::vector compUnits) // glslang::TProgram& program = *new glslang::TProgram; + const bool compileOnly = (Options & EOptionCompileOnly) != 0; for (auto it = compUnits.cbegin(); it != compUnits.cend(); ++it) { const auto &compUnit = *it; for (int i = 0; i < compUnit.count; i++) { sources.push_back(compUnit.fileNameList[i]); } glslang::TShader* shader = new glslang::TShader(compUnit.stage); - shader->setStringsWithLengthsAndNames(compUnit.text, NULL, compUnit.fileNameList, compUnit.count); + shader->setStringsWithLengthsAndNames(compUnit.text, nullptr, compUnit.fileNameList, compUnit.count); if (entryPointName) shader->setEntryPoint(entryPointName); if (sourceEntryPointName) { @@ -1296,6 +1333,9 @@ void CompileAndLinkShaderUnits(std::vector compUnits) shader->setSourceEntryPoint(sourceEntryPointName); } + if (compileOnly) + shader->setCompileOnly(); + shader->setOverrideVersion(GlslVersion); std::string intrinsicString = getIntrinsic(compUnit.text, compUnit.count); @@ -1310,7 +1350,6 @@ void CompileAndLinkShaderUnits(std::vector compUnits) shader->setPreamble(PreambleString.c_str()); shader->addProcesses(Processes); -#ifndef GLSLANG_WEB // Set IO mapper binding shift values for (int r = 0; r < glslang::EResCount; ++r) { const glslang::TResourceType res = glslang::TResourceType(r); @@ -1342,7 +1381,6 @@ void CompileAndLinkShaderUnits(std::vector compUnits) } shader->setUniformLocationBase(uniformBase); -#endif if (VulkanRulesRelaxed) { for (auto& storageOverride : blockStorageOverrides) { @@ -1379,6 +1417,9 @@ void CompileAndLinkShaderUnits(std::vector compUnits) if (EnhancedMsgs) shader->setEnhancedMsgs(); + if (emitNonSemanticShaderDebugInfo) + shader->setDebugInfo(true); + // Set up the environment, some subsettings take precedence over earlier // ways of setting things. if (Options & EOptionSpv) { @@ -1399,24 +1440,23 @@ void CompileAndLinkShaderUnits(std::vector compUnits) const int defaultVersion = Options & EOptionDefaultDesktop ? 110 : 100; -#ifndef GLSLANG_WEB if (Options & EOptionOutputPreprocessed) { std::string str; - if (shader->preprocess(&Resources, defaultVersion, ENoProfile, false, false, messages, &str, includer)) { + if (shader->preprocess(GetResources(), defaultVersion, ENoProfile, false, false, messages, &str, includer)) { PutsIfNonEmpty(str.c_str()); } else { - CompileFailed = true; + CompileFailed = 1; } StderrIfNonEmpty(shader->getInfoLog()); StderrIfNonEmpty(shader->getInfoDebugLog()); continue; } -#endif - if (! shader->parse(&Resources, defaultVersion, false, messages, includer)) - CompileFailed = true; + if (! shader->parse(GetResources(), defaultVersion, false, messages, includer)) + CompileFailed = 1; - program.addShader(shader); + if (!compileOnly) + program.addShader(shader); if (! (Options & EOptionSuppressInfolog) && ! (Options & EOptionMemoryLeakMode)) { @@ -1431,77 +1471,98 @@ void CompileAndLinkShaderUnits(std::vector compUnits) // Program-level processing... // - // Link - if (! (Options & EOptionOutputPreprocessed) && ! program.link(messages)) - LinkFailed = true; - -#ifndef GLSLANG_WEB - // Map IO - if (Options & EOptionSpv) { - if (!program.mapIO()) + if (!compileOnly) { + // Link + if (!(Options & EOptionOutputPreprocessed) && !program.link(messages)) LinkFailed = true; - } -#endif - // Report - if (! (Options & EOptionSuppressInfolog) && - ! (Options & EOptionMemoryLeakMode)) { - PutsIfNonEmpty(program.getInfoLog()); - PutsIfNonEmpty(program.getInfoDebugLog()); - } + // Map IO + if (Options & EOptionSpv) { + if (!program.mapIO()) + LinkFailed = true; + } + + // Report + if (!(Options & EOptionSuppressInfolog) && !(Options & EOptionMemoryLeakMode)) { + PutsIfNonEmpty(program.getInfoLog()); + PutsIfNonEmpty(program.getInfoDebugLog()); + } -#ifndef GLSLANG_WEB - // Reflect - if (Options & EOptionDumpReflection) { - program.buildReflection(ReflectOptions); - program.dumpReflection(); + // Reflect + if (Options & EOptionDumpReflection) { + program.buildReflection(ReflectOptions); + program.dumpReflection(); + } } -#endif std::vector outputFiles; // Dump SPIR-V if (Options & EOptionSpv) { - if (CompileFailed || LinkFailed) + CompileOrLinkFailed.fetch_or(CompileFailed); + CompileOrLinkFailed.fetch_or(LinkFailed); + if (static_cast(CompileOrLinkFailed.load())) printf("SPIR-V is not generated for failed compile or link\n"); else { - for (int stage = 0; stage < EShLangCount; ++stage) { - if (program.getIntermediate((EShLanguage)stage)) { - std::vector spirv; - spv::SpvBuildLogger logger; - glslang::SpvOptions spvOptions; - if (Options & EOptionDebug) - spvOptions.generateDebugInfo = true; - else if (stripDebugInfo) - spvOptions.stripDebugInfo = true; - spvOptions.disableOptimizer = (Options & EOptionOptimizeDisable) != 0; - spvOptions.optimizeSize = (Options & EOptionOptimizeSize) != 0; - spvOptions.disassemble = SpvToolsDisassembler; - spvOptions.validate = SpvToolsValidate; - glslang::GlslangToSpv(*program.getIntermediate((EShLanguage)stage), spirv, &logger, &spvOptions); - - // Dump the spv to a file or stdout, etc., but only if not doing - // memory/perf testing, as it's not internal to programmatic use. - if (! (Options & EOptionMemoryLeakMode)) { - printf("%s", logger.getAllMessages().c_str()); - if (Options & EOptionOutputHexadecimal) { - glslang::OutputSpvHex(spirv, GetBinaryName((EShLanguage)stage), variableName); - } else { - glslang::OutputSpvBin(spirv, GetBinaryName((EShLanguage)stage)); + std::vector intermediates; + if (!compileOnly) { + for (int stage = 0; stage < EShLangCount; ++stage) { + if (auto* i = program.getIntermediate((EShLanguage)stage)) { + intermediates.emplace_back(i); + } + } + } else { + for (const auto* shader : shaders) { + if (auto* i = shader->getIntermediate()) { + intermediates.emplace_back(i); + } + } + } + for (auto* intermediate : intermediates) { + std::vector spirv; + spv::SpvBuildLogger logger; + glslang::SpvOptions spvOptions; + if (Options & EOptionDebug) { + spvOptions.generateDebugInfo = true; + if (emitNonSemanticShaderDebugInfo) { + spvOptions.emitNonSemanticShaderDebugInfo = true; + if (emitNonSemanticShaderDebugSource) { + spvOptions.emitNonSemanticShaderDebugSource = true; } - - outputFiles.push_back(GetBinaryName((EShLanguage)stage)); -#ifndef GLSLANG_WEB - if (!SpvToolsDisassembler && (Options & EOptionHumanReadableSpv)) - spv::Disassemble(std::cout, spirv); -#endif } + } else if (stripDebugInfo) + spvOptions.stripDebugInfo = true; + spvOptions.disableOptimizer = (Options & EOptionOptimizeDisable) != 0; + spvOptions.optimizeSize = (Options & EOptionOptimizeSize) != 0; + spvOptions.disassemble = SpvToolsDisassembler; + spvOptions.validate = SpvToolsValidate; + spvOptions.compileOnly = compileOnly; + glslang::GlslangToSpv(*intermediate, spirv, &logger, &spvOptions); + + // Dump the spv to a file or stdout, etc., but only if not doing + // memory/perf testing, as it's not internal to programmatic use. + if (!(Options & EOptionMemoryLeakMode)) { + printf("%s", logger.getAllMessages().c_str()); + const auto filename = GetBinaryName(intermediate->getStage()); + if (Options & EOptionOutputHexadecimal) { + if (!glslang::OutputSpvHex(spirv, filename, variableName)) + exit(EFailUsage); + } else { + if (!glslang::OutputSpvBin(spirv, filename)) + exit(EFailUsage); + } + + outputFiles.push_back(filename); + if (!SpvToolsDisassembler && (Options & EOptionHumanReadableSpv)) + spv::Disassemble(std::cout, spirv); } } } } - if (depencyFileName && !(CompileFailed || LinkFailed)) { + CompileOrLinkFailed.fetch_or(CompileFailed); + CompileOrLinkFailed.fetch_or(LinkFailed); + if (depencyFileName && !static_cast(CompileOrLinkFailed.load())) { std::set includedFiles = includer.getIncludedFiles(); sources.insert(sources.end(), includedFiles.begin(), includedFiles.end()); @@ -1589,13 +1650,11 @@ int singleMain() workList.add(item.get()); }); -#ifndef GLSLANG_WEB if (Options & EOptionDumpConfig) { - printf("%s", glslang::GetDefaultTBuiltInResourceString().c_str()); + printf("%s", GetDefaultTBuiltInResourceString().c_str()); if (workList.empty()) return ESuccess; } -#endif if (Options & EOptionDumpBareVersion) { printf("%d:%d.%d.%d%s\n", glslang::GetSpirvGeneratorVersion(), GLSLANG_VERSION_MAJOR, GLSLANG_VERSION_MINOR, @@ -1679,9 +1738,9 @@ int singleMain() ShFinalize(); } - if (CompileFailed) + if (CompileFailed.load()) return EFailCompile; - if (LinkFailed) + if (LinkFailed.load()) return EFailLink; return 0; @@ -1780,9 +1839,9 @@ EShLanguage FindLanguage(const std::string& name, bool parseStageName) else if (stageName == "rcall") return EShLangCallable; else if (stageName == "mesh") - return EShLangMeshNV; + return EShLangMesh; else if (stageName == "task") - return EShLangTaskNV; + return EShLangTask; usage(); return EShLangVertex; @@ -1812,12 +1871,12 @@ void CompileFile(const char* fileName, ShHandle compiler) SetMessageOptions(messages); if (UserPreamble.isSet()) - Error("-D and -U options require -l (linking)\n"); + Error("-D, -U and -P options require -l (linking)\n"); for (int i = 0; i < ((Options & EOptionMemoryLeakMode) ? 100 : 1); ++i) { for (int j = 0; j < ((Options & EOptionMemoryLeakMode) ? 100 : 1); ++j) { // ret = ShCompile(compiler, shaderStrings, NumShaderStrings, lengths, EShOptNone, &Resources, Options, (Options & EOptionDefaultDesktop) ? 110 : 100, false, messages); - ret = ShCompile(compiler, &shaderString, 1, nullptr, EShOptNone, &Resources, Options, (Options & EOptionDefaultDesktop) ? 110 : 100, false, messages); + ret = ShCompile(compiler, &shaderString, 1, nullptr, EShOptNone, GetResources(), Options, (Options & EOptionDefaultDesktop) ? 110 : 100, false, messages); // const char* multi[12] = { "# ve", "rsion", " 300 e", "s", "\n#err", // "or should be l", "ine 1", "string 5\n", "float glo", "bal", // ";\n#error should be line 2\n void main() {", "global = 2.3;}" }; @@ -1841,7 +1900,7 @@ void CompileFile(const char* fileName, ShHandle compiler) // void usage() { - printf("Usage: glslangValidator [option]... [file]...\n" + printf("Usage: glslang [option]... [file]...\n" "\n" "'file' can end in . for auto-stage classification, where is:\n" " .conf to provide a config file that replaces the default configuration\n" @@ -1882,6 +1941,9 @@ void usage() " is searched first, followed by left-to-right order of -I\n" " -Od disables optimization; may cause illegal SPIR-V for HLSL\n" " -Os optimizes SPIR-V to minimize size\n" + " -P | --preamble-text | --P \n" + " inject custom preamble text, which is treated as if it\n" + " appeared immediately after the version declaration (if any).\n" " -R use relaxed verification rules for generating Vulkan SPIR-V,\n" " allowing the use of default uniforms, atomic_uints, and\n" " gl_VertexID and gl_InstanceID keywords.\n" @@ -1906,6 +1968,8 @@ void usage() " SPV_GOOGLE_hlsl_functionality1 extension\n" " -g generate debug information\n" " -g0 strip debug information\n" + " -gV generate nonsemantic shader debug information\n" + " -gVS generate nonsemantic shader debug information with source\n" " -h print this usage message\n" " -i intermediate tree (glslang AST) is printed out\n" " -l link all input files together to form a single module\n" @@ -1927,7 +1991,7 @@ void usage() " without explicit bindings\n" " --auto-map-locations | --aml automatically locate input/output lacking\n" " 'location' (fragile, not cross stage)\n" - " --auto-sampled-textures Removes sampler variables and converts\n" + " --auto-sampled-textures Removes sampler variables and converts\n" " existing textures to sampled textures\n" " --client {vulkan|opengl} see -V and -G\n" " --depfile writes depfile for build systems\n" @@ -2042,7 +2106,9 @@ void usage() " --vn creates a C header file that contains a\n" " uint32_t array named \n" " 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"); exit(EFailUsage); } diff --git a/StandAlone/spirv-remap.cpp b/StandAlone/spirv-remap.cpp index 15c3ac513b..1bd4a2d6a6 100644 --- a/StandAlone/spirv-remap.cpp +++ b/StandAlone/spirv-remap.cpp @@ -37,7 +37,11 @@ #include #include #include +#include +// +// Include remapper +// #include "../SPIRV/SPVRemapper.h" namespace { @@ -157,7 +161,7 @@ namespace { } // Print helpful usage message to stdout, and exit - void usage(const char* const name, const char* const msg = 0) + void usage(const char* const name, const char* const msg = nullptr) { if (msg) std::cout << msg << std::endl << std::endl; @@ -172,7 +176,7 @@ namespace { << " [--strip-all | --strip all | -s]" << " [--strip-white-list]" << " [--do-everything]" - << " --input | -i file1 [file2...] --output|-o DESTDIR" + << " --input | -i file1 [file2...] --output|-o DESTDIR | destfile1 [destfile2...]" << std::endl; std::cout << " " << basename(name) << " [--version | -V]" << std::endl; @@ -182,32 +186,45 @@ namespace { } // grind through each SPIR in turn - void execute(const std::vector& inputFile, const std::string& outputDir, - const std::string& whiteListFile, int opts, int verbosity) + void execute(const std::vector& inputFiles, + const std::vector& outputDirOrFiles, + const bool isSingleOutputDir, + const std::string& whiteListFile, + int opts, + int verbosity) { std::vector whiteListStrings; - if(!whiteListFile.empty()) + if (!whiteListFile.empty()) read(whiteListStrings, whiteListFile, verbosity); - for (auto it = inputFile.cbegin(); it != inputFile.cend(); ++it) { - const std::string &filename = *it; + for (std::size_t ii=0; ii spv; - read(spv, filename, verbosity); + read(spv, inputFiles[ii], verbosity); + spv::spirvbin_t(verbosity).remap(spv, whiteListStrings, opts); - const std::string outfile = outputDir + path_sep_char() + basename(filename); - write(spv, outfile, verbosity); + + if (isSingleOutputDir) { + // write all outputs to same directory + const std::string outFile = outputDirOrFiles[0] + path_sep_char() + basename(inputFiles[ii]); + write(spv, outFile, verbosity); + } else { + // write each input to its associated output + write(spv, outputDirOrFiles[ii], verbosity); + } } if (verbosity > 0) - std::cout << "Done: " << inputFile.size() << " file(s) processed" << std::endl; + std::cout << "Done: " << inputFiles.size() << " file(s) processed" << std::endl; } // Parse command line options - void parseCmdLine(int argc, char** argv, std::vector& inputFile, - std::string& outputDir, - std::string& stripWhiteListFile, - int& options, - int& verbosity) + void parseCmdLine(int argc, + char** argv, + std::vector& inputFiles, + std::vector& outputDirOrFiles, + std::string& stripWhiteListFile, + int& options, + int& verbosity) { if (argc < 2) usage(argv[0]); @@ -222,18 +239,19 @@ namespace { const std::string arg = argv[a]; if (arg == "--output" || arg == "-o") { - // Output directory - if (++a >= argc) - usage(argv[0], "--output requires an argument"); - if (!outputDir.empty()) - usage(argv[0], "--output can be provided only once"); - - outputDir = argv[a++]; + // Collect output dirs or files + for (++a; a < argc && argv[a][0] != '-'; ++a) + outputDirOrFiles.push_back(argv[a]); - // Remove trailing directory separator characters - while (!outputDir.empty() && outputDir.back() == path_sep_char()) - outputDir.pop_back(); + if (outputDirOrFiles.size() == 0) + usage(argv[0], "--output requires an argument"); + // Remove trailing directory separator characters from all paths + for (std::size_t ii=0; ii inputFile; - std::string outputDir; + std::vector inputFiles; + std::vector outputDirOrFiles; std::string whiteListFile; int opts; int verbosity; -#ifdef use_cpp11 // handle errors by exiting spv::spirvbin_t::registerErrorHandler(errHandler); // Log messages to std::cout spv::spirvbin_t::registerLogHandler(logHandler); -#endif if (argc < 2) usage(argv[0]); - parseCmdLine(argc, argv, inputFile, outputDir, whiteListFile, opts, verbosity); + parseCmdLine(argc, argv, inputFiles, outputDirOrFiles, whiteListFile, opts, verbosity); + + if (outputDirOrFiles.empty()) + usage(argv[0], "Output directory or file(s) required."); + + const bool isMultiInput = inputFiles.size() > 1; + const bool isMultiOutput = outputDirOrFiles.size() > 1; + const bool isSingleOutputDir = !isMultiOutput && std::filesystem::is_directory(outputDirOrFiles[0]); + + if (isMultiInput && !isMultiOutput && !isSingleOutputDir) + usage(argv[0], "Output is not a directory."); + - if (outputDir.empty()) - usage(argv[0], "Output directory required"); + if (isMultiInput && isMultiOutput && (outputDirOrFiles.size() != inputFiles.size())) + usage(argv[0], "Output must be either a single directory or one output file per input."); // Main operations: read, remap, and write. - execute(inputFile, outputDir, whiteListFile, opts, verbosity); + execute(inputFiles, outputDirOrFiles, isSingleOutputDir, whiteListFile, opts, verbosity); // If we get here, everything went OK! Nothing more to be done. } diff --git a/Test/GL_ARB_bindless_texture.frag b/Test/GL_ARB_bindless_texture.frag new file mode 100644 index 0000000000..58c8359e4c --- /dev/null +++ b/Test/GL_ARB_bindless_texture.frag @@ -0,0 +1,50 @@ +#version 460 compatibility + +#extension GL_ARB_bindless_texture: require + +#if !defined GL_ARB_bindless_texture +# error GL_ARB_bindless_texture is not defined +#elif GL_ARB_bindless_texture != 1 +# error GL_ARB_bindless_texture is not equal to 1 +#endif + +// Valid usage cases +layout(bindless_sampler) uniform sampler2D s0; // case0: bindless layout +in sampler2D s1; // case1: sampler as an input +uniform uvec2 s2; // case2: uvec2 as sampler constructor +uniform ivec2 s3; // case3: ivec2 as sampler constructor +uniform int index; +in sampler2D s4[2][3]; // case4: sampler arrays of arrays +uniform BB {sampler2D s5;} bbs5[2]; // case5: uniform block member as a sampler +in samplerBuffer s6; // case6: samplerBuffer input +uniform UBO9 {samplerBuffer s7;}; // case7: samplerBuffer as an uniform block member +buffer SSBO10 {samplerBuffer s8;}; // case8: samplerBuffer as an ssbo member +layout(rgba8, bindless_image) in image2D i9; // case9: bindless image as an input + + +uniform vec2 coord; // bindless coord 2-D +uniform int icoord; // bindless coord 1-D +out vec4 color0; +out vec4 color1; +out vec4 color2; +out vec4 color3; +out vec4 color4; +out vec4 color5; +out vec4 color6; +out vec4 color7; +out vec4 color8; +out vec4 color9; + +void main() +{ + color0 = texture(s0, coord); + color1 = texture(s1, coord); + color2 = texture(sampler2D(s2), coord); + color3 = texture(sampler2D(s3), coord); + color4 = texture(s4[index][index], coord); + color5 = texture(bbs5[index].s5, coord); + color6 = texelFetch(s6, icoord); + color7 = texelFetch(s7, icoord); + color8 = texelFetch(s8, icoord); + color9 = imageLoad(i9, ivec2(0,0)); +} \ No newline at end of file diff --git a/Test/baseLegalResults/hlsl.aliasOpaque.frag.out b/Test/baseLegalResults/hlsl.aliasOpaque.frag.out index 2afdb104e2..100f6d7132 100644 --- a/Test/baseLegalResults/hlsl.aliasOpaque.frag.out +++ b/Test/baseLegalResults/hlsl.aliasOpaque.frag.out @@ -1,6 +1,6 @@ hlsl.aliasOpaque.frag // Module Version 10000 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 89 Capability Shader diff --git a/Test/baseLegalResults/hlsl.flattenOpaque.frag.out b/Test/baseLegalResults/hlsl.flattenOpaque.frag.out index 7bb33e6074..be1637ff61 100644 --- a/Test/baseLegalResults/hlsl.flattenOpaque.frag.out +++ b/Test/baseLegalResults/hlsl.flattenOpaque.frag.out @@ -1,6 +1,6 @@ hlsl.flattenOpaque.frag // Module Version 10000 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 190 Capability Shader diff --git a/Test/baseLegalResults/hlsl.flattenOpaqueInit.vert.out b/Test/baseLegalResults/hlsl.flattenOpaqueInit.vert.out index 0e8583f9f0..18d76949be 100644 --- a/Test/baseLegalResults/hlsl.flattenOpaqueInit.vert.out +++ b/Test/baseLegalResults/hlsl.flattenOpaqueInit.vert.out @@ -1,6 +1,6 @@ hlsl.flattenOpaqueInit.vert // Module Version 10000 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 139 Capability Shader diff --git a/Test/baseLegalResults/hlsl.flattenOpaqueInitMix.vert.out b/Test/baseLegalResults/hlsl.flattenOpaqueInitMix.vert.out index fe858efde5..914d9b5dfc 100644 --- a/Test/baseLegalResults/hlsl.flattenOpaqueInitMix.vert.out +++ b/Test/baseLegalResults/hlsl.flattenOpaqueInitMix.vert.out @@ -1,6 +1,6 @@ hlsl.flattenOpaqueInitMix.vert // Module Version 10000 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 99 Capability Shader diff --git a/Test/baseLegalResults/hlsl.flattenSubset.frag.out b/Test/baseLegalResults/hlsl.flattenSubset.frag.out index 46d3afba6e..2be41f04db 100644 --- a/Test/baseLegalResults/hlsl.flattenSubset.frag.out +++ b/Test/baseLegalResults/hlsl.flattenSubset.frag.out @@ -1,6 +1,6 @@ hlsl.flattenSubset.frag // Module Version 10000 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 67 Capability Shader diff --git a/Test/baseLegalResults/hlsl.flattenSubset2.frag.out b/Test/baseLegalResults/hlsl.flattenSubset2.frag.out index 408c0eac91..656ff7385b 100644 --- a/Test/baseLegalResults/hlsl.flattenSubset2.frag.out +++ b/Test/baseLegalResults/hlsl.flattenSubset2.frag.out @@ -1,6 +1,6 @@ hlsl.flattenSubset2.frag // Module Version 10000 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 53 Capability Shader diff --git a/Test/baseLegalResults/hlsl.intrinsics.evalfns.frag.out b/Test/baseLegalResults/hlsl.intrinsics.evalfns.frag.out index 564f0f4cf8..936df717b8 100644 --- a/Test/baseLegalResults/hlsl.intrinsics.evalfns.frag.out +++ b/Test/baseLegalResults/hlsl.intrinsics.evalfns.frag.out @@ -1,6 +1,6 @@ hlsl.intrinsics.evalfns.frag // Module Version 10000 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 274 Capability Shader diff --git a/Test/baseLegalResults/hlsl.partialFlattenLocal.vert.out b/Test/baseLegalResults/hlsl.partialFlattenLocal.vert.out index f45a76881f..b664098319 100644 --- a/Test/baseLegalResults/hlsl.partialFlattenLocal.vert.out +++ b/Test/baseLegalResults/hlsl.partialFlattenLocal.vert.out @@ -1,6 +1,6 @@ hlsl.partialFlattenLocal.vert // Module Version 10000 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 164 Capability Shader diff --git a/Test/baseLegalResults/hlsl.partialFlattenMixed.vert.out b/Test/baseLegalResults/hlsl.partialFlattenMixed.vert.out index 8975ed2a02..8f3ac26faf 100644 --- a/Test/baseLegalResults/hlsl.partialFlattenMixed.vert.out +++ b/Test/baseLegalResults/hlsl.partialFlattenMixed.vert.out @@ -1,6 +1,6 @@ hlsl.partialFlattenMixed.vert // Module Version 10000 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 36 Capability Shader diff --git a/Test/baseResults/120.vert.out b/Test/baseResults/120.vert.out index 6c42b75e25..fcfffe9b27 100644 --- a/Test/baseResults/120.vert.out +++ b/Test/baseResults/120.vert.out @@ -46,6 +46,7 @@ ERROR: 0:108: 'overloadE' : no matching overloaded function found ERROR: 0:111: 'overloadE' : no matching overloaded function found ERROR: 0:117: 'overloadF' : no matching overloaded function found ERROR: 0:121: 'gl_TexCoord array size' : must be less than or equal to gl_MaxTextureCoords (32) +ERROR: 0:154: 'non-float shader input/output' : not supported for this version or the enabled extensions ERROR: 0:165: 'switch' : Reserved word. ERROR: 0:171: 'default' : Reserved word. ERROR: 0:165: 'switch statements' : not supported for this version or the enabled extensions @@ -80,7 +81,7 @@ ERROR: 0:195: 'gl_ModelViewMatrix' : identifiers starting with "gl_" are reserve ERROR: 0:200: 'token pasting (##)' : not supported for this version or the enabled extensions ERROR: 0:203: 'token pasting (##)' : not supported for this version or the enabled extensions ERROR: 0:205: '' : syntax error, unexpected IDENTIFIER -ERROR: 81 compilation errors. No code generated. +ERROR: 82 compilation errors. No code generated. Shader version: 120 diff --git a/Test/baseResults/300layout.vert.out b/Test/baseResults/300layout.vert.out index 527425b37d..e1ec452474 100644 --- a/Test/baseResults/300layout.vert.out +++ b/Test/baseResults/300layout.vert.out @@ -1,6 +1,6 @@ 300layout.vert ERROR: 0:7: 'vertex input arrays' : not supported with this profile: es -ERROR: 0:8: 'in' : cannot be a structure or array +ERROR: 0:8: 'in' : cannot be a structure ERROR: 0:8: 's' : A structure containing an array is not allowed as input in ES ERROR: 0:8: 'vertex input arrays' : not supported with this profile: es ERROR: 0:8: 'location' : overlapping use of location 10 diff --git a/Test/baseResults/440.frag.out b/Test/baseResults/440.frag.out index c7ff72845b..7ea19262de 100644 --- a/Test/baseResults/440.frag.out +++ b/Test/baseResults/440.frag.out @@ -1,7 +1,7 @@ 440.frag ERROR: 0:11: 'location' : overlapping use of location 4 ERROR: 0:13: 'component' : type overflows the available 4 components -ERROR: 0:22: 'location' : fragment outputs sharing the same location must be the same basic type 30 +ERROR: 0:22: 'location' : fragment outputs or tileImageEXTs sharing the same location 30 must be the same basic type ERROR: 0:24: 'qualifier' : cannot use auxiliary, memory, interpolation, or precision qualifier in a default qualifier declaration (declaration with no type) ERROR: 0:25: 'qualifier' : cannot use auxiliary, memory, interpolation, or precision qualifier in a default qualifier declaration (declaration with no type) ERROR: 0:26: 'qualifier' : cannot use auxiliary, memory, interpolation, or precision qualifier in a default qualifier declaration (declaration with no type) @@ -43,11 +43,11 @@ ERROR: 0:62: 'layout' : offset/align can only be used on a uniform or buffer ERROR: 0:63: 'layout' : offset/align can only be used on a uniform or buffer ERROR: 0:84: 'align' : must be a power of 2 ERROR: 0:83: 'offset' : cannot lie in previous members -ERROR: 0:85: 'offset' : must be a multiple of the member's alignment +ERROR: 0:85: 'offset' : must be a multiple of the member's alignment (layout offset = 68 | member alignment = 8) ERROR: 0:103: 'align' : must be a power of 2 ERROR: 0:105: 'align' : must be a power of 2 ERROR: 0:102: 'offset' : cannot lie in previous members -ERROR: 0:104: 'offset' : must be a multiple of the member's alignment +ERROR: 0:104: 'offset' : must be a multiple of the member's alignment (layout offset = 68 | member alignment = 8) ERROR: 49 compilation errors. No code generated. diff --git a/Test/baseResults/GL_ARB_bindless_texture.frag.out b/Test/baseResults/GL_ARB_bindless_texture.frag.out new file mode 100644 index 0000000000..3f902c9913 --- /dev/null +++ b/Test/baseResults/GL_ARB_bindless_texture.frag.out @@ -0,0 +1,205 @@ +GL_ARB_bindless_texture.frag +Shader version: 460 +Requested GL_ARB_bindless_texture +0:? Sequence +0:38 Function Definition: main( ( global void) +0:38 Function Parameters: +0:40 Sequence +0:40 move second child to first child ( temp 4-component vector of float) +0:40 'color0' ( out 4-component vector of float) +0:40 texture ( global 4-component vector of float) +0:40 's0' ( uniform sampler2D) +0:40 'coord' ( uniform 2-component vector of float) +0:41 move second child to first child ( temp 4-component vector of float) +0:41 'color1' ( out 4-component vector of float) +0:41 texture ( global 4-component vector of float) +0:41 's1' ( smooth in sampler2D) +0:41 'coord' ( uniform 2-component vector of float) +0:42 move second child to first child ( temp 4-component vector of float) +0:42 'color2' ( out 4-component vector of float) +0:42 texture ( global 4-component vector of float) +0:42 packUint2x32 ( temp sampler2D) +0:42 's2' ( uniform 2-component vector of uint) +0:42 'coord' ( uniform 2-component vector of float) +0:43 move second child to first child ( temp 4-component vector of float) +0:43 'color3' ( out 4-component vector of float) +0:43 texture ( global 4-component vector of float) +0:43 packUint2x32 ( temp sampler2D) +0:43 's3' ( uniform 2-component vector of int) +0:43 'coord' ( uniform 2-component vector of float) +0:44 move second child to first child ( temp 4-component vector of float) +0:44 'color4' ( out 4-component vector of float) +0:44 texture ( global 4-component vector of float) +0:44 indirect index ( smooth temp sampler2D) +0:44 indirect index ( smooth temp 3-element array of sampler2D) +0:44 's4' ( smooth in 2-element array of 3-element array of sampler2D) +0:44 'index' ( uniform int) +0:44 'index' ( uniform int) +0:44 'coord' ( uniform 2-component vector of float) +0:45 move second child to first child ( temp 4-component vector of float) +0:45 'color5' ( out 4-component vector of float) +0:45 texture ( global 4-component vector of float) +0:45 s5: direct index for structure (layout( column_major shared layoutBindlessSampler) uniform sampler2D) +0:45 indirect index (layout( column_major shared) temp block{layout( column_major shared layoutBindlessSampler) uniform sampler2D s5}) +0:45 'bbs5' (layout( column_major shared) uniform 2-element array of block{layout( column_major shared layoutBindlessSampler) uniform sampler2D s5}) +0:45 'index' ( uniform int) +0:45 Constant: +0:45 0 (const int) +0:45 'coord' ( uniform 2-component vector of float) +0:46 move second child to first child ( temp 4-component vector of float) +0:46 'color6' ( out 4-component vector of float) +0:46 textureFetch ( global 4-component vector of float) +0:46 's6' ( smooth in samplerBuffer) +0:46 'icoord' ( uniform int) +0:47 move second child to first child ( temp 4-component vector of float) +0:47 'color7' ( out 4-component vector of float) +0:47 textureFetch ( global 4-component vector of float) +0:47 s7: direct index for structure (layout( column_major shared layoutBindlessSampler) uniform samplerBuffer) +0:47 'anon@0' (layout( column_major shared) uniform block{layout( column_major shared layoutBindlessSampler) uniform samplerBuffer s7}) +0:47 Constant: +0:47 0 (const uint) +0:47 'icoord' ( uniform int) +0:48 move second child to first child ( temp 4-component vector of float) +0:48 'color8' ( out 4-component vector of float) +0:48 textureFetch ( global 4-component vector of float) +0:48 s8: direct index for structure (layout( column_major shared layoutBindlessSampler) buffer samplerBuffer) +0:48 'anon@1' (layout( column_major shared) buffer block{layout( column_major shared layoutBindlessSampler) buffer samplerBuffer s8}) +0:48 Constant: +0:48 0 (const uint) +0:48 'icoord' ( uniform int) +0:49 move second child to first child ( temp 4-component vector of float) +0:49 'color9' ( out 4-component vector of float) +0:49 imageLoad ( global 4-component vector of float) +0:49 'i9' (layout( rgba8 layoutBindlessImage) smooth in image2D) +0:49 Constant: +0:49 0 (const int) +0:49 0 (const int) +0:? Linker Objects +0:? 's0' ( uniform sampler2D) +0:? 's1' ( smooth in sampler2D) +0:? 's2' ( uniform 2-component vector of uint) +0:? 's3' ( uniform 2-component vector of int) +0:? 'index' ( uniform int) +0:? 's4' ( smooth in 2-element array of 3-element array of sampler2D) +0:? 'bbs5' (layout( column_major shared) uniform 2-element array of block{layout( column_major shared layoutBindlessSampler) uniform sampler2D s5}) +0:? 's6' ( smooth in samplerBuffer) +0:? 'anon@0' (layout( column_major shared) uniform block{layout( column_major shared layoutBindlessSampler) uniform samplerBuffer s7}) +0:? 'anon@1' (layout( column_major shared) buffer block{layout( column_major shared layoutBindlessSampler) buffer samplerBuffer s8}) +0:? 'i9' (layout( rgba8 layoutBindlessImage) smooth in image2D) +0:? 'coord' ( uniform 2-component vector of float) +0:? 'icoord' ( uniform int) +0:? 'color0' ( out 4-component vector of float) +0:? 'color1' ( out 4-component vector of float) +0:? 'color2' ( out 4-component vector of float) +0:? 'color3' ( out 4-component vector of float) +0:? 'color4' ( out 4-component vector of float) +0:? 'color5' ( out 4-component vector of float) +0:? 'color6' ( out 4-component vector of float) +0:? 'color7' ( out 4-component vector of float) +0:? 'color8' ( out 4-component vector of float) +0:? 'color9' ( out 4-component vector of float) + + +Linked fragment stage: + + +Shader version: 460 +Requested GL_ARB_bindless_texture +0:? Sequence +0:38 Function Definition: main( ( global void) +0:38 Function Parameters: +0:40 Sequence +0:40 move second child to first child ( temp 4-component vector of float) +0:40 'color0' ( out 4-component vector of float) +0:40 texture ( global 4-component vector of float) +0:40 's0' ( uniform sampler2D) +0:40 'coord' ( uniform 2-component vector of float) +0:41 move second child to first child ( temp 4-component vector of float) +0:41 'color1' ( out 4-component vector of float) +0:41 texture ( global 4-component vector of float) +0:41 's1' ( smooth in sampler2D) +0:41 'coord' ( uniform 2-component vector of float) +0:42 move second child to first child ( temp 4-component vector of float) +0:42 'color2' ( out 4-component vector of float) +0:42 texture ( global 4-component vector of float) +0:42 packUint2x32 ( temp sampler2D) +0:42 's2' ( uniform 2-component vector of uint) +0:42 'coord' ( uniform 2-component vector of float) +0:43 move second child to first child ( temp 4-component vector of float) +0:43 'color3' ( out 4-component vector of float) +0:43 texture ( global 4-component vector of float) +0:43 packUint2x32 ( temp sampler2D) +0:43 's3' ( uniform 2-component vector of int) +0:43 'coord' ( uniform 2-component vector of float) +0:44 move second child to first child ( temp 4-component vector of float) +0:44 'color4' ( out 4-component vector of float) +0:44 texture ( global 4-component vector of float) +0:44 indirect index ( smooth temp sampler2D) +0:44 indirect index ( smooth temp 3-element array of sampler2D) +0:44 's4' ( smooth in 2-element array of 3-element array of sampler2D) +0:44 'index' ( uniform int) +0:44 'index' ( uniform int) +0:44 'coord' ( uniform 2-component vector of float) +0:45 move second child to first child ( temp 4-component vector of float) +0:45 'color5' ( out 4-component vector of float) +0:45 texture ( global 4-component vector of float) +0:45 s5: direct index for structure (layout( column_major shared layoutBindlessSampler) uniform sampler2D) +0:45 indirect index (layout( column_major shared) temp block{layout( column_major shared layoutBindlessSampler) uniform sampler2D s5}) +0:45 'bbs5' (layout( column_major shared) uniform 2-element array of block{layout( column_major shared layoutBindlessSampler) uniform sampler2D s5}) +0:45 'index' ( uniform int) +0:45 Constant: +0:45 0 (const int) +0:45 'coord' ( uniform 2-component vector of float) +0:46 move second child to first child ( temp 4-component vector of float) +0:46 'color6' ( out 4-component vector of float) +0:46 textureFetch ( global 4-component vector of float) +0:46 's6' ( smooth in samplerBuffer) +0:46 'icoord' ( uniform int) +0:47 move second child to first child ( temp 4-component vector of float) +0:47 'color7' ( out 4-component vector of float) +0:47 textureFetch ( global 4-component vector of float) +0:47 s7: direct index for structure (layout( column_major shared layoutBindlessSampler) uniform samplerBuffer) +0:47 'anon@0' (layout( column_major shared) uniform block{layout( column_major shared layoutBindlessSampler) uniform samplerBuffer s7}) +0:47 Constant: +0:47 0 (const uint) +0:47 'icoord' ( uniform int) +0:48 move second child to first child ( temp 4-component vector of float) +0:48 'color8' ( out 4-component vector of float) +0:48 textureFetch ( global 4-component vector of float) +0:48 s8: direct index for structure (layout( column_major shared layoutBindlessSampler) buffer samplerBuffer) +0:48 'anon@1' (layout( column_major shared) buffer block{layout( column_major shared layoutBindlessSampler) buffer samplerBuffer s8}) +0:48 Constant: +0:48 0 (const uint) +0:48 'icoord' ( uniform int) +0:49 move second child to first child ( temp 4-component vector of float) +0:49 'color9' ( out 4-component vector of float) +0:49 imageLoad ( global 4-component vector of float) +0:49 'i9' (layout( rgba8 layoutBindlessImage) smooth in image2D) +0:49 Constant: +0:49 0 (const int) +0:49 0 (const int) +0:? Linker Objects +0:? 's0' ( uniform sampler2D) +0:? 's1' ( smooth in sampler2D) +0:? 's2' ( uniform 2-component vector of uint) +0:? 's3' ( uniform 2-component vector of int) +0:? 'index' ( uniform int) +0:? 's4' ( smooth in 2-element array of 3-element array of sampler2D) +0:? 'bbs5' (layout( column_major shared) uniform 2-element array of block{layout( column_major shared layoutBindlessSampler) uniform sampler2D s5}) +0:? 's6' ( smooth in samplerBuffer) +0:? 'anon@0' (layout( column_major shared) uniform block{layout( column_major shared layoutBindlessSampler) uniform samplerBuffer s7}) +0:? 'anon@1' (layout( column_major shared) buffer block{layout( column_major shared layoutBindlessSampler) buffer samplerBuffer s8}) +0:? 'i9' (layout( rgba8 layoutBindlessImage) smooth in image2D) +0:? 'coord' ( uniform 2-component vector of float) +0:? 'icoord' ( uniform int) +0:? 'color0' ( out 4-component vector of float) +0:? 'color1' ( out 4-component vector of float) +0:? 'color2' ( out 4-component vector of float) +0:? 'color3' ( out 4-component vector of float) +0:? 'color4' ( out 4-component vector of float) +0:? 'color5' ( out 4-component vector of float) +0:? 'color6' ( out 4-component vector of float) +0:? 'color7' ( out 4-component vector of float) +0:? 'color8' ( out 4-component vector of float) +0:? 'color9' ( out 4-component vector of float) + diff --git a/Test/baseResults/atomicAdd.comp.out b/Test/baseResults/atomicAdd.comp.out index 6752a713ff..5c9afc8976 100644 --- a/Test/baseResults/atomicAdd.comp.out +++ b/Test/baseResults/atomicAdd.comp.out @@ -1,5 +1,5 @@ atomicAdd.comp -ERROR: 0:18: 'atomicAdd' : Atomic memory function can only be used for shader storage block member or shared variable. +ERROR: 0:18: 'atomicAdd' : Only l-values corresponding to shader block storage or shared variables can be used with atomic memory functions. ERROR: 1 compilation errors. No code generated. diff --git a/Test/baseResults/compoundsuffix.frag.hlsl b/Test/baseResults/compoundsuffix.frag.hlsl index 5a62488acb..f8dcfaa808 100644 --- a/Test/baseResults/compoundsuffix.frag.hlsl +++ b/Test/baseResults/compoundsuffix.frag.hlsl @@ -1,45 +1,45 @@ -compoundsuffix.frag.hlsl -// Module Version 10000 -// Generated by (magic number): 8000a -// Id's are bound by 22 - - Capability Shader - 1: ExtInstImport "GLSL.std.450" - MemoryModel Logical GLSL450 - EntryPoint Fragment 4 "main" 20 - ExecutionMode 4 OriginUpperLeft - Source HLSL 500 - Name 4 "main" - Name 11 "@main(vf4;" - Name 10 "fragColor" - Name 15 "fragColor" - Name 16 "param" - Name 20 "fragColor" - Decorate 20(fragColor) Location 0 - 2: TypeVoid - 3: TypeFunction 2 - 6: TypeFloat 32 - 7: TypeVector 6(float) 4 - 8: TypePointer Function 7(fvec4) - 9: TypeFunction 2 8(ptr) - 13: 6(float) Constant 1065353216 - 14: 7(fvec4) ConstantComposite 13 13 13 13 - 19: TypePointer Output 7(fvec4) - 20(fragColor): 19(ptr) Variable Output - 4(main): 2 Function None 3 - 5: Label - 15(fragColor): 8(ptr) Variable Function - 16(param): 8(ptr) Variable Function - 17: 2 FunctionCall 11(@main(vf4;) 16(param) - 18: 7(fvec4) Load 16(param) - Store 15(fragColor) 18 - 21: 7(fvec4) Load 15(fragColor) - Store 20(fragColor) 21 - Return - FunctionEnd - 11(@main(vf4;): 2 Function None 9 - 10(fragColor): 8(ptr) FunctionParameter - 12: Label - Store 10(fragColor) 14 - Return - FunctionEnd +compoundsuffix.frag.hlsl +// Module Version 10000 +// Generated by (magic number): 8000b +// Id's are bound by 22 + + Capability Shader + 1: ExtInstImport "GLSL.std.450" + MemoryModel Logical GLSL450 + EntryPoint Fragment 4 "main" 20 + ExecutionMode 4 OriginUpperLeft + Source HLSL 500 + Name 4 "main" + Name 11 "@main(vf4;" + Name 10 "fragColor" + Name 15 "fragColor" + Name 16 "param" + Name 20 "fragColor" + Decorate 20(fragColor) Location 0 + 2: TypeVoid + 3: TypeFunction 2 + 6: TypeFloat 32 + 7: TypeVector 6(float) 4 + 8: TypePointer Function 7(fvec4) + 9: TypeFunction 2 8(ptr) + 13: 6(float) Constant 1065353216 + 14: 7(fvec4) ConstantComposite 13 13 13 13 + 19: TypePointer Output 7(fvec4) + 20(fragColor): 19(ptr) Variable Output + 4(main): 2 Function None 3 + 5: Label + 15(fragColor): 8(ptr) Variable Function + 16(param): 8(ptr) Variable Function + 17: 2 FunctionCall 11(@main(vf4;) 16(param) + 18: 7(fvec4) Load 16(param) + Store 15(fragColor) 18 + 21: 7(fvec4) Load 15(fragColor) + Store 20(fragColor) 21 + Return + FunctionEnd + 11(@main(vf4;): 2 Function None 9 + 10(fragColor): 8(ptr) FunctionParameter + 12: Label + Store 10(fragColor) 14 + Return + FunctionEnd diff --git a/Test/baseResults/compoundsuffix.vert.glsl b/Test/baseResults/compoundsuffix.vert.glsl index 58354a409d..8535b478a7 100644 --- a/Test/baseResults/compoundsuffix.vert.glsl +++ b/Test/baseResults/compoundsuffix.vert.glsl @@ -1,15 +1,15 @@ -compoundsuffix.vert.glsl -Shader version: 100 -0:? Sequence -0:1 Function Definition: main( ( global void) -0:1 Function Parameters: -0:3 Sequence -0:3 move second child to first child ( temp highp 4-component vector of float) -0:3 'gl_Position' ( gl_Position highp 4-component vector of float Position) -0:3 Constant: -0:3 1.000000 -0:3 1.000000 -0:3 1.000000 -0:3 1.000000 -0:? Linker Objects - +compoundsuffix.vert.glsl +Shader version: 100 +0:? Sequence +0:1 Function Definition: main( ( global void) +0:1 Function Parameters: +0:3 Sequence +0:3 move second child to first child ( temp highp 4-component vector of float) +0:3 'gl_Position' ( gl_Position highp 4-component vector of float Position) +0:3 Constant: +0:3 1.000000 +0:3 1.000000 +0:3 1.000000 +0:3 1.000000 +0:? Linker Objects + diff --git a/Test/baseResults/glsl.-P.frag.out b/Test/baseResults/glsl.-P.frag.out new file mode 100644 index 0000000000..27d8965459 --- /dev/null +++ b/Test/baseResults/glsl.-P.frag.out @@ -0,0 +1,35 @@ +glsl.-P.frag +Shader version: 450 +0:? Sequence +0:5 Function Definition: main( ( global void) +0:5 Function Parameters: +0:19 Sequence +0:19 move second child to first child ( temp 4-component vector of float) +0:19 'color' (layout( location=0) out 4-component vector of float) +0:19 Constant: +0:19 1.000000 +0:19 1.000000 +0:19 1.000000 +0:19 1.000000 +0:? Linker Objects +0:? 'color' (layout( location=0) out 4-component vector of float) + + +Linked fragment stage: + + +Shader version: 450 +0:? Sequence +0:5 Function Definition: main( ( global void) +0:5 Function Parameters: +0:19 Sequence +0:19 move second child to first child ( temp 4-component vector of float) +0:19 'color' (layout( location=0) out 4-component vector of float) +0:19 Constant: +0:19 1.000000 +0:19 1.000000 +0:19 1.000000 +0:19 1.000000 +0:? Linker Objects +0:? 'color' (layout( location=0) out 4-component vector of float) + diff --git a/Test/baseResults/glsl.-P.function.frag.out b/Test/baseResults/glsl.-P.function.frag.out new file mode 100644 index 0000000000..b753cd1f7e --- /dev/null +++ b/Test/baseResults/glsl.-P.function.frag.out @@ -0,0 +1,45 @@ +glsl.-P.function.frag +Shader version: 450 +0:? Sequence +-1:1 Function Definition: getColor( ( global 4-component vector of float) +-1:1 Function Parameters: +-1:1 Sequence +-1:1 Branch: Return with expression +-1:1 Constant: +-1:1 1.000000 +-1:1 1.000000 +-1:1 1.000000 +-1:1 1.000000 +0:5 Function Definition: main( ( global void) +0:5 Function Parameters: +0:7 Sequence +0:7 move second child to first child ( temp 4-component vector of float) +0:7 'color' (layout( location=0) out 4-component vector of float) +0:7 Function Call: getColor( ( global 4-component vector of float) +0:? Linker Objects +0:? 'color' (layout( location=0) out 4-component vector of float) + + +Linked fragment stage: + + +Shader version: 450 +0:? Sequence +-1:1 Function Definition: getColor( ( global 4-component vector of float) +-1:1 Function Parameters: +-1:1 Sequence +-1:1 Branch: Return with expression +-1:1 Constant: +-1:1 1.000000 +-1:1 1.000000 +-1:1 1.000000 +-1:1 1.000000 +0:5 Function Definition: main( ( global void) +0:5 Function Parameters: +0:7 Sequence +0:7 move second child to first child ( temp 4-component vector of float) +0:7 'color' (layout( location=0) out 4-component vector of float) +0:7 Function Call: getColor( ( global 4-component vector of float) +0:? Linker Objects +0:? 'color' (layout( location=0) out 4-component vector of float) + diff --git a/Test/baseResults/glsl.-P.include.frag.out b/Test/baseResults/glsl.-P.include.frag.out new file mode 100644 index 0000000000..1ac63f5ef6 --- /dev/null +++ b/Test/baseResults/glsl.-P.include.frag.out @@ -0,0 +1,49 @@ +glsl.-P.include.frag +Shader version: 450 +Requested GL_GOOGLE_cpp_style_line_directive +Requested GL_GOOGLE_include_directive +0:? Sequence +0:1 Function Definition: getColor( ( global 4-component vector of float) +0:1 Function Parameters: +0:3 Sequence +0:3 Branch: Return with expression +0:3 Constant: +0:3 1.000000 +0:3 1.000000 +0:3 1.000000 +0:3 1.000000 +0:7 Function Definition: main( ( global void) +0:7 Function Parameters: +0:9 Sequence +0:9 move second child to first child ( temp 4-component vector of float) +0:9 'color' (layout( location=0) out 4-component vector of float) +0:9 Function Call: getColor( ( global 4-component vector of float) +0:? Linker Objects +0:? 'color' (layout( location=0) out 4-component vector of float) + + +Linked fragment stage: + + +Shader version: 450 +Requested GL_GOOGLE_cpp_style_line_directive +Requested GL_GOOGLE_include_directive +0:? Sequence +0:1 Function Definition: getColor( ( global 4-component vector of float) +0:1 Function Parameters: +0:3 Sequence +0:3 Branch: Return with expression +0:3 Constant: +0:3 1.000000 +0:3 1.000000 +0:3 1.000000 +0:3 1.000000 +0:7 Function Definition: main( ( global void) +0:7 Function Parameters: +0:9 Sequence +0:9 move second child to first child ( temp 4-component vector of float) +0:9 'color' (layout( location=0) out 4-component vector of float) +0:9 Function Call: getColor( ( global 4-component vector of float) +0:? Linker Objects +0:? 'color' (layout( location=0) out 4-component vector of float) + diff --git a/Test/baseResults/glsl.460.subgroupEXT.mesh.out b/Test/baseResults/glsl.460.subgroupEXT.mesh.out new file mode 100644 index 0000000000..8d45106c81 --- /dev/null +++ b/Test/baseResults/glsl.460.subgroupEXT.mesh.out @@ -0,0 +1,1039 @@ +glsl.460.subgroupEXT.mesh +ERROR: 0:6: 'gl_SubgroupSize' : required extension not requested: GL_KHR_shader_subgroup_basic +ERROR: 0:7: 'gl_SubgroupInvocationID' : required extension not requested: GL_KHR_shader_subgroup_basic +ERROR: 0:8: 'subgroupBarrier' : required extension not requested: GL_KHR_shader_subgroup_basic +ERROR: 0:9: 'subgroupMemoryBarrier' : required extension not requested: GL_KHR_shader_subgroup_basic +ERROR: 0:10: 'subgroupMemoryBarrierBuffer' : required extension not requested: GL_KHR_shader_subgroup_basic +ERROR: 0:11: 'subgroupMemoryBarrierImage' : required extension not requested: GL_KHR_shader_subgroup_basic +ERROR: 0:12: 'subgroupElect' : required extension not requested: GL_KHR_shader_subgroup_basic +ERROR: 0:13: 'gl_NumSubgroups' : required extension not requested: GL_KHR_shader_subgroup_basic +ERROR: 0:14: 'gl_SubgroupID' : required extension not requested: GL_KHR_shader_subgroup_basic +ERROR: 0:15: 'subgroupMemoryBarrierShared' : required extension not requested: GL_KHR_shader_subgroup_basic +ERROR: 0:17: 'subgroupAll' : required extension not requested: GL_KHR_shader_subgroup_vote +ERROR: 0:18: 'subgroupAny' : required extension not requested: GL_KHR_shader_subgroup_vote +ERROR: 0:19: 'subgroupAllEqual' : required extension not requested: GL_KHR_shader_subgroup_vote +ERROR: 0:21: 'gl_SubgroupEqMask' : required extension not requested: GL_KHR_shader_subgroup_ballot +ERROR: 0:22: 'gl_SubgroupGeMask' : required extension not requested: GL_KHR_shader_subgroup_ballot +ERROR: 0:23: 'gl_SubgroupGtMask' : required extension not requested: GL_KHR_shader_subgroup_ballot +ERROR: 0:24: 'gl_SubgroupLeMask' : required extension not requested: GL_KHR_shader_subgroup_ballot +ERROR: 0:25: 'gl_SubgroupLtMask' : required extension not requested: GL_KHR_shader_subgroup_ballot +ERROR: 0:26: 'subgroupBroadcast' : required extension not requested: GL_KHR_shader_subgroup_ballot +ERROR: 0:27: 'subgroupBroadcastFirst' : required extension not requested: GL_KHR_shader_subgroup_ballot +ERROR: 0:28: 'subgroupBallot' : required extension not requested: GL_KHR_shader_subgroup_ballot +ERROR: 0:29: 'subgroupInverseBallot' : required extension not requested: GL_KHR_shader_subgroup_ballot +ERROR: 0:30: 'subgroupBallotBitExtract' : required extension not requested: GL_KHR_shader_subgroup_ballot +ERROR: 0:31: 'subgroupBallotBitCount' : required extension not requested: GL_KHR_shader_subgroup_ballot +ERROR: 0:32: 'subgroupBallotInclusiveBitCount' : required extension not requested: GL_KHR_shader_subgroup_ballot +ERROR: 0:33: 'subgroupBallotExclusiveBitCount' : required extension not requested: GL_KHR_shader_subgroup_ballot +ERROR: 0:34: 'subgroupBallotFindLSB' : required extension not requested: GL_KHR_shader_subgroup_ballot +ERROR: 0:35: 'subgroupBallotFindMSB' : required extension not requested: GL_KHR_shader_subgroup_ballot +ERROR: 0:37: 'subgroupShuffle' : required extension not requested: GL_KHR_shader_subgroup_shuffle +ERROR: 0:38: 'subgroupShuffleXor' : required extension not requested: GL_KHR_shader_subgroup_shuffle +ERROR: 0:39: 'subgroupShuffleUp' : required extension not requested: GL_KHR_shader_subgroup_shuffle_relative +ERROR: 0:40: 'subgroupShuffleDown' : required extension not requested: GL_KHR_shader_subgroup_shuffle_relative +ERROR: 0:42: 'subgroupAdd' : required extension not requested: GL_KHR_shader_subgroup_arithmetic +ERROR: 0:43: 'subgroupMul' : required extension not requested: GL_KHR_shader_subgroup_arithmetic +ERROR: 0:44: 'subgroupMin' : required extension not requested: GL_KHR_shader_subgroup_arithmetic +ERROR: 0:45: 'subgroupMax' : required extension not requested: GL_KHR_shader_subgroup_arithmetic +ERROR: 0:46: 'subgroupAnd' : required extension not requested: GL_KHR_shader_subgroup_arithmetic +ERROR: 0:47: 'subgroupOr' : required extension not requested: GL_KHR_shader_subgroup_arithmetic +ERROR: 0:48: 'subgroupXor' : required extension not requested: GL_KHR_shader_subgroup_arithmetic +ERROR: 0:49: 'subgroupInclusiveAdd' : required extension not requested: GL_KHR_shader_subgroup_arithmetic +ERROR: 0:50: 'subgroupInclusiveMul' : required extension not requested: GL_KHR_shader_subgroup_arithmetic +ERROR: 0:51: 'subgroupInclusiveMin' : required extension not requested: GL_KHR_shader_subgroup_arithmetic +ERROR: 0:52: 'subgroupInclusiveMax' : required extension not requested: GL_KHR_shader_subgroup_arithmetic +ERROR: 0:53: 'subgroupInclusiveAnd' : required extension not requested: GL_KHR_shader_subgroup_arithmetic +ERROR: 0:54: 'subgroupInclusiveOr' : required extension not requested: GL_KHR_shader_subgroup_arithmetic +ERROR: 0:55: 'subgroupInclusiveXor' : required extension not requested: GL_KHR_shader_subgroup_arithmetic +ERROR: 0:56: 'subgroupExclusiveAdd' : required extension not requested: GL_KHR_shader_subgroup_arithmetic +ERROR: 0:57: 'subgroupExclusiveMul' : required extension not requested: GL_KHR_shader_subgroup_arithmetic +ERROR: 0:58: 'subgroupExclusiveMin' : required extension not requested: GL_KHR_shader_subgroup_arithmetic +ERROR: 0:59: 'subgroupExclusiveMax' : required extension not requested: GL_KHR_shader_subgroup_arithmetic +ERROR: 0:60: 'subgroupExclusiveAnd' : required extension not requested: GL_KHR_shader_subgroup_arithmetic +ERROR: 0:61: 'subgroupExclusiveOr' : required extension not requested: GL_KHR_shader_subgroup_arithmetic +ERROR: 0:62: 'subgroupExclusiveXor' : required extension not requested: GL_KHR_shader_subgroup_arithmetic +ERROR: 0:64: 'subgroupClusteredAdd' : required extension not requested: GL_KHR_shader_subgroup_clustered +ERROR: 0:65: 'subgroupClusteredMul' : required extension not requested: GL_KHR_shader_subgroup_clustered +ERROR: 0:66: 'subgroupClusteredMin' : required extension not requested: GL_KHR_shader_subgroup_clustered +ERROR: 0:67: 'subgroupClusteredMax' : required extension not requested: GL_KHR_shader_subgroup_clustered +ERROR: 0:68: 'subgroupClusteredAnd' : required extension not requested: GL_KHR_shader_subgroup_clustered +ERROR: 0:69: 'subgroupClusteredOr' : required extension not requested: GL_KHR_shader_subgroup_clustered +ERROR: 0:70: 'subgroupClusteredXor' : required extension not requested: GL_KHR_shader_subgroup_clustered +ERROR: 0:72: 'subgroupQuadBroadcast' : required extension not requested: GL_KHR_shader_subgroup_quad +ERROR: 0:73: 'subgroupQuadSwapHorizontal' : required extension not requested: GL_KHR_shader_subgroup_quad +ERROR: 0:74: 'subgroupQuadSwapVertical' : required extension not requested: GL_KHR_shader_subgroup_quad +ERROR: 0:75: 'subgroupQuadSwapDiagonal' : required extension not requested: GL_KHR_shader_subgroup_quad +ERROR: 64 compilation errors. No code generated. + + +Shader version: 460 +Requested GL_EXT_mesh_shader +Requested GL_KHR_shader_subgroup_arithmetic +Requested GL_KHR_shader_subgroup_ballot +Requested GL_KHR_shader_subgroup_basic +Requested GL_KHR_shader_subgroup_clustered +Requested GL_KHR_shader_subgroup_quad +Requested GL_KHR_shader_subgroup_shuffle +Requested GL_KHR_shader_subgroup_shuffle_relative +Requested GL_KHR_shader_subgroup_vote +max_vertices = 81 +max_primitives = 32 +output primitive = triangles +local_size = (32, 1, 1) +ERROR: node is still EOpNull! +0:3 Function Definition: undeclared_errors(vf4; ( global 4-component vector of float) +0:3 Function Parameters: +0:3 'f4' ( in 4-component vector of float) +0:? Sequence +0:6 'gl_SubgroupSize' ( in uint SubgroupSize) +0:7 'gl_SubgroupInvocationID' ( in uint SubgroupInvocationID) +0:8 subgroupBarrier ( global void) +0:9 subgroupMemoryBarrier ( global void) +0:10 subgroupMemoryBarrierBuffer ( global void) +0:11 subgroupMemoryBarrierImage ( global void) +0:12 subgroupElect ( global bool) +0:13 'gl_NumSubgroups' ( in uint NumSubgroups) +0:14 'gl_SubgroupID' ( in uint SubgroupID) +0:15 subgroupMemoryBarrierShared ( global void) +0:17 subgroupAll ( global bool) +0:17 Constant: +0:17 true (const bool) +0:18 subgroupAny ( global bool) +0:18 Constant: +0:18 false (const bool) +0:19 subgroupAllEqual ( global bool) +0:19 'f4' ( in 4-component vector of float) +0:21 'gl_SubgroupEqMask' ( in 4-component vector of uint SubgroupEqMask) +0:22 'gl_SubgroupGeMask' ( in 4-component vector of uint SubgroupGeMask) +0:23 'gl_SubgroupGtMask' ( in 4-component vector of uint SubgroupGtMask) +0:24 'gl_SubgroupLeMask' ( in 4-component vector of uint SubgroupLeMask) +0:25 'gl_SubgroupLtMask' ( in 4-component vector of uint SubgroupLtMask) +0:26 subgroupBroadcast ( global 4-component vector of float) +0:26 'f4' ( in 4-component vector of float) +0:26 Constant: +0:26 0 (const uint) +0:27 subgroupBroadcastFirst ( global 4-component vector of float) +0:27 'f4' ( in 4-component vector of float) +0:28 Sequence +0:28 move second child to first child ( temp 4-component vector of uint) +0:28 'ballot' ( temp 4-component vector of uint) +0:28 subgroupBallot ( global 4-component vector of uint) +0:28 Constant: +0:28 false (const bool) +0:29 subgroupInverseBallot ( global bool) +0:29 Constant: +0:29 1 (const uint) +0:29 1 (const uint) +0:29 1 (const uint) +0:29 1 (const uint) +0:30 subgroupBallotBitExtract ( global bool) +0:30 'ballot' ( temp 4-component vector of uint) +0:30 Constant: +0:30 0 (const uint) +0:31 subgroupBallotBitCount ( global uint) +0:31 'ballot' ( temp 4-component vector of uint) +0:32 subgroupBallotInclusiveBitCount ( global uint) +0:32 'ballot' ( temp 4-component vector of uint) +0:33 subgroupBallotExclusiveBitCount ( global uint) +0:33 'ballot' ( temp 4-component vector of uint) +0:34 subgroupBallotFindLSB ( global uint) +0:34 'ballot' ( temp 4-component vector of uint) +0:35 subgroupBallotFindMSB ( global uint) +0:35 'ballot' ( temp 4-component vector of uint) +0:37 subgroupShuffle ( global 4-component vector of float) +0:37 'f4' ( in 4-component vector of float) +0:37 Constant: +0:37 0 (const uint) +0:38 subgroupShuffleXor ( global 4-component vector of float) +0:38 'f4' ( in 4-component vector of float) +0:38 Constant: +0:38 1 (const uint) +0:39 subgroupShuffleUp ( global 4-component vector of float) +0:39 'f4' ( in 4-component vector of float) +0:39 Constant: +0:39 1 (const uint) +0:40 subgroupShuffleDown ( global 4-component vector of float) +0:40 'f4' ( in 4-component vector of float) +0:40 Constant: +0:40 1 (const uint) +0:42 move second child to first child ( temp 4-component vector of float) +0:42 'result' ( temp 4-component vector of float) +0:42 subgroupAdd ( global 4-component vector of float) +0:42 'f4' ( in 4-component vector of float) +0:43 subgroupMul ( global 4-component vector of float) +0:43 'f4' ( in 4-component vector of float) +0:44 subgroupMin ( global 4-component vector of float) +0:44 'f4' ( in 4-component vector of float) +0:45 subgroupMax ( global 4-component vector of float) +0:45 'f4' ( in 4-component vector of float) +0:46 subgroupAnd ( global 4-component vector of uint) +0:46 'ballot' ( temp 4-component vector of uint) +0:47 subgroupOr ( global 4-component vector of uint) +0:47 'ballot' ( temp 4-component vector of uint) +0:48 subgroupXor ( global 4-component vector of uint) +0:48 'ballot' ( temp 4-component vector of uint) +0:49 subgroupInclusiveAdd ( global 4-component vector of float) +0:49 'f4' ( in 4-component vector of float) +0:50 subgroupInclusiveMul ( global 4-component vector of float) +0:50 'f4' ( in 4-component vector of float) +0:51 subgroupInclusiveMin ( global 4-component vector of float) +0:51 'f4' ( in 4-component vector of float) +0:52 subgroupInclusiveMax ( global 4-component vector of float) +0:52 'f4' ( in 4-component vector of float) +0:53 subgroupInclusiveAnd ( global 4-component vector of uint) +0:53 'ballot' ( temp 4-component vector of uint) +0:54 subgroupInclusiveOr ( global 4-component vector of uint) +0:54 'ballot' ( temp 4-component vector of uint) +0:55 subgroupInclusiveXor ( global 4-component vector of uint) +0:55 'ballot' ( temp 4-component vector of uint) +0:56 subgroupExclusiveAdd ( global 4-component vector of float) +0:56 'f4' ( in 4-component vector of float) +0:57 subgroupExclusiveMul ( global 4-component vector of float) +0:57 'f4' ( in 4-component vector of float) +0:58 subgroupExclusiveMin ( global 4-component vector of float) +0:58 'f4' ( in 4-component vector of float) +0:59 subgroupExclusiveMax ( global 4-component vector of float) +0:59 'f4' ( in 4-component vector of float) +0:60 subgroupExclusiveAnd ( global 4-component vector of uint) +0:60 'ballot' ( temp 4-component vector of uint) +0:61 subgroupExclusiveOr ( global 4-component vector of uint) +0:61 'ballot' ( temp 4-component vector of uint) +0:62 subgroupExclusiveXor ( global 4-component vector of uint) +0:62 'ballot' ( temp 4-component vector of uint) +0:64 subgroupClusteredAdd ( global 4-component vector of float) +0:64 'f4' ( in 4-component vector of float) +0:64 Constant: +0:64 2 (const uint) +0:65 subgroupClusteredMul ( global 4-component vector of float) +0:65 'f4' ( in 4-component vector of float) +0:65 Constant: +0:65 2 (const uint) +0:66 subgroupClusteredMin ( global 4-component vector of float) +0:66 'f4' ( in 4-component vector of float) +0:66 Constant: +0:66 2 (const uint) +0:67 subgroupClusteredMax ( global 4-component vector of float) +0:67 'f4' ( in 4-component vector of float) +0:67 Constant: +0:67 2 (const uint) +0:68 subgroupClusteredAnd ( global 4-component vector of uint) +0:68 'ballot' ( temp 4-component vector of uint) +0:68 Constant: +0:68 2 (const uint) +0:69 subgroupClusteredOr ( global 4-component vector of uint) +0:69 'ballot' ( temp 4-component vector of uint) +0:69 Constant: +0:69 2 (const uint) +0:70 subgroupClusteredXor ( global 4-component vector of uint) +0:70 'ballot' ( temp 4-component vector of uint) +0:70 Constant: +0:70 2 (const uint) +0:72 subgroupQuadBroadcast ( global 4-component vector of float) +0:72 'f4' ( in 4-component vector of float) +0:72 Constant: +0:72 0 (const uint) +0:73 subgroupQuadSwapHorizontal ( global 4-component vector of float) +0:73 'f4' ( in 4-component vector of float) +0:74 subgroupQuadSwapVertical ( global 4-component vector of float) +0:74 'f4' ( in 4-component vector of float) +0:75 subgroupQuadSwapDiagonal ( global 4-component vector of float) +0:75 'f4' ( in 4-component vector of float) +0:77 Branch: Return with expression +0:77 'result' ( temp 4-component vector of float) +0:97 Function Definition: main( ( global void) +0:97 Function Parameters: +0:99 Sequence +0:99 Sequence +0:99 move second child to first child ( temp uint) +0:99 'iid' ( temp uint) +0:99 direct index ( temp uint) +0:99 'gl_LocalInvocationID' ( in 3-component vector of uint LocalInvocationID) +0:99 Constant: +0:99 0 (const int) +0:100 Sequence +0:100 move second child to first child ( temp uint) +0:100 'gid' ( temp uint) +0:100 direct index ( temp uint) +0:100 'gl_WorkGroupID' ( in 3-component vector of uint WorkGroupID) +0:100 Constant: +0:100 0 (const int) +0:101 Sequence +0:101 move second child to first child ( temp uint) +0:101 'vertexCount' ( temp uint) +0:101 Constant: +0:101 81 (const uint) +0:102 Sequence +0:102 move second child to first child ( temp uint) +0:102 'primitiveCount' ( temp uint) +0:102 Constant: +0:102 32 (const uint) +0:103 SetMeshOutputsEXT ( global void) +0:103 'vertexCount' ( temp uint) +0:103 'primitiveCount' ( temp uint) +0:105 move second child to first child ( temp 4-component vector of float) +0:105 gl_Position: direct index for structure ( out 4-component vector of float Position) +0:105 indirect index ( temp block{ out 4-component vector of float Position gl_Position, out float PointSize gl_PointSize, out unsized 4-element array of float ClipDistance gl_ClipDistance, out unsized 3-element array of float CullDistance gl_CullDistance}) +0:105 'gl_MeshVerticesEXT' ( out 81-element array of block{ out 4-component vector of float Position gl_Position, out float PointSize gl_PointSize, out unsized 4-element array of float ClipDistance gl_ClipDistance, out unsized 3-element array of float CullDistance gl_CullDistance}) +0:105 'iid' ( temp uint) +0:105 Constant: +0:105 0 (const int) +0:105 Constant: +0:105 1.000000 +0:105 1.000000 +0:105 1.000000 +0:105 1.000000 +0:106 move second child to first child ( temp float) +0:106 gl_PointSize: direct index for structure ( out float PointSize) +0:106 indirect index ( temp block{ out 4-component vector of float Position gl_Position, out float PointSize gl_PointSize, out unsized 4-element array of float ClipDistance gl_ClipDistance, out unsized 3-element array of float CullDistance gl_CullDistance}) +0:106 'gl_MeshVerticesEXT' ( out 81-element array of block{ out 4-component vector of float Position gl_Position, out float PointSize gl_PointSize, out unsized 4-element array of float ClipDistance gl_ClipDistance, out unsized 3-element array of float CullDistance gl_CullDistance}) +0:106 'iid' ( temp uint) +0:106 Constant: +0:106 1 (const int) +0:106 Constant: +0:106 2.000000 +0:107 move second child to first child ( temp float) +0:107 direct index ( temp float ClipDistance) +0:107 gl_ClipDistance: direct index for structure ( out unsized 4-element array of float ClipDistance) +0:107 indirect index ( temp block{ out 4-component vector of float Position gl_Position, out float PointSize gl_PointSize, out unsized 4-element array of float ClipDistance gl_ClipDistance, out unsized 3-element array of float CullDistance gl_CullDistance}) +0:107 'gl_MeshVerticesEXT' ( out 81-element array of block{ out 4-component vector of float Position gl_Position, out float PointSize gl_PointSize, out unsized 4-element array of float ClipDistance gl_ClipDistance, out unsized 3-element array of float CullDistance gl_CullDistance}) +0:107 'iid' ( temp uint) +0:107 Constant: +0:107 2 (const int) +0:107 Constant: +0:107 3 (const int) +0:107 Constant: +0:107 3.000000 +0:108 move second child to first child ( temp float) +0:108 direct index ( temp float CullDistance) +0:108 gl_CullDistance: direct index for structure ( out unsized 3-element array of float CullDistance) +0:108 indirect index ( temp block{ out 4-component vector of float Position gl_Position, out float PointSize gl_PointSize, out unsized 4-element array of float ClipDistance gl_ClipDistance, out unsized 3-element array of float CullDistance gl_CullDistance}) +0:108 'gl_MeshVerticesEXT' ( out 81-element array of block{ out 4-component vector of float Position gl_Position, out float PointSize gl_PointSize, out unsized 4-element array of float ClipDistance gl_ClipDistance, out unsized 3-element array of float CullDistance gl_CullDistance}) +0:108 'iid' ( temp uint) +0:108 Constant: +0:108 3 (const int) +0:108 Constant: +0:108 2 (const int) +0:108 Constant: +0:108 4.000000 +0:110 MemoryBarrierShared ( global void) +0:110 Barrier ( global void) +0:112 move second child to first child ( temp 4-component vector of float) +0:112 gl_Position: direct index for structure ( out 4-component vector of float Position) +0:112 indirect index ( temp block{ out 4-component vector of float Position gl_Position, out float PointSize gl_PointSize, out unsized 4-element array of float ClipDistance gl_ClipDistance, out unsized 3-element array of float CullDistance gl_CullDistance}) +0:112 'gl_MeshVerticesEXT' ( out 81-element array of block{ out 4-component vector of float Position gl_Position, out float PointSize gl_PointSize, out unsized 4-element array of float ClipDistance gl_ClipDistance, out unsized 3-element array of float CullDistance gl_CullDistance}) +0:112 add ( temp uint) +0:112 'iid' ( temp uint) +0:112 Constant: +0:112 1 (const uint) +0:112 Constant: +0:112 0 (const int) +0:112 gl_Position: direct index for structure ( out 4-component vector of float Position) +0:112 indirect index ( temp block{ out 4-component vector of float Position gl_Position, out float PointSize gl_PointSize, out unsized 4-element array of float ClipDistance gl_ClipDistance, out unsized 3-element array of float CullDistance gl_CullDistance}) +0:112 'gl_MeshVerticesEXT' ( out 81-element array of block{ out 4-component vector of float Position gl_Position, out float PointSize gl_PointSize, out unsized 4-element array of float ClipDistance gl_ClipDistance, out unsized 3-element array of float CullDistance gl_CullDistance}) +0:112 'iid' ( temp uint) +0:112 Constant: +0:112 0 (const int) +0:113 move second child to first child ( temp float) +0:113 gl_PointSize: direct index for structure ( out float PointSize) +0:113 indirect index ( temp block{ out 4-component vector of float Position gl_Position, out float PointSize gl_PointSize, out unsized 4-element array of float ClipDistance gl_ClipDistance, out unsized 3-element array of float CullDistance gl_CullDistance}) +0:113 'gl_MeshVerticesEXT' ( out 81-element array of block{ out 4-component vector of float Position gl_Position, out float PointSize gl_PointSize, out unsized 4-element array of float ClipDistance gl_ClipDistance, out unsized 3-element array of float CullDistance gl_CullDistance}) +0:113 add ( temp uint) +0:113 'iid' ( temp uint) +0:113 Constant: +0:113 1 (const uint) +0:113 Constant: +0:113 1 (const int) +0:113 gl_PointSize: direct index for structure ( out float PointSize) +0:113 indirect index ( temp block{ out 4-component vector of float Position gl_Position, out float PointSize gl_PointSize, out unsized 4-element array of float ClipDistance gl_ClipDistance, out unsized 3-element array of float CullDistance gl_CullDistance}) +0:113 'gl_MeshVerticesEXT' ( out 81-element array of block{ out 4-component vector of float Position gl_Position, out float PointSize gl_PointSize, out unsized 4-element array of float ClipDistance gl_ClipDistance, out unsized 3-element array of float CullDistance gl_CullDistance}) +0:113 'iid' ( temp uint) +0:113 Constant: +0:113 1 (const int) +0:114 move second child to first child ( temp float) +0:114 direct index ( temp float ClipDistance) +0:114 gl_ClipDistance: direct index for structure ( out unsized 4-element array of float ClipDistance) +0:114 indirect index ( temp block{ out 4-component vector of float Position gl_Position, out float PointSize gl_PointSize, out unsized 4-element array of float ClipDistance gl_ClipDistance, out unsized 3-element array of float CullDistance gl_CullDistance}) +0:114 'gl_MeshVerticesEXT' ( out 81-element array of block{ out 4-component vector of float Position gl_Position, out float PointSize gl_PointSize, out unsized 4-element array of float ClipDistance gl_ClipDistance, out unsized 3-element array of float CullDistance gl_CullDistance}) +0:114 add ( temp uint) +0:114 'iid' ( temp uint) +0:114 Constant: +0:114 1 (const uint) +0:114 Constant: +0:114 2 (const int) +0:114 Constant: +0:114 3 (const int) +0:114 direct index ( temp float ClipDistance) +0:114 gl_ClipDistance: direct index for structure ( out unsized 4-element array of float ClipDistance) +0:114 indirect index ( temp block{ out 4-component vector of float Position gl_Position, out float PointSize gl_PointSize, out unsized 4-element array of float ClipDistance gl_ClipDistance, out unsized 3-element array of float CullDistance gl_CullDistance}) +0:114 'gl_MeshVerticesEXT' ( out 81-element array of block{ out 4-component vector of float Position gl_Position, out float PointSize gl_PointSize, out unsized 4-element array of float ClipDistance gl_ClipDistance, out unsized 3-element array of float CullDistance gl_CullDistance}) +0:114 'iid' ( temp uint) +0:114 Constant: +0:114 2 (const int) +0:114 Constant: +0:114 3 (const int) +0:115 move second child to first child ( temp float) +0:115 direct index ( temp float CullDistance) +0:115 gl_CullDistance: direct index for structure ( out unsized 3-element array of float CullDistance) +0:115 indirect index ( temp block{ out 4-component vector of float Position gl_Position, out float PointSize gl_PointSize, out unsized 4-element array of float ClipDistance gl_ClipDistance, out unsized 3-element array of float CullDistance gl_CullDistance}) +0:115 'gl_MeshVerticesEXT' ( out 81-element array of block{ out 4-component vector of float Position gl_Position, out float PointSize gl_PointSize, out unsized 4-element array of float ClipDistance gl_ClipDistance, out unsized 3-element array of float CullDistance gl_CullDistance}) +0:115 add ( temp uint) +0:115 'iid' ( temp uint) +0:115 Constant: +0:115 1 (const uint) +0:115 Constant: +0:115 3 (const int) +0:115 Constant: +0:115 2 (const int) +0:115 direct index ( temp float CullDistance) +0:115 gl_CullDistance: direct index for structure ( out unsized 3-element array of float CullDistance) +0:115 indirect index ( temp block{ out 4-component vector of float Position gl_Position, out float PointSize gl_PointSize, out unsized 4-element array of float ClipDistance gl_ClipDistance, out unsized 3-element array of float CullDistance gl_CullDistance}) +0:115 'gl_MeshVerticesEXT' ( out 81-element array of block{ out 4-component vector of float Position gl_Position, out float PointSize gl_PointSize, out unsized 4-element array of float ClipDistance gl_ClipDistance, out unsized 3-element array of float CullDistance gl_CullDistance}) +0:115 'iid' ( temp uint) +0:115 Constant: +0:115 3 (const int) +0:115 Constant: +0:115 2 (const int) +0:117 MemoryBarrierShared ( global void) +0:117 Barrier ( global void) +0:119 move second child to first child ( temp int) +0:119 gl_PrimitiveID: direct index for structure ( perprimitiveNV out int PrimitiveID) +0:119 indirect index ( perprimitiveNV temp block{ perprimitiveNV out int PrimitiveID gl_PrimitiveID, perprimitiveNV out int Layer gl_Layer, perprimitiveNV out int ViewportIndex gl_ViewportIndex, perprimitiveNV out bool CullPrimitiveEXT gl_CullPrimitiveEXT, perprimitiveNV out int PrimitiveShadingRateKHR gl_PrimitiveShadingRateEXT}) +0:119 'gl_MeshPrimitivesEXT' ( perprimitiveNV out 32-element array of block{ perprimitiveNV out int PrimitiveID gl_PrimitiveID, perprimitiveNV out int Layer gl_Layer, perprimitiveNV out int ViewportIndex gl_ViewportIndex, perprimitiveNV out bool CullPrimitiveEXT gl_CullPrimitiveEXT, perprimitiveNV out int PrimitiveShadingRateKHR gl_PrimitiveShadingRateEXT}) +0:119 'iid' ( temp uint) +0:119 Constant: +0:119 0 (const int) +0:119 Constant: +0:119 6 (const int) +0:120 move second child to first child ( temp int) +0:120 gl_Layer: direct index for structure ( perprimitiveNV out int Layer) +0:120 indirect index ( perprimitiveNV temp block{ perprimitiveNV out int PrimitiveID gl_PrimitiveID, perprimitiveNV out int Layer gl_Layer, perprimitiveNV out int ViewportIndex gl_ViewportIndex, perprimitiveNV out bool CullPrimitiveEXT gl_CullPrimitiveEXT, perprimitiveNV out int PrimitiveShadingRateKHR gl_PrimitiveShadingRateEXT}) +0:120 'gl_MeshPrimitivesEXT' ( perprimitiveNV out 32-element array of block{ perprimitiveNV out int PrimitiveID gl_PrimitiveID, perprimitiveNV out int Layer gl_Layer, perprimitiveNV out int ViewportIndex gl_ViewportIndex, perprimitiveNV out bool CullPrimitiveEXT gl_CullPrimitiveEXT, perprimitiveNV out int PrimitiveShadingRateKHR gl_PrimitiveShadingRateEXT}) +0:120 'iid' ( temp uint) +0:120 Constant: +0:120 1 (const int) +0:120 Constant: +0:120 7 (const int) +0:121 move second child to first child ( temp int) +0:121 gl_ViewportIndex: direct index for structure ( perprimitiveNV out int ViewportIndex) +0:121 indirect index ( perprimitiveNV temp block{ perprimitiveNV out int PrimitiveID gl_PrimitiveID, perprimitiveNV out int Layer gl_Layer, perprimitiveNV out int ViewportIndex gl_ViewportIndex, perprimitiveNV out bool CullPrimitiveEXT gl_CullPrimitiveEXT, perprimitiveNV out int PrimitiveShadingRateKHR gl_PrimitiveShadingRateEXT}) +0:121 'gl_MeshPrimitivesEXT' ( perprimitiveNV out 32-element array of block{ perprimitiveNV out int PrimitiveID gl_PrimitiveID, perprimitiveNV out int Layer gl_Layer, perprimitiveNV out int ViewportIndex gl_ViewportIndex, perprimitiveNV out bool CullPrimitiveEXT gl_CullPrimitiveEXT, perprimitiveNV out int PrimitiveShadingRateKHR gl_PrimitiveShadingRateEXT}) +0:121 'iid' ( temp uint) +0:121 Constant: +0:121 2 (const int) +0:121 Constant: +0:121 8 (const int) +0:122 move second child to first child ( temp bool) +0:122 gl_CullPrimitiveEXT: direct index for structure ( perprimitiveNV out bool CullPrimitiveEXT) +0:122 indirect index ( perprimitiveNV temp block{ perprimitiveNV out int PrimitiveID gl_PrimitiveID, perprimitiveNV out int Layer gl_Layer, perprimitiveNV out int ViewportIndex gl_ViewportIndex, perprimitiveNV out bool CullPrimitiveEXT gl_CullPrimitiveEXT, perprimitiveNV out int PrimitiveShadingRateKHR gl_PrimitiveShadingRateEXT}) +0:122 'gl_MeshPrimitivesEXT' ( perprimitiveNV out 32-element array of block{ perprimitiveNV out int PrimitiveID gl_PrimitiveID, perprimitiveNV out int Layer gl_Layer, perprimitiveNV out int ViewportIndex gl_ViewportIndex, perprimitiveNV out bool CullPrimitiveEXT gl_CullPrimitiveEXT, perprimitiveNV out int PrimitiveShadingRateKHR gl_PrimitiveShadingRateEXT}) +0:122 'iid' ( temp uint) +0:122 Constant: +0:122 3 (const int) +0:122 Constant: +0:122 false (const bool) +0:124 MemoryBarrierShared ( global void) +0:124 Barrier ( global void) +0:126 move second child to first child ( temp int) +0:126 gl_PrimitiveID: direct index for structure ( perprimitiveNV out int PrimitiveID) +0:126 indirect index ( perprimitiveNV temp block{ perprimitiveNV out int PrimitiveID gl_PrimitiveID, perprimitiveNV out int Layer gl_Layer, perprimitiveNV out int ViewportIndex gl_ViewportIndex, perprimitiveNV out bool CullPrimitiveEXT gl_CullPrimitiveEXT, perprimitiveNV out int PrimitiveShadingRateKHR gl_PrimitiveShadingRateEXT}) +0:126 'gl_MeshPrimitivesEXT' ( perprimitiveNV out 32-element array of block{ perprimitiveNV out int PrimitiveID gl_PrimitiveID, perprimitiveNV out int Layer gl_Layer, perprimitiveNV out int ViewportIndex gl_ViewportIndex, perprimitiveNV out bool CullPrimitiveEXT gl_CullPrimitiveEXT, perprimitiveNV out int PrimitiveShadingRateKHR gl_PrimitiveShadingRateEXT}) +0:126 add ( temp uint) +0:126 'iid' ( temp uint) +0:126 Constant: +0:126 1 (const uint) +0:126 Constant: +0:126 0 (const int) +0:126 gl_PrimitiveID: direct index for structure ( perprimitiveNV out int PrimitiveID) +0:126 indirect index ( perprimitiveNV temp block{ perprimitiveNV out int PrimitiveID gl_PrimitiveID, perprimitiveNV out int Layer gl_Layer, perprimitiveNV out int ViewportIndex gl_ViewportIndex, perprimitiveNV out bool CullPrimitiveEXT gl_CullPrimitiveEXT, perprimitiveNV out int PrimitiveShadingRateKHR gl_PrimitiveShadingRateEXT}) +0:126 'gl_MeshPrimitivesEXT' ( perprimitiveNV out 32-element array of block{ perprimitiveNV out int PrimitiveID gl_PrimitiveID, perprimitiveNV out int Layer gl_Layer, perprimitiveNV out int ViewportIndex gl_ViewportIndex, perprimitiveNV out bool CullPrimitiveEXT gl_CullPrimitiveEXT, perprimitiveNV out int PrimitiveShadingRateKHR gl_PrimitiveShadingRateEXT}) +0:126 'iid' ( temp uint) +0:126 Constant: +0:126 0 (const int) +0:127 move second child to first child ( temp int) +0:127 gl_Layer: direct index for structure ( perprimitiveNV out int Layer) +0:127 indirect index ( perprimitiveNV temp block{ perprimitiveNV out int PrimitiveID gl_PrimitiveID, perprimitiveNV out int Layer gl_Layer, perprimitiveNV out int ViewportIndex gl_ViewportIndex, perprimitiveNV out bool CullPrimitiveEXT gl_CullPrimitiveEXT, perprimitiveNV out int PrimitiveShadingRateKHR gl_PrimitiveShadingRateEXT}) +0:127 'gl_MeshPrimitivesEXT' ( perprimitiveNV out 32-element array of block{ perprimitiveNV out int PrimitiveID gl_PrimitiveID, perprimitiveNV out int Layer gl_Layer, perprimitiveNV out int ViewportIndex gl_ViewportIndex, perprimitiveNV out bool CullPrimitiveEXT gl_CullPrimitiveEXT, perprimitiveNV out int PrimitiveShadingRateKHR gl_PrimitiveShadingRateEXT}) +0:127 add ( temp uint) +0:127 'iid' ( temp uint) +0:127 Constant: +0:127 1 (const uint) +0:127 Constant: +0:127 1 (const int) +0:127 gl_Layer: direct index for structure ( perprimitiveNV out int Layer) +0:127 indirect index ( perprimitiveNV temp block{ perprimitiveNV out int PrimitiveID gl_PrimitiveID, perprimitiveNV out int Layer gl_Layer, perprimitiveNV out int ViewportIndex gl_ViewportIndex, perprimitiveNV out bool CullPrimitiveEXT gl_CullPrimitiveEXT, perprimitiveNV out int PrimitiveShadingRateKHR gl_PrimitiveShadingRateEXT}) +0:127 'gl_MeshPrimitivesEXT' ( perprimitiveNV out 32-element array of block{ perprimitiveNV out int PrimitiveID gl_PrimitiveID, perprimitiveNV out int Layer gl_Layer, perprimitiveNV out int ViewportIndex gl_ViewportIndex, perprimitiveNV out bool CullPrimitiveEXT gl_CullPrimitiveEXT, perprimitiveNV out int PrimitiveShadingRateKHR gl_PrimitiveShadingRateEXT}) +0:127 'iid' ( temp uint) +0:127 Constant: +0:127 1 (const int) +0:128 move second child to first child ( temp int) +0:128 gl_ViewportIndex: direct index for structure ( perprimitiveNV out int ViewportIndex) +0:128 indirect index ( perprimitiveNV temp block{ perprimitiveNV out int PrimitiveID gl_PrimitiveID, perprimitiveNV out int Layer gl_Layer, perprimitiveNV out int ViewportIndex gl_ViewportIndex, perprimitiveNV out bool CullPrimitiveEXT gl_CullPrimitiveEXT, perprimitiveNV out int PrimitiveShadingRateKHR gl_PrimitiveShadingRateEXT}) +0:128 'gl_MeshPrimitivesEXT' ( perprimitiveNV out 32-element array of block{ perprimitiveNV out int PrimitiveID gl_PrimitiveID, perprimitiveNV out int Layer gl_Layer, perprimitiveNV out int ViewportIndex gl_ViewportIndex, perprimitiveNV out bool CullPrimitiveEXT gl_CullPrimitiveEXT, perprimitiveNV out int PrimitiveShadingRateKHR gl_PrimitiveShadingRateEXT}) +0:128 add ( temp uint) +0:128 'iid' ( temp uint) +0:128 Constant: +0:128 1 (const uint) +0:128 Constant: +0:128 2 (const int) +0:128 gl_ViewportIndex: direct index for structure ( perprimitiveNV out int ViewportIndex) +0:128 indirect index ( perprimitiveNV temp block{ perprimitiveNV out int PrimitiveID gl_PrimitiveID, perprimitiveNV out int Layer gl_Layer, perprimitiveNV out int ViewportIndex gl_ViewportIndex, perprimitiveNV out bool CullPrimitiveEXT gl_CullPrimitiveEXT, perprimitiveNV out int PrimitiveShadingRateKHR gl_PrimitiveShadingRateEXT}) +0:128 'gl_MeshPrimitivesEXT' ( perprimitiveNV out 32-element array of block{ perprimitiveNV out int PrimitiveID gl_PrimitiveID, perprimitiveNV out int Layer gl_Layer, perprimitiveNV out int ViewportIndex gl_ViewportIndex, perprimitiveNV out bool CullPrimitiveEXT gl_CullPrimitiveEXT, perprimitiveNV out int PrimitiveShadingRateKHR gl_PrimitiveShadingRateEXT}) +0:128 'iid' ( temp uint) +0:128 Constant: +0:128 2 (const int) +0:129 move second child to first child ( temp bool) +0:129 gl_CullPrimitiveEXT: direct index for structure ( perprimitiveNV out bool CullPrimitiveEXT) +0:129 indirect index ( perprimitiveNV temp block{ perprimitiveNV out int PrimitiveID gl_PrimitiveID, perprimitiveNV out int Layer gl_Layer, perprimitiveNV out int ViewportIndex gl_ViewportIndex, perprimitiveNV out bool CullPrimitiveEXT gl_CullPrimitiveEXT, perprimitiveNV out int PrimitiveShadingRateKHR gl_PrimitiveShadingRateEXT}) +0:129 'gl_MeshPrimitivesEXT' ( perprimitiveNV out 32-element array of block{ perprimitiveNV out int PrimitiveID gl_PrimitiveID, perprimitiveNV out int Layer gl_Layer, perprimitiveNV out int ViewportIndex gl_ViewportIndex, perprimitiveNV out bool CullPrimitiveEXT gl_CullPrimitiveEXT, perprimitiveNV out int PrimitiveShadingRateKHR gl_PrimitiveShadingRateEXT}) +0:129 add ( temp uint) +0:129 'iid' ( temp uint) +0:129 Constant: +0:129 1 (const uint) +0:129 Constant: +0:129 3 (const int) +0:129 Constant: +0:129 false (const bool) +0:131 MemoryBarrierShared ( global void) +0:131 Barrier ( global void) +0:134 move second child to first child ( temp 3-component vector of uint) +0:134 direct index ( temp 3-component vector of uint PrimitiveTriangleIndicesEXT) +0:134 'gl_PrimitiveTriangleIndicesEXT' ( out 96-element array of 3-component vector of uint PrimitiveTriangleIndicesEXT) +0:134 Constant: +0:134 0 (const int) +0:134 Constant: +0:134 1 (const uint) +0:134 1 (const uint) +0:134 1 (const uint) +0:135 move second child to first child ( temp 3-component vector of uint) +0:135 indirect index ( temp 3-component vector of uint PrimitiveTriangleIndicesEXT) +0:135 'gl_PrimitiveTriangleIndicesEXT' ( out 96-element array of 3-component vector of uint PrimitiveTriangleIndicesEXT) +0:135 subtract ( temp uint) +0:135 'primitiveCount' ( temp uint) +0:135 Constant: +0:135 1 (const uint) +0:135 Constant: +0:135 2 (const uint) +0:135 2 (const uint) +0:135 2 (const uint) +0:136 move second child to first child ( temp 3-component vector of uint) +0:136 indirect index ( temp 3-component vector of uint PrimitiveTriangleIndicesEXT) +0:136 'gl_PrimitiveTriangleIndicesEXT' ( out 96-element array of 3-component vector of uint PrimitiveTriangleIndicesEXT) +0:136 'gid' ( temp uint) +0:136 indirect index ( temp 3-component vector of uint PrimitiveTriangleIndicesEXT) +0:136 'gl_PrimitiveTriangleIndicesEXT' ( out 96-element array of 3-component vector of uint PrimitiveTriangleIndicesEXT) +0:136 subtract ( temp uint) +0:136 'gid' ( temp uint) +0:136 Constant: +0:136 1 (const uint) +0:139 MemoryBarrierShared ( global void) +0:139 Barrier ( global void) +0:143 Function Definition: basic_works( ( global void) +0:143 Function Parameters: +0:145 Sequence +0:145 'gl_SubgroupSize' ( in uint SubgroupSize) +0:146 'gl_SubgroupInvocationID' ( in uint SubgroupInvocationID) +0:147 subgroupBarrier ( global void) +0:148 subgroupMemoryBarrier ( global void) +0:149 subgroupMemoryBarrierBuffer ( global void) +0:150 subgroupMemoryBarrierImage ( global void) +0:151 subgroupElect ( global bool) +0:152 'gl_NumSubgroups' ( in uint NumSubgroups) +0:153 'gl_SubgroupID' ( in uint SubgroupID) +0:154 subgroupMemoryBarrierShared ( global void) +0:158 Function Definition: ballot_works(vf4; ( global void) +0:158 Function Parameters: +0:158 'f4' ( in 4-component vector of float) +0:159 Sequence +0:159 'gl_SubgroupEqMask' ( in 4-component vector of uint SubgroupEqMask) +0:160 'gl_SubgroupGeMask' ( in 4-component vector of uint SubgroupGeMask) +0:161 'gl_SubgroupGtMask' ( in 4-component vector of uint SubgroupGtMask) +0:162 'gl_SubgroupLeMask' ( in 4-component vector of uint SubgroupLeMask) +0:163 'gl_SubgroupLtMask' ( in 4-component vector of uint SubgroupLtMask) +0:164 subgroupBroadcast ( global 4-component vector of float) +0:164 'f4' ( in 4-component vector of float) +0:164 Constant: +0:164 0 (const uint) +0:165 subgroupBroadcastFirst ( global 4-component vector of float) +0:165 'f4' ( in 4-component vector of float) +0:166 Sequence +0:166 move second child to first child ( temp 4-component vector of uint) +0:166 'ballot' ( temp 4-component vector of uint) +0:166 subgroupBallot ( global 4-component vector of uint) +0:166 Constant: +0:166 false (const bool) +0:167 subgroupInverseBallot ( global bool) +0:167 Constant: +0:167 1 (const uint) +0:167 1 (const uint) +0:167 1 (const uint) +0:167 1 (const uint) +0:168 subgroupBallotBitExtract ( global bool) +0:168 'ballot' ( temp 4-component vector of uint) +0:168 Constant: +0:168 0 (const uint) +0:169 subgroupBallotBitCount ( global uint) +0:169 'ballot' ( temp 4-component vector of uint) +0:170 subgroupBallotInclusiveBitCount ( global uint) +0:170 'ballot' ( temp 4-component vector of uint) +0:171 subgroupBallotExclusiveBitCount ( global uint) +0:171 'ballot' ( temp 4-component vector of uint) +0:172 subgroupBallotFindLSB ( global uint) +0:172 'ballot' ( temp 4-component vector of uint) +0:173 subgroupBallotFindMSB ( global uint) +0:173 'ballot' ( temp 4-component vector of uint) +0:177 Function Definition: vote_works(vf4; ( global void) +0:177 Function Parameters: +0:177 'f4' ( in 4-component vector of float) +0:179 Sequence +0:179 subgroupAll ( global bool) +0:179 Constant: +0:179 true (const bool) +0:180 subgroupAny ( global bool) +0:180 Constant: +0:180 false (const bool) +0:181 subgroupAllEqual ( global bool) +0:181 'f4' ( in 4-component vector of float) +0:186 Function Definition: shuffle_works(vf4; ( global void) +0:186 Function Parameters: +0:186 'f4' ( in 4-component vector of float) +0:188 Sequence +0:188 subgroupShuffle ( global 4-component vector of float) +0:188 'f4' ( in 4-component vector of float) +0:188 Constant: +0:188 0 (const uint) +0:189 subgroupShuffleXor ( global 4-component vector of float) +0:189 'f4' ( in 4-component vector of float) +0:189 Constant: +0:189 1 (const uint) +0:190 subgroupShuffleUp ( global 4-component vector of float) +0:190 'f4' ( in 4-component vector of float) +0:190 Constant: +0:190 1 (const uint) +0:191 subgroupShuffleDown ( global 4-component vector of float) +0:191 'f4' ( in 4-component vector of float) +0:191 Constant: +0:191 1 (const uint) +0:195 Function Definition: arith_works(vf4; ( global void) +0:195 Function Parameters: +0:195 'f4' ( in 4-component vector of float) +0:? Sequence +0:198 subgroupAdd ( global 4-component vector of float) +0:198 'f4' ( in 4-component vector of float) +0:199 subgroupMul ( global 4-component vector of float) +0:199 'f4' ( in 4-component vector of float) +0:200 subgroupMin ( global 4-component vector of float) +0:200 'f4' ( in 4-component vector of float) +0:201 subgroupMax ( global 4-component vector of float) +0:201 'f4' ( in 4-component vector of float) +0:202 subgroupAnd ( global 4-component vector of uint) +0:202 'ballot' ( temp 4-component vector of uint) +0:203 subgroupOr ( global 4-component vector of uint) +0:203 'ballot' ( temp 4-component vector of uint) +0:204 subgroupXor ( global 4-component vector of uint) +0:204 'ballot' ( temp 4-component vector of uint) +0:205 subgroupInclusiveAdd ( global 4-component vector of float) +0:205 'f4' ( in 4-component vector of float) +0:206 subgroupInclusiveMul ( global 4-component vector of float) +0:206 'f4' ( in 4-component vector of float) +0:207 subgroupInclusiveMin ( global 4-component vector of float) +0:207 'f4' ( in 4-component vector of float) +0:208 subgroupInclusiveMax ( global 4-component vector of float) +0:208 'f4' ( in 4-component vector of float) +0:209 subgroupInclusiveAnd ( global 4-component vector of uint) +0:209 'ballot' ( temp 4-component vector of uint) +0:210 subgroupInclusiveOr ( global 4-component vector of uint) +0:210 'ballot' ( temp 4-component vector of uint) +0:211 subgroupInclusiveXor ( global 4-component vector of uint) +0:211 'ballot' ( temp 4-component vector of uint) +0:212 subgroupExclusiveAdd ( global 4-component vector of float) +0:212 'f4' ( in 4-component vector of float) +0:213 subgroupExclusiveMul ( global 4-component vector of float) +0:213 'f4' ( in 4-component vector of float) +0:214 subgroupExclusiveMin ( global 4-component vector of float) +0:214 'f4' ( in 4-component vector of float) +0:215 subgroupExclusiveMax ( global 4-component vector of float) +0:215 'f4' ( in 4-component vector of float) +0:216 subgroupExclusiveAnd ( global 4-component vector of uint) +0:216 'ballot' ( temp 4-component vector of uint) +0:217 subgroupExclusiveOr ( global 4-component vector of uint) +0:217 'ballot' ( temp 4-component vector of uint) +0:218 subgroupExclusiveXor ( global 4-component vector of uint) +0:218 'ballot' ( temp 4-component vector of uint) +0:222 Function Definition: clustered_works(vf4; ( global void) +0:222 Function Parameters: +0:222 'f4' ( in 4-component vector of float) +0:224 Sequence +0:224 Sequence +0:224 move second child to first child ( temp 4-component vector of uint) +0:224 'ballot' ( temp 4-component vector of uint) +0:224 Constant: +0:224 85 (const uint) +0:224 0 (const uint) +0:224 0 (const uint) +0:224 0 (const uint) +0:225 subgroupClusteredAdd ( global 4-component vector of float) +0:225 'f4' ( in 4-component vector of float) +0:225 Constant: +0:225 2 (const uint) +0:226 subgroupClusteredMul ( global 4-component vector of float) +0:226 'f4' ( in 4-component vector of float) +0:226 Constant: +0:226 2 (const uint) +0:227 subgroupClusteredMin ( global 4-component vector of float) +0:227 'f4' ( in 4-component vector of float) +0:227 Constant: +0:227 2 (const uint) +0:228 subgroupClusteredMax ( global 4-component vector of float) +0:228 'f4' ( in 4-component vector of float) +0:228 Constant: +0:228 2 (const uint) +0:229 subgroupClusteredAnd ( global 4-component vector of uint) +0:229 'ballot' ( temp 4-component vector of uint) +0:229 Constant: +0:229 2 (const uint) +0:230 subgroupClusteredOr ( global 4-component vector of uint) +0:230 'ballot' ( temp 4-component vector of uint) +0:230 Constant: +0:230 2 (const uint) +0:231 subgroupClusteredXor ( global 4-component vector of uint) +0:231 'ballot' ( temp 4-component vector of uint) +0:231 Constant: +0:231 2 (const uint) +0:235 Function Definition: quad_works(vf4; ( global void) +0:235 Function Parameters: +0:235 'f4' ( in 4-component vector of float) +0:237 Sequence +0:237 subgroupQuadBroadcast ( global 4-component vector of float) +0:237 'f4' ( in 4-component vector of float) +0:237 Constant: +0:237 0 (const uint) +0:238 subgroupQuadSwapHorizontal ( global 4-component vector of float) +0:238 'f4' ( in 4-component vector of float) +0:239 subgroupQuadSwapVertical ( global 4-component vector of float) +0:239 'f4' ( in 4-component vector of float) +0:240 subgroupQuadSwapDiagonal ( global 4-component vector of float) +0:240 'f4' ( in 4-component vector of float) +0:? Linker Objects +0:? 'gl_WorkGroupSize' ( const 3-component vector of uint WorkGroupSize) +0:? 32 (const uint) +0:? 1 (const uint) +0:? 1 (const uint) +0:? 'gl_MeshVerticesEXT' ( out 81-element array of block{ out 4-component vector of float Position gl_Position, out float PointSize gl_PointSize, out unsized 4-element array of float ClipDistance gl_ClipDistance, out unsized 3-element array of float CullDistance gl_CullDistance}) +0:? 'gl_MeshPrimitivesEXT' ( perprimitiveNV out 32-element array of block{ perprimitiveNV out int PrimitiveID gl_PrimitiveID, perprimitiveNV out int Layer gl_Layer, perprimitiveNV out int ViewportIndex gl_ViewportIndex, perprimitiveNV out bool CullPrimitiveEXT gl_CullPrimitiveEXT, perprimitiveNV out int PrimitiveShadingRateKHR gl_PrimitiveShadingRateEXT}) +0:? 'gl_PrimitiveTriangleIndicesEXT' ( out 96-element array of 3-component vector of uint PrimitiveTriangleIndicesEXT) + + +Linked mesh stage: + + +Shader version: 460 +Requested GL_EXT_mesh_shader +Requested GL_KHR_shader_subgroup_arithmetic +Requested GL_KHR_shader_subgroup_ballot +Requested GL_KHR_shader_subgroup_basic +Requested GL_KHR_shader_subgroup_clustered +Requested GL_KHR_shader_subgroup_quad +Requested GL_KHR_shader_subgroup_shuffle +Requested GL_KHR_shader_subgroup_shuffle_relative +Requested GL_KHR_shader_subgroup_vote +max_vertices = 81 +max_primitives = 32 +output primitive = triangles +local_size = (32, 1, 1) +ERROR: node is still EOpNull! +0:97 Function Definition: main( ( global void) +0:97 Function Parameters: +0:99 Sequence +0:99 Sequence +0:99 move second child to first child ( temp uint) +0:99 'iid' ( temp uint) +0:99 direct index ( temp uint) +0:99 'gl_LocalInvocationID' ( in 3-component vector of uint LocalInvocationID) +0:99 Constant: +0:99 0 (const int) +0:100 Sequence +0:100 move second child to first child ( temp uint) +0:100 'gid' ( temp uint) +0:100 direct index ( temp uint) +0:100 'gl_WorkGroupID' ( in 3-component vector of uint WorkGroupID) +0:100 Constant: +0:100 0 (const int) +0:101 Sequence +0:101 move second child to first child ( temp uint) +0:101 'vertexCount' ( temp uint) +0:101 Constant: +0:101 81 (const uint) +0:102 Sequence +0:102 move second child to first child ( temp uint) +0:102 'primitiveCount' ( temp uint) +0:102 Constant: +0:102 32 (const uint) +0:103 SetMeshOutputsEXT ( global void) +0:103 'vertexCount' ( temp uint) +0:103 'primitiveCount' ( temp uint) +0:105 move second child to first child ( temp 4-component vector of float) +0:105 gl_Position: direct index for structure ( out 4-component vector of float Position) +0:105 indirect index ( temp block{ out 4-component vector of float Position gl_Position, out float PointSize gl_PointSize, out 4-element array of float ClipDistance gl_ClipDistance, out 3-element array of float CullDistance gl_CullDistance}) +0:105 'gl_MeshVerticesEXT' ( out 81-element array of block{ out 4-component vector of float Position gl_Position, out float PointSize gl_PointSize, out 4-element array of float ClipDistance gl_ClipDistance, out 3-element array of float CullDistance gl_CullDistance}) +0:105 'iid' ( temp uint) +0:105 Constant: +0:105 0 (const int) +0:105 Constant: +0:105 1.000000 +0:105 1.000000 +0:105 1.000000 +0:105 1.000000 +0:106 move second child to first child ( temp float) +0:106 gl_PointSize: direct index for structure ( out float PointSize) +0:106 indirect index ( temp block{ out 4-component vector of float Position gl_Position, out float PointSize gl_PointSize, out 4-element array of float ClipDistance gl_ClipDistance, out 3-element array of float CullDistance gl_CullDistance}) +0:106 'gl_MeshVerticesEXT' ( out 81-element array of block{ out 4-component vector of float Position gl_Position, out float PointSize gl_PointSize, out 4-element array of float ClipDistance gl_ClipDistance, out 3-element array of float CullDistance gl_CullDistance}) +0:106 'iid' ( temp uint) +0:106 Constant: +0:106 1 (const int) +0:106 Constant: +0:106 2.000000 +0:107 move second child to first child ( temp float) +0:107 direct index ( temp float ClipDistance) +0:107 gl_ClipDistance: direct index for structure ( out 4-element array of float ClipDistance) +0:107 indirect index ( temp block{ out 4-component vector of float Position gl_Position, out float PointSize gl_PointSize, out 4-element array of float ClipDistance gl_ClipDistance, out 3-element array of float CullDistance gl_CullDistance}) +0:107 'gl_MeshVerticesEXT' ( out 81-element array of block{ out 4-component vector of float Position gl_Position, out float PointSize gl_PointSize, out 4-element array of float ClipDistance gl_ClipDistance, out 3-element array of float CullDistance gl_CullDistance}) +0:107 'iid' ( temp uint) +0:107 Constant: +0:107 2 (const int) +0:107 Constant: +0:107 3 (const int) +0:107 Constant: +0:107 3.000000 +0:108 move second child to first child ( temp float) +0:108 direct index ( temp float CullDistance) +0:108 gl_CullDistance: direct index for structure ( out 3-element array of float CullDistance) +0:108 indirect index ( temp block{ out 4-component vector of float Position gl_Position, out float PointSize gl_PointSize, out 4-element array of float ClipDistance gl_ClipDistance, out 3-element array of float CullDistance gl_CullDistance}) +0:108 'gl_MeshVerticesEXT' ( out 81-element array of block{ out 4-component vector of float Position gl_Position, out float PointSize gl_PointSize, out 4-element array of float ClipDistance gl_ClipDistance, out 3-element array of float CullDistance gl_CullDistance}) +0:108 'iid' ( temp uint) +0:108 Constant: +0:108 3 (const int) +0:108 Constant: +0:108 2 (const int) +0:108 Constant: +0:108 4.000000 +0:110 MemoryBarrierShared ( global void) +0:110 Barrier ( global void) +0:112 move second child to first child ( temp 4-component vector of float) +0:112 gl_Position: direct index for structure ( out 4-component vector of float Position) +0:112 indirect index ( temp block{ out 4-component vector of float Position gl_Position, out float PointSize gl_PointSize, out 4-element array of float ClipDistance gl_ClipDistance, out 3-element array of float CullDistance gl_CullDistance}) +0:112 'gl_MeshVerticesEXT' ( out 81-element array of block{ out 4-component vector of float Position gl_Position, out float PointSize gl_PointSize, out 4-element array of float ClipDistance gl_ClipDistance, out 3-element array of float CullDistance gl_CullDistance}) +0:112 add ( temp uint) +0:112 'iid' ( temp uint) +0:112 Constant: +0:112 1 (const uint) +0:112 Constant: +0:112 0 (const int) +0:112 gl_Position: direct index for structure ( out 4-component vector of float Position) +0:112 indirect index ( temp block{ out 4-component vector of float Position gl_Position, out float PointSize gl_PointSize, out 4-element array of float ClipDistance gl_ClipDistance, out 3-element array of float CullDistance gl_CullDistance}) +0:112 'gl_MeshVerticesEXT' ( out 81-element array of block{ out 4-component vector of float Position gl_Position, out float PointSize gl_PointSize, out 4-element array of float ClipDistance gl_ClipDistance, out 3-element array of float CullDistance gl_CullDistance}) +0:112 'iid' ( temp uint) +0:112 Constant: +0:112 0 (const int) +0:113 move second child to first child ( temp float) +0:113 gl_PointSize: direct index for structure ( out float PointSize) +0:113 indirect index ( temp block{ out 4-component vector of float Position gl_Position, out float PointSize gl_PointSize, out 4-element array of float ClipDistance gl_ClipDistance, out 3-element array of float CullDistance gl_CullDistance}) +0:113 'gl_MeshVerticesEXT' ( out 81-element array of block{ out 4-component vector of float Position gl_Position, out float PointSize gl_PointSize, out 4-element array of float ClipDistance gl_ClipDistance, out 3-element array of float CullDistance gl_CullDistance}) +0:113 add ( temp uint) +0:113 'iid' ( temp uint) +0:113 Constant: +0:113 1 (const uint) +0:113 Constant: +0:113 1 (const int) +0:113 gl_PointSize: direct index for structure ( out float PointSize) +0:113 indirect index ( temp block{ out 4-component vector of float Position gl_Position, out float PointSize gl_PointSize, out 4-element array of float ClipDistance gl_ClipDistance, out 3-element array of float CullDistance gl_CullDistance}) +0:113 'gl_MeshVerticesEXT' ( out 81-element array of block{ out 4-component vector of float Position gl_Position, out float PointSize gl_PointSize, out 4-element array of float ClipDistance gl_ClipDistance, out 3-element array of float CullDistance gl_CullDistance}) +0:113 'iid' ( temp uint) +0:113 Constant: +0:113 1 (const int) +0:114 move second child to first child ( temp float) +0:114 direct index ( temp float ClipDistance) +0:114 gl_ClipDistance: direct index for structure ( out 4-element array of float ClipDistance) +0:114 indirect index ( temp block{ out 4-component vector of float Position gl_Position, out float PointSize gl_PointSize, out 4-element array of float ClipDistance gl_ClipDistance, out 3-element array of float CullDistance gl_CullDistance}) +0:114 'gl_MeshVerticesEXT' ( out 81-element array of block{ out 4-component vector of float Position gl_Position, out float PointSize gl_PointSize, out 4-element array of float ClipDistance gl_ClipDistance, out 3-element array of float CullDistance gl_CullDistance}) +0:114 add ( temp uint) +0:114 'iid' ( temp uint) +0:114 Constant: +0:114 1 (const uint) +0:114 Constant: +0:114 2 (const int) +0:114 Constant: +0:114 3 (const int) +0:114 direct index ( temp float ClipDistance) +0:114 gl_ClipDistance: direct index for structure ( out 4-element array of float ClipDistance) +0:114 indirect index ( temp block{ out 4-component vector of float Position gl_Position, out float PointSize gl_PointSize, out 4-element array of float ClipDistance gl_ClipDistance, out 3-element array of float CullDistance gl_CullDistance}) +0:114 'gl_MeshVerticesEXT' ( out 81-element array of block{ out 4-component vector of float Position gl_Position, out float PointSize gl_PointSize, out 4-element array of float ClipDistance gl_ClipDistance, out 3-element array of float CullDistance gl_CullDistance}) +0:114 'iid' ( temp uint) +0:114 Constant: +0:114 2 (const int) +0:114 Constant: +0:114 3 (const int) +0:115 move second child to first child ( temp float) +0:115 direct index ( temp float CullDistance) +0:115 gl_CullDistance: direct index for structure ( out 3-element array of float CullDistance) +0:115 indirect index ( temp block{ out 4-component vector of float Position gl_Position, out float PointSize gl_PointSize, out 4-element array of float ClipDistance gl_ClipDistance, out 3-element array of float CullDistance gl_CullDistance}) +0:115 'gl_MeshVerticesEXT' ( out 81-element array of block{ out 4-component vector of float Position gl_Position, out float PointSize gl_PointSize, out 4-element array of float ClipDistance gl_ClipDistance, out 3-element array of float CullDistance gl_CullDistance}) +0:115 add ( temp uint) +0:115 'iid' ( temp uint) +0:115 Constant: +0:115 1 (const uint) +0:115 Constant: +0:115 3 (const int) +0:115 Constant: +0:115 2 (const int) +0:115 direct index ( temp float CullDistance) +0:115 gl_CullDistance: direct index for structure ( out 3-element array of float CullDistance) +0:115 indirect index ( temp block{ out 4-component vector of float Position gl_Position, out float PointSize gl_PointSize, out 4-element array of float ClipDistance gl_ClipDistance, out 3-element array of float CullDistance gl_CullDistance}) +0:115 'gl_MeshVerticesEXT' ( out 81-element array of block{ out 4-component vector of float Position gl_Position, out float PointSize gl_PointSize, out 4-element array of float ClipDistance gl_ClipDistance, out 3-element array of float CullDistance gl_CullDistance}) +0:115 'iid' ( temp uint) +0:115 Constant: +0:115 3 (const int) +0:115 Constant: +0:115 2 (const int) +0:117 MemoryBarrierShared ( global void) +0:117 Barrier ( global void) +0:119 move second child to first child ( temp int) +0:119 gl_PrimitiveID: direct index for structure ( perprimitiveNV out int PrimitiveID) +0:119 indirect index ( perprimitiveNV temp block{ perprimitiveNV out int PrimitiveID gl_PrimitiveID, perprimitiveNV out int Layer gl_Layer, perprimitiveNV out int ViewportIndex gl_ViewportIndex, perprimitiveNV out bool CullPrimitiveEXT gl_CullPrimitiveEXT, perprimitiveNV out int PrimitiveShadingRateKHR gl_PrimitiveShadingRateEXT}) +0:119 'gl_MeshPrimitivesEXT' ( perprimitiveNV out 32-element array of block{ perprimitiveNV out int PrimitiveID gl_PrimitiveID, perprimitiveNV out int Layer gl_Layer, perprimitiveNV out int ViewportIndex gl_ViewportIndex, perprimitiveNV out bool CullPrimitiveEXT gl_CullPrimitiveEXT, perprimitiveNV out int PrimitiveShadingRateKHR gl_PrimitiveShadingRateEXT}) +0:119 'iid' ( temp uint) +0:119 Constant: +0:119 0 (const int) +0:119 Constant: +0:119 6 (const int) +0:120 move second child to first child ( temp int) +0:120 gl_Layer: direct index for structure ( perprimitiveNV out int Layer) +0:120 indirect index ( perprimitiveNV temp block{ perprimitiveNV out int PrimitiveID gl_PrimitiveID, perprimitiveNV out int Layer gl_Layer, perprimitiveNV out int ViewportIndex gl_ViewportIndex, perprimitiveNV out bool CullPrimitiveEXT gl_CullPrimitiveEXT, perprimitiveNV out int PrimitiveShadingRateKHR gl_PrimitiveShadingRateEXT}) +0:120 'gl_MeshPrimitivesEXT' ( perprimitiveNV out 32-element array of block{ perprimitiveNV out int PrimitiveID gl_PrimitiveID, perprimitiveNV out int Layer gl_Layer, perprimitiveNV out int ViewportIndex gl_ViewportIndex, perprimitiveNV out bool CullPrimitiveEXT gl_CullPrimitiveEXT, perprimitiveNV out int PrimitiveShadingRateKHR gl_PrimitiveShadingRateEXT}) +0:120 'iid' ( temp uint) +0:120 Constant: +0:120 1 (const int) +0:120 Constant: +0:120 7 (const int) +0:121 move second child to first child ( temp int) +0:121 gl_ViewportIndex: direct index for structure ( perprimitiveNV out int ViewportIndex) +0:121 indirect index ( perprimitiveNV temp block{ perprimitiveNV out int PrimitiveID gl_PrimitiveID, perprimitiveNV out int Layer gl_Layer, perprimitiveNV out int ViewportIndex gl_ViewportIndex, perprimitiveNV out bool CullPrimitiveEXT gl_CullPrimitiveEXT, perprimitiveNV out int PrimitiveShadingRateKHR gl_PrimitiveShadingRateEXT}) +0:121 'gl_MeshPrimitivesEXT' ( perprimitiveNV out 32-element array of block{ perprimitiveNV out int PrimitiveID gl_PrimitiveID, perprimitiveNV out int Layer gl_Layer, perprimitiveNV out int ViewportIndex gl_ViewportIndex, perprimitiveNV out bool CullPrimitiveEXT gl_CullPrimitiveEXT, perprimitiveNV out int PrimitiveShadingRateKHR gl_PrimitiveShadingRateEXT}) +0:121 'iid' ( temp uint) +0:121 Constant: +0:121 2 (const int) +0:121 Constant: +0:121 8 (const int) +0:122 move second child to first child ( temp bool) +0:122 gl_CullPrimitiveEXT: direct index for structure ( perprimitiveNV out bool CullPrimitiveEXT) +0:122 indirect index ( perprimitiveNV temp block{ perprimitiveNV out int PrimitiveID gl_PrimitiveID, perprimitiveNV out int Layer gl_Layer, perprimitiveNV out int ViewportIndex gl_ViewportIndex, perprimitiveNV out bool CullPrimitiveEXT gl_CullPrimitiveEXT, perprimitiveNV out int PrimitiveShadingRateKHR gl_PrimitiveShadingRateEXT}) +0:122 'gl_MeshPrimitivesEXT' ( perprimitiveNV out 32-element array of block{ perprimitiveNV out int PrimitiveID gl_PrimitiveID, perprimitiveNV out int Layer gl_Layer, perprimitiveNV out int ViewportIndex gl_ViewportIndex, perprimitiveNV out bool CullPrimitiveEXT gl_CullPrimitiveEXT, perprimitiveNV out int PrimitiveShadingRateKHR gl_PrimitiveShadingRateEXT}) +0:122 'iid' ( temp uint) +0:122 Constant: +0:122 3 (const int) +0:122 Constant: +0:122 false (const bool) +0:124 MemoryBarrierShared ( global void) +0:124 Barrier ( global void) +0:126 move second child to first child ( temp int) +0:126 gl_PrimitiveID: direct index for structure ( perprimitiveNV out int PrimitiveID) +0:126 indirect index ( perprimitiveNV temp block{ perprimitiveNV out int PrimitiveID gl_PrimitiveID, perprimitiveNV out int Layer gl_Layer, perprimitiveNV out int ViewportIndex gl_ViewportIndex, perprimitiveNV out bool CullPrimitiveEXT gl_CullPrimitiveEXT, perprimitiveNV out int PrimitiveShadingRateKHR gl_PrimitiveShadingRateEXT}) +0:126 'gl_MeshPrimitivesEXT' ( perprimitiveNV out 32-element array of block{ perprimitiveNV out int PrimitiveID gl_PrimitiveID, perprimitiveNV out int Layer gl_Layer, perprimitiveNV out int ViewportIndex gl_ViewportIndex, perprimitiveNV out bool CullPrimitiveEXT gl_CullPrimitiveEXT, perprimitiveNV out int PrimitiveShadingRateKHR gl_PrimitiveShadingRateEXT}) +0:126 add ( temp uint) +0:126 'iid' ( temp uint) +0:126 Constant: +0:126 1 (const uint) +0:126 Constant: +0:126 0 (const int) +0:126 gl_PrimitiveID: direct index for structure ( perprimitiveNV out int PrimitiveID) +0:126 indirect index ( perprimitiveNV temp block{ perprimitiveNV out int PrimitiveID gl_PrimitiveID, perprimitiveNV out int Layer gl_Layer, perprimitiveNV out int ViewportIndex gl_ViewportIndex, perprimitiveNV out bool CullPrimitiveEXT gl_CullPrimitiveEXT, perprimitiveNV out int PrimitiveShadingRateKHR gl_PrimitiveShadingRateEXT}) +0:126 'gl_MeshPrimitivesEXT' ( perprimitiveNV out 32-element array of block{ perprimitiveNV out int PrimitiveID gl_PrimitiveID, perprimitiveNV out int Layer gl_Layer, perprimitiveNV out int ViewportIndex gl_ViewportIndex, perprimitiveNV out bool CullPrimitiveEXT gl_CullPrimitiveEXT, perprimitiveNV out int PrimitiveShadingRateKHR gl_PrimitiveShadingRateEXT}) +0:126 'iid' ( temp uint) +0:126 Constant: +0:126 0 (const int) +0:127 move second child to first child ( temp int) +0:127 gl_Layer: direct index for structure ( perprimitiveNV out int Layer) +0:127 indirect index ( perprimitiveNV temp block{ perprimitiveNV out int PrimitiveID gl_PrimitiveID, perprimitiveNV out int Layer gl_Layer, perprimitiveNV out int ViewportIndex gl_ViewportIndex, perprimitiveNV out bool CullPrimitiveEXT gl_CullPrimitiveEXT, perprimitiveNV out int PrimitiveShadingRateKHR gl_PrimitiveShadingRateEXT}) +0:127 'gl_MeshPrimitivesEXT' ( perprimitiveNV out 32-element array of block{ perprimitiveNV out int PrimitiveID gl_PrimitiveID, perprimitiveNV out int Layer gl_Layer, perprimitiveNV out int ViewportIndex gl_ViewportIndex, perprimitiveNV out bool CullPrimitiveEXT gl_CullPrimitiveEXT, perprimitiveNV out int PrimitiveShadingRateKHR gl_PrimitiveShadingRateEXT}) +0:127 add ( temp uint) +0:127 'iid' ( temp uint) +0:127 Constant: +0:127 1 (const uint) +0:127 Constant: +0:127 1 (const int) +0:127 gl_Layer: direct index for structure ( perprimitiveNV out int Layer) +0:127 indirect index ( perprimitiveNV temp block{ perprimitiveNV out int PrimitiveID gl_PrimitiveID, perprimitiveNV out int Layer gl_Layer, perprimitiveNV out int ViewportIndex gl_ViewportIndex, perprimitiveNV out bool CullPrimitiveEXT gl_CullPrimitiveEXT, perprimitiveNV out int PrimitiveShadingRateKHR gl_PrimitiveShadingRateEXT}) +0:127 'gl_MeshPrimitivesEXT' ( perprimitiveNV out 32-element array of block{ perprimitiveNV out int PrimitiveID gl_PrimitiveID, perprimitiveNV out int Layer gl_Layer, perprimitiveNV out int ViewportIndex gl_ViewportIndex, perprimitiveNV out bool CullPrimitiveEXT gl_CullPrimitiveEXT, perprimitiveNV out int PrimitiveShadingRateKHR gl_PrimitiveShadingRateEXT}) +0:127 'iid' ( temp uint) +0:127 Constant: +0:127 1 (const int) +0:128 move second child to first child ( temp int) +0:128 gl_ViewportIndex: direct index for structure ( perprimitiveNV out int ViewportIndex) +0:128 indirect index ( perprimitiveNV temp block{ perprimitiveNV out int PrimitiveID gl_PrimitiveID, perprimitiveNV out int Layer gl_Layer, perprimitiveNV out int ViewportIndex gl_ViewportIndex, perprimitiveNV out bool CullPrimitiveEXT gl_CullPrimitiveEXT, perprimitiveNV out int PrimitiveShadingRateKHR gl_PrimitiveShadingRateEXT}) +0:128 'gl_MeshPrimitivesEXT' ( perprimitiveNV out 32-element array of block{ perprimitiveNV out int PrimitiveID gl_PrimitiveID, perprimitiveNV out int Layer gl_Layer, perprimitiveNV out int ViewportIndex gl_ViewportIndex, perprimitiveNV out bool CullPrimitiveEXT gl_CullPrimitiveEXT, perprimitiveNV out int PrimitiveShadingRateKHR gl_PrimitiveShadingRateEXT}) +0:128 add ( temp uint) +0:128 'iid' ( temp uint) +0:128 Constant: +0:128 1 (const uint) +0:128 Constant: +0:128 2 (const int) +0:128 gl_ViewportIndex: direct index for structure ( perprimitiveNV out int ViewportIndex) +0:128 indirect index ( perprimitiveNV temp block{ perprimitiveNV out int PrimitiveID gl_PrimitiveID, perprimitiveNV out int Layer gl_Layer, perprimitiveNV out int ViewportIndex gl_ViewportIndex, perprimitiveNV out bool CullPrimitiveEXT gl_CullPrimitiveEXT, perprimitiveNV out int PrimitiveShadingRateKHR gl_PrimitiveShadingRateEXT}) +0:128 'gl_MeshPrimitivesEXT' ( perprimitiveNV out 32-element array of block{ perprimitiveNV out int PrimitiveID gl_PrimitiveID, perprimitiveNV out int Layer gl_Layer, perprimitiveNV out int ViewportIndex gl_ViewportIndex, perprimitiveNV out bool CullPrimitiveEXT gl_CullPrimitiveEXT, perprimitiveNV out int PrimitiveShadingRateKHR gl_PrimitiveShadingRateEXT}) +0:128 'iid' ( temp uint) +0:128 Constant: +0:128 2 (const int) +0:129 move second child to first child ( temp bool) +0:129 gl_CullPrimitiveEXT: direct index for structure ( perprimitiveNV out bool CullPrimitiveEXT) +0:129 indirect index ( perprimitiveNV temp block{ perprimitiveNV out int PrimitiveID gl_PrimitiveID, perprimitiveNV out int Layer gl_Layer, perprimitiveNV out int ViewportIndex gl_ViewportIndex, perprimitiveNV out bool CullPrimitiveEXT gl_CullPrimitiveEXT, perprimitiveNV out int PrimitiveShadingRateKHR gl_PrimitiveShadingRateEXT}) +0:129 'gl_MeshPrimitivesEXT' ( perprimitiveNV out 32-element array of block{ perprimitiveNV out int PrimitiveID gl_PrimitiveID, perprimitiveNV out int Layer gl_Layer, perprimitiveNV out int ViewportIndex gl_ViewportIndex, perprimitiveNV out bool CullPrimitiveEXT gl_CullPrimitiveEXT, perprimitiveNV out int PrimitiveShadingRateKHR gl_PrimitiveShadingRateEXT}) +0:129 add ( temp uint) +0:129 'iid' ( temp uint) +0:129 Constant: +0:129 1 (const uint) +0:129 Constant: +0:129 3 (const int) +0:129 Constant: +0:129 false (const bool) +0:131 MemoryBarrierShared ( global void) +0:131 Barrier ( global void) +0:134 move second child to first child ( temp 3-component vector of uint) +0:134 direct index ( temp 3-component vector of uint PrimitiveTriangleIndicesEXT) +0:134 'gl_PrimitiveTriangleIndicesEXT' ( out 96-element array of 3-component vector of uint PrimitiveTriangleIndicesEXT) +0:134 Constant: +0:134 0 (const int) +0:134 Constant: +0:134 1 (const uint) +0:134 1 (const uint) +0:134 1 (const uint) +0:135 move second child to first child ( temp 3-component vector of uint) +0:135 indirect index ( temp 3-component vector of uint PrimitiveTriangleIndicesEXT) +0:135 'gl_PrimitiveTriangleIndicesEXT' ( out 96-element array of 3-component vector of uint PrimitiveTriangleIndicesEXT) +0:135 subtract ( temp uint) +0:135 'primitiveCount' ( temp uint) +0:135 Constant: +0:135 1 (const uint) +0:135 Constant: +0:135 2 (const uint) +0:135 2 (const uint) +0:135 2 (const uint) +0:136 move second child to first child ( temp 3-component vector of uint) +0:136 indirect index ( temp 3-component vector of uint PrimitiveTriangleIndicesEXT) +0:136 'gl_PrimitiveTriangleIndicesEXT' ( out 96-element array of 3-component vector of uint PrimitiveTriangleIndicesEXT) +0:136 'gid' ( temp uint) +0:136 indirect index ( temp 3-component vector of uint PrimitiveTriangleIndicesEXT) +0:136 'gl_PrimitiveTriangleIndicesEXT' ( out 96-element array of 3-component vector of uint PrimitiveTriangleIndicesEXT) +0:136 subtract ( temp uint) +0:136 'gid' ( temp uint) +0:136 Constant: +0:136 1 (const uint) +0:139 MemoryBarrierShared ( global void) +0:139 Barrier ( global void) +0:? Linker Objects +0:? 'gl_WorkGroupSize' ( const 3-component vector of uint WorkGroupSize) +0:? 32 (const uint) +0:? 1 (const uint) +0:? 1 (const uint) +0:? 'gl_MeshVerticesEXT' ( out 81-element array of block{ out 4-component vector of float Position gl_Position, out float PointSize gl_PointSize, out 4-element array of float ClipDistance gl_ClipDistance, out 3-element array of float CullDistance gl_CullDistance}) +0:? 'gl_MeshPrimitivesEXT' ( perprimitiveNV out 32-element array of block{ perprimitiveNV out int PrimitiveID gl_PrimitiveID, perprimitiveNV out int Layer gl_Layer, perprimitiveNV out int ViewportIndex gl_ViewportIndex, perprimitiveNV out bool CullPrimitiveEXT gl_CullPrimitiveEXT, perprimitiveNV out int PrimitiveShadingRateKHR gl_PrimitiveShadingRateEXT}) +0:? 'gl_PrimitiveTriangleIndicesEXT' ( out 96-element array of 3-component vector of uint PrimitiveTriangleIndicesEXT) + diff --git a/Test/baseResults/glsl.460.subgroupEXT.task.out b/Test/baseResults/glsl.460.subgroupEXT.task.out new file mode 100644 index 0000000000..c756f38adc --- /dev/null +++ b/Test/baseResults/glsl.460.subgroupEXT.task.out @@ -0,0 +1,707 @@ +glsl.460.subgroupEXT.task +ERROR: 0:6: 'gl_SubgroupSize' : required extension not requested: GL_KHR_shader_subgroup_basic +ERROR: 0:7: 'gl_SubgroupInvocationID' : required extension not requested: GL_KHR_shader_subgroup_basic +ERROR: 0:8: 'subgroupBarrier' : required extension not requested: GL_KHR_shader_subgroup_basic +ERROR: 0:9: 'subgroupMemoryBarrier' : required extension not requested: GL_KHR_shader_subgroup_basic +ERROR: 0:10: 'subgroupMemoryBarrierBuffer' : required extension not requested: GL_KHR_shader_subgroup_basic +ERROR: 0:11: 'subgroupMemoryBarrierImage' : required extension not requested: GL_KHR_shader_subgroup_basic +ERROR: 0:12: 'subgroupElect' : required extension not requested: GL_KHR_shader_subgroup_basic +ERROR: 0:13: 'gl_NumSubgroups' : required extension not requested: GL_KHR_shader_subgroup_basic +ERROR: 0:14: 'gl_SubgroupID' : required extension not requested: GL_KHR_shader_subgroup_basic +ERROR: 0:15: 'subgroupMemoryBarrierShared' : required extension not requested: GL_KHR_shader_subgroup_basic +ERROR: 0:17: 'subgroupAll' : required extension not requested: GL_KHR_shader_subgroup_vote +ERROR: 0:18: 'subgroupAny' : required extension not requested: GL_KHR_shader_subgroup_vote +ERROR: 0:19: 'subgroupAllEqual' : required extension not requested: GL_KHR_shader_subgroup_vote +ERROR: 0:21: 'gl_SubgroupEqMask' : required extension not requested: GL_KHR_shader_subgroup_ballot +ERROR: 0:22: 'gl_SubgroupGeMask' : required extension not requested: GL_KHR_shader_subgroup_ballot +ERROR: 0:23: 'gl_SubgroupGtMask' : required extension not requested: GL_KHR_shader_subgroup_ballot +ERROR: 0:24: 'gl_SubgroupLeMask' : required extension not requested: GL_KHR_shader_subgroup_ballot +ERROR: 0:25: 'gl_SubgroupLtMask' : required extension not requested: GL_KHR_shader_subgroup_ballot +ERROR: 0:26: 'subgroupBroadcast' : required extension not requested: GL_KHR_shader_subgroup_ballot +ERROR: 0:27: 'subgroupBroadcastFirst' : required extension not requested: GL_KHR_shader_subgroup_ballot +ERROR: 0:28: 'subgroupBallot' : required extension not requested: GL_KHR_shader_subgroup_ballot +ERROR: 0:29: 'subgroupInverseBallot' : required extension not requested: GL_KHR_shader_subgroup_ballot +ERROR: 0:30: 'subgroupBallotBitExtract' : required extension not requested: GL_KHR_shader_subgroup_ballot +ERROR: 0:31: 'subgroupBallotBitCount' : required extension not requested: GL_KHR_shader_subgroup_ballot +ERROR: 0:32: 'subgroupBallotInclusiveBitCount' : required extension not requested: GL_KHR_shader_subgroup_ballot +ERROR: 0:33: 'subgroupBallotExclusiveBitCount' : required extension not requested: GL_KHR_shader_subgroup_ballot +ERROR: 0:34: 'subgroupBallotFindLSB' : required extension not requested: GL_KHR_shader_subgroup_ballot +ERROR: 0:35: 'subgroupBallotFindMSB' : required extension not requested: GL_KHR_shader_subgroup_ballot +ERROR: 0:37: 'subgroupShuffle' : required extension not requested: GL_KHR_shader_subgroup_shuffle +ERROR: 0:38: 'subgroupShuffleXor' : required extension not requested: GL_KHR_shader_subgroup_shuffle +ERROR: 0:39: 'subgroupShuffleUp' : required extension not requested: GL_KHR_shader_subgroup_shuffle_relative +ERROR: 0:40: 'subgroupShuffleDown' : required extension not requested: GL_KHR_shader_subgroup_shuffle_relative +ERROR: 0:42: 'subgroupAdd' : required extension not requested: GL_KHR_shader_subgroup_arithmetic +ERROR: 0:43: 'subgroupMul' : required extension not requested: GL_KHR_shader_subgroup_arithmetic +ERROR: 0:44: 'subgroupMin' : required extension not requested: GL_KHR_shader_subgroup_arithmetic +ERROR: 0:45: 'subgroupMax' : required extension not requested: GL_KHR_shader_subgroup_arithmetic +ERROR: 0:46: 'subgroupAnd' : required extension not requested: GL_KHR_shader_subgroup_arithmetic +ERROR: 0:47: 'subgroupOr' : required extension not requested: GL_KHR_shader_subgroup_arithmetic +ERROR: 0:48: 'subgroupXor' : required extension not requested: GL_KHR_shader_subgroup_arithmetic +ERROR: 0:49: 'subgroupInclusiveAdd' : required extension not requested: GL_KHR_shader_subgroup_arithmetic +ERROR: 0:50: 'subgroupInclusiveMul' : required extension not requested: GL_KHR_shader_subgroup_arithmetic +ERROR: 0:51: 'subgroupInclusiveMin' : required extension not requested: GL_KHR_shader_subgroup_arithmetic +ERROR: 0:52: 'subgroupInclusiveMax' : required extension not requested: GL_KHR_shader_subgroup_arithmetic +ERROR: 0:53: 'subgroupInclusiveAnd' : required extension not requested: GL_KHR_shader_subgroup_arithmetic +ERROR: 0:54: 'subgroupInclusiveOr' : required extension not requested: GL_KHR_shader_subgroup_arithmetic +ERROR: 0:55: 'subgroupInclusiveXor' : required extension not requested: GL_KHR_shader_subgroup_arithmetic +ERROR: 0:56: 'subgroupExclusiveAdd' : required extension not requested: GL_KHR_shader_subgroup_arithmetic +ERROR: 0:57: 'subgroupExclusiveMul' : required extension not requested: GL_KHR_shader_subgroup_arithmetic +ERROR: 0:58: 'subgroupExclusiveMin' : required extension not requested: GL_KHR_shader_subgroup_arithmetic +ERROR: 0:59: 'subgroupExclusiveMax' : required extension not requested: GL_KHR_shader_subgroup_arithmetic +ERROR: 0:60: 'subgroupExclusiveAnd' : required extension not requested: GL_KHR_shader_subgroup_arithmetic +ERROR: 0:61: 'subgroupExclusiveOr' : required extension not requested: GL_KHR_shader_subgroup_arithmetic +ERROR: 0:62: 'subgroupExclusiveXor' : required extension not requested: GL_KHR_shader_subgroup_arithmetic +ERROR: 0:64: 'subgroupClusteredAdd' : required extension not requested: GL_KHR_shader_subgroup_clustered +ERROR: 0:65: 'subgroupClusteredMul' : required extension not requested: GL_KHR_shader_subgroup_clustered +ERROR: 0:66: 'subgroupClusteredMin' : required extension not requested: GL_KHR_shader_subgroup_clustered +ERROR: 0:67: 'subgroupClusteredMax' : required extension not requested: GL_KHR_shader_subgroup_clustered +ERROR: 0:68: 'subgroupClusteredAnd' : required extension not requested: GL_KHR_shader_subgroup_clustered +ERROR: 0:69: 'subgroupClusteredOr' : required extension not requested: GL_KHR_shader_subgroup_clustered +ERROR: 0:70: 'subgroupClusteredXor' : required extension not requested: GL_KHR_shader_subgroup_clustered +ERROR: 0:72: 'subgroupQuadBroadcast' : required extension not requested: GL_KHR_shader_subgroup_quad +ERROR: 0:73: 'subgroupQuadSwapHorizontal' : required extension not requested: GL_KHR_shader_subgroup_quad +ERROR: 0:74: 'subgroupQuadSwapVertical' : required extension not requested: GL_KHR_shader_subgroup_quad +ERROR: 0:75: 'subgroupQuadSwapDiagonal' : required extension not requested: GL_KHR_shader_subgroup_quad +ERROR: 64 compilation errors. No code generated. + + +Shader version: 460 +Requested GL_EXT_mesh_shader +Requested GL_KHR_shader_subgroup_arithmetic +Requested GL_KHR_shader_subgroup_ballot +Requested GL_KHR_shader_subgroup_basic +Requested GL_KHR_shader_subgroup_clustered +Requested GL_KHR_shader_subgroup_quad +Requested GL_KHR_shader_subgroup_shuffle +Requested GL_KHR_shader_subgroup_shuffle_relative +Requested GL_KHR_shader_subgroup_vote +local_size = (32, 1, 1) +ERROR: node is still EOpNull! +0:3 Function Definition: undeclared_errors(vf4; ( global 4-component vector of float) +0:3 Function Parameters: +0:3 'f4' ( in 4-component vector of float) +0:? Sequence +0:6 'gl_SubgroupSize' ( in uint SubgroupSize) +0:7 'gl_SubgroupInvocationID' ( in uint SubgroupInvocationID) +0:8 subgroupBarrier ( global void) +0:9 subgroupMemoryBarrier ( global void) +0:10 subgroupMemoryBarrierBuffer ( global void) +0:11 subgroupMemoryBarrierImage ( global void) +0:12 subgroupElect ( global bool) +0:13 'gl_NumSubgroups' ( in uint NumSubgroups) +0:14 'gl_SubgroupID' ( in uint SubgroupID) +0:15 subgroupMemoryBarrierShared ( global void) +0:17 subgroupAll ( global bool) +0:17 Constant: +0:17 true (const bool) +0:18 subgroupAny ( global bool) +0:18 Constant: +0:18 false (const bool) +0:19 subgroupAllEqual ( global bool) +0:19 'f4' ( in 4-component vector of float) +0:21 'gl_SubgroupEqMask' ( in 4-component vector of uint SubgroupEqMask) +0:22 'gl_SubgroupGeMask' ( in 4-component vector of uint SubgroupGeMask) +0:23 'gl_SubgroupGtMask' ( in 4-component vector of uint SubgroupGtMask) +0:24 'gl_SubgroupLeMask' ( in 4-component vector of uint SubgroupLeMask) +0:25 'gl_SubgroupLtMask' ( in 4-component vector of uint SubgroupLtMask) +0:26 subgroupBroadcast ( global 4-component vector of float) +0:26 'f4' ( in 4-component vector of float) +0:26 Constant: +0:26 0 (const uint) +0:27 subgroupBroadcastFirst ( global 4-component vector of float) +0:27 'f4' ( in 4-component vector of float) +0:28 Sequence +0:28 move second child to first child ( temp 4-component vector of uint) +0:28 'ballot' ( temp 4-component vector of uint) +0:28 subgroupBallot ( global 4-component vector of uint) +0:28 Constant: +0:28 false (const bool) +0:29 subgroupInverseBallot ( global bool) +0:29 Constant: +0:29 1 (const uint) +0:29 1 (const uint) +0:29 1 (const uint) +0:29 1 (const uint) +0:30 subgroupBallotBitExtract ( global bool) +0:30 'ballot' ( temp 4-component vector of uint) +0:30 Constant: +0:30 0 (const uint) +0:31 subgroupBallotBitCount ( global uint) +0:31 'ballot' ( temp 4-component vector of uint) +0:32 subgroupBallotInclusiveBitCount ( global uint) +0:32 'ballot' ( temp 4-component vector of uint) +0:33 subgroupBallotExclusiveBitCount ( global uint) +0:33 'ballot' ( temp 4-component vector of uint) +0:34 subgroupBallotFindLSB ( global uint) +0:34 'ballot' ( temp 4-component vector of uint) +0:35 subgroupBallotFindMSB ( global uint) +0:35 'ballot' ( temp 4-component vector of uint) +0:37 subgroupShuffle ( global 4-component vector of float) +0:37 'f4' ( in 4-component vector of float) +0:37 Constant: +0:37 0 (const uint) +0:38 subgroupShuffleXor ( global 4-component vector of float) +0:38 'f4' ( in 4-component vector of float) +0:38 Constant: +0:38 1 (const uint) +0:39 subgroupShuffleUp ( global 4-component vector of float) +0:39 'f4' ( in 4-component vector of float) +0:39 Constant: +0:39 1 (const uint) +0:40 subgroupShuffleDown ( global 4-component vector of float) +0:40 'f4' ( in 4-component vector of float) +0:40 Constant: +0:40 1 (const uint) +0:42 move second child to first child ( temp 4-component vector of float) +0:42 'result' ( temp 4-component vector of float) +0:42 subgroupAdd ( global 4-component vector of float) +0:42 'f4' ( in 4-component vector of float) +0:43 subgroupMul ( global 4-component vector of float) +0:43 'f4' ( in 4-component vector of float) +0:44 subgroupMin ( global 4-component vector of float) +0:44 'f4' ( in 4-component vector of float) +0:45 subgroupMax ( global 4-component vector of float) +0:45 'f4' ( in 4-component vector of float) +0:46 subgroupAnd ( global 4-component vector of uint) +0:46 'ballot' ( temp 4-component vector of uint) +0:47 subgroupOr ( global 4-component vector of uint) +0:47 'ballot' ( temp 4-component vector of uint) +0:48 subgroupXor ( global 4-component vector of uint) +0:48 'ballot' ( temp 4-component vector of uint) +0:49 subgroupInclusiveAdd ( global 4-component vector of float) +0:49 'f4' ( in 4-component vector of float) +0:50 subgroupInclusiveMul ( global 4-component vector of float) +0:50 'f4' ( in 4-component vector of float) +0:51 subgroupInclusiveMin ( global 4-component vector of float) +0:51 'f4' ( in 4-component vector of float) +0:52 subgroupInclusiveMax ( global 4-component vector of float) +0:52 'f4' ( in 4-component vector of float) +0:53 subgroupInclusiveAnd ( global 4-component vector of uint) +0:53 'ballot' ( temp 4-component vector of uint) +0:54 subgroupInclusiveOr ( global 4-component vector of uint) +0:54 'ballot' ( temp 4-component vector of uint) +0:55 subgroupInclusiveXor ( global 4-component vector of uint) +0:55 'ballot' ( temp 4-component vector of uint) +0:56 subgroupExclusiveAdd ( global 4-component vector of float) +0:56 'f4' ( in 4-component vector of float) +0:57 subgroupExclusiveMul ( global 4-component vector of float) +0:57 'f4' ( in 4-component vector of float) +0:58 subgroupExclusiveMin ( global 4-component vector of float) +0:58 'f4' ( in 4-component vector of float) +0:59 subgroupExclusiveMax ( global 4-component vector of float) +0:59 'f4' ( in 4-component vector of float) +0:60 subgroupExclusiveAnd ( global 4-component vector of uint) +0:60 'ballot' ( temp 4-component vector of uint) +0:61 subgroupExclusiveOr ( global 4-component vector of uint) +0:61 'ballot' ( temp 4-component vector of uint) +0:62 subgroupExclusiveXor ( global 4-component vector of uint) +0:62 'ballot' ( temp 4-component vector of uint) +0:64 subgroupClusteredAdd ( global 4-component vector of float) +0:64 'f4' ( in 4-component vector of float) +0:64 Constant: +0:64 2 (const uint) +0:65 subgroupClusteredMul ( global 4-component vector of float) +0:65 'f4' ( in 4-component vector of float) +0:65 Constant: +0:65 2 (const uint) +0:66 subgroupClusteredMin ( global 4-component vector of float) +0:66 'f4' ( in 4-component vector of float) +0:66 Constant: +0:66 2 (const uint) +0:67 subgroupClusteredMax ( global 4-component vector of float) +0:67 'f4' ( in 4-component vector of float) +0:67 Constant: +0:67 2 (const uint) +0:68 subgroupClusteredAnd ( global 4-component vector of uint) +0:68 'ballot' ( temp 4-component vector of uint) +0:68 Constant: +0:68 2 (const uint) +0:69 subgroupClusteredOr ( global 4-component vector of uint) +0:69 'ballot' ( temp 4-component vector of uint) +0:69 Constant: +0:69 2 (const uint) +0:70 subgroupClusteredXor ( global 4-component vector of uint) +0:70 'ballot' ( temp 4-component vector of uint) +0:70 Constant: +0:70 2 (const uint) +0:72 subgroupQuadBroadcast ( global 4-component vector of float) +0:72 'f4' ( in 4-component vector of float) +0:72 Constant: +0:72 0 (const uint) +0:73 subgroupQuadSwapHorizontal ( global 4-component vector of float) +0:73 'f4' ( in 4-component vector of float) +0:74 subgroupQuadSwapVertical ( global 4-component vector of float) +0:74 'f4' ( in 4-component vector of float) +0:75 subgroupQuadSwapDiagonal ( global 4-component vector of float) +0:75 'f4' ( in 4-component vector of float) +0:77 Branch: Return with expression +0:77 'result' ( temp 4-component vector of float) +0:102 Function Definition: main( ( global void) +0:102 Function Parameters: +0:104 Sequence +0:104 Sequence +0:104 move second child to first child ( temp uint) +0:104 'iid' ( temp uint) +0:104 direct index ( temp uint) +0:104 'gl_LocalInvocationID' ( in 3-component vector of uint LocalInvocationID) +0:104 Constant: +0:104 0 (const int) +0:105 Sequence +0:105 move second child to first child ( temp uint) +0:105 'gid' ( temp uint) +0:105 direct index ( temp uint) +0:105 'gl_WorkGroupID' ( in 3-component vector of uint WorkGroupID) +0:105 Constant: +0:105 0 (const int) +0:108 Sequence +0:108 Sequence +0:108 move second child to first child ( temp uint) +0:108 'i' ( temp uint) +0:108 Constant: +0:108 0 (const uint) +0:108 Loop with condition tested first +0:108 Loop Condition +0:108 Compare Less Than ( temp bool) +0:108 'i' ( temp uint) +0:108 Constant: +0:108 10 (const uint) +0:108 Loop Body +0:109 Sequence +0:109 move second child to first child ( temp 4-component vector of float) +0:109 indirect index ( temp 4-component vector of float) +0:109 'mem' ( shared 10-element array of 4-component vector of float) +0:109 'i' ( temp uint) +0:109 Construct vec4 ( temp 4-component vector of float) +0:109 Convert uint to float ( temp float) +0:109 add ( temp uint) +0:109 'i' ( temp uint) +0:109 uni_value: direct index for structure (layout( column_major shared) uniform uint) +0:109 'anon@0' (layout( column_major shared) uniform block{layout( column_major shared) uniform uint uni_value}) +0:109 Constant: +0:109 0 (const uint) +0:108 Loop Terminal Expression +0:108 Pre-Increment ( temp uint) +0:108 'i' ( temp uint) +0:111 imageStore ( global void) +0:111 'uni_image' (layout( binding=0) writeonly uniform image2D) +0:111 Construct ivec2 ( temp 2-component vector of int) +0:111 Convert uint to int ( temp int) +0:111 'iid' ( temp uint) +0:111 indirect index ( temp 4-component vector of float) +0:111 'mem' ( shared 10-element array of 4-component vector of float) +0:111 'gid' ( temp uint) +0:112 imageStore ( global void) +0:112 'uni_image' (layout( binding=0) writeonly uniform image2D) +0:112 Construct ivec2 ( temp 2-component vector of int) +0:112 Convert uint to int ( temp int) +0:112 'iid' ( temp uint) +0:112 indirect index ( temp 4-component vector of float) +0:112 'mem' ( shared 10-element array of 4-component vector of float) +0:112 add ( temp uint) +0:112 'gid' ( temp uint) +0:112 Constant: +0:112 1 (const uint) +0:114 MemoryBarrierShared ( global void) +0:114 Barrier ( global void) +0:118 move second child to first child ( temp 2-component vector of float) +0:118 dummy: direct index for structure ( global 2-component vector of float) +0:118 'mytask' ( taskPayloadSharedEXT structure{ global 2-component vector of float dummy, global 3-element array of 2-component vector of float submesh}) +0:118 Constant: +0:118 0 (const int) +0:118 Constant: +0:118 30.000000 +0:118 31.000000 +0:119 move second child to first child ( temp 2-component vector of float) +0:119 direct index ( temp 2-component vector of float) +0:119 submesh: direct index for structure ( global 3-element array of 2-component vector of float) +0:119 'mytask' ( taskPayloadSharedEXT structure{ global 2-component vector of float dummy, global 3-element array of 2-component vector of float submesh}) +0:119 Constant: +0:119 1 (const int) +0:119 Constant: +0:119 0 (const int) +0:119 Constant: +0:119 32.000000 +0:119 33.000000 +0:120 move second child to first child ( temp 2-component vector of float) +0:120 direct index ( temp 2-component vector of float) +0:120 submesh: direct index for structure ( global 3-element array of 2-component vector of float) +0:120 'mytask' ( taskPayloadSharedEXT structure{ global 2-component vector of float dummy, global 3-element array of 2-component vector of float submesh}) +0:120 Constant: +0:120 1 (const int) +0:120 Constant: +0:120 1 (const int) +0:120 Constant: +0:120 34.000000 +0:120 35.000000 +0:121 move second child to first child ( temp 2-component vector of float) +0:121 direct index ( temp 2-component vector of float) +0:121 submesh: direct index for structure ( global 3-element array of 2-component vector of float) +0:121 'mytask' ( taskPayloadSharedEXT structure{ global 2-component vector of float dummy, global 3-element array of 2-component vector of float submesh}) +0:121 Constant: +0:121 1 (const int) +0:121 Constant: +0:121 2 (const int) +0:121 indirect index ( temp 2-component vector of float) +0:121 submesh: direct index for structure ( global 3-element array of 2-component vector of float) +0:121 'mytask' ( taskPayloadSharedEXT structure{ global 2-component vector of float dummy, global 3-element array of 2-component vector of float submesh}) +0:121 Constant: +0:121 1 (const int) +0:121 mod ( temp uint) +0:121 'gid' ( temp uint) +0:121 Constant: +0:121 2 (const uint) +0:123 MemoryBarrierShared ( global void) +0:123 Barrier ( global void) +0:126 EmitMeshTasksEXT ( global void) +0:126 Constant: +0:126 3 (const uint) +0:126 Constant: +0:126 1 (const uint) +0:126 Constant: +0:126 1 (const uint) +0:130 Function Definition: basic_works( ( global void) +0:130 Function Parameters: +0:132 Sequence +0:132 'gl_SubgroupSize' ( in uint SubgroupSize) +0:133 'gl_SubgroupInvocationID' ( in uint SubgroupInvocationID) +0:134 subgroupBarrier ( global void) +0:135 subgroupMemoryBarrier ( global void) +0:136 subgroupMemoryBarrierBuffer ( global void) +0:137 subgroupMemoryBarrierImage ( global void) +0:138 subgroupElect ( global bool) +0:139 'gl_NumSubgroups' ( in uint NumSubgroups) +0:140 'gl_SubgroupID' ( in uint SubgroupID) +0:141 subgroupMemoryBarrierShared ( global void) +0:145 Function Definition: ballot_works(vf4; ( global void) +0:145 Function Parameters: +0:145 'f4' ( in 4-component vector of float) +0:146 Sequence +0:146 'gl_SubgroupEqMask' ( in 4-component vector of uint SubgroupEqMask) +0:147 'gl_SubgroupGeMask' ( in 4-component vector of uint SubgroupGeMask) +0:148 'gl_SubgroupGtMask' ( in 4-component vector of uint SubgroupGtMask) +0:149 'gl_SubgroupLeMask' ( in 4-component vector of uint SubgroupLeMask) +0:150 'gl_SubgroupLtMask' ( in 4-component vector of uint SubgroupLtMask) +0:151 subgroupBroadcast ( global 4-component vector of float) +0:151 'f4' ( in 4-component vector of float) +0:151 Constant: +0:151 0 (const uint) +0:152 subgroupBroadcastFirst ( global 4-component vector of float) +0:152 'f4' ( in 4-component vector of float) +0:153 Sequence +0:153 move second child to first child ( temp 4-component vector of uint) +0:153 'ballot' ( temp 4-component vector of uint) +0:153 subgroupBallot ( global 4-component vector of uint) +0:153 Constant: +0:153 false (const bool) +0:154 subgroupInverseBallot ( global bool) +0:154 Constant: +0:154 1 (const uint) +0:154 1 (const uint) +0:154 1 (const uint) +0:154 1 (const uint) +0:155 subgroupBallotBitExtract ( global bool) +0:155 'ballot' ( temp 4-component vector of uint) +0:155 Constant: +0:155 0 (const uint) +0:156 subgroupBallotBitCount ( global uint) +0:156 'ballot' ( temp 4-component vector of uint) +0:157 subgroupBallotInclusiveBitCount ( global uint) +0:157 'ballot' ( temp 4-component vector of uint) +0:158 subgroupBallotExclusiveBitCount ( global uint) +0:158 'ballot' ( temp 4-component vector of uint) +0:159 subgroupBallotFindLSB ( global uint) +0:159 'ballot' ( temp 4-component vector of uint) +0:160 subgroupBallotFindMSB ( global uint) +0:160 'ballot' ( temp 4-component vector of uint) +0:164 Function Definition: vote_works(vf4; ( global void) +0:164 Function Parameters: +0:164 'f4' ( in 4-component vector of float) +0:166 Sequence +0:166 subgroupAll ( global bool) +0:166 Constant: +0:166 true (const bool) +0:167 subgroupAny ( global bool) +0:167 Constant: +0:167 false (const bool) +0:168 subgroupAllEqual ( global bool) +0:168 'f4' ( in 4-component vector of float) +0:173 Function Definition: shuffle_works(vf4; ( global void) +0:173 Function Parameters: +0:173 'f4' ( in 4-component vector of float) +0:175 Sequence +0:175 subgroupShuffle ( global 4-component vector of float) +0:175 'f4' ( in 4-component vector of float) +0:175 Constant: +0:175 0 (const uint) +0:176 subgroupShuffleXor ( global 4-component vector of float) +0:176 'f4' ( in 4-component vector of float) +0:176 Constant: +0:176 1 (const uint) +0:177 subgroupShuffleUp ( global 4-component vector of float) +0:177 'f4' ( in 4-component vector of float) +0:177 Constant: +0:177 1 (const uint) +0:178 subgroupShuffleDown ( global 4-component vector of float) +0:178 'f4' ( in 4-component vector of float) +0:178 Constant: +0:178 1 (const uint) +0:182 Function Definition: arith_works(vf4; ( global void) +0:182 Function Parameters: +0:182 'f4' ( in 4-component vector of float) +0:? Sequence +0:185 subgroupAdd ( global 4-component vector of float) +0:185 'f4' ( in 4-component vector of float) +0:186 subgroupMul ( global 4-component vector of float) +0:186 'f4' ( in 4-component vector of float) +0:187 subgroupMin ( global 4-component vector of float) +0:187 'f4' ( in 4-component vector of float) +0:188 subgroupMax ( global 4-component vector of float) +0:188 'f4' ( in 4-component vector of float) +0:189 subgroupAnd ( global 4-component vector of uint) +0:189 'ballot' ( temp 4-component vector of uint) +0:190 subgroupOr ( global 4-component vector of uint) +0:190 'ballot' ( temp 4-component vector of uint) +0:191 subgroupXor ( global 4-component vector of uint) +0:191 'ballot' ( temp 4-component vector of uint) +0:192 subgroupInclusiveAdd ( global 4-component vector of float) +0:192 'f4' ( in 4-component vector of float) +0:193 subgroupInclusiveMul ( global 4-component vector of float) +0:193 'f4' ( in 4-component vector of float) +0:194 subgroupInclusiveMin ( global 4-component vector of float) +0:194 'f4' ( in 4-component vector of float) +0:195 subgroupInclusiveMax ( global 4-component vector of float) +0:195 'f4' ( in 4-component vector of float) +0:196 subgroupInclusiveAnd ( global 4-component vector of uint) +0:196 'ballot' ( temp 4-component vector of uint) +0:197 subgroupInclusiveOr ( global 4-component vector of uint) +0:197 'ballot' ( temp 4-component vector of uint) +0:198 subgroupInclusiveXor ( global 4-component vector of uint) +0:198 'ballot' ( temp 4-component vector of uint) +0:199 subgroupExclusiveAdd ( global 4-component vector of float) +0:199 'f4' ( in 4-component vector of float) +0:200 subgroupExclusiveMul ( global 4-component vector of float) +0:200 'f4' ( in 4-component vector of float) +0:201 subgroupExclusiveMin ( global 4-component vector of float) +0:201 'f4' ( in 4-component vector of float) +0:202 subgroupExclusiveMax ( global 4-component vector of float) +0:202 'f4' ( in 4-component vector of float) +0:203 subgroupExclusiveAnd ( global 4-component vector of uint) +0:203 'ballot' ( temp 4-component vector of uint) +0:204 subgroupExclusiveOr ( global 4-component vector of uint) +0:204 'ballot' ( temp 4-component vector of uint) +0:205 subgroupExclusiveXor ( global 4-component vector of uint) +0:205 'ballot' ( temp 4-component vector of uint) +0:209 Function Definition: clustered_works(vf4; ( global void) +0:209 Function Parameters: +0:209 'f4' ( in 4-component vector of float) +0:211 Sequence +0:211 Sequence +0:211 move second child to first child ( temp 4-component vector of uint) +0:211 'ballot' ( temp 4-component vector of uint) +0:211 Constant: +0:211 85 (const uint) +0:211 0 (const uint) +0:211 0 (const uint) +0:211 0 (const uint) +0:212 subgroupClusteredAdd ( global 4-component vector of float) +0:212 'f4' ( in 4-component vector of float) +0:212 Constant: +0:212 2 (const uint) +0:213 subgroupClusteredMul ( global 4-component vector of float) +0:213 'f4' ( in 4-component vector of float) +0:213 Constant: +0:213 2 (const uint) +0:214 subgroupClusteredMin ( global 4-component vector of float) +0:214 'f4' ( in 4-component vector of float) +0:214 Constant: +0:214 2 (const uint) +0:215 subgroupClusteredMax ( global 4-component vector of float) +0:215 'f4' ( in 4-component vector of float) +0:215 Constant: +0:215 2 (const uint) +0:216 subgroupClusteredAnd ( global 4-component vector of uint) +0:216 'ballot' ( temp 4-component vector of uint) +0:216 Constant: +0:216 2 (const uint) +0:217 subgroupClusteredOr ( global 4-component vector of uint) +0:217 'ballot' ( temp 4-component vector of uint) +0:217 Constant: +0:217 2 (const uint) +0:218 subgroupClusteredXor ( global 4-component vector of uint) +0:218 'ballot' ( temp 4-component vector of uint) +0:218 Constant: +0:218 2 (const uint) +0:222 Function Definition: quad_works(vf4; ( global void) +0:222 Function Parameters: +0:222 'f4' ( in 4-component vector of float) +0:224 Sequence +0:224 subgroupQuadBroadcast ( global 4-component vector of float) +0:224 'f4' ( in 4-component vector of float) +0:224 Constant: +0:224 0 (const uint) +0:225 subgroupQuadSwapHorizontal ( global 4-component vector of float) +0:225 'f4' ( in 4-component vector of float) +0:226 subgroupQuadSwapVertical ( global 4-component vector of float) +0:226 'f4' ( in 4-component vector of float) +0:227 subgroupQuadSwapDiagonal ( global 4-component vector of float) +0:227 'f4' ( in 4-component vector of float) +0:? Linker Objects +0:? 'gl_WorkGroupSize' ( const 3-component vector of uint WorkGroupSize) +0:? 32 (const uint) +0:? 1 (const uint) +0:? 1 (const uint) +0:? 'uni_image' (layout( binding=0) writeonly uniform image2D) +0:? 'anon@0' (layout( column_major shared) uniform block{layout( column_major shared) uniform uint uni_value}) +0:? 'mem' ( shared 10-element array of 4-component vector of float) +0:? 'mytask' ( taskPayloadSharedEXT structure{ global 2-component vector of float dummy, global 3-element array of 2-component vector of float submesh}) + + +Linked task stage: + + +Shader version: 460 +Requested GL_EXT_mesh_shader +Requested GL_KHR_shader_subgroup_arithmetic +Requested GL_KHR_shader_subgroup_ballot +Requested GL_KHR_shader_subgroup_basic +Requested GL_KHR_shader_subgroup_clustered +Requested GL_KHR_shader_subgroup_quad +Requested GL_KHR_shader_subgroup_shuffle +Requested GL_KHR_shader_subgroup_shuffle_relative +Requested GL_KHR_shader_subgroup_vote +local_size = (32, 1, 1) +ERROR: node is still EOpNull! +0:102 Function Definition: main( ( global void) +0:102 Function Parameters: +0:104 Sequence +0:104 Sequence +0:104 move second child to first child ( temp uint) +0:104 'iid' ( temp uint) +0:104 direct index ( temp uint) +0:104 'gl_LocalInvocationID' ( in 3-component vector of uint LocalInvocationID) +0:104 Constant: +0:104 0 (const int) +0:105 Sequence +0:105 move second child to first child ( temp uint) +0:105 'gid' ( temp uint) +0:105 direct index ( temp uint) +0:105 'gl_WorkGroupID' ( in 3-component vector of uint WorkGroupID) +0:105 Constant: +0:105 0 (const int) +0:108 Sequence +0:108 Sequence +0:108 move second child to first child ( temp uint) +0:108 'i' ( temp uint) +0:108 Constant: +0:108 0 (const uint) +0:108 Loop with condition tested first +0:108 Loop Condition +0:108 Compare Less Than ( temp bool) +0:108 'i' ( temp uint) +0:108 Constant: +0:108 10 (const uint) +0:108 Loop Body +0:109 Sequence +0:109 move second child to first child ( temp 4-component vector of float) +0:109 indirect index ( temp 4-component vector of float) +0:109 'mem' ( shared 10-element array of 4-component vector of float) +0:109 'i' ( temp uint) +0:109 Construct vec4 ( temp 4-component vector of float) +0:109 Convert uint to float ( temp float) +0:109 add ( temp uint) +0:109 'i' ( temp uint) +0:109 uni_value: direct index for structure (layout( column_major shared) uniform uint) +0:109 'anon@0' (layout( column_major shared) uniform block{layout( column_major shared) uniform uint uni_value}) +0:109 Constant: +0:109 0 (const uint) +0:108 Loop Terminal Expression +0:108 Pre-Increment ( temp uint) +0:108 'i' ( temp uint) +0:111 imageStore ( global void) +0:111 'uni_image' (layout( binding=0) writeonly uniform image2D) +0:111 Construct ivec2 ( temp 2-component vector of int) +0:111 Convert uint to int ( temp int) +0:111 'iid' ( temp uint) +0:111 indirect index ( temp 4-component vector of float) +0:111 'mem' ( shared 10-element array of 4-component vector of float) +0:111 'gid' ( temp uint) +0:112 imageStore ( global void) +0:112 'uni_image' (layout( binding=0) writeonly uniform image2D) +0:112 Construct ivec2 ( temp 2-component vector of int) +0:112 Convert uint to int ( temp int) +0:112 'iid' ( temp uint) +0:112 indirect index ( temp 4-component vector of float) +0:112 'mem' ( shared 10-element array of 4-component vector of float) +0:112 add ( temp uint) +0:112 'gid' ( temp uint) +0:112 Constant: +0:112 1 (const uint) +0:114 MemoryBarrierShared ( global void) +0:114 Barrier ( global void) +0:118 move second child to first child ( temp 2-component vector of float) +0:118 dummy: direct index for structure ( global 2-component vector of float) +0:118 'mytask' ( taskPayloadSharedEXT structure{ global 2-component vector of float dummy, global 3-element array of 2-component vector of float submesh}) +0:118 Constant: +0:118 0 (const int) +0:118 Constant: +0:118 30.000000 +0:118 31.000000 +0:119 move second child to first child ( temp 2-component vector of float) +0:119 direct index ( temp 2-component vector of float) +0:119 submesh: direct index for structure ( global 3-element array of 2-component vector of float) +0:119 'mytask' ( taskPayloadSharedEXT structure{ global 2-component vector of float dummy, global 3-element array of 2-component vector of float submesh}) +0:119 Constant: +0:119 1 (const int) +0:119 Constant: +0:119 0 (const int) +0:119 Constant: +0:119 32.000000 +0:119 33.000000 +0:120 move second child to first child ( temp 2-component vector of float) +0:120 direct index ( temp 2-component vector of float) +0:120 submesh: direct index for structure ( global 3-element array of 2-component vector of float) +0:120 'mytask' ( taskPayloadSharedEXT structure{ global 2-component vector of float dummy, global 3-element array of 2-component vector of float submesh}) +0:120 Constant: +0:120 1 (const int) +0:120 Constant: +0:120 1 (const int) +0:120 Constant: +0:120 34.000000 +0:120 35.000000 +0:121 move second child to first child ( temp 2-component vector of float) +0:121 direct index ( temp 2-component vector of float) +0:121 submesh: direct index for structure ( global 3-element array of 2-component vector of float) +0:121 'mytask' ( taskPayloadSharedEXT structure{ global 2-component vector of float dummy, global 3-element array of 2-component vector of float submesh}) +0:121 Constant: +0:121 1 (const int) +0:121 Constant: +0:121 2 (const int) +0:121 indirect index ( temp 2-component vector of float) +0:121 submesh: direct index for structure ( global 3-element array of 2-component vector of float) +0:121 'mytask' ( taskPayloadSharedEXT structure{ global 2-component vector of float dummy, global 3-element array of 2-component vector of float submesh}) +0:121 Constant: +0:121 1 (const int) +0:121 mod ( temp uint) +0:121 'gid' ( temp uint) +0:121 Constant: +0:121 2 (const uint) +0:123 MemoryBarrierShared ( global void) +0:123 Barrier ( global void) +0:126 EmitMeshTasksEXT ( global void) +0:126 Constant: +0:126 3 (const uint) +0:126 Constant: +0:126 1 (const uint) +0:126 Constant: +0:126 1 (const uint) +0:? Linker Objects +0:? 'gl_WorkGroupSize' ( const 3-component vector of uint WorkGroupSize) +0:? 32 (const uint) +0:? 1 (const uint) +0:? 1 (const uint) +0:? 'uni_image' (layout( binding=0) writeonly uniform image2D) +0:? 'anon@0' (layout( column_major shared) uniform block{layout( column_major shared) uniform uint uni_value}) +0:? 'mem' ( shared 10-element array of 4-component vector of float) +0:? 'mytask' ( taskPayloadSharedEXT structure{ global 2-component vector of float dummy, global 3-element array of 2-component vector of float submesh}) + diff --git a/Test/baseResults/glsl.autosampledtextures.frag.out b/Test/baseResults/glsl.autosampledtextures.frag.out index 2183898a8f..cbbb2021f3 100644 --- a/Test/baseResults/glsl.autosampledtextures.frag.out +++ b/Test/baseResults/glsl.autosampledtextures.frag.out @@ -1,6 +1,6 @@ glsl.autosampledtextures.frag // Module Version 10000 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 23 Capability Shader diff --git a/Test/baseResults/glsl.entryPointRename.vert.bad.out b/Test/baseResults/glsl.entryPointRename.vert.bad.out index ce34fbf24e..ae5de6e354 100644 --- a/Test/baseResults/glsl.entryPointRename.vert.bad.out +++ b/Test/baseResults/glsl.entryPointRename.vert.bad.out @@ -2,7 +2,7 @@ glsl.entryPointRename.vert ERROR: Source entry point must be "main" // Module Version 10000 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 20 Capability Shader diff --git a/Test/baseResults/glsl.entryPointRename.vert.out b/Test/baseResults/glsl.entryPointRename.vert.out index 71319c9087..bc142a58be 100644 --- a/Test/baseResults/glsl.entryPointRename.vert.out +++ b/Test/baseResults/glsl.entryPointRename.vert.out @@ -1,6 +1,6 @@ glsl.entryPointRename.vert // Module Version 10000 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 20 Capability Shader diff --git a/Test/baseResults/glsl.es320.extTextureShadowLod.frag.out b/Test/baseResults/glsl.es320.extTextureShadowLod.frag.out new file mode 100644 index 0000000000..ae385ae196 --- /dev/null +++ b/Test/baseResults/glsl.es320.extTextureShadowLod.frag.out @@ -0,0 +1,149 @@ +glsl.es320.extTextureShadowLod.frag +Shader version: 320 +Requested GL_EXT_texture_shadow_lod +0:? Sequence +0:12 Function Definition: main( ( global void) +0:12 Function Parameters: +0:14 Sequence +0:14 move second child to first child ( temp lowp float) +0:14 'c' ( out lowp float) +0:14 texture ( global lowp float) +0:14 's2da' ( uniform lowp sampler2DArrayShadow) +0:14 'tc' ( smooth in lowp 4-component vector of float) +0:14 Constant: +0:14 0.000000 +0:15 move second child to first child ( temp lowp float) +0:15 'c' ( out lowp float) +0:15 texture ( global lowp float) +0:15 'sca' ( uniform lowp samplerCubeArrayShadow) +0:15 'tc' ( smooth in lowp 4-component vector of float) +0:15 Constant: +0:15 0.000000 +0:15 Constant: +0:15 0.000000 +0:16 move second child to first child ( temp lowp float) +0:16 'c' ( out lowp float) +0:16 textureOffset ( global lowp float) +0:16 's2da' ( uniform lowp sampler2DArrayShadow) +0:16 'tc' ( smooth in lowp 4-component vector of float) +0:16 Constant: +0:16 0 (const int) +0:16 0 (const int) +0:16 Constant: +0:16 0.000000 +0:17 move second child to first child ( temp lowp float) +0:17 'c' ( out lowp float) +0:17 textureLod ( global lowp float) +0:17 's2da' ( uniform lowp sampler2DArrayShadow) +0:17 'tc' ( smooth in lowp 4-component vector of float) +0:17 Constant: +0:17 0.000000 +0:18 move second child to first child ( temp lowp float) +0:18 'c' ( out lowp float) +0:18 textureLod ( global lowp float) +0:18 'sc' ( uniform lowp samplerCubeShadow) +0:18 'tc' ( smooth in lowp 4-component vector of float) +0:18 Constant: +0:18 0.000000 +0:19 move second child to first child ( temp lowp float) +0:19 'c' ( out lowp float) +0:19 textureLod ( global lowp float) +0:19 'sca' ( uniform lowp samplerCubeArrayShadow) +0:19 'tc' ( smooth in lowp 4-component vector of float) +0:19 Constant: +0:19 0.000000 +0:19 Constant: +0:19 0.000000 +0:20 move second child to first child ( temp lowp float) +0:20 'c' ( out lowp float) +0:20 textureLodOffset ( global lowp float) +0:20 's2da' ( uniform lowp sampler2DArrayShadow) +0:20 'tc' ( smooth in lowp 4-component vector of float) +0:20 Constant: +0:20 0.000000 +0:20 Constant: +0:20 0 (const int) +0:20 0 (const int) +0:? Linker Objects +0:? 's2da' ( uniform lowp sampler2DArrayShadow) +0:? 'sca' ( uniform lowp samplerCubeArrayShadow) +0:? 'sc' ( uniform lowp samplerCubeShadow) +0:? 'tc' ( smooth in lowp 4-component vector of float) +0:? 'c' ( out lowp float) + + +Linked fragment stage: + + +Shader version: 320 +Requested GL_EXT_texture_shadow_lod +0:? Sequence +0:12 Function Definition: main( ( global void) +0:12 Function Parameters: +0:14 Sequence +0:14 move second child to first child ( temp lowp float) +0:14 'c' ( out lowp float) +0:14 texture ( global lowp float) +0:14 's2da' ( uniform lowp sampler2DArrayShadow) +0:14 'tc' ( smooth in lowp 4-component vector of float) +0:14 Constant: +0:14 0.000000 +0:15 move second child to first child ( temp lowp float) +0:15 'c' ( out lowp float) +0:15 texture ( global lowp float) +0:15 'sca' ( uniform lowp samplerCubeArrayShadow) +0:15 'tc' ( smooth in lowp 4-component vector of float) +0:15 Constant: +0:15 0.000000 +0:15 Constant: +0:15 0.000000 +0:16 move second child to first child ( temp lowp float) +0:16 'c' ( out lowp float) +0:16 textureOffset ( global lowp float) +0:16 's2da' ( uniform lowp sampler2DArrayShadow) +0:16 'tc' ( smooth in lowp 4-component vector of float) +0:16 Constant: +0:16 0 (const int) +0:16 0 (const int) +0:16 Constant: +0:16 0.000000 +0:17 move second child to first child ( temp lowp float) +0:17 'c' ( out lowp float) +0:17 textureLod ( global lowp float) +0:17 's2da' ( uniform lowp sampler2DArrayShadow) +0:17 'tc' ( smooth in lowp 4-component vector of float) +0:17 Constant: +0:17 0.000000 +0:18 move second child to first child ( temp lowp float) +0:18 'c' ( out lowp float) +0:18 textureLod ( global lowp float) +0:18 'sc' ( uniform lowp samplerCubeShadow) +0:18 'tc' ( smooth in lowp 4-component vector of float) +0:18 Constant: +0:18 0.000000 +0:19 move second child to first child ( temp lowp float) +0:19 'c' ( out lowp float) +0:19 textureLod ( global lowp float) +0:19 'sca' ( uniform lowp samplerCubeArrayShadow) +0:19 'tc' ( smooth in lowp 4-component vector of float) +0:19 Constant: +0:19 0.000000 +0:19 Constant: +0:19 0.000000 +0:20 move second child to first child ( temp lowp float) +0:20 'c' ( out lowp float) +0:20 textureLodOffset ( global lowp float) +0:20 's2da' ( uniform lowp sampler2DArrayShadow) +0:20 'tc' ( smooth in lowp 4-component vector of float) +0:20 Constant: +0:20 0.000000 +0:20 Constant: +0:20 0 (const int) +0:20 0 (const int) +0:? Linker Objects +0:? 's2da' ( uniform lowp sampler2DArrayShadow) +0:? 'sca' ( uniform lowp samplerCubeArrayShadow) +0:? 'sc' ( uniform lowp samplerCubeShadow) +0:? 'tc' ( smooth in lowp 4-component vector of float) +0:? 'c' ( out lowp float) + diff --git a/Test/baseResults/glsl.ext.textureShadowLod.frag.out b/Test/baseResults/glsl.ext.textureShadowLod.frag.out new file mode 100644 index 0000000000..b84183f897 --- /dev/null +++ b/Test/baseResults/glsl.ext.textureShadowLod.frag.out @@ -0,0 +1,160 @@ +glsl.ext.textureShadowLod.frag +ERROR: 0:24: 'texture(..., float bias)' : required extension not requested: GL_EXT_texture_shadow_lod +ERROR: 0:25: 'texture(..., float bias)' : required extension not requested: GL_EXT_texture_shadow_lod +ERROR: 0:26: 'textureOffset for sampler2DArrayShadow' : required extension not requested: GL_EXT_texture_shadow_lod +ERROR: 0:27: 'textureLod(..., float lod)' : required extension not requested: GL_EXT_texture_shadow_lod +ERROR: 0:28: 'textureLod(..., float lod)' : required extension not requested: GL_EXT_texture_shadow_lod +ERROR: 0:29: 'textureLod(..., float lod)' : required extension not requested: GL_EXT_texture_shadow_lod +ERROR: 0:30: 'textureLodOffset for sampler2DArrayShadow' : required extension not requested: GL_EXT_texture_shadow_lod +ERROR: 7 compilation errors. No code generated. + + +Shader version: 450 +Requested GL_EXT_texture_shadow_lod +ERROR: node is still EOpNull! +0:11 Function Definition: pass( ( global void) +0:11 Function Parameters: +0:12 Sequence +0:12 move second child to first child ( temp float) +0:12 'c' ( out float) +0:12 texture ( global float) +0:12 's2da' ( uniform sampler2DArrayShadow) +0:12 'tc' ( smooth in 4-component vector of float) +0:12 Constant: +0:12 0.000000 +0:13 move second child to first child ( temp float) +0:13 'c' ( out float) +0:13 texture ( global float) +0:13 'sca' ( uniform samplerCubeArrayShadow) +0:13 'tc' ( smooth in 4-component vector of float) +0:13 Constant: +0:13 0.000000 +0:13 Constant: +0:13 0.000000 +0:14 move second child to first child ( temp float) +0:14 'c' ( out float) +0:14 textureOffset ( global float) +0:14 's2da' ( uniform sampler2DArrayShadow) +0:14 'tc' ( smooth in 4-component vector of float) +0:14 Constant: +0:14 0 (const int) +0:14 0 (const int) +0:14 Constant: +0:14 0.000000 +0:15 move second child to first child ( temp float) +0:15 'c' ( out float) +0:15 textureLod ( global float) +0:15 's2da' ( uniform sampler2DArrayShadow) +0:15 'tc' ( smooth in 4-component vector of float) +0:15 Constant: +0:15 0.000000 +0:16 move second child to first child ( temp float) +0:16 'c' ( out float) +0:16 textureLod ( global float) +0:16 'sc' ( uniform samplerCubeShadow) +0:16 'tc' ( smooth in 4-component vector of float) +0:16 Constant: +0:16 0.000000 +0:17 move second child to first child ( temp float) +0:17 'c' ( out float) +0:17 textureLod ( global float) +0:17 'sca' ( uniform samplerCubeArrayShadow) +0:17 'tc' ( smooth in 4-component vector of float) +0:17 Constant: +0:17 0.000000 +0:17 Constant: +0:17 0.000000 +0:18 move second child to first child ( temp float) +0:18 'c' ( out float) +0:18 textureLodOffset ( global float) +0:18 's2da' ( uniform sampler2DArrayShadow) +0:18 'tc' ( smooth in 4-component vector of float) +0:18 Constant: +0:18 0.000000 +0:18 Constant: +0:18 0 (const int) +0:18 0 (const int) +0:22 Function Definition: fail( ( global void) +0:22 Function Parameters: +0:24 Sequence +0:24 move second child to first child ( temp float) +0:24 'c' ( out float) +0:24 texture ( global float) +0:24 's2da' ( uniform sampler2DArrayShadow) +0:24 'tc' ( smooth in 4-component vector of float) +0:24 Constant: +0:24 0.000000 +0:25 move second child to first child ( temp float) +0:25 'c' ( out float) +0:25 texture ( global float) +0:25 'sca' ( uniform samplerCubeArrayShadow) +0:25 'tc' ( smooth in 4-component vector of float) +0:25 Constant: +0:25 0.000000 +0:25 Constant: +0:25 0.000000 +0:26 move second child to first child ( temp float) +0:26 'c' ( out float) +0:26 textureOffset ( global float) +0:26 's2da' ( uniform sampler2DArrayShadow) +0:26 'tc' ( smooth in 4-component vector of float) +0:26 Constant: +0:26 0 (const int) +0:26 0 (const int) +0:26 Constant: +0:26 0.000000 +0:27 move second child to first child ( temp float) +0:27 'c' ( out float) +0:27 textureLod ( global float) +0:27 's2da' ( uniform sampler2DArrayShadow) +0:27 'tc' ( smooth in 4-component vector of float) +0:27 Constant: +0:27 0.000000 +0:28 move second child to first child ( temp float) +0:28 'c' ( out float) +0:28 textureLod ( global float) +0:28 'sc' ( uniform samplerCubeShadow) +0:28 'tc' ( smooth in 4-component vector of float) +0:28 Constant: +0:28 0.000000 +0:29 move second child to first child ( temp float) +0:29 'c' ( out float) +0:29 textureLod ( global float) +0:29 'sca' ( uniform samplerCubeArrayShadow) +0:29 'tc' ( smooth in 4-component vector of float) +0:29 Constant: +0:29 0.000000 +0:29 Constant: +0:29 0.000000 +0:30 move second child to first child ( temp float) +0:30 'c' ( out float) +0:30 textureLodOffset ( global float) +0:30 's2da' ( uniform sampler2DArrayShadow) +0:30 'tc' ( smooth in 4-component vector of float) +0:30 Constant: +0:30 0.000000 +0:30 Constant: +0:30 0 (const int) +0:30 0 (const int) +0:? Linker Objects +0:? 's2da' ( uniform sampler2DArrayShadow) +0:? 'sca' ( uniform samplerCubeArrayShadow) +0:? 'sc' ( uniform samplerCubeShadow) +0:? 'c' ( out float) +0:? 'tc' ( smooth in 4-component vector of float) + + +Linked fragment stage: + +ERROR: Linking fragment stage: Missing entry point: Each stage requires one entry point + +Shader version: 450 +Requested GL_EXT_texture_shadow_lod +ERROR: node is still EOpNull! +0:? Linker Objects +0:? 's2da' ( uniform sampler2DArrayShadow) +0:? 'sca' ( uniform samplerCubeArrayShadow) +0:? 'sc' ( uniform samplerCubeShadow) +0:? 'c' ( out float) +0:? 'tc' ( smooth in 4-component vector of float) + diff --git a/Test/baseResults/glspv.esversion.vert.out b/Test/baseResults/glspv.esversion.vert.out index 2a0932abee..dedcae9eea 100644 --- a/Test/baseResults/glspv.esversion.vert.out +++ b/Test/baseResults/glspv.esversion.vert.out @@ -1,6 +1,6 @@ glspv.esversion.vert // Module Version 10000 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 10 Capability Shader diff --git a/Test/baseResults/glspv.version.frag.out b/Test/baseResults/glspv.version.frag.out index a90d9eb8d0..13abe1d6c3 100644 --- a/Test/baseResults/glspv.version.frag.out +++ b/Test/baseResults/glspv.version.frag.out @@ -2,7 +2,7 @@ glspv.version.frag ERROR: #version: compilation for SPIR-V does not support the compatibility profile // Module Version 10000 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 6 Capability Shader diff --git a/Test/baseResults/hlsl.PointSize.geom.out b/Test/baseResults/hlsl.PointSize.geom.out index 2b3d9544bb..c81cf5b3e8 100644 --- a/Test/baseResults/hlsl.PointSize.geom.out +++ b/Test/baseResults/hlsl.PointSize.geom.out @@ -71,7 +71,7 @@ output primitive = line_strip Validation failed // Module Version 10000 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 36 Capability Geometry diff --git a/Test/baseResults/hlsl.PointSize.vert.out b/Test/baseResults/hlsl.PointSize.vert.out index 12a4d6465d..5d646a4889 100644 --- a/Test/baseResults/hlsl.PointSize.vert.out +++ b/Test/baseResults/hlsl.PointSize.vert.out @@ -38,7 +38,7 @@ Shader version: 500 0:? '@entryPointOutput' ( out float PointSize) // Module Version 10000 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 16 Capability Shader diff --git a/Test/baseResults/hlsl.aliasOpaque.frag.out b/Test/baseResults/hlsl.aliasOpaque.frag.out index b7c2c9e256..7bea691745 100644 --- a/Test/baseResults/hlsl.aliasOpaque.frag.out +++ b/Test/baseResults/hlsl.aliasOpaque.frag.out @@ -143,7 +143,7 @@ gl_FragCoord origin is upper left 0:? '@entryPointOutput' (layout( location=0) out 4-component vector of float) // Module Version 10000 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 64 Capability Shader diff --git a/Test/baseResults/hlsl.amend.frag.out b/Test/baseResults/hlsl.amend.frag.out index dde6e29b38..b8ac133c00 100644 --- a/Test/baseResults/hlsl.amend.frag.out +++ b/Test/baseResults/hlsl.amend.frag.out @@ -160,7 +160,7 @@ gl_FragCoord origin is upper left 0:? 'm' ( global 4-component vector of float) // Module Version 10000 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 57 Capability Shader diff --git a/Test/baseResults/hlsl.array.flatten.frag.out b/Test/baseResults/hlsl.array.flatten.frag.out index 5b99f5df44..264a716c2e 100644 --- a/Test/baseResults/hlsl.array.flatten.frag.out +++ b/Test/baseResults/hlsl.array.flatten.frag.out @@ -345,7 +345,7 @@ gl_FragCoord origin is upper left 0:? 'ps_output.color' (layout( location=0) out 4-component vector of float) // Module Version 10000 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 143 Capability Shader diff --git a/Test/baseResults/hlsl.array.frag.out b/Test/baseResults/hlsl.array.frag.out index 269177294d..eab21a6a9e 100644 --- a/Test/baseResults/hlsl.array.frag.out +++ b/Test/baseResults/hlsl.array.frag.out @@ -290,7 +290,7 @@ gl_FragCoord origin is upper left 0:? 'input' (layout( location=1) in 3-element array of 4-component vector of float) // Module Version 10000 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 126 Capability Shader diff --git a/Test/baseResults/hlsl.array.implicit-size.frag.out b/Test/baseResults/hlsl.array.implicit-size.frag.out index 566bc9d5a6..ae36cef412 100644 --- a/Test/baseResults/hlsl.array.implicit-size.frag.out +++ b/Test/baseResults/hlsl.array.implicit-size.frag.out @@ -163,7 +163,7 @@ gl_FragCoord origin is upper left 0:? 'g_mystruct' ( global 2-element array of structure{ temp int i, temp float f}) // Module Version 10000 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 72 Capability Shader diff --git a/Test/baseResults/hlsl.array.multidim.frag.out b/Test/baseResults/hlsl.array.multidim.frag.out index fa2be6590a..7b9d962185 100644 --- a/Test/baseResults/hlsl.array.multidim.frag.out +++ b/Test/baseResults/hlsl.array.multidim.frag.out @@ -134,7 +134,7 @@ gl_FragCoord origin is upper left 0:? '@entryPointOutput.Color' (layout( location=0) out 4-component vector of float) // Module Version 10000 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 57 Capability Shader diff --git a/Test/baseResults/hlsl.assoc.frag.out b/Test/baseResults/hlsl.assoc.frag.out index 69a631e018..018da847c0 100644 --- a/Test/baseResults/hlsl.assoc.frag.out +++ b/Test/baseResults/hlsl.assoc.frag.out @@ -132,7 +132,7 @@ gl_FragCoord origin is upper left 0:? 'a5' (layout( location=4) in 4-component vector of float) // Module Version 10000 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 58 Capability Shader diff --git a/Test/baseResults/hlsl.attribute.expression.comp.out b/Test/baseResults/hlsl.attribute.expression.comp.out index 90c17402fe..ee183c8d52 100644 --- a/Test/baseResults/hlsl.attribute.expression.comp.out +++ b/Test/baseResults/hlsl.attribute.expression.comp.out @@ -64,7 +64,7 @@ local_size = (4, 6, 8) 0:? 'anon@0' (layout( row_major std140) uniform block{ uniform int bound}) // Module Version 10000 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 30 Capability Shader diff --git a/Test/baseResults/hlsl.attribute.frag.out b/Test/baseResults/hlsl.attribute.frag.out index 0d1f709ba2..cdc3471605 100644 --- a/Test/baseResults/hlsl.attribute.frag.out +++ b/Test/baseResults/hlsl.attribute.frag.out @@ -50,7 +50,7 @@ gl_FragCoord origin is upper left 0:? 'input' (layout( location=0) in 4-component vector of float) // Module Version 10000 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 24 Capability Shader diff --git a/Test/baseResults/hlsl.attributeC11.frag.out b/Test/baseResults/hlsl.attributeC11.frag.out index 1b651a3b1c..c97c300a6c 100644 --- a/Test/baseResults/hlsl.attributeC11.frag.out +++ b/Test/baseResults/hlsl.attributeC11.frag.out @@ -95,7 +95,7 @@ gl_FragCoord origin is upper left Validation failed // Module Version 10000 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 51 Capability Shader diff --git a/Test/baseResults/hlsl.attributeGlobalBuffer.frag.out b/Test/baseResults/hlsl.attributeGlobalBuffer.frag.out index 244fe7d9eb..4726ddd0fc 100644 --- a/Test/baseResults/hlsl.attributeGlobalBuffer.frag.out +++ b/Test/baseResults/hlsl.attributeGlobalBuffer.frag.out @@ -56,7 +56,7 @@ gl_FragCoord origin is upper left 0:? '@entryPointOutput' (layout( location=0) out 4-component vector of float) // Module Version 10000 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 28 Capability Shader diff --git a/Test/baseResults/hlsl.autosampledtextures.frag.out b/Test/baseResults/hlsl.autosampledtextures.frag.out index 559c1306a2..070af8238c 100644 --- a/Test/baseResults/hlsl.autosampledtextures.frag.out +++ b/Test/baseResults/hlsl.autosampledtextures.frag.out @@ -1,6 +1,6 @@ hlsl.autosampledtextures.frag // Module Version 10000 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 45 Capability Shader diff --git a/Test/baseResults/hlsl.basic.comp.out b/Test/baseResults/hlsl.basic.comp.out index d71429cfe4..7b02d252da 100644 --- a/Test/baseResults/hlsl.basic.comp.out +++ b/Test/baseResults/hlsl.basic.comp.out @@ -64,7 +64,7 @@ local_size = (1, 1, 1) 0:? 'gti' ( in 3-component vector of int LocalInvocationID) // Module Version 10000 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 38 Capability Shader diff --git a/Test/baseResults/hlsl.basic.geom.out b/Test/baseResults/hlsl.basic.geom.out index 6dea921566..ef2b5ada81 100644 --- a/Test/baseResults/hlsl.basic.geom.out +++ b/Test/baseResults/hlsl.basic.geom.out @@ -188,7 +188,7 @@ output primitive = line_strip 0:? 'OutputStream.something' (layout( location=1) out int) // Module Version 10000 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 68 Capability Geometry diff --git a/Test/baseResults/hlsl.boolConv.vert.out b/Test/baseResults/hlsl.boolConv.vert.out index 6a8e516427..c4e3beb82a 100644 --- a/Test/baseResults/hlsl.boolConv.vert.out +++ b/Test/baseResults/hlsl.boolConv.vert.out @@ -204,7 +204,7 @@ Shader version: 500 0:? '@entryPointOutput' ( out 4-component vector of float Position) // Module Version 10000 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 99 Capability Shader diff --git a/Test/baseResults/hlsl.buffer.frag.out b/Test/baseResults/hlsl.buffer.frag.out index 04a783c310..f95b8398c9 100644 --- a/Test/baseResults/hlsl.buffer.frag.out +++ b/Test/baseResults/hlsl.buffer.frag.out @@ -147,7 +147,7 @@ gl_FragCoord origin is upper left Validation failed // Module Version 10000 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 73 Capability Shader diff --git a/Test/baseResults/hlsl.buffer_ref_parameter.comp.out b/Test/baseResults/hlsl.buffer_ref_parameter.comp.out new file mode 100644 index 0000000000..4ddf6f706e --- /dev/null +++ b/Test/baseResults/hlsl.buffer_ref_parameter.comp.out @@ -0,0 +1,390 @@ +hlsl.buffer_ref_parameter.comp +Shader version: 500 +local_size = (64, 1, 1) +0:? Sequence +0:4 Function Definition: pull_position(block--u1[0]1;u1; ( temp 3-component vector of float) +0:4 Function Parameters: +0:4 'buffer_position' (layout( row_major std430) readonly buffer block{layout( row_major std430) buffer unsized 1-element array of uint @data}) +0:4 'vertex_id' ( in uint) +0:? Sequence +0:5 Branch: Return with expression +0:? intBitsToFloat ( temp 3-component vector of float) +0:? Sequence +0:5 move second child to first child ( temp int) +0:5 'byteAddrTemp' ( temp int) +0:5 right-shift ( temp int) +0:5 component-wise multiply ( temp uint) +0:5 component-wise multiply ( temp uint) +0:5 'vertex_id' ( in uint) +0:5 Constant: +0:5 3 (const uint) +0:5 Constant: +0:5 4 (const uint) +0:5 Constant: +0:5 2 (const int) +0:? Construct vec3 ( temp 3-component vector of uint) +0:5 indirect index ( temp uint) +0:5 @data: direct index for structure (layout( row_major std430) buffer unsized 1-element array of uint) +0:5 'buffer_position' (layout( row_major std430) readonly buffer block{layout( row_major std430) buffer unsized 1-element array of uint @data}) +0:5 Constant: +0:5 0 (const uint) +0:5 'byteAddrTemp' ( temp int) +0:5 indirect index ( temp uint) +0:5 @data: direct index for structure (layout( row_major std430) buffer unsized 1-element array of uint) +0:5 'buffer_position' (layout( row_major std430) readonly buffer block{layout( row_major std430) buffer unsized 1-element array of uint @data}) +0:5 Constant: +0:5 0 (const uint) +0:5 add ( temp int) +0:5 'byteAddrTemp' ( temp int) +0:5 Constant: +0:5 1 (const int) +0:5 indirect index ( temp uint) +0:5 @data: direct index for structure (layout( row_major std430) buffer unsized 1-element array of uint) +0:5 'buffer_position' (layout( row_major std430) readonly buffer block{layout( row_major std430) buffer unsized 1-element array of uint @data}) +0:5 Constant: +0:5 0 (const uint) +0:5 add ( temp int) +0:5 'byteAddrTemp' ( temp int) +0:5 Constant: +0:5 2 (const int) +0:9 Function Definition: @main(u1; ( temp void) +0:9 Function Parameters: +0:9 'gi' ( in uint) +0:? Sequence +0:10 Sequence +0:10 move second child to first child ( temp 3-component vector of float) +0:10 'position_ms' ( temp 3-component vector of float) +0:10 Function Call: pull_position(block--u1[0]1;u1; ( temp 3-component vector of float) +0:10 'buffer_position_ms' (layout( set=0 binding=0 row_major std430) readonly buffer block{layout( row_major std430) buffer unsized 1-element array of uint @data}) +0:10 'gi' ( in uint) +0:? Sequence +0:12 move second child to first child ( temp int) +0:12 'byteAddrTemp' ( temp int) +0:12 right-shift ( temp int) +0:12 Constant: +0:12 0 (const int) +0:12 Constant: +0:12 2 (const int) +0:12 move second child to first child ( temp uint) +0:12 indirect index (layout( row_major std430) buffer uint) +0:12 @data: direct index for structure (layout( row_major std430) buffer unsized 1-element array of uint) +0:12 'r' (layout( set=0 binding=1 row_major std430) buffer block{layout( row_major std430) buffer unsized 1-element array of uint @data}) +0:12 Constant: +0:12 0 (const uint) +0:12 'byteAddrTemp' ( temp int) +0:12 direct index ( temp uint) +0:12 floatBitsToUint ( temp 3-component vector of uint) +0:12 'position_ms' ( temp 3-component vector of float) +0:12 Constant: +0:12 0 (const int) +0:12 move second child to first child ( temp uint) +0:12 indirect index (layout( row_major std430) buffer uint) +0:12 @data: direct index for structure (layout( row_major std430) buffer unsized 1-element array of uint) +0:12 'r' (layout( set=0 binding=1 row_major std430) buffer block{layout( row_major std430) buffer unsized 1-element array of uint @data}) +0:12 Constant: +0:12 0 (const uint) +0:12 add ( temp int) +0:12 'byteAddrTemp' ( temp int) +0:12 Constant: +0:12 1 (const int) +0:12 direct index ( temp uint) +0:12 floatBitsToUint ( temp 3-component vector of uint) +0:12 'position_ms' ( temp 3-component vector of float) +0:12 Constant: +0:12 1 (const int) +0:12 move second child to first child ( temp uint) +0:12 indirect index (layout( row_major std430) buffer uint) +0:12 @data: direct index for structure (layout( row_major std430) buffer unsized 1-element array of uint) +0:12 'r' (layout( set=0 binding=1 row_major std430) buffer block{layout( row_major std430) buffer unsized 1-element array of uint @data}) +0:12 Constant: +0:12 0 (const uint) +0:12 add ( temp int) +0:12 'byteAddrTemp' ( temp int) +0:12 Constant: +0:12 2 (const int) +0:12 direct index ( temp uint) +0:12 floatBitsToUint ( temp 3-component vector of uint) +0:12 'position_ms' ( temp 3-component vector of float) +0:12 Constant: +0:12 2 (const int) +0:9 Function Definition: main( ( temp void) +0:9 Function Parameters: +0:? Sequence +0:9 move second child to first child ( temp uint) +0:? 'gi' ( temp uint) +0:? 'gi' ( in uint LocalInvocationIndex) +0:9 Function Call: @main(u1; ( temp void) +0:? 'gi' ( temp uint) +0:? Linker Objects +0:? 'buffer_position_ms' (layout( set=0 binding=0 row_major std430) readonly buffer block{layout( row_major std430) buffer unsized 1-element array of uint @data}) +0:? 'r' (layout( set=0 binding=1 row_major std430) buffer block{layout( row_major std430) buffer unsized 1-element array of uint @data}) +0:? 'gi' ( in uint LocalInvocationIndex) + + +Linked compute stage: + + +Shader version: 500 +local_size = (64, 1, 1) +0:? Sequence +0:4 Function Definition: pull_position(block--u1[0]1;u1; ( temp 3-component vector of float) +0:4 Function Parameters: +0:4 'buffer_position' (layout( row_major std430) readonly buffer block{layout( row_major std430) buffer unsized 1-element array of uint @data}) +0:4 'vertex_id' ( in uint) +0:? Sequence +0:5 Branch: Return with expression +0:? intBitsToFloat ( temp 3-component vector of float) +0:? Sequence +0:5 move second child to first child ( temp int) +0:5 'byteAddrTemp' ( temp int) +0:5 right-shift ( temp int) +0:5 component-wise multiply ( temp uint) +0:5 component-wise multiply ( temp uint) +0:5 'vertex_id' ( in uint) +0:5 Constant: +0:5 3 (const uint) +0:5 Constant: +0:5 4 (const uint) +0:5 Constant: +0:5 2 (const int) +0:? Construct vec3 ( temp 3-component vector of uint) +0:5 indirect index ( temp uint) +0:5 @data: direct index for structure (layout( row_major std430) buffer unsized 1-element array of uint) +0:5 'buffer_position' (layout( row_major std430) readonly buffer block{layout( row_major std430) buffer unsized 1-element array of uint @data}) +0:5 Constant: +0:5 0 (const uint) +0:5 'byteAddrTemp' ( temp int) +0:5 indirect index ( temp uint) +0:5 @data: direct index for structure (layout( row_major std430) buffer unsized 1-element array of uint) +0:5 'buffer_position' (layout( row_major std430) readonly buffer block{layout( row_major std430) buffer unsized 1-element array of uint @data}) +0:5 Constant: +0:5 0 (const uint) +0:5 add ( temp int) +0:5 'byteAddrTemp' ( temp int) +0:5 Constant: +0:5 1 (const int) +0:5 indirect index ( temp uint) +0:5 @data: direct index for structure (layout( row_major std430) buffer unsized 1-element array of uint) +0:5 'buffer_position' (layout( row_major std430) readonly buffer block{layout( row_major std430) buffer unsized 1-element array of uint @data}) +0:5 Constant: +0:5 0 (const uint) +0:5 add ( temp int) +0:5 'byteAddrTemp' ( temp int) +0:5 Constant: +0:5 2 (const int) +0:9 Function Definition: @main(u1; ( temp void) +0:9 Function Parameters: +0:9 'gi' ( in uint) +0:? Sequence +0:10 Sequence +0:10 move second child to first child ( temp 3-component vector of float) +0:10 'position_ms' ( temp 3-component vector of float) +0:10 Function Call: pull_position(block--u1[0]1;u1; ( temp 3-component vector of float) +0:10 'buffer_position_ms' (layout( set=0 binding=0 row_major std430) readonly buffer block{layout( row_major std430) buffer unsized 1-element array of uint @data}) +0:10 'gi' ( in uint) +0:? Sequence +0:12 move second child to first child ( temp int) +0:12 'byteAddrTemp' ( temp int) +0:12 right-shift ( temp int) +0:12 Constant: +0:12 0 (const int) +0:12 Constant: +0:12 2 (const int) +0:12 move second child to first child ( temp uint) +0:12 indirect index (layout( row_major std430) buffer uint) +0:12 @data: direct index for structure (layout( row_major std430) buffer unsized 1-element array of uint) +0:12 'r' (layout( set=0 binding=1 row_major std430) buffer block{layout( row_major std430) buffer unsized 1-element array of uint @data}) +0:12 Constant: +0:12 0 (const uint) +0:12 'byteAddrTemp' ( temp int) +0:12 direct index ( temp uint) +0:12 floatBitsToUint ( temp 3-component vector of uint) +0:12 'position_ms' ( temp 3-component vector of float) +0:12 Constant: +0:12 0 (const int) +0:12 move second child to first child ( temp uint) +0:12 indirect index (layout( row_major std430) buffer uint) +0:12 @data: direct index for structure (layout( row_major std430) buffer unsized 1-element array of uint) +0:12 'r' (layout( set=0 binding=1 row_major std430) buffer block{layout( row_major std430) buffer unsized 1-element array of uint @data}) +0:12 Constant: +0:12 0 (const uint) +0:12 add ( temp int) +0:12 'byteAddrTemp' ( temp int) +0:12 Constant: +0:12 1 (const int) +0:12 direct index ( temp uint) +0:12 floatBitsToUint ( temp 3-component vector of uint) +0:12 'position_ms' ( temp 3-component vector of float) +0:12 Constant: +0:12 1 (const int) +0:12 move second child to first child ( temp uint) +0:12 indirect index (layout( row_major std430) buffer uint) +0:12 @data: direct index for structure (layout( row_major std430) buffer unsized 1-element array of uint) +0:12 'r' (layout( set=0 binding=1 row_major std430) buffer block{layout( row_major std430) buffer unsized 1-element array of uint @data}) +0:12 Constant: +0:12 0 (const uint) +0:12 add ( temp int) +0:12 'byteAddrTemp' ( temp int) +0:12 Constant: +0:12 2 (const int) +0:12 direct index ( temp uint) +0:12 floatBitsToUint ( temp 3-component vector of uint) +0:12 'position_ms' ( temp 3-component vector of float) +0:12 Constant: +0:12 2 (const int) +0:9 Function Definition: main( ( temp void) +0:9 Function Parameters: +0:? Sequence +0:9 move second child to first child ( temp uint) +0:? 'gi' ( temp uint) +0:? 'gi' ( in uint LocalInvocationIndex) +0:9 Function Call: @main(u1; ( temp void) +0:? 'gi' ( temp uint) +0:? Linker Objects +0:? 'buffer_position_ms' (layout( set=0 binding=0 row_major std430) readonly buffer block{layout( row_major std430) buffer unsized 1-element array of uint @data}) +0:? 'r' (layout( set=0 binding=1 row_major std430) buffer block{layout( row_major std430) buffer unsized 1-element array of uint @data}) +0:? 'gi' ( in uint LocalInvocationIndex) + +// Module Version 10400 +// Generated by (magic number): 8000b +// Id's are bound by 90 + + Capability Shader + 1: ExtInstImport "GLSL.std.450" + MemoryModel Logical GLSL450 + EntryPoint GLCompute 4 "main" 53 62 85 + ExecutionMode 4 LocalSize 64 1 1 + Source HLSL 500 + Name 4 "main" + Name 8 "" + MemberName 8 0 "@data" + Name 16 "pull_position(block--u1[0]1;u1;" + Name 14 "buffer_position" + Name 15 "vertex_id" + Name 20 "@main(u1;" + Name 19 "gi" + Name 24 "byteAddrTemp" + Name 52 "position_ms" + Name 53 "buffer_position_ms" + Name 54 "param" + Name 57 "byteAddrTemp" + Name 60 "r" + MemberName 60(r) 0 "@data" + Name 62 "r" + Name 83 "gi" + Name 85 "gi" + Name 87 "param" + Decorate 7 ArrayStride 4 + 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) Binding 0 + Decorate 59 ArrayStride 4 + MemberDecorate 60(r) 0 Offset 0 + Decorate 60(r) Block + Decorate 62(r) DescriptorSet 0 + Decorate 62(r) Binding 1 + Decorate 85(gi) BuiltIn LocalInvocationIndex + 2: TypeVoid + 3: TypeFunction 2 + 6: TypeInt 32 0 + 7: TypeRuntimeArray 6(int) + 8: TypeStruct 7 + 9: TypePointer StorageBuffer 8(struct) + 10: TypePointer Function 6(int) + 11: TypeFloat 32 + 12: TypeVector 11(float) 3 + 13: TypeFunction 12(fvec3) 9(ptr) 10(ptr) + 18: TypeFunction 2 10(ptr) + 22: TypeInt 32 1 + 23: TypePointer Function 22(int) + 26: 6(int) Constant 3 + 28: 6(int) Constant 4 + 30: 22(int) Constant 2 + 32: 22(int) Constant 0 + 34: TypePointer StorageBuffer 6(int) + 38: 22(int) Constant 1 + 46: TypeVector 6(int) 3 + 51: TypePointer Function 12(fvec3) +53(buffer_position_ms): 9(ptr) Variable StorageBuffer + 59: TypeRuntimeArray 6(int) + 60(r): TypeStruct 59 + 61: TypePointer StorageBuffer 60(r) + 62(r): 61(ptr) Variable StorageBuffer + 66: 6(int) Constant 0 + 73: 6(int) Constant 1 + 80: 6(int) Constant 2 + 84: TypePointer Input 6(int) + 85(gi): 84(ptr) Variable Input + 4(main): 2 Function None 3 + 5: Label + 83(gi): 10(ptr) Variable Function + 87(param): 10(ptr) Variable Function + 86: 6(int) Load 85(gi) + Store 83(gi) 86 + 88: 6(int) Load 83(gi) + Store 87(param) 88 + 89: 2 FunctionCall 20(@main(u1;) 87(param) + Return + FunctionEnd +16(pull_position(block--u1[0]1;u1;): 12(fvec3) Function None 13 +14(buffer_position): 9(ptr) FunctionParameter + 15(vertex_id): 10(ptr) FunctionParameter + 17: Label +24(byteAddrTemp): 23(ptr) Variable Function + 25: 6(int) Load 15(vertex_id) + 27: 6(int) IMul 25 26 + 29: 6(int) IMul 27 28 + 31: 22(int) ShiftRightLogical 29 30 + Store 24(byteAddrTemp) 31 + 33: 22(int) Load 24(byteAddrTemp) + 35: 34(ptr) AccessChain 14(buffer_position) 32 33 + 36: 6(int) Load 35 + 37: 22(int) Load 24(byteAddrTemp) + 39: 22(int) IAdd 37 38 + 40: 34(ptr) AccessChain 14(buffer_position) 32 39 + 41: 6(int) Load 40 + 42: 22(int) Load 24(byteAddrTemp) + 43: 22(int) IAdd 42 30 + 44: 34(ptr) AccessChain 14(buffer_position) 32 43 + 45: 6(int) Load 44 + 47: 46(ivec3) CompositeConstruct 36 41 45 + 48: 12(fvec3) Bitcast 47 + ReturnValue 48 + FunctionEnd + 20(@main(u1;): 2 Function None 18 + 19(gi): 10(ptr) FunctionParameter + 21: Label + 52(position_ms): 51(ptr) Variable Function + 54(param): 10(ptr) Variable Function +57(byteAddrTemp): 23(ptr) Variable Function + 55: 6(int) Load 19(gi) + Store 54(param) 55 + 56: 12(fvec3) FunctionCall 16(pull_position(block--u1[0]1;u1;) 53(buffer_position_ms) 54(param) + Store 52(position_ms) 56 + 58: 22(int) ShiftRightArithmetic 32 30 + Store 57(byteAddrTemp) 58 + 63: 22(int) Load 57(byteAddrTemp) + 64: 12(fvec3) Load 52(position_ms) + 65: 46(ivec3) Bitcast 64 + 67: 6(int) CompositeExtract 65 0 + 68: 34(ptr) AccessChain 62(r) 32 63 + Store 68 67 + 69: 22(int) Load 57(byteAddrTemp) + 70: 22(int) IAdd 69 38 + 71: 12(fvec3) Load 52(position_ms) + 72: 46(ivec3) Bitcast 71 + 74: 6(int) CompositeExtract 72 1 + 75: 34(ptr) AccessChain 62(r) 32 70 + Store 75 74 + 76: 22(int) Load 57(byteAddrTemp) + 77: 22(int) IAdd 76 30 + 78: 12(fvec3) Load 52(position_ms) + 79: 46(ivec3) Bitcast 78 + 81: 6(int) CompositeExtract 79 2 + 82: 34(ptr) AccessChain 62(r) 32 77 + Store 82 81 + Return + FunctionEnd diff --git a/Test/baseResults/hlsl.calculatelod.dx10.frag.out b/Test/baseResults/hlsl.calculatelod.dx10.frag.out index d4367a0956..7d896ceafa 100644 --- a/Test/baseResults/hlsl.calculatelod.dx10.frag.out +++ b/Test/baseResults/hlsl.calculatelod.dx10.frag.out @@ -358,7 +358,7 @@ using depth_any 0:? '@entryPointOutput.Color' (layout( location=0) out 4-component vector of float) // Module Version 10000 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 148 Capability Shader diff --git a/Test/baseResults/hlsl.calculatelodunclamped.dx10.frag.out b/Test/baseResults/hlsl.calculatelodunclamped.dx10.frag.out index 8a4be02d70..3ce857d9a9 100644 --- a/Test/baseResults/hlsl.calculatelodunclamped.dx10.frag.out +++ b/Test/baseResults/hlsl.calculatelodunclamped.dx10.frag.out @@ -358,7 +358,7 @@ using depth_any 0:? '@entryPointOutput.Color' (layout( location=0) out 4-component vector of float) // Module Version 10000 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 148 Capability Shader diff --git a/Test/baseResults/hlsl.cast.frag.out b/Test/baseResults/hlsl.cast.frag.out index 3efbd5287f..ef3957c024 100644 --- a/Test/baseResults/hlsl.cast.frag.out +++ b/Test/baseResults/hlsl.cast.frag.out @@ -70,7 +70,7 @@ gl_FragCoord origin is upper left 0:? 'input' (layout( location=0) in 4-component vector of float) // Module Version 10000 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 34 Capability Shader diff --git a/Test/baseResults/hlsl.cbuffer-identifier.vert.out b/Test/baseResults/hlsl.cbuffer-identifier.vert.out index 93f35d628c..de9deea711 100644 --- a/Test/baseResults/hlsl.cbuffer-identifier.vert.out +++ b/Test/baseResults/hlsl.cbuffer-identifier.vert.out @@ -250,7 +250,7 @@ Shader version: 500 0:? 'input.Norm' (layout( location=1) in 3-component vector of float) // Module Version 10000 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 93 Capability Shader diff --git a/Test/baseResults/hlsl.charLit.vert.out b/Test/baseResults/hlsl.charLit.vert.out index 2151d43ce1..6bde478830 100644 --- a/Test/baseResults/hlsl.charLit.vert.out +++ b/Test/baseResults/hlsl.charLit.vert.out @@ -146,7 +146,7 @@ Shader version: 500 0:? '@entryPointOutput' ( out 4-component vector of float Position) // Module Version 10000 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 58 Capability Shader diff --git a/Test/baseResults/hlsl.clip.frag.out b/Test/baseResults/hlsl.clip.frag.out index 691b20ba8b..32cbb8bb8c 100644 --- a/Test/baseResults/hlsl.clip.frag.out +++ b/Test/baseResults/hlsl.clip.frag.out @@ -74,7 +74,7 @@ gl_FragCoord origin is upper left 0:? '@entryPointOutput' (layout( location=0) out 4-component vector of float) // Module Version 10000 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 30 Capability Shader diff --git a/Test/baseResults/hlsl.clipdistance-1.frag.out b/Test/baseResults/hlsl.clipdistance-1.frag.out index 0cfee39c83..2a8d8c9e01 100644 --- a/Test/baseResults/hlsl.clipdistance-1.frag.out +++ b/Test/baseResults/hlsl.clipdistance-1.frag.out @@ -98,7 +98,7 @@ gl_FragCoord origin is upper left 0:? 'cull' ( in 1-element array of float CullDistance) // Module Version 10000 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 53 Capability Shader diff --git a/Test/baseResults/hlsl.clipdistance-1.geom.out b/Test/baseResults/hlsl.clipdistance-1.geom.out index a9a0b82a06..744b192ab0 100644 --- a/Test/baseResults/hlsl.clipdistance-1.geom.out +++ b/Test/baseResults/hlsl.clipdistance-1.geom.out @@ -550,7 +550,7 @@ output primitive = line_strip 0:? 'OutputStream.clip' ( out 2-element array of float ClipDistance) // Module Version 10000 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 118 Capability Geometry diff --git a/Test/baseResults/hlsl.clipdistance-1.vert.out b/Test/baseResults/hlsl.clipdistance-1.vert.out index 41478e161e..38d956fd3e 100644 --- a/Test/baseResults/hlsl.clipdistance-1.vert.out +++ b/Test/baseResults/hlsl.clipdistance-1.vert.out @@ -108,7 +108,7 @@ Shader version: 500 0:? 'cull' ( out 1-element array of float CullDistance) // Module Version 10000 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 46 Capability Shader diff --git a/Test/baseResults/hlsl.clipdistance-2.frag.out b/Test/baseResults/hlsl.clipdistance-2.frag.out index 15a9512ad6..6725955abf 100644 --- a/Test/baseResults/hlsl.clipdistance-2.frag.out +++ b/Test/baseResults/hlsl.clipdistance-2.frag.out @@ -290,7 +290,7 @@ gl_FragCoord origin is upper left 0:? 'cull' ( in 4-element array of float CullDistance) // Module Version 10000 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 84 Capability Shader diff --git a/Test/baseResults/hlsl.clipdistance-2.geom.out b/Test/baseResults/hlsl.clipdistance-2.geom.out index bb8d1373e3..11d5b67dd2 100644 --- a/Test/baseResults/hlsl.clipdistance-2.geom.out +++ b/Test/baseResults/hlsl.clipdistance-2.geom.out @@ -724,7 +724,7 @@ output primitive = line_strip 0:? 'OutputStream.clip' ( out 4-element array of float ClipDistance) // Module Version 10000 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 128 Capability Geometry diff --git a/Test/baseResults/hlsl.clipdistance-2.vert.out b/Test/baseResults/hlsl.clipdistance-2.vert.out index 5ccbb1e92e..3778ddd5ad 100644 --- a/Test/baseResults/hlsl.clipdistance-2.vert.out +++ b/Test/baseResults/hlsl.clipdistance-2.vert.out @@ -420,7 +420,7 @@ Shader version: 500 0:? 'cull' ( out 4-element array of float CullDistance) // Module Version 10000 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 89 Capability Shader diff --git a/Test/baseResults/hlsl.clipdistance-3.frag.out b/Test/baseResults/hlsl.clipdistance-3.frag.out index 1d9f54e8f9..76525ddf85 100644 --- a/Test/baseResults/hlsl.clipdistance-3.frag.out +++ b/Test/baseResults/hlsl.clipdistance-3.frag.out @@ -98,7 +98,7 @@ gl_FragCoord origin is upper left 0:? 'cull' ( in 2-element array of float CullDistance) // Module Version 10000 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 53 Capability Shader diff --git a/Test/baseResults/hlsl.clipdistance-3.geom.out b/Test/baseResults/hlsl.clipdistance-3.geom.out index 5fa7df7202..42ce516a31 100644 --- a/Test/baseResults/hlsl.clipdistance-3.geom.out +++ b/Test/baseResults/hlsl.clipdistance-3.geom.out @@ -630,7 +630,7 @@ output primitive = line_strip 0:? 'OutputStream.clip1' ( out 4-element array of float ClipDistance) // Module Version 10000 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 127 Capability Geometry diff --git a/Test/baseResults/hlsl.clipdistance-3.vert.out b/Test/baseResults/hlsl.clipdistance-3.vert.out index 1882a5a3a2..9cebfc5b5e 100644 --- a/Test/baseResults/hlsl.clipdistance-3.vert.out +++ b/Test/baseResults/hlsl.clipdistance-3.vert.out @@ -136,7 +136,7 @@ Shader version: 500 0:? 'cull' ( out 2-element array of float CullDistance) // Module Version 10000 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 51 Capability Shader diff --git a/Test/baseResults/hlsl.clipdistance-4.frag.out b/Test/baseResults/hlsl.clipdistance-4.frag.out index 5cef56444b..f801eb2c0d 100644 --- a/Test/baseResults/hlsl.clipdistance-4.frag.out +++ b/Test/baseResults/hlsl.clipdistance-4.frag.out @@ -174,7 +174,7 @@ gl_FragCoord origin is upper left 0:? 'v.ClipRect' ( in 4-element array of float ClipDistance) // Module Version 10000 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 57 Capability Shader diff --git a/Test/baseResults/hlsl.clipdistance-4.geom.out b/Test/baseResults/hlsl.clipdistance-4.geom.out index e94230169f..8dbe89ad2f 100644 --- a/Test/baseResults/hlsl.clipdistance-4.geom.out +++ b/Test/baseResults/hlsl.clipdistance-4.geom.out @@ -612,7 +612,7 @@ output primitive = line_strip 0:? 'OutputStream.clip1' ( out 4-element array of float ClipDistance) // Module Version 10000 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 130 Capability Geometry diff --git a/Test/baseResults/hlsl.clipdistance-4.vert.out b/Test/baseResults/hlsl.clipdistance-4.vert.out index 8e8fe6da28..4c291a1f50 100644 --- a/Test/baseResults/hlsl.clipdistance-4.vert.out +++ b/Test/baseResults/hlsl.clipdistance-4.vert.out @@ -270,7 +270,7 @@ Shader version: 500 0:? '@entryPointOutput.ClipRect' ( out 4-element array of float ClipDistance) // Module Version 10000 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 72 Capability Shader diff --git a/Test/baseResults/hlsl.clipdistance-5.frag.out b/Test/baseResults/hlsl.clipdistance-5.frag.out index ab366e54af..9d9042d210 100644 --- a/Test/baseResults/hlsl.clipdistance-5.frag.out +++ b/Test/baseResults/hlsl.clipdistance-5.frag.out @@ -232,7 +232,7 @@ gl_FragCoord origin is upper left 0:? 'v.ClipRect' ( in 4-element array of float ClipDistance) // Module Version 10000 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 62 Capability Shader diff --git a/Test/baseResults/hlsl.clipdistance-5.vert.out b/Test/baseResults/hlsl.clipdistance-5.vert.out index 6dbe0a669e..deb6ad884a 100644 --- a/Test/baseResults/hlsl.clipdistance-5.vert.out +++ b/Test/baseResults/hlsl.clipdistance-5.vert.out @@ -318,7 +318,7 @@ Shader version: 500 0:? '@entryPointOutput.ClipRect' ( out 4-element array of float ClipDistance) // Module Version 10000 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 73 Capability Shader diff --git a/Test/baseResults/hlsl.clipdistance-6.frag.out b/Test/baseResults/hlsl.clipdistance-6.frag.out index 770f990b8e..99798d320c 100644 --- a/Test/baseResults/hlsl.clipdistance-6.frag.out +++ b/Test/baseResults/hlsl.clipdistance-6.frag.out @@ -282,7 +282,7 @@ gl_FragCoord origin is upper left 0:? 'v.clip1' ( in 8-element array of float ClipDistance) // Module Version 10000 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 79 Capability Shader diff --git a/Test/baseResults/hlsl.clipdistance-6.vert.out b/Test/baseResults/hlsl.clipdistance-6.vert.out index 1adbdfcadc..389f867111 100644 --- a/Test/baseResults/hlsl.clipdistance-6.vert.out +++ b/Test/baseResults/hlsl.clipdistance-6.vert.out @@ -428,7 +428,7 @@ Shader version: 500 0:? '@entryPointOutput.clip1' ( out 8-element array of float ClipDistance) // Module Version 10000 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 86 Capability Shader diff --git a/Test/baseResults/hlsl.clipdistance-7.frag.out b/Test/baseResults/hlsl.clipdistance-7.frag.out index 9f5e5193d4..9b8c655ded 100644 --- a/Test/baseResults/hlsl.clipdistance-7.frag.out +++ b/Test/baseResults/hlsl.clipdistance-7.frag.out @@ -270,7 +270,7 @@ gl_FragCoord origin is upper left 0:? 'v.clip1' ( in 8-element array of float ClipDistance) // Module Version 10000 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 78 Capability Shader diff --git a/Test/baseResults/hlsl.clipdistance-7.vert.out b/Test/baseResults/hlsl.clipdistance-7.vert.out index 13bc844b0b..55a16c11b1 100644 --- a/Test/baseResults/hlsl.clipdistance-7.vert.out +++ b/Test/baseResults/hlsl.clipdistance-7.vert.out @@ -384,7 +384,7 @@ Shader version: 500 0:? '@entryPointOutput.clip1' ( out 8-element array of float ClipDistance) // Module Version 10000 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 81 Capability Shader diff --git a/Test/baseResults/hlsl.clipdistance-8.frag.out b/Test/baseResults/hlsl.clipdistance-8.frag.out index 8f2a9c27fb..ed82cfdef0 100644 --- a/Test/baseResults/hlsl.clipdistance-8.frag.out +++ b/Test/baseResults/hlsl.clipdistance-8.frag.out @@ -186,7 +186,7 @@ gl_FragCoord origin is upper left 0:? 'v.clip1' ( in 4-element array of float ClipDistance) // Module Version 10000 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 65 Capability Shader diff --git a/Test/baseResults/hlsl.clipdistance-8.vert.out b/Test/baseResults/hlsl.clipdistance-8.vert.out index fbc2c2a5ad..9df6618988 100644 --- a/Test/baseResults/hlsl.clipdistance-8.vert.out +++ b/Test/baseResults/hlsl.clipdistance-8.vert.out @@ -240,7 +240,7 @@ Shader version: 500 0:? '@entryPointOutput.clip1' ( out 4-element array of float ClipDistance) // Module Version 10000 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 62 Capability Shader diff --git a/Test/baseResults/hlsl.clipdistance-9.frag.out b/Test/baseResults/hlsl.clipdistance-9.frag.out index b42727f822..9c62b34f54 100644 --- a/Test/baseResults/hlsl.clipdistance-9.frag.out +++ b/Test/baseResults/hlsl.clipdistance-9.frag.out @@ -144,7 +144,7 @@ gl_FragCoord origin is upper left 0:? 'clip0' ( in 4-element array of float ClipDistance) // Module Version 10000 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 68 Capability Shader diff --git a/Test/baseResults/hlsl.clipdistance-9.vert.out b/Test/baseResults/hlsl.clipdistance-9.vert.out index 7df30643ad..4e997c68a0 100644 --- a/Test/baseResults/hlsl.clipdistance-9.vert.out +++ b/Test/baseResults/hlsl.clipdistance-9.vert.out @@ -194,7 +194,7 @@ Shader version: 500 0:? 'clip0' ( out 4-element array of float ClipDistance) // Module Version 10000 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 67 Capability Shader diff --git a/Test/baseResults/hlsl.color.hull.tesc.out b/Test/baseResults/hlsl.color.hull.tesc.out index e3c0a3e665..7a1f830533 100644 --- a/Test/baseResults/hlsl.color.hull.tesc.out +++ b/Test/baseResults/hlsl.color.hull.tesc.out @@ -530,7 +530,7 @@ triangle order = cw 0:? '@patchConstantOutput.inside' ( patch out 2-element array of float TessLevelInner) // Module Version 10000 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 159 Capability Tessellation diff --git a/Test/baseResults/hlsl.comparison.vec.frag.out b/Test/baseResults/hlsl.comparison.vec.frag.out index 9fec433834..720aea24c3 100644 --- a/Test/baseResults/hlsl.comparison.vec.frag.out +++ b/Test/baseResults/hlsl.comparison.vec.frag.out @@ -262,7 +262,7 @@ gl_FragCoord origin is upper left 0:? '@entryPointOutput.Color' (layout( location=0) out 4-component vector of float) // Module Version 10000 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 96 Capability Shader diff --git a/Test/baseResults/hlsl.conditional.frag.out b/Test/baseResults/hlsl.conditional.frag.out index 99f2538c6e..47c7877ac0 100644 --- a/Test/baseResults/hlsl.conditional.frag.out +++ b/Test/baseResults/hlsl.conditional.frag.out @@ -216,33 +216,98 @@ gl_FragCoord origin is upper left 0:39 Convert int to float ( temp float) 0:39 'd' ( temp int) 0:39 'input' ( in 4-component vector of float) -0:41 Branch: Return with expression -0:40 add ( temp 4-component vector of float) -0:40 add ( temp 4-component vector of float) -0:40 add ( temp 4-component vector of float) -0:40 add ( temp 4-component vector of float) -0:40 vector-scale ( temp 4-component vector of float) -0:40 Convert int to float ( temp float) -0:40 'e' ( temp int) -0:40 'ret' ( temp 4-component vector of float) -0:40 'f' ( temp 4-component vector of float) -0:40 Function Call: vectorCond( ( temp 4-component vector of float) -0:40 Function Call: scalarCond( ( temp 4-component vector of float) -0:41 Construct vec4 ( temp 4-component vector of float) -0:41 Function Call: fbSelect(vb2;vf2;vf2; ( temp 2-component vector of float) +0:40 Sequence +0:40 move second child to first child ( temp uint) +0:40 'g' ( temp uint) +0:40 Test condition and select ( temp uint): no shortcircuit +0:40 Condition +0:40 Compare Greater Than ( temp bool) +0:40 Convert int to float ( temp float) +0:40 'd' ( temp int) +0:40 Constant: +0:40 0.000000 +0:40 true case +0:40 Constant: +0:40 21 (const uint) +0:40 false case +0:40 Constant: +0:40 0 (const uint) +0:41 Sequence +0:41 move second child to first child ( temp uint) +0:41 'h' ( temp uint) +0:41 Test condition and select ( temp uint): no shortcircuit +0:41 Condition +0:41 Compare Greater Than ( temp bool) +0:41 Convert uint to float ( temp float) +0:41 'g' ( temp uint) 0:41 Constant: -0:41 true (const bool) -0:41 false (const bool) -0:41 Constant: -0:41 1.000000 -0:41 2.000000 -0:41 Constant: -0:41 3.000000 -0:41 4.000000 +0:41 0.000000 +0:41 true case 0:41 Constant: -0:41 10.000000 +0:41 63 (const uint) +0:41 false case 0:41 Constant: -0:41 10.000000 +0:41 0 (const uint) +0:42 Sequence +0:42 move second child to first child ( temp uint) +0:42 'i' ( temp uint) +0:42 Test condition and select ( temp uint): no shortcircuit +0:42 Condition +0:42 Compare Greater Than ( temp bool) +0:42 Convert uint to float ( temp float) +0:42 'h' ( temp uint) +0:42 Constant: +0:42 0.000000 +0:42 true case +0:42 Constant: +0:42 5 (const uint) +0:42 false case +0:42 Constant: +0:42 1 (const uint) +0:43 Sequence +0:43 move second child to first child ( temp uint) +0:43 'j' ( temp uint) +0:43 Convert int to uint ( temp uint) +0:43 Test condition and select ( temp int): no shortcircuit +0:43 Condition +0:43 Compare Greater Than ( temp bool) +0:43 Convert uint to float ( temp float) +0:43 'i' ( temp uint) +0:43 Constant: +0:43 0.000000 +0:43 true case +0:43 Constant: +0:43 43981 (const int) +0:43 false case +0:43 Constant: +0:43 48346 (const int) +0:45 Branch: Return with expression +0:44 add ( temp 4-component vector of float) +0:44 add ( temp 4-component vector of float) +0:44 add ( temp 4-component vector of float) +0:44 add ( temp 4-component vector of float) +0:44 vector-scale ( temp 4-component vector of float) +0:44 Convert int to float ( temp float) +0:44 'e' ( temp int) +0:44 'ret' ( temp 4-component vector of float) +0:44 'f' ( temp 4-component vector of float) +0:44 Function Call: vectorCond( ( temp 4-component vector of float) +0:44 Function Call: scalarCond( ( temp 4-component vector of float) +0:45 Construct vec4 ( temp 4-component vector of float) +0:45 Function Call: fbSelect(vb2;vf2;vf2; ( temp 2-component vector of float) +0:45 Constant: +0:45 true (const bool) +0:45 false (const bool) +0:45 Constant: +0:45 1.000000 +0:45 2.000000 +0:45 Constant: +0:45 3.000000 +0:45 4.000000 +0:45 Constant: +0:45 10.000000 +0:45 Constant: +0:45 10.000000 0:27 Function Definition: PixelShaderFunction( ( temp void) 0:27 Function Parameters: 0:? Sequence @@ -479,33 +544,98 @@ gl_FragCoord origin is upper left 0:39 Convert int to float ( temp float) 0:39 'd' ( temp int) 0:39 'input' ( in 4-component vector of float) -0:41 Branch: Return with expression -0:40 add ( temp 4-component vector of float) -0:40 add ( temp 4-component vector of float) -0:40 add ( temp 4-component vector of float) -0:40 add ( temp 4-component vector of float) -0:40 vector-scale ( temp 4-component vector of float) -0:40 Convert int to float ( temp float) -0:40 'e' ( temp int) -0:40 'ret' ( temp 4-component vector of float) -0:40 'f' ( temp 4-component vector of float) -0:40 Function Call: vectorCond( ( temp 4-component vector of float) -0:40 Function Call: scalarCond( ( temp 4-component vector of float) -0:41 Construct vec4 ( temp 4-component vector of float) -0:41 Function Call: fbSelect(vb2;vf2;vf2; ( temp 2-component vector of float) -0:41 Constant: -0:41 true (const bool) -0:41 false (const bool) -0:41 Constant: -0:41 1.000000 -0:41 2.000000 +0:40 Sequence +0:40 move second child to first child ( temp uint) +0:40 'g' ( temp uint) +0:40 Test condition and select ( temp uint): no shortcircuit +0:40 Condition +0:40 Compare Greater Than ( temp bool) +0:40 Convert int to float ( temp float) +0:40 'd' ( temp int) +0:40 Constant: +0:40 0.000000 +0:40 true case +0:40 Constant: +0:40 21 (const uint) +0:40 false case +0:40 Constant: +0:40 0 (const uint) +0:41 Sequence +0:41 move second child to first child ( temp uint) +0:41 'h' ( temp uint) +0:41 Test condition and select ( temp uint): no shortcircuit +0:41 Condition +0:41 Compare Greater Than ( temp bool) +0:41 Convert uint to float ( temp float) +0:41 'g' ( temp uint) 0:41 Constant: -0:41 3.000000 -0:41 4.000000 +0:41 0.000000 +0:41 true case 0:41 Constant: -0:41 10.000000 +0:41 63 (const uint) +0:41 false case 0:41 Constant: -0:41 10.000000 +0:41 0 (const uint) +0:42 Sequence +0:42 move second child to first child ( temp uint) +0:42 'i' ( temp uint) +0:42 Test condition and select ( temp uint): no shortcircuit +0:42 Condition +0:42 Compare Greater Than ( temp bool) +0:42 Convert uint to float ( temp float) +0:42 'h' ( temp uint) +0:42 Constant: +0:42 0.000000 +0:42 true case +0:42 Constant: +0:42 5 (const uint) +0:42 false case +0:42 Constant: +0:42 1 (const uint) +0:43 Sequence +0:43 move second child to first child ( temp uint) +0:43 'j' ( temp uint) +0:43 Convert int to uint ( temp uint) +0:43 Test condition and select ( temp int): no shortcircuit +0:43 Condition +0:43 Compare Greater Than ( temp bool) +0:43 Convert uint to float ( temp float) +0:43 'i' ( temp uint) +0:43 Constant: +0:43 0.000000 +0:43 true case +0:43 Constant: +0:43 43981 (const int) +0:43 false case +0:43 Constant: +0:43 48346 (const int) +0:45 Branch: Return with expression +0:44 add ( temp 4-component vector of float) +0:44 add ( temp 4-component vector of float) +0:44 add ( temp 4-component vector of float) +0:44 add ( temp 4-component vector of float) +0:44 vector-scale ( temp 4-component vector of float) +0:44 Convert int to float ( temp float) +0:44 'e' ( temp int) +0:44 'ret' ( temp 4-component vector of float) +0:44 'f' ( temp 4-component vector of float) +0:44 Function Call: vectorCond( ( temp 4-component vector of float) +0:44 Function Call: scalarCond( ( temp 4-component vector of float) +0:45 Construct vec4 ( temp 4-component vector of float) +0:45 Function Call: fbSelect(vb2;vf2;vf2; ( temp 2-component vector of float) +0:45 Constant: +0:45 true (const bool) +0:45 false (const bool) +0:45 Constant: +0:45 1.000000 +0:45 2.000000 +0:45 Constant: +0:45 3.000000 +0:45 4.000000 +0:45 Constant: +0:45 10.000000 +0:45 Constant: +0:45 10.000000 0:27 Function Definition: PixelShaderFunction( ( temp void) 0:27 Function Parameters: 0:? Sequence @@ -522,13 +652,13 @@ gl_FragCoord origin is upper left 0:? 'input' (layout( location=0) in 4-component vector of float) // Module Version 10000 -// Generated by (magic number): 8000a -// Id's are bound by 206 +// Generated by (magic number): 8000b +// Id's are bound by 233 Capability Shader 1: ExtInstImport "GLSL.std.450" MemoryModel Logical GLSL450 - EntryPoint Fragment 4 "PixelShaderFunction" 199 202 + EntryPoint Fragment 4 "PixelShaderFunction" 226 229 ExecutionMode 4 OriginUpperLeft Source HLSL 500 Name 4 "PixelShaderFunction" @@ -555,13 +685,17 @@ gl_FragCoord origin is upper left Name 117 "ret" Name 137 "e" Name 150 "f" - Name 186 "param" - Name 187 "param" - Name 188 "param" - Name 197 "input" - Name 199 "input" - Name 202 "@entryPointOutput" - Name 203 "param" + Name 169 "g" + Name 175 "h" + Name 181 "i" + Name 187 "j" + Name 213 "param" + Name 214 "param" + Name 215 "param" + Name 224 "input" + Name 226 "input" + Name 229 "@entryPointOutput" + Name 230 "param" MemberDecorate 29($Global) 0 Offset 0 MemberDecorate 29($Global) 1 Offset 16 MemberDecorate 29($Global) 2 Offset 32 @@ -570,8 +704,8 @@ gl_FragCoord origin is upper left Decorate 29($Global) Block Decorate 31 DescriptorSet 0 Decorate 31 Binding 0 - Decorate 199(input) Location 0 - Decorate 202(@entryPointOutput) Location 0 + Decorate 226(input) Location 0 + Decorate 229(@entryPointOutput) Location 0 2: TypeVoid 3: TypeFunction 2 6: TypeFloat 32 @@ -611,29 +745,35 @@ gl_FragCoord origin is upper left 148: 32(int) Constant 11 151: TypePointer Function 6(float) 154: 139(int) Constant 1 - 178: 13(bool) ConstantTrue - 179: 13(bool) ConstantFalse - 180: 14(bvec2) ConstantComposite 178 179 - 181: 6(float) Constant 1073741824 - 182: 16(fvec2) ConstantComposite 96 181 - 183: 6(float) Constant 1077936128 - 184: 6(float) Constant 1082130432 - 185: 16(fvec2) ConstantComposite 183 184 - 190: 6(float) Constant 1092616192 - 198: TypePointer Input 7(fvec4) - 199(input): 198(ptr) Variable Input - 201: TypePointer Output 7(fvec4) -202(@entryPointOutput): 201(ptr) Variable Output + 168: TypePointer Function 139(int) + 173: 139(int) Constant 21 + 179: 139(int) Constant 63 + 185: 139(int) Constant 5 + 191: 32(int) Constant 43981 + 192: 32(int) Constant 48346 + 205: 13(bool) ConstantTrue + 206: 13(bool) ConstantFalse + 207: 14(bvec2) ConstantComposite 205 206 + 208: 6(float) Constant 1073741824 + 209: 16(fvec2) ConstantComposite 96 208 + 210: 6(float) Constant 1077936128 + 211: 6(float) Constant 1082130432 + 212: 16(fvec2) ConstantComposite 210 211 + 217: 6(float) Constant 1092616192 + 225: TypePointer Input 7(fvec4) + 226(input): 225(ptr) Variable Input + 228: TypePointer Output 7(fvec4) +229(@entryPointOutput): 228(ptr) Variable Output 4(PixelShaderFunction): 2 Function None 3 5: Label - 197(input): 24(ptr) Variable Function - 203(param): 24(ptr) Variable Function - 200: 7(fvec4) Load 199(input) - Store 197(input) 200 - 204: 7(fvec4) Load 197(input) - Store 203(param) 204 - 205: 7(fvec4) FunctionCall 27(@PixelShaderFunction(vf4;) 203(param) - Store 202(@entryPointOutput) 205 + 224(input): 24(ptr) Variable Function + 230(param): 24(ptr) Variable Function + 227: 7(fvec4) Load 226(input) + Store 224(input) 227 + 231: 7(fvec4) Load 224(input) + Store 230(param) 231 + 232: 7(fvec4) FunctionCall 27(@PixelShaderFunction(vf4;) 230(param) + Store 229(@entryPointOutput) 232 Return FunctionEnd 9(vectorCond(): 7(fvec4) Function None 8 @@ -720,9 +860,13 @@ gl_FragCoord origin is upper left 117(ret): 24(ptr) Variable Function 137(e): 109(ptr) Variable Function 150(f): 24(ptr) Variable Function - 186(param): 15(ptr) Variable Function - 187(param): 17(ptr) Variable Function - 188(param): 17(ptr) Variable Function + 169(g): 168(ptr) Variable Function + 175(h): 168(ptr) Variable Function + 181(i): 168(ptr) Variable Function + 187(j): 168(ptr) Variable Function + 213(param): 15(ptr) Variable Function + 214(param): 17(ptr) Variable Function + 215(param): 17(ptr) Variable Function Store 110(a) 111 Store 112(b) 113 Store 114(c) 115 @@ -776,23 +920,44 @@ gl_FragCoord origin is upper left 166: 43(bvec4) CompositeConstruct 157 157 157 157 167: 7(fvec4) Select 166 161 165 Store 150(f) 167 - 168: 32(int) Load 137(e) - 169: 6(float) ConvertSToF 168 - 170: 7(fvec4) Load 117(ret) - 171: 7(fvec4) VectorTimesScalar 170 169 - 172: 7(fvec4) Load 150(f) - 173: 7(fvec4) FAdd 171 172 - 174: 7(fvec4) FunctionCall 9(vectorCond() - 175: 7(fvec4) FAdd 173 174 - 176: 7(fvec4) FunctionCall 11(scalarCond() - 177: 7(fvec4) FAdd 175 176 - Store 186(param) 180 - Store 187(param) 182 - Store 188(param) 185 - 189: 16(fvec2) FunctionCall 22(fbSelect(vb2;vf2;vf2;) 186(param) 187(param) 188(param) - 191: 6(float) CompositeExtract 189 0 - 192: 6(float) CompositeExtract 189 1 - 193: 7(fvec4) CompositeConstruct 191 192 190 190 - 194: 7(fvec4) FAdd 177 193 - ReturnValue 194 + 170: 32(int) Load 116(d) + 171: 6(float) ConvertSToF 170 + 172: 13(bool) FOrdGreaterThan 171 44 + 174: 139(int) Select 172 173 140 + Store 169(g) 174 + 176: 139(int) Load 169(g) + 177: 6(float) ConvertUToF 176 + 178: 13(bool) FOrdGreaterThan 177 44 + 180: 139(int) Select 178 179 140 + Store 175(h) 180 + 182: 139(int) Load 175(h) + 183: 6(float) ConvertUToF 182 + 184: 13(bool) FOrdGreaterThan 183 44 + 186: 139(int) Select 184 185 154 + Store 181(i) 186 + 188: 139(int) Load 181(i) + 189: 6(float) ConvertUToF 188 + 190: 13(bool) FOrdGreaterThan 189 44 + 193: 32(int) Select 190 191 192 + 194: 139(int) Bitcast 193 + Store 187(j) 194 + 195: 32(int) Load 137(e) + 196: 6(float) ConvertSToF 195 + 197: 7(fvec4) Load 117(ret) + 198: 7(fvec4) VectorTimesScalar 197 196 + 199: 7(fvec4) Load 150(f) + 200: 7(fvec4) FAdd 198 199 + 201: 7(fvec4) FunctionCall 9(vectorCond() + 202: 7(fvec4) FAdd 200 201 + 203: 7(fvec4) FunctionCall 11(scalarCond() + 204: 7(fvec4) FAdd 202 203 + Store 213(param) 207 + Store 214(param) 209 + Store 215(param) 212 + 216: 16(fvec2) FunctionCall 22(fbSelect(vb2;vf2;vf2;) 213(param) 214(param) 215(param) + 218: 6(float) CompositeExtract 216 0 + 219: 6(float) CompositeExtract 216 1 + 220: 7(fvec4) CompositeConstruct 218 219 217 217 + 221: 7(fvec4) FAdd 204 220 + ReturnValue 221 FunctionEnd diff --git a/Test/baseResults/hlsl.constantbuffer.frag.out b/Test/baseResults/hlsl.constantbuffer.frag.out index 12e819bc5d..78ad57705e 100644 --- a/Test/baseResults/hlsl.constantbuffer.frag.out +++ b/Test/baseResults/hlsl.constantbuffer.frag.out @@ -133,7 +133,7 @@ gl_FragCoord origin is upper left Validation failed // Module Version 10000 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 66 Capability Shader diff --git a/Test/baseResults/hlsl.constructArray.vert.out b/Test/baseResults/hlsl.constructArray.vert.out index b070735a63..230efbc151 100644 --- a/Test/baseResults/hlsl.constructArray.vert.out +++ b/Test/baseResults/hlsl.constructArray.vert.out @@ -268,7 +268,7 @@ Shader version: 500 0:? '@entryPointOutput' ( out 4-component vector of float Position) // Module Version 10000 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 89 Capability Shader diff --git a/Test/baseResults/hlsl.constructexpr.frag.out b/Test/baseResults/hlsl.constructexpr.frag.out index 7b25ae8434..367a03a3c3 100644 --- a/Test/baseResults/hlsl.constructexpr.frag.out +++ b/Test/baseResults/hlsl.constructexpr.frag.out @@ -104,7 +104,7 @@ gl_FragCoord origin is upper left 0:? '@entryPointOutput.color' (layout( location=0) out 4-component vector of float) // Module Version 10000 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 40 Capability Shader diff --git a/Test/baseResults/hlsl.constructimat.frag.out b/Test/baseResults/hlsl.constructimat.frag.out index a76ac6a9c0..4f49b87e59 100644 --- a/Test/baseResults/hlsl.constructimat.frag.out +++ b/Test/baseResults/hlsl.constructimat.frag.out @@ -545,7 +545,7 @@ gl_FragCoord origin is upper left Validation failed // Module Version 10000 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 98 Capability Shader diff --git a/Test/baseResults/hlsl.coverage.frag.out b/Test/baseResults/hlsl.coverage.frag.out index 7c44e1fb24..681118fd7c 100644 --- a/Test/baseResults/hlsl.coverage.frag.out +++ b/Test/baseResults/hlsl.coverage.frag.out @@ -119,7 +119,7 @@ gl_FragCoord origin is upper left Validation failed // Module Version 10000 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 52 Capability Shader diff --git a/Test/baseResults/hlsl.dashI.vert.out b/Test/baseResults/hlsl.dashI.vert.out index 73514438a2..ccd530af40 100644 --- a/Test/baseResults/hlsl.dashI.vert.out +++ b/Test/baseResults/hlsl.dashI.vert.out @@ -1,6 +1,6 @@ hlsl.dashI.vert // Module Version 10000 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 40 Capability Shader diff --git a/Test/baseResults/hlsl.deadFunctionMissingBody.vert.out b/Test/baseResults/hlsl.deadFunctionMissingBody.vert.out index 9ca01460bb..1862266813 100644 --- a/Test/baseResults/hlsl.deadFunctionMissingBody.vert.out +++ b/Test/baseResults/hlsl.deadFunctionMissingBody.vert.out @@ -1,6 +1,6 @@ hlsl.deadFunctionMissingBody.vert // Module Version 10000 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 18 Capability Shader diff --git a/Test/baseResults/hlsl.depthGreater.frag.out b/Test/baseResults/hlsl.depthGreater.frag.out index 31a70068e1..5128a0ec47 100644 --- a/Test/baseResults/hlsl.depthGreater.frag.out +++ b/Test/baseResults/hlsl.depthGreater.frag.out @@ -50,7 +50,7 @@ using depth_greater 0:? 'depth' ( out float FragDepth) // Module Version 10000 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 20 Capability Shader diff --git a/Test/baseResults/hlsl.depthLess.frag.out b/Test/baseResults/hlsl.depthLess.frag.out index d062c7748b..771c477ad4 100644 --- a/Test/baseResults/hlsl.depthLess.frag.out +++ b/Test/baseResults/hlsl.depthLess.frag.out @@ -42,7 +42,7 @@ using depth_less 0:? '@entryPointOutput' ( out float FragDepth) // Module Version 10000 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 16 Capability Shader diff --git a/Test/baseResults/hlsl.discard.frag.out b/Test/baseResults/hlsl.discard.frag.out index 41766f6284..7a6c6f2697 100644 --- a/Test/baseResults/hlsl.discard.frag.out +++ b/Test/baseResults/hlsl.discard.frag.out @@ -108,7 +108,7 @@ gl_FragCoord origin is upper left 0:? 'input' (layout( location=0) in 4-component vector of float) // Module Version 10000 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 50 Capability Shader diff --git a/Test/baseResults/hlsl.doLoop.frag.out b/Test/baseResults/hlsl.doLoop.frag.out index 0d93e8d9f3..82a96b5f55 100644 --- a/Test/baseResults/hlsl.doLoop.frag.out +++ b/Test/baseResults/hlsl.doLoop.frag.out @@ -198,7 +198,7 @@ gl_FragCoord origin is upper left 0:? 'input' (layout( location=0) in float) // Module Version 10000 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 99 Capability Shader diff --git a/Test/baseResults/hlsl.domain.1.tese.out b/Test/baseResults/hlsl.domain.1.tese.out index 4e53e7ce65..738f7cd0e4 100644 --- a/Test/baseResults/hlsl.domain.1.tese.out +++ b/Test/baseResults/hlsl.domain.1.tese.out @@ -428,7 +428,7 @@ triangle order = none 0:? 'pcf_data.flInsideTessFactor' ( patch in 2-element array of float TessLevelInner) // Module Version 10000 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 125 Capability Tessellation diff --git a/Test/baseResults/hlsl.domain.2.tese.out b/Test/baseResults/hlsl.domain.2.tese.out index 05f934f19d..ddb176a0fc 100644 --- a/Test/baseResults/hlsl.domain.2.tese.out +++ b/Test/baseResults/hlsl.domain.2.tese.out @@ -426,7 +426,7 @@ triangle order = none 0:? 'pcf_data.foo' (layout( location=2) patch in float) // Module Version 10000 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 120 Capability Tessellation diff --git a/Test/baseResults/hlsl.domain.3.tese.out b/Test/baseResults/hlsl.domain.3.tese.out index c9b985de5f..1dc7b2fd34 100644 --- a/Test/baseResults/hlsl.domain.3.tese.out +++ b/Test/baseResults/hlsl.domain.3.tese.out @@ -358,7 +358,7 @@ triangle order = none 0:? 'pcf_data.flInsideTessFactor' ( patch in 2-element array of float TessLevelInner) // Module Version 10000 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 116 Capability Tessellation diff --git a/Test/baseResults/hlsl.earlydepthstencil.frag.out b/Test/baseResults/hlsl.earlydepthstencil.frag.out index 34ca0062c8..a629bdc7ee 100644 --- a/Test/baseResults/hlsl.earlydepthstencil.frag.out +++ b/Test/baseResults/hlsl.earlydepthstencil.frag.out @@ -108,7 +108,7 @@ using early_fragment_tests 0:? 'input.Position' ( in 4-component vector of float FragCoord) // Module Version 10000 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 50 Capability Shader diff --git a/Test/baseResults/hlsl.emptystruct.init.vert.out b/Test/baseResults/hlsl.emptystruct.init.vert.out index 9f5c785741..07baddfc05 100644 --- a/Test/baseResults/hlsl.emptystruct.init.vert.out +++ b/Test/baseResults/hlsl.emptystruct.init.vert.out @@ -60,7 +60,7 @@ Shader version: 500 0:? 'vertexIndex' (layout( location=0) in uint) // Module Version 10000 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 29 Capability Shader diff --git a/Test/baseResults/hlsl.emptystructreturn.frag.out b/Test/baseResults/hlsl.emptystructreturn.frag.out index 2a4cabebd3..de77486579 100644 --- a/Test/baseResults/hlsl.emptystructreturn.frag.out +++ b/Test/baseResults/hlsl.emptystructreturn.frag.out @@ -51,7 +51,7 @@ gl_FragCoord origin is upper left Validation failed // Module Version 10000 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 27 Capability Shader diff --git a/Test/baseResults/hlsl.emptystructreturn.tesc.out b/Test/baseResults/hlsl.emptystructreturn.tesc.out new file mode 100644 index 0000000000..ffdbb02d4a --- /dev/null +++ b/Test/baseResults/hlsl.emptystructreturn.tesc.out @@ -0,0 +1,606 @@ +hlsl.emptystructreturn.tesc +Shader version: 500 +vertices = 3 +vertex spacing = equal_spacing +triangle order = cw +0:? Sequence +0:16 Function Definition: blob(struct-HullInputType-vf41[3]; ( temp void) +0:16 Function Parameters: +0:16 'patch' ( in 3-element array of structure{ temp 4-component vector of float position}) +0:20 Function Definition: ColorPatchConstantFunction(struct-HullInputType-vf41[3];u1; ( temp structure{ temp 3-element array of float edges, temp float inside}) +0:20 Function Parameters: +0:20 'inputPatch' ( in 3-element array of structure{ temp 4-component vector of float position}) +0:20 'patchId' ( in uint) +0:? Sequence +0:24 move second child to first child ( temp float) +0:24 direct index ( temp float) +0:24 edges: direct index for structure ( temp 3-element array of float) +0:24 'output' ( temp structure{ temp 3-element array of float edges, temp float inside}) +0:24 Constant: +0:24 0 (const int) +0:24 Constant: +0:24 0 (const int) +0:24 Constant: +0:24 2.000000 +0:25 move second child to first child ( temp float) +0:25 direct index ( temp float) +0:25 edges: direct index for structure ( temp 3-element array of float) +0:25 'output' ( temp structure{ temp 3-element array of float edges, temp float inside}) +0:25 Constant: +0:25 0 (const int) +0:25 Constant: +0:25 1 (const int) +0:25 Constant: +0:25 2.000000 +0:26 move second child to first child ( temp float) +0:26 direct index ( temp float) +0:26 edges: direct index for structure ( temp 3-element array of float) +0:26 'output' ( temp structure{ temp 3-element array of float edges, temp float inside}) +0:26 Constant: +0:26 0 (const int) +0:26 Constant: +0:26 2 (const int) +0:26 Constant: +0:26 2.000000 +0:29 move second child to first child ( temp float) +0:29 inside: direct index for structure ( temp float) +0:29 'output' ( temp structure{ temp 3-element array of float edges, temp float inside}) +0:29 Constant: +0:29 1 (const int) +0:29 Constant: +0:29 2.000000 +0:31 Branch: Return with expression +0:31 'output' ( temp structure{ temp 3-element array of float edges, temp float inside}) +0:42 Function Definition: @main(struct-EmptyStruct1;struct-HullInputType-vf41[3];u1;u1; ( temp structure{}) +0:42 Function Parameters: +0:42 'stage_input' ( in structure{}) +0:42 'patch' ( in 3-element array of structure{ temp 4-component vector of float position}) +0:42 'pointId' ( in uint) +0:42 'patchId' ( in uint) +0:? Sequence +0:44 Function Call: blob(struct-HullInputType-vf41[3]; ( temp void) +0:44 'patch' ( in 3-element array of structure{ temp 4-component vector of float position}) +0:46 Branch: Return with expression +0:46 'output' ( temp structure{}) +0:42 Function Definition: main( ( temp void) +0:42 Function Parameters: +0:? Sequence +0:42 Sequence +0:42 move second child to first child ( temp structure{}) +0:? 'stage_input' ( temp structure{}) +0:? 'stage_input' ( in structure{}) +0:42 Sequence +0:42 move second child to first child ( temp 4-component vector of float) +0:42 position: direct index for structure ( temp 4-component vector of float) +0:42 direct index ( temp structure{ temp 4-component vector of float position}) +0:? 'patch' ( temp 3-element array of structure{ temp 4-component vector of float position}) +0:42 Constant: +0:42 0 (const int) +0:42 Constant: +0:42 0 (const int) +0:42 direct index ( in 4-component vector of float Position) +0:? 'patch.position' ( in 3-element array of 4-component vector of float Position) +0:42 Constant: +0:42 0 (const int) +0:42 move second child to first child ( temp 4-component vector of float) +0:42 position: direct index for structure ( temp 4-component vector of float) +0:42 direct index ( temp structure{ temp 4-component vector of float position}) +0:? 'patch' ( temp 3-element array of structure{ temp 4-component vector of float position}) +0:42 Constant: +0:42 1 (const int) +0:42 Constant: +0:42 0 (const int) +0:42 direct index ( in 4-component vector of float Position) +0:? 'patch.position' ( in 3-element array of 4-component vector of float Position) +0:42 Constant: +0:42 1 (const int) +0:42 move second child to first child ( temp 4-component vector of float) +0:42 position: direct index for structure ( temp 4-component vector of float) +0:42 direct index ( temp structure{ temp 4-component vector of float position}) +0:? 'patch' ( temp 3-element array of structure{ temp 4-component vector of float position}) +0:42 Constant: +0:42 2 (const int) +0:42 Constant: +0:42 0 (const int) +0:42 direct index ( in 4-component vector of float Position) +0:? 'patch.position' ( in 3-element array of 4-component vector of float Position) +0:42 Constant: +0:42 2 (const int) +0:42 move second child to first child ( temp uint) +0:? 'pointId' ( temp uint) +0:? 'pointId' ( in uint InvocationID) +0:42 move second child to first child ( temp uint) +0:? 'patchId' ( temp uint) +0:? 'patchId' ( in uint PrimitiveID) +0:42 Sequence +0:42 move second child to first child ( temp structure{}) +0:42 indirect index ( out structure{}) +0:? '@entryPointOutput' ( out 3-element array of structure{}) +0:? 'pointId' ( in uint InvocationID) +0:42 Function Call: @main(struct-EmptyStruct1;struct-HullInputType-vf41[3];u1;u1; ( temp structure{}) +0:? 'stage_input' ( temp structure{}) +0:? 'patch' ( temp 3-element array of structure{ temp 4-component vector of float position}) +0:? 'pointId' ( temp uint) +0:? 'patchId' ( temp uint) +0:? Barrier ( temp void) +0:? Test condition and select ( temp void) +0:? Condition +0:? Compare Equal ( temp bool) +0:? 'pointId' ( in uint InvocationID) +0:? Constant: +0:? 0 (const int) +0:? true case +0:? Sequence +0:? move second child to first child ( temp structure{ temp 3-element array of float edges, temp float inside}) +0:? '@patchConstantResult' ( temp structure{ temp 3-element array of float edges, temp float inside}) +0:? Function Call: ColorPatchConstantFunction(struct-HullInputType-vf41[3];u1; ( temp structure{ temp 3-element array of float edges, temp float inside}) +0:? 'patch' ( temp 3-element array of structure{ temp 4-component vector of float position}) +0:? 'patchId' ( in uint PrimitiveID) +0:? Sequence +0:? move second child to first child ( temp float) +0:? direct index ( patch out float TessLevelOuter) +0:? '@patchConstantOutput.edges' ( patch out 4-element array of float TessLevelOuter) +0:? Constant: +0:? 0 (const int) +0:? direct index ( temp float) +0:? edges: direct index for structure ( temp 3-element array of float) +0:? '@patchConstantResult' ( temp structure{ temp 3-element array of float edges, temp float inside}) +0:? Constant: +0:? 0 (const int) +0:? Constant: +0:? 0 (const int) +0:? move second child to first child ( temp float) +0:? direct index ( patch out float TessLevelOuter) +0:? '@patchConstantOutput.edges' ( patch out 4-element array of float TessLevelOuter) +0:? Constant: +0:? 1 (const int) +0:? direct index ( temp float) +0:? edges: direct index for structure ( temp 3-element array of float) +0:? '@patchConstantResult' ( temp structure{ temp 3-element array of float edges, temp float inside}) +0:? Constant: +0:? 0 (const int) +0:? Constant: +0:? 1 (const int) +0:? move second child to first child ( temp float) +0:? direct index ( patch out float TessLevelOuter) +0:? '@patchConstantOutput.edges' ( patch out 4-element array of float TessLevelOuter) +0:? Constant: +0:? 2 (const int) +0:? direct index ( temp float) +0:? edges: direct index for structure ( temp 3-element array of float) +0:? '@patchConstantResult' ( temp structure{ temp 3-element array of float edges, temp float inside}) +0:? Constant: +0:? 0 (const int) +0:? Constant: +0:? 2 (const int) +0:? move second child to first child ( temp float) +0:? direct index ( patch out float TessLevelInner) +0:? '@patchConstantOutput.inside' ( patch out 2-element array of float TessLevelInner) +0:? Constant: +0:? 0 (const int) +0:? inside: direct index for structure ( temp float) +0:? '@patchConstantResult' ( temp structure{ temp 3-element array of float edges, temp float inside}) +0:? Constant: +0:? 1 (const int) +0:? Linker Objects +0:? 'patch.position' ( in 3-element array of 4-component vector of float Position) +0:? 'pointId' ( in uint InvocationID) +0:? 'patchId' ( in uint PrimitiveID) +0:? '@patchConstantOutput.edges' ( patch out 4-element array of float TessLevelOuter) +0:? '@patchConstantOutput.inside' ( patch out 2-element array of float TessLevelInner) + + +Linked tessellation control stage: + + +Shader version: 500 +vertices = 3 +vertex spacing = equal_spacing +triangle order = cw +0:? Sequence +0:16 Function Definition: blob(struct-HullInputType-vf41[3]; ( temp void) +0:16 Function Parameters: +0:16 'patch' ( in 3-element array of structure{ temp 4-component vector of float position}) +0:20 Function Definition: ColorPatchConstantFunction(struct-HullInputType-vf41[3];u1; ( temp structure{ temp 3-element array of float edges, temp float inside}) +0:20 Function Parameters: +0:20 'inputPatch' ( in 3-element array of structure{ temp 4-component vector of float position}) +0:20 'patchId' ( in uint) +0:? Sequence +0:24 move second child to first child ( temp float) +0:24 direct index ( temp float) +0:24 edges: direct index for structure ( temp 3-element array of float) +0:24 'output' ( temp structure{ temp 3-element array of float edges, temp float inside}) +0:24 Constant: +0:24 0 (const int) +0:24 Constant: +0:24 0 (const int) +0:24 Constant: +0:24 2.000000 +0:25 move second child to first child ( temp float) +0:25 direct index ( temp float) +0:25 edges: direct index for structure ( temp 3-element array of float) +0:25 'output' ( temp structure{ temp 3-element array of float edges, temp float inside}) +0:25 Constant: +0:25 0 (const int) +0:25 Constant: +0:25 1 (const int) +0:25 Constant: +0:25 2.000000 +0:26 move second child to first child ( temp float) +0:26 direct index ( temp float) +0:26 edges: direct index for structure ( temp 3-element array of float) +0:26 'output' ( temp structure{ temp 3-element array of float edges, temp float inside}) +0:26 Constant: +0:26 0 (const int) +0:26 Constant: +0:26 2 (const int) +0:26 Constant: +0:26 2.000000 +0:29 move second child to first child ( temp float) +0:29 inside: direct index for structure ( temp float) +0:29 'output' ( temp structure{ temp 3-element array of float edges, temp float inside}) +0:29 Constant: +0:29 1 (const int) +0:29 Constant: +0:29 2.000000 +0:31 Branch: Return with expression +0:31 'output' ( temp structure{ temp 3-element array of float edges, temp float inside}) +0:42 Function Definition: @main(struct-EmptyStruct1;struct-HullInputType-vf41[3];u1;u1; ( temp structure{}) +0:42 Function Parameters: +0:42 'stage_input' ( in structure{}) +0:42 'patch' ( in 3-element array of structure{ temp 4-component vector of float position}) +0:42 'pointId' ( in uint) +0:42 'patchId' ( in uint) +0:? Sequence +0:44 Function Call: blob(struct-HullInputType-vf41[3]; ( temp void) +0:44 'patch' ( in 3-element array of structure{ temp 4-component vector of float position}) +0:46 Branch: Return with expression +0:46 'output' ( temp structure{}) +0:42 Function Definition: main( ( temp void) +0:42 Function Parameters: +0:? Sequence +0:42 Sequence +0:42 move second child to first child ( temp structure{}) +0:? 'stage_input' ( temp structure{}) +0:? 'stage_input' ( in structure{}) +0:42 Sequence +0:42 move second child to first child ( temp 4-component vector of float) +0:42 position: direct index for structure ( temp 4-component vector of float) +0:42 direct index ( temp structure{ temp 4-component vector of float position}) +0:? 'patch' ( temp 3-element array of structure{ temp 4-component vector of float position}) +0:42 Constant: +0:42 0 (const int) +0:42 Constant: +0:42 0 (const int) +0:42 direct index ( in 4-component vector of float Position) +0:? 'patch.position' ( in 3-element array of 4-component vector of float Position) +0:42 Constant: +0:42 0 (const int) +0:42 move second child to first child ( temp 4-component vector of float) +0:42 position: direct index for structure ( temp 4-component vector of float) +0:42 direct index ( temp structure{ temp 4-component vector of float position}) +0:? 'patch' ( temp 3-element array of structure{ temp 4-component vector of float position}) +0:42 Constant: +0:42 1 (const int) +0:42 Constant: +0:42 0 (const int) +0:42 direct index ( in 4-component vector of float Position) +0:? 'patch.position' ( in 3-element array of 4-component vector of float Position) +0:42 Constant: +0:42 1 (const int) +0:42 move second child to first child ( temp 4-component vector of float) +0:42 position: direct index for structure ( temp 4-component vector of float) +0:42 direct index ( temp structure{ temp 4-component vector of float position}) +0:? 'patch' ( temp 3-element array of structure{ temp 4-component vector of float position}) +0:42 Constant: +0:42 2 (const int) +0:42 Constant: +0:42 0 (const int) +0:42 direct index ( in 4-component vector of float Position) +0:? 'patch.position' ( in 3-element array of 4-component vector of float Position) +0:42 Constant: +0:42 2 (const int) +0:42 move second child to first child ( temp uint) +0:? 'pointId' ( temp uint) +0:? 'pointId' ( in uint InvocationID) +0:42 move second child to first child ( temp uint) +0:? 'patchId' ( temp uint) +0:? 'patchId' ( in uint PrimitiveID) +0:42 Sequence +0:42 move second child to first child ( temp structure{}) +0:42 indirect index ( out structure{}) +0:? '@entryPointOutput' ( out 3-element array of structure{}) +0:? 'pointId' ( in uint InvocationID) +0:42 Function Call: @main(struct-EmptyStruct1;struct-HullInputType-vf41[3];u1;u1; ( temp structure{}) +0:? 'stage_input' ( temp structure{}) +0:? 'patch' ( temp 3-element array of structure{ temp 4-component vector of float position}) +0:? 'pointId' ( temp uint) +0:? 'patchId' ( temp uint) +0:? Barrier ( temp void) +0:? Test condition and select ( temp void) +0:? Condition +0:? Compare Equal ( temp bool) +0:? 'pointId' ( in uint InvocationID) +0:? Constant: +0:? 0 (const int) +0:? true case +0:? Sequence +0:? move second child to first child ( temp structure{ temp 3-element array of float edges, temp float inside}) +0:? '@patchConstantResult' ( temp structure{ temp 3-element array of float edges, temp float inside}) +0:? Function Call: ColorPatchConstantFunction(struct-HullInputType-vf41[3];u1; ( temp structure{ temp 3-element array of float edges, temp float inside}) +0:? 'patch' ( temp 3-element array of structure{ temp 4-component vector of float position}) +0:? 'patchId' ( in uint PrimitiveID) +0:? Sequence +0:? move second child to first child ( temp float) +0:? direct index ( patch out float TessLevelOuter) +0:? '@patchConstantOutput.edges' ( patch out 4-element array of float TessLevelOuter) +0:? Constant: +0:? 0 (const int) +0:? direct index ( temp float) +0:? edges: direct index for structure ( temp 3-element array of float) +0:? '@patchConstantResult' ( temp structure{ temp 3-element array of float edges, temp float inside}) +0:? Constant: +0:? 0 (const int) +0:? Constant: +0:? 0 (const int) +0:? move second child to first child ( temp float) +0:? direct index ( patch out float TessLevelOuter) +0:? '@patchConstantOutput.edges' ( patch out 4-element array of float TessLevelOuter) +0:? Constant: +0:? 1 (const int) +0:? direct index ( temp float) +0:? edges: direct index for structure ( temp 3-element array of float) +0:? '@patchConstantResult' ( temp structure{ temp 3-element array of float edges, temp float inside}) +0:? Constant: +0:? 0 (const int) +0:? Constant: +0:? 1 (const int) +0:? move second child to first child ( temp float) +0:? direct index ( patch out float TessLevelOuter) +0:? '@patchConstantOutput.edges' ( patch out 4-element array of float TessLevelOuter) +0:? Constant: +0:? 2 (const int) +0:? direct index ( temp float) +0:? edges: direct index for structure ( temp 3-element array of float) +0:? '@patchConstantResult' ( temp structure{ temp 3-element array of float edges, temp float inside}) +0:? Constant: +0:? 0 (const int) +0:? Constant: +0:? 2 (const int) +0:? move second child to first child ( temp float) +0:? direct index ( patch out float TessLevelInner) +0:? '@patchConstantOutput.inside' ( patch out 2-element array of float TessLevelInner) +0:? Constant: +0:? 0 (const int) +0:? inside: direct index for structure ( temp float) +0:? '@patchConstantResult' ( temp structure{ temp 3-element array of float edges, temp float inside}) +0:? Constant: +0:? 1 (const int) +0:? Linker Objects +0:? 'patch.position' ( in 3-element array of 4-component vector of float Position) +0:? 'pointId' ( in uint InvocationID) +0:? 'patchId' ( in uint PrimitiveID) +0:? '@patchConstantOutput.edges' ( patch out 4-element array of float TessLevelOuter) +0:? '@patchConstantOutput.inside' ( patch out 2-element array of float TessLevelInner) + +Validation failed +// Module Version 10000 +// Generated by (magic number): 8000b +// Id's are bound by 132 + + Capability Tessellation + 1: ExtInstImport "GLSL.std.450" + MemoryModel Logical GLSL450 + EntryPoint TessellationControl 4 "main" 65 79 82 115 128 + ExecutionMode 4 OutputVertices 3 + ExecutionMode 4 Triangles + ExecutionMode 4 SpacingEqual + ExecutionMode 4 VertexOrderCw + Source HLSL 500 + Name 4 "main" + Name 8 "HullInputType" + MemberName 8(HullInputType) 0 "position" + Name 15 "blob(struct-HullInputType-vf41[3];" + Name 14 "patch" + Name 19 "ConstantOutputType" + MemberName 19(ConstantOutputType) 0 "edges" + MemberName 19(ConstantOutputType) 1 "inside" + Name 23 "ColorPatchConstantFunction(struct-HullInputType-vf41[3];u1;" + Name 21 "inputPatch" + Name 22 "patchId" + Name 25 "EmptyStruct" + Name 27 "HullOutputType" + Name 33 "@main(struct-EmptyStruct1;struct-HullInputType-vf41[3];u1;u1;" + Name 29 "stage_input" + Name 30 "patch" + Name 31 "pointId" + Name 32 "patchId" + Name 36 "output" + Name 50 "param" + Name 54 "output" + Name 58 "stage_input" + Name 60 "stage_input" + Name 62 "patch" + Name 65 "patch.position" + Name 77 "pointId" + Name 79 "pointId" + Name 81 "patchId" + Name 82 "patchId" + Name 86 "@entryPointOutput" + Name 88 "param" + Name 90 "param" + Name 92 "param" + Name 94 "param" + Name 107 "@patchConstantResult" + Name 108 "param" + Name 110 "param" + Name 115 "@patchConstantOutput.edges" + Name 128 "@patchConstantOutput.inside" + 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 128(@patchConstantOutput.inside) BuiltIn TessLevelInner + 2: TypeVoid + 3: TypeFunction 2 + 6: TypeFloat 32 + 7: TypeVector 6(float) 4 +8(HullInputType): TypeStruct 7(fvec4) + 9: TypeInt 32 0 + 10: 9(int) Constant 3 + 11: TypeArray 8(HullInputType) 10 + 12: TypePointer Function 11 + 13: TypeFunction 2 12(ptr) + 17: TypePointer Function 9(int) + 18: TypeArray 6(float) 10 +19(ConstantOutputType): TypeStruct 18 6(float) + 20: TypeFunction 19(ConstantOutputType) 12(ptr) 17(ptr) + 25(EmptyStruct): TypeStruct + 26: TypePointer Function 25(EmptyStruct) +27(HullOutputType): TypeStruct + 28: TypeFunction 27(HullOutputType) 26(ptr) 12(ptr) 17(ptr) 17(ptr) + 35: TypePointer Function 19(ConstantOutputType) + 37: TypeInt 32 1 + 38: 37(int) Constant 0 + 39: 6(float) Constant 1073741824 + 40: TypePointer Function 6(float) + 42: 37(int) Constant 1 + 44: 37(int) Constant 2 + 53: TypePointer Function 27(HullOutputType) + 59: TypePointer Input 25(EmptyStruct) + 60(stage_input): 59(ptr) Variable Input + 63: TypeArray 7(fvec4) 10 + 64: TypePointer Input 63 +65(patch.position): 64(ptr) Variable Input + 66: TypePointer Input 7(fvec4) + 69: TypePointer Function 7(fvec4) + 78: TypePointer Input 9(int) + 79(pointId): 78(ptr) Variable Input + 82(patchId): 78(ptr) Variable Input + 84: TypeArray 27(HullOutputType) 10 + 85: TypePointer Output 84 +86(@entryPointOutput): 85(ptr) Variable Output + 97: TypePointer Output 27(HullOutputType) + 99: 9(int) Constant 2 + 100: 9(int) Constant 4 + 101: 9(int) Constant 0 + 103: TypeBool + 113: TypeArray 6(float) 100 + 114: TypePointer Output 113 +115(@patchConstantOutput.edges): 114(ptr) Variable Output + 118: TypePointer Output 6(float) + 126: TypeArray 6(float) 99 + 127: TypePointer Output 126 +128(@patchConstantOutput.inside): 127(ptr) Variable Output + 4(main): 2 Function None 3 + 5: Label + 58(stage_input): 26(ptr) Variable Function + 62(patch): 12(ptr) Variable Function + 77(pointId): 17(ptr) Variable Function + 81(patchId): 17(ptr) Variable Function + 88(param): 26(ptr) Variable Function + 90(param): 12(ptr) Variable Function + 92(param): 17(ptr) Variable Function + 94(param): 17(ptr) Variable Function +107(@patchConstantResult): 35(ptr) Variable Function + 108(param): 12(ptr) Variable Function + 110(param): 17(ptr) Variable Function + 61:25(EmptyStruct) Load 60(stage_input) + Store 58(stage_input) 61 + 67: 66(ptr) AccessChain 65(patch.position) 38 + 68: 7(fvec4) Load 67 + 70: 69(ptr) AccessChain 62(patch) 38 38 + Store 70 68 + 71: 66(ptr) AccessChain 65(patch.position) 42 + 72: 7(fvec4) Load 71 + 73: 69(ptr) AccessChain 62(patch) 42 38 + Store 73 72 + 74: 66(ptr) AccessChain 65(patch.position) 44 + 75: 7(fvec4) Load 74 + 76: 69(ptr) AccessChain 62(patch) 44 38 + Store 76 75 + 80: 9(int) Load 79(pointId) + Store 77(pointId) 80 + 83: 9(int) Load 82(patchId) + Store 81(patchId) 83 + 87: 9(int) Load 79(pointId) + 89:25(EmptyStruct) Load 58(stage_input) + Store 88(param) 89 + 91: 11 Load 62(patch) + Store 90(param) 91 + 93: 9(int) Load 77(pointId) + Store 92(param) 93 + 95: 9(int) Load 81(patchId) + Store 94(param) 95 + 96:27(HullOutputType) FunctionCall 33(@main(struct-EmptyStruct1;struct-HullInputType-vf41[3];u1;u1;) 88(param) 90(param) 92(param) 94(param) + 98: 97(ptr) AccessChain 86(@entryPointOutput) 87 + Store 98 96 + ControlBarrier 99 100 101 + 102: 9(int) Load 79(pointId) + 104: 103(bool) IEqual 102 38 + SelectionMerge 106 None + BranchConditional 104 105 106 + 105: Label + 109: 11 Load 62(patch) + Store 108(param) 109 + 111: 9(int) Load 82(patchId) + Store 110(param) 111 + 112:19(ConstantOutputType) FunctionCall 23(ColorPatchConstantFunction(struct-HullInputType-vf41[3];u1;) 108(param) 110(param) + Store 107(@patchConstantResult) 112 + 116: 40(ptr) AccessChain 107(@patchConstantResult) 38 38 + 117: 6(float) Load 116 + 119: 118(ptr) AccessChain 115(@patchConstantOutput.edges) 38 + Store 119 117 + 120: 40(ptr) AccessChain 107(@patchConstantResult) 38 42 + 121: 6(float) Load 120 + 122: 118(ptr) AccessChain 115(@patchConstantOutput.edges) 42 + Store 122 121 + 123: 40(ptr) AccessChain 107(@patchConstantResult) 38 44 + 124: 6(float) Load 123 + 125: 118(ptr) AccessChain 115(@patchConstantOutput.edges) 44 + Store 125 124 + 129: 40(ptr) AccessChain 107(@patchConstantResult) 42 + 130: 6(float) Load 129 + 131: 118(ptr) AccessChain 128(@patchConstantOutput.inside) 38 + Store 131 130 + Branch 106 + 106: Label + Return + FunctionEnd +15(blob(struct-HullInputType-vf41[3];): 2 Function None 13 + 14(patch): 12(ptr) FunctionParameter + 16: Label + Return + FunctionEnd +23(ColorPatchConstantFunction(struct-HullInputType-vf41[3];u1;):19(ConstantOutputType) Function None 20 + 21(inputPatch): 12(ptr) FunctionParameter + 22(patchId): 17(ptr) FunctionParameter + 24: Label + 36(output): 35(ptr) Variable Function + 41: 40(ptr) AccessChain 36(output) 38 38 + Store 41 39 + 43: 40(ptr) AccessChain 36(output) 38 42 + Store 43 39 + 45: 40(ptr) AccessChain 36(output) 38 44 + Store 45 39 + 46: 40(ptr) AccessChain 36(output) 42 + Store 46 39 + 47:19(ConstantOutputType) Load 36(output) + ReturnValue 47 + FunctionEnd +33(@main(struct-EmptyStruct1;struct-HullInputType-vf41[3];u1;u1;):27(HullOutputType) Function None 28 + 29(stage_input): 26(ptr) FunctionParameter + 30(patch): 12(ptr) FunctionParameter + 31(pointId): 17(ptr) FunctionParameter + 32(patchId): 17(ptr) FunctionParameter + 34: Label + 50(param): 12(ptr) Variable Function + 54(output): 53(ptr) Variable Function + 51: 11 Load 30(patch) + Store 50(param) 51 + 52: 2 FunctionCall 15(blob(struct-HullInputType-vf41[3];) 50(param) + 55:27(HullOutputType) Load 54(output) + ReturnValue 55 + FunctionEnd diff --git a/Test/baseResults/hlsl.emptystructreturn.vert.out b/Test/baseResults/hlsl.emptystructreturn.vert.out index ad1efa7972..22dc2cf0bd 100644 --- a/Test/baseResults/hlsl.emptystructreturn.vert.out +++ b/Test/baseResults/hlsl.emptystructreturn.vert.out @@ -49,7 +49,7 @@ Shader version: 500 Validation failed // Module Version 10000 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 27 Capability Shader diff --git a/Test/baseResults/hlsl.entry-in.frag.out b/Test/baseResults/hlsl.entry-in.frag.out index 4c322496c5..e86def4cdb 100644 --- a/Test/baseResults/hlsl.entry-in.frag.out +++ b/Test/baseResults/hlsl.entry-in.frag.out @@ -166,7 +166,7 @@ gl_FragCoord origin is upper left 0:? 'i.i2' (layout( location=1) flat in 2-component vector of int) // Module Version 10000 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 74 Capability Shader diff --git a/Test/baseResults/hlsl.entry-out.frag.out b/Test/baseResults/hlsl.entry-out.frag.out index a8b47e9e9f..5f162b12e2 100644 --- a/Test/baseResults/hlsl.entry-out.frag.out +++ b/Test/baseResults/hlsl.entry-out.frag.out @@ -244,7 +244,7 @@ gl_FragCoord origin is upper left 0:? 'out3.i' (layout( location=5) out 2-component vector of int) // Module Version 10000 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 89 Capability Shader diff --git a/Test/baseResults/hlsl.entry.rename.frag.out b/Test/baseResults/hlsl.entry.rename.frag.out index 2fd15d1ddf..d635c67a53 100644 --- a/Test/baseResults/hlsl.entry.rename.frag.out +++ b/Test/baseResults/hlsl.entry.rename.frag.out @@ -72,7 +72,7 @@ gl_FragCoord origin is upper left 0:? '@entryPointOutput.Color' (layout( location=0) out 4-component vector of float) // Module Version 10000 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 32 Capability Shader diff --git a/Test/baseResults/hlsl.explicitDescriptorSet-2.frag.out b/Test/baseResults/hlsl.explicitDescriptorSet-2.frag.out index 3ca773fe6b..5c89f7e066 100644 --- a/Test/baseResults/hlsl.explicitDescriptorSet-2.frag.out +++ b/Test/baseResults/hlsl.explicitDescriptorSet-2.frag.out @@ -1,6 +1,6 @@ hlsl.explicitDescriptorSet.frag // Module Version 10000 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 31 Capability Shader diff --git a/Test/baseResults/hlsl.explicitDescriptorSet.frag.out b/Test/baseResults/hlsl.explicitDescriptorSet.frag.out index 9ba0d93ff2..1b0e45f026 100644 --- a/Test/baseResults/hlsl.explicitDescriptorSet.frag.out +++ b/Test/baseResults/hlsl.explicitDescriptorSet.frag.out @@ -1,6 +1,6 @@ hlsl.explicitDescriptorSet.frag // Module Version 10000 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 31 Capability Shader diff --git a/Test/baseResults/hlsl.flatten.return.frag.out b/Test/baseResults/hlsl.flatten.return.frag.out index 9a51f1fceb..f27646299e 100644 --- a/Test/baseResults/hlsl.flatten.return.frag.out +++ b/Test/baseResults/hlsl.flatten.return.frag.out @@ -118,7 +118,7 @@ gl_FragCoord origin is upper left 0:? '@entryPointOutput.other_struct_member3' (layout( location=3) out float) // Module Version 10000 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 49 Capability Shader diff --git a/Test/baseResults/hlsl.flattenOpaque.frag.out b/Test/baseResults/hlsl.flattenOpaque.frag.out index 9a29081b7c..589b1e1ff7 100644 --- a/Test/baseResults/hlsl.flattenOpaque.frag.out +++ b/Test/baseResults/hlsl.flattenOpaque.frag.out @@ -295,7 +295,7 @@ gl_FragCoord origin is upper left 0:? '@entryPointOutput' (layout( location=0) out 4-component vector of float) // Module Version 10000 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 122 Capability Shader diff --git a/Test/baseResults/hlsl.flattenOpaqueInit.vert.out b/Test/baseResults/hlsl.flattenOpaqueInit.vert.out index 10e8345013..dbd6446920 100644 --- a/Test/baseResults/hlsl.flattenOpaqueInit.vert.out +++ b/Test/baseResults/hlsl.flattenOpaqueInit.vert.out @@ -165,7 +165,7 @@ Shader version: 500 0:? '@entryPointOutput' (layout( location=0) out 4-component vector of float) // Module Version 10000 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 82 Capability Shader diff --git a/Test/baseResults/hlsl.flattenOpaqueInitMix.vert.out b/Test/baseResults/hlsl.flattenOpaqueInitMix.vert.out index c8d0b166e6..66084f677d 100644 --- a/Test/baseResults/hlsl.flattenOpaqueInitMix.vert.out +++ b/Test/baseResults/hlsl.flattenOpaqueInitMix.vert.out @@ -107,7 +107,7 @@ Shader version: 500 0:? '@entryPointOutput' (layout( location=0) out 4-component vector of float) // Module Version 10000 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 59 Capability Shader diff --git a/Test/baseResults/hlsl.flattenSubset.frag.out b/Test/baseResults/hlsl.flattenSubset.frag.out index 7ec229a498..65d3467760 100644 --- a/Test/baseResults/hlsl.flattenSubset.frag.out +++ b/Test/baseResults/hlsl.flattenSubset.frag.out @@ -115,7 +115,7 @@ gl_FragCoord origin is upper left 0:? 'vpos' (layout( location=0) in 4-component vector of float) // Module Version 10000 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 54 Capability Shader diff --git a/Test/baseResults/hlsl.flattenSubset2.frag.out b/Test/baseResults/hlsl.flattenSubset2.frag.out index c319637832..c8a919328c 100644 --- a/Test/baseResults/hlsl.flattenSubset2.frag.out +++ b/Test/baseResults/hlsl.flattenSubset2.frag.out @@ -149,7 +149,7 @@ gl_FragCoord origin is upper left 0:? 'vpos' (layout( location=0) in 4-component vector of float) // Module Version 10000 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 56 Capability Shader diff --git a/Test/baseResults/hlsl.float1.frag.out b/Test/baseResults/hlsl.float1.frag.out index 00bdea9414..65f69da47e 100644 --- a/Test/baseResults/hlsl.float1.frag.out +++ b/Test/baseResults/hlsl.float1.frag.out @@ -65,7 +65,7 @@ gl_FragCoord origin is upper left 0:? 'scalar' ( global float) // Module Version 10000 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 27 Capability Shader diff --git a/Test/baseResults/hlsl.float4.frag.out b/Test/baseResults/hlsl.float4.frag.out index 0dbd935a9a..5fcc3c1450 100644 --- a/Test/baseResults/hlsl.float4.frag.out +++ b/Test/baseResults/hlsl.float4.frag.out @@ -42,7 +42,7 @@ gl_FragCoord origin is upper left 0:? 'anon@0' (layout( row_major std140) uniform block{ uniform 4-component vector of float AmbientColor, uniform bool ff1, layout( offset=20) uniform float ff2, layout( binding=0 offset=32) uniform 4-component vector of float ff3, layout( binding=1 offset=48) uniform 4-component vector of float ff4}) // Module Version 10000 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 26 Capability Shader diff --git a/Test/baseResults/hlsl.forLoop.frag.out b/Test/baseResults/hlsl.forLoop.frag.out index 7bce346934..f1aa20b31f 100644 --- a/Test/baseResults/hlsl.forLoop.frag.out +++ b/Test/baseResults/hlsl.forLoop.frag.out @@ -510,7 +510,7 @@ gl_FragCoord origin is upper left 0:? 'input' (layout( location=0) in 4-component vector of float) // Module Version 10000 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 240 Capability Shader diff --git a/Test/baseResults/hlsl.format.rwtexture.frag.out b/Test/baseResults/hlsl.format.rwtexture.frag.out index e6eebbf29f..3edbbb6eea 100644 --- a/Test/baseResults/hlsl.format.rwtexture.frag.out +++ b/Test/baseResults/hlsl.format.rwtexture.frag.out @@ -184,7 +184,7 @@ using depth_any 0:? '@entryPointOutput.Color' (layout( location=0) out 4-component vector of float) // Module Version 10000 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 160 Capability Shader diff --git a/Test/baseResults/hlsl.fraggeom.frag.out b/Test/baseResults/hlsl.fraggeom.frag.out index d86fa96919..400f530e6e 100644 --- a/Test/baseResults/hlsl.fraggeom.frag.out +++ b/Test/baseResults/hlsl.fraggeom.frag.out @@ -64,7 +64,7 @@ gl_FragCoord origin is upper left 0:? '@entryPointOutput' (layout( location=0) out 4-component vector of float) // Module Version 10000 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 25 Capability Shader diff --git a/Test/baseResults/hlsl.function.frag.out b/Test/baseResults/hlsl.function.frag.out index faa31479c0..ebf20fec3a 100644 --- a/Test/baseResults/hlsl.function.frag.out +++ b/Test/baseResults/hlsl.function.frag.out @@ -1,6 +1,6 @@ hlsl.function.frag -ERROR: 0:24: 'fun1' : unknown variable -ERROR: 0:24: 'return' : type does not match, or is not convertible to, the function's return type +ERROR: 0:29: 'fun1' : unknown variable +ERROR: 0:29: 'return' : type does not match, or is not convertible to, the function's return type ERROR: 2 compilation errors. No code generated. @@ -16,45 +16,63 @@ ERROR: node is still EOpNull! 0:3 1.000000 0:3 1.000000 0:3 1.000000 -0:7 Function Definition: fun2(vf4; ( temp uint) +0:7 Function Definition: fun2(vf4; ( temp 4-component vector of float) 0:7 Function Parameters: -0:7 'col' ( in 4-component vector of float) +0:7 'col' ( const (read only) 4-component vector of float) 0:? Sequence 0:8 Branch: Return with expression -0:8 Constant: -0:8 7 (const uint) -0:12 Function Definition: fun4(u1;u1; ( temp 4-component vector of float) +0:8 Construct vec4 ( temp 4-component vector of float) +0:8 Comma ( temp float) +0:8 Comma ( temp float) +0:8 Comma ( temp float) +0:8 Constant: +0:8 1.000000 +0:8 Constant: +0:8 2.000000 +0:8 Constant: +0:8 3.000000 +0:8 Constant: +0:8 4.000000 +0:12 Function Definition: fun3(vf4; ( temp uint) 0:12 Function Parameters: -0:12 'id1' ( in uint) -0:12 'id2' ( uniform uint) +0:12 'col' ( const (read only) 4-component vector of float) 0:? Sequence 0:13 Branch: Return with expression -0:13 Construct vec4 ( temp 4-component vector of float) -0:13 Convert uint to float ( temp float) -0:13 component-wise multiply ( temp uint) -0:13 'id1' ( in uint) -0:13 'id2' ( uniform uint) -0:17 Function Definition: fun1(i1; ( temp 4-component vector of float) +0:13 Constant: +0:13 7 (const uint) +0:17 Function Definition: fun4(u1;u1; ( temp 4-component vector of float) 0:17 Function Parameters: -0:17 'index' ( in int) +0:17 'id1' ( in uint) +0:17 'id2' ( uniform uint) 0:? Sequence -0:18 Sequence -0:18 move second child to first child ( temp uint) -0:18 'entityId' ( temp uint) -0:18 Function Call: fun2(vf4; ( temp uint) -0:18 Function Call: fun0( ( temp 4-component vector of float) -0:19 Branch: Return with expression -0:19 Function Call: fun4(u1;u1; ( temp 4-component vector of float) -0:19 'entityId' ( temp uint) -0:19 'entityId' ( temp uint) -0:23 Function Definition: @main( ( temp int) -0:23 Function Parameters: -0:23 Function Definition: main( ( temp void) -0:23 Function Parameters: +0:18 Branch: Return with expression +0:18 Construct vec4 ( temp 4-component vector of float) +0:18 Convert uint to float ( temp float) +0:18 component-wise multiply ( temp uint) +0:18 'id1' ( in uint) +0:18 'id2' ( uniform uint) +0:22 Function Definition: fun1(i1; ( temp 4-component vector of float) +0:22 Function Parameters: +0:22 'index' ( in int) 0:? Sequence -0:23 move second child to first child ( temp int) +0:23 Sequence +0:23 move second child to first child ( temp uint) +0:23 'entityId' ( temp uint) +0:23 Function Call: fun3(vf4; ( temp uint) +0:23 Function Call: fun2(vf4; ( temp 4-component vector of float) +0:23 Function Call: fun0( ( temp 4-component vector of float) +0:24 Branch: Return with expression +0:24 Function Call: fun4(u1;u1; ( temp 4-component vector of float) +0:24 'entityId' ( temp uint) +0:24 'entityId' ( temp uint) +0:28 Function Definition: @main( ( temp int) +0:28 Function Parameters: +0:28 Function Definition: main( ( temp void) +0:28 Function Parameters: +0:? Sequence +0:28 move second child to first child ( temp int) 0:? '@entryPointOutput' (layout( location=0) out int) -0:23 Function Call: @main( ( temp int) +0:28 Function Call: @main( ( temp int) 0:? Linker Objects 0:? '@entryPointOutput' (layout( location=0) out int) @@ -74,45 +92,63 @@ ERROR: node is still EOpNull! 0:3 1.000000 0:3 1.000000 0:3 1.000000 -0:7 Function Definition: fun2(vf4; ( temp uint) +0:7 Function Definition: fun2(vf4; ( temp 4-component vector of float) 0:7 Function Parameters: -0:7 'col' ( in 4-component vector of float) +0:7 'col' ( const (read only) 4-component vector of float) 0:? Sequence 0:8 Branch: Return with expression -0:8 Constant: -0:8 7 (const uint) -0:12 Function Definition: fun4(u1;u1; ( temp 4-component vector of float) +0:8 Construct vec4 ( temp 4-component vector of float) +0:8 Comma ( temp float) +0:8 Comma ( temp float) +0:8 Comma ( temp float) +0:8 Constant: +0:8 1.000000 +0:8 Constant: +0:8 2.000000 +0:8 Constant: +0:8 3.000000 +0:8 Constant: +0:8 4.000000 +0:12 Function Definition: fun3(vf4; ( temp uint) 0:12 Function Parameters: -0:12 'id1' ( in uint) -0:12 'id2' ( uniform uint) +0:12 'col' ( const (read only) 4-component vector of float) 0:? Sequence 0:13 Branch: Return with expression -0:13 Construct vec4 ( temp 4-component vector of float) -0:13 Convert uint to float ( temp float) -0:13 component-wise multiply ( temp uint) -0:13 'id1' ( in uint) -0:13 'id2' ( uniform uint) -0:17 Function Definition: fun1(i1; ( temp 4-component vector of float) +0:13 Constant: +0:13 7 (const uint) +0:17 Function Definition: fun4(u1;u1; ( temp 4-component vector of float) 0:17 Function Parameters: -0:17 'index' ( in int) +0:17 'id1' ( in uint) +0:17 'id2' ( uniform uint) +0:? Sequence +0:18 Branch: Return with expression +0:18 Construct vec4 ( temp 4-component vector of float) +0:18 Convert uint to float ( temp float) +0:18 component-wise multiply ( temp uint) +0:18 'id1' ( in uint) +0:18 'id2' ( uniform uint) +0:22 Function Definition: fun1(i1; ( temp 4-component vector of float) +0:22 Function Parameters: +0:22 'index' ( in int) 0:? Sequence -0:18 Sequence -0:18 move second child to first child ( temp uint) -0:18 'entityId' ( temp uint) -0:18 Function Call: fun2(vf4; ( temp uint) -0:18 Function Call: fun0( ( temp 4-component vector of float) -0:19 Branch: Return with expression -0:19 Function Call: fun4(u1;u1; ( temp 4-component vector of float) -0:19 'entityId' ( temp uint) -0:19 'entityId' ( temp uint) -0:23 Function Definition: @main( ( temp int) -0:23 Function Parameters: -0:23 Function Definition: main( ( temp void) -0:23 Function Parameters: +0:23 Sequence +0:23 move second child to first child ( temp uint) +0:23 'entityId' ( temp uint) +0:23 Function Call: fun3(vf4; ( temp uint) +0:23 Function Call: fun2(vf4; ( temp 4-component vector of float) +0:23 Function Call: fun0( ( temp 4-component vector of float) +0:24 Branch: Return with expression +0:24 Function Call: fun4(u1;u1; ( temp 4-component vector of float) +0:24 'entityId' ( temp uint) +0:24 'entityId' ( temp uint) +0:28 Function Definition: @main( ( temp int) +0:28 Function Parameters: +0:28 Function Definition: main( ( temp void) +0:28 Function Parameters: 0:? Sequence -0:23 move second child to first child ( temp int) +0:28 move second child to first child ( temp int) 0:? '@entryPointOutput' (layout( location=0) out int) -0:23 Function Call: @main( ( temp int) +0:28 Function Call: @main( ( temp int) 0:? Linker Objects 0:? '@entryPointOutput' (layout( location=0) out int) diff --git a/Test/baseResults/hlsl.gather.array.dx10.frag.out b/Test/baseResults/hlsl.gather.array.dx10.frag.out index e39d5a2a74..13b7ebb34a 100644 --- a/Test/baseResults/hlsl.gather.array.dx10.frag.out +++ b/Test/baseResults/hlsl.gather.array.dx10.frag.out @@ -262,7 +262,7 @@ using depth_any 0:? '@entryPointOutput.Color' (layout( location=0) out 4-component vector of float) // Module Version 10000 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 124 Capability Shader diff --git a/Test/baseResults/hlsl.gather.basic.dx10.frag.out b/Test/baseResults/hlsl.gather.basic.dx10.frag.out index 99efd61455..0aa00f7412 100644 --- a/Test/baseResults/hlsl.gather.basic.dx10.frag.out +++ b/Test/baseResults/hlsl.gather.basic.dx10.frag.out @@ -258,7 +258,7 @@ using depth_any 0:? '@entryPointOutput.Color' (layout( location=0) out 4-component vector of float) // Module Version 10000 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 135 Capability Shader diff --git a/Test/baseResults/hlsl.gather.basic.dx10.vert.out b/Test/baseResults/hlsl.gather.basic.dx10.vert.out index 96525e0c9b..d743074e0c 100644 --- a/Test/baseResults/hlsl.gather.basic.dx10.vert.out +++ b/Test/baseResults/hlsl.gather.basic.dx10.vert.out @@ -220,7 +220,7 @@ Shader version: 500 0:? '@entryPointOutput.Pos' ( out 4-component vector of float Position) // Module Version 10000 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 126 Capability Shader diff --git a/Test/baseResults/hlsl.gather.offset.dx10.frag.out b/Test/baseResults/hlsl.gather.offset.dx10.frag.out index 59bd8da88b..9656db5712 100644 --- a/Test/baseResults/hlsl.gather.offset.dx10.frag.out +++ b/Test/baseResults/hlsl.gather.offset.dx10.frag.out @@ -208,7 +208,7 @@ using depth_any 0:? '@entryPointOutput.Color' (layout( location=0) out 4-component vector of float) // Module Version 10000 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 114 Capability Shader diff --git a/Test/baseResults/hlsl.gather.offsetarray.dx10.frag.out b/Test/baseResults/hlsl.gather.offsetarray.dx10.frag.out index 942bd923b3..2e6221a2a1 100644 --- a/Test/baseResults/hlsl.gather.offsetarray.dx10.frag.out +++ b/Test/baseResults/hlsl.gather.offsetarray.dx10.frag.out @@ -202,7 +202,7 @@ using depth_any 0:? '@entryPointOutput.Color' (layout( location=0) out 4-component vector of float) // Module Version 10000 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 97 Capability Shader diff --git a/Test/baseResults/hlsl.gatherRGBA.array.dx10.frag.out b/Test/baseResults/hlsl.gatherRGBA.array.dx10.frag.out index 75ea03686c..904aaece92 100644 --- a/Test/baseResults/hlsl.gatherRGBA.array.dx10.frag.out +++ b/Test/baseResults/hlsl.gatherRGBA.array.dx10.frag.out @@ -750,7 +750,7 @@ using depth_any 0:? '@entryPointOutput.Color' (layout( location=0) out 4-component vector of float) // Module Version 10000 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 255 Capability Shader diff --git a/Test/baseResults/hlsl.gatherRGBA.basic.dx10.frag.out b/Test/baseResults/hlsl.gatherRGBA.basic.dx10.frag.out index 886ad73784..f8fa2f4607 100644 --- a/Test/baseResults/hlsl.gatherRGBA.basic.dx10.frag.out +++ b/Test/baseResults/hlsl.gatherRGBA.basic.dx10.frag.out @@ -758,7 +758,7 @@ using depth_any 0:? '@entryPointOutput.Color' (layout( location=0) out 4-component vector of float) // Module Version 10000 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 265 Capability Shader diff --git a/Test/baseResults/hlsl.gatherRGBA.offset.dx10.frag.out b/Test/baseResults/hlsl.gatherRGBA.offset.dx10.frag.out index b86cd222af..63cb39fcb6 100644 --- a/Test/baseResults/hlsl.gatherRGBA.offset.dx10.frag.out +++ b/Test/baseResults/hlsl.gatherRGBA.offset.dx10.frag.out @@ -1263,7 +1263,7 @@ using depth_any Validation failed // Module Version 10000 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 399 Capability Shader diff --git a/Test/baseResults/hlsl.gatherRGBA.offsetarray.dx10.frag.out b/Test/baseResults/hlsl.gatherRGBA.offsetarray.dx10.frag.out index 1fa728a7f6..da83e01170 100644 --- a/Test/baseResults/hlsl.gatherRGBA.offsetarray.dx10.frag.out +++ b/Test/baseResults/hlsl.gatherRGBA.offsetarray.dx10.frag.out @@ -1255,7 +1255,7 @@ using depth_any Validation failed // Module Version 10000 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 389 Capability Shader diff --git a/Test/baseResults/hlsl.gathercmpRGBA.offset.dx10.frag.out b/Test/baseResults/hlsl.gathercmpRGBA.offset.dx10.frag.out index a858f15d8f..ff834ec45c 100644 --- a/Test/baseResults/hlsl.gathercmpRGBA.offset.dx10.frag.out +++ b/Test/baseResults/hlsl.gathercmpRGBA.offset.dx10.frag.out @@ -456,7 +456,7 @@ using depth_any 0:? '@entryPointOutput.Color' (layout( location=0) out 4-component vector of float) // Module Version 10000 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 164 Capability Shader diff --git a/Test/baseResults/hlsl.getdimensions.dx10.frag.out b/Test/baseResults/hlsl.getdimensions.dx10.frag.out index ba023599e7..9e1d5439c4 100644 --- a/Test/baseResults/hlsl.getdimensions.dx10.frag.out +++ b/Test/baseResults/hlsl.getdimensions.dx10.frag.out @@ -2318,7 +2318,7 @@ using depth_any 0:? '@entryPointOutput.Color' (layout( location=0) out 4-component vector of float) // Module Version 10000 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 550 Capability Shader diff --git a/Test/baseResults/hlsl.getdimensions.dx10.vert.out b/Test/baseResults/hlsl.getdimensions.dx10.vert.out index 96a1cc1558..a7d27a867e 100644 --- a/Test/baseResults/hlsl.getdimensions.dx10.vert.out +++ b/Test/baseResults/hlsl.getdimensions.dx10.vert.out @@ -116,7 +116,7 @@ Shader version: 500 0:? '@entryPointOutput.Pos' ( out 4-component vector of float Position) // Module Version 10000 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 48 Capability Shader diff --git a/Test/baseResults/hlsl.getdimensions.rw.dx10.frag.out b/Test/baseResults/hlsl.getdimensions.rw.dx10.frag.out index 1cce0cc03f..7af13b232b 100644 --- a/Test/baseResults/hlsl.getdimensions.rw.dx10.frag.out +++ b/Test/baseResults/hlsl.getdimensions.rw.dx10.frag.out @@ -718,7 +718,7 @@ using depth_any 0:? '@entryPointOutput.Color' (layout( location=0) out 4-component vector of float) // Module Version 10000 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 232 Capability Shader diff --git a/Test/baseResults/hlsl.getsampleposition.dx10.frag.out b/Test/baseResults/hlsl.getsampleposition.dx10.frag.out index 5c49931883..f08a91cd49 100644 --- a/Test/baseResults/hlsl.getsampleposition.dx10.frag.out +++ b/Test/baseResults/hlsl.getsampleposition.dx10.frag.out @@ -580,7 +580,7 @@ using depth_any 0:? 'sample' (layout( location=0) flat in int) // Module Version 10000 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 198 Capability Shader diff --git a/Test/baseResults/hlsl.global-const-init.frag.out b/Test/baseResults/hlsl.global-const-init.frag.out index 26895bba70..0510b3e83e 100644 --- a/Test/baseResults/hlsl.global-const-init.frag.out +++ b/Test/baseResults/hlsl.global-const-init.frag.out @@ -102,7 +102,7 @@ gl_FragCoord origin is upper left 0:? '@entryPointOutput' (layout( location=0) out 4-component vector of float) // Module Version 10000 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 50 Capability Shader diff --git a/Test/baseResults/hlsl.groupid.comp.out b/Test/baseResults/hlsl.groupid.comp.out index bf39d11a40..39c5fede0b 100644 --- a/Test/baseResults/hlsl.groupid.comp.out +++ b/Test/baseResults/hlsl.groupid.comp.out @@ -82,7 +82,7 @@ local_size = (8, 8, 1) 0:? 'vGroupId' ( in 3-component vector of uint WorkGroupID) // Module Version 10000 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 37 Capability Shader diff --git a/Test/baseResults/hlsl.gs-hs-mix.tesc.out b/Test/baseResults/hlsl.gs-hs-mix.tesc.out index c9496ac1e5..5071a4745f 100644 --- a/Test/baseResults/hlsl.gs-hs-mix.tesc.out +++ b/Test/baseResults/hlsl.gs-hs-mix.tesc.out @@ -986,7 +986,7 @@ triangle order = ccw 0:? '@patchConstantOutput.NormalWS[2]' (layout( location=3) patch out 3-component vector of float) // Module Version 10000 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 236 Capability Tessellation diff --git a/Test/baseResults/hlsl.hlslOffset.vert.out b/Test/baseResults/hlsl.hlslOffset.vert.out index 09545c88cc..0f7b09bfe9 100644 --- a/Test/baseResults/hlsl.hlslOffset.vert.out +++ b/Test/baseResults/hlsl.hlslOffset.vert.out @@ -26,7 +26,7 @@ Shader version: 500 0:? 'anon@0' (layout( row_major std140) uniform block{layout( row_major std140) uniform float m0, layout( row_major std140) uniform 3-component vector of float m4, layout( row_major std140) uniform float m16, layout( row_major std140 offset=20) uniform 3-component vector of float m20, layout( row_major std140 offset=36) uniform 3-component vector of float m36, layout( row_major std140 offset=56) uniform 2-component vector of float m56, layout( row_major std140) uniform float m64, layout( row_major std140) uniform 2-component vector of float m68, layout( row_major std140) uniform float m76, layout( row_major std140) uniform float m80, layout( row_major std140) uniform 1-element array of 2-component vector of float m96}) // Module Version 10000 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 18 Capability Shader diff --git a/Test/baseResults/hlsl.hull.1.tesc.out b/Test/baseResults/hlsl.hull.1.tesc.out index cba0f8bb24..4188942065 100644 --- a/Test/baseResults/hlsl.hull.1.tesc.out +++ b/Test/baseResults/hlsl.hull.1.tesc.out @@ -324,7 +324,7 @@ vertex spacing = equal_spacing 0:? '@patchConstantOutput.edges' ( patch out 4-element array of float TessLevelOuter) // Module Version 10000 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 104 Capability Tessellation diff --git a/Test/baseResults/hlsl.hull.2.tesc.out b/Test/baseResults/hlsl.hull.2.tesc.out index 4e8a50c2d9..0d08b68197 100644 --- a/Test/baseResults/hlsl.hull.2.tesc.out +++ b/Test/baseResults/hlsl.hull.2.tesc.out @@ -320,7 +320,7 @@ vertex spacing = equal_spacing 0:? '@patchConstantOutput.edges' ( patch out 4-element array of float TessLevelOuter) // Module Version 10000 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 106 Capability Tessellation diff --git a/Test/baseResults/hlsl.hull.3.tesc.out b/Test/baseResults/hlsl.hull.3.tesc.out index f40a79e49d..808edd3a8e 100644 --- a/Test/baseResults/hlsl.hull.3.tesc.out +++ b/Test/baseResults/hlsl.hull.3.tesc.out @@ -320,7 +320,7 @@ vertex spacing = equal_spacing 0:? '@patchConstantOutput.edges' ( patch out 4-element array of float TessLevelOuter) // Module Version 10000 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 106 Capability Tessellation diff --git a/Test/baseResults/hlsl.hull.4.tesc.out b/Test/baseResults/hlsl.hull.4.tesc.out index aa766ed481..bffc464626 100644 --- a/Test/baseResults/hlsl.hull.4.tesc.out +++ b/Test/baseResults/hlsl.hull.4.tesc.out @@ -458,7 +458,7 @@ triangle order = cw 0:? '@patchConstantOutput.fInsideTessFactor' ( patch out 2-element array of float TessLevelInner) // Module Version 10000 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 124 Capability Tessellation diff --git a/Test/baseResults/hlsl.hull.6.tesc.out b/Test/baseResults/hlsl.hull.6.tesc.out index efb6e5b1b9..b673a8c588 100644 --- a/Test/baseResults/hlsl.hull.6.tesc.out +++ b/Test/baseResults/hlsl.hull.6.tesc.out @@ -450,7 +450,7 @@ triangle order = ccw 0:? '@patchConstantOutput.Edges' ( patch out 4-element array of float TessLevelOuter) // Module Version 10000 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 142 Capability Tessellation diff --git a/Test/baseResults/hlsl.hull.ctrlpt-1.tesc.out b/Test/baseResults/hlsl.hull.ctrlpt-1.tesc.out index 70881e9ba7..4e706c0f60 100644 --- a/Test/baseResults/hlsl.hull.ctrlpt-1.tesc.out +++ b/Test/baseResults/hlsl.hull.ctrlpt-1.tesc.out @@ -472,7 +472,7 @@ triangle order = cw 0:? '@patchConstantOutput.flInFactor' ( patch out 2-element array of float TessLevelInner) // Module Version 10000 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 135 Capability Tessellation diff --git a/Test/baseResults/hlsl.hull.ctrlpt-2.tesc.out b/Test/baseResults/hlsl.hull.ctrlpt-2.tesc.out index d59e16304d..fd7cf0b641 100644 --- a/Test/baseResults/hlsl.hull.ctrlpt-2.tesc.out +++ b/Test/baseResults/hlsl.hull.ctrlpt-2.tesc.out @@ -490,7 +490,7 @@ triangle order = cw 0:? '@patchConstantOutput.flInFactor' ( patch out 2-element array of float TessLevelInner) // Module Version 10000 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 137 Capability Tessellation diff --git a/Test/baseResults/hlsl.hull.void.tesc.out b/Test/baseResults/hlsl.hull.void.tesc.out index 224936040f..244d1fc7c3 100644 --- a/Test/baseResults/hlsl.hull.void.tesc.out +++ b/Test/baseResults/hlsl.hull.void.tesc.out @@ -184,7 +184,7 @@ triangle order = ccw 0:? 'InvocationId' ( in uint InvocationID) // Module Version 10000 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 67 Capability Tessellation diff --git a/Test/baseResults/hlsl.identifier.sample.frag.out b/Test/baseResults/hlsl.identifier.sample.frag.out index e0a89aa4a4..bde7fdb8a4 100644 --- a/Test/baseResults/hlsl.identifier.sample.frag.out +++ b/Test/baseResults/hlsl.identifier.sample.frag.out @@ -86,7 +86,7 @@ gl_FragCoord origin is upper left 0:? '@entryPointOutput' (layout( location=0) out 4-component vector of float) // Module Version 10000 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 33 Capability Shader diff --git a/Test/baseResults/hlsl.if.frag.out b/Test/baseResults/hlsl.if.frag.out index e77c7ac37b..fafad92f6f 100644 --- a/Test/baseResults/hlsl.if.frag.out +++ b/Test/baseResults/hlsl.if.frag.out @@ -240,7 +240,7 @@ gl_FragCoord origin is upper left 0:? 'input' (layout( location=0) in 4-component vector of float) // Module Version 10000 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 117 Capability Shader diff --git a/Test/baseResults/hlsl.imagefetch-subvec4.comp.out b/Test/baseResults/hlsl.imagefetch-subvec4.comp.out index ff201eb077..6573820d2d 100644 --- a/Test/baseResults/hlsl.imagefetch-subvec4.comp.out +++ b/Test/baseResults/hlsl.imagefetch-subvec4.comp.out @@ -410,7 +410,7 @@ local_size = (8, 8, 8) 0:? 'tid' ( in 3-component vector of uint GlobalInvocationID) // Module Version 10000 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 186 Capability Shader diff --git a/Test/baseResults/hlsl.imageload-subvec4.comp.out b/Test/baseResults/hlsl.imageload-subvec4.comp.out index 4d038a1958..d54075f166 100644 --- a/Test/baseResults/hlsl.imageload-subvec4.comp.out +++ b/Test/baseResults/hlsl.imageload-subvec4.comp.out @@ -266,7 +266,7 @@ local_size = (8, 8, 8) 0:? 'tid' ( in 3-component vector of uint GlobalInvocationID) // Module Version 10000 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 138 Capability Shader diff --git a/Test/baseResults/hlsl.implicitBool.frag.out b/Test/baseResults/hlsl.implicitBool.frag.out index dd93b7f1e3..381e835c9a 100644 --- a/Test/baseResults/hlsl.implicitBool.frag.out +++ b/Test/baseResults/hlsl.implicitBool.frag.out @@ -332,7 +332,7 @@ gl_FragCoord origin is upper left 0:? '@entryPointOutput' (layout( location=0) out 4-component vector of float) // Module Version 10000 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 139 Capability Shader diff --git a/Test/baseResults/hlsl.include.vert.out b/Test/baseResults/hlsl.include.vert.out index f46658d294..95a5b906f5 100644 --- a/Test/baseResults/hlsl.include.vert.out +++ b/Test/baseResults/hlsl.include.vert.out @@ -1,6 +1,6 @@ ../Test/hlsl.include.vert // Module Version 10000 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 44 Capability Shader diff --git a/Test/baseResults/hlsl.inf.vert.out b/Test/baseResults/hlsl.inf.vert.out index bb9a18497c..50f6d56d9b 100644 --- a/Test/baseResults/hlsl.inf.vert.out +++ b/Test/baseResults/hlsl.inf.vert.out @@ -112,7 +112,7 @@ Shader version: 500 0:? '@entryPointOutput' ( out 4-component vector of float Position) // Module Version 10000 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 37 Capability Shader diff --git a/Test/baseResults/hlsl.init.frag.out b/Test/baseResults/hlsl.init.frag.out index f604f0a096..35a89f045b 100644 --- a/Test/baseResults/hlsl.init.frag.out +++ b/Test/baseResults/hlsl.init.frag.out @@ -331,7 +331,7 @@ gl_FragCoord origin is upper left 0:? 'anon@0' (layout( row_major std140) uniform block{layout( row_major std140) uniform float a, layout( row_major std140) uniform float b, layout( row_major std140) uniform float c}) // Module Version 10000 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 110 Capability Shader diff --git a/Test/baseResults/hlsl.init2.frag.out b/Test/baseResults/hlsl.init2.frag.out index 5039333ba0..bf6d64614b 100644 --- a/Test/baseResults/hlsl.init2.frag.out +++ b/Test/baseResults/hlsl.init2.frag.out @@ -31,29 +31,20 @@ gl_FragCoord origin is upper left 0:20 10.000000 0:22 Constant: 0:22 10.000000 -0:25 Sequence -0:25 move second child to first child ( temp float) -0:25 'n' ( temp float) -0:25 Constant: -0:25 0.000000 0:26 Sequence -0:26 move second child to first child ( temp 8-element array of 3-component vector of float) -0:26 'a' ( const (read only) 8-element array of 3-component vector of float) -0:26 Construct vec3 ( temp 8-element array of 3-component vector of float) -0:27 vector-scale ( temp 3-component vector of float) -0:27 Constant: -0:27 0.577350 -0:27 0.577350 -0:27 0.577350 -0:27 add second child into first child ( temp float) -0:27 'n' ( temp float) -0:27 Constant: -0:27 1.000000 +0:26 move second child to first child ( temp float) +0:26 'n' ( temp float) +0:26 Constant: +0:26 0.000000 +0:27 Sequence +0:27 move second child to first child ( temp 8-element array of 3-component vector of float) +0:27 'a' ( const (read only) 8-element array of 3-component vector of float) +0:27 Construct vec3 ( temp 8-element array of 3-component vector of float) 0:28 vector-scale ( temp 3-component vector of float) 0:28 Constant: -0:28 -0.577350 -0:28 -0.577350 -0:28 -0.577350 +0:28 0.577350 +0:28 0.577350 +0:28 0.577350 0:28 add second child into first child ( temp float) 0:28 'n' ( temp float) 0:28 Constant: @@ -62,7 +53,7 @@ gl_FragCoord origin is upper left 0:29 Constant: 0:29 -0.577350 0:29 -0.577350 -0:29 0.577350 +0:29 -0.577350 0:29 add second child into first child ( temp float) 0:29 'n' ( temp float) 0:29 Constant: @@ -70,8 +61,8 @@ gl_FragCoord origin is upper left 0:30 vector-scale ( temp 3-component vector of float) 0:30 Constant: 0:30 -0.577350 -0:30 0.577350 0:30 -0.577350 +0:30 0.577350 0:30 add second child into first child ( temp float) 0:30 'n' ( temp float) 0:30 Constant: @@ -80,16 +71,16 @@ gl_FragCoord origin is upper left 0:31 Constant: 0:31 -0.577350 0:31 0.577350 -0:31 0.577350 +0:31 -0.577350 0:31 add second child into first child ( temp float) 0:31 'n' ( temp float) 0:31 Constant: 0:31 1.000000 0:32 vector-scale ( temp 3-component vector of float) 0:32 Constant: -0:32 0.577350 -0:32 -0.577350 0:32 -0.577350 +0:32 0.577350 +0:32 0.577350 0:32 add second child into first child ( temp float) 0:32 'n' ( temp float) 0:32 Constant: @@ -98,7 +89,7 @@ gl_FragCoord origin is upper left 0:33 Constant: 0:33 0.577350 0:33 -0.577350 -0:33 0.577350 +0:33 -0.577350 0:33 add second child into first child ( temp float) 0:33 'n' ( temp float) 0:33 Constant: @@ -106,38 +97,38 @@ gl_FragCoord origin is upper left 0:34 vector-scale ( temp 3-component vector of float) 0:34 Constant: 0:34 0.577350 -0:34 0.577350 0:34 -0.577350 +0:34 0.577350 0:34 add second child into first child ( temp float) 0:34 'n' ( temp float) 0:34 Constant: 0:34 1.000000 -0:36 Sequence -0:36 move second child to first child ( temp structure{ temp 3-component vector of float a}) -0:36 'oneNonConst' ( const (read only) structure{ temp 3-component vector of float a}) -0:36 Construct structure ( temp structure{ temp 3-component vector of float a}) -0:36 vector-scale ( temp 3-component vector of float) -0:36 Constant: -0:36 -0.577350 -0:36 0.577350 -0:36 0.577350 -0:36 add second child into first child ( temp float) -0:36 'n' ( temp float) -0:36 Constant: -0:36 1.000000 -0:38 Sequence -0:38 move second child to first child ( temp structure{ temp 3-component vector of float a, temp 3-component vector of float b}) -0:38 'twoNonConst' ( const (read only) structure{ temp 3-component vector of float a, temp 3-component vector of float b}) -0:38 Construct structure ( temp structure{ temp 3-component vector of float a, temp 3-component vector of float b}) -0:38 vector-scale ( temp 3-component vector of float) -0:38 Constant: -0:38 -0.577350 -0:38 0.577350 -0:38 0.577350 -0:38 add second child into first child ( temp float) -0:38 'n' ( temp float) -0:38 Constant: -0:38 1.000000 +0:35 vector-scale ( temp 3-component vector of float) +0:35 Constant: +0:35 0.577350 +0:35 0.577350 +0:35 -0.577350 +0:35 add second child into first child ( temp float) +0:35 'n' ( temp float) +0:35 Constant: +0:35 1.000000 +0:37 Sequence +0:37 move second child to first child ( temp structure{ temp 3-component vector of float a}) +0:37 'oneNonConst' ( const (read only) structure{ temp 3-component vector of float a}) +0:37 Construct structure ( temp structure{ temp 3-component vector of float a}) +0:37 vector-scale ( temp 3-component vector of float) +0:37 Constant: +0:37 -0.577350 +0:37 0.577350 +0:37 0.577350 +0:37 add second child into first child ( temp float) +0:37 'n' ( temp float) +0:37 Constant: +0:37 1.000000 +0:39 Sequence +0:39 move second child to first child ( temp structure{ temp 3-component vector of float a, temp 3-component vector of float b}) +0:39 'twoNonConst' ( const (read only) structure{ temp 3-component vector of float a, temp 3-component vector of float b}) +0:39 Construct structure ( temp structure{ temp 3-component vector of float a, temp 3-component vector of float b}) 0:39 vector-scale ( temp 3-component vector of float) 0:39 Constant: 0:39 -0.577350 @@ -147,32 +138,41 @@ gl_FragCoord origin is upper left 0:39 'n' ( temp float) 0:39 Constant: 0:39 1.000000 -0:45 Function Definition: @main( ( temp structure{ temp 4-component vector of float color}) -0:45 Function Parameters: +0:40 vector-scale ( temp 3-component vector of float) +0:40 Constant: +0:40 -0.577350 +0:40 0.577350 +0:40 0.577350 +0:40 add second child into first child ( temp float) +0:40 'n' ( temp float) +0:40 Constant: +0:40 1.000000 +0:46 Function Definition: @main( ( temp structure{ temp 4-component vector of float color}) +0:46 Function Parameters: 0:? Sequence -0:46 Function Call: Test1( ( temp void) -0:49 move second child to first child ( temp 4-component vector of float) -0:49 color: direct index for structure ( temp 4-component vector of float) -0:49 'ps_output' ( temp structure{ temp 4-component vector of float color}) -0:49 Constant: -0:49 0 (const int) -0:49 Constant: -0:49 1.000000 -0:49 1.000000 -0:49 1.000000 -0:49 1.000000 -0:50 Branch: Return with expression -0:50 'ps_output' ( temp structure{ temp 4-component vector of float color}) -0:45 Function Definition: main( ( temp void) -0:45 Function Parameters: +0:47 Function Call: Test1( ( temp void) +0:50 move second child to first child ( temp 4-component vector of float) +0:50 color: direct index for structure ( temp 4-component vector of float) +0:50 'ps_output' ( temp structure{ temp 4-component vector of float color}) +0:50 Constant: +0:50 0 (const int) +0:50 Constant: +0:50 1.000000 +0:50 1.000000 +0:50 1.000000 +0:50 1.000000 +0:51 Branch: Return with expression +0:51 'ps_output' ( temp structure{ temp 4-component vector of float color}) +0:46 Function Definition: main( ( temp void) +0:46 Function Parameters: 0:? Sequence -0:45 Sequence -0:45 move second child to first child ( temp 4-component vector of float) +0:46 Sequence +0:46 move second child to first child ( temp 4-component vector of float) 0:? '@entryPointOutput.color' (layout( location=0) out 4-component vector of float) -0:45 color: direct index for structure ( temp 4-component vector of float) -0:45 Function Call: @main( ( temp structure{ temp 4-component vector of float color}) -0:45 Constant: -0:45 0 (const int) +0:46 color: direct index for structure ( temp 4-component vector of float) +0:46 Function Call: @main( ( temp structure{ temp 4-component vector of float color}) +0:46 Constant: +0:46 0 (const int) 0:? Linker Objects 0:? '@entryPointOutput.color' (layout( location=0) out 4-component vector of float) @@ -212,29 +212,20 @@ gl_FragCoord origin is upper left 0:20 10.000000 0:22 Constant: 0:22 10.000000 -0:25 Sequence -0:25 move second child to first child ( temp float) -0:25 'n' ( temp float) -0:25 Constant: -0:25 0.000000 0:26 Sequence -0:26 move second child to first child ( temp 8-element array of 3-component vector of float) -0:26 'a' ( const (read only) 8-element array of 3-component vector of float) -0:26 Construct vec3 ( temp 8-element array of 3-component vector of float) -0:27 vector-scale ( temp 3-component vector of float) -0:27 Constant: -0:27 0.577350 -0:27 0.577350 -0:27 0.577350 -0:27 add second child into first child ( temp float) -0:27 'n' ( temp float) -0:27 Constant: -0:27 1.000000 +0:26 move second child to first child ( temp float) +0:26 'n' ( temp float) +0:26 Constant: +0:26 0.000000 +0:27 Sequence +0:27 move second child to first child ( temp 8-element array of 3-component vector of float) +0:27 'a' ( const (read only) 8-element array of 3-component vector of float) +0:27 Construct vec3 ( temp 8-element array of 3-component vector of float) 0:28 vector-scale ( temp 3-component vector of float) 0:28 Constant: -0:28 -0.577350 -0:28 -0.577350 -0:28 -0.577350 +0:28 0.577350 +0:28 0.577350 +0:28 0.577350 0:28 add second child into first child ( temp float) 0:28 'n' ( temp float) 0:28 Constant: @@ -243,7 +234,7 @@ gl_FragCoord origin is upper left 0:29 Constant: 0:29 -0.577350 0:29 -0.577350 -0:29 0.577350 +0:29 -0.577350 0:29 add second child into first child ( temp float) 0:29 'n' ( temp float) 0:29 Constant: @@ -251,8 +242,8 @@ gl_FragCoord origin is upper left 0:30 vector-scale ( temp 3-component vector of float) 0:30 Constant: 0:30 -0.577350 -0:30 0.577350 0:30 -0.577350 +0:30 0.577350 0:30 add second child into first child ( temp float) 0:30 'n' ( temp float) 0:30 Constant: @@ -261,16 +252,16 @@ gl_FragCoord origin is upper left 0:31 Constant: 0:31 -0.577350 0:31 0.577350 -0:31 0.577350 +0:31 -0.577350 0:31 add second child into first child ( temp float) 0:31 'n' ( temp float) 0:31 Constant: 0:31 1.000000 0:32 vector-scale ( temp 3-component vector of float) 0:32 Constant: -0:32 0.577350 -0:32 -0.577350 0:32 -0.577350 +0:32 0.577350 +0:32 0.577350 0:32 add second child into first child ( temp float) 0:32 'n' ( temp float) 0:32 Constant: @@ -279,7 +270,7 @@ gl_FragCoord origin is upper left 0:33 Constant: 0:33 0.577350 0:33 -0.577350 -0:33 0.577350 +0:33 -0.577350 0:33 add second child into first child ( temp float) 0:33 'n' ( temp float) 0:33 Constant: @@ -287,38 +278,38 @@ gl_FragCoord origin is upper left 0:34 vector-scale ( temp 3-component vector of float) 0:34 Constant: 0:34 0.577350 -0:34 0.577350 0:34 -0.577350 +0:34 0.577350 0:34 add second child into first child ( temp float) 0:34 'n' ( temp float) 0:34 Constant: 0:34 1.000000 -0:36 Sequence -0:36 move second child to first child ( temp structure{ temp 3-component vector of float a}) -0:36 'oneNonConst' ( const (read only) structure{ temp 3-component vector of float a}) -0:36 Construct structure ( temp structure{ temp 3-component vector of float a}) -0:36 vector-scale ( temp 3-component vector of float) -0:36 Constant: -0:36 -0.577350 -0:36 0.577350 -0:36 0.577350 -0:36 add second child into first child ( temp float) -0:36 'n' ( temp float) -0:36 Constant: -0:36 1.000000 -0:38 Sequence -0:38 move second child to first child ( temp structure{ temp 3-component vector of float a, temp 3-component vector of float b}) -0:38 'twoNonConst' ( const (read only) structure{ temp 3-component vector of float a, temp 3-component vector of float b}) -0:38 Construct structure ( temp structure{ temp 3-component vector of float a, temp 3-component vector of float b}) -0:38 vector-scale ( temp 3-component vector of float) -0:38 Constant: -0:38 -0.577350 -0:38 0.577350 -0:38 0.577350 -0:38 add second child into first child ( temp float) -0:38 'n' ( temp float) -0:38 Constant: -0:38 1.000000 +0:35 vector-scale ( temp 3-component vector of float) +0:35 Constant: +0:35 0.577350 +0:35 0.577350 +0:35 -0.577350 +0:35 add second child into first child ( temp float) +0:35 'n' ( temp float) +0:35 Constant: +0:35 1.000000 +0:37 Sequence +0:37 move second child to first child ( temp structure{ temp 3-component vector of float a}) +0:37 'oneNonConst' ( const (read only) structure{ temp 3-component vector of float a}) +0:37 Construct structure ( temp structure{ temp 3-component vector of float a}) +0:37 vector-scale ( temp 3-component vector of float) +0:37 Constant: +0:37 -0.577350 +0:37 0.577350 +0:37 0.577350 +0:37 add second child into first child ( temp float) +0:37 'n' ( temp float) +0:37 Constant: +0:37 1.000000 +0:39 Sequence +0:39 move second child to first child ( temp structure{ temp 3-component vector of float a, temp 3-component vector of float b}) +0:39 'twoNonConst' ( const (read only) structure{ temp 3-component vector of float a, temp 3-component vector of float b}) +0:39 Construct structure ( temp structure{ temp 3-component vector of float a, temp 3-component vector of float b}) 0:39 vector-scale ( temp 3-component vector of float) 0:39 Constant: 0:39 -0.577350 @@ -328,37 +319,46 @@ gl_FragCoord origin is upper left 0:39 'n' ( temp float) 0:39 Constant: 0:39 1.000000 -0:45 Function Definition: @main( ( temp structure{ temp 4-component vector of float color}) -0:45 Function Parameters: +0:40 vector-scale ( temp 3-component vector of float) +0:40 Constant: +0:40 -0.577350 +0:40 0.577350 +0:40 0.577350 +0:40 add second child into first child ( temp float) +0:40 'n' ( temp float) +0:40 Constant: +0:40 1.000000 +0:46 Function Definition: @main( ( temp structure{ temp 4-component vector of float color}) +0:46 Function Parameters: 0:? Sequence -0:46 Function Call: Test1( ( temp void) -0:49 move second child to first child ( temp 4-component vector of float) -0:49 color: direct index for structure ( temp 4-component vector of float) -0:49 'ps_output' ( temp structure{ temp 4-component vector of float color}) -0:49 Constant: -0:49 0 (const int) -0:49 Constant: -0:49 1.000000 -0:49 1.000000 -0:49 1.000000 -0:49 1.000000 -0:50 Branch: Return with expression -0:50 'ps_output' ( temp structure{ temp 4-component vector of float color}) -0:45 Function Definition: main( ( temp void) -0:45 Function Parameters: +0:47 Function Call: Test1( ( temp void) +0:50 move second child to first child ( temp 4-component vector of float) +0:50 color: direct index for structure ( temp 4-component vector of float) +0:50 'ps_output' ( temp structure{ temp 4-component vector of float color}) +0:50 Constant: +0:50 0 (const int) +0:50 Constant: +0:50 1.000000 +0:50 1.000000 +0:50 1.000000 +0:50 1.000000 +0:51 Branch: Return with expression +0:51 'ps_output' ( temp structure{ temp 4-component vector of float color}) +0:46 Function Definition: main( ( temp void) +0:46 Function Parameters: 0:? Sequence -0:45 Sequence -0:45 move second child to first child ( temp 4-component vector of float) +0:46 Sequence +0:46 move second child to first child ( temp 4-component vector of float) 0:? '@entryPointOutput.color' (layout( location=0) out 4-component vector of float) -0:45 color: direct index for structure ( temp 4-component vector of float) -0:45 Function Call: @main( ( temp structure{ temp 4-component vector of float color}) -0:45 Constant: -0:45 0 (const int) +0:46 color: direct index for structure ( temp 4-component vector of float) +0:46 Function Call: @main( ( temp structure{ temp 4-component vector of float color}) +0:46 Constant: +0:46 0 (const int) 0:? Linker Objects 0:? '@entryPointOutput.color' (layout( location=0) out 4-component vector of float) // Module Version 10000 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 112 Capability Shader diff --git a/Test/baseResults/hlsl.inoutquals.frag.out b/Test/baseResults/hlsl.inoutquals.frag.out index 25186cb0ef..931208b9be 100644 --- a/Test/baseResults/hlsl.inoutquals.frag.out +++ b/Test/baseResults/hlsl.inoutquals.frag.out @@ -214,7 +214,7 @@ using depth_any 0:? 'sampleMask' ( out 1-element array of int SampleMaskIn) // Module Version 10000 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 92 Capability Shader diff --git a/Test/baseResults/hlsl.instance.geom.out b/Test/baseResults/hlsl.instance.geom.out index 5fbffd9ac0..f2299ee741 100644 --- a/Test/baseResults/hlsl.instance.geom.out +++ b/Test/baseResults/hlsl.instance.geom.out @@ -282,7 +282,7 @@ output primitive = triangle_strip 0:? 'output.m_color' (layout( location=0) out 4-component vector of float) // Module Version 10000 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 86 Capability Geometry diff --git a/Test/baseResults/hlsl.int.dot.frag.out b/Test/baseResults/hlsl.int.dot.frag.out index 3272cb4c77..5c7edbb926 100644 --- a/Test/baseResults/hlsl.int.dot.frag.out +++ b/Test/baseResults/hlsl.int.dot.frag.out @@ -224,7 +224,7 @@ gl_FragCoord origin is upper left 0:? '@entryPointOutput' (layout( location=0) out 4-component vector of float) // Module Version 10300 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 84 Capability Shader diff --git a/Test/baseResults/hlsl.intrinsic.frexp.frag.out b/Test/baseResults/hlsl.intrinsic.frexp.frag.out index 1595a6094a..c0c9109bb1 100644 --- a/Test/baseResults/hlsl.intrinsic.frexp.frag.out +++ b/Test/baseResults/hlsl.intrinsic.frexp.frag.out @@ -190,7 +190,7 @@ gl_FragCoord origin is upper left 0:? '@entryPointOutput.color' (layout( location=0) out 4-component vector of float) // Module Version 10000 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 98 Capability Shader diff --git a/Test/baseResults/hlsl.intrinsic.frexp.vert.out b/Test/baseResults/hlsl.intrinsic.frexp.vert.out index 0418ed6cd3..41bb429a78 100644 --- a/Test/baseResults/hlsl.intrinsic.frexp.vert.out +++ b/Test/baseResults/hlsl.intrinsic.frexp.vert.out @@ -113,7 +113,7 @@ Shader version: 500 0:? Linker Objects // Module Version 10000 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 78 Capability Shader diff --git a/Test/baseResults/hlsl.intrinsics.barriers.comp.out b/Test/baseResults/hlsl.intrinsics.barriers.comp.out index abb9650f61..4dfe8e0cd2 100644 --- a/Test/baseResults/hlsl.intrinsics.barriers.comp.out +++ b/Test/baseResults/hlsl.intrinsics.barriers.comp.out @@ -40,7 +40,7 @@ local_size = (1, 1, 1) 0:? Linker Objects // Module Version 10000 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 15 Capability Shader diff --git a/Test/baseResults/hlsl.intrinsics.comp.out b/Test/baseResults/hlsl.intrinsics.comp.out index bce3d149d3..c02e58ee4d 100644 --- a/Test/baseResults/hlsl.intrinsics.comp.out +++ b/Test/baseResults/hlsl.intrinsics.comp.out @@ -2,334 +2,337 @@ hlsl.intrinsics.comp Shader version: 500 local_size = (1, 1, 1) 0:? Sequence -0:17 Function Definition: ComputeShaderFunctionS(f1;f1;f1;u1;u1; ( temp float) -0:17 Function Parameters: -0:17 'inF0' ( in float) -0:17 'inF1' ( in float) -0:17 'inF2' ( in float) -0:17 'inU0' ( in uint) -0:17 'inU1' ( in uint) +0:19 Function Definition: ComputeShaderFunctionS(f1;f1;f1;u1;u1; ( temp float) +0:19 Function Parameters: +0:19 'inF0' ( in float) +0:19 'inF1' ( in float) +0:19 'inF2' ( in float) +0:19 'inU0' ( in uint) +0:19 'inU1' ( in uint) 0:? Sequence -0:21 all ( temp bool) -0:21 Convert float to bool ( temp bool) -0:21 'inF0' ( in float) -0:24 AtomicAdd ( temp uint) -0:24 'gs_ua' ( shared uint) -0:24 'gs_ub' ( shared uint) -0:25 move second child to first child ( temp uint) -0:25 'out_u1' ( temp uint) -0:25 AtomicAdd ( temp uint) -0:25 'gs_ua' ( shared uint) -0:25 'gs_ub' ( shared uint) -0:26 AtomicAnd ( temp uint) +0:23 all ( temp bool) +0:23 Convert float to bool ( temp bool) +0:23 'inF0' ( in float) +0:26 AtomicAdd ( temp uint) 0:26 'gs_ua' ( shared uint) 0:26 'gs_ub' ( shared uint) 0:27 move second child to first child ( temp uint) 0:27 'out_u1' ( temp uint) -0:27 AtomicAnd ( temp uint) +0:27 AtomicAdd ( temp uint) 0:27 'gs_ua' ( shared uint) 0:27 'gs_ub' ( shared uint) -0:28 move second child to first child ( temp uint) -0:28 'out_u1' ( temp uint) -0:28 AtomicCompSwap ( temp uint) -0:28 'gs_ua' ( shared uint) -0:28 'gs_ub' ( shared uint) -0:28 'gs_uc' ( shared uint) +0:28 AtomicAnd ( temp uint) +0:28 'gs_ua' ( shared uint) +0:28 'gs_ub' ( shared uint) 0:29 move second child to first child ( temp uint) 0:29 'out_u1' ( temp uint) -0:29 AtomicExchange ( temp uint) +0:29 AtomicAnd ( temp uint) 0:29 'gs_ua' ( shared uint) 0:29 'gs_ub' ( shared uint) -0:30 AtomicMax ( temp uint) -0:30 'gs_ua' ( shared uint) -0:30 'gs_ub' ( shared uint) +0:30 move second child to first child ( temp uint) +0:30 'out_u1' ( temp uint) +0:30 AtomicCompSwap ( temp uint) +0:30 'gs_ua' ( shared uint) +0:30 'gs_ub' ( shared uint) +0:30 'gs_uc' ( shared uint) 0:31 move second child to first child ( temp uint) 0:31 'out_u1' ( temp uint) -0:31 AtomicMax ( temp uint) +0:31 AtomicExchange ( temp uint) 0:31 'gs_ua' ( shared uint) 0:31 'gs_ub' ( shared uint) -0:32 AtomicMin ( temp uint) +0:32 AtomicMax ( temp uint) 0:32 'gs_ua' ( shared uint) 0:32 'gs_ub' ( shared uint) 0:33 move second child to first child ( temp uint) 0:33 'out_u1' ( temp uint) -0:33 AtomicMin ( temp uint) +0:33 AtomicMax ( temp uint) 0:33 'gs_ua' ( shared uint) 0:33 'gs_ub' ( shared uint) -0:34 AtomicOr ( temp uint) +0:34 AtomicMin ( temp uint) 0:34 'gs_ua' ( shared uint) 0:34 'gs_ub' ( shared uint) 0:35 move second child to first child ( temp uint) 0:35 'out_u1' ( temp uint) -0:35 AtomicOr ( temp uint) +0:35 AtomicMin ( temp uint) 0:35 'gs_ua' ( shared uint) 0:35 'gs_ub' ( shared uint) -0:36 AtomicXor ( temp uint) +0:36 AtomicOr ( temp uint) 0:36 'gs_ua' ( shared uint) 0:36 'gs_ub' ( shared uint) 0:37 move second child to first child ( temp uint) 0:37 'out_u1' ( temp uint) -0:37 AtomicXor ( temp uint) +0:37 AtomicOr ( temp uint) 0:37 'gs_ua' ( shared uint) 0:37 'gs_ub' ( shared uint) -0:41 Branch: Return with expression -0:41 Constant: -0:41 0.000000 -0:45 Function Definition: ComputeShaderFunction1(vf1;vf1;vf1; ( temp 1-component vector of float) -0:45 Function Parameters: -0:45 'inF0' ( in 1-component vector of float) -0:45 'inF1' ( in 1-component vector of float) -0:45 'inF2' ( in 1-component vector of float) +0:38 AtomicXor ( temp uint) +0:38 'gs_ua' ( shared uint) +0:38 'gs_ub' ( shared uint) +0:39 move second child to first child ( temp uint) +0:39 'out_u1' ( temp uint) +0:39 AtomicXor ( temp uint) +0:39 'gs_ua' ( shared uint) +0:39 'gs_ub' ( shared uint) +0:41 AtomicAdd ( temp float) +0:41 'gs_fa' ( shared float) +0:41 'gs_fb' ( shared float) +0:45 Branch: Return with expression +0:45 Constant: +0:45 0.000000 +0:49 Function Definition: ComputeShaderFunction1(vf1;vf1;vf1; ( temp 1-component vector of float) +0:49 Function Parameters: +0:49 'inF0' ( in 1-component vector of float) +0:49 'inF1' ( in 1-component vector of float) +0:49 'inF2' ( in 1-component vector of float) 0:? Sequence -0:47 Branch: Return with expression -0:47 Constant: -0:47 0.000000 -0:51 Function Definition: ComputeShaderFunction2(vf2;vf2;vf2;vu2;vu2; ( temp 2-component vector of float) -0:51 Function Parameters: -0:51 'inF0' ( in 2-component vector of float) -0:51 'inF1' ( in 2-component vector of float) -0:51 'inF2' ( in 2-component vector of float) -0:51 'inU0' ( in 2-component vector of uint) -0:51 'inU1' ( in 2-component vector of uint) +0:51 Branch: Return with expression +0:51 Constant: +0:51 0.000000 +0:55 Function Definition: ComputeShaderFunction2(vf2;vf2;vf2;vu2;vu2; ( temp 2-component vector of float) +0:55 Function Parameters: +0:55 'inF0' ( in 2-component vector of float) +0:55 'inF1' ( in 2-component vector of float) +0:55 'inF2' ( in 2-component vector of float) +0:55 'inU0' ( in 2-component vector of uint) +0:55 'inU1' ( in 2-component vector of uint) 0:? Sequence -0:55 all ( temp bool) -0:55 Convert float to bool ( temp 2-component vector of bool) -0:55 'inF0' ( in 2-component vector of float) -0:58 AtomicAdd ( temp 2-component vector of uint) -0:58 'gs_ua2' ( shared 2-component vector of uint) -0:58 'gs_ub2' ( shared 2-component vector of uint) -0:59 move second child to first child ( temp 2-component vector of uint) -0:59 'out_u2' ( temp 2-component vector of uint) -0:59 AtomicAdd ( temp 2-component vector of uint) -0:59 'gs_ua2' ( shared 2-component vector of uint) -0:59 'gs_ub2' ( shared 2-component vector of uint) -0:60 AtomicAnd ( temp 2-component vector of uint) -0:60 'gs_ua2' ( shared 2-component vector of uint) -0:60 'gs_ub2' ( shared 2-component vector of uint) -0:61 move second child to first child ( temp 2-component vector of uint) -0:61 'out_u2' ( temp 2-component vector of uint) -0:61 AtomicAnd ( temp 2-component vector of uint) -0:61 'gs_ua2' ( shared 2-component vector of uint) -0:61 'gs_ub2' ( shared 2-component vector of uint) -0:62 move second child to first child ( temp 2-component vector of uint) -0:62 'out_u2' ( temp 2-component vector of uint) -0:62 AtomicCompSwap ( temp 2-component vector of uint) -0:62 'gs_ua2' ( shared 2-component vector of uint) -0:62 'gs_ub2' ( shared 2-component vector of uint) -0:62 'gs_uc2' ( shared 2-component vector of uint) +0:59 all ( temp bool) +0:59 Convert float to bool ( temp 2-component vector of bool) +0:59 'inF0' ( in 2-component vector of float) +0:62 AtomicAdd ( temp 2-component vector of uint) +0:62 'gs_ua2' ( shared 2-component vector of uint) +0:62 'gs_ub2' ( shared 2-component vector of uint) 0:63 move second child to first child ( temp 2-component vector of uint) 0:63 'out_u2' ( temp 2-component vector of uint) -0:63 AtomicExchange ( temp 2-component vector of uint) +0:63 AtomicAdd ( temp 2-component vector of uint) 0:63 'gs_ua2' ( shared 2-component vector of uint) 0:63 'gs_ub2' ( shared 2-component vector of uint) -0:64 AtomicMax ( temp 2-component vector of uint) +0:64 AtomicAnd ( temp 2-component vector of uint) 0:64 'gs_ua2' ( shared 2-component vector of uint) 0:64 'gs_ub2' ( shared 2-component vector of uint) 0:65 move second child to first child ( temp 2-component vector of uint) 0:65 'out_u2' ( temp 2-component vector of uint) -0:65 AtomicMax ( temp 2-component vector of uint) +0:65 AtomicAnd ( temp 2-component vector of uint) 0:65 'gs_ua2' ( shared 2-component vector of uint) 0:65 'gs_ub2' ( shared 2-component vector of uint) -0:66 AtomicMin ( temp 2-component vector of uint) -0:66 'gs_ua2' ( shared 2-component vector of uint) -0:66 'gs_ub2' ( shared 2-component vector of uint) +0:66 move second child to first child ( temp 2-component vector of uint) +0:66 'out_u2' ( temp 2-component vector of uint) +0:66 AtomicCompSwap ( temp 2-component vector of uint) +0:66 'gs_ua2' ( shared 2-component vector of uint) +0:66 'gs_ub2' ( shared 2-component vector of uint) +0:66 'gs_uc2' ( shared 2-component vector of uint) 0:67 move second child to first child ( temp 2-component vector of uint) 0:67 'out_u2' ( temp 2-component vector of uint) -0:67 AtomicMin ( temp 2-component vector of uint) +0:67 AtomicExchange ( temp 2-component vector of uint) 0:67 'gs_ua2' ( shared 2-component vector of uint) 0:67 'gs_ub2' ( shared 2-component vector of uint) -0:68 AtomicOr ( temp 2-component vector of uint) +0:68 AtomicMax ( temp 2-component vector of uint) 0:68 'gs_ua2' ( shared 2-component vector of uint) 0:68 'gs_ub2' ( shared 2-component vector of uint) 0:69 move second child to first child ( temp 2-component vector of uint) 0:69 'out_u2' ( temp 2-component vector of uint) -0:69 AtomicOr ( temp 2-component vector of uint) +0:69 AtomicMax ( temp 2-component vector of uint) 0:69 'gs_ua2' ( shared 2-component vector of uint) 0:69 'gs_ub2' ( shared 2-component vector of uint) -0:70 AtomicXor ( temp 2-component vector of uint) +0:70 AtomicMin ( temp 2-component vector of uint) 0:70 'gs_ua2' ( shared 2-component vector of uint) 0:70 'gs_ub2' ( shared 2-component vector of uint) 0:71 move second child to first child ( temp 2-component vector of uint) 0:71 'out_u2' ( temp 2-component vector of uint) -0:71 AtomicXor ( temp 2-component vector of uint) +0:71 AtomicMin ( temp 2-component vector of uint) 0:71 'gs_ua2' ( shared 2-component vector of uint) 0:71 'gs_ub2' ( shared 2-component vector of uint) -0:74 Branch: Return with expression -0:74 Constant: -0:74 1.000000 -0:74 2.000000 -0:78 Function Definition: ComputeShaderFunction3(vf3;vf3;vf3;vu3;vu3; ( temp 3-component vector of float) -0:78 Function Parameters: -0:78 'inF0' ( in 3-component vector of float) -0:78 'inF1' ( in 3-component vector of float) -0:78 'inF2' ( in 3-component vector of float) -0:78 'inU0' ( in 3-component vector of uint) -0:78 'inU1' ( in 3-component vector of uint) +0:72 AtomicOr ( temp 2-component vector of uint) +0:72 'gs_ua2' ( shared 2-component vector of uint) +0:72 'gs_ub2' ( shared 2-component vector of uint) +0:73 move second child to first child ( temp 2-component vector of uint) +0:73 'out_u2' ( temp 2-component vector of uint) +0:73 AtomicOr ( temp 2-component vector of uint) +0:73 'gs_ua2' ( shared 2-component vector of uint) +0:73 'gs_ub2' ( shared 2-component vector of uint) +0:74 AtomicXor ( temp 2-component vector of uint) +0:74 'gs_ua2' ( shared 2-component vector of uint) +0:74 'gs_ub2' ( shared 2-component vector of uint) +0:75 move second child to first child ( temp 2-component vector of uint) +0:75 'out_u2' ( temp 2-component vector of uint) +0:75 AtomicXor ( temp 2-component vector of uint) +0:75 'gs_ua2' ( shared 2-component vector of uint) +0:75 'gs_ub2' ( shared 2-component vector of uint) +0:78 Branch: Return with expression +0:78 Constant: +0:78 1.000000 +0:78 2.000000 +0:82 Function Definition: ComputeShaderFunction3(vf3;vf3;vf3;vu3;vu3; ( temp 3-component vector of float) +0:82 Function Parameters: +0:82 'inF0' ( in 3-component vector of float) +0:82 'inF1' ( in 3-component vector of float) +0:82 'inF2' ( in 3-component vector of float) +0:82 'inU0' ( in 3-component vector of uint) +0:82 'inU1' ( in 3-component vector of uint) 0:? Sequence -0:82 all ( temp bool) -0:82 Convert float to bool ( temp 3-component vector of bool) -0:82 'inF0' ( in 3-component vector of float) -0:85 AtomicAdd ( temp 3-component vector of uint) -0:85 'gs_ua3' ( shared 3-component vector of uint) -0:85 'gs_ub3' ( shared 3-component vector of uint) -0:86 move second child to first child ( temp 3-component vector of uint) -0:86 'out_u3' ( temp 3-component vector of uint) -0:86 AtomicAdd ( temp 3-component vector of uint) -0:86 'gs_ua3' ( shared 3-component vector of uint) -0:86 'gs_ub3' ( shared 3-component vector of uint) -0:87 AtomicAnd ( temp 3-component vector of uint) -0:87 'gs_ua3' ( shared 3-component vector of uint) -0:87 'gs_ub3' ( shared 3-component vector of uint) -0:88 move second child to first child ( temp 3-component vector of uint) -0:88 'out_u3' ( temp 3-component vector of uint) -0:88 AtomicAnd ( temp 3-component vector of uint) -0:88 'gs_ua3' ( shared 3-component vector of uint) -0:88 'gs_ub3' ( shared 3-component vector of uint) -0:89 move second child to first child ( temp 3-component vector of uint) -0:89 'out_u3' ( temp 3-component vector of uint) -0:89 AtomicCompSwap ( temp 3-component vector of uint) -0:89 'gs_ua3' ( shared 3-component vector of uint) -0:89 'gs_ub3' ( shared 3-component vector of uint) -0:89 'gs_uc3' ( shared 3-component vector of uint) +0:86 all ( temp bool) +0:86 Convert float to bool ( temp 3-component vector of bool) +0:86 'inF0' ( in 3-component vector of float) +0:89 AtomicAdd ( temp 3-component vector of uint) +0:89 'gs_ua3' ( shared 3-component vector of uint) +0:89 'gs_ub3' ( shared 3-component vector of uint) 0:90 move second child to first child ( temp 3-component vector of uint) 0:90 'out_u3' ( temp 3-component vector of uint) -0:90 AtomicExchange ( temp 3-component vector of uint) +0:90 AtomicAdd ( temp 3-component vector of uint) 0:90 'gs_ua3' ( shared 3-component vector of uint) 0:90 'gs_ub3' ( shared 3-component vector of uint) -0:91 AtomicMax ( temp 3-component vector of uint) +0:91 AtomicAnd ( temp 3-component vector of uint) 0:91 'gs_ua3' ( shared 3-component vector of uint) 0:91 'gs_ub3' ( shared 3-component vector of uint) 0:92 move second child to first child ( temp 3-component vector of uint) 0:92 'out_u3' ( temp 3-component vector of uint) -0:92 AtomicMax ( temp 3-component vector of uint) +0:92 AtomicAnd ( temp 3-component vector of uint) 0:92 'gs_ua3' ( shared 3-component vector of uint) 0:92 'gs_ub3' ( shared 3-component vector of uint) -0:93 AtomicMin ( temp 3-component vector of uint) -0:93 'gs_ua3' ( shared 3-component vector of uint) -0:93 'gs_ub3' ( shared 3-component vector of uint) +0:93 move second child to first child ( temp 3-component vector of uint) +0:93 'out_u3' ( temp 3-component vector of uint) +0:93 AtomicCompSwap ( temp 3-component vector of uint) +0:93 'gs_ua3' ( shared 3-component vector of uint) +0:93 'gs_ub3' ( shared 3-component vector of uint) +0:93 'gs_uc3' ( shared 3-component vector of uint) 0:94 move second child to first child ( temp 3-component vector of uint) 0:94 'out_u3' ( temp 3-component vector of uint) -0:94 AtomicMin ( temp 3-component vector of uint) +0:94 AtomicExchange ( temp 3-component vector of uint) 0:94 'gs_ua3' ( shared 3-component vector of uint) 0:94 'gs_ub3' ( shared 3-component vector of uint) -0:95 AtomicOr ( temp 3-component vector of uint) +0:95 AtomicMax ( temp 3-component vector of uint) 0:95 'gs_ua3' ( shared 3-component vector of uint) 0:95 'gs_ub3' ( shared 3-component vector of uint) 0:96 move second child to first child ( temp 3-component vector of uint) 0:96 'out_u3' ( temp 3-component vector of uint) -0:96 AtomicOr ( temp 3-component vector of uint) +0:96 AtomicMax ( temp 3-component vector of uint) 0:96 'gs_ua3' ( shared 3-component vector of uint) 0:96 'gs_ub3' ( shared 3-component vector of uint) -0:97 AtomicXor ( temp 3-component vector of uint) +0:97 AtomicMin ( temp 3-component vector of uint) 0:97 'gs_ua3' ( shared 3-component vector of uint) 0:97 'gs_ub3' ( shared 3-component vector of uint) 0:98 move second child to first child ( temp 3-component vector of uint) 0:98 'out_u3' ( temp 3-component vector of uint) -0:98 AtomicXor ( temp 3-component vector of uint) +0:98 AtomicMin ( temp 3-component vector of uint) 0:98 'gs_ua3' ( shared 3-component vector of uint) 0:98 'gs_ub3' ( shared 3-component vector of uint) -0:101 Branch: Return with expression -0:101 Constant: -0:101 1.000000 -0:101 2.000000 -0:101 3.000000 -0:105 Function Definition: @ComputeShaderFunction(vf4;vf4;vf4;vu4;vu4; ( temp 4-component vector of float) -0:105 Function Parameters: -0:105 'inF0' ( in 4-component vector of float) -0:105 'inF1' ( in 4-component vector of float) -0:105 'inF2' ( in 4-component vector of float) -0:105 'inU0' ( in 4-component vector of uint) -0:105 'inU1' ( in 4-component vector of uint) +0:99 AtomicOr ( temp 3-component vector of uint) +0:99 'gs_ua3' ( shared 3-component vector of uint) +0:99 'gs_ub3' ( shared 3-component vector of uint) +0:100 move second child to first child ( temp 3-component vector of uint) +0:100 'out_u3' ( temp 3-component vector of uint) +0:100 AtomicOr ( temp 3-component vector of uint) +0:100 'gs_ua3' ( shared 3-component vector of uint) +0:100 'gs_ub3' ( shared 3-component vector of uint) +0:101 AtomicXor ( temp 3-component vector of uint) +0:101 'gs_ua3' ( shared 3-component vector of uint) +0:101 'gs_ub3' ( shared 3-component vector of uint) +0:102 move second child to first child ( temp 3-component vector of uint) +0:102 'out_u3' ( temp 3-component vector of uint) +0:102 AtomicXor ( temp 3-component vector of uint) +0:102 'gs_ua3' ( shared 3-component vector of uint) +0:102 'gs_ub3' ( shared 3-component vector of uint) +0:105 Branch: Return with expression +0:105 Constant: +0:105 1.000000 +0:105 2.000000 +0:105 3.000000 +0:109 Function Definition: @ComputeShaderFunction(vf4;vf4;vf4;vu4;vu4; ( temp 4-component vector of float) +0:109 Function Parameters: +0:109 'inF0' ( in 4-component vector of float) +0:109 'inF1' ( in 4-component vector of float) +0:109 'inF2' ( in 4-component vector of float) +0:109 'inU0' ( in 4-component vector of uint) +0:109 'inU1' ( in 4-component vector of uint) 0:? Sequence -0:109 all ( temp bool) -0:109 Convert float to bool ( temp 4-component vector of bool) -0:109 'inF0' ( in 4-component vector of float) -0:112 AtomicAdd ( temp 4-component vector of uint) -0:112 'gs_ua4' ( shared 4-component vector of uint) -0:112 'gs_ub4' ( shared 4-component vector of uint) -0:113 move second child to first child ( temp 4-component vector of uint) -0:113 'out_u4' ( temp 4-component vector of uint) -0:113 AtomicAdd ( temp 4-component vector of uint) -0:113 'gs_ua4' ( shared 4-component vector of uint) -0:113 'gs_ub4' ( shared 4-component vector of uint) -0:114 AtomicAnd ( temp 4-component vector of uint) -0:114 'gs_ua4' ( shared 4-component vector of uint) -0:114 'gs_ub4' ( shared 4-component vector of uint) -0:115 move second child to first child ( temp 4-component vector of uint) -0:115 'out_u4' ( temp 4-component vector of uint) -0:115 AtomicAnd ( temp 4-component vector of uint) -0:115 'gs_ua4' ( shared 4-component vector of uint) -0:115 'gs_ub4' ( shared 4-component vector of uint) -0:116 move second child to first child ( temp 4-component vector of uint) -0:116 'out_u4' ( temp 4-component vector of uint) -0:116 AtomicCompSwap ( temp 4-component vector of uint) -0:116 'gs_ua4' ( shared 4-component vector of uint) -0:116 'gs_ub4' ( shared 4-component vector of uint) -0:116 'gs_uc4' ( shared 4-component vector of uint) +0:113 all ( temp bool) +0:113 Convert float to bool ( temp 4-component vector of bool) +0:113 'inF0' ( in 4-component vector of float) +0:116 AtomicAdd ( temp 4-component vector of uint) +0:116 'gs_ua4' ( shared 4-component vector of uint) +0:116 'gs_ub4' ( shared 4-component vector of uint) 0:117 move second child to first child ( temp 4-component vector of uint) 0:117 'out_u4' ( temp 4-component vector of uint) -0:117 AtomicExchange ( temp 4-component vector of uint) +0:117 AtomicAdd ( temp 4-component vector of uint) 0:117 'gs_ua4' ( shared 4-component vector of uint) 0:117 'gs_ub4' ( shared 4-component vector of uint) -0:118 AtomicMax ( temp 4-component vector of uint) +0:118 AtomicAnd ( temp 4-component vector of uint) 0:118 'gs_ua4' ( shared 4-component vector of uint) 0:118 'gs_ub4' ( shared 4-component vector of uint) 0:119 move second child to first child ( temp 4-component vector of uint) 0:119 'out_u4' ( temp 4-component vector of uint) -0:119 AtomicMax ( temp 4-component vector of uint) +0:119 AtomicAnd ( temp 4-component vector of uint) 0:119 'gs_ua4' ( shared 4-component vector of uint) 0:119 'gs_ub4' ( shared 4-component vector of uint) -0:120 AtomicMin ( temp 4-component vector of uint) -0:120 'gs_ua4' ( shared 4-component vector of uint) -0:120 'gs_ub4' ( shared 4-component vector of uint) +0:120 move second child to first child ( temp 4-component vector of uint) +0:120 'out_u4' ( temp 4-component vector of uint) +0:120 AtomicCompSwap ( temp 4-component vector of uint) +0:120 'gs_ua4' ( shared 4-component vector of uint) +0:120 'gs_ub4' ( shared 4-component vector of uint) +0:120 'gs_uc4' ( shared 4-component vector of uint) 0:121 move second child to first child ( temp 4-component vector of uint) 0:121 'out_u4' ( temp 4-component vector of uint) -0:121 AtomicMin ( temp 4-component vector of uint) +0:121 AtomicExchange ( temp 4-component vector of uint) 0:121 'gs_ua4' ( shared 4-component vector of uint) 0:121 'gs_ub4' ( shared 4-component vector of uint) -0:122 AtomicOr ( temp 4-component vector of uint) +0:122 AtomicMax ( temp 4-component vector of uint) 0:122 'gs_ua4' ( shared 4-component vector of uint) 0:122 'gs_ub4' ( shared 4-component vector of uint) 0:123 move second child to first child ( temp 4-component vector of uint) 0:123 'out_u4' ( temp 4-component vector of uint) -0:123 AtomicOr ( temp 4-component vector of uint) +0:123 AtomicMax ( temp 4-component vector of uint) 0:123 'gs_ua4' ( shared 4-component vector of uint) 0:123 'gs_ub4' ( shared 4-component vector of uint) -0:124 AtomicXor ( temp 4-component vector of uint) +0:124 AtomicMin ( temp 4-component vector of uint) 0:124 'gs_ua4' ( shared 4-component vector of uint) 0:124 'gs_ub4' ( shared 4-component vector of uint) 0:125 move second child to first child ( temp 4-component vector of uint) 0:125 'out_u4' ( temp 4-component vector of uint) -0:125 AtomicXor ( temp 4-component vector of uint) +0:125 AtomicMin ( temp 4-component vector of uint) 0:125 'gs_ua4' ( shared 4-component vector of uint) 0:125 'gs_ub4' ( shared 4-component vector of uint) -0:128 Branch: Return with expression -0:128 Constant: -0:128 1.000000 -0:128 2.000000 -0:128 3.000000 -0:128 4.000000 -0:105 Function Definition: ComputeShaderFunction( ( temp void) -0:105 Function Parameters: +0:126 AtomicOr ( temp 4-component vector of uint) +0:126 'gs_ua4' ( shared 4-component vector of uint) +0:126 'gs_ub4' ( shared 4-component vector of uint) +0:127 move second child to first child ( temp 4-component vector of uint) +0:127 'out_u4' ( temp 4-component vector of uint) +0:127 AtomicOr ( temp 4-component vector of uint) +0:127 'gs_ua4' ( shared 4-component vector of uint) +0:127 'gs_ub4' ( shared 4-component vector of uint) +0:128 AtomicXor ( temp 4-component vector of uint) +0:128 'gs_ua4' ( shared 4-component vector of uint) +0:128 'gs_ub4' ( shared 4-component vector of uint) +0:129 move second child to first child ( temp 4-component vector of uint) +0:129 'out_u4' ( temp 4-component vector of uint) +0:129 AtomicXor ( temp 4-component vector of uint) +0:129 'gs_ua4' ( shared 4-component vector of uint) +0:129 'gs_ub4' ( shared 4-component vector of uint) +0:132 Branch: Return with expression +0:132 Constant: +0:132 1.000000 +0:132 2.000000 +0:132 3.000000 +0:132 4.000000 +0:109 Function Definition: ComputeShaderFunction( ( temp void) +0:109 Function Parameters: 0:? Sequence -0:105 move second child to first child ( temp 4-component vector of float) +0:109 move second child to first child ( temp 4-component vector of float) 0:? 'inF0' ( temp 4-component vector of float) 0:? 'inF0' (layout( location=0) in 4-component vector of float) -0:105 move second child to first child ( temp 4-component vector of float) +0:109 move second child to first child ( temp 4-component vector of float) 0:? 'inF1' ( temp 4-component vector of float) 0:? 'inF1' (layout( location=1) in 4-component vector of float) -0:105 move second child to first child ( temp 4-component vector of float) +0:109 move second child to first child ( temp 4-component vector of float) 0:? 'inF2' ( temp 4-component vector of float) 0:? 'inF2' (layout( location=2) in 4-component vector of float) -0:105 move second child to first child ( temp 4-component vector of uint) +0:109 move second child to first child ( temp 4-component vector of uint) 0:? 'inU0' ( temp 4-component vector of uint) 0:? 'inU0' (layout( location=3) in 4-component vector of uint) -0:105 move second child to first child ( temp 4-component vector of uint) +0:109 move second child to first child ( temp 4-component vector of uint) 0:? 'inU1' ( temp 4-component vector of uint) 0:? 'inU1' (layout( location=4) in 4-component vector of uint) -0:105 move second child to first child ( temp 4-component vector of float) +0:109 move second child to first child ( temp 4-component vector of float) 0:? '@entryPointOutput' (layout( location=0) out 4-component vector of float) -0:105 Function Call: @ComputeShaderFunction(vf4;vf4;vf4;vu4;vu4; ( temp 4-component vector of float) +0:109 Function Call: @ComputeShaderFunction(vf4;vf4;vf4;vu4;vu4; ( temp 4-component vector of float) 0:? 'inF0' ( temp 4-component vector of float) 0:? 'inF1' ( temp 4-component vector of float) 0:? 'inF2' ( temp 4-component vector of float) @@ -348,6 +351,8 @@ local_size = (1, 1, 1) 0:? 'gs_ua4' ( shared 4-component vector of uint) 0:? 'gs_ub4' ( shared 4-component vector of uint) 0:? 'gs_uc4' ( shared 4-component vector of uint) +0:? 'gs_fa' ( shared float) +0:? 'gs_fb' ( shared float) 0:? '@entryPointOutput' (layout( location=0) out 4-component vector of float) 0:? 'inF0' (layout( location=0) in 4-component vector of float) 0:? 'inF1' (layout( location=1) in 4-component vector of float) @@ -362,334 +367,337 @@ Linked compute stage: Shader version: 500 local_size = (1, 1, 1) 0:? Sequence -0:17 Function Definition: ComputeShaderFunctionS(f1;f1;f1;u1;u1; ( temp float) -0:17 Function Parameters: -0:17 'inF0' ( in float) -0:17 'inF1' ( in float) -0:17 'inF2' ( in float) -0:17 'inU0' ( in uint) -0:17 'inU1' ( in uint) +0:19 Function Definition: ComputeShaderFunctionS(f1;f1;f1;u1;u1; ( temp float) +0:19 Function Parameters: +0:19 'inF0' ( in float) +0:19 'inF1' ( in float) +0:19 'inF2' ( in float) +0:19 'inU0' ( in uint) +0:19 'inU1' ( in uint) 0:? Sequence -0:21 all ( temp bool) -0:21 Convert float to bool ( temp bool) -0:21 'inF0' ( in float) -0:24 AtomicAdd ( temp uint) -0:24 'gs_ua' ( shared uint) -0:24 'gs_ub' ( shared uint) -0:25 move second child to first child ( temp uint) -0:25 'out_u1' ( temp uint) -0:25 AtomicAdd ( temp uint) -0:25 'gs_ua' ( shared uint) -0:25 'gs_ub' ( shared uint) -0:26 AtomicAnd ( temp uint) +0:23 all ( temp bool) +0:23 Convert float to bool ( temp bool) +0:23 'inF0' ( in float) +0:26 AtomicAdd ( temp uint) 0:26 'gs_ua' ( shared uint) 0:26 'gs_ub' ( shared uint) 0:27 move second child to first child ( temp uint) 0:27 'out_u1' ( temp uint) -0:27 AtomicAnd ( temp uint) +0:27 AtomicAdd ( temp uint) 0:27 'gs_ua' ( shared uint) 0:27 'gs_ub' ( shared uint) -0:28 move second child to first child ( temp uint) -0:28 'out_u1' ( temp uint) -0:28 AtomicCompSwap ( temp uint) -0:28 'gs_ua' ( shared uint) -0:28 'gs_ub' ( shared uint) -0:28 'gs_uc' ( shared uint) +0:28 AtomicAnd ( temp uint) +0:28 'gs_ua' ( shared uint) +0:28 'gs_ub' ( shared uint) 0:29 move second child to first child ( temp uint) 0:29 'out_u1' ( temp uint) -0:29 AtomicExchange ( temp uint) +0:29 AtomicAnd ( temp uint) 0:29 'gs_ua' ( shared uint) 0:29 'gs_ub' ( shared uint) -0:30 AtomicMax ( temp uint) -0:30 'gs_ua' ( shared uint) -0:30 'gs_ub' ( shared uint) +0:30 move second child to first child ( temp uint) +0:30 'out_u1' ( temp uint) +0:30 AtomicCompSwap ( temp uint) +0:30 'gs_ua' ( shared uint) +0:30 'gs_ub' ( shared uint) +0:30 'gs_uc' ( shared uint) 0:31 move second child to first child ( temp uint) 0:31 'out_u1' ( temp uint) -0:31 AtomicMax ( temp uint) +0:31 AtomicExchange ( temp uint) 0:31 'gs_ua' ( shared uint) 0:31 'gs_ub' ( shared uint) -0:32 AtomicMin ( temp uint) +0:32 AtomicMax ( temp uint) 0:32 'gs_ua' ( shared uint) 0:32 'gs_ub' ( shared uint) 0:33 move second child to first child ( temp uint) 0:33 'out_u1' ( temp uint) -0:33 AtomicMin ( temp uint) +0:33 AtomicMax ( temp uint) 0:33 'gs_ua' ( shared uint) 0:33 'gs_ub' ( shared uint) -0:34 AtomicOr ( temp uint) +0:34 AtomicMin ( temp uint) 0:34 'gs_ua' ( shared uint) 0:34 'gs_ub' ( shared uint) 0:35 move second child to first child ( temp uint) 0:35 'out_u1' ( temp uint) -0:35 AtomicOr ( temp uint) +0:35 AtomicMin ( temp uint) 0:35 'gs_ua' ( shared uint) 0:35 'gs_ub' ( shared uint) -0:36 AtomicXor ( temp uint) +0:36 AtomicOr ( temp uint) 0:36 'gs_ua' ( shared uint) 0:36 'gs_ub' ( shared uint) 0:37 move second child to first child ( temp uint) 0:37 'out_u1' ( temp uint) -0:37 AtomicXor ( temp uint) +0:37 AtomicOr ( temp uint) 0:37 'gs_ua' ( shared uint) 0:37 'gs_ub' ( shared uint) -0:41 Branch: Return with expression -0:41 Constant: -0:41 0.000000 -0:45 Function Definition: ComputeShaderFunction1(vf1;vf1;vf1; ( temp 1-component vector of float) -0:45 Function Parameters: -0:45 'inF0' ( in 1-component vector of float) -0:45 'inF1' ( in 1-component vector of float) -0:45 'inF2' ( in 1-component vector of float) +0:38 AtomicXor ( temp uint) +0:38 'gs_ua' ( shared uint) +0:38 'gs_ub' ( shared uint) +0:39 move second child to first child ( temp uint) +0:39 'out_u1' ( temp uint) +0:39 AtomicXor ( temp uint) +0:39 'gs_ua' ( shared uint) +0:39 'gs_ub' ( shared uint) +0:41 AtomicAdd ( temp float) +0:41 'gs_fa' ( shared float) +0:41 'gs_fb' ( shared float) +0:45 Branch: Return with expression +0:45 Constant: +0:45 0.000000 +0:49 Function Definition: ComputeShaderFunction1(vf1;vf1;vf1; ( temp 1-component vector of float) +0:49 Function Parameters: +0:49 'inF0' ( in 1-component vector of float) +0:49 'inF1' ( in 1-component vector of float) +0:49 'inF2' ( in 1-component vector of float) 0:? Sequence -0:47 Branch: Return with expression -0:47 Constant: -0:47 0.000000 -0:51 Function Definition: ComputeShaderFunction2(vf2;vf2;vf2;vu2;vu2; ( temp 2-component vector of float) -0:51 Function Parameters: -0:51 'inF0' ( in 2-component vector of float) -0:51 'inF1' ( in 2-component vector of float) -0:51 'inF2' ( in 2-component vector of float) -0:51 'inU0' ( in 2-component vector of uint) -0:51 'inU1' ( in 2-component vector of uint) +0:51 Branch: Return with expression +0:51 Constant: +0:51 0.000000 +0:55 Function Definition: ComputeShaderFunction2(vf2;vf2;vf2;vu2;vu2; ( temp 2-component vector of float) +0:55 Function Parameters: +0:55 'inF0' ( in 2-component vector of float) +0:55 'inF1' ( in 2-component vector of float) +0:55 'inF2' ( in 2-component vector of float) +0:55 'inU0' ( in 2-component vector of uint) +0:55 'inU1' ( in 2-component vector of uint) 0:? Sequence -0:55 all ( temp bool) -0:55 Convert float to bool ( temp 2-component vector of bool) -0:55 'inF0' ( in 2-component vector of float) -0:58 AtomicAdd ( temp 2-component vector of uint) -0:58 'gs_ua2' ( shared 2-component vector of uint) -0:58 'gs_ub2' ( shared 2-component vector of uint) -0:59 move second child to first child ( temp 2-component vector of uint) -0:59 'out_u2' ( temp 2-component vector of uint) -0:59 AtomicAdd ( temp 2-component vector of uint) -0:59 'gs_ua2' ( shared 2-component vector of uint) -0:59 'gs_ub2' ( shared 2-component vector of uint) -0:60 AtomicAnd ( temp 2-component vector of uint) -0:60 'gs_ua2' ( shared 2-component vector of uint) -0:60 'gs_ub2' ( shared 2-component vector of uint) -0:61 move second child to first child ( temp 2-component vector of uint) -0:61 'out_u2' ( temp 2-component vector of uint) -0:61 AtomicAnd ( temp 2-component vector of uint) -0:61 'gs_ua2' ( shared 2-component vector of uint) -0:61 'gs_ub2' ( shared 2-component vector of uint) -0:62 move second child to first child ( temp 2-component vector of uint) -0:62 'out_u2' ( temp 2-component vector of uint) -0:62 AtomicCompSwap ( temp 2-component vector of uint) -0:62 'gs_ua2' ( shared 2-component vector of uint) -0:62 'gs_ub2' ( shared 2-component vector of uint) -0:62 'gs_uc2' ( shared 2-component vector of uint) +0:59 all ( temp bool) +0:59 Convert float to bool ( temp 2-component vector of bool) +0:59 'inF0' ( in 2-component vector of float) +0:62 AtomicAdd ( temp 2-component vector of uint) +0:62 'gs_ua2' ( shared 2-component vector of uint) +0:62 'gs_ub2' ( shared 2-component vector of uint) 0:63 move second child to first child ( temp 2-component vector of uint) 0:63 'out_u2' ( temp 2-component vector of uint) -0:63 AtomicExchange ( temp 2-component vector of uint) +0:63 AtomicAdd ( temp 2-component vector of uint) 0:63 'gs_ua2' ( shared 2-component vector of uint) 0:63 'gs_ub2' ( shared 2-component vector of uint) -0:64 AtomicMax ( temp 2-component vector of uint) +0:64 AtomicAnd ( temp 2-component vector of uint) 0:64 'gs_ua2' ( shared 2-component vector of uint) 0:64 'gs_ub2' ( shared 2-component vector of uint) 0:65 move second child to first child ( temp 2-component vector of uint) 0:65 'out_u2' ( temp 2-component vector of uint) -0:65 AtomicMax ( temp 2-component vector of uint) +0:65 AtomicAnd ( temp 2-component vector of uint) 0:65 'gs_ua2' ( shared 2-component vector of uint) 0:65 'gs_ub2' ( shared 2-component vector of uint) -0:66 AtomicMin ( temp 2-component vector of uint) -0:66 'gs_ua2' ( shared 2-component vector of uint) -0:66 'gs_ub2' ( shared 2-component vector of uint) +0:66 move second child to first child ( temp 2-component vector of uint) +0:66 'out_u2' ( temp 2-component vector of uint) +0:66 AtomicCompSwap ( temp 2-component vector of uint) +0:66 'gs_ua2' ( shared 2-component vector of uint) +0:66 'gs_ub2' ( shared 2-component vector of uint) +0:66 'gs_uc2' ( shared 2-component vector of uint) 0:67 move second child to first child ( temp 2-component vector of uint) 0:67 'out_u2' ( temp 2-component vector of uint) -0:67 AtomicMin ( temp 2-component vector of uint) +0:67 AtomicExchange ( temp 2-component vector of uint) 0:67 'gs_ua2' ( shared 2-component vector of uint) 0:67 'gs_ub2' ( shared 2-component vector of uint) -0:68 AtomicOr ( temp 2-component vector of uint) +0:68 AtomicMax ( temp 2-component vector of uint) 0:68 'gs_ua2' ( shared 2-component vector of uint) 0:68 'gs_ub2' ( shared 2-component vector of uint) 0:69 move second child to first child ( temp 2-component vector of uint) 0:69 'out_u2' ( temp 2-component vector of uint) -0:69 AtomicOr ( temp 2-component vector of uint) +0:69 AtomicMax ( temp 2-component vector of uint) 0:69 'gs_ua2' ( shared 2-component vector of uint) 0:69 'gs_ub2' ( shared 2-component vector of uint) -0:70 AtomicXor ( temp 2-component vector of uint) +0:70 AtomicMin ( temp 2-component vector of uint) 0:70 'gs_ua2' ( shared 2-component vector of uint) 0:70 'gs_ub2' ( shared 2-component vector of uint) 0:71 move second child to first child ( temp 2-component vector of uint) 0:71 'out_u2' ( temp 2-component vector of uint) -0:71 AtomicXor ( temp 2-component vector of uint) +0:71 AtomicMin ( temp 2-component vector of uint) 0:71 'gs_ua2' ( shared 2-component vector of uint) 0:71 'gs_ub2' ( shared 2-component vector of uint) -0:74 Branch: Return with expression -0:74 Constant: -0:74 1.000000 -0:74 2.000000 -0:78 Function Definition: ComputeShaderFunction3(vf3;vf3;vf3;vu3;vu3; ( temp 3-component vector of float) -0:78 Function Parameters: -0:78 'inF0' ( in 3-component vector of float) -0:78 'inF1' ( in 3-component vector of float) -0:78 'inF2' ( in 3-component vector of float) -0:78 'inU0' ( in 3-component vector of uint) -0:78 'inU1' ( in 3-component vector of uint) +0:72 AtomicOr ( temp 2-component vector of uint) +0:72 'gs_ua2' ( shared 2-component vector of uint) +0:72 'gs_ub2' ( shared 2-component vector of uint) +0:73 move second child to first child ( temp 2-component vector of uint) +0:73 'out_u2' ( temp 2-component vector of uint) +0:73 AtomicOr ( temp 2-component vector of uint) +0:73 'gs_ua2' ( shared 2-component vector of uint) +0:73 'gs_ub2' ( shared 2-component vector of uint) +0:74 AtomicXor ( temp 2-component vector of uint) +0:74 'gs_ua2' ( shared 2-component vector of uint) +0:74 'gs_ub2' ( shared 2-component vector of uint) +0:75 move second child to first child ( temp 2-component vector of uint) +0:75 'out_u2' ( temp 2-component vector of uint) +0:75 AtomicXor ( temp 2-component vector of uint) +0:75 'gs_ua2' ( shared 2-component vector of uint) +0:75 'gs_ub2' ( shared 2-component vector of uint) +0:78 Branch: Return with expression +0:78 Constant: +0:78 1.000000 +0:78 2.000000 +0:82 Function Definition: ComputeShaderFunction3(vf3;vf3;vf3;vu3;vu3; ( temp 3-component vector of float) +0:82 Function Parameters: +0:82 'inF0' ( in 3-component vector of float) +0:82 'inF1' ( in 3-component vector of float) +0:82 'inF2' ( in 3-component vector of float) +0:82 'inU0' ( in 3-component vector of uint) +0:82 'inU1' ( in 3-component vector of uint) 0:? Sequence -0:82 all ( temp bool) -0:82 Convert float to bool ( temp 3-component vector of bool) -0:82 'inF0' ( in 3-component vector of float) -0:85 AtomicAdd ( temp 3-component vector of uint) -0:85 'gs_ua3' ( shared 3-component vector of uint) -0:85 'gs_ub3' ( shared 3-component vector of uint) -0:86 move second child to first child ( temp 3-component vector of uint) -0:86 'out_u3' ( temp 3-component vector of uint) -0:86 AtomicAdd ( temp 3-component vector of uint) -0:86 'gs_ua3' ( shared 3-component vector of uint) -0:86 'gs_ub3' ( shared 3-component vector of uint) -0:87 AtomicAnd ( temp 3-component vector of uint) -0:87 'gs_ua3' ( shared 3-component vector of uint) -0:87 'gs_ub3' ( shared 3-component vector of uint) -0:88 move second child to first child ( temp 3-component vector of uint) -0:88 'out_u3' ( temp 3-component vector of uint) -0:88 AtomicAnd ( temp 3-component vector of uint) -0:88 'gs_ua3' ( shared 3-component vector of uint) -0:88 'gs_ub3' ( shared 3-component vector of uint) -0:89 move second child to first child ( temp 3-component vector of uint) -0:89 'out_u3' ( temp 3-component vector of uint) -0:89 AtomicCompSwap ( temp 3-component vector of uint) -0:89 'gs_ua3' ( shared 3-component vector of uint) -0:89 'gs_ub3' ( shared 3-component vector of uint) -0:89 'gs_uc3' ( shared 3-component vector of uint) +0:86 all ( temp bool) +0:86 Convert float to bool ( temp 3-component vector of bool) +0:86 'inF0' ( in 3-component vector of float) +0:89 AtomicAdd ( temp 3-component vector of uint) +0:89 'gs_ua3' ( shared 3-component vector of uint) +0:89 'gs_ub3' ( shared 3-component vector of uint) 0:90 move second child to first child ( temp 3-component vector of uint) 0:90 'out_u3' ( temp 3-component vector of uint) -0:90 AtomicExchange ( temp 3-component vector of uint) +0:90 AtomicAdd ( temp 3-component vector of uint) 0:90 'gs_ua3' ( shared 3-component vector of uint) 0:90 'gs_ub3' ( shared 3-component vector of uint) -0:91 AtomicMax ( temp 3-component vector of uint) +0:91 AtomicAnd ( temp 3-component vector of uint) 0:91 'gs_ua3' ( shared 3-component vector of uint) 0:91 'gs_ub3' ( shared 3-component vector of uint) 0:92 move second child to first child ( temp 3-component vector of uint) 0:92 'out_u3' ( temp 3-component vector of uint) -0:92 AtomicMax ( temp 3-component vector of uint) +0:92 AtomicAnd ( temp 3-component vector of uint) 0:92 'gs_ua3' ( shared 3-component vector of uint) 0:92 'gs_ub3' ( shared 3-component vector of uint) -0:93 AtomicMin ( temp 3-component vector of uint) -0:93 'gs_ua3' ( shared 3-component vector of uint) -0:93 'gs_ub3' ( shared 3-component vector of uint) +0:93 move second child to first child ( temp 3-component vector of uint) +0:93 'out_u3' ( temp 3-component vector of uint) +0:93 AtomicCompSwap ( temp 3-component vector of uint) +0:93 'gs_ua3' ( shared 3-component vector of uint) +0:93 'gs_ub3' ( shared 3-component vector of uint) +0:93 'gs_uc3' ( shared 3-component vector of uint) 0:94 move second child to first child ( temp 3-component vector of uint) 0:94 'out_u3' ( temp 3-component vector of uint) -0:94 AtomicMin ( temp 3-component vector of uint) +0:94 AtomicExchange ( temp 3-component vector of uint) 0:94 'gs_ua3' ( shared 3-component vector of uint) 0:94 'gs_ub3' ( shared 3-component vector of uint) -0:95 AtomicOr ( temp 3-component vector of uint) +0:95 AtomicMax ( temp 3-component vector of uint) 0:95 'gs_ua3' ( shared 3-component vector of uint) 0:95 'gs_ub3' ( shared 3-component vector of uint) 0:96 move second child to first child ( temp 3-component vector of uint) 0:96 'out_u3' ( temp 3-component vector of uint) -0:96 AtomicOr ( temp 3-component vector of uint) +0:96 AtomicMax ( temp 3-component vector of uint) 0:96 'gs_ua3' ( shared 3-component vector of uint) 0:96 'gs_ub3' ( shared 3-component vector of uint) -0:97 AtomicXor ( temp 3-component vector of uint) +0:97 AtomicMin ( temp 3-component vector of uint) 0:97 'gs_ua3' ( shared 3-component vector of uint) 0:97 'gs_ub3' ( shared 3-component vector of uint) 0:98 move second child to first child ( temp 3-component vector of uint) 0:98 'out_u3' ( temp 3-component vector of uint) -0:98 AtomicXor ( temp 3-component vector of uint) +0:98 AtomicMin ( temp 3-component vector of uint) 0:98 'gs_ua3' ( shared 3-component vector of uint) 0:98 'gs_ub3' ( shared 3-component vector of uint) -0:101 Branch: Return with expression -0:101 Constant: -0:101 1.000000 -0:101 2.000000 -0:101 3.000000 -0:105 Function Definition: @ComputeShaderFunction(vf4;vf4;vf4;vu4;vu4; ( temp 4-component vector of float) -0:105 Function Parameters: -0:105 'inF0' ( in 4-component vector of float) -0:105 'inF1' ( in 4-component vector of float) -0:105 'inF2' ( in 4-component vector of float) -0:105 'inU0' ( in 4-component vector of uint) -0:105 'inU1' ( in 4-component vector of uint) +0:99 AtomicOr ( temp 3-component vector of uint) +0:99 'gs_ua3' ( shared 3-component vector of uint) +0:99 'gs_ub3' ( shared 3-component vector of uint) +0:100 move second child to first child ( temp 3-component vector of uint) +0:100 'out_u3' ( temp 3-component vector of uint) +0:100 AtomicOr ( temp 3-component vector of uint) +0:100 'gs_ua3' ( shared 3-component vector of uint) +0:100 'gs_ub3' ( shared 3-component vector of uint) +0:101 AtomicXor ( temp 3-component vector of uint) +0:101 'gs_ua3' ( shared 3-component vector of uint) +0:101 'gs_ub3' ( shared 3-component vector of uint) +0:102 move second child to first child ( temp 3-component vector of uint) +0:102 'out_u3' ( temp 3-component vector of uint) +0:102 AtomicXor ( temp 3-component vector of uint) +0:102 'gs_ua3' ( shared 3-component vector of uint) +0:102 'gs_ub3' ( shared 3-component vector of uint) +0:105 Branch: Return with expression +0:105 Constant: +0:105 1.000000 +0:105 2.000000 +0:105 3.000000 +0:109 Function Definition: @ComputeShaderFunction(vf4;vf4;vf4;vu4;vu4; ( temp 4-component vector of float) +0:109 Function Parameters: +0:109 'inF0' ( in 4-component vector of float) +0:109 'inF1' ( in 4-component vector of float) +0:109 'inF2' ( in 4-component vector of float) +0:109 'inU0' ( in 4-component vector of uint) +0:109 'inU1' ( in 4-component vector of uint) 0:? Sequence -0:109 all ( temp bool) -0:109 Convert float to bool ( temp 4-component vector of bool) -0:109 'inF0' ( in 4-component vector of float) -0:112 AtomicAdd ( temp 4-component vector of uint) -0:112 'gs_ua4' ( shared 4-component vector of uint) -0:112 'gs_ub4' ( shared 4-component vector of uint) -0:113 move second child to first child ( temp 4-component vector of uint) -0:113 'out_u4' ( temp 4-component vector of uint) -0:113 AtomicAdd ( temp 4-component vector of uint) -0:113 'gs_ua4' ( shared 4-component vector of uint) -0:113 'gs_ub4' ( shared 4-component vector of uint) -0:114 AtomicAnd ( temp 4-component vector of uint) -0:114 'gs_ua4' ( shared 4-component vector of uint) -0:114 'gs_ub4' ( shared 4-component vector of uint) -0:115 move second child to first child ( temp 4-component vector of uint) -0:115 'out_u4' ( temp 4-component vector of uint) -0:115 AtomicAnd ( temp 4-component vector of uint) -0:115 'gs_ua4' ( shared 4-component vector of uint) -0:115 'gs_ub4' ( shared 4-component vector of uint) -0:116 move second child to first child ( temp 4-component vector of uint) -0:116 'out_u4' ( temp 4-component vector of uint) -0:116 AtomicCompSwap ( temp 4-component vector of uint) -0:116 'gs_ua4' ( shared 4-component vector of uint) -0:116 'gs_ub4' ( shared 4-component vector of uint) -0:116 'gs_uc4' ( shared 4-component vector of uint) +0:113 all ( temp bool) +0:113 Convert float to bool ( temp 4-component vector of bool) +0:113 'inF0' ( in 4-component vector of float) +0:116 AtomicAdd ( temp 4-component vector of uint) +0:116 'gs_ua4' ( shared 4-component vector of uint) +0:116 'gs_ub4' ( shared 4-component vector of uint) 0:117 move second child to first child ( temp 4-component vector of uint) 0:117 'out_u4' ( temp 4-component vector of uint) -0:117 AtomicExchange ( temp 4-component vector of uint) +0:117 AtomicAdd ( temp 4-component vector of uint) 0:117 'gs_ua4' ( shared 4-component vector of uint) 0:117 'gs_ub4' ( shared 4-component vector of uint) -0:118 AtomicMax ( temp 4-component vector of uint) +0:118 AtomicAnd ( temp 4-component vector of uint) 0:118 'gs_ua4' ( shared 4-component vector of uint) 0:118 'gs_ub4' ( shared 4-component vector of uint) 0:119 move second child to first child ( temp 4-component vector of uint) 0:119 'out_u4' ( temp 4-component vector of uint) -0:119 AtomicMax ( temp 4-component vector of uint) +0:119 AtomicAnd ( temp 4-component vector of uint) 0:119 'gs_ua4' ( shared 4-component vector of uint) 0:119 'gs_ub4' ( shared 4-component vector of uint) -0:120 AtomicMin ( temp 4-component vector of uint) -0:120 'gs_ua4' ( shared 4-component vector of uint) -0:120 'gs_ub4' ( shared 4-component vector of uint) +0:120 move second child to first child ( temp 4-component vector of uint) +0:120 'out_u4' ( temp 4-component vector of uint) +0:120 AtomicCompSwap ( temp 4-component vector of uint) +0:120 'gs_ua4' ( shared 4-component vector of uint) +0:120 'gs_ub4' ( shared 4-component vector of uint) +0:120 'gs_uc4' ( shared 4-component vector of uint) 0:121 move second child to first child ( temp 4-component vector of uint) 0:121 'out_u4' ( temp 4-component vector of uint) -0:121 AtomicMin ( temp 4-component vector of uint) +0:121 AtomicExchange ( temp 4-component vector of uint) 0:121 'gs_ua4' ( shared 4-component vector of uint) 0:121 'gs_ub4' ( shared 4-component vector of uint) -0:122 AtomicOr ( temp 4-component vector of uint) +0:122 AtomicMax ( temp 4-component vector of uint) 0:122 'gs_ua4' ( shared 4-component vector of uint) 0:122 'gs_ub4' ( shared 4-component vector of uint) 0:123 move second child to first child ( temp 4-component vector of uint) 0:123 'out_u4' ( temp 4-component vector of uint) -0:123 AtomicOr ( temp 4-component vector of uint) +0:123 AtomicMax ( temp 4-component vector of uint) 0:123 'gs_ua4' ( shared 4-component vector of uint) 0:123 'gs_ub4' ( shared 4-component vector of uint) -0:124 AtomicXor ( temp 4-component vector of uint) +0:124 AtomicMin ( temp 4-component vector of uint) 0:124 'gs_ua4' ( shared 4-component vector of uint) 0:124 'gs_ub4' ( shared 4-component vector of uint) 0:125 move second child to first child ( temp 4-component vector of uint) 0:125 'out_u4' ( temp 4-component vector of uint) -0:125 AtomicXor ( temp 4-component vector of uint) +0:125 AtomicMin ( temp 4-component vector of uint) 0:125 'gs_ua4' ( shared 4-component vector of uint) 0:125 'gs_ub4' ( shared 4-component vector of uint) -0:128 Branch: Return with expression -0:128 Constant: -0:128 1.000000 -0:128 2.000000 -0:128 3.000000 -0:128 4.000000 -0:105 Function Definition: ComputeShaderFunction( ( temp void) -0:105 Function Parameters: +0:126 AtomicOr ( temp 4-component vector of uint) +0:126 'gs_ua4' ( shared 4-component vector of uint) +0:126 'gs_ub4' ( shared 4-component vector of uint) +0:127 move second child to first child ( temp 4-component vector of uint) +0:127 'out_u4' ( temp 4-component vector of uint) +0:127 AtomicOr ( temp 4-component vector of uint) +0:127 'gs_ua4' ( shared 4-component vector of uint) +0:127 'gs_ub4' ( shared 4-component vector of uint) +0:128 AtomicXor ( temp 4-component vector of uint) +0:128 'gs_ua4' ( shared 4-component vector of uint) +0:128 'gs_ub4' ( shared 4-component vector of uint) +0:129 move second child to first child ( temp 4-component vector of uint) +0:129 'out_u4' ( temp 4-component vector of uint) +0:129 AtomicXor ( temp 4-component vector of uint) +0:129 'gs_ua4' ( shared 4-component vector of uint) +0:129 'gs_ub4' ( shared 4-component vector of uint) +0:132 Branch: Return with expression +0:132 Constant: +0:132 1.000000 +0:132 2.000000 +0:132 3.000000 +0:132 4.000000 +0:109 Function Definition: ComputeShaderFunction( ( temp void) +0:109 Function Parameters: 0:? Sequence -0:105 move second child to first child ( temp 4-component vector of float) +0:109 move second child to first child ( temp 4-component vector of float) 0:? 'inF0' ( temp 4-component vector of float) 0:? 'inF0' (layout( location=0) in 4-component vector of float) -0:105 move second child to first child ( temp 4-component vector of float) +0:109 move second child to first child ( temp 4-component vector of float) 0:? 'inF1' ( temp 4-component vector of float) 0:? 'inF1' (layout( location=1) in 4-component vector of float) -0:105 move second child to first child ( temp 4-component vector of float) +0:109 move second child to first child ( temp 4-component vector of float) 0:? 'inF2' ( temp 4-component vector of float) 0:? 'inF2' (layout( location=2) in 4-component vector of float) -0:105 move second child to first child ( temp 4-component vector of uint) +0:109 move second child to first child ( temp 4-component vector of uint) 0:? 'inU0' ( temp 4-component vector of uint) 0:? 'inU0' (layout( location=3) in 4-component vector of uint) -0:105 move second child to first child ( temp 4-component vector of uint) +0:109 move second child to first child ( temp 4-component vector of uint) 0:? 'inU1' ( temp 4-component vector of uint) 0:? 'inU1' (layout( location=4) in 4-component vector of uint) -0:105 move second child to first child ( temp 4-component vector of float) +0:109 move second child to first child ( temp 4-component vector of float) 0:? '@entryPointOutput' (layout( location=0) out 4-component vector of float) -0:105 Function Call: @ComputeShaderFunction(vf4;vf4;vf4;vu4;vu4; ( temp 4-component vector of float) +0:109 Function Call: @ComputeShaderFunction(vf4;vf4;vf4;vu4;vu4; ( temp 4-component vector of float) 0:? 'inF0' ( temp 4-component vector of float) 0:? 'inF1' ( temp 4-component vector of float) 0:? 'inF2' ( temp 4-component vector of float) @@ -708,6 +716,8 @@ local_size = (1, 1, 1) 0:? 'gs_ua4' ( shared 4-component vector of uint) 0:? 'gs_ub4' ( shared 4-component vector of uint) 0:? 'gs_uc4' ( shared 4-component vector of uint) +0:? 'gs_fa' ( shared float) +0:? 'gs_fb' ( shared float) 0:? '@entryPointOutput' (layout( location=0) out 4-component vector of float) 0:? 'inF0' (layout( location=0) in 4-component vector of float) 0:? 'inF1' (layout( location=1) in 4-component vector of float) @@ -717,13 +727,15 @@ local_size = (1, 1, 1) Validation failed // Module Version 10000 -// Generated by (magic number): 8000a -// Id's are bound by 265 +// Generated by (magic number): 8000b +// Id's are bound by 270 Capability Shader + Capability AtomicFloat32AddEXT + Extension "SPV_EXT_shader_atomic_float_add" 1: ExtInstImport "GLSL.std.450" MemoryModel Logical GLSL450 - EntryPoint GLCompute 4 "ComputeShaderFunction" 237 240 243 247 250 253 + EntryPoint GLCompute 4 "ComputeShaderFunction" 242 245 248 252 255 258 ExecutionMode 4 LocalSize 1 1 1 Source HLSL 500 Name 4 "ComputeShaderFunction" @@ -759,40 +771,42 @@ Validation failed Name 67 "gs_ub" Name 72 "out_u1" Name 80 "gs_uc" - Name 111 "gs_ua2" - Name 112 "gs_ub2" - Name 115 "out_u2" - Name 123 "gs_uc2" - Name 155 "gs_ua3" - Name 156 "gs_ub3" - Name 159 "out_u3" - Name 167 "gs_uc3" - Name 198 "gs_ua4" - Name 199 "gs_ub4" - Name 202 "out_u4" - Name 210 "gs_uc4" - Name 235 "inF0" - Name 237 "inF0" - Name 239 "inF1" - Name 240 "inF1" - Name 242 "inF2" - Name 243 "inF2" - Name 245 "inU0" - Name 247 "inU0" - Name 249 "inU1" - Name 250 "inU1" - Name 253 "@entryPointOutput" - Name 254 "param" - Name 256 "param" - Name 258 "param" - Name 260 "param" - Name 262 "param" - Decorate 237(inF0) Location 0 - Decorate 240(inF1) Location 1 - Decorate 243(inF2) Location 2 - Decorate 247(inU0) Location 3 - Decorate 250(inU1) Location 4 - Decorate 253(@entryPointOutput) Location 0 + Name 102 "gs_fa" + Name 103 "gs_fb" + Name 116 "gs_ua2" + Name 117 "gs_ub2" + Name 120 "out_u2" + Name 128 "gs_uc2" + Name 160 "gs_ua3" + Name 161 "gs_ub3" + Name 164 "out_u3" + Name 172 "gs_uc3" + Name 203 "gs_ua4" + Name 204 "gs_ub4" + Name 207 "out_u4" + Name 215 "gs_uc4" + Name 240 "inF0" + Name 242 "inF0" + Name 244 "inF1" + Name 245 "inF1" + Name 247 "inF2" + Name 248 "inF2" + Name 250 "inU0" + Name 252 "inU0" + Name 254 "inU1" + Name 255 "inU1" + Name 258 "@entryPointOutput" + Name 259 "param" + Name 261 "param" + Name 263 "param" + Name 265 "param" + Name 267 "param" + Decorate 242(inF0) Location 0 + Decorate 245(inF1) Location 1 + Decorate 248(inF2) Location 2 + Decorate 252(inU0) Location 3 + Decorate 255(inU1) Location 4 + Decorate 258(@entryPointOutput) Location 0 2: TypeVoid 3: TypeFunction 2 6: TypeFloat 32 @@ -824,74 +838,77 @@ Validation failed 69: 8(int) Constant 1 70: 8(int) Constant 0 80(gs_uc): 65(ptr) Variable Workgroup - 106: TypeVector 61(bool) 2 - 107: 24(fvec2) ConstantComposite 62 62 - 110: TypePointer Workgroup 26(ivec2) - 111(gs_ua2): 110(ptr) Variable Workgroup - 112(gs_ub2): 110(ptr) Variable Workgroup - 123(gs_uc2): 110(ptr) Variable Workgroup - 144: 6(float) Constant 1065353216 - 145: 6(float) Constant 1073741824 - 146: 24(fvec2) ConstantComposite 144 145 - 150: TypeVector 61(bool) 3 - 151: 36(fvec3) ConstantComposite 62 62 62 - 154: TypePointer Workgroup 38(ivec3) - 155(gs_ua3): 154(ptr) Variable Workgroup - 156(gs_ub3): 154(ptr) Variable Workgroup - 167(gs_uc3): 154(ptr) Variable Workgroup - 188: 6(float) Constant 1077936128 - 189: 36(fvec3) ConstantComposite 144 145 188 - 193: TypeVector 61(bool) 4 - 194: 48(fvec4) ConstantComposite 62 62 62 62 - 197: TypePointer Workgroup 50(ivec4) - 198(gs_ua4): 197(ptr) Variable Workgroup - 199(gs_ub4): 197(ptr) Variable Workgroup - 210(gs_uc4): 197(ptr) Variable Workgroup - 231: 6(float) Constant 1082130432 - 232: 48(fvec4) ConstantComposite 144 145 188 231 - 236: TypePointer Input 48(fvec4) - 237(inF0): 236(ptr) Variable Input - 240(inF1): 236(ptr) Variable Input - 243(inF2): 236(ptr) Variable Input - 246: TypePointer Input 50(ivec4) - 247(inU0): 246(ptr) Variable Input - 250(inU1): 246(ptr) Variable Input - 252: TypePointer Output 48(fvec4) -253(@entryPointOutput): 252(ptr) Variable Output + 101: TypePointer Workgroup 6(float) + 102(gs_fa): 101(ptr) Variable Workgroup + 103(gs_fb): 101(ptr) Variable Workgroup + 111: TypeVector 61(bool) 2 + 112: 24(fvec2) ConstantComposite 62 62 + 115: TypePointer Workgroup 26(ivec2) + 116(gs_ua2): 115(ptr) Variable Workgroup + 117(gs_ub2): 115(ptr) Variable Workgroup + 128(gs_uc2): 115(ptr) Variable Workgroup + 149: 6(float) Constant 1065353216 + 150: 6(float) Constant 1073741824 + 151: 24(fvec2) ConstantComposite 149 150 + 155: TypeVector 61(bool) 3 + 156: 36(fvec3) ConstantComposite 62 62 62 + 159: TypePointer Workgroup 38(ivec3) + 160(gs_ua3): 159(ptr) Variable Workgroup + 161(gs_ub3): 159(ptr) Variable Workgroup + 172(gs_uc3): 159(ptr) Variable Workgroup + 193: 6(float) Constant 1077936128 + 194: 36(fvec3) ConstantComposite 149 150 193 + 198: TypeVector 61(bool) 4 + 199: 48(fvec4) ConstantComposite 62 62 62 62 + 202: TypePointer Workgroup 50(ivec4) + 203(gs_ua4): 202(ptr) Variable Workgroup + 204(gs_ub4): 202(ptr) Variable Workgroup + 215(gs_uc4): 202(ptr) Variable Workgroup + 236: 6(float) Constant 1082130432 + 237: 48(fvec4) ConstantComposite 149 150 193 236 + 241: TypePointer Input 48(fvec4) + 242(inF0): 241(ptr) Variable Input + 245(inF1): 241(ptr) Variable Input + 248(inF2): 241(ptr) Variable Input + 251: TypePointer Input 50(ivec4) + 252(inU0): 251(ptr) Variable Input + 255(inU1): 251(ptr) Variable Input + 257: TypePointer Output 48(fvec4) +258(@entryPointOutput): 257(ptr) Variable Output 4(ComputeShaderFunction): 2 Function None 3 5: Label - 235(inF0): 49(ptr) Variable Function - 239(inF1): 49(ptr) Variable Function - 242(inF2): 49(ptr) Variable Function - 245(inU0): 51(ptr) Variable Function - 249(inU1): 51(ptr) Variable Function - 254(param): 49(ptr) Variable Function - 256(param): 49(ptr) Variable Function - 258(param): 49(ptr) Variable Function - 260(param): 51(ptr) Variable Function - 262(param): 51(ptr) Variable Function - 238: 48(fvec4) Load 237(inF0) - Store 235(inF0) 238 - 241: 48(fvec4) Load 240(inF1) - Store 239(inF1) 241 - 244: 48(fvec4) Load 243(inF2) - Store 242(inF2) 244 - 248: 50(ivec4) Load 247(inU0) - Store 245(inU0) 248 - 251: 50(ivec4) Load 250(inU1) - Store 249(inU1) 251 - 255: 48(fvec4) Load 235(inF0) - Store 254(param) 255 - 257: 48(fvec4) Load 239(inF1) - Store 256(param) 257 - 259: 48(fvec4) Load 242(inF2) - Store 258(param) 259 - 261: 50(ivec4) Load 245(inU0) - Store 260(param) 261 - 263: 50(ivec4) Load 249(inU1) - Store 262(param) 263 - 264: 48(fvec4) FunctionCall 58(@ComputeShaderFunction(vf4;vf4;vf4;vu4;vu4;) 254(param) 256(param) 258(param) 260(param) 262(param) - Store 253(@entryPointOutput) 264 + 240(inF0): 49(ptr) Variable Function + 244(inF1): 49(ptr) Variable Function + 247(inF2): 49(ptr) Variable Function + 250(inU0): 51(ptr) Variable Function + 254(inU1): 51(ptr) Variable Function + 259(param): 49(ptr) Variable Function + 261(param): 49(ptr) Variable Function + 263(param): 49(ptr) Variable Function + 265(param): 51(ptr) Variable Function + 267(param): 51(ptr) Variable Function + 243: 48(fvec4) Load 242(inF0) + Store 240(inF0) 243 + 246: 48(fvec4) Load 245(inF1) + Store 244(inF1) 246 + 249: 48(fvec4) Load 248(inF2) + Store 247(inF2) 249 + 253: 50(ivec4) Load 252(inU0) + Store 250(inU0) 253 + 256: 50(ivec4) Load 255(inU1) + Store 254(inU1) 256 + 260: 48(fvec4) Load 240(inF0) + Store 259(param) 260 + 262: 48(fvec4) Load 244(inF1) + Store 261(param) 262 + 264: 48(fvec4) Load 247(inF2) + Store 263(param) 264 + 266: 50(ivec4) Load 250(inU0) + Store 265(param) 266 + 268: 50(ivec4) Load 254(inU1) + Store 267(param) 268 + 269: 48(fvec4) FunctionCall 58(@ComputeShaderFunction(vf4;vf4;vf4;vu4;vu4;) 259(param) 261(param) 263(param) 265(param) 267(param) + Store 258(@entryPointOutput) 269 Return FunctionEnd 16(ComputeShaderFunctionS(f1;f1;f1;u1;u1;): 6(float) Function None 10 @@ -942,6 +959,8 @@ Validation failed 99: 8(int) Load 67(gs_ub) 100: 8(int) AtomicXor 66(gs_ua) 69 70 99 Store 72(out_u1) 100 + 104: 6(float) Load 103(gs_fb) + 105: 6(float) AtomicFAddEXT 102(gs_fa) 69 70 104 ReturnValue 62 FunctionEnd 22(ComputeShaderFunction1(vf1;vf1;vf1;): 6(float) Function None 18 @@ -958,48 +977,48 @@ Validation failed 32(inU0): 27(ptr) FunctionParameter 33(inU1): 27(ptr) FunctionParameter 35: Label - 115(out_u2): 27(ptr) Variable Function - 105: 24(fvec2) Load 29(inF0) - 108: 106(bvec2) FUnordNotEqual 105 107 - 109: 61(bool) All 108 - 113: 26(ivec2) Load 112(gs_ub2) - 114: 26(ivec2) AtomicIAdd 111(gs_ua2) 69 70 113 - 116: 26(ivec2) Load 112(gs_ub2) - 117: 26(ivec2) AtomicIAdd 111(gs_ua2) 69 70 116 - Store 115(out_u2) 117 - 118: 26(ivec2) Load 112(gs_ub2) - 119: 26(ivec2) AtomicAnd 111(gs_ua2) 69 70 118 - 120: 26(ivec2) Load 112(gs_ub2) - 121: 26(ivec2) AtomicAnd 111(gs_ua2) 69 70 120 - Store 115(out_u2) 121 - 122: 26(ivec2) Load 112(gs_ub2) - 124: 26(ivec2) Load 123(gs_uc2) - 125: 26(ivec2) AtomicCompareExchange 111(gs_ua2) 69 70 70 124 122 - Store 115(out_u2) 125 - 126: 26(ivec2) Load 112(gs_ub2) - 127: 26(ivec2) AtomicExchange 111(gs_ua2) 69 70 126 - Store 115(out_u2) 127 - 128: 26(ivec2) Load 112(gs_ub2) - 129: 26(ivec2) AtomicUMax 111(gs_ua2) 69 70 128 - 130: 26(ivec2) Load 112(gs_ub2) - 131: 26(ivec2) AtomicUMax 111(gs_ua2) 69 70 130 - Store 115(out_u2) 131 - 132: 26(ivec2) Load 112(gs_ub2) - 133: 26(ivec2) AtomicUMin 111(gs_ua2) 69 70 132 - 134: 26(ivec2) Load 112(gs_ub2) - 135: 26(ivec2) AtomicUMin 111(gs_ua2) 69 70 134 - Store 115(out_u2) 135 - 136: 26(ivec2) Load 112(gs_ub2) - 137: 26(ivec2) AtomicOr 111(gs_ua2) 69 70 136 - 138: 26(ivec2) Load 112(gs_ub2) - 139: 26(ivec2) AtomicOr 111(gs_ua2) 69 70 138 - Store 115(out_u2) 139 - 140: 26(ivec2) Load 112(gs_ub2) - 141: 26(ivec2) AtomicXor 111(gs_ua2) 69 70 140 - 142: 26(ivec2) Load 112(gs_ub2) - 143: 26(ivec2) AtomicXor 111(gs_ua2) 69 70 142 - Store 115(out_u2) 143 - ReturnValue 146 + 120(out_u2): 27(ptr) Variable Function + 110: 24(fvec2) Load 29(inF0) + 113: 111(bvec2) FUnordNotEqual 110 112 + 114: 61(bool) All 113 + 118: 26(ivec2) Load 117(gs_ub2) + 119: 26(ivec2) AtomicIAdd 116(gs_ua2) 69 70 118 + 121: 26(ivec2) Load 117(gs_ub2) + 122: 26(ivec2) AtomicIAdd 116(gs_ua2) 69 70 121 + Store 120(out_u2) 122 + 123: 26(ivec2) Load 117(gs_ub2) + 124: 26(ivec2) AtomicAnd 116(gs_ua2) 69 70 123 + 125: 26(ivec2) Load 117(gs_ub2) + 126: 26(ivec2) AtomicAnd 116(gs_ua2) 69 70 125 + Store 120(out_u2) 126 + 127: 26(ivec2) Load 117(gs_ub2) + 129: 26(ivec2) Load 128(gs_uc2) + 130: 26(ivec2) AtomicCompareExchange 116(gs_ua2) 69 70 70 129 127 + Store 120(out_u2) 130 + 131: 26(ivec2) Load 117(gs_ub2) + 132: 26(ivec2) AtomicExchange 116(gs_ua2) 69 70 131 + Store 120(out_u2) 132 + 133: 26(ivec2) Load 117(gs_ub2) + 134: 26(ivec2) AtomicUMax 116(gs_ua2) 69 70 133 + 135: 26(ivec2) Load 117(gs_ub2) + 136: 26(ivec2) AtomicUMax 116(gs_ua2) 69 70 135 + Store 120(out_u2) 136 + 137: 26(ivec2) Load 117(gs_ub2) + 138: 26(ivec2) AtomicUMin 116(gs_ua2) 69 70 137 + 139: 26(ivec2) Load 117(gs_ub2) + 140: 26(ivec2) AtomicUMin 116(gs_ua2) 69 70 139 + Store 120(out_u2) 140 + 141: 26(ivec2) Load 117(gs_ub2) + 142: 26(ivec2) AtomicOr 116(gs_ua2) 69 70 141 + 143: 26(ivec2) Load 117(gs_ub2) + 144: 26(ivec2) AtomicOr 116(gs_ua2) 69 70 143 + Store 120(out_u2) 144 + 145: 26(ivec2) Load 117(gs_ub2) + 146: 26(ivec2) AtomicXor 116(gs_ua2) 69 70 145 + 147: 26(ivec2) Load 117(gs_ub2) + 148: 26(ivec2) AtomicXor 116(gs_ua2) 69 70 147 + Store 120(out_u2) 148 + ReturnValue 151 FunctionEnd 46(ComputeShaderFunction3(vf3;vf3;vf3;vu3;vu3;): 36(fvec3) Function None 40 41(inF0): 37(ptr) FunctionParameter @@ -1008,48 +1027,48 @@ Validation failed 44(inU0): 39(ptr) FunctionParameter 45(inU1): 39(ptr) FunctionParameter 47: Label - 159(out_u3): 39(ptr) Variable Function - 149: 36(fvec3) Load 41(inF0) - 152: 150(bvec3) FUnordNotEqual 149 151 - 153: 61(bool) All 152 - 157: 38(ivec3) Load 156(gs_ub3) - 158: 38(ivec3) AtomicIAdd 155(gs_ua3) 69 70 157 - 160: 38(ivec3) Load 156(gs_ub3) - 161: 38(ivec3) AtomicIAdd 155(gs_ua3) 69 70 160 - Store 159(out_u3) 161 - 162: 38(ivec3) Load 156(gs_ub3) - 163: 38(ivec3) AtomicAnd 155(gs_ua3) 69 70 162 - 164: 38(ivec3) Load 156(gs_ub3) - 165: 38(ivec3) AtomicAnd 155(gs_ua3) 69 70 164 - Store 159(out_u3) 165 - 166: 38(ivec3) Load 156(gs_ub3) - 168: 38(ivec3) Load 167(gs_uc3) - 169: 38(ivec3) AtomicCompareExchange 155(gs_ua3) 69 70 70 168 166 - Store 159(out_u3) 169 - 170: 38(ivec3) Load 156(gs_ub3) - 171: 38(ivec3) AtomicExchange 155(gs_ua3) 69 70 170 - Store 159(out_u3) 171 - 172: 38(ivec3) Load 156(gs_ub3) - 173: 38(ivec3) AtomicUMax 155(gs_ua3) 69 70 172 - 174: 38(ivec3) Load 156(gs_ub3) - 175: 38(ivec3) AtomicUMax 155(gs_ua3) 69 70 174 - Store 159(out_u3) 175 - 176: 38(ivec3) Load 156(gs_ub3) - 177: 38(ivec3) AtomicUMin 155(gs_ua3) 69 70 176 - 178: 38(ivec3) Load 156(gs_ub3) - 179: 38(ivec3) AtomicUMin 155(gs_ua3) 69 70 178 - Store 159(out_u3) 179 - 180: 38(ivec3) Load 156(gs_ub3) - 181: 38(ivec3) AtomicOr 155(gs_ua3) 69 70 180 - 182: 38(ivec3) Load 156(gs_ub3) - 183: 38(ivec3) AtomicOr 155(gs_ua3) 69 70 182 - Store 159(out_u3) 183 - 184: 38(ivec3) Load 156(gs_ub3) - 185: 38(ivec3) AtomicXor 155(gs_ua3) 69 70 184 - 186: 38(ivec3) Load 156(gs_ub3) - 187: 38(ivec3) AtomicXor 155(gs_ua3) 69 70 186 - Store 159(out_u3) 187 - ReturnValue 189 + 164(out_u3): 39(ptr) Variable Function + 154: 36(fvec3) Load 41(inF0) + 157: 155(bvec3) FUnordNotEqual 154 156 + 158: 61(bool) All 157 + 162: 38(ivec3) Load 161(gs_ub3) + 163: 38(ivec3) AtomicIAdd 160(gs_ua3) 69 70 162 + 165: 38(ivec3) Load 161(gs_ub3) + 166: 38(ivec3) AtomicIAdd 160(gs_ua3) 69 70 165 + Store 164(out_u3) 166 + 167: 38(ivec3) Load 161(gs_ub3) + 168: 38(ivec3) AtomicAnd 160(gs_ua3) 69 70 167 + 169: 38(ivec3) Load 161(gs_ub3) + 170: 38(ivec3) AtomicAnd 160(gs_ua3) 69 70 169 + Store 164(out_u3) 170 + 171: 38(ivec3) Load 161(gs_ub3) + 173: 38(ivec3) Load 172(gs_uc3) + 174: 38(ivec3) AtomicCompareExchange 160(gs_ua3) 69 70 70 173 171 + Store 164(out_u3) 174 + 175: 38(ivec3) Load 161(gs_ub3) + 176: 38(ivec3) AtomicExchange 160(gs_ua3) 69 70 175 + Store 164(out_u3) 176 + 177: 38(ivec3) Load 161(gs_ub3) + 178: 38(ivec3) AtomicUMax 160(gs_ua3) 69 70 177 + 179: 38(ivec3) Load 161(gs_ub3) + 180: 38(ivec3) AtomicUMax 160(gs_ua3) 69 70 179 + Store 164(out_u3) 180 + 181: 38(ivec3) Load 161(gs_ub3) + 182: 38(ivec3) AtomicUMin 160(gs_ua3) 69 70 181 + 183: 38(ivec3) Load 161(gs_ub3) + 184: 38(ivec3) AtomicUMin 160(gs_ua3) 69 70 183 + Store 164(out_u3) 184 + 185: 38(ivec3) Load 161(gs_ub3) + 186: 38(ivec3) AtomicOr 160(gs_ua3) 69 70 185 + 187: 38(ivec3) Load 161(gs_ub3) + 188: 38(ivec3) AtomicOr 160(gs_ua3) 69 70 187 + Store 164(out_u3) 188 + 189: 38(ivec3) Load 161(gs_ub3) + 190: 38(ivec3) AtomicXor 160(gs_ua3) 69 70 189 + 191: 38(ivec3) Load 161(gs_ub3) + 192: 38(ivec3) AtomicXor 160(gs_ua3) 69 70 191 + Store 164(out_u3) 192 + ReturnValue 194 FunctionEnd 58(@ComputeShaderFunction(vf4;vf4;vf4;vu4;vu4;): 48(fvec4) Function None 52 53(inF0): 49(ptr) FunctionParameter @@ -1058,46 +1077,46 @@ Validation failed 56(inU0): 51(ptr) FunctionParameter 57(inU1): 51(ptr) FunctionParameter 59: Label - 202(out_u4): 51(ptr) Variable Function - 192: 48(fvec4) Load 53(inF0) - 195: 193(bvec4) FUnordNotEqual 192 194 - 196: 61(bool) All 195 - 200: 50(ivec4) Load 199(gs_ub4) - 201: 50(ivec4) AtomicIAdd 198(gs_ua4) 69 70 200 - 203: 50(ivec4) Load 199(gs_ub4) - 204: 50(ivec4) AtomicIAdd 198(gs_ua4) 69 70 203 - Store 202(out_u4) 204 - 205: 50(ivec4) Load 199(gs_ub4) - 206: 50(ivec4) AtomicAnd 198(gs_ua4) 69 70 205 - 207: 50(ivec4) Load 199(gs_ub4) - 208: 50(ivec4) AtomicAnd 198(gs_ua4) 69 70 207 - Store 202(out_u4) 208 - 209: 50(ivec4) Load 199(gs_ub4) - 211: 50(ivec4) Load 210(gs_uc4) - 212: 50(ivec4) AtomicCompareExchange 198(gs_ua4) 69 70 70 211 209 - Store 202(out_u4) 212 - 213: 50(ivec4) Load 199(gs_ub4) - 214: 50(ivec4) AtomicExchange 198(gs_ua4) 69 70 213 - Store 202(out_u4) 214 - 215: 50(ivec4) Load 199(gs_ub4) - 216: 50(ivec4) AtomicUMax 198(gs_ua4) 69 70 215 - 217: 50(ivec4) Load 199(gs_ub4) - 218: 50(ivec4) AtomicUMax 198(gs_ua4) 69 70 217 - Store 202(out_u4) 218 - 219: 50(ivec4) Load 199(gs_ub4) - 220: 50(ivec4) AtomicUMin 198(gs_ua4) 69 70 219 - 221: 50(ivec4) Load 199(gs_ub4) - 222: 50(ivec4) AtomicUMin 198(gs_ua4) 69 70 221 - Store 202(out_u4) 222 - 223: 50(ivec4) Load 199(gs_ub4) - 224: 50(ivec4) AtomicOr 198(gs_ua4) 69 70 223 - 225: 50(ivec4) Load 199(gs_ub4) - 226: 50(ivec4) AtomicOr 198(gs_ua4) 69 70 225 - Store 202(out_u4) 226 - 227: 50(ivec4) Load 199(gs_ub4) - 228: 50(ivec4) AtomicXor 198(gs_ua4) 69 70 227 - 229: 50(ivec4) Load 199(gs_ub4) - 230: 50(ivec4) AtomicXor 198(gs_ua4) 69 70 229 - Store 202(out_u4) 230 - ReturnValue 232 + 207(out_u4): 51(ptr) Variable Function + 197: 48(fvec4) Load 53(inF0) + 200: 198(bvec4) FUnordNotEqual 197 199 + 201: 61(bool) All 200 + 205: 50(ivec4) Load 204(gs_ub4) + 206: 50(ivec4) AtomicIAdd 203(gs_ua4) 69 70 205 + 208: 50(ivec4) Load 204(gs_ub4) + 209: 50(ivec4) AtomicIAdd 203(gs_ua4) 69 70 208 + Store 207(out_u4) 209 + 210: 50(ivec4) Load 204(gs_ub4) + 211: 50(ivec4) AtomicAnd 203(gs_ua4) 69 70 210 + 212: 50(ivec4) Load 204(gs_ub4) + 213: 50(ivec4) AtomicAnd 203(gs_ua4) 69 70 212 + Store 207(out_u4) 213 + 214: 50(ivec4) Load 204(gs_ub4) + 216: 50(ivec4) Load 215(gs_uc4) + 217: 50(ivec4) AtomicCompareExchange 203(gs_ua4) 69 70 70 216 214 + Store 207(out_u4) 217 + 218: 50(ivec4) Load 204(gs_ub4) + 219: 50(ivec4) AtomicExchange 203(gs_ua4) 69 70 218 + Store 207(out_u4) 219 + 220: 50(ivec4) Load 204(gs_ub4) + 221: 50(ivec4) AtomicUMax 203(gs_ua4) 69 70 220 + 222: 50(ivec4) Load 204(gs_ub4) + 223: 50(ivec4) AtomicUMax 203(gs_ua4) 69 70 222 + Store 207(out_u4) 223 + 224: 50(ivec4) Load 204(gs_ub4) + 225: 50(ivec4) AtomicUMin 203(gs_ua4) 69 70 224 + 226: 50(ivec4) Load 204(gs_ub4) + 227: 50(ivec4) AtomicUMin 203(gs_ua4) 69 70 226 + Store 207(out_u4) 227 + 228: 50(ivec4) Load 204(gs_ub4) + 229: 50(ivec4) AtomicOr 203(gs_ua4) 69 70 228 + 230: 50(ivec4) Load 204(gs_ub4) + 231: 50(ivec4) AtomicOr 203(gs_ua4) 69 70 230 + Store 207(out_u4) 231 + 232: 50(ivec4) Load 204(gs_ub4) + 233: 50(ivec4) AtomicXor 203(gs_ua4) 69 70 232 + 234: 50(ivec4) Load 204(gs_ub4) + 235: 50(ivec4) AtomicXor 203(gs_ua4) 69 70 234 + Store 207(out_u4) 235 + ReturnValue 237 FunctionEnd diff --git a/Test/baseResults/hlsl.intrinsics.d3dcolortoubyte4.frag.out b/Test/baseResults/hlsl.intrinsics.d3dcolortoubyte4.frag.out index b0eeaa9ac3..75a66d6f14 100644 --- a/Test/baseResults/hlsl.intrinsics.d3dcolortoubyte4.frag.out +++ b/Test/baseResults/hlsl.intrinsics.d3dcolortoubyte4.frag.out @@ -74,7 +74,7 @@ gl_FragCoord origin is upper left 0:? '@entryPointOutput' (layout( location=0) out 4-component vector of int) // Module Version 10000 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 29 Capability Shader diff --git a/Test/baseResults/hlsl.intrinsics.double.frag.out b/Test/baseResults/hlsl.intrinsics.double.frag.out index 8444e20ac9..d87fd2f398 100644 --- a/Test/baseResults/hlsl.intrinsics.double.frag.out +++ b/Test/baseResults/hlsl.intrinsics.double.frag.out @@ -164,7 +164,7 @@ gl_FragCoord origin is upper left 0:? 'inU1b' (layout( location=9) flat in uint) // Module Version 10000 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 90 Capability Shader diff --git a/Test/baseResults/hlsl.intrinsics.f1632.frag.out b/Test/baseResults/hlsl.intrinsics.f1632.frag.out index 90a4b989fe..52bbc4fbe3 100644 --- a/Test/baseResults/hlsl.intrinsics.f1632.frag.out +++ b/Test/baseResults/hlsl.intrinsics.f1632.frag.out @@ -270,7 +270,7 @@ gl_FragCoord origin is upper left 0:? '@entryPointOutput' (layout( location=0) out 4-component vector of float) // Module Version 10000 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 106 Capability Shader diff --git a/Test/baseResults/hlsl.intrinsics.f3216.frag.out b/Test/baseResults/hlsl.intrinsics.f3216.frag.out index ddf9a70865..c9a94b8fee 100644 --- a/Test/baseResults/hlsl.intrinsics.f3216.frag.out +++ b/Test/baseResults/hlsl.intrinsics.f3216.frag.out @@ -270,7 +270,7 @@ gl_FragCoord origin is upper left 0:? '@entryPointOutput' (layout( location=0) out 4-component vector of float) // Module Version 10000 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 106 Capability Shader diff --git a/Test/baseResults/hlsl.intrinsics.frag.out b/Test/baseResults/hlsl.intrinsics.frag.out index 02b1e6d12a..38857f8354 100644 --- a/Test/baseResults/hlsl.intrinsics.frag.out +++ b/Test/baseResults/hlsl.intrinsics.frag.out @@ -5659,7 +5659,7 @@ gl_FragCoord origin is upper left Validation failed // Module Version 10000 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 1839 Capability Shader diff --git a/Test/baseResults/hlsl.intrinsics.lit.frag.out b/Test/baseResults/hlsl.intrinsics.lit.frag.out index ef5759ebb7..8307db515f 100644 --- a/Test/baseResults/hlsl.intrinsics.lit.frag.out +++ b/Test/baseResults/hlsl.intrinsics.lit.frag.out @@ -118,7 +118,7 @@ gl_FragCoord origin is upper left 0:? 'm' (layout( location=2) in float) // Module Version 10000 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 48 Capability Shader diff --git a/Test/baseResults/hlsl.intrinsics.negative.comp.out b/Test/baseResults/hlsl.intrinsics.negative.comp.out index c0a543c28b..6ea121a678 100644 --- a/Test/baseResults/hlsl.intrinsics.negative.comp.out +++ b/Test/baseResults/hlsl.intrinsics.negative.comp.out @@ -122,7 +122,7 @@ local_size = (1, 1, 1) 0:? 'inI0' (layout( location=3) in 4-component vector of int) // Module Version 10000 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 79 Capability Shader diff --git a/Test/baseResults/hlsl.intrinsics.negative.vert.out b/Test/baseResults/hlsl.intrinsics.negative.vert.out index f1ab582623..9044abdfac 100644 --- a/Test/baseResults/hlsl.intrinsics.negative.vert.out +++ b/Test/baseResults/hlsl.intrinsics.negative.vert.out @@ -308,7 +308,7 @@ Shader version: 500 0:? 'inI0' (layout( location=3) in 4-component vector of int) // Module Version 10000 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 155 Capability Shader diff --git a/Test/baseResults/hlsl.intrinsics.promote.down.frag.out b/Test/baseResults/hlsl.intrinsics.promote.down.frag.out index bd73fae201..c68fc960df 100644 --- a/Test/baseResults/hlsl.intrinsics.promote.down.frag.out +++ b/Test/baseResults/hlsl.intrinsics.promote.down.frag.out @@ -104,7 +104,7 @@ gl_FragCoord origin is upper left 0:? '@entryPointOutput.color' (layout( location=0) out 4-component vector of float) // Module Version 10000 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 50 Capability Shader diff --git a/Test/baseResults/hlsl.intrinsics.promote.frag.out b/Test/baseResults/hlsl.intrinsics.promote.frag.out index 18fd0370e0..99176f1a4e 100644 --- a/Test/baseResults/hlsl.intrinsics.promote.frag.out +++ b/Test/baseResults/hlsl.intrinsics.promote.frag.out @@ -888,7 +888,7 @@ gl_FragCoord origin is upper left 0:? '@entryPointOutput.color' (layout( location=0) out 4-component vector of float) // Module Version 10000 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 322 Capability Shader diff --git a/Test/baseResults/hlsl.intrinsics.promote.outputs.frag.out b/Test/baseResults/hlsl.intrinsics.promote.outputs.frag.out index 1abed4c921..e0fbfe6d33 100644 --- a/Test/baseResults/hlsl.intrinsics.promote.outputs.frag.out +++ b/Test/baseResults/hlsl.intrinsics.promote.outputs.frag.out @@ -204,7 +204,7 @@ gl_FragCoord origin is upper left 0:? '@entryPointOutput.color' (layout( location=0) out 4-component vector of float) // Module Version 10000 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 80 Capability Shader diff --git a/Test/baseResults/hlsl.intrinsics.vert.out b/Test/baseResults/hlsl.intrinsics.vert.out index 647570c931..611ff163ea 100644 --- a/Test/baseResults/hlsl.intrinsics.vert.out +++ b/Test/baseResults/hlsl.intrinsics.vert.out @@ -2780,7 +2780,7 @@ Shader version: 500 Validation failed // Module Version 10000 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 1225 Capability Shader diff --git a/Test/baseResults/hlsl.isfinite.frag.out b/Test/baseResults/hlsl.isfinite.frag.out index 430ff0640e..e46e77186a 100644 --- a/Test/baseResults/hlsl.isfinite.frag.out +++ b/Test/baseResults/hlsl.isfinite.frag.out @@ -172,7 +172,7 @@ gl_FragCoord origin is upper left 0:? '@entryPointOutput' (layout( location=0) out 4-component vector of float) // Module Version 10000 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 85 Capability Shader diff --git a/Test/baseResults/hlsl.layout.frag.out b/Test/baseResults/hlsl.layout.frag.out index 9007e933b4..b2306d077e 100644 --- a/Test/baseResults/hlsl.layout.frag.out +++ b/Test/baseResults/hlsl.layout.frag.out @@ -88,7 +88,7 @@ gl_FragCoord origin is upper left Validation failed // Module Version 10000 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 44 Capability Shader diff --git a/Test/baseResults/hlsl.layoutOverride.vert.out b/Test/baseResults/hlsl.layoutOverride.vert.out index a3b8960136..80c3e45603 100644 --- a/Test/baseResults/hlsl.layoutOverride.vert.out +++ b/Test/baseResults/hlsl.layoutOverride.vert.out @@ -52,7 +52,7 @@ Shader version: 500 0:? '@entryPointOutput' ( out 4-component vector of float Position) // Module Version 10000 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 32 Capability Shader diff --git a/Test/baseResults/hlsl.load.2dms.dx10.frag.out b/Test/baseResults/hlsl.load.2dms.dx10.frag.out index daa28b263d..09086cbc0c 100644 --- a/Test/baseResults/hlsl.load.2dms.dx10.frag.out +++ b/Test/baseResults/hlsl.load.2dms.dx10.frag.out @@ -336,7 +336,7 @@ using depth_any 0:? '@entryPointOutput.Color' (layout( location=0) out 4-component vector of float) // Module Version 10000 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 129 Capability Shader diff --git a/Test/baseResults/hlsl.load.array.dx10.frag.out b/Test/baseResults/hlsl.load.array.dx10.frag.out index 0440779f09..96792a9537 100644 --- a/Test/baseResults/hlsl.load.array.dx10.frag.out +++ b/Test/baseResults/hlsl.load.array.dx10.frag.out @@ -388,7 +388,7 @@ using depth_any 0:? '@entryPointOutput.Color' (layout( location=0) out 4-component vector of float) // Module Version 10000 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 159 Capability Shader diff --git a/Test/baseResults/hlsl.load.basic.dx10.frag.out b/Test/baseResults/hlsl.load.basic.dx10.frag.out index 2aef83db3f..b9730f37f8 100644 --- a/Test/baseResults/hlsl.load.basic.dx10.frag.out +++ b/Test/baseResults/hlsl.load.basic.dx10.frag.out @@ -490,7 +490,7 @@ using depth_any 0:? '@entryPointOutput.Color' (layout( location=0) out 4-component vector of float) // Module Version 10000 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 179 Capability Shader diff --git a/Test/baseResults/hlsl.load.basic.dx10.vert.out b/Test/baseResults/hlsl.load.basic.dx10.vert.out index 8b9a04f823..c387d5f9b9 100644 --- a/Test/baseResults/hlsl.load.basic.dx10.vert.out +++ b/Test/baseResults/hlsl.load.basic.dx10.vert.out @@ -452,7 +452,7 @@ Shader version: 500 0:? '@entryPointOutput.Pos' ( out 4-component vector of float Position) // Module Version 10000 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 171 Capability Shader diff --git a/Test/baseResults/hlsl.load.buffer.dx10.frag.out b/Test/baseResults/hlsl.load.buffer.dx10.frag.out index 299bde154d..b37e3c9302 100644 --- a/Test/baseResults/hlsl.load.buffer.dx10.frag.out +++ b/Test/baseResults/hlsl.load.buffer.dx10.frag.out @@ -166,7 +166,7 @@ using depth_any 0:? '@entryPointOutput.Color' (layout( location=0) out 4-component vector of float) // Module Version 10000 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 72 Capability Shader diff --git a/Test/baseResults/hlsl.load.buffer.float.dx10.frag.out b/Test/baseResults/hlsl.load.buffer.float.dx10.frag.out index f7a530c7da..b248ed6b77 100644 --- a/Test/baseResults/hlsl.load.buffer.float.dx10.frag.out +++ b/Test/baseResults/hlsl.load.buffer.float.dx10.frag.out @@ -172,7 +172,7 @@ using depth_any 0:? '@entryPointOutput.Color' (layout( location=0) out 4-component vector of float) // Module Version 10000 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 75 Capability Shader diff --git a/Test/baseResults/hlsl.load.offset.dx10.frag.out b/Test/baseResults/hlsl.load.offset.dx10.frag.out index 106af53912..f8d4383739 100644 --- a/Test/baseResults/hlsl.load.offset.dx10.frag.out +++ b/Test/baseResults/hlsl.load.offset.dx10.frag.out @@ -550,7 +550,7 @@ using depth_any 0:? '@entryPointOutput.Color' (layout( location=0) out 4-component vector of float) // Module Version 10000 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 205 Capability Shader diff --git a/Test/baseResults/hlsl.load.offsetarray.dx10.frag.out b/Test/baseResults/hlsl.load.offsetarray.dx10.frag.out index 04ea482774..bc5f632dbe 100644 --- a/Test/baseResults/hlsl.load.offsetarray.dx10.frag.out +++ b/Test/baseResults/hlsl.load.offsetarray.dx10.frag.out @@ -426,7 +426,7 @@ using depth_any 0:? '@entryPointOutput.Color' (layout( location=0) out 4-component vector of float) // Module Version 10000 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 176 Capability Shader diff --git a/Test/baseResults/hlsl.load.rwbuffer.dx10.frag.out b/Test/baseResults/hlsl.load.rwbuffer.dx10.frag.out index 73a854b184..ed6f5286ce 100644 --- a/Test/baseResults/hlsl.load.rwbuffer.dx10.frag.out +++ b/Test/baseResults/hlsl.load.rwbuffer.dx10.frag.out @@ -110,7 +110,7 @@ gl_FragCoord origin is upper left 0:? '@entryPointOutput.Color' (layout( location=0) out 4-component vector of float) // Module Version 10000 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 57 Capability Shader diff --git a/Test/baseResults/hlsl.load.rwtexture.array.dx10.frag.out b/Test/baseResults/hlsl.load.rwtexture.array.dx10.frag.out index db105d77f6..a94da2fc09 100644 --- a/Test/baseResults/hlsl.load.rwtexture.array.dx10.frag.out +++ b/Test/baseResults/hlsl.load.rwtexture.array.dx10.frag.out @@ -208,7 +208,7 @@ using depth_any 0:? '@entryPointOutput.Color' (layout( location=0) out 4-component vector of float) // Module Version 10000 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 119 Capability Shader diff --git a/Test/baseResults/hlsl.load.rwtexture.dx10.frag.out b/Test/baseResults/hlsl.load.rwtexture.dx10.frag.out index c063e0c086..b00da802a7 100644 --- a/Test/baseResults/hlsl.load.rwtexture.dx10.frag.out +++ b/Test/baseResults/hlsl.load.rwtexture.dx10.frag.out @@ -244,7 +244,7 @@ using depth_any 0:? '@entryPointOutput.Color' (layout( location=0) out 4-component vector of float) // Module Version 10000 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 132 Capability Shader diff --git a/Test/baseResults/hlsl.logical.binary.frag.out b/Test/baseResults/hlsl.logical.binary.frag.out index d66eb7cd55..e6f484e43c 100644 --- a/Test/baseResults/hlsl.logical.binary.frag.out +++ b/Test/baseResults/hlsl.logical.binary.frag.out @@ -124,7 +124,7 @@ gl_FragCoord origin is upper left 0:? '@entryPointOutput.Color' (layout( location=0) out 4-component vector of float) // Module Version 10000 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 56 Capability Shader diff --git a/Test/baseResults/hlsl.logical.binary.vec.frag.out b/Test/baseResults/hlsl.logical.binary.vec.frag.out index 20f87b8a6c..986d83fdc2 100644 --- a/Test/baseResults/hlsl.logical.binary.vec.frag.out +++ b/Test/baseResults/hlsl.logical.binary.vec.frag.out @@ -254,7 +254,7 @@ gl_FragCoord origin is upper left 0:? '@entryPointOutput.Color' (layout( location=0) out 4-component vector of float) // Module Version 10000 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 115 Capability Shader diff --git a/Test/baseResults/hlsl.logical.unary.frag.out b/Test/baseResults/hlsl.logical.unary.frag.out index 711625dc0b..cc933bbcb3 100644 --- a/Test/baseResults/hlsl.logical.unary.frag.out +++ b/Test/baseResults/hlsl.logical.unary.frag.out @@ -184,7 +184,7 @@ gl_FragCoord origin is upper left 0:? '@entryPointOutput.Color' (layout( location=0) out 4-component vector of float) // Module Version 10000 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 84 Capability Shader diff --git a/Test/baseResults/hlsl.logicalConvert.frag.out b/Test/baseResults/hlsl.logicalConvert.frag.out index 44e1961d8c..0e7bad1894 100644 --- a/Test/baseResults/hlsl.logicalConvert.frag.out +++ b/Test/baseResults/hlsl.logicalConvert.frag.out @@ -254,7 +254,7 @@ gl_FragCoord origin is upper left 0:? '@entryPointOutput' (layout( location=0) out 4-component vector of float) // Module Version 10000 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 50 Capability Shader diff --git a/Test/baseResults/hlsl.loopattr.frag.out b/Test/baseResults/hlsl.loopattr.frag.out index ea37109d49..2784dda9a5 100644 --- a/Test/baseResults/hlsl.loopattr.frag.out +++ b/Test/baseResults/hlsl.loopattr.frag.out @@ -136,7 +136,7 @@ gl_FragCoord origin is upper left 0:? '@entryPointOutput' (layout( location=0) out 4-component vector of float) // Module Version 10000 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 54 Capability Shader diff --git a/Test/baseResults/hlsl.matNx1.frag.out b/Test/baseResults/hlsl.matNx1.frag.out index 48a7180be1..91b2ec3993 100644 --- a/Test/baseResults/hlsl.matNx1.frag.out +++ b/Test/baseResults/hlsl.matNx1.frag.out @@ -153,7 +153,7 @@ gl_FragCoord origin is upper left Validation failed // Module Version 10000 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 77 Capability Shader diff --git a/Test/baseResults/hlsl.matType.bool.frag.out b/Test/baseResults/hlsl.matType.bool.frag.out index 500b311c4f..d7d4b7ded1 100644 --- a/Test/baseResults/hlsl.matType.bool.frag.out +++ b/Test/baseResults/hlsl.matType.bool.frag.out @@ -233,7 +233,7 @@ gl_FragCoord origin is upper left Validation failed // Module Version 10000 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 130 Capability Shader diff --git a/Test/baseResults/hlsl.matType.frag.out b/Test/baseResults/hlsl.matType.frag.out index 1117df1df4..92d44a4618 100644 --- a/Test/baseResults/hlsl.matType.frag.out +++ b/Test/baseResults/hlsl.matType.frag.out @@ -32,7 +32,7 @@ gl_FragCoord origin is upper left Validation failed // Module Version 10000 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 30 Capability Shader diff --git a/Test/baseResults/hlsl.matType.int.frag.out b/Test/baseResults/hlsl.matType.int.frag.out index a99bd15ffb..551d41e7a5 100644 --- a/Test/baseResults/hlsl.matType.int.frag.out +++ b/Test/baseResults/hlsl.matType.int.frag.out @@ -399,7 +399,7 @@ gl_FragCoord origin is upper left Validation failed // Module Version 10000 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 232 Capability Shader diff --git a/Test/baseResults/hlsl.matpack-1.frag.out b/Test/baseResults/hlsl.matpack-1.frag.out index c480f780e5..5af6c2b578 100644 --- a/Test/baseResults/hlsl.matpack-1.frag.out +++ b/Test/baseResults/hlsl.matpack-1.frag.out @@ -100,7 +100,7 @@ gl_FragCoord origin is upper left 0:? '@entryPointOutput' (layout( location=0) out 4-component vector of float) // Module Version 10000 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 39 Capability Shader diff --git a/Test/baseResults/hlsl.matpack-pragma-global.frag.out b/Test/baseResults/hlsl.matpack-pragma-global.frag.out index 2feef9e925..d6afb4e992 100644 --- a/Test/baseResults/hlsl.matpack-pragma-global.frag.out +++ b/Test/baseResults/hlsl.matpack-pragma-global.frag.out @@ -52,7 +52,7 @@ gl_FragCoord origin is upper left 0:? '@entryPointOutput' (layout( location=0) out 4-component vector of float) // Module Version 10000 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 25 Capability Shader diff --git a/Test/baseResults/hlsl.matpack-pragma.frag.out b/Test/baseResults/hlsl.matpack-pragma.frag.out index bd5ca50c36..aac5af5fd0 100644 --- a/Test/baseResults/hlsl.matpack-pragma.frag.out +++ b/Test/baseResults/hlsl.matpack-pragma.frag.out @@ -170,7 +170,7 @@ gl_FragCoord origin is upper left 0:? '@entryPointOutput' (layout( location=0) out 4-component vector of float) // Module Version 10000 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 44 Capability Shader diff --git a/Test/baseResults/hlsl.matrixSwizzle.vert.out b/Test/baseResults/hlsl.matrixSwizzle.vert.out index 4082cb27d2..4b103ac7cd 100644 --- a/Test/baseResults/hlsl.matrixSwizzle.vert.out +++ b/Test/baseResults/hlsl.matrixSwizzle.vert.out @@ -677,7 +677,7 @@ Shader version: 500 Validation failed // Module Version 10000 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 118 Capability Shader diff --git a/Test/baseResults/hlsl.matrixindex.frag.out b/Test/baseResults/hlsl.matrixindex.frag.out index fa7a8c0c1d..cf75c0567e 100644 --- a/Test/baseResults/hlsl.matrixindex.frag.out +++ b/Test/baseResults/hlsl.matrixindex.frag.out @@ -272,7 +272,7 @@ gl_FragCoord origin is upper left 0:? '@entryPointOutput.Color' (layout( location=0) out 4-component vector of float) // Module Version 10000 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 83 Capability Shader diff --git a/Test/baseResults/hlsl.max.frag.out b/Test/baseResults/hlsl.max.frag.out index 7a0c5d2579..058786c4a6 100644 --- a/Test/baseResults/hlsl.max.frag.out +++ b/Test/baseResults/hlsl.max.frag.out @@ -66,7 +66,7 @@ gl_FragCoord origin is upper left 0:? 'input2' (layout( location=1) in 4-component vector of float) // Module Version 10000 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 33 Capability Shader diff --git a/Test/baseResults/hlsl.memberFunCall.frag.out b/Test/baseResults/hlsl.memberFunCall.frag.out index 2886f8fb16..7898376c32 100644 --- a/Test/baseResults/hlsl.memberFunCall.frag.out +++ b/Test/baseResults/hlsl.memberFunCall.frag.out @@ -152,7 +152,7 @@ gl_FragCoord origin is upper left 0:? '@entryPointOutput' (layout( location=0) out 4-component vector of float) // Module Version 10000 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 73 Capability Shader diff --git a/Test/baseResults/hlsl.mintypes.frag.out b/Test/baseResults/hlsl.mintypes.frag.out index 013f8d4138..2b51d12c28 100644 --- a/Test/baseResults/hlsl.mintypes.frag.out +++ b/Test/baseResults/hlsl.mintypes.frag.out @@ -5,33 +5,69 @@ gl_FragCoord origin is upper left 0:9 Function Definition: @main( ( temp structure{ temp 4-component vector of float Color}) 0:9 Function Parameters: 0:? Sequence -0:40 add ( temp mediump 2-component vector of float) -0:40 'mf16_2' ( temp mediump 2-component vector of float) -0:40 'mf16' ( temp mediump float) -0:41 add ( temp mediump 2-component vector of float) -0:41 'mf10_2' ( temp mediump 2-component vector of float) -0:41 'mf10' ( temp mediump float) -0:42 add ( temp mediump 2-component vector of int) -0:42 'mi16_2' ( temp mediump 2-component vector of int) -0:42 'mi16' ( temp mediump int) -0:43 add ( temp mediump 2-component vector of int) -0:43 'mi12_2' ( temp mediump 2-component vector of int) -0:43 'mi12' ( temp mediump int) -0:44 add ( temp mediump 2-component vector of uint) -0:44 'mu16_2' ( temp mediump 2-component vector of uint) -0:44 'mu16' ( temp mediump uint) -0:47 move second child to first child ( temp 4-component vector of float) -0:47 Color: direct index for structure ( temp 4-component vector of float) -0:47 'psout' ( temp structure{ temp 4-component vector of float Color}) -0:47 Constant: -0:47 0 (const int) -0:47 Constant: -0:47 0.000000 -0:47 0.000000 -0:47 0.000000 -0:47 0.000000 -0:48 Branch: Return with expression -0:48 'psout' ( temp structure{ temp 4-component vector of float Color}) +0:85 add ( temp mediump 2-component vector of float) +0:85 'mf16_2' ( temp mediump 2-component vector of float) +0:85 'mf16' ( temp mediump float) +0:86 add ( temp mediump 2-component vector of float) +0:86 'mf10_2' ( temp mediump 2-component vector of float) +0:86 'mf10' ( temp mediump float) +0:87 add ( temp mediump 2-component vector of int) +0:87 'mi16_2' ( temp mediump 2-component vector of int) +0:87 'mi16' ( temp mediump int) +0:88 add ( temp mediump 2-component vector of int) +0:88 'mi12_2' ( temp mediump 2-component vector of int) +0:88 'mi12' ( temp mediump int) +0:89 add ( temp mediump 2-component vector of uint) +0:89 'mu16_2' ( temp mediump 2-component vector of uint) +0:89 'mu16' ( temp mediump uint) +0:91 matrix-times-vector ( temp mediump 4-component vector of float) +0:91 'mf16_2x4' ( temp mediump 2X4 matrix of float) +0:91 'mf16_2' ( temp mediump 2-component vector of float) +0:92 matrix-times-vector ( temp mediump 4-component vector of float) +0:92 'mf16_3x4' ( temp mediump 3X4 matrix of float) +0:92 'mf16_3' ( temp mediump 3-component vector of float) +0:93 matrix-times-vector ( temp mediump 4-component vector of float) +0:93 'mf16_4x4' ( temp mediump 4X4 matrix of float) +0:93 'mf16_4' ( temp mediump 4-component vector of float) +0:94 vector-times-matrix ( temp mediump 4-component vector of float) +0:94 'mf16_2' ( temp mediump 2-component vector of float) +0:94 'mf16_4x2' ( temp mediump 4X2 matrix of float) +0:95 vector-times-matrix ( temp mediump 4-component vector of float) +0:95 'mf16_3' ( temp mediump 3-component vector of float) +0:95 'mf16_4x3' ( temp mediump 4X3 matrix of float) +0:96 vector-times-matrix ( temp mediump 4-component vector of float) +0:96 'mf16_4' ( temp mediump 4-component vector of float) +0:96 'mf16_4x4' ( temp mediump 4X4 matrix of float) +0:98 matrix-times-vector ( temp mediump 4-component vector of float) +0:98 'mf10_2x4' ( temp mediump 2X4 matrix of float) +0:98 'mf10_2' ( temp mediump 2-component vector of float) +0:99 matrix-times-vector ( temp mediump 4-component vector of float) +0:99 'mf10_3x4' ( temp mediump 3X4 matrix of float) +0:99 'mf10_3' ( temp mediump 3-component vector of float) +0:100 matrix-times-vector ( temp mediump 4-component vector of float) +0:100 'mf10_4x4' ( temp mediump 4X4 matrix of float) +0:100 'mf10_4' ( temp mediump 4-component vector of float) +0:101 vector-times-matrix ( temp mediump 4-component vector of float) +0:101 'mf10_2' ( temp mediump 2-component vector of float) +0:101 'mf10_4x2' ( temp mediump 4X2 matrix of float) +0:102 vector-times-matrix ( temp mediump 4-component vector of float) +0:102 'mf10_3' ( temp mediump 3-component vector of float) +0:102 'mf10_4x3' ( temp mediump 4X3 matrix of float) +0:103 vector-times-matrix ( temp mediump 4-component vector of float) +0:103 'mf10_4' ( temp mediump 4-component vector of float) +0:103 'mf10_4x4' ( temp mediump 4X4 matrix of float) +0:106 move second child to first child ( temp 4-component vector of float) +0:106 Color: direct index for structure ( temp 4-component vector of float) +0:106 'psout' ( temp structure{ temp 4-component vector of float Color}) +0:106 Constant: +0:106 0 (const int) +0:106 Constant: +0:106 0.000000 +0:106 0.000000 +0:106 0.000000 +0:106 0.000000 +0:107 Branch: Return with expression +0:107 'psout' ( temp structure{ temp 4-component vector of float Color}) 0:9 Function Definition: main( ( temp void) 0:9 Function Parameters: 0:? Sequence @@ -56,33 +92,69 @@ gl_FragCoord origin is upper left 0:9 Function Definition: @main( ( temp structure{ temp 4-component vector of float Color}) 0:9 Function Parameters: 0:? Sequence -0:40 add ( temp mediump 2-component vector of float) -0:40 'mf16_2' ( temp mediump 2-component vector of float) -0:40 'mf16' ( temp mediump float) -0:41 add ( temp mediump 2-component vector of float) -0:41 'mf10_2' ( temp mediump 2-component vector of float) -0:41 'mf10' ( temp mediump float) -0:42 add ( temp mediump 2-component vector of int) -0:42 'mi16_2' ( temp mediump 2-component vector of int) -0:42 'mi16' ( temp mediump int) -0:43 add ( temp mediump 2-component vector of int) -0:43 'mi12_2' ( temp mediump 2-component vector of int) -0:43 'mi12' ( temp mediump int) -0:44 add ( temp mediump 2-component vector of uint) -0:44 'mu16_2' ( temp mediump 2-component vector of uint) -0:44 'mu16' ( temp mediump uint) -0:47 move second child to first child ( temp 4-component vector of float) -0:47 Color: direct index for structure ( temp 4-component vector of float) -0:47 'psout' ( temp structure{ temp 4-component vector of float Color}) -0:47 Constant: -0:47 0 (const int) -0:47 Constant: -0:47 0.000000 -0:47 0.000000 -0:47 0.000000 -0:47 0.000000 -0:48 Branch: Return with expression -0:48 'psout' ( temp structure{ temp 4-component vector of float Color}) +0:85 add ( temp mediump 2-component vector of float) +0:85 'mf16_2' ( temp mediump 2-component vector of float) +0:85 'mf16' ( temp mediump float) +0:86 add ( temp mediump 2-component vector of float) +0:86 'mf10_2' ( temp mediump 2-component vector of float) +0:86 'mf10' ( temp mediump float) +0:87 add ( temp mediump 2-component vector of int) +0:87 'mi16_2' ( temp mediump 2-component vector of int) +0:87 'mi16' ( temp mediump int) +0:88 add ( temp mediump 2-component vector of int) +0:88 'mi12_2' ( temp mediump 2-component vector of int) +0:88 'mi12' ( temp mediump int) +0:89 add ( temp mediump 2-component vector of uint) +0:89 'mu16_2' ( temp mediump 2-component vector of uint) +0:89 'mu16' ( temp mediump uint) +0:91 matrix-times-vector ( temp mediump 4-component vector of float) +0:91 'mf16_2x4' ( temp mediump 2X4 matrix of float) +0:91 'mf16_2' ( temp mediump 2-component vector of float) +0:92 matrix-times-vector ( temp mediump 4-component vector of float) +0:92 'mf16_3x4' ( temp mediump 3X4 matrix of float) +0:92 'mf16_3' ( temp mediump 3-component vector of float) +0:93 matrix-times-vector ( temp mediump 4-component vector of float) +0:93 'mf16_4x4' ( temp mediump 4X4 matrix of float) +0:93 'mf16_4' ( temp mediump 4-component vector of float) +0:94 vector-times-matrix ( temp mediump 4-component vector of float) +0:94 'mf16_2' ( temp mediump 2-component vector of float) +0:94 'mf16_4x2' ( temp mediump 4X2 matrix of float) +0:95 vector-times-matrix ( temp mediump 4-component vector of float) +0:95 'mf16_3' ( temp mediump 3-component vector of float) +0:95 'mf16_4x3' ( temp mediump 4X3 matrix of float) +0:96 vector-times-matrix ( temp mediump 4-component vector of float) +0:96 'mf16_4' ( temp mediump 4-component vector of float) +0:96 'mf16_4x4' ( temp mediump 4X4 matrix of float) +0:98 matrix-times-vector ( temp mediump 4-component vector of float) +0:98 'mf10_2x4' ( temp mediump 2X4 matrix of float) +0:98 'mf10_2' ( temp mediump 2-component vector of float) +0:99 matrix-times-vector ( temp mediump 4-component vector of float) +0:99 'mf10_3x4' ( temp mediump 3X4 matrix of float) +0:99 'mf10_3' ( temp mediump 3-component vector of float) +0:100 matrix-times-vector ( temp mediump 4-component vector of float) +0:100 'mf10_4x4' ( temp mediump 4X4 matrix of float) +0:100 'mf10_4' ( temp mediump 4-component vector of float) +0:101 vector-times-matrix ( temp mediump 4-component vector of float) +0:101 'mf10_2' ( temp mediump 2-component vector of float) +0:101 'mf10_4x2' ( temp mediump 4X2 matrix of float) +0:102 vector-times-matrix ( temp mediump 4-component vector of float) +0:102 'mf10_3' ( temp mediump 3-component vector of float) +0:102 'mf10_4x3' ( temp mediump 4X3 matrix of float) +0:103 vector-times-matrix ( temp mediump 4-component vector of float) +0:103 'mf10_4' ( temp mediump 4-component vector of float) +0:103 'mf10_4x4' ( temp mediump 4X4 matrix of float) +0:106 move second child to first child ( temp 4-component vector of float) +0:106 Color: direct index for structure ( temp 4-component vector of float) +0:106 'psout' ( temp structure{ temp 4-component vector of float Color}) +0:106 Constant: +0:106 0 (const int) +0:106 Constant: +0:106 0.000000 +0:106 0.000000 +0:106 0.000000 +0:106 0.000000 +0:107 Branch: Return with expression +0:107 'psout' ( temp structure{ temp 4-component vector of float Color}) 0:9 Function Definition: main( ( temp void) 0:9 Function Parameters: 0:? Sequence @@ -98,13 +170,13 @@ gl_FragCoord origin is upper left 0:? '@entryPointOutput.Color' (layout( location=0) out 4-component vector of float) // Module Version 10000 -// Generated by (magic number): 8000a -// Id's are bound by 70 +// Generated by (magic number): 8000b +// Id's are bound by 132 Capability Shader 1: ExtInstImport "GLSL.std.450" MemoryModel Logical GLSL450 - EntryPoint Fragment 4 "main" 64 + EntryPoint Fragment 4 "main" 126 ExecutionMode 4 OriginUpperLeft Source HLSL 500 Name 4 "main" @@ -121,12 +193,26 @@ gl_FragCoord origin is upper left Name 39 "mi12" Name 46 "mu16_2" Name 49 "mu16" - Name 54 "psout" - Name 64 "@entryPointOutput.Color" - Name 67 "$Global" - MemberName 67($Global) 0 "b1a" - MemberName 67($Global) 1 "b1b" - Name 69 "" + Name 55 "mf16_2x4" + Name 61 "mf16_3x4" + Name 65 "mf16_3" + Name 70 "mf16_4x4" + Name 73 "mf16_4" + Name 79 "mf16_4x2" + Name 85 "mf16_4x3" + Name 91 "mf10_2x4" + Name 95 "mf10_3x4" + Name 97 "mf10_3" + Name 100 "mf10_4x4" + Name 102 "mf10_4" + Name 106 "mf10_4x2" + Name 110 "mf10_4x3" + Name 117 "psout" + Name 126 "@entryPointOutput.Color" + Name 129 "$Global" + MemberName 129($Global) 0 "b1a" + MemberName 129($Global) 1 "b1b" + Name 131 "" Decorate 14(mf16_2) RelaxedPrecision Decorate 15 RelaxedPrecision Decorate 17(mf16) RelaxedPrecision @@ -157,14 +243,64 @@ gl_FragCoord origin is upper left Decorate 50 RelaxedPrecision Decorate 51 RelaxedPrecision Decorate 52 RelaxedPrecision - Decorate 64(@entryPointOutput.Color) Location 0 - MemberDecorate 67($Global) 0 RelaxedPrecision - MemberDecorate 67($Global) 0 Offset 0 - MemberDecorate 67($Global) 1 RelaxedPrecision - MemberDecorate 67($Global) 1 Offset 4 - Decorate 67($Global) Block - Decorate 69 DescriptorSet 0 - Decorate 69 Binding 0 + Decorate 55(mf16_2x4) RelaxedPrecision + Decorate 56 RelaxedPrecision + Decorate 57 RelaxedPrecision + Decorate 58 RelaxedPrecision + Decorate 61(mf16_3x4) RelaxedPrecision + Decorate 62 RelaxedPrecision + Decorate 65(mf16_3) RelaxedPrecision + Decorate 66 RelaxedPrecision + Decorate 67 RelaxedPrecision + Decorate 70(mf16_4x4) RelaxedPrecision + Decorate 71 RelaxedPrecision + Decorate 73(mf16_4) RelaxedPrecision + Decorate 74 RelaxedPrecision + Decorate 75 RelaxedPrecision + Decorate 76 RelaxedPrecision + Decorate 79(mf16_4x2) RelaxedPrecision + Decorate 80 RelaxedPrecision + Decorate 81 RelaxedPrecision + Decorate 82 RelaxedPrecision + Decorate 85(mf16_4x3) RelaxedPrecision + Decorate 86 RelaxedPrecision + Decorate 87 RelaxedPrecision + Decorate 88 RelaxedPrecision + Decorate 89 RelaxedPrecision + Decorate 90 RelaxedPrecision + Decorate 91(mf10_2x4) RelaxedPrecision + Decorate 92 RelaxedPrecision + Decorate 93 RelaxedPrecision + Decorate 94 RelaxedPrecision + Decorate 95(mf10_3x4) RelaxedPrecision + Decorate 96 RelaxedPrecision + Decorate 97(mf10_3) RelaxedPrecision + Decorate 98 RelaxedPrecision + Decorate 99 RelaxedPrecision + Decorate 100(mf10_4x4) RelaxedPrecision + Decorate 101 RelaxedPrecision + Decorate 102(mf10_4) RelaxedPrecision + Decorate 103 RelaxedPrecision + Decorate 104 RelaxedPrecision + Decorate 105 RelaxedPrecision + Decorate 106(mf10_4x2) RelaxedPrecision + Decorate 107 RelaxedPrecision + Decorate 108 RelaxedPrecision + Decorate 109 RelaxedPrecision + Decorate 110(mf10_4x3) RelaxedPrecision + Decorate 111 RelaxedPrecision + Decorate 112 RelaxedPrecision + Decorate 113 RelaxedPrecision + Decorate 114 RelaxedPrecision + Decorate 115 RelaxedPrecision + Decorate 126(@entryPointOutput.Color) Location 0 + MemberDecorate 129($Global) 0 RelaxedPrecision + MemberDecorate 129($Global) 0 Offset 0 + MemberDecorate 129($Global) 1 RelaxedPrecision + MemberDecorate 129($Global) 1 Offset 4 + Decorate 129($Global) Block + Decorate 131 DescriptorSet 0 + Decorate 131 Binding 0 2: TypeVoid 3: TypeFunction 2 6: TypeFloat 32 @@ -182,21 +318,33 @@ gl_FragCoord origin is upper left 44: TypeVector 43(int) 2 45: TypePointer Function 44(ivec2) 48: TypePointer Function 43(int) - 53: TypePointer Function 8(PS_OUTPUT) - 55: 27(int) Constant 0 - 56: 6(float) Constant 0 - 57: 7(fvec4) ConstantComposite 56 56 56 56 - 58: TypePointer Function 7(fvec4) - 63: TypePointer Output 7(fvec4) -64(@entryPointOutput.Color): 63(ptr) Variable Output - 67($Global): TypeStruct 6(float) 6(float) - 68: TypePointer Uniform 67($Global) - 69: 68(ptr) Variable Uniform + 53: TypeMatrix 7(fvec4) 2 + 54: TypePointer Function 53 + 59: TypeMatrix 7(fvec4) 3 + 60: TypePointer Function 59 + 63: TypeVector 6(float) 3 + 64: TypePointer Function 63(fvec3) + 68: TypeMatrix 7(fvec4) 4 + 69: TypePointer Function 68 + 72: TypePointer Function 7(fvec4) + 77: TypeMatrix 12(fvec2) 4 + 78: TypePointer Function 77 + 83: TypeMatrix 63(fvec3) 4 + 84: TypePointer Function 83 + 116: TypePointer Function 8(PS_OUTPUT) + 118: 27(int) Constant 0 + 119: 6(float) Constant 0 + 120: 7(fvec4) ConstantComposite 119 119 119 119 + 125: TypePointer Output 7(fvec4) +126(@entryPointOutput.Color): 125(ptr) Variable Output + 129($Global): TypeStruct 6(float) 6(float) + 130: TypePointer Uniform 129($Global) + 131: 130(ptr) Variable Uniform 4(main): 2 Function None 3 5: Label - 65:8(PS_OUTPUT) FunctionCall 10(@main() - 66: 7(fvec4) CompositeExtract 65 0 - Store 64(@entryPointOutput.Color) 66 + 127:8(PS_OUTPUT) FunctionCall 10(@main() + 128: 7(fvec4) CompositeExtract 127 0 + Store 126(@entryPointOutput.Color) 128 Return FunctionEnd 10(@main():8(PS_OUTPUT) Function None 9 @@ -211,7 +359,21 @@ gl_FragCoord origin is upper left 39(mi12): 32(ptr) Variable Function 46(mu16_2): 45(ptr) Variable Function 49(mu16): 48(ptr) Variable Function - 54(psout): 53(ptr) Variable Function + 55(mf16_2x4): 54(ptr) Variable Function + 61(mf16_3x4): 60(ptr) Variable Function + 65(mf16_3): 64(ptr) Variable Function + 70(mf16_4x4): 69(ptr) Variable Function + 73(mf16_4): 72(ptr) Variable Function + 79(mf16_4x2): 78(ptr) Variable Function + 85(mf16_4x3): 84(ptr) Variable Function + 91(mf10_2x4): 54(ptr) Variable Function + 95(mf10_3x4): 60(ptr) Variable Function + 97(mf10_3): 64(ptr) Variable Function + 100(mf10_4x4): 69(ptr) Variable Function + 102(mf10_4): 72(ptr) Variable Function + 106(mf10_4x2): 78(ptr) Variable Function + 110(mf10_4x3): 84(ptr) Variable Function + 117(psout): 116(ptr) Variable Function 15: 12(fvec2) Load 14(mf16_2) 18: 6(float) Load 17(mf16) 19: 12(fvec2) CompositeConstruct 18 18 @@ -232,8 +394,44 @@ gl_FragCoord origin is upper left 50: 43(int) Load 49(mu16) 51: 44(ivec2) CompositeConstruct 50 50 52: 44(ivec2) IAdd 47 51 - 59: 58(ptr) AccessChain 54(psout) 55 - Store 59 57 - 60:8(PS_OUTPUT) Load 54(psout) - ReturnValue 60 + 56: 53 Load 55(mf16_2x4) + 57: 12(fvec2) Load 14(mf16_2) + 58: 7(fvec4) MatrixTimesVector 56 57 + 62: 59 Load 61(mf16_3x4) + 66: 63(fvec3) Load 65(mf16_3) + 67: 7(fvec4) MatrixTimesVector 62 66 + 71: 68 Load 70(mf16_4x4) + 74: 7(fvec4) Load 73(mf16_4) + 75: 7(fvec4) MatrixTimesVector 71 74 + 76: 12(fvec2) Load 14(mf16_2) + 80: 77 Load 79(mf16_4x2) + 81: 7(fvec4) VectorTimesMatrix 76 80 + 82: 63(fvec3) Load 65(mf16_3) + 86: 83 Load 85(mf16_4x3) + 87: 7(fvec4) VectorTimesMatrix 82 86 + 88: 7(fvec4) Load 73(mf16_4) + 89: 68 Load 70(mf16_4x4) + 90: 7(fvec4) VectorTimesMatrix 88 89 + 92: 53 Load 91(mf10_2x4) + 93: 12(fvec2) Load 21(mf10_2) + 94: 7(fvec4) MatrixTimesVector 92 93 + 96: 59 Load 95(mf10_3x4) + 98: 63(fvec3) Load 97(mf10_3) + 99: 7(fvec4) MatrixTimesVector 96 98 + 101: 68 Load 100(mf10_4x4) + 103: 7(fvec4) Load 102(mf10_4) + 104: 7(fvec4) MatrixTimesVector 101 103 + 105: 12(fvec2) Load 21(mf10_2) + 107: 77 Load 106(mf10_4x2) + 108: 7(fvec4) VectorTimesMatrix 105 107 + 109: 63(fvec3) Load 97(mf10_3) + 111: 83 Load 110(mf10_4x3) + 112: 7(fvec4) VectorTimesMatrix 109 111 + 113: 7(fvec4) Load 102(mf10_4) + 114: 68 Load 100(mf10_4x4) + 115: 7(fvec4) VectorTimesMatrix 113 114 + 121: 72(ptr) AccessChain 117(psout) 118 + Store 121 120 + 122:8(PS_OUTPUT) Load 117(psout) + ReturnValue 122 FunctionEnd diff --git a/Test/baseResults/hlsl.mip.operator.frag.out b/Test/baseResults/hlsl.mip.operator.frag.out index 48e563ca96..2c03a260e4 100644 --- a/Test/baseResults/hlsl.mip.operator.frag.out +++ b/Test/baseResults/hlsl.mip.operator.frag.out @@ -128,7 +128,7 @@ gl_FragCoord origin is upper left 0:? '@entryPointOutput' (layout( location=0) out 4-component vector of float) // Module Version 10000 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 61 Capability Shader diff --git a/Test/baseResults/hlsl.mul-truncate.frag.out b/Test/baseResults/hlsl.mul-truncate.frag.out index 25e7b2ea7a..806d2419dd 100644 --- a/Test/baseResults/hlsl.mul-truncate.frag.out +++ b/Test/baseResults/hlsl.mul-truncate.frag.out @@ -383,7 +383,7 @@ gl_FragCoord origin is upper left 0:? '@entryPointOutput' (layout( location=0) out 4-component vector of float) // Module Version 10000 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 190 Capability Shader diff --git a/Test/baseResults/hlsl.multiDescriptorSet.frag.out b/Test/baseResults/hlsl.multiDescriptorSet.frag.out index cfe3ea8d79..d79b121303 100644 --- a/Test/baseResults/hlsl.multiDescriptorSet.frag.out +++ b/Test/baseResults/hlsl.multiDescriptorSet.frag.out @@ -1,6 +1,6 @@ hlsl.multiDescriptorSet.frag // Module Version 10000 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 92 Capability Shader diff --git a/Test/baseResults/hlsl.multiEntry.vert.out b/Test/baseResults/hlsl.multiEntry.vert.out index fcb9f18f49..0e31ed6e1f 100644 --- a/Test/baseResults/hlsl.multiEntry.vert.out +++ b/Test/baseResults/hlsl.multiEntry.vert.out @@ -70,7 +70,7 @@ Shader version: 500 0:? 'Index' ( in uint VertexIndex) // Module Version 10000 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 41 Capability Shader diff --git a/Test/baseResults/hlsl.multiReturn.frag.out b/Test/baseResults/hlsl.multiReturn.frag.out index 937986344a..fbe7fbf90d 100644 --- a/Test/baseResults/hlsl.multiReturn.frag.out +++ b/Test/baseResults/hlsl.multiReturn.frag.out @@ -48,7 +48,7 @@ gl_FragCoord origin is upper left 0:? 'anon@0' (layout( row_major std140) uniform block{layout( row_major std140) uniform structure{ temp float f, temp 3-component vector of float v, temp 3X3 matrix of float m} s}) // Module Version 10000 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 42 Capability Shader diff --git a/Test/baseResults/hlsl.namespace.frag.out b/Test/baseResults/hlsl.namespace.frag.out index e224eb922f..c01089a88f 100644 --- a/Test/baseResults/hlsl.namespace.frag.out +++ b/Test/baseResults/hlsl.namespace.frag.out @@ -100,7 +100,7 @@ gl_FragCoord origin is upper left 0:? '@entryPointOutput' (layout( location=0) out 4-component vector of float) // Module Version 10000 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 50 Capability Shader diff --git a/Test/baseResults/hlsl.nested-runtimeArray.frag.out b/Test/baseResults/hlsl.nested-runtimeArray.frag.out new file mode 100644 index 0000000000..f019290c97 --- /dev/null +++ b/Test/baseResults/hlsl.nested-runtimeArray.frag.out @@ -0,0 +1,119 @@ +hlsl.nested-runtimeArray.frag +Shader version: 500 +gl_FragCoord origin is upper left +0:? Sequence +0:7 Function Definition: @main( ( temp float) +0:7 Function Parameters: +0:? Sequence +0:8 Branch: Return with expression +0:8 direct index ( temp float) +0:8 a: direct index for structure ( temp unsized 1-element array of float) +0:8 direct index (layout( row_major std430) buffer structure{ temp unsized 1-element array of float a}) +0:8 @data: direct index for structure (layout( row_major std430) buffer unsized 1-element array of structure{ temp unsized 1-element array of float a}) +0:8 'B' (layout( row_major std430) buffer block{layout( row_major std430) buffer unsized 1-element array of structure{ temp unsized 1-element array of float a} @data}) +0:8 Constant: +0:8 0 (const uint) +0:8 Constant: +0:8 0 (const int) +0:8 Constant: +0:8 0 (const int) +0:8 Constant: +0:8 0 (const int) +0:7 Function Definition: main( ( temp void) +0:7 Function Parameters: +0:? Sequence +0:7 move second child to first child ( temp float) +0:? '@entryPointOutput' (layout( location=0) out float) +0:7 Function Call: @main( ( temp float) +0:? Linker Objects +0:? 'B' (layout( row_major std430) buffer block{layout( row_major std430) buffer unsized 1-element array of structure{ temp unsized 1-element array of float a} @data}) +0:? '@entryPointOutput' (layout( location=0) out float) + + +Linked fragment stage: + + +Shader version: 500 +gl_FragCoord origin is upper left +0:? Sequence +0:7 Function Definition: @main( ( temp float) +0:7 Function Parameters: +0:? Sequence +0:8 Branch: Return with expression +0:8 direct index ( temp float) +0:8 a: direct index for structure ( temp unsized 1-element array of float) +0:8 direct index (layout( row_major std430) buffer structure{ temp unsized 1-element array of float a}) +0:8 @data: direct index for structure (layout( row_major std430) buffer unsized 1-element array of structure{ temp unsized 1-element array of float a}) +0:8 'B' (layout( row_major std430) buffer block{layout( row_major std430) buffer unsized 1-element array of structure{ temp unsized 1-element array of float a} @data}) +0:8 Constant: +0:8 0 (const uint) +0:8 Constant: +0:8 0 (const int) +0:8 Constant: +0:8 0 (const int) +0:8 Constant: +0:8 0 (const int) +0:7 Function Definition: main( ( temp void) +0:7 Function Parameters: +0:? Sequence +0:7 move second child to first child ( temp float) +0:? '@entryPointOutput' (layout( location=0) out float) +0:7 Function Call: @main( ( temp float) +0:? Linker Objects +0:? 'B' (layout( row_major std430) buffer block{layout( row_major std430) buffer unsized 1-element array of structure{ temp unsized 1-element array of float a} @data}) +0:? '@entryPointOutput' (layout( location=0) out float) + +// Module Version 10000 +// Generated by (magic number): 8000b +// Id's are bound by 26 + + Capability Shader + 1: ExtInstImport "GLSL.std.450" + MemoryModel Logical GLSL450 + EntryPoint Fragment 4 "main" 24 + ExecutionMode 4 OriginUpperLeft + Source HLSL 500 + Name 4 "main" + Name 8 "@main(" + Name 11 "A" + MemberName 11(A) 0 "a" + Name 13 "B" + MemberName 13(B) 0 "@data" + Name 15 "B" + Name 24 "@entryPointOutput" + Decorate 10 ArrayStride 4 + MemberDecorate 11(A) 0 Offset 0 + Decorate 11(A) BufferBlock + Decorate 12 ArrayStride 4 + MemberDecorate 13(B) 0 Offset 0 + Decorate 13(B) BufferBlock + Decorate 15(B) DescriptorSet 0 + Decorate 15(B) Binding 0 + Decorate 24(@entryPointOutput) Location 0 + 2: TypeVoid + 3: TypeFunction 2 + 6: TypeFloat 32 + 7: TypeFunction 6(float) + 10: TypeRuntimeArray 6(float) + 11(A): TypeStruct 10 + 12: TypeRuntimeArray 11(A) + 13(B): TypeStruct 12 + 14: TypePointer Uniform 13(B) + 15(B): 14(ptr) Variable Uniform + 16: TypeInt 32 1 + 17: 16(int) Constant 0 + 18: TypePointer Uniform 6(float) + 23: TypePointer Output 6(float) +24(@entryPointOutput): 23(ptr) Variable Output + 4(main): 2 Function None 3 + 5: Label + 25: 6(float) FunctionCall 8(@main() + Store 24(@entryPointOutput) 25 + Return + FunctionEnd + 8(@main(): 6(float) Function None 7 + 9: Label + 19: 18(ptr) AccessChain 15(B) 17 17 17 17 + 20: 6(float) Load 19 + ReturnValue 20 + FunctionEnd diff --git a/Test/baseResults/hlsl.noSemantic.functionality1.comp.out b/Test/baseResults/hlsl.noSemantic.functionality1.comp.out index 3531a3472a..1121e0b008 100644 --- a/Test/baseResults/hlsl.noSemantic.functionality1.comp.out +++ b/Test/baseResults/hlsl.noSemantic.functionality1.comp.out @@ -1,6 +1,6 @@ hlsl.noSemantic.functionality1.comp // Module Version 10000 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 30 Capability Shader diff --git a/Test/baseResults/hlsl.nonint-index.frag.out b/Test/baseResults/hlsl.nonint-index.frag.out index 897f8bc3c7..71502ee155 100644 --- a/Test/baseResults/hlsl.nonint-index.frag.out +++ b/Test/baseResults/hlsl.nonint-index.frag.out @@ -88,7 +88,7 @@ gl_FragCoord origin is upper left 0:? 'input' (layout( location=0) in float) // Module Version 10000 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 39 Capability Shader diff --git a/Test/baseResults/hlsl.nonstaticMemberFunction.frag.out b/Test/baseResults/hlsl.nonstaticMemberFunction.frag.out index 5a485c67dd..3cbae1eea4 100644 --- a/Test/baseResults/hlsl.nonstaticMemberFunction.frag.out +++ b/Test/baseResults/hlsl.nonstaticMemberFunction.frag.out @@ -268,7 +268,7 @@ gl_FragCoord origin is upper left 0:? '@entryPointOutput' (layout( location=0) out 4-component vector of float) // Module Version 10000 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 111 Capability Shader diff --git a/Test/baseResults/hlsl.numericsuffixes.frag.out b/Test/baseResults/hlsl.numericsuffixes.frag.out index 1725d3f279..05be42305b 100644 --- a/Test/baseResults/hlsl.numericsuffixes.frag.out +++ b/Test/baseResults/hlsl.numericsuffixes.frag.out @@ -2,94 +2,124 @@ hlsl.numericsuffixes.frag Shader version: 500 gl_FragCoord origin is upper left 0:? Sequence -0:5 Function Definition: @main( ( temp structure{ temp 4-component vector of float color}) -0:5 Function Parameters: +0:8 Function Definition: @main( ( temp structure{ temp 4-component vector of float color}) +0:8 Function Parameters: 0:? Sequence -0:7 Sequence -0:7 move second child to first child ( temp float) -0:7 'r00' ( temp float) -0:7 Constant: -0:7 1.000000 -0:8 Sequence -0:8 move second child to first child ( temp uint) -0:8 'r01' ( temp uint) -0:8 Constant: -0:8 1 (const uint) -0:9 Sequence -0:9 move second child to first child ( temp uint) -0:9 'r02' ( temp uint) -0:9 Constant: -0:9 2 (const uint) 0:10 Sequence -0:10 move second child to first child ( temp uint) -0:10 'r03' ( temp uint) +0:10 move second child to first child ( temp float) +0:10 'r00' ( temp float) 0:10 Constant: -0:10 2748 (const uint) +0:10 1.000000 0:11 Sequence 0:11 move second child to first child ( temp uint) -0:11 'r04' ( temp uint) +0:11 'r01' ( temp uint) 0:11 Constant: -0:11 2748 (const uint) +0:11 1 (const uint) 0:12 Sequence -0:12 move second child to first child ( temp int) -0:12 'r05' ( temp int) +0:12 move second child to first child ( temp uint) +0:12 'r02' ( temp uint) 0:12 Constant: -0:12 5 (const int) +0:12 2 (const uint) 0:13 Sequence -0:13 move second child to first child ( temp int) -0:13 'r06' ( temp int) +0:13 move second child to first child ( temp uint) +0:13 'r03' ( temp uint) 0:13 Constant: -0:13 6 (const int) +0:13 2748 (const uint) 0:14 Sequence -0:14 move second child to first child ( temp int) -0:14 'r07' ( temp int) +0:14 move second child to first child ( temp uint) +0:14 'r04' ( temp uint) 0:14 Constant: -0:14 57 (const int) +0:14 2748 (const uint) 0:15 Sequence -0:15 move second child to first child ( temp uint) -0:15 'r08' ( temp uint) +0:15 move second child to first child ( temp int) +0:15 'r05' ( temp int) 0:15 Constant: -0:15 58 (const uint) +0:15 5 (const int) 0:16 Sequence -0:16 move second child to first child ( temp float) -0:16 'r09' ( temp float) +0:16 move second child to first child ( temp int) +0:16 'r06' ( temp int) 0:16 Constant: -0:16 1.000000 +0:16 6 (const int) 0:17 Sequence -0:17 move second child to first child ( temp float) -0:17 'r10' ( temp float) +0:17 move second child to first child ( temp int) +0:17 'r07' ( temp int) 0:17 Constant: -0:17 1.000000 +0:17 57 (const int) 0:18 Sequence -0:18 move second child to first child ( temp float) -0:18 'r11' ( temp float) +0:18 move second child to first child ( temp uint) +0:18 'r08' ( temp uint) 0:18 Constant: -0:18 1.100000 +0:18 58 (const uint) 0:19 Sequence 0:19 move second child to first child ( temp float) -0:19 'r12' ( temp float) +0:19 'r09' ( temp float) 0:19 Constant: -0:19 1.100000 -0:22 move second child to first child ( temp 4-component vector of float) -0:22 color: direct index for structure ( temp 4-component vector of float) -0:22 'ps_output' ( temp structure{ temp 4-component vector of float color}) +0:19 1.000000 +0:20 Sequence +0:20 move second child to first child ( temp float) +0:20 'r10' ( temp float) +0:20 Constant: +0:20 1.000000 +0:21 Sequence +0:21 move second child to first child ( temp float) +0:21 'r11' ( temp float) +0:21 Constant: +0:21 1.100000 +0:22 Sequence +0:22 move second child to first child ( temp float) +0:22 'r12' ( temp float) 0:22 Constant: -0:22 0 (const int) -0:22 Construct vec4 ( temp 4-component vector of float) -0:22 Convert int to float ( temp float) -0:22 'r07' ( temp int) -0:23 Branch: Return with expression -0:23 'ps_output' ( temp structure{ temp 4-component vector of float color}) -0:5 Function Definition: main( ( temp void) -0:5 Function Parameters: +0:22 1.100000 +0:23 Sequence +0:23 move second child to first child ( temp uint) +0:23 'r13' ( temp uint) +0:23 Constant: +0:23 1 (const uint) +0:24 Sequence +0:24 move second child to first child ( temp uint) +0:24 'r14' ( temp uint) +0:24 Constant: +0:24 2 (const uint) +0:25 Sequence +0:25 move second child to first child ( temp int) +0:25 'r15' ( temp int) +0:25 Constant: +0:25 3 (const int) +0:26 Sequence +0:26 move second child to first child ( temp int) +0:26 'r16' ( temp int) +0:26 Constant: +0:26 4 (const int) +0:27 Sequence +0:27 move second child to first child ( temp uint) +0:27 'r17' ( temp uint) +0:27 Constant: +0:27 1 (const uint) +0:28 Sequence +0:28 move second child to first child ( temp int) +0:28 'r18' ( temp int) +0:28 Constant: +0:28 3 (const int) +0:31 move second child to first child ( temp 4-component vector of float) +0:31 color: direct index for structure ( temp 4-component vector of float) +0:31 'ps_output' ( temp structure{ temp 4-component vector of float color}) +0:31 Constant: +0:31 0 (const int) +0:31 Construct vec4 ( temp 4-component vector of float) +0:31 Convert int to float ( temp float) +0:31 'r07' ( temp int) +0:32 Branch: Return with expression +0:32 'ps_output' ( temp structure{ temp 4-component vector of float color}) +0:8 Function Definition: main( ( temp void) +0:8 Function Parameters: 0:? Sequence -0:5 Sequence -0:5 move second child to first child ( temp 4-component vector of float) +0:8 Sequence +0:8 move second child to first child ( temp 4-component vector of float) 0:? '@entryPointOutput.color' (layout( location=0) out 4-component vector of float) -0:5 color: direct index for structure ( temp 4-component vector of float) -0:5 Function Call: @main( ( temp structure{ temp 4-component vector of float color}) -0:5 Constant: -0:5 0 (const int) +0:8 color: direct index for structure ( temp 4-component vector of float) +0:8 Function Call: @main( ( temp structure{ temp 4-component vector of float color}) +0:8 Constant: +0:8 0 (const int) 0:? Linker Objects 0:? '@entryPointOutput.color' (layout( location=0) out 4-component vector of float) @@ -100,105 +130,135 @@ Linked fragment stage: Shader version: 500 gl_FragCoord origin is upper left 0:? Sequence -0:5 Function Definition: @main( ( temp structure{ temp 4-component vector of float color}) -0:5 Function Parameters: +0:8 Function Definition: @main( ( temp structure{ temp 4-component vector of float color}) +0:8 Function Parameters: 0:? Sequence -0:7 Sequence -0:7 move second child to first child ( temp float) -0:7 'r00' ( temp float) -0:7 Constant: -0:7 1.000000 -0:8 Sequence -0:8 move second child to first child ( temp uint) -0:8 'r01' ( temp uint) -0:8 Constant: -0:8 1 (const uint) -0:9 Sequence -0:9 move second child to first child ( temp uint) -0:9 'r02' ( temp uint) -0:9 Constant: -0:9 2 (const uint) 0:10 Sequence -0:10 move second child to first child ( temp uint) -0:10 'r03' ( temp uint) +0:10 move second child to first child ( temp float) +0:10 'r00' ( temp float) 0:10 Constant: -0:10 2748 (const uint) +0:10 1.000000 0:11 Sequence 0:11 move second child to first child ( temp uint) -0:11 'r04' ( temp uint) +0:11 'r01' ( temp uint) 0:11 Constant: -0:11 2748 (const uint) +0:11 1 (const uint) 0:12 Sequence -0:12 move second child to first child ( temp int) -0:12 'r05' ( temp int) +0:12 move second child to first child ( temp uint) +0:12 'r02' ( temp uint) 0:12 Constant: -0:12 5 (const int) +0:12 2 (const uint) 0:13 Sequence -0:13 move second child to first child ( temp int) -0:13 'r06' ( temp int) +0:13 move second child to first child ( temp uint) +0:13 'r03' ( temp uint) 0:13 Constant: -0:13 6 (const int) +0:13 2748 (const uint) 0:14 Sequence -0:14 move second child to first child ( temp int) -0:14 'r07' ( temp int) +0:14 move second child to first child ( temp uint) +0:14 'r04' ( temp uint) 0:14 Constant: -0:14 57 (const int) +0:14 2748 (const uint) 0:15 Sequence -0:15 move second child to first child ( temp uint) -0:15 'r08' ( temp uint) +0:15 move second child to first child ( temp int) +0:15 'r05' ( temp int) 0:15 Constant: -0:15 58 (const uint) +0:15 5 (const int) 0:16 Sequence -0:16 move second child to first child ( temp float) -0:16 'r09' ( temp float) +0:16 move second child to first child ( temp int) +0:16 'r06' ( temp int) 0:16 Constant: -0:16 1.000000 +0:16 6 (const int) 0:17 Sequence -0:17 move second child to first child ( temp float) -0:17 'r10' ( temp float) +0:17 move second child to first child ( temp int) +0:17 'r07' ( temp int) 0:17 Constant: -0:17 1.000000 +0:17 57 (const int) 0:18 Sequence -0:18 move second child to first child ( temp float) -0:18 'r11' ( temp float) +0:18 move second child to first child ( temp uint) +0:18 'r08' ( temp uint) 0:18 Constant: -0:18 1.100000 +0:18 58 (const uint) 0:19 Sequence 0:19 move second child to first child ( temp float) -0:19 'r12' ( temp float) +0:19 'r09' ( temp float) 0:19 Constant: -0:19 1.100000 -0:22 move second child to first child ( temp 4-component vector of float) -0:22 color: direct index for structure ( temp 4-component vector of float) -0:22 'ps_output' ( temp structure{ temp 4-component vector of float color}) +0:19 1.000000 +0:20 Sequence +0:20 move second child to first child ( temp float) +0:20 'r10' ( temp float) +0:20 Constant: +0:20 1.000000 +0:21 Sequence +0:21 move second child to first child ( temp float) +0:21 'r11' ( temp float) +0:21 Constant: +0:21 1.100000 +0:22 Sequence +0:22 move second child to first child ( temp float) +0:22 'r12' ( temp float) 0:22 Constant: -0:22 0 (const int) -0:22 Construct vec4 ( temp 4-component vector of float) -0:22 Convert int to float ( temp float) -0:22 'r07' ( temp int) -0:23 Branch: Return with expression -0:23 'ps_output' ( temp structure{ temp 4-component vector of float color}) -0:5 Function Definition: main( ( temp void) -0:5 Function Parameters: +0:22 1.100000 +0:23 Sequence +0:23 move second child to first child ( temp uint) +0:23 'r13' ( temp uint) +0:23 Constant: +0:23 1 (const uint) +0:24 Sequence +0:24 move second child to first child ( temp uint) +0:24 'r14' ( temp uint) +0:24 Constant: +0:24 2 (const uint) +0:25 Sequence +0:25 move second child to first child ( temp int) +0:25 'r15' ( temp int) +0:25 Constant: +0:25 3 (const int) +0:26 Sequence +0:26 move second child to first child ( temp int) +0:26 'r16' ( temp int) +0:26 Constant: +0:26 4 (const int) +0:27 Sequence +0:27 move second child to first child ( temp uint) +0:27 'r17' ( temp uint) +0:27 Constant: +0:27 1 (const uint) +0:28 Sequence +0:28 move second child to first child ( temp int) +0:28 'r18' ( temp int) +0:28 Constant: +0:28 3 (const int) +0:31 move second child to first child ( temp 4-component vector of float) +0:31 color: direct index for structure ( temp 4-component vector of float) +0:31 'ps_output' ( temp structure{ temp 4-component vector of float color}) +0:31 Constant: +0:31 0 (const int) +0:31 Construct vec4 ( temp 4-component vector of float) +0:31 Convert int to float ( temp float) +0:31 'r07' ( temp int) +0:32 Branch: Return with expression +0:32 'ps_output' ( temp structure{ temp 4-component vector of float color}) +0:8 Function Definition: main( ( temp void) +0:8 Function Parameters: 0:? Sequence -0:5 Sequence -0:5 move second child to first child ( temp 4-component vector of float) +0:8 Sequence +0:8 move second child to first child ( temp 4-component vector of float) 0:? '@entryPointOutput.color' (layout( location=0) out 4-component vector of float) -0:5 color: direct index for structure ( temp 4-component vector of float) -0:5 Function Call: @main( ( temp structure{ temp 4-component vector of float color}) -0:5 Constant: -0:5 0 (const int) +0:8 color: direct index for structure ( temp 4-component vector of float) +0:8 Function Call: @main( ( temp structure{ temp 4-component vector of float color}) +0:8 Constant: +0:8 0 (const int) 0:? Linker Objects 0:? '@entryPointOutput.color' (layout( location=0) out 4-component vector of float) // Module Version 10000 -// Generated by (magic number): 8000a -// Id's are bound by 54 +// Generated by (magic number): 8000b +// Id's are bound by 62 Capability Shader 1: ExtInstImport "GLSL.std.450" MemoryModel Logical GLSL450 - EntryPoint Fragment 4 "main" 51 + EntryPoint Fragment 4 "main" 59 ExecutionMode 4 OriginUpperLeft Source HLSL 500 Name 4 "main" @@ -218,9 +278,15 @@ gl_FragCoord origin is upper left Name 35 "r10" Name 36 "r11" Name 38 "r12" - Name 40 "ps_output" - Name 51 "@entryPointOutput.color" - Decorate 51(@entryPointOutput.color) Location 0 + Name 39 "r13" + Name 40 "r14" + Name 41 "r15" + Name 43 "r16" + Name 45 "r17" + Name 46 "r18" + Name 48 "ps_output" + Name 59 "@entryPointOutput.color" + Decorate 59(@entryPointOutput.color) Location 0 2: TypeVoid 3: TypeFunction 2 6: TypeFloat 32 @@ -241,16 +307,18 @@ gl_FragCoord origin is upper left 31: 24(int) Constant 57 33: 15(int) Constant 58 37: 6(float) Constant 1066192077 - 39: TypePointer Function 8(PS_OUTPUT) - 41: 24(int) Constant 0 - 45: TypePointer Function 7(fvec4) - 50: TypePointer Output 7(fvec4) -51(@entryPointOutput.color): 50(ptr) Variable Output + 42: 24(int) Constant 3 + 44: 24(int) Constant 4 + 47: TypePointer Function 8(PS_OUTPUT) + 49: 24(int) Constant 0 + 53: TypePointer Function 7(fvec4) + 58: TypePointer Output 7(fvec4) +59(@entryPointOutput.color): 58(ptr) Variable Output 4(main): 2 Function None 3 5: Label - 52:8(PS_OUTPUT) FunctionCall 10(@main() - 53: 7(fvec4) CompositeExtract 52 0 - Store 51(@entryPointOutput.color) 53 + 60:8(PS_OUTPUT) FunctionCall 10(@main() + 61: 7(fvec4) CompositeExtract 60 0 + Store 59(@entryPointOutput.color) 61 Return FunctionEnd 10(@main():8(PS_OUTPUT) Function None 9 @@ -268,7 +336,13 @@ gl_FragCoord origin is upper left 35(r10): 12(ptr) Variable Function 36(r11): 12(ptr) Variable Function 38(r12): 12(ptr) Variable Function - 40(ps_output): 39(ptr) Variable Function + 39(r13): 16(ptr) Variable Function + 40(r14): 16(ptr) Variable Function + 41(r15): 25(ptr) Variable Function + 43(r16): 25(ptr) Variable Function + 45(r17): 16(ptr) Variable Function + 46(r18): 25(ptr) Variable Function + 48(ps_output): 47(ptr) Variable Function Store 13(r00) 14 Store 17(r01) 18 Store 19(r02) 20 @@ -282,11 +356,17 @@ gl_FragCoord origin is upper left Store 35(r10) 14 Store 36(r11) 37 Store 38(r12) 37 - 42: 24(int) Load 30(r07) - 43: 6(float) ConvertSToF 42 - 44: 7(fvec4) CompositeConstruct 43 43 43 43 - 46: 45(ptr) AccessChain 40(ps_output) 41 - Store 46 44 - 47:8(PS_OUTPUT) Load 40(ps_output) - ReturnValue 47 + Store 39(r13) 18 + Store 40(r14) 20 + Store 41(r15) 42 + Store 43(r16) 44 + Store 45(r17) 18 + Store 46(r18) 42 + 50: 24(int) Load 30(r07) + 51: 6(float) ConvertSToF 50 + 52: 7(fvec4) CompositeConstruct 51 51 51 51 + 54: 53(ptr) AccessChain 48(ps_output) 49 + Store 54 52 + 55:8(PS_OUTPUT) Load 48(ps_output) + ReturnValue 55 FunctionEnd diff --git a/Test/baseResults/hlsl.numericsuffixes.negative.frag.out b/Test/baseResults/hlsl.numericsuffixes.negative.frag.out new file mode 100644 index 0000000000..60d63e9f2e --- /dev/null +++ b/Test/baseResults/hlsl.numericsuffixes.negative.frag.out @@ -0,0 +1,109 @@ +hlsl.numericsuffixes.negative.frag +ERROR: 0:7: '' : bad digit in binary literal +ERROR: 0:8: '' : binary literal too big +ERROR: 0:9: '' : bad digit in hexadecimal literal +ERROR: 0:10: '' : hexadecimal literal too big +ERROR: 4 compilation errors. No code generated. + + +Shader version: 500 +gl_FragCoord origin is upper left +ERROR: node is still EOpNull! +0:5 Function Definition: @main( ( temp structure{ temp 4-component vector of float color}) +0:5 Function Parameters: +0:? Sequence +0:7 Sequence +0:7 move second child to first child ( temp uint) +0:7 'r01' ( temp uint) +0:7 Constant: +0:7 0 (const uint) +0:8 Sequence +0:8 move second child to first child ( temp uint) +0:8 'r02' ( temp uint) +0:8 Constant: +0:8 4294967295 (const uint) +0:10 Sequence +0:9 move second child to first child ( temp uint) +0:9 'r03' ( temp uint) +0:9 Constant: +0:9 0 (const uint) +0:10 move second child to first child ( temp uint) +0:10 'r04' ( temp uint) +0:10 Constant: +0:10 4294967295 (const uint) +0:13 move second child to first child ( temp 4-component vector of float) +0:13 color: direct index for structure ( temp 4-component vector of float) +0:13 'ps_output' ( temp structure{ temp 4-component vector of float color}) +0:13 Constant: +0:13 0 (const int) +0:13 Construct vec4 ( temp 4-component vector of float) +0:13 Convert uint to float ( temp float) +0:13 'r01' ( temp uint) +0:14 Branch: Return with expression +0:14 'ps_output' ( temp structure{ temp 4-component vector of float color}) +0:5 Function Definition: main( ( temp void) +0:5 Function Parameters: +0:? Sequence +0:5 Sequence +0:5 move second child to first child ( temp 4-component vector of float) +0:? '@entryPointOutput.color' (layout( location=0) out 4-component vector of float) +0:5 color: direct index for structure ( temp 4-component vector of float) +0:5 Function Call: @main( ( temp structure{ temp 4-component vector of float color}) +0:5 Constant: +0:5 0 (const int) +0:? Linker Objects +0:? '@entryPointOutput.color' (layout( location=0) out 4-component vector of float) + + +Linked fragment stage: + + +Shader version: 500 +gl_FragCoord origin is upper left +ERROR: node is still EOpNull! +0:5 Function Definition: @main( ( temp structure{ temp 4-component vector of float color}) +0:5 Function Parameters: +0:? Sequence +0:7 Sequence +0:7 move second child to first child ( temp uint) +0:7 'r01' ( temp uint) +0:7 Constant: +0:7 0 (const uint) +0:8 Sequence +0:8 move second child to first child ( temp uint) +0:8 'r02' ( temp uint) +0:8 Constant: +0:8 4294967295 (const uint) +0:10 Sequence +0:9 move second child to first child ( temp uint) +0:9 'r03' ( temp uint) +0:9 Constant: +0:9 0 (const uint) +0:10 move second child to first child ( temp uint) +0:10 'r04' ( temp uint) +0:10 Constant: +0:10 4294967295 (const uint) +0:13 move second child to first child ( temp 4-component vector of float) +0:13 color: direct index for structure ( temp 4-component vector of float) +0:13 'ps_output' ( temp structure{ temp 4-component vector of float color}) +0:13 Constant: +0:13 0 (const int) +0:13 Construct vec4 ( temp 4-component vector of float) +0:13 Convert uint to float ( temp float) +0:13 'r01' ( temp uint) +0:14 Branch: Return with expression +0:14 'ps_output' ( temp structure{ temp 4-component vector of float color}) +0:5 Function Definition: main( ( temp void) +0:5 Function Parameters: +0:? Sequence +0:5 Sequence +0:5 move second child to first child ( temp 4-component vector of float) +0:? '@entryPointOutput.color' (layout( location=0) out 4-component vector of float) +0:5 color: direct index for structure ( temp 4-component vector of float) +0:5 Function Call: @main( ( temp structure{ temp 4-component vector of float color}) +0:5 Constant: +0:5 0 (const int) +0:? Linker Objects +0:? '@entryPointOutput.color' (layout( location=0) out 4-component vector of float) + +SPIR-V is not generated for failed compile or link diff --git a/Test/baseResults/hlsl.numthreads.comp.out b/Test/baseResults/hlsl.numthreads.comp.out index c8676e3873..49fa4f30d2 100644 --- a/Test/baseResults/hlsl.numthreads.comp.out +++ b/Test/baseResults/hlsl.numthreads.comp.out @@ -44,7 +44,7 @@ local_size = (1, 4, 8) 0:? 'tid' ( in 3-component vector of uint GlobalInvocationID) // Module Version 10000 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 23 Capability Shader diff --git a/Test/baseResults/hlsl.opaque-type-bug.frag.out b/Test/baseResults/hlsl.opaque-type-bug.frag.out index 738fa4f095..d82509d65b 100644 --- a/Test/baseResults/hlsl.opaque-type-bug.frag.out +++ b/Test/baseResults/hlsl.opaque-type-bug.frag.out @@ -58,7 +58,7 @@ gl_FragCoord origin is upper left 0:? 'MyTexture' (layout( binding=0) uniform texture2D) // Module Version 10000 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 27 Capability Shader diff --git a/Test/baseResults/hlsl.overload.frag.out b/Test/baseResults/hlsl.overload.frag.out index 4cfc391183..460262eb5e 100644 --- a/Test/baseResults/hlsl.overload.frag.out +++ b/Test/baseResults/hlsl.overload.frag.out @@ -734,7 +734,7 @@ gl_FragCoord origin is upper left 0:? 'input' (layout( location=0) in 4-component vector of float) // Module Version 10000 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 520 Capability Shader diff --git a/Test/baseResults/hlsl.params.default.frag.out b/Test/baseResults/hlsl.params.default.frag.out index 6898240fe0..be1f64160c 100644 --- a/Test/baseResults/hlsl.params.default.frag.out +++ b/Test/baseResults/hlsl.params.default.frag.out @@ -376,7 +376,7 @@ gl_FragCoord origin is upper left 0:? '@entryPointOutput' (layout( location=0) out 4-component vector of int) // Module Version 10000 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 178 Capability Shader diff --git a/Test/baseResults/hlsl.partialFlattenLocal.vert.out b/Test/baseResults/hlsl.partialFlattenLocal.vert.out index 7bcc8791d5..6a1b1deda9 100644 --- a/Test/baseResults/hlsl.partialFlattenLocal.vert.out +++ b/Test/baseResults/hlsl.partialFlattenLocal.vert.out @@ -237,7 +237,7 @@ Shader version: 500 0:? 'pos' (layout( location=0) in 4-component vector of float) // Module Version 10000 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 93 Capability Shader diff --git a/Test/baseResults/hlsl.partialFlattenMixed.vert.out b/Test/baseResults/hlsl.partialFlattenMixed.vert.out index c9fcc6f4c9..eae3c98bb7 100644 --- a/Test/baseResults/hlsl.partialFlattenMixed.vert.out +++ b/Test/baseResults/hlsl.partialFlattenMixed.vert.out @@ -91,7 +91,7 @@ Shader version: 500 0:? 'pos' (layout( location=0) in 4-component vector of float) // Module Version 10000 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 43 Capability Shader diff --git a/Test/baseResults/hlsl.partialInit.frag.out b/Test/baseResults/hlsl.partialInit.frag.out index 4686566df5..d3ce42e156 100644 --- a/Test/baseResults/hlsl.partialInit.frag.out +++ b/Test/baseResults/hlsl.partialInit.frag.out @@ -400,7 +400,7 @@ gl_FragCoord origin is upper left Validation failed // Module Version 10000 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 104 Capability Shader diff --git a/Test/baseResults/hlsl.pp.expand.frag.out b/Test/baseResults/hlsl.pp.expand.frag.out index adfe02c12e..97df910ad0 100644 --- a/Test/baseResults/hlsl.pp.expand.frag.out +++ b/Test/baseResults/hlsl.pp.expand.frag.out @@ -9,7 +9,7 @@ struct A float4 a; float4 b; float4 c = { 1, 2, 3, 4 }; - float4 d = {({ {(({ 1, 2, 3, 4 }))} })}, { { 1, 2, 3, 4 } }; + float4 d = { ({ { ( ({ 1, 2, 3, 4 })) } }) }, { { 1, 2, 3, 4 } }; }; void main() diff --git a/Test/baseResults/hlsl.pp.line.frag.out b/Test/baseResults/hlsl.pp.line.frag.out index 68476d2a04..3478c665d6 100644 --- a/Test/baseResults/hlsl.pp.line.frag.out +++ b/Test/baseResults/hlsl.pp.line.frag.out @@ -120,7 +120,7 @@ using depth_any 0:? '@entryPointOutput.Color' (layout( location=0) out 4-component vector of float) // Module Version 10000 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 42 Capability Shader diff --git a/Test/baseResults/hlsl.pp.line2.frag.out b/Test/baseResults/hlsl.pp.line2.frag.out index e831964627..1c73bceb6b 100644 --- a/Test/baseResults/hlsl.pp.line2.frag.out +++ b/Test/baseResults/hlsl.pp.line2.frag.out @@ -1,6 +1,6 @@ hlsl.pp.line2.frag // Module Version 10000 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 80 Capability Shader @@ -129,7 +129,7 @@ PS_OUTPUT MainPs ( PS_INPUT i ) 71(i.vTextureCoords): 70(ptr) Variable Input 74: TypePointer Output 11(fvec4) 75(@entryPointOutput.vColor): 74(ptr) Variable Output - Line 1 23 1 + Line 17 23 1 5(MainPs): 3 Function None 4 6: Label 69(i): 10(ptr) Variable Function @@ -145,7 +145,7 @@ PS_OUTPUT MainPs ( PS_INPUT i ) Store 75(@entryPointOutput.vColor) 79 Return FunctionEnd - Line 1 23 1 + Line 17 23 1 15(@MainPs(struct-PS_INPUT-vf21;):12(PS_OUTPUT) Function None 13 14(i): 10(ptr) FunctionParameter 16: Label diff --git a/Test/baseResults/hlsl.pp.line3.frag.out b/Test/baseResults/hlsl.pp.line3.frag.out index 0cf250ab47..717a21b99a 100644 --- a/Test/baseResults/hlsl.pp.line3.frag.out +++ b/Test/baseResults/hlsl.pp.line3.frag.out @@ -1,6 +1,6 @@ hlsl.pp.line3.frag // Module Version 10000 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 78 Capability Shader diff --git a/Test/baseResults/hlsl.pp.line4.frag.out b/Test/baseResults/hlsl.pp.line4.frag.out index f318a21389..da968b2386 100644 --- a/Test/baseResults/hlsl.pp.line4.frag.out +++ b/Test/baseResults/hlsl.pp.line4.frag.out @@ -1,6 +1,6 @@ hlsl.pp.line4.frag // Module Version 10000 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 116 Capability Shader @@ -112,7 +112,7 @@ PS_OUTPUT MainPs ( PS_INPUT i ) 70(i.vTextureCoords): 69(ptr) Variable Input 73: TypePointer Output 11(fvec4) 74(@entryPointOutput.vColor): 73(ptr) Variable Output - Line 1 25 1 + Line 17 25 1 5(MainPs): 3 Function None 4 NoLine 6: Label diff --git a/Test/baseResults/hlsl.pp.vert.out b/Test/baseResults/hlsl.pp.vert.out index 54781011a8..652cf174dc 100644 --- a/Test/baseResults/hlsl.pp.vert.out +++ b/Test/baseResults/hlsl.pp.vert.out @@ -26,7 +26,7 @@ Shader version: 500 0:? 'anon@0' (layout( row_major std140) uniform block{ uniform int goodGlobal1, uniform int goodGlobal2}) // Module Version 10000 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 13 Capability Shader diff --git a/Test/baseResults/hlsl.precedence.frag.out b/Test/baseResults/hlsl.precedence.frag.out index 3992618dda..4dd025a2e7 100644 --- a/Test/baseResults/hlsl.precedence.frag.out +++ b/Test/baseResults/hlsl.precedence.frag.out @@ -148,7 +148,7 @@ gl_FragCoord origin is upper left 0:? 'a4' (layout( location=3) in 4-component vector of float) // Module Version 10000 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 65 Capability Shader diff --git a/Test/baseResults/hlsl.precedence2.frag.out b/Test/baseResults/hlsl.precedence2.frag.out index f231b351e6..1611d5a55b 100644 --- a/Test/baseResults/hlsl.precedence2.frag.out +++ b/Test/baseResults/hlsl.precedence2.frag.out @@ -114,7 +114,7 @@ gl_FragCoord origin is upper left 0:? 'a4' (layout( location=3) flat in int) // Module Version 10000 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 56 Capability Shader diff --git a/Test/baseResults/hlsl.precise.frag.out b/Test/baseResults/hlsl.precise.frag.out index 39e3578399..2d134b82fc 100644 --- a/Test/baseResults/hlsl.precise.frag.out +++ b/Test/baseResults/hlsl.precise.frag.out @@ -76,7 +76,7 @@ gl_FragCoord origin is upper left 0:? '@entryPointOutput.color' (layout( location=0) noContraction out 4-component vector of float) // Module Version 10000 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 37 Capability Shader diff --git a/Test/baseResults/hlsl.preprocessor.frag.out b/Test/baseResults/hlsl.preprocessor.frag.out index 754d0d8732..106762bf5b 100644 --- a/Test/baseResults/hlsl.preprocessor.frag.out +++ b/Test/baseResults/hlsl.preprocessor.frag.out @@ -94,7 +94,7 @@ gl_FragCoord origin is upper left 0:? 'input' (layout( location=0) in 4-component vector of float) // Module Version 10000 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 40 Capability Shader diff --git a/Test/baseResults/hlsl.printf.comp.out b/Test/baseResults/hlsl.printf.comp.out index ea31c3533d..c4768a2bf9 100644 --- a/Test/baseResults/hlsl.printf.comp.out +++ b/Test/baseResults/hlsl.printf.comp.out @@ -126,7 +126,7 @@ local_size = (1, 1, 1) 0:? "first string" // Module Version 10000 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 36 Capability Shader diff --git a/Test/baseResults/hlsl.promote.atomic.frag.out b/Test/baseResults/hlsl.promote.atomic.frag.out index a34b7dddd7..91b1d58771 100644 --- a/Test/baseResults/hlsl.promote.atomic.frag.out +++ b/Test/baseResults/hlsl.promote.atomic.frag.out @@ -64,7 +64,7 @@ gl_FragCoord origin is upper left 0:? '@entryPointOutput' (layout( location=0) out 4-component vector of float) // Module Version 10000 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 36 Capability Shader diff --git a/Test/baseResults/hlsl.promote.binary.frag.out b/Test/baseResults/hlsl.promote.binary.frag.out index a0007c3222..f9f57a430e 100644 --- a/Test/baseResults/hlsl.promote.binary.frag.out +++ b/Test/baseResults/hlsl.promote.binary.frag.out @@ -172,7 +172,7 @@ gl_FragCoord origin is upper left 0:? '@entryPointOutput.Color' (layout( location=0) out 4-component vector of float) // Module Version 10000 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 83 Capability Shader diff --git a/Test/baseResults/hlsl.promote.vec1.frag.out b/Test/baseResults/hlsl.promote.vec1.frag.out index 11e324f964..7bdaf45b47 100644 --- a/Test/baseResults/hlsl.promote.vec1.frag.out +++ b/Test/baseResults/hlsl.promote.vec1.frag.out @@ -80,7 +80,7 @@ gl_FragCoord origin is upper left 0:? '@entryPointOutput' (layout( location=0) out 4-component vector of float) // Module Version 10000 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 31 Capability Shader diff --git a/Test/baseResults/hlsl.promotions.frag.out b/Test/baseResults/hlsl.promotions.frag.out index f1354063fc..6d73cc7c9c 100644 --- a/Test/baseResults/hlsl.promotions.frag.out +++ b/Test/baseResults/hlsl.promotions.frag.out @@ -1582,7 +1582,7 @@ gl_FragCoord origin is upper left 0:? '@entryPointOutput.Color' (layout( location=0) out 4-component vector of float) // Module Version 10000 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 596 Capability Shader diff --git a/Test/baseResults/hlsl.round.dx10.frag.out b/Test/baseResults/hlsl.round.dx10.frag.out index be72dc5972..f8597d4d52 100644 --- a/Test/baseResults/hlsl.round.dx10.frag.out +++ b/Test/baseResults/hlsl.round.dx10.frag.out @@ -29,7 +29,7 @@ gl_FragCoord origin is upper left 0:? Linker Objects // Module Version 10000 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 17 Capability Shader diff --git a/Test/baseResults/hlsl.round.dx9.frag.out b/Test/baseResults/hlsl.round.dx9.frag.out index ecf58a7493..d4ff02a2c9 100644 --- a/Test/baseResults/hlsl.round.dx9.frag.out +++ b/Test/baseResults/hlsl.round.dx9.frag.out @@ -29,7 +29,7 @@ gl_FragCoord origin is upper left 0:? Linker Objects // Module Version 10000 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 18 Capability Shader diff --git a/Test/baseResults/hlsl.rw.atomics.frag.out b/Test/baseResults/hlsl.rw.atomics.frag.out index 06bc31729a..83169f13a5 100644 --- a/Test/baseResults/hlsl.rw.atomics.frag.out +++ b/Test/baseResults/hlsl.rw.atomics.frag.out @@ -3946,7 +3946,7 @@ gl_FragCoord origin is upper left 0:? '@entryPointOutput.Color' (layout( location=0) out 4-component vector of float) // Module Version 10000 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 1147 Capability Shader diff --git a/Test/baseResults/hlsl.rw.bracket.frag.out b/Test/baseResults/hlsl.rw.bracket.frag.out index c79877c05a..02ed379942 100644 --- a/Test/baseResults/hlsl.rw.bracket.frag.out +++ b/Test/baseResults/hlsl.rw.bracket.frag.out @@ -1744,7 +1744,7 @@ gl_FragCoord origin is upper left 0:? '@entryPointOutput.Color' (layout( location=0) out 4-component vector of float) // Module Version 10000 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 607 Capability Shader diff --git a/Test/baseResults/hlsl.rw.register.frag.out b/Test/baseResults/hlsl.rw.register.frag.out index 265eaf9e36..558bf424bc 100644 --- a/Test/baseResults/hlsl.rw.register.frag.out +++ b/Test/baseResults/hlsl.rw.register.frag.out @@ -98,7 +98,7 @@ gl_FragCoord origin is upper left 0:? '@entryPointOutput.Color' (layout( location=0) out 4-component vector of float) // Module Version 10000 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 45 Capability Shader diff --git a/Test/baseResults/hlsl.rw.scalar.bracket.frag.out b/Test/baseResults/hlsl.rw.scalar.bracket.frag.out index 8e4716b71b..f2bef19afc 100644 --- a/Test/baseResults/hlsl.rw.scalar.bracket.frag.out +++ b/Test/baseResults/hlsl.rw.scalar.bracket.frag.out @@ -1690,7 +1690,7 @@ gl_FragCoord origin is upper left 0:? '@entryPointOutput.Color' (layout( location=0) out 4-component vector of float) // Module Version 10000 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 607 Capability Shader diff --git a/Test/baseResults/hlsl.rw.swizzle.frag.out b/Test/baseResults/hlsl.rw.swizzle.frag.out index 97dd0dc417..5121cebd7e 100644 --- a/Test/baseResults/hlsl.rw.swizzle.frag.out +++ b/Test/baseResults/hlsl.rw.swizzle.frag.out @@ -202,7 +202,7 @@ gl_FragCoord origin is upper left 0:? '@entryPointOutput' (layout( location=0) out 4-component vector of float) // Module Version 10000 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 63 Capability Shader diff --git a/Test/baseResults/hlsl.rw.vec2.bracket.frag.out b/Test/baseResults/hlsl.rw.vec2.bracket.frag.out index 1f77a77817..a0c639bf51 100644 --- a/Test/baseResults/hlsl.rw.vec2.bracket.frag.out +++ b/Test/baseResults/hlsl.rw.vec2.bracket.frag.out @@ -1708,7 +1708,7 @@ gl_FragCoord origin is upper left 0:? '@entryPointOutput.Color' (layout( location=0) out 4-component vector of float) // Module Version 10000 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 711 Capability Shader diff --git a/Test/baseResults/hlsl.sample.array.dx10.frag.out b/Test/baseResults/hlsl.sample.array.dx10.frag.out index 28d96f0d80..1acca18334 100644 --- a/Test/baseResults/hlsl.sample.array.dx10.frag.out +++ b/Test/baseResults/hlsl.sample.array.dx10.frag.out @@ -322,7 +322,7 @@ using depth_any 0:? '@entryPointOutput.Color' (layout( location=0) out 4-component vector of float) // Module Version 10000 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 146 Capability Shader diff --git a/Test/baseResults/hlsl.sample.basic.dx10.frag.out b/Test/baseResults/hlsl.sample.basic.dx10.frag.out index 12c67111ba..e30631783e 100644 --- a/Test/baseResults/hlsl.sample.basic.dx10.frag.out +++ b/Test/baseResults/hlsl.sample.basic.dx10.frag.out @@ -550,7 +550,7 @@ using depth_any 0:? '@entryPointOutput.Color' (layout( location=0) out 4-component vector of float) // Module Version 10000 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 198 Capability Shader diff --git a/Test/baseResults/hlsl.sample.dx9.frag.out b/Test/baseResults/hlsl.sample.dx9.frag.out index 2b19a2cbb0..04eb9d36ba 100644 --- a/Test/baseResults/hlsl.sample.dx9.frag.out +++ b/Test/baseResults/hlsl.sample.dx9.frag.out @@ -378,7 +378,7 @@ using depth_any 0:? '@entryPointOutput.Color' (layout( location=0) out 4-component vector of float) // Module Version 10000 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 135 Capability Shader diff --git a/Test/baseResults/hlsl.sample.dx9.vert.out b/Test/baseResults/hlsl.sample.dx9.vert.out index 0cd98f2aa7..59878a9903 100644 --- a/Test/baseResults/hlsl.sample.dx9.vert.out +++ b/Test/baseResults/hlsl.sample.dx9.vert.out @@ -154,7 +154,7 @@ Shader version: 500 0:? '@entryPointOutput.Pos' ( out 4-component vector of float Position) // Module Version 10000 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 64 Capability Shader diff --git a/Test/baseResults/hlsl.sample.offset.dx10.frag.out b/Test/baseResults/hlsl.sample.offset.dx10.frag.out index e5d204f9f7..0a351b43df 100644 --- a/Test/baseResults/hlsl.sample.offset.dx10.frag.out +++ b/Test/baseResults/hlsl.sample.offset.dx10.frag.out @@ -364,7 +364,7 @@ using depth_any 0:? '@entryPointOutput.Color' (layout( location=0) out 4-component vector of float) // Module Version 10000 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 161 Capability Shader diff --git a/Test/baseResults/hlsl.sample.offsetarray.dx10.frag.out b/Test/baseResults/hlsl.sample.offsetarray.dx10.frag.out index 5b14c657ad..0770e0baae 100644 --- a/Test/baseResults/hlsl.sample.offsetarray.dx10.frag.out +++ b/Test/baseResults/hlsl.sample.offsetarray.dx10.frag.out @@ -274,7 +274,7 @@ using depth_any 0:? '@entryPointOutput.Color' (layout( location=0) out 4-component vector of float) // Module Version 10000 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 118 Capability Shader diff --git a/Test/baseResults/hlsl.sample.sub-vec4.dx10.frag.out b/Test/baseResults/hlsl.sample.sub-vec4.dx10.frag.out index 8754a0385f..ea0e4e24be 100644 --- a/Test/baseResults/hlsl.sample.sub-vec4.dx10.frag.out +++ b/Test/baseResults/hlsl.sample.sub-vec4.dx10.frag.out @@ -154,7 +154,7 @@ gl_FragCoord origin is upper left 0:? '@entryPointOutput.Color' (layout( location=0) out 4-component vector of float) // Module Version 10000 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 72 Capability Shader diff --git a/Test/baseResults/hlsl.samplebias.array.dx10.frag.out b/Test/baseResults/hlsl.samplebias.array.dx10.frag.out index e177d77b2b..f59fc811e1 100644 --- a/Test/baseResults/hlsl.samplebias.array.dx10.frag.out +++ b/Test/baseResults/hlsl.samplebias.array.dx10.frag.out @@ -358,7 +358,7 @@ using depth_any 0:? '@entryPointOutput.Color' (layout( location=0) out 4-component vector of float) // Module Version 10000 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 146 Capability Shader diff --git a/Test/baseResults/hlsl.samplebias.basic.dx10.frag.out b/Test/baseResults/hlsl.samplebias.basic.dx10.frag.out index 2f15b42b3b..919be7198a 100644 --- a/Test/baseResults/hlsl.samplebias.basic.dx10.frag.out +++ b/Test/baseResults/hlsl.samplebias.basic.dx10.frag.out @@ -424,7 +424,7 @@ using depth_any 0:? '@entryPointOutput.Color' (layout( location=0) out 4-component vector of float) // Module Version 10000 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 170 Capability Shader diff --git a/Test/baseResults/hlsl.samplebias.offset.dx10.frag.out b/Test/baseResults/hlsl.samplebias.offset.dx10.frag.out index 291f62489c..5b297577f4 100644 --- a/Test/baseResults/hlsl.samplebias.offset.dx10.frag.out +++ b/Test/baseResults/hlsl.samplebias.offset.dx10.frag.out @@ -400,7 +400,7 @@ using depth_any 0:? '@entryPointOutput.Color' (layout( location=0) out 4-component vector of float) // Module Version 10000 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 161 Capability Shader diff --git a/Test/baseResults/hlsl.samplebias.offsetarray.dx10.frag.out b/Test/baseResults/hlsl.samplebias.offsetarray.dx10.frag.out index a5bb613970..c3114a1b50 100644 --- a/Test/baseResults/hlsl.samplebias.offsetarray.dx10.frag.out +++ b/Test/baseResults/hlsl.samplebias.offsetarray.dx10.frag.out @@ -298,7 +298,7 @@ using depth_any 0:? '@entryPointOutput.Color' (layout( location=0) out 4-component vector of float) // Module Version 10000 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 118 Capability Shader diff --git a/Test/baseResults/hlsl.samplecmp.array.dx10.frag.out b/Test/baseResults/hlsl.samplecmp.array.dx10.frag.out index 0ab61eba70..caddceeb8a 100644 --- a/Test/baseResults/hlsl.samplecmp.array.dx10.frag.out +++ b/Test/baseResults/hlsl.samplecmp.array.dx10.frag.out @@ -399,7 +399,7 @@ using depth_any Validation failed // Module Version 10000 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 209 Capability Shader diff --git a/Test/baseResults/hlsl.samplecmp.basic.dx10.frag.out b/Test/baseResults/hlsl.samplecmp.basic.dx10.frag.out index c178c571fc..fde1b58c43 100644 --- a/Test/baseResults/hlsl.samplecmp.basic.dx10.frag.out +++ b/Test/baseResults/hlsl.samplecmp.basic.dx10.frag.out @@ -381,7 +381,7 @@ using depth_any Validation failed // Module Version 10000 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 198 Capability Shader diff --git a/Test/baseResults/hlsl.samplecmp.dualmode.frag.out b/Test/baseResults/hlsl.samplecmp.dualmode.frag.out index 6859f6d9dc..7f17e90022 100644 --- a/Test/baseResults/hlsl.samplecmp.dualmode.frag.out +++ b/Test/baseResults/hlsl.samplecmp.dualmode.frag.out @@ -85,7 +85,7 @@ gl_FragCoord origin is upper left 0:? 'g_tTex' (layout( binding=3) uniform texture1D) // Module Version 10000 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 43 Capability Shader diff --git a/Test/baseResults/hlsl.samplecmp.offset.dx10.frag.out b/Test/baseResults/hlsl.samplecmp.offset.dx10.frag.out index 1e50d7bbb3..cc1b858125 100644 --- a/Test/baseResults/hlsl.samplecmp.offset.dx10.frag.out +++ b/Test/baseResults/hlsl.samplecmp.offset.dx10.frag.out @@ -327,7 +327,7 @@ using depth_any Validation failed // Module Version 10000 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 167 Capability Shader diff --git a/Test/baseResults/hlsl.samplecmp.offsetarray.dx10.frag.out b/Test/baseResults/hlsl.samplecmp.offsetarray.dx10.frag.out index 3b1eb6f67c..9d8413c965 100644 --- a/Test/baseResults/hlsl.samplecmp.offsetarray.dx10.frag.out +++ b/Test/baseResults/hlsl.samplecmp.offsetarray.dx10.frag.out @@ -339,7 +339,7 @@ using depth_any Validation failed // Module Version 10000 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 178 Capability Shader diff --git a/Test/baseResults/hlsl.samplecmplevelzero.array.dx10.frag.out b/Test/baseResults/hlsl.samplecmplevelzero.array.dx10.frag.out index a734e5440e..45e33ffadb 100644 --- a/Test/baseResults/hlsl.samplecmplevelzero.array.dx10.frag.out +++ b/Test/baseResults/hlsl.samplecmplevelzero.array.dx10.frag.out @@ -435,7 +435,7 @@ using depth_any Validation failed // Module Version 10000 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 210 Capability Shader diff --git a/Test/baseResults/hlsl.samplecmplevelzero.basic.dx10.frag.out b/Test/baseResults/hlsl.samplecmplevelzero.basic.dx10.frag.out index 54135cdb5f..6807d995fe 100644 --- a/Test/baseResults/hlsl.samplecmplevelzero.basic.dx10.frag.out +++ b/Test/baseResults/hlsl.samplecmplevelzero.basic.dx10.frag.out @@ -417,7 +417,7 @@ using depth_any Validation failed // Module Version 10000 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 199 Capability Shader diff --git a/Test/baseResults/hlsl.samplecmplevelzero.offset.dx10.frag.out b/Test/baseResults/hlsl.samplecmplevelzero.offset.dx10.frag.out index 4922cdedbe..338a5e71da 100644 --- a/Test/baseResults/hlsl.samplecmplevelzero.offset.dx10.frag.out +++ b/Test/baseResults/hlsl.samplecmplevelzero.offset.dx10.frag.out @@ -351,7 +351,7 @@ using depth_any Validation failed // Module Version 10000 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 168 Capability Shader diff --git a/Test/baseResults/hlsl.samplecmplevelzero.offsetarray.dx10.frag.out b/Test/baseResults/hlsl.samplecmplevelzero.offsetarray.dx10.frag.out index 22bd25772a..4b68c90f38 100644 --- a/Test/baseResults/hlsl.samplecmplevelzero.offsetarray.dx10.frag.out +++ b/Test/baseResults/hlsl.samplecmplevelzero.offsetarray.dx10.frag.out @@ -363,7 +363,7 @@ using depth_any Validation failed // Module Version 10000 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 179 Capability Shader diff --git a/Test/baseResults/hlsl.samplegrad.array.dx10.frag.out b/Test/baseResults/hlsl.samplegrad.array.dx10.frag.out index 67e1d15790..a2e58bd6a9 100644 --- a/Test/baseResults/hlsl.samplegrad.array.dx10.frag.out +++ b/Test/baseResults/hlsl.samplegrad.array.dx10.frag.out @@ -430,7 +430,7 @@ using depth_any 0:? '@entryPointOutput.Color' (layout( location=0) out 4-component vector of float) // Module Version 10000 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 140 Capability Shader diff --git a/Test/baseResults/hlsl.samplegrad.basic.dx10.frag.out b/Test/baseResults/hlsl.samplegrad.basic.dx10.frag.out index 8f2fabc420..09bfbdf30b 100644 --- a/Test/baseResults/hlsl.samplegrad.basic.dx10.frag.out +++ b/Test/baseResults/hlsl.samplegrad.basic.dx10.frag.out @@ -532,7 +532,7 @@ using depth_any 0:? '@entryPointOutput.Color' (layout( location=0) out 4-component vector of float) // Module Version 10000 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 175 Capability Shader diff --git a/Test/baseResults/hlsl.samplegrad.basic.dx10.vert.out b/Test/baseResults/hlsl.samplegrad.basic.dx10.vert.out index 69820905fa..f63d9e8e4e 100644 --- a/Test/baseResults/hlsl.samplegrad.basic.dx10.vert.out +++ b/Test/baseResults/hlsl.samplegrad.basic.dx10.vert.out @@ -494,7 +494,7 @@ Shader version: 500 0:? '@entryPointOutput.Pos' ( out 4-component vector of float Position) // Module Version 10000 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 166 Capability Shader diff --git a/Test/baseResults/hlsl.samplegrad.offset.dx10.frag.out b/Test/baseResults/hlsl.samplegrad.offset.dx10.frag.out index 5694f89bc2..3180e7a33b 100644 --- a/Test/baseResults/hlsl.samplegrad.offset.dx10.frag.out +++ b/Test/baseResults/hlsl.samplegrad.offset.dx10.frag.out @@ -472,7 +472,7 @@ using depth_any 0:? '@entryPointOutput.Color' (layout( location=0) out 4-component vector of float) // Module Version 10000 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 166 Capability Shader diff --git a/Test/baseResults/hlsl.samplegrad.offsetarray.dx10.frag.out b/Test/baseResults/hlsl.samplegrad.offsetarray.dx10.frag.out index a3bc4c14d8..ce799699c8 100644 --- a/Test/baseResults/hlsl.samplegrad.offsetarray.dx10.frag.out +++ b/Test/baseResults/hlsl.samplegrad.offsetarray.dx10.frag.out @@ -340,7 +340,7 @@ using depth_any 0:? '@entryPointOutput.Color' (layout( location=0) out 4-component vector of float) // Module Version 10000 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 120 Capability Shader diff --git a/Test/baseResults/hlsl.samplelevel.array.dx10.frag.out b/Test/baseResults/hlsl.samplelevel.array.dx10.frag.out index 68e0e87db9..7f3af78310 100644 --- a/Test/baseResults/hlsl.samplelevel.array.dx10.frag.out +++ b/Test/baseResults/hlsl.samplelevel.array.dx10.frag.out @@ -358,7 +358,7 @@ using depth_any 0:? '@entryPointOutput.Color' (layout( location=0) out 4-component vector of float) // Module Version 10000 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 147 Capability Shader diff --git a/Test/baseResults/hlsl.samplelevel.basic.dx10.frag.out b/Test/baseResults/hlsl.samplelevel.basic.dx10.frag.out index ee3588da5f..e1d449f595 100644 --- a/Test/baseResults/hlsl.samplelevel.basic.dx10.frag.out +++ b/Test/baseResults/hlsl.samplelevel.basic.dx10.frag.out @@ -426,7 +426,7 @@ using depth_any 0:? '@entryPointOutput.Color' (layout( location=0) out 4-component vector of float) // Module Version 10000 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 172 Capability Shader diff --git a/Test/baseResults/hlsl.samplelevel.basic.dx10.vert.out b/Test/baseResults/hlsl.samplelevel.basic.dx10.vert.out index a3ff9e6624..bbb51f37b7 100644 --- a/Test/baseResults/hlsl.samplelevel.basic.dx10.vert.out +++ b/Test/baseResults/hlsl.samplelevel.basic.dx10.vert.out @@ -386,7 +386,7 @@ Shader version: 500 0:? '@entryPointOutput.Pos' ( out 4-component vector of float Position) // Module Version 10000 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 162 Capability Shader diff --git a/Test/baseResults/hlsl.samplelevel.offset.dx10.frag.out b/Test/baseResults/hlsl.samplelevel.offset.dx10.frag.out index c9d431b217..1b06c57977 100644 --- a/Test/baseResults/hlsl.samplelevel.offset.dx10.frag.out +++ b/Test/baseResults/hlsl.samplelevel.offset.dx10.frag.out @@ -400,7 +400,7 @@ using depth_any 0:? '@entryPointOutput.Color' (layout( location=0) out 4-component vector of float) // Module Version 10000 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 162 Capability Shader diff --git a/Test/baseResults/hlsl.samplelevel.offsetarray.dx10.frag.out b/Test/baseResults/hlsl.samplelevel.offsetarray.dx10.frag.out index 3f6ae55658..e256054611 100644 --- a/Test/baseResults/hlsl.samplelevel.offsetarray.dx10.frag.out +++ b/Test/baseResults/hlsl.samplelevel.offsetarray.dx10.frag.out @@ -298,7 +298,7 @@ using depth_any 0:? '@entryPointOutput.Color' (layout( location=0) out 4-component vector of float) // Module Version 10000 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 119 Capability Shader diff --git a/Test/baseResults/hlsl.scalar-length.frag.out b/Test/baseResults/hlsl.scalar-length.frag.out index c09216ae87..fd5f0b8492 100644 --- a/Test/baseResults/hlsl.scalar-length.frag.out +++ b/Test/baseResults/hlsl.scalar-length.frag.out @@ -64,7 +64,7 @@ gl_FragCoord origin is upper left 0:? '@entryPointOutput' (layout( location=0) out 4-component vector of float) // Module Version 10000 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 30 Capability Shader diff --git a/Test/baseResults/hlsl.scalar2matrix.frag.out b/Test/baseResults/hlsl.scalar2matrix.frag.out index 62980dd6f9..ee0c3db0b9 100644 --- a/Test/baseResults/hlsl.scalar2matrix.frag.out +++ b/Test/baseResults/hlsl.scalar2matrix.frag.out @@ -374,7 +374,7 @@ gl_FragCoord origin is upper left 0:? '@entryPointOutput' (layout( location=0) out 4-component vector of float) // Module Version 10000 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 96 Capability Shader diff --git a/Test/baseResults/hlsl.scalarCast.vert.out b/Test/baseResults/hlsl.scalarCast.vert.out index 17356f94e5..f10f86c620 100644 --- a/Test/baseResults/hlsl.scalarCast.vert.out +++ b/Test/baseResults/hlsl.scalarCast.vert.out @@ -322,7 +322,7 @@ Shader version: 500 0:? '@entryPointOutput.texCoord' (layout( location=0) out 2-component vector of float) // Module Version 10000 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 120 Capability Shader diff --git a/Test/baseResults/hlsl.scope.frag.out b/Test/baseResults/hlsl.scope.frag.out index 5d73bbad99..24f452caaf 100644 --- a/Test/baseResults/hlsl.scope.frag.out +++ b/Test/baseResults/hlsl.scope.frag.out @@ -102,7 +102,7 @@ gl_FragCoord origin is upper left 0:? 'input' (layout( location=0) in 4-component vector of float) // Module Version 10000 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 49 Capability Shader diff --git a/Test/baseResults/hlsl.self_cast.frag.out b/Test/baseResults/hlsl.self_cast.frag.out index ad4252bad8..1328833c31 100644 --- a/Test/baseResults/hlsl.self_cast.frag.out +++ b/Test/baseResults/hlsl.self_cast.frag.out @@ -68,7 +68,7 @@ gl_FragCoord origin is upper left 0:? Linker Objects // Module Version 10000 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 32 Capability Shader diff --git a/Test/baseResults/hlsl.semantic-1.vert.out b/Test/baseResults/hlsl.semantic-1.vert.out index 25fb582260..191afbc865 100644 --- a/Test/baseResults/hlsl.semantic-1.vert.out +++ b/Test/baseResults/hlsl.semantic-1.vert.out @@ -242,7 +242,7 @@ Shader version: 500 0:? 'v' (layout( location=0) in 4-component vector of float) // Module Version 10000 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 84 Capability Shader diff --git a/Test/baseResults/hlsl.semantic.geom.out b/Test/baseResults/hlsl.semantic.geom.out index 0aba00030a..740f4a2a44 100644 --- a/Test/baseResults/hlsl.semantic.geom.out +++ b/Test/baseResults/hlsl.semantic.geom.out @@ -261,7 +261,7 @@ output primitive = line_strip Validation failed // Module Version 10000 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 88 Capability Geometry diff --git a/Test/baseResults/hlsl.semantic.vert.out b/Test/baseResults/hlsl.semantic.vert.out index c17969a5bb..41edff2402 100644 --- a/Test/baseResults/hlsl.semantic.vert.out +++ b/Test/baseResults/hlsl.semantic.vert.out @@ -211,7 +211,7 @@ Shader version: 500 Validation failed // Module Version 10000 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 70 Capability Shader diff --git a/Test/baseResults/hlsl.semicolons.frag.out b/Test/baseResults/hlsl.semicolons.frag.out index 1afcd5b412..347190ea53 100644 --- a/Test/baseResults/hlsl.semicolons.frag.out +++ b/Test/baseResults/hlsl.semicolons.frag.out @@ -74,7 +74,7 @@ gl_FragCoord origin is upper left 0:? '@entryPointOutput.color' (layout( location=0) out 4-component vector of float) // Module Version 10000 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 31 Capability Shader diff --git a/Test/baseResults/hlsl.shapeConv.frag.out b/Test/baseResults/hlsl.shapeConv.frag.out index d3b17f01bd..05bfa6ab0b 100644 --- a/Test/baseResults/hlsl.shapeConv.frag.out +++ b/Test/baseResults/hlsl.shapeConv.frag.out @@ -319,7 +319,7 @@ gl_FragCoord origin is upper left 0:? Linker Objects // Module Version 10000 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 127 Capability Shader diff --git a/Test/baseResults/hlsl.shapeConvRet.frag.out b/Test/baseResults/hlsl.shapeConvRet.frag.out index e3e27a26bb..a23478c5c6 100644 --- a/Test/baseResults/hlsl.shapeConvRet.frag.out +++ b/Test/baseResults/hlsl.shapeConvRet.frag.out @@ -68,7 +68,7 @@ gl_FragCoord origin is upper left 0:? 'f' (layout( location=0) in float) // Module Version 10000 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 35 Capability Shader diff --git a/Test/baseResults/hlsl.sin.frag.out b/Test/baseResults/hlsl.sin.frag.out index bf88ce8690..1f44be5aed 100644 --- a/Test/baseResults/hlsl.sin.frag.out +++ b/Test/baseResults/hlsl.sin.frag.out @@ -52,7 +52,7 @@ gl_FragCoord origin is upper left 0:? 'input' (layout( location=0) in 4-component vector of float) // Module Version 10000 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 26 Capability Shader diff --git a/Test/baseResults/hlsl.singleArgIntPromo.vert.out b/Test/baseResults/hlsl.singleArgIntPromo.vert.out index a6105944ef..a5bf362afb 100644 --- a/Test/baseResults/hlsl.singleArgIntPromo.vert.out +++ b/Test/baseResults/hlsl.singleArgIntPromo.vert.out @@ -194,7 +194,7 @@ Shader version: 500 0:? '@entryPointOutput' (layout( location=0) out float) // Module Version 10000 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 75 Capability Shader diff --git a/Test/baseResults/hlsl.snorm.uav.comp.out b/Test/baseResults/hlsl.snorm.uav.comp.out index 7b8cd4168f..40ab6cf13e 100644 --- a/Test/baseResults/hlsl.snorm.uav.comp.out +++ b/Test/baseResults/hlsl.snorm.uav.comp.out @@ -112,7 +112,7 @@ local_size = (16, 16, 1) 0:? 'tid' ( in 3-component vector of uint GlobalInvocationID) // Module Version 10000 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 54 Capability Shader diff --git a/Test/baseResults/hlsl.specConstant.frag.out b/Test/baseResults/hlsl.specConstant.frag.out index eb62242c07..3d81789e7d 100644 --- a/Test/baseResults/hlsl.specConstant.frag.out +++ b/Test/baseResults/hlsl.specConstant.frag.out @@ -136,7 +136,7 @@ gl_FragCoord origin is upper left 0:? '@entryPointOutput' (layout( location=0) out 4-component vector of float) // Module Version 10000 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 61 Capability Shader diff --git a/Test/baseResults/hlsl.spv.1.6.discard.frag.out b/Test/baseResults/hlsl.spv.1.6.discard.frag.out index d5219144cd..0d09d2592b 100644 --- a/Test/baseResults/hlsl.spv.1.6.discard.frag.out +++ b/Test/baseResults/hlsl.spv.1.6.discard.frag.out @@ -108,7 +108,7 @@ gl_FragCoord origin is upper left 0:? 'input' (layout( location=0) in 4-component vector of float) // Module Version 10600 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 47 Capability Shader diff --git a/Test/baseResults/hlsl.staticFuncInit.frag.out b/Test/baseResults/hlsl.staticFuncInit.frag.out index 586daceb01..9e1e4a8e72 100644 --- a/Test/baseResults/hlsl.staticFuncInit.frag.out +++ b/Test/baseResults/hlsl.staticFuncInit.frag.out @@ -130,7 +130,7 @@ gl_FragCoord origin is upper left 0:? '@entryPointOutput' (layout( location=0) out 4-component vector of float) // Module Version 10000 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 57 Capability Shader diff --git a/Test/baseResults/hlsl.staticMemberFunction.frag.out b/Test/baseResults/hlsl.staticMemberFunction.frag.out index f0e5f9f064..9cd3d38610 100644 --- a/Test/baseResults/hlsl.staticMemberFunction.frag.out +++ b/Test/baseResults/hlsl.staticMemberFunction.frag.out @@ -118,7 +118,7 @@ gl_FragCoord origin is upper left 0:? '@entryPointOutput' (layout( location=0) out 4-component vector of float) // Module Version 10000 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 54 Capability Shader diff --git a/Test/baseResults/hlsl.store.rwbyteaddressbuffer.type.comp.out b/Test/baseResults/hlsl.store.rwbyteaddressbuffer.type.comp.out index e518821825..2198affb7f 100644 --- a/Test/baseResults/hlsl.store.rwbyteaddressbuffer.type.comp.out +++ b/Test/baseResults/hlsl.store.rwbyteaddressbuffer.type.comp.out @@ -96,7 +96,7 @@ local_size = (64, 1, 1) 0:? 'dispatchThreadID' ( in 3-component vector of uint GlobalInvocationID) // Module Version 10000 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 42 Capability Shader diff --git a/Test/baseResults/hlsl.string.frag.out b/Test/baseResults/hlsl.string.frag.out index 047f4136e2..2a5ce37d35 100644 --- a/Test/baseResults/hlsl.string.frag.out +++ b/Test/baseResults/hlsl.string.frag.out @@ -50,7 +50,7 @@ gl_FragCoord origin is upper left 0:? 'f' (layout( location=0) in float) // Module Version 10000 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 24 Capability Shader diff --git a/Test/baseResults/hlsl.stringtoken.frag.out b/Test/baseResults/hlsl.stringtoken.frag.out index f2ca742cdd..144bebc675 100644 --- a/Test/baseResults/hlsl.stringtoken.frag.out +++ b/Test/baseResults/hlsl.stringtoken.frag.out @@ -70,7 +70,7 @@ gl_FragCoord origin is upper left 0:? '@entryPointOutput.Color' (layout( location=0) out 4-component vector of float) // Module Version 10000 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 34 Capability Shader diff --git a/Test/baseResults/hlsl.struct.frag.out b/Test/baseResults/hlsl.struct.frag.out index 7330f567f4..a36bba429f 100644 --- a/Test/baseResults/hlsl.struct.frag.out +++ b/Test/baseResults/hlsl.struct.frag.out @@ -213,7 +213,7 @@ gl_FragCoord origin is upper left Validation failed // Module Version 10000 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 102 Capability Shader diff --git a/Test/baseResults/hlsl.struct.split-1.vert.out b/Test/baseResults/hlsl.struct.split-1.vert.out index f204bd50a8..89b4e4e95d 100644 --- a/Test/baseResults/hlsl.struct.split-1.vert.out +++ b/Test/baseResults/hlsl.struct.split-1.vert.out @@ -196,7 +196,7 @@ Shader version: 500 0:? 'Pos_loose' (layout( location=3) in 4-component vector of float) // Module Version 10000 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 70 Capability Shader diff --git a/Test/baseResults/hlsl.struct.split.array.geom.out b/Test/baseResults/hlsl.struct.split.array.geom.out index 3d75fb87d7..0e3e8523e6 100644 --- a/Test/baseResults/hlsl.struct.split.array.geom.out +++ b/Test/baseResults/hlsl.struct.split.array.geom.out @@ -160,7 +160,7 @@ output primitive = triangle_strip 0:? 'OutputStream.VertexID' (layout( location=2) out uint) // Module Version 10000 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 82 Capability Geometry diff --git a/Test/baseResults/hlsl.struct.split.assign.frag.out b/Test/baseResults/hlsl.struct.split.assign.frag.out index c40dbd6818..16c897b207 100644 --- a/Test/baseResults/hlsl.struct.split.assign.frag.out +++ b/Test/baseResults/hlsl.struct.split.assign.frag.out @@ -209,7 +209,7 @@ gl_FragCoord origin is upper left Validation failed // Module Version 10000 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 66 Capability Shader diff --git a/Test/baseResults/hlsl.struct.split.call.vert.out b/Test/baseResults/hlsl.struct.split.call.vert.out index 2570552e4b..7451a34293 100644 --- a/Test/baseResults/hlsl.struct.split.call.vert.out +++ b/Test/baseResults/hlsl.struct.split.call.vert.out @@ -214,7 +214,7 @@ Shader version: 500 0:? 'vsin.x1_in' (layout( location=2) in int) // Module Version 10000 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 77 Capability Shader diff --git a/Test/baseResults/hlsl.struct.split.nested.geom.out b/Test/baseResults/hlsl.struct.split.nested.geom.out index 1abe4c385c..9bab38c218 100644 --- a/Test/baseResults/hlsl.struct.split.nested.geom.out +++ b/Test/baseResults/hlsl.struct.split.nested.geom.out @@ -430,7 +430,7 @@ output primitive = triangle_strip 0:? 'ts.contains_no_builtin_io.m1' (layout( location=3) out int) // Module Version 10000 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 99 Capability Geometry diff --git a/Test/baseResults/hlsl.struct.split.trivial.geom.out b/Test/baseResults/hlsl.struct.split.trivial.geom.out index 89c02bf2ab..f46316f66b 100644 --- a/Test/baseResults/hlsl.struct.split.trivial.geom.out +++ b/Test/baseResults/hlsl.struct.split.trivial.geom.out @@ -192,7 +192,7 @@ output primitive = triangle_strip 0:? 'ts.pos' ( out 4-component vector of float Position) // Module Version 10000 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 67 Capability Geometry diff --git a/Test/baseResults/hlsl.struct.split.trivial.vert.out b/Test/baseResults/hlsl.struct.split.trivial.vert.out index f1470ab67c..065f42203e 100644 --- a/Test/baseResults/hlsl.struct.split.trivial.vert.out +++ b/Test/baseResults/hlsl.struct.split.trivial.vert.out @@ -98,7 +98,7 @@ Shader version: 500 0:? 'Pos_loose' (layout( location=1) in 4-component vector of float) // Module Version 10000 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 45 Capability Shader diff --git a/Test/baseResults/hlsl.structIoFourWay.frag.out b/Test/baseResults/hlsl.structIoFourWay.frag.out index fd1a8bb41d..3faff5bde2 100644 --- a/Test/baseResults/hlsl.structIoFourWay.frag.out +++ b/Test/baseResults/hlsl.structIoFourWay.frag.out @@ -162,7 +162,7 @@ using depth_greater 0:? 't.normal' (layout( location=3) in 4-component vector of float) // Module Version 10000 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 65 Capability Shader diff --git a/Test/baseResults/hlsl.structStructName.frag.out b/Test/baseResults/hlsl.structStructName.frag.out index 3fdbca95b3..ce305b0695 100644 --- a/Test/baseResults/hlsl.structStructName.frag.out +++ b/Test/baseResults/hlsl.structStructName.frag.out @@ -44,7 +44,7 @@ gl_FragCoord origin is upper left 0:? '@entryPointOutput' (layout( location=0) out int) // Module Version 10000 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 22 Capability Shader diff --git a/Test/baseResults/hlsl.structarray.flatten.frag.out b/Test/baseResults/hlsl.structarray.flatten.frag.out index 97e57b164f..4896dca5b9 100644 --- a/Test/baseResults/hlsl.structarray.flatten.frag.out +++ b/Test/baseResults/hlsl.structarray.flatten.frag.out @@ -157,7 +157,7 @@ gl_FragCoord origin is upper left Validation failed // Module Version 10000 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 80 Capability Shader diff --git a/Test/baseResults/hlsl.structarray.flatten.geom.out b/Test/baseResults/hlsl.structarray.flatten.geom.out index 619dccf6a0..e36e5f0558 100644 --- a/Test/baseResults/hlsl.structarray.flatten.geom.out +++ b/Test/baseResults/hlsl.structarray.flatten.geom.out @@ -314,7 +314,7 @@ output primitive = triangle_strip 0:? 'outStream.uv' (layout( location=1) out 2-component vector of float) // Module Version 10000 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 82 Capability Geometry diff --git a/Test/baseResults/hlsl.structbuffer.append.fn.frag.out b/Test/baseResults/hlsl.structbuffer.append.fn.frag.out index a4e540f07e..acfbf5d906 100644 --- a/Test/baseResults/hlsl.structbuffer.append.fn.frag.out +++ b/Test/baseResults/hlsl.structbuffer.append.fn.frag.out @@ -151,7 +151,7 @@ gl_FragCoord origin is upper left Validation failed // Module Version 10000 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 70 Capability Shader diff --git a/Test/baseResults/hlsl.structbuffer.append.frag.out b/Test/baseResults/hlsl.structbuffer.append.frag.out index 518b67f04e..4c57e0bcc6 100644 --- a/Test/baseResults/hlsl.structbuffer.append.frag.out +++ b/Test/baseResults/hlsl.structbuffer.append.frag.out @@ -124,7 +124,7 @@ gl_FragCoord origin is upper left 0:? 'pos' (layout( location=0) flat in uint) // Module Version 10000 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 56 Capability Shader diff --git a/Test/baseResults/hlsl.structbuffer.atomics.frag.out b/Test/baseResults/hlsl.structbuffer.atomics.frag.out index ba874ee610..3f26652d67 100644 --- a/Test/baseResults/hlsl.structbuffer.atomics.frag.out +++ b/Test/baseResults/hlsl.structbuffer.atomics.frag.out @@ -475,7 +475,7 @@ gl_FragCoord origin is upper left Validation failed // Module Version 10000 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 87 Capability Shader diff --git a/Test/baseResults/hlsl.structbuffer.byte.frag.out b/Test/baseResults/hlsl.structbuffer.byte.frag.out index b5252bce79..f3e92cea8c 100644 --- a/Test/baseResults/hlsl.structbuffer.byte.frag.out +++ b/Test/baseResults/hlsl.structbuffer.byte.frag.out @@ -324,7 +324,7 @@ gl_FragCoord origin is upper left 0:? 'pos' (layout( location=0) flat in uint) // Module Version 10000 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 114 Capability Shader diff --git a/Test/baseResults/hlsl.structbuffer.coherent.frag.out b/Test/baseResults/hlsl.structbuffer.coherent.frag.out index 3d97ee55e9..65e4a1461e 100644 --- a/Test/baseResults/hlsl.structbuffer.coherent.frag.out +++ b/Test/baseResults/hlsl.structbuffer.coherent.frag.out @@ -176,7 +176,7 @@ gl_FragCoord origin is upper left 0:? 'pos' (layout( location=0) flat in uint) // Module Version 10000 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 78 Capability Shader diff --git a/Test/baseResults/hlsl.structbuffer.floatidx.comp.out b/Test/baseResults/hlsl.structbuffer.floatidx.comp.out index a7668a7f14..6a86e48117 100644 --- a/Test/baseResults/hlsl.structbuffer.floatidx.comp.out +++ b/Test/baseResults/hlsl.structbuffer.floatidx.comp.out @@ -180,7 +180,7 @@ local_size = (1, 1, 1) 0:? 'nThreadId' ( in 3-component vector of uint GlobalInvocationID) // Module Version 10000 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 85 Capability Shader diff --git a/Test/baseResults/hlsl.structbuffer.fn.frag.out b/Test/baseResults/hlsl.structbuffer.fn.frag.out index bd2a4e6769..2086d59fea 100644 --- a/Test/baseResults/hlsl.structbuffer.fn.frag.out +++ b/Test/baseResults/hlsl.structbuffer.fn.frag.out @@ -139,7 +139,7 @@ gl_FragCoord origin is upper left Validation failed // Module Version 10000 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 78 Capability Shader diff --git a/Test/baseResults/hlsl.structbuffer.fn2.comp.out b/Test/baseResults/hlsl.structbuffer.fn2.comp.out index 3409a5f7e4..1953d46793 100644 --- a/Test/baseResults/hlsl.structbuffer.fn2.comp.out +++ b/Test/baseResults/hlsl.structbuffer.fn2.comp.out @@ -136,7 +136,7 @@ local_size = (256, 1, 1) 0:? 'dispatchId' ( in 3-component vector of uint GlobalInvocationID) // Module Version 10000 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 63 Capability Shader diff --git a/Test/baseResults/hlsl.structbuffer.frag.out b/Test/baseResults/hlsl.structbuffer.frag.out index 294a1c6c0b..0e16ef1613 100644 --- a/Test/baseResults/hlsl.structbuffer.frag.out +++ b/Test/baseResults/hlsl.structbuffer.frag.out @@ -188,7 +188,7 @@ gl_FragCoord origin is upper left 0:? 'pos' (layout( location=0) flat in uint) // Module Version 10000 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 96 Capability Shader diff --git a/Test/baseResults/hlsl.structbuffer.incdec.frag.hlslfun1.out b/Test/baseResults/hlsl.structbuffer.incdec.frag.hlslfun1.out index 23b2125650..95b13a8f56 100644 --- a/Test/baseResults/hlsl.structbuffer.incdec.frag.hlslfun1.out +++ b/Test/baseResults/hlsl.structbuffer.incdec.frag.hlslfun1.out @@ -1,6 +1,6 @@ hlsl.structbuffer.incdec.frag // Module Version 10000 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 70 Capability Shader diff --git a/Test/baseResults/hlsl.structbuffer.incdec.frag.out b/Test/baseResults/hlsl.structbuffer.incdec.frag.out index 2605777922..72efcc0eb2 100644 --- a/Test/baseResults/hlsl.structbuffer.incdec.frag.out +++ b/Test/baseResults/hlsl.structbuffer.incdec.frag.out @@ -204,7 +204,7 @@ gl_FragCoord origin is upper left 0:? 'pos' (layout( location=0) flat in uint) // Module Version 10000 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 70 Capability Shader diff --git a/Test/baseResults/hlsl.structbuffer.rw.frag.out b/Test/baseResults/hlsl.structbuffer.rw.frag.out index 1eb98aa126..9dfdaf0447 100644 --- a/Test/baseResults/hlsl.structbuffer.rw.frag.out +++ b/Test/baseResults/hlsl.structbuffer.rw.frag.out @@ -176,7 +176,7 @@ gl_FragCoord origin is upper left 0:? 'pos' (layout( location=0) flat in uint) // Module Version 10000 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 78 Capability Shader diff --git a/Test/baseResults/hlsl.structbuffer.rwbyte.frag.out b/Test/baseResults/hlsl.structbuffer.rwbyte.frag.out index 337442d5d1..5fdbd1d1e9 100644 --- a/Test/baseResults/hlsl.structbuffer.rwbyte.frag.out +++ b/Test/baseResults/hlsl.structbuffer.rwbyte.frag.out @@ -1004,7 +1004,7 @@ gl_FragCoord origin is upper left 0:? 'pos' (layout( location=0) flat in uint) // Module Version 10000 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 239 Capability Shader diff --git a/Test/baseResults/hlsl.structbuffer.rwbyte2.comp.out b/Test/baseResults/hlsl.structbuffer.rwbyte2.comp.out index 127d52cc81..b024bd4201 100644 --- a/Test/baseResults/hlsl.structbuffer.rwbyte2.comp.out +++ b/Test/baseResults/hlsl.structbuffer.rwbyte2.comp.out @@ -76,7 +76,7 @@ local_size = (1, 1, 1) 0:? 'g_bbuf' (layout( row_major std430) buffer block{layout( row_major std430) buffer unsized 1-element array of uint @data}) // Module Version 10000 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 30 Capability Shader diff --git a/Test/baseResults/hlsl.structcopy.comp.out b/Test/baseResults/hlsl.structcopy.comp.out new file mode 100644 index 0000000000..afc03e09e2 --- /dev/null +++ b/Test/baseResults/hlsl.structcopy.comp.out @@ -0,0 +1,402 @@ +hlsl.structcopy.comp +Shader version: 500 +local_size = (128, 1, 1) +0:? Sequence +0:20 Function Definition: @main(u1; ( temp void) +0:20 Function Parameters: +0:20 'id' ( in uint) +0:? Sequence +0:21 move second child to first child ( temp structure{ temp uint a, temp uint b, temp uint c}) +0:21 direct index ( temp structure{ temp uint a, temp uint b, temp uint c}) +0:21 's' ( shared 128-element array of structure{ temp uint a, temp uint b, temp uint c}) +0:21 Constant: +0:21 0 (const int) +0:21 Constant: +0:21 1 (const uint) +0:21 2 (const uint) +0:21 3 (const uint) +0:22 Sequence +0:22 move second child to first child ( temp uint) +0:22 'count' ( temp uint) +0:22 count: direct index for structure ( temp uint) +0:22 direct index (layout( row_major std430) buffer structure{ temp uint count, temp unsized 1-element array of structure{ temp uint a, temp uint b, temp uint c} data}) +0:22 @data: direct index for structure (layout( row_major std430) buffer unsized 1-element array of structure{ temp uint count, temp unsized 1-element array of structure{ temp uint a, temp uint b, temp uint c} data}) +0:22 'sb' (layout( row_major std430) readonly buffer block{layout( row_major std430) buffer unsized 1-element array of structure{ temp uint count, temp unsized 1-element array of structure{ temp uint a, temp uint b, temp uint c} data} @data}) +0:22 Constant: +0:22 0 (const uint) +0:22 Constant: +0:22 0 (const int) +0:22 Constant: +0:22 0 (const int) +0:23 Sequence +0:23 move second child to first child ( temp structure{ temp uint a, temp uint b, temp uint c}) +0:23 'ms' ( temp structure{ temp uint a, temp uint b, temp uint c}) +0:23 Test condition and select ( temp structure{ temp uint a, temp uint b, temp uint c}): no shortcircuit +0:23 Condition +0:23 Compare Greater Than ( temp bool) +0:23 'id' ( in uint) +0:23 'count' ( temp uint) +0:23 true case +0:23 indirect index ( temp structure{ temp uint a, temp uint b, temp uint c}) +0:23 's' ( shared 128-element array of structure{ temp uint a, temp uint b, temp uint c}) +0:23 subtract ( temp uint) +0:23 'id' ( in uint) +0:23 'count' ( temp uint) +0:23 false case +0:23 indirect index ( temp structure{ temp uint a, temp uint b, temp uint c}) +0:23 data: direct index for structure ( temp unsized 1-element array of structure{ temp uint a, temp uint b, temp uint c}) +0:23 direct index (layout( row_major std430) buffer structure{ temp uint count, temp unsized 1-element array of structure{ temp uint a, temp uint b, temp uint c} data}) +0:23 @data: direct index for structure (layout( row_major std430) buffer unsized 1-element array of structure{ temp uint count, temp unsized 1-element array of structure{ temp uint a, temp uint b, temp uint c} data}) +0:23 'sb' (layout( row_major std430) readonly buffer block{layout( row_major std430) buffer unsized 1-element array of structure{ temp uint count, temp unsized 1-element array of structure{ temp uint a, temp uint b, temp uint c} data} @data}) +0:23 Constant: +0:23 0 (const uint) +0:23 Constant: +0:23 0 (const int) +0:23 Constant: +0:23 1 (const int) +0:23 'id' ( in uint) +0:25 AtomicAdd ( temp uint) +0:25 a: direct index for structure ( temp uint) +0:25 direct index (layout( row_major std430) buffer structure{ temp uint a, temp uint b, temp uint c}) +0:25 @data: direct index for structure (layout( row_major std430) buffer unsized 1-element array of structure{ temp uint a, temp uint b, temp uint c}) +0:25 'o' (layout( row_major std430) readonly buffer block{layout( row_major std430) buffer unsized 1-element array of structure{ temp uint a, temp uint b, temp uint c} @data}) +0:25 Constant: +0:25 0 (const uint) +0:25 Constant: +0:25 0 (const int) +0:25 Constant: +0:25 0 (const int) +0:25 a: direct index for structure ( temp uint) +0:25 'ms' ( temp structure{ temp uint a, temp uint b, temp uint c}) +0:25 Constant: +0:25 0 (const int) +0:26 AtomicAdd ( temp uint) +0:26 b: direct index for structure ( temp uint) +0:26 direct index (layout( row_major std430) buffer structure{ temp uint a, temp uint b, temp uint c}) +0:26 @data: direct index for structure (layout( row_major std430) buffer unsized 1-element array of structure{ temp uint a, temp uint b, temp uint c}) +0:26 'o' (layout( row_major std430) readonly buffer block{layout( row_major std430) buffer unsized 1-element array of structure{ temp uint a, temp uint b, temp uint c} @data}) +0:26 Constant: +0:26 0 (const uint) +0:26 Constant: +0:26 0 (const int) +0:26 Constant: +0:26 1 (const int) +0:26 b: direct index for structure ( temp uint) +0:26 'ms' ( temp structure{ temp uint a, temp uint b, temp uint c}) +0:26 Constant: +0:26 1 (const int) +0:27 AtomicAdd ( temp uint) +0:27 c: direct index for structure ( temp uint) +0:27 direct index (layout( row_major std430) buffer structure{ temp uint a, temp uint b, temp uint c}) +0:27 @data: direct index for structure (layout( row_major std430) buffer unsized 1-element array of structure{ temp uint a, temp uint b, temp uint c}) +0:27 'o' (layout( row_major std430) readonly buffer block{layout( row_major std430) buffer unsized 1-element array of structure{ temp uint a, temp uint b, temp uint c} @data}) +0:27 Constant: +0:27 0 (const uint) +0:27 Constant: +0:27 0 (const int) +0:27 Constant: +0:27 2 (const int) +0:27 c: direct index for structure ( temp uint) +0:27 'ms' ( temp structure{ temp uint a, temp uint b, temp uint c}) +0:27 Constant: +0:27 2 (const int) +0:20 Function Definition: main( ( temp void) +0:20 Function Parameters: +0:? Sequence +0:20 move second child to first child ( temp uint) +0:? 'id' ( temp uint) +0:? 'id' ( in uint LocalInvocationIndex) +0:20 Function Call: @main(u1; ( temp void) +0:? 'id' ( temp uint) +0:? Linker Objects +0:? 'sb' (layout( row_major std430) readonly buffer block{layout( row_major std430) buffer unsized 1-element array of structure{ temp uint count, temp unsized 1-element array of structure{ temp uint a, temp uint b, temp uint c} data} @data}) +0:? 'o' (layout( row_major std430) readonly buffer block{layout( row_major std430) buffer unsized 1-element array of structure{ temp uint a, temp uint b, temp uint c} @data}) +0:? 's' ( shared 128-element array of structure{ temp uint a, temp uint b, temp uint c}) +0:? 'deflt' ( const structure{ temp uint a, temp uint b, temp uint c}) +0:? 1 (const uint) +0:? 2 (const uint) +0:? 3 (const uint) +0:? 'id' ( in uint LocalInvocationIndex) + + +Linked compute stage: + + +Shader version: 500 +local_size = (128, 1, 1) +0:? Sequence +0:20 Function Definition: @main(u1; ( temp void) +0:20 Function Parameters: +0:20 'id' ( in uint) +0:? Sequence +0:21 move second child to first child ( temp structure{ temp uint a, temp uint b, temp uint c}) +0:21 direct index ( temp structure{ temp uint a, temp uint b, temp uint c}) +0:21 's' ( shared 128-element array of structure{ temp uint a, temp uint b, temp uint c}) +0:21 Constant: +0:21 0 (const int) +0:21 Constant: +0:21 1 (const uint) +0:21 2 (const uint) +0:21 3 (const uint) +0:22 Sequence +0:22 move second child to first child ( temp uint) +0:22 'count' ( temp uint) +0:22 count: direct index for structure ( temp uint) +0:22 direct index (layout( row_major std430) buffer structure{ temp uint count, temp unsized 1-element array of structure{ temp uint a, temp uint b, temp uint c} data}) +0:22 @data: direct index for structure (layout( row_major std430) buffer unsized 1-element array of structure{ temp uint count, temp unsized 1-element array of structure{ temp uint a, temp uint b, temp uint c} data}) +0:22 'sb' (layout( row_major std430) readonly buffer block{layout( row_major std430) buffer unsized 1-element array of structure{ temp uint count, temp unsized 1-element array of structure{ temp uint a, temp uint b, temp uint c} data} @data}) +0:22 Constant: +0:22 0 (const uint) +0:22 Constant: +0:22 0 (const int) +0:22 Constant: +0:22 0 (const int) +0:23 Sequence +0:23 move second child to first child ( temp structure{ temp uint a, temp uint b, temp uint c}) +0:23 'ms' ( temp structure{ temp uint a, temp uint b, temp uint c}) +0:23 Test condition and select ( temp structure{ temp uint a, temp uint b, temp uint c}): no shortcircuit +0:23 Condition +0:23 Compare Greater Than ( temp bool) +0:23 'id' ( in uint) +0:23 'count' ( temp uint) +0:23 true case +0:23 indirect index ( temp structure{ temp uint a, temp uint b, temp uint c}) +0:23 's' ( shared 128-element array of structure{ temp uint a, temp uint b, temp uint c}) +0:23 subtract ( temp uint) +0:23 'id' ( in uint) +0:23 'count' ( temp uint) +0:23 false case +0:23 indirect index ( temp structure{ temp uint a, temp uint b, temp uint c}) +0:23 data: direct index for structure ( temp unsized 1-element array of structure{ temp uint a, temp uint b, temp uint c}) +0:23 direct index (layout( row_major std430) buffer structure{ temp uint count, temp unsized 1-element array of structure{ temp uint a, temp uint b, temp uint c} data}) +0:23 @data: direct index for structure (layout( row_major std430) buffer unsized 1-element array of structure{ temp uint count, temp unsized 1-element array of structure{ temp uint a, temp uint b, temp uint c} data}) +0:23 'sb' (layout( row_major std430) readonly buffer block{layout( row_major std430) buffer unsized 1-element array of structure{ temp uint count, temp unsized 1-element array of structure{ temp uint a, temp uint b, temp uint c} data} @data}) +0:23 Constant: +0:23 0 (const uint) +0:23 Constant: +0:23 0 (const int) +0:23 Constant: +0:23 1 (const int) +0:23 'id' ( in uint) +0:25 AtomicAdd ( temp uint) +0:25 a: direct index for structure ( temp uint) +0:25 direct index (layout( row_major std430) buffer structure{ temp uint a, temp uint b, temp uint c}) +0:25 @data: direct index for structure (layout( row_major std430) buffer unsized 1-element array of structure{ temp uint a, temp uint b, temp uint c}) +0:25 'o' (layout( row_major std430) readonly buffer block{layout( row_major std430) buffer unsized 1-element array of structure{ temp uint a, temp uint b, temp uint c} @data}) +0:25 Constant: +0:25 0 (const uint) +0:25 Constant: +0:25 0 (const int) +0:25 Constant: +0:25 0 (const int) +0:25 a: direct index for structure ( temp uint) +0:25 'ms' ( temp structure{ temp uint a, temp uint b, temp uint c}) +0:25 Constant: +0:25 0 (const int) +0:26 AtomicAdd ( temp uint) +0:26 b: direct index for structure ( temp uint) +0:26 direct index (layout( row_major std430) buffer structure{ temp uint a, temp uint b, temp uint c}) +0:26 @data: direct index for structure (layout( row_major std430) buffer unsized 1-element array of structure{ temp uint a, temp uint b, temp uint c}) +0:26 'o' (layout( row_major std430) readonly buffer block{layout( row_major std430) buffer unsized 1-element array of structure{ temp uint a, temp uint b, temp uint c} @data}) +0:26 Constant: +0:26 0 (const uint) +0:26 Constant: +0:26 0 (const int) +0:26 Constant: +0:26 1 (const int) +0:26 b: direct index for structure ( temp uint) +0:26 'ms' ( temp structure{ temp uint a, temp uint b, temp uint c}) +0:26 Constant: +0:26 1 (const int) +0:27 AtomicAdd ( temp uint) +0:27 c: direct index for structure ( temp uint) +0:27 direct index (layout( row_major std430) buffer structure{ temp uint a, temp uint b, temp uint c}) +0:27 @data: direct index for structure (layout( row_major std430) buffer unsized 1-element array of structure{ temp uint a, temp uint b, temp uint c}) +0:27 'o' (layout( row_major std430) readonly buffer block{layout( row_major std430) buffer unsized 1-element array of structure{ temp uint a, temp uint b, temp uint c} @data}) +0:27 Constant: +0:27 0 (const uint) +0:27 Constant: +0:27 0 (const int) +0:27 Constant: +0:27 2 (const int) +0:27 c: direct index for structure ( temp uint) +0:27 'ms' ( temp structure{ temp uint a, temp uint b, temp uint c}) +0:27 Constant: +0:27 2 (const int) +0:20 Function Definition: main( ( temp void) +0:20 Function Parameters: +0:? Sequence +0:20 move second child to first child ( temp uint) +0:? 'id' ( temp uint) +0:? 'id' ( in uint LocalInvocationIndex) +0:20 Function Call: @main(u1; ( temp void) +0:? 'id' ( temp uint) +0:? Linker Objects +0:? 'sb' (layout( row_major std430) readonly buffer block{layout( row_major std430) buffer unsized 1-element array of structure{ temp uint count, temp unsized 1-element array of structure{ temp uint a, temp uint b, temp uint c} data} @data}) +0:? 'o' (layout( row_major std430) readonly buffer block{layout( row_major std430) buffer unsized 1-element array of structure{ temp uint a, temp uint b, temp uint c} @data}) +0:? 's' ( shared 128-element array of structure{ temp uint a, temp uint b, temp uint c}) +0:? 'deflt' ( const structure{ temp uint a, temp uint b, temp uint c}) +0:? 1 (const uint) +0:? 2 (const uint) +0:? 3 (const uint) +0:? 'id' ( in uint LocalInvocationIndex) + +// Module Version 10000 +// Generated by (magic number): 8000b +// Id's are bound by 88 + + Capability Shader + 1: ExtInstImport "GLSL.std.450" + MemoryModel Logical GLSL450 + EntryPoint GLCompute 4 "main" 83 + ExecutionMode 4 LocalSize 128 1 1 + Source HLSL 500 + Name 4 "main" + Name 10 "@main(u1;" + Name 9 "id" + Name 12 "MyStruct" + MemberName 12(MyStruct) 0 "a" + MemberName 12(MyStruct) 1 "b" + MemberName 12(MyStruct) 2 "c" + Name 16 "s" + Name 25 "count" + Name 26 "MyStruct" + MemberName 26(MyStruct) 0 "a" + MemberName 26(MyStruct) 1 "b" + MemberName 26(MyStruct) 2 "c" + Name 28 "MyStructs" + MemberName 28(MyStructs) 0 "count" + MemberName 28(MyStructs) 1 "data" + Name 30 "sb" + MemberName 30(sb) 0 "@data" + Name 32 "sb" + Name 37 "ms" + Name 65 "o" + MemberName 65(o) 0 "@data" + Name 67 "o" + Name 81 "id" + Name 83 "id" + Name 85 "param" + MemberDecorate 26(MyStruct) 0 Offset 0 + MemberDecorate 26(MyStruct) 1 Offset 4 + MemberDecorate 26(MyStruct) 2 Offset 8 + Decorate 27 ArrayStride 12 + MemberDecorate 28(MyStructs) 0 Offset 0 + MemberDecorate 28(MyStructs) 1 Offset 4 + Decorate 28(MyStructs) BufferBlock + Decorate 29 ArrayStride 16 + MemberDecorate 30(sb) 0 NonWritable + MemberDecorate 30(sb) 0 Offset 0 + Decorate 30(sb) BufferBlock + Decorate 32(sb) DescriptorSet 0 + Decorate 32(sb) Binding 0 + Decorate 64 ArrayStride 12 + MemberDecorate 65(o) 0 NonWritable + MemberDecorate 65(o) 0 Offset 0 + Decorate 65(o) BufferBlock + Decorate 67(o) DescriptorSet 0 + Decorate 67(o) Binding 1 + Decorate 83(id) BuiltIn LocalInvocationIndex + 2: TypeVoid + 3: TypeFunction 2 + 6: TypeInt 32 0 + 7: TypePointer Function 6(int) + 8: TypeFunction 2 7(ptr) + 12(MyStruct): TypeStruct 6(int) 6(int) 6(int) + 13: 6(int) Constant 128 + 14: TypeArray 12(MyStruct) 13 + 15: TypePointer Workgroup 14 + 16(s): 15(ptr) Variable Workgroup + 17: TypeInt 32 1 + 18: 17(int) Constant 0 + 19: 6(int) Constant 1 + 20: 6(int) Constant 2 + 21: 6(int) Constant 3 + 22:12(MyStruct) ConstantComposite 19 20 21 + 23: TypePointer Workgroup 12(MyStruct) + 26(MyStruct): TypeStruct 6(int) 6(int) 6(int) + 27: TypeRuntimeArray 26(MyStruct) + 28(MyStructs): TypeStruct 6(int) 27 + 29: TypeRuntimeArray 28(MyStructs) + 30(sb): TypeStruct 29 + 31: TypePointer Uniform 30(sb) + 32(sb): 31(ptr) Variable Uniform + 33: TypePointer Uniform 6(int) + 36: TypePointer Function 12(MyStruct) + 40: TypeBool + 47: 17(int) Constant 1 + 49: TypePointer Uniform 26(MyStruct) + 61: 17(int) Constant 2 + 64: TypeRuntimeArray 26(MyStruct) + 65(o): TypeStruct 64 + 66: TypePointer Uniform 65(o) + 67(o): 66(ptr) Variable Uniform + 71: 6(int) Constant 0 + 82: TypePointer Input 6(int) + 83(id): 82(ptr) Variable Input + 4(main): 2 Function None 3 + 5: Label + 81(id): 7(ptr) Variable Function + 85(param): 7(ptr) Variable Function + 84: 6(int) Load 83(id) + Store 81(id) 84 + 86: 6(int) Load 81(id) + Store 85(param) 86 + 87: 2 FunctionCall 10(@main(u1;) 85(param) + Return + FunctionEnd + 10(@main(u1;): 2 Function None 8 + 9(id): 7(ptr) FunctionParameter + 11: Label + 25(count): 7(ptr) Variable Function + 37(ms): 36(ptr) Variable Function + 52: 36(ptr) Variable Function + 24: 23(ptr) AccessChain 16(s) 18 + Store 24 22 + 34: 33(ptr) AccessChain 32(sb) 18 18 18 + 35: 6(int) Load 34 + Store 25(count) 35 + 38: 6(int) Load 9(id) + 39: 6(int) Load 25(count) + 41: 40(bool) UGreaterThan 38 39 + 42: 6(int) Load 9(id) + 43: 6(int) Load 25(count) + 44: 6(int) ISub 42 43 + 45: 23(ptr) AccessChain 16(s) 44 + 46:12(MyStruct) Load 45 + 48: 6(int) Load 9(id) + 50: 49(ptr) AccessChain 32(sb) 18 18 47 48 + 51:26(MyStruct) Load 50 + SelectionMerge 54 None + BranchConditional 41 53 55 + 53: Label + Store 52 46 + Branch 54 + 55: Label + 56: 6(int) CompositeExtract 51 0 + 57: 7(ptr) AccessChain 52 18 + Store 57 56 + 58: 6(int) CompositeExtract 51 1 + 59: 7(ptr) AccessChain 52 47 + Store 59 58 + 60: 6(int) CompositeExtract 51 2 + 62: 7(ptr) AccessChain 52 61 + Store 62 60 + Branch 54 + 54: Label + 63:12(MyStruct) Load 52 + Store 37(ms) 63 + 68: 33(ptr) AccessChain 67(o) 18 18 18 + 69: 7(ptr) AccessChain 37(ms) 18 + 70: 6(int) Load 69 + 72: 6(int) AtomicIAdd 68 19 71 70 + 73: 33(ptr) AccessChain 67(o) 18 18 47 + 74: 7(ptr) AccessChain 37(ms) 47 + 75: 6(int) Load 74 + 76: 6(int) AtomicIAdd 73 19 71 75 + 77: 33(ptr) AccessChain 67(o) 18 18 61 + 78: 7(ptr) AccessChain 37(ms) 61 + 79: 6(int) Load 78 + 80: 6(int) AtomicIAdd 77 19 71 79 + Return + FunctionEnd diff --git a/Test/baseResults/hlsl.structcopylogical.comp.out b/Test/baseResults/hlsl.structcopylogical.comp.out new file mode 100644 index 0000000000..a9b849be71 --- /dev/null +++ b/Test/baseResults/hlsl.structcopylogical.comp.out @@ -0,0 +1,385 @@ +hlsl.structcopylogical.comp +Shader version: 500 +local_size = (128, 1, 1) +0:? Sequence +0:20 Function Definition: @main(u1; ( temp void) +0:20 Function Parameters: +0:20 'id' ( in uint) +0:? Sequence +0:21 move second child to first child ( temp structure{ temp uint a, temp uint b, temp uint c}) +0:21 direct index ( temp structure{ temp uint a, temp uint b, temp uint c}) +0:21 's' ( shared 128-element array of structure{ temp uint a, temp uint b, temp uint c}) +0:21 Constant: +0:21 0 (const int) +0:21 Constant: +0:21 1 (const uint) +0:21 2 (const uint) +0:21 3 (const uint) +0:22 Sequence +0:22 move second child to first child ( temp uint) +0:22 'count' ( temp uint) +0:22 count: direct index for structure ( temp uint) +0:22 direct index (layout( row_major std430) buffer structure{ temp uint count, temp unsized 1-element array of structure{ temp uint a, temp uint b, temp uint c} data}) +0:22 @data: direct index for structure (layout( row_major std430) buffer unsized 1-element array of structure{ temp uint count, temp unsized 1-element array of structure{ temp uint a, temp uint b, temp uint c} data}) +0:22 'sb' (layout( row_major std430) readonly buffer block{layout( row_major std430) buffer unsized 1-element array of structure{ temp uint count, temp unsized 1-element array of structure{ temp uint a, temp uint b, temp uint c} data} @data}) +0:22 Constant: +0:22 0 (const uint) +0:22 Constant: +0:22 0 (const int) +0:22 Constant: +0:22 0 (const int) +0:23 Sequence +0:23 move second child to first child ( temp structure{ temp uint a, temp uint b, temp uint c}) +0:23 'ms' ( temp structure{ temp uint a, temp uint b, temp uint c}) +0:23 Test condition and select ( temp structure{ temp uint a, temp uint b, temp uint c}): no shortcircuit +0:23 Condition +0:23 Compare Greater Than ( temp bool) +0:23 'id' ( in uint) +0:23 'count' ( temp uint) +0:23 true case +0:23 indirect index ( temp structure{ temp uint a, temp uint b, temp uint c}) +0:23 's' ( shared 128-element array of structure{ temp uint a, temp uint b, temp uint c}) +0:23 subtract ( temp uint) +0:23 'id' ( in uint) +0:23 'count' ( temp uint) +0:23 false case +0:23 indirect index ( temp structure{ temp uint a, temp uint b, temp uint c}) +0:23 data: direct index for structure ( temp unsized 1-element array of structure{ temp uint a, temp uint b, temp uint c}) +0:23 direct index (layout( row_major std430) buffer structure{ temp uint count, temp unsized 1-element array of structure{ temp uint a, temp uint b, temp uint c} data}) +0:23 @data: direct index for structure (layout( row_major std430) buffer unsized 1-element array of structure{ temp uint count, temp unsized 1-element array of structure{ temp uint a, temp uint b, temp uint c} data}) +0:23 'sb' (layout( row_major std430) readonly buffer block{layout( row_major std430) buffer unsized 1-element array of structure{ temp uint count, temp unsized 1-element array of structure{ temp uint a, temp uint b, temp uint c} data} @data}) +0:23 Constant: +0:23 0 (const uint) +0:23 Constant: +0:23 0 (const int) +0:23 Constant: +0:23 1 (const int) +0:23 'id' ( in uint) +0:25 AtomicAdd ( temp uint) +0:25 a: direct index for structure ( temp uint) +0:25 direct index (layout( row_major std430) buffer structure{ temp uint a, temp uint b, temp uint c}) +0:25 @data: direct index for structure (layout( row_major std430) buffer unsized 1-element array of structure{ temp uint a, temp uint b, temp uint c}) +0:25 'o' (layout( row_major std430) readonly buffer block{layout( row_major std430) buffer unsized 1-element array of structure{ temp uint a, temp uint b, temp uint c} @data}) +0:25 Constant: +0:25 0 (const uint) +0:25 Constant: +0:25 0 (const int) +0:25 Constant: +0:25 0 (const int) +0:25 a: direct index for structure ( temp uint) +0:25 'ms' ( temp structure{ temp uint a, temp uint b, temp uint c}) +0:25 Constant: +0:25 0 (const int) +0:26 AtomicAdd ( temp uint) +0:26 b: direct index for structure ( temp uint) +0:26 direct index (layout( row_major std430) buffer structure{ temp uint a, temp uint b, temp uint c}) +0:26 @data: direct index for structure (layout( row_major std430) buffer unsized 1-element array of structure{ temp uint a, temp uint b, temp uint c}) +0:26 'o' (layout( row_major std430) readonly buffer block{layout( row_major std430) buffer unsized 1-element array of structure{ temp uint a, temp uint b, temp uint c} @data}) +0:26 Constant: +0:26 0 (const uint) +0:26 Constant: +0:26 0 (const int) +0:26 Constant: +0:26 1 (const int) +0:26 b: direct index for structure ( temp uint) +0:26 'ms' ( temp structure{ temp uint a, temp uint b, temp uint c}) +0:26 Constant: +0:26 1 (const int) +0:27 AtomicAdd ( temp uint) +0:27 c: direct index for structure ( temp uint) +0:27 direct index (layout( row_major std430) buffer structure{ temp uint a, temp uint b, temp uint c}) +0:27 @data: direct index for structure (layout( row_major std430) buffer unsized 1-element array of structure{ temp uint a, temp uint b, temp uint c}) +0:27 'o' (layout( row_major std430) readonly buffer block{layout( row_major std430) buffer unsized 1-element array of structure{ temp uint a, temp uint b, temp uint c} @data}) +0:27 Constant: +0:27 0 (const uint) +0:27 Constant: +0:27 0 (const int) +0:27 Constant: +0:27 2 (const int) +0:27 c: direct index for structure ( temp uint) +0:27 'ms' ( temp structure{ temp uint a, temp uint b, temp uint c}) +0:27 Constant: +0:27 2 (const int) +0:20 Function Definition: main( ( temp void) +0:20 Function Parameters: +0:? Sequence +0:20 move second child to first child ( temp uint) +0:? 'id' ( temp uint) +0:? 'id' ( in uint LocalInvocationIndex) +0:20 Function Call: @main(u1; ( temp void) +0:? 'id' ( temp uint) +0:? Linker Objects +0:? 'sb' (layout( row_major std430) readonly buffer block{layout( row_major std430) buffer unsized 1-element array of structure{ temp uint count, temp unsized 1-element array of structure{ temp uint a, temp uint b, temp uint c} data} @data}) +0:? 'o' (layout( row_major std430) readonly buffer block{layout( row_major std430) buffer unsized 1-element array of structure{ temp uint a, temp uint b, temp uint c} @data}) +0:? 's' ( shared 128-element array of structure{ temp uint a, temp uint b, temp uint c}) +0:? 'deflt' ( const structure{ temp uint a, temp uint b, temp uint c}) +0:? 1 (const uint) +0:? 2 (const uint) +0:? 3 (const uint) +0:? 'id' ( in uint LocalInvocationIndex) + + +Linked compute stage: + + +Shader version: 500 +local_size = (128, 1, 1) +0:? Sequence +0:20 Function Definition: @main(u1; ( temp void) +0:20 Function Parameters: +0:20 'id' ( in uint) +0:? Sequence +0:21 move second child to first child ( temp structure{ temp uint a, temp uint b, temp uint c}) +0:21 direct index ( temp structure{ temp uint a, temp uint b, temp uint c}) +0:21 's' ( shared 128-element array of structure{ temp uint a, temp uint b, temp uint c}) +0:21 Constant: +0:21 0 (const int) +0:21 Constant: +0:21 1 (const uint) +0:21 2 (const uint) +0:21 3 (const uint) +0:22 Sequence +0:22 move second child to first child ( temp uint) +0:22 'count' ( temp uint) +0:22 count: direct index for structure ( temp uint) +0:22 direct index (layout( row_major std430) buffer structure{ temp uint count, temp unsized 1-element array of structure{ temp uint a, temp uint b, temp uint c} data}) +0:22 @data: direct index for structure (layout( row_major std430) buffer unsized 1-element array of structure{ temp uint count, temp unsized 1-element array of structure{ temp uint a, temp uint b, temp uint c} data}) +0:22 'sb' (layout( row_major std430) readonly buffer block{layout( row_major std430) buffer unsized 1-element array of structure{ temp uint count, temp unsized 1-element array of structure{ temp uint a, temp uint b, temp uint c} data} @data}) +0:22 Constant: +0:22 0 (const uint) +0:22 Constant: +0:22 0 (const int) +0:22 Constant: +0:22 0 (const int) +0:23 Sequence +0:23 move second child to first child ( temp structure{ temp uint a, temp uint b, temp uint c}) +0:23 'ms' ( temp structure{ temp uint a, temp uint b, temp uint c}) +0:23 Test condition and select ( temp structure{ temp uint a, temp uint b, temp uint c}): no shortcircuit +0:23 Condition +0:23 Compare Greater Than ( temp bool) +0:23 'id' ( in uint) +0:23 'count' ( temp uint) +0:23 true case +0:23 indirect index ( temp structure{ temp uint a, temp uint b, temp uint c}) +0:23 's' ( shared 128-element array of structure{ temp uint a, temp uint b, temp uint c}) +0:23 subtract ( temp uint) +0:23 'id' ( in uint) +0:23 'count' ( temp uint) +0:23 false case +0:23 indirect index ( temp structure{ temp uint a, temp uint b, temp uint c}) +0:23 data: direct index for structure ( temp unsized 1-element array of structure{ temp uint a, temp uint b, temp uint c}) +0:23 direct index (layout( row_major std430) buffer structure{ temp uint count, temp unsized 1-element array of structure{ temp uint a, temp uint b, temp uint c} data}) +0:23 @data: direct index for structure (layout( row_major std430) buffer unsized 1-element array of structure{ temp uint count, temp unsized 1-element array of structure{ temp uint a, temp uint b, temp uint c} data}) +0:23 'sb' (layout( row_major std430) readonly buffer block{layout( row_major std430) buffer unsized 1-element array of structure{ temp uint count, temp unsized 1-element array of structure{ temp uint a, temp uint b, temp uint c} data} @data}) +0:23 Constant: +0:23 0 (const uint) +0:23 Constant: +0:23 0 (const int) +0:23 Constant: +0:23 1 (const int) +0:23 'id' ( in uint) +0:25 AtomicAdd ( temp uint) +0:25 a: direct index for structure ( temp uint) +0:25 direct index (layout( row_major std430) buffer structure{ temp uint a, temp uint b, temp uint c}) +0:25 @data: direct index for structure (layout( row_major std430) buffer unsized 1-element array of structure{ temp uint a, temp uint b, temp uint c}) +0:25 'o' (layout( row_major std430) readonly buffer block{layout( row_major std430) buffer unsized 1-element array of structure{ temp uint a, temp uint b, temp uint c} @data}) +0:25 Constant: +0:25 0 (const uint) +0:25 Constant: +0:25 0 (const int) +0:25 Constant: +0:25 0 (const int) +0:25 a: direct index for structure ( temp uint) +0:25 'ms' ( temp structure{ temp uint a, temp uint b, temp uint c}) +0:25 Constant: +0:25 0 (const int) +0:26 AtomicAdd ( temp uint) +0:26 b: direct index for structure ( temp uint) +0:26 direct index (layout( row_major std430) buffer structure{ temp uint a, temp uint b, temp uint c}) +0:26 @data: direct index for structure (layout( row_major std430) buffer unsized 1-element array of structure{ temp uint a, temp uint b, temp uint c}) +0:26 'o' (layout( row_major std430) readonly buffer block{layout( row_major std430) buffer unsized 1-element array of structure{ temp uint a, temp uint b, temp uint c} @data}) +0:26 Constant: +0:26 0 (const uint) +0:26 Constant: +0:26 0 (const int) +0:26 Constant: +0:26 1 (const int) +0:26 b: direct index for structure ( temp uint) +0:26 'ms' ( temp structure{ temp uint a, temp uint b, temp uint c}) +0:26 Constant: +0:26 1 (const int) +0:27 AtomicAdd ( temp uint) +0:27 c: direct index for structure ( temp uint) +0:27 direct index (layout( row_major std430) buffer structure{ temp uint a, temp uint b, temp uint c}) +0:27 @data: direct index for structure (layout( row_major std430) buffer unsized 1-element array of structure{ temp uint a, temp uint b, temp uint c}) +0:27 'o' (layout( row_major std430) readonly buffer block{layout( row_major std430) buffer unsized 1-element array of structure{ temp uint a, temp uint b, temp uint c} @data}) +0:27 Constant: +0:27 0 (const uint) +0:27 Constant: +0:27 0 (const int) +0:27 Constant: +0:27 2 (const int) +0:27 c: direct index for structure ( temp uint) +0:27 'ms' ( temp structure{ temp uint a, temp uint b, temp uint c}) +0:27 Constant: +0:27 2 (const int) +0:20 Function Definition: main( ( temp void) +0:20 Function Parameters: +0:? Sequence +0:20 move second child to first child ( temp uint) +0:? 'id' ( temp uint) +0:? 'id' ( in uint LocalInvocationIndex) +0:20 Function Call: @main(u1; ( temp void) +0:? 'id' ( temp uint) +0:? Linker Objects +0:? 'sb' (layout( row_major std430) readonly buffer block{layout( row_major std430) buffer unsized 1-element array of structure{ temp uint count, temp unsized 1-element array of structure{ temp uint a, temp uint b, temp uint c} data} @data}) +0:? 'o' (layout( row_major std430) readonly buffer block{layout( row_major std430) buffer unsized 1-element array of structure{ temp uint a, temp uint b, temp uint c} @data}) +0:? 's' ( shared 128-element array of structure{ temp uint a, temp uint b, temp uint c}) +0:? 'deflt' ( const structure{ temp uint a, temp uint b, temp uint c}) +0:? 1 (const uint) +0:? 2 (const uint) +0:? 3 (const uint) +0:? 'id' ( in uint LocalInvocationIndex) + +// Module Version 10600 +// Generated by (magic number): 8000b +// Id's are bound by 79 + + Capability Shader + 1: ExtInstImport "GLSL.std.450" + MemoryModel Logical GLSL450 + EntryPoint GLCompute 4 "main" 16 32 57 74 + ExecutionMode 4 LocalSize 128 1 1 + Source HLSL 500 + Name 4 "main" + Name 10 "@main(u1;" + Name 9 "id" + Name 12 "MyStruct" + MemberName 12(MyStruct) 0 "a" + MemberName 12(MyStruct) 1 "b" + MemberName 12(MyStruct) 2 "c" + Name 16 "s" + Name 25 "count" + Name 26 "MyStruct" + MemberName 26(MyStruct) 0 "a" + MemberName 26(MyStruct) 1 "b" + MemberName 26(MyStruct) 2 "c" + Name 28 "MyStructs" + MemberName 28(MyStructs) 0 "count" + MemberName 28(MyStructs) 1 "data" + Name 30 "sb" + MemberName 30(sb) 0 "@data" + Name 32 "sb" + Name 37 "ms" + Name 55 "o" + MemberName 55(o) 0 "@data" + Name 57 "o" + Name 72 "id" + Name 74 "id" + Name 76 "param" + MemberDecorate 26(MyStruct) 0 Offset 0 + MemberDecorate 26(MyStruct) 1 Offset 4 + MemberDecorate 26(MyStruct) 2 Offset 8 + Decorate 27 ArrayStride 12 + MemberDecorate 28(MyStructs) 0 Offset 0 + MemberDecorate 28(MyStructs) 1 Offset 4 + Decorate 28(MyStructs) Block + Decorate 29 ArrayStride 16 + MemberDecorate 30(sb) 0 NonWritable + MemberDecorate 30(sb) 0 Offset 0 + Decorate 30(sb) Block + Decorate 32(sb) DescriptorSet 0 + Decorate 32(sb) Binding 0 + Decorate 54 ArrayStride 12 + MemberDecorate 55(o) 0 NonWritable + MemberDecorate 55(o) 0 Offset 0 + Decorate 55(o) Block + Decorate 57(o) DescriptorSet 0 + Decorate 57(o) Binding 1 + Decorate 74(id) BuiltIn LocalInvocationIndex + 2: TypeVoid + 3: TypeFunction 2 + 6: TypeInt 32 0 + 7: TypePointer Function 6(int) + 8: TypeFunction 2 7(ptr) + 12(MyStruct): TypeStruct 6(int) 6(int) 6(int) + 13: 6(int) Constant 128 + 14: TypeArray 12(MyStruct) 13 + 15: TypePointer Workgroup 14 + 16(s): 15(ptr) Variable Workgroup + 17: TypeInt 32 1 + 18: 17(int) Constant 0 + 19: 6(int) Constant 1 + 20: 6(int) Constant 2 + 21: 6(int) Constant 3 + 22:12(MyStruct) ConstantComposite 19 20 21 + 23: TypePointer Workgroup 12(MyStruct) + 26(MyStruct): TypeStruct 6(int) 6(int) 6(int) + 27: TypeRuntimeArray 26(MyStruct) + 28(MyStructs): TypeStruct 6(int) 27 + 29: TypeRuntimeArray 28(MyStructs) + 30(sb): TypeStruct 29 + 31: TypePointer StorageBuffer 30(sb) + 32(sb): 31(ptr) Variable StorageBuffer + 33: TypePointer StorageBuffer 6(int) + 36: TypePointer Function 12(MyStruct) + 40: TypeBool + 47: 17(int) Constant 1 + 49: TypePointer StorageBuffer 26(MyStruct) + 54: TypeRuntimeArray 26(MyStruct) + 55(o): TypeStruct 54 + 56: TypePointer StorageBuffer 55(o) + 57(o): 56(ptr) Variable StorageBuffer + 61: 6(int) Constant 0 + 67: 17(int) Constant 2 + 73: TypePointer Input 6(int) + 74(id): 73(ptr) Variable Input + 4(main): 2 Function None 3 + 5: Label + 72(id): 7(ptr) Variable Function + 76(param): 7(ptr) Variable Function + 75: 6(int) Load 74(id) + Store 72(id) 75 + 77: 6(int) Load 72(id) + Store 76(param) 77 + 78: 2 FunctionCall 10(@main(u1;) 76(param) + Return + FunctionEnd + 10(@main(u1;): 2 Function None 8 + 9(id): 7(ptr) FunctionParameter + 11: Label + 25(count): 7(ptr) Variable Function + 37(ms): 36(ptr) Variable Function + 24: 23(ptr) AccessChain 16(s) 18 + Store 24 22 + 34: 33(ptr) AccessChain 32(sb) 18 18 18 + 35: 6(int) Load 34 + Store 25(count) 35 + 38: 6(int) Load 9(id) + 39: 6(int) Load 25(count) + 41: 40(bool) UGreaterThan 38 39 + 42: 6(int) Load 9(id) + 43: 6(int) Load 25(count) + 44: 6(int) ISub 42 43 + 45: 23(ptr) AccessChain 16(s) 44 + 46:12(MyStruct) Load 45 + 48: 6(int) Load 9(id) + 50: 49(ptr) AccessChain 32(sb) 18 18 47 48 + 51:26(MyStruct) Load 50 + 52:12(MyStruct) CopyLogical 51 + 53:12(MyStruct) Select 41 46 52 + Store 37(ms) 53 + 58: 33(ptr) AccessChain 57(o) 18 18 18 + 59: 7(ptr) AccessChain 37(ms) 18 + 60: 6(int) Load 59 + 62: 6(int) AtomicIAdd 58 19 61 60 + 63: 33(ptr) AccessChain 57(o) 18 18 47 + 64: 7(ptr) AccessChain 37(ms) 47 + 65: 6(int) Load 64 + 66: 6(int) AtomicIAdd 63 19 61 65 + 68: 33(ptr) AccessChain 57(o) 18 18 67 + 69: 7(ptr) AccessChain 37(ms) 67 + 70: 6(int) Load 69 + 71: 6(int) AtomicIAdd 68 19 61 70 + Return + FunctionEnd diff --git a/Test/baseResults/hlsl.structin.vert.out b/Test/baseResults/hlsl.structin.vert.out index 85f634630b..04a64e7974 100644 --- a/Test/baseResults/hlsl.structin.vert.out +++ b/Test/baseResults/hlsl.structin.vert.out @@ -340,7 +340,7 @@ Shader version: 500 0:? 'e' (layout( location=5) in 4-component vector of float) // Module Version 10000 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 94 Capability Shader diff --git a/Test/baseResults/hlsl.subpass.frag.out b/Test/baseResults/hlsl.subpass.frag.out index 2aca62879d..942ef5ee26 100644 --- a/Test/baseResults/hlsl.subpass.frag.out +++ b/Test/baseResults/hlsl.subpass.frag.out @@ -430,7 +430,7 @@ gl_FragCoord origin is upper left 0:? '@entryPointOutput' (layout( location=0) out 4-component vector of float) // Module Version 10000 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 204 Capability Shader diff --git a/Test/baseResults/hlsl.switch.frag.out b/Test/baseResults/hlsl.switch.frag.out index c239640f01..2ee9bd98ae 100644 --- a/Test/baseResults/hlsl.switch.frag.out +++ b/Test/baseResults/hlsl.switch.frag.out @@ -296,7 +296,7 @@ gl_FragCoord origin is upper left 0:? 'd' (layout( location=2) flat in int) // Module Version 10000 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 106 Capability Shader diff --git a/Test/baseResults/hlsl.swizzle.frag.out b/Test/baseResults/hlsl.swizzle.frag.out index 88ea3cc910..afb81dea61 100644 --- a/Test/baseResults/hlsl.swizzle.frag.out +++ b/Test/baseResults/hlsl.swizzle.frag.out @@ -77,7 +77,7 @@ gl_FragCoord origin is upper left 0:? 'AmbientColor' ( global 4-component vector of float) // Module Version 10000 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 30 Capability Shader diff --git a/Test/baseResults/hlsl.synthesizeInput.frag.out b/Test/baseResults/hlsl.synthesizeInput.frag.out index 316a352907..5462e645a4 100644 --- a/Test/baseResults/hlsl.synthesizeInput.frag.out +++ b/Test/baseResults/hlsl.synthesizeInput.frag.out @@ -98,7 +98,7 @@ gl_FragCoord origin is upper left 0:? 'input.no_interp' (layout( location=1) flat in uint) // Module Version 10000 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 44 Capability Shader diff --git a/Test/baseResults/hlsl.target.frag.out b/Test/baseResults/hlsl.target.frag.out index 8bfaa2ba67..9e86746629 100644 --- a/Test/baseResults/hlsl.target.frag.out +++ b/Test/baseResults/hlsl.target.frag.out @@ -114,7 +114,7 @@ gl_FragCoord origin is upper left 0:? 'out2' (layout( location=3) out 4-component vector of float) // Module Version 10000 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 50 Capability Shader diff --git a/Test/baseResults/hlsl.targetStruct1.frag.out b/Test/baseResults/hlsl.targetStruct1.frag.out index 095d15d02a..0be96d110a 100644 --- a/Test/baseResults/hlsl.targetStruct1.frag.out +++ b/Test/baseResults/hlsl.targetStruct1.frag.out @@ -184,7 +184,7 @@ gl_FragCoord origin is upper left 0:? 'po' (layout( location=0) out 4-component vector of float) // Module Version 10000 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 65 Capability Shader diff --git a/Test/baseResults/hlsl.targetStruct2.frag.out b/Test/baseResults/hlsl.targetStruct2.frag.out index c57ae008b1..2fa47658da 100644 --- a/Test/baseResults/hlsl.targetStruct2.frag.out +++ b/Test/baseResults/hlsl.targetStruct2.frag.out @@ -184,7 +184,7 @@ gl_FragCoord origin is upper left 0:? 'po' (layout( location=0) out 4-component vector of float) // Module Version 10000 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 65 Capability Shader diff --git a/Test/baseResults/hlsl.templatetypes.frag.out b/Test/baseResults/hlsl.templatetypes.frag.out index 842ed0d655..5624c28753 100644 --- a/Test/baseResults/hlsl.templatetypes.frag.out +++ b/Test/baseResults/hlsl.templatetypes.frag.out @@ -508,7 +508,7 @@ gl_FragCoord origin is upper left 0:? '@entryPointOutput' (layout( location=0) out float) // Module Version 10000 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 153 Capability Shader diff --git a/Test/baseResults/hlsl.texture.struct.frag.out b/Test/baseResults/hlsl.texture.struct.frag.out index bf9ab6804d..ba632bed2a 100644 --- a/Test/baseResults/hlsl.texture.struct.frag.out +++ b/Test/baseResults/hlsl.texture.struct.frag.out @@ -839,7 +839,7 @@ gl_FragCoord origin is upper left Validation failed // Module Version 10000 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 240 Capability Shader diff --git a/Test/baseResults/hlsl.texture.subvec4.frag.out b/Test/baseResults/hlsl.texture.subvec4.frag.out index 1a7816d8ed..9c3b7417e4 100644 --- a/Test/baseResults/hlsl.texture.subvec4.frag.out +++ b/Test/baseResults/hlsl.texture.subvec4.frag.out @@ -356,7 +356,7 @@ gl_FragCoord origin is upper left 0:? '@entryPointOutput' (layout( location=0) out 4-component vector of float) // Module Version 10000 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 130 Capability Shader diff --git a/Test/baseResults/hlsl.texturebuffer.frag.out b/Test/baseResults/hlsl.texturebuffer.frag.out index 37e19c25cc..ae1d4f75ce 100644 --- a/Test/baseResults/hlsl.texturebuffer.frag.out +++ b/Test/baseResults/hlsl.texturebuffer.frag.out @@ -70,7 +70,7 @@ gl_FragCoord origin is upper left 0:? 'pos' ( in 4-component vector of float FragCoord) // Module Version 10000 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 39 Capability Shader diff --git a/Test/baseResults/hlsl.this.frag.out b/Test/baseResults/hlsl.this.frag.out index e6b54cf3d4..6e4a8a047c 100644 --- a/Test/baseResults/hlsl.this.frag.out +++ b/Test/baseResults/hlsl.this.frag.out @@ -240,7 +240,7 @@ gl_FragCoord origin is upper left 0:? '@entryPointOutput' (layout( location=0) out 4-component vector of float) // Module Version 10000 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 98 Capability Shader diff --git a/Test/baseResults/hlsl.tristream-append.geom.out b/Test/baseResults/hlsl.tristream-append.geom.out index 53e8c04969..630f2d327e 100644 --- a/Test/baseResults/hlsl.tristream-append.geom.out +++ b/Test/baseResults/hlsl.tristream-append.geom.out @@ -157,7 +157,7 @@ output primitive = triangle_strip Validation failed // Module Version 10000 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 66 Capability Geometry diff --git a/Test/baseResults/hlsl.tx.bracket.frag.out b/Test/baseResults/hlsl.tx.bracket.frag.out index 424b8480de..07f1909983 100644 --- a/Test/baseResults/hlsl.tx.bracket.frag.out +++ b/Test/baseResults/hlsl.tx.bracket.frag.out @@ -422,7 +422,7 @@ gl_FragCoord origin is upper left 0:? '@entryPointOutput.Color' (layout( location=0) out 4-component vector of float) // Module Version 10000 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 188 Capability Shader diff --git a/Test/baseResults/hlsl.tx.overload.frag.out b/Test/baseResults/hlsl.tx.overload.frag.out index 7fb0640eea..df1bb20f09 100644 --- a/Test/baseResults/hlsl.tx.overload.frag.out +++ b/Test/baseResults/hlsl.tx.overload.frag.out @@ -134,7 +134,7 @@ gl_FragCoord origin is upper left 0:? '@entryPointOutput' (layout( location=0) out 4-component vector of float) // Module Version 10000 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 73 Capability Shader diff --git a/Test/baseResults/hlsl.type.half.frag.out b/Test/baseResults/hlsl.type.half.frag.out index 68f1b2400b..f12838b9b4 100644 --- a/Test/baseResults/hlsl.type.half.frag.out +++ b/Test/baseResults/hlsl.type.half.frag.out @@ -164,7 +164,7 @@ gl_FragCoord origin is upper left 0:? '@entryPointOutput' (layout( location=0) out 4-component vector of float) // Module Version 10000 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 60 Capability Shader diff --git a/Test/baseResults/hlsl.type.identifier.frag.out b/Test/baseResults/hlsl.type.identifier.frag.out index 5705fb76d6..6130fda9f7 100644 --- a/Test/baseResults/hlsl.type.identifier.frag.out +++ b/Test/baseResults/hlsl.type.identifier.frag.out @@ -266,7 +266,7 @@ gl_FragCoord origin is upper left 0:? '@entryPointOutput' (layout( location=0) out 4-component vector of float) // Module Version 10000 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 105 Capability Shader diff --git a/Test/baseResults/hlsl.type.type.conversion.valid.frag.out b/Test/baseResults/hlsl.type.type.conversion.valid.frag.out index 7320074664..fe802db184 100644 --- a/Test/baseResults/hlsl.type.type.conversion.valid.frag.out +++ b/Test/baseResults/hlsl.type.type.conversion.valid.frag.out @@ -1364,7 +1364,7 @@ gl_FragCoord origin is upper left 0:? '@entryPointOutput' (layout( location=0) out 4-component vector of float) // Module Version 10300 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 122 Capability Shader diff --git a/Test/baseResults/hlsl.typeGraphCopy.vert.out b/Test/baseResults/hlsl.typeGraphCopy.vert.out index cedf601c30..e3805477a5 100644 --- a/Test/baseResults/hlsl.typeGraphCopy.vert.out +++ b/Test/baseResults/hlsl.typeGraphCopy.vert.out @@ -62,7 +62,7 @@ Shader version: 500 0:? '@entryPointOutput' (layout( location=0) out float) // Module Version 10000 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 28 Capability Shader diff --git a/Test/baseResults/hlsl.typedef.frag.out b/Test/baseResults/hlsl.typedef.frag.out index d925124ace..ecb8dbd85c 100644 --- a/Test/baseResults/hlsl.typedef.frag.out +++ b/Test/baseResults/hlsl.typedef.frag.out @@ -79,7 +79,7 @@ gl_FragCoord origin is upper left 0:? Linker Objects // Module Version 10000 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 34 Capability Shader diff --git a/Test/baseResults/hlsl.void.frag.out b/Test/baseResults/hlsl.void.frag.out index f93cca0d9b..48c43c6872 100644 --- a/Test/baseResults/hlsl.void.frag.out +++ b/Test/baseResults/hlsl.void.frag.out @@ -54,7 +54,7 @@ gl_FragCoord origin is upper left 0:? 'input' (layout( location=0) in 4-component vector of float) // Module Version 10000 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 27 Capability Shader diff --git a/Test/baseResults/hlsl.w-recip.frag.out b/Test/baseResults/hlsl.w-recip.frag.out index b72f361e08..a4fc494d8c 100644 --- a/Test/baseResults/hlsl.w-recip.frag.out +++ b/Test/baseResults/hlsl.w-recip.frag.out @@ -162,7 +162,7 @@ gl_FragCoord origin is upper left 0:? 'vpos' ( in 4-component vector of float FragCoord) // Module Version 10000 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 69 Capability Shader diff --git a/Test/baseResults/hlsl.w-recip2.frag.out b/Test/baseResults/hlsl.w-recip2.frag.out index 6fee15c421..2157ce4cc5 100644 --- a/Test/baseResults/hlsl.w-recip2.frag.out +++ b/Test/baseResults/hlsl.w-recip2.frag.out @@ -178,7 +178,7 @@ gl_FragCoord origin is upper left 0:? 'VSOut.TexCoord' (layout( location=2) in 2-component vector of float) // Module Version 10000 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 75 Capability Shader diff --git a/Test/baseResults/hlsl.wavebroadcast.comp.out b/Test/baseResults/hlsl.wavebroadcast.comp.out index 01bc953da6..ed35cba38c 100644 --- a/Test/baseResults/hlsl.wavebroadcast.comp.out +++ b/Test/baseResults/hlsl.wavebroadcast.comp.out @@ -2298,7 +2298,7 @@ local_size = (32, 16, 1) 0:? 'dti' ( in 3-component vector of uint GlobalInvocationID) // Module Version 10300 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 393 Capability Shader @@ -2331,7 +2331,7 @@ local_size = (32, 16, 1) MemberDecorate 20(Types) 3 Offset 64 Decorate 21 ArrayStride 96 MemberDecorate 22(data) 0 Offset 0 - Decorate 22(data) BufferBlock + Decorate 22(data) Block Decorate 24(data) DescriptorSet 0 Decorate 24(data) Binding 0 Decorate 388(dti) BuiltIn GlobalInvocationId @@ -2351,31 +2351,31 @@ local_size = (32, 16, 1) 20(Types): TypeStruct 13(ivec4) 15(ivec4) 17(fvec4) 19(f64vec4) 21: TypeRuntimeArray 20(Types) 22(data): TypeStruct 21 - 23: TypePointer Uniform 22(data) - 24(data): 23(ptr) Variable Uniform + 23: TypePointer StorageBuffer 22(data) + 24(data): 23(ptr) Variable StorageBuffer 25: 14(int) Constant 0 26: 6(int) Constant 0 27: TypePointer Function 6(int) - 32: TypePointer Uniform 13(ivec4) + 32: TypePointer StorageBuffer 13(ivec4) 35: 6(int) Constant 13 36: 6(int) Constant 3 - 43: TypePointer Uniform 6(int) + 43: TypePointer StorageBuffer 6(int) 52: TypeVector 6(int) 2 59: 6(int) Constant 1 74: 6(int) Constant 2 79: 14(int) Constant 1 - 82: TypePointer Uniform 15(ivec4) - 91: TypePointer Uniform 14(int) + 82: TypePointer StorageBuffer 15(ivec4) + 91: TypePointer StorageBuffer 14(int) 100: TypeVector 14(int) 2 113: TypeVector 14(int) 3 126: 14(int) Constant 2 - 129: TypePointer Uniform 17(fvec4) - 138: TypePointer Uniform 16(float) + 129: TypePointer StorageBuffer 17(fvec4) + 138: TypePointer StorageBuffer 16(float) 147: TypeVector 16(float) 2 160: TypeVector 16(float) 3 173: 14(int) Constant 3 - 176: TypePointer Uniform 19(f64vec4) - 185: TypePointer Uniform 18(float64_t) + 176: TypePointer StorageBuffer 19(f64vec4) + 185: TypePointer StorageBuffer 18(float64_t) 194: TypeVector 18(float64_t) 2 207: TypeVector 18(float64_t) 3 387: TypePointer Input 7(ivec3) diff --git a/Test/baseResults/hlsl.waveprefix.comp.out b/Test/baseResults/hlsl.waveprefix.comp.out index e4e942cefd..ecc1b3eb5f 100644 --- a/Test/baseResults/hlsl.waveprefix.comp.out +++ b/Test/baseResults/hlsl.waveprefix.comp.out @@ -2322,7 +2322,7 @@ local_size = (32, 16, 1) 0:? 'dti' ( in 3-component vector of uint GlobalInvocationID) // Module Version 10300 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 403 Capability Shader @@ -2355,7 +2355,7 @@ local_size = (32, 16, 1) MemberDecorate 20(Types) 3 Offset 64 Decorate 21 ArrayStride 96 MemberDecorate 22(data) 0 Offset 0 - Decorate 22(data) BufferBlock + Decorate 22(data) Block Decorate 24(data) DescriptorSet 0 Decorate 24(data) Binding 0 Decorate 398(dti) BuiltIn GlobalInvocationId @@ -2375,30 +2375,30 @@ local_size = (32, 16, 1) 20(Types): TypeStruct 13(ivec4) 15(ivec4) 17(fvec4) 19(f64vec4) 21: TypeRuntimeArray 20(Types) 22(data): TypeStruct 21 - 23: TypePointer Uniform 22(data) - 24(data): 23(ptr) Variable Uniform + 23: TypePointer StorageBuffer 22(data) + 24(data): 23(ptr) Variable StorageBuffer 25: 14(int) Constant 0 26: 6(int) Constant 0 27: TypePointer Function 6(int) - 32: TypePointer Uniform 13(ivec4) + 32: TypePointer StorageBuffer 13(ivec4) 35: 6(int) Constant 3 - 42: TypePointer Uniform 6(int) + 42: TypePointer StorageBuffer 6(int) 51: TypeVector 6(int) 2 58: 6(int) Constant 1 73: 6(int) Constant 2 78: 14(int) Constant 1 - 81: TypePointer Uniform 15(ivec4) - 90: TypePointer Uniform 14(int) + 81: TypePointer StorageBuffer 15(ivec4) + 90: TypePointer StorageBuffer 14(int) 99: TypeVector 14(int) 2 112: TypeVector 14(int) 3 125: 14(int) Constant 2 - 128: TypePointer Uniform 17(fvec4) - 137: TypePointer Uniform 16(float) + 128: TypePointer StorageBuffer 17(fvec4) + 137: TypePointer StorageBuffer 16(float) 146: TypeVector 16(float) 2 159: TypeVector 16(float) 3 172: 14(int) Constant 3 - 175: TypePointer Uniform 19(f64vec4) - 184: TypePointer Uniform 18(float64_t) + 175: TypePointer StorageBuffer 19(f64vec4) + 184: TypePointer StorageBuffer 18(float64_t) 193: TypeVector 18(float64_t) 2 206: TypeVector 18(float64_t) 3 391: TypeBool diff --git a/Test/baseResults/hlsl.wavequad.comp.out b/Test/baseResults/hlsl.wavequad.comp.out index e4311c7466..7deb7c7ef1 100644 --- a/Test/baseResults/hlsl.wavequad.comp.out +++ b/Test/baseResults/hlsl.wavequad.comp.out @@ -8026,7 +8026,7 @@ local_size = (32, 16, 1) 0:? 'dti' ( in 3-component vector of uint GlobalInvocationID) // Module Version 10300 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 1232 Capability Shader @@ -8058,7 +8058,7 @@ local_size = (32, 16, 1) MemberDecorate 20(Types) 3 Offset 64 Decorate 21 ArrayStride 96 MemberDecorate 22(data) 0 Offset 0 - Decorate 22(data) BufferBlock + Decorate 22(data) Block Decorate 24(data) DescriptorSet 0 Decorate 24(data) Binding 0 Decorate 1227(dti) BuiltIn GlobalInvocationId @@ -8078,30 +8078,30 @@ local_size = (32, 16, 1) 20(Types): TypeStruct 13(ivec4) 15(ivec4) 17(fvec4) 19(f64vec4) 21: TypeRuntimeArray 20(Types) 22(data): TypeStruct 21 - 23: TypePointer Uniform 22(data) - 24(data): 23(ptr) Variable Uniform + 23: TypePointer StorageBuffer 22(data) + 24(data): 23(ptr) Variable StorageBuffer 25: 14(int) Constant 0 26: 6(int) Constant 0 27: TypePointer Function 6(int) - 32: TypePointer Uniform 13(ivec4) + 32: TypePointer StorageBuffer 13(ivec4) 35: 6(int) Constant 3 - 42: TypePointer Uniform 6(int) + 42: TypePointer StorageBuffer 6(int) 51: TypeVector 6(int) 2 58: 6(int) Constant 1 73: 6(int) Constant 2 78: 14(int) Constant 1 - 81: TypePointer Uniform 15(ivec4) - 90: TypePointer Uniform 14(int) + 81: TypePointer StorageBuffer 15(ivec4) + 90: TypePointer StorageBuffer 14(int) 99: TypeVector 14(int) 2 112: TypeVector 14(int) 3 125: 14(int) Constant 2 - 128: TypePointer Uniform 17(fvec4) - 137: TypePointer Uniform 16(float) + 128: TypePointer StorageBuffer 17(fvec4) + 137: TypePointer StorageBuffer 16(float) 146: TypeVector 16(float) 2 159: TypeVector 16(float) 3 172: 14(int) Constant 3 - 175: TypePointer Uniform 19(f64vec4) - 184: TypePointer Uniform 18(float64_t) + 175: TypePointer StorageBuffer 19(f64vec4) + 184: TypePointer StorageBuffer 18(float64_t) 193: TypeVector 18(float64_t) 2 206: TypeVector 18(float64_t) 3 1226: TypePointer Input 7(ivec3) diff --git a/Test/baseResults/hlsl.wavequery.comp.out b/Test/baseResults/hlsl.wavequery.comp.out index dcd11ae7d2..8e08b09eff 100644 --- a/Test/baseResults/hlsl.wavequery.comp.out +++ b/Test/baseResults/hlsl.wavequery.comp.out @@ -60,7 +60,7 @@ local_size = (32, 16, 1) 0:? 'data' (layout( row_major std430) buffer block{layout( row_major std430) buffer unsized 1-element array of uint @data}) // Module Version 10300 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 28 Capability Shader @@ -79,7 +79,7 @@ local_size = (32, 16, 1) Name 21 "@gl_SubgroupSize" Decorate 9 ArrayStride 4 MemberDecorate 10(data) 0 Offset 0 - Decorate 10(data) BufferBlock + Decorate 10(data) Block Decorate 12(data) DescriptorSet 0 Decorate 12(data) Binding 0 Decorate 16(@gl_SubgroupInvocationID) BuiltIn SubgroupLocalInvocationId @@ -89,8 +89,8 @@ local_size = (32, 16, 1) 8: TypeInt 32 0 9: TypeRuntimeArray 8(int) 10(data): TypeStruct 9 - 11: TypePointer Uniform 10(data) - 12(data): 11(ptr) Variable Uniform + 11: TypePointer StorageBuffer 10(data) + 12(data): 11(ptr) Variable StorageBuffer 13: TypeInt 32 1 14: 13(int) Constant 0 15: TypePointer Input 8(int) @@ -99,7 +99,7 @@ local_size = (32, 16, 1) 19: 8(int) Constant 3 21(@gl_SubgroupSize): 15(ptr) Variable Input 23: 8(int) Constant 0 - 25: TypePointer Uniform 8(int) + 25: TypePointer StorageBuffer 8(int) 4(CSMain): 2 Function None 3 5: Label 27: 2 FunctionCall 6(@CSMain() diff --git a/Test/baseResults/hlsl.wavequery.frag.out b/Test/baseResults/hlsl.wavequery.frag.out index df1b59697a..bb5147a36f 100644 --- a/Test/baseResults/hlsl.wavequery.frag.out +++ b/Test/baseResults/hlsl.wavequery.frag.out @@ -72,7 +72,7 @@ gl_FragCoord origin is upper left 0:? '@entryPointOutput' (layout( location=0) out 4-component vector of float) // Module Version 10300 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 30 Capability Shader diff --git a/Test/baseResults/hlsl.wavereduction.comp.out b/Test/baseResults/hlsl.wavereduction.comp.out index 64a4e7c30d..9a636f5a4c 100644 --- a/Test/baseResults/hlsl.wavereduction.comp.out +++ b/Test/baseResults/hlsl.wavereduction.comp.out @@ -6186,7 +6186,7 @@ local_size = (32, 16, 1) 0:? 'dti' ( in 3-component vector of uint GlobalInvocationID) // Module Version 10300 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 991 Capability Shader @@ -6219,7 +6219,7 @@ local_size = (32, 16, 1) MemberDecorate 20(Types) 3 Offset 64 Decorate 21 ArrayStride 96 MemberDecorate 22(data) 0 Offset 0 - Decorate 22(data) BufferBlock + Decorate 22(data) Block Decorate 24(data) DescriptorSet 0 Decorate 24(data) Binding 0 Decorate 986(dti) BuiltIn GlobalInvocationId @@ -6239,30 +6239,30 @@ local_size = (32, 16, 1) 20(Types): TypeStruct 13(ivec4) 15(ivec4) 17(fvec4) 19(f64vec4) 21: TypeRuntimeArray 20(Types) 22(data): TypeStruct 21 - 23: TypePointer Uniform 22(data) - 24(data): 23(ptr) Variable Uniform + 23: TypePointer StorageBuffer 22(data) + 24(data): 23(ptr) Variable StorageBuffer 25: 14(int) Constant 0 26: 6(int) Constant 0 27: TypePointer Function 6(int) - 32: TypePointer Uniform 13(ivec4) + 32: TypePointer StorageBuffer 13(ivec4) 35: 6(int) Constant 3 - 42: TypePointer Uniform 6(int) + 42: TypePointer StorageBuffer 6(int) 51: TypeVector 6(int) 2 58: 6(int) Constant 1 73: 6(int) Constant 2 78: 14(int) Constant 1 - 81: TypePointer Uniform 15(ivec4) - 90: TypePointer Uniform 14(int) + 81: TypePointer StorageBuffer 15(ivec4) + 90: TypePointer StorageBuffer 14(int) 99: TypeVector 14(int) 2 112: TypeVector 14(int) 3 125: 14(int) Constant 2 - 128: TypePointer Uniform 17(fvec4) - 137: TypePointer Uniform 16(float) + 128: TypePointer StorageBuffer 17(fvec4) + 137: TypePointer StorageBuffer 16(float) 146: TypeVector 16(float) 2 159: TypeVector 16(float) 3 172: 14(int) Constant 3 - 175: TypePointer Uniform 19(f64vec4) - 184: TypePointer Uniform 18(float64_t) + 175: TypePointer StorageBuffer 19(f64vec4) + 184: TypePointer StorageBuffer 18(float64_t) 193: TypeVector 18(float64_t) 2 206: TypeVector 18(float64_t) 3 979: TypeBool diff --git a/Test/baseResults/hlsl.wavevote.comp.out b/Test/baseResults/hlsl.wavevote.comp.out index 83140a2f32..382f504f62 100644 --- a/Test/baseResults/hlsl.wavevote.comp.out +++ b/Test/baseResults/hlsl.wavevote.comp.out @@ -204,7 +204,7 @@ local_size = (32, 16, 1) 0:? 'dti' ( in 3-component vector of uint GlobalInvocationID) // Module Version 10300 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 75 Capability Shader @@ -228,7 +228,7 @@ local_size = (32, 16, 1) Name 72 "param" Decorate 14 ArrayStride 8 MemberDecorate 15(data) 0 Offset 0 - Decorate 15(data) BufferBlock + Decorate 15(data) Block Decorate 17(data) DescriptorSet 0 Decorate 17(data) Binding 0 Decorate 70(dti) BuiltIn GlobalInvocationId @@ -241,8 +241,8 @@ local_size = (32, 16, 1) 13: TypeInt 64 0 14: TypeRuntimeArray 13(int64_t) 15(data): TypeStruct 14 - 16: TypePointer Uniform 15(data) - 17(data): 16(ptr) Variable Uniform + 16: TypePointer StorageBuffer 15(data) + 17(data): 16(ptr) Variable StorageBuffer 18: TypeInt 32 1 19: 18(int) Constant 0 20: 6(int) Constant 0 @@ -251,7 +251,7 @@ local_size = (32, 16, 1) 28: 6(int) Constant 3 30: TypeVector 6(int) 4 32: TypeVector 13(int64_t) 4 - 35: TypePointer Uniform 13(int64_t) + 35: TypePointer StorageBuffer 13(int64_t) 37: 6(int) Constant 1 48: 6(int) Constant 2 69: TypePointer Input 7(ivec3) diff --git a/Test/baseResults/hlsl.whileLoop.frag.out b/Test/baseResults/hlsl.whileLoop.frag.out index 23825e8e75..1f9a36b2ff 100644 --- a/Test/baseResults/hlsl.whileLoop.frag.out +++ b/Test/baseResults/hlsl.whileLoop.frag.out @@ -96,7 +96,7 @@ gl_FragCoord origin is upper left 0:? 'input' (layout( location=0) in 4-component vector of float) // Module Version 10000 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 52 Capability Shader diff --git a/Test/baseResults/hlsl.y-negate-1.vert.out b/Test/baseResults/hlsl.y-negate-1.vert.out index aefde04164..e000752436 100644 --- a/Test/baseResults/hlsl.y-negate-1.vert.out +++ b/Test/baseResults/hlsl.y-negate-1.vert.out @@ -72,7 +72,7 @@ Shader version: 500 0:? '@entryPointOutput' ( out 4-component vector of float Position) // Module Version 10000 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 34 Capability Shader diff --git a/Test/baseResults/hlsl.y-negate-2.vert.out b/Test/baseResults/hlsl.y-negate-2.vert.out index 4a9ef61161..57a47ab780 100644 --- a/Test/baseResults/hlsl.y-negate-2.vert.out +++ b/Test/baseResults/hlsl.y-negate-2.vert.out @@ -80,7 +80,7 @@ Shader version: 500 0:? 'position' ( out 4-component vector of float Position) // Module Version 10000 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 37 Capability Shader diff --git a/Test/baseResults/hlsl.y-negate-3.vert.out b/Test/baseResults/hlsl.y-negate-3.vert.out index 3544910347..3e5895115d 100644 --- a/Test/baseResults/hlsl.y-negate-3.vert.out +++ b/Test/baseResults/hlsl.y-negate-3.vert.out @@ -126,7 +126,7 @@ Shader version: 500 0:? '@entryPointOutput.somethingelse' (layout( location=0) out int) // Module Version 10000 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 50 Capability Shader diff --git a/Test/baseResults/implicitArraySize.vert.out b/Test/baseResults/implicitArraySize.vert.out new file mode 100644 index 0000000000..9a71b87b40 --- /dev/null +++ b/Test/baseResults/implicitArraySize.vert.out @@ -0,0 +1,115 @@ +implicitArraySize.vert +Shader version: 460 +0:? Sequence +0:5 Function Definition: main( ( global void) +0:5 Function Parameters: +0:6 Sequence +0:6 move second child to first child ( temp float) +0:6 direct index ( smooth temp float) +0:6 'a' ( smooth out unsized 1-element array of float) +0:6 Constant: +0:6 0 (const int) +0:6 Constant: +0:6 0.100000 +0:7 move second child to first child ( temp float) +0:7 direct index ( smooth temp float) +0:7 'c' ( smooth out unsized 6-element array of float) +0:7 Constant: +0:7 5 (const int) +0:7 Constant: +0:7 0.100000 +0:? Linker Objects +0:? 'a' ( smooth out unsized 1-element array of float) +0:? 'c' ( smooth out unsized 6-element array of float) +0:? 'gl_VertexID' ( gl_VertexId int VertexId) +0:? 'gl_InstanceID' ( gl_InstanceId int InstanceId) + +implicitArraySize.frag +Shader version: 460 +0:? Sequence +0:6 Function Definition: main( ( global void) +0:6 Function Parameters: +0:7 Sequence +0:7 move second child to first child ( temp float) +0:7 direct index ( temp float) +0:7 'b' ( out 5-element array of float) +0:7 Constant: +0:7 0 (const int) +0:7 direct index ( smooth temp float) +0:7 'a' ( smooth in unsized 2-element array of float) +0:7 Constant: +0:7 1 (const int) +0:8 move second child to first child ( temp float) +0:8 direct index ( temp float) +0:8 'b' ( out 5-element array of float) +0:8 Constant: +0:8 1 (const int) +0:8 direct index ( smooth temp float) +0:8 'c' ( smooth in 3-element array of float) +0:8 Constant: +0:8 1 (const int) +0:? Linker Objects +0:? 'a' ( smooth in unsized 2-element array of float) +0:? 'c' ( smooth in 3-element array of float) +0:? 'b' ( out 5-element array of float) + + +Linked vertex stage: + + +Linked fragment stage: + +ERROR: Linking vertex stage: Implicit size of unsized array doesn't match same symbol among multiple shaders. + +Shader version: 460 +0:? Sequence +0:5 Function Definition: main( ( global void) +0:5 Function Parameters: +0:6 Sequence +0:6 move second child to first child ( temp float) +0:6 direct index ( smooth temp float) +0:6 'a' ( smooth out 1-element array of float) +0:6 Constant: +0:6 0 (const int) +0:6 Constant: +0:6 0.100000 +0:7 move second child to first child ( temp float) +0:7 direct index ( smooth temp float) +0:7 'c' ( smooth out 6-element array of float) +0:7 Constant: +0:7 5 (const int) +0:7 Constant: +0:7 0.100000 +0:? Linker Objects +0:? 'a' ( smooth out 1-element array of float) +0:? 'c' ( smooth out 6-element array of float) +0:? 'gl_VertexID' ( gl_VertexId int VertexId) +0:? 'gl_InstanceID' ( gl_InstanceId int InstanceId) +Shader version: 460 +0:? Sequence +0:6 Function Definition: main( ( global void) +0:6 Function Parameters: +0:7 Sequence +0:7 move second child to first child ( temp float) +0:7 direct index ( temp float) +0:7 'b' ( out 5-element array of float) +0:7 Constant: +0:7 0 (const int) +0:7 direct index ( smooth temp float) +0:7 'a' ( smooth in 2-element array of float) +0:7 Constant: +0:7 1 (const int) +0:8 move second child to first child ( temp float) +0:8 direct index ( temp float) +0:8 'b' ( out 5-element array of float) +0:8 Constant: +0:8 1 (const int) +0:8 direct index ( smooth temp float) +0:8 'c' ( smooth in 3-element array of float) +0:8 Constant: +0:8 1 (const int) +0:? Linker Objects +0:? 'a' ( smooth in 2-element array of float) +0:? 'c' ( smooth in 3-element array of float) +0:? 'b' ( out 5-element array of float) + diff --git a/Test/baseResults/implicitArraySize1.geom.out b/Test/baseResults/implicitArraySize1.geom.out new file mode 100644 index 0000000000..d9c2f8ba14 --- /dev/null +++ b/Test/baseResults/implicitArraySize1.geom.out @@ -0,0 +1,99 @@ +implicitArraySize1.geom +Shader version: 460 +invocations = -1 +max_vertices = 204 +input primitive = triangles +output primitive = line_strip +0:? Sequence +0:11 Function Definition: main( ( global void) +0:11 Function Parameters: +0:12 Sequence +0:12 Function Call: f( ( global void) +0:13 move second child to first child ( temp float) +0:13 direct index (layout( stream=0) temp float) +0:13 'o' (layout( stream=0) out 3-element array of float) +0:13 Constant: +0:13 1 (const int) +0:13 direct index ( temp float) +0:13 direct index ( temp 3-element array of float) +0:13 'g' ( in 3-element array of 3-element array of float) +0:13 Constant: +0:13 2 (const int) +0:13 Constant: +0:13 1 (const int) +0:? Linker Objects +0:? 'g' ( in 3-element array of 3-element array of float) +0:? 'o' (layout( stream=0) out 3-element array of float) + +implicitArraySize2.geom +Shader version: 460 +invocations = -1 +max_vertices = -1 +input primitive = none +output primitive = none +0:? Sequence +0:6 Function Definition: f( ( global void) +0:6 Function Parameters: +0:7 Sequence +0:7 move second child to first child ( temp float) +0:7 direct index (layout( stream=0) temp float) +0:7 'o' (layout( stream=0) out unsized 2-element array of float) +0:7 Constant: +0:7 1 (const int) +0:7 direct index ( temp float) +0:7 direct index ( temp 3-element array of float) +0:7 'g' ( in unsized 2-element array of 3-element array of float) +0:7 Constant: +0:7 1 (const int) +0:7 Constant: +0:7 1 (const int) +0:? Linker Objects +0:? 'g' ( in unsized 2-element array of 3-element array of float) +0:? 'o' (layout( stream=0) out unsized 2-element array of float) + + +Linked geometry stage: + +ERROR: Linking geometry stage: Not all array sizes match across all geometry shaders in the program + +Shader version: 460 +invocations = 1 +max_vertices = 204 +input primitive = triangles +output primitive = line_strip +0:? Sequence +0:11 Function Definition: main( ( global void) +0:11 Function Parameters: +0:12 Sequence +0:12 Function Call: f( ( global void) +0:13 move second child to first child ( temp float) +0:13 direct index (layout( stream=0) temp float) +0:13 'o' (layout( stream=0) out 3-element array of float) +0:13 Constant: +0:13 1 (const int) +0:13 direct index ( temp float) +0:13 direct index ( temp 3-element array of float) +0:13 'g' ( in 3-element array of 3-element array of float) +0:13 Constant: +0:13 2 (const int) +0:13 Constant: +0:13 1 (const int) +0:6 Function Definition: f( ( global void) +0:6 Function Parameters: +0:7 Sequence +0:7 move second child to first child ( temp float) +0:7 direct index (layout( stream=0) temp float) +0:7 'o' (layout( stream=0) out 2-element array of float) +0:7 Constant: +0:7 1 (const int) +0:7 direct index ( temp float) +0:7 direct index ( temp 3-element array of float) +0:7 'g' ( in 2-element array of 3-element array of float) +0:7 Constant: +0:7 1 (const int) +0:7 Constant: +0:7 1 (const int) +0:? Linker Objects +0:? 'g' ( in 3-element array of 3-element array of float) +0:? 'o' (layout( stream=0) out 3-element array of float) + diff --git a/Test/baseResults/implicitArraySizeBuiltin.vert.out b/Test/baseResults/implicitArraySizeBuiltin.vert.out new file mode 100644 index 0000000000..77b41aa6db --- /dev/null +++ b/Test/baseResults/implicitArraySizeBuiltin.vert.out @@ -0,0 +1,176 @@ +implicitArraySizeBuiltin.vert +Shader version: 460 +0:? Sequence +0:3 Function Definition: f1(f1; ( global void) +0:3 Function Parameters: +0:3 'x' ( in float) +0:5 Sequence +0:5 move second child to first child ( temp float) +0:5 direct index ( temp float ClipDistance) +0:5 gl_ClipDistance: direct index for structure ( out unsized 7-element array of float ClipDistance) +0:5 'anon@0' ( out block{ gl_Position 4-component vector of float Position gl_Position, gl_PointSize float PointSize gl_PointSize, out unsized 7-element array of float ClipDistance gl_ClipDistance, out unsized 2-element array of float CullDistance gl_CullDistance}) +0:5 Constant: +0:5 2 (const uint) +0:5 Constant: +0:5 6 (const int) +0:5 'x' ( in float) +0:6 move second child to first child ( temp float) +0:6 direct index ( temp float CullDistance) +0:6 gl_CullDistance: direct index for structure ( out unsized 2-element array of float CullDistance) +0:6 'anon@0' ( out block{ gl_Position 4-component vector of float Position gl_Position, gl_PointSize float PointSize gl_PointSize, out unsized 7-element array of float ClipDistance gl_ClipDistance, out unsized 2-element array of float CullDistance gl_CullDistance}) +0:6 Constant: +0:6 3 (const uint) +0:6 Constant: +0:6 1 (const int) +0:6 'x' ( in float) +0:9 Function Definition: main( ( global void) +0:9 Function Parameters: +0:10 Sequence +0:10 Function Call: f1(f1; ( global void) +0:10 Constant: +0:10 0.100000 +0:? Linker Objects +0:? 'anon@0' ( out block{ gl_Position 4-component vector of float Position gl_Position, gl_PointSize float PointSize gl_PointSize, out unsized 7-element array of float ClipDistance gl_ClipDistance, out unsized 2-element array of float CullDistance gl_CullDistance}) +0:? 'gl_VertexID' ( gl_VertexId int VertexId) +0:? 'gl_InstanceID' ( gl_InstanceId int InstanceId) + +implicitArraySizeBuiltin.geom +Shader version: 460 +invocations = -1 +max_vertices = 204 +input primitive = triangles +output primitive = line_strip +0:? Sequence +0:6 Function Definition: f2(f1; ( global void) +0:6 Function Parameters: +0:6 'x' ( in float) +0:8 Sequence +0:8 move second child to first child ( temp float) +0:8 direct index (layout( stream=0) temp float ClipDistance) +0:8 gl_ClipDistance: direct index for structure (layout( stream=0) out unsized 7-element array of float ClipDistance) +0:8 'anon@0' (layout( stream=0) out block{layout( stream=0) gl_Position 4-component vector of float Position gl_Position, layout( stream=0) gl_PointSize float PointSize gl_PointSize, layout( stream=0) out unsized 7-element array of float ClipDistance gl_ClipDistance, layout( stream=0) out unsized 2-element array of float CullDistance gl_CullDistance}) +0:8 Constant: +0:8 2 (const uint) +0:8 Constant: +0:8 6 (const int) +0:8 direct index ( temp float ClipDistance) +0:8 gl_ClipDistance: direct index for structure ( in unsized 7-element array of float ClipDistance) +0:8 direct index ( temp block{ in 4-component vector of float Position gl_Position, in float PointSize gl_PointSize, in unsized 7-element array of float ClipDistance gl_ClipDistance, in unsized 2-element array of float CullDistance gl_CullDistance, in 4-component vector of float SecondaryPositionNV gl_SecondaryPositionNV, in unsized 1-element array of 4-component vector of float PositionPerViewNV gl_PositionPerViewNV}) +0:8 'gl_in' ( in 3-element array of block{ in 4-component vector of float Position gl_Position, in float PointSize gl_PointSize, in unsized 7-element array of float ClipDistance gl_ClipDistance, in unsized 2-element array of float CullDistance gl_CullDistance, in 4-component vector of float SecondaryPositionNV gl_SecondaryPositionNV, in unsized 1-element array of 4-component vector of float PositionPerViewNV gl_PositionPerViewNV}) +0:8 Constant: +0:8 0 (const int) +0:8 Constant: +0:8 2 (const int) +0:8 Constant: +0:8 6 (const int) +0:10 Function Definition: f3(f1; ( global void) +0:10 Function Parameters: +0:10 'x' ( in float) +0:12 Sequence +0:12 move second child to first child ( temp float) +0:12 direct index (layout( stream=0) temp float CullDistance) +0:12 gl_CullDistance: direct index for structure (layout( stream=0) out unsized 2-element array of float CullDistance) +0:12 'anon@0' (layout( stream=0) out block{layout( stream=0) gl_Position 4-component vector of float Position gl_Position, layout( stream=0) gl_PointSize float PointSize gl_PointSize, layout( stream=0) out unsized 7-element array of float ClipDistance gl_ClipDistance, layout( stream=0) out unsized 2-element array of float CullDistance gl_CullDistance}) +0:12 Constant: +0:12 3 (const uint) +0:12 Constant: +0:12 1 (const int) +0:12 direct index ( temp float CullDistance) +0:12 gl_CullDistance: direct index for structure ( in unsized 2-element array of float CullDistance) +0:12 direct index ( temp block{ in 4-component vector of float Position gl_Position, in float PointSize gl_PointSize, in unsized 7-element array of float ClipDistance gl_ClipDistance, in unsized 2-element array of float CullDistance gl_CullDistance, in 4-component vector of float SecondaryPositionNV gl_SecondaryPositionNV, in unsized 1-element array of 4-component vector of float PositionPerViewNV gl_PositionPerViewNV}) +0:12 'gl_in' ( in 3-element array of block{ in 4-component vector of float Position gl_Position, in float PointSize gl_PointSize, in unsized 7-element array of float ClipDistance gl_ClipDistance, in unsized 2-element array of float CullDistance gl_CullDistance, in 4-component vector of float SecondaryPositionNV gl_SecondaryPositionNV, in unsized 1-element array of 4-component vector of float PositionPerViewNV gl_PositionPerViewNV}) +0:12 Constant: +0:12 0 (const int) +0:12 Constant: +0:12 3 (const int) +0:12 Constant: +0:12 1 (const int) +0:15 Function Definition: main( ( global void) +0:15 Function Parameters: +0:19 Sequence +0:19 Function Call: f3(f1; ( global void) +0:19 Constant: +0:19 0.100000 +0:? Linker Objects +0:? 'anon@0' (layout( stream=0) out block{layout( stream=0) gl_Position 4-component vector of float Position gl_Position, layout( stream=0) gl_PointSize float PointSize gl_PointSize, layout( stream=0) out unsized 7-element array of float ClipDistance gl_ClipDistance, layout( stream=0) out unsized 2-element array of float CullDistance gl_CullDistance}) +0:? 'gl_in' ( in 3-element array of block{ in 4-component vector of float Position gl_Position, in float PointSize gl_PointSize, in unsized 7-element array of float ClipDistance gl_ClipDistance, in unsized 2-element array of float CullDistance gl_CullDistance, in 4-component vector of float SecondaryPositionNV gl_SecondaryPositionNV, in unsized 1-element array of 4-component vector of float PositionPerViewNV gl_PositionPerViewNV}) + + +Linked vertex stage: + + +Linked geometry stage: + + +Shader version: 460 +0:? Sequence +0:3 Function Definition: f1(f1; ( global void) +0:3 Function Parameters: +0:3 'x' ( in float) +0:5 Sequence +0:5 move second child to first child ( temp float) +0:5 direct index ( temp float ClipDistance) +0:5 gl_ClipDistance: direct index for structure ( out 7-element array of float ClipDistance) +0:5 'anon@0' ( out block{ gl_Position 4-component vector of float Position gl_Position, gl_PointSize float PointSize gl_PointSize, out 7-element array of float ClipDistance gl_ClipDistance, out 2-element array of float CullDistance gl_CullDistance}) +0:5 Constant: +0:5 2 (const uint) +0:5 Constant: +0:5 6 (const int) +0:5 'x' ( in float) +0:6 move second child to first child ( temp float) +0:6 direct index ( temp float CullDistance) +0:6 gl_CullDistance: direct index for structure ( out 2-element array of float CullDistance) +0:6 'anon@0' ( out block{ gl_Position 4-component vector of float Position gl_Position, gl_PointSize float PointSize gl_PointSize, out 7-element array of float ClipDistance gl_ClipDistance, out 2-element array of float CullDistance gl_CullDistance}) +0:6 Constant: +0:6 3 (const uint) +0:6 Constant: +0:6 1 (const int) +0:6 'x' ( in float) +0:9 Function Definition: main( ( global void) +0:9 Function Parameters: +0:10 Sequence +0:10 Function Call: f1(f1; ( global void) +0:10 Constant: +0:10 0.100000 +0:? Linker Objects +0:? 'anon@0' ( out block{ gl_Position 4-component vector of float Position gl_Position, gl_PointSize float PointSize gl_PointSize, out 7-element array of float ClipDistance gl_ClipDistance, out 2-element array of float CullDistance gl_CullDistance}) +0:? 'gl_VertexID' ( gl_VertexId int VertexId) +0:? 'gl_InstanceID' ( gl_InstanceId int InstanceId) +Shader version: 460 +invocations = 1 +max_vertices = 204 +input primitive = triangles +output primitive = line_strip +0:? Sequence +0:10 Function Definition: f3(f1; ( global void) +0:10 Function Parameters: +0:10 'x' ( in float) +0:12 Sequence +0:12 move second child to first child ( temp float) +0:12 direct index (layout( stream=0) temp float CullDistance) +0:12 gl_CullDistance: direct index for structure (layout( stream=0) out 2-element array of float CullDistance) +0:12 'anon@0' (layout( stream=0) out block{layout( stream=0) gl_Position 4-component vector of float Position gl_Position, layout( stream=0) gl_PointSize float PointSize gl_PointSize, layout( stream=0) out 7-element array of float ClipDistance gl_ClipDistance, layout( stream=0) out 2-element array of float CullDistance gl_CullDistance}) +0:12 Constant: +0:12 3 (const uint) +0:12 Constant: +0:12 1 (const int) +0:12 direct index ( temp float CullDistance) +0:12 gl_CullDistance: direct index for structure ( in 2-element array of float CullDistance) +0:12 direct index ( temp block{ in 4-component vector of float Position gl_Position, in float PointSize gl_PointSize, in 7-element array of float ClipDistance gl_ClipDistance, in 2-element array of float CullDistance gl_CullDistance, in 4-component vector of float SecondaryPositionNV gl_SecondaryPositionNV, in 1-element array of 4-component vector of float PositionPerViewNV gl_PositionPerViewNV}) +0:12 'gl_in' ( in 3-element array of block{ in 4-component vector of float Position gl_Position, in float PointSize gl_PointSize, in 7-element array of float ClipDistance gl_ClipDistance, in 2-element array of float CullDistance gl_CullDistance, in 4-component vector of float SecondaryPositionNV gl_SecondaryPositionNV, in 1-element array of 4-component vector of float PositionPerViewNV gl_PositionPerViewNV}) +0:12 Constant: +0:12 0 (const int) +0:12 Constant: +0:12 3 (const int) +0:12 Constant: +0:12 1 (const int) +0:15 Function Definition: main( ( global void) +0:15 Function Parameters: +0:19 Sequence +0:19 Function Call: f3(f1; ( global void) +0:19 Constant: +0:19 0.100000 +0:? Linker Objects +0:? 'anon@0' (layout( stream=0) out block{layout( stream=0) gl_Position 4-component vector of float Position gl_Position, layout( stream=0) gl_PointSize float PointSize gl_PointSize, layout( stream=0) out 7-element array of float ClipDistance gl_ClipDistance, layout( stream=0) out 2-element array of float CullDistance gl_CullDistance}) +0:? 'gl_in' ( in 3-element array of block{ in 4-component vector of float Position gl_Position, in float PointSize gl_PointSize, in 7-element array of float ClipDistance gl_ClipDistance, in 2-element array of float CullDistance gl_CullDistance, in 4-component vector of float SecondaryPositionNV gl_SecondaryPositionNV, in 1-element array of 4-component vector of float PositionPerViewNV gl_PositionPerViewNV}) + diff --git a/Test/baseResults/iomap.blockOutVariableIn.2.vert.out b/Test/baseResults/iomap.blockOutVariableIn.2.vert.out index 0b4c0ac98a..2c4ecdc5a5 100644 --- a/Test/baseResults/iomap.blockOutVariableIn.2.vert.out +++ b/Test/baseResults/iomap.blockOutVariableIn.2.vert.out @@ -255,7 +255,7 @@ output primitive = triangle_strip 0:? 'anon@0' (layout( stream=0) out block{layout( stream=0) gl_Position 4-component vector of float Position gl_Position, layout( stream=0) gl_PointSize float PointSize gl_PointSize, layout( stream=0) out 1-element array of float ClipDistance gl_ClipDistance}) // Module Version 10000 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 33 Capability Shader @@ -320,7 +320,7 @@ output primitive = triangle_strip Return FunctionEnd // Module Version 10000 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 49 Capability Geometry diff --git a/Test/baseResults/iomap.blockOutVariableIn.vert.out b/Test/baseResults/iomap.blockOutVariableIn.vert.out index dd12cbc2ad..a43e52f54b 100644 --- a/Test/baseResults/iomap.blockOutVariableIn.vert.out +++ b/Test/baseResults/iomap.blockOutVariableIn.vert.out @@ -127,7 +127,7 @@ Shader version: 440 0:? 'color' (layout( location=0) out 4-component vector of float) // Module Version 10000 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 33 Capability Shader @@ -192,7 +192,7 @@ Shader version: 440 Return FunctionEnd // Module Version 10000 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 23 Capability Shader diff --git a/Test/baseResults/iomap.crossStage.2.vert.out b/Test/baseResults/iomap.crossStage.2.vert.out index 85139cc7a3..171cc0e38c 100644 --- a/Test/baseResults/iomap.crossStage.2.vert.out +++ b/Test/baseResults/iomap.crossStage.2.vert.out @@ -407,7 +407,7 @@ Shader version: 460 0:? 'blockName2' (layout( column_major std140) uniform 2-element array of block{layout( column_major std140) uniform 4-component vector of float a, layout( column_major std140) uniform 2-component vector of float b}) // Module Version 10000 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 56 Capability Shader @@ -530,7 +530,7 @@ Shader version: 460 Return FunctionEnd // Module Version 10000 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 65 Capability Geometry @@ -659,7 +659,7 @@ Shader version: 460 Return FunctionEnd // Module Version 10000 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 62 Capability Shader diff --git a/Test/baseResults/iomap.crossStage.vert.out b/Test/baseResults/iomap.crossStage.vert.out index 13ff58c9c6..d6b6e4febb 100644 --- a/Test/baseResults/iomap.crossStage.vert.out +++ b/Test/baseResults/iomap.crossStage.vert.out @@ -264,7 +264,7 @@ Shader version: 460 0:? 'blockName2' (layout( column_major std140) uniform 2-element array of block{layout( column_major std140) uniform 4-component vector of float a, layout( column_major std140) uniform 2-component vector of float b}) // Module Version 10000 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 56 Capability Shader @@ -387,7 +387,7 @@ Shader version: 460 Return FunctionEnd // Module Version 10000 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 62 Capability Shader diff --git a/Test/baseResults/iomap.crossStage.vk.vert.out b/Test/baseResults/iomap.crossStage.vk.vert.out index 0a2eae8409..dd8029d198 100644 --- a/Test/baseResults/iomap.crossStage.vk.vert.out +++ b/Test/baseResults/iomap.crossStage.vk.vert.out @@ -381,7 +381,7 @@ gl_FragCoord origin is upper left 0:? 'blockName2' (layout( column_major std140) uniform 2-element array of block{layout( column_major std140) uniform highp 4-component vector of float a, layout( column_major std140) uniform highp 2-component vector of float b}) // Module Version 10000 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 38 Capability Shader @@ -470,7 +470,7 @@ gl_FragCoord origin is upper left Return FunctionEnd // Module Version 10000 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 57 Capability Geometry @@ -582,7 +582,7 @@ gl_FragCoord origin is upper left Return FunctionEnd // Module Version 10000 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 81 Capability Shader diff --git a/Test/baseResults/iomap.variableOutBlockIn.2.vert.out b/Test/baseResults/iomap.variableOutBlockIn.2.vert.out index 6ef7d4e32e..3e6d30b5f0 100644 --- a/Test/baseResults/iomap.variableOutBlockIn.2.vert.out +++ b/Test/baseResults/iomap.variableOutBlockIn.2.vert.out @@ -149,7 +149,7 @@ output primitive = triangle_strip 0:? 'anon@0' (layout( stream=0) out block{layout( stream=0) gl_Position 4-component vector of float Position gl_Position, layout( stream=0) gl_PointSize float PointSize gl_PointSize, layout( stream=0) out 1-element array of float ClipDistance gl_ClipDistance}) // Module Version 10000 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 29 Capability Shader @@ -208,7 +208,7 @@ output primitive = triangle_strip Return FunctionEnd // Module Version 10000 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 31 Capability Geometry diff --git a/Test/baseResults/iomap.variableOutBlockIn.vert.out b/Test/baseResults/iomap.variableOutBlockIn.vert.out index 8fef640d36..4b0ce64953 100644 --- a/Test/baseResults/iomap.variableOutBlockIn.vert.out +++ b/Test/baseResults/iomap.variableOutBlockIn.vert.out @@ -127,7 +127,7 @@ Shader version: 440 0:? 'color' (layout( location=0) out 4-component vector of float) // Module Version 10000 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 29 Capability Shader @@ -186,7 +186,7 @@ Shader version: 440 Return FunctionEnd // Module Version 10000 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 29 Capability Shader diff --git a/Test/baseResults/link.vk.inconsistentGLPerVertex.0.vert.out b/Test/baseResults/link.vk.inconsistentGLPerVertex.0.vert.out index 3d76b2f382..d3545bfae5 100755 --- a/Test/baseResults/link.vk.inconsistentGLPerVertex.0.vert.out +++ b/Test/baseResults/link.vk.inconsistentGLPerVertex.0.vert.out @@ -253,7 +253,7 @@ output primitive = triangle_strip 0:? 'gl_in' ( in 4-element array of block{ in 4-component vector of float Position gl_Position, in float PointSize gl_PointSize, in 1-element array of float ClipDistance gl_ClipDistance, in 1-element array of float CullDistance gl_CullDistance, in 4-component vector of float SecondaryPositionNV gl_SecondaryPositionNV, in 1-element array of 4-component vector of float PositionPerViewNV gl_PositionPerViewNV}) // Module Version 10000 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 30 Capability Shader diff --git a/Test/baseResults/link.vk.matchingPC.0.0.frag.out b/Test/baseResults/link.vk.matchingPC.0.0.frag.out index c434b66edc..87d3b02cf7 100644 --- a/Test/baseResults/link.vk.matchingPC.0.0.frag.out +++ b/Test/baseResults/link.vk.matchingPC.0.0.frag.out @@ -90,7 +90,7 @@ gl_FragCoord origin is upper left 0:? 'uPC' (layout( column_major std430 push_constant) uniform block{layout( column_major std430 offset=0) uniform highp 4-component vector of float color, layout( column_major std430 offset=16) uniform highp 4-component vector of float color2, layout( column_major std430 offset=32) uniform highp float scale}) // Module Version 10000 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 39 Capability Shader diff --git a/Test/baseResults/link.vk.multiBlocksValid.0.0.vert.out b/Test/baseResults/link.vk.multiBlocksValid.0.0.vert.out index 29a4df04d0..7f9a05a798 100644 --- a/Test/baseResults/link.vk.multiBlocksValid.0.0.vert.out +++ b/Test/baseResults/link.vk.multiBlocksValid.0.0.vert.out @@ -177,7 +177,7 @@ Shader version: 430 0:? 'P' ( in highp 4-component vector of float) // Module Version 10000 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 73 Capability Shader diff --git a/Test/baseResults/link.vk.multiBlocksValid.1.0.geom.out b/Test/baseResults/link.vk.multiBlocksValid.1.0.geom.out index 4005f60157..374a2a0842 100644 --- a/Test/baseResults/link.vk.multiBlocksValid.1.0.geom.out +++ b/Test/baseResults/link.vk.multiBlocksValid.1.0.geom.out @@ -263,7 +263,7 @@ output primitive = triangle_strip 0:? 'P' ( in 3-element array of highp 4-component vector of float) // Module Version 10000 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 101 Capability Geometry diff --git a/Test/baseResults/link.vk.pcNamingValid.0.0.vert.out b/Test/baseResults/link.vk.pcNamingValid.0.0.vert.out index f84877e060..410f192e14 100644 --- a/Test/baseResults/link.vk.pcNamingValid.0.0.vert.out +++ b/Test/baseResults/link.vk.pcNamingValid.0.0.vert.out @@ -109,7 +109,7 @@ Shader version: 450 0:? 'P' (layout( location=0) in highp 4-component vector of float) // Module Version 10000 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 53 Capability Shader diff --git a/Test/baseResults/link1.vk.frag.out b/Test/baseResults/link1.vk.frag.out index fa1d48ec94..225aee13e3 100644 --- a/Test/baseResults/link1.vk.frag.out +++ b/Test/baseResults/link1.vk.frag.out @@ -197,7 +197,7 @@ gl_FragCoord origin is upper left 0:? 's2D' (layout( binding=1) uniform highp sampler2D) // Module Version 10000 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 70 Capability Shader diff --git a/Test/baseResults/preprocessor.edge_cases.vert.out b/Test/baseResults/preprocessor.edge_cases.vert.out index 17d9049bfd..6a4ad4a7e1 100644 --- a/Test/baseResults/preprocessor.edge_cases.vert.out +++ b/Test/baseResults/preprocessor.edge_cases.vert.out @@ -10,7 +10,7 @@ -void main(){ +void main() { gl_Position = vec4(3 + 2 + 2 * 4 + 2 + 3 * 2); } diff --git a/Test/baseResults/preprocessor.extensions.vert.out b/Test/baseResults/preprocessor.extensions.vert.out index 57d2e199fb..59c6e8567f 100644 --- a/Test/baseResults/preprocessor.extensions.vert.out +++ b/Test/baseResults/preprocessor.extensions.vert.out @@ -7,6 +7,6 @@ #extension unknown_extension : require -int main(){ +int main() { } diff --git a/Test/baseResults/preprocessor.function_macro.vert.out b/Test/baseResults/preprocessor.function_macro.vert.out index 1280ddf644..84b0a87276 100644 --- a/Test/baseResults/preprocessor.function_macro.vert.out +++ b/Test/baseResults/preprocessor.function_macro.vert.out @@ -13,9 +13,12 @@ -int main(){ + + +int main() { gl_Position = vec4(3 + 1, 3 + 4, 3 + 1); gl_Position = vec4(1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10 + 11 + 12); gl_Position = vec4(4 + 3 + 3); + gl_Position = 4 + 3 + F.a; } diff --git a/Test/baseResults/preprocessor.line.frag.out b/Test/baseResults/preprocessor.line.frag.out index 3e2206f888..76877943ca 100644 --- a/Test/baseResults/preprocessor.line.frag.out +++ b/Test/baseResults/preprocessor.line.frag.out @@ -1,5 +1,5 @@ #version 310 es #line 1 2 #pragma something -void main(){ } +void main() { } diff --git a/Test/baseResults/preprocessor.line.vert.out b/Test/baseResults/preprocessor.line.vert.out index 2bf0903277..fbd851cb2d 100644 --- a/Test/baseResults/preprocessor.line.vert.out +++ b/Test/baseResults/preprocessor.line.vert.out @@ -23,7 +23,7 @@ #line 8 -void main(){ +void main() { gl_Position = vec4(10); } diff --git a/Test/baseResults/preprocessor.pragma.vert.out b/Test/baseResults/preprocessor.pragma.vert.out index ebe1e4a749..8fa3d338da 100644 --- a/Test/baseResults/preprocessor.pragma.vert.out +++ b/Test/baseResults/preprocessor.pragma.vert.out @@ -9,6 +9,6 @@ #pragma once -int main(){ +int main() { } diff --git a/Test/baseResults/preprocessor.simple.vert.out b/Test/baseResults/preprocessor.simple.vert.out index 57b020c676..b54e0a0042 100644 --- a/Test/baseResults/preprocessor.simple.vert.out +++ b/Test/baseResults/preprocessor.simple.vert.out @@ -11,15 +11,15 @@ - float fn(float x){ return x + 4.0;} + float fn(float x) { return x + 4.0; } -int main(){ +int main() { gl_Position = vec4(1); gl_Position = clamp(1, 2, 3); gl_Position = vec4(1); gl_Position = vec4(1, 2); gl_Position = vec4(fn(3)); - []. ++ -- + [].++ -- + - * % / - ! ~ << >> < > <= >= == != @@ -46,16 +46,21 @@ struct S { +void bar(int x) { } + void foo() { S s; - s . member2 + s . member1; - s . member3 . zyx; - s . member2 . xxyz; - s . member2 . yyz; - s . member2 . xxyz(); - s . member2 . yzy; - vec3 a = vec3(0);vec3 b = a . zxyz;vec3 b = a . xxyz;vec3 b = a . yyz;vec3 b = a . xxyz();vec3 b = a . yzy;vec3 b = a . z; + s.member2 + s.member1; + s.member3.zyx; + s.member2.xxyz; + s.member2.yyz; + s.member2.xxyz(); + s.member2.yzy; + for (int i = 0; i < 100; i = i + 1) { + bar(i) + } + vec3 a = vec3(0); vec3 b = a.zxyz; vec3 b = a.xxyz; vec3 b = a.yyz; vec3 b = a.xxyz(); vec3 b = a.yzy; vec3 b = a.z; yyz; diff --git a/Test/baseResults/preprocessor.success_if_parse_would_fail.vert.out b/Test/baseResults/preprocessor.success_if_parse_would_fail.vert.out index 624813a01d..ed1ad0c0ee 100644 --- a/Test/baseResults/preprocessor.success_if_parse_would_fail.vert.out +++ b/Test/baseResults/preprocessor.success_if_parse_would_fail.vert.out @@ -1,4 +1,4 @@ -int x(){ +int x() { something that shouldnt compile; } diff --git a/Test/baseResults/rayQuery-OpConvertUToAccelerationStructureKHR.comp.out b/Test/baseResults/rayQuery-OpConvertUToAccelerationStructureKHR.comp.out index 44e89699bd..007dcb9080 100644 --- a/Test/baseResults/rayQuery-OpConvertUToAccelerationStructureKHR.comp.out +++ b/Test/baseResults/rayQuery-OpConvertUToAccelerationStructureKHR.comp.out @@ -1,6 +1,6 @@ rayQuery-OpConvertUToAccelerationStructureKHR.comp // Module Version 10000 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 28 Capability Shader diff --git a/Test/baseResults/rayQuery-allOps.comp.out b/Test/baseResults/rayQuery-allOps.comp.out index bf654f7798..a84d91962f 100644 --- a/Test/baseResults/rayQuery-allOps.comp.out +++ b/Test/baseResults/rayQuery-allOps.comp.out @@ -1,12 +1,14 @@ rayQuery-allOps.comp // Module Version 10000 -// Generated by (magic number): 8000a -// Id's are bound by 258 +// Generated by (magic number): 8000b +// Id's are bound by 275 Capability Shader Capability RayQueryKHR Capability RayTraversalPrimitiveCullingKHR + Capability RayQueryPositionFetchKHR Extension "SPV_KHR_ray_query" + Extension "SPV_KHR_ray_tracing_position_fetch" 1: ExtInstImport "GLSL.std.450" MemoryModel Logical GLSL450 EntryPoint GLCompute 4 "main" @@ -14,6 +16,7 @@ rayQuery-allOps.comp Source GLSL 460 SourceExtension "GL_EXT_ray_flags_primitive_culling" SourceExtension "GL_EXT_ray_query" + SourceExtension "GL_EXT_ray_tracing_position_fetch" Name 4 "main" Name 6 "doSomething(" Name 10 "Ray" @@ -35,16 +38,17 @@ rayQuery-allOps.comp Name 83 "_mat3x4" Name 143 "t" Name 156 "committedStatus" - Name 241 "o" - Name 243 "d" - Name 253 "Ray" - MemberName 253(Ray) 0 "pos" - MemberName 253(Ray) 1 "tmin" - MemberName 253(Ray) 2 "dir" - MemberName 253(Ray) 3 "tmax" - Name 255 "Rays" - MemberName 255(Rays) 0 "rays" - Name 257 "" + Name 184 "positions" + Name 258 "o" + Name 260 "d" + Name 270 "Ray" + MemberName 270(Ray) 0 "pos" + MemberName 270(Ray) 1 "tmin" + MemberName 270(Ray) 2 "dir" + MemberName 270(Ray) 3 "tmax" + Name 272 "Rays" + MemberName 272(Rays) 0 "rays" + Name 274 "" MemberDecorate 15(Log) 0 Offset 0 MemberDecorate 15(Log) 1 Offset 4 Decorate 15(Log) BufferBlock @@ -52,15 +56,15 @@ rayQuery-allOps.comp Decorate 17 Binding 0 Decorate 50(rtas) DescriptorSet 0 Decorate 50(rtas) Binding 1 - MemberDecorate 253(Ray) 0 Offset 0 - MemberDecorate 253(Ray) 1 Offset 12 - MemberDecorate 253(Ray) 2 Offset 16 - MemberDecorate 253(Ray) 3 Offset 28 - Decorate 254 ArrayStride 32 - MemberDecorate 255(Rays) 0 Offset 0 - Decorate 255(Rays) BufferBlock - Decorate 257 DescriptorSet 0 - Decorate 257 Binding 2 + MemberDecorate 270(Ray) 0 Offset 0 + MemberDecorate 270(Ray) 1 Offset 12 + MemberDecorate 270(Ray) 2 Offset 16 + MemberDecorate 270(Ray) 3 Offset 28 + Decorate 271 ArrayStride 32 + MemberDecorate 272(Rays) 0 Offset 0 + Decorate 272(Rays) BufferBlock + Decorate 274 DescriptorSet 0 + Decorate 274 Binding 2 2: TypeVoid 3: TypeFunction 2 8: TypeFloat 32 @@ -105,13 +109,16 @@ rayQuery-allOps.comp 91: TypeVector 8(float) 2 144: 8(float) Constant 1056964608 175: 14(int) Constant 1 - 198: 14(int) Constant 2 - 231: 14(int) Constant 256 - 253(Ray): TypeStruct 9(fvec3) 8(float) 9(fvec3) 8(float) - 254: TypeRuntimeArray 253(Ray) - 255(Rays): TypeStruct 254 - 256: TypePointer Uniform 255(Rays) - 257: 256(ptr) Variable Uniform + 181: 14(int) Constant 3 + 182: TypeArray 9(fvec3) 181 + 183: TypePointer Function 182 + 215: 14(int) Constant 2 + 248: 14(int) Constant 256 + 270(Ray): TypeStruct 9(fvec3) 8(float) 9(fvec3) 8(float) + 271: TypeRuntimeArray 270(Ray) + 272(Rays): TypeStruct 271 + 273: TypePointer Uniform 272(Rays) + 274: 273(ptr) Variable Uniform 4(main): 2 Function None 3 5: Label 43(ray): 25(ptr) Variable Function @@ -120,8 +127,9 @@ rayQuery-allOps.comp 83(_mat3x4): 82(ptr) Variable Function 143(t): 35(ptr) Variable Function 156(committedStatus): 68(ptr) Variable Function - 241(o): 29(ptr) Variable Function - 243(d): 29(ptr) Variable Function + 184(positions): 183(ptr) Variable Function + 258(o): 29(ptr) Variable Function + 260(d): 29(ptr) Variable Function 44: 10(Ray) FunctionCall 12(makeRayDesc() Store 43(ray) 44 51: 48 Load 50(rtas) @@ -303,110 +311,130 @@ rayQuery-allOps.comp 180: 2 FunctionCall 6(doSomething() Branch 179 179: Label - Branch 162 - 161: Label - 182: 18(int) RayQueryGetIntersectionGeometryIndexKHR 47(rayQuery) 23 - 183: 66(bool) SGreaterThan 182 19 - SelectionMerge 185 None - BranchConditional 183 184 185 - 184: Label - 186: 2 FunctionCall 6(doSomething() - Branch 185 - 185: Label - 187: 18(int) RayQueryGetIntersectionInstanceIdKHR 47(rayQuery) 23 - 188: 66(bool) SGreaterThan 187 19 + 185: 182 RayQueryGetIntersectionTriangleVertexPositionsKHR 47(rayQuery) 23 + Store 184(positions) 185 + 186: 35(ptr) AccessChain 184(positions) 19 20 + 187: 8(float) Load 186 + 188: 66(bool) FOrdLessThan 187 27 SelectionMerge 190 None BranchConditional 188 189 190 189: Label - 191: 2 FunctionCall 6(doSomething() + 191: 35(ptr) AccessChain 184(positions) 31 175 + 192: 8(float) Load 191 + 193: 66(bool) FOrdGreaterThan 192 27 Branch 190 190: Label - 192: 18(int) RayQueryGetIntersectionInstanceCustomIndexKHR 47(rayQuery) 23 - 193: 66(bool) SGreaterThan 192 19 - SelectionMerge 195 None - BranchConditional 193 194 195 - 194: Label - 196: 2 FunctionCall 6(doSomething() - Branch 195 - 195: Label - 197: 9(fvec3) RayQueryGetIntersectionObjectRayDirectionKHR 47(rayQuery) 23 - 199: 8(float) CompositeExtract 197 2 - 200: 66(bool) FOrdGreaterThan 199 27 + 194: 66(bool) Phi 188 179 193 189 + SelectionMerge 196 None + BranchConditional 194 195 196 + 195: Label + 197: 2 FunctionCall 6(doSomething() + Branch 196 + 196: Label + Branch 162 + 161: Label + 199: 18(int) RayQueryGetIntersectionGeometryIndexKHR 47(rayQuery) 23 + 200: 66(bool) SGreaterThan 199 19 SelectionMerge 202 None BranchConditional 200 201 202 201: Label 203: 2 FunctionCall 6(doSomething() Branch 202 202: Label - 204: 9(fvec3) RayQueryGetIntersectionObjectRayOriginKHR 47(rayQuery) 23 - 205: 8(float) CompositeExtract 204 0 - 206: 66(bool) FOrdGreaterThan 205 27 - SelectionMerge 208 None - BranchConditional 206 207 208 - 207: Label - 209: 2 FunctionCall 6(doSomething() - Branch 208 - 208: Label - 210: 18(int) RayQueryGetIntersectionPrimitiveIndexKHR 47(rayQuery) 23 - 211: 66(bool) SGreaterThan 210 19 - SelectionMerge 213 None - BranchConditional 211 212 213 - 212: Label - 214: 2 FunctionCall 6(doSomething() - Branch 213 - 213: Label - 215: 8(float) RayQueryGetIntersectionTKHR 47(rayQuery) 23 - 216: 66(bool) FOrdGreaterThan 215 27 - SelectionMerge 218 None - BranchConditional 216 217 218 - 217: Label - 219: 2 FunctionCall 6(doSomething() - Branch 218 - 218: Label + 204: 18(int) RayQueryGetIntersectionInstanceIdKHR 47(rayQuery) 23 + 205: 66(bool) SGreaterThan 204 19 + SelectionMerge 207 None + BranchConditional 205 206 207 + 206: Label + 208: 2 FunctionCall 6(doSomething() + Branch 207 + 207: Label + 209: 18(int) RayQueryGetIntersectionInstanceCustomIndexKHR 47(rayQuery) 23 + 210: 66(bool) SGreaterThan 209 19 + SelectionMerge 212 None + BranchConditional 210 211 212 + 211: Label + 213: 2 FunctionCall 6(doSomething() + Branch 212 + 212: Label + 214: 9(fvec3) RayQueryGetIntersectionObjectRayDirectionKHR 47(rayQuery) 23 + 216: 8(float) CompositeExtract 214 2 + 217: 66(bool) FOrdGreaterThan 216 27 + SelectionMerge 219 None + BranchConditional 217 218 219 + 218: Label + 220: 2 FunctionCall 6(doSomething() + Branch 219 + 219: Label + 221: 9(fvec3) RayQueryGetIntersectionObjectRayOriginKHR 47(rayQuery) 23 + 222: 8(float) CompositeExtract 221 0 + 223: 66(bool) FOrdGreaterThan 222 27 + SelectionMerge 225 None + BranchConditional 223 224 225 + 224: Label + 226: 2 FunctionCall 6(doSomething() + Branch 225 + 225: Label + 227: 18(int) RayQueryGetIntersectionPrimitiveIndexKHR 47(rayQuery) 23 + 228: 66(bool) SGreaterThan 227 19 + SelectionMerge 230 None + BranchConditional 228 229 230 + 229: Label + 231: 2 FunctionCall 6(doSomething() + Branch 230 + 230: Label + 232: 8(float) RayQueryGetIntersectionTKHR 47(rayQuery) 23 + 233: 66(bool) FOrdGreaterThan 232 27 + SelectionMerge 235 None + BranchConditional 233 234 235 + 234: Label + 236: 2 FunctionCall 6(doSomething() + Branch 235 + 235: Label Branch 162 162: Label - 222: 35(ptr) AccessChain 83(_mat3x4) 19 20 - 223: 8(float) Load 222 - 224: 35(ptr) AccessChain 78(_mat4x3) 19 20 - 225: 8(float) Load 224 - 226: 66(bool) FOrdEqual 223 225 - SelectionMerge 228 None - BranchConditional 226 227 228 - 227: Label - 229: 2 FunctionCall 6(doSomething() - Branch 228 - 228: Label - 230: 14(int) RayQueryGetRayFlagsKHR 47(rayQuery) - 232: 66(bool) UGreaterThan 230 231 - SelectionMerge 234 None - BranchConditional 232 233 234 - 233: Label - 235: 2 FunctionCall 6(doSomething() - Branch 234 - 234: Label - 236: 8(float) RayQueryGetRayTMinKHR 47(rayQuery) - 237: 66(bool) FOrdGreaterThan 236 27 - SelectionMerge 239 None - BranchConditional 237 238 239 - 238: Label - 240: 2 FunctionCall 6(doSomething() - Branch 239 - 239: Label - 242: 9(fvec3) RayQueryGetWorldRayOriginKHR 47(rayQuery) - Store 241(o) 242 - 244: 9(fvec3) RayQueryGetWorldRayDirectionKHR 47(rayQuery) - Store 243(d) 244 - 245: 35(ptr) AccessChain 241(o) 20 - 246: 8(float) Load 245 - 247: 35(ptr) AccessChain 243(d) 198 - 248: 8(float) Load 247 - 249: 66(bool) FOrdEqual 246 248 + 239: 35(ptr) AccessChain 83(_mat3x4) 19 20 + 240: 8(float) Load 239 + 241: 35(ptr) AccessChain 78(_mat4x3) 19 20 + 242: 8(float) Load 241 + 243: 66(bool) FOrdEqual 240 242 + SelectionMerge 245 None + BranchConditional 243 244 245 + 244: Label + 246: 2 FunctionCall 6(doSomething() + Branch 245 + 245: Label + 247: 14(int) RayQueryGetRayFlagsKHR 47(rayQuery) + 249: 66(bool) UGreaterThan 247 248 SelectionMerge 251 None BranchConditional 249 250 251 250: Label 252: 2 FunctionCall 6(doSomething() Branch 251 251: Label + 253: 8(float) RayQueryGetRayTMinKHR 47(rayQuery) + 254: 66(bool) FOrdGreaterThan 253 27 + SelectionMerge 256 None + BranchConditional 254 255 256 + 255: Label + 257: 2 FunctionCall 6(doSomething() + Branch 256 + 256: Label + 259: 9(fvec3) RayQueryGetWorldRayOriginKHR 47(rayQuery) + Store 258(o) 259 + 261: 9(fvec3) RayQueryGetWorldRayDirectionKHR 47(rayQuery) + Store 260(d) 261 + 262: 35(ptr) AccessChain 258(o) 20 + 263: 8(float) Load 262 + 264: 35(ptr) AccessChain 260(d) 215 + 265: 8(float) Load 264 + 266: 66(bool) FOrdEqual 263 265 + SelectionMerge 268 None + BranchConditional 266 267 268 + 267: Label + 269: 2 FunctionCall 6(doSomething() + Branch 268 + 268: Label Return FunctionEnd 6(doSomething(): 2 Function None 3 diff --git a/Test/baseResults/rayQuery-allOps.frag.out b/Test/baseResults/rayQuery-allOps.frag.out index 90ebc4a285..19a6171149 100644 --- a/Test/baseResults/rayQuery-allOps.frag.out +++ b/Test/baseResults/rayQuery-allOps.frag.out @@ -1,6 +1,6 @@ rayQuery-allOps.frag // Module Version 10000 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 257 Capability Shader diff --git a/Test/baseResults/rayQuery-allOps.rgen.out b/Test/baseResults/rayQuery-allOps.rgen.out index b3a93b025c..67447b9e6d 100644 --- a/Test/baseResults/rayQuery-allOps.rgen.out +++ b/Test/baseResults/rayQuery-allOps.rgen.out @@ -1,6 +1,6 @@ rayQuery-allOps.rgen // Module Version 10000 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 257 Capability RayQueryKHR diff --git a/Test/baseResults/rayQuery-global.rgen.out b/Test/baseResults/rayQuery-global.rgen.out index 7b05173599..968a178bc0 100644 --- a/Test/baseResults/rayQuery-global.rgen.out +++ b/Test/baseResults/rayQuery-global.rgen.out @@ -1,6 +1,6 @@ rayQuery-global.rgen // Module Version 10000 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 44 Capability RayQueryKHR diff --git a/Test/baseResults/rayQuery-initialize.rgen.out b/Test/baseResults/rayQuery-initialize.rgen.out index f16facd5ab..dc213c5bfe 100644 --- a/Test/baseResults/rayQuery-initialize.rgen.out +++ b/Test/baseResults/rayQuery-initialize.rgen.out @@ -1,6 +1,6 @@ rayQuery-initialize.rgen // Module Version 10000 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 103 Capability RayQueryKHR diff --git a/Test/baseResults/rayQuery-no-cse.rgen.out b/Test/baseResults/rayQuery-no-cse.rgen.out index a44c41f14c..0a751a3c71 100644 --- a/Test/baseResults/rayQuery-no-cse.rgen.out +++ b/Test/baseResults/rayQuery-no-cse.rgen.out @@ -1,6 +1,6 @@ rayQuery-no-cse.rgen // Module Version 10000 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 107 Capability RayQueryKHR diff --git a/Test/baseResults/rayQuery-types.comp.out b/Test/baseResults/rayQuery-types.comp.out index 87a1d68352..bb7ed7bc3c 100644 --- a/Test/baseResults/rayQuery-types.comp.out +++ b/Test/baseResults/rayQuery-types.comp.out @@ -1,6 +1,6 @@ rayQuery-types.comp // Module Version 10000 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 86 Capability Shader diff --git a/Test/baseResults/rayQuery.rgen.out b/Test/baseResults/rayQuery.rgen.out index 06a1a5a855..4a54973ce6 100644 --- a/Test/baseResults/rayQuery.rgen.out +++ b/Test/baseResults/rayQuery.rgen.out @@ -1,6 +1,6 @@ rayQuery.rgen // Module Version 10000 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 44 Capability RayQueryKHR diff --git a/Test/baseResults/remap.basic.dcefunc.frag.out b/Test/baseResults/remap.basic.dcefunc.frag.out index c531eba4ce..f5c9a71aa4 100644 --- a/Test/baseResults/remap.basic.dcefunc.frag.out +++ b/Test/baseResults/remap.basic.dcefunc.frag.out @@ -1,6 +1,6 @@ remap.basic.dcefunc.frag // Module Version 10000 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 22 Capability Shader diff --git a/Test/baseResults/remap.basic.everything.frag.out b/Test/baseResults/remap.basic.everything.frag.out index d483f20e3a..6c73e595b1 100644 --- a/Test/baseResults/remap.basic.everything.frag.out +++ b/Test/baseResults/remap.basic.everything.frag.out @@ -1,6 +1,6 @@ remap.basic.everything.frag // Module Version 10000 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 24969 Capability Shader diff --git a/Test/baseResults/remap.basic.none.frag.out b/Test/baseResults/remap.basic.none.frag.out index 34f64c8b71..3cff65b659 100644 --- a/Test/baseResults/remap.basic.none.frag.out +++ b/Test/baseResults/remap.basic.none.frag.out @@ -1,6 +1,6 @@ remap.basic.none.frag // Module Version 10000 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 22 Capability Shader diff --git a/Test/baseResults/remap.basic.strip.frag.out b/Test/baseResults/remap.basic.strip.frag.out index f1d77691e7..030877ddaf 100644 --- a/Test/baseResults/remap.basic.strip.frag.out +++ b/Test/baseResults/remap.basic.strip.frag.out @@ -1,6 +1,6 @@ remap.basic.strip.frag // Module Version 10000 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 22 Capability Shader diff --git a/Test/baseResults/remap.hlsl.sample.basic.everything.frag.out b/Test/baseResults/remap.hlsl.sample.basic.everything.frag.out index 88c516fb01..b1ce523bc6 100644 --- a/Test/baseResults/remap.hlsl.sample.basic.everything.frag.out +++ b/Test/baseResults/remap.hlsl.sample.basic.everything.frag.out @@ -2,7 +2,7 @@ remap.hlsl.sample.basic.everything.frag WARNING: 0:4: 'immediate sampler state' : unimplemented // Module Version 10000 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 24878 Capability Shader diff --git a/Test/baseResults/remap.hlsl.sample.basic.none.frag.out b/Test/baseResults/remap.hlsl.sample.basic.none.frag.out index 465b02409a..13ac4f2695 100644 --- a/Test/baseResults/remap.hlsl.sample.basic.none.frag.out +++ b/Test/baseResults/remap.hlsl.sample.basic.none.frag.out @@ -2,7 +2,7 @@ remap.hlsl.sample.basic.none.frag WARNING: 0:4: 'immediate sampler state' : unimplemented // Module Version 10000 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 198 Capability Shader diff --git a/Test/baseResults/remap.hlsl.sample.basic.strip.frag.out b/Test/baseResults/remap.hlsl.sample.basic.strip.frag.out index 4fb92182e7..d861a43677 100644 --- a/Test/baseResults/remap.hlsl.sample.basic.strip.frag.out +++ b/Test/baseResults/remap.hlsl.sample.basic.strip.frag.out @@ -2,7 +2,7 @@ remap.hlsl.sample.basic.strip.frag WARNING: 0:4: 'immediate sampler state' : unimplemented // Module Version 10000 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 198 Capability Shader diff --git a/Test/baseResults/remap.hlsl.templatetypes.everything.frag.out b/Test/baseResults/remap.hlsl.templatetypes.everything.frag.out index f1e353556b..22acbadc8e 100644 --- a/Test/baseResults/remap.hlsl.templatetypes.everything.frag.out +++ b/Test/baseResults/remap.hlsl.templatetypes.everything.frag.out @@ -1,6 +1,6 @@ remap.hlsl.templatetypes.everything.frag // Module Version 10000 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 24954 Capability Shader diff --git a/Test/baseResults/remap.hlsl.templatetypes.none.frag.out b/Test/baseResults/remap.hlsl.templatetypes.none.frag.out index 226f2c6ee2..7e653a12ac 100644 --- a/Test/baseResults/remap.hlsl.templatetypes.none.frag.out +++ b/Test/baseResults/remap.hlsl.templatetypes.none.frag.out @@ -1,6 +1,6 @@ remap.hlsl.templatetypes.none.frag // Module Version 10000 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 160 Capability Shader diff --git a/Test/baseResults/remap.if.everything.frag.out b/Test/baseResults/remap.if.everything.frag.out index 3a521be987..e7e73696d8 100644 --- a/Test/baseResults/remap.if.everything.frag.out +++ b/Test/baseResults/remap.if.everything.frag.out @@ -1,6 +1,6 @@ remap.if.everything.frag // Module Version 10000 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 22855 Capability Shader diff --git a/Test/baseResults/remap.if.none.frag.out b/Test/baseResults/remap.if.none.frag.out index cb2d31b024..d239492c8b 100644 --- a/Test/baseResults/remap.if.none.frag.out +++ b/Test/baseResults/remap.if.none.frag.out @@ -1,6 +1,6 @@ remap.if.none.frag // Module Version 10000 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 25 Capability Shader diff --git a/Test/baseResults/remap.similar_1a.everything.frag.out b/Test/baseResults/remap.similar_1a.everything.frag.out index 993dc1c157..6de9cb9213 100644 --- a/Test/baseResults/remap.similar_1a.everything.frag.out +++ b/Test/baseResults/remap.similar_1a.everything.frag.out @@ -1,6 +1,6 @@ remap.similar_1a.everything.frag // Module Version 10000 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 24916 Capability Shader diff --git a/Test/baseResults/remap.similar_1a.none.frag.out b/Test/baseResults/remap.similar_1a.none.frag.out index e46b8e19cb..682344815a 100644 --- a/Test/baseResults/remap.similar_1a.none.frag.out +++ b/Test/baseResults/remap.similar_1a.none.frag.out @@ -1,6 +1,6 @@ remap.similar_1a.none.frag // Module Version 10000 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 86 Capability Shader diff --git a/Test/baseResults/remap.similar_1b.everything.frag.out b/Test/baseResults/remap.similar_1b.everything.frag.out index ffe5446360..86e5ac75ea 100644 --- a/Test/baseResults/remap.similar_1b.everything.frag.out +++ b/Test/baseResults/remap.similar_1b.everything.frag.out @@ -1,6 +1,6 @@ remap.similar_1b.everything.frag // Module Version 10000 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 24916 Capability Shader diff --git a/Test/baseResults/remap.similar_1b.none.frag.out b/Test/baseResults/remap.similar_1b.none.frag.out index 5f5241c398..2433820414 100644 --- a/Test/baseResults/remap.similar_1b.none.frag.out +++ b/Test/baseResults/remap.similar_1b.none.frag.out @@ -1,6 +1,6 @@ remap.similar_1b.none.frag // Module Version 10000 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 91 Capability Shader diff --git a/Test/baseResults/remap.specconst.comp.out b/Test/baseResults/remap.specconst.comp.out index 2bed3cfe77..905d85b3a9 100644 --- a/Test/baseResults/remap.specconst.comp.out +++ b/Test/baseResults/remap.specconst.comp.out @@ -1,6 +1,6 @@ remap.specconst.comp // Module Version 10000 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 16104 Capability Shader diff --git a/Test/baseResults/remap.switch.everything.frag.out b/Test/baseResults/remap.switch.everything.frag.out index 443fe685c6..d257093679 100644 --- a/Test/baseResults/remap.switch.everything.frag.out +++ b/Test/baseResults/remap.switch.everything.frag.out @@ -3,7 +3,7 @@ WARNING: 0:5: '' : all default precisions are highp; use precision statements to "precision mediump int; precision highp float;" // Module Version 10000 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 23990 Capability Shader diff --git a/Test/baseResults/remap.switch.none.frag.out b/Test/baseResults/remap.switch.none.frag.out index 3347dce0de..53d2739594 100644 --- a/Test/baseResults/remap.switch.none.frag.out +++ b/Test/baseResults/remap.switch.none.frag.out @@ -3,7 +3,7 @@ WARNING: 0:5: '' : all default precisions are highp; use precision statements to "precision mediump int; precision highp float;" // Module Version 10000 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 48 Capability Shader diff --git a/Test/baseResults/remap.uniformarray.everything.frag.out b/Test/baseResults/remap.uniformarray.everything.frag.out index ee1daa756a..902b597af4 100644 --- a/Test/baseResults/remap.uniformarray.everything.frag.out +++ b/Test/baseResults/remap.uniformarray.everything.frag.out @@ -1,6 +1,6 @@ remap.uniformarray.everything.frag // Module Version 10000 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 25030 Capability Shader diff --git a/Test/baseResults/remap.uniformarray.none.frag.out b/Test/baseResults/remap.uniformarray.none.frag.out index 00e1f57ea3..cc4fc7db89 100644 --- a/Test/baseResults/remap.uniformarray.none.frag.out +++ b/Test/baseResults/remap.uniformarray.none.frag.out @@ -1,6 +1,6 @@ remap.uniformarray.none.frag // Module Version 10000 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 60 Capability Shader diff --git a/Test/baseResults/size b/Test/baseResults/size index a7b99b9692..747b1e7120 100644 --- a/Test/baseResults/size +++ b/Test/baseResults/size @@ -1 +1 @@ -399360 ../build/install/bin/glslangValidator.exe +399360 ../build/install/bin/glslang.exe diff --git a/Test/baseResults/spv.1.3.8bitstorage-ssbo.vert.out b/Test/baseResults/spv.1.3.8bitstorage-ssbo.vert.out index d512639422..858a0dbeaf 100644 --- a/Test/baseResults/spv.1.3.8bitstorage-ssbo.vert.out +++ b/Test/baseResults/spv.1.3.8bitstorage-ssbo.vert.out @@ -1,6 +1,6 @@ spv.1.3.8bitstorage-ssbo.vert // Module Version 10300 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 28 Capability Shader diff --git a/Test/baseResults/spv.1.3.8bitstorage-ubo.vert.out b/Test/baseResults/spv.1.3.8bitstorage-ubo.vert.out index 1dce1ea098..e7ec5ed3af 100644 --- a/Test/baseResults/spv.1.3.8bitstorage-ubo.vert.out +++ b/Test/baseResults/spv.1.3.8bitstorage-ubo.vert.out @@ -1,6 +1,6 @@ spv.1.3.8bitstorage-ubo.vert // Module Version 10300 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 29 Capability Shader diff --git a/Test/baseResults/spv.1.3.coopmat.comp.out b/Test/baseResults/spv.1.3.coopmat.comp.out index d7a9d5ecd2..6b15772db9 100644 --- a/Test/baseResults/spv.1.3.coopmat.comp.out +++ b/Test/baseResults/spv.1.3.coopmat.comp.out @@ -1,6 +1,6 @@ spv.1.3.coopmat.comp // Module Version 10300 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 52 Capability Shader diff --git a/Test/baseResults/spv.1.4.LoopControl.frag.out b/Test/baseResults/spv.1.4.LoopControl.frag.out index 0ffffd6089..c3330fce0a 100644 --- a/Test/baseResults/spv.1.4.LoopControl.frag.out +++ b/Test/baseResults/spv.1.4.LoopControl.frag.out @@ -3,7 +3,7 @@ WARNING: 0:15: 'min_iterations' : expected a single integer argument WARNING: 0:15: 'max_iterations' : expected a single integer argument // Module Version 10400 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 54 Capability Shader diff --git a/Test/baseResults/spv.1.4.NonWritable.frag.out b/Test/baseResults/spv.1.4.NonWritable.frag.out index da3b52c220..d2b76b874f 100644 --- a/Test/baseResults/spv.1.4.NonWritable.frag.out +++ b/Test/baseResults/spv.1.4.NonWritable.frag.out @@ -1,6 +1,6 @@ spv.1.4.NonWritable.frag // Module Version 10400 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 38 Capability Shader diff --git a/Test/baseResults/spv.1.4.OpCopyLogical.comp.out b/Test/baseResults/spv.1.4.OpCopyLogical.comp.out index 018fd0a708..ad0397b319 100644 --- a/Test/baseResults/spv.1.4.OpCopyLogical.comp.out +++ b/Test/baseResults/spv.1.4.OpCopyLogical.comp.out @@ -1,6 +1,6 @@ spv.1.4.OpCopyLogical.comp // Module Version 10400 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 65 Capability Shader diff --git a/Test/baseResults/spv.1.4.OpCopyLogical.funcall.frag.out b/Test/baseResults/spv.1.4.OpCopyLogical.funcall.frag.out index a2458bafe6..850ee91571 100644 --- a/Test/baseResults/spv.1.4.OpCopyLogical.funcall.frag.out +++ b/Test/baseResults/spv.1.4.OpCopyLogical.funcall.frag.out @@ -1,6 +1,6 @@ spv.1.4.OpCopyLogical.funcall.frag // Module Version 10400 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 59 Capability Shader diff --git a/Test/baseResults/spv.1.4.OpCopyLogicalBool.comp.out b/Test/baseResults/spv.1.4.OpCopyLogicalBool.comp.out index 7dcda62cae..7b52595995 100644 --- a/Test/baseResults/spv.1.4.OpCopyLogicalBool.comp.out +++ b/Test/baseResults/spv.1.4.OpCopyLogicalBool.comp.out @@ -1,6 +1,6 @@ spv.1.4.OpCopyLogicalBool.comp // Module Version 10400 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 135 Capability Shader diff --git a/Test/baseResults/spv.1.4.OpEntryPoint.frag.out b/Test/baseResults/spv.1.4.OpEntryPoint.frag.out index e43e954e66..f37b0fdfd4 100644 --- a/Test/baseResults/spv.1.4.OpEntryPoint.frag.out +++ b/Test/baseResults/spv.1.4.OpEntryPoint.frag.out @@ -1,6 +1,6 @@ spv.1.4.OpEntryPoint.frag // Module Version 10400 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 64 Capability Shader diff --git a/Test/baseResults/spv.1.4.OpEntryPoint.opaqueParams.vert.out b/Test/baseResults/spv.1.4.OpEntryPoint.opaqueParams.vert.out index 835ab13b5d..dff799f078 100644 --- a/Test/baseResults/spv.1.4.OpEntryPoint.opaqueParams.vert.out +++ b/Test/baseResults/spv.1.4.OpEntryPoint.opaqueParams.vert.out @@ -1,6 +1,6 @@ spv.1.4.OpEntryPoint.opaqueParams.vert // Module Version 10400 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 45 Capability Shader diff --git a/Test/baseResults/spv.1.4.OpSelect.frag.out b/Test/baseResults/spv.1.4.OpSelect.frag.out index b3a5b4d25c..42f2ca70d4 100644 --- a/Test/baseResults/spv.1.4.OpSelect.frag.out +++ b/Test/baseResults/spv.1.4.OpSelect.frag.out @@ -1,6 +1,6 @@ spv.1.4.OpSelect.frag // Module Version 10400 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 98 Capability Shader diff --git a/Test/baseResults/spv.1.4.constructComposite.comp.out b/Test/baseResults/spv.1.4.constructComposite.comp.out index cbec381710..e896cf805c 100644 --- a/Test/baseResults/spv.1.4.constructComposite.comp.out +++ b/Test/baseResults/spv.1.4.constructComposite.comp.out @@ -1,6 +1,6 @@ spv.1.4.constructComposite.comp // Module Version 10400 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 27 Capability Shader diff --git a/Test/baseResults/spv.1.4.funcall.array.frag.out b/Test/baseResults/spv.1.4.funcall.array.frag.out index d976bb1f47..6a23f2aa90 100644 --- a/Test/baseResults/spv.1.4.funcall.array.frag.out +++ b/Test/baseResults/spv.1.4.funcall.array.frag.out @@ -1,6 +1,6 @@ spv.1.4.funcall.array.frag // Module Version 10400 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 42 Capability Shader diff --git a/Test/baseResults/spv.1.4.image.frag.out b/Test/baseResults/spv.1.4.image.frag.out index fadde9752c..059ed196a1 100644 --- a/Test/baseResults/spv.1.4.image.frag.out +++ b/Test/baseResults/spv.1.4.image.frag.out @@ -1,6 +1,6 @@ spv.1.4.image.frag // Module Version 10400 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 104 Capability Shader diff --git a/Test/baseResults/spv.1.4.load.bool.array.interface.block.frag.out b/Test/baseResults/spv.1.4.load.bool.array.interface.block.frag.out index 9f698db880..fea83ab389 100644 --- a/Test/baseResults/spv.1.4.load.bool.array.interface.block.frag.out +++ b/Test/baseResults/spv.1.4.load.bool.array.interface.block.frag.out @@ -1,7 +1,7 @@ spv.1.4.load.bool.array.interface.block.frag Validation failed // Module Version 10400 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 64 Capability Shader diff --git a/Test/baseResults/spv.1.4.sparseTexture.frag.out b/Test/baseResults/spv.1.4.sparseTexture.frag.out index 965f4c8d7c..a26ae66e0d 100644 --- a/Test/baseResults/spv.1.4.sparseTexture.frag.out +++ b/Test/baseResults/spv.1.4.sparseTexture.frag.out @@ -1,6 +1,6 @@ spv.1.4.sparseTexture.frag // Module Version 10400 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 213 Capability Shader diff --git a/Test/baseResults/spv.1.4.texture.frag.out b/Test/baseResults/spv.1.4.texture.frag.out index ac9f72fba7..6d28e1f042 100644 --- a/Test/baseResults/spv.1.4.texture.frag.out +++ b/Test/baseResults/spv.1.4.texture.frag.out @@ -1,6 +1,6 @@ spv.1.4.texture.frag // Module Version 10400 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 79 Capability Shader diff --git a/Test/baseResults/spv.1.6.conditionalDiscard.frag.out b/Test/baseResults/spv.1.6.conditionalDiscard.frag.out index f538fd9310..6364773da0 100644 --- a/Test/baseResults/spv.1.6.conditionalDiscard.frag.out +++ b/Test/baseResults/spv.1.6.conditionalDiscard.frag.out @@ -1,6 +1,6 @@ spv.1.6.conditionalDiscard.frag // Module Version 10600 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 36 Capability Shader diff --git a/Test/baseResults/spv.1.6.helperInvocation.frag.out b/Test/baseResults/spv.1.6.helperInvocation.frag.out index 7df2a2ac50..30a5c6a739 100644 --- a/Test/baseResults/spv.1.6.helperInvocation.frag.out +++ b/Test/baseResults/spv.1.6.helperInvocation.frag.out @@ -1,6 +1,6 @@ spv.1.6.helperInvocation.frag // Module Version 10600 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 20 Capability Shader diff --git a/Test/baseResults/spv.1.6.helperInvocation.memmodel.frag.out b/Test/baseResults/spv.1.6.helperInvocation.memmodel.frag.out new file mode 100644 index 0000000000..fea4e4588e --- /dev/null +++ b/Test/baseResults/spv.1.6.helperInvocation.memmodel.frag.out @@ -0,0 +1,48 @@ +spv.1.6.helperInvocation.memmodel.frag +// Module Version 10600 +// Generated by (magic number): 8000b +// Id's are bound by 21 + + Capability Shader + Capability VulkanMemoryModelKHR + Capability DemoteToHelperInvocationEXT + Extension "SPV_EXT_demote_to_helper_invocation" + 1: ExtInstImport "GLSL.std.450" + MemoryModel Logical VulkanKHR + EntryPoint Fragment 4 "main" 9 14 + ExecutionMode 4 OriginUpperLeft + Source ESSL 310 + SourceExtension "GL_EXT_demote_to_helper_invocation" + Name 4 "main" + Name 7 "B" + MemberName 7(B) 0 "o" + Name 9 "" + Name 14 "gl_HelperInvocation" + MemberDecorate 7(B) 0 Offset 0 + Decorate 7(B) Block + Decorate 9 DescriptorSet 0 + Decorate 9 Binding 0 + Decorate 14(gl_HelperInvocation) BuiltIn HelperInvocation + 2: TypeVoid + 3: TypeFunction 2 + 6: TypeFloat 32 + 7(B): TypeStruct 6(float) + 8: TypePointer StorageBuffer 7(B) + 9: 8(ptr) Variable StorageBuffer + 10: TypeInt 32 1 + 11: 10(int) Constant 0 + 12: TypeBool + 13: TypePointer Input 12(bool) +14(gl_HelperInvocation): 13(ptr) Variable Input + 16: 6(float) Constant 1065353216 + 17: 6(float) Constant 0 + 19: TypePointer StorageBuffer 6(float) + 4(main): 2 Function None 3 + 5: Label + DemoteToHelperInvocationEXT + 15: 12(bool) Load 14(gl_HelperInvocation) Volatile + 18: 6(float) Select 15 16 17 + 20: 19(ptr) AccessChain 9 11 + Store 20 18 + Return + FunctionEnd diff --git a/Test/baseResults/spv.1.6.samplerBuffer.frag.out b/Test/baseResults/spv.1.6.samplerBuffer.frag.out index 8a0275f940..1bd52da992 100644 --- a/Test/baseResults/spv.1.6.samplerBuffer.frag.out +++ b/Test/baseResults/spv.1.6.samplerBuffer.frag.out @@ -1,6 +1,6 @@ spv.1.6.samplerBuffer.frag // Module Version 10600 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 23 Capability Shader diff --git a/Test/baseResults/spv.1.6.separate.frag.out b/Test/baseResults/spv.1.6.separate.frag.out index e15655e1cd..f485fad1a0 100644 --- a/Test/baseResults/spv.1.6.separate.frag.out +++ b/Test/baseResults/spv.1.6.separate.frag.out @@ -1,6 +1,6 @@ spv.1.6.separate.frag // Module Version 10600 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 27 Capability Shader diff --git a/Test/baseResults/spv.1.6.specConstant.comp.out b/Test/baseResults/spv.1.6.specConstant.comp.out index 7485f04af8..2c32fbd6c9 100644 --- a/Test/baseResults/spv.1.6.specConstant.comp.out +++ b/Test/baseResults/spv.1.6.specConstant.comp.out @@ -1,6 +1,6 @@ spv.1.6.specConstant.comp // Module Version 10600 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 39 Capability Shader diff --git a/Test/baseResults/spv.100ops.frag.out b/Test/baseResults/spv.100ops.frag.out index 42c99953c9..8c28d918aa 100644 --- a/Test/baseResults/spv.100ops.frag.out +++ b/Test/baseResults/spv.100ops.frag.out @@ -1,6 +1,6 @@ spv.100ops.frag // Module Version 10000 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 49 Capability Shader diff --git a/Test/baseResults/spv.130.frag.out b/Test/baseResults/spv.130.frag.out index 29c7d853e5..84fa9a3f50 100644 --- a/Test/baseResults/spv.130.frag.out +++ b/Test/baseResults/spv.130.frag.out @@ -3,7 +3,7 @@ WARNING: 0:31: '#extension' : extension is only partially supported: GL_ARB_gpu_ Validation failed // Module Version 10000 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 205 Capability Shader diff --git a/Test/baseResults/spv.140.frag.out b/Test/baseResults/spv.140.frag.out index a51788282c..a4401a28c6 100644 --- a/Test/baseResults/spv.140.frag.out +++ b/Test/baseResults/spv.140.frag.out @@ -1,7 +1,7 @@ spv.140.frag Validation failed // Module Version 10000 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 96 Capability Shader diff --git a/Test/baseResults/spv.150.geom.out b/Test/baseResults/spv.150.geom.out index 0ad3337d4b..b6e22e1672 100644 --- a/Test/baseResults/spv.150.geom.out +++ b/Test/baseResults/spv.150.geom.out @@ -1,6 +1,6 @@ spv.150.geom // Module Version 10000 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 71 Capability Geometry diff --git a/Test/baseResults/spv.150.vert.out b/Test/baseResults/spv.150.vert.out index 2b09f4be1f..167a15e398 100644 --- a/Test/baseResults/spv.150.vert.out +++ b/Test/baseResults/spv.150.vert.out @@ -1,6 +1,6 @@ spv.150.vert // Module Version 10000 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 63 Capability Shader diff --git a/Test/baseResults/spv.16bitstorage-int.frag.out b/Test/baseResults/spv.16bitstorage-int.frag.out index a91b4e4da5..d14519b995 100644 --- a/Test/baseResults/spv.16bitstorage-int.frag.out +++ b/Test/baseResults/spv.16bitstorage-int.frag.out @@ -1,6 +1,6 @@ spv.16bitstorage-int.frag // Module Version 10000 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 171 Capability Shader diff --git a/Test/baseResults/spv.16bitstorage-uint.frag.out b/Test/baseResults/spv.16bitstorage-uint.frag.out index f90d0c142f..ea935ce687 100644 --- a/Test/baseResults/spv.16bitstorage-uint.frag.out +++ b/Test/baseResults/spv.16bitstorage-uint.frag.out @@ -1,6 +1,6 @@ spv.16bitstorage-uint.frag // Module Version 10000 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 173 Capability Shader diff --git a/Test/baseResults/spv.16bitstorage.frag.out b/Test/baseResults/spv.16bitstorage.frag.out index 2d934f4c53..c19f607cb7 100644 --- a/Test/baseResults/spv.16bitstorage.frag.out +++ b/Test/baseResults/spv.16bitstorage.frag.out @@ -1,6 +1,6 @@ spv.16bitstorage.frag // Module Version 10000 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 173 Capability Shader diff --git a/Test/baseResults/spv.16bitxfb.vert.out b/Test/baseResults/spv.16bitxfb.vert.out index f4d66efca9..2dd93d4bdb 100644 --- a/Test/baseResults/spv.16bitxfb.vert.out +++ b/Test/baseResults/spv.16bitxfb.vert.out @@ -1,6 +1,6 @@ spv.16bitxfb.vert // Module Version 10000 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 59 Capability Shader diff --git a/Test/baseResults/spv.300BuiltIns.vert.out b/Test/baseResults/spv.300BuiltIns.vert.out index 220178804c..10f115be30 100644 --- a/Test/baseResults/spv.300BuiltIns.vert.out +++ b/Test/baseResults/spv.300BuiltIns.vert.out @@ -1,6 +1,6 @@ spv.300BuiltIns.vert // Module Version 10000 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 42 Capability Shader diff --git a/Test/baseResults/spv.300layout.frag.out b/Test/baseResults/spv.300layout.frag.out index 3b691e2c3b..156a6e2419 100644 --- a/Test/baseResults/spv.300layout.frag.out +++ b/Test/baseResults/spv.300layout.frag.out @@ -1,6 +1,6 @@ spv.300layout.frag // Module Version 10000 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 37 Capability Shader diff --git a/Test/baseResults/spv.300layout.vert.out b/Test/baseResults/spv.300layout.vert.out index 3db50b069a..6345aa129a 100644 --- a/Test/baseResults/spv.300layout.vert.out +++ b/Test/baseResults/spv.300layout.vert.out @@ -1,6 +1,6 @@ spv.300layout.vert // Module Version 10000 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 163 Capability Shader diff --git a/Test/baseResults/spv.300layoutp.vert.out b/Test/baseResults/spv.300layoutp.vert.out index 315605d4dd..d986fb5476 100644 --- a/Test/baseResults/spv.300layoutp.vert.out +++ b/Test/baseResults/spv.300layoutp.vert.out @@ -1,6 +1,6 @@ spv.300layoutp.vert // Module Version 10000 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 115 Capability Shader diff --git a/Test/baseResults/spv.310.bitcast.frag.out b/Test/baseResults/spv.310.bitcast.frag.out index f4322abc50..fa354be46a 100644 --- a/Test/baseResults/spv.310.bitcast.frag.out +++ b/Test/baseResults/spv.310.bitcast.frag.out @@ -1,6 +1,6 @@ spv.310.bitcast.frag // Module Version 10000 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 179 Capability Shader diff --git a/Test/baseResults/spv.310.comp.out b/Test/baseResults/spv.310.comp.out index 931d0380a5..459c689b2d 100644 --- a/Test/baseResults/spv.310.comp.out +++ b/Test/baseResults/spv.310.comp.out @@ -1,6 +1,6 @@ spv.310.comp // Module Version 10000 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 72 Capability Shader diff --git a/Test/baseResults/spv.320.meshShaderUserDefined.mesh.out b/Test/baseResults/spv.320.meshShaderUserDefined.mesh.out index a4d8413be0..197fe6021f 100644 --- a/Test/baseResults/spv.320.meshShaderUserDefined.mesh.out +++ b/Test/baseResults/spv.320.meshShaderUserDefined.mesh.out @@ -1,6 +1,6 @@ spv.320.meshShaderUserDefined.mesh // Module Version 10000 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 143 Capability MeshShadingNV diff --git a/Test/baseResults/spv.330.geom.out b/Test/baseResults/spv.330.geom.out index 1166508f1d..f9e69e5789 100644 --- a/Test/baseResults/spv.330.geom.out +++ b/Test/baseResults/spv.330.geom.out @@ -1,6 +1,6 @@ spv.330.geom // Module Version 10000 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 32 Capability Geometry diff --git a/Test/baseResults/spv.400.frag.nanclamp.out b/Test/baseResults/spv.400.frag.nanclamp.out index cf1ffb0418..f03e938602 100644 --- a/Test/baseResults/spv.400.frag.nanclamp.out +++ b/Test/baseResults/spv.400.frag.nanclamp.out @@ -1,6 +1,6 @@ spv.400.frag // Module Version 10000 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 1122 Capability Shader diff --git a/Test/baseResults/spv.400.frag.out b/Test/baseResults/spv.400.frag.out index 67868859cf..aa42d28296 100644 --- a/Test/baseResults/spv.400.frag.out +++ b/Test/baseResults/spv.400.frag.out @@ -1,7 +1,7 @@ spv.400.frag Validation failed // Module Version 10000 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 1122 Capability Shader diff --git a/Test/baseResults/spv.400.tesc.out b/Test/baseResults/spv.400.tesc.out index a07c9b12dc..b6f0ddfd50 100644 --- a/Test/baseResults/spv.400.tesc.out +++ b/Test/baseResults/spv.400.tesc.out @@ -1,6 +1,6 @@ spv.400.tesc // Module Version 10000 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 92 Capability Tessellation diff --git a/Test/baseResults/spv.400.tese.out b/Test/baseResults/spv.400.tese.out index 58f4b97eda..0b8abf668a 100644 --- a/Test/baseResults/spv.400.tese.out +++ b/Test/baseResults/spv.400.tese.out @@ -1,6 +1,6 @@ spv.400.tese // Module Version 10000 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 96 Capability Tessellation diff --git a/Test/baseResults/spv.420.geom.out b/Test/baseResults/spv.420.geom.out index 17f27497a0..d814d1ae7b 100644 --- a/Test/baseResults/spv.420.geom.out +++ b/Test/baseResults/spv.420.geom.out @@ -1,6 +1,6 @@ spv.420.geom // Module Version 10000 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 72 Capability Geometry diff --git a/Test/baseResults/spv.430.frag.out b/Test/baseResults/spv.430.frag.out index 15da3827f3..bc00fa13de 100644 --- a/Test/baseResults/spv.430.frag.out +++ b/Test/baseResults/spv.430.frag.out @@ -1,6 +1,6 @@ spv.430.frag // Module Version 10000 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 24 Capability Shader diff --git a/Test/baseResults/spv.430.vert.out b/Test/baseResults/spv.430.vert.out index a6b2e34cf1..eada8d05e5 100644 --- a/Test/baseResults/spv.430.vert.out +++ b/Test/baseResults/spv.430.vert.out @@ -1,7 +1,7 @@ spv.430.vert Validation failed // Module Version 10000 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 66 Capability Shader diff --git a/Test/baseResults/spv.450.geom.out b/Test/baseResults/spv.450.geom.out index 3e7ac4550c..5398b3c0cd 100644 --- a/Test/baseResults/spv.450.geom.out +++ b/Test/baseResults/spv.450.geom.out @@ -1,6 +1,6 @@ spv.450.geom // Module Version 10000 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 31 Capability Geometry diff --git a/Test/baseResults/spv.450.noRedecl.tesc.out b/Test/baseResults/spv.450.noRedecl.tesc.out index 0925119b53..dcf0a9f90f 100644 --- a/Test/baseResults/spv.450.noRedecl.tesc.out +++ b/Test/baseResults/spv.450.noRedecl.tesc.out @@ -1,6 +1,6 @@ spv.450.noRedecl.tesc // Module Version 10000 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 21 Capability Tessellation diff --git a/Test/baseResults/spv.450.tesc.out b/Test/baseResults/spv.450.tesc.out index c18ab3ff1c..eabb9e7cda 100644 --- a/Test/baseResults/spv.450.tesc.out +++ b/Test/baseResults/spv.450.tesc.out @@ -1,7 +1,7 @@ spv.450.tesc Validation failed // Module Version 10000 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 45 Capability Tessellation diff --git a/Test/baseResults/spv.460.comp.out b/Test/baseResults/spv.460.comp.out index d53efde654..c6abacad34 100644 --- a/Test/baseResults/spv.460.comp.out +++ b/Test/baseResults/spv.460.comp.out @@ -1,6 +1,6 @@ spv.460.comp // Module Version 10000 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 15 Capability Shader diff --git a/Test/baseResults/spv.460.frag.out b/Test/baseResults/spv.460.frag.out index a8bec34210..4201fbb809 100644 --- a/Test/baseResults/spv.460.frag.out +++ b/Test/baseResults/spv.460.frag.out @@ -1,6 +1,6 @@ spv.460.frag // Module Version 10000 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 32 Capability Shader diff --git a/Test/baseResults/spv.460.subgroupEXT.mesh.out b/Test/baseResults/spv.460.subgroupEXT.mesh.out new file mode 100644 index 0000000000..f41895fd4b --- /dev/null +++ b/Test/baseResults/spv.460.subgroupEXT.mesh.out @@ -0,0 +1,442 @@ +spv.460.subgroupEXT.mesh +// Module Version 10400 +// Generated by (magic number): 8000b +// Id's are bound by 279 + + Capability ClipDistance + Capability CullDistance + Capability GroupNonUniform + Capability GroupNonUniformVote + Capability GroupNonUniformArithmetic + Capability GroupNonUniformBallot + Capability GroupNonUniformShuffle + Capability GroupNonUniformShuffleRelative + Capability GroupNonUniformClustered + Capability GroupNonUniformQuad + Capability MeshShadingEXT + Extension "SPV_EXT_mesh_shader" + 1: ExtInstImport "GLSL.std.450" + MemoryModel Logical GLSL450 + EntryPoint MeshEXT 4 "main" 35 41 57 109 147 161 162 167 168 171 172 173 174 175 + ExecutionMode 4 LocalSize 32 1 1 + ExecutionMode 4 OutputVertices 81 + ExecutionMode 4 OutputPrimitivesNV 32 + ExecutionMode 4 OutputTrianglesNV + Source GLSL 460 + SourceExtension "GL_EXT_mesh_shader" + SourceExtension "GL_KHR_shader_subgroup_arithmetic" + SourceExtension "GL_KHR_shader_subgroup_ballot" + SourceExtension "GL_KHR_shader_subgroup_basic" + SourceExtension "GL_KHR_shader_subgroup_clustered" + SourceExtension "GL_KHR_shader_subgroup_quad" + SourceExtension "GL_KHR_shader_subgroup_shuffle" + SourceExtension "GL_KHR_shader_subgroup_shuffle_relative" + SourceExtension "GL_KHR_shader_subgroup_vote" + Name 4 "main" + Name 6 "basic_works(" + Name 13 "ballot_works(vf4;" + Name 12 "f4" + Name 16 "vote_works(vf4;" + Name 15 "f4" + Name 19 "shuffle_works(vf4;" + Name 18 "f4" + Name 22 "arith_works(vf4;" + Name 21 "f4" + Name 25 "clustered_works(vf4;" + Name 24 "f4" + Name 28 "quad_works(vf4;" + Name 27 "f4" + Name 32 "iid" + Name 35 "gl_LocalInvocationID" + Name 40 "gid" + Name 41 "gl_WorkGroupID" + Name 44 "vertexCount" + Name 46 "primitiveCount" + Name 54 "gl_MeshPerVertexEXT" + MemberName 54(gl_MeshPerVertexEXT) 0 "gl_Position" + MemberName 54(gl_MeshPerVertexEXT) 1 "gl_PointSize" + MemberName 54(gl_MeshPerVertexEXT) 2 "gl_ClipDistance" + MemberName 54(gl_MeshPerVertexEXT) 3 "gl_CullDistance" + Name 57 "gl_MeshVerticesEXT" + Name 106 "gl_MeshPerPrimitiveEXT" + MemberName 106(gl_MeshPerPrimitiveEXT) 0 "gl_PrimitiveID" + MemberName 106(gl_MeshPerPrimitiveEXT) 1 "gl_Layer" + MemberName 106(gl_MeshPerPrimitiveEXT) 2 "gl_ViewportIndex" + MemberName 106(gl_MeshPerPrimitiveEXT) 3 "gl_CullPrimitiveEXT" + Name 109 "gl_MeshPrimitivesEXT" + Name 147 "gl_PrimitiveTriangleIndicesEXT" + Name 161 "gl_SubgroupSize" + Name 162 "gl_SubgroupInvocationID" + Name 167 "gl_NumSubgroups" + Name 168 "gl_SubgroupID" + Name 171 "gl_SubgroupEqMask" + Name 172 "gl_SubgroupGeMask" + Name 173 "gl_SubgroupGtMask" + Name 174 "gl_SubgroupLeMask" + Name 175 "gl_SubgroupLtMask" + Name 181 "ballot" + Name 218 "ballot" + Name 253 "ballot" + Decorate 35(gl_LocalInvocationID) BuiltIn LocalInvocationId + Decorate 41(gl_WorkGroupID) BuiltIn WorkgroupId + MemberDecorate 54(gl_MeshPerVertexEXT) 0 BuiltIn Position + MemberDecorate 54(gl_MeshPerVertexEXT) 1 BuiltIn PointSize + MemberDecorate 54(gl_MeshPerVertexEXT) 2 BuiltIn ClipDistance + MemberDecorate 54(gl_MeshPerVertexEXT) 3 BuiltIn CullDistance + Decorate 54(gl_MeshPerVertexEXT) Block + MemberDecorate 106(gl_MeshPerPrimitiveEXT) 0 PerPrimitiveNV + MemberDecorate 106(gl_MeshPerPrimitiveEXT) 0 BuiltIn PrimitiveId + MemberDecorate 106(gl_MeshPerPrimitiveEXT) 1 PerPrimitiveNV + MemberDecorate 106(gl_MeshPerPrimitiveEXT) 1 BuiltIn Layer + MemberDecorate 106(gl_MeshPerPrimitiveEXT) 2 PerPrimitiveNV + MemberDecorate 106(gl_MeshPerPrimitiveEXT) 2 BuiltIn ViewportIndex + MemberDecorate 106(gl_MeshPerPrimitiveEXT) 3 PerPrimitiveNV + MemberDecorate 106(gl_MeshPerPrimitiveEXT) 3 BuiltIn CullPrimitiveEXT + Decorate 106(gl_MeshPerPrimitiveEXT) Block + Decorate 147(gl_PrimitiveTriangleIndicesEXT) BuiltIn PrimitiveTriangleIndicesEXT + Decorate 161(gl_SubgroupSize) RelaxedPrecision + Decorate 161(gl_SubgroupSize) BuiltIn SubgroupSize + Decorate 162(gl_SubgroupInvocationID) RelaxedPrecision + Decorate 162(gl_SubgroupInvocationID) BuiltIn SubgroupLocalInvocationId + Decorate 167(gl_NumSubgroups) BuiltIn NumSubgroups + Decorate 168(gl_SubgroupID) BuiltIn SubgroupId + Decorate 171(gl_SubgroupEqMask) BuiltIn SubgroupEqMaskKHR + Decorate 172(gl_SubgroupGeMask) BuiltIn SubgroupGeMaskKHR + Decorate 173(gl_SubgroupGtMask) BuiltIn SubgroupGtMaskKHR + Decorate 174(gl_SubgroupLeMask) BuiltIn SubgroupLeMaskKHR + Decorate 175(gl_SubgroupLtMask) BuiltIn SubgroupLtMaskKHR + Decorate 278 BuiltIn WorkgroupSize + 2: TypeVoid + 3: TypeFunction 2 + 8: TypeFloat 32 + 9: TypeVector 8(float) 4 + 10: TypePointer Function 9(fvec4) + 11: TypeFunction 2 10(ptr) + 30: TypeInt 32 0 + 31: TypePointer Function 30(int) + 33: TypeVector 30(int) 3 + 34: TypePointer Input 33(ivec3) +35(gl_LocalInvocationID): 34(ptr) Variable Input + 36: 30(int) Constant 0 + 37: TypePointer Input 30(int) +41(gl_WorkGroupID): 34(ptr) Variable Input + 45: 30(int) Constant 81 + 47: 30(int) Constant 32 + 50: 30(int) Constant 4 + 51: TypeArray 8(float) 50 + 52: 30(int) Constant 3 + 53: TypeArray 8(float) 52 +54(gl_MeshPerVertexEXT): TypeStruct 9(fvec4) 8(float) 51 53 + 55: TypeArray 54(gl_MeshPerVertexEXT) 45 + 56: TypePointer Output 55 +57(gl_MeshVerticesEXT): 56(ptr) Variable Output + 59: TypeInt 32 1 + 60: 59(int) Constant 0 + 61: 8(float) Constant 1065353216 + 62: 9(fvec4) ConstantComposite 61 61 61 61 + 63: TypePointer Output 9(fvec4) + 66: 59(int) Constant 1 + 67: 8(float) Constant 1073741824 + 68: TypePointer Output 8(float) + 71: 59(int) Constant 2 + 72: 59(int) Constant 3 + 73: 8(float) Constant 1077936128 + 76: 8(float) Constant 1082130432 + 78: 30(int) Constant 1 + 79: 30(int) Constant 264 + 80: 30(int) Constant 2 + 105: TypeBool +106(gl_MeshPerPrimitiveEXT): TypeStruct 59(int) 59(int) 59(int) 105(bool) + 107: TypeArray 106(gl_MeshPerPrimitiveEXT) 47 + 108: TypePointer Output 107 +109(gl_MeshPrimitivesEXT): 108(ptr) Variable Output + 111: 59(int) Constant 6 + 112: TypePointer Output 59(int) + 115: 59(int) Constant 7 + 118: 59(int) Constant 8 + 121: 105(bool) ConstantFalse + 122: TypePointer Output 105(bool) + 145: TypeArray 33(ivec3) 47 + 146: TypePointer Output 145 +147(gl_PrimitiveTriangleIndicesEXT): 146(ptr) Variable Output + 148: 33(ivec3) ConstantComposite 78 78 78 + 149: TypePointer Output 33(ivec3) + 153: 33(ivec3) ConstantComposite 80 80 80 +161(gl_SubgroupSize): 37(ptr) Variable Input +162(gl_SubgroupInvocationID): 37(ptr) Variable Input + 163: 30(int) Constant 3400 + 164: 30(int) Constant 72 + 165: 30(int) Constant 2056 +167(gl_NumSubgroups): 37(ptr) Variable Input +168(gl_SubgroupID): 37(ptr) Variable Input + 169: TypeVector 30(int) 4 + 170: TypePointer Input 169(ivec4) +171(gl_SubgroupEqMask): 170(ptr) Variable Input +172(gl_SubgroupGeMask): 170(ptr) Variable Input +173(gl_SubgroupGtMask): 170(ptr) Variable Input +174(gl_SubgroupLeMask): 170(ptr) Variable Input +175(gl_SubgroupLtMask): 170(ptr) Variable Input + 180: TypePointer Function 169(ivec4) + 183: 169(ivec4) ConstantComposite 78 78 78 78 + 197: 105(bool) ConstantTrue + 254: 30(int) Constant 85 + 255: 169(ivec4) ConstantComposite 254 36 36 36 + 278: 33(ivec3) ConstantComposite 47 78 78 + 4(main): 2 Function None 3 + 5: Label + 32(iid): 31(ptr) Variable Function + 40(gid): 31(ptr) Variable Function + 44(vertexCount): 31(ptr) Variable Function +46(primitiveCount): 31(ptr) Variable Function + 38: 37(ptr) AccessChain 35(gl_LocalInvocationID) 36 + 39: 30(int) Load 38 + Store 32(iid) 39 + 42: 37(ptr) AccessChain 41(gl_WorkGroupID) 36 + 43: 30(int) Load 42 + Store 40(gid) 43 + Store 44(vertexCount) 45 + Store 46(primitiveCount) 47 + 48: 30(int) Load 44(vertexCount) + 49: 30(int) Load 46(primitiveCount) + SetMeshOutputsEXT 48 49 + 58: 30(int) Load 32(iid) + 64: 63(ptr) AccessChain 57(gl_MeshVerticesEXT) 58 60 + Store 64 62 + 65: 30(int) Load 32(iid) + 69: 68(ptr) AccessChain 57(gl_MeshVerticesEXT) 65 66 + Store 69 67 + 70: 30(int) Load 32(iid) + 74: 68(ptr) AccessChain 57(gl_MeshVerticesEXT) 70 71 72 + Store 74 73 + 75: 30(int) Load 32(iid) + 77: 68(ptr) AccessChain 57(gl_MeshVerticesEXT) 75 72 71 + Store 77 76 + MemoryBarrier 78 79 + ControlBarrier 80 80 79 + 81: 30(int) Load 32(iid) + 82: 30(int) IAdd 81 78 + 83: 30(int) Load 32(iid) + 84: 63(ptr) AccessChain 57(gl_MeshVerticesEXT) 83 60 + 85: 9(fvec4) Load 84 + 86: 63(ptr) AccessChain 57(gl_MeshVerticesEXT) 82 60 + Store 86 85 + 87: 30(int) Load 32(iid) + 88: 30(int) IAdd 87 78 + 89: 30(int) Load 32(iid) + 90: 68(ptr) AccessChain 57(gl_MeshVerticesEXT) 89 66 + 91: 8(float) Load 90 + 92: 68(ptr) AccessChain 57(gl_MeshVerticesEXT) 88 66 + Store 92 91 + 93: 30(int) Load 32(iid) + 94: 30(int) IAdd 93 78 + 95: 30(int) Load 32(iid) + 96: 68(ptr) AccessChain 57(gl_MeshVerticesEXT) 95 71 72 + 97: 8(float) Load 96 + 98: 68(ptr) AccessChain 57(gl_MeshVerticesEXT) 94 71 72 + Store 98 97 + 99: 30(int) Load 32(iid) + 100: 30(int) IAdd 99 78 + 101: 30(int) Load 32(iid) + 102: 68(ptr) AccessChain 57(gl_MeshVerticesEXT) 101 72 71 + 103: 8(float) Load 102 + 104: 68(ptr) AccessChain 57(gl_MeshVerticesEXT) 100 72 71 + Store 104 103 + MemoryBarrier 78 79 + ControlBarrier 80 80 79 + 110: 30(int) Load 32(iid) + 113: 112(ptr) AccessChain 109(gl_MeshPrimitivesEXT) 110 60 + Store 113 111 + 114: 30(int) Load 32(iid) + 116: 112(ptr) AccessChain 109(gl_MeshPrimitivesEXT) 114 66 + Store 116 115 + 117: 30(int) Load 32(iid) + 119: 112(ptr) AccessChain 109(gl_MeshPrimitivesEXT) 117 71 + Store 119 118 + 120: 30(int) Load 32(iid) + 123: 122(ptr) AccessChain 109(gl_MeshPrimitivesEXT) 120 72 + Store 123 121 + MemoryBarrier 78 79 + ControlBarrier 80 80 79 + 124: 30(int) Load 32(iid) + 125: 30(int) IAdd 124 78 + 126: 30(int) Load 32(iid) + 127: 112(ptr) AccessChain 109(gl_MeshPrimitivesEXT) 126 60 + 128: 59(int) Load 127 + 129: 112(ptr) AccessChain 109(gl_MeshPrimitivesEXT) 125 60 + Store 129 128 + 130: 30(int) Load 32(iid) + 131: 30(int) IAdd 130 78 + 132: 30(int) Load 32(iid) + 133: 112(ptr) AccessChain 109(gl_MeshPrimitivesEXT) 132 66 + 134: 59(int) Load 133 + 135: 112(ptr) AccessChain 109(gl_MeshPrimitivesEXT) 131 66 + Store 135 134 + 136: 30(int) Load 32(iid) + 137: 30(int) IAdd 136 78 + 138: 30(int) Load 32(iid) + 139: 112(ptr) AccessChain 109(gl_MeshPrimitivesEXT) 138 71 + 140: 59(int) Load 139 + 141: 112(ptr) AccessChain 109(gl_MeshPrimitivesEXT) 137 71 + Store 141 140 + 142: 30(int) Load 32(iid) + 143: 30(int) IAdd 142 78 + 144: 122(ptr) AccessChain 109(gl_MeshPrimitivesEXT) 143 72 + Store 144 121 + MemoryBarrier 78 79 + ControlBarrier 80 80 79 + 150: 149(ptr) AccessChain 147(gl_PrimitiveTriangleIndicesEXT) 60 + Store 150 148 + 151: 30(int) Load 46(primitiveCount) + 152: 30(int) ISub 151 78 + 154: 149(ptr) AccessChain 147(gl_PrimitiveTriangleIndicesEXT) 152 + Store 154 153 + 155: 30(int) Load 40(gid) + 156: 30(int) Load 40(gid) + 157: 30(int) ISub 156 78 + 158: 149(ptr) AccessChain 147(gl_PrimitiveTriangleIndicesEXT) 157 + 159: 33(ivec3) Load 158 + 160: 149(ptr) AccessChain 147(gl_PrimitiveTriangleIndicesEXT) 155 + Store 160 159 + MemoryBarrier 78 79 + ControlBarrier 80 80 79 + Return + FunctionEnd + 6(basic_works(): 2 Function None 3 + 7: Label + ControlBarrier 52 52 163 + MemoryBarrier 52 163 + MemoryBarrier 52 164 + MemoryBarrier 52 165 + 166: 105(bool) GroupNonUniformElect 52 + MemoryBarrier 52 79 + Return + FunctionEnd +13(ballot_works(vf4;): 2 Function None 11 + 12(f4): 10(ptr) FunctionParameter + 14: Label + 181(ballot): 180(ptr) Variable Function + 176: 9(fvec4) Load 12(f4) + 177: 9(fvec4) GroupNonUniformBroadcast 52 176 36 + 178: 9(fvec4) Load 12(f4) + 179: 9(fvec4) GroupNonUniformBroadcastFirst 52 178 + 182: 169(ivec4) GroupNonUniformBallot 52 121 + Store 181(ballot) 182 + 184: 105(bool) GroupNonUniformInverseBallot 52 183 + 185: 169(ivec4) Load 181(ballot) + 186: 105(bool) GroupNonUniformBallotBitExtract 52 185 36 + 187: 169(ivec4) Load 181(ballot) + 188: 30(int) GroupNonUniformBallotBitCount 52 Reduce 187 + 189: 169(ivec4) Load 181(ballot) + 190: 30(int) GroupNonUniformBallotBitCount 52 InclusiveScan 189 + 191: 169(ivec4) Load 181(ballot) + 192: 30(int) GroupNonUniformBallotBitCount 52 ExclusiveScan 191 + 193: 169(ivec4) Load 181(ballot) + 194: 30(int) GroupNonUniformBallotFindLSB 52 193 + 195: 169(ivec4) Load 181(ballot) + 196: 30(int) GroupNonUniformBallotFindMSB 52 195 + Return + FunctionEnd +16(vote_works(vf4;): 2 Function None 11 + 15(f4): 10(ptr) FunctionParameter + 17: Label + 198: 105(bool) GroupNonUniformAll 52 197 + 199: 105(bool) GroupNonUniformAny 52 121 + 200: 9(fvec4) Load 15(f4) + 201: 105(bool) GroupNonUniformAllEqual 52 200 + Return + FunctionEnd +19(shuffle_works(vf4;): 2 Function None 11 + 18(f4): 10(ptr) FunctionParameter + 20: Label + 202: 9(fvec4) Load 18(f4) + 203: 9(fvec4) GroupNonUniformShuffle 52 202 36 + 204: 9(fvec4) Load 18(f4) + 205: 9(fvec4) GroupNonUniformShuffleXor 52 204 78 + 206: 9(fvec4) Load 18(f4) + 207: 9(fvec4) GroupNonUniformShuffleUp 52 206 78 + 208: 9(fvec4) Load 18(f4) + 209: 9(fvec4) GroupNonUniformShuffleDown 52 208 78 + Return + FunctionEnd +22(arith_works(vf4;): 2 Function None 11 + 21(f4): 10(ptr) FunctionParameter + 23: Label + 218(ballot): 180(ptr) Variable Function + 210: 9(fvec4) Load 21(f4) + 211: 9(fvec4) GroupNonUniformFAdd 52 Reduce 210 + 212: 9(fvec4) Load 21(f4) + 213: 9(fvec4) GroupNonUniformFMul 52 Reduce 212 + 214: 9(fvec4) Load 21(f4) + 215: 9(fvec4) GroupNonUniformFMin 52 Reduce 214 + 216: 9(fvec4) Load 21(f4) + 217: 9(fvec4) GroupNonUniformFMax 52 Reduce 216 + 219: 169(ivec4) Load 218(ballot) + 220: 169(ivec4) GroupNonUniformBitwiseAnd 52 Reduce 219 + 221: 169(ivec4) Load 218(ballot) + 222: 169(ivec4) GroupNonUniformBitwiseOr 52 Reduce 221 + 223: 169(ivec4) Load 218(ballot) + 224: 169(ivec4) GroupNonUniformBitwiseXor 52 Reduce 223 + 225: 9(fvec4) Load 21(f4) + 226: 9(fvec4) GroupNonUniformFAdd 52 InclusiveScan 225 + 227: 9(fvec4) Load 21(f4) + 228: 9(fvec4) GroupNonUniformFMul 52 InclusiveScan 227 + 229: 9(fvec4) Load 21(f4) + 230: 9(fvec4) GroupNonUniformFMin 52 InclusiveScan 229 + 231: 9(fvec4) Load 21(f4) + 232: 9(fvec4) GroupNonUniformFMax 52 InclusiveScan 231 + 233: 169(ivec4) Load 218(ballot) + 234: 169(ivec4) GroupNonUniformBitwiseAnd 52 InclusiveScan 233 + 235: 169(ivec4) Load 218(ballot) + 236: 169(ivec4) GroupNonUniformBitwiseOr 52 InclusiveScan 235 + 237: 169(ivec4) Load 218(ballot) + 238: 169(ivec4) GroupNonUniformBitwiseXor 52 InclusiveScan 237 + 239: 9(fvec4) Load 21(f4) + 240: 9(fvec4) GroupNonUniformFAdd 52 ExclusiveScan 239 + 241: 9(fvec4) Load 21(f4) + 242: 9(fvec4) GroupNonUniformFMul 52 ExclusiveScan 241 + 243: 9(fvec4) Load 21(f4) + 244: 9(fvec4) GroupNonUniformFMin 52 ExclusiveScan 243 + 245: 9(fvec4) Load 21(f4) + 246: 9(fvec4) GroupNonUniformFMax 52 ExclusiveScan 245 + 247: 169(ivec4) Load 218(ballot) + 248: 169(ivec4) GroupNonUniformBitwiseAnd 52 ExclusiveScan 247 + 249: 169(ivec4) Load 218(ballot) + 250: 169(ivec4) GroupNonUniformBitwiseOr 52 ExclusiveScan 249 + 251: 169(ivec4) Load 218(ballot) + 252: 169(ivec4) GroupNonUniformBitwiseXor 52 ExclusiveScan 251 + Return + FunctionEnd +25(clustered_works(vf4;): 2 Function None 11 + 24(f4): 10(ptr) FunctionParameter + 26: Label + 253(ballot): 180(ptr) Variable Function + Store 253(ballot) 255 + 256: 9(fvec4) Load 24(f4) + 257: 9(fvec4) GroupNonUniformFAdd 52 ClusteredReduce 256 80 + 258: 9(fvec4) Load 24(f4) + 259: 9(fvec4) GroupNonUniformFMul 52 ClusteredReduce 258 80 + 260: 9(fvec4) Load 24(f4) + 261: 9(fvec4) GroupNonUniformFMin 52 ClusteredReduce 260 80 + 262: 9(fvec4) Load 24(f4) + 263: 9(fvec4) GroupNonUniformFMax 52 ClusteredReduce 262 80 + 264: 169(ivec4) Load 253(ballot) + 265: 169(ivec4) GroupNonUniformBitwiseAnd 52 ClusteredReduce 264 80 + 266: 169(ivec4) Load 253(ballot) + 267: 169(ivec4) GroupNonUniformBitwiseOr 52 ClusteredReduce 266 80 + 268: 169(ivec4) Load 253(ballot) + 269: 169(ivec4) GroupNonUniformBitwiseXor 52 ClusteredReduce 268 80 + Return + FunctionEnd +28(quad_works(vf4;): 2 Function None 11 + 27(f4): 10(ptr) FunctionParameter + 29: Label + 270: 9(fvec4) Load 27(f4) + 271: 9(fvec4) GroupNonUniformQuadBroadcast 52 270 36 + 272: 9(fvec4) Load 27(f4) + 273: 9(fvec4) GroupNonUniformQuadSwap 52 272 36 + 274: 9(fvec4) Load 27(f4) + 275: 9(fvec4) GroupNonUniformQuadSwap 52 274 78 + 276: 9(fvec4) Load 27(f4) + 277: 9(fvec4) GroupNonUniformQuadSwap 52 276 80 + Return + FunctionEnd diff --git a/Test/baseResults/spv.460.subgroupEXT.task.out b/Test/baseResults/spv.460.subgroupEXT.task.out new file mode 100644 index 0000000000..efe30b75a1 --- /dev/null +++ b/Test/baseResults/spv.460.subgroupEXT.task.out @@ -0,0 +1,375 @@ +spv.460.subgroupEXT.task +// Module Version 10400 +// Generated by (magic number): 8000b +// Id's are bound by 243 + + Capability StorageImageWriteWithoutFormat + Capability GroupNonUniform + Capability GroupNonUniformVote + Capability GroupNonUniformArithmetic + Capability GroupNonUniformBallot + Capability GroupNonUniformShuffle + Capability GroupNonUniformShuffleRelative + Capability GroupNonUniformClustered + Capability GroupNonUniformQuad + Capability MeshShadingEXT + Extension "SPV_EXT_mesh_shader" + 1: ExtInstImport "GLSL.std.450" + MemoryModel Logical GLSL450 + EntryPoint TaskEXT 4 "main" 35 41 56 61 77 102 123 124 129 130 133 134 135 136 137 + ExecutionMode 4 LocalSize 32 1 1 + Source GLSL 460 + SourceExtension "GL_EXT_mesh_shader" + SourceExtension "GL_KHR_shader_subgroup_arithmetic" + SourceExtension "GL_KHR_shader_subgroup_ballot" + SourceExtension "GL_KHR_shader_subgroup_basic" + SourceExtension "GL_KHR_shader_subgroup_clustered" + SourceExtension "GL_KHR_shader_subgroup_quad" + SourceExtension "GL_KHR_shader_subgroup_shuffle" + SourceExtension "GL_KHR_shader_subgroup_shuffle_relative" + SourceExtension "GL_KHR_shader_subgroup_vote" + Name 4 "main" + Name 6 "basic_works(" + Name 13 "ballot_works(vf4;" + Name 12 "f4" + Name 16 "vote_works(vf4;" + Name 15 "f4" + Name 19 "shuffle_works(vf4;" + Name 18 "f4" + Name 22 "arith_works(vf4;" + Name 21 "f4" + Name 25 "clustered_works(vf4;" + Name 24 "f4" + Name 28 "quad_works(vf4;" + Name 27 "f4" + Name 32 "iid" + Name 35 "gl_LocalInvocationID" + Name 40 "gid" + Name 41 "gl_WorkGroupID" + Name 44 "i" + Name 56 "mem" + Name 59 "block0" + MemberName 59(block0) 0 "uni_value" + Name 61 "" + Name 77 "uni_image" + Name 100 "Task" + MemberName 100(Task) 0 "dummy" + MemberName 100(Task) 1 "submesh" + Name 102 "mytask" + Name 123 "gl_SubgroupSize" + Name 124 "gl_SubgroupInvocationID" + Name 129 "gl_NumSubgroups" + Name 130 "gl_SubgroupID" + Name 133 "gl_SubgroupEqMask" + Name 134 "gl_SubgroupGeMask" + Name 135 "gl_SubgroupGtMask" + Name 136 "gl_SubgroupLeMask" + Name 137 "gl_SubgroupLtMask" + Name 143 "ballot" + Name 181 "ballot" + Name 216 "ballot" + Decorate 35(gl_LocalInvocationID) BuiltIn LocalInvocationId + Decorate 41(gl_WorkGroupID) BuiltIn WorkgroupId + MemberDecorate 59(block0) 0 Offset 0 + Decorate 59(block0) Block + Decorate 61 DescriptorSet 0 + Decorate 61 Binding 1 + Decorate 77(uni_image) DescriptorSet 0 + Decorate 77(uni_image) Binding 0 + Decorate 77(uni_image) NonReadable + Decorate 123(gl_SubgroupSize) RelaxedPrecision + Decorate 123(gl_SubgroupSize) BuiltIn SubgroupSize + Decorate 124(gl_SubgroupInvocationID) RelaxedPrecision + Decorate 124(gl_SubgroupInvocationID) BuiltIn SubgroupLocalInvocationId + Decorate 129(gl_NumSubgroups) BuiltIn NumSubgroups + Decorate 130(gl_SubgroupID) BuiltIn SubgroupId + Decorate 133(gl_SubgroupEqMask) BuiltIn SubgroupEqMaskKHR + Decorate 134(gl_SubgroupGeMask) BuiltIn SubgroupGeMaskKHR + Decorate 135(gl_SubgroupGtMask) BuiltIn SubgroupGtMaskKHR + Decorate 136(gl_SubgroupLeMask) BuiltIn SubgroupLeMaskKHR + Decorate 137(gl_SubgroupLtMask) BuiltIn SubgroupLtMaskKHR + Decorate 242 BuiltIn WorkgroupSize + 2: TypeVoid + 3: TypeFunction 2 + 8: TypeFloat 32 + 9: TypeVector 8(float) 4 + 10: TypePointer Function 9(fvec4) + 11: TypeFunction 2 10(ptr) + 30: TypeInt 32 0 + 31: TypePointer Function 30(int) + 33: TypeVector 30(int) 3 + 34: TypePointer Input 33(ivec3) +35(gl_LocalInvocationID): 34(ptr) Variable Input + 36: 30(int) Constant 0 + 37: TypePointer Input 30(int) +41(gl_WorkGroupID): 34(ptr) Variable Input + 51: 30(int) Constant 10 + 52: TypeBool + 54: TypeArray 9(fvec4) 51 + 55: TypePointer Workgroup 54 + 56(mem): 55(ptr) Variable Workgroup + 59(block0): TypeStruct 30(int) + 60: TypePointer Uniform 59(block0) + 61: 60(ptr) Variable Uniform + 62: TypeInt 32 1 + 63: 62(int) Constant 0 + 64: TypePointer Uniform 30(int) + 70: TypePointer Workgroup 9(fvec4) + 73: 62(int) Constant 1 + 75: TypeImage 8(float) 2D nonsampled format:Unknown + 76: TypePointer UniformConstant 75 + 77(uni_image): 76(ptr) Variable UniformConstant + 81: TypeVector 62(int) 2 + 91: 30(int) Constant 1 + 95: 30(int) Constant 264 + 96: 30(int) Constant 2 + 97: TypeVector 8(float) 2 + 98: 30(int) Constant 3 + 99: TypeArray 97(fvec2) 98 + 100(Task): TypeStruct 97(fvec2) 99 + 101: TypePointer TaskPayloadWorkgroupEXT 100(Task) + 102(mytask): 101(ptr) Variable TaskPayloadWorkgroupEXT + 103: 8(float) Constant 1106247680 + 104: 8(float) Constant 1106771968 + 105: 97(fvec2) ConstantComposite 103 104 + 106: TypePointer TaskPayloadWorkgroupEXT 97(fvec2) + 108: 8(float) Constant 1107296256 + 109: 8(float) Constant 1107558400 + 110: 97(fvec2) ConstantComposite 108 109 + 112: 8(float) Constant 1107820544 + 113: 8(float) Constant 1108082688 + 114: 97(fvec2) ConstantComposite 112 113 + 116: 62(int) Constant 2 +123(gl_SubgroupSize): 37(ptr) Variable Input +124(gl_SubgroupInvocationID): 37(ptr) Variable Input + 125: 30(int) Constant 3400 + 126: 30(int) Constant 72 + 127: 30(int) Constant 2056 +129(gl_NumSubgroups): 37(ptr) Variable Input +130(gl_SubgroupID): 37(ptr) Variable Input + 131: TypeVector 30(int) 4 + 132: TypePointer Input 131(ivec4) +133(gl_SubgroupEqMask): 132(ptr) Variable Input +134(gl_SubgroupGeMask): 132(ptr) Variable Input +135(gl_SubgroupGtMask): 132(ptr) Variable Input +136(gl_SubgroupLeMask): 132(ptr) Variable Input +137(gl_SubgroupLtMask): 132(ptr) Variable Input + 142: TypePointer Function 131(ivec4) + 144: 52(bool) ConstantFalse + 146: 131(ivec4) ConstantComposite 91 91 91 91 + 160: 52(bool) ConstantTrue + 217: 30(int) Constant 85 + 218: 131(ivec4) ConstantComposite 217 36 36 36 + 241: 30(int) Constant 32 + 242: 33(ivec3) ConstantComposite 241 91 91 + 4(main): 2 Function None 3 + 5: Label + 32(iid): 31(ptr) Variable Function + 40(gid): 31(ptr) Variable Function + 44(i): 31(ptr) Variable Function + 38: 37(ptr) AccessChain 35(gl_LocalInvocationID) 36 + 39: 30(int) Load 38 + Store 32(iid) 39 + 42: 37(ptr) AccessChain 41(gl_WorkGroupID) 36 + 43: 30(int) Load 42 + Store 40(gid) 43 + Store 44(i) 36 + Branch 45 + 45: Label + LoopMerge 47 48 None + Branch 49 + 49: Label + 50: 30(int) Load 44(i) + 53: 52(bool) ULessThan 50 51 + BranchConditional 53 46 47 + 46: Label + 57: 30(int) Load 44(i) + 58: 30(int) Load 44(i) + 65: 64(ptr) AccessChain 61 63 + 66: 30(int) Load 65 + 67: 30(int) IAdd 58 66 + 68: 8(float) ConvertUToF 67 + 69: 9(fvec4) CompositeConstruct 68 68 68 68 + 71: 70(ptr) AccessChain 56(mem) 57 + Store 71 69 + Branch 48 + 48: Label + 72: 30(int) Load 44(i) + 74: 30(int) IAdd 72 73 + Store 44(i) 74 + Branch 45 + 47: Label + 78: 75 Load 77(uni_image) + 79: 30(int) Load 32(iid) + 80: 62(int) Bitcast 79 + 82: 81(ivec2) CompositeConstruct 80 80 + 83: 30(int) Load 40(gid) + 84: 70(ptr) AccessChain 56(mem) 83 + 85: 9(fvec4) Load 84 + ImageWrite 78 82 85 + 86: 75 Load 77(uni_image) + 87: 30(int) Load 32(iid) + 88: 62(int) Bitcast 87 + 89: 81(ivec2) CompositeConstruct 88 88 + 90: 30(int) Load 40(gid) + 92: 30(int) IAdd 90 91 + 93: 70(ptr) AccessChain 56(mem) 92 + 94: 9(fvec4) Load 93 + ImageWrite 86 89 94 + MemoryBarrier 91 95 + ControlBarrier 96 96 95 + 107: 106(ptr) AccessChain 102(mytask) 63 + Store 107 105 + 111: 106(ptr) AccessChain 102(mytask) 73 63 + Store 111 110 + 115: 106(ptr) AccessChain 102(mytask) 73 73 + Store 115 114 + 117: 30(int) Load 40(gid) + 118: 30(int) UMod 117 96 + 119: 106(ptr) AccessChain 102(mytask) 73 118 + 120: 97(fvec2) Load 119 + 121: 106(ptr) AccessChain 102(mytask) 73 116 + Store 121 120 + MemoryBarrier 91 95 + ControlBarrier 96 96 95 + EmitMeshTasksEXT 98 91 91 102(mytask) + FunctionEnd + 6(basic_works(): 2 Function None 3 + 7: Label + ControlBarrier 98 98 125 + MemoryBarrier 98 125 + MemoryBarrier 98 126 + MemoryBarrier 98 127 + 128: 52(bool) GroupNonUniformElect 98 + MemoryBarrier 98 95 + Return + FunctionEnd +13(ballot_works(vf4;): 2 Function None 11 + 12(f4): 10(ptr) FunctionParameter + 14: Label + 143(ballot): 142(ptr) Variable Function + 138: 9(fvec4) Load 12(f4) + 139: 9(fvec4) GroupNonUniformBroadcast 98 138 36 + 140: 9(fvec4) Load 12(f4) + 141: 9(fvec4) GroupNonUniformBroadcastFirst 98 140 + 145: 131(ivec4) GroupNonUniformBallot 98 144 + Store 143(ballot) 145 + 147: 52(bool) GroupNonUniformInverseBallot 98 146 + 148: 131(ivec4) Load 143(ballot) + 149: 52(bool) GroupNonUniformBallotBitExtract 98 148 36 + 150: 131(ivec4) Load 143(ballot) + 151: 30(int) GroupNonUniformBallotBitCount 98 Reduce 150 + 152: 131(ivec4) Load 143(ballot) + 153: 30(int) GroupNonUniformBallotBitCount 98 InclusiveScan 152 + 154: 131(ivec4) Load 143(ballot) + 155: 30(int) GroupNonUniformBallotBitCount 98 ExclusiveScan 154 + 156: 131(ivec4) Load 143(ballot) + 157: 30(int) GroupNonUniformBallotFindLSB 98 156 + 158: 131(ivec4) Load 143(ballot) + 159: 30(int) GroupNonUniformBallotFindMSB 98 158 + Return + FunctionEnd +16(vote_works(vf4;): 2 Function None 11 + 15(f4): 10(ptr) FunctionParameter + 17: Label + 161: 52(bool) GroupNonUniformAll 98 160 + 162: 52(bool) GroupNonUniformAny 98 144 + 163: 9(fvec4) Load 15(f4) + 164: 52(bool) GroupNonUniformAllEqual 98 163 + Return + FunctionEnd +19(shuffle_works(vf4;): 2 Function None 11 + 18(f4): 10(ptr) FunctionParameter + 20: Label + 165: 9(fvec4) Load 18(f4) + 166: 9(fvec4) GroupNonUniformShuffle 98 165 36 + 167: 9(fvec4) Load 18(f4) + 168: 9(fvec4) GroupNonUniformShuffleXor 98 167 91 + 169: 9(fvec4) Load 18(f4) + 170: 9(fvec4) GroupNonUniformShuffleUp 98 169 91 + 171: 9(fvec4) Load 18(f4) + 172: 9(fvec4) GroupNonUniformShuffleDown 98 171 91 + Return + FunctionEnd +22(arith_works(vf4;): 2 Function None 11 + 21(f4): 10(ptr) FunctionParameter + 23: Label + 181(ballot): 142(ptr) Variable Function + 173: 9(fvec4) Load 21(f4) + 174: 9(fvec4) GroupNonUniformFAdd 98 Reduce 173 + 175: 9(fvec4) Load 21(f4) + 176: 9(fvec4) GroupNonUniformFMul 98 Reduce 175 + 177: 9(fvec4) Load 21(f4) + 178: 9(fvec4) GroupNonUniformFMin 98 Reduce 177 + 179: 9(fvec4) Load 21(f4) + 180: 9(fvec4) GroupNonUniformFMax 98 Reduce 179 + 182: 131(ivec4) Load 181(ballot) + 183: 131(ivec4) GroupNonUniformBitwiseAnd 98 Reduce 182 + 184: 131(ivec4) Load 181(ballot) + 185: 131(ivec4) GroupNonUniformBitwiseOr 98 Reduce 184 + 186: 131(ivec4) Load 181(ballot) + 187: 131(ivec4) GroupNonUniformBitwiseXor 98 Reduce 186 + 188: 9(fvec4) Load 21(f4) + 189: 9(fvec4) GroupNonUniformFAdd 98 InclusiveScan 188 + 190: 9(fvec4) Load 21(f4) + 191: 9(fvec4) GroupNonUniformFMul 98 InclusiveScan 190 + 192: 9(fvec4) Load 21(f4) + 193: 9(fvec4) GroupNonUniformFMin 98 InclusiveScan 192 + 194: 9(fvec4) Load 21(f4) + 195: 9(fvec4) GroupNonUniformFMax 98 InclusiveScan 194 + 196: 131(ivec4) Load 181(ballot) + 197: 131(ivec4) GroupNonUniformBitwiseAnd 98 InclusiveScan 196 + 198: 131(ivec4) Load 181(ballot) + 199: 131(ivec4) GroupNonUniformBitwiseOr 98 InclusiveScan 198 + 200: 131(ivec4) Load 181(ballot) + 201: 131(ivec4) GroupNonUniformBitwiseXor 98 InclusiveScan 200 + 202: 9(fvec4) Load 21(f4) + 203: 9(fvec4) GroupNonUniformFAdd 98 ExclusiveScan 202 + 204: 9(fvec4) Load 21(f4) + 205: 9(fvec4) GroupNonUniformFMul 98 ExclusiveScan 204 + 206: 9(fvec4) Load 21(f4) + 207: 9(fvec4) GroupNonUniformFMin 98 ExclusiveScan 206 + 208: 9(fvec4) Load 21(f4) + 209: 9(fvec4) GroupNonUniformFMax 98 ExclusiveScan 208 + 210: 131(ivec4) Load 181(ballot) + 211: 131(ivec4) GroupNonUniformBitwiseAnd 98 ExclusiveScan 210 + 212: 131(ivec4) Load 181(ballot) + 213: 131(ivec4) GroupNonUniformBitwiseOr 98 ExclusiveScan 212 + 214: 131(ivec4) Load 181(ballot) + 215: 131(ivec4) GroupNonUniformBitwiseXor 98 ExclusiveScan 214 + Return + FunctionEnd +25(clustered_works(vf4;): 2 Function None 11 + 24(f4): 10(ptr) FunctionParameter + 26: Label + 216(ballot): 142(ptr) Variable Function + Store 216(ballot) 218 + 219: 9(fvec4) Load 24(f4) + 220: 9(fvec4) GroupNonUniformFAdd 98 ClusteredReduce 219 96 + 221: 9(fvec4) Load 24(f4) + 222: 9(fvec4) GroupNonUniformFMul 98 ClusteredReduce 221 96 + 223: 9(fvec4) Load 24(f4) + 224: 9(fvec4) GroupNonUniformFMin 98 ClusteredReduce 223 96 + 225: 9(fvec4) Load 24(f4) + 226: 9(fvec4) GroupNonUniformFMax 98 ClusteredReduce 225 96 + 227: 131(ivec4) Load 216(ballot) + 228: 131(ivec4) GroupNonUniformBitwiseAnd 98 ClusteredReduce 227 96 + 229: 131(ivec4) Load 216(ballot) + 230: 131(ivec4) GroupNonUniformBitwiseOr 98 ClusteredReduce 229 96 + 231: 131(ivec4) Load 216(ballot) + 232: 131(ivec4) GroupNonUniformBitwiseXor 98 ClusteredReduce 231 96 + Return + FunctionEnd +28(quad_works(vf4;): 2 Function None 11 + 27(f4): 10(ptr) FunctionParameter + 29: Label + 233: 9(fvec4) Load 27(f4) + 234: 9(fvec4) GroupNonUniformQuadBroadcast 98 233 36 + 235: 9(fvec4) Load 27(f4) + 236: 9(fvec4) GroupNonUniformQuadSwap 98 235 36 + 237: 9(fvec4) Load 27(f4) + 238: 9(fvec4) GroupNonUniformQuadSwap 98 237 91 + 239: 9(fvec4) Load 27(f4) + 240: 9(fvec4) GroupNonUniformQuadSwap 98 239 96 + Return + FunctionEnd diff --git a/Test/baseResults/spv.460.vert.out b/Test/baseResults/spv.460.vert.out index e15f36474d..eb75ab8a9a 100644 --- a/Test/baseResults/spv.460.vert.out +++ b/Test/baseResults/spv.460.vert.out @@ -1,6 +1,6 @@ spv.460.vert // Module Version 10000 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 20 Capability Shader diff --git a/Test/baseResults/spv.8bit-16bit-construction.frag.out b/Test/baseResults/spv.8bit-16bit-construction.frag.out index 4eb90210d7..9a85a6ac73 100644 --- a/Test/baseResults/spv.8bit-16bit-construction.frag.out +++ b/Test/baseResults/spv.8bit-16bit-construction.frag.out @@ -1,7 +1,7 @@ spv.8bit-16bit-construction.frag Validation failed // Module Version 10000 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 43 Capability Shader diff --git a/Test/baseResults/spv.8bitstorage-int.frag.out b/Test/baseResults/spv.8bitstorage-int.frag.out index 00ef309873..830b3e3296 100644 --- a/Test/baseResults/spv.8bitstorage-int.frag.out +++ b/Test/baseResults/spv.8bitstorage-int.frag.out @@ -1,6 +1,6 @@ spv.8bitstorage-int.frag // Module Version 10000 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 171 Capability Shader diff --git a/Test/baseResults/spv.8bitstorage-ssbo.vert.out b/Test/baseResults/spv.8bitstorage-ssbo.vert.out index 863eb68ffd..e8e9ca35df 100644 --- a/Test/baseResults/spv.8bitstorage-ssbo.vert.out +++ b/Test/baseResults/spv.8bitstorage-ssbo.vert.out @@ -1,6 +1,6 @@ spv.8bitstorage-ssbo.vert // Module Version 10000 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 28 Capability Shader diff --git a/Test/baseResults/spv.8bitstorage-ubo.vert.out b/Test/baseResults/spv.8bitstorage-ubo.vert.out index c64945fa6a..f41f63eeec 100644 --- a/Test/baseResults/spv.8bitstorage-ubo.vert.out +++ b/Test/baseResults/spv.8bitstorage-ubo.vert.out @@ -1,6 +1,6 @@ spv.8bitstorage-ubo.vert // Module Version 10000 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 29 Capability Shader diff --git a/Test/baseResults/spv.8bitstorage-uint.frag.out b/Test/baseResults/spv.8bitstorage-uint.frag.out index 5809991fcc..f372baf13d 100644 --- a/Test/baseResults/spv.8bitstorage-uint.frag.out +++ b/Test/baseResults/spv.8bitstorage-uint.frag.out @@ -1,6 +1,6 @@ spv.8bitstorage-uint.frag // Module Version 10000 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 173 Capability Shader diff --git a/Test/baseResults/spv.ARMCoreBuiltIns.frag.out b/Test/baseResults/spv.ARMCoreBuiltIns.frag.out new file mode 100644 index 0000000000..ccfb40936e --- /dev/null +++ b/Test/baseResults/spv.ARMCoreBuiltIns.frag.out @@ -0,0 +1,61 @@ +spv.ARMCoreBuiltIns.frag +// Module Version 10000 +// Generated by (magic number): 8000b +// Id's are bound by 26 + + Capability Shader + Capability CoreBuiltinsARM + Extension "SPV_ARM_core_builtins" + 1: ExtInstImport "GLSL.std.450" + MemoryModel Logical GLSL450 + EntryPoint Fragment 4 "main" 10 14 15 17 19 21 + ExecutionMode 4 OriginUpperLeft + Source GLSL 450 + SourceExtension "GL_ARM_shader_core_builtins" + Name 4 "main" + Name 8 "temp" + Name 10 "gl_WarpMaxIDARM" + Name 14 "data" + Name 15 "gl_CoreIDARM" + Name 17 "gl_CoreCountARM" + Name 19 "gl_CoreMaxIDARM" + Name 21 "gl_WarpIDARM" + Decorate 10(gl_WarpMaxIDARM) Flat + Decorate 10(gl_WarpMaxIDARM) BuiltIn BuiltInWarpMaxIDARM + Decorate 14(data) Location 0 + Decorate 15(gl_CoreIDARM) Flat + Decorate 15(gl_CoreIDARM) BuiltIn CoreIDARM + Decorate 17(gl_CoreCountARM) Flat + Decorate 17(gl_CoreCountARM) BuiltIn CoreCountARM + Decorate 19(gl_CoreMaxIDARM) Flat + Decorate 19(gl_CoreMaxIDARM) BuiltIn CoreMaxIDARM + Decorate 21(gl_WarpIDARM) Flat + Decorate 21(gl_WarpIDARM) BuiltIn WarpIDARM + 2: TypeVoid + 3: TypeFunction 2 + 6: TypeInt 32 0 + 7: TypePointer Function 6(int) + 9: TypePointer Input 6(int) +10(gl_WarpMaxIDARM): 9(ptr) Variable Input + 12: TypeVector 6(int) 4 + 13: TypePointer Output 12(ivec4) + 14(data): 13(ptr) Variable Output +15(gl_CoreIDARM): 9(ptr) Variable Input +17(gl_CoreCountARM): 9(ptr) Variable Input +19(gl_CoreMaxIDARM): 9(ptr) Variable Input +21(gl_WarpIDARM): 9(ptr) Variable Input + 4(main): 2 Function None 3 + 5: Label + 8(temp): 7(ptr) Variable Function + 11: 6(int) Load 10(gl_WarpMaxIDARM) + Store 8(temp) 11 + 16: 6(int) Load 15(gl_CoreIDARM) + 18: 6(int) Load 17(gl_CoreCountARM) + 20: 6(int) Load 19(gl_CoreMaxIDARM) + 22: 6(int) Load 21(gl_WarpIDARM) + 23: 6(int) Load 8(temp) + 24: 6(int) IAdd 22 23 + 25: 12(ivec4) CompositeConstruct 16 18 20 24 + Store 14(data) 25 + Return + FunctionEnd diff --git a/Test/baseResults/spv.ARMCoreBuiltIns.vert.out b/Test/baseResults/spv.ARMCoreBuiltIns.vert.out new file mode 100644 index 0000000000..5419be4541 --- /dev/null +++ b/Test/baseResults/spv.ARMCoreBuiltIns.vert.out @@ -0,0 +1,65 @@ +spv.ARMCoreBuiltIns.vert +// Module Version 10000 +// Generated by (magic number): 8000b +// Id's are bound by 31 + + Capability Shader + Capability CoreBuiltinsARM + Extension "SPV_ARM_core_builtins" + 1: ExtInstImport "GLSL.std.450" + MemoryModel Logical GLSL450 + EntryPoint Vertex 4 "main" 10 18 20 22 24 + Source GLSL 450 + SourceExtension "GL_ARM_shader_core_builtins" + Name 4 "main" + Name 8 "temp" + Name 10 "gl_WarpMaxIDARM" + Name 13 "Output" + MemberName 13(Output) 0 "result" + Name 15 "" + Name 18 "gl_CoreIDARM" + Name 20 "gl_CoreCountARM" + Name 22 "gl_CoreMaxIDARM" + Name 24 "gl_WarpIDARM" + Decorate 10(gl_WarpMaxIDARM) BuiltIn BuiltInWarpMaxIDARM + MemberDecorate 13(Output) 0 Offset 0 + Decorate 13(Output) BufferBlock + Decorate 15 DescriptorSet 0 + Decorate 15 Binding 0 + Decorate 18(gl_CoreIDARM) BuiltIn CoreIDARM + Decorate 20(gl_CoreCountARM) BuiltIn CoreCountARM + Decorate 22(gl_CoreMaxIDARM) BuiltIn CoreMaxIDARM + Decorate 24(gl_WarpIDARM) BuiltIn WarpIDARM + 2: TypeVoid + 3: TypeFunction 2 + 6: TypeInt 32 0 + 7: TypePointer Function 6(int) + 9: TypePointer Input 6(int) +10(gl_WarpMaxIDARM): 9(ptr) Variable Input + 12: TypeVector 6(int) 4 + 13(Output): TypeStruct 12(ivec4) + 14: TypePointer Uniform 13(Output) + 15: 14(ptr) Variable Uniform + 16: TypeInt 32 1 + 17: 16(int) Constant 0 +18(gl_CoreIDARM): 9(ptr) Variable Input +20(gl_CoreCountARM): 9(ptr) Variable Input +22(gl_CoreMaxIDARM): 9(ptr) Variable Input +24(gl_WarpIDARM): 9(ptr) Variable Input + 29: TypePointer Uniform 12(ivec4) + 4(main): 2 Function None 3 + 5: Label + 8(temp): 7(ptr) Variable Function + 11: 6(int) Load 10(gl_WarpMaxIDARM) + Store 8(temp) 11 + 19: 6(int) Load 18(gl_CoreIDARM) + 21: 6(int) Load 20(gl_CoreCountARM) + 23: 6(int) Load 22(gl_CoreMaxIDARM) + 25: 6(int) Load 24(gl_WarpIDARM) + 26: 6(int) Load 8(temp) + 27: 6(int) IAdd 25 26 + 28: 12(ivec4) CompositeConstruct 19 21 23 27 + 30: 29(ptr) AccessChain 15 17 + Store 30 28 + Return + FunctionEnd diff --git a/Test/baseResults/spv.AnyHitShader.rahit.out b/Test/baseResults/spv.AnyHitShader.rahit.out index c893f88d42..d075b368b7 100644 --- a/Test/baseResults/spv.AnyHitShader.rahit.out +++ b/Test/baseResults/spv.AnyHitShader.rahit.out @@ -1,6 +1,6 @@ spv.AnyHitShader.rahit // Module Version 10000 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 81 Capability RayTracingNV diff --git a/Test/baseResults/spv.AnyHitShaderMotion.rahit.out b/Test/baseResults/spv.AnyHitShaderMotion.rahit.out index f9e1e1b959..3d859db451 100644 --- a/Test/baseResults/spv.AnyHitShaderMotion.rahit.out +++ b/Test/baseResults/spv.AnyHitShaderMotion.rahit.out @@ -1,6 +1,6 @@ spv.AnyHitShaderMotion.rahit // Module Version 10400 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 14 Capability RayTracingKHR diff --git a/Test/baseResults/spv.AofA.frag.out b/Test/baseResults/spv.AofA.frag.out index 57cdcb06dd..b2df36a625 100644 --- a/Test/baseResults/spv.AofA.frag.out +++ b/Test/baseResults/spv.AofA.frag.out @@ -3,7 +3,7 @@ WARNING: 0:6: '[][]' : Generating SPIR-V array-of-arrays, but Vulkan only suppor Validation failed // Module Version 10000 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 104 Capability Shader diff --git a/Test/baseResults/spv.ClosestHitShader.rchit.out b/Test/baseResults/spv.ClosestHitShader.rchit.out index b76629c299..80b5115c20 100644 --- a/Test/baseResults/spv.ClosestHitShader.rchit.out +++ b/Test/baseResults/spv.ClosestHitShader.rchit.out @@ -1,6 +1,6 @@ spv.ClosestHitShader.rchit // Module Version 10000 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 88 Capability RayTracingNV diff --git a/Test/baseResults/spv.ClosestHitShaderMotion.rchit.out b/Test/baseResults/spv.ClosestHitShaderMotion.rchit.out index 45679eb070..e20df80a94 100644 --- a/Test/baseResults/spv.ClosestHitShaderMotion.rchit.out +++ b/Test/baseResults/spv.ClosestHitShaderMotion.rchit.out @@ -1,6 +1,6 @@ spv.ClosestHitShaderMotion.rchit // Module Version 10400 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 33 Capability RayTracingKHR diff --git a/Test/baseResults/spv.GeometryShaderPassthrough.geom.out b/Test/baseResults/spv.GeometryShaderPassthrough.geom.out index 4b29238fbe..57fa6911b9 100644 --- a/Test/baseResults/spv.GeometryShaderPassthrough.geom.out +++ b/Test/baseResults/spv.GeometryShaderPassthrough.geom.out @@ -1,6 +1,6 @@ spv.GeometryShaderPassthrough.geom // Module Version 10000 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 15 Capability Geometry diff --git a/Test/baseResults/spv.IntersectShader.rint.out b/Test/baseResults/spv.IntersectShader.rint.out index 7b0058cbb0..81d86cd846 100644 --- a/Test/baseResults/spv.IntersectShader.rint.out +++ b/Test/baseResults/spv.IntersectShader.rint.out @@ -1,6 +1,6 @@ spv.IntersectShader.rint // Module Version 10000 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 71 Capability RayTracingNV diff --git a/Test/baseResults/spv.IntersectShaderMotion.rint.out b/Test/baseResults/spv.IntersectShaderMotion.rint.out index f77c9a81a1..b3326ee29e 100644 --- a/Test/baseResults/spv.IntersectShaderMotion.rint.out +++ b/Test/baseResults/spv.IntersectShaderMotion.rint.out @@ -1,6 +1,6 @@ spv.IntersectShaderMotion.rint // Module Version 10400 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 14 Capability RayTracingKHR diff --git a/Test/baseResults/spv.MissShader.rmiss.out b/Test/baseResults/spv.MissShader.rmiss.out index e573bbae9b..581c0c6b9f 100644 --- a/Test/baseResults/spv.MissShader.rmiss.out +++ b/Test/baseResults/spv.MissShader.rmiss.out @@ -1,6 +1,6 @@ spv.MissShader.rmiss // Module Version 10000 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 59 Capability RayTracingNV diff --git a/Test/baseResults/spv.MissShaderMotion.rmiss.out b/Test/baseResults/spv.MissShaderMotion.rmiss.out index 185c934b0a..220dda9942 100644 --- a/Test/baseResults/spv.MissShaderMotion.rmiss.out +++ b/Test/baseResults/spv.MissShaderMotion.rmiss.out @@ -1,6 +1,6 @@ spv.MissShaderMotion.rmiss // Module Version 10400 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 33 Capability RayTracingKHR diff --git a/Test/baseResults/spv.OVR_multiview.vert.out b/Test/baseResults/spv.OVR_multiview.vert.out index 90afed292d..df7d949914 100644 --- a/Test/baseResults/spv.OVR_multiview.vert.out +++ b/Test/baseResults/spv.OVR_multiview.vert.out @@ -1,6 +1,6 @@ spv.OVR_multiview.vert // Module Version 10000 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 27 Capability Shader diff --git a/Test/baseResults/spv.Operations.frag.out b/Test/baseResults/spv.Operations.frag.out index fc8e241527..f9059c657a 100644 --- a/Test/baseResults/spv.Operations.frag.out +++ b/Test/baseResults/spv.Operations.frag.out @@ -1,6 +1,6 @@ spv.Operations.frag // Module Version 10000 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 591 Capability Shader diff --git a/Test/baseResults/spv.RayCallable.rcall.out b/Test/baseResults/spv.RayCallable.rcall.out index 75698fcb65..1eff1fac2f 100644 --- a/Test/baseResults/spv.RayCallable.rcall.out +++ b/Test/baseResults/spv.RayCallable.rcall.out @@ -1,6 +1,6 @@ spv.RayCallable.rcall // Module Version 10000 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 30 Capability RayTracingNV diff --git a/Test/baseResults/spv.RayConstants.rgen.out b/Test/baseResults/spv.RayConstants.rgen.out index 962aeb7d24..ebdcb50bc5 100644 --- a/Test/baseResults/spv.RayConstants.rgen.out +++ b/Test/baseResults/spv.RayConstants.rgen.out @@ -1,6 +1,6 @@ spv.RayConstants.rgen // Module Version 10000 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 27 Capability RayTracingNV diff --git a/Test/baseResults/spv.RayGenShader.rgen.out b/Test/baseResults/spv.RayGenShader.rgen.out index b7085378be..01fdbf0182 100644 --- a/Test/baseResults/spv.RayGenShader.rgen.out +++ b/Test/baseResults/spv.RayGenShader.rgen.out @@ -1,6 +1,6 @@ spv.RayGenShader.rgen // Module Version 10000 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 54 Capability RayTracingNV diff --git a/Test/baseResults/spv.RayGenShader11.rgen.out b/Test/baseResults/spv.RayGenShader11.rgen.out index 48509b0d77..ae55e6589d 100644 --- a/Test/baseResults/spv.RayGenShader11.rgen.out +++ b/Test/baseResults/spv.RayGenShader11.rgen.out @@ -1,6 +1,6 @@ spv.RayGenShader11.rgen // Module Version 10300 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 53 Capability RayTracingNV diff --git a/Test/baseResults/spv.RayGenShaderArray.rgen.out b/Test/baseResults/spv.RayGenShaderArray.rgen.out index 8ddfca97fd..c3bd191130 100644 --- a/Test/baseResults/spv.RayGenShaderArray.rgen.out +++ b/Test/baseResults/spv.RayGenShaderArray.rgen.out @@ -1,6 +1,6 @@ spv.RayGenShaderArray.rgen // Module Version 10000 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 89 Capability ShaderNonUniformEXT diff --git a/Test/baseResults/spv.RayGenShaderMotion.rgen.out b/Test/baseResults/spv.RayGenShaderMotion.rgen.out index a6af236513..9a3421ca55 100644 --- a/Test/baseResults/spv.RayGenShaderMotion.rgen.out +++ b/Test/baseResults/spv.RayGenShaderMotion.rgen.out @@ -1,6 +1,6 @@ spv.RayGenShaderMotion.rgen // Module Version 10400 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 47 Capability RayTracingKHR diff --git a/Test/baseResults/spv.WorkgroupMemoryExplicitLayout.16BitAccess.comp.out b/Test/baseResults/spv.WorkgroupMemoryExplicitLayout.16BitAccess.comp.out index 31dd2dd19b..4001462d17 100644 --- a/Test/baseResults/spv.WorkgroupMemoryExplicitLayout.16BitAccess.comp.out +++ b/Test/baseResults/spv.WorkgroupMemoryExplicitLayout.16BitAccess.comp.out @@ -1,6 +1,6 @@ spv.WorkgroupMemoryExplicitLayout.16BitAccess.comp // Module Version 10400 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 25 Capability Shader diff --git a/Test/baseResults/spv.WorkgroupMemoryExplicitLayout.8BitAccess.comp.out b/Test/baseResults/spv.WorkgroupMemoryExplicitLayout.8BitAccess.comp.out index 3447791f24..d0906a4211 100644 --- a/Test/baseResults/spv.WorkgroupMemoryExplicitLayout.8BitAccess.comp.out +++ b/Test/baseResults/spv.WorkgroupMemoryExplicitLayout.8BitAccess.comp.out @@ -1,6 +1,6 @@ spv.WorkgroupMemoryExplicitLayout.8BitAccess.comp // Module Version 10400 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 20 Capability Shader diff --git a/Test/baseResults/spv.WorkgroupMemoryExplicitLayout.MultiBlock.comp.out b/Test/baseResults/spv.WorkgroupMemoryExplicitLayout.MultiBlock.comp.out index b578bd3ad1..2a15286e96 100644 --- a/Test/baseResults/spv.WorkgroupMemoryExplicitLayout.MultiBlock.comp.out +++ b/Test/baseResults/spv.WorkgroupMemoryExplicitLayout.MultiBlock.comp.out @@ -1,6 +1,6 @@ spv.WorkgroupMemoryExplicitLayout.MultiBlock.comp // Module Version 10400 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 24 Capability Shader diff --git a/Test/baseResults/spv.WorkgroupMemoryExplicitLayout.NonBlock.comp.out b/Test/baseResults/spv.WorkgroupMemoryExplicitLayout.NonBlock.comp.out index 19bcff6bcb..9a9e919926 100644 --- a/Test/baseResults/spv.WorkgroupMemoryExplicitLayout.NonBlock.comp.out +++ b/Test/baseResults/spv.WorkgroupMemoryExplicitLayout.NonBlock.comp.out @@ -1,6 +1,6 @@ spv.WorkgroupMemoryExplicitLayout.NonBlock.comp // Module Version 10400 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 17 Capability Shader diff --git a/Test/baseResults/spv.WorkgroupMemoryExplicitLayout.SingleBlock.comp.out b/Test/baseResults/spv.WorkgroupMemoryExplicitLayout.SingleBlock.comp.out index 413fd2e84a..cb3bd31a6a 100644 --- a/Test/baseResults/spv.WorkgroupMemoryExplicitLayout.SingleBlock.comp.out +++ b/Test/baseResults/spv.WorkgroupMemoryExplicitLayout.SingleBlock.comp.out @@ -1,6 +1,6 @@ spv.WorkgroupMemoryExplicitLayout.SingleBlock.comp // Module Version 10400 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 19 Capability Shader diff --git a/Test/baseResults/spv.WorkgroupMemoryExplicitLayout.scalar.comp.out b/Test/baseResults/spv.WorkgroupMemoryExplicitLayout.scalar.comp.out index 6a43e23683..3d7ece13a2 100644 --- a/Test/baseResults/spv.WorkgroupMemoryExplicitLayout.scalar.comp.out +++ b/Test/baseResults/spv.WorkgroupMemoryExplicitLayout.scalar.comp.out @@ -1,6 +1,6 @@ spv.WorkgroupMemoryExplicitLayout.scalar.comp // Module Version 10400 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 29 Capability Shader diff --git a/Test/baseResults/spv.WorkgroupMemoryExplicitLayout.std140.comp.out b/Test/baseResults/spv.WorkgroupMemoryExplicitLayout.std140.comp.out index df4b8aed4e..5c8f86d25c 100644 --- a/Test/baseResults/spv.WorkgroupMemoryExplicitLayout.std140.comp.out +++ b/Test/baseResults/spv.WorkgroupMemoryExplicitLayout.std140.comp.out @@ -1,6 +1,6 @@ spv.WorkgroupMemoryExplicitLayout.std140.comp // Module Version 10400 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 29 Capability Shader diff --git a/Test/baseResults/spv.WorkgroupMemoryExplicitLayout.std430.comp.out b/Test/baseResults/spv.WorkgroupMemoryExplicitLayout.std430.comp.out index e782784b68..bfc35e98dc 100644 --- a/Test/baseResults/spv.WorkgroupMemoryExplicitLayout.std430.comp.out +++ b/Test/baseResults/spv.WorkgroupMemoryExplicitLayout.std430.comp.out @@ -1,6 +1,6 @@ spv.WorkgroupMemoryExplicitLayout.std430.comp // Module Version 10400 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 29 Capability Shader diff --git a/Test/baseResults/spv.accessChain.frag.out b/Test/baseResults/spv.accessChain.frag.out index 379131b141..2426999bf3 100644 --- a/Test/baseResults/spv.accessChain.frag.out +++ b/Test/baseResults/spv.accessChain.frag.out @@ -1,6 +1,6 @@ spv.accessChain.frag // Module Version 10000 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 228 Capability Shader diff --git a/Test/baseResults/spv.aggOps.frag.out b/Test/baseResults/spv.aggOps.frag.out index 05b14eaa49..bc19f23f55 100644 --- a/Test/baseResults/spv.aggOps.frag.out +++ b/Test/baseResults/spv.aggOps.frag.out @@ -3,7 +3,7 @@ WARNING: 0:4: '' : all default precisions are highp; use precision statements to "precision mediump int; precision highp float;" // Module Version 10000 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 215 Capability Shader diff --git a/Test/baseResults/spv.always-discard.frag.out b/Test/baseResults/spv.always-discard.frag.out index ed21b38697..ba3331a652 100644 --- a/Test/baseResults/spv.always-discard.frag.out +++ b/Test/baseResults/spv.always-discard.frag.out @@ -1,6 +1,6 @@ spv.always-discard.frag // Module Version 10000 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 84 Capability Shader diff --git a/Test/baseResults/spv.always-discard2.frag.out b/Test/baseResults/spv.always-discard2.frag.out index 5e7ac9fea0..60262f7067 100644 --- a/Test/baseResults/spv.always-discard2.frag.out +++ b/Test/baseResults/spv.always-discard2.frag.out @@ -1,6 +1,6 @@ spv.always-discard2.frag // Module Version 10000 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 40 Capability Shader diff --git a/Test/baseResults/spv.arbPostDepthCoverage.frag.out b/Test/baseResults/spv.arbPostDepthCoverage.frag.out index 9b911cfc24..5daa156d48 100644 --- a/Test/baseResults/spv.arbPostDepthCoverage.frag.out +++ b/Test/baseResults/spv.arbPostDepthCoverage.frag.out @@ -1,6 +1,6 @@ spv.arbPostDepthCoverage.frag // Module Version 10000 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 18 Capability Shader diff --git a/Test/baseResults/spv.atomiAddEXT.error.mesh.out b/Test/baseResults/spv.atomiAddEXT.error.mesh.out new file mode 100644 index 0000000000..ce8f3d72d4 --- /dev/null +++ b/Test/baseResults/spv.atomiAddEXT.error.mesh.out @@ -0,0 +1,7 @@ +spv.atomiAddEXT.error.mesh +ERROR: 0:21: 'assign' : l-value required "mytask" (can't modify variable with storage qualifier taskPayloadSharedEXT in mesh shaders) +ERROR: 0:21: 'out' : Non-L-value cannot be passed for 'out' or 'inout' parameters. +ERROR: 2 compilation errors. No code generated. + + +SPIR-V is not generated for failed compile or link diff --git a/Test/baseResults/spv.atomiAddEXT.task.out b/Test/baseResults/spv.atomiAddEXT.task.out new file mode 100644 index 0000000000..9ff35aa6eb --- /dev/null +++ b/Test/baseResults/spv.atomiAddEXT.task.out @@ -0,0 +1,71 @@ +spv.atomiAddEXT.task +// Module Version 10400 +// Generated by (magic number): 8000b +// Id's are bound by 34 + + Capability MeshShadingEXT + Extension "SPV_EXT_mesh_shader" + 1: ExtInstImport "GLSL.std.450" + MemoryModel Logical GLSL450 + EntryPoint TaskEXT 4 "main" 9 23 28 + ExecutionMode 4 LocalSize 1 1 1 + Source GLSL 460 + SourceExtension "GL_EXT_mesh_shader" + Name 4 "main" + Name 7 "Buffer" + MemberName 7(Buffer) 0 "x" + Name 9 "" + Name 20 "structType" + MemberName 20(structType) 0 "y" + Name 21 "t2" + MemberName 21(t2) 0 "f" + Name 23 "t" + Name 26 "taskBlock" + MemberName 26(taskBlock) 0 "atom1" + Name 28 "mytask" + MemberDecorate 7(Buffer) 0 Coherent + MemberDecorate 7(Buffer) 0 Offset 0 + Decorate 7(Buffer) Block + Decorate 9 DescriptorSet 0 + Decorate 9 Binding 1 + Decorate 19 ArrayStride 4 + MemberDecorate 20(structType) 0 Offset 0 + MemberDecorate 21(t2) 0 Offset 0 + Decorate 21(t2) Block + Decorate 23(t) DescriptorSet 0 + Decorate 23(t) Binding 0 + Decorate 33 BuiltIn WorkgroupSize + 2: TypeVoid + 3: TypeFunction 2 + 6: TypeInt 32 1 + 7(Buffer): TypeStruct 6(int) + 8: TypePointer StorageBuffer 7(Buffer) + 9: 8(ptr) Variable StorageBuffer + 10: 6(int) Constant 0 + 11: TypePointer StorageBuffer 6(int) + 13: 6(int) Constant 1 + 14: TypeInt 32 0 + 15: 14(int) Constant 1 + 16: 14(int) Constant 0 + 18: 14(int) Constant 3 + 19: TypeArray 6(int) 18 + 20(structType): TypeStruct 19 + 21(t2): TypeStruct 20(structType) + 22: TypePointer StorageBuffer 21(t2) + 23(t): 22(ptr) Variable StorageBuffer + 26(taskBlock): TypeStruct 6(int) + 27: TypePointer TaskPayloadWorkgroupEXT 26(taskBlock) + 28(mytask): 27(ptr) Variable TaskPayloadWorkgroupEXT + 29: TypePointer TaskPayloadWorkgroupEXT 6(int) + 32: TypeVector 14(int) 3 + 33: 32(ivec3) ConstantComposite 15 15 15 + 4(main): 2 Function None 3 + 5: Label + 12: 11(ptr) AccessChain 9 10 + 17: 6(int) AtomicIAdd 12 15 16 13 + 24: 11(ptr) AccessChain 23(t) 10 10 13 + 25: 6(int) AtomicIAdd 24 15 16 13 + 30: 29(ptr) AccessChain 28(mytask) 10 + 31: 6(int) AtomicIAdd 30 15 16 13 + Return + FunctionEnd diff --git a/Test/baseResults/spv.atomic.comp.out b/Test/baseResults/spv.atomic.comp.out index e74066c9d5..7c001ae188 100644 --- a/Test/baseResults/spv.atomic.comp.out +++ b/Test/baseResults/spv.atomic.comp.out @@ -1,6 +1,6 @@ spv.atomic.comp // Module Version 10000 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 74 Capability Shader diff --git a/Test/baseResults/spv.atomicAdd.bufferReference.comp.out b/Test/baseResults/spv.atomicAdd.bufferReference.comp.out index 9ecc74259d..a00c45a3f3 100644 --- a/Test/baseResults/spv.atomicAdd.bufferReference.comp.out +++ b/Test/baseResults/spv.atomicAdd.bufferReference.comp.out @@ -1,6 +1,6 @@ spv.atomicAdd.bufferReference.comp // Module Version 10000 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 188 Capability Shader diff --git a/Test/baseResults/spv.atomicFloat.comp.out b/Test/baseResults/spv.atomicFloat.comp.out index 3799557b3d..acb5d817b5 100644 --- a/Test/baseResults/spv.atomicFloat.comp.out +++ b/Test/baseResults/spv.atomicFloat.comp.out @@ -1,6 +1,6 @@ spv.atomicFloat.comp // Module Version 10000 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 470 Capability Shader diff --git a/Test/baseResults/spv.atomicInt64.comp.out b/Test/baseResults/spv.atomicInt64.comp.out index 5b2e134041..24805cccc0 100644 --- a/Test/baseResults/spv.atomicInt64.comp.out +++ b/Test/baseResults/spv.atomicInt64.comp.out @@ -1,6 +1,6 @@ spv.atomicInt64.comp // Module Version 10000 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 149 Capability Shader diff --git a/Test/baseResults/spv.atomicRvalue.error.vert.out b/Test/baseResults/spv.atomicRvalue.error.vert.out new file mode 100644 index 0000000000..a340141e7b --- /dev/null +++ b/Test/baseResults/spv.atomicRvalue.error.vert.out @@ -0,0 +1,9 @@ +spv.atomicRvalue.error.vert +ERROR: 0:5: 'assign' : l-value required +ERROR: 0:5: 'out' : Non-L-value cannot be passed for 'out' or 'inout' parameters. +ERROR: 0:5: 'atomicAdd' : Only l-values corresponding to shader block storage or shared variables can be used with atomic memory functions. +ERROR: 0:6: 'atomicAdd' : Only l-values corresponding to shader block storage or shared variables can be used with atomic memory functions. +ERROR: 4 compilation errors. No code generated. + + +SPIR-V is not generated for failed compile or link diff --git a/Test/baseResults/spv.atomicStoreInt64.comp.out b/Test/baseResults/spv.atomicStoreInt64.comp.out index 3adadcb288..c2b3f30d7f 100644 --- a/Test/baseResults/spv.atomicStoreInt64.comp.out +++ b/Test/baseResults/spv.atomicStoreInt64.comp.out @@ -1,6 +1,6 @@ spv.atomicStoreInt64.comp // Module Version 10000 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 25 Capability Shader diff --git a/Test/baseResults/spv.barrier.vert.out b/Test/baseResults/spv.barrier.vert.out index 7199882528..5208412044 100644 --- a/Test/baseResults/spv.barrier.vert.out +++ b/Test/baseResults/spv.barrier.vert.out @@ -1,6 +1,6 @@ spv.barrier.vert // Module Version 10000 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 24 Capability Shader diff --git a/Test/baseResults/spv.bitCast.frag.out b/Test/baseResults/spv.bitCast.frag.out index 88b2a09f69..9b3c9ec025 100644 --- a/Test/baseResults/spv.bitCast.frag.out +++ b/Test/baseResults/spv.bitCast.frag.out @@ -1,6 +1,6 @@ spv.bitCast.frag // Module Version 10000 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 198 Capability Shader diff --git a/Test/baseResults/spv.bool.vert.out b/Test/baseResults/spv.bool.vert.out index fb7c6860b2..265d9007f5 100644 --- a/Test/baseResults/spv.bool.vert.out +++ b/Test/baseResults/spv.bool.vert.out @@ -1,6 +1,6 @@ spv.bool.vert // Module Version 10000 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 46 Capability Shader diff --git a/Test/baseResults/spv.boolInBlock.frag.out b/Test/baseResults/spv.boolInBlock.frag.out index 004c204081..c234cb4d35 100644 --- a/Test/baseResults/spv.boolInBlock.frag.out +++ b/Test/baseResults/spv.boolInBlock.frag.out @@ -1,6 +1,6 @@ spv.boolInBlock.frag // Module Version 10000 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 102 Capability Shader diff --git a/Test/baseResults/spv.branch-return.vert.out b/Test/baseResults/spv.branch-return.vert.out index 30918aba41..53ef876579 100644 --- a/Test/baseResults/spv.branch-return.vert.out +++ b/Test/baseResults/spv.branch-return.vert.out @@ -1,6 +1,6 @@ spv.branch-return.vert // Module Version 10000 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 38 Capability Shader diff --git a/Test/baseResults/spv.buffer.autoassign.frag.out b/Test/baseResults/spv.buffer.autoassign.frag.out index 34752664a9..3afe64396c 100644 --- a/Test/baseResults/spv.buffer.autoassign.frag.out +++ b/Test/baseResults/spv.buffer.autoassign.frag.out @@ -1,6 +1,6 @@ spv.buffer.autoassign.frag // Module Version 10000 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 50 Capability Shader diff --git a/Test/baseResults/spv.bufferhandle1.frag.out b/Test/baseResults/spv.bufferhandle1.frag.out index b49c129630..c44ad2a609 100644 --- a/Test/baseResults/spv.bufferhandle1.frag.out +++ b/Test/baseResults/spv.bufferhandle1.frag.out @@ -1,6 +1,6 @@ spv.bufferhandle1.frag // Module Version 10000 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 52 Capability Shader diff --git a/Test/baseResults/spv.bufferhandle10.frag.out b/Test/baseResults/spv.bufferhandle10.frag.out index f9ab60d290..93c3f70a4c 100644 --- a/Test/baseResults/spv.bufferhandle10.frag.out +++ b/Test/baseResults/spv.bufferhandle10.frag.out @@ -1,6 +1,6 @@ spv.bufferhandle10.frag // Module Version 10000 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 40 Capability Shader diff --git a/Test/baseResults/spv.bufferhandle11.frag.out b/Test/baseResults/spv.bufferhandle11.frag.out index 9dd1c7b84a..eec3cf34f2 100644 --- a/Test/baseResults/spv.bufferhandle11.frag.out +++ b/Test/baseResults/spv.bufferhandle11.frag.out @@ -3,7 +3,7 @@ WARNING: 0:6: '' : all default precisions are highp; use precision statements to "precision mediump int; precision highp float;" // Module Version 10000 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 61 Capability Shader diff --git a/Test/baseResults/spv.bufferhandle12.frag.out b/Test/baseResults/spv.bufferhandle12.frag.out index 7cd5cb5e4d..319684f801 100644 --- a/Test/baseResults/spv.bufferhandle12.frag.out +++ b/Test/baseResults/spv.bufferhandle12.frag.out @@ -3,7 +3,7 @@ WARNING: 0:6: '' : all default precisions are highp; use precision statements to "precision mediump int; precision highp float;" // Module Version 10000 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 183 Capability Shader diff --git a/Test/baseResults/spv.bufferhandle13.frag.out b/Test/baseResults/spv.bufferhandle13.frag.out index 5ce24acd38..dd430896e6 100644 --- a/Test/baseResults/spv.bufferhandle13.frag.out +++ b/Test/baseResults/spv.bufferhandle13.frag.out @@ -1,6 +1,6 @@ spv.bufferhandle13.frag // Module Version 10000 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 58 Capability Shader diff --git a/Test/baseResults/spv.bufferhandle14.frag.out b/Test/baseResults/spv.bufferhandle14.frag.out index 34df7538c9..4f994e194b 100644 --- a/Test/baseResults/spv.bufferhandle14.frag.out +++ b/Test/baseResults/spv.bufferhandle14.frag.out @@ -1,6 +1,6 @@ spv.bufferhandle14.frag // Module Version 10000 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 46 Capability Shader diff --git a/Test/baseResults/spv.bufferhandle15.frag.out b/Test/baseResults/spv.bufferhandle15.frag.out index ab1b4dbaef..34d3d598cf 100644 --- a/Test/baseResults/spv.bufferhandle15.frag.out +++ b/Test/baseResults/spv.bufferhandle15.frag.out @@ -3,7 +3,7 @@ WARNING: 0:16: '' : all default precisions are highp; use precision statements t "precision mediump int; precision highp float;" // Module Version 10000 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 60 Capability Shader diff --git a/Test/baseResults/spv.bufferhandle16.frag.out b/Test/baseResults/spv.bufferhandle16.frag.out index a9d9dcf265..ee04d361d6 100644 --- a/Test/baseResults/spv.bufferhandle16.frag.out +++ b/Test/baseResults/spv.bufferhandle16.frag.out @@ -1,6 +1,6 @@ spv.bufferhandle16.frag // Module Version 10000 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 48 Capability Shader diff --git a/Test/baseResults/spv.bufferhandle18.frag.out b/Test/baseResults/spv.bufferhandle18.frag.out index 59ad6d02be..97c961a76c 100644 --- a/Test/baseResults/spv.bufferhandle18.frag.out +++ b/Test/baseResults/spv.bufferhandle18.frag.out @@ -1,6 +1,6 @@ spv.bufferhandle18.frag // Module Version 10000 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 196 Capability Shader diff --git a/Test/baseResults/spv.bufferhandle2.frag.out b/Test/baseResults/spv.bufferhandle2.frag.out index e20f3b7f2b..31a39f261e 100644 --- a/Test/baseResults/spv.bufferhandle2.frag.out +++ b/Test/baseResults/spv.bufferhandle2.frag.out @@ -1,6 +1,6 @@ spv.bufferhandle2.frag // Module Version 10000 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 45 Capability Shader diff --git a/Test/baseResults/spv.bufferhandle3.frag.out b/Test/baseResults/spv.bufferhandle3.frag.out index 65ad1ca6fa..9f66b5cf1c 100644 --- a/Test/baseResults/spv.bufferhandle3.frag.out +++ b/Test/baseResults/spv.bufferhandle3.frag.out @@ -1,6 +1,6 @@ spv.bufferhandle3.frag // Module Version 10000 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 50 Capability Shader diff --git a/Test/baseResults/spv.bufferhandle4.frag.out b/Test/baseResults/spv.bufferhandle4.frag.out index e06bca4e8b..1ccb6095de 100644 --- a/Test/baseResults/spv.bufferhandle4.frag.out +++ b/Test/baseResults/spv.bufferhandle4.frag.out @@ -1,6 +1,6 @@ spv.bufferhandle4.frag // Module Version 10000 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 61 Capability Shader diff --git a/Test/baseResults/spv.bufferhandle5.frag.out b/Test/baseResults/spv.bufferhandle5.frag.out index bf4d3a2ab3..0bcb34b072 100644 --- a/Test/baseResults/spv.bufferhandle5.frag.out +++ b/Test/baseResults/spv.bufferhandle5.frag.out @@ -1,6 +1,6 @@ spv.bufferhandle5.frag // Module Version 10000 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 22 Capability Shader diff --git a/Test/baseResults/spv.bufferhandle6.frag.out b/Test/baseResults/spv.bufferhandle6.frag.out index abc9187c84..758a30bea6 100644 --- a/Test/baseResults/spv.bufferhandle6.frag.out +++ b/Test/baseResults/spv.bufferhandle6.frag.out @@ -1,6 +1,6 @@ spv.bufferhandle6.frag // Module Version 10000 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 165 Capability Shader diff --git a/Test/baseResults/spv.bufferhandle7.frag.out b/Test/baseResults/spv.bufferhandle7.frag.out index 4282a3622c..070adb710b 100644 --- a/Test/baseResults/spv.bufferhandle7.frag.out +++ b/Test/baseResults/spv.bufferhandle7.frag.out @@ -1,6 +1,6 @@ spv.bufferhandle7.frag // Module Version 10000 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 24 Capability Shader diff --git a/Test/baseResults/spv.bufferhandle8.frag.out b/Test/baseResults/spv.bufferhandle8.frag.out index 65d4665324..52eec11016 100644 --- a/Test/baseResults/spv.bufferhandle8.frag.out +++ b/Test/baseResults/spv.bufferhandle8.frag.out @@ -1,7 +1,7 @@ spv.bufferhandle8.frag // Module Version 10000 -// Generated by (magic number): 8000a -// Id's are bound by 27 +// Generated by (magic number): 8000b +// Id's are bound by 39 Capability Shader Capability PhysicalStorageBufferAddressesEXT @@ -21,41 +21,46 @@ spv.bufferhandle8.frag MemberName 10(T1) 0 "x" Name 11 "T2" MemberName 11(T2) 0 "x" - Name 13 "T3" - MemberName 13(T3) 0 "Bindings" - Name 15 "t3" - Name 23 "t2" - MemberName 23(t2) 0 "f" - MemberName 23(t2) 1 "g" - Name 24 "blockType" - MemberName 24(blockType) 0 "a" - MemberName 24(blockType) 1 "b" - MemberName 24(blockType) 2 "c" - MemberName 24(blockType) 3 "d" - MemberName 24(blockType) 4 "e" - Name 26 "t" - MemberDecorate 8(Blah) 0 Offset 0 - MemberDecorate 8(Blah) 1 Offset 8 + Name 13 "x" + Name 14 "Blah" + MemberName 14(Blah) 0 "t1" + MemberName 14(Blah) 1 "t2" + Name 16 "T3" + MemberName 16(T3) 0 "Bindings" + Name 18 "t3" + Name 35 "t2" + MemberName 35(t2) 0 "f" + MemberName 35(t2) 1 "g" + Name 36 "blockType" + MemberName 36(blockType) 0 "a" + MemberName 36(blockType) 1 "b" + MemberName 36(blockType) 2 "c" + MemberName 36(blockType) 3 "d" + MemberName 36(blockType) 4 "e" + Name 38 "t" MemberDecorate 10(T1) 0 Offset 0 Decorate 10(T1) Block MemberDecorate 11(T2) 0 Offset 0 Decorate 11(T2) Block - Decorate 12 ArrayStride 16 - MemberDecorate 13(T3) 0 Offset 0 - Decorate 13(T3) Block - Decorate 15(t3) DescriptorSet 0 - Decorate 15(t3) Binding 0 - MemberDecorate 23(t2) 0 Offset 0 - MemberDecorate 23(t2) 1 Offset 8 - Decorate 23(t2) Block - MemberDecorate 24(blockType) 0 Offset 0 - MemberDecorate 24(blockType) 1 Offset 4 - MemberDecorate 24(blockType) 2 Offset 8 - MemberDecorate 24(blockType) 3 Offset 12 - MemberDecorate 24(blockType) 4 Offset 16 - Decorate 24(blockType) Block - Decorate 26(t) DescriptorSet 0 - Decorate 26(t) Binding 0 + MemberDecorate 14(Blah) 0 Offset 0 + MemberDecorate 14(Blah) 1 Offset 8 + Decorate 15 ArrayStride 16 + MemberDecorate 16(T3) 0 Offset 0 + Decorate 16(T3) Block + Decorate 18(t3) DescriptorSet 0 + Decorate 18(t3) Binding 0 + MemberDecorate 35(t2) 0 Offset 0 + MemberDecorate 35(t2) 1 Offset 8 + Decorate 35(t2) Block + MemberDecorate 36(blockType) 0 Offset 0 + MemberDecorate 36(blockType) 1 Offset 4 + MemberDecorate 36(blockType) 2 Offset 8 + MemberDecorate 36(blockType) 3 Offset 12 + MemberDecorate 36(blockType) 4 Offset 16 + Decorate 36(blockType) Block + Decorate 38(t) DescriptorSet 0 + Decorate 38(t) Binding 0 + Decorate 13(x) DecorationAliasedPointerEXT 2: TypeVoid 3: TypeFunction 2 TypeForwardPointer 6 PhysicalStorageBufferEXT @@ -66,24 +71,38 @@ spv.bufferhandle8.frag 6: TypePointer PhysicalStorageBufferEXT 10(T1) 11(T2): TypeStruct 9(int) 7: TypePointer PhysicalStorageBufferEXT 11(T2) - 12: TypeRuntimeArray 8(Blah) - 13(T3): TypeStruct 12 - 14: TypePointer StorageBuffer 13(T3) - 15(t3): 14(ptr) Variable StorageBuffer - 16: 9(int) Constant 0 - 17: 9(int) Constant 1 - 18: TypePointer StorageBuffer 8(Blah) - TypeForwardPointer 22 PhysicalStorageBufferEXT - 23(t2): TypeStruct 22 22 - 24(blockType): TypeStruct 9(int) 9(int) 9(int) 9(int) 9(int) - 22: TypePointer PhysicalStorageBufferEXT 24(blockType) - 25: TypePointer StorageBuffer 23(t2) - 26(t): 25(ptr) Variable StorageBuffer + 12: TypePointer Function 8(Blah) + 14(Blah): TypeStruct 6(ptr) 7(ptr) + 15: TypeRuntimeArray 14(Blah) + 16(T3): TypeStruct 15 + 17: TypePointer StorageBuffer 16(T3) + 18(t3): 17(ptr) Variable StorageBuffer + 19: 9(int) Constant 0 + 20: 9(int) Constant 2 + 21: TypePointer StorageBuffer 14(Blah) + 25: TypePointer Function 6(ptr) + 28: 9(int) Constant 1 + 29: TypePointer Function 7(ptr) + TypeForwardPointer 34 PhysicalStorageBufferEXT + 35(t2): TypeStruct 34 34 + 36(blockType): TypeStruct 9(int) 9(int) 9(int) 9(int) 9(int) + 34: TypePointer PhysicalStorageBufferEXT 36(blockType) + 37: TypePointer StorageBuffer 35(t2) + 38(t): 37(ptr) Variable StorageBuffer 4(main): 2 Function None 3 5: Label - 19: 18(ptr) AccessChain 15(t3) 16 17 - 20: 8(Blah) Load 19 - 21: 18(ptr) AccessChain 15(t3) 16 16 - Store 21 20 + 13(x): 12(ptr) Variable Function + 22: 21(ptr) AccessChain 18(t3) 19 20 + 23: 14(Blah) Load 22 + 24: 6(ptr) CompositeExtract 23 0 + 26: 25(ptr) AccessChain 13(x) 19 + Store 26 24 + 27: 7(ptr) CompositeExtract 23 1 + 30: 29(ptr) AccessChain 13(x) 28 + Store 30 27 + 31: 21(ptr) AccessChain 18(t3) 19 28 + 32: 14(Blah) Load 31 + 33: 21(ptr) AccessChain 18(t3) 19 19 + Store 33 32 Return FunctionEnd diff --git a/Test/baseResults/spv.bufferhandle9.frag.out b/Test/baseResults/spv.bufferhandle9.frag.out index 1e5091c2ef..ff7ede7a59 100644 --- a/Test/baseResults/spv.bufferhandle9.frag.out +++ b/Test/baseResults/spv.bufferhandle9.frag.out @@ -1,6 +1,6 @@ spv.bufferhandle9.frag // Module Version 10000 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 56 Capability Shader diff --git a/Test/baseResults/spv.bufferhandleUvec2.frag.out b/Test/baseResults/spv.bufferhandleUvec2.frag.out index fbdbb6aa30..133190e5f3 100644 --- a/Test/baseResults/spv.bufferhandleUvec2.frag.out +++ b/Test/baseResults/spv.bufferhandleUvec2.frag.out @@ -1,6 +1,6 @@ spv.bufferhandleUvec2.frag // Module Version 10000 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 71 Capability Shader diff --git a/Test/baseResults/spv.builtInXFB.vert.out b/Test/baseResults/spv.builtInXFB.vert.out index 1f612e2a22..b3a3e12ce5 100644 --- a/Test/baseResults/spv.builtInXFB.vert.out +++ b/Test/baseResults/spv.builtInXFB.vert.out @@ -1,6 +1,6 @@ spv.builtInXFB.vert // Module Version 10000 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 21 Capability Shader diff --git a/Test/baseResults/spv.builtin.PrimitiveShadingRateEXT.vert.out b/Test/baseResults/spv.builtin.PrimitiveShadingRateEXT.vert.out index 8daa79ee04..019118548e 100644 --- a/Test/baseResults/spv.builtin.PrimitiveShadingRateEXT.vert.out +++ b/Test/baseResults/spv.builtin.PrimitiveShadingRateEXT.vert.out @@ -1,6 +1,6 @@ spv.builtin.PrimitiveShadingRateEXT.vert // Module Version 10000 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 26 Capability Shader diff --git a/Test/baseResults/spv.builtin.ShadingRateEXT.frag.out b/Test/baseResults/spv.builtin.ShadingRateEXT.frag.out index 95b94d2534..5707fb9359 100644 --- a/Test/baseResults/spv.builtin.ShadingRateEXT.frag.out +++ b/Test/baseResults/spv.builtin.ShadingRateEXT.frag.out @@ -3,7 +3,7 @@ WARNING: 0:5: '' : all default precisions are highp; use precision statements to "precision mediump int; precision highp float;" // Module Version 10000 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 12 Capability Shader diff --git a/Test/baseResults/spv.computeShaderDerivatives.comp.out b/Test/baseResults/spv.computeShaderDerivatives.comp.out index a7138450c5..4761078566 100644 --- a/Test/baseResults/spv.computeShaderDerivatives.comp.out +++ b/Test/baseResults/spv.computeShaderDerivatives.comp.out @@ -1,6 +1,6 @@ spv.computeShaderDerivatives.comp // Module Version 10000 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 212 Capability Shader diff --git a/Test/baseResults/spv.computeShaderDerivatives2.comp.out b/Test/baseResults/spv.computeShaderDerivatives2.comp.out index 3c3d54eef2..52b54746e7 100644 --- a/Test/baseResults/spv.computeShaderDerivatives2.comp.out +++ b/Test/baseResults/spv.computeShaderDerivatives2.comp.out @@ -1,6 +1,6 @@ spv.computeShaderDerivatives2.comp // Module Version 10000 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 212 Capability Shader diff --git a/Test/baseResults/spv.conditionalDemote.frag.out b/Test/baseResults/spv.conditionalDemote.frag.out index dfd45962cf..84c816b22c 100644 --- a/Test/baseResults/spv.conditionalDemote.frag.out +++ b/Test/baseResults/spv.conditionalDemote.frag.out @@ -1,6 +1,6 @@ spv.conditionalDemote.frag // Module Version 10000 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 38 Capability Shader diff --git a/Test/baseResults/spv.conditionalDiscard.frag.out b/Test/baseResults/spv.conditionalDiscard.frag.out index 2e53e9b89b..f31fa85143 100644 --- a/Test/baseResults/spv.conditionalDiscard.frag.out +++ b/Test/baseResults/spv.conditionalDiscard.frag.out @@ -1,6 +1,6 @@ spv.conditionalDiscard.frag // Module Version 10000 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 36 Capability Shader diff --git a/Test/baseResults/spv.constConstruct.vert.out b/Test/baseResults/spv.constConstruct.vert.out index a8d5097590..3dc42ed94d 100644 --- a/Test/baseResults/spv.constConstruct.vert.out +++ b/Test/baseResults/spv.constConstruct.vert.out @@ -1,6 +1,6 @@ spv.constConstruct.vert // Module Version 10000 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 150 Capability Shader diff --git a/Test/baseResults/spv.constStruct.vert.out b/Test/baseResults/spv.constStruct.vert.out index 61d0e54f4a..6abc009ea0 100644 --- a/Test/baseResults/spv.constStruct.vert.out +++ b/Test/baseResults/spv.constStruct.vert.out @@ -1,6 +1,6 @@ spv.constStruct.vert // Module Version 10000 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 23 Capability Shader diff --git a/Test/baseResults/spv.constructComposite.comp.out b/Test/baseResults/spv.constructComposite.comp.out index 73d663b976..491a33f1c9 100644 --- a/Test/baseResults/spv.constructComposite.comp.out +++ b/Test/baseResults/spv.constructComposite.comp.out @@ -1,6 +1,6 @@ spv.constructComposite.comp // Module Version 10000 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 29 Capability Shader diff --git a/Test/baseResults/spv.controlFlowAttributes.frag.out b/Test/baseResults/spv.controlFlowAttributes.frag.out index cf34ae2f68..038711d2fc 100644 --- a/Test/baseResults/spv.controlFlowAttributes.frag.out +++ b/Test/baseResults/spv.controlFlowAttributes.frag.out @@ -9,7 +9,7 @@ WARNING: 0:33: '' : attribute with arguments not recognized, skipping Validation failed // Module Version 10000 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 123 Capability Shader diff --git a/Test/baseResults/spv.conversion.frag.out b/Test/baseResults/spv.conversion.frag.out index b600b384af..5ddf7db612 100644 --- a/Test/baseResults/spv.conversion.frag.out +++ b/Test/baseResults/spv.conversion.frag.out @@ -1,6 +1,6 @@ spv.conversion.frag // Module Version 10000 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 455 Capability Shader diff --git a/Test/baseResults/spv.coopmat.comp.out b/Test/baseResults/spv.coopmat.comp.out index 0a609df18a..b594af23b4 100644 --- a/Test/baseResults/spv.coopmat.comp.out +++ b/Test/baseResults/spv.coopmat.comp.out @@ -1,6 +1,6 @@ spv.coopmat.comp // Module Version 10000 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 228 Capability Shader diff --git a/Test/baseResults/spv.coopmatKHR.comp.out b/Test/baseResults/spv.coopmatKHR.comp.out new file mode 100644 index 0000000000..d72b0678aa --- /dev/null +++ b/Test/baseResults/spv.coopmatKHR.comp.out @@ -0,0 +1,402 @@ +spv.coopmatKHR.comp +// Module Version 10000 +// Generated by (magic number): 8000b +// Id's are bound by 250 + + Capability Shader + Capability Float16 + Capability Int16 + Capability Int8 + Capability StorageUniformBufferBlock16 + Capability VulkanMemoryModelKHR + Capability PhysicalStorageBufferAddressesEXT + Capability CooperativeMatrixKHR + Extension "SPV_KHR_16bit_storage" + Extension "SPV_KHR_cooperative_matrix" + Extension "SPV_KHR_physical_storage_buffer" + Extension "SPV_KHR_storage_buffer_storage_class" + Extension "SPV_KHR_vulkan_memory_model" + 1: ExtInstImport "GLSL.std.450" + MemoryModel PhysicalStorageBuffer64EXT VulkanKHR + EntryPoint GLCompute 4 "main" + ExecutionMode 4 LocalSize 64 1 1 + Source GLSL 450 + SourceExtension "GL_EXT_buffer_reference" + SourceExtension "GL_EXT_shader_explicit_arithmetic_types" + SourceExtension "GL_KHR_cooperative_matrix" + SourceExtension "GL_KHR_memory_scope_semantics" + Name 4 "main" + Name 15 "f16(f161;" + Name 14 "m" + Name 22 "f32(f1;" + Name 21 "m" + Name 35 "m" + Name 53 "m2" + Name 57 "x" + Name 65 "tempArg" + Name 69 "Block" + MemberName 69(Block) 0 "y" + MemberName 69(Block) 1 "x" + Name 71 "block" + Name 80 "tempArg" + Name 85 "Block16" + MemberName 85(Block16) 0 "y" + MemberName 85(Block16) 1 "x" + MemberName 85(Block16) 2 "b" + Name 88 "Block" + MemberName 88(Block) 0 "y" + MemberName 88(Block) 1 "x" + Name 90 "block16" + Name 97 "tempArg" + Name 110 "D" + Name 114 "A" + Name 118 "B" + Name 120 "C" + Name 124 "l" + Name 128 "Y" + Name 129 "Z" + Name 132 "F" + Name 137 "a" + Name 141 "md1" + Name 152 "mC2" + Name 157 "tempArg" + Name 163 "tempArg" + Name 169 "p1" + Name 170 "param" + Name 173 "p2" + Name 174 "param" + Name 188 "tempArg" + Name 193 "shmatrix" + Name 197 "ms" + Name 204 "ms8A" + Name 208 "ms8B" + Name 212 "ms8C" + Name 227 "m16" + Name 233 "mC" + Name 234 "F" + Name 239 "S" + MemberName 239(S) 0 "a" + MemberName 239(S) 1 "b" + MemberName 239(S) 2 "c" + Name 244 "SC" + Name 249 "scm" + Decorate 67 ArrayStride 4 + Decorate 68 ArrayStride 4 + MemberDecorate 69(Block) 0 Offset 0 + MemberDecorate 69(Block) 1 Offset 4194304 + Decorate 69(Block) Block + Decorate 71(block) DescriptorSet 0 + Decorate 71(block) Binding 0 + Decorate 81 ArrayStride 2 + Decorate 83 ArrayStride 2 + MemberDecorate 85(Block16) 0 Offset 0 + MemberDecorate 85(Block16) 1 Offset 2097152 + MemberDecorate 85(Block16) 2 Offset 2097160 + Decorate 85(Block16) Block + Decorate 86 ArrayStride 4 + Decorate 87 ArrayStride 4 + MemberDecorate 88(Block) 0 Offset 0 + MemberDecorate 88(Block) 1 Offset 4194304 + Decorate 88(Block) Block + Decorate 90(block16) DescriptorSet 0 + Decorate 90(block16) Binding 0 + Decorate 128(Y) SpecId 0 + Decorate 232 BuiltIn WorkgroupSize + Decorate 234(F) SpecId 1 + Decorate 244(SC) SpecId 2 + 2: TypeVoid + 3: TypeFunction 2 + 6: TypeFloat 16 + 7: TypeInt 32 0 + 8: 7(int) Constant 3 + 9: 7(int) Constant 8 + 10: 7(int) Constant 2 + 11: TypeCooperativeMatrixKHR 6(float16_t) 8 9 9 10 + 12: TypePointer Function 11 + 13: TypeFunction 11 12(ptr) + 17: TypeFloat 32 + 18: TypeCooperativeMatrixKHR 17(float) 8 9 9 10 + 19: TypePointer Function 18 + 20: TypeFunction 18 19(ptr) + 32: 7(int) Constant 16 + 33: TypeCooperativeMatrixKHR 17(float) 8 32 9 10 + 34: TypePointer Function 33 + 36: 17(float) Constant 0 + 37: 33 ConstantComposite 36 + 46: 17(float) Constant 1073741824 + 51: TypeCooperativeMatrixKHR 6(float16_t) 8 32 9 10 + 52: TypePointer Function 51 + 56: TypePointer Function 17(float) + 58: TypeInt 32 1 + 59: 58(int) Constant 1 + 62: 58(int) Constant 0 + 66: 7(int) Constant 1048576 + 67: TypeArray 17(float) 66 + 68: TypeRuntimeArray 17(float) + 69(Block): TypeStruct 67 68 + 70: TypePointer StorageBuffer 69(Block) + 71(block): 70(ptr) Variable StorageBuffer + 72: 7(int) Constant 5 + 73: TypePointer StorageBuffer 17(float) + 75: 7(int) Constant 128 + 81: TypeArray 6(float16_t) 66 + 82: 7(int) Constant 1 + 83: TypeArray 6(float16_t) 82 + TypeForwardPointer 84 PhysicalStorageBufferEXT + 85(Block16): TypeStruct 81 83 84 + 86: TypeArray 17(float) 66 + 87: TypeRuntimeArray 17(float) + 88(Block): TypeStruct 86 87 + 84: TypePointer PhysicalStorageBufferEXT 88(Block) + 89: TypePointer StorageBuffer 85(Block16) + 90(block16): 89(ptr) Variable StorageBuffer + 91: TypePointer StorageBuffer 6(float16_t) + 98: 58(int) Constant 2 + 99: TypePointer StorageBuffer 84(ptr) + 102: TypePointer PhysicalStorageBufferEXT 17(float) + 111: 7(int) Constant 0 + 112: TypeCooperativeMatrixKHR 6(float16_t) 8 32 9 111 + 113: TypePointer Function 112 + 116: TypeCooperativeMatrixKHR 6(float16_t) 8 9 9 82 + 117: TypePointer Function 116 + 123: TypePointer Function 58(int) + 127: 58(int) Constant 8 + 128(Y): 58(int) SpecConstant 2 + 129(Z): 58(int) SpecConstantOp 132 127 128(Y) + 130: TypeCooperativeMatrixKHR 6(float16_t) 8 129(Z) 129(Z) 10 + 131: TypePointer Function 130 + 133:6(float16_t) Constant 0 + 134: 130 ConstantComposite 133 + 135: TypeArray 33 72 + 136: TypePointer Function 135 + 138: 58(int) Constant 3 + 139: 17(float) Constant 1065353216 + 145: 58(int) Constant 1234 + 149: TypeCooperativeMatrixKHR 6(float16_t) 8 129(Z) 9 10 + 150: TypeArray 149 8 + 151: TypePointer Private 150 + 152(mC2): 151(ptr) Variable Private + 153: TypePointer Private 149 + 177: 11 ConstantComposite 133 + 178: 18 ConstantComposite 36 + 182:6(float16_t) Constant 16384 + 185: 17(float) Constant 1082130432 + 189: TypeVector 7(int) 4 + 190: 7(int) Constant 32 + 191: TypeArray 189(ivec4) 190 + 192: TypePointer Workgroup 191 + 193(shmatrix): 192(ptr) Variable Workgroup + 194: TypePointer Workgroup 189(ivec4) + 201: TypeInt 8 1 + 202: TypeCooperativeMatrixKHR 201(int8_t) 8 9 9 111 + 203: TypePointer Function 202 + 206: TypeCooperativeMatrixKHR 201(int8_t) 8 9 9 82 + 207: TypePointer Function 206 + 210: TypeCooperativeMatrixKHR 201(int8_t) 8 9 9 10 + 211: TypePointer Function 210 + 222: 58(int) Constant 16 + 224: TypeInt 16 1 + 225: TypeCooperativeMatrixKHR 224(int16_t) 8 9 9 111 + 226: TypePointer Function 225 + 230: TypeVector 7(int) 3 + 231: 7(int) Constant 64 + 232: 230(ivec3) ConstantComposite 231 82 82 + 233(mC): 153(ptr) Variable Private + 234(F): 17(float) SpecConstant 1077936128 + 235: TypeCooperativeMatrixKHR 17(float) 8 129(Z) 9 10 + 236: 235 ConstantComposite 36 + 237:6(float16_t) Constant 15360 + 238: 11 ConstantComposite 237 + 239(S): TypeStruct 58(int) 58(int) 58(int) + 240: 58(int) Constant 12 + 241: 58(int) Constant 23 + 242: 58(int) Constant 34 + 243: 239(S) ConstantComposite 240 241 242 + 244(SC): 58(int) SpecConstant 1 + 245: TypeCooperativeMatrixKHR 6(float16_t) 8 244(SC) 244(SC) 10 + 246: TypeArray 245 244(SC) + 247: TypeArray 246 244(SC) + 248: TypePointer Private 247 + 249(scm): 248(ptr) Variable Private + 4(main): 2 Function None 3 + 5: Label + 35(m): 34(ptr) Variable Function + 53(m2): 52(ptr) Variable Function + 57(x): 56(ptr) Variable Function + 65(tempArg): 34(ptr) Variable Function + 80(tempArg): 52(ptr) Variable Function + 97(tempArg): 34(ptr) Variable Function + 110(D): 34(ptr) Variable Function + 114(A): 113(ptr) Variable Function + 118(B): 117(ptr) Variable Function + 120(C): 34(ptr) Variable Function + 124(l): 123(ptr) Variable Function + 132(F): 131(ptr) Variable Function + 137(a): 136(ptr) Variable Function + 141(md1): 56(ptr) Variable Function + 157(tempArg): 34(ptr) Variable Function + 163(tempArg): 52(ptr) Variable Function + 169(p1): 12(ptr) Variable Function + 170(param): 12(ptr) Variable Function + 173(p2): 19(ptr) Variable Function + 174(param): 19(ptr) Variable Function + 188(tempArg): 52(ptr) Variable Function + 197(ms): 52(ptr) Variable Function + 204(ms8A): 203(ptr) Variable Function + 208(ms8B): 207(ptr) Variable Function + 212(ms8C): 211(ptr) Variable Function + 227(m16): 226(ptr) Variable Function + Store 35(m) 37 + 38: 33 Load 35(m) + 39: 33 Load 35(m) + 40: 33 FAdd 38 39 + Store 35(m) 40 + 41: 33 Load 35(m) + 42: 33 Load 35(m) + 43: 33 FSub 41 42 + Store 35(m) 43 + 44: 33 Load 35(m) + 45: 33 FNegate 44 + Store 35(m) 45 + 47: 33 Load 35(m) + 48: 33 MatrixTimesScalar 47 46 + Store 35(m) 48 + 49: 33 Load 35(m) + 50: 33 MatrixTimesScalar 49 46 + Store 35(m) 50 + 54: 33 Load 35(m) + 55: 51 FConvert 54 + Store 53(m2) 55 + 60: 56(ptr) AccessChain 35(m) 59 + 61: 17(float) Load 60 + Store 57(x) 61 + 63: 17(float) Load 57(x) + 64: 56(ptr) AccessChain 35(m) 62 + Store 64 63 + 74: 73(ptr) AccessChain 71(block) 59 32 + 76: 33 CooperativeMatrixLoadKHR 74 62 75 MakePointerVisibleKHR NonPrivatePointerKHR 72 + Store 65(tempArg) 76 + 77: 33 Load 65(tempArg) + Store 35(m) 77 + 78: 33 Load 35(m) + 79: 73(ptr) AccessChain 71(block) 59 32 + CooperativeMatrixStoreKHR 79 78 62 75 MakePointerAvailableKHR NonPrivatePointerKHR 72 + 92: 91(ptr) AccessChain 90(block16) 59 32 + 93: 51 CooperativeMatrixLoadKHR 92 62 75 MakePointerVisibleKHR NonPrivatePointerKHR 72 + Store 80(tempArg) 93 + 94: 51 Load 80(tempArg) + Store 53(m2) 94 + 95: 51 Load 53(m2) + 96: 91(ptr) AccessChain 90(block16) 59 32 + CooperativeMatrixStoreKHR 96 95 62 75 MakePointerAvailableKHR NonPrivatePointerKHR 72 + 100: 99(ptr) AccessChain 90(block16) 98 + 101: 84(ptr) Load 100 MakePointerVisibleKHR NonPrivatePointerKHR 72 + 103: 102(ptr) AccessChain 101 59 32 + 104: 33 CooperativeMatrixLoadKHR 103 62 75 Aligned MakePointerVisibleKHR NonPrivatePointerKHR 16 72 + Store 97(tempArg) 104 + 105: 33 Load 97(tempArg) + Store 35(m) 105 + 106: 33 Load 35(m) + 107: 99(ptr) AccessChain 90(block16) 98 + 108: 84(ptr) Load 107 MakePointerVisibleKHR NonPrivatePointerKHR 72 + 109: 102(ptr) AccessChain 108 59 32 + CooperativeMatrixStoreKHR 109 106 62 75 Aligned MakePointerAvailableKHR NonPrivatePointerKHR 16 72 + 115: 112 Load 114(A) + 119: 116 Load 118(B) + 121: 33 Load 120(C) + 122: 33 CooperativeMatrixMulAddKHR 115 119 121 + Store 110(D) 122 + 125: 7(int) CooperativeMatrixLengthKHR 33 + 126: 58(int) Bitcast 125 + Store 124(l) 126 + Store 132(F) 134 + 140: 56(ptr) AccessChain 137(a) 138 62 + Store 140 139 + Store 141(md1) 36 + 142: 33 Load 35(m) + 143: 33 Load 35(m) + 144: 33 FAdd 143 142 + Store 35(m) 144 + 146: 17(float) CompositeExtract 144 1234 + 147: 17(float) Load 141(md1) + 148: 17(float) FAdd 147 146 + Store 141(md1) 148 + 154: 153(ptr) AccessChain 152(mC2) 98 + 155: 149 Load 154 + 156: 153(ptr) AccessChain 152(mC2) 59 + Store 156 155 + 158: 73(ptr) AccessChain 71(block) 62 32 + 159: 33 CooperativeMatrixLoadKHR 158 62 75 MakePointerVisibleKHR NonPrivatePointerKHR 72 + Store 157(tempArg) 159 + 160: 33 Load 157(tempArg) + Store 35(m) 160 + 161: 33 Load 35(m) + 162: 73(ptr) AccessChain 71(block) 62 32 + CooperativeMatrixStoreKHR 162 161 62 75 MakePointerAvailableKHR NonPrivatePointerKHR 72 + 164: 91(ptr) AccessChain 90(block16) 62 32 + 165: 51 CooperativeMatrixLoadKHR 164 62 75 MakePointerVisibleKHR NonPrivatePointerKHR 72 + Store 163(tempArg) 165 + 166: 51 Load 163(tempArg) + Store 53(m2) 166 + 167: 51 Load 53(m2) + 168: 91(ptr) AccessChain 90(block16) 62 32 + CooperativeMatrixStoreKHR 168 167 62 75 MakePointerAvailableKHR NonPrivatePointerKHR 72 + 171: 11 Load 169(p1) + Store 170(param) 171 + 172: 11 FunctionCall 15(f16(f161;) 170(param) + Store 169(p1) 172 + 175: 18 Load 173(p2) + Store 174(param) 175 + 176: 18 FunctionCall 22(f32(f1;) 174(param) + Store 173(p2) 176 + Store 169(p1) 177 + Store 173(p2) 178 + 179: 11 Load 169(p1) + 180: 11 Load 169(p1) + 181: 11 FDiv 180 179 + Store 169(p1) 181 + 183: 11 Load 169(p1) + 184: 11 MatrixTimesScalar 183 182 + Store 169(p1) 184 + 186: 18 Load 173(p2) + 187: 18 MatrixTimesScalar 186 185 + Store 173(p2) 187 + 195: 194(ptr) AccessChain 193(shmatrix) 82 + 196: 51 CooperativeMatrixLoadKHR 195 62 10 MakePointerVisibleKHR NonPrivatePointerKHR 10 + Store 188(tempArg) 196 + 198: 51 Load 188(tempArg) + Store 197(ms) 198 + 199: 51 Load 197(ms) + 200: 194(ptr) AccessChain 193(shmatrix) 82 + CooperativeMatrixStoreKHR 200 199 62 10 MakePointerAvailableKHR NonPrivatePointerKHR 10 + 205: 202 Load 204(ms8A) + 209: 206 Load 208(ms8B) + 213: 210 Load 212(ms8C) + 214: 210 CooperativeMatrixMulAddKHR 205 209 213 ASignedComponents BSignedComponents CSignedComponents ResultSignedComponents + 215: 202 Load 204(ms8A) + 216: 206 Load 208(ms8B) + 217: 210 Load 212(ms8C) + 218: 210 CooperativeMatrixMulAddKHR 215 216 217 ASignedComponents BSignedComponents CSignedComponents ResultSignedComponents + 219: 202 Load 204(ms8A) + 220: 206 Load 208(ms8B) + 221: 210 Load 212(ms8C) + 223: 210 CooperativeMatrixMulAddKHR 219 220 221 ASignedComponents BSignedComponents CSignedComponents ResultSignedComponents SaturatingAccumulation + 228: 225 Load 227(m16) + 229: 194(ptr) AccessChain 193(shmatrix) 82 + CooperativeMatrixStoreKHR 229 228 62 10 MakePointerAvailableKHR NonPrivatePointerKHR 10 + Return + FunctionEnd + 15(f16(f161;): 11 Function None 13 + 14(m): 12(ptr) FunctionParameter + 16: Label + 24: 11 Load 14(m) + 25: 11 FNegate 24 + ReturnValue 25 + FunctionEnd + 22(f32(f1;): 18 Function None 20 + 21(m): 19(ptr) FunctionParameter + 23: Label + 28: 18 Load 21(m) + 29: 18 FNegate 28 + ReturnValue 29 + FunctionEnd diff --git a/Test/baseResults/spv.coopmatKHR_Error.comp.out b/Test/baseResults/spv.coopmatKHR_Error.comp.out new file mode 100644 index 0000000000..82c302bf9d --- /dev/null +++ b/Test/baseResults/spv.coopmatKHR_Error.comp.out @@ -0,0 +1,38 @@ +spv.coopmatKHR_Error.comp +ERROR: 0:8: 'ftemplate16' : unexpected type parameters +ERROR: 0:10: '' : coopmat missing type parameters +ERROR: 0:10: 'fnoparams' : unexpected number type parameters +ERROR: 0:17: 'void' : coopmat invalid basic type +ERROR: 0:17: 'fbadtype' : expected 8, 16, 32, or 64 bit signed or unsigned integer or 16, 32, or 64 bit float type +ERROR: 0:17: 'fbadtype' : illegal use of type 'void' +ERROR: 0:18: '' : type parameter must be a constant integer expression +ERROR: 0:18: 'void' : coopmat invalid basic type +ERROR: 0:18: '' : coopmat incorrect number of type parameters +ERROR: 0:18: 'fbadtype2' : unexpected number type parameters +ERROR: 0:18: 'fbadtype2' : expected 8, 16, 32, or 64 bit signed or unsigned integer or 16, 32, or 64 bit float type +ERROR: 0:18: 'fbadtype2' : illegal use of type 'void' +ERROR: 0:19: 'void' : coopmat invalid basic type +ERROR: 0:19: '' : coopmat incorrect number of type parameters +ERROR: 0:19: 'fbadtype3' : unexpected number type parameters +ERROR: 0:19: 'fbadtype3' : expected 8, 16, 32, or 64 bit signed or unsigned integer or 16, 32, or 64 bit float type +ERROR: 0:19: 'fbadtype3' : illegal use of type 'void' +ERROR: 0:21: '' : coopmat incorrect number of type parameters +ERROR: 0:25: '' : type parameter must be a constant integer expression +ERROR: 0:29: '' : coopmat incorrect number of type parameters +ERROR: 0:29: 'Cooperative matrix types must not be used in shared memory' : qualifier +ERROR: 0:32: 'bufmat' : member of block cannot be or contain a cooperative matrix type +ERROR: 0:41: 'assign' : cannot convert from ' temp coopmat<3, 16, 8, 0> float16_t' to ' temp coopmat<3, 16, 8, 0> float' +ERROR: 0:42: 'assign' : cannot convert from ' temp coopmat<3, 16, 8, 0> float16_t' to ' temp coopmat<3, 16, 8, 0> float' +ERROR: 0:47: 'assign' : cannot convert from ' temp coopmat<3, 8, 8, 0> float16_t' to ' temp coopmat<3, 16, 8, 0> float16_t' +ERROR: 0:53: 'assign' : cannot convert from ' temp coopmat<3, 8, 1, 0> float16_t' to ' temp coopmat<3, 8, 1, 0> float16_t' +ERROR: 0:56: 'constructor' : too many arguments +ERROR: 0:56: 'assign' : cannot convert from ' const float' to ' temp coopmat<3, 8, 8, 0> float16_t' +ERROR: 0:60: 'constructor' : Cooperative matrix constructor argument must be scalar or cooperative matrix +ERROR: 0:60: '=' : cannot convert from ' const float' to ' temp coopmat<3, 4, 4, 0> float' +ERROR: 0:63: 'expression' : left of '[' is not of type array, matrix, or vector +ERROR: 0:66: '.' : cannot apply to a cooperative matrix type: x +ERROR: 0:68: 'transpose' : no matching overloaded function found +ERROR: 33 compilation errors. No code generated. + + +SPIR-V is not generated for failed compile or link diff --git a/Test/baseResults/spv.coopmatKHR_arithmetic.comp.out b/Test/baseResults/spv.coopmatKHR_arithmetic.comp.out new file mode 100644 index 0000000000..2acc002d4d --- /dev/null +++ b/Test/baseResults/spv.coopmatKHR_arithmetic.comp.out @@ -0,0 +1,248 @@ +spv.coopmatKHR_arithmetic.comp +// Module Version 10000 +// Generated by (magic number): 8000b +// Id's are bound by 196 + + Capability Shader + Capability Float16 + Capability Int8 + Capability VulkanMemoryModelKHR + Capability CooperativeMatrixKHR + Extension "SPV_KHR_cooperative_matrix" + Extension "SPV_KHR_vulkan_memory_model" + 1: ExtInstImport "GLSL.std.450" + MemoryModel Logical VulkanKHR + EntryPoint GLCompute 4 "main" + ExecutionMode 4 LocalSize 64 1 1 + Source GLSL 450 + SourceExtension "GL_EXT_shader_explicit_arithmetic_types" + SourceExtension "GL_KHR_cooperative_matrix" + SourceExtension "GL_KHR_memory_scope_semantics" + Name 4 "main" + Name 13 "f" + Name 48 "f16" + Name 82 "u32" + Name 117 "u8" + Name 152 "i8" + Decorate 195 BuiltIn WorkgroupSize + 2: TypeVoid + 3: TypeFunction 2 + 6: TypeFloat 32 + 7: TypeInt 32 0 + 8: 7(int) Constant 3 + 9: 7(int) Constant 8 + 10: 7(int) Constant 0 + 11: TypeCooperativeMatrixKHR 6(float) 8 9 9 10 + 12: TypePointer Function 11 + 39: 6(float) Constant 1073741824 + 45: TypeFloat 16 + 46: TypeCooperativeMatrixKHR 45(float16_t) 8 9 9 10 + 47: TypePointer Function 46 + 74:45(float16_t) Constant 16384 + 80: TypeCooperativeMatrixKHR 7(int) 8 9 9 10 + 81: TypePointer Function 80 + 108: 7(int) Constant 2 + 114: TypeInt 8 0 + 115: TypeCooperativeMatrixKHR 114(int8_t) 8 9 9 10 + 116: TypePointer Function 115 + 143: 114(int8_t) Constant 2 + 149: TypeInt 8 1 + 150: TypeCooperativeMatrixKHR 149(int8_t) 8 9 9 10 + 151: TypePointer Function 150 + 178: 149(int8_t) Constant 2 + 192: TypeVector 7(int) 3 + 193: 7(int) Constant 64 + 194: 7(int) Constant 1 + 195: 192(ivec3) ConstantComposite 193 194 194 + 4(main): 2 Function None 3 + 5: Label + 13(f): 12(ptr) Variable Function + 48(f16): 47(ptr) Variable Function + 82(u32): 81(ptr) Variable Function + 117(u8): 116(ptr) Variable Function + 152(i8): 151(ptr) Variable Function + 14: 11 Load 13(f) + 15: 11 Load 13(f) + 16: 11 FAdd 14 15 + 17: 11 Load 13(f) + 18: 11 Load 13(f) + 19: 11 FSub 17 18 + 20: 11 Load 13(f) + 21: 11 Load 13(f) + 22: 11 FMul 20 21 + 23: 11 Load 13(f) + 24: 11 Load 13(f) + 25: 11 FDiv 23 24 + 26: 11 Load 13(f) + 27: 11 Load 13(f) + 28: 11 FAdd 27 26 + Store 13(f) 28 + 29: 11 Load 13(f) + 30: 11 Load 13(f) + 31: 11 FSub 30 29 + Store 13(f) 31 + 32: 11 Load 13(f) + 33: 11 Load 13(f) + 34: 11 FMul 33 32 + Store 13(f) 34 + 35: 11 Load 13(f) + 36: 11 Load 13(f) + 37: 11 FDiv 36 35 + Store 13(f) 37 + 38: 11 Load 13(f) + 40: 11 MatrixTimesScalar 38 39 + 41: 11 Load 13(f) + 42: 11 MatrixTimesScalar 41 39 + 43: 11 Load 13(f) + 44: 11 MatrixTimesScalar 43 39 + Store 13(f) 44 + 49: 46 Load 48(f16) + 50: 46 Load 48(f16) + 51: 46 FAdd 49 50 + 52: 46 Load 48(f16) + 53: 46 Load 48(f16) + 54: 46 FSub 52 53 + 55: 46 Load 48(f16) + 56: 46 Load 48(f16) + 57: 46 FMul 55 56 + 58: 46 Load 48(f16) + 59: 46 Load 48(f16) + 60: 46 FDiv 58 59 + 61: 46 Load 48(f16) + 62: 46 Load 48(f16) + 63: 46 FAdd 62 61 + Store 48(f16) 63 + 64: 46 Load 48(f16) + 65: 46 Load 48(f16) + 66: 46 FSub 65 64 + Store 48(f16) 66 + 67: 46 Load 48(f16) + 68: 46 Load 48(f16) + 69: 46 FMul 68 67 + Store 48(f16) 69 + 70: 46 Load 48(f16) + 71: 46 Load 48(f16) + 72: 46 FDiv 71 70 + Store 48(f16) 72 + 73: 46 Load 48(f16) + 75: 46 MatrixTimesScalar 73 74 + 76: 46 Load 48(f16) + 77: 46 MatrixTimesScalar 76 74 + 78: 46 Load 48(f16) + 79: 46 MatrixTimesScalar 78 74 + Store 48(f16) 79 + 83: 80 Load 82(u32) + 84: 80 Load 82(u32) + 85: 80 IAdd 83 84 + 86: 80 Load 82(u32) + 87: 80 Load 82(u32) + 88: 80 ISub 86 87 + 89: 80 Load 82(u32) + 90: 80 Load 82(u32) + 91: 80 IMul 89 90 + 92: 80 Load 82(u32) + 93: 80 Load 82(u32) + 94: 80 UDiv 92 93 + 95: 80 Load 82(u32) + 96: 80 Load 82(u32) + 97: 80 IAdd 96 95 + Store 82(u32) 97 + 98: 80 Load 82(u32) + 99: 80 Load 82(u32) + 100: 80 ISub 99 98 + Store 82(u32) 100 + 101: 80 Load 82(u32) + 102: 80 Load 82(u32) + 103: 80 IMul 102 101 + Store 82(u32) 103 + 104: 80 Load 82(u32) + 105: 80 Load 82(u32) + 106: 80 UDiv 105 104 + Store 82(u32) 106 + 107: 80 Load 82(u32) + 109: 80 MatrixTimesScalar 107 108 + 110: 80 Load 82(u32) + 111: 80 MatrixTimesScalar 110 108 + 112: 80 Load 82(u32) + 113: 80 MatrixTimesScalar 112 108 + Store 82(u32) 113 + 118: 115 Load 117(u8) + 119: 115 Load 117(u8) + 120: 115 IAdd 118 119 + 121: 115 Load 117(u8) + 122: 115 Load 117(u8) + 123: 115 ISub 121 122 + 124: 115 Load 117(u8) + 125: 115 Load 117(u8) + 126: 115 IMul 124 125 + 127: 115 Load 117(u8) + 128: 115 Load 117(u8) + 129: 115 UDiv 127 128 + 130: 115 Load 117(u8) + 131: 115 Load 117(u8) + 132: 115 IAdd 131 130 + Store 117(u8) 132 + 133: 115 Load 117(u8) + 134: 115 Load 117(u8) + 135: 115 ISub 134 133 + Store 117(u8) 135 + 136: 115 Load 117(u8) + 137: 115 Load 117(u8) + 138: 115 IMul 137 136 + Store 117(u8) 138 + 139: 115 Load 117(u8) + 140: 115 Load 117(u8) + 141: 115 UDiv 140 139 + Store 117(u8) 141 + 142: 115 Load 117(u8) + 144: 115 MatrixTimesScalar 142 143 + 145: 115 Load 117(u8) + 146: 115 MatrixTimesScalar 145 143 + 147: 115 Load 117(u8) + 148: 115 MatrixTimesScalar 147 143 + Store 117(u8) 148 + 153: 150 Load 152(i8) + 154: 150 Load 152(i8) + 155: 150 IAdd 153 154 + 156: 150 Load 152(i8) + 157: 150 Load 152(i8) + 158: 150 ISub 156 157 + 159: 150 Load 152(i8) + 160: 150 Load 152(i8) + 161: 150 IMul 159 160 + 162: 150 Load 152(i8) + 163: 150 Load 152(i8) + 164: 150 SDiv 162 163 + 165: 150 Load 152(i8) + 166: 150 Load 152(i8) + 167: 150 IAdd 166 165 + Store 152(i8) 167 + 168: 150 Load 152(i8) + 169: 150 Load 152(i8) + 170: 150 ISub 169 168 + Store 152(i8) 170 + 171: 150 Load 152(i8) + 172: 150 Load 152(i8) + 173: 150 IMul 172 171 + Store 152(i8) 173 + 174: 150 Load 152(i8) + 175: 150 Load 152(i8) + 176: 150 SDiv 175 174 + Store 152(i8) 176 + 177: 150 Load 152(i8) + 179: 150 MatrixTimesScalar 177 178 + 180: 150 Load 152(i8) + 181: 150 MatrixTimesScalar 180 178 + 182: 150 Load 152(i8) + 183: 150 MatrixTimesScalar 182 178 + Store 152(i8) 183 + 184: 11 Load 13(f) + 185: 11 FNegate 184 + 186: 46 Load 48(f16) + 187: 46 FNegate 186 + 188: 150 Load 152(i8) + 189: 150 SNegate 188 + 190: 115 Load 117(u8) + 191: 115 SNegate 190 + Return + FunctionEnd diff --git a/Test/baseResults/spv.coopmatKHR_arithmeticError.comp.out b/Test/baseResults/spv.coopmatKHR_arithmeticError.comp.out new file mode 100644 index 0000000000..9bcdfb3547 --- /dev/null +++ b/Test/baseResults/spv.coopmatKHR_arithmeticError.comp.out @@ -0,0 +1,64 @@ +spv.coopmatKHR_arithmeticError.comp +ERROR: 0:21: '+' : wrong operand types: no operation '+' exists that takes a left-hand operand of type ' temp coopmat<3, 8, 8, 0> float' and a right operand of type ' const float' (or there is no acceptable conversion) +ERROR: 0:22: '-' : wrong operand types: no operation '-' exists that takes a left-hand operand of type ' temp coopmat<3, 8, 8, 0> float' and a right operand of type ' const float' (or there is no acceptable conversion) +ERROR: 0:23: '/' : wrong operand types: no operation '/' exists that takes a left-hand operand of type ' temp coopmat<3, 8, 8, 0> float' and a right operand of type ' const float' (or there is no acceptable conversion) +ERROR: 0:24: '+' : wrong operand types: no operation '+' exists that takes a left-hand operand of type ' const float' and a right operand of type ' temp coopmat<3, 8, 8, 0> float' (or there is no acceptable conversion) +ERROR: 0:25: '-' : wrong operand types: no operation '-' exists that takes a left-hand operand of type ' const float' and a right operand of type ' temp coopmat<3, 8, 8, 0> float' (or there is no acceptable conversion) +ERROR: 0:26: '/' : wrong operand types: no operation '/' exists that takes a left-hand operand of type ' const float' and a right operand of type ' temp coopmat<3, 8, 8, 0> float' (or there is no acceptable conversion) +ERROR: 0:27: 'assign' : cannot convert from ' const float' to ' temp coopmat<3, 8, 8, 0> float' +ERROR: 0:28: 'assign' : cannot convert from ' const float' to ' temp coopmat<3, 8, 8, 0> float' +ERROR: 0:29: 'assign' : cannot convert from ' const float' to ' temp coopmat<3, 8, 8, 0> float' +ERROR: 0:31: '+' : wrong operand types: no operation '+' exists that takes a left-hand operand of type ' temp coopmat<3, 8, 8, 0> float' and a right operand of type ' temp coopmat<3, 8, 8, 0> float16_t' (or there is no acceptable conversion) +ERROR: 0:32: '-' : wrong operand types: no operation '-' exists that takes a left-hand operand of type ' temp coopmat<3, 8, 8, 0> float' and a right operand of type ' temp coopmat<3, 8, 8, 0> float16_t' (or there is no acceptable conversion) +ERROR: 0:33: '*' : wrong operand types: no operation '*' exists that takes a left-hand operand of type ' temp coopmat<3, 8, 8, 0> float' and a right operand of type ' temp coopmat<3, 8, 8, 0> float16_t' (or there is no acceptable conversion) +ERROR: 0:34: '/' : wrong operand types: no operation '/' exists that takes a left-hand operand of type ' temp coopmat<3, 8, 8, 0> float' and a right operand of type ' temp coopmat<3, 8, 8, 0> float16_t' (or there is no acceptable conversion) +ERROR: 0:35: 'assign' : cannot convert from ' temp coopmat<3, 8, 8, 0> float16_t' to ' temp coopmat<3, 8, 8, 0> float' +ERROR: 0:36: 'assign' : cannot convert from ' temp coopmat<3, 8, 8, 0> float16_t' to ' temp coopmat<3, 8, 8, 0> float' +ERROR: 0:37: 'assign' : cannot convert from ' temp coopmat<3, 8, 8, 0> float16_t' to ' temp coopmat<3, 8, 8, 0> float' +ERROR: 0:38: 'assign' : cannot convert from ' temp coopmat<3, 8, 8, 0> float16_t' to ' temp coopmat<3, 8, 8, 0> float' +ERROR: 0:40: '+' : wrong operand types: no operation '+' exists that takes a left-hand operand of type ' temp coopmat<3, 8, 8, 0> float' and a right operand of type ' temp coopmat<3, 8, 8, 1> float' (or there is no acceptable conversion) +ERROR: 0:41: '-' : wrong operand types: no operation '-' exists that takes a left-hand operand of type ' temp coopmat<3, 8, 8, 0> float' and a right operand of type ' temp coopmat<3, 8, 8, 1> float' (or there is no acceptable conversion) +ERROR: 0:42: '*' : wrong operand types: no operation '*' exists that takes a left-hand operand of type ' temp coopmat<3, 8, 8, 0> float' and a right operand of type ' temp coopmat<3, 8, 8, 1> float' (or there is no acceptable conversion) +ERROR: 0:43: '/' : wrong operand types: no operation '/' exists that takes a left-hand operand of type ' temp coopmat<3, 8, 8, 0> float' and a right operand of type ' temp coopmat<3, 8, 8, 1> float' (or there is no acceptable conversion) +ERROR: 0:44: 'assign' : cannot convert from ' temp coopmat<3, 8, 8, 1> float' to ' temp coopmat<3, 8, 8, 0> float' +ERROR: 0:45: 'assign' : cannot convert from ' temp coopmat<3, 8, 8, 1> float' to ' temp coopmat<3, 8, 8, 0> float' +ERROR: 0:46: 'assign' : cannot convert from ' temp coopmat<3, 8, 8, 1> float' to ' temp coopmat<3, 8, 8, 0> float' +ERROR: 0:47: 'assign' : cannot convert from ' temp coopmat<3, 8, 8, 1> float' to ' temp coopmat<3, 8, 8, 0> float' +ERROR: 0:49: '+' : wrong operand types: no operation '+' exists that takes a left-hand operand of type ' temp coopmat<3, 8, 8, 0> float' and a right operand of type ' temp coopmat<3, 16, 8, 0> float' (or there is no acceptable conversion) +ERROR: 0:50: '-' : wrong operand types: no operation '-' exists that takes a left-hand operand of type ' temp coopmat<3, 8, 8, 0> float' and a right operand of type ' temp coopmat<3, 16, 8, 0> float' (or there is no acceptable conversion) +ERROR: 0:51: '*' : wrong operand types: no operation '*' exists that takes a left-hand operand of type ' temp coopmat<3, 8, 8, 0> float' and a right operand of type ' temp coopmat<3, 16, 8, 0> float' (or there is no acceptable conversion) +ERROR: 0:52: '/' : wrong operand types: no operation '/' exists that takes a left-hand operand of type ' temp coopmat<3, 8, 8, 0> float' and a right operand of type ' temp coopmat<3, 16, 8, 0> float' (or there is no acceptable conversion) +ERROR: 0:53: 'assign' : cannot convert from ' temp coopmat<3, 16, 8, 0> float' to ' temp coopmat<3, 8, 8, 0> float' +ERROR: 0:54: 'assign' : cannot convert from ' temp coopmat<3, 16, 8, 0> float' to ' temp coopmat<3, 8, 8, 0> float' +ERROR: 0:55: 'assign' : cannot convert from ' temp coopmat<3, 16, 8, 0> float' to ' temp coopmat<3, 8, 8, 0> float' +ERROR: 0:56: 'assign' : cannot convert from ' temp coopmat<3, 16, 8, 0> float' to ' temp coopmat<3, 8, 8, 0> float' +ERROR: 0:58: '+' : wrong operand types: no operation '+' exists that takes a left-hand operand of type ' temp coopmat<3, 8, 8, 0> uint8_t' and a right operand of type ' temp coopmat<3, 8, 8, 0> int8_t' (or there is no acceptable conversion) +ERROR: 0:59: '-' : wrong operand types: no operation '-' exists that takes a left-hand operand of type ' temp coopmat<3, 8, 8, 0> uint8_t' and a right operand of type ' temp coopmat<3, 8, 8, 0> int8_t' (or there is no acceptable conversion) +ERROR: 0:60: '*' : wrong operand types: no operation '*' exists that takes a left-hand operand of type ' temp coopmat<3, 8, 8, 0> uint8_t' and a right operand of type ' temp coopmat<3, 8, 8, 0> int8_t' (or there is no acceptable conversion) +ERROR: 0:61: '/' : wrong operand types: no operation '/' exists that takes a left-hand operand of type ' temp coopmat<3, 8, 8, 0> uint8_t' and a right operand of type ' temp coopmat<3, 8, 8, 0> int8_t' (or there is no acceptable conversion) +ERROR: 0:62: 'assign' : cannot convert from ' temp coopmat<3, 8, 8, 0> int8_t' to ' temp coopmat<3, 8, 8, 0> uint8_t' +ERROR: 0:63: 'assign' : cannot convert from ' temp coopmat<3, 8, 8, 0> int8_t' to ' temp coopmat<3, 8, 8, 0> uint8_t' +ERROR: 0:64: 'assign' : cannot convert from ' temp coopmat<3, 8, 8, 0> int8_t' to ' temp coopmat<3, 8, 8, 0> uint8_t' +ERROR: 0:65: 'assign' : cannot convert from ' temp coopmat<3, 8, 8, 0> int8_t' to ' temp coopmat<3, 8, 8, 0> uint8_t' +ERROR: 0:67: '+' : wrong operand types: no operation '+' exists that takes a left-hand operand of type ' temp coopmat<3, 8, 8, 0> uint8_t' and a right operand of type ' const uint8_t' (or there is no acceptable conversion) +ERROR: 0:68: '-' : wrong operand types: no operation '-' exists that takes a left-hand operand of type ' temp coopmat<3, 8, 8, 0> uint8_t' and a right operand of type ' const uint8_t' (or there is no acceptable conversion) +ERROR: 0:69: '/' : wrong operand types: no operation '/' exists that takes a left-hand operand of type ' temp coopmat<3, 8, 8, 0> uint8_t' and a right operand of type ' const uint8_t' (or there is no acceptable conversion) +ERROR: 0:70: 'assign' : cannot convert from ' const uint8_t' to ' temp coopmat<3, 8, 8, 0> uint8_t' +ERROR: 0:71: 'assign' : cannot convert from ' const uint8_t' to ' temp coopmat<3, 8, 8, 0> uint8_t' +ERROR: 0:72: 'assign' : cannot convert from ' const uint8_t' to ' temp coopmat<3, 8, 8, 0> uint8_t' +ERROR: 0:74: '+' : wrong operand types: no operation '+' exists that takes a left-hand operand of type ' temp coopmat<3, 8, 8, 0> int8_t' and a right operand of type ' const int8_t' (or there is no acceptable conversion) +ERROR: 0:75: '-' : wrong operand types: no operation '-' exists that takes a left-hand operand of type ' temp coopmat<3, 8, 8, 0> int8_t' and a right operand of type ' const int8_t' (or there is no acceptable conversion) +ERROR: 0:76: '/' : wrong operand types: no operation '/' exists that takes a left-hand operand of type ' temp coopmat<3, 8, 8, 0> int8_t' and a right operand of type ' const int8_t' (or there is no acceptable conversion) +ERROR: 0:77: 'assign' : cannot convert from ' const int8_t' to ' temp coopmat<3, 8, 8, 0> int8_t' +ERROR: 0:78: 'assign' : cannot convert from ' const int8_t' to ' temp coopmat<3, 8, 8, 0> int8_t' +ERROR: 0:79: 'assign' : cannot convert from ' const int8_t' to ' temp coopmat<3, 8, 8, 0> int8_t' +ERROR: 0:81: '+' : wrong operand types: no operation '+' exists that takes a left-hand operand of type ' temp coopmat<3, 8, 8, 0> int' and a right operand of type ' const int' (or there is no acceptable conversion) +ERROR: 0:82: '-' : wrong operand types: no operation '-' exists that takes a left-hand operand of type ' temp coopmat<3, 8, 8, 0> int' and a right operand of type ' const int' (or there is no acceptable conversion) +ERROR: 0:83: '/' : wrong operand types: no operation '/' exists that takes a left-hand operand of type ' temp coopmat<3, 8, 8, 0> int' and a right operand of type ' const int' (or there is no acceptable conversion) +ERROR: 0:84: 'assign' : cannot convert from ' const int' to ' temp coopmat<3, 8, 8, 0> int' +ERROR: 0:85: 'assign' : cannot convert from ' const int' to ' temp coopmat<3, 8, 8, 0> int' +ERROR: 0:86: 'assign' : cannot convert from ' const int' to ' temp coopmat<3, 8, 8, 0> int' +ERROR: 59 compilation errors. No code generated. + + +SPIR-V is not generated for failed compile or link diff --git a/Test/baseResults/spv.coopmatKHR_constructor.comp.out b/Test/baseResults/spv.coopmatKHR_constructor.comp.out new file mode 100644 index 0000000000..0c9923b9ab --- /dev/null +++ b/Test/baseResults/spv.coopmatKHR_constructor.comp.out @@ -0,0 +1,632 @@ +spv.coopmatKHR_constructor.comp +// Module Version 10000 +// Generated by (magic number): 8000b +// Id's are bound by 481 + + Capability Shader + Capability Float16 + Capability Int16 + Capability Int8 + Capability VulkanMemoryModelKHR + Capability CooperativeMatrixKHR + Extension "SPV_KHR_cooperative_matrix" + Extension "SPV_KHR_vulkan_memory_model" + 1: ExtInstImport "GLSL.std.450" + MemoryModel Logical VulkanKHR + EntryPoint GLCompute 4 "main" + ExecutionMode 4 LocalSize 64 1 1 + Source GLSL 450 + SourceExtension "GL_EXT_shader_explicit_arithmetic_types" + SourceExtension "GL_KHR_cooperative_matrix" + SourceExtension "GL_KHR_memory_scope_semantics" + Name 4 "main" + Name 154 "v" + Name 158 "v" + Name 164 "v" + Name 170 "v" + Name 176 "v" + Name 182 "v" + Name 188 "v" + Name 194 "v" + Name 199 "v" + Name 204 "v" + Name 207 "v" + Name 212 "v" + Name 217 "v" + Name 222 "v" + Name 227 "v" + Name 232 "v" + Name 237 "v" + Name 242 "v" + Name 247 "v" + Name 250 "v" + Name 255 "v" + Name 260 "v" + Name 265 "v" + Name 271 "v" + Name 277 "v" + Name 282 "v" + Name 287 "v" + Name 292 "v" + Name 295 "v" + Name 300 "v" + Name 306 "v" + Name 311 "v" + Name 317 "v" + Name 322 "v" + Name 327 "v" + Name 332 "v" + Name 337 "v" + Name 340 "v" + Name 346 "v" + Name 352 "v" + Name 357 "v" + Name 362 "v" + Name 367 "v" + Name 372 "v" + Name 378 "v" + Name 384 "v" + Name 387 "v" + Name 392 "v" + Name 397 "v" + Name 402 "v" + Name 407 "v" + Name 413 "v" + Name 418 "v" + Name 424 "v" + Name 429 "v" + Name 432 "v" + Name 437 "v" + Name 442 "v" + Name 447 "v" + Name 453 "v" + Name 459 "v" + Name 464 "v" + Name 469 "v" + Name 474 "v" + Decorate 480 BuiltIn WorkgroupSize + 2: TypeVoid + 3: TypeFunction 2 + 6: TypeFloat 32 + 7: TypeInt 32 0 + 8: 7(int) Constant 3 + 9: 7(int) Constant 8 + 10: 7(int) Constant 0 + 11: TypeCooperativeMatrixKHR 6(float) 8 9 9 10 + 12: 6(float) Constant 1065353216 + 13: 11 ConstantComposite 12 + 14: 6(float) Constant 1073741824 + 15: 11 ConstantComposite 14 + 16: 6(float) Constant 1077936128 + 17: 11 ConstantComposite 16 + 18: 6(float) Constant 1082130432 + 19: 11 ConstantComposite 18 + 20: 6(float) Constant 1084227584 + 21: 11 ConstantComposite 20 + 22: 6(float) Constant 1086324736 + 23: 11 ConstantComposite 22 + 24: 6(float) Constant 1088421888 + 25: 11 ConstantComposite 24 + 26: 6(float) Constant 1090519040 + 27: 11 ConstantComposite 26 + 28: TypeFloat 16 + 29: TypeCooperativeMatrixKHR 28(float16_t) 8 9 9 10 + 30:28(float16_t) Constant 18816 + 31: 29 ConstantComposite 30 + 32:28(float16_t) Constant 18944 + 33: 29 ConstantComposite 32 + 34:28(float16_t) Constant 19072 + 35: 29 ConstantComposite 34 + 36:28(float16_t) Constant 19200 + 37: 29 ConstantComposite 36 + 38:28(float16_t) Constant 19328 + 39: 29 ConstantComposite 38 + 40:28(float16_t) Constant 19456 + 41: 29 ConstantComposite 40 + 42:28(float16_t) Constant 19520 + 43: 29 ConstantComposite 42 + 44:28(float16_t) Constant 19584 + 45: 29 ConstantComposite 44 + 46: TypeCooperativeMatrixKHR 7(int) 8 9 9 10 + 47: 7(int) Constant 21 + 48: 46 ConstantComposite 47 + 49: 7(int) Constant 22 + 50: 46 ConstantComposite 49 + 51: 7(int) Constant 23 + 52: 46 ConstantComposite 51 + 53: 7(int) Constant 24 + 54: 46 ConstantComposite 53 + 55: 7(int) Constant 25 + 56: 46 ConstantComposite 55 + 57: 7(int) Constant 26 + 58: 46 ConstantComposite 57 + 59: 7(int) Constant 27 + 60: 46 ConstantComposite 59 + 61: 7(int) Constant 28 + 62: 46 ConstantComposite 61 + 63: TypeInt 16 0 + 64: TypeCooperativeMatrixKHR 63(int16_t) 8 9 9 10 + 65: 63(int16_t) Constant 31 + 66: 64 ConstantComposite 65 + 67: 63(int16_t) Constant 32 + 68: 64 ConstantComposite 67 + 69: 63(int16_t) Constant 33 + 70: 64 ConstantComposite 69 + 71: 63(int16_t) Constant 34 + 72: 64 ConstantComposite 71 + 73: 63(int16_t) Constant 35 + 74: 64 ConstantComposite 73 + 75: 63(int16_t) Constant 36 + 76: 64 ConstantComposite 75 + 77: 63(int16_t) Constant 37 + 78: 64 ConstantComposite 77 + 79: 63(int16_t) Constant 38 + 80: 64 ConstantComposite 79 + 81: TypeInt 8 0 + 82: TypeCooperativeMatrixKHR 81(int8_t) 8 9 9 10 + 83: 81(int8_t) Constant 41 + 84: 82 ConstantComposite 83 + 85: 81(int8_t) Constant 42 + 86: 82 ConstantComposite 85 + 87: 81(int8_t) Constant 43 + 88: 82 ConstantComposite 87 + 89: 81(int8_t) Constant 44 + 90: 82 ConstantComposite 89 + 91: 81(int8_t) Constant 45 + 92: 82 ConstantComposite 91 + 93: 81(int8_t) Constant 46 + 94: 82 ConstantComposite 93 + 95: 81(int8_t) Constant 47 + 96: 82 ConstantComposite 95 + 97: 81(int8_t) Constant 48 + 98: 82 ConstantComposite 97 + 99: TypeInt 32 1 + 100: TypeCooperativeMatrixKHR 99(int) 8 9 9 10 + 101: 99(int) Constant 51 + 102: 100 ConstantComposite 101 + 103: 99(int) Constant 52 + 104: 100 ConstantComposite 103 + 105: 99(int) Constant 53 + 106: 100 ConstantComposite 105 + 107: 99(int) Constant 54 + 108: 100 ConstantComposite 107 + 109: 99(int) Constant 55 + 110: 100 ConstantComposite 109 + 111: 99(int) Constant 56 + 112: 100 ConstantComposite 111 + 113: 99(int) Constant 57 + 114: 100 ConstantComposite 113 + 115: 99(int) Constant 58 + 116: 100 ConstantComposite 115 + 117: TypeInt 16 1 + 118: TypeCooperativeMatrixKHR 117(int16_t) 8 9 9 10 + 119:117(int16_t) Constant 61 + 120: 118 ConstantComposite 119 + 121:117(int16_t) Constant 62 + 122: 118 ConstantComposite 121 + 123:117(int16_t) Constant 63 + 124: 118 ConstantComposite 123 + 125:117(int16_t) Constant 64 + 126: 118 ConstantComposite 125 + 127:117(int16_t) Constant 65 + 128: 118 ConstantComposite 127 + 129:117(int16_t) Constant 66 + 130: 118 ConstantComposite 129 + 131:117(int16_t) Constant 67 + 132: 118 ConstantComposite 131 + 133:117(int16_t) Constant 68 + 134: 118 ConstantComposite 133 + 135: TypeInt 8 1 + 136: TypeCooperativeMatrixKHR 135(int8_t) 8 9 9 10 + 137: 135(int8_t) Constant 71 + 138: 136 ConstantComposite 137 + 139: 135(int8_t) Constant 72 + 140: 136 ConstantComposite 139 + 141: 135(int8_t) Constant 73 + 142: 136 ConstantComposite 141 + 143: 135(int8_t) Constant 74 + 144: 136 ConstantComposite 143 + 145: 135(int8_t) Constant 75 + 146: 136 ConstantComposite 145 + 147: 135(int8_t) Constant 76 + 148: 136 ConstantComposite 147 + 149: 135(int8_t) Constant 77 + 150: 136 ConstantComposite 149 + 151: 135(int8_t) Constant 78 + 152: 136 ConstantComposite 151 + 153: TypePointer Function 11 + 155: 6(float) Constant 1120534528 + 156: 11 ConstantComposite 155 + 157: TypePointer Function 29 + 159:28(float16_t) Constant 22112 + 160: 29 ConstantComposite 159 + 163: TypePointer Function 46 + 165: 7(int) Constant 103 + 166: 46 ConstantComposite 165 + 169: TypePointer Function 64 + 171: 63(int16_t) Constant 104 + 172: 64 ConstantComposite 171 + 175: TypePointer Function 82 + 177: 81(int8_t) Constant 105 + 178: 82 ConstantComposite 177 + 181: TypePointer Function 100 + 183: 99(int) Constant 106 + 184: 100 ConstantComposite 183 + 187: TypePointer Function 118 + 189:117(int16_t) Constant 107 + 190: 118 ConstantComposite 189 + 193: TypePointer Function 136 + 195: 135(int8_t) Constant 108 + 196: 136 ConstantComposite 195 + 200: 6(float) Constant 1121845248 + 201: 11 ConstantComposite 200 + 205:28(float16_t) Constant 22272 + 206: 29 ConstantComposite 205 + 208: 7(int) Constant 113 + 209: 46 ConstantComposite 208 + 213: 63(int16_t) Constant 114 + 214: 64 ConstantComposite 213 + 218: 81(int8_t) Constant 115 + 219: 82 ConstantComposite 218 + 223: 99(int) Constant 116 + 224: 100 ConstantComposite 223 + 228:117(int16_t) Constant 117 + 229: 118 ConstantComposite 228 + 233: 135(int8_t) Constant 118 + 234: 136 ConstantComposite 233 + 238: 6(float) Constant 1123155968 + 239: 11 ConstantComposite 238 + 243:28(float16_t) Constant 22432 + 244: 29 ConstantComposite 243 + 248: 7(int) Constant 123 + 249: 46 ConstantComposite 248 + 251: 63(int16_t) Constant 124 + 252: 64 ConstantComposite 251 + 256: 81(int8_t) Constant 125 + 257: 82 ConstantComposite 256 + 261: 99(int) Constant 126 + 262: 100 ConstantComposite 261 + 266:117(int16_t) Constant 127 + 267: 118 ConstantComposite 266 + 272: 135(int8_t) Constant 4294967168 + 273: 136 ConstantComposite 272 + 278: 6(float) Constant 1124270080 + 279: 11 ConstantComposite 278 + 283:28(float16_t) Constant 22560 + 284: 29 ConstantComposite 283 + 288: 7(int) Constant 133 + 289: 46 ConstantComposite 288 + 293: 63(int16_t) Constant 134 + 294: 64 ConstantComposite 293 + 296: 81(int8_t) Constant 135 + 297: 82 ConstantComposite 296 + 301: 99(int) Constant 136 + 302: 100 ConstantComposite 301 + 307:117(int16_t) Constant 137 + 308: 118 ConstantComposite 307 + 312: 135(int8_t) Constant 4294967178 + 313: 136 ConstantComposite 312 + 318: 6(float) Constant 1124925440 + 319: 11 ConstantComposite 318 + 323:28(float16_t) Constant 22640 + 324: 29 ConstantComposite 323 + 328: 7(int) Constant 143 + 329: 46 ConstantComposite 328 + 333: 63(int16_t) Constant 144 + 334: 64 ConstantComposite 333 + 338: 81(int8_t) Constant 145 + 339: 82 ConstantComposite 338 + 341: 99(int) Constant 146 + 342: 100 ConstantComposite 341 + 347:117(int16_t) Constant 147 + 348: 118 ConstantComposite 347 + 353: 135(int8_t) Constant 4294967188 + 354: 136 ConstantComposite 353 + 358: 6(float) Constant 1125580800 + 359: 11 ConstantComposite 358 + 363:28(float16_t) Constant 22720 + 364: 29 ConstantComposite 363 + 368: 7(int) Constant 153 + 369: 46 ConstantComposite 368 + 373: 63(int16_t) Constant 154 + 374: 64 ConstantComposite 373 + 379: 81(int8_t) Constant 155 + 380: 82 ConstantComposite 379 + 385: 99(int) Constant 156 + 386: 100 ConstantComposite 385 + 388:117(int16_t) Constant 157 + 389: 118 ConstantComposite 388 + 393: 135(int8_t) Constant 4294967198 + 394: 136 ConstantComposite 393 + 398: 6(float) Constant 1126236160 + 399: 11 ConstantComposite 398 + 403:28(float16_t) Constant 22800 + 404: 29 ConstantComposite 403 + 408: 7(int) Constant 163 + 409: 46 ConstantComposite 408 + 414: 63(int16_t) Constant 164 + 415: 64 ConstantComposite 414 + 419: 81(int8_t) Constant 165 + 420: 82 ConstantComposite 419 + 425: 99(int) Constant 166 + 426: 100 ConstantComposite 425 + 430:117(int16_t) Constant 167 + 431: 118 ConstantComposite 430 + 433: 135(int8_t) Constant 4294967208 + 434: 136 ConstantComposite 433 + 438: 6(float) Constant 1126891520 + 439: 11 ConstantComposite 438 + 443:28(float16_t) Constant 22880 + 444: 29 ConstantComposite 443 + 448: 7(int) Constant 173 + 449: 46 ConstantComposite 448 + 454: 63(int16_t) Constant 174 + 455: 64 ConstantComposite 454 + 460: 81(int8_t) Constant 175 + 461: 82 ConstantComposite 460 + 465: 99(int) Constant 176 + 466: 100 ConstantComposite 465 + 470:117(int16_t) Constant 177 + 471: 118 ConstantComposite 470 + 475: 135(int8_t) Constant 4294967218 + 476: 136 ConstantComposite 475 + 477: TypeVector 7(int) 3 + 478: 7(int) Constant 64 + 479: 7(int) Constant 1 + 480: 477(ivec3) ConstantComposite 478 479 479 + 4(main): 2 Function None 3 + 5: Label + 154(v): 153(ptr) Variable Function + 158(v): 157(ptr) Variable Function + 164(v): 163(ptr) Variable Function + 170(v): 169(ptr) Variable Function + 176(v): 175(ptr) Variable Function + 182(v): 181(ptr) Variable Function + 188(v): 187(ptr) Variable Function + 194(v): 193(ptr) Variable Function + 199(v): 153(ptr) Variable Function + 204(v): 157(ptr) Variable Function + 207(v): 163(ptr) Variable Function + 212(v): 169(ptr) Variable Function + 217(v): 175(ptr) Variable Function + 222(v): 181(ptr) Variable Function + 227(v): 187(ptr) Variable Function + 232(v): 193(ptr) Variable Function + 237(v): 153(ptr) Variable Function + 242(v): 157(ptr) Variable Function + 247(v): 163(ptr) Variable Function + 250(v): 169(ptr) Variable Function + 255(v): 175(ptr) Variable Function + 260(v): 181(ptr) Variable Function + 265(v): 187(ptr) Variable Function + 271(v): 193(ptr) Variable Function + 277(v): 153(ptr) Variable Function + 282(v): 157(ptr) Variable Function + 287(v): 163(ptr) Variable Function + 292(v): 169(ptr) Variable Function + 295(v): 175(ptr) Variable Function + 300(v): 181(ptr) Variable Function + 306(v): 187(ptr) Variable Function + 311(v): 193(ptr) Variable Function + 317(v): 153(ptr) Variable Function + 322(v): 157(ptr) Variable Function + 327(v): 163(ptr) Variable Function + 332(v): 169(ptr) Variable Function + 337(v): 175(ptr) Variable Function + 340(v): 181(ptr) Variable Function + 346(v): 187(ptr) Variable Function + 352(v): 193(ptr) Variable Function + 357(v): 153(ptr) Variable Function + 362(v): 157(ptr) Variable Function + 367(v): 163(ptr) Variable Function + 372(v): 169(ptr) Variable Function + 378(v): 175(ptr) Variable Function + 384(v): 181(ptr) Variable Function + 387(v): 187(ptr) Variable Function + 392(v): 193(ptr) Variable Function + 397(v): 153(ptr) Variable Function + 402(v): 157(ptr) Variable Function + 407(v): 163(ptr) Variable Function + 413(v): 169(ptr) Variable Function + 418(v): 175(ptr) Variable Function + 424(v): 181(ptr) Variable Function + 429(v): 187(ptr) Variable Function + 432(v): 193(ptr) Variable Function + 437(v): 153(ptr) Variable Function + 442(v): 157(ptr) Variable Function + 447(v): 163(ptr) Variable Function + 453(v): 169(ptr) Variable Function + 459(v): 175(ptr) Variable Function + 464(v): 181(ptr) Variable Function + 469(v): 187(ptr) Variable Function + 474(v): 193(ptr) Variable Function + Store 154(v) 156 + Store 158(v) 160 + 161: 29 Load 158(v) + 162: 11 FConvert 161 + Store 164(v) 166 + 167: 46 Load 164(v) + 168: 11 ConvertUToF 167 + Store 170(v) 172 + 173: 64 Load 170(v) + 174: 11 ConvertUToF 173 + Store 176(v) 178 + 179: 82 Load 176(v) + 180: 11 ConvertUToF 179 + Store 182(v) 184 + 185: 100 Load 182(v) + 186: 11 ConvertSToF 185 + Store 188(v) 190 + 191: 118 Load 188(v) + 192: 11 ConvertSToF 191 + Store 194(v) 196 + 197: 136 Load 194(v) + 198: 11 ConvertSToF 197 + Store 199(v) 201 + 202: 11 Load 199(v) + 203: 29 FConvert 202 + Store 204(v) 206 + Store 207(v) 209 + 210: 46 Load 207(v) + 211: 29 ConvertUToF 210 + Store 212(v) 214 + 215: 64 Load 212(v) + 216: 29 ConvertUToF 215 + Store 217(v) 219 + 220: 82 Load 217(v) + 221: 29 ConvertUToF 220 + Store 222(v) 224 + 225: 100 Load 222(v) + 226: 29 ConvertSToF 225 + Store 227(v) 229 + 230: 118 Load 227(v) + 231: 29 ConvertSToF 230 + Store 232(v) 234 + 235: 136 Load 232(v) + 236: 29 ConvertSToF 235 + Store 237(v) 239 + 240: 11 Load 237(v) + 241: 46 ConvertFToU 240 + Store 242(v) 244 + 245: 29 Load 242(v) + 246: 46 ConvertFToU 245 + Store 247(v) 249 + Store 250(v) 252 + 253: 64 Load 250(v) + 254: 46 UConvert 253 + Store 255(v) 257 + 258: 82 Load 255(v) + 259: 46 UConvert 258 + Store 260(v) 262 + 263: 100 Load 260(v) + 264: 46 Bitcast 263 + Store 265(v) 267 + 268: 118 Load 265(v) + 269: 100 SConvert 268 + 270: 46 Bitcast 269 + Store 271(v) 273 + 274: 136 Load 271(v) + 275: 100 SConvert 274 + 276: 46 Bitcast 275 + Store 277(v) 279 + 280: 11 Load 277(v) + 281: 64 ConvertFToU 280 + Store 282(v) 284 + 285: 29 Load 282(v) + 286: 64 ConvertFToU 285 + Store 287(v) 289 + 290: 46 Load 287(v) + 291: 64 UConvert 290 + Store 292(v) 294 + Store 295(v) 297 + 298: 82 Load 295(v) + 299: 64 UConvert 298 + Store 300(v) 302 + 303: 100 Load 300(v) + 304: 118 SConvert 303 + 305: 64 Bitcast 304 + Store 306(v) 308 + 309: 118 Load 306(v) + 310: 64 Bitcast 309 + Store 311(v) 313 + 314: 136 Load 311(v) + 315: 118 SConvert 314 + 316: 64 Bitcast 315 + Store 317(v) 319 + 320: 11 Load 317(v) + 321: 82 ConvertFToU 320 + Store 322(v) 324 + 325: 29 Load 322(v) + 326: 82 ConvertFToU 325 + Store 327(v) 329 + 330: 46 Load 327(v) + 331: 82 UConvert 330 + Store 332(v) 334 + 335: 64 Load 332(v) + 336: 82 UConvert 335 + Store 337(v) 339 + Store 340(v) 342 + 343: 100 Load 340(v) + 344: 136 SConvert 343 + 345: 82 Bitcast 344 + Store 346(v) 348 + 349: 118 Load 346(v) + 350: 136 SConvert 349 + 351: 82 Bitcast 350 + Store 352(v) 354 + 355: 136 Load 352(v) + 356: 82 Bitcast 355 + Store 357(v) 359 + 360: 11 Load 357(v) + 361: 100 ConvertFToS 360 + Store 362(v) 364 + 365: 29 Load 362(v) + 366: 100 ConvertFToS 365 + Store 367(v) 369 + 370: 46 Load 367(v) + 371: 100 Bitcast 370 + Store 372(v) 374 + 375: 64 Load 372(v) + 376: 46 UConvert 375 + 377: 100 Bitcast 376 + Store 378(v) 380 + 381: 82 Load 378(v) + 382: 46 UConvert 381 + 383: 100 Bitcast 382 + Store 384(v) 386 + Store 387(v) 389 + 390: 118 Load 387(v) + 391: 100 SConvert 390 + Store 392(v) 394 + 395: 136 Load 392(v) + 396: 100 SConvert 395 + Store 397(v) 399 + 400: 11 Load 397(v) + 401: 118 ConvertFToS 400 + Store 402(v) 404 + 405: 29 Load 402(v) + 406: 118 ConvertFToS 405 + Store 407(v) 409 + 410: 46 Load 407(v) + 411: 64 UConvert 410 + 412: 118 Bitcast 411 + Store 413(v) 415 + 416: 64 Load 413(v) + 417: 118 Bitcast 416 + Store 418(v) 420 + 421: 82 Load 418(v) + 422: 64 UConvert 421 + 423: 118 Bitcast 422 + Store 424(v) 426 + 427: 100 Load 424(v) + 428: 118 SConvert 427 + Store 429(v) 431 + Store 432(v) 434 + 435: 136 Load 432(v) + 436: 118 SConvert 435 + Store 437(v) 439 + 440: 11 Load 437(v) + 441: 136 ConvertFToS 440 + Store 442(v) 444 + 445: 29 Load 442(v) + 446: 136 ConvertFToS 445 + Store 447(v) 449 + 450: 46 Load 447(v) + 451: 82 UConvert 450 + 452: 136 Bitcast 451 + Store 453(v) 455 + 456: 64 Load 453(v) + 457: 82 UConvert 456 + 458: 136 Bitcast 457 + Store 459(v) 461 + 462: 82 Load 459(v) + 463: 136 Bitcast 462 + Store 464(v) 466 + 467: 100 Load 464(v) + 468: 136 SConvert 467 + Store 469(v) 471 + 472: 118 Load 469(v) + 473: 136 SConvert 472 + Store 474(v) 476 + Return + FunctionEnd diff --git a/Test/baseResults/spv.coopmatKHR_constructorError.comp.out b/Test/baseResults/spv.coopmatKHR_constructorError.comp.out new file mode 100644 index 0000000000..040e762020 --- /dev/null +++ b/Test/baseResults/spv.coopmatKHR_constructorError.comp.out @@ -0,0 +1,9 @@ +spv.coopmatKHR_constructorError.comp +ERROR: 0:12: 'constructor' : Cooperative matrix type parameters mismatch +ERROR: 0:13: 'constructor' : Cooperative matrix type parameters mismatch +ERROR: 0:14: 'constructor' : Cooperative matrix type parameters mismatch +ERROR: 0:15: 'constructor' : Cooperative matrix type parameters mismatch +ERROR: 4 compilation errors. No code generated. + + +SPIR-V is not generated for failed compile or link diff --git a/Test/baseResults/spv.dataOut.frag.out b/Test/baseResults/spv.dataOut.frag.out index 980d1bd34d..b3bc6239e9 100644 --- a/Test/baseResults/spv.dataOut.frag.out +++ b/Test/baseResults/spv.dataOut.frag.out @@ -1,7 +1,7 @@ spv.dataOut.frag Validation failed // Module Version 10000 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 20 Capability Shader diff --git a/Test/baseResults/spv.dataOutIndirect.frag.out b/Test/baseResults/spv.dataOutIndirect.frag.out index a75e8d54e1..d07cfe97eb 100644 --- a/Test/baseResults/spv.dataOutIndirect.frag.out +++ b/Test/baseResults/spv.dataOutIndirect.frag.out @@ -1,6 +1,6 @@ spv.dataOutIndirect.frag // Module Version 10000 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 26 Capability Shader diff --git a/Test/baseResults/spv.dataOutIndirect.vert.out b/Test/baseResults/spv.dataOutIndirect.vert.out index 1c29410141..712cd13aec 100644 --- a/Test/baseResults/spv.dataOutIndirect.vert.out +++ b/Test/baseResults/spv.dataOutIndirect.vert.out @@ -2,7 +2,7 @@ spv.dataOutIndirect.vert WARNING: 0:3: attribute deprecated in version 130; may be removed in future release // Module Version 10000 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 38 Capability Shader diff --git a/Test/baseResults/spv.dead-after-continue.vert.out b/Test/baseResults/spv.dead-after-continue.vert.out index 6d8d7d902e..11024818ce 100644 --- a/Test/baseResults/spv.dead-after-continue.vert.out +++ b/Test/baseResults/spv.dead-after-continue.vert.out @@ -1,6 +1,6 @@ spv.dead-after-continue.vert // Module Version 10000 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 29 Capability Shader diff --git a/Test/baseResults/spv.dead-after-discard.frag.out b/Test/baseResults/spv.dead-after-discard.frag.out index 987f5a2bbb..2948e22e6d 100644 --- a/Test/baseResults/spv.dead-after-discard.frag.out +++ b/Test/baseResults/spv.dead-after-discard.frag.out @@ -1,6 +1,6 @@ spv.dead-after-discard.frag // Module Version 10000 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 15 Capability Shader diff --git a/Test/baseResults/spv.dead-after-loop-break.vert.out b/Test/baseResults/spv.dead-after-loop-break.vert.out index 2d9e35ae1e..490dbcc889 100644 --- a/Test/baseResults/spv.dead-after-loop-break.vert.out +++ b/Test/baseResults/spv.dead-after-loop-break.vert.out @@ -1,6 +1,6 @@ spv.dead-after-loop-break.vert // Module Version 10000 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 36 Capability Shader diff --git a/Test/baseResults/spv.dead-after-return.vert.out b/Test/baseResults/spv.dead-after-return.vert.out index d6ba2c72bf..09693633d2 100644 --- a/Test/baseResults/spv.dead-after-return.vert.out +++ b/Test/baseResults/spv.dead-after-return.vert.out @@ -1,6 +1,6 @@ spv.dead-after-return.vert // Module Version 10000 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 14 Capability Shader diff --git a/Test/baseResults/spv.dead-after-switch-break.vert.out b/Test/baseResults/spv.dead-after-switch-break.vert.out index f8bc4d047b..744355dcac 100644 --- a/Test/baseResults/spv.dead-after-switch-break.vert.out +++ b/Test/baseResults/spv.dead-after-switch-break.vert.out @@ -1,6 +1,6 @@ spv.dead-after-switch-break.vert // Module Version 10000 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 21 Capability Shader diff --git a/Test/baseResults/spv.dead-complex-continue-after-return.vert.out b/Test/baseResults/spv.dead-complex-continue-after-return.vert.out index 3db78ecc51..3c41ff8ab9 100644 --- a/Test/baseResults/spv.dead-complex-continue-after-return.vert.out +++ b/Test/baseResults/spv.dead-complex-continue-after-return.vert.out @@ -1,6 +1,6 @@ spv.dead-complex-continue-after-return.vert // Module Version 10000 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 31 Capability Shader diff --git a/Test/baseResults/spv.dead-complex-merge-after-return.vert.out b/Test/baseResults/spv.dead-complex-merge-after-return.vert.out index cc1b25c81f..52431a3236 100644 --- a/Test/baseResults/spv.dead-complex-merge-after-return.vert.out +++ b/Test/baseResults/spv.dead-complex-merge-after-return.vert.out @@ -1,6 +1,6 @@ spv.dead-complex-merge-after-return.vert // Module Version 10000 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 36 Capability Shader diff --git a/Test/baseResults/spv.debugInfo.1.1.frag.out b/Test/baseResults/spv.debugInfo.1.1.frag.out index 109dc4bd58..127267560e 100644 --- a/Test/baseResults/spv.debugInfo.1.1.frag.out +++ b/Test/baseResults/spv.debugInfo.1.1.frag.out @@ -1,12 +1,12 @@ spv.debugInfo.frag // Module Version 10300 -// Generated by (magic number): 8000a -// Id's are bound by 124 +// Generated by (magic number): 8000b +// Id's are bound by 187 Capability Shader 2: ExtInstImport "GLSL.std.450" MemoryModel Logical GLSL450 - EntryPoint Fragment 5 "main" 24 52 + EntryPoint Fragment 5 "main" 30 104 ExecutionMode 5 OriginUpperLeft 1: String "spv.debugInfo.frag" Source GLSL 450 1 "#version 450 @@ -36,9 +36,40 @@ vec4 foo(S s) return r; } +float testBranch(float x, float y) +{ + float result = 0; + bool b = x > 0; + + // branch with load + if (b) { + result += 1; + } + else { + result -= 1; + } + + // branch with expression + if (x > y) { + result += x - y; + } + + // selection with load + result += b ? + 1 : -1; + + // selection with expression + result += x < y ? + y : + float(b); + + return result; +} + void main() { outv = foo(s); + outv += testBranch(inv.x, inv.y); outv += texture(s2d, vec2(0.5)); switch (s.a) { @@ -66,17 +97,24 @@ void main() MemberName 8(S) 0 "a" Name 14 "foo(struct-S-i11;" Name 13 "s" - Name 17 "r" - Name 24 "inv" - Name 52 "outv" - Name 53 "S" - MemberName 53(S) 0 "a" - Name 54 "ubuf" - MemberName 54(ubuf) 0 "s" - Name 56 "" - Name 57 "param" - Name 67 "s2d" - Name 97 "i" + Name 20 "testBranch(f1;f1;" + Name 18 "x" + Name 19 "y" + Name 23 "r" + Name 30 "inv" + Name 56 "result" + Name 59 "b" + Name 104 "outv" + Name 105 "S" + MemberName 105(S) 0 "a" + Name 106 "ubuf" + MemberName 106(ubuf) 0 "s" + Name 108 "" + Name 109 "param" + Name 116 "param" + Name 120 "param" + Name 131 "s2d" + Name 161 "i" ModuleProcessed "no-storage-format" ModuleProcessed "resource-set-binding 3" ModuleProcessed "auto-map-bindings" @@ -88,15 +126,15 @@ void main() ModuleProcessed "suppress-warnings" ModuleProcessed "hlsl-offsets" ModuleProcessed "entry-point main" - Decorate 24(inv) Location 0 - Decorate 52(outv) Location 0 - MemberDecorate 53(S) 0 Offset 0 - MemberDecorate 54(ubuf) 0 Offset 0 - Decorate 54(ubuf) Block - Decorate 56 DescriptorSet 3 - Decorate 56 Binding 0 - Decorate 67(s2d) DescriptorSet 3 - Decorate 67(s2d) Binding 1 + Decorate 30(inv) Location 0 + Decorate 104(outv) Location 0 + MemberDecorate 105(S) 0 Offset 0 + MemberDecorate 106(ubuf) 0 Offset 0 + Decorate 106(ubuf) Block + Decorate 108 DescriptorSet 3 + Decorate 108 Binding 0 + Decorate 131(s2d) DescriptorSet 3 + Decorate 131(s2d) Binding 1 3: TypeVoid 4: TypeFunction 3 7: TypeInt 32 1 @@ -105,177 +143,280 @@ void main() 10: TypeFloat 32 11: TypeVector 10(float) 4 12: TypeFunction 11(fvec4) 9(ptr) - 16: TypePointer Function 11(fvec4) - 18: 7(int) Constant 0 - 19: TypePointer Function 7(int) - 23: TypePointer Input 11(fvec4) - 24(inv): 23(ptr) Variable Input - 28: 10(float) Constant 1065353216 - 31: TypeInt 32 0 - 32: 31(int) Constant 0 - 33: TypePointer Function 10(float) - 36: 10(float) Constant 1077936128 - 37: TypeBool - 45: 10(float) Constant 1073741824 - 51: TypePointer Output 11(fvec4) - 52(outv): 51(ptr) Variable Output - 53(S): TypeStruct 7(int) - 54(ubuf): TypeStruct 53(S) - 55: TypePointer Uniform 54(ubuf) - 56: 55(ptr) Variable Uniform - 58: TypePointer Uniform 53(S) - 64: TypeImage 10(float) 2D sampled format:Unknown - 65: TypeSampledImage 64 - 66: TypePointer UniformConstant 65 - 67(s2d): 66(ptr) Variable UniformConstant - 69: TypeVector 10(float) 2 - 70: 10(float) Constant 1056964608 - 71: 69(fvec2) ConstantComposite 70 70 - 75: TypePointer Uniform 7(int) - 104: 7(int) Constant 10 - 109: 7(int) Constant 1 - 111: TypePointer Output 10(float) - 114: 10(float) Constant 1092616192 - Line 1 28 11 + 16: TypePointer Function 10(float) + 17: TypeFunction 10(float) 16(ptr) 16(ptr) + 22: TypePointer Function 11(fvec4) + 24: 7(int) Constant 0 + 25: TypePointer Function 7(int) + 29: TypePointer Input 11(fvec4) + 30(inv): 29(ptr) Variable Input + 34: 10(float) Constant 1065353216 + 37: TypeInt 32 0 + 38: 37(int) Constant 0 + 41: 10(float) Constant 1077936128 + 42: TypeBool + 50: 10(float) Constant 1073741824 + 57: 10(float) Constant 0 + 58: TypePointer Function 42(bool) + 81: 7(int) Constant 1 + 82: 7(int) Constant 4294967295 + 103: TypePointer Output 11(fvec4) + 104(outv): 103(ptr) Variable Output + 105(S): TypeStruct 7(int) + 106(ubuf): TypeStruct 105(S) + 107: TypePointer Uniform 106(ubuf) + 108: 107(ptr) Variable Uniform + 110: TypePointer Uniform 105(S) + 117: TypePointer Input 10(float) + 121: 37(int) Constant 1 + 128: TypeImage 10(float) 2D sampled format:Unknown + 129: TypeSampledImage 128 + 130: TypePointer UniformConstant 129 + 131(s2d): 130(ptr) Variable UniformConstant + 133: TypeVector 10(float) 2 + 134: 10(float) Constant 1056964608 + 135: 133(fvec2) ConstantComposite 134 134 + 139: TypePointer Uniform 7(int) + 168: 7(int) Constant 10 + 174: TypePointer Output 10(float) + 177: 10(float) Constant 1092616192 + Line 1 58 11 5(main): 3 Function None 4 6: Label - 57(param): 9(ptr) Variable Function - 97(i): 19(ptr) Variable Function - 116: 16(ptr) Variable Function - Line 1 30 0 - 59: 58(ptr) AccessChain 56 18 - 60: 53(S) Load 59 - 61: 7(int) CompositeExtract 60 0 - 62: 19(ptr) AccessChain 57(param) 18 - Store 62 61 - 63: 11(fvec4) FunctionCall 14(foo(struct-S-i11;) 57(param) - Store 52(outv) 63 - Line 1 31 0 - 68: 65 Load 67(s2d) - 72: 11(fvec4) ImageSampleImplicitLod 68 71 - 73: 11(fvec4) Load 52(outv) - 74: 11(fvec4) FAdd 73 72 - Store 52(outv) 74 - Line 1 33 0 - 76: 75(ptr) AccessChain 56 18 18 - 77: 7(int) Load 76 - SelectionMerge 81 None - Switch 77 80 - case 10: 78 - case 20: 79 - 80: Label - Line 1 42 0 - 92: 11(fvec4) Load 52(outv) - 93: 11(fvec4) CompositeConstruct 28 28 28 28 - 94: 11(fvec4) FSub 92 93 - Store 52(outv) 94 - Line 1 43 0 - Branch 81 - 78: Label - Line 1 35 0 - 82: 11(fvec4) Load 52(outv) - 83: 11(fvec4) CompositeConstruct 28 28 28 28 - 84: 11(fvec4) FAdd 82 83 - Store 52(outv) 84 - Line 1 36 0 - Branch 81 - 79: Label - Line 1 38 0 - 86: 11(fvec4) Load 52(outv) - 87: 11(fvec4) VectorTimesScalar 86 45 - Store 52(outv) 87 - Line 1 39 0 - 88: 11(fvec4) Load 52(outv) - 89: 11(fvec4) CompositeConstruct 28 28 28 28 - 90: 11(fvec4) FAdd 88 89 - Store 52(outv) 90 - Line 1 40 0 - Branch 81 - 81: Label - Line 1 46 0 - Store 97(i) 18 - Branch 98 - 98: Label - LoopMerge 100 101 None - Branch 102 - 102: Label - 103: 7(int) Load 97(i) - 105: 37(bool) SLessThan 103 104 - BranchConditional 105 99 100 - 99: Label - Line 1 47 0 - 106: 11(fvec4) Load 52(outv) - 107: 11(fvec4) VectorTimesScalar 106 36 - Store 52(outv) 107 - Branch 101 - 101: Label - Line 1 46 0 - 108: 7(int) Load 97(i) - 110: 7(int) IAdd 108 109 - Store 97(i) 110 - Branch 98 - 100: Label - Line 1 49 0 - 112: 111(ptr) AccessChain 52(outv) 32 - 113: 10(float) Load 112 - 115: 37(bool) FOrdLessThan 113 114 - SelectionMerge 118 None - BranchConditional 115 117 121 - 117: Label - Line 1 50 0 - 119: 11(fvec4) Load 52(outv) - 120: 11(fvec4) ExtInst 2(GLSL.std.450) 13(Sin) 119 - Store 52(outv) 120 - Store 116 120 - Branch 118 - 121: Label - Line 1 51 0 - 122: 11(fvec4) Load 52(outv) - 123: 11(fvec4) ExtInst 2(GLSL.std.450) 14(Cos) 122 - Store 52(outv) 123 - Store 116 123 - Branch 118 - 118: Label + 109(param): 9(ptr) Variable Function + 116(param): 16(ptr) Variable Function + 120(param): 16(ptr) Variable Function + 161(i): 25(ptr) Variable Function + 179: 22(ptr) Variable Function + Line 1 60 0 + 111: 110(ptr) AccessChain 108 24 + 112: 105(S) Load 111 + 113: 7(int) CompositeExtract 112 0 + 114: 25(ptr) AccessChain 109(param) 24 + Store 114 113 + 115: 11(fvec4) FunctionCall 14(foo(struct-S-i11;) 109(param) + Store 104(outv) 115 + Line 1 61 0 + 118: 117(ptr) AccessChain 30(inv) 38 + 119: 10(float) Load 118 + Store 116(param) 119 + 122: 117(ptr) AccessChain 30(inv) 121 + 123: 10(float) Load 122 + Store 120(param) 123 + 124: 10(float) FunctionCall 20(testBranch(f1;f1;) 116(param) 120(param) + 125: 11(fvec4) Load 104(outv) + 126: 11(fvec4) CompositeConstruct 124 124 124 124 + 127: 11(fvec4) FAdd 125 126 + Store 104(outv) 127 + Line 1 62 0 + 132: 129 Load 131(s2d) + 136: 11(fvec4) ImageSampleImplicitLod 132 135 + 137: 11(fvec4) Load 104(outv) + 138: 11(fvec4) FAdd 137 136 + Store 104(outv) 138 + Line 1 64 0 + 140: 139(ptr) AccessChain 108 24 24 + 141: 7(int) Load 140 + SelectionMerge 145 None + Switch 141 144 + case 10: 142 + case 20: 143 + 144: Label + Line 1 73 0 + 156: 11(fvec4) Load 104(outv) + 157: 11(fvec4) CompositeConstruct 34 34 34 34 + 158: 11(fvec4) FSub 156 157 + Store 104(outv) 158 + Line 1 74 0 + Branch 145 + 142: Label + Line 1 66 0 + 146: 11(fvec4) Load 104(outv) + 147: 11(fvec4) CompositeConstruct 34 34 34 34 + 148: 11(fvec4) FAdd 146 147 + Store 104(outv) 148 + Line 1 67 0 + Branch 145 + 143: Label + Line 1 69 0 + 150: 11(fvec4) Load 104(outv) + 151: 11(fvec4) VectorTimesScalar 150 50 + Store 104(outv) 151 + Line 1 70 0 + 152: 11(fvec4) Load 104(outv) + 153: 11(fvec4) CompositeConstruct 34 34 34 34 + 154: 11(fvec4) FAdd 152 153 + Store 104(outv) 154 + Line 1 71 0 + Branch 145 + 145: Label + Line 1 77 0 + Store 161(i) 24 + Branch 162 + 162: Label + Line 1 77 0 + LoopMerge 164 165 None + Branch 166 + 166: Label + Line 1 77 0 + 167: 7(int) Load 161(i) + 169: 42(bool) SLessThan 167 168 + BranchConditional 169 163 164 + 163: Label + Line 1 78 0 + 170: 11(fvec4) Load 104(outv) + 171: 11(fvec4) VectorTimesScalar 170 41 + Store 104(outv) 171 + Branch 165 + 165: Label + Line 1 77 0 + 172: 7(int) Load 161(i) + 173: 7(int) IAdd 172 81 + Store 161(i) 173 + Branch 162 + 164: Label + Line 1 80 0 + 175: 174(ptr) AccessChain 104(outv) 38 + 176: 10(float) Load 175 + 178: 42(bool) FOrdLessThan 176 177 + SelectionMerge 181 None + BranchConditional 178 180 184 + 180: Label + Line 1 81 0 + 182: 11(fvec4) Load 104(outv) + 183: 11(fvec4) ExtInst 2(GLSL.std.450) 13(Sin) 182 + Store 104(outv) 183 + Store 179 183 + Branch 181 + 184: Label + Line 1 82 0 + 185: 11(fvec4) Load 104(outv) + 186: 11(fvec4) ExtInst 2(GLSL.std.450) 14(Cos) 185 + Store 104(outv) 186 + Store 179 186 + Branch 181 + 181: Label Return FunctionEnd Line 1 16 13 14(foo(struct-S-i11;): 11(fvec4) Function None 12 13(s): 9(ptr) FunctionParameter 15: Label - 17(r): 16(ptr) Variable Function + 23(r): 22(ptr) Variable Function Line 1 18 0 - 20: 19(ptr) AccessChain 13(s) 18 - 21: 7(int) Load 20 - 22: 10(float) ConvertSToF 21 - 25: 11(fvec4) Load 24(inv) - 26: 11(fvec4) VectorTimesScalar 25 22 - Store 17(r) 26 + 26: 25(ptr) AccessChain 13(s) 24 + 27: 7(int) Load 26 + 28: 10(float) ConvertSToF 27 + 31: 11(fvec4) Load 30(inv) + 32: 11(fvec4) VectorTimesScalar 31 28 + Store 23(r) 32 Line 1 19 0 - 27: 11(fvec4) Load 17(r) - 29: 11(fvec4) CompositeConstruct 28 28 28 28 - 30: 11(fvec4) FAdd 27 29 - Store 17(r) 30 + 33: 11(fvec4) Load 23(r) + 35: 11(fvec4) CompositeConstruct 34 34 34 34 + 36: 11(fvec4) FAdd 33 35 + Store 23(r) 36 Line 1 20 0 - 34: 33(ptr) AccessChain 17(r) 32 - 35: 10(float) Load 34 - 38: 37(bool) FOrdGreaterThan 35 36 - SelectionMerge 40 None - BranchConditional 38 39 44 - 39: Label - Line 1 21 0 - 41: 11(fvec4) Load 17(r) - 42: 11(fvec4) CompositeConstruct 28 28 28 28 - 43: 11(fvec4) FSub 41 42 - Store 17(r) 43 - Branch 40 + 39: 16(ptr) AccessChain 23(r) 38 + 40: 10(float) Load 39 + 43: 42(bool) FOrdGreaterThan 40 41 + SelectionMerge 45 None + BranchConditional 43 44 49 44: Label + Line 1 21 0 + 46: 11(fvec4) Load 23(r) + 47: 11(fvec4) CompositeConstruct 34 34 34 34 + 48: 11(fvec4) FSub 46 47 + Store 23(r) 48 + Branch 45 + 49: Label Line 1 23 0 - 46: 11(fvec4) Load 17(r) - 47: 11(fvec4) VectorTimesScalar 46 45 - Store 17(r) 47 - Branch 40 - 40: Label + 51: 11(fvec4) Load 23(r) + 52: 11(fvec4) VectorTimesScalar 51 50 + Store 23(r) 52 + Branch 45 + 45: Label Line 1 25 0 - 48: 11(fvec4) Load 17(r) - ReturnValue 48 + 53: 11(fvec4) Load 23(r) + ReturnValue 53 + FunctionEnd + Line 1 28 34 +20(testBranch(f1;f1;): 10(float) Function None 17 + 18(x): 16(ptr) FunctionParameter + 19(y): 16(ptr) FunctionParameter + 21: Label + 56(result): 16(ptr) Variable Function + 59(b): 58(ptr) Variable Function + 90: 16(ptr) Variable Function + Line 1 30 0 + Store 56(result) 57 + Line 1 31 0 + 60: 10(float) Load 18(x) + 61: 42(bool) FOrdGreaterThan 60 57 + Store 59(b) 61 + Line 1 34 0 + 62: 42(bool) Load 59(b) + SelectionMerge 64 None + BranchConditional 62 63 67 + 63: Label + Line 1 35 0 + 65: 10(float) Load 56(result) + 66: 10(float) FAdd 65 34 + Store 56(result) 66 + Branch 64 + 67: Label + Line 1 38 0 + 68: 10(float) Load 56(result) + 69: 10(float) FSub 68 34 + Store 56(result) 69 + Branch 64 + 64: Label + Line 1 42 0 + 70: 10(float) Load 18(x) + 71: 10(float) Load 19(y) + 72: 42(bool) FOrdGreaterThan 70 71 + SelectionMerge 74 None + BranchConditional 72 73 74 + 73: Label + Line 1 43 0 + 75: 10(float) Load 18(x) + 76: 10(float) Load 19(y) + 77: 10(float) FSub 75 76 + 78: 10(float) Load 56(result) + 79: 10(float) FAdd 78 77 + Store 56(result) 79 + Branch 74 + 74: Label + Line 1 47 0 + 80: 42(bool) Load 59(b) + 83: 7(int) Select 80 81 82 + 84: 10(float) ConvertSToF 83 + 85: 10(float) Load 56(result) + 86: 10(float) FAdd 85 84 + Store 56(result) 86 + Line 1 51 0 + 87: 10(float) Load 18(x) + 88: 10(float) Load 19(y) + 89: 42(bool) FOrdLessThan 87 88 + SelectionMerge 92 None + BranchConditional 89 91 94 + 91: Label + Line 1 52 0 + 93: 10(float) Load 19(y) + Store 90 93 + Branch 92 + 94: Label + Line 1 53 0 + 95: 42(bool) Load 59(b) + 96: 10(float) Select 95 34 57 + Store 90 96 + Branch 92 + 92: Label + 97: 10(float) Load 90 + Line 1 51 0 + 98: 10(float) Load 56(result) + 99: 10(float) FAdd 98 97 + Store 56(result) 99 + Line 1 55 0 + 100: 10(float) Load 56(result) + ReturnValue 100 FunctionEnd diff --git a/Test/baseResults/spv.debugInfo.frag.out b/Test/baseResults/spv.debugInfo.frag.out index 9091327151..8bacd74d9a 100644 --- a/Test/baseResults/spv.debugInfo.frag.out +++ b/Test/baseResults/spv.debugInfo.frag.out @@ -1,12 +1,12 @@ spv.debugInfo.frag // Module Version 10000 -// Generated by (magic number): 8000a -// Id's are bound by 124 +// Generated by (magic number): 8000b +// Id's are bound by 187 Capability Shader 2: ExtInstImport "GLSL.std.450" MemoryModel Logical GLSL450 - EntryPoint Fragment 5 "main" 24 52 + EntryPoint Fragment 5 "main" 30 104 ExecutionMode 5 OriginLowerLeft 1: String "spv.debugInfo.frag" Source GLSL 450 1 "// OpModuleProcessed no-storage-format @@ -47,9 +47,40 @@ vec4 foo(S s) return r; } +float testBranch(float x, float y) +{ + float result = 0; + bool b = x > 0; + + // branch with load + if (b) { + result += 1; + } + else { + result -= 1; + } + + // branch with expression + if (x > y) { + result += x - y; + } + + // selection with load + result += b ? + 1 : -1; + + // selection with expression + result += x < y ? + y : + float(b); + + return result; +} + void main() { outv = foo(s); + outv += testBranch(inv.x, inv.y); outv += texture(s2d, vec2(0.5)); switch (s.a) { @@ -77,27 +108,34 @@ void main() MemberName 8(S) 0 "a" Name 14 "foo(struct-S-i11;" Name 13 "s" - Name 17 "r" - Name 24 "inv" - Name 52 "outv" - Name 53 "S" - MemberName 53(S) 0 "a" - Name 54 "ubuf" - MemberName 54(ubuf) 0 "s" - Name 56 "" - Name 57 "param" - Name 67 "s2d" - Name 97 "i" - Decorate 24(inv) Location 0 - Decorate 52(outv) Location 0 - MemberDecorate 53(S) 0 Offset 0 - MemberDecorate 54(ubuf) 0 Offset 0 - Decorate 54(ubuf) Block - Decorate 56 DescriptorSet 3 - Decorate 56 Binding 0 - Decorate 67(s2d) Location 0 - Decorate 67(s2d) DescriptorSet 3 - Decorate 67(s2d) Binding 1 + Name 20 "testBranch(f1;f1;" + Name 18 "x" + Name 19 "y" + Name 23 "r" + Name 30 "inv" + Name 56 "result" + Name 59 "b" + Name 104 "outv" + Name 105 "S" + MemberName 105(S) 0 "a" + Name 106 "ubuf" + MemberName 106(ubuf) 0 "s" + Name 108 "" + Name 109 "param" + Name 116 "param" + Name 120 "param" + Name 131 "s2d" + Name 161 "i" + Decorate 30(inv) Location 0 + Decorate 104(outv) Location 0 + MemberDecorate 105(S) 0 Offset 0 + MemberDecorate 106(ubuf) 0 Offset 0 + Decorate 106(ubuf) Block + Decorate 108 DescriptorSet 3 + Decorate 108 Binding 0 + Decorate 131(s2d) Location 0 + Decorate 131(s2d) DescriptorSet 3 + Decorate 131(s2d) Binding 1 3: TypeVoid 4: TypeFunction 3 7: TypeInt 32 1 @@ -106,177 +144,280 @@ void main() 10: TypeFloat 32 11: TypeVector 10(float) 4 12: TypeFunction 11(fvec4) 9(ptr) - 16: TypePointer Function 11(fvec4) - 18: 7(int) Constant 0 - 19: TypePointer Function 7(int) - 23: TypePointer Input 11(fvec4) - 24(inv): 23(ptr) Variable Input - 28: 10(float) Constant 1065353216 - 31: TypeInt 32 0 - 32: 31(int) Constant 0 - 33: TypePointer Function 10(float) - 36: 10(float) Constant 1077936128 - 37: TypeBool - 45: 10(float) Constant 1073741824 - 51: TypePointer Output 11(fvec4) - 52(outv): 51(ptr) Variable Output - 53(S): TypeStruct 7(int) - 54(ubuf): TypeStruct 53(S) - 55: TypePointer Uniform 54(ubuf) - 56: 55(ptr) Variable Uniform - 58: TypePointer Uniform 53(S) - 64: TypeImage 10(float) 2D sampled format:Unknown - 65: TypeSampledImage 64 - 66: TypePointer UniformConstant 65 - 67(s2d): 66(ptr) Variable UniformConstant - 69: TypeVector 10(float) 2 - 70: 10(float) Constant 1056964608 - 71: 69(fvec2) ConstantComposite 70 70 - 75: TypePointer Uniform 7(int) - 104: 7(int) Constant 10 - 109: 7(int) Constant 1 - 111: TypePointer Output 10(float) - 114: 10(float) Constant 1092616192 - Line 1 28 11 + 16: TypePointer Function 10(float) + 17: TypeFunction 10(float) 16(ptr) 16(ptr) + 22: TypePointer Function 11(fvec4) + 24: 7(int) Constant 0 + 25: TypePointer Function 7(int) + 29: TypePointer Input 11(fvec4) + 30(inv): 29(ptr) Variable Input + 34: 10(float) Constant 1065353216 + 37: TypeInt 32 0 + 38: 37(int) Constant 0 + 41: 10(float) Constant 1077936128 + 42: TypeBool + 50: 10(float) Constant 1073741824 + 57: 10(float) Constant 0 + 58: TypePointer Function 42(bool) + 81: 7(int) Constant 1 + 82: 7(int) Constant 4294967295 + 103: TypePointer Output 11(fvec4) + 104(outv): 103(ptr) Variable Output + 105(S): TypeStruct 7(int) + 106(ubuf): TypeStruct 105(S) + 107: TypePointer Uniform 106(ubuf) + 108: 107(ptr) Variable Uniform + 110: TypePointer Uniform 105(S) + 117: TypePointer Input 10(float) + 121: 37(int) Constant 1 + 128: TypeImage 10(float) 2D sampled format:Unknown + 129: TypeSampledImage 128 + 130: TypePointer UniformConstant 129 + 131(s2d): 130(ptr) Variable UniformConstant + 133: TypeVector 10(float) 2 + 134: 10(float) Constant 1056964608 + 135: 133(fvec2) ConstantComposite 134 134 + 139: TypePointer Uniform 7(int) + 168: 7(int) Constant 10 + 174: TypePointer Output 10(float) + 177: 10(float) Constant 1092616192 + Line 1 58 11 5(main): 3 Function None 4 6: Label - 57(param): 9(ptr) Variable Function - 97(i): 19(ptr) Variable Function - 116: 16(ptr) Variable Function - Line 1 30 0 - 59: 58(ptr) AccessChain 56 18 - 60: 53(S) Load 59 - 61: 7(int) CompositeExtract 60 0 - 62: 19(ptr) AccessChain 57(param) 18 - Store 62 61 - 63: 11(fvec4) FunctionCall 14(foo(struct-S-i11;) 57(param) - Store 52(outv) 63 - Line 1 31 0 - 68: 65 Load 67(s2d) - 72: 11(fvec4) ImageSampleImplicitLod 68 71 - 73: 11(fvec4) Load 52(outv) - 74: 11(fvec4) FAdd 73 72 - Store 52(outv) 74 - Line 1 33 0 - 76: 75(ptr) AccessChain 56 18 18 - 77: 7(int) Load 76 - SelectionMerge 81 None - Switch 77 80 - case 10: 78 - case 20: 79 - 80: Label - Line 1 42 0 - 92: 11(fvec4) Load 52(outv) - 93: 11(fvec4) CompositeConstruct 28 28 28 28 - 94: 11(fvec4) FSub 92 93 - Store 52(outv) 94 - Line 1 43 0 - Branch 81 - 78: Label - Line 1 35 0 - 82: 11(fvec4) Load 52(outv) - 83: 11(fvec4) CompositeConstruct 28 28 28 28 - 84: 11(fvec4) FAdd 82 83 - Store 52(outv) 84 - Line 1 36 0 - Branch 81 - 79: Label - Line 1 38 0 - 86: 11(fvec4) Load 52(outv) - 87: 11(fvec4) VectorTimesScalar 86 45 - Store 52(outv) 87 - Line 1 39 0 - 88: 11(fvec4) Load 52(outv) - 89: 11(fvec4) CompositeConstruct 28 28 28 28 - 90: 11(fvec4) FAdd 88 89 - Store 52(outv) 90 - Line 1 40 0 - Branch 81 - 81: Label - Line 1 46 0 - Store 97(i) 18 - Branch 98 - 98: Label - LoopMerge 100 101 None - Branch 102 - 102: Label - 103: 7(int) Load 97(i) - 105: 37(bool) SLessThan 103 104 - BranchConditional 105 99 100 - 99: Label - Line 1 47 0 - 106: 11(fvec4) Load 52(outv) - 107: 11(fvec4) VectorTimesScalar 106 36 - Store 52(outv) 107 - Branch 101 - 101: Label - Line 1 46 0 - 108: 7(int) Load 97(i) - 110: 7(int) IAdd 108 109 - Store 97(i) 110 - Branch 98 - 100: Label - Line 1 49 0 - 112: 111(ptr) AccessChain 52(outv) 32 - 113: 10(float) Load 112 - 115: 37(bool) FOrdLessThan 113 114 - SelectionMerge 118 None - BranchConditional 115 117 121 - 117: Label - Line 1 50 0 - 119: 11(fvec4) Load 52(outv) - 120: 11(fvec4) ExtInst 2(GLSL.std.450) 13(Sin) 119 - Store 52(outv) 120 - Store 116 120 - Branch 118 - 121: Label - Line 1 51 0 - 122: 11(fvec4) Load 52(outv) - 123: 11(fvec4) ExtInst 2(GLSL.std.450) 14(Cos) 122 - Store 52(outv) 123 - Store 116 123 - Branch 118 - 118: Label + 109(param): 9(ptr) Variable Function + 116(param): 16(ptr) Variable Function + 120(param): 16(ptr) Variable Function + 161(i): 25(ptr) Variable Function + 179: 22(ptr) Variable Function + Line 1 60 0 + 111: 110(ptr) AccessChain 108 24 + 112: 105(S) Load 111 + 113: 7(int) CompositeExtract 112 0 + 114: 25(ptr) AccessChain 109(param) 24 + Store 114 113 + 115: 11(fvec4) FunctionCall 14(foo(struct-S-i11;) 109(param) + Store 104(outv) 115 + Line 1 61 0 + 118: 117(ptr) AccessChain 30(inv) 38 + 119: 10(float) Load 118 + Store 116(param) 119 + 122: 117(ptr) AccessChain 30(inv) 121 + 123: 10(float) Load 122 + Store 120(param) 123 + 124: 10(float) FunctionCall 20(testBranch(f1;f1;) 116(param) 120(param) + 125: 11(fvec4) Load 104(outv) + 126: 11(fvec4) CompositeConstruct 124 124 124 124 + 127: 11(fvec4) FAdd 125 126 + Store 104(outv) 127 + Line 1 62 0 + 132: 129 Load 131(s2d) + 136: 11(fvec4) ImageSampleImplicitLod 132 135 + 137: 11(fvec4) Load 104(outv) + 138: 11(fvec4) FAdd 137 136 + Store 104(outv) 138 + Line 1 64 0 + 140: 139(ptr) AccessChain 108 24 24 + 141: 7(int) Load 140 + SelectionMerge 145 None + Switch 141 144 + case 10: 142 + case 20: 143 + 144: Label + Line 1 73 0 + 156: 11(fvec4) Load 104(outv) + 157: 11(fvec4) CompositeConstruct 34 34 34 34 + 158: 11(fvec4) FSub 156 157 + Store 104(outv) 158 + Line 1 74 0 + Branch 145 + 142: Label + Line 1 66 0 + 146: 11(fvec4) Load 104(outv) + 147: 11(fvec4) CompositeConstruct 34 34 34 34 + 148: 11(fvec4) FAdd 146 147 + Store 104(outv) 148 + Line 1 67 0 + Branch 145 + 143: Label + Line 1 69 0 + 150: 11(fvec4) Load 104(outv) + 151: 11(fvec4) VectorTimesScalar 150 50 + Store 104(outv) 151 + Line 1 70 0 + 152: 11(fvec4) Load 104(outv) + 153: 11(fvec4) CompositeConstruct 34 34 34 34 + 154: 11(fvec4) FAdd 152 153 + Store 104(outv) 154 + Line 1 71 0 + Branch 145 + 145: Label + Line 1 77 0 + Store 161(i) 24 + Branch 162 + 162: Label + Line 1 77 0 + LoopMerge 164 165 None + Branch 166 + 166: Label + Line 1 77 0 + 167: 7(int) Load 161(i) + 169: 42(bool) SLessThan 167 168 + BranchConditional 169 163 164 + 163: Label + Line 1 78 0 + 170: 11(fvec4) Load 104(outv) + 171: 11(fvec4) VectorTimesScalar 170 41 + Store 104(outv) 171 + Branch 165 + 165: Label + Line 1 77 0 + 172: 7(int) Load 161(i) + 173: 7(int) IAdd 172 81 + Store 161(i) 173 + Branch 162 + 164: Label + Line 1 80 0 + 175: 174(ptr) AccessChain 104(outv) 38 + 176: 10(float) Load 175 + 178: 42(bool) FOrdLessThan 176 177 + SelectionMerge 181 None + BranchConditional 178 180 184 + 180: Label + Line 1 81 0 + 182: 11(fvec4) Load 104(outv) + 183: 11(fvec4) ExtInst 2(GLSL.std.450) 13(Sin) 182 + Store 104(outv) 183 + Store 179 183 + Branch 181 + 184: Label + Line 1 82 0 + 185: 11(fvec4) Load 104(outv) + 186: 11(fvec4) ExtInst 2(GLSL.std.450) 14(Cos) 185 + Store 104(outv) 186 + Store 179 186 + Branch 181 + 181: Label Return FunctionEnd Line 1 16 13 14(foo(struct-S-i11;): 11(fvec4) Function None 12 13(s): 9(ptr) FunctionParameter 15: Label - 17(r): 16(ptr) Variable Function + 23(r): 22(ptr) Variable Function Line 1 18 0 - 20: 19(ptr) AccessChain 13(s) 18 - 21: 7(int) Load 20 - 22: 10(float) ConvertSToF 21 - 25: 11(fvec4) Load 24(inv) - 26: 11(fvec4) VectorTimesScalar 25 22 - Store 17(r) 26 + 26: 25(ptr) AccessChain 13(s) 24 + 27: 7(int) Load 26 + 28: 10(float) ConvertSToF 27 + 31: 11(fvec4) Load 30(inv) + 32: 11(fvec4) VectorTimesScalar 31 28 + Store 23(r) 32 Line 1 19 0 - 27: 11(fvec4) Load 17(r) - 29: 11(fvec4) CompositeConstruct 28 28 28 28 - 30: 11(fvec4) FAdd 27 29 - Store 17(r) 30 + 33: 11(fvec4) Load 23(r) + 35: 11(fvec4) CompositeConstruct 34 34 34 34 + 36: 11(fvec4) FAdd 33 35 + Store 23(r) 36 Line 1 20 0 - 34: 33(ptr) AccessChain 17(r) 32 - 35: 10(float) Load 34 - 38: 37(bool) FOrdGreaterThan 35 36 - SelectionMerge 40 None - BranchConditional 38 39 44 - 39: Label - Line 1 21 0 - 41: 11(fvec4) Load 17(r) - 42: 11(fvec4) CompositeConstruct 28 28 28 28 - 43: 11(fvec4) FSub 41 42 - Store 17(r) 43 - Branch 40 + 39: 16(ptr) AccessChain 23(r) 38 + 40: 10(float) Load 39 + 43: 42(bool) FOrdGreaterThan 40 41 + SelectionMerge 45 None + BranchConditional 43 44 49 44: Label + Line 1 21 0 + 46: 11(fvec4) Load 23(r) + 47: 11(fvec4) CompositeConstruct 34 34 34 34 + 48: 11(fvec4) FSub 46 47 + Store 23(r) 48 + Branch 45 + 49: Label Line 1 23 0 - 46: 11(fvec4) Load 17(r) - 47: 11(fvec4) VectorTimesScalar 46 45 - Store 17(r) 47 - Branch 40 - 40: Label + 51: 11(fvec4) Load 23(r) + 52: 11(fvec4) VectorTimesScalar 51 50 + Store 23(r) 52 + Branch 45 + 45: Label Line 1 25 0 - 48: 11(fvec4) Load 17(r) - ReturnValue 48 + 53: 11(fvec4) Load 23(r) + ReturnValue 53 + FunctionEnd + Line 1 28 34 +20(testBranch(f1;f1;): 10(float) Function None 17 + 18(x): 16(ptr) FunctionParameter + 19(y): 16(ptr) FunctionParameter + 21: Label + 56(result): 16(ptr) Variable Function + 59(b): 58(ptr) Variable Function + 90: 16(ptr) Variable Function + Line 1 30 0 + Store 56(result) 57 + Line 1 31 0 + 60: 10(float) Load 18(x) + 61: 42(bool) FOrdGreaterThan 60 57 + Store 59(b) 61 + Line 1 34 0 + 62: 42(bool) Load 59(b) + SelectionMerge 64 None + BranchConditional 62 63 67 + 63: Label + Line 1 35 0 + 65: 10(float) Load 56(result) + 66: 10(float) FAdd 65 34 + Store 56(result) 66 + Branch 64 + 67: Label + Line 1 38 0 + 68: 10(float) Load 56(result) + 69: 10(float) FSub 68 34 + Store 56(result) 69 + Branch 64 + 64: Label + Line 1 42 0 + 70: 10(float) Load 18(x) + 71: 10(float) Load 19(y) + 72: 42(bool) FOrdGreaterThan 70 71 + SelectionMerge 74 None + BranchConditional 72 73 74 + 73: Label + Line 1 43 0 + 75: 10(float) Load 18(x) + 76: 10(float) Load 19(y) + 77: 10(float) FSub 75 76 + 78: 10(float) Load 56(result) + 79: 10(float) FAdd 78 77 + Store 56(result) 79 + Branch 74 + 74: Label + Line 1 47 0 + 80: 42(bool) Load 59(b) + 83: 7(int) Select 80 81 82 + 84: 10(float) ConvertSToF 83 + 85: 10(float) Load 56(result) + 86: 10(float) FAdd 85 84 + Store 56(result) 86 + Line 1 51 0 + 87: 10(float) Load 18(x) + 88: 10(float) Load 19(y) + 89: 42(bool) FOrdLessThan 87 88 + SelectionMerge 92 None + BranchConditional 89 91 94 + 91: Label + Line 1 52 0 + 93: 10(float) Load 19(y) + Store 90 93 + Branch 92 + 94: Label + Line 1 53 0 + 95: 42(bool) Load 59(b) + 96: 10(float) Select 95 34 57 + Store 90 96 + Branch 92 + 92: Label + 97: 10(float) Load 90 + Line 1 51 0 + 98: 10(float) Load 56(result) + 99: 10(float) FAdd 98 97 + Store 56(result) 99 + Line 1 55 0 + 100: 10(float) Load 56(result) + ReturnValue 100 FunctionEnd diff --git a/Test/baseResults/spv.debugPrintf.frag.out b/Test/baseResults/spv.debugPrintf.frag.out index 65174156ab..428e59826b 100644 --- a/Test/baseResults/spv.debugPrintf.frag.out +++ b/Test/baseResults/spv.debugPrintf.frag.out @@ -1,6 +1,6 @@ spv.debugPrintf.frag // Module Version 10000 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 17 Capability Shader diff --git a/Test/baseResults/spv.debuginfo.bufferref.glsl.frag.out b/Test/baseResults/spv.debuginfo.bufferref.glsl.frag.out new file mode 100644 index 0000000000..f52e001a9f --- /dev/null +++ b/Test/baseResults/spv.debuginfo.bufferref.glsl.frag.out @@ -0,0 +1,186 @@ +spv.debuginfo.bufferref.glsl.frag +// Module Version 10000 +// Generated by (magic number): 8000b +// Id's are bound by 131 + + Capability Shader + Capability PhysicalStorageBufferAddressesEXT + Extension "SPV_KHR_non_semantic_info" + Extension "SPV_KHR_physical_storage_buffer" + Extension "SPV_KHR_storage_buffer_storage_class" + 2: ExtInstImport "NonSemantic.Shader.DebugInfo.100" + 3: ExtInstImport "GLSL.std.450" + MemoryModel PhysicalStorageBuffer64EXT GLSL450 + EntryPoint Fragment 14 "main" 69 122 + ExecutionMode 14 OriginUpperLeft + 1: String "" + 8: String "uint" + 15: String "main" + 18: String "// OpModuleProcessed auto-map-locations +// OpModuleProcessed auto-map-bindings +// OpModuleProcessed client vulkan100 +// OpModuleProcessed target-env vulkan1.0 +// OpModuleProcessed keep-uncalled +// OpModuleProcessed entry-point main +#line 1 +" + 31: String "Mesh" + 33: String "float" + 39: String "data" + 43: String "MeshVertexPositions" + 47: String "meshData" + 59: String "PerPass_meshes" + 63: String "perPass_meshes" + 65: String "int" + 71: String "tri_idx0" + 86: String "vertex_pos0" + 124: String "out_fragColor" + SourceExtension "GL_EXT_buffer_reference" + Name 14 "main" + Name 29 "Mesh" + MemberName 29(Mesh) 0 "positions" + Name 37 "MeshVertexPositions" + MemberName 37(MeshVertexPositions) 0 "data" + Name 45 "meshData" + Name 50 "Mesh" + MemberName 50(Mesh) 0 "positions" + Name 54 "PerPass_meshes" + MemberName 54(PerPass_meshes) 0 "data" + Name 61 "perPass_meshes" + Name 69 "tri_idx0" + Name 84 "vertex_pos0" + Name 122 "out_fragColor" + Decorate 35 ArrayStride 4 + MemberDecorate 37(MeshVertexPositions) 0 Offset 0 + Decorate 37(MeshVertexPositions) Block + MemberDecorate 50(Mesh) 0 Offset 0 + Decorate 52 ArrayStride 8 + MemberDecorate 54(PerPass_meshes) 0 NonWritable + MemberDecorate 54(PerPass_meshes) 0 Offset 0 + Decorate 54(PerPass_meshes) Block + Decorate 61(perPass_meshes) DescriptorSet 0 + Decorate 61(perPass_meshes) Binding 0 + Decorate 69(tri_idx0) Flat + Decorate 69(tri_idx0) Location 0 + Decorate 122(out_fragColor) Location 0 + Decorate 45(meshData) DecorationAliasedPointerEXT + 4: TypeVoid + 5: TypeFunction 4 + 7: TypeInt 32 0 + 10: 7(int) Constant 32 + 11: 7(int) Constant 6 + 12: 7(int) Constant 0 + 9: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 2(DebugTypeBasic) 8 10 11 12 + 13: 7(int) Constant 3 + 6: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 8(DebugTypeFunction) 13 4 + 17: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 35(DebugSource) 1 18 + 20: 7(int) Constant 1 + 21: 7(int) Constant 4 + 22: 7(int) Constant 2 + 19: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 1(DebugCompilationUnit) 20 21 17 22 + 16: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 20(DebugFunction) 15 6 17 12 12 19 15 13 12 + 27: 7(int) Constant 21 + TypeForwardPointer 28 PhysicalStorageBufferEXT + 29(Mesh): TypeStruct 28 + 30: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 10(DebugTypeComposite) 31 20 17 27 12 19 31 12 13 + 32: TypeFloat 32 + 34: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 2(DebugTypeBasic) 33 10 13 12 + 35: TypeRuntimeArray 32(float) + 36: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 5(DebugTypeArray) 34 12 +37(MeshVertexPositions): TypeStruct 35 + 40: 7(int) Constant 5 + 41: 7(int) Constant 9 + 38: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 11(DebugTypeMember) 39 36 17 40 41 12 12 13 + 42: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 10(DebugTypeComposite) 43 20 17 27 12 19 43 12 13 38 + 28: TypePointer PhysicalStorageBufferEXT 37(MeshVertexPositions) + 44: TypePointer Function 29(Mesh) + 46: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 26(DebugLocalVariable) 47 30 17 27 12 16 21 + 49: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 31(DebugExpression) + 50(Mesh): TypeStruct 28(ptr) + 51: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 10(DebugTypeComposite) 31 20 17 27 12 19 31 12 13 + 52: TypeRuntimeArray 50(Mesh) + 53: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 5(DebugTypeArray) 51 12 +54(PerPass_meshes): TypeStruct 52 + 56: 7(int) Constant 13 + 57: 7(int) Constant 8 + 55: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 11(DebugTypeMember) 39 53 17 56 57 12 12 13 + 58: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 10(DebugTypeComposite) 59 20 17 27 12 19 59 12 13 55 + 60: TypePointer StorageBuffer 54(PerPass_meshes) +61(perPass_meshes): 60(ptr) Variable StorageBuffer + 62: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 18(DebugGlobalVariable) 63 58 17 27 12 19 63 61(perPass_meshes) 57 + 64: TypeInt 32 1 + 66: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 2(DebugTypeBasic) 65 10 21 12 + 67: 64(int) Constant 0 + 68: TypePointer Input 7(int) + 69(tri_idx0): 68(ptr) Variable Input + 70: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 18(DebugGlobalVariable) 71 9 17 27 12 19 71 69(tri_idx0) 57 + 73: TypePointer StorageBuffer 50(Mesh) + 77: TypePointer Function 28(ptr) + 80: 7(int) Constant 23 + 81: TypeVector 32(float) 3 + 82: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 6(DebugTypeVector) 34 13 + 83: TypePointer Function 81(fvec3) + 85: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 26(DebugLocalVariable) 86 82 17 80 12 16 21 + 89: 7(int) Constant 25 + 95: TypePointer PhysicalStorageBufferEXT 32(float) + 99: 7(int) Constant 24 + 118: 7(int) Constant 27 + 119: TypeVector 32(float) 4 + 120: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 6(DebugTypeVector) 34 21 + 121: TypePointer Output 119(fvec4) +122(out_fragColor): 121(ptr) Variable Output + 123: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 18(DebugGlobalVariable) 124 120 17 118 12 19 124 122(out_fragColor) 57 + 126: 32(float) Constant 1065353216 + Line 1 20 11 + 14(main): 4 Function None 5 + 23: Label + 45(meshData): 44(ptr) Variable Function + 84(vertex_pos0): 83(ptr) Variable Function + 24: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 101(DebugFunctionDefinition) 16 14(main) + 25: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 23(DebugScope) 16 + 26: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 17 27 27 12 12 + 48: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 28(DebugDeclare) 46 45(meshData) 49 + 72: 7(int) Load 69(tri_idx0) + 74: 73(ptr) AccessChain 61(perPass_meshes) 67 72 + 75: 50(Mesh) Load 74 + 76: 28(ptr) CompositeExtract 75 0 + 78: 77(ptr) AccessChain 45(meshData) 67 + Store 78 76 + 79: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 17 80 80 12 12 + 87: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 28(DebugDeclare) 85 84(vertex_pos0) 49 + 88: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 17 89 89 12 12 + 90: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 17 80 80 12 12 + 91: 77(ptr) AccessChain 45(meshData) 67 + 92: 28(ptr) Load 91 + 93: 7(int) Load 69(tri_idx0) + 94: 7(int) IMul 13 93 + 96: 95(ptr) AccessChain 92 67 94 + 97: 32(float) Load 96 Aligned 4 + 98: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 17 99 99 12 12 + 100: 77(ptr) AccessChain 45(meshData) 67 + 101: 28(ptr) Load 100 + 102: 7(int) Load 69(tri_idx0) + 103: 7(int) IMul 13 102 + 104: 7(int) IAdd 103 20 + 105: 95(ptr) AccessChain 101 67 104 + 106: 32(float) Load 105 Aligned 4 + 107: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 17 89 89 12 12 + 108: 77(ptr) AccessChain 45(meshData) 67 + 109: 28(ptr) Load 108 + 110: 7(int) Load 69(tri_idx0) + 111: 7(int) IMul 13 110 + 112: 7(int) IAdd 111 22 + 113: 95(ptr) AccessChain 109 67 112 + 114: 32(float) Load 113 Aligned 4 + 115: 81(fvec3) CompositeConstruct 97 106 114 + 116: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 17 80 80 12 12 + Store 84(vertex_pos0) 115 + 117: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 17 118 118 12 12 + 125: 81(fvec3) Load 84(vertex_pos0) + 127: 32(float) CompositeExtract 125 0 + 128: 32(float) CompositeExtract 125 1 + 129: 32(float) CompositeExtract 125 2 + 130: 119(fvec4) CompositeConstruct 127 128 129 126 + Store 122(out_fragColor) 130 + Return + FunctionEnd diff --git a/Test/baseResults/spv.debuginfo.const_params.glsl.comp.out b/Test/baseResults/spv.debuginfo.const_params.glsl.comp.out new file mode 100644 index 0000000000..846e0e36e1 --- /dev/null +++ b/Test/baseResults/spv.debuginfo.const_params.glsl.comp.out @@ -0,0 +1,96 @@ +spv.debuginfo.const_params.glsl.comp +// Module Version 10000 +// Generated by (magic number): 8000b +// Id's are bound by 68 + + Capability Shader + Extension "SPV_KHR_non_semantic_info" + 2: ExtInstImport "NonSemantic.Shader.DebugInfo.100" + 3: ExtInstImport "GLSL.std.450" + MemoryModel Logical GLSL450 + EntryPoint GLCompute 14 "main" + ExecutionMode 14 LocalSize 1 1 1 + 1: String "" + 8: String "uint" + 15: String "main" + 18: String "// OpModuleProcessed auto-map-locations +// OpModuleProcessed auto-map-bindings +// OpModuleProcessed client vulkan100 +// OpModuleProcessed target-env vulkan1.0 +// OpModuleProcessed keep-uncalled +// OpModuleProcessed entry-point main +#line 1 +" + 25: String "float" + 40: String "function" + 46: String "f" + 50: String "f2" + 53: String "f3" + 56: String "f4" + Name 14 "main" + Name 39 "function(f1;vf2;vf3;vf4;" + Name 35 "f" + Name 36 "f2" + Name 37 "f3" + Name 38 "f4" + 4: TypeVoid + 5: TypeFunction 4 + 7: TypeInt 32 0 + 10: 7(int) Constant 32 + 11: 7(int) Constant 6 + 12: 7(int) Constant 0 + 9: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 2(DebugTypeBasic) 8 10 11 12 + 13: 7(int) Constant 3 + 6: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 8(DebugTypeFunction) 13 4 + 17: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 35(DebugSource) 1 18 + 20: 7(int) Constant 1 + 21: 7(int) Constant 4 + 22: 7(int) Constant 2 + 19: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 1(DebugCompilationUnit) 20 21 17 22 + 16: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 20(DebugFunction) 15 6 17 12 12 19 15 13 12 + 24: TypeFloat 32 + 26: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 2(DebugTypeBasic) 25 10 13 12 + 27: TypeVector 24(float) 2 + 28: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 6(DebugTypeVector) 26 22 + 29: TypeVector 24(float) 3 + 30: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 6(DebugTypeVector) 26 13 + 31: TypeVector 24(float) 4 + 32: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 6(DebugTypeVector) 26 21 + 33: TypeFunction 4 24(float) 27(fvec2) 29(fvec3) 31(fvec4) + 34: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 8(DebugTypeFunction) 13 4 26 28 30 32 + 41: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 20(DebugFunction) 40 34 17 12 12 19 40 13 12 + 45: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 26(DebugLocalVariable) 46 26 17 12 12 41 21 20 + 48: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 31(DebugExpression) + 49: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 26(DebugLocalVariable) 50 28 17 12 12 41 21 22 + 52: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 26(DebugLocalVariable) 53 30 17 12 12 41 21 13 + 55: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 26(DebugLocalVariable) 56 32 17 12 12 41 21 21 + 62: 7(int) Constant 13 + 63: 24(float) Constant 0 + 64: 27(fvec2) ConstantComposite 63 63 + 65: 29(fvec3) ConstantComposite 63 63 63 + 66: 31(fvec4) ConstantComposite 63 63 63 63 + Line 1 11 11 + 14(main): 4 Function None 5 + 23: Label + 59: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 101(DebugFunctionDefinition) 16 14(main) + 60: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 23(DebugScope) 16 + 61: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 17 62 62 12 12 + 67: 4 FunctionCall 39(function(f1;vf2;vf3;vf4;) 63 64 65 66 + Return + FunctionEnd + Line 1 7 18 +39(function(f1;vf2;vf3;vf4;): 4 Function None 33 + 35(f): 24(float) FunctionParameter + 36(f2): 27(fvec2) FunctionParameter + 37(f3): 29(fvec3) FunctionParameter + 38(f4): 31(fvec4) FunctionParameter + 42: Label + 43: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 23(DebugScope) 41 + 44: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 17 12 12 12 12 + 47: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 28(DebugDeclare) 45 35(f) 48 + 51: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 28(DebugDeclare) 49 36(f2) 48 + 54: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 28(DebugDeclare) 52 37(f3) 48 + 57: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 28(DebugDeclare) 55 38(f4) 48 + 58: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 101(DebugFunctionDefinition) 41 39(function(f1;vf2;vf3;vf4;) + Return + FunctionEnd diff --git a/Test/baseResults/spv.debuginfo.glsl.comp.out b/Test/baseResults/spv.debuginfo.glsl.comp.out new file mode 100644 index 0000000000..9026bf46d9 --- /dev/null +++ b/Test/baseResults/spv.debuginfo.glsl.comp.out @@ -0,0 +1,1223 @@ +spv.debuginfo.glsl.comp +// Module Version 10000 +// Generated by (magic number): 8000b +// Id's are bound by 969 + + Capability Shader + Extension "SPV_KHR_non_semantic_info" + 2: ExtInstImport "NonSemantic.Shader.DebugInfo.100" + 3: ExtInstImport "GLSL.std.450" + MemoryModel Logical GLSL450 + EntryPoint GLCompute 14 "main" 124 + ExecutionMode 14 LocalSize 10 10 1 + 1: String "" + 8: String "uint" + 15: String "main" + 18: String "// OpModuleProcessed auto-map-locations +// OpModuleProcessed auto-map-bindings +// OpModuleProcessed client vulkan100 +// OpModuleProcessed target-env vulkan1.0 +// OpModuleProcessed keep-uncalled +// OpModuleProcessed entry-point main +#line 1 +" + 25: String "float" + 37: String "springForce" + 43: String "p0" + 47: String "p1" + 50: String "restDist" + 58: String "dist" + 70: String "int" + 76: String "sphereRadius" + 87: String "gravity" + 92: String "particleCount" + 95: String "UBO" + 99: String "params" + 121: String "id" + 126: String "gl_GlobalInvocationID" + 133: String "index" + 156: String "bool" + 170: String "normal" + 176: String "pinned" + 178: String "Particle" + 183: String "particleIn" + 187: String "ParticleIn" + 208: String "particleOut" + 211: String "ParticleOut" + 236: String "force" + 249: String "pos" + 259: String "vel" + 571: String "f" + 620: String "sphereDist" + 673: String "calculateNormals" + 676: String "PushConsts" + 680: String "pushConsts" + 717: String "a" + 730: String "b" + 747: String "c" + Name 14 "main" + Name 36 "springForce(vf3;vf3;f1;" + Name 33 "p0" + Name 34 "p1" + Name 35 "restDist" + Name 56 "dist" + Name 74 "UBO" + MemberName 74(UBO) 0 "deltaT" + MemberName 74(UBO) 1 "particleMass" + MemberName 74(UBO) 2 "springStiffness" + MemberName 74(UBO) 3 "damping" + MemberName 74(UBO) 4 "restDistH" + MemberName 74(UBO) 5 "restDistV" + MemberName 74(UBO) 6 "restDistD" + MemberName 74(UBO) 7 "sphereRadius" + MemberName 74(UBO) 8 "spherePos" + MemberName 74(UBO) 9 "gravity" + MemberName 74(UBO) 10 "particleCount" + Name 97 "params" + Name 119 "id" + Name 124 "gl_GlobalInvocationID" + Name 131 "index" + Name 168 "Particle" + MemberName 168(Particle) 0 "pos" + MemberName 168(Particle) 1 "vel" + MemberName 168(Particle) 2 "uv" + MemberName 168(Particle) 3 "normal" + MemberName 168(Particle) 4 "pinned" + Name 181 "ParticleIn" + MemberName 181(ParticleIn) 0 "particleIn" + Name 189 "" + Name 206 "ParticleOut" + MemberName 206(ParticleOut) 0 "particleOut" + Name 213 "" + Name 234 "force" + Name 247 "pos" + Name 257 "vel" + Name 278 "param" + Name 282 "param" + Name 284 "param" + Name 308 "param" + Name 312 "param" + Name 314 "param" + Name 342 "param" + Name 346 "param" + Name 348 "param" + Name 371 "param" + Name 375 "param" + Name 377 "param" + Name 415 "param" + Name 419 "param" + Name 421 "param" + Name 454 "param" + Name 458 "param" + Name 460 "param" + Name 501 "param" + Name 505 "param" + Name 507 "param" + Name 544 "param" + Name 548 "param" + Name 550 "param" + Name 569 "f" + Name 618 "sphereDist" + Name 671 "PushConsts" + MemberName 671(PushConsts) 0 "calculateNormals" + Name 678 "pushConsts" + Name 691 "normal" + Name 715 "a" + Name 728 "b" + Name 745 "c" + MemberDecorate 74(UBO) 0 Offset 0 + MemberDecorate 74(UBO) 1 Offset 4 + MemberDecorate 74(UBO) 2 Offset 8 + MemberDecorate 74(UBO) 3 Offset 12 + MemberDecorate 74(UBO) 4 Offset 16 + MemberDecorate 74(UBO) 5 Offset 20 + MemberDecorate 74(UBO) 6 Offset 24 + MemberDecorate 74(UBO) 7 Offset 28 + MemberDecorate 74(UBO) 8 Offset 32 + MemberDecorate 74(UBO) 9 Offset 48 + MemberDecorate 74(UBO) 10 Offset 64 + Decorate 74(UBO) Block + Decorate 97(params) DescriptorSet 0 + Decorate 97(params) Binding 2 + Decorate 124(gl_GlobalInvocationID) BuiltIn GlobalInvocationId + MemberDecorate 168(Particle) 0 Offset 0 + MemberDecorate 168(Particle) 1 Offset 16 + MemberDecorate 168(Particle) 2 Offset 32 + MemberDecorate 168(Particle) 3 Offset 48 + MemberDecorate 168(Particle) 4 Offset 64 + Decorate 179 ArrayStride 80 + MemberDecorate 181(ParticleIn) 0 Offset 0 + Decorate 181(ParticleIn) BufferBlock + Decorate 189 DescriptorSet 0 + Decorate 189 Binding 0 + Decorate 204 ArrayStride 80 + MemberDecorate 206(ParticleOut) 0 Offset 0 + Decorate 206(ParticleOut) BufferBlock + Decorate 213 DescriptorSet 0 + Decorate 213 Binding 1 + MemberDecorate 671(PushConsts) 0 Offset 0 + Decorate 671(PushConsts) Block + Decorate 968 BuiltIn WorkgroupSize + 4: TypeVoid + 5: TypeFunction 4 + 7: TypeInt 32 0 + 10: 7(int) Constant 32 + 11: 7(int) Constant 6 + 12: 7(int) Constant 0 + 9: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 2(DebugTypeBasic) 8 10 11 12 + 13: 7(int) Constant 3 + 6: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 8(DebugTypeFunction) 13 4 + 17: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 35(DebugSource) 1 18 + 20: 7(int) Constant 1 + 21: 7(int) Constant 4 + 22: 7(int) Constant 2 + 19: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 1(DebugCompilationUnit) 20 21 17 22 + 16: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 20(DebugFunction) 15 6 17 12 12 19 15 13 12 + 24: TypeFloat 32 + 26: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 2(DebugTypeBasic) 25 10 13 12 + 27: TypeVector 24(float) 3 + 28: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 6(DebugTypeVector) 26 13 + 29: TypePointer Function 27(fvec3) + 30: TypePointer Function 24(float) + 31: TypeFunction 27(fvec3) 29(ptr) 29(ptr) 30(ptr) + 32: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 8(DebugTypeFunction) 13 28 28 28 26 + 38: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 20(DebugFunction) 37 32 17 12 12 19 37 13 12 + 42: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 26(DebugLocalVariable) 43 28 17 12 12 38 21 20 + 45: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 31(DebugExpression) + 46: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 26(DebugLocalVariable) 47 28 17 12 12 38 21 22 + 49: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 26(DebugLocalVariable) 50 26 17 12 12 38 21 13 + 55: 7(int) Constant 68 + 57: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 26(DebugLocalVariable) 58 28 17 55 12 38 21 + 64: 7(int) Constant 69 + 67: TypeVector 24(float) 4 + 68: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 6(DebugTypeVector) 26 21 + 69: TypeInt 32 1 + 71: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 2(DebugTypeBasic) 70 10 21 12 + 72: TypeVector 69(int) 2 + 73: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 6(DebugTypeVector) 71 22 + 74(UBO): TypeStruct 24(float) 24(float) 24(float) 24(float) 24(float) 24(float) 24(float) 24(float) 67(fvec4) 67(fvec4) 72(ivec2) + 77: 7(int) Constant 56 + 78: 7(int) Constant 8 + 75: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 11(DebugTypeMember) 76 26 17 77 78 12 12 13 + 79: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 11(DebugTypeMember) 76 26 17 77 78 12 12 13 + 80: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 11(DebugTypeMember) 76 26 17 77 78 12 12 13 + 81: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 11(DebugTypeMember) 76 26 17 77 78 12 12 13 + 82: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 11(DebugTypeMember) 76 26 17 77 78 12 12 13 + 83: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 11(DebugTypeMember) 76 26 17 77 78 12 12 13 + 84: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 11(DebugTypeMember) 76 26 17 77 78 12 12 13 + 85: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 11(DebugTypeMember) 76 26 17 77 78 12 12 13 + 88: 7(int) Constant 58 + 89: 7(int) Constant 7 + 86: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 11(DebugTypeMember) 87 68 17 88 89 12 12 13 + 90: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 11(DebugTypeMember) 87 68 17 88 89 12 12 13 + 93: 7(int) Constant 59 + 91: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 11(DebugTypeMember) 92 73 17 93 78 12 12 13 + 94: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 10(DebugTypeComposite) 95 20 17 64 12 19 95 12 13 75 79 80 81 82 83 84 85 86 90 91 + 96: TypePointer Uniform 74(UBO) + 97(params): 96(ptr) Variable Uniform + 98: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 18(DebugGlobalVariable) 99 94 17 64 12 19 99 97(params) 78 + 100: 69(int) Constant 2 + 101: TypePointer Uniform 24(float) + 115: 7(int) Constant 74 + 116: TypeVector 7(int) 3 + 117: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 6(DebugTypeVector) 9 13 + 118: TypePointer Function 116(ivec3) + 120: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 26(DebugLocalVariable) 121 117 17 115 12 16 21 + 123: TypePointer Input 116(ivec3) +124(gl_GlobalInvocationID): 123(ptr) Variable Input + 125: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 18(DebugGlobalVariable) 126 117 17 115 12 19 126 124(gl_GlobalInvocationID) 78 + 129: 7(int) Constant 76 + 130: TypePointer Function 7(int) + 132: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 26(DebugLocalVariable) 133 9 17 129 12 16 21 + 137: 69(int) Constant 10 + 138: TypePointer Uniform 69(int) + 147: 7(int) Constant 77 + 155: TypeBool + 157: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 2(DebugTypeBasic) 156 10 22 12 + 163: 7(int) Constant 78 + 167: 7(int) Constant 81 + 168(Particle): TypeStruct 67(fvec4) 67(fvec4) 67(fvec4) 67(fvec4) 24(float) + 171: 7(int) Constant 31 + 169: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 11(DebugTypeMember) 170 68 17 171 89 12 12 13 + 172: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 11(DebugTypeMember) 170 68 17 171 89 12 12 13 + 173: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 11(DebugTypeMember) 170 68 17 171 89 12 12 13 + 174: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 11(DebugTypeMember) 170 68 17 171 89 12 12 13 + 175: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 11(DebugTypeMember) 176 26 17 10 78 12 12 13 + 177: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 10(DebugTypeComposite) 178 20 17 167 12 19 178 12 13 169 172 173 174 175 + 179: TypeRuntimeArray 168(Particle) + 180: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 5(DebugTypeArray) 177 12 + 181(ParticleIn): TypeStruct 179 + 184: 7(int) Constant 36 + 185: 7(int) Constant 11 + 182: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 11(DebugTypeMember) 183 180 17 184 185 12 12 13 + 186: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 10(DebugTypeComposite) 187 20 17 167 12 19 187 12 13 182 + 188: TypePointer Uniform 181(ParticleIn) + 189: 188(ptr) Variable Uniform + 190: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 18(DebugGlobalVariable) 1 186 17 167 12 19 1 189 78 + 191: 69(int) Constant 0 + 193: 69(int) Constant 4 + 196: 24(float) Constant 1065353216 + 197: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 2(DebugTypeBasic) 156 10 22 12 + 203: 7(int) Constant 82 + 204: TypeRuntimeArray 168(Particle) + 205: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 5(DebugTypeArray) 177 12 +206(ParticleOut): TypeStruct 204 + 209: 7(int) Constant 40 + 207: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 11(DebugTypeMember) 208 205 17 209 185 12 12 13 + 210: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 10(DebugTypeComposite) 211 20 17 203 12 19 211 12 13 207 + 212: TypePointer Uniform 206(ParticleOut) + 213: 212(ptr) Variable Uniform + 214: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 18(DebugGlobalVariable) 1 210 17 203 12 19 1 213 78 + 217: TypePointer Uniform 67(fvec4) + 222: 7(int) Constant 83 + 224: 69(int) Constant 1 + 225: 24(float) Constant 0 + 226: 67(fvec4) ConstantComposite 225 225 225 225 + 229: 7(int) Constant 84 + 233: 7(int) Constant 88 + 235: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 26(DebugLocalVariable) 236 28 17 233 12 16 21 + 238: 69(int) Constant 9 + 246: 7(int) Constant 90 + 248: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 26(DebugLocalVariable) 249 28 17 246 12 16 21 + 256: 7(int) Constant 91 + 258: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 26(DebugLocalVariable) 259 28 17 256 12 16 21 + 266: 7(int) Constant 95 + 269: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 2(DebugTypeBasic) 156 10 22 12 + 275: 7(int) Constant 96 + 292: 7(int) Constant 99 + 299: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 2(DebugTypeBasic) 156 10 22 12 + 305: 7(int) Constant 100 + 322: 7(int) Constant 103 + 329: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 2(DebugTypeBasic) 156 10 22 12 + 335: 7(int) Constant 104 + 341: 69(int) Constant 5 + 356: 7(int) Constant 107 + 359: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 2(DebugTypeBasic) 156 10 22 12 + 365: 7(int) Constant 108 + 385: 7(int) Constant 111 + 388: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 2(DebugTypeBasic) 156 10 22 12 + 400: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 2(DebugTypeBasic) 156 10 22 12 + 407: 7(int) Constant 112 + 414: 69(int) Constant 6 + 429: 7(int) Constant 115 + 432: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 2(DebugTypeBasic) 156 10 22 12 + 440: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 2(DebugTypeBasic) 156 10 22 12 + 447: 7(int) Constant 116 + 468: 7(int) Constant 119 + 475: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 2(DebugTypeBasic) 156 10 22 12 + 487: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 2(DebugTypeBasic) 156 10 22 12 + 494: 7(int) Constant 120 + 515: 7(int) Constant 123 + 522: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 2(DebugTypeBasic) 156 10 22 12 + 530: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 2(DebugTypeBasic) 156 10 22 12 + 537: 7(int) Constant 124 + 558: 7(int) Constant 127 + 559: 69(int) Constant 3 + 568: 7(int) Constant 130 + 570: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 26(DebugLocalVariable) 571 28 17 568 12 16 21 + 579: 7(int) Constant 131 + 587: 24(float) Constant 1056964608 + 603: 7(int) Constant 132 + 617: 7(int) Constant 135 + 619: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 26(DebugLocalVariable) 620 28 17 617 12 16 21 + 626: 69(int) Constant 8 + 632: 7(int) Constant 136 + 635: 69(int) Constant 7 + 638: 24(float) Constant 1008981770 + 640: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 2(DebugTypeBasic) 156 10 22 12 + 646: 7(int) Constant 138 + 665: 7(int) Constant 140 + 670: 7(int) Constant 144 + 671(PushConsts): TypeStruct 7(int) + 674: 7(int) Constant 63 + 672: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 11(DebugTypeMember) 673 9 17 674 89 12 12 13 + 675: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 10(DebugTypeComposite) 676 20 17 670 12 19 676 12 13 672 + 677: TypePointer PushConstant 671(PushConsts) + 678(pushConsts): 677(ptr) Variable PushConstant + 679: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 18(DebugGlobalVariable) 680 675 17 670 12 19 680 678(pushConsts) 78 + 681: TypePointer PushConstant 7(int) + 684: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 2(DebugTypeBasic) 156 10 22 12 + 690: 7(int) Constant 145 + 692: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 26(DebugLocalVariable) 170 28 17 690 12 16 21 + 694: 27(fvec3) ConstantComposite 225 225 225 + 696: 7(int) Constant 147 + 699: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 2(DebugTypeBasic) 156 10 22 12 + 705: 7(int) Constant 148 + 708: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 2(DebugTypeBasic) 156 10 22 12 + 714: 7(int) Constant 149 + 716: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 26(DebugLocalVariable) 717 28 17 714 12 16 21 + 727: 7(int) Constant 150 + 729: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 26(DebugLocalVariable) 730 28 17 727 12 16 21 + 744: 7(int) Constant 151 + 746: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 26(DebugLocalVariable) 747 28 17 744 12 16 21 + 760: 7(int) Constant 152 + 772: 7(int) Constant 154 + 779: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 2(DebugTypeBasic) 156 10 22 12 + 785: 7(int) Constant 155 + 797: 7(int) Constant 156 + 810: 7(int) Constant 157 + 819: 7(int) Constant 158 + 831: 7(int) Constant 161 + 838: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 2(DebugTypeBasic) 156 10 22 12 + 844: 7(int) Constant 162 + 847: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 2(DebugTypeBasic) 156 10 22 12 + 853: 7(int) Constant 163 + 865: 7(int) Constant 164 + 878: 7(int) Constant 165 + 887: 7(int) Constant 166 + 899: 7(int) Constant 168 + 906: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 2(DebugTypeBasic) 156 10 22 12 + 912: 7(int) Constant 169 + 921: 7(int) Constant 170 + 934: 7(int) Constant 171 + 946: 7(int) Constant 172 + 958: 7(int) Constant 175 + 967: 7(int) Constant 10 + 968: 116(ivec3) ConstantComposite 967 967 20 + Line 1 72 11 + 14(main): 4 Function None 5 + 23: Label + 119(id): 118(ptr) Variable Function + 131(index): 130(ptr) Variable Function + 234(force): 29(ptr) Variable Function + 247(pos): 29(ptr) Variable Function + 257(vel): 29(ptr) Variable Function + 278(param): 29(ptr) Variable Function + 282(param): 29(ptr) Variable Function + 284(param): 30(ptr) Variable Function + 308(param): 29(ptr) Variable Function + 312(param): 29(ptr) Variable Function + 314(param): 30(ptr) Variable Function + 342(param): 29(ptr) Variable Function + 346(param): 29(ptr) Variable Function + 348(param): 30(ptr) Variable Function + 371(param): 29(ptr) Variable Function + 375(param): 29(ptr) Variable Function + 377(param): 30(ptr) Variable Function + 415(param): 29(ptr) Variable Function + 419(param): 29(ptr) Variable Function + 421(param): 30(ptr) Variable Function + 454(param): 29(ptr) Variable Function + 458(param): 29(ptr) Variable Function + 460(param): 30(ptr) Variable Function + 501(param): 29(ptr) Variable Function + 505(param): 29(ptr) Variable Function + 507(param): 30(ptr) Variable Function + 544(param): 29(ptr) Variable Function + 548(param): 29(ptr) Variable Function + 550(param): 30(ptr) Variable Function + 569(f): 29(ptr) Variable Function + 618(sphereDist): 29(ptr) Variable Function + 691(normal): 29(ptr) Variable Function + 715(a): 29(ptr) Variable Function + 728(b): 29(ptr) Variable Function + 745(c): 29(ptr) Variable Function + 112: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 101(DebugFunctionDefinition) 16 14(main) + 113: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 23(DebugScope) 16 + 114: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 17 115 115 12 12 + 122: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 28(DebugDeclare) 120 119(id) 45 + 127: 116(ivec3) Load 124(gl_GlobalInvocationID) + Store 119(id) 127 + 128: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 17 129 129 12 12 + 134: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 28(DebugDeclare) 132 131(index) 45 + 135: 130(ptr) AccessChain 119(id) 20 + 136: 7(int) Load 135 + 139: 138(ptr) AccessChain 97(params) 137 12 + 140: 69(int) Load 139 + 141: 7(int) Bitcast 140 + 142: 7(int) IMul 136 141 + 143: 130(ptr) AccessChain 119(id) 12 + 144: 7(int) Load 143 + 145: 7(int) IAdd 142 144 + Store 131(index) 145 + 146: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 17 147 147 12 12 + 148: 7(int) Load 131(index) + 149: 138(ptr) AccessChain 97(params) 137 12 + 150: 69(int) Load 149 + 151: 138(ptr) AccessChain 97(params) 137 20 + 152: 69(int) Load 151 + 153: 69(int) IMul 150 152 + 154: 7(int) Bitcast 153 + 158: 155(bool) UGreaterThan 148 154 + SelectionMerge 160 None + BranchConditional 158 159 160 + 159: Label + 161: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 23(DebugScope) 16 + 162: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 17 163 163 12 12 + Return + 160: Label + 165: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 23(DebugScope) 16 + 166: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 17 167 167 12 12 + 192: 7(int) Load 131(index) + 194: 101(ptr) AccessChain 189 191 192 193 + 195: 24(float) Load 194 + 198: 155(bool) FOrdEqual 195 196 + SelectionMerge 200 None + BranchConditional 198 199 200 + 199: Label + 201: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 23(DebugScope) 16 + 202: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 17 203 203 12 12 + 215: 7(int) Load 131(index) + 216: 7(int) Load 131(index) + 218: 217(ptr) AccessChain 213 191 216 191 + 219: 67(fvec4) Load 218 + 220: 217(ptr) AccessChain 213 191 215 191 + Store 220 219 + 221: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 17 222 222 12 12 + 223: 7(int) Load 131(index) + 227: 217(ptr) AccessChain 213 191 223 224 + Store 227 226 + 228: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 17 229 229 12 12 + Return + 200: Label + 231: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 23(DebugScope) 16 + 232: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 17 233 233 12 12 + 237: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 28(DebugDeclare) 235 234(force) 45 + 239: 217(ptr) AccessChain 97(params) 238 + 240: 67(fvec4) Load 239 + 241: 27(fvec3) VectorShuffle 240 240 0 1 2 + 242: 101(ptr) AccessChain 97(params) 224 + 243: 24(float) Load 242 + 244: 27(fvec3) VectorTimesScalar 241 243 + Store 234(force) 244 + 245: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 17 246 246 12 12 + 250: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 28(DebugDeclare) 248 247(pos) 45 + 251: 7(int) Load 131(index) + 252: 217(ptr) AccessChain 189 191 251 191 + 253: 67(fvec4) Load 252 + 254: 27(fvec3) VectorShuffle 253 253 0 1 2 + Store 247(pos) 254 + 255: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 17 256 256 12 12 + 260: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 28(DebugDeclare) 258 257(vel) 45 + 261: 7(int) Load 131(index) + 262: 217(ptr) AccessChain 189 191 261 224 + 263: 67(fvec4) Load 262 + 264: 27(fvec3) VectorShuffle 263 263 0 1 2 + Store 257(vel) 264 + 265: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 17 266 266 12 12 + 267: 130(ptr) AccessChain 119(id) 12 + 268: 7(int) Load 267 + 270: 155(bool) UGreaterThan 268 12 + SelectionMerge 272 None + BranchConditional 270 271 272 + 271: Label + 273: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 23(DebugScope) 16 + 274: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 17 275 275 12 12 + 276: 7(int) Load 131(index) + 277: 7(int) ISub 276 20 + 279: 217(ptr) AccessChain 189 191 277 191 + 280: 67(fvec4) Load 279 + 281: 27(fvec3) VectorShuffle 280 280 0 1 2 + Store 278(param) 281 + 283: 27(fvec3) Load 247(pos) + Store 282(param) 283 + 285: 101(ptr) AccessChain 97(params) 193 + 286: 24(float) Load 285 + Store 284(param) 286 + 287: 27(fvec3) FunctionCall 36(springForce(vf3;vf3;f1;) 278(param) 282(param) 284(param) + 288: 27(fvec3) Load 234(force) + 289: 27(fvec3) FAdd 288 287 + Store 234(force) 289 + Branch 272 + 272: Label + 290: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 23(DebugScope) 16 + 291: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 17 292 292 12 12 + 293: 130(ptr) AccessChain 119(id) 12 + 294: 7(int) Load 293 + 295: 138(ptr) AccessChain 97(params) 137 12 + 296: 69(int) Load 295 + 297: 69(int) ISub 296 224 + 298: 7(int) Bitcast 297 + 300: 155(bool) ULessThan 294 298 + SelectionMerge 302 None + BranchConditional 300 301 302 + 301: Label + 303: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 23(DebugScope) 16 + 304: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 17 305 305 12 12 + 306: 7(int) Load 131(index) + 307: 7(int) IAdd 306 20 + 309: 217(ptr) AccessChain 189 191 307 191 + 310: 67(fvec4) Load 309 + 311: 27(fvec3) VectorShuffle 310 310 0 1 2 + Store 308(param) 311 + 313: 27(fvec3) Load 247(pos) + Store 312(param) 313 + 315: 101(ptr) AccessChain 97(params) 193 + 316: 24(float) Load 315 + Store 314(param) 316 + 317: 27(fvec3) FunctionCall 36(springForce(vf3;vf3;f1;) 308(param) 312(param) 314(param) + 318: 27(fvec3) Load 234(force) + 319: 27(fvec3) FAdd 318 317 + Store 234(force) 319 + Branch 302 + 302: Label + 320: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 23(DebugScope) 16 + 321: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 17 322 322 12 12 + 323: 130(ptr) AccessChain 119(id) 20 + 324: 7(int) Load 323 + 325: 138(ptr) AccessChain 97(params) 137 20 + 326: 69(int) Load 325 + 327: 69(int) ISub 326 224 + 328: 7(int) Bitcast 327 + 330: 155(bool) ULessThan 324 328 + SelectionMerge 332 None + BranchConditional 330 331 332 + 331: Label + 333: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 23(DebugScope) 16 + 334: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 17 335 335 12 12 + 336: 7(int) Load 131(index) + 337: 138(ptr) AccessChain 97(params) 137 12 + 338: 69(int) Load 337 + 339: 7(int) Bitcast 338 + 340: 7(int) IAdd 336 339 + 343: 217(ptr) AccessChain 189 191 340 191 + 344: 67(fvec4) Load 343 + 345: 27(fvec3) VectorShuffle 344 344 0 1 2 + Store 342(param) 345 + 347: 27(fvec3) Load 247(pos) + Store 346(param) 347 + 349: 101(ptr) AccessChain 97(params) 341 + 350: 24(float) Load 349 + Store 348(param) 350 + 351: 27(fvec3) FunctionCall 36(springForce(vf3;vf3;f1;) 342(param) 346(param) 348(param) + 352: 27(fvec3) Load 234(force) + 353: 27(fvec3) FAdd 352 351 + Store 234(force) 353 + Branch 332 + 332: Label + 354: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 23(DebugScope) 16 + 355: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 17 356 356 12 12 + 357: 130(ptr) AccessChain 119(id) 20 + 358: 7(int) Load 357 + 360: 155(bool) UGreaterThan 358 12 + SelectionMerge 362 None + BranchConditional 360 361 362 + 361: Label + 363: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 23(DebugScope) 16 + 364: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 17 365 365 12 12 + 366: 7(int) Load 131(index) + 367: 138(ptr) AccessChain 97(params) 137 12 + 368: 69(int) Load 367 + 369: 7(int) Bitcast 368 + 370: 7(int) ISub 366 369 + 372: 217(ptr) AccessChain 189 191 370 191 + 373: 67(fvec4) Load 372 + 374: 27(fvec3) VectorShuffle 373 373 0 1 2 + Store 371(param) 374 + 376: 27(fvec3) Load 247(pos) + Store 375(param) 376 + 378: 101(ptr) AccessChain 97(params) 341 + 379: 24(float) Load 378 + Store 377(param) 379 + 380: 27(fvec3) FunctionCall 36(springForce(vf3;vf3;f1;) 371(param) 375(param) 377(param) + 381: 27(fvec3) Load 234(force) + 382: 27(fvec3) FAdd 381 380 + Store 234(force) 382 + Branch 362 + 362: Label + 383: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 23(DebugScope) 16 + 384: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 17 385 385 12 12 + 386: 130(ptr) AccessChain 119(id) 12 + 387: 7(int) Load 386 + 389: 155(bool) UGreaterThan 387 12 + SelectionMerge 391 None + BranchConditional 389 390 391 + 390: Label + 392: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 23(DebugScope) 16 + 393: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 17 385 385 12 12 + 394: 130(ptr) AccessChain 119(id) 20 + 395: 7(int) Load 394 + 396: 138(ptr) AccessChain 97(params) 137 20 + 397: 69(int) Load 396 + 398: 69(int) ISub 397 224 + 399: 7(int) Bitcast 398 + 401: 155(bool) ULessThan 395 399 + Branch 391 + 391: Label + 402: 155(bool) Phi 389 362 401 390 + SelectionMerge 404 None + BranchConditional 402 403 404 + 403: Label + 405: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 23(DebugScope) 16 + 406: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 17 407 407 12 12 + 408: 7(int) Load 131(index) + 409: 138(ptr) AccessChain 97(params) 137 12 + 410: 69(int) Load 409 + 411: 7(int) Bitcast 410 + 412: 7(int) IAdd 408 411 + 413: 7(int) ISub 412 20 + 416: 217(ptr) AccessChain 189 191 413 191 + 417: 67(fvec4) Load 416 + 418: 27(fvec3) VectorShuffle 417 417 0 1 2 + Store 415(param) 418 + 420: 27(fvec3) Load 247(pos) + Store 419(param) 420 + 422: 101(ptr) AccessChain 97(params) 414 + 423: 24(float) Load 422 + Store 421(param) 423 + 424: 27(fvec3) FunctionCall 36(springForce(vf3;vf3;f1;) 415(param) 419(param) 421(param) + 425: 27(fvec3) Load 234(force) + 426: 27(fvec3) FAdd 425 424 + Store 234(force) 426 + Branch 404 + 404: Label + 427: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 23(DebugScope) 16 + 428: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 17 429 429 12 12 + 430: 130(ptr) AccessChain 119(id) 12 + 431: 7(int) Load 430 + 433: 155(bool) UGreaterThan 431 12 + SelectionMerge 435 None + BranchConditional 433 434 435 + 434: Label + 436: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 23(DebugScope) 16 + 437: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 17 429 429 12 12 + 438: 130(ptr) AccessChain 119(id) 20 + 439: 7(int) Load 438 + 441: 155(bool) UGreaterThan 439 12 + Branch 435 + 435: Label + 442: 155(bool) Phi 433 404 441 434 + SelectionMerge 444 None + BranchConditional 442 443 444 + 443: Label + 445: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 23(DebugScope) 16 + 446: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 17 447 447 12 12 + 448: 7(int) Load 131(index) + 449: 138(ptr) AccessChain 97(params) 137 12 + 450: 69(int) Load 449 + 451: 7(int) Bitcast 450 + 452: 7(int) ISub 448 451 + 453: 7(int) ISub 452 20 + 455: 217(ptr) AccessChain 189 191 453 191 + 456: 67(fvec4) Load 455 + 457: 27(fvec3) VectorShuffle 456 456 0 1 2 + Store 454(param) 457 + 459: 27(fvec3) Load 247(pos) + Store 458(param) 459 + 461: 101(ptr) AccessChain 97(params) 414 + 462: 24(float) Load 461 + Store 460(param) 462 + 463: 27(fvec3) FunctionCall 36(springForce(vf3;vf3;f1;) 454(param) 458(param) 460(param) + 464: 27(fvec3) Load 234(force) + 465: 27(fvec3) FAdd 464 463 + Store 234(force) 465 + Branch 444 + 444: Label + 466: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 23(DebugScope) 16 + 467: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 17 468 468 12 12 + 469: 130(ptr) AccessChain 119(id) 12 + 470: 7(int) Load 469 + 471: 138(ptr) AccessChain 97(params) 137 12 + 472: 69(int) Load 471 + 473: 69(int) ISub 472 224 + 474: 7(int) Bitcast 473 + 476: 155(bool) ULessThan 470 474 + SelectionMerge 478 None + BranchConditional 476 477 478 + 477: Label + 479: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 23(DebugScope) 16 + 480: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 17 468 468 12 12 + 481: 130(ptr) AccessChain 119(id) 20 + 482: 7(int) Load 481 + 483: 138(ptr) AccessChain 97(params) 137 20 + 484: 69(int) Load 483 + 485: 69(int) ISub 484 224 + 486: 7(int) Bitcast 485 + 488: 155(bool) ULessThan 482 486 + Branch 478 + 478: Label + 489: 155(bool) Phi 476 444 488 477 + SelectionMerge 491 None + BranchConditional 489 490 491 + 490: Label + 492: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 23(DebugScope) 16 + 493: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 17 494 494 12 12 + 495: 7(int) Load 131(index) + 496: 138(ptr) AccessChain 97(params) 137 12 + 497: 69(int) Load 496 + 498: 7(int) Bitcast 497 + 499: 7(int) IAdd 495 498 + 500: 7(int) IAdd 499 20 + 502: 217(ptr) AccessChain 189 191 500 191 + 503: 67(fvec4) Load 502 + 504: 27(fvec3) VectorShuffle 503 503 0 1 2 + Store 501(param) 504 + 506: 27(fvec3) Load 247(pos) + Store 505(param) 506 + 508: 101(ptr) AccessChain 97(params) 414 + 509: 24(float) Load 508 + Store 507(param) 509 + 510: 27(fvec3) FunctionCall 36(springForce(vf3;vf3;f1;) 501(param) 505(param) 507(param) + 511: 27(fvec3) Load 234(force) + 512: 27(fvec3) FAdd 511 510 + Store 234(force) 512 + Branch 491 + 491: Label + 513: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 23(DebugScope) 16 + 514: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 17 515 515 12 12 + 516: 130(ptr) AccessChain 119(id) 12 + 517: 7(int) Load 516 + 518: 138(ptr) AccessChain 97(params) 137 12 + 519: 69(int) Load 518 + 520: 69(int) ISub 519 224 + 521: 7(int) Bitcast 520 + 523: 155(bool) ULessThan 517 521 + SelectionMerge 525 None + BranchConditional 523 524 525 + 524: Label + 526: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 23(DebugScope) 16 + 527: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 17 515 515 12 12 + 528: 130(ptr) AccessChain 119(id) 20 + 529: 7(int) Load 528 + 531: 155(bool) UGreaterThan 529 12 + Branch 525 + 525: Label + 532: 155(bool) Phi 523 491 531 524 + SelectionMerge 534 None + BranchConditional 532 533 534 + 533: Label + 535: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 23(DebugScope) 16 + 536: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 17 537 537 12 12 + 538: 7(int) Load 131(index) + 539: 138(ptr) AccessChain 97(params) 137 12 + 540: 69(int) Load 539 + 541: 7(int) Bitcast 540 + 542: 7(int) ISub 538 541 + 543: 7(int) IAdd 542 20 + 545: 217(ptr) AccessChain 189 191 543 191 + 546: 67(fvec4) Load 545 + 547: 27(fvec3) VectorShuffle 546 546 0 1 2 + Store 544(param) 547 + 549: 27(fvec3) Load 247(pos) + Store 548(param) 549 + 551: 101(ptr) AccessChain 97(params) 414 + 552: 24(float) Load 551 + Store 550(param) 552 + 553: 27(fvec3) FunctionCall 36(springForce(vf3;vf3;f1;) 544(param) 548(param) 550(param) + 554: 27(fvec3) Load 234(force) + 555: 27(fvec3) FAdd 554 553 + Store 234(force) 555 + Branch 534 + 534: Label + 556: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 23(DebugScope) 16 + 557: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 17 558 558 12 12 + 560: 101(ptr) AccessChain 97(params) 559 + 561: 24(float) Load 560 + 562: 24(float) FNegate 561 + 563: 27(fvec3) Load 257(vel) + 564: 27(fvec3) VectorTimesScalar 563 562 + 565: 27(fvec3) Load 234(force) + 566: 27(fvec3) FAdd 565 564 + Store 234(force) 566 + 567: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 17 568 568 12 12 + 572: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 28(DebugDeclare) 570 569(f) 45 + 573: 27(fvec3) Load 234(force) + 574: 101(ptr) AccessChain 97(params) 224 + 575: 24(float) Load 574 + 576: 24(float) FDiv 196 575 + 577: 27(fvec3) VectorTimesScalar 573 576 + Store 569(f) 577 + 578: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 17 579 579 12 12 + 580: 7(int) Load 131(index) + 581: 27(fvec3) Load 247(pos) + 582: 27(fvec3) Load 257(vel) + 583: 101(ptr) AccessChain 97(params) 191 + 584: 24(float) Load 583 + 585: 27(fvec3) VectorTimesScalar 582 584 + 586: 27(fvec3) FAdd 581 585 + 588: 27(fvec3) Load 569(f) + 589: 27(fvec3) VectorTimesScalar 588 587 + 590: 101(ptr) AccessChain 97(params) 191 + 591: 24(float) Load 590 + 592: 27(fvec3) VectorTimesScalar 589 591 + 593: 101(ptr) AccessChain 97(params) 191 + 594: 24(float) Load 593 + 595: 27(fvec3) VectorTimesScalar 592 594 + 596: 27(fvec3) FAdd 586 595 + 597: 24(float) CompositeExtract 596 0 + 598: 24(float) CompositeExtract 596 1 + 599: 24(float) CompositeExtract 596 2 + 600: 67(fvec4) CompositeConstruct 597 598 599 196 + 601: 217(ptr) AccessChain 213 191 580 191 + Store 601 600 + 602: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 17 603 603 12 12 + 604: 7(int) Load 131(index) + 605: 27(fvec3) Load 257(vel) + 606: 27(fvec3) Load 569(f) + 607: 101(ptr) AccessChain 97(params) 191 + 608: 24(float) Load 607 + 609: 27(fvec3) VectorTimesScalar 606 608 + 610: 27(fvec3) FAdd 605 609 + 611: 24(float) CompositeExtract 610 0 + 612: 24(float) CompositeExtract 610 1 + 613: 24(float) CompositeExtract 610 2 + 614: 67(fvec4) CompositeConstruct 611 612 613 225 + 615: 217(ptr) AccessChain 213 191 604 224 + Store 615 614 + 616: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 17 617 617 12 12 + 621: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 28(DebugDeclare) 619 618(sphereDist) 45 + 622: 7(int) Load 131(index) + 623: 217(ptr) AccessChain 213 191 622 191 + 624: 67(fvec4) Load 623 + 625: 27(fvec3) VectorShuffle 624 624 0 1 2 + 627: 217(ptr) AccessChain 97(params) 626 + 628: 67(fvec4) Load 627 + 629: 27(fvec3) VectorShuffle 628 628 0 1 2 + 630: 27(fvec3) FSub 625 629 + Store 618(sphereDist) 630 + 631: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 17 632 632 12 12 + 633: 27(fvec3) Load 618(sphereDist) + 634: 24(float) ExtInst 3(GLSL.std.450) 66(Length) 633 + 636: 101(ptr) AccessChain 97(params) 635 + 637: 24(float) Load 636 + 639: 24(float) FAdd 637 638 + 641: 155(bool) FOrdLessThan 634 639 + SelectionMerge 643 None + BranchConditional 641 642 643 + 642: Label + 644: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 23(DebugScope) 16 + 645: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 17 646 646 12 12 + 647: 7(int) Load 131(index) + 648: 217(ptr) AccessChain 97(params) 626 + 649: 67(fvec4) Load 648 + 650: 27(fvec3) VectorShuffle 649 649 0 1 2 + 651: 27(fvec3) Load 618(sphereDist) + 652: 27(fvec3) ExtInst 3(GLSL.std.450) 69(Normalize) 651 + 653: 101(ptr) AccessChain 97(params) 635 + 654: 24(float) Load 653 + 655: 24(float) FAdd 654 638 + 656: 27(fvec3) VectorTimesScalar 652 655 + 657: 27(fvec3) FAdd 650 656 + 658: 101(ptr) AccessChain 213 191 647 191 12 + 659: 24(float) CompositeExtract 657 0 + Store 658 659 + 660: 101(ptr) AccessChain 213 191 647 191 20 + 661: 24(float) CompositeExtract 657 1 + Store 660 661 + 662: 101(ptr) AccessChain 213 191 647 191 22 + 663: 24(float) CompositeExtract 657 2 + Store 662 663 + 664: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 17 665 665 12 12 + 666: 7(int) Load 131(index) + 667: 217(ptr) AccessChain 213 191 666 224 + Store 667 226 + Branch 643 + 643: Label + 668: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 23(DebugScope) 16 + 669: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 17 670 670 12 12 + 682: 681(ptr) AccessChain 678(pushConsts) 191 + 683: 7(int) Load 682 + 685: 155(bool) IEqual 683 20 + SelectionMerge 687 None + BranchConditional 685 686 687 + 686: Label + 688: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 23(DebugScope) 16 + 689: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 17 690 690 12 12 + 693: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 28(DebugDeclare) 692 691(normal) 45 + Store 691(normal) 694 + 695: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 17 696 696 12 12 + 697: 130(ptr) AccessChain 119(id) 20 + 698: 7(int) Load 697 + 700: 155(bool) UGreaterThan 698 12 + SelectionMerge 702 None + BranchConditional 700 701 702 + 701: Label + 703: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 23(DebugScope) 16 + 704: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 17 705 705 12 12 + 706: 130(ptr) AccessChain 119(id) 12 + 707: 7(int) Load 706 + 709: 155(bool) UGreaterThan 707 12 + SelectionMerge 711 None + BranchConditional 709 710 711 + 710: Label + 712: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 23(DebugScope) 16 + 713: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 17 714 714 12 12 + 718: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 28(DebugDeclare) 716 715(a) 45 + 719: 7(int) Load 131(index) + 720: 7(int) ISub 719 20 + 721: 217(ptr) AccessChain 189 191 720 191 + 722: 67(fvec4) Load 721 + 723: 27(fvec3) VectorShuffle 722 722 0 1 2 + 724: 27(fvec3) Load 247(pos) + 725: 27(fvec3) FSub 723 724 + Store 715(a) 725 + 726: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 17 727 727 12 12 + 731: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 28(DebugDeclare) 729 728(b) 45 + 732: 7(int) Load 131(index) + 733: 138(ptr) AccessChain 97(params) 137 12 + 734: 69(int) Load 733 + 735: 7(int) Bitcast 734 + 736: 7(int) ISub 732 735 + 737: 7(int) ISub 736 20 + 738: 217(ptr) AccessChain 189 191 737 191 + 739: 67(fvec4) Load 738 + 740: 27(fvec3) VectorShuffle 739 739 0 1 2 + 741: 27(fvec3) Load 247(pos) + 742: 27(fvec3) FSub 740 741 + Store 728(b) 742 + 743: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 17 744 744 12 12 + 748: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 28(DebugDeclare) 746 745(c) 45 + 749: 7(int) Load 131(index) + 750: 138(ptr) AccessChain 97(params) 137 12 + 751: 69(int) Load 750 + 752: 7(int) Bitcast 751 + 753: 7(int) ISub 749 752 + 754: 217(ptr) AccessChain 189 191 753 191 + 755: 67(fvec4) Load 754 + 756: 27(fvec3) VectorShuffle 755 755 0 1 2 + 757: 27(fvec3) Load 247(pos) + 758: 27(fvec3) FSub 756 757 + Store 745(c) 758 + 759: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 17 760 760 12 12 + 761: 27(fvec3) Load 715(a) + 762: 27(fvec3) Load 728(b) + 763: 27(fvec3) ExtInst 3(GLSL.std.450) 68(Cross) 761 762 + 764: 27(fvec3) Load 728(b) + 765: 27(fvec3) Load 745(c) + 766: 27(fvec3) ExtInst 3(GLSL.std.450) 68(Cross) 764 765 + 767: 27(fvec3) FAdd 763 766 + 768: 27(fvec3) Load 691(normal) + 769: 27(fvec3) FAdd 768 767 + Store 691(normal) 769 + Branch 711 + 711: Label + 770: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 23(DebugScope) 16 + 771: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 17 772 772 12 12 + 773: 130(ptr) AccessChain 119(id) 12 + 774: 7(int) Load 773 + 775: 138(ptr) AccessChain 97(params) 137 12 + 776: 69(int) Load 775 + 777: 69(int) ISub 776 224 + 778: 7(int) Bitcast 777 + 780: 155(bool) ULessThan 774 778 + SelectionMerge 782 None + BranchConditional 780 781 782 + 781: Label + 783: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 23(DebugScope) 16 + 784: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 17 785 785 12 12 + 786: 7(int) Load 131(index) + 787: 138(ptr) AccessChain 97(params) 137 12 + 788: 69(int) Load 787 + 789: 7(int) Bitcast 788 + 790: 7(int) ISub 786 789 + 791: 217(ptr) AccessChain 189 191 790 191 + 792: 67(fvec4) Load 791 + 793: 27(fvec3) VectorShuffle 792 792 0 1 2 + 794: 27(fvec3) Load 247(pos) + 795: 27(fvec3) FSub 793 794 + Store 715(a) 795 + 796: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 17 797 797 12 12 + 798: 7(int) Load 131(index) + 799: 138(ptr) AccessChain 97(params) 137 12 + 800: 69(int) Load 799 + 801: 7(int) Bitcast 800 + 802: 7(int) ISub 798 801 + 803: 7(int) IAdd 802 20 + 804: 217(ptr) AccessChain 189 191 803 191 + 805: 67(fvec4) Load 804 + 806: 27(fvec3) VectorShuffle 805 805 0 1 2 + 807: 27(fvec3) Load 247(pos) + 808: 27(fvec3) FSub 806 807 + Store 728(b) 808 + 809: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 17 810 810 12 12 + 811: 7(int) Load 131(index) + 812: 7(int) IAdd 811 20 + 813: 217(ptr) AccessChain 189 191 812 191 + 814: 67(fvec4) Load 813 + 815: 27(fvec3) VectorShuffle 814 814 0 1 2 + 816: 27(fvec3) Load 247(pos) + 817: 27(fvec3) FSub 815 816 + Store 745(c) 817 + 818: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 17 819 819 12 12 + 820: 27(fvec3) Load 715(a) + 821: 27(fvec3) Load 728(b) + 822: 27(fvec3) ExtInst 3(GLSL.std.450) 68(Cross) 820 821 + 823: 27(fvec3) Load 728(b) + 824: 27(fvec3) Load 745(c) + 825: 27(fvec3) ExtInst 3(GLSL.std.450) 68(Cross) 823 824 + 826: 27(fvec3) FAdd 822 825 + 827: 27(fvec3) Load 691(normal) + 828: 27(fvec3) FAdd 827 826 + Store 691(normal) 828 + Branch 782 + 782: Label + Branch 702 + 702: Label + 829: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 23(DebugScope) 16 + 830: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 17 831 831 12 12 + 832: 130(ptr) AccessChain 119(id) 20 + 833: 7(int) Load 832 + 834: 138(ptr) AccessChain 97(params) 137 20 + 835: 69(int) Load 834 + 836: 69(int) ISub 835 224 + 837: 7(int) Bitcast 836 + 839: 155(bool) ULessThan 833 837 + SelectionMerge 841 None + BranchConditional 839 840 841 + 840: Label + 842: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 23(DebugScope) 16 + 843: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 17 844 844 12 12 + 845: 130(ptr) AccessChain 119(id) 12 + 846: 7(int) Load 845 + 848: 155(bool) UGreaterThan 846 12 + SelectionMerge 850 None + BranchConditional 848 849 850 + 849: Label + 851: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 23(DebugScope) 16 + 852: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 17 853 853 12 12 + 854: 7(int) Load 131(index) + 855: 138(ptr) AccessChain 97(params) 137 12 + 856: 69(int) Load 855 + 857: 7(int) Bitcast 856 + 858: 7(int) IAdd 854 857 + 859: 217(ptr) AccessChain 189 191 858 191 + 860: 67(fvec4) Load 859 + 861: 27(fvec3) VectorShuffle 860 860 0 1 2 + 862: 27(fvec3) Load 247(pos) + 863: 27(fvec3) FSub 861 862 + Store 715(a) 863 + 864: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 17 865 865 12 12 + 866: 7(int) Load 131(index) + 867: 138(ptr) AccessChain 97(params) 137 12 + 868: 69(int) Load 867 + 869: 7(int) Bitcast 868 + 870: 7(int) IAdd 866 869 + 871: 7(int) ISub 870 20 + 872: 217(ptr) AccessChain 189 191 871 191 + 873: 67(fvec4) Load 872 + 874: 27(fvec3) VectorShuffle 873 873 0 1 2 + 875: 27(fvec3) Load 247(pos) + 876: 27(fvec3) FSub 874 875 + Store 728(b) 876 + 877: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 17 878 878 12 12 + 879: 7(int) Load 131(index) + 880: 7(int) ISub 879 20 + 881: 217(ptr) AccessChain 189 191 880 191 + 882: 67(fvec4) Load 881 + 883: 27(fvec3) VectorShuffle 882 882 0 1 2 + 884: 27(fvec3) Load 247(pos) + 885: 27(fvec3) FSub 883 884 + Store 745(c) 885 + 886: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 17 887 887 12 12 + 888: 27(fvec3) Load 715(a) + 889: 27(fvec3) Load 728(b) + 890: 27(fvec3) ExtInst 3(GLSL.std.450) 68(Cross) 888 889 + 891: 27(fvec3) Load 728(b) + 892: 27(fvec3) Load 745(c) + 893: 27(fvec3) ExtInst 3(GLSL.std.450) 68(Cross) 891 892 + 894: 27(fvec3) FAdd 890 893 + 895: 27(fvec3) Load 691(normal) + 896: 27(fvec3) FAdd 895 894 + Store 691(normal) 896 + Branch 850 + 850: Label + 897: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 23(DebugScope) 16 + 898: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 17 899 899 12 12 + 900: 130(ptr) AccessChain 119(id) 12 + 901: 7(int) Load 900 + 902: 138(ptr) AccessChain 97(params) 137 12 + 903: 69(int) Load 902 + 904: 69(int) ISub 903 224 + 905: 7(int) Bitcast 904 + 907: 155(bool) ULessThan 901 905 + SelectionMerge 909 None + BranchConditional 907 908 909 + 908: Label + 910: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 23(DebugScope) 16 + 911: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 17 912 912 12 12 + 913: 7(int) Load 131(index) + 914: 7(int) IAdd 913 20 + 915: 217(ptr) AccessChain 189 191 914 191 + 916: 67(fvec4) Load 915 + 917: 27(fvec3) VectorShuffle 916 916 0 1 2 + 918: 27(fvec3) Load 247(pos) + 919: 27(fvec3) FSub 917 918 + Store 715(a) 919 + 920: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 17 921 921 12 12 + 922: 7(int) Load 131(index) + 923: 138(ptr) AccessChain 97(params) 137 12 + 924: 69(int) Load 923 + 925: 7(int) Bitcast 924 + 926: 7(int) IAdd 922 925 + 927: 7(int) IAdd 926 20 + 928: 217(ptr) AccessChain 189 191 927 191 + 929: 67(fvec4) Load 928 + 930: 27(fvec3) VectorShuffle 929 929 0 1 2 + 931: 27(fvec3) Load 247(pos) + 932: 27(fvec3) FSub 930 931 + Store 728(b) 932 + 933: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 17 934 934 12 12 + 935: 7(int) Load 131(index) + 936: 138(ptr) AccessChain 97(params) 137 12 + 937: 69(int) Load 936 + 938: 7(int) Bitcast 937 + 939: 7(int) IAdd 935 938 + 940: 217(ptr) AccessChain 189 191 939 191 + 941: 67(fvec4) Load 940 + 942: 27(fvec3) VectorShuffle 941 941 0 1 2 + 943: 27(fvec3) Load 247(pos) + 944: 27(fvec3) FSub 942 943 + Store 745(c) 944 + 945: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 17 946 946 12 12 + 947: 27(fvec3) Load 715(a) + 948: 27(fvec3) Load 728(b) + 949: 27(fvec3) ExtInst 3(GLSL.std.450) 68(Cross) 947 948 + 950: 27(fvec3) Load 728(b) + 951: 27(fvec3) Load 745(c) + 952: 27(fvec3) ExtInst 3(GLSL.std.450) 68(Cross) 950 951 + 953: 27(fvec3) FAdd 949 952 + 954: 27(fvec3) Load 691(normal) + 955: 27(fvec3) FAdd 954 953 + Store 691(normal) 955 + Branch 909 + 909: Label + Branch 841 + 841: Label + 956: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 23(DebugScope) 16 + 957: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 17 958 958 12 12 + 959: 7(int) Load 131(index) + 960: 27(fvec3) Load 691(normal) + 961: 27(fvec3) ExtInst 3(GLSL.std.450) 69(Normalize) 960 + 962: 24(float) CompositeExtract 961 0 + 963: 24(float) CompositeExtract 961 1 + 964: 24(float) CompositeExtract 961 2 + 965: 67(fvec4) CompositeConstruct 962 963 964 225 + 966: 217(ptr) AccessChain 213 191 959 559 + Store 966 965 + Branch 687 + 687: Label + Return + FunctionEnd + Line 1 66 50 +36(springForce(vf3;vf3;f1;): 27(fvec3) Function None 31 + 33(p0): 29(ptr) FunctionParameter + 34(p1): 29(ptr) FunctionParameter + 35(restDist): 30(ptr) FunctionParameter + 39: Label + 56(dist): 29(ptr) Variable Function + 40: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 23(DebugScope) 38 + 41: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 17 12 12 12 12 + 44: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 28(DebugDeclare) 42 33(p0) 45 + 48: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 28(DebugDeclare) 46 34(p1) 45 + 51: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 28(DebugDeclare) 49 35(restDist) 45 + 52: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 101(DebugFunctionDefinition) 38 36(springForce(vf3;vf3;f1;) + 53: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 23(DebugScope) 38 + 54: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 17 55 55 12 12 + 59: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 28(DebugDeclare) 57 56(dist) 45 + 60: 27(fvec3) Load 33(p0) + 61: 27(fvec3) Load 34(p1) + 62: 27(fvec3) FSub 60 61 + Store 56(dist) 62 + 63: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 17 64 64 12 12 + 65: 27(fvec3) Load 56(dist) + 66: 27(fvec3) ExtInst 3(GLSL.std.450) 69(Normalize) 65 + 102: 101(ptr) AccessChain 97(params) 100 + 103: 24(float) Load 102 + 104: 27(fvec3) VectorTimesScalar 66 103 + 105: 27(fvec3) Load 56(dist) + 106: 24(float) ExtInst 3(GLSL.std.450) 66(Length) 105 + 107: 24(float) Load 35(restDist) + 108: 24(float) FSub 106 107 + 109: 27(fvec3) VectorTimesScalar 104 108 + ReturnValue 109 + FunctionEnd diff --git a/Test/baseResults/spv.debuginfo.glsl.frag.out b/Test/baseResults/spv.debuginfo.glsl.frag.out new file mode 100644 index 0000000000..464e321734 --- /dev/null +++ b/Test/baseResults/spv.debuginfo.glsl.frag.out @@ -0,0 +1,1104 @@ +spv.debuginfo.glsl.frag +// Module Version 10000 +// Generated by (magic number): 8000b +// Id's are bound by 859 + + Capability Shader + Capability ImageQuery + Extension "SPV_KHR_non_semantic_info" + 2: ExtInstImport "NonSemantic.Shader.DebugInfo.100" + 3: ExtInstImport "GLSL.std.450" + MemoryModel Logical GLSL450 + EntryPoint Fragment 14 "main" 478 533 + ExecutionMode 14 OriginUpperLeft + 1: String "" + 8: String "uint" + 15: String "main" + 18: String "// OpModuleProcessed auto-map-locations +// OpModuleProcessed auto-map-bindings +// OpModuleProcessed client vulkan100 +// OpModuleProcessed target-env vulkan1.0 +// OpModuleProcessed keep-uncalled +// OpModuleProcessed entry-point main +#line 1 +" + 25: String "float" + 40: String "textureProj" + 46: String "P" + 50: String "layer" + 53: String "offset" + 60: String "filterPCF" + 66: String "sc" + 78: String "shadow" + 84: String "fragcolor" + 87: String "fragpos" + 93: String "int" + 98: String "global_var" + 113: String "shadowCoord" + 138: String "bool" + 157: String "dist" + 161: String "type.2d.image" + 162: String "@type.2d.image" + 166: String "type.sampled.image" + 167: String "@type.sampled.image" + 171: String "samplerShadowMap" + 221: String "texDim" + 233: String "scale" + 240: String "dx" + 253: String "dy" + 265: String "shadowFactor" + 271: String "count" + 277: String "range" + 284: String "x" + 306: String "y" + 370: String "i" + 390: String "shadowClip" + 397: String "color" + 403: String "viewMatrix" + 406: String "Light" + 412: String "lights" + 415: String "debugDisplayTarget" + 419: String "UBO" + 423: String "ubo" + 466: String "fragPos" + 475: String "samplerposition" + 480: String "inUV" + 488: String "normal" + 492: String "samplerNormal" + 501: String "albedo" + 505: String "samplerAlbedo" + 535: String "outFragColor" + 627: String "N" + 653: String "L" + 677: String "V" + 692: String "lightCosInnerAngle" + 699: String "lightCosOuterAngle" + 706: String "lightRange" + 713: String "dir" + 729: String "cosDir" + 738: String "spotEffect" + 748: String "heightAttenuation" + 757: String "NdotL" + 767: String "diff" + 775: String "R" + 785: String "NdotR" + 795: String "spec" + Name 14 "main" + Name 39 "textureProj(vf4;f1;vf2;" + Name 36 "P" + Name 37 "layer" + Name 38 "offset" + Name 59 "filterPCF(vf4;f1;" + Name 57 "sc" + Name 58 "layer" + Name 77 "shadow(vf3;vf3;" + Name 75 "fragcolor" + Name 76 "fragpos" + Name 96 "global_var" + Name 105 "shadow" + Name 111 "shadowCoord" + Name 155 "dist" + Name 169 "samplerShadowMap" + Name 219 "texDim" + Name 231 "scale" + Name 238 "dx" + Name 251 "dy" + Name 263 "shadowFactor" + Name 269 "count" + Name 275 "range" + Name 282 "x" + Name 304 "y" + Name 335 "param" + Name 337 "param" + Name 339 "param" + Name 368 "i" + Name 388 "shadowClip" + Name 395 "Light" + MemberName 395(Light) 0 "position" + MemberName 395(Light) 1 "target" + MemberName 395(Light) 2 "color" + MemberName 395(Light) 3 "viewMatrix" + Name 409 "UBO" + MemberName 409(UBO) 0 "viewPos" + MemberName 409(UBO) 1 "lights" + MemberName 409(UBO) 2 "useShadows" + MemberName 409(UBO) 3 "debugDisplayTarget" + Name 421 "ubo" + Name 436 "shadowFactor" + Name 441 "param" + Name 443 "param" + Name 464 "fragPos" + Name 473 "samplerposition" + Name 478 "inUV" + Name 486 "normal" + Name 490 "samplerNormal" + Name 499 "albedo" + Name 503 "samplerAlbedo" + Name 533 "outFragColor" + Name 537 "param" + Name 538 "param" + Name 616 "fragcolor" + Name 625 "N" + Name 633 "i" + Name 651 "L" + Name 664 "dist" + Name 675 "V" + Name 690 "lightCosInnerAngle" + Name 697 "lightCosOuterAngle" + Name 704 "lightRange" + Name 711 "dir" + Name 727 "cosDir" + Name 736 "spotEffect" + Name 746 "heightAttenuation" + Name 755 "NdotL" + Name 765 "diff" + Name 773 "R" + Name 783 "NdotR" + Name 793 "spec" + Name 846 "param" + Name 848 "param" + Decorate 169(samplerShadowMap) DescriptorSet 0 + Decorate 169(samplerShadowMap) Binding 5 + MemberDecorate 395(Light) 0 Offset 0 + MemberDecorate 395(Light) 1 Offset 16 + MemberDecorate 395(Light) 2 Offset 32 + MemberDecorate 395(Light) 3 ColMajor + MemberDecorate 395(Light) 3 Offset 48 + MemberDecorate 395(Light) 3 MatrixStride 16 + Decorate 407 ArrayStride 112 + MemberDecorate 409(UBO) 0 Offset 0 + MemberDecorate 409(UBO) 1 Offset 16 + MemberDecorate 409(UBO) 2 Offset 352 + MemberDecorate 409(UBO) 3 Offset 356 + Decorate 409(UBO) Block + Decorate 421(ubo) DescriptorSet 0 + Decorate 421(ubo) Binding 4 + Decorate 473(samplerposition) DescriptorSet 0 + Decorate 473(samplerposition) Binding 1 + Decorate 478(inUV) Location 0 + Decorate 490(samplerNormal) DescriptorSet 0 + Decorate 490(samplerNormal) Binding 2 + Decorate 503(samplerAlbedo) DescriptorSet 0 + Decorate 503(samplerAlbedo) Binding 3 + Decorate 533(outFragColor) Location 0 + 4: TypeVoid + 5: TypeFunction 4 + 7: TypeInt 32 0 + 10: 7(int) Constant 32 + 11: 7(int) Constant 6 + 12: 7(int) Constant 0 + 9: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 2(DebugTypeBasic) 8 10 11 12 + 13: 7(int) Constant 3 + 6: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 8(DebugTypeFunction) 13 4 + 17: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 35(DebugSource) 1 18 + 20: 7(int) Constant 1 + 21: 7(int) Constant 4 + 22: 7(int) Constant 2 + 19: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 1(DebugCompilationUnit) 20 21 17 22 + 16: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 20(DebugFunction) 15 6 17 12 12 19 15 13 12 + 24: TypeFloat 32 + 26: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 2(DebugTypeBasic) 25 10 13 12 + 27: TypeVector 24(float) 4 + 28: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 6(DebugTypeVector) 26 21 + 29: TypePointer Function 27(fvec4) + 30: TypePointer Function 24(float) + 31: TypeVector 24(float) 2 + 32: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 6(DebugTypeVector) 26 22 + 33: TypePointer Function 31(fvec2) + 34: TypeFunction 24(float) 29(ptr) 30(ptr) 33(ptr) + 35: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 8(DebugTypeFunction) 13 26 28 26 32 + 41: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 20(DebugFunction) 40 35 17 12 12 19 40 13 12 + 45: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 26(DebugLocalVariable) 46 28 17 12 12 41 21 20 + 48: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 31(DebugExpression) + 49: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 26(DebugLocalVariable) 50 26 17 12 12 41 21 22 + 52: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 26(DebugLocalVariable) 53 32 17 12 12 41 21 13 + 55: TypeFunction 24(float) 29(ptr) 30(ptr) + 56: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 8(DebugTypeFunction) 13 26 28 26 + 61: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 20(DebugFunction) 60 56 17 12 12 19 60 13 12 + 65: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 26(DebugLocalVariable) 66 28 17 12 12 61 21 20 + 68: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 26(DebugLocalVariable) 50 26 17 12 12 61 21 22 + 70: TypeVector 24(float) 3 + 71: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 6(DebugTypeVector) 26 13 + 72: TypePointer Function 70(fvec3) + 73: TypeFunction 70(fvec3) 72(ptr) 72(ptr) + 74: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 8(DebugTypeFunction) 13 71 71 71 + 79: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 20(DebugFunction) 78 74 17 12 12 19 78 13 12 + 83: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 26(DebugLocalVariable) 84 71 17 12 12 79 21 20 + 86: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 26(DebugLocalVariable) 87 71 17 12 12 79 21 22 + 91: 7(int) Constant 41 + 92: TypeInt 32 1 + 94: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 2(DebugTypeBasic) 93 10 21 12 + 95: TypePointer Private 92(int) + 96(global_var): 95(ptr) Variable Private + 99: 7(int) Constant 8 + 97: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 18(DebugGlobalVariable) 98 94 17 91 12 19 98 96(global_var) 99 + 100: 92(int) Constant 0 + 104: 7(int) Constant 61 + 106: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 26(DebugLocalVariable) 78 26 17 104 12 41 21 + 108: 24(float) Constant 1065353216 + 110: 7(int) Constant 62 + 112: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 26(DebugLocalVariable) 113 28 17 110 12 41 21 + 121: 7(int) Constant 63 + 124: 24(float) Constant 1056964608 + 133: 7(int) Constant 65 + 134: TypeBool + 137: 24(float) Constant 3212836864 + 139: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 2(DebugTypeBasic) 138 10 22 12 + 147: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 2(DebugTypeBasic) 138 10 22 12 + 154: 7(int) Constant 67 + 156: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 26(DebugLocalVariable) 157 26 17 154 12 41 21 + 159: TypeImage 24(float) 2D array sampled format:Unknown + 163: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 0(DebugInfoNone) + 160: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 10(DebugTypeComposite) 161 12 17 154 12 19 162 163 13 + 164: TypeSampledImage 159 + 165: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 10(DebugTypeComposite) 166 12 17 154 12 19 167 163 13 + 168: TypePointer UniformConstant 164 +169(samplerShadowMap): 168(ptr) Variable UniformConstant + 170: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 18(DebugGlobalVariable) 171 165 17 154 12 19 171 169(samplerShadowMap) 99 + 184: 7(int) Constant 68 + 187: 24(float) Constant 0 + 188: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 2(DebugTypeBasic) 138 10 22 12 + 197: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 2(DebugTypeBasic) 138 10 22 12 + 204: 7(int) Constant 70 + 205: 24(float) Constant 1048576000 + 208: 7(int) Constant 73 + 215: 7(int) Constant 78 + 216: TypeVector 92(int) 2 + 217: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 6(DebugTypeVector) 94 22 + 218: TypePointer Function 216(ivec2) + 220: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 26(DebugLocalVariable) 221 217 17 215 12 61 21 + 225: TypeVector 92(int) 3 + 226: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 6(DebugTypeVector) 94 13 + 230: 7(int) Constant 79 + 232: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 26(DebugLocalVariable) 233 26 17 230 12 61 21 + 235: 24(float) Constant 1069547520 + 237: 7(int) Constant 80 + 239: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 26(DebugLocalVariable) 240 26 17 237 12 61 21 + 244: TypePointer Function 92(int) + 250: 7(int) Constant 81 + 252: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 26(DebugLocalVariable) 253 26 17 250 12 61 21 + 262: 7(int) Constant 83 + 264: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 26(DebugLocalVariable) 265 26 17 262 12 61 21 + 268: 7(int) Constant 84 + 270: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 26(DebugLocalVariable) 271 94 17 268 12 61 21 + 274: 7(int) Constant 85 + 276: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 26(DebugLocalVariable) 277 94 17 274 12 61 21 + 279: 92(int) Constant 1 + 281: 7(int) Constant 87 + 283: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 26(DebugLocalVariable) 284 94 17 281 12 61 21 + 299: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 2(DebugTypeBasic) 138 10 22 12 + 303: 7(int) Constant 89 + 305: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 26(DebugLocalVariable) 306 94 17 303 12 61 21 + 321: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 2(DebugTypeBasic) 138 10 22 12 + 325: 7(int) Constant 91 + 344: 7(int) Constant 92 + 357: 7(int) Constant 96 + 367: 7(int) Constant 100 + 369: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 26(DebugLocalVariable) 370 94 17 367 12 79 21 + 382: 92(int) Constant 3 + 383: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 2(DebugTypeBasic) 138 10 22 12 + 387: 7(int) Constant 102 + 389: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 26(DebugLocalVariable) 390 28 17 387 12 79 21 + 392: TypeMatrix 27(fvec4) 4 + 394: 134(bool) ConstantTrue + 393: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 108(DebugTypeMatrix) 28 21 394 + 395(Light): TypeStruct 27(fvec4) 27(fvec4) 27(fvec4) 392 + 398: 7(int) Constant 47 + 399: 7(int) Constant 7 + 396: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 11(DebugTypeMember) 397 28 17 398 399 12 12 13 + 400: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 11(DebugTypeMember) 397 28 17 398 399 12 12 13 + 401: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 11(DebugTypeMember) 397 28 17 398 399 12 12 13 + 404: 7(int) Constant 48 + 402: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 11(DebugTypeMember) 403 393 17 404 399 12 12 13 + 405: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 10(DebugTypeComposite) 406 20 17 387 12 19 406 12 13 396 400 401 402 + 407: TypeArray 395(Light) 13 + 408: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 5(DebugTypeArray) 405 13 + 409(UBO): TypeStruct 27(fvec4) 407 92(int) 92(int) + 410: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 11(DebugTypeMember) 397 28 17 398 399 12 12 13 + 413: 7(int) Constant 54 + 411: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 11(DebugTypeMember) 412 408 17 413 99 12 12 13 + 416: 7(int) Constant 56 + 414: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 11(DebugTypeMember) 415 94 17 416 11 12 12 13 + 417: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 11(DebugTypeMember) 415 94 17 416 11 12 12 13 + 418: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 10(DebugTypeComposite) 419 20 17 387 12 19 419 12 13 410 411 414 417 + 420: TypePointer Uniform 409(UBO) + 421(ubo): 420(ptr) Variable Uniform + 422: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 18(DebugGlobalVariable) 423 418 17 387 12 19 423 421(ubo) 99 + 425: TypePointer Uniform 392 + 435: 7(int) Constant 106 + 437: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 26(DebugLocalVariable) 265 26 17 435 12 79 21 + 446: 7(int) Constant 111 + 456: 7(int) Constant 113 + 463: 7(int) Constant 119 + 465: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 26(DebugLocalVariable) 466 71 17 463 12 16 21 + 468: TypeImage 24(float) 2D sampled format:Unknown + 469: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 10(DebugTypeComposite) 161 12 17 463 12 19 162 163 13 + 470: TypeSampledImage 468 + 471: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 10(DebugTypeComposite) 166 12 17 463 12 19 167 163 13 + 472: TypePointer UniformConstant 470 +473(samplerposition): 472(ptr) Variable UniformConstant + 474: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 18(DebugGlobalVariable) 475 471 17 463 12 19 475 473(samplerposition) 99 + 477: TypePointer Input 31(fvec2) + 478(inUV): 477(ptr) Variable Input + 479: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 18(DebugGlobalVariable) 480 32 17 463 12 19 480 478(inUV) 99 + 485: 7(int) Constant 120 + 487: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 26(DebugLocalVariable) 488 71 17 485 12 16 21 +490(samplerNormal): 472(ptr) Variable UniformConstant + 491: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 18(DebugGlobalVariable) 492 471 17 485 12 19 492 490(samplerNormal) 99 + 498: 7(int) Constant 121 + 500: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 26(DebugLocalVariable) 501 28 17 498 12 16 21 +503(samplerAlbedo): 472(ptr) Variable UniformConstant + 504: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 18(DebugGlobalVariable) 505 471 17 498 12 19 505 503(samplerAlbedo) 99 + 510: 7(int) Constant 124 + 511: TypePointer Uniform 92(int) + 514: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 2(DebugTypeBasic) 138 10 22 12 + 520: 7(int) Constant 125 + 531: 7(int) Constant 127 + 532: TypePointer Output 27(fvec4) +533(outFragColor): 532(ptr) Variable Output + 534: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 18(DebugGlobalVariable) 535 28 17 531 12 19 535 533(outFragColor) 99 + 536: 70(fvec3) ConstantComposite 108 108 108 + 541: TypePointer Output 24(float) + 549: 7(int) Constant 128 + 553: 7(int) Constant 130 + 562: 7(int) Constant 131 + 566: 7(int) Constant 133 + 575: 7(int) Constant 134 + 579: 7(int) Constant 136 + 589: 7(int) Constant 137 + 593: 7(int) Constant 139 + 603: 7(int) Constant 140 + 608: 7(int) Constant 142 + 611: 7(int) Constant 143 + 615: 7(int) Constant 147 + 617: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 26(DebugLocalVariable) 84 71 17 615 12 16 21 + 621: 24(float) Constant 1036831949 + 624: 7(int) Constant 149 + 626: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 26(DebugLocalVariable) 627 71 17 624 12 16 21 + 632: 7(int) Constant 151 + 634: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 26(DebugLocalVariable) 370 94 17 632 12 16 21 + 646: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 2(DebugTypeBasic) 138 10 22 12 + 650: 7(int) Constant 154 + 652: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 26(DebugLocalVariable) 653 71 17 650 12 16 21 + 656: TypePointer Uniform 27(fvec4) + 663: 7(int) Constant 156 + 665: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 26(DebugLocalVariable) 157 26 17 663 12 16 21 + 670: 7(int) Constant 157 + 674: 7(int) Constant 160 + 676: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 26(DebugLocalVariable) 677 71 17 674 12 16 21 + 685: 7(int) Constant 161 + 689: 7(int) Constant 163 + 691: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 26(DebugLocalVariable) 692 26 17 689 12 16 21 + 694: 24(float) Constant 1064781546 + 696: 7(int) Constant 164 + 698: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 26(DebugLocalVariable) 699 26 17 696 12 16 21 + 701: 24(float) Constant 1063781322 + 703: 7(int) Constant 165 + 705: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 26(DebugLocalVariable) 706 26 17 703 12 16 21 + 708: 24(float) Constant 1120403456 + 710: 7(int) Constant 168 + 712: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 26(DebugLocalVariable) 713 71 17 710 12 16 21 + 726: 7(int) Constant 171 + 728: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 26(DebugLocalVariable) 729 26 17 726 12 16 21 + 735: 7(int) Constant 172 + 737: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 26(DebugLocalVariable) 738 26 17 735 12 16 21 + 745: 7(int) Constant 173 + 747: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 26(DebugLocalVariable) 748 26 17 745 12 16 21 + 754: 7(int) Constant 176 + 756: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 26(DebugLocalVariable) 757 26 17 754 12 16 21 + 764: 7(int) Constant 177 + 766: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 26(DebugLocalVariable) 767 71 17 764 12 16 21 + 772: 7(int) Constant 180 + 774: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 26(DebugLocalVariable) 775 71 17 772 12 16 21 + 782: 7(int) Constant 181 + 784: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 26(DebugLocalVariable) 785 26 17 782 12 16 21 + 792: 7(int) Constant 182 + 794: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 26(DebugLocalVariable) 795 71 17 792 12 16 21 + 798: 24(float) Constant 1098907648 + 803: 24(float) Constant 1075838976 + 807: 7(int) Constant 184 + 820: 92(int) Constant 2 + 836: 7(int) Constant 188 + 839: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 2(DebugTypeBasic) 138 10 22 12 + 845: 7(int) Constant 190 + 853: 7(int) Constant 193 + Line 1 116 11 + 14(main): 4 Function None 5 + 23: Label + 464(fragPos): 72(ptr) Variable Function + 486(normal): 72(ptr) Variable Function + 499(albedo): 29(ptr) Variable Function + 537(param): 72(ptr) Variable Function + 538(param): 72(ptr) Variable Function + 616(fragcolor): 72(ptr) Variable Function + 625(N): 72(ptr) Variable Function + 633(i): 244(ptr) Variable Function + 651(L): 72(ptr) Variable Function + 664(dist): 30(ptr) Variable Function + 675(V): 72(ptr) Variable Function +690(lightCosInnerAngle): 30(ptr) Variable Function +697(lightCosOuterAngle): 30(ptr) Variable Function + 704(lightRange): 30(ptr) Variable Function + 711(dir): 72(ptr) Variable Function + 727(cosDir): 30(ptr) Variable Function + 736(spotEffect): 30(ptr) Variable Function +746(heightAttenuation): 30(ptr) Variable Function + 755(NdotL): 30(ptr) Variable Function + 765(diff): 72(ptr) Variable Function + 773(R): 72(ptr) Variable Function + 783(NdotR): 30(ptr) Variable Function + 793(spec): 72(ptr) Variable Function + 846(param): 72(ptr) Variable Function + 848(param): 72(ptr) Variable Function + 89: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 23(DebugScope) 19 + 90: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 17 91 91 12 12 + Store 96(global_var) 100 + 460: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 101(DebugFunctionDefinition) 16 14(main) + 461: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 23(DebugScope) 16 + 462: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 17 463 463 12 12 + 467: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 28(DebugDeclare) 465 464(fragPos) 48 + 476: 470 Load 473(samplerposition) + 481: 31(fvec2) Load 478(inUV) + 482: 27(fvec4) ImageSampleImplicitLod 476 481 + 483: 70(fvec3) VectorShuffle 482 482 0 1 2 + Store 464(fragPos) 483 + 484: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 17 485 485 12 12 + 489: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 28(DebugDeclare) 487 486(normal) 48 + 493: 470 Load 490(samplerNormal) + 494: 31(fvec2) Load 478(inUV) + 495: 27(fvec4) ImageSampleImplicitLod 493 494 + 496: 70(fvec3) VectorShuffle 495 495 0 1 2 + Store 486(normal) 496 + 497: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 17 498 498 12 12 + 502: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 28(DebugDeclare) 500 499(albedo) 48 + 506: 470 Load 503(samplerAlbedo) + 507: 31(fvec2) Load 478(inUV) + 508: 27(fvec4) ImageSampleImplicitLod 506 507 + Store 499(albedo) 508 + 509: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 17 510 510 12 12 + 512: 511(ptr) AccessChain 421(ubo) 382 + 513: 92(int) Load 512 + 515: 134(bool) SGreaterThan 513 100 + SelectionMerge 517 None + BranchConditional 515 516 517 + 516: Label + 518: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 23(DebugScope) 16 + 519: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 17 520 520 12 12 + 521: 511(ptr) AccessChain 421(ubo) 382 + 522: 92(int) Load 521 + SelectionMerge 528 None + Switch 522 528 + case 1: 523 + case 2: 524 + case 3: 525 + case 4: 526 + case 5: 527 + 523: Label + 529: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 23(DebugScope) 16 + 530: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 17 531 531 12 12 + Store 537(param) 536 + 539: 70(fvec3) Load 464(fragPos) + Store 538(param) 539 + 540: 70(fvec3) FunctionCall 77(shadow(vf3;vf3;) 537(param) 538(param) + 542: 541(ptr) AccessChain 533(outFragColor) 12 + 543: 24(float) CompositeExtract 540 0 + Store 542 543 + 544: 541(ptr) AccessChain 533(outFragColor) 20 + 545: 24(float) CompositeExtract 540 1 + Store 544 545 + 546: 541(ptr) AccessChain 533(outFragColor) 22 + 547: 24(float) CompositeExtract 540 2 + Store 546 547 + 548: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 17 549 549 12 12 + Branch 528 + 524: Label + 551: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 23(DebugScope) 16 + 552: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 17 553 553 12 12 + 554: 70(fvec3) Load 464(fragPos) + 555: 541(ptr) AccessChain 533(outFragColor) 12 + 556: 24(float) CompositeExtract 554 0 + Store 555 556 + 557: 541(ptr) AccessChain 533(outFragColor) 20 + 558: 24(float) CompositeExtract 554 1 + Store 557 558 + 559: 541(ptr) AccessChain 533(outFragColor) 22 + 560: 24(float) CompositeExtract 554 2 + Store 559 560 + 561: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 17 562 562 12 12 + Branch 528 + 525: Label + 564: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 23(DebugScope) 16 + 565: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 17 566 566 12 12 + 567: 70(fvec3) Load 486(normal) + 568: 541(ptr) AccessChain 533(outFragColor) 12 + 569: 24(float) CompositeExtract 567 0 + Store 568 569 + 570: 541(ptr) AccessChain 533(outFragColor) 20 + 571: 24(float) CompositeExtract 567 1 + Store 570 571 + 572: 541(ptr) AccessChain 533(outFragColor) 22 + 573: 24(float) CompositeExtract 567 2 + Store 572 573 + 574: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 17 575 575 12 12 + Branch 528 + 526: Label + 577: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 23(DebugScope) 16 + 578: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 17 579 579 12 12 + 580: 27(fvec4) Load 499(albedo) + 581: 70(fvec3) VectorShuffle 580 580 0 1 2 + 582: 541(ptr) AccessChain 533(outFragColor) 12 + 583: 24(float) CompositeExtract 581 0 + Store 582 583 + 584: 541(ptr) AccessChain 533(outFragColor) 20 + 585: 24(float) CompositeExtract 581 1 + Store 584 585 + 586: 541(ptr) AccessChain 533(outFragColor) 22 + 587: 24(float) CompositeExtract 581 2 + Store 586 587 + 588: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 17 589 589 12 12 + Branch 528 + 527: Label + 591: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 23(DebugScope) 16 + 592: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 17 593 593 12 12 + 594: 27(fvec4) Load 499(albedo) + 595: 70(fvec3) VectorShuffle 594 594 3 3 3 + 596: 541(ptr) AccessChain 533(outFragColor) 12 + 597: 24(float) CompositeExtract 595 0 + Store 596 597 + 598: 541(ptr) AccessChain 533(outFragColor) 20 + 599: 24(float) CompositeExtract 595 1 + Store 598 599 + 600: 541(ptr) AccessChain 533(outFragColor) 22 + 601: 24(float) CompositeExtract 595 2 + Store 600 601 + 602: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 17 603 603 12 12 + Branch 528 + 528: Label + 606: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 23(DebugScope) 16 + 607: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 17 608 608 12 12 + 609: 541(ptr) AccessChain 533(outFragColor) 13 + Store 609 108 + 610: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 17 611 611 12 12 + Return + 517: Label + 613: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 23(DebugScope) 16 + 614: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 17 615 615 12 12 + 618: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 28(DebugDeclare) 617 616(fragcolor) 48 + 619: 27(fvec4) Load 499(albedo) + 620: 70(fvec3) VectorShuffle 619 619 0 1 2 + 622: 70(fvec3) VectorTimesScalar 620 621 + Store 616(fragcolor) 622 + 623: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 17 624 624 12 12 + 628: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 28(DebugDeclare) 626 625(N) 48 + 629: 70(fvec3) Load 486(normal) + 630: 70(fvec3) ExtInst 3(GLSL.std.450) 69(Normalize) 629 + Store 625(N) 630 + 631: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 17 632 632 12 12 + 635: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 28(DebugDeclare) 634 633(i) 48 + Store 633(i) 100 + Branch 636 + 636: Label + 640: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 23(DebugScope) 16 + 641: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 17 632 632 12 12 + LoopMerge 638 639 None + Branch 642 + 642: Label + 643: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 23(DebugScope) 16 + 644: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 17 632 632 12 12 + 645: 92(int) Load 633(i) + 647: 134(bool) SLessThan 645 382 + BranchConditional 647 637 638 + 637: Label + 648: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 23(DebugScope) 16 + 649: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 17 650 650 12 12 + 654: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 28(DebugDeclare) 652 651(L) 48 + 655: 92(int) Load 633(i) + 657: 656(ptr) AccessChain 421(ubo) 279 655 100 + 658: 27(fvec4) Load 657 + 659: 70(fvec3) VectorShuffle 658 658 0 1 2 + 660: 70(fvec3) Load 464(fragPos) + 661: 70(fvec3) FSub 659 660 + Store 651(L) 661 + 662: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 17 663 663 12 12 + 666: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 28(DebugDeclare) 665 664(dist) 48 + 667: 70(fvec3) Load 651(L) + 668: 24(float) ExtInst 3(GLSL.std.450) 66(Length) 667 + Store 664(dist) 668 + 669: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 17 670 670 12 12 + 671: 70(fvec3) Load 651(L) + 672: 70(fvec3) ExtInst 3(GLSL.std.450) 69(Normalize) 671 + Store 651(L) 672 + 673: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 17 674 674 12 12 + 678: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 28(DebugDeclare) 676 675(V) 48 + 679: 656(ptr) AccessChain 421(ubo) 100 + 680: 27(fvec4) Load 679 + 681: 70(fvec3) VectorShuffle 680 680 0 1 2 + 682: 70(fvec3) Load 464(fragPos) + 683: 70(fvec3) FSub 681 682 + Store 675(V) 683 + 684: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 17 685 685 12 12 + 686: 70(fvec3) Load 675(V) + 687: 70(fvec3) ExtInst 3(GLSL.std.450) 69(Normalize) 686 + Store 675(V) 687 + 688: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 17 689 689 12 12 + 693: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 28(DebugDeclare) 691 690(lightCosInnerAngle) 48 + Store 690(lightCosInnerAngle) 694 + 695: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 17 696 696 12 12 + 700: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 28(DebugDeclare) 698 697(lightCosOuterAngle) 48 + Store 697(lightCosOuterAngle) 701 + 702: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 17 703 703 12 12 + 707: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 28(DebugDeclare) 705 704(lightRange) 48 + Store 704(lightRange) 708 + 709: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 17 710 710 12 12 + 714: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 28(DebugDeclare) 712 711(dir) 48 + 715: 92(int) Load 633(i) + 716: 656(ptr) AccessChain 421(ubo) 279 715 100 + 717: 27(fvec4) Load 716 + 718: 70(fvec3) VectorShuffle 717 717 0 1 2 + 719: 92(int) Load 633(i) + 720: 656(ptr) AccessChain 421(ubo) 279 719 279 + 721: 27(fvec4) Load 720 + 722: 70(fvec3) VectorShuffle 721 721 0 1 2 + 723: 70(fvec3) FSub 718 722 + 724: 70(fvec3) ExtInst 3(GLSL.std.450) 69(Normalize) 723 + Store 711(dir) 724 + 725: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 17 726 726 12 12 + 730: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 28(DebugDeclare) 728 727(cosDir) 48 + 731: 70(fvec3) Load 651(L) + 732: 70(fvec3) Load 711(dir) + 733: 24(float) Dot 731 732 + Store 727(cosDir) 733 + 734: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 17 735 735 12 12 + 739: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 28(DebugDeclare) 737 736(spotEffect) 48 + 740: 24(float) Load 697(lightCosOuterAngle) + 741: 24(float) Load 690(lightCosInnerAngle) + 742: 24(float) Load 727(cosDir) + 743: 24(float) ExtInst 3(GLSL.std.450) 49(SmoothStep) 740 741 742 + Store 736(spotEffect) 743 + 744: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 17 745 745 12 12 + 749: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 28(DebugDeclare) 747 746(heightAttenuation) 48 + 750: 24(float) Load 704(lightRange) + 751: 24(float) Load 664(dist) + 752: 24(float) ExtInst 3(GLSL.std.450) 49(SmoothStep) 750 187 751 + Store 746(heightAttenuation) 752 + 753: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 17 754 754 12 12 + 758: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 28(DebugDeclare) 756 755(NdotL) 48 + 759: 70(fvec3) Load 625(N) + 760: 70(fvec3) Load 651(L) + 761: 24(float) Dot 759 760 + 762: 24(float) ExtInst 3(GLSL.std.450) 40(FMax) 187 761 + Store 755(NdotL) 762 + 763: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 17 764 764 12 12 + 768: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 28(DebugDeclare) 766 765(diff) 48 + 769: 24(float) Load 755(NdotL) + 770: 70(fvec3) CompositeConstruct 769 769 769 + Store 765(diff) 770 + 771: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 17 772 772 12 12 + 776: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 28(DebugDeclare) 774 773(R) 48 + 777: 70(fvec3) Load 651(L) + 778: 70(fvec3) FNegate 777 + 779: 70(fvec3) Load 625(N) + 780: 70(fvec3) ExtInst 3(GLSL.std.450) 71(Reflect) 778 779 + Store 773(R) 780 + 781: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 17 782 782 12 12 + 786: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 28(DebugDeclare) 784 783(NdotR) 48 + 787: 70(fvec3) Load 773(R) + 788: 70(fvec3) Load 675(V) + 789: 24(float) Dot 787 788 + 790: 24(float) ExtInst 3(GLSL.std.450) 40(FMax) 187 789 + Store 783(NdotR) 790 + 791: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 17 792 792 12 12 + 796: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 28(DebugDeclare) 794 793(spec) 48 + 797: 24(float) Load 783(NdotR) + 799: 24(float) ExtInst 3(GLSL.std.450) 26(Pow) 797 798 + 800: 30(ptr) AccessChain 499(albedo) 13 + 801: 24(float) Load 800 + 802: 24(float) FMul 799 801 + 804: 24(float) FMul 802 803 + 805: 70(fvec3) CompositeConstruct 804 804 804 + Store 793(spec) 805 + 806: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 17 807 807 12 12 + 808: 70(fvec3) Load 765(diff) + 809: 70(fvec3) Load 793(spec) + 810: 70(fvec3) FAdd 808 809 + 811: 24(float) Load 736(spotEffect) + 812: 70(fvec3) VectorTimesScalar 810 811 + 813: 24(float) Load 746(heightAttenuation) + 814: 70(fvec3) VectorTimesScalar 812 813 + 815: 24(float) CompositeExtract 814 0 + 816: 24(float) CompositeExtract 814 1 + 817: 24(float) CompositeExtract 814 2 + 818: 70(fvec3) CompositeConstruct 815 816 817 + 819: 92(int) Load 633(i) + 821: 656(ptr) AccessChain 421(ubo) 279 819 820 + 822: 27(fvec4) Load 821 + 823: 70(fvec3) VectorShuffle 822 822 0 1 2 + 824: 70(fvec3) FMul 818 823 + 825: 27(fvec4) Load 499(albedo) + 826: 70(fvec3) VectorShuffle 825 825 0 1 2 + 827: 70(fvec3) FMul 824 826 + 828: 70(fvec3) Load 616(fragcolor) + 829: 70(fvec3) FAdd 828 827 + Store 616(fragcolor) 829 + Branch 639 + 639: Label + 830: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 23(DebugScope) 16 + 831: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 17 632 632 12 12 + 832: 92(int) Load 633(i) + 833: 92(int) IAdd 832 279 + Store 633(i) 833 + Branch 636 + 638: Label + 834: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 23(DebugScope) 16 + 835: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 17 836 836 12 12 + 837: 511(ptr) AccessChain 421(ubo) 820 + 838: 92(int) Load 837 + 840: 134(bool) SGreaterThan 838 100 + SelectionMerge 842 None + BranchConditional 840 841 842 + 841: Label + 843: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 23(DebugScope) 16 + 844: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 17 845 845 12 12 + 847: 70(fvec3) Load 616(fragcolor) + Store 846(param) 847 + 849: 70(fvec3) Load 464(fragPos) + Store 848(param) 849 + 850: 70(fvec3) FunctionCall 77(shadow(vf3;vf3;) 846(param) 848(param) + Store 616(fragcolor) 850 + Branch 842 + 842: Label + 851: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 23(DebugScope) 16 + 852: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 17 853 853 12 12 + 854: 70(fvec3) Load 616(fragcolor) + 855: 24(float) CompositeExtract 854 0 + 856: 24(float) CompositeExtract 854 1 + 857: 24(float) CompositeExtract 854 2 + 858: 27(fvec4) CompositeConstruct 855 856 857 108 + Store 533(outFragColor) 858 + Return + FunctionEnd + Line 1 59 51 +39(textureProj(vf4;f1;vf2;): 24(float) Function None 34 + 36(P): 29(ptr) FunctionParameter + 37(layer): 30(ptr) FunctionParameter + 38(offset): 33(ptr) FunctionParameter + 42: Label + 105(shadow): 30(ptr) Variable Function +111(shadowCoord): 29(ptr) Variable Function + 155(dist): 30(ptr) Variable Function + 43: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 23(DebugScope) 41 + 44: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 17 12 12 12 12 + 47: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 28(DebugDeclare) 45 36(P) 48 + 51: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 28(DebugDeclare) 49 37(layer) 48 + 54: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 28(DebugDeclare) 52 38(offset) 48 + 101: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 101(DebugFunctionDefinition) 41 39(textureProj(vf4;f1;vf2;) + 102: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 23(DebugScope) 41 + 103: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 17 104 104 12 12 + 107: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 28(DebugDeclare) 106 105(shadow) 48 + Store 105(shadow) 108 + 109: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 17 110 110 12 12 + 114: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 28(DebugDeclare) 112 111(shadowCoord) 48 + 115: 27(fvec4) Load 36(P) + 116: 30(ptr) AccessChain 36(P) 13 + 117: 24(float) Load 116 + 118: 27(fvec4) CompositeConstruct 117 117 117 117 + 119: 27(fvec4) FDiv 115 118 + Store 111(shadowCoord) 119 + 120: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 17 121 121 12 12 + 122: 27(fvec4) Load 111(shadowCoord) + 123: 31(fvec2) VectorShuffle 122 122 0 1 + 125: 31(fvec2) VectorTimesScalar 123 124 + 126: 31(fvec2) CompositeConstruct 124 124 + 127: 31(fvec2) FAdd 125 126 + 128: 30(ptr) AccessChain 111(shadowCoord) 12 + 129: 24(float) CompositeExtract 127 0 + Store 128 129 + 130: 30(ptr) AccessChain 111(shadowCoord) 20 + 131: 24(float) CompositeExtract 127 1 + Store 130 131 + 132: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 17 133 133 12 12 + 135: 30(ptr) AccessChain 111(shadowCoord) 22 + 136: 24(float) Load 135 + 140: 134(bool) FOrdGreaterThan 136 137 + SelectionMerge 142 None + BranchConditional 140 141 142 + 141: Label + 143: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 23(DebugScope) 41 + 144: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 17 133 133 12 12 + 145: 30(ptr) AccessChain 111(shadowCoord) 22 + 146: 24(float) Load 145 + 148: 134(bool) FOrdLessThan 146 108 + Branch 142 + 142: Label + 149: 134(bool) Phi 140 42 148 141 + SelectionMerge 151 None + BranchConditional 149 150 151 + 150: Label + 152: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 23(DebugScope) 41 + 153: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 17 154 154 12 12 + 158: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 28(DebugDeclare) 156 155(dist) 48 + 172: 164 Load 169(samplerShadowMap) + 173: 27(fvec4) Load 111(shadowCoord) + 174: 31(fvec2) VectorShuffle 173 173 0 1 + 175: 31(fvec2) Load 38(offset) + 176: 31(fvec2) FAdd 174 175 + 177: 24(float) Load 37(layer) + 178: 24(float) CompositeExtract 176 0 + 179: 24(float) CompositeExtract 176 1 + 180: 70(fvec3) CompositeConstruct 178 179 177 + 181: 27(fvec4) ImageSampleImplicitLod 172 180 + 182: 24(float) CompositeExtract 181 0 + Store 155(dist) 182 + 183: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 17 184 184 12 12 + 185: 30(ptr) AccessChain 111(shadowCoord) 13 + 186: 24(float) Load 185 + 189: 134(bool) FOrdGreaterThan 186 187 + SelectionMerge 191 None + BranchConditional 189 190 191 + 190: Label + 192: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 23(DebugScope) 41 + 193: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 17 184 184 12 12 + 194: 24(float) Load 155(dist) + 195: 30(ptr) AccessChain 111(shadowCoord) 22 + 196: 24(float) Load 195 + 198: 134(bool) FOrdLessThan 194 196 + Branch 191 + 191: Label + 199: 134(bool) Phi 189 150 198 190 + SelectionMerge 201 None + BranchConditional 199 200 201 + 200: Label + 202: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 23(DebugScope) 41 + 203: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 17 204 204 12 12 + Store 105(shadow) 205 + Branch 201 + 201: Label + Branch 151 + 151: Label + 206: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 23(DebugScope) 41 + 207: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 17 208 208 12 12 + 209: 24(float) Load 105(shadow) + ReturnValue 209 + FunctionEnd + Line 1 76 37 +59(filterPCF(vf4;f1;): 24(float) Function None 55 + 57(sc): 29(ptr) FunctionParameter + 58(layer): 30(ptr) FunctionParameter + 62: Label + 219(texDim): 218(ptr) Variable Function + 231(scale): 30(ptr) Variable Function + 238(dx): 30(ptr) Variable Function + 251(dy): 30(ptr) Variable Function +263(shadowFactor): 30(ptr) Variable Function + 269(count): 244(ptr) Variable Function + 275(range): 244(ptr) Variable Function + 282(x): 244(ptr) Variable Function + 304(y): 244(ptr) Variable Function + 335(param): 29(ptr) Variable Function + 337(param): 30(ptr) Variable Function + 339(param): 33(ptr) Variable Function + 63: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 23(DebugScope) 61 + 64: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 17 12 12 12 12 + 67: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 28(DebugDeclare) 65 57(sc) 48 + 69: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 28(DebugDeclare) 68 58(layer) 48 + 212: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 101(DebugFunctionDefinition) 61 59(filterPCF(vf4;f1;) + 213: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 23(DebugScope) 61 + 214: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 17 215 215 12 12 + 222: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 28(DebugDeclare) 220 219(texDim) 48 + 223: 164 Load 169(samplerShadowMap) + 224: 159 Image 223 + 227: 225(ivec3) ImageQuerySizeLod 224 100 + 228: 216(ivec2) VectorShuffle 227 227 0 1 + Store 219(texDim) 228 + 229: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 17 230 230 12 12 + 234: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 28(DebugDeclare) 232 231(scale) 48 + Store 231(scale) 235 + 236: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 17 237 237 12 12 + 241: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 28(DebugDeclare) 239 238(dx) 48 + 242: 24(float) Load 231(scale) + 243: 24(float) FMul 242 108 + 245: 244(ptr) AccessChain 219(texDim) 12 + 246: 92(int) Load 245 + 247: 24(float) ConvertSToF 246 + 248: 24(float) FDiv 243 247 + Store 238(dx) 248 + 249: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 17 250 250 12 12 + 254: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 28(DebugDeclare) 252 251(dy) 48 + 255: 24(float) Load 231(scale) + 256: 24(float) FMul 255 108 + 257: 244(ptr) AccessChain 219(texDim) 20 + 258: 92(int) Load 257 + 259: 24(float) ConvertSToF 258 + 260: 24(float) FDiv 256 259 + Store 251(dy) 260 + 261: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 17 262 262 12 12 + 266: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 28(DebugDeclare) 264 263(shadowFactor) 48 + Store 263(shadowFactor) 187 + 267: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 17 268 268 12 12 + 272: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 28(DebugDeclare) 270 269(count) 48 + Store 269(count) 100 + 273: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 17 274 274 12 12 + 278: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 28(DebugDeclare) 276 275(range) 48 + Store 275(range) 279 + 280: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 17 281 281 12 12 + 285: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 28(DebugDeclare) 283 282(x) 48 + 286: 92(int) Load 275(range) + 287: 92(int) SNegate 286 + Store 282(x) 287 + Branch 288 + 288: Label + 292: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 23(DebugScope) 61 + 293: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 17 281 281 12 12 + LoopMerge 290 291 None + Branch 294 + 294: Label + 295: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 23(DebugScope) 61 + 296: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 17 281 281 12 12 + 297: 92(int) Load 282(x) + 298: 92(int) Load 275(range) + 300: 134(bool) SLessThanEqual 297 298 + BranchConditional 300 289 290 + 289: Label + 301: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 23(DebugScope) 61 + 302: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 17 303 303 12 12 + 307: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 28(DebugDeclare) 305 304(y) 48 + 308: 92(int) Load 275(range) + 309: 92(int) SNegate 308 + Store 304(y) 309 + Branch 310 + 310: Label + 314: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 23(DebugScope) 61 + 315: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 17 303 303 12 12 + LoopMerge 312 313 None + Branch 316 + 316: Label + 317: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 23(DebugScope) 61 + 318: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 17 303 303 12 12 + 319: 92(int) Load 304(y) + 320: 92(int) Load 275(range) + 322: 134(bool) SLessThanEqual 319 320 + BranchConditional 322 311 312 + 311: Label + 323: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 23(DebugScope) 61 + 324: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 17 325 325 12 12 + 326: 24(float) Load 238(dx) + 327: 92(int) Load 282(x) + 328: 24(float) ConvertSToF 327 + 329: 24(float) FMul 326 328 + 330: 24(float) Load 251(dy) + 331: 92(int) Load 304(y) + 332: 24(float) ConvertSToF 331 + 333: 24(float) FMul 330 332 + 334: 31(fvec2) CompositeConstruct 329 333 + 336: 27(fvec4) Load 57(sc) + Store 335(param) 336 + 338: 24(float) Load 58(layer) + Store 337(param) 338 + Store 339(param) 334 + 340: 24(float) FunctionCall 39(textureProj(vf4;f1;vf2;) 335(param) 337(param) 339(param) + 341: 24(float) Load 263(shadowFactor) + 342: 24(float) FAdd 341 340 + Store 263(shadowFactor) 342 + 343: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 17 344 344 12 12 + 345: 92(int) Load 269(count) + 346: 92(int) IAdd 345 279 + Store 269(count) 346 + Branch 313 + 313: Label + 347: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 23(DebugScope) 61 + 348: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 17 303 303 12 12 + 349: 92(int) Load 304(y) + 350: 92(int) IAdd 349 279 + Store 304(y) 350 + Branch 310 + 312: Label + Branch 291 + 291: Label + 351: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 23(DebugScope) 61 + 352: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 17 281 281 12 12 + 353: 92(int) Load 282(x) + 354: 92(int) IAdd 353 279 + Store 282(x) 354 + Branch 288 + 290: Label + 355: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 23(DebugScope) 61 + 356: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 17 357 357 12 12 + 358: 24(float) Load 263(shadowFactor) + 359: 92(int) Load 269(count) + 360: 24(float) ConvertSToF 359 + 361: 24(float) FDiv 358 360 + ReturnValue 361 + FunctionEnd + Line 1 99 41 +77(shadow(vf3;vf3;): 70(fvec3) Function None 73 + 75(fragcolor): 72(ptr) FunctionParameter + 76(fragpos): 72(ptr) FunctionParameter + 80: Label + 368(i): 244(ptr) Variable Function + 388(shadowClip): 29(ptr) Variable Function +436(shadowFactor): 30(ptr) Variable Function + 441(param): 29(ptr) Variable Function + 443(param): 30(ptr) Variable Function + 81: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 23(DebugScope) 79 + 82: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 17 12 12 12 12 + 85: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 28(DebugDeclare) 83 75(fragcolor) 48 + 88: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 28(DebugDeclare) 86 76(fragpos) 48 + 364: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 101(DebugFunctionDefinition) 79 77(shadow(vf3;vf3;) + 365: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 23(DebugScope) 79 + 366: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 17 367 367 12 12 + 371: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 28(DebugDeclare) 369 368(i) 48 + Store 368(i) 100 + Branch 372 + 372: Label + 376: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 23(DebugScope) 79 + 377: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 17 367 367 12 12 + LoopMerge 374 375 None + Branch 378 + 378: Label + 379: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 23(DebugScope) 79 + 380: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 17 367 367 12 12 + 381: 92(int) Load 368(i) + 384: 134(bool) SLessThan 381 382 + BranchConditional 384 373 374 + 373: Label + 385: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 23(DebugScope) 79 + 386: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 17 387 387 12 12 + 391: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 28(DebugDeclare) 389 388(shadowClip) 48 + 424: 92(int) Load 368(i) + 426: 425(ptr) AccessChain 421(ubo) 279 424 382 + 427: 392 Load 426 + 428: 70(fvec3) Load 76(fragpos) + 429: 24(float) CompositeExtract 428 0 + 430: 24(float) CompositeExtract 428 1 + 431: 24(float) CompositeExtract 428 2 + 432: 27(fvec4) CompositeConstruct 429 430 431 108 + 433: 27(fvec4) MatrixTimesVector 427 432 + Store 388(shadowClip) 433 + 434: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 17 435 435 12 12 + 438: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 28(DebugDeclare) 437 436(shadowFactor) 48 + 439: 92(int) Load 368(i) + 440: 24(float) ConvertSToF 439 + 442: 27(fvec4) Load 388(shadowClip) + Store 441(param) 442 + Store 443(param) 440 + 444: 24(float) FunctionCall 59(filterPCF(vf4;f1;) 441(param) 443(param) + Store 436(shadowFactor) 444 + 445: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 17 446 446 12 12 + 447: 24(float) Load 436(shadowFactor) + 448: 70(fvec3) Load 75(fragcolor) + 449: 70(fvec3) VectorTimesScalar 448 447 + Store 75(fragcolor) 449 + Branch 375 + 375: Label + 450: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 23(DebugScope) 79 + 451: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 17 367 367 12 12 + 452: 92(int) Load 368(i) + 453: 92(int) IAdd 452 279 + Store 368(i) 453 + Branch 372 + 374: Label + 454: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 23(DebugScope) 79 + 455: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 17 456 456 12 12 + 457: 70(fvec3) Load 75(fragcolor) + ReturnValue 457 + FunctionEnd diff --git a/Test/baseResults/spv.debuginfo.glsl.geom.out b/Test/baseResults/spv.debuginfo.glsl.geom.out new file mode 100644 index 0000000000..84b9807418 --- /dev/null +++ b/Test/baseResults/spv.debuginfo.glsl.geom.out @@ -0,0 +1,364 @@ +spv.debuginfo.glsl.geom +// Module Version 10000 +// Generated by (magic number): 8000b +// Id's are bound by 256 + + Capability Geometry + Capability MultiViewport + Extension "SPV_KHR_non_semantic_info" + 2: ExtInstImport "NonSemantic.Shader.DebugInfo.100" + 3: ExtInstImport "GLSL.std.450" + MemoryModel Logical GLSL450 + EntryPoint Geometry 14 "main" 62 94 113 123 126 157 196 205 222 234 240 243 + ExecutionMode 14 Triangles + ExecutionMode 14 Invocations 2 + ExecutionMode 14 OutputTriangleStrip + ExecutionMode 14 OutputVertices 3 + 1: String "" + 8: String "uint" + 15: String "main" + 18: String "// OpModuleProcessed auto-map-locations +// OpModuleProcessed auto-map-bindings +// OpModuleProcessed client vulkan100 +// OpModuleProcessed target-env vulkan1.0 +// OpModuleProcessed keep-uncalled +// OpModuleProcessed entry-point main +#line 1 +" + 29: String "int" + 34: String "i" + 50: String "bool" + 57: String "float" + 64: String "outNormal" + 77: String "projection" + 81: String "modelview" + 84: String "lightPos" + 87: String "UBO" + 91: String "ubo" + 96: String "gl_InvocationID" + 115: String "inNormal" + 125: String "outColor" + 128: String "inColor" + 137: String "pos" + 143: String "gl_Position" + 146: String "gl_PointSize" + 149: String "gl_CullDistance" + 153: String "gl_PerVertex" + 159: String "gl_in" + 168: String "worldPos" + 180: String "lPos" + 198: String "outLightVec" + 207: String "outViewVec" + 236: String "gl_ViewportIndex" + 242: String "gl_PrimitiveID" + 245: String "gl_PrimitiveIDIn" + SourceExtension "GL_ARB_viewport_array" + Name 14 "main" + Name 32 "i" + Name 62 "outNormal" + Name 75 "UBO" + MemberName 75(UBO) 0 "projection" + MemberName 75(UBO) 1 "modelview" + MemberName 75(UBO) 2 "lightPos" + Name 89 "ubo" + Name 94 "gl_InvocationID" + Name 113 "inNormal" + Name 123 "outColor" + Name 126 "inColor" + Name 135 "pos" + Name 141 "gl_PerVertex" + MemberName 141(gl_PerVertex) 0 "gl_Position" + MemberName 141(gl_PerVertex) 1 "gl_PointSize" + MemberName 141(gl_PerVertex) 2 "gl_ClipDistance" + MemberName 141(gl_PerVertex) 3 "gl_CullDistance" + Name 157 "gl_in" + Name 166 "worldPos" + Name 178 "lPos" + Name 196 "outLightVec" + Name 205 "outViewVec" + Name 213 "gl_PerVertex" + MemberName 213(gl_PerVertex) 0 "gl_Position" + MemberName 213(gl_PerVertex) 1 "gl_PointSize" + MemberName 213(gl_PerVertex) 2 "gl_ClipDistance" + MemberName 213(gl_PerVertex) 3 "gl_CullDistance" + Name 222 "" + Name 234 "gl_ViewportIndex" + Name 240 "gl_PrimitiveID" + Name 243 "gl_PrimitiveIDIn" + Decorate 62(outNormal) Location 0 + Decorate 71 ArrayStride 64 + Decorate 73 ArrayStride 64 + MemberDecorate 75(UBO) 0 ColMajor + MemberDecorate 75(UBO) 0 Offset 0 + MemberDecorate 75(UBO) 0 MatrixStride 16 + MemberDecorate 75(UBO) 1 ColMajor + MemberDecorate 75(UBO) 1 Offset 128 + MemberDecorate 75(UBO) 1 MatrixStride 16 + MemberDecorate 75(UBO) 2 Offset 256 + Decorate 75(UBO) Block + Decorate 89(ubo) DescriptorSet 0 + Decorate 89(ubo) Binding 0 + Decorate 94(gl_InvocationID) BuiltIn InvocationId + Decorate 113(inNormal) Location 0 + Decorate 123(outColor) Location 1 + Decorate 126(inColor) Location 1 + MemberDecorate 141(gl_PerVertex) 0 BuiltIn Position + MemberDecorate 141(gl_PerVertex) 1 BuiltIn PointSize + MemberDecorate 141(gl_PerVertex) 2 BuiltIn ClipDistance + MemberDecorate 141(gl_PerVertex) 3 BuiltIn CullDistance + Decorate 141(gl_PerVertex) Block + Decorate 196(outLightVec) Location 3 + Decorate 205(outViewVec) Location 2 + MemberDecorate 213(gl_PerVertex) 0 BuiltIn Position + MemberDecorate 213(gl_PerVertex) 1 BuiltIn PointSize + MemberDecorate 213(gl_PerVertex) 2 BuiltIn ClipDistance + MemberDecorate 213(gl_PerVertex) 3 BuiltIn CullDistance + Decorate 213(gl_PerVertex) Block + Decorate 234(gl_ViewportIndex) BuiltIn ViewportIndex + Decorate 240(gl_PrimitiveID) BuiltIn PrimitiveId + Decorate 243(gl_PrimitiveIDIn) BuiltIn PrimitiveId + 4: TypeVoid + 5: TypeFunction 4 + 7: TypeInt 32 0 + 10: 7(int) Constant 32 + 11: 7(int) Constant 6 + 12: 7(int) Constant 0 + 9: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 2(DebugTypeBasic) 8 10 11 12 + 13: 7(int) Constant 3 + 6: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 8(DebugTypeFunction) 13 4 + 17: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 35(DebugSource) 1 18 + 20: 7(int) Constant 1 + 21: 7(int) Constant 4 + 22: 7(int) Constant 2 + 19: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 1(DebugCompilationUnit) 20 21 17 22 + 16: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 20(DebugFunction) 15 6 17 12 12 19 15 13 12 + 27: 7(int) Constant 49 + 28: TypeInt 32 1 + 30: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 2(DebugTypeBasic) 29 10 21 12 + 31: TypePointer Function 28(int) + 33: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 26(DebugLocalVariable) 34 30 17 27 12 16 21 + 36: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 31(DebugExpression) + 37: 28(int) Constant 0 + 48: 28(int) Constant 3 + 49: TypeBool + 51: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 2(DebugTypeBasic) 50 10 22 12 + 55: 7(int) Constant 51 + 56: TypeFloat 32 + 58: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 2(DebugTypeBasic) 57 10 13 12 + 59: TypeVector 56(float) 3 + 60: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 6(DebugTypeVector) 58 13 + 61: TypePointer Output 59(fvec3) + 62(outNormal): 61(ptr) Variable Output + 65: 7(int) Constant 8 + 63: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 18(DebugGlobalVariable) 64 60 17 55 12 19 64 62(outNormal) 65 + 66: TypeVector 56(float) 4 + 67: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 6(DebugTypeVector) 58 21 + 68: TypeMatrix 66(fvec4) 4 + 70: 49(bool) ConstantTrue + 69: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 108(DebugTypeMatrix) 67 21 70 + 71: TypeArray 68 22 + 72: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 5(DebugTypeArray) 69 22 + 73: TypeArray 68 22 + 74: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 5(DebugTypeArray) 69 22 + 75(UBO): TypeStruct 71 73 66(fvec4) + 78: 7(int) Constant 34 + 79: 7(int) Constant 7 + 76: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 11(DebugTypeMember) 77 72 17 78 79 12 12 13 + 82: 7(int) Constant 35 + 80: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 11(DebugTypeMember) 81 74 17 82 79 12 12 13 + 85: 7(int) Constant 36 + 83: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 11(DebugTypeMember) 84 67 17 85 79 12 12 13 + 86: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 10(DebugTypeComposite) 87 20 17 55 12 19 87 12 13 76 80 83 + 88: TypePointer Uniform 75(UBO) + 89(ubo): 88(ptr) Variable Uniform + 90: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 18(DebugGlobalVariable) 91 86 17 55 12 19 91 89(ubo) 65 + 92: 28(int) Constant 1 + 93: TypePointer Input 28(int) +94(gl_InvocationID): 93(ptr) Variable Input + 95: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 18(DebugGlobalVariable) 96 30 17 55 12 19 96 94(gl_InvocationID) 65 + 98: TypePointer Uniform 68 + 101: TypeMatrix 59(fvec3) 3 + 102: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 108(DebugTypeMatrix) 60 13 70 + 110: TypeArray 59(fvec3) 13 + 111: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 5(DebugTypeArray) 60 13 + 112: TypePointer Input 110 + 113(inNormal): 112(ptr) Variable Input + 114: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 18(DebugGlobalVariable) 115 111 17 55 12 19 115 113(inNormal) 65 + 117: TypePointer Input 59(fvec3) + 122: 7(int) Constant 52 + 123(outColor): 61(ptr) Variable Output + 124: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 18(DebugGlobalVariable) 125 60 17 122 12 19 125 123(outColor) 65 + 126(inColor): 112(ptr) Variable Input + 127: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 18(DebugGlobalVariable) 128 111 17 122 12 19 128 126(inColor) 65 + 133: 7(int) Constant 54 + 134: TypePointer Function 66(fvec4) + 136: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 26(DebugLocalVariable) 137 67 17 133 12 16 21 + 139: TypeArray 56(float) 20 + 140: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 5(DebugTypeArray) 58 20 +141(gl_PerVertex): TypeStruct 66(fvec4) 56(float) 139 139 + 144: 7(int) Constant 23 + 142: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 11(DebugTypeMember) 143 67 17 22 144 12 12 13 + 147: 7(int) Constant 41 + 145: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 11(DebugTypeMember) 146 58 17 22 147 12 12 13 + 150: 7(int) Constant 84 + 148: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 11(DebugTypeMember) 149 140 17 22 150 12 12 13 + 151: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 11(DebugTypeMember) 149 140 17 22 150 12 12 13 + 152: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 10(DebugTypeComposite) 153 20 17 133 12 19 153 12 13 142 145 148 151 + 154: TypeArray 141(gl_PerVertex) 13 + 155: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 5(DebugTypeArray) 152 13 + 156: TypePointer Input 154 + 157(gl_in): 156(ptr) Variable Input + 158: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 18(DebugGlobalVariable) 159 155 17 133 12 19 159 157(gl_in) 65 + 161: TypePointer Input 66(fvec4) + 165: 7(int) Constant 55 + 167: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 26(DebugLocalVariable) 168 67 17 165 12 16 21 + 176: 7(int) Constant 57 + 177: TypePointer Function 59(fvec3) + 179: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 26(DebugLocalVariable) 180 60 17 176 12 16 21 + 185: 28(int) Constant 2 + 186: TypePointer Uniform 66(fvec4) + 195: 7(int) Constant 58 +196(outLightVec): 61(ptr) Variable Output + 197: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 18(DebugGlobalVariable) 198 60 17 195 12 19 198 196(outLightVec) 65 + 204: 7(int) Constant 59 + 205(outViewVec): 61(ptr) Variable Output + 206: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 18(DebugGlobalVariable) 207 60 17 204 12 19 207 205(outViewVec) 65 + 212: 7(int) Constant 61 +213(gl_PerVertex): TypeStruct 66(fvec4) 56(float) 139 139 + 215: 7(int) Constant 215 + 214: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 11(DebugTypeMember) 143 67 17 22 215 12 12 13 + 217: 7(int) Constant 233 + 216: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 11(DebugTypeMember) 146 58 17 22 217 12 12 13 + 218: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 11(DebugTypeMember) 149 140 17 13 79 12 12 13 + 219: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 11(DebugTypeMember) 149 140 17 13 79 12 12 13 + 220: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 10(DebugTypeComposite) 153 20 17 212 12 19 153 12 13 214 216 218 219 + 221: TypePointer Output 213(gl_PerVertex) + 222: 221(ptr) Variable Output + 223: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 18(DebugGlobalVariable) 1 220 17 212 12 19 1 222 65 + 229: TypePointer Output 66(fvec4) + 232: 7(int) Constant 64 + 233: TypePointer Output 28(int) +234(gl_ViewportIndex): 233(ptr) Variable Output + 235: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 18(DebugGlobalVariable) 236 30 17 232 12 19 236 234(gl_ViewportIndex) 65 + 239: 7(int) Constant 65 +240(gl_PrimitiveID): 233(ptr) Variable Output + 241: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 18(DebugGlobalVariable) 242 30 17 239 12 19 242 240(gl_PrimitiveID) 65 +243(gl_PrimitiveIDIn): 93(ptr) Variable Input + 244: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 18(DebugGlobalVariable) 245 30 17 239 12 19 245 243(gl_PrimitiveIDIn) 65 + 248: 7(int) Constant 66 + 255: 7(int) Constant 68 + Line 1 47 15 + 14(main): 4 Function None 5 + 23: Label + 32(i): 31(ptr) Variable Function + 135(pos): 134(ptr) Variable Function + 166(worldPos): 134(ptr) Variable Function + 178(lPos): 177(ptr) Variable Function + 24: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 101(DebugFunctionDefinition) 16 14(main) + 25: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 23(DebugScope) 16 + 26: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 17 27 27 12 12 + 35: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 28(DebugDeclare) 33 32(i) 36 + Store 32(i) 37 + Branch 38 + 38: Label + 42: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 23(DebugScope) 16 + 43: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 17 27 27 12 12 + LoopMerge 40 41 None + Branch 44 + 44: Label + 45: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 23(DebugScope) 16 + 46: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 17 27 27 12 12 + 47: 28(int) Load 32(i) + 52: 49(bool) SLessThan 47 48 + BranchConditional 52 39 40 + 39: Label + 53: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 23(DebugScope) 16 + 54: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 17 55 55 12 12 + 97: 28(int) Load 94(gl_InvocationID) + 99: 98(ptr) AccessChain 89(ubo) 92 97 + 100: 68 Load 99 + 103: 66(fvec4) CompositeExtract 100 0 + 104: 59(fvec3) VectorShuffle 103 103 0 1 2 + 105: 66(fvec4) CompositeExtract 100 1 + 106: 59(fvec3) VectorShuffle 105 105 0 1 2 + 107: 66(fvec4) CompositeExtract 100 2 + 108: 59(fvec3) VectorShuffle 107 107 0 1 2 + 109: 101 CompositeConstruct 104 106 108 + 116: 28(int) Load 32(i) + 118: 117(ptr) AccessChain 113(inNormal) 116 + 119: 59(fvec3) Load 118 + 120: 59(fvec3) MatrixTimesVector 109 119 + Store 62(outNormal) 120 + 121: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 17 122 122 12 12 + 129: 28(int) Load 32(i) + 130: 117(ptr) AccessChain 126(inColor) 129 + 131: 59(fvec3) Load 130 + Store 123(outColor) 131 + 132: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 17 133 133 12 12 + 138: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 28(DebugDeclare) 136 135(pos) 36 + 160: 28(int) Load 32(i) + 162: 161(ptr) AccessChain 157(gl_in) 160 37 + 163: 66(fvec4) Load 162 + Store 135(pos) 163 + 164: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 17 165 165 12 12 + 169: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 28(DebugDeclare) 167 166(worldPos) 36 + 170: 28(int) Load 94(gl_InvocationID) + 171: 98(ptr) AccessChain 89(ubo) 92 170 + 172: 68 Load 171 + 173: 66(fvec4) Load 135(pos) + 174: 66(fvec4) MatrixTimesVector 172 173 + Store 166(worldPos) 174 + 175: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 17 176 176 12 12 + 181: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 28(DebugDeclare) 179 178(lPos) 36 + 182: 28(int) Load 94(gl_InvocationID) + 183: 98(ptr) AccessChain 89(ubo) 92 182 + 184: 68 Load 183 + 187: 186(ptr) AccessChain 89(ubo) 185 + 188: 66(fvec4) Load 187 + 189: 66(fvec4) MatrixTimesVector 184 188 + 190: 56(float) CompositeExtract 189 0 + 191: 56(float) CompositeExtract 189 1 + 192: 56(float) CompositeExtract 189 2 + 193: 59(fvec3) CompositeConstruct 190 191 192 + Store 178(lPos) 193 + 194: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 17 195 195 12 12 + 199: 59(fvec3) Load 178(lPos) + 200: 66(fvec4) Load 166(worldPos) + 201: 59(fvec3) VectorShuffle 200 200 0 1 2 + 202: 59(fvec3) FSub 199 201 + Store 196(outLightVec) 202 + 203: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 17 204 204 12 12 + 208: 66(fvec4) Load 166(worldPos) + 209: 59(fvec3) VectorShuffle 208 208 0 1 2 + 210: 59(fvec3) FNegate 209 + Store 205(outViewVec) 210 + 211: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 17 212 212 12 12 + 224: 28(int) Load 94(gl_InvocationID) + 225: 98(ptr) AccessChain 89(ubo) 37 224 + 226: 68 Load 225 + 227: 66(fvec4) Load 166(worldPos) + 228: 66(fvec4) MatrixTimesVector 226 227 + 230: 229(ptr) AccessChain 222 37 + Store 230 228 + 231: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 17 232 232 12 12 + 237: 28(int) Load 94(gl_InvocationID) + Store 234(gl_ViewportIndex) 237 + 238: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 17 239 239 12 12 + 246: 28(int) Load 243(gl_PrimitiveIDIn) + Store 240(gl_PrimitiveID) 246 + 247: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 17 248 248 12 12 + EmitVertex + Branch 41 + 41: Label + 249: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 23(DebugScope) 16 + 250: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 17 27 27 12 12 + 251: 28(int) Load 32(i) + 252: 28(int) IAdd 251 92 + Store 32(i) 252 + Branch 38 + 40: Label + 253: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 23(DebugScope) 16 + 254: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 17 255 255 12 12 + EndPrimitive + Return + FunctionEnd diff --git a/Test/baseResults/spv.debuginfo.glsl.tesc.out b/Test/baseResults/spv.debuginfo.glsl.tesc.out new file mode 100644 index 0000000000..b19528cbca --- /dev/null +++ b/Test/baseResults/spv.debuginfo.glsl.tesc.out @@ -0,0 +1,713 @@ +spv.debuginfo.glsl.tesc +// Module Version 10000 +// Generated by (magic number): 8000b +// Id's are bound by 542 + + Capability Tessellation + Extension "SPV_KHR_non_semantic_info" + 2: ExtInstImport "NonSemantic.Shader.DebugInfo.100" + 3: ExtInstImport "GLSL.std.450" + MemoryModel Logical GLSL450 + EntryPoint TessellationControl 14 "main" 249 253 279 370 383 498 512 519 533 + ExecutionMode 14 OutputVertices 4 + 1: String "" + 8: String "uint" + 15: String "main" + 18: String "// OpModuleProcessed auto-map-locations +// OpModuleProcessed auto-map-bindings +// OpModuleProcessed client vulkan100 +// OpModuleProcessed target-env vulkan1.0 +// OpModuleProcessed keep-uncalled +// OpModuleProcessed entry-point main +#line 1 +" + 25: String "float" + 35: String "screenSpaceTessFactor" + 41: String "p0" + 45: String "p1" + 48: String "bool" + 53: String "frustumCheck" + 62: String "midPoint" + 74: String "radius" + 85: String "v0" + 96: String "modelview" + 101: String "lightPos" + 104: String "frustumPlanes" + 106: String "tessellatedEdgeSize" + 111: String "viewportDim" + 115: String "UBO" + 119: String "ubo" + 121: String "int" + 133: String "clip0" + 154: String "clip1" + 229: String "pos" + 235: String "gl_Position" + 238: String "gl_PointSize" + 241: String "gl_CullDistance" + 245: String "gl_PerVertex" + 251: String "gl_in" + 255: String "gl_InvocationID" + 264: String "type.2d.image" + 265: String "@type.2d.image" + 269: String "type.sampled.image" + 270: String "@type.sampled.image" + 274: String "samplerHeight" + 281: String "inUV" + 300: String "i" + 372: String "gl_TessLevelInner" + 385: String "gl_TessLevelOuter" + 500: String "gl_out" + 514: String "outNormal" + 521: String "inNormal" + 535: String "outUV" + Name 14 "main" + Name 34 "screenSpaceTessFactor(vf4;vf4;" + Name 32 "p0" + Name 33 "p1" + Name 52 "frustumCheck(" + Name 60 "midPoint" + Name 72 "radius" + Name 83 "v0" + Name 94 "UBO" + MemberName 94(UBO) 0 "projection" + MemberName 94(UBO) 1 "modelview" + MemberName 94(UBO) 2 "lightPos" + MemberName 94(UBO) 3 "frustumPlanes" + MemberName 94(UBO) 4 "displacementFactor" + MemberName 94(UBO) 5 "tessellationFactor" + MemberName 94(UBO) 6 "viewportDim" + MemberName 94(UBO) 7 "tessellatedEdgeSize" + Name 117 "ubo" + Name 131 "clip0" + Name 152 "clip1" + Name 227 "pos" + Name 233 "gl_PerVertex" + MemberName 233(gl_PerVertex) 0 "gl_Position" + MemberName 233(gl_PerVertex) 1 "gl_PointSize" + MemberName 233(gl_PerVertex) 2 "gl_ClipDistance" + MemberName 233(gl_PerVertex) 3 "gl_CullDistance" + Name 249 "gl_in" + Name 253 "gl_InvocationID" + Name 272 "samplerHeight" + Name 279 "inUV" + Name 298 "i" + Name 370 "gl_TessLevelInner" + Name 383 "gl_TessLevelOuter" + Name 410 "param" + Name 413 "param" + Name 420 "param" + Name 423 "param" + Name 430 "param" + Name 433 "param" + Name 440 "param" + Name 443 "param" + Name 487 "gl_PerVertex" + MemberName 487(gl_PerVertex) 0 "gl_Position" + MemberName 487(gl_PerVertex) 1 "gl_PointSize" + MemberName 487(gl_PerVertex) 2 "gl_ClipDistance" + MemberName 487(gl_PerVertex) 3 "gl_CullDistance" + Name 498 "gl_out" + Name 512 "outNormal" + Name 519 "inNormal" + Name 533 "outUV" + Decorate 90 ArrayStride 16 + MemberDecorate 94(UBO) 0 ColMajor + MemberDecorate 94(UBO) 0 Offset 0 + MemberDecorate 94(UBO) 0 MatrixStride 16 + MemberDecorate 94(UBO) 1 ColMajor + MemberDecorate 94(UBO) 1 Offset 64 + MemberDecorate 94(UBO) 1 MatrixStride 16 + MemberDecorate 94(UBO) 2 Offset 128 + MemberDecorate 94(UBO) 3 Offset 144 + MemberDecorate 94(UBO) 4 Offset 240 + MemberDecorate 94(UBO) 5 Offset 244 + MemberDecorate 94(UBO) 6 Offset 248 + MemberDecorate 94(UBO) 7 Offset 256 + Decorate 94(UBO) Block + Decorate 117(ubo) DescriptorSet 0 + Decorate 117(ubo) Binding 0 + MemberDecorate 233(gl_PerVertex) 0 BuiltIn Position + MemberDecorate 233(gl_PerVertex) 1 BuiltIn PointSize + MemberDecorate 233(gl_PerVertex) 2 BuiltIn ClipDistance + MemberDecorate 233(gl_PerVertex) 3 BuiltIn CullDistance + Decorate 233(gl_PerVertex) Block + Decorate 253(gl_InvocationID) BuiltIn InvocationId + Decorate 272(samplerHeight) DescriptorSet 0 + Decorate 272(samplerHeight) Binding 1 + Decorate 279(inUV) Location 1 + Decorate 370(gl_TessLevelInner) Patch + Decorate 370(gl_TessLevelInner) BuiltIn TessLevelInner + Decorate 383(gl_TessLevelOuter) Patch + Decorate 383(gl_TessLevelOuter) BuiltIn TessLevelOuter + MemberDecorate 487(gl_PerVertex) 0 BuiltIn Position + MemberDecorate 487(gl_PerVertex) 1 BuiltIn PointSize + MemberDecorate 487(gl_PerVertex) 2 BuiltIn ClipDistance + MemberDecorate 487(gl_PerVertex) 3 BuiltIn CullDistance + Decorate 487(gl_PerVertex) Block + Decorate 512(outNormal) Location 0 + Decorate 519(inNormal) Location 0 + Decorate 533(outUV) Location 1 + 4: TypeVoid + 5: TypeFunction 4 + 7: TypeInt 32 0 + 10: 7(int) Constant 32 + 11: 7(int) Constant 6 + 12: 7(int) Constant 0 + 9: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 2(DebugTypeBasic) 8 10 11 12 + 13: 7(int) Constant 3 + 6: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 8(DebugTypeFunction) 13 4 + 17: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 35(DebugSource) 1 18 + 20: 7(int) Constant 1 + 21: 7(int) Constant 4 + 22: 7(int) Constant 2 + 19: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 1(DebugCompilationUnit) 20 21 17 22 + 16: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 20(DebugFunction) 15 6 17 12 12 19 15 13 12 + 24: TypeFloat 32 + 26: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 2(DebugTypeBasic) 25 10 13 12 + 27: TypeVector 24(float) 4 + 28: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 6(DebugTypeVector) 26 21 + 29: TypePointer Function 27(fvec4) + 30: TypeFunction 24(float) 29(ptr) 29(ptr) + 31: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 8(DebugTypeFunction) 13 26 28 28 + 36: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 20(DebugFunction) 35 31 17 12 12 19 35 13 12 + 40: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 26(DebugLocalVariable) 41 28 17 12 12 36 21 20 + 43: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 31(DebugExpression) + 44: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 26(DebugLocalVariable) 45 28 17 12 12 36 21 22 + 47: TypeBool + 49: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 2(DebugTypeBasic) 48 10 22 12 + 50: TypeFunction 47(bool) + 51: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 8(DebugTypeFunction) 13 49 + 54: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 20(DebugFunction) 53 51 17 12 12 19 53 13 12 + 59: 7(int) Constant 54 + 61: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 26(DebugLocalVariable) 62 28 17 59 12 36 21 + 64: 24(float) Constant 1056964608 + 70: 7(int) Constant 56 + 71: TypePointer Function 24(float) + 73: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 26(DebugLocalVariable) 74 26 17 70 12 36 21 + 79: 24(float) Constant 1073741824 + 82: 7(int) Constant 59 + 84: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 26(DebugLocalVariable) 85 28 17 82 12 36 21 + 87: TypeMatrix 27(fvec4) 4 + 89: 47(bool) ConstantTrue + 88: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 108(DebugTypeMatrix) 28 21 89 + 90: TypeArray 27(fvec4) 11 + 91: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 5(DebugTypeArray) 28 11 + 92: TypeVector 24(float) 2 + 93: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 6(DebugTypeVector) 26 22 + 94(UBO): TypeStruct 87 87 27(fvec4) 90 24(float) 24(float) 92(fvec2) 24(float) + 97: 7(int) Constant 30 + 98: 7(int) Constant 7 + 95: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 11(DebugTypeMember) 96 88 17 97 98 12 12 13 + 99: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 11(DebugTypeMember) 96 88 17 97 98 12 12 13 + 102: 7(int) Constant 31 + 100: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 11(DebugTypeMember) 101 28 17 102 98 12 12 13 + 103: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 11(DebugTypeMember) 104 91 17 10 98 12 12 13 + 107: 7(int) Constant 36 + 108: 7(int) Constant 8 + 105: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 11(DebugTypeMember) 106 26 17 107 108 12 12 13 + 109: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 11(DebugTypeMember) 106 26 17 107 108 12 12 13 + 112: 7(int) Constant 35 + 110: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 11(DebugTypeMember) 111 93 17 112 98 12 12 13 + 113: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 11(DebugTypeMember) 106 26 17 107 108 12 12 13 + 114: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 10(DebugTypeComposite) 115 20 17 82 12 19 115 12 13 95 99 100 103 105 109 110 113 + 116: TypePointer Uniform 94(UBO) + 117(ubo): 116(ptr) Variable Uniform + 118: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 18(DebugGlobalVariable) 119 114 17 82 12 19 119 117(ubo) 108 + 120: TypeInt 32 1 + 122: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 2(DebugTypeBasic) 121 10 21 12 + 123: 120(int) Constant 1 + 124: TypePointer Uniform 87 + 130: 7(int) Constant 62 + 132: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 26(DebugLocalVariable) 133 28 17 130 12 36 21 + 135: 120(int) Constant 0 + 140: TypeVector 24(float) 3 + 141: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 6(DebugTypeVector) 26 13 + 142: 24(float) Constant 0 + 143: 140(fvec3) ConstantComposite 142 142 142 + 151: 7(int) Constant 63 + 153: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 26(DebugLocalVariable) 154 28 17 151 12 36 21 + 167: 7(int) Constant 66 + 174: 7(int) Constant 67 + 181: 7(int) Constant 70 + 182: 120(int) Constant 6 + 183: TypePointer Uniform 92(fvec2) + 194: 7(int) Constant 71 + 205: 7(int) Constant 76 + 209: 120(int) Constant 7 + 210: TypePointer Uniform 24(float) + 214: 120(int) Constant 5 + 218: 24(float) Constant 1065353216 + 219: 24(float) Constant 1115684864 + 226: 7(int) Constant 85 + 228: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 26(DebugLocalVariable) 229 28 17 226 12 54 21 + 231: TypeArray 24(float) 20 + 232: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 5(DebugTypeArray) 26 20 +233(gl_PerVertex): TypeStruct 27(fvec4) 24(float) 231 231 + 236: 7(int) Constant 1756 + 234: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 11(DebugTypeMember) 235 28 17 20 236 12 12 13 + 239: 7(int) Constant 1774 + 237: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 11(DebugTypeMember) 238 26 17 20 239 12 12 13 + 242: 7(int) Constant 1817 + 240: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 11(DebugTypeMember) 241 232 17 20 242 12 12 13 + 243: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 11(DebugTypeMember) 241 232 17 20 242 12 12 13 + 244: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 10(DebugTypeComposite) 245 20 17 226 12 19 245 12 13 234 237 240 243 + 246: TypeArray 233(gl_PerVertex) 10 + 247: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 5(DebugTypeArray) 244 10 + 248: TypePointer Input 246 + 249(gl_in): 248(ptr) Variable Input + 250: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 18(DebugGlobalVariable) 251 247 17 226 12 19 251 249(gl_in) 108 + 252: TypePointer Input 120(int) +253(gl_InvocationID): 252(ptr) Variable Input + 254: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 18(DebugGlobalVariable) 255 122 17 226 12 19 255 253(gl_InvocationID) 108 + 257: TypePointer Input 27(fvec4) + 261: 7(int) Constant 86 + 262: TypeImage 24(float) 2D sampled format:Unknown + 266: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 0(DebugInfoNone) + 263: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 10(DebugTypeComposite) 264 12 17 261 12 19 265 266 13 + 267: TypeSampledImage 262 + 268: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 10(DebugTypeComposite) 269 12 17 261 12 19 270 266 13 + 271: TypePointer UniformConstant 267 +272(samplerHeight): 271(ptr) Variable UniformConstant + 273: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 18(DebugGlobalVariable) 274 268 17 261 12 19 274 272(samplerHeight) 108 + 276: TypeArray 92(fvec2) 10 + 277: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 5(DebugTypeArray) 93 10 + 278: TypePointer Input 276 + 279(inUV): 278(ptr) Variable Input + 280: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 18(DebugGlobalVariable) 281 277 17 261 12 19 281 279(inUV) 108 + 282: TypePointer Input 92(fvec2) + 287: 120(int) Constant 4 + 296: 7(int) Constant 89 + 297: TypePointer Function 120(int) + 299: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 26(DebugLocalVariable) 300 122 17 296 12 54 21 + 312: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 2(DebugTypeBasic) 48 10 22 12 + 316: 7(int) Constant 90 + 318: 120(int) Constant 3 + 320: TypePointer Uniform 27(fvec4) + 324: 24(float) Constant 1090519040 + 326: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 2(DebugTypeBasic) 48 10 22 12 + 330: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 2(DebugTypeBasic) 48 10 22 12 + 331: 47(bool) ConstantFalse + 334: 7(int) Constant 92 + 340: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 2(DebugTypeBasic) 48 10 22 12 + 343: 7(int) Constant 95 + 349: 7(int) Constant 100 + 351: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 2(DebugTypeBasic) 48 10 22 12 + 357: 7(int) Constant 102 + 359: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 2(DebugTypeBasic) 48 10 22 12 + 360: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 2(DebugTypeBasic) 48 10 22 12 + 366: 7(int) Constant 104 + 367: TypeArray 24(float) 22 + 368: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 5(DebugTypeArray) 26 22 + 369: TypePointer Output 367 +370(gl_TessLevelInner): 369(ptr) Variable Output + 371: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 18(DebugGlobalVariable) 372 368 17 366 12 19 372 370(gl_TessLevelInner) 108 + 373: TypePointer Output 24(float) + 376: 7(int) Constant 105 + 379: 7(int) Constant 106 + 380: TypeArray 24(float) 21 + 381: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 5(DebugTypeArray) 26 21 + 382: TypePointer Output 380 +383(gl_TessLevelOuter): 382(ptr) Variable Output + 384: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 18(DebugGlobalVariable) 385 381 17 379 12 19 385 383(gl_TessLevelOuter) 108 + 388: 7(int) Constant 107 + 391: 7(int) Constant 108 + 392: 120(int) Constant 2 + 395: 7(int) Constant 109 + 400: 7(int) Constant 113 + 403: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 2(DebugTypeBasic) 48 10 22 12 + 409: 7(int) Constant 115 + 419: 7(int) Constant 116 + 429: 7(int) Constant 117 + 439: 7(int) Constant 118 + 449: 7(int) Constant 119 + 457: 7(int) Constant 120 + 467: 7(int) Constant 126 + 470: 7(int) Constant 127 + 473: 7(int) Constant 128 + 476: 7(int) Constant 129 + 479: 7(int) Constant 130 + 482: 7(int) Constant 131 + 486: 7(int) Constant 137 +487(gl_PerVertex): TypeStruct 27(fvec4) 24(float) 231 231 + 489: 7(int) Constant 110 + 488: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 11(DebugTypeMember) 235 28 17 20 489 12 12 13 + 490: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 11(DebugTypeMember) 238 26 17 20 473 12 12 13 + 492: 7(int) Constant 171 + 491: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 11(DebugTypeMember) 241 232 17 20 492 12 12 13 + 493: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 11(DebugTypeMember) 241 232 17 20 492 12 12 13 + 494: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 10(DebugTypeComposite) 245 20 17 486 12 19 245 12 13 488 490 491 493 + 495: TypeArray 487(gl_PerVertex) 21 + 496: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 5(DebugTypeArray) 494 21 + 497: TypePointer Output 495 + 498(gl_out): 497(ptr) Variable Output + 499: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 18(DebugGlobalVariable) 500 496 17 486 12 19 500 498(gl_out) 108 + 505: TypePointer Output 27(fvec4) + 508: 7(int) Constant 138 + 509: TypeArray 140(fvec3) 21 + 510: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 5(DebugTypeArray) 141 21 + 511: TypePointer Output 509 + 512(outNormal): 511(ptr) Variable Output + 513: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 18(DebugGlobalVariable) 514 510 17 508 12 19 514 512(outNormal) 108 + 516: TypeArray 140(fvec3) 10 + 517: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 5(DebugTypeArray) 141 10 + 518: TypePointer Input 516 + 519(inNormal): 518(ptr) Variable Input + 520: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 18(DebugGlobalVariable) 521 517 17 508 12 19 521 519(inNormal) 108 + 523: TypePointer Input 140(fvec3) + 526: TypePointer Output 140(fvec3) + 529: 7(int) Constant 139 + 530: TypeArray 92(fvec2) 21 + 531: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 5(DebugTypeArray) 93 21 + 532: TypePointer Output 530 + 533(outUV): 532(ptr) Variable Output + 534: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 18(DebugGlobalVariable) 535 531 17 529 12 19 535 533(outUV) 108 + 540: TypePointer Output 92(fvec2) + Line 1 98 11 + 14(main): 4 Function None 5 + 23: Label + 410(param): 29(ptr) Variable Function + 413(param): 29(ptr) Variable Function + 420(param): 29(ptr) Variable Function + 423(param): 29(ptr) Variable Function + 430(param): 29(ptr) Variable Function + 433(param): 29(ptr) Variable Function + 440(param): 29(ptr) Variable Function + 443(param): 29(ptr) Variable Function + 346: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 101(DebugFunctionDefinition) 16 14(main) + 347: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 23(DebugScope) 16 + 348: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 17 349 349 12 12 + 350: 120(int) Load 253(gl_InvocationID) + 352: 47(bool) IEqual 350 135 + SelectionMerge 354 None + BranchConditional 352 353 354 + 353: Label + 355: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 23(DebugScope) 16 + 356: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 17 357 357 12 12 + 358: 47(bool) FunctionCall 52(frustumCheck() + 361: 47(bool) LogicalNot 358 + SelectionMerge 363 None + BranchConditional 361 362 397 + 362: Label + 364: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 23(DebugScope) 16 + 365: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 17 366 366 12 12 + 374: 373(ptr) AccessChain 370(gl_TessLevelInner) 135 + Store 374 142 + 375: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 17 376 376 12 12 + 377: 373(ptr) AccessChain 370(gl_TessLevelInner) 123 + Store 377 142 + 378: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 17 379 379 12 12 + 386: 373(ptr) AccessChain 383(gl_TessLevelOuter) 135 + Store 386 142 + 387: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 17 388 388 12 12 + 389: 373(ptr) AccessChain 383(gl_TessLevelOuter) 123 + Store 389 142 + 390: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 17 391 391 12 12 + 393: 373(ptr) AccessChain 383(gl_TessLevelOuter) 392 + Store 393 142 + 394: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 17 395 395 12 12 + 396: 373(ptr) AccessChain 383(gl_TessLevelOuter) 318 + Store 396 142 + Branch 363 + 397: Label + 398: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 23(DebugScope) 16 + 399: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 17 400 400 12 12 + 401: 210(ptr) AccessChain 117(ubo) 214 + 402: 24(float) Load 401 + 404: 47(bool) FOrdGreaterThan 402 142 + SelectionMerge 406 None + BranchConditional 404 405 464 + 405: Label + 407: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 23(DebugScope) 16 + 408: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 17 409 409 12 12 + 411: 257(ptr) AccessChain 249(gl_in) 318 135 + 412: 27(fvec4) Load 411 + Store 410(param) 412 + 414: 257(ptr) AccessChain 249(gl_in) 135 135 + 415: 27(fvec4) Load 414 + Store 413(param) 415 + 416: 24(float) FunctionCall 34(screenSpaceTessFactor(vf4;vf4;) 410(param) 413(param) + 417: 373(ptr) AccessChain 383(gl_TessLevelOuter) 135 + Store 417 416 + 418: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 17 419 419 12 12 + 421: 257(ptr) AccessChain 249(gl_in) 135 135 + 422: 27(fvec4) Load 421 + Store 420(param) 422 + 424: 257(ptr) AccessChain 249(gl_in) 123 135 + 425: 27(fvec4) Load 424 + Store 423(param) 425 + 426: 24(float) FunctionCall 34(screenSpaceTessFactor(vf4;vf4;) 420(param) 423(param) + 427: 373(ptr) AccessChain 383(gl_TessLevelOuter) 123 + Store 427 426 + 428: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 17 429 429 12 12 + 431: 257(ptr) AccessChain 249(gl_in) 123 135 + 432: 27(fvec4) Load 431 + Store 430(param) 432 + 434: 257(ptr) AccessChain 249(gl_in) 392 135 + 435: 27(fvec4) Load 434 + Store 433(param) 435 + 436: 24(float) FunctionCall 34(screenSpaceTessFactor(vf4;vf4;) 430(param) 433(param) + 437: 373(ptr) AccessChain 383(gl_TessLevelOuter) 392 + Store 437 436 + 438: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 17 439 439 12 12 + 441: 257(ptr) AccessChain 249(gl_in) 392 135 + 442: 27(fvec4) Load 441 + Store 440(param) 442 + 444: 257(ptr) AccessChain 249(gl_in) 318 135 + 445: 27(fvec4) Load 444 + Store 443(param) 445 + 446: 24(float) FunctionCall 34(screenSpaceTessFactor(vf4;vf4;) 440(param) 443(param) + 447: 373(ptr) AccessChain 383(gl_TessLevelOuter) 318 + Store 447 446 + 448: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 17 449 449 12 12 + 450: 373(ptr) AccessChain 383(gl_TessLevelOuter) 135 + 451: 24(float) Load 450 + 452: 373(ptr) AccessChain 383(gl_TessLevelOuter) 318 + 453: 24(float) Load 452 + 454: 24(float) ExtInst 3(GLSL.std.450) 46(FMix) 451 453 64 + 455: 373(ptr) AccessChain 370(gl_TessLevelInner) 135 + Store 455 454 + 456: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 17 457 457 12 12 + 458: 373(ptr) AccessChain 383(gl_TessLevelOuter) 392 + 459: 24(float) Load 458 + 460: 373(ptr) AccessChain 383(gl_TessLevelOuter) 123 + 461: 24(float) Load 460 + 462: 24(float) ExtInst 3(GLSL.std.450) 46(FMix) 459 461 64 + 463: 373(ptr) AccessChain 370(gl_TessLevelInner) 123 + Store 463 462 + Branch 406 + 464: Label + 465: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 23(DebugScope) 16 + 466: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 17 467 467 12 12 + 468: 373(ptr) AccessChain 370(gl_TessLevelInner) 135 + Store 468 218 + 469: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 17 470 470 12 12 + 471: 373(ptr) AccessChain 370(gl_TessLevelInner) 123 + Store 471 218 + 472: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 17 473 473 12 12 + 474: 373(ptr) AccessChain 383(gl_TessLevelOuter) 135 + Store 474 218 + 475: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 17 476 476 12 12 + 477: 373(ptr) AccessChain 383(gl_TessLevelOuter) 123 + Store 477 218 + 478: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 17 479 479 12 12 + 480: 373(ptr) AccessChain 383(gl_TessLevelOuter) 392 + Store 480 218 + 481: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 17 482 482 12 12 + 483: 373(ptr) AccessChain 383(gl_TessLevelOuter) 318 + Store 483 218 + Branch 406 + 406: Label + Branch 363 + 363: Label + Branch 354 + 354: Label + 484: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 23(DebugScope) 16 + 485: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 17 486 486 12 12 + 501: 120(int) Load 253(gl_InvocationID) + 502: 120(int) Load 253(gl_InvocationID) + 503: 257(ptr) AccessChain 249(gl_in) 502 135 + 504: 27(fvec4) Load 503 + 506: 505(ptr) AccessChain 498(gl_out) 501 135 + Store 506 504 + 507: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 17 508 508 12 12 + 515: 120(int) Load 253(gl_InvocationID) + 522: 120(int) Load 253(gl_InvocationID) + 524: 523(ptr) AccessChain 519(inNormal) 522 + 525: 140(fvec3) Load 524 + 527: 526(ptr) AccessChain 512(outNormal) 515 + Store 527 525 + 528: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 17 529 529 12 12 + 536: 120(int) Load 253(gl_InvocationID) + 537: 120(int) Load 253(gl_InvocationID) + 538: 282(ptr) AccessChain 279(inUV) 537 + 539: 92(fvec2) Load 538 + 541: 540(ptr) AccessChain 533(outUV) 536 + Store 541 539 + Return + FunctionEnd + Line 1 51 45 +34(screenSpaceTessFactor(vf4;vf4;): 24(float) Function None 30 + 32(p0): 29(ptr) FunctionParameter + 33(p1): 29(ptr) FunctionParameter + 37: Label + 60(midPoint): 29(ptr) Variable Function + 72(radius): 71(ptr) Variable Function + 83(v0): 29(ptr) Variable Function + 131(clip0): 29(ptr) Variable Function + 152(clip1): 29(ptr) Variable Function + 38: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 23(DebugScope) 36 + 39: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 17 12 12 12 12 + 42: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 28(DebugDeclare) 40 32(p0) 43 + 46: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 28(DebugDeclare) 44 33(p1) 43 + 56: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 101(DebugFunctionDefinition) 36 34(screenSpaceTessFactor(vf4;vf4;) + 57: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 23(DebugScope) 36 + 58: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 17 59 59 12 12 + 63: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 28(DebugDeclare) 61 60(midPoint) 43 + 65: 27(fvec4) Load 32(p0) + 66: 27(fvec4) Load 33(p1) + 67: 27(fvec4) FAdd 65 66 + 68: 27(fvec4) VectorTimesScalar 67 64 + Store 60(midPoint) 68 + 69: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 17 70 70 12 12 + 75: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 28(DebugDeclare) 73 72(radius) 43 + 76: 27(fvec4) Load 32(p0) + 77: 27(fvec4) Load 33(p1) + 78: 24(float) ExtInst 3(GLSL.std.450) 67(Distance) 76 77 + 80: 24(float) FDiv 78 79 + Store 72(radius) 80 + 81: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 17 82 82 12 12 + 86: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 28(DebugDeclare) 84 83(v0) 43 + 125: 124(ptr) AccessChain 117(ubo) 123 + 126: 87 Load 125 + 127: 27(fvec4) Load 60(midPoint) + 128: 27(fvec4) MatrixTimesVector 126 127 + Store 83(v0) 128 + 129: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 17 130 130 12 12 + 134: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 28(DebugDeclare) 132 131(clip0) 43 + 136: 124(ptr) AccessChain 117(ubo) 135 + 137: 87 Load 136 + 138: 27(fvec4) Load 83(v0) + 139: 24(float) Load 72(radius) + 144: 24(float) CompositeExtract 143 0 + 145: 24(float) CompositeExtract 143 1 + 146: 24(float) CompositeExtract 143 2 + 147: 27(fvec4) CompositeConstruct 139 144 145 146 + 148: 27(fvec4) FSub 138 147 + 149: 27(fvec4) MatrixTimesVector 137 148 + Store 131(clip0) 149 + 150: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 17 151 151 12 12 + 155: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 28(DebugDeclare) 153 152(clip1) 43 + 156: 124(ptr) AccessChain 117(ubo) 135 + 157: 87 Load 156 + 158: 27(fvec4) Load 83(v0) + 159: 24(float) Load 72(radius) + 160: 24(float) CompositeExtract 143 0 + 161: 24(float) CompositeExtract 143 1 + 162: 24(float) CompositeExtract 143 2 + 163: 27(fvec4) CompositeConstruct 159 160 161 162 + 164: 27(fvec4) FAdd 158 163 + 165: 27(fvec4) MatrixTimesVector 157 164 + Store 152(clip1) 165 + 166: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 17 167 167 12 12 + 168: 71(ptr) AccessChain 131(clip0) 13 + 169: 24(float) Load 168 + 170: 27(fvec4) Load 131(clip0) + 171: 27(fvec4) CompositeConstruct 169 169 169 169 + 172: 27(fvec4) FDiv 170 171 + Store 131(clip0) 172 + 173: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 17 174 174 12 12 + 175: 71(ptr) AccessChain 152(clip1) 13 + 176: 24(float) Load 175 + 177: 27(fvec4) Load 152(clip1) + 178: 27(fvec4) CompositeConstruct 176 176 176 176 + 179: 27(fvec4) FDiv 177 178 + Store 152(clip1) 179 + 180: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 17 181 181 12 12 + 184: 183(ptr) AccessChain 117(ubo) 182 + 185: 92(fvec2) Load 184 + 186: 27(fvec4) Load 131(clip0) + 187: 92(fvec2) VectorShuffle 186 186 0 1 + 188: 92(fvec2) FMul 187 185 + 189: 71(ptr) AccessChain 131(clip0) 12 + 190: 24(float) CompositeExtract 188 0 + Store 189 190 + 191: 71(ptr) AccessChain 131(clip0) 20 + 192: 24(float) CompositeExtract 188 1 + Store 191 192 + 193: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 17 194 194 12 12 + 195: 183(ptr) AccessChain 117(ubo) 182 + 196: 92(fvec2) Load 195 + 197: 27(fvec4) Load 152(clip1) + 198: 92(fvec2) VectorShuffle 197 197 0 1 + 199: 92(fvec2) FMul 198 196 + 200: 71(ptr) AccessChain 152(clip1) 12 + 201: 24(float) CompositeExtract 199 0 + Store 200 201 + 202: 71(ptr) AccessChain 152(clip1) 20 + 203: 24(float) CompositeExtract 199 1 + Store 202 203 + 204: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 17 205 205 12 12 + 206: 27(fvec4) Load 131(clip0) + 207: 27(fvec4) Load 152(clip1) + 208: 24(float) ExtInst 3(GLSL.std.450) 67(Distance) 206 207 + 211: 210(ptr) AccessChain 117(ubo) 209 + 212: 24(float) Load 211 + 213: 24(float) FDiv 208 212 + 215: 210(ptr) AccessChain 117(ubo) 214 + 216: 24(float) Load 215 + 217: 24(float) FMul 213 216 + 220: 24(float) ExtInst 3(GLSL.std.450) 43(FClamp) 217 218 219 + ReturnValue 220 + FunctionEnd + Line 1 81 19 +52(frustumCheck(): 47(bool) Function None 50 + 55: Label + 227(pos): 29(ptr) Variable Function + 298(i): 297(ptr) Variable Function + 223: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 101(DebugFunctionDefinition) 54 52(frustumCheck() + 224: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 23(DebugScope) 54 + 225: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 17 226 226 12 12 + 230: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 28(DebugDeclare) 228 227(pos) 43 + 256: 120(int) Load 253(gl_InvocationID) + 258: 257(ptr) AccessChain 249(gl_in) 256 135 + 259: 27(fvec4) Load 258 + Store 227(pos) 259 + 260: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 17 261 261 12 12 + 275: 267 Load 272(samplerHeight) + 283: 282(ptr) AccessChain 279(inUV) 135 + 284: 92(fvec2) Load 283 + 285: 27(fvec4) ImageSampleExplicitLod 275 284 Lod 142 + 286: 24(float) CompositeExtract 285 0 + 288: 210(ptr) AccessChain 117(ubo) 287 + 289: 24(float) Load 288 + 290: 24(float) FMul 286 289 + 291: 71(ptr) AccessChain 227(pos) 20 + 292: 24(float) Load 291 + 293: 24(float) FSub 292 290 + 294: 71(ptr) AccessChain 227(pos) 20 + Store 294 293 + 295: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 17 296 296 12 12 + 301: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 28(DebugDeclare) 299 298(i) 43 + Store 298(i) 135 + Branch 302 + 302: Label + 306: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 23(DebugScope) 54 + 307: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 17 296 296 12 12 + LoopMerge 304 305 None + Branch 308 + 308: Label + 309: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 23(DebugScope) 54 + 310: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 17 296 296 12 12 + 311: 120(int) Load 298(i) + 313: 47(bool) SLessThan 311 182 + BranchConditional 313 303 304 + 303: Label + 314: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 23(DebugScope) 54 + 315: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 17 316 316 12 12 + 317: 27(fvec4) Load 227(pos) + 319: 120(int) Load 298(i) + 321: 320(ptr) AccessChain 117(ubo) 318 319 + 322: 27(fvec4) Load 321 + 323: 24(float) Dot 317 322 + 325: 24(float) FAdd 323 324 + 327: 47(bool) FOrdLessThan 325 142 + SelectionMerge 329 None + BranchConditional 327 328 329 + 328: Label + 332: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 23(DebugScope) 54 + 333: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 17 334 334 12 12 + ReturnValue 331 + 329: Label + Branch 305 + 305: Label + 336: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 23(DebugScope) 54 + 337: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 17 296 296 12 12 + 338: 120(int) Load 298(i) + 339: 120(int) IAdd 338 123 + Store 298(i) 339 + Branch 302 + 304: Label + 341: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 23(DebugScope) 54 + 342: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 17 343 343 12 12 + ReturnValue 89 + FunctionEnd diff --git a/Test/baseResults/spv.debuginfo.glsl.tese.out b/Test/baseResults/spv.debuginfo.glsl.tese.out new file mode 100644 index 0000000000..fdb1ee9825 --- /dev/null +++ b/Test/baseResults/spv.debuginfo.glsl.tese.out @@ -0,0 +1,445 @@ +spv.debuginfo.glsl.tese +// Module Version 10000 +// Generated by (magic number): 8000b +// Id's are bound by 332 + + Capability Tessellation + Extension "SPV_KHR_non_semantic_info" + 2: ExtInstImport "NonSemantic.Shader.DebugInfo.100" + 3: ExtInstImport "GLSL.std.450" + MemoryModel Logical GLSL450 + EntryPoint TessellationEvaluation 14 "main" 42 59 86 105 133 169 280 294 302 314 321 + ExecutionMode 14 Quads + ExecutionMode 14 SpacingEqual + ExecutionMode 14 VertexOrderCw + 1: String "" + 8: String "uint" + 15: String "main" + 18: String "// OpModuleProcessed auto-map-locations +// OpModuleProcessed auto-map-bindings +// OpModuleProcessed client vulkan100 +// OpModuleProcessed target-env vulkan1.0 +// OpModuleProcessed keep-uncalled +// OpModuleProcessed entry-point main +#line 1 +" + 29: String "float" + 36: String "uv1" + 44: String "inUV" + 47: String "int" + 61: String "gl_TessCoord" + 71: String "uv2" + 88: String "outUV" + 100: String "n1" + 107: String "inNormal" + 120: String "n2" + 135: String "outNormal" + 149: String "pos1" + 155: String "gl_Position" + 158: String "gl_PointSize" + 161: String "gl_CullDistance" + 165: String "gl_PerVertex" + 171: String "gl_in" + 185: String "pos2" + 199: String "pos" + 211: String "type.2d.image" + 212: String "@type.2d.image" + 216: String "type.sampled.image" + 217: String "@type.sampled.image" + 221: String "displacementMap" + 235: String "modelview" + 240: String "lightPos" + 243: String "frustumPlanes" + 245: String "tessellatedEdgeSize" + 249: String "viewportDim" + 253: String "UBO" + 257: String "ubo" + 296: String "outViewVec" + 304: String "outLightVec" + 316: String "outWorldPos" + 323: String "outEyePos" + Name 14 "main" + Name 34 "uv1" + Name 42 "inUV" + Name 59 "gl_TessCoord" + Name 69 "uv2" + Name 86 "outUV" + Name 98 "n1" + Name 105 "inNormal" + Name 118 "n2" + Name 133 "outNormal" + Name 147 "pos1" + Name 153 "gl_PerVertex" + MemberName 153(gl_PerVertex) 0 "gl_Position" + MemberName 153(gl_PerVertex) 1 "gl_PointSize" + MemberName 153(gl_PerVertex) 2 "gl_ClipDistance" + MemberName 153(gl_PerVertex) 3 "gl_CullDistance" + Name 169 "gl_in" + Name 183 "pos2" + Name 197 "pos" + Name 219 "displacementMap" + Name 233 "UBO" + MemberName 233(UBO) 0 "projection" + MemberName 233(UBO) 1 "modelview" + MemberName 233(UBO) 2 "lightPos" + MemberName 233(UBO) 3 "frustumPlanes" + MemberName 233(UBO) 4 "displacementFactor" + MemberName 233(UBO) 5 "tessellationFactor" + MemberName 233(UBO) 6 "viewportDim" + MemberName 233(UBO) 7 "tessellatedEdgeSize" + Name 255 "ubo" + Name 270 "gl_PerVertex" + MemberName 270(gl_PerVertex) 0 "gl_Position" + MemberName 270(gl_PerVertex) 1 "gl_PointSize" + MemberName 270(gl_PerVertex) 2 "gl_ClipDistance" + MemberName 270(gl_PerVertex) 3 "gl_CullDistance" + Name 280 "" + Name 294 "outViewVec" + Name 302 "outLightVec" + Name 314 "outWorldPos" + Name 321 "outEyePos" + Decorate 42(inUV) Location 1 + Decorate 59(gl_TessCoord) BuiltIn TessCoord + Decorate 86(outUV) Location 1 + Decorate 105(inNormal) Location 0 + Decorate 133(outNormal) Location 0 + MemberDecorate 153(gl_PerVertex) 0 BuiltIn Position + MemberDecorate 153(gl_PerVertex) 1 BuiltIn PointSize + MemberDecorate 153(gl_PerVertex) 2 BuiltIn ClipDistance + MemberDecorate 153(gl_PerVertex) 3 BuiltIn CullDistance + Decorate 153(gl_PerVertex) Block + Decorate 219(displacementMap) DescriptorSet 0 + Decorate 219(displacementMap) Binding 1 + Decorate 231 ArrayStride 16 + MemberDecorate 233(UBO) 0 ColMajor + MemberDecorate 233(UBO) 0 Offset 0 + MemberDecorate 233(UBO) 0 MatrixStride 16 + MemberDecorate 233(UBO) 1 ColMajor + MemberDecorate 233(UBO) 1 Offset 64 + MemberDecorate 233(UBO) 1 MatrixStride 16 + MemberDecorate 233(UBO) 2 Offset 128 + MemberDecorate 233(UBO) 3 Offset 144 + MemberDecorate 233(UBO) 4 Offset 240 + MemberDecorate 233(UBO) 5 Offset 244 + MemberDecorate 233(UBO) 6 Offset 248 + MemberDecorate 233(UBO) 7 Offset 256 + Decorate 233(UBO) Block + Decorate 255(ubo) DescriptorSet 0 + Decorate 255(ubo) Binding 0 + MemberDecorate 270(gl_PerVertex) 0 BuiltIn Position + MemberDecorate 270(gl_PerVertex) 1 BuiltIn PointSize + MemberDecorate 270(gl_PerVertex) 2 BuiltIn ClipDistance + MemberDecorate 270(gl_PerVertex) 3 BuiltIn CullDistance + Decorate 270(gl_PerVertex) Block + Decorate 294(outViewVec) Location 2 + Decorate 302(outLightVec) Location 3 + Decorate 314(outWorldPos) Location 5 + Decorate 321(outEyePos) Location 4 + 4: TypeVoid + 5: TypeFunction 4 + 7: TypeInt 32 0 + 10: 7(int) Constant 32 + 11: 7(int) Constant 6 + 12: 7(int) Constant 0 + 9: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 2(DebugTypeBasic) 8 10 11 12 + 13: 7(int) Constant 3 + 6: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 8(DebugTypeFunction) 13 4 + 17: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 35(DebugSource) 1 18 + 20: 7(int) Constant 1 + 21: 7(int) Constant 4 + 22: 7(int) Constant 2 + 19: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 1(DebugCompilationUnit) 20 21 17 22 + 16: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 20(DebugFunction) 15 6 17 12 12 19 15 13 12 + 27: 7(int) Constant 56 + 28: TypeFloat 32 + 30: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 2(DebugTypeBasic) 29 10 13 12 + 31: TypeVector 28(float) 2 + 32: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 6(DebugTypeVector) 30 22 + 33: TypePointer Function 31(fvec2) + 35: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 26(DebugLocalVariable) 36 32 17 27 12 16 21 + 38: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 31(DebugExpression) + 39: TypeArray 31(fvec2) 10 + 40: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 5(DebugTypeArray) 32 10 + 41: TypePointer Input 39 + 42(inUV): 41(ptr) Variable Input + 45: 7(int) Constant 8 + 43: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 18(DebugGlobalVariable) 44 40 17 27 12 19 44 42(inUV) 45 + 46: TypeInt 32 1 + 48: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 2(DebugTypeBasic) 47 10 21 12 + 49: 46(int) Constant 0 + 50: TypePointer Input 31(fvec2) + 53: 46(int) Constant 1 + 56: TypeVector 28(float) 3 + 57: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 6(DebugTypeVector) 30 13 + 58: TypePointer Input 56(fvec3) +59(gl_TessCoord): 58(ptr) Variable Input + 60: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 18(DebugGlobalVariable) 61 57 17 27 12 19 61 59(gl_TessCoord) 45 + 62: TypePointer Input 28(float) + 68: 7(int) Constant 57 + 70: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 26(DebugLocalVariable) 71 32 17 68 12 16 21 + 73: 46(int) Constant 3 + 76: 46(int) Constant 2 + 84: 7(int) Constant 58 + 85: TypePointer Output 31(fvec2) + 86(outUV): 85(ptr) Variable Output + 87: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 18(DebugGlobalVariable) 88 32 17 84 12 19 88 86(outUV) 45 + 96: 7(int) Constant 60 + 97: TypePointer Function 56(fvec3) + 99: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 26(DebugLocalVariable) 100 57 17 96 12 16 21 + 102: TypeArray 56(fvec3) 10 + 103: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 5(DebugTypeArray) 57 10 + 104: TypePointer Input 102 + 105(inNormal): 104(ptr) Variable Input + 106: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 18(DebugGlobalVariable) 107 103 17 96 12 19 107 105(inNormal) 45 + 117: 7(int) Constant 61 + 119: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 26(DebugLocalVariable) 120 57 17 117 12 16 21 + 131: 7(int) Constant 62 + 132: TypePointer Output 56(fvec3) + 133(outNormal): 132(ptr) Variable Output + 134: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 18(DebugGlobalVariable) 135 57 17 131 12 19 135 133(outNormal) 45 + 143: 7(int) Constant 65 + 144: TypeVector 28(float) 4 + 145: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 6(DebugTypeVector) 30 21 + 146: TypePointer Function 144(fvec4) + 148: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 26(DebugLocalVariable) 149 145 17 143 12 16 21 + 151: TypeArray 28(float) 20 + 152: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 5(DebugTypeArray) 30 20 +153(gl_PerVertex): TypeStruct 144(fvec4) 28(float) 151 151 + 156: 7(int) Constant 1756 + 154: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 11(DebugTypeMember) 155 145 17 20 156 12 12 13 + 159: 7(int) Constant 1774 + 157: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 11(DebugTypeMember) 158 30 17 20 159 12 12 13 + 162: 7(int) Constant 1817 + 160: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 11(DebugTypeMember) 161 152 17 20 162 12 12 13 + 163: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 11(DebugTypeMember) 161 152 17 20 162 12 12 13 + 164: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 10(DebugTypeComposite) 165 20 17 143 12 19 165 12 13 154 157 160 163 + 166: TypeArray 153(gl_PerVertex) 10 + 167: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 5(DebugTypeArray) 164 10 + 168: TypePointer Input 166 + 169(gl_in): 168(ptr) Variable Input + 170: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 18(DebugGlobalVariable) 171 167 17 143 12 19 171 169(gl_in) 45 + 172: TypePointer Input 144(fvec4) + 182: 7(int) Constant 66 + 184: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 26(DebugLocalVariable) 185 145 17 182 12 16 21 + 196: 7(int) Constant 67 + 198: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 26(DebugLocalVariable) 199 145 17 196 12 16 21 + 208: 7(int) Constant 69 + 209: TypeImage 28(float) 2D sampled format:Unknown + 213: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 0(DebugInfoNone) + 210: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 10(DebugTypeComposite) 211 12 17 208 12 19 212 213 13 + 214: TypeSampledImage 209 + 215: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 10(DebugTypeComposite) 216 12 17 208 12 19 217 213 13 + 218: TypePointer UniformConstant 214 +219(displacementMap): 218(ptr) Variable UniformConstant + 220: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 18(DebugGlobalVariable) 221 215 17 208 12 19 221 219(displacementMap) 45 + 224: 28(float) Constant 0 + 227: TypeMatrix 144(fvec4) 4 + 229: TypeBool + 230: 229(bool) ConstantTrue + 228: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 108(DebugTypeMatrix) 145 21 230 + 231: TypeArray 144(fvec4) 11 + 232: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 5(DebugTypeArray) 145 11 + 233(UBO): TypeStruct 227 227 144(fvec4) 231 28(float) 28(float) 31(fvec2) 28(float) + 236: 7(int) Constant 30 + 237: 7(int) Constant 7 + 234: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 11(DebugTypeMember) 235 228 17 236 237 12 12 13 + 238: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 11(DebugTypeMember) 235 228 17 236 237 12 12 13 + 241: 7(int) Constant 31 + 239: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 11(DebugTypeMember) 240 145 17 241 237 12 12 13 + 242: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 11(DebugTypeMember) 243 232 17 10 237 12 12 13 + 246: 7(int) Constant 36 + 244: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 11(DebugTypeMember) 245 30 17 246 45 12 12 13 + 247: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 11(DebugTypeMember) 245 30 17 246 45 12 12 13 + 250: 7(int) Constant 35 + 248: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 11(DebugTypeMember) 249 32 17 250 237 12 12 13 + 251: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 11(DebugTypeMember) 245 30 17 246 45 12 12 13 + 252: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 10(DebugTypeComposite) 253 20 17 208 12 19 253 12 13 234 238 239 242 244 247 248 251 + 254: TypePointer Uniform 233(UBO) + 255(ubo): 254(ptr) Variable Uniform + 256: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 18(DebugGlobalVariable) 257 252 17 208 12 19 257 255(ubo) 45 + 258: 46(int) Constant 4 + 259: TypePointer Uniform 28(float) + 263: TypePointer Function 28(float) + 269: 7(int) Constant 71 +270(gl_PerVertex): TypeStruct 144(fvec4) 28(float) 151 151 + 272: 7(int) Constant 165 + 271: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 11(DebugTypeMember) 155 145 17 20 272 12 12 13 + 274: 7(int) Constant 183 + 273: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 11(DebugTypeMember) 158 30 17 20 274 12 12 13 + 276: 7(int) Constant 226 + 275: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 11(DebugTypeMember) 161 152 17 20 276 12 12 13 + 277: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 11(DebugTypeMember) 161 152 17 20 276 12 12 13 + 278: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 10(DebugTypeComposite) 165 20 17 269 12 19 165 12 13 271 273 275 277 + 279: TypePointer Output 270(gl_PerVertex) + 280: 279(ptr) Variable Output + 281: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 18(DebugGlobalVariable) 1 278 17 269 12 19 1 280 45 + 282: TypePointer Uniform 227 + 290: TypePointer Output 144(fvec4) + 293: 7(int) Constant 74 + 294(outViewVec): 132(ptr) Variable Output + 295: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 18(DebugGlobalVariable) 296 57 17 293 12 19 296 294(outViewVec) 45 + 301: 7(int) Constant 75 +302(outLightVec): 132(ptr) Variable Output + 303: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 18(DebugGlobalVariable) 304 57 17 301 12 19 304 302(outLightVec) 45 + 305: TypePointer Uniform 144(fvec4) + 313: 7(int) Constant 76 +314(outWorldPos): 132(ptr) Variable Output + 315: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 18(DebugGlobalVariable) 316 57 17 313 12 19 316 314(outWorldPos) 45 + 320: 7(int) Constant 77 + 321(outEyePos): 132(ptr) Variable Output + 322: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 18(DebugGlobalVariable) 323 57 17 320 12 19 323 321(outEyePos) 45 + Line 1 53 11 + 14(main): 4 Function None 5 + 23: Label + 34(uv1): 33(ptr) Variable Function + 69(uv2): 33(ptr) Variable Function + 98(n1): 97(ptr) Variable Function + 118(n2): 97(ptr) Variable Function + 147(pos1): 146(ptr) Variable Function + 183(pos2): 146(ptr) Variable Function + 197(pos): 146(ptr) Variable Function + 24: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 101(DebugFunctionDefinition) 16 14(main) + 25: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 23(DebugScope) 16 + 26: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 17 27 27 12 12 + 37: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 28(DebugDeclare) 35 34(uv1) 38 + 51: 50(ptr) AccessChain 42(inUV) 49 + 52: 31(fvec2) Load 51 + 54: 50(ptr) AccessChain 42(inUV) 53 + 55: 31(fvec2) Load 54 + 63: 62(ptr) AccessChain 59(gl_TessCoord) 12 + 64: 28(float) Load 63 + 65: 31(fvec2) CompositeConstruct 64 64 + 66: 31(fvec2) ExtInst 3(GLSL.std.450) 46(FMix) 52 55 65 + Store 34(uv1) 66 + 67: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 17 68 68 12 12 + 72: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 28(DebugDeclare) 70 69(uv2) 38 + 74: 50(ptr) AccessChain 42(inUV) 73 + 75: 31(fvec2) Load 74 + 77: 50(ptr) AccessChain 42(inUV) 76 + 78: 31(fvec2) Load 77 + 79: 62(ptr) AccessChain 59(gl_TessCoord) 12 + 80: 28(float) Load 79 + 81: 31(fvec2) CompositeConstruct 80 80 + 82: 31(fvec2) ExtInst 3(GLSL.std.450) 46(FMix) 75 78 81 + Store 69(uv2) 82 + 83: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 17 84 84 12 12 + 89: 31(fvec2) Load 34(uv1) + 90: 31(fvec2) Load 69(uv2) + 91: 62(ptr) AccessChain 59(gl_TessCoord) 20 + 92: 28(float) Load 91 + 93: 31(fvec2) CompositeConstruct 92 92 + 94: 31(fvec2) ExtInst 3(GLSL.std.450) 46(FMix) 89 90 93 + Store 86(outUV) 94 + 95: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 17 96 96 12 12 + 101: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 28(DebugDeclare) 99 98(n1) 38 + 108: 58(ptr) AccessChain 105(inNormal) 49 + 109: 56(fvec3) Load 108 + 110: 58(ptr) AccessChain 105(inNormal) 53 + 111: 56(fvec3) Load 110 + 112: 62(ptr) AccessChain 59(gl_TessCoord) 12 + 113: 28(float) Load 112 + 114: 56(fvec3) CompositeConstruct 113 113 113 + 115: 56(fvec3) ExtInst 3(GLSL.std.450) 46(FMix) 109 111 114 + Store 98(n1) 115 + 116: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 17 117 117 12 12 + 121: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 28(DebugDeclare) 119 118(n2) 38 + 122: 58(ptr) AccessChain 105(inNormal) 73 + 123: 56(fvec3) Load 122 + 124: 58(ptr) AccessChain 105(inNormal) 76 + 125: 56(fvec3) Load 124 + 126: 62(ptr) AccessChain 59(gl_TessCoord) 12 + 127: 28(float) Load 126 + 128: 56(fvec3) CompositeConstruct 127 127 127 + 129: 56(fvec3) ExtInst 3(GLSL.std.450) 46(FMix) 123 125 128 + Store 118(n2) 129 + 130: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 17 131 131 12 12 + 136: 56(fvec3) Load 98(n1) + 137: 56(fvec3) Load 118(n2) + 138: 62(ptr) AccessChain 59(gl_TessCoord) 20 + 139: 28(float) Load 138 + 140: 56(fvec3) CompositeConstruct 139 139 139 + 141: 56(fvec3) ExtInst 3(GLSL.std.450) 46(FMix) 136 137 140 + Store 133(outNormal) 141 + 142: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 17 143 143 12 12 + 150: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 28(DebugDeclare) 148 147(pos1) 38 + 173: 172(ptr) AccessChain 169(gl_in) 49 49 + 174: 144(fvec4) Load 173 + 175: 172(ptr) AccessChain 169(gl_in) 53 49 + 176: 144(fvec4) Load 175 + 177: 62(ptr) AccessChain 59(gl_TessCoord) 12 + 178: 28(float) Load 177 + 179: 144(fvec4) CompositeConstruct 178 178 178 178 + 180: 144(fvec4) ExtInst 3(GLSL.std.450) 46(FMix) 174 176 179 + Store 147(pos1) 180 + 181: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 17 182 182 12 12 + 186: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 28(DebugDeclare) 184 183(pos2) 38 + 187: 172(ptr) AccessChain 169(gl_in) 73 49 + 188: 144(fvec4) Load 187 + 189: 172(ptr) AccessChain 169(gl_in) 76 49 + 190: 144(fvec4) Load 189 + 191: 62(ptr) AccessChain 59(gl_TessCoord) 12 + 192: 28(float) Load 191 + 193: 144(fvec4) CompositeConstruct 192 192 192 192 + 194: 144(fvec4) ExtInst 3(GLSL.std.450) 46(FMix) 188 190 193 + Store 183(pos2) 194 + 195: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 17 196 196 12 12 + 200: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 28(DebugDeclare) 198 197(pos) 38 + 201: 144(fvec4) Load 147(pos1) + 202: 144(fvec4) Load 183(pos2) + 203: 62(ptr) AccessChain 59(gl_TessCoord) 20 + 204: 28(float) Load 203 + 205: 144(fvec4) CompositeConstruct 204 204 204 204 + 206: 144(fvec4) ExtInst 3(GLSL.std.450) 46(FMix) 201 202 205 + Store 197(pos) 206 + 207: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 17 208 208 12 12 + 222: 214 Load 219(displacementMap) + 223: 31(fvec2) Load 86(outUV) + 225: 144(fvec4) ImageSampleExplicitLod 222 223 Lod 224 + 226: 28(float) CompositeExtract 225 0 + 260: 259(ptr) AccessChain 255(ubo) 258 + 261: 28(float) Load 260 + 262: 28(float) FMul 226 261 + 264: 263(ptr) AccessChain 197(pos) 20 + 265: 28(float) Load 264 + 266: 28(float) FSub 265 262 + 267: 263(ptr) AccessChain 197(pos) 20 + Store 267 266 + 268: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 17 269 269 12 12 + 283: 282(ptr) AccessChain 255(ubo) 49 + 284: 227 Load 283 + 285: 282(ptr) AccessChain 255(ubo) 53 + 286: 227 Load 285 + 287: 227 MatrixTimesMatrix 284 286 + 288: 144(fvec4) Load 197(pos) + 289: 144(fvec4) MatrixTimesVector 287 288 + 291: 290(ptr) AccessChain 280 49 + Store 291 289 + 292: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 17 293 293 12 12 + 297: 144(fvec4) Load 197(pos) + 298: 56(fvec3) VectorShuffle 297 297 0 1 2 + 299: 56(fvec3) FNegate 298 + Store 294(outViewVec) 299 + 300: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 17 301 301 12 12 + 306: 305(ptr) AccessChain 255(ubo) 76 + 307: 144(fvec4) Load 306 + 308: 56(fvec3) VectorShuffle 307 307 0 1 2 + 309: 56(fvec3) Load 294(outViewVec) + 310: 56(fvec3) FAdd 308 309 + 311: 56(fvec3) ExtInst 3(GLSL.std.450) 69(Normalize) 310 + Store 302(outLightVec) 311 + 312: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 17 313 313 12 12 + 317: 144(fvec4) Load 197(pos) + 318: 56(fvec3) VectorShuffle 317 317 0 1 2 + Store 314(outWorldPos) 318 + 319: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 17 320 320 12 12 + 324: 282(ptr) AccessChain 255(ubo) 53 + 325: 227 Load 324 + 326: 144(fvec4) Load 197(pos) + 327: 144(fvec4) MatrixTimesVector 325 326 + 328: 28(float) CompositeExtract 327 0 + 329: 28(float) CompositeExtract 327 1 + 330: 28(float) CompositeExtract 327 2 + 331: 56(fvec3) CompositeConstruct 328 329 330 + Store 321(outEyePos) 331 + Return + FunctionEnd diff --git a/Test/baseResults/spv.debuginfo.glsl.vert.out b/Test/baseResults/spv.debuginfo.glsl.vert.out new file mode 100644 index 0000000000..c485255081 --- /dev/null +++ b/Test/baseResults/spv.debuginfo.glsl.vert.out @@ -0,0 +1,541 @@ +spv.debuginfo.glsl.vert +// Module Version 10000 +// Generated by (magic number): 8000b +// Id's are bound by 424 + + Capability Shader + Extension "SPV_KHR_non_semantic_info" + 2: ExtInstImport "NonSemantic.Shader.DebugInfo.100" + 3: ExtInstImport "GLSL.std.450" + MemoryModel Logical GLSL450 + EntryPoint Vertex 14 "main" 34 39 45 51 59 75 289 307 312 337 353 370 409 418 + 1: String "" + 8: String "uint" + 15: String "main" + 18: String "// OpModuleProcessed auto-map-locations +// OpModuleProcessed auto-map-bindings +// OpModuleProcessed client vulkan100 +// OpModuleProcessed target-env vulkan1.0 +// OpModuleProcessed keep-uncalled +// OpModuleProcessed entry-point main +#line 1 +" + 29: String "float" + 36: String "outColor" + 41: String "inColor" + 47: String "outUV" + 53: String "inUV" + 56: String "int" + 61: String "instanceTexIndex" + 72: String "s" + 77: String "instanceRot" + 89: String "modelview" + 94: String "lightPos" + 97: String "globSpeed" + 101: String "UBO" + 105: String "ubo" + 116: String "c" + 131: String "mx" + 174: String "my" + 211: String "mz" + 232: String "rotMat" + 261: String "gRotMat" + 287: String "locPos" + 291: String "inPos" + 303: String "pos" + 309: String "instanceScale" + 314: String "instancePos" + 327: String "gl_Position" + 330: String "gl_PointSize" + 332: String "gl_CullDistance" + 335: String "gl_PerVertex" + 355: String "outNormal" + 372: String "inNormal" + 391: String "lPos" + 411: String "outLightVec" + 420: String "outViewVec" + Name 14 "main" + Name 34 "outColor" + Name 39 "inColor" + Name 45 "outUV" + Name 51 "inUV" + Name 59 "instanceTexIndex" + Name 70 "s" + Name 75 "instanceRot" + Name 87 "UBO" + MemberName 87(UBO) 0 "projection" + MemberName 87(UBO) 1 "modelview" + MemberName 87(UBO) 2 "lightPos" + MemberName 87(UBO) 3 "locSpeed" + MemberName 87(UBO) 4 "globSpeed" + Name 103 "ubo" + Name 114 "c" + Name 129 "mx" + Name 172 "my" + Name 209 "mz" + Name 230 "rotMat" + Name 259 "gRotMat" + Name 285 "locPos" + Name 289 "inPos" + Name 301 "pos" + Name 307 "instanceScale" + Name 312 "instancePos" + Name 325 "gl_PerVertex" + MemberName 325(gl_PerVertex) 0 "gl_Position" + MemberName 325(gl_PerVertex) 1 "gl_PointSize" + MemberName 325(gl_PerVertex) 2 "gl_ClipDistance" + MemberName 325(gl_PerVertex) 3 "gl_CullDistance" + Name 337 "" + Name 353 "outNormal" + Name 370 "inNormal" + Name 389 "lPos" + Name 409 "outLightVec" + Name 418 "outViewVec" + Decorate 34(outColor) Location 1 + Decorate 39(inColor) Location 3 + Decorate 45(outUV) Location 2 + Decorate 51(inUV) Location 2 + Decorate 59(instanceTexIndex) Location 7 + Decorate 75(instanceRot) Location 5 + MemberDecorate 87(UBO) 0 ColMajor + MemberDecorate 87(UBO) 0 Offset 0 + MemberDecorate 87(UBO) 0 MatrixStride 16 + MemberDecorate 87(UBO) 1 ColMajor + MemberDecorate 87(UBO) 1 Offset 64 + MemberDecorate 87(UBO) 1 MatrixStride 16 + MemberDecorate 87(UBO) 2 Offset 128 + MemberDecorate 87(UBO) 3 Offset 144 + MemberDecorate 87(UBO) 4 Offset 148 + Decorate 87(UBO) Block + Decorate 103(ubo) DescriptorSet 0 + Decorate 103(ubo) Binding 0 + Decorate 289(inPos) Location 0 + Decorate 307(instanceScale) Location 6 + Decorate 312(instancePos) Location 4 + MemberDecorate 325(gl_PerVertex) 0 BuiltIn Position + MemberDecorate 325(gl_PerVertex) 1 BuiltIn PointSize + MemberDecorate 325(gl_PerVertex) 2 BuiltIn ClipDistance + MemberDecorate 325(gl_PerVertex) 3 BuiltIn CullDistance + Decorate 325(gl_PerVertex) Block + Decorate 353(outNormal) Location 0 + Decorate 370(inNormal) Location 1 + Decorate 409(outLightVec) Location 4 + Decorate 418(outViewVec) Location 3 + 4: TypeVoid + 5: TypeFunction 4 + 7: TypeInt 32 0 + 10: 7(int) Constant 32 + 11: 7(int) Constant 6 + 12: 7(int) Constant 0 + 9: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 2(DebugTypeBasic) 8 10 11 12 + 13: 7(int) Constant 3 + 6: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 8(DebugTypeFunction) 13 4 + 17: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 35(DebugSource) 1 18 + 20: 7(int) Constant 1 + 21: 7(int) Constant 4 + 22: 7(int) Constant 2 + 19: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 1(DebugCompilationUnit) 20 21 17 22 + 16: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 20(DebugFunction) 15 6 17 12 12 19 15 13 12 + 27: 7(int) Constant 56 + 28: TypeFloat 32 + 30: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 2(DebugTypeBasic) 29 10 13 12 + 31: TypeVector 28(float) 3 + 32: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 6(DebugTypeVector) 30 13 + 33: TypePointer Output 31(fvec3) + 34(outColor): 33(ptr) Variable Output + 37: 7(int) Constant 8 + 35: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 18(DebugGlobalVariable) 36 32 17 27 12 19 36 34(outColor) 37 + 38: TypePointer Input 31(fvec3) + 39(inColor): 38(ptr) Variable Input + 40: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 18(DebugGlobalVariable) 41 32 17 27 12 19 41 39(inColor) 37 + 44: 7(int) Constant 57 + 45(outUV): 33(ptr) Variable Output + 46: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 18(DebugGlobalVariable) 47 32 17 44 12 19 47 45(outUV) 37 + 48: TypeVector 28(float) 2 + 49: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 6(DebugTypeVector) 30 22 + 50: TypePointer Input 48(fvec2) + 51(inUV): 50(ptr) Variable Input + 52: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 18(DebugGlobalVariable) 53 49 17 44 12 19 53 51(inUV) 37 + 55: TypeInt 32 1 + 57: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 2(DebugTypeBasic) 56 10 21 12 + 58: TypePointer Input 55(int) +59(instanceTexIndex): 58(ptr) Variable Input + 60: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 18(DebugGlobalVariable) 61 57 17 44 12 19 61 59(instanceTexIndex) 37 + 68: 7(int) Constant 62 + 69: TypePointer Function 28(float) + 71: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 26(DebugLocalVariable) 72 30 17 68 12 16 21 + 74: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 31(DebugExpression) + 75(instanceRot): 38(ptr) Variable Input + 76: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 18(DebugGlobalVariable) 77 32 17 68 12 19 77 75(instanceRot) 37 + 78: TypePointer Input 28(float) + 81: TypeVector 28(float) 4 + 82: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 6(DebugTypeVector) 30 21 + 83: TypeMatrix 81(fvec4) 4 + 85: TypeBool + 86: 85(bool) ConstantTrue + 84: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 108(DebugTypeMatrix) 82 21 86 + 87(UBO): TypeStruct 83 83 81(fvec4) 28(float) 28(float) + 90: 7(int) Constant 42 + 91: 7(int) Constant 7 + 88: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 11(DebugTypeMember) 89 84 17 90 91 12 12 13 + 92: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 11(DebugTypeMember) 89 84 17 90 91 12 12 13 + 95: 7(int) Constant 43 + 93: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 11(DebugTypeMember) 94 82 17 95 91 12 12 13 + 98: 7(int) Constant 45 + 96: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 11(DebugTypeMember) 97 30 17 98 37 12 12 13 + 99: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 11(DebugTypeMember) 97 30 17 98 37 12 12 13 + 100: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 10(DebugTypeComposite) 101 20 17 68 12 19 101 12 13 88 92 93 96 99 + 102: TypePointer Uniform 87(UBO) + 103(ubo): 102(ptr) Variable Uniform + 104: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 18(DebugGlobalVariable) 105 100 17 68 12 19 105 103(ubo) 37 + 106: 55(int) Constant 3 + 107: TypePointer Uniform 28(float) + 113: 7(int) Constant 63 + 115: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 26(DebugLocalVariable) 116 30 17 113 12 16 21 + 125: 7(int) Constant 65 + 126: TypeMatrix 31(fvec3) 3 + 127: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 108(DebugTypeMatrix) 32 13 86 + 128: TypePointer Function 126 + 130: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 26(DebugLocalVariable) 131 127 17 125 12 16 21 + 133: 55(int) Constant 0 + 136: 28(float) Constant 0 + 138: TypePointer Function 31(fvec3) + 141: 7(int) Constant 66 + 142: 55(int) Constant 1 + 149: 7(int) Constant 67 + 150: 55(int) Constant 2 + 151: 28(float) Constant 1065353216 + 152: 31(fvec3) ConstantComposite 136 136 151 + 155: 7(int) Constant 70 + 163: 7(int) Constant 71 + 171: 7(int) Constant 73 + 173: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 26(DebugLocalVariable) 174 127 17 171 12 16 21 + 181: 7(int) Constant 74 + 182: 31(fvec3) ConstantComposite 136 151 136 + 185: 7(int) Constant 75 + 192: 7(int) Constant 78 + 200: 7(int) Constant 79 + 208: 7(int) Constant 81 + 210: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 26(DebugLocalVariable) 211 127 17 208 12 16 21 + 213: 31(fvec3) ConstantComposite 151 136 136 + 216: 7(int) Constant 82 + 222: 7(int) Constant 83 + 229: 7(int) Constant 85 + 231: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 26(DebugLocalVariable) 232 127 17 229 12 16 21 + 240: 7(int) Constant 88 + 243: 55(int) Constant 4 + 249: 7(int) Constant 89 + 257: 7(int) Constant 90 + 258: TypePointer Function 83 + 260: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 26(DebugLocalVariable) 261 84 17 257 12 16 21 + 266: TypePointer Function 81(fvec4) + 269: 7(int) Constant 91 + 270: 81(fvec4) ConstantComposite 136 151 136 136 + 273: 7(int) Constant 92 + 280: 7(int) Constant 93 + 281: 81(fvec4) ConstantComposite 136 136 136 151 + 284: 7(int) Constant 95 + 286: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 26(DebugLocalVariable) 287 82 17 284 12 16 21 + 289(inPos): 38(ptr) Variable Input + 290: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 18(DebugGlobalVariable) 291 32 17 284 12 19 291 289(inPos) 37 + 300: 7(int) Constant 96 + 302: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 26(DebugLocalVariable) 303 82 17 300 12 16 21 +307(instanceScale): 78(ptr) Variable Input + 308: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 18(DebugGlobalVariable) 309 30 17 300 12 19 309 307(instanceScale) 37 +312(instancePos): 38(ptr) Variable Input + 313: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 18(DebugGlobalVariable) 314 32 17 300 12 19 314 312(instancePos) 37 + 322: 7(int) Constant 98 + 323: TypeArray 28(float) 20 + 324: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 5(DebugTypeArray) 30 20 +325(gl_PerVertex): TypeStruct 81(fvec4) 28(float) 323 323 + 328: 7(int) Constant 24 + 326: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 11(DebugTypeMember) 327 82 17 20 328 12 12 13 + 329: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 11(DebugTypeMember) 330 30 17 20 90 12 12 13 + 331: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 11(DebugTypeMember) 332 324 17 20 229 12 12 13 + 333: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 11(DebugTypeMember) 332 324 17 20 229 12 12 13 + 334: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 10(DebugTypeComposite) 335 20 17 322 12 19 335 12 13 326 329 331 333 + 336: TypePointer Output 325(gl_PerVertex) + 337: 336(ptr) Variable Output + 338: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 18(DebugGlobalVariable) 1 334 17 322 12 19 1 337 37 + 339: TypePointer Uniform 83 + 349: TypePointer Output 81(fvec4) + 352: 7(int) Constant 99 + 353(outNormal): 33(ptr) Variable Output + 354: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 18(DebugGlobalVariable) 355 32 17 352 12 19 355 353(outNormal) 37 + 370(inNormal): 38(ptr) Variable Input + 371: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 18(DebugGlobalVariable) 372 32 17 352 12 19 372 370(inNormal) 37 + 376: 7(int) Constant 101 + 388: 7(int) Constant 102 + 390: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 26(DebugLocalVariable) 391 32 17 388 12 16 21 + 402: TypePointer Uniform 81(fvec4) + 408: 7(int) Constant 103 +409(outLightVec): 33(ptr) Variable Output + 410: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 18(DebugGlobalVariable) 411 32 17 408 12 19 411 409(outLightVec) 37 + 417: 7(int) Constant 104 + 418(outViewVec): 33(ptr) Variable Output + 419: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 18(DebugGlobalVariable) 420 32 17 417 12 19 420 418(outViewVec) 37 + Line 1 54 11 + 14(main): 4 Function None 5 + 23: Label + 70(s): 69(ptr) Variable Function + 114(c): 69(ptr) Variable Function + 129(mx): 128(ptr) Variable Function + 172(my): 128(ptr) Variable Function + 209(mz): 128(ptr) Variable Function + 230(rotMat): 128(ptr) Variable Function + 259(gRotMat): 258(ptr) Variable Function + 285(locPos): 266(ptr) Variable Function + 301(pos): 266(ptr) Variable Function + 389(lPos): 138(ptr) Variable Function + 24: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 101(DebugFunctionDefinition) 16 14(main) + 25: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 23(DebugScope) 16 + 26: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 17 27 27 12 12 + 42: 31(fvec3) Load 39(inColor) + Store 34(outColor) 42 + 43: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 17 44 44 12 12 + 54: 48(fvec2) Load 51(inUV) + 62: 55(int) Load 59(instanceTexIndex) + 63: 28(float) ConvertSToF 62 + 64: 28(float) CompositeExtract 54 0 + 65: 28(float) CompositeExtract 54 1 + 66: 31(fvec3) CompositeConstruct 64 65 63 + Store 45(outUV) 66 + 67: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 17 68 68 12 12 + 73: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 28(DebugDeclare) 71 70(s) 74 + 79: 78(ptr) AccessChain 75(instanceRot) 12 + 80: 28(float) Load 79 + 108: 107(ptr) AccessChain 103(ubo) 106 + 109: 28(float) Load 108 + 110: 28(float) FAdd 80 109 + 111: 28(float) ExtInst 3(GLSL.std.450) 13(Sin) 110 + Store 70(s) 111 + 112: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 17 113 113 12 12 + 117: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 28(DebugDeclare) 115 114(c) 74 + 118: 78(ptr) AccessChain 75(instanceRot) 12 + 119: 28(float) Load 118 + 120: 107(ptr) AccessChain 103(ubo) 106 + 121: 28(float) Load 120 + 122: 28(float) FAdd 119 121 + 123: 28(float) ExtInst 3(GLSL.std.450) 14(Cos) 122 + Store 114(c) 123 + 124: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 17 125 125 12 12 + 132: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 28(DebugDeclare) 130 129(mx) 74 + 134: 28(float) Load 114(c) + 135: 28(float) Load 70(s) + 137: 31(fvec3) CompositeConstruct 134 135 136 + 139: 138(ptr) AccessChain 129(mx) 133 + Store 139 137 + 140: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 17 141 141 12 12 + 143: 28(float) Load 70(s) + 144: 28(float) FNegate 143 + 145: 28(float) Load 114(c) + 146: 31(fvec3) CompositeConstruct 144 145 136 + 147: 138(ptr) AccessChain 129(mx) 142 + Store 147 146 + 148: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 17 149 149 12 12 + 153: 138(ptr) AccessChain 129(mx) 150 + Store 153 152 + 154: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 17 155 155 12 12 + 156: 78(ptr) AccessChain 75(instanceRot) 20 + 157: 28(float) Load 156 + 158: 107(ptr) AccessChain 103(ubo) 106 + 159: 28(float) Load 158 + 160: 28(float) FAdd 157 159 + 161: 28(float) ExtInst 3(GLSL.std.450) 13(Sin) 160 + Store 70(s) 161 + 162: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 17 163 163 12 12 + 164: 78(ptr) AccessChain 75(instanceRot) 20 + 165: 28(float) Load 164 + 166: 107(ptr) AccessChain 103(ubo) 106 + 167: 28(float) Load 166 + 168: 28(float) FAdd 165 167 + 169: 28(float) ExtInst 3(GLSL.std.450) 14(Cos) 168 + Store 114(c) 169 + 170: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 17 171 171 12 12 + 175: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 28(DebugDeclare) 173 172(my) 74 + 176: 28(float) Load 114(c) + 177: 28(float) Load 70(s) + 178: 31(fvec3) CompositeConstruct 176 136 177 + 179: 138(ptr) AccessChain 172(my) 133 + Store 179 178 + 180: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 17 181 181 12 12 + 183: 138(ptr) AccessChain 172(my) 142 + Store 183 182 + 184: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 17 185 185 12 12 + 186: 28(float) Load 70(s) + 187: 28(float) FNegate 186 + 188: 28(float) Load 114(c) + 189: 31(fvec3) CompositeConstruct 187 136 188 + 190: 138(ptr) AccessChain 172(my) 150 + Store 190 189 + 191: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 17 192 192 12 12 + 193: 78(ptr) AccessChain 75(instanceRot) 22 + 194: 28(float) Load 193 + 195: 107(ptr) AccessChain 103(ubo) 106 + 196: 28(float) Load 195 + 197: 28(float) FAdd 194 196 + 198: 28(float) ExtInst 3(GLSL.std.450) 13(Sin) 197 + Store 70(s) 198 + 199: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 17 200 200 12 12 + 201: 78(ptr) AccessChain 75(instanceRot) 22 + 202: 28(float) Load 201 + 203: 107(ptr) AccessChain 103(ubo) 106 + 204: 28(float) Load 203 + 205: 28(float) FAdd 202 204 + 206: 28(float) ExtInst 3(GLSL.std.450) 14(Cos) 205 + Store 114(c) 206 + 207: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 17 208 208 12 12 + 212: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 28(DebugDeclare) 210 209(mz) 74 + 214: 138(ptr) AccessChain 209(mz) 133 + Store 214 213 + 215: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 17 216 216 12 12 + 217: 28(float) Load 114(c) + 218: 28(float) Load 70(s) + 219: 31(fvec3) CompositeConstruct 136 217 218 + 220: 138(ptr) AccessChain 209(mz) 142 + Store 220 219 + 221: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 17 222 222 12 12 + 223: 28(float) Load 70(s) + 224: 28(float) FNegate 223 + 225: 28(float) Load 114(c) + 226: 31(fvec3) CompositeConstruct 136 224 225 + 227: 138(ptr) AccessChain 209(mz) 150 + Store 227 226 + 228: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 17 229 229 12 12 + 233: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 28(DebugDeclare) 231 230(rotMat) 74 + 234: 126 Load 209(mz) + 235: 126 Load 172(my) + 236: 126 MatrixTimesMatrix 234 235 + 237: 126 Load 129(mx) + 238: 126 MatrixTimesMatrix 236 237 + Store 230(rotMat) 238 + 239: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 17 240 240 12 12 + 241: 78(ptr) AccessChain 75(instanceRot) 20 + 242: 28(float) Load 241 + 244: 107(ptr) AccessChain 103(ubo) 243 + 245: 28(float) Load 244 + 246: 28(float) FAdd 242 245 + 247: 28(float) ExtInst 3(GLSL.std.450) 13(Sin) 246 + Store 70(s) 247 + 248: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 17 249 249 12 12 + 250: 78(ptr) AccessChain 75(instanceRot) 20 + 251: 28(float) Load 250 + 252: 107(ptr) AccessChain 103(ubo) 243 + 253: 28(float) Load 252 + 254: 28(float) FAdd 251 253 + 255: 28(float) ExtInst 3(GLSL.std.450) 14(Cos) 254 + Store 114(c) 255 + 256: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 17 257 257 12 12 + 262: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 28(DebugDeclare) 260 259(gRotMat) 74 + 263: 28(float) Load 114(c) + 264: 28(float) Load 70(s) + 265: 81(fvec4) CompositeConstruct 263 136 264 136 + 267: 266(ptr) AccessChain 259(gRotMat) 133 + Store 267 265 + 268: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 17 269 269 12 12 + 271: 266(ptr) AccessChain 259(gRotMat) 142 + Store 271 270 + 272: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 17 273 273 12 12 + 274: 28(float) Load 70(s) + 275: 28(float) FNegate 274 + 276: 28(float) Load 114(c) + 277: 81(fvec4) CompositeConstruct 275 136 276 136 + 278: 266(ptr) AccessChain 259(gRotMat) 150 + Store 278 277 + 279: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 17 280 280 12 12 + 282: 266(ptr) AccessChain 259(gRotMat) 106 + Store 282 281 + 283: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 17 284 284 12 12 + 288: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 28(DebugDeclare) 286 285(locPos) 74 + 292: 31(fvec3) Load 289(inPos) + 293: 126 Load 230(rotMat) + 294: 31(fvec3) VectorTimesMatrix 292 293 + 295: 28(float) CompositeExtract 294 0 + 296: 28(float) CompositeExtract 294 1 + 297: 28(float) CompositeExtract 294 2 + 298: 81(fvec4) CompositeConstruct 295 296 297 151 + Store 285(locPos) 298 + 299: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 17 300 300 12 12 + 304: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 28(DebugDeclare) 302 301(pos) 74 + 305: 81(fvec4) Load 285(locPos) + 306: 31(fvec3) VectorShuffle 305 305 0 1 2 + 310: 28(float) Load 307(instanceScale) + 311: 31(fvec3) VectorTimesScalar 306 310 + 315: 31(fvec3) Load 312(instancePos) + 316: 31(fvec3) FAdd 311 315 + 317: 28(float) CompositeExtract 316 0 + 318: 28(float) CompositeExtract 316 1 + 319: 28(float) CompositeExtract 316 2 + 320: 81(fvec4) CompositeConstruct 317 318 319 151 + Store 301(pos) 320 + 321: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 17 322 322 12 12 + 340: 339(ptr) AccessChain 103(ubo) 133 + 341: 83 Load 340 + 342: 339(ptr) AccessChain 103(ubo) 142 + 343: 83 Load 342 + 344: 83 MatrixTimesMatrix 341 343 + 345: 83 Load 259(gRotMat) + 346: 83 MatrixTimesMatrix 344 345 + 347: 81(fvec4) Load 301(pos) + 348: 81(fvec4) MatrixTimesVector 346 347 + 350: 349(ptr) AccessChain 337 133 + Store 350 348 + 351: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 17 352 352 12 12 + 356: 339(ptr) AccessChain 103(ubo) 142 + 357: 83 Load 356 + 358: 83 Load 259(gRotMat) + 359: 83 MatrixTimesMatrix 357 358 + 360: 81(fvec4) CompositeExtract 359 0 + 361: 31(fvec3) VectorShuffle 360 360 0 1 2 + 362: 81(fvec4) CompositeExtract 359 1 + 363: 31(fvec3) VectorShuffle 362 362 0 1 2 + 364: 81(fvec4) CompositeExtract 359 2 + 365: 31(fvec3) VectorShuffle 364 364 0 1 2 + 366: 126 CompositeConstruct 361 363 365 + 367: 126 Load 230(rotMat) + 368: 126 ExtInst 3(GLSL.std.450) 34(MatrixInverse) 367 + 369: 126 MatrixTimesMatrix 366 368 + 373: 31(fvec3) Load 370(inNormal) + 374: 31(fvec3) MatrixTimesVector 369 373 + Store 353(outNormal) 374 + 375: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 17 376 376 12 12 + 377: 339(ptr) AccessChain 103(ubo) 142 + 378: 83 Load 377 + 379: 31(fvec3) Load 289(inPos) + 380: 31(fvec3) Load 312(instancePos) + 381: 31(fvec3) FAdd 379 380 + 382: 28(float) CompositeExtract 381 0 + 383: 28(float) CompositeExtract 381 1 + 384: 28(float) CompositeExtract 381 2 + 385: 81(fvec4) CompositeConstruct 382 383 384 151 + 386: 81(fvec4) MatrixTimesVector 378 385 + Store 301(pos) 386 + 387: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 17 388 388 12 12 + 392: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 28(DebugDeclare) 390 389(lPos) 74 + 393: 339(ptr) AccessChain 103(ubo) 142 + 394: 83 Load 393 + 395: 81(fvec4) CompositeExtract 394 0 + 396: 31(fvec3) VectorShuffle 395 395 0 1 2 + 397: 81(fvec4) CompositeExtract 394 1 + 398: 31(fvec3) VectorShuffle 397 397 0 1 2 + 399: 81(fvec4) CompositeExtract 394 2 + 400: 31(fvec3) VectorShuffle 399 399 0 1 2 + 401: 126 CompositeConstruct 396 398 400 + 403: 402(ptr) AccessChain 103(ubo) 150 + 404: 81(fvec4) Load 403 + 405: 31(fvec3) VectorShuffle 404 404 0 1 2 + 406: 31(fvec3) MatrixTimesVector 401 405 + Store 389(lPos) 406 + 407: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 17 408 408 12 12 + 412: 31(fvec3) Load 389(lPos) + 413: 81(fvec4) Load 301(pos) + 414: 31(fvec3) VectorShuffle 413 413 0 1 2 + 415: 31(fvec3) FSub 412 414 + Store 409(outLightVec) 415 + 416: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 17 417 417 12 12 + 421: 81(fvec4) Load 301(pos) + 422: 31(fvec3) VectorShuffle 421 421 0 1 2 + 423: 31(fvec3) FNegate 422 + Store 418(outViewVec) 423 + Return + FunctionEnd diff --git a/Test/baseResults/spv.debuginfo.hlsl.comp.out b/Test/baseResults/spv.debuginfo.hlsl.comp.out new file mode 100644 index 0000000000..30cd581a73 --- /dev/null +++ b/Test/baseResults/spv.debuginfo.hlsl.comp.out @@ -0,0 +1,1235 @@ +spv.debuginfo.hlsl.comp +// Module Version 10000 +// Generated by (magic number): 8000b +// Id's are bound by 976 + + Capability Shader + Extension "SPV_KHR_non_semantic_info" + 2: ExtInstImport "NonSemantic.Shader.DebugInfo.100" + 3: ExtInstImport "GLSL.std.450" + MemoryModel Logical GLSL450 + EntryPoint GLCompute 6 "main" 971 + ExecutionMode 6 LocalSize 10 10 1 + 1: String "" + 9: String "float" + 12: String "uint" + 28: String "springForce" + 31: String "// OpModuleProcessed auto-map-locations +// OpModuleProcessed auto-map-bindings +// OpModuleProcessed entry-point main +// OpModuleProcessed client vulkan100 +// OpModuleProcessed target-env vulkan1.0 +// OpModuleProcessed keep-uncalled +// OpModuleProcessed hlsl-offsets +#line 1 +" + 40: String "p0" + 44: String "p1" + 48: String "restDist" + 57: String "@main" + 63: String "id" + 71: String "dist" + 83: String "int" + 89: String "sphereRadius" + 100: String "gravity" + 105: String "particleCount" + 108: String "UBO" + 111: String "params" + 115: String "ubo" + 140: String "index" + 163: String "bool" + 177: String "normal" + 184: String "pinned" + 188: String "Particle" + 193: String "@data" + 197: String "particleIn" + 219: String "particleOut" + 244: String "force" + 257: String "pos" + 267: String "vel" + 567: String "f" + 616: String "sphereDist" + 669: String "calculateNormals" + 673: String "PushConstants" + 676: String "pushConstants" + 679: String "$Global" + 719: String "a" + 732: String "b" + 749: String "c" + Name 6 "main" + Name 27 "springForce(vf3;vf3;f1;" + Name 24 "p0" + Name 25 "p1" + Name 26 "restDist" + Name 56 "@main(vu3;" + Name 55 "id" + Name 69 "dist" + Name 87 "UBO" + MemberName 87(UBO) 0 "deltaT" + MemberName 87(UBO) 1 "particleMass" + MemberName 87(UBO) 2 "springStiffness" + MemberName 87(UBO) 3 "damping" + MemberName 87(UBO) 4 "restDistH" + MemberName 87(UBO) 5 "restDistV" + MemberName 87(UBO) 6 "restDistD" + MemberName 87(UBO) 7 "sphereRadius" + MemberName 87(UBO) 8 "spherePos" + MemberName 87(UBO) 9 "gravity" + MemberName 87(UBO) 10 "particleCount" + Name 109 "ubo" + MemberName 109(ubo) 0 "params" + Name 117 "" + Name 138 "index" + Name 175 "Particle" + MemberName 175(Particle) 0 "pos" + MemberName 175(Particle) 1 "vel" + MemberName 175(Particle) 2 "uv" + MemberName 175(Particle) 3 "normal" + MemberName 175(Particle) 4 "pinned" + Name 191 "particleIn" + MemberName 191(particleIn) 0 "@data" + Name 199 "particleIn" + Name 215 "particleOut" + MemberName 215(particleOut) 0 "@data" + Name 221 "particleOut" + Name 242 "force" + Name 255 "pos" + Name 265 "vel" + Name 286 "param" + Name 290 "param" + Name 292 "param" + Name 316 "param" + Name 320 "param" + Name 322 "param" + Name 350 "param" + Name 354 "param" + Name 356 "param" + Name 379 "param" + Name 383 "param" + Name 385 "param" + Name 420 "param" + Name 424 "param" + Name 426 "param" + Name 456 "param" + Name 460 "param" + Name 462 "param" + Name 500 "param" + Name 504 "param" + Name 506 "param" + Name 540 "param" + Name 544 "param" + Name 546 "param" + Name 565 "f" + Name 614 "sphereDist" + Name 667 "PushConstants" + MemberName 667(PushConstants) 0 "calculateNormals" + Name 674 "$Global" + MemberName 674($Global) 0 "pushConstants" + Name 681 "" + Name 693 "normal" + Name 717 "a" + Name 730 "b" + Name 747 "c" + Name 969 "id" + Name 971 "id" + Name 973 "param" + MemberDecorate 87(UBO) 0 Offset 0 + MemberDecorate 87(UBO) 1 Offset 4 + MemberDecorate 87(UBO) 2 Offset 8 + MemberDecorate 87(UBO) 3 Offset 12 + MemberDecorate 87(UBO) 4 Offset 16 + MemberDecorate 87(UBO) 5 Offset 20 + MemberDecorate 87(UBO) 6 Offset 24 + MemberDecorate 87(UBO) 7 Offset 28 + MemberDecorate 87(UBO) 8 Offset 32 + MemberDecorate 87(UBO) 9 Offset 48 + MemberDecorate 87(UBO) 10 Offset 64 + MemberDecorate 109(ubo) 0 Offset 0 + Decorate 109(ubo) Block + Decorate 117 DescriptorSet 0 + Decorate 117 Binding 2 + MemberDecorate 175(Particle) 0 Offset 0 + MemberDecorate 175(Particle) 1 Offset 16 + MemberDecorate 175(Particle) 2 Offset 32 + MemberDecorate 175(Particle) 3 Offset 48 + MemberDecorate 175(Particle) 4 Offset 64 + Decorate 189 ArrayStride 80 + MemberDecorate 191(particleIn) 0 NonWritable + MemberDecorate 191(particleIn) 0 Offset 0 + Decorate 191(particleIn) BufferBlock + Decorate 199(particleIn) DescriptorSet 0 + Decorate 199(particleIn) Binding 0 + Decorate 213 ArrayStride 80 + MemberDecorate 215(particleOut) 0 Offset 0 + Decorate 215(particleOut) BufferBlock + Decorate 221(particleOut) DescriptorSet 0 + Decorate 221(particleOut) Binding 1 + MemberDecorate 667(PushConstants) 0 Offset 0 + MemberDecorate 674($Global) 0 Offset 0 + Decorate 674($Global) Block + Decorate 681 DescriptorSet 0 + Decorate 681 Binding 3 + Decorate 971(id) BuiltIn GlobalInvocationId + 4: TypeVoid + 5: TypeFunction 4 + 8: TypeFloat 32 + 11: TypeInt 32 0 + 14: 11(int) Constant 32 + 15: 11(int) Constant 6 + 16: 11(int) Constant 0 + 13: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 2(DebugTypeBasic) 12 14 15 16 + 17: 11(int) Constant 3 + 10: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 2(DebugTypeBasic) 9 14 17 16 + 18: TypeVector 8(float) 3 + 19: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 6(DebugTypeVector) 10 17 + 20: TypePointer Function 18(fvec3) + 21: TypePointer Function 8(float) + 22: TypeFunction 18(fvec3) 20(ptr) 20(ptr) 21(ptr) + 23: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 8(DebugTypeFunction) 17 19 19 19 10 + 30: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 35(DebugSource) 1 31 + 33: 11(int) Constant 1 + 34: 11(int) Constant 4 + 35: 11(int) Constant 5 + 32: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 1(DebugCompilationUnit) 33 34 30 35 + 29: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 20(DebugFunction) 28 23 30 16 16 32 28 17 16 + 39: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 26(DebugLocalVariable) 40 19 30 16 16 29 34 33 + 42: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 31(DebugExpression) + 45: 11(int) Constant 2 + 43: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 26(DebugLocalVariable) 44 19 30 16 16 29 34 45 + 47: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 26(DebugLocalVariable) 48 10 30 16 16 29 34 17 + 50: TypeVector 11(int) 3 + 51: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 6(DebugTypeVector) 13 17 + 52: TypePointer Function 50(ivec3) + 53: TypeFunction 4 52(ptr) + 54: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 8(DebugTypeFunction) 17 4 51 + 58: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 20(DebugFunction) 57 54 30 16 16 32 57 17 16 + 62: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 26(DebugLocalVariable) 63 51 30 16 16 58 34 33 + 68: 11(int) Constant 76 + 70: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 26(DebugLocalVariable) 71 19 30 68 16 29 34 + 77: 11(int) Constant 77 + 80: TypeVector 8(float) 4 + 81: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 6(DebugTypeVector) 10 34 + 82: TypeInt 32 1 + 84: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 2(DebugTypeBasic) 83 14 34 16 + 85: TypeVector 82(int) 2 + 86: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 6(DebugTypeVector) 84 45 + 87(UBO): TypeStruct 8(float) 8(float) 8(float) 8(float) 8(float) 8(float) 8(float) 8(float) 80(fvec4) 80(fvec4) 85(ivec2) + 90: 11(int) Constant 48 + 91: 11(int) Constant 20 + 88: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 11(DebugTypeMember) 89 10 30 90 91 16 16 17 + 92: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 11(DebugTypeMember) 89 10 30 90 91 16 16 17 + 93: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 11(DebugTypeMember) 89 10 30 90 91 16 16 17 + 94: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 11(DebugTypeMember) 89 10 30 90 91 16 16 17 + 95: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 11(DebugTypeMember) 89 10 30 90 91 16 16 17 + 96: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 11(DebugTypeMember) 89 10 30 90 91 16 16 17 + 97: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 11(DebugTypeMember) 89 10 30 90 91 16 16 17 + 98: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 11(DebugTypeMember) 89 10 30 90 91 16 16 17 + 101: 11(int) Constant 50 + 102: 11(int) Constant 16 + 99: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 11(DebugTypeMember) 100 81 30 101 102 16 16 17 + 103: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 11(DebugTypeMember) 100 81 30 101 102 16 16 17 + 106: 11(int) Constant 51 + 104: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 11(DebugTypeMember) 105 86 30 106 91 16 16 17 + 107: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 10(DebugTypeComposite) 108 33 30 77 16 32 108 16 17 88 92 93 94 95 96 97 98 99 103 104 + 109(ubo): TypeStruct 87(UBO) + 112: 11(int) Constant 56 + 113: 11(int) Constant 12 + 110: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 11(DebugTypeMember) 111 107 30 112 113 16 16 17 + 114: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 10(DebugTypeComposite) 115 33 30 77 16 32 115 16 17 110 + 116: TypePointer Uniform 109(ubo) + 117: 116(ptr) Variable Uniform + 119: 11(int) Constant 8 + 118: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 18(DebugGlobalVariable) 1 114 30 77 16 32 1 117 119 + 120: 82(int) Constant 0 + 121: 82(int) Constant 2 + 122: TypePointer Uniform 8(float) + 136: 11(int) Constant 83 + 137: TypePointer Function 11(int) + 139: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 26(DebugLocalVariable) 140 13 30 136 16 58 34 + 144: 82(int) Constant 10 + 145: TypePointer Uniform 82(int) + 154: 11(int) Constant 84 + 162: TypeBool + 164: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 2(DebugTypeBasic) 163 14 45 16 + 170: 11(int) Constant 85 + 174: 11(int) Constant 88 + 175(Particle): TypeStruct 80(fvec4) 80(fvec4) 80(fvec4) 80(fvec4) 8(float) + 178: 11(int) Constant 30 + 179: 11(int) Constant 15 + 176: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 11(DebugTypeMember) 177 81 30 178 179 16 16 17 + 180: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 11(DebugTypeMember) 177 81 30 178 179 16 16 17 + 181: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 11(DebugTypeMember) 177 81 30 178 179 16 16 17 + 182: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 11(DebugTypeMember) 177 81 30 178 179 16 16 17 + 185: 11(int) Constant 31 + 186: 11(int) Constant 14 + 183: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 11(DebugTypeMember) 184 10 30 185 186 16 16 17 + 187: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 10(DebugTypeComposite) 188 33 30 174 16 32 188 16 17 176 180 181 182 183 + 189: TypeRuntimeArray 175(Particle) + 190: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 5(DebugTypeArray) 187 16 + 191(particleIn): TypeStruct 189 + 194: 11(int) Constant 35 + 195: 11(int) Constant 28 + 192: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 11(DebugTypeMember) 193 190 30 194 195 16 16 17 + 196: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 10(DebugTypeComposite) 197 33 30 174 16 32 197 16 17 192 + 198: TypePointer Uniform 191(particleIn) + 199(particleIn): 198(ptr) Variable Uniform + 200: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 18(DebugGlobalVariable) 197 196 30 174 16 32 197 199(particleIn) 119 + 202: 82(int) Constant 4 + 205: 8(float) Constant 1065353216 + 206: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 2(DebugTypeBasic) 163 14 45 16 + 212: 11(int) Constant 89 + 213: TypeRuntimeArray 175(Particle) + 214: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 5(DebugTypeArray) 187 16 +215(particleOut): TypeStruct 213 + 217: 11(int) Constant 37 + 216: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 11(DebugTypeMember) 193 214 30 217 178 16 16 17 + 218: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 10(DebugTypeComposite) 219 33 30 212 16 32 219 16 17 216 + 220: TypePointer Uniform 215(particleOut) +221(particleOut): 220(ptr) Variable Uniform + 222: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 18(DebugGlobalVariable) 219 218 30 212 16 32 219 221(particleOut) 119 + 225: TypePointer Uniform 80(fvec4) + 230: 11(int) Constant 90 + 232: 82(int) Constant 1 + 233: 8(float) Constant 0 + 234: 80(fvec4) ConstantComposite 233 233 233 233 + 237: 11(int) Constant 91 + 241: 11(int) Constant 95 + 243: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 26(DebugLocalVariable) 244 19 30 241 16 58 34 + 246: 82(int) Constant 9 + 254: 11(int) Constant 97 + 256: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 26(DebugLocalVariable) 257 19 30 254 16 58 34 + 264: 11(int) Constant 98 + 266: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 26(DebugLocalVariable) 267 19 30 264 16 58 34 + 274: 11(int) Constant 102 + 277: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 2(DebugTypeBasic) 163 14 45 16 + 283: 11(int) Constant 103 + 300: 11(int) Constant 106 + 307: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 2(DebugTypeBasic) 163 14 45 16 + 313: 11(int) Constant 107 + 330: 11(int) Constant 110 + 337: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 2(DebugTypeBasic) 163 14 45 16 + 343: 11(int) Constant 111 + 349: 82(int) Constant 5 + 364: 11(int) Constant 114 + 367: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 2(DebugTypeBasic) 163 14 45 16 + 373: 11(int) Constant 115 + 393: 11(int) Constant 118 + 396: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 2(DebugTypeBasic) 163 14 45 16 + 404: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 2(DebugTypeBasic) 163 14 45 16 + 406: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 2(DebugTypeBasic) 163 14 45 16 + 412: 11(int) Constant 119 + 419: 82(int) Constant 6 + 434: 11(int) Constant 122 + 437: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 2(DebugTypeBasic) 163 14 45 16 + 441: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 2(DebugTypeBasic) 163 14 45 16 + 443: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 2(DebugTypeBasic) 163 14 45 16 + 449: 11(int) Constant 123 + 470: 11(int) Constant 126 + 477: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 2(DebugTypeBasic) 163 14 45 16 + 485: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 2(DebugTypeBasic) 163 14 45 16 + 487: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 2(DebugTypeBasic) 163 14 45 16 + 493: 11(int) Constant 127 + 514: 11(int) Constant 130 + 521: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 2(DebugTypeBasic) 163 14 45 16 + 525: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 2(DebugTypeBasic) 163 14 45 16 + 527: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 2(DebugTypeBasic) 163 14 45 16 + 533: 11(int) Constant 131 + 554: 11(int) Constant 134 + 555: 82(int) Constant 3 + 564: 11(int) Constant 137 + 566: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 26(DebugLocalVariable) 567 19 30 564 16 58 34 + 575: 11(int) Constant 138 + 583: 8(float) Constant 1056964608 + 599: 11(int) Constant 139 + 613: 11(int) Constant 142 + 615: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 26(DebugLocalVariable) 616 19 30 613 16 58 34 + 622: 82(int) Constant 8 + 628: 11(int) Constant 143 + 631: 82(int) Constant 7 + 634: 8(float) Constant 1008981770 + 636: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 2(DebugTypeBasic) 163 14 45 16 + 642: 11(int) Constant 145 + 661: 11(int) Constant 147 + 666: 11(int) Constant 151 +667(PushConstants): TypeStruct 11(int) + 670: 11(int) Constant 67 + 671: 11(int) Constant 23 + 668: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 11(DebugTypeMember) 669 13 30 670 671 16 16 17 + 672: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 10(DebugTypeComposite) 673 33 30 666 16 32 673 16 17 668 + 674($Global): TypeStruct 667(PushConstants) + 677: 11(int) Constant 71 + 675: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 11(DebugTypeMember) 676 672 30 677 179 16 16 17 + 678: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 10(DebugTypeComposite) 679 33 30 666 16 32 679 16 17 675 + 680: TypePointer Uniform 674($Global) + 681: 680(ptr) Variable Uniform + 682: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 18(DebugGlobalVariable) 1 678 30 666 16 32 1 681 119 + 683: TypePointer Uniform 11(int) + 686: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 2(DebugTypeBasic) 163 14 45 16 + 692: 11(int) Constant 152 + 694: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 26(DebugLocalVariable) 177 19 30 692 16 58 34 + 696: 18(fvec3) ConstantComposite 233 233 233 + 698: 11(int) Constant 154 + 701: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 2(DebugTypeBasic) 163 14 45 16 + 707: 11(int) Constant 155 + 710: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 2(DebugTypeBasic) 163 14 45 16 + 716: 11(int) Constant 156 + 718: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 26(DebugLocalVariable) 719 19 30 716 16 58 34 + 729: 11(int) Constant 157 + 731: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 26(DebugLocalVariable) 732 19 30 729 16 58 34 + 746: 11(int) Constant 158 + 748: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 26(DebugLocalVariable) 749 19 30 746 16 58 34 + 762: 11(int) Constant 159 + 774: 11(int) Constant 161 + 781: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 2(DebugTypeBasic) 163 14 45 16 + 787: 11(int) Constant 162 + 799: 11(int) Constant 163 + 812: 11(int) Constant 164 + 821: 11(int) Constant 165 + 833: 11(int) Constant 168 + 840: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 2(DebugTypeBasic) 163 14 45 16 + 846: 11(int) Constant 169 + 849: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 2(DebugTypeBasic) 163 14 45 16 + 855: 11(int) Constant 170 + 867: 11(int) Constant 171 + 880: 11(int) Constant 172 + 889: 11(int) Constant 173 + 901: 11(int) Constant 175 + 908: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 2(DebugTypeBasic) 163 14 45 16 + 914: 11(int) Constant 176 + 923: 11(int) Constant 177 + 936: 11(int) Constant 178 + 948: 11(int) Constant 179 + 960: 11(int) Constant 182 + 970: TypePointer Input 50(ivec3) + 971(id): 970(ptr) Variable Input + Line 1 82 1 + 6(main): 4 Function None 5 + 7: Label + 969(id): 52(ptr) Variable Function + 973(param): 52(ptr) Variable Function + Line 1 82 0 + 972: 50(ivec3) Load 971(id) + Store 969(id) 972 + 974: 50(ivec3) Load 969(id) + Store 973(param) 974 + 975: 4 FunctionCall 56(@main(vu3;) 973(param) + Return + FunctionEnd + Line 1 75 1 +27(springForce(vf3;vf3;f1;): 18(fvec3) Function None 22 + 24(p0): 20(ptr) FunctionParameter + 25(p1): 20(ptr) FunctionParameter + 26(restDist): 21(ptr) FunctionParameter + 36: Label + 69(dist): 20(ptr) Variable Function + 37: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 23(DebugScope) 29 + 38: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 30 16 16 16 16 + 41: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 28(DebugDeclare) 39 24(p0) 42 + 46: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 28(DebugDeclare) 43 25(p1) 42 + 49: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 28(DebugDeclare) 47 26(restDist) 42 + 65: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 101(DebugFunctionDefinition) 29 27(springForce(vf3;vf3;f1;) + 66: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 23(DebugScope) 29 + 67: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 30 68 68 16 16 + 72: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 28(DebugDeclare) 70 69(dist) 42 + 73: 18(fvec3) Load 24(p0) + 74: 18(fvec3) Load 25(p1) + 75: 18(fvec3) FSub 73 74 + Store 69(dist) 75 + 76: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 30 77 77 16 16 + 78: 18(fvec3) Load 69(dist) + 79: 18(fvec3) ExtInst 3(GLSL.std.450) 69(Normalize) 78 + 123: 122(ptr) AccessChain 117 120 121 + 124: 8(float) Load 123 + 125: 18(fvec3) VectorTimesScalar 79 124 + 126: 18(fvec3) Load 69(dist) + 127: 8(float) ExtInst 3(GLSL.std.450) 66(Length) 126 + 128: 8(float) Load 26(restDist) + 129: 8(float) FSub 127 128 + 130: 18(fvec3) VectorTimesScalar 125 129 + ReturnValue 130 + FunctionEnd + Line 1 82 1 + 56(@main(vu3;): 4 Function None 53 + 55(id): 52(ptr) FunctionParameter + 59: Label + 138(index): 137(ptr) Variable Function + 242(force): 20(ptr) Variable Function + 255(pos): 20(ptr) Variable Function + 265(vel): 20(ptr) Variable Function + 286(param): 20(ptr) Variable Function + 290(param): 20(ptr) Variable Function + 292(param): 21(ptr) Variable Function + 316(param): 20(ptr) Variable Function + 320(param): 20(ptr) Variable Function + 322(param): 21(ptr) Variable Function + 350(param): 20(ptr) Variable Function + 354(param): 20(ptr) Variable Function + 356(param): 21(ptr) Variable Function + 379(param): 20(ptr) Variable Function + 383(param): 20(ptr) Variable Function + 385(param): 21(ptr) Variable Function + 420(param): 20(ptr) Variable Function + 424(param): 20(ptr) Variable Function + 426(param): 21(ptr) Variable Function + 456(param): 20(ptr) Variable Function + 460(param): 20(ptr) Variable Function + 462(param): 21(ptr) Variable Function + 500(param): 20(ptr) Variable Function + 504(param): 20(ptr) Variable Function + 506(param): 21(ptr) Variable Function + 540(param): 20(ptr) Variable Function + 544(param): 20(ptr) Variable Function + 546(param): 21(ptr) Variable Function + 565(f): 20(ptr) Variable Function + 614(sphereDist): 20(ptr) Variable Function + 693(normal): 20(ptr) Variable Function + 717(a): 20(ptr) Variable Function + 730(b): 20(ptr) Variable Function + 747(c): 20(ptr) Variable Function + 60: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 23(DebugScope) 58 + 61: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 30 16 16 16 16 + 64: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 28(DebugDeclare) 62 55(id) 42 + 133: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 101(DebugFunctionDefinition) 58 56(@main(vu3;) + 134: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 23(DebugScope) 58 + 135: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 30 136 136 16 16 + 141: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 28(DebugDeclare) 139 138(index) 42 + 142: 137(ptr) AccessChain 55(id) 33 + 143: 11(int) Load 142 + 146: 145(ptr) AccessChain 117 120 144 16 + 147: 82(int) Load 146 + 148: 11(int) Bitcast 147 + 149: 11(int) IMul 143 148 + 150: 137(ptr) AccessChain 55(id) 16 + 151: 11(int) Load 150 + 152: 11(int) IAdd 149 151 + Store 138(index) 152 + 153: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 30 154 154 16 16 + 155: 11(int) Load 138(index) + 156: 145(ptr) AccessChain 117 120 144 16 + 157: 82(int) Load 156 + 158: 145(ptr) AccessChain 117 120 144 33 + 159: 82(int) Load 158 + 160: 82(int) IMul 157 159 + 161: 11(int) Bitcast 160 + 165: 162(bool) UGreaterThan 155 161 + SelectionMerge 167 None + BranchConditional 165 166 167 + 166: Label + 168: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 23(DebugScope) 58 + 169: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 30 170 170 16 16 + Return + 167: Label + 172: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 23(DebugScope) 58 + 173: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 30 174 174 16 16 + 201: 11(int) Load 138(index) + 203: 122(ptr) AccessChain 199(particleIn) 120 201 202 + 204: 8(float) Load 203 + 207: 162(bool) FOrdEqual 204 205 + SelectionMerge 209 None + BranchConditional 207 208 209 + 208: Label + 210: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 23(DebugScope) 58 + 211: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 30 212 212 16 16 + 223: 11(int) Load 138(index) + 224: 11(int) Load 138(index) + 226: 225(ptr) AccessChain 221(particleOut) 120 224 120 + 227: 80(fvec4) Load 226 + 228: 225(ptr) AccessChain 221(particleOut) 120 223 120 + Store 228 227 + 229: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 30 230 230 16 16 + 231: 11(int) Load 138(index) + 235: 225(ptr) AccessChain 221(particleOut) 120 231 232 + Store 235 234 + 236: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 30 237 237 16 16 + Return + 209: Label + 239: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 23(DebugScope) 58 + 240: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 30 241 241 16 16 + 245: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 28(DebugDeclare) 243 242(force) 42 + 247: 225(ptr) AccessChain 117 120 246 + 248: 80(fvec4) Load 247 + 249: 18(fvec3) VectorShuffle 248 248 0 1 2 + 250: 122(ptr) AccessChain 117 120 232 + 251: 8(float) Load 250 + 252: 18(fvec3) VectorTimesScalar 249 251 + Store 242(force) 252 + 253: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 30 254 254 16 16 + 258: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 28(DebugDeclare) 256 255(pos) 42 + 259: 11(int) Load 138(index) + 260: 225(ptr) AccessChain 199(particleIn) 120 259 120 + 261: 80(fvec4) Load 260 + 262: 18(fvec3) VectorShuffle 261 261 0 1 2 + Store 255(pos) 262 + 263: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 30 264 264 16 16 + 268: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 28(DebugDeclare) 266 265(vel) 42 + 269: 11(int) Load 138(index) + 270: 225(ptr) AccessChain 199(particleIn) 120 269 232 + 271: 80(fvec4) Load 270 + 272: 18(fvec3) VectorShuffle 271 271 0 1 2 + Store 265(vel) 272 + 273: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 30 274 274 16 16 + 275: 137(ptr) AccessChain 55(id) 16 + 276: 11(int) Load 275 + 278: 162(bool) UGreaterThan 276 16 + SelectionMerge 280 None + BranchConditional 278 279 280 + 279: Label + 281: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 23(DebugScope) 58 + 282: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 30 283 283 16 16 + 284: 11(int) Load 138(index) + 285: 11(int) ISub 284 33 + 287: 225(ptr) AccessChain 199(particleIn) 120 285 120 + 288: 80(fvec4) Load 287 + 289: 18(fvec3) VectorShuffle 288 288 0 1 2 + Store 286(param) 289 + 291: 18(fvec3) Load 255(pos) + Store 290(param) 291 + 293: 122(ptr) AccessChain 117 120 202 + 294: 8(float) Load 293 + Store 292(param) 294 + 295: 18(fvec3) FunctionCall 27(springForce(vf3;vf3;f1;) 286(param) 290(param) 292(param) + 296: 18(fvec3) Load 242(force) + 297: 18(fvec3) FAdd 296 295 + Store 242(force) 297 + Branch 280 + 280: Label + 298: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 23(DebugScope) 58 + 299: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 30 300 300 16 16 + 301: 137(ptr) AccessChain 55(id) 16 + 302: 11(int) Load 301 + 303: 145(ptr) AccessChain 117 120 144 16 + 304: 82(int) Load 303 + 305: 82(int) ISub 304 232 + 306: 11(int) Bitcast 305 + 308: 162(bool) ULessThan 302 306 + SelectionMerge 310 None + BranchConditional 308 309 310 + 309: Label + 311: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 23(DebugScope) 58 + 312: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 30 313 313 16 16 + 314: 11(int) Load 138(index) + 315: 11(int) IAdd 314 33 + 317: 225(ptr) AccessChain 199(particleIn) 120 315 120 + 318: 80(fvec4) Load 317 + 319: 18(fvec3) VectorShuffle 318 318 0 1 2 + Store 316(param) 319 + 321: 18(fvec3) Load 255(pos) + Store 320(param) 321 + 323: 122(ptr) AccessChain 117 120 202 + 324: 8(float) Load 323 + Store 322(param) 324 + 325: 18(fvec3) FunctionCall 27(springForce(vf3;vf3;f1;) 316(param) 320(param) 322(param) + 326: 18(fvec3) Load 242(force) + 327: 18(fvec3) FAdd 326 325 + Store 242(force) 327 + Branch 310 + 310: Label + 328: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 23(DebugScope) 58 + 329: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 30 330 330 16 16 + 331: 137(ptr) AccessChain 55(id) 33 + 332: 11(int) Load 331 + 333: 145(ptr) AccessChain 117 120 144 33 + 334: 82(int) Load 333 + 335: 82(int) ISub 334 232 + 336: 11(int) Bitcast 335 + 338: 162(bool) ULessThan 332 336 + SelectionMerge 340 None + BranchConditional 338 339 340 + 339: Label + 341: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 23(DebugScope) 58 + 342: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 30 343 343 16 16 + 344: 11(int) Load 138(index) + 345: 145(ptr) AccessChain 117 120 144 16 + 346: 82(int) Load 345 + 347: 11(int) Bitcast 346 + 348: 11(int) IAdd 344 347 + 351: 225(ptr) AccessChain 199(particleIn) 120 348 120 + 352: 80(fvec4) Load 351 + 353: 18(fvec3) VectorShuffle 352 352 0 1 2 + Store 350(param) 353 + 355: 18(fvec3) Load 255(pos) + Store 354(param) 355 + 357: 122(ptr) AccessChain 117 120 349 + 358: 8(float) Load 357 + Store 356(param) 358 + 359: 18(fvec3) FunctionCall 27(springForce(vf3;vf3;f1;) 350(param) 354(param) 356(param) + 360: 18(fvec3) Load 242(force) + 361: 18(fvec3) FAdd 360 359 + Store 242(force) 361 + Branch 340 + 340: Label + 362: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 23(DebugScope) 58 + 363: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 30 364 364 16 16 + 365: 137(ptr) AccessChain 55(id) 33 + 366: 11(int) Load 365 + 368: 162(bool) UGreaterThan 366 16 + SelectionMerge 370 None + BranchConditional 368 369 370 + 369: Label + 371: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 23(DebugScope) 58 + 372: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 30 373 373 16 16 + 374: 11(int) Load 138(index) + 375: 145(ptr) AccessChain 117 120 144 16 + 376: 82(int) Load 375 + 377: 11(int) Bitcast 376 + 378: 11(int) ISub 374 377 + 380: 225(ptr) AccessChain 199(particleIn) 120 378 120 + 381: 80(fvec4) Load 380 + 382: 18(fvec3) VectorShuffle 381 381 0 1 2 + Store 379(param) 382 + 384: 18(fvec3) Load 255(pos) + Store 383(param) 384 + 386: 122(ptr) AccessChain 117 120 349 + 387: 8(float) Load 386 + Store 385(param) 387 + 388: 18(fvec3) FunctionCall 27(springForce(vf3;vf3;f1;) 379(param) 383(param) 385(param) + 389: 18(fvec3) Load 242(force) + 390: 18(fvec3) FAdd 389 388 + Store 242(force) 390 + Branch 370 + 370: Label + 391: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 23(DebugScope) 58 + 392: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 30 393 393 16 16 + 394: 137(ptr) AccessChain 55(id) 16 + 395: 11(int) Load 394 + 397: 162(bool) UGreaterThan 395 16 + 398: 137(ptr) AccessChain 55(id) 33 + 399: 11(int) Load 398 + 400: 145(ptr) AccessChain 117 120 144 33 + 401: 82(int) Load 400 + 402: 82(int) ISub 401 232 + 403: 11(int) Bitcast 402 + 405: 162(bool) ULessThan 399 403 + 407: 162(bool) LogicalAnd 397 405 + SelectionMerge 409 None + BranchConditional 407 408 409 + 408: Label + 410: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 23(DebugScope) 58 + 411: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 30 412 412 16 16 + 413: 11(int) Load 138(index) + 414: 145(ptr) AccessChain 117 120 144 16 + 415: 82(int) Load 414 + 416: 11(int) Bitcast 415 + 417: 11(int) IAdd 413 416 + 418: 11(int) ISub 417 33 + 421: 225(ptr) AccessChain 199(particleIn) 120 418 120 + 422: 80(fvec4) Load 421 + 423: 18(fvec3) VectorShuffle 422 422 0 1 2 + Store 420(param) 423 + 425: 18(fvec3) Load 255(pos) + Store 424(param) 425 + 427: 122(ptr) AccessChain 117 120 419 + 428: 8(float) Load 427 + Store 426(param) 428 + 429: 18(fvec3) FunctionCall 27(springForce(vf3;vf3;f1;) 420(param) 424(param) 426(param) + 430: 18(fvec3) Load 242(force) + 431: 18(fvec3) FAdd 430 429 + Store 242(force) 431 + Branch 409 + 409: Label + 432: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 23(DebugScope) 58 + 433: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 30 434 434 16 16 + 435: 137(ptr) AccessChain 55(id) 16 + 436: 11(int) Load 435 + 438: 162(bool) UGreaterThan 436 16 + 439: 137(ptr) AccessChain 55(id) 33 + 440: 11(int) Load 439 + 442: 162(bool) UGreaterThan 440 16 + 444: 162(bool) LogicalAnd 438 442 + SelectionMerge 446 None + BranchConditional 444 445 446 + 445: Label + 447: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 23(DebugScope) 58 + 448: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 30 449 449 16 16 + 450: 11(int) Load 138(index) + 451: 145(ptr) AccessChain 117 120 144 16 + 452: 82(int) Load 451 + 453: 11(int) Bitcast 452 + 454: 11(int) ISub 450 453 + 455: 11(int) ISub 454 33 + 457: 225(ptr) AccessChain 199(particleIn) 120 455 120 + 458: 80(fvec4) Load 457 + 459: 18(fvec3) VectorShuffle 458 458 0 1 2 + Store 456(param) 459 + 461: 18(fvec3) Load 255(pos) + Store 460(param) 461 + 463: 122(ptr) AccessChain 117 120 419 + 464: 8(float) Load 463 + Store 462(param) 464 + 465: 18(fvec3) FunctionCall 27(springForce(vf3;vf3;f1;) 456(param) 460(param) 462(param) + 466: 18(fvec3) Load 242(force) + 467: 18(fvec3) FAdd 466 465 + Store 242(force) 467 + Branch 446 + 446: Label + 468: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 23(DebugScope) 58 + 469: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 30 470 470 16 16 + 471: 137(ptr) AccessChain 55(id) 16 + 472: 11(int) Load 471 + 473: 145(ptr) AccessChain 117 120 144 16 + 474: 82(int) Load 473 + 475: 82(int) ISub 474 232 + 476: 11(int) Bitcast 475 + 478: 162(bool) ULessThan 472 476 + 479: 137(ptr) AccessChain 55(id) 33 + 480: 11(int) Load 479 + 481: 145(ptr) AccessChain 117 120 144 33 + 482: 82(int) Load 481 + 483: 82(int) ISub 482 232 + 484: 11(int) Bitcast 483 + 486: 162(bool) ULessThan 480 484 + 488: 162(bool) LogicalAnd 478 486 + SelectionMerge 490 None + BranchConditional 488 489 490 + 489: Label + 491: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 23(DebugScope) 58 + 492: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 30 493 493 16 16 + 494: 11(int) Load 138(index) + 495: 145(ptr) AccessChain 117 120 144 16 + 496: 82(int) Load 495 + 497: 11(int) Bitcast 496 + 498: 11(int) IAdd 494 497 + 499: 11(int) IAdd 498 33 + 501: 225(ptr) AccessChain 199(particleIn) 120 499 120 + 502: 80(fvec4) Load 501 + 503: 18(fvec3) VectorShuffle 502 502 0 1 2 + Store 500(param) 503 + 505: 18(fvec3) Load 255(pos) + Store 504(param) 505 + 507: 122(ptr) AccessChain 117 120 419 + 508: 8(float) Load 507 + Store 506(param) 508 + 509: 18(fvec3) FunctionCall 27(springForce(vf3;vf3;f1;) 500(param) 504(param) 506(param) + 510: 18(fvec3) Load 242(force) + 511: 18(fvec3) FAdd 510 509 + Store 242(force) 511 + Branch 490 + 490: Label + 512: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 23(DebugScope) 58 + 513: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 30 514 514 16 16 + 515: 137(ptr) AccessChain 55(id) 16 + 516: 11(int) Load 515 + 517: 145(ptr) AccessChain 117 120 144 16 + 518: 82(int) Load 517 + 519: 82(int) ISub 518 232 + 520: 11(int) Bitcast 519 + 522: 162(bool) ULessThan 516 520 + 523: 137(ptr) AccessChain 55(id) 33 + 524: 11(int) Load 523 + 526: 162(bool) UGreaterThan 524 16 + 528: 162(bool) LogicalAnd 522 526 + SelectionMerge 530 None + BranchConditional 528 529 530 + 529: Label + 531: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 23(DebugScope) 58 + 532: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 30 533 533 16 16 + 534: 11(int) Load 138(index) + 535: 145(ptr) AccessChain 117 120 144 16 + 536: 82(int) Load 535 + 537: 11(int) Bitcast 536 + 538: 11(int) ISub 534 537 + 539: 11(int) IAdd 538 33 + 541: 225(ptr) AccessChain 199(particleIn) 120 539 120 + 542: 80(fvec4) Load 541 + 543: 18(fvec3) VectorShuffle 542 542 0 1 2 + Store 540(param) 543 + 545: 18(fvec3) Load 255(pos) + Store 544(param) 545 + 547: 122(ptr) AccessChain 117 120 419 + 548: 8(float) Load 547 + Store 546(param) 548 + 549: 18(fvec3) FunctionCall 27(springForce(vf3;vf3;f1;) 540(param) 544(param) 546(param) + 550: 18(fvec3) Load 242(force) + 551: 18(fvec3) FAdd 550 549 + Store 242(force) 551 + Branch 530 + 530: Label + 552: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 23(DebugScope) 58 + 553: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 30 554 554 16 16 + 556: 122(ptr) AccessChain 117 120 555 + 557: 8(float) Load 556 + 558: 8(float) FNegate 557 + 559: 18(fvec3) Load 265(vel) + 560: 18(fvec3) VectorTimesScalar 559 558 + 561: 18(fvec3) Load 242(force) + 562: 18(fvec3) FAdd 561 560 + Store 242(force) 562 + 563: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 30 564 564 16 16 + 568: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 28(DebugDeclare) 566 565(f) 42 + 569: 18(fvec3) Load 242(force) + 570: 122(ptr) AccessChain 117 120 232 + 571: 8(float) Load 570 + 572: 8(float) FDiv 205 571 + 573: 18(fvec3) VectorTimesScalar 569 572 + Store 565(f) 573 + 574: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 30 575 575 16 16 + 576: 11(int) Load 138(index) + 577: 18(fvec3) Load 255(pos) + 578: 18(fvec3) Load 265(vel) + 579: 122(ptr) AccessChain 117 120 120 + 580: 8(float) Load 579 + 581: 18(fvec3) VectorTimesScalar 578 580 + 582: 18(fvec3) FAdd 577 581 + 584: 18(fvec3) Load 565(f) + 585: 18(fvec3) VectorTimesScalar 584 583 + 586: 122(ptr) AccessChain 117 120 120 + 587: 8(float) Load 586 + 588: 18(fvec3) VectorTimesScalar 585 587 + 589: 122(ptr) AccessChain 117 120 120 + 590: 8(float) Load 589 + 591: 18(fvec3) VectorTimesScalar 588 590 + 592: 18(fvec3) FAdd 582 591 + 593: 8(float) CompositeExtract 592 0 + 594: 8(float) CompositeExtract 592 1 + 595: 8(float) CompositeExtract 592 2 + 596: 80(fvec4) CompositeConstruct 593 594 595 205 + 597: 225(ptr) AccessChain 221(particleOut) 120 576 120 + Store 597 596 + 598: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 30 599 599 16 16 + 600: 11(int) Load 138(index) + 601: 18(fvec3) Load 265(vel) + 602: 18(fvec3) Load 565(f) + 603: 122(ptr) AccessChain 117 120 120 + 604: 8(float) Load 603 + 605: 18(fvec3) VectorTimesScalar 602 604 + 606: 18(fvec3) FAdd 601 605 + 607: 8(float) CompositeExtract 606 0 + 608: 8(float) CompositeExtract 606 1 + 609: 8(float) CompositeExtract 606 2 + 610: 80(fvec4) CompositeConstruct 607 608 609 233 + 611: 225(ptr) AccessChain 221(particleOut) 120 600 232 + Store 611 610 + 612: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 30 613 613 16 16 + 617: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 28(DebugDeclare) 615 614(sphereDist) 42 + 618: 11(int) Load 138(index) + 619: 225(ptr) AccessChain 221(particleOut) 120 618 120 + 620: 80(fvec4) Load 619 + 621: 18(fvec3) VectorShuffle 620 620 0 1 2 + 623: 225(ptr) AccessChain 117 120 622 + 624: 80(fvec4) Load 623 + 625: 18(fvec3) VectorShuffle 624 624 0 1 2 + 626: 18(fvec3) FSub 621 625 + Store 614(sphereDist) 626 + 627: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 30 628 628 16 16 + 629: 18(fvec3) Load 614(sphereDist) + 630: 8(float) ExtInst 3(GLSL.std.450) 66(Length) 629 + 632: 122(ptr) AccessChain 117 120 631 + 633: 8(float) Load 632 + 635: 8(float) FAdd 633 634 + 637: 162(bool) FOrdLessThan 630 635 + SelectionMerge 639 None + BranchConditional 637 638 639 + 638: Label + 640: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 23(DebugScope) 58 + 641: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 30 642 642 16 16 + 643: 11(int) Load 138(index) + 644: 225(ptr) AccessChain 117 120 622 + 645: 80(fvec4) Load 644 + 646: 18(fvec3) VectorShuffle 645 645 0 1 2 + 647: 18(fvec3) Load 614(sphereDist) + 648: 18(fvec3) ExtInst 3(GLSL.std.450) 69(Normalize) 647 + 649: 122(ptr) AccessChain 117 120 631 + 650: 8(float) Load 649 + 651: 8(float) FAdd 650 634 + 652: 18(fvec3) VectorTimesScalar 648 651 + 653: 18(fvec3) FAdd 646 652 + 654: 122(ptr) AccessChain 221(particleOut) 120 643 120 16 + 655: 8(float) CompositeExtract 653 0 + Store 654 655 + 656: 122(ptr) AccessChain 221(particleOut) 120 643 120 33 + 657: 8(float) CompositeExtract 653 1 + Store 656 657 + 658: 122(ptr) AccessChain 221(particleOut) 120 643 120 45 + 659: 8(float) CompositeExtract 653 2 + Store 658 659 + 660: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 30 661 661 16 16 + 662: 11(int) Load 138(index) + 663: 225(ptr) AccessChain 221(particleOut) 120 662 232 + Store 663 234 + Branch 639 + 639: Label + 664: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 23(DebugScope) 58 + 665: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 30 666 666 16 16 + 684: 683(ptr) AccessChain 681 120 120 + 685: 11(int) Load 684 + 687: 162(bool) IEqual 685 33 + SelectionMerge 689 None + BranchConditional 687 688 689 + 688: Label + 690: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 23(DebugScope) 58 + 691: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 30 692 692 16 16 + 695: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 28(DebugDeclare) 694 693(normal) 42 + Store 693(normal) 696 + 697: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 30 698 698 16 16 + 699: 137(ptr) AccessChain 55(id) 33 + 700: 11(int) Load 699 + 702: 162(bool) UGreaterThan 700 16 + SelectionMerge 704 None + BranchConditional 702 703 704 + 703: Label + 705: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 23(DebugScope) 58 + 706: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 30 707 707 16 16 + 708: 137(ptr) AccessChain 55(id) 16 + 709: 11(int) Load 708 + 711: 162(bool) UGreaterThan 709 16 + SelectionMerge 713 None + BranchConditional 711 712 713 + 712: Label + 714: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 23(DebugScope) 58 + 715: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 30 716 716 16 16 + 720: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 28(DebugDeclare) 718 717(a) 42 + 721: 11(int) Load 138(index) + 722: 11(int) ISub 721 33 + 723: 225(ptr) AccessChain 199(particleIn) 120 722 120 + 724: 80(fvec4) Load 723 + 725: 18(fvec3) VectorShuffle 724 724 0 1 2 + 726: 18(fvec3) Load 255(pos) + 727: 18(fvec3) FSub 725 726 + Store 717(a) 727 + 728: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 30 729 729 16 16 + 733: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 28(DebugDeclare) 731 730(b) 42 + 734: 11(int) Load 138(index) + 735: 145(ptr) AccessChain 117 120 144 16 + 736: 82(int) Load 735 + 737: 11(int) Bitcast 736 + 738: 11(int) ISub 734 737 + 739: 11(int) ISub 738 33 + 740: 225(ptr) AccessChain 199(particleIn) 120 739 120 + 741: 80(fvec4) Load 740 + 742: 18(fvec3) VectorShuffle 741 741 0 1 2 + 743: 18(fvec3) Load 255(pos) + 744: 18(fvec3) FSub 742 743 + Store 730(b) 744 + 745: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 30 746 746 16 16 + 750: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 28(DebugDeclare) 748 747(c) 42 + 751: 11(int) Load 138(index) + 752: 145(ptr) AccessChain 117 120 144 16 + 753: 82(int) Load 752 + 754: 11(int) Bitcast 753 + 755: 11(int) ISub 751 754 + 756: 225(ptr) AccessChain 199(particleIn) 120 755 120 + 757: 80(fvec4) Load 756 + 758: 18(fvec3) VectorShuffle 757 757 0 1 2 + 759: 18(fvec3) Load 255(pos) + 760: 18(fvec3) FSub 758 759 + Store 747(c) 760 + 761: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 30 762 762 16 16 + 763: 18(fvec3) Load 717(a) + 764: 18(fvec3) Load 730(b) + 765: 18(fvec3) ExtInst 3(GLSL.std.450) 68(Cross) 763 764 + 766: 18(fvec3) Load 730(b) + 767: 18(fvec3) Load 747(c) + 768: 18(fvec3) ExtInst 3(GLSL.std.450) 68(Cross) 766 767 + 769: 18(fvec3) FAdd 765 768 + 770: 18(fvec3) Load 693(normal) + 771: 18(fvec3) FAdd 770 769 + Store 693(normal) 771 + Branch 713 + 713: Label + 772: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 23(DebugScope) 58 + 773: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 30 774 774 16 16 + 775: 137(ptr) AccessChain 55(id) 16 + 776: 11(int) Load 775 + 777: 145(ptr) AccessChain 117 120 144 16 + 778: 82(int) Load 777 + 779: 82(int) ISub 778 232 + 780: 11(int) Bitcast 779 + 782: 162(bool) ULessThan 776 780 + SelectionMerge 784 None + BranchConditional 782 783 784 + 783: Label + 785: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 23(DebugScope) 58 + 786: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 30 787 787 16 16 + 788: 11(int) Load 138(index) + 789: 145(ptr) AccessChain 117 120 144 16 + 790: 82(int) Load 789 + 791: 11(int) Bitcast 790 + 792: 11(int) ISub 788 791 + 793: 225(ptr) AccessChain 199(particleIn) 120 792 120 + 794: 80(fvec4) Load 793 + 795: 18(fvec3) VectorShuffle 794 794 0 1 2 + 796: 18(fvec3) Load 255(pos) + 797: 18(fvec3) FSub 795 796 + Store 717(a) 797 + 798: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 30 799 799 16 16 + 800: 11(int) Load 138(index) + 801: 145(ptr) AccessChain 117 120 144 16 + 802: 82(int) Load 801 + 803: 11(int) Bitcast 802 + 804: 11(int) ISub 800 803 + 805: 11(int) IAdd 804 33 + 806: 225(ptr) AccessChain 199(particleIn) 120 805 120 + 807: 80(fvec4) Load 806 + 808: 18(fvec3) VectorShuffle 807 807 0 1 2 + 809: 18(fvec3) Load 255(pos) + 810: 18(fvec3) FSub 808 809 + Store 730(b) 810 + 811: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 30 812 812 16 16 + 813: 11(int) Load 138(index) + 814: 11(int) IAdd 813 33 + 815: 225(ptr) AccessChain 199(particleIn) 120 814 120 + 816: 80(fvec4) Load 815 + 817: 18(fvec3) VectorShuffle 816 816 0 1 2 + 818: 18(fvec3) Load 255(pos) + 819: 18(fvec3) FSub 817 818 + Store 747(c) 819 + 820: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 30 821 821 16 16 + 822: 18(fvec3) Load 717(a) + 823: 18(fvec3) Load 730(b) + 824: 18(fvec3) ExtInst 3(GLSL.std.450) 68(Cross) 822 823 + 825: 18(fvec3) Load 730(b) + 826: 18(fvec3) Load 747(c) + 827: 18(fvec3) ExtInst 3(GLSL.std.450) 68(Cross) 825 826 + 828: 18(fvec3) FAdd 824 827 + 829: 18(fvec3) Load 693(normal) + 830: 18(fvec3) FAdd 829 828 + Store 693(normal) 830 + Branch 784 + 784: Label + Branch 704 + 704: Label + 831: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 23(DebugScope) 58 + 832: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 30 833 833 16 16 + 834: 137(ptr) AccessChain 55(id) 33 + 835: 11(int) Load 834 + 836: 145(ptr) AccessChain 117 120 144 33 + 837: 82(int) Load 836 + 838: 82(int) ISub 837 232 + 839: 11(int) Bitcast 838 + 841: 162(bool) ULessThan 835 839 + SelectionMerge 843 None + BranchConditional 841 842 843 + 842: Label + 844: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 23(DebugScope) 58 + 845: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 30 846 846 16 16 + 847: 137(ptr) AccessChain 55(id) 16 + 848: 11(int) Load 847 + 850: 162(bool) UGreaterThan 848 16 + SelectionMerge 852 None + BranchConditional 850 851 852 + 851: Label + 853: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 23(DebugScope) 58 + 854: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 30 855 855 16 16 + 856: 11(int) Load 138(index) + 857: 145(ptr) AccessChain 117 120 144 16 + 858: 82(int) Load 857 + 859: 11(int) Bitcast 858 + 860: 11(int) IAdd 856 859 + 861: 225(ptr) AccessChain 199(particleIn) 120 860 120 + 862: 80(fvec4) Load 861 + 863: 18(fvec3) VectorShuffle 862 862 0 1 2 + 864: 18(fvec3) Load 255(pos) + 865: 18(fvec3) FSub 863 864 + Store 717(a) 865 + 866: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 30 867 867 16 16 + 868: 11(int) Load 138(index) + 869: 145(ptr) AccessChain 117 120 144 16 + 870: 82(int) Load 869 + 871: 11(int) Bitcast 870 + 872: 11(int) IAdd 868 871 + 873: 11(int) ISub 872 33 + 874: 225(ptr) AccessChain 199(particleIn) 120 873 120 + 875: 80(fvec4) Load 874 + 876: 18(fvec3) VectorShuffle 875 875 0 1 2 + 877: 18(fvec3) Load 255(pos) + 878: 18(fvec3) FSub 876 877 + Store 730(b) 878 + 879: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 30 880 880 16 16 + 881: 11(int) Load 138(index) + 882: 11(int) ISub 881 33 + 883: 225(ptr) AccessChain 199(particleIn) 120 882 120 + 884: 80(fvec4) Load 883 + 885: 18(fvec3) VectorShuffle 884 884 0 1 2 + 886: 18(fvec3) Load 255(pos) + 887: 18(fvec3) FSub 885 886 + Store 747(c) 887 + 888: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 30 889 889 16 16 + 890: 18(fvec3) Load 717(a) + 891: 18(fvec3) Load 730(b) + 892: 18(fvec3) ExtInst 3(GLSL.std.450) 68(Cross) 890 891 + 893: 18(fvec3) Load 730(b) + 894: 18(fvec3) Load 747(c) + 895: 18(fvec3) ExtInst 3(GLSL.std.450) 68(Cross) 893 894 + 896: 18(fvec3) FAdd 892 895 + 897: 18(fvec3) Load 693(normal) + 898: 18(fvec3) FAdd 897 896 + Store 693(normal) 898 + Branch 852 + 852: Label + 899: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 23(DebugScope) 58 + 900: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 30 901 901 16 16 + 902: 137(ptr) AccessChain 55(id) 16 + 903: 11(int) Load 902 + 904: 145(ptr) AccessChain 117 120 144 16 + 905: 82(int) Load 904 + 906: 82(int) ISub 905 232 + 907: 11(int) Bitcast 906 + 909: 162(bool) ULessThan 903 907 + SelectionMerge 911 None + BranchConditional 909 910 911 + 910: Label + 912: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 23(DebugScope) 58 + 913: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 30 914 914 16 16 + 915: 11(int) Load 138(index) + 916: 11(int) IAdd 915 33 + 917: 225(ptr) AccessChain 199(particleIn) 120 916 120 + 918: 80(fvec4) Load 917 + 919: 18(fvec3) VectorShuffle 918 918 0 1 2 + 920: 18(fvec3) Load 255(pos) + 921: 18(fvec3) FSub 919 920 + Store 717(a) 921 + 922: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 30 923 923 16 16 + 924: 11(int) Load 138(index) + 925: 145(ptr) AccessChain 117 120 144 16 + 926: 82(int) Load 925 + 927: 11(int) Bitcast 926 + 928: 11(int) IAdd 924 927 + 929: 11(int) IAdd 928 33 + 930: 225(ptr) AccessChain 199(particleIn) 120 929 120 + 931: 80(fvec4) Load 930 + 932: 18(fvec3) VectorShuffle 931 931 0 1 2 + 933: 18(fvec3) Load 255(pos) + 934: 18(fvec3) FSub 932 933 + Store 730(b) 934 + 935: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 30 936 936 16 16 + 937: 11(int) Load 138(index) + 938: 145(ptr) AccessChain 117 120 144 16 + 939: 82(int) Load 938 + 940: 11(int) Bitcast 939 + 941: 11(int) IAdd 937 940 + 942: 225(ptr) AccessChain 199(particleIn) 120 941 120 + 943: 80(fvec4) Load 942 + 944: 18(fvec3) VectorShuffle 943 943 0 1 2 + 945: 18(fvec3) Load 255(pos) + 946: 18(fvec3) FSub 944 945 + Store 747(c) 946 + 947: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 30 948 948 16 16 + 949: 18(fvec3) Load 717(a) + 950: 18(fvec3) Load 730(b) + 951: 18(fvec3) ExtInst 3(GLSL.std.450) 68(Cross) 949 950 + 952: 18(fvec3) Load 730(b) + 953: 18(fvec3) Load 747(c) + 954: 18(fvec3) ExtInst 3(GLSL.std.450) 68(Cross) 952 953 + 955: 18(fvec3) FAdd 951 954 + 956: 18(fvec3) Load 693(normal) + 957: 18(fvec3) FAdd 956 955 + Store 693(normal) 957 + Branch 911 + 911: Label + Branch 843 + 843: Label + 958: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 23(DebugScope) 58 + 959: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 30 960 960 16 16 + 961: 11(int) Load 138(index) + 962: 18(fvec3) Load 693(normal) + 963: 18(fvec3) ExtInst 3(GLSL.std.450) 69(Normalize) 962 + 964: 8(float) CompositeExtract 963 0 + 965: 8(float) CompositeExtract 963 1 + 966: 8(float) CompositeExtract 963 2 + 967: 80(fvec4) CompositeConstruct 964 965 966 233 + 968: 225(ptr) AccessChain 221(particleOut) 120 961 555 + Store 968 967 + Branch 689 + 689: Label + Return + FunctionEnd diff --git a/Test/baseResults/spv.debuginfo.hlsl.frag.out b/Test/baseResults/spv.debuginfo.hlsl.frag.out new file mode 100644 index 0000000000..600976c8bf --- /dev/null +++ b/Test/baseResults/spv.debuginfo.hlsl.frag.out @@ -0,0 +1,1143 @@ +spv.debuginfo.hlsl.frag +// Module Version 10000 +// Generated by (magic number): 8000b +// Id's are bound by 886 + + Capability Shader + Capability ImageQuery + Extension "SPV_KHR_non_semantic_info" + 2: ExtInstImport "NonSemantic.Shader.DebugInfo.100" + 3: ExtInstImport "GLSL.std.450" + MemoryModel Logical GLSL450 + EntryPoint Fragment 6 "main" 879 882 + ExecutionMode 6 OriginUpperLeft + 1: String "" + 9: String "float" + 12: String "uint" + 33: String "textureProj" + 36: String "// OpModuleProcessed auto-map-locations +// OpModuleProcessed auto-map-bindings +// OpModuleProcessed entry-point main +// OpModuleProcessed client vulkan100 +// OpModuleProcessed target-env vulkan1.0 +// OpModuleProcessed keep-uncalled +// OpModuleProcessed hlsl-offsets +#line 1 +" + 44: String "P" + 48: String "layer" + 51: String "offset" + 58: String "filterPCF" + 64: String "sc" + 76: String "shadow" + 82: String "fragcolor" + 85: String "fragPos" + 91: String "@main" + 97: String "inUV" + 111: String "shadowCoord" + 136: String "bool" + 152: String "dist" + 156: String "type.2d.image" + 157: String "@type.2d.image" + 162: String "textureShadowMap" + 167: String "type.sampler" + 168: String "@type.sampler" + 172: String "samplerShadowMap" + 176: String "type.sampled.image" + 177: String "@type.sampled.image" + 224: String "sizeQueryTemp" + 229: String "int" + 236: String "texDim" + 250: String "elements" + 257: String "levels" + 266: String "scale" + 273: String "dx" + 285: String "dy" + 297: String "shadowFactor" + 303: String "count" + 310: String "range" + 317: String "x" + 339: String "y" + 403: String "i" + 423: String "shadowClip" + 435: String "color" + 441: String "viewMatrix" + 445: String "Light" + 451: String "lights" + 454: String "displayDebugTarget" + 459: String "UBO" + 462: String "ubo" + 512: String "textureposition" + 517: String "samplerposition" + 529: String "normal" + 533: String "textureNormal" + 538: String "samplerNormal" + 548: String "albedo" + 552: String "textureAlbedo" + 557: String "samplerAlbedo" + 647: String "N" + 673: String "L" + 697: String "V" + 712: String "lightCosInnerAngle" + 719: String "lightCosOuterAngle" + 726: String "lightRange" + 733: String "dir" + 749: String "cosDir" + 758: String "spotEffect" + 768: String "heightAttenuation" + 777: String "NdotL" + 787: String "diff" + 795: String "R" + 805: String "NdotR" + 815: String "spec" + Name 6 "main" + Name 32 "textureProj(vf4;f1;vf2;" + Name 29 "P" + Name 30 "layer" + Name 31 "offset" + Name 57 "filterPCF(vf4;f1;" + Name 55 "sc" + Name 56 "layer" + Name 75 "shadow(vf3;vf3;" + Name 73 "fragcolor" + Name 74 "fragPos" + Name 90 "@main(vf2;" + Name 89 "inUV" + Name 103 "shadow" + Name 109 "shadowCoord" + Name 150 "dist" + Name 160 "textureShadowMap" + Name 170 "samplerShadowMap" + Name 222 "sizeQueryTemp" + Name 234 "texDim" + Name 248 "elements" + Name 255 "levels" + Name 264 "scale" + Name 271 "dx" + Name 283 "dy" + Name 295 "shadowFactor" + Name 301 "count" + Name 308 "range" + Name 315 "x" + Name 337 "y" + Name 368 "param" + Name 370 "param" + Name 372 "param" + Name 401 "i" + Name 421 "shadowClip" + Name 433 "Light" + MemberName 433(Light) 0 "position" + MemberName 433(Light) 1 "target" + MemberName 433(Light) 2 "color" + MemberName 433(Light) 3 "viewMatrix" + Name 448 "UBO" + MemberName 448(UBO) 0 "viewPos" + MemberName 448(UBO) 1 "lights" + MemberName 448(UBO) 2 "useShadows" + MemberName 448(UBO) 3 "displayDebugTarget" + Name 460 "ubo" + MemberName 460(ubo) 0 "ubo" + Name 467 "" + Name 476 "shadowFactor" + Name 481 "param" + Name 483 "param" + Name 504 "fragPos" + Name 510 "textureposition" + Name 515 "samplerposition" + Name 527 "normal" + Name 531 "textureNormal" + Name 536 "samplerNormal" + Name 546 "albedo" + Name 550 "textureAlbedo" + Name 555 "samplerAlbedo" + Name 585 "fragcolor" + Name 589 "param" + Name 590 "param" + Name 645 "N" + Name 653 "i" + Name 671 "L" + Name 684 "dist" + Name 695 "V" + Name 710 "lightCosInnerAngle" + Name 717 "lightCosOuterAngle" + Name 724 "lightRange" + Name 731 "dir" + Name 747 "cosDir" + Name 756 "spotEffect" + Name 766 "heightAttenuation" + Name 775 "NdotL" + Name 785 "diff" + Name 793 "R" + Name 803 "NdotR" + Name 813 "spec" + Name 862 "param" + Name 864 "param" + Name 877 "inUV" + Name 879 "inUV" + Name 882 "@entryPointOutput" + Name 883 "param" + Decorate 160(textureShadowMap) DescriptorSet 0 + Decorate 160(textureShadowMap) Binding 5 + Decorate 170(samplerShadowMap) DescriptorSet 0 + Decorate 170(samplerShadowMap) Binding 5 + MemberDecorate 433(Light) 0 Offset 0 + MemberDecorate 433(Light) 1 Offset 16 + MemberDecorate 433(Light) 2 Offset 32 + MemberDecorate 433(Light) 3 RowMajor + MemberDecorate 433(Light) 3 Offset 48 + MemberDecorate 433(Light) 3 MatrixStride 16 + Decorate 446 ArrayStride 112 + MemberDecorate 448(UBO) 0 Offset 0 + MemberDecorate 448(UBO) 1 Offset 16 + MemberDecorate 448(UBO) 2 Offset 352 + MemberDecorate 448(UBO) 3 Offset 356 + MemberDecorate 460(ubo) 0 Offset 0 + Decorate 460(ubo) Block + Decorate 467 DescriptorSet 0 + Decorate 467 Binding 4 + Decorate 510(textureposition) DescriptorSet 0 + Decorate 510(textureposition) Binding 1 + Decorate 515(samplerposition) DescriptorSet 0 + Decorate 515(samplerposition) Binding 1 + Decorate 531(textureNormal) DescriptorSet 0 + Decorate 531(textureNormal) Binding 2 + Decorate 536(samplerNormal) DescriptorSet 0 + Decorate 536(samplerNormal) Binding 2 + Decorate 550(textureAlbedo) DescriptorSet 0 + Decorate 550(textureAlbedo) Binding 3 + Decorate 555(samplerAlbedo) DescriptorSet 0 + Decorate 555(samplerAlbedo) Binding 3 + Decorate 879(inUV) Location 0 + Decorate 882(@entryPointOutput) Location 0 + 4: TypeVoid + 5: TypeFunction 4 + 8: TypeFloat 32 + 11: TypeInt 32 0 + 14: 11(int) Constant 32 + 15: 11(int) Constant 6 + 16: 11(int) Constant 0 + 13: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 2(DebugTypeBasic) 12 14 15 16 + 17: 11(int) Constant 3 + 10: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 2(DebugTypeBasic) 9 14 17 16 + 18: TypeVector 8(float) 4 + 19: 11(int) Constant 4 + 20: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 6(DebugTypeVector) 10 19 + 21: TypePointer Function 18(fvec4) + 22: TypePointer Function 8(float) + 23: TypeVector 8(float) 2 + 24: 11(int) Constant 2 + 25: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 6(DebugTypeVector) 10 24 + 26: TypePointer Function 23(fvec2) + 27: TypeFunction 8(float) 21(ptr) 22(ptr) 26(ptr) + 28: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 8(DebugTypeFunction) 17 10 20 10 25 + 35: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 35(DebugSource) 1 36 + 38: 11(int) Constant 1 + 39: 11(int) Constant 5 + 37: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 1(DebugCompilationUnit) 38 19 35 39 + 34: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 20(DebugFunction) 33 28 35 16 16 37 33 17 16 + 43: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 26(DebugLocalVariable) 44 20 35 16 16 34 19 38 + 46: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 31(DebugExpression) + 47: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 26(DebugLocalVariable) 48 10 35 16 16 34 19 24 + 50: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 26(DebugLocalVariable) 51 25 35 16 16 34 19 17 + 53: TypeFunction 8(float) 21(ptr) 22(ptr) + 54: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 8(DebugTypeFunction) 17 10 20 10 + 59: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 20(DebugFunction) 58 54 35 16 16 37 58 17 16 + 63: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 26(DebugLocalVariable) 64 20 35 16 16 59 19 38 + 66: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 26(DebugLocalVariable) 48 10 35 16 16 59 19 24 + 68: TypeVector 8(float) 3 + 69: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 6(DebugTypeVector) 10 17 + 70: TypePointer Function 68(fvec3) + 71: TypeFunction 68(fvec3) 70(ptr) 70(ptr) + 72: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 8(DebugTypeFunction) 17 69 69 69 + 77: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 20(DebugFunction) 76 72 35 16 16 37 76 17 16 + 81: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 26(DebugLocalVariable) 82 69 35 16 16 77 19 38 + 84: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 26(DebugLocalVariable) 85 69 35 16 16 77 19 24 + 87: TypeFunction 18(fvec4) 26(ptr) + 88: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 8(DebugTypeFunction) 17 20 25 + 92: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 20(DebugFunction) 91 88 35 16 16 37 91 17 16 + 96: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 26(DebugLocalVariable) 97 25 35 16 16 92 19 38 + 102: 11(int) Constant 62 + 104: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 26(DebugLocalVariable) 76 10 35 102 16 34 19 + 106: 8(float) Constant 1065353216 + 108: 11(int) Constant 63 + 110: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 26(DebugLocalVariable) 111 20 35 108 16 34 19 + 119: 11(int) Constant 64 + 122: 8(float) Constant 1056964608 + 131: 11(int) Constant 66 + 134: 8(float) Constant 3212836864 + 135: TypeBool + 137: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 2(DebugTypeBasic) 136 14 24 16 + 141: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 2(DebugTypeBasic) 136 14 24 16 + 143: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 2(DebugTypeBasic) 136 14 24 16 + 149: 11(int) Constant 68 + 151: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 26(DebugLocalVariable) 152 10 35 149 16 34 19 + 154: TypeImage 8(float) 2D array sampled format:Unknown + 158: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 0(DebugInfoNone) + 155: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 10(DebugTypeComposite) 156 16 35 149 16 37 157 158 17 + 159: TypePointer UniformConstant 154 +160(textureShadowMap): 159(ptr) Variable UniformConstant + 163: 11(int) Constant 8 + 161: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 18(DebugGlobalVariable) 162 155 35 149 16 37 162 160(textureShadowMap) 163 + 165: TypeSampler + 166: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 10(DebugTypeComposite) 167 38 35 149 16 37 168 158 17 + 169: TypePointer UniformConstant 165 +170(samplerShadowMap): 169(ptr) Variable UniformConstant + 171: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 18(DebugGlobalVariable) 172 166 35 149 16 37 172 170(samplerShadowMap) 163 + 174: TypeSampledImage 154 + 175: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 10(DebugTypeComposite) 176 16 35 149 16 37 177 158 17 + 190: 11(int) Constant 69 + 193: 8(float) Constant 0 + 194: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 2(DebugTypeBasic) 136 14 24 16 + 199: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 2(DebugTypeBasic) 136 14 24 16 + 201: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 2(DebugTypeBasic) 136 14 24 16 + 207: 11(int) Constant 71 + 208: 8(float) Constant 1048576000 + 211: 11(int) Constant 74 + 218: 11(int) Constant 80 + 219: TypeVector 11(int) 3 + 220: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 6(DebugTypeVector) 13 17 + 221: TypePointer Function 219(ivec3) + 223: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 26(DebugLocalVariable) 224 220 35 218 16 59 19 + 228: TypeInt 32 1 + 230: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 2(DebugTypeBasic) 229 14 19 16 + 231: TypeVector 228(int) 2 + 232: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 6(DebugTypeVector) 230 24 + 233: TypePointer Function 231(ivec2) + 235: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 26(DebugLocalVariable) 236 232 35 218 16 59 19 + 238: TypePointer Function 11(int) + 242: TypePointer Function 228(int) + 249: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 26(DebugLocalVariable) 250 230 35 218 16 59 19 + 256: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 26(DebugLocalVariable) 257 230 35 218 16 59 19 + 263: 11(int) Constant 81 + 265: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 26(DebugLocalVariable) 266 10 35 263 16 59 19 + 268: 8(float) Constant 1069547520 + 270: 11(int) Constant 82 + 272: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 26(DebugLocalVariable) 273 10 35 270 16 59 19 + 282: 11(int) Constant 83 + 284: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 26(DebugLocalVariable) 285 10 35 282 16 59 19 + 294: 11(int) Constant 85 + 296: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 26(DebugLocalVariable) 297 10 35 294 16 59 19 + 300: 11(int) Constant 86 + 302: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 26(DebugLocalVariable) 303 230 35 300 16 59 19 + 305: 228(int) Constant 0 + 307: 11(int) Constant 87 + 309: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 26(DebugLocalVariable) 310 230 35 307 16 59 19 + 312: 228(int) Constant 1 + 314: 11(int) Constant 89 + 316: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 26(DebugLocalVariable) 317 230 35 314 16 59 19 + 332: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 2(DebugTypeBasic) 136 14 24 16 + 336: 11(int) Constant 91 + 338: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 26(DebugLocalVariable) 339 230 35 336 16 59 19 + 354: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 2(DebugTypeBasic) 136 14 24 16 + 358: 11(int) Constant 93 + 377: 11(int) Constant 94 + 390: 11(int) Constant 98 + 400: 11(int) Constant 102 + 402: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 26(DebugLocalVariable) 403 230 35 400 16 77 19 + 415: 228(int) Constant 3 + 416: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 2(DebugTypeBasic) 136 14 24 16 + 420: 11(int) Constant 104 + 422: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 26(DebugLocalVariable) 423 20 35 420 16 77 19 + 430: TypeMatrix 18(fvec4) 4 + 432: 135(bool) ConstantTrue + 431: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 108(DebugTypeMatrix) 20 19 432 + 433(Light): TypeStruct 18(fvec4) 18(fvec4) 18(fvec4) 430 + 436: 11(int) Constant 46 + 437: 11(int) Constant 14 + 434: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 11(DebugTypeMember) 435 20 35 436 437 16 16 17 + 438: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 11(DebugTypeMember) 435 20 35 436 437 16 16 17 + 439: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 11(DebugTypeMember) 435 20 35 436 437 16 16 17 + 442: 11(int) Constant 47 + 443: 11(int) Constant 21 + 440: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 11(DebugTypeMember) 441 431 35 442 443 16 16 17 + 444: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 10(DebugTypeComposite) 445 38 35 420 16 37 445 16 17 434 438 439 440 + 446: TypeArray 433(Light) 17 + 447: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 5(DebugTypeArray) 444 17 + 448(UBO): TypeStruct 18(fvec4) 446 228(int) 228(int) + 449: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 11(DebugTypeMember) 435 20 35 436 437 16 16 17 + 452: 11(int) Constant 53 + 450: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 11(DebugTypeMember) 451 447 35 452 437 16 16 17 + 455: 11(int) Constant 55 + 456: 11(int) Constant 24 + 453: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 11(DebugTypeMember) 454 230 35 455 456 16 16 17 + 457: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 11(DebugTypeMember) 454 230 35 455 456 16 16 17 + 458: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 10(DebugTypeComposite) 459 38 35 420 16 37 459 16 17 449 450 453 457 + 460(ubo): TypeStruct 448(UBO) + 463: 11(int) Constant 58 + 464: 11(int) Constant 37 + 461: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 11(DebugTypeMember) 462 458 35 463 464 16 16 17 + 465: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 10(DebugTypeComposite) 462 38 35 420 16 37 462 16 17 461 + 466: TypePointer Uniform 460(ubo) + 467: 466(ptr) Variable Uniform + 468: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 18(DebugGlobalVariable) 1 465 35 420 16 37 1 467 163 + 470: TypePointer Uniform 430 + 475: 11(int) Constant 108 + 477: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 26(DebugLocalVariable) 297 10 35 475 16 77 19 + 486: 11(int) Constant 113 + 496: 11(int) Constant 115 + 503: 11(int) Constant 121 + 505: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 26(DebugLocalVariable) 85 69 35 503 16 92 19 + 507: TypeImage 8(float) 2D sampled format:Unknown + 508: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 10(DebugTypeComposite) 156 16 35 503 16 37 157 158 17 + 509: TypePointer UniformConstant 507 +510(textureposition): 509(ptr) Variable UniformConstant + 511: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 18(DebugGlobalVariable) 512 508 35 503 16 37 512 510(textureposition) 163 + 514: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 10(DebugTypeComposite) 167 38 35 503 16 37 168 158 17 +515(samplerposition): 169(ptr) Variable UniformConstant + 516: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 18(DebugGlobalVariable) 517 514 35 503 16 37 517 515(samplerposition) 163 + 519: TypeSampledImage 507 + 520: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 10(DebugTypeComposite) 176 16 35 503 16 37 177 158 17 + 526: 11(int) Constant 122 + 528: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 26(DebugLocalVariable) 529 69 35 526 16 92 19 +531(textureNormal): 509(ptr) Variable UniformConstant + 532: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 18(DebugGlobalVariable) 533 508 35 526 16 37 533 531(textureNormal) 163 + 535: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 10(DebugTypeComposite) 167 38 35 526 16 37 168 158 17 +536(samplerNormal): 169(ptr) Variable UniformConstant + 537: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 18(DebugGlobalVariable) 538 535 35 526 16 37 538 536(samplerNormal) 163 + 545: 11(int) Constant 123 + 547: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 26(DebugLocalVariable) 548 20 35 545 16 92 19 +550(textureAlbedo): 509(ptr) Variable UniformConstant + 551: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 18(DebugGlobalVariable) 552 508 35 545 16 37 552 550(textureAlbedo) 163 + 554: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 10(DebugTypeComposite) 167 38 35 545 16 37 168 158 17 +555(samplerAlbedo): 169(ptr) Variable UniformConstant + 556: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 18(DebugGlobalVariable) 557 554 35 545 16 37 557 555(samplerAlbedo) 163 + 563: 11(int) Constant 128 + 564: TypePointer Uniform 228(int) + 567: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 2(DebugTypeBasic) 136 14 24 16 + 573: 11(int) Constant 129 + 584: 11(int) Constant 131 + 586: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 26(DebugLocalVariable) 82 69 35 584 16 92 19 + 588: 68(fvec3) ConstantComposite 106 106 106 + 594: 11(int) Constant 132 + 598: 11(int) Constant 134 + 601: 11(int) Constant 135 + 605: 11(int) Constant 137 + 608: 11(int) Constant 138 + 612: 11(int) Constant 140 + 616: 11(int) Constant 141 + 620: 11(int) Constant 143 + 624: 11(int) Constant 144 + 629: 11(int) Constant 146 + 638: 11(int) Constant 150 + 641: 8(float) Constant 1036831949 + 644: 11(int) Constant 152 + 646: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 26(DebugLocalVariable) 647 69 35 644 16 92 19 + 652: 11(int) Constant 154 + 654: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 26(DebugLocalVariable) 403 230 35 652 16 92 19 + 666: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 2(DebugTypeBasic) 136 14 24 16 + 670: 11(int) Constant 157 + 672: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 26(DebugLocalVariable) 673 69 35 670 16 92 19 + 676: TypePointer Uniform 18(fvec4) + 683: 11(int) Constant 159 + 685: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 26(DebugLocalVariable) 152 10 35 683 16 92 19 + 690: 11(int) Constant 160 + 694: 11(int) Constant 163 + 696: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 26(DebugLocalVariable) 697 69 35 694 16 92 19 + 705: 11(int) Constant 164 + 709: 11(int) Constant 166 + 711: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 26(DebugLocalVariable) 712 10 35 709 16 92 19 + 714: 8(float) Constant 1064781546 + 716: 11(int) Constant 167 + 718: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 26(DebugLocalVariable) 719 10 35 716 16 92 19 + 721: 8(float) Constant 1063781322 + 723: 11(int) Constant 168 + 725: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 26(DebugLocalVariable) 726 10 35 723 16 92 19 + 728: 8(float) Constant 1120403456 + 730: 11(int) Constant 171 + 732: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 26(DebugLocalVariable) 733 69 35 730 16 92 19 + 746: 11(int) Constant 174 + 748: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 26(DebugLocalVariable) 749 10 35 746 16 92 19 + 755: 11(int) Constant 175 + 757: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 26(DebugLocalVariable) 758 10 35 755 16 92 19 + 765: 11(int) Constant 176 + 767: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 26(DebugLocalVariable) 768 10 35 765 16 92 19 + 774: 11(int) Constant 179 + 776: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 26(DebugLocalVariable) 777 10 35 774 16 92 19 + 784: 11(int) Constant 180 + 786: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 26(DebugLocalVariable) 787 69 35 784 16 92 19 + 792: 11(int) Constant 183 + 794: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 26(DebugLocalVariable) 795 69 35 792 16 92 19 + 802: 11(int) Constant 184 + 804: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 26(DebugLocalVariable) 805 10 35 802 16 92 19 + 812: 11(int) Constant 185 + 814: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 26(DebugLocalVariable) 815 69 35 812 16 92 19 + 818: 8(float) Constant 1098907648 + 823: 8(float) Constant 1075838976 + 827: 11(int) Constant 187 + 836: 228(int) Constant 2 + 852: 11(int) Constant 191 + 855: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 2(DebugTypeBasic) 136 14 24 16 + 861: 11(int) Constant 193 + 869: 11(int) Constant 196 + 878: TypePointer Input 23(fvec2) + 879(inUV): 878(ptr) Variable Input + 881: TypePointer Output 18(fvec4) +882(@entryPointOutput): 881(ptr) Variable Output + Line 1 119 1 + 6(main): 4 Function None 5 + 7: Label + 877(inUV): 26(ptr) Variable Function + 883(param): 26(ptr) Variable Function + Line 1 119 0 + 880: 23(fvec2) Load 879(inUV) + Store 877(inUV) 880 + 884: 23(fvec2) Load 877(inUV) + Store 883(param) 884 + 885: 18(fvec4) FunctionCall 90(@main(vf2;) 883(param) + Store 882(@entryPointOutput) 885 + Return + FunctionEnd + Line 1 61 1 +32(textureProj(vf4;f1;vf2;): 8(float) Function None 27 + 29(P): 21(ptr) FunctionParameter + 30(layer): 22(ptr) FunctionParameter + 31(offset): 26(ptr) FunctionParameter + 40: Label + 103(shadow): 22(ptr) Variable Function +109(shadowCoord): 21(ptr) Variable Function + 150(dist): 22(ptr) Variable Function + 41: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 23(DebugScope) 34 + 42: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 35 16 16 16 16 + 45: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 28(DebugDeclare) 43 29(P) 46 + 49: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 28(DebugDeclare) 47 30(layer) 46 + 52: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 28(DebugDeclare) 50 31(offset) 46 + 99: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 101(DebugFunctionDefinition) 34 32(textureProj(vf4;f1;vf2;) + 100: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 23(DebugScope) 34 + 101: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 35 102 102 16 16 + 105: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 28(DebugDeclare) 104 103(shadow) 46 + Store 103(shadow) 106 + 107: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 35 108 108 16 16 + 112: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 28(DebugDeclare) 110 109(shadowCoord) 46 + 113: 18(fvec4) Load 29(P) + 114: 22(ptr) AccessChain 29(P) 17 + 115: 8(float) Load 114 + 116: 18(fvec4) CompositeConstruct 115 115 115 115 + 117: 18(fvec4) FDiv 113 116 + Store 109(shadowCoord) 117 + 118: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 35 119 119 16 16 + 120: 18(fvec4) Load 109(shadowCoord) + 121: 23(fvec2) VectorShuffle 120 120 0 1 + 123: 23(fvec2) VectorTimesScalar 121 122 + 124: 23(fvec2) CompositeConstruct 122 122 + 125: 23(fvec2) FAdd 123 124 + 126: 22(ptr) AccessChain 109(shadowCoord) 16 + 127: 8(float) CompositeExtract 125 0 + Store 126 127 + 128: 22(ptr) AccessChain 109(shadowCoord) 38 + 129: 8(float) CompositeExtract 125 1 + Store 128 129 + 130: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 35 131 131 16 16 + 132: 22(ptr) AccessChain 109(shadowCoord) 24 + 133: 8(float) Load 132 + 138: 135(bool) FOrdGreaterThan 133 134 + 139: 22(ptr) AccessChain 109(shadowCoord) 24 + 140: 8(float) Load 139 + 142: 135(bool) FOrdLessThan 140 106 + 144: 135(bool) LogicalAnd 138 142 + SelectionMerge 146 None + BranchConditional 144 145 146 + 145: Label + 147: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 23(DebugScope) 34 + 148: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 35 149 149 16 16 + 153: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 28(DebugDeclare) 151 150(dist) 46 + 164: 154 Load 160(textureShadowMap) + 173: 165 Load 170(samplerShadowMap) + 178: 174 SampledImage 164 173 + 179: 18(fvec4) Load 109(shadowCoord) + 180: 23(fvec2) VectorShuffle 179 179 0 1 + 181: 23(fvec2) Load 31(offset) + 182: 23(fvec2) FAdd 180 181 + 183: 8(float) Load 30(layer) + 184: 8(float) CompositeExtract 182 0 + 185: 8(float) CompositeExtract 182 1 + 186: 68(fvec3) CompositeConstruct 184 185 183 + 187: 18(fvec4) ImageSampleImplicitLod 178 186 + 188: 8(float) CompositeExtract 187 0 + Store 150(dist) 188 + 189: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 35 190 190 16 16 + 191: 22(ptr) AccessChain 109(shadowCoord) 17 + 192: 8(float) Load 191 + 195: 135(bool) FOrdGreaterThan 192 193 + 196: 8(float) Load 150(dist) + 197: 22(ptr) AccessChain 109(shadowCoord) 24 + 198: 8(float) Load 197 + 200: 135(bool) FOrdLessThan 196 198 + 202: 135(bool) LogicalAnd 195 200 + SelectionMerge 204 None + BranchConditional 202 203 204 + 203: Label + 205: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 23(DebugScope) 34 + 206: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 35 207 207 16 16 + Store 103(shadow) 208 + Branch 204 + 204: Label + Branch 146 + 146: Label + 209: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 23(DebugScope) 34 + 210: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 35 211 211 16 16 + 212: 8(float) Load 103(shadow) + ReturnValue 212 + FunctionEnd + Line 1 78 1 +57(filterPCF(vf4;f1;): 8(float) Function None 53 + 55(sc): 21(ptr) FunctionParameter + 56(layer): 22(ptr) FunctionParameter + 60: Label +222(sizeQueryTemp): 221(ptr) Variable Function + 234(texDim): 233(ptr) Variable Function + 248(elements): 242(ptr) Variable Function + 255(levels): 242(ptr) Variable Function + 264(scale): 22(ptr) Variable Function + 271(dx): 22(ptr) Variable Function + 283(dy): 22(ptr) Variable Function +295(shadowFactor): 22(ptr) Variable Function + 301(count): 242(ptr) Variable Function + 308(range): 242(ptr) Variable Function + 315(x): 242(ptr) Variable Function + 337(y): 242(ptr) Variable Function + 368(param): 21(ptr) Variable Function + 370(param): 22(ptr) Variable Function + 372(param): 26(ptr) Variable Function + 61: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 23(DebugScope) 59 + 62: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 35 16 16 16 16 + 65: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 28(DebugDeclare) 63 55(sc) 46 + 67: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 28(DebugDeclare) 66 56(layer) 46 + 215: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 101(DebugFunctionDefinition) 59 57(filterPCF(vf4;f1;) + 216: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 23(DebugScope) 59 + 217: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 35 218 218 16 16 + 225: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 28(DebugDeclare) 223 222(sizeQueryTemp) 46 + 226: 154 Load 160(textureShadowMap) + 227: 219(ivec3) ImageQuerySizeLod 226 16 + Store 222(sizeQueryTemp) 227 + 237: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 28(DebugDeclare) 235 234(texDim) 46 + 239: 238(ptr) AccessChain 222(sizeQueryTemp) 16 + 240: 11(int) Load 239 + 241: 228(int) Bitcast 240 + 243: 242(ptr) AccessChain 234(texDim) 16 + Store 243 241 + 244: 238(ptr) AccessChain 222(sizeQueryTemp) 38 + 245: 11(int) Load 244 + 246: 228(int) Bitcast 245 + 247: 242(ptr) AccessChain 234(texDim) 38 + Store 247 246 + 251: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 28(DebugDeclare) 249 248(elements) 46 + 252: 238(ptr) AccessChain 222(sizeQueryTemp) 24 + 253: 11(int) Load 252 + 254: 228(int) Bitcast 253 + Store 248(elements) 254 + 258: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 28(DebugDeclare) 256 255(levels) 46 + 259: 154 Load 160(textureShadowMap) + 260: 11(int) ImageQueryLevels 259 + 261: 228(int) Bitcast 260 + Store 255(levels) 261 + 262: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 35 263 263 16 16 + 267: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 28(DebugDeclare) 265 264(scale) 46 + Store 264(scale) 268 + 269: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 35 270 270 16 16 + 274: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 28(DebugDeclare) 272 271(dx) 46 + 275: 8(float) Load 264(scale) + 276: 8(float) FMul 275 106 + 277: 242(ptr) AccessChain 234(texDim) 16 + 278: 228(int) Load 277 + 279: 8(float) ConvertSToF 278 + 280: 8(float) FDiv 276 279 + Store 271(dx) 280 + 281: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 35 282 282 16 16 + 286: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 28(DebugDeclare) 284 283(dy) 46 + 287: 8(float) Load 264(scale) + 288: 8(float) FMul 287 106 + 289: 242(ptr) AccessChain 234(texDim) 38 + 290: 228(int) Load 289 + 291: 8(float) ConvertSToF 290 + 292: 8(float) FDiv 288 291 + Store 283(dy) 292 + 293: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 35 294 294 16 16 + 298: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 28(DebugDeclare) 296 295(shadowFactor) 46 + Store 295(shadowFactor) 193 + 299: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 35 300 300 16 16 + 304: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 28(DebugDeclare) 302 301(count) 46 + Store 301(count) 305 + 306: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 35 307 307 16 16 + 311: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 28(DebugDeclare) 309 308(range) 46 + Store 308(range) 312 + 313: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 35 314 314 16 16 + 318: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 28(DebugDeclare) 316 315(x) 46 + 319: 228(int) Load 308(range) + 320: 228(int) SNegate 319 + Store 315(x) 320 + Branch 321 + 321: Label + 325: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 23(DebugScope) 59 + 326: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 35 314 314 16 16 + LoopMerge 323 324 None + Branch 327 + 327: Label + 328: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 23(DebugScope) 59 + 329: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 35 314 314 16 16 + 330: 228(int) Load 315(x) + 331: 228(int) Load 308(range) + 333: 135(bool) SLessThanEqual 330 331 + BranchConditional 333 322 323 + 322: Label + 334: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 23(DebugScope) 59 + 335: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 35 336 336 16 16 + 340: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 28(DebugDeclare) 338 337(y) 46 + 341: 228(int) Load 308(range) + 342: 228(int) SNegate 341 + Store 337(y) 342 + Branch 343 + 343: Label + 347: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 23(DebugScope) 59 + 348: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 35 336 336 16 16 + LoopMerge 345 346 None + Branch 349 + 349: Label + 350: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 23(DebugScope) 59 + 351: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 35 336 336 16 16 + 352: 228(int) Load 337(y) + 353: 228(int) Load 308(range) + 355: 135(bool) SLessThanEqual 352 353 + BranchConditional 355 344 345 + 344: Label + 356: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 23(DebugScope) 59 + 357: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 35 358 358 16 16 + 359: 8(float) Load 271(dx) + 360: 228(int) Load 315(x) + 361: 8(float) ConvertSToF 360 + 362: 8(float) FMul 359 361 + 363: 8(float) Load 283(dy) + 364: 228(int) Load 337(y) + 365: 8(float) ConvertSToF 364 + 366: 8(float) FMul 363 365 + 367: 23(fvec2) CompositeConstruct 362 366 + 369: 18(fvec4) Load 55(sc) + Store 368(param) 369 + 371: 8(float) Load 56(layer) + Store 370(param) 371 + Store 372(param) 367 + 373: 8(float) FunctionCall 32(textureProj(vf4;f1;vf2;) 368(param) 370(param) 372(param) + 374: 8(float) Load 295(shadowFactor) + 375: 8(float) FAdd 374 373 + Store 295(shadowFactor) 375 + 376: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 35 377 377 16 16 + 378: 228(int) Load 301(count) + 379: 228(int) IAdd 378 312 + Store 301(count) 379 + Branch 346 + 346: Label + 380: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 23(DebugScope) 59 + 381: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 35 336 336 16 16 + 382: 228(int) Load 337(y) + 383: 228(int) IAdd 382 312 + Store 337(y) 383 + Branch 343 + 345: Label + Branch 324 + 324: Label + 384: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 23(DebugScope) 59 + 385: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 35 314 314 16 16 + 386: 228(int) Load 315(x) + 387: 228(int) IAdd 386 312 + Store 315(x) 387 + Branch 321 + 323: Label + 388: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 23(DebugScope) 59 + 389: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 35 390 390 16 16 + 391: 8(float) Load 295(shadowFactor) + 392: 228(int) Load 301(count) + 393: 8(float) ConvertSToF 392 + 394: 8(float) FDiv 391 393 + ReturnValue 394 + FunctionEnd + Line 1 101 49 +75(shadow(vf3;vf3;): 68(fvec3) Function None 71 + 73(fragcolor): 70(ptr) FunctionParameter + 74(fragPos): 70(ptr) FunctionParameter + 78: Label + 401(i): 242(ptr) Variable Function + 421(shadowClip): 21(ptr) Variable Function +476(shadowFactor): 22(ptr) Variable Function + 481(param): 21(ptr) Variable Function + 483(param): 22(ptr) Variable Function + 79: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 23(DebugScope) 77 + 80: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 35 16 16 16 16 + 83: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 28(DebugDeclare) 81 73(fragcolor) 46 + 86: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 28(DebugDeclare) 84 74(fragPos) 46 + 397: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 101(DebugFunctionDefinition) 77 75(shadow(vf3;vf3;) + 398: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 23(DebugScope) 77 + 399: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 35 400 400 16 16 + 404: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 28(DebugDeclare) 402 401(i) 46 + Store 401(i) 305 + Branch 405 + 405: Label + 409: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 23(DebugScope) 77 + 410: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 35 400 400 16 16 + LoopMerge 407 408 None + Branch 411 + 411: Label + 412: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 23(DebugScope) 77 + 413: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 35 400 400 16 16 + 414: 228(int) Load 401(i) + 417: 135(bool) SLessThan 414 415 + BranchConditional 417 406 407 + 406: Label + 418: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 23(DebugScope) 77 + 419: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 35 420 420 16 16 + 424: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 28(DebugDeclare) 422 421(shadowClip) 46 + 425: 68(fvec3) Load 74(fragPos) + 426: 8(float) CompositeExtract 425 0 + 427: 8(float) CompositeExtract 425 1 + 428: 8(float) CompositeExtract 425 2 + 429: 18(fvec4) CompositeConstruct 426 427 428 106 + 469: 228(int) Load 401(i) + 471: 470(ptr) AccessChain 467 305 312 469 415 + 472: 430 Load 471 + 473: 18(fvec4) VectorTimesMatrix 429 472 + Store 421(shadowClip) 473 + 474: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 35 475 475 16 16 + 478: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 28(DebugDeclare) 477 476(shadowFactor) 46 + 479: 228(int) Load 401(i) + 480: 8(float) ConvertSToF 479 + 482: 18(fvec4) Load 421(shadowClip) + Store 481(param) 482 + Store 483(param) 480 + 484: 8(float) FunctionCall 57(filterPCF(vf4;f1;) 481(param) 483(param) + Store 476(shadowFactor) 484 + 485: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 35 486 486 16 16 + 487: 8(float) Load 476(shadowFactor) + 488: 68(fvec3) Load 73(fragcolor) + 489: 68(fvec3) VectorTimesScalar 488 487 + Store 73(fragcolor) 489 + Branch 408 + 408: Label + 490: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 23(DebugScope) 77 + 491: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 35 400 400 16 16 + 492: 228(int) Load 401(i) + 493: 228(int) IAdd 492 312 + Store 401(i) 493 + Branch 405 + 407: Label + 494: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 23(DebugScope) 77 + 495: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 35 496 496 16 16 + 497: 68(fvec3) Load 73(fragcolor) + ReturnValue 497 + FunctionEnd + Line 1 119 1 + 90(@main(vf2;): 18(fvec4) Function None 87 + 89(inUV): 26(ptr) FunctionParameter + 93: Label + 504(fragPos): 70(ptr) Variable Function + 527(normal): 70(ptr) Variable Function + 546(albedo): 21(ptr) Variable Function + 585(fragcolor): 70(ptr) Variable Function + 589(param): 70(ptr) Variable Function + 590(param): 70(ptr) Variable Function + 645(N): 70(ptr) Variable Function + 653(i): 242(ptr) Variable Function + 671(L): 70(ptr) Variable Function + 684(dist): 22(ptr) Variable Function + 695(V): 70(ptr) Variable Function +710(lightCosInnerAngle): 22(ptr) Variable Function +717(lightCosOuterAngle): 22(ptr) Variable Function + 724(lightRange): 22(ptr) Variable Function + 731(dir): 70(ptr) Variable Function + 747(cosDir): 22(ptr) Variable Function + 756(spotEffect): 22(ptr) Variable Function +766(heightAttenuation): 22(ptr) Variable Function + 775(NdotL): 22(ptr) Variable Function + 785(diff): 70(ptr) Variable Function + 793(R): 70(ptr) Variable Function + 803(NdotR): 22(ptr) Variable Function + 813(spec): 70(ptr) Variable Function + 862(param): 70(ptr) Variable Function + 864(param): 70(ptr) Variable Function + 94: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 23(DebugScope) 92 + 95: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 35 16 16 16 16 + 98: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 28(DebugDeclare) 96 89(inUV) 46 + 500: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 101(DebugFunctionDefinition) 92 90(@main(vf2;) + 501: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 23(DebugScope) 92 + 502: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 35 503 503 16 16 + 506: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 28(DebugDeclare) 505 504(fragPos) 46 + 513: 507 Load 510(textureposition) + 518: 165 Load 515(samplerposition) + 521: 519 SampledImage 513 518 + 522: 23(fvec2) Load 89(inUV) + 523: 18(fvec4) ImageSampleImplicitLod 521 522 + 524: 68(fvec3) VectorShuffle 523 523 0 1 2 + Store 504(fragPos) 524 + 525: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 35 526 526 16 16 + 530: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 28(DebugDeclare) 528 527(normal) 46 + 534: 507 Load 531(textureNormal) + 539: 165 Load 536(samplerNormal) + 540: 519 SampledImage 534 539 + 541: 23(fvec2) Load 89(inUV) + 542: 18(fvec4) ImageSampleImplicitLod 540 541 + 543: 68(fvec3) VectorShuffle 542 542 0 1 2 + Store 527(normal) 543 + 544: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 35 545 545 16 16 + 549: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 28(DebugDeclare) 547 546(albedo) 46 + 553: 507 Load 550(textureAlbedo) + 558: 165 Load 555(samplerAlbedo) + 559: 519 SampledImage 553 558 + 560: 23(fvec2) Load 89(inUV) + 561: 18(fvec4) ImageSampleImplicitLod 559 560 + Store 546(albedo) 561 + 562: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 35 563 563 16 16 + 565: 564(ptr) AccessChain 467 305 415 + 566: 228(int) Load 565 + 568: 135(bool) SGreaterThan 566 305 + SelectionMerge 570 None + BranchConditional 568 569 570 + 569: Label + 571: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 23(DebugScope) 92 + 572: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 35 573 573 16 16 + 574: 564(ptr) AccessChain 467 305 415 + 575: 228(int) Load 574 + SelectionMerge 581 None + Switch 575 581 + case 1: 576 + case 2: 577 + case 3: 578 + case 4: 579 + case 5: 580 + 576: Label + 582: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 23(DebugScope) 92 + 583: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 35 584 584 16 16 + 587: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 28(DebugDeclare) 586 585(fragcolor) 46 + Store 589(param) 588 + 591: 68(fvec3) Load 504(fragPos) + Store 590(param) 591 + 592: 68(fvec3) FunctionCall 75(shadow(vf3;vf3;) 589(param) 590(param) + Store 585(fragcolor) 592 + 593: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 35 594 594 16 16 + Branch 581 + 577: Label + 596: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 23(DebugScope) 92 + 597: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 35 598 598 16 16 + 599: 68(fvec3) Load 504(fragPos) + Store 585(fragcolor) 599 + 600: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 35 601 601 16 16 + Branch 581 + 578: Label + 603: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 23(DebugScope) 92 + 604: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 35 605 605 16 16 + 606: 68(fvec3) Load 527(normal) + Store 585(fragcolor) 606 + 607: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 35 608 608 16 16 + Branch 581 + 579: Label + 610: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 23(DebugScope) 92 + 611: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 35 612 612 16 16 + 613: 18(fvec4) Load 546(albedo) + 614: 68(fvec3) VectorShuffle 613 613 0 1 2 + Store 585(fragcolor) 614 + 615: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 35 616 616 16 16 + Branch 581 + 580: Label + 618: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 23(DebugScope) 92 + 619: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 35 620 620 16 16 + 621: 18(fvec4) Load 546(albedo) + 622: 68(fvec3) VectorShuffle 621 621 3 3 3 + Store 585(fragcolor) 622 + 623: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 35 624 624 16 16 + Branch 581 + 581: Label + 627: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 23(DebugScope) 92 + 628: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 35 629 629 16 16 + 630: 68(fvec3) Load 585(fragcolor) + 631: 8(float) CompositeExtract 630 0 + 632: 8(float) CompositeExtract 630 1 + 633: 8(float) CompositeExtract 630 2 + 634: 18(fvec4) CompositeConstruct 631 632 633 106 + ReturnValue 634 + 570: Label + 636: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 23(DebugScope) 92 + 637: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 35 638 638 16 16 + 639: 18(fvec4) Load 546(albedo) + 640: 68(fvec3) VectorShuffle 639 639 0 1 2 + 642: 68(fvec3) VectorTimesScalar 640 641 + Store 585(fragcolor) 642 + 643: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 35 644 644 16 16 + 648: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 28(DebugDeclare) 646 645(N) 46 + 649: 68(fvec3) Load 527(normal) + 650: 68(fvec3) ExtInst 3(GLSL.std.450) 69(Normalize) 649 + Store 645(N) 650 + 651: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 35 652 652 16 16 + 655: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 28(DebugDeclare) 654 653(i) 46 + Store 653(i) 305 + Branch 656 + 656: Label + 660: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 23(DebugScope) 92 + 661: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 35 652 652 16 16 + LoopMerge 658 659 None + Branch 662 + 662: Label + 663: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 23(DebugScope) 92 + 664: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 35 652 652 16 16 + 665: 228(int) Load 653(i) + 667: 135(bool) SLessThan 665 415 + BranchConditional 667 657 658 + 657: Label + 668: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 23(DebugScope) 92 + 669: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 35 670 670 16 16 + 674: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 28(DebugDeclare) 672 671(L) 46 + 675: 228(int) Load 653(i) + 677: 676(ptr) AccessChain 467 305 312 675 305 + 678: 18(fvec4) Load 677 + 679: 68(fvec3) VectorShuffle 678 678 0 1 2 + 680: 68(fvec3) Load 504(fragPos) + 681: 68(fvec3) FSub 679 680 + Store 671(L) 681 + 682: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 35 683 683 16 16 + 686: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 28(DebugDeclare) 685 684(dist) 46 + 687: 68(fvec3) Load 671(L) + 688: 8(float) ExtInst 3(GLSL.std.450) 66(Length) 687 + Store 684(dist) 688 + 689: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 35 690 690 16 16 + 691: 68(fvec3) Load 671(L) + 692: 68(fvec3) ExtInst 3(GLSL.std.450) 69(Normalize) 691 + Store 671(L) 692 + 693: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 35 694 694 16 16 + 698: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 28(DebugDeclare) 696 695(V) 46 + 699: 676(ptr) AccessChain 467 305 305 + 700: 18(fvec4) Load 699 + 701: 68(fvec3) VectorShuffle 700 700 0 1 2 + 702: 68(fvec3) Load 504(fragPos) + 703: 68(fvec3) FSub 701 702 + Store 695(V) 703 + 704: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 35 705 705 16 16 + 706: 68(fvec3) Load 695(V) + 707: 68(fvec3) ExtInst 3(GLSL.std.450) 69(Normalize) 706 + Store 695(V) 707 + 708: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 35 709 709 16 16 + 713: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 28(DebugDeclare) 711 710(lightCosInnerAngle) 46 + Store 710(lightCosInnerAngle) 714 + 715: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 35 716 716 16 16 + 720: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 28(DebugDeclare) 718 717(lightCosOuterAngle) 46 + Store 717(lightCosOuterAngle) 721 + 722: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 35 723 723 16 16 + 727: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 28(DebugDeclare) 725 724(lightRange) 46 + Store 724(lightRange) 728 + 729: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 35 730 730 16 16 + 734: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 28(DebugDeclare) 732 731(dir) 46 + 735: 228(int) Load 653(i) + 736: 676(ptr) AccessChain 467 305 312 735 305 + 737: 18(fvec4) Load 736 + 738: 68(fvec3) VectorShuffle 737 737 0 1 2 + 739: 228(int) Load 653(i) + 740: 676(ptr) AccessChain 467 305 312 739 312 + 741: 18(fvec4) Load 740 + 742: 68(fvec3) VectorShuffle 741 741 0 1 2 + 743: 68(fvec3) FSub 738 742 + 744: 68(fvec3) ExtInst 3(GLSL.std.450) 69(Normalize) 743 + Store 731(dir) 744 + 745: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 35 746 746 16 16 + 750: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 28(DebugDeclare) 748 747(cosDir) 46 + 751: 68(fvec3) Load 671(L) + 752: 68(fvec3) Load 731(dir) + 753: 8(float) Dot 751 752 + Store 747(cosDir) 753 + 754: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 35 755 755 16 16 + 759: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 28(DebugDeclare) 757 756(spotEffect) 46 + 760: 8(float) Load 717(lightCosOuterAngle) + 761: 8(float) Load 710(lightCosInnerAngle) + 762: 8(float) Load 747(cosDir) + 763: 8(float) ExtInst 3(GLSL.std.450) 49(SmoothStep) 760 761 762 + Store 756(spotEffect) 763 + 764: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 35 765 765 16 16 + 769: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 28(DebugDeclare) 767 766(heightAttenuation) 46 + 770: 8(float) Load 724(lightRange) + 771: 8(float) Load 684(dist) + 772: 8(float) ExtInst 3(GLSL.std.450) 49(SmoothStep) 770 193 771 + Store 766(heightAttenuation) 772 + 773: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 35 774 774 16 16 + 778: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 28(DebugDeclare) 776 775(NdotL) 46 + 779: 68(fvec3) Load 645(N) + 780: 68(fvec3) Load 671(L) + 781: 8(float) Dot 779 780 + 782: 8(float) ExtInst 3(GLSL.std.450) 40(FMax) 193 781 + Store 775(NdotL) 782 + 783: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 35 784 784 16 16 + 788: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 28(DebugDeclare) 786 785(diff) 46 + 789: 8(float) Load 775(NdotL) + 790: 68(fvec3) CompositeConstruct 789 789 789 + Store 785(diff) 790 + 791: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 35 792 792 16 16 + 796: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 28(DebugDeclare) 794 793(R) 46 + 797: 68(fvec3) Load 671(L) + 798: 68(fvec3) FNegate 797 + 799: 68(fvec3) Load 645(N) + 800: 68(fvec3) ExtInst 3(GLSL.std.450) 71(Reflect) 798 799 + Store 793(R) 800 + 801: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 35 802 802 16 16 + 806: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 28(DebugDeclare) 804 803(NdotR) 46 + 807: 68(fvec3) Load 793(R) + 808: 68(fvec3) Load 695(V) + 809: 8(float) Dot 807 808 + 810: 8(float) ExtInst 3(GLSL.std.450) 40(FMax) 193 809 + Store 803(NdotR) 810 + 811: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 35 812 812 16 16 + 816: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 28(DebugDeclare) 814 813(spec) 46 + 817: 8(float) Load 803(NdotR) + 819: 8(float) ExtInst 3(GLSL.std.450) 26(Pow) 817 818 + 820: 22(ptr) AccessChain 546(albedo) 17 + 821: 8(float) Load 820 + 822: 8(float) FMul 819 821 + 824: 8(float) FMul 822 823 + 825: 68(fvec3) CompositeConstruct 824 824 824 + Store 813(spec) 825 + 826: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 35 827 827 16 16 + 828: 68(fvec3) Load 785(diff) + 829: 68(fvec3) Load 813(spec) + 830: 68(fvec3) FAdd 828 829 + 831: 8(float) Load 756(spotEffect) + 832: 68(fvec3) VectorTimesScalar 830 831 + 833: 8(float) Load 766(heightAttenuation) + 834: 68(fvec3) VectorTimesScalar 832 833 + 835: 228(int) Load 653(i) + 837: 676(ptr) AccessChain 467 305 312 835 836 + 838: 18(fvec4) Load 837 + 839: 68(fvec3) VectorShuffle 838 838 0 1 2 + 840: 68(fvec3) FMul 834 839 + 841: 18(fvec4) Load 546(albedo) + 842: 68(fvec3) VectorShuffle 841 841 0 1 2 + 843: 68(fvec3) FMul 840 842 + 844: 68(fvec3) Load 585(fragcolor) + 845: 68(fvec3) FAdd 844 843 + Store 585(fragcolor) 845 + Branch 659 + 659: Label + 846: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 23(DebugScope) 92 + 847: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 35 652 652 16 16 + 848: 228(int) Load 653(i) + 849: 228(int) IAdd 848 312 + Store 653(i) 849 + Branch 656 + 658: Label + 850: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 23(DebugScope) 92 + 851: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 35 852 852 16 16 + 853: 564(ptr) AccessChain 467 305 836 + 854: 228(int) Load 853 + 856: 135(bool) SGreaterThan 854 305 + SelectionMerge 858 None + BranchConditional 856 857 858 + 857: Label + 859: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 23(DebugScope) 92 + 860: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 35 861 861 16 16 + 863: 68(fvec3) Load 585(fragcolor) + Store 862(param) 863 + 865: 68(fvec3) Load 504(fragPos) + Store 864(param) 865 + 866: 68(fvec3) FunctionCall 75(shadow(vf3;vf3;) 862(param) 864(param) + Store 585(fragcolor) 866 + Branch 858 + 858: Label + 867: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 23(DebugScope) 92 + 868: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 35 869 869 16 16 + 870: 68(fvec3) Load 585(fragcolor) + 871: 8(float) CompositeExtract 870 0 + 872: 8(float) CompositeExtract 870 1 + 873: 8(float) CompositeExtract 870 2 + 874: 18(fvec4) CompositeConstruct 871 872 873 106 + ReturnValue 874 + FunctionEnd diff --git a/Test/baseResults/spv.debuginfo.hlsl.geom.out b/Test/baseResults/spv.debuginfo.hlsl.geom.out new file mode 100644 index 0000000000..c4d39a1fed --- /dev/null +++ b/Test/baseResults/spv.debuginfo.hlsl.geom.out @@ -0,0 +1,499 @@ +spv.debuginfo.hlsl.geom +// Module Version 10000 +// Generated by (magic number): 8000b +// Id's are bound by 353 + + Capability Geometry + Capability MultiViewport + Extension "SPV_KHR_non_semantic_info" + 2: ExtInstImport "NonSemantic.Shader.DebugInfo.100" + 3: ExtInstImport "GLSL.std.450" + MemoryModel Logical GLSL450 + EntryPoint Geometry 6 "main" 255 261 266 272 277 282 287 302 309 314 338 341 + ExecutionMode 6 Triangles + ExecutionMode 6 Invocations 2 + ExecutionMode 6 OutputTriangleStrip + ExecutionMode 6 OutputVertices 3 + 1: String "" + 9: String "float" + 12: String "uint" + 25: String "Pos" + 27: String "// OpModuleProcessed auto-map-locations +// OpModuleProcessed auto-map-bindings +// OpModuleProcessed entry-point main +// OpModuleProcessed client vulkan100 +// OpModuleProcessed target-env vulkan1.0 +// OpModuleProcessed keep-uncalled +// OpModuleProcessed hlsl-offsets +#line 1 +" + 31: String "Color" + 36: String "VSOutput" + 47: String "PrimitiveID" + 52: String "LightVec" + 58: String "GSOutput" + 68: String "@main" + 74: String "input" + 78: String "outStream" + 82: String "InvocationID" + 91: String "int" + 96: String "i" + 111: String "bool" + 119: String "output" + 141: String "projection" + 145: String "modelview" + 149: String "lightPos" + 153: String "UBO" + 156: String "ubo" + 191: String "pos" + 200: String "worldPos" + 211: String "lPos" + 257: String "outStream.Pos" + 263: String "outStream.ViewportIndex" + 268: String "outStream.PrimitiveID" + 274: String "outStream.Normal" + 279: String "outStream.Color" + 284: String "outStream.ViewVec" + 289: String "outStream.LightVec" + Name 6 "main" + Name 23 "VSOutput" + MemberName 23(VSOutput) 0 "Pos" + MemberName 23(VSOutput) 1 "Normal" + MemberName 23(VSOutput) 2 "Color" + Name 43 "GSOutput" + MemberName 43(GSOutput) 0 "Pos" + MemberName 43(GSOutput) 1 "ViewportIndex" + MemberName 43(GSOutput) 2 "PrimitiveID" + MemberName 43(GSOutput) 3 "Normal" + MemberName 43(GSOutput) 4 "Color" + MemberName 43(GSOutput) 5 "ViewVec" + MemberName 43(GSOutput) 6 "LightVec" + Name 67 "@main(struct-VSOutput-vf4-vf3-vf31[3];struct-GSOutput-vf4-u1-u1-vf3-vf3-vf3-vf31;u1;u1;" + Name 63 "input" + Name 64 "outStream" + Name 65 "InvocationID" + Name 66 "PrimitiveID" + Name 94 "i" + Name 117 "output" + Name 139 "UBO" + MemberName 139(UBO) 0 "projection" + MemberName 139(UBO) 1 "modelview" + MemberName 139(UBO) 2 "lightPos" + Name 154 "ubo" + MemberName 154(ubo) 0 "ubo" + Name 160 "" + Name 189 "pos" + Name 198 "worldPos" + Name 209 "lPos" + Name 255 "outStream.Pos" + Name 261 "outStream.ViewportIndex" + Name 266 "outStream.PrimitiveID" + Name 272 "outStream.Normal" + Name 277 "outStream.Color" + Name 282 "outStream.ViewVec" + Name 287 "outStream.LightVec" + Name 299 "input" + Name 302 "input.Pos" + Name 309 "input.Normal" + Name 314 "input.Color" + Name 336 "InvocationID" + Name 338 "InvocationID" + Name 340 "PrimitiveID" + Name 341 "PrimitiveID" + Name 343 "outStream" + Name 344 "param" + Name 346 "param" + Name 347 "param" + Name 349 "param" + Decorate 135 ArrayStride 64 + Decorate 137 ArrayStride 64 + MemberDecorate 139(UBO) 0 RowMajor + MemberDecorate 139(UBO) 0 Offset 0 + MemberDecorate 139(UBO) 0 MatrixStride 16 + MemberDecorate 139(UBO) 1 RowMajor + MemberDecorate 139(UBO) 1 Offset 128 + MemberDecorate 139(UBO) 1 MatrixStride 16 + MemberDecorate 139(UBO) 2 Offset 256 + MemberDecorate 154(ubo) 0 Offset 0 + Decorate 154(ubo) Block + Decorate 160 DescriptorSet 0 + Decorate 160 Binding 0 + Decorate 255(outStream.Pos) BuiltIn Position + Decorate 261(outStream.ViewportIndex) BuiltIn ViewportIndex + Decorate 266(outStream.PrimitiveID) BuiltIn PrimitiveId + Decorate 272(outStream.Normal) Location 0 + Decorate 277(outStream.Color) Location 1 + Decorate 282(outStream.ViewVec) Location 2 + Decorate 287(outStream.LightVec) Location 3 + Decorate 302(input.Pos) BuiltIn Position + Decorate 309(input.Normal) Location 0 + Decorate 314(input.Color) Location 1 + Decorate 338(InvocationID) BuiltIn InvocationId + Decorate 341(PrimitiveID) BuiltIn PrimitiveId + 4: TypeVoid + 5: TypeFunction 4 + 8: TypeFloat 32 + 11: TypeInt 32 0 + 14: 11(int) Constant 32 + 15: 11(int) Constant 6 + 16: 11(int) Constant 0 + 13: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 2(DebugTypeBasic) 12 14 15 16 + 17: 11(int) Constant 3 + 10: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 2(DebugTypeBasic) 9 14 17 16 + 18: TypeVector 8(float) 4 + 19: 11(int) Constant 4 + 20: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 6(DebugTypeVector) 10 19 + 21: TypeVector 8(float) 3 + 22: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 6(DebugTypeVector) 10 17 + 23(VSOutput): TypeStruct 18(fvec4) 21(fvec3) 21(fvec3) + 26: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 35(DebugSource) 1 27 + 28: 11(int) Constant 37 + 29: 11(int) Constant 13 + 24: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 11(DebugTypeMember) 25 20 26 28 29 16 16 17 + 32: 11(int) Constant 39 + 33: 11(int) Constant 34 + 30: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 11(DebugTypeMember) 31 22 26 32 33 16 16 17 + 34: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 11(DebugTypeMember) 31 22 26 32 33 16 16 17 + 37: 11(int) Constant 1 + 39: 11(int) Constant 5 + 38: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 1(DebugCompilationUnit) 37 19 26 39 + 35: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 10(DebugTypeComposite) 36 37 26 16 16 38 36 16 17 24 30 34 + 40: TypeArray 23(VSOutput) 17 + 41: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 5(DebugTypeArray) 35 17 + 42: TypePointer Function 40 + 43(GSOutput): TypeStruct 18(fvec4) 11(int) 11(int) 21(fvec3) 21(fvec3) 21(fvec3) 21(fvec3) + 45: 11(int) Constant 44 + 44: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 11(DebugTypeMember) 25 20 26 45 29 16 16 17 + 48: 11(int) Constant 46 + 49: 11(int) Constant 19 + 46: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 11(DebugTypeMember) 47 13 26 48 49 16 16 17 + 50: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 11(DebugTypeMember) 47 13 26 48 49 16 16 17 + 53: 11(int) Constant 50 + 51: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 11(DebugTypeMember) 52 22 26 53 28 16 16 17 + 54: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 11(DebugTypeMember) 52 22 26 53 28 16 16 17 + 55: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 11(DebugTypeMember) 52 22 26 53 28 16 16 17 + 56: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 11(DebugTypeMember) 52 22 26 53 28 16 16 17 + 57: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 10(DebugTypeComposite) 58 37 26 16 16 38 58 16 17 44 46 50 51 54 55 56 + 59: TypePointer Function 43(GSOutput) + 60: TypePointer Function 11(int) + 61: TypeFunction 4 42(ptr) 59(ptr) 60(ptr) 60(ptr) + 62: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 8(DebugTypeFunction) 17 4 41 57 13 13 + 69: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 20(DebugFunction) 68 62 26 16 16 38 68 17 16 + 73: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 26(DebugLocalVariable) 74 41 26 16 16 69 19 37 + 76: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 31(DebugExpression) + 79: 11(int) Constant 2 + 77: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 26(DebugLocalVariable) 78 57 26 16 16 69 19 79 + 81: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 26(DebugLocalVariable) 82 13 26 16 16 69 19 17 + 84: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 26(DebugLocalVariable) 47 13 26 16 16 69 19 19 + 89: 11(int) Constant 57 + 90: TypeInt 32 1 + 92: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 2(DebugTypeBasic) 91 14 19 16 + 93: TypePointer Function 90(int) + 95: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 26(DebugLocalVariable) 96 92 26 89 16 69 19 + 98: 90(int) Constant 0 + 109: 90(int) Constant 3 + 110: TypeBool + 112: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 2(DebugTypeBasic) 111 14 79 16 + 116: 11(int) Constant 59 + 118: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 26(DebugLocalVariable) 119 57 26 116 16 69 19 + 121: 8(float) Constant 0 + 122: 18(fvec4) ConstantComposite 121 121 121 121 + 123: 21(fvec3) ConstantComposite 121 121 121 + 124:43(GSOutput) ConstantComposite 122 16 16 123 123 123 123 + 126: 11(int) Constant 60 + 128: 90(int) Constant 1 + 129: TypePointer Function 21(fvec3) + 132: TypeMatrix 18(fvec4) 4 + 134: 110(bool) ConstantTrue + 133: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 108(DebugTypeMatrix) 20 19 134 + 135: TypeArray 132 79 + 136: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 5(DebugTypeArray) 133 79 + 137: TypeArray 132 79 + 138: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 5(DebugTypeArray) 133 79 + 139(UBO): TypeStruct 135 137 18(fvec4) + 142: 11(int) Constant 28 + 143: 11(int) Constant 21 + 140: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 11(DebugTypeMember) 141 136 26 142 143 16 16 17 + 146: 11(int) Constant 29 + 147: 11(int) Constant 20 + 144: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 11(DebugTypeMember) 145 138 26 146 147 16 16 17 + 150: 11(int) Constant 30 + 151: 11(int) Constant 17 + 148: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 11(DebugTypeMember) 149 20 26 150 151 16 16 17 + 152: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 10(DebugTypeComposite) 153 37 26 126 16 38 153 16 17 140 144 148 + 154(ubo): TypeStruct 139(UBO) + 157: 11(int) Constant 33 + 155: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 11(DebugTypeMember) 156 152 26 157 28 16 16 17 + 158: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 10(DebugTypeComposite) 156 37 26 126 16 38 156 16 17 155 + 159: TypePointer Uniform 154(ubo) + 160: 159(ptr) Variable Uniform + 162: 11(int) Constant 8 + 161: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 18(DebugGlobalVariable) 1 158 26 126 16 38 1 160 162 + 164: TypePointer Uniform 132 + 167: TypeMatrix 21(fvec3) 3 + 168: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 108(DebugTypeMatrix) 22 17 134 + 179: 11(int) Constant 61 + 180: 90(int) Constant 4 + 182: 90(int) Constant 2 + 187: 11(int) Constant 63 + 188: TypePointer Function 18(fvec4) + 190: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 26(DebugLocalVariable) 191 20 26 187 16 69 19 + 197: 11(int) Constant 64 + 199: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 26(DebugLocalVariable) 200 20 26 197 16 69 19 + 208: 11(int) Constant 66 + 210: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 26(DebugLocalVariable) 211 22 26 208 16 69 19 + 213: TypePointer Uniform 18(fvec4) + 222: 11(int) Constant 67 + 223: 90(int) Constant 6 + 230: 11(int) Constant 68 + 231: 90(int) Constant 5 + 237: 11(int) Constant 70 + 245: 11(int) Constant 73 + 249: 11(int) Constant 74 + 253: 11(int) Constant 75 + 254: TypePointer Output 18(fvec4) +255(outStream.Pos): 254(ptr) Variable Output + 256: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 18(DebugGlobalVariable) 257 20 26 253 16 38 257 255(outStream.Pos) 162 + 260: TypePointer Output 11(int) +261(outStream.ViewportIndex): 260(ptr) Variable Output + 262: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 18(DebugGlobalVariable) 263 13 26 253 16 38 263 261(outStream.ViewportIndex) 162 +266(outStream.PrimitiveID): 260(ptr) Variable Output + 267: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 18(DebugGlobalVariable) 268 13 26 253 16 38 268 266(outStream.PrimitiveID) 162 + 271: TypePointer Output 21(fvec3) +272(outStream.Normal): 271(ptr) Variable Output + 273: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 18(DebugGlobalVariable) 274 22 26 253 16 38 274 272(outStream.Normal) 162 +277(outStream.Color): 271(ptr) Variable Output + 278: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 18(DebugGlobalVariable) 279 22 26 253 16 38 279 277(outStream.Color) 162 +282(outStream.ViewVec): 271(ptr) Variable Output + 283: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 18(DebugGlobalVariable) 284 22 26 253 16 38 284 282(outStream.ViewVec) 162 +287(outStream.LightVec): 271(ptr) Variable Output + 288: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 18(DebugGlobalVariable) 289 22 26 253 16 38 289 287(outStream.LightVec) 162 + 298: 11(int) Constant 78 + 300: TypeArray 18(fvec4) 17 + 301: TypePointer Input 300 + 302(input.Pos): 301(ptr) Variable Input + 303: TypePointer Input 18(fvec4) + 307: TypeArray 21(fvec3) 17 + 308: TypePointer Input 307 +309(input.Normal): 308(ptr) Variable Input + 310: TypePointer Input 21(fvec3) +314(input.Color): 308(ptr) Variable Input + 337: TypePointer Input 11(int) +338(InvocationID): 337(ptr) Variable Input +341(PrimitiveID): 337(ptr) Variable Input + Line 1 56 1 + 6(main): 4 Function None 5 + 7: Label + 299(input): 42(ptr) Variable Function +336(InvocationID): 60(ptr) Variable Function +340(PrimitiveID): 60(ptr) Variable Function + 343(outStream): 59(ptr) Variable Function + 344(param): 42(ptr) Variable Function + 346(param): 59(ptr) Variable Function + 347(param): 60(ptr) Variable Function + 349(param): 60(ptr) Variable Function + Line 1 56 0 + 304: 303(ptr) AccessChain 302(input.Pos) 98 + 305: 18(fvec4) Load 304 + 306: 188(ptr) AccessChain 299(input) 98 98 + Store 306 305 + 311: 310(ptr) AccessChain 309(input.Normal) 98 + 312: 21(fvec3) Load 311 + 313: 129(ptr) AccessChain 299(input) 98 128 + Store 313 312 + 315: 310(ptr) AccessChain 314(input.Color) 98 + 316: 21(fvec3) Load 315 + 317: 129(ptr) AccessChain 299(input) 98 182 + Store 317 316 + 318: 303(ptr) AccessChain 302(input.Pos) 128 + 319: 18(fvec4) Load 318 + 320: 188(ptr) AccessChain 299(input) 128 98 + Store 320 319 + 321: 310(ptr) AccessChain 309(input.Normal) 128 + 322: 21(fvec3) Load 321 + 323: 129(ptr) AccessChain 299(input) 128 128 + Store 323 322 + 324: 310(ptr) AccessChain 314(input.Color) 128 + 325: 21(fvec3) Load 324 + 326: 129(ptr) AccessChain 299(input) 128 182 + Store 326 325 + 327: 303(ptr) AccessChain 302(input.Pos) 182 + 328: 18(fvec4) Load 327 + 329: 188(ptr) AccessChain 299(input) 182 98 + Store 329 328 + 330: 310(ptr) AccessChain 309(input.Normal) 182 + 331: 21(fvec3) Load 330 + 332: 129(ptr) AccessChain 299(input) 182 128 + Store 332 331 + 333: 310(ptr) AccessChain 314(input.Color) 182 + 334: 21(fvec3) Load 333 + 335: 129(ptr) AccessChain 299(input) 182 182 + Store 335 334 + 339: 11(int) Load 338(InvocationID) + Store 336(InvocationID) 339 + 342: 11(int) Load 341(PrimitiveID) + Store 340(PrimitiveID) 342 + 345: 40 Load 299(input) + Store 344(param) 345 + 348: 11(int) Load 336(InvocationID) + Store 347(param) 348 + 350: 11(int) Load 340(PrimitiveID) + Store 349(param) 350 + 351: 4 FunctionCall 67(@main(struct-VSOutput-vf4-vf3-vf31[3];struct-GSOutput-vf4-u1-u1-vf3-vf3-vf3-vf31;u1;u1;) 344(param) 346(param) 347(param) 349(param) + 352:43(GSOutput) Load 346(param) + Store 343(outStream) 352 + Return + FunctionEnd + Line 1 56 1 +67(@main(struct-VSOutput-vf4-vf3-vf31[3];struct-GSOutput-vf4-u1-u1-vf3-vf3-vf3-vf31;u1;u1;): 4 Function None 61 + 63(input): 42(ptr) FunctionParameter + 64(outStream): 59(ptr) FunctionParameter +65(InvocationID): 60(ptr) FunctionParameter + 66(PrimitiveID): 60(ptr) FunctionParameter + 70: Label + 94(i): 93(ptr) Variable Function + 117(output): 59(ptr) Variable Function + 189(pos): 188(ptr) Variable Function + 198(worldPos): 188(ptr) Variable Function + 209(lPos): 129(ptr) Variable Function + 71: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 23(DebugScope) 69 + 72: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 26 16 16 16 16 + 75: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 28(DebugDeclare) 73 63(input) 76 + 80: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 28(DebugDeclare) 77 64(outStream) 76 + 83: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 28(DebugDeclare) 81 65(InvocationID) 76 + 85: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 28(DebugDeclare) 84 66(PrimitiveID) 76 + 86: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 101(DebugFunctionDefinition) 69 67(@main(struct-VSOutput-vf4-vf3-vf31[3];struct-GSOutput-vf4-u1-u1-vf3-vf3-vf3-vf31;u1;u1;) + 87: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 23(DebugScope) 69 + 88: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 26 89 89 16 16 + 97: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 28(DebugDeclare) 95 94(i) 76 + Store 94(i) 98 + Branch 99 + 99: Label + 103: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 23(DebugScope) 69 + 104: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 26 89 89 16 16 + LoopMerge 101 102 None + Branch 105 + 105: Label + 106: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 23(DebugScope) 69 + 107: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 26 89 89 16 16 + 108: 90(int) Load 94(i) + 113: 110(bool) SLessThan 108 109 + BranchConditional 113 100 101 + 100: Label + 114: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 23(DebugScope) 69 + 115: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 26 116 116 16 16 + 120: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 28(DebugDeclare) 118 117(output) 76 + Store 117(output) 124 + 125: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 26 126 126 16 16 + 127: 90(int) Load 94(i) + 130: 129(ptr) AccessChain 63(input) 127 128 + 131: 21(fvec3) Load 130 + 163: 11(int) Load 65(InvocationID) + 165: 164(ptr) AccessChain 160 98 128 163 + 166: 132 Load 165 + 169: 18(fvec4) CompositeExtract 166 0 + 170: 21(fvec3) VectorShuffle 169 169 0 1 2 + 171: 18(fvec4) CompositeExtract 166 1 + 172: 21(fvec3) VectorShuffle 171 171 0 1 2 + 173: 18(fvec4) CompositeExtract 166 2 + 174: 21(fvec3) VectorShuffle 173 173 0 1 2 + 175: 167 CompositeConstruct 170 172 174 + 176: 21(fvec3) VectorTimesMatrix 131 175 + 177: 129(ptr) AccessChain 117(output) 109 + Store 177 176 + 178: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 26 179 179 16 16 + 181: 90(int) Load 94(i) + 183: 129(ptr) AccessChain 63(input) 181 182 + 184: 21(fvec3) Load 183 + 185: 129(ptr) AccessChain 117(output) 180 + Store 185 184 + 186: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 26 187 187 16 16 + 192: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 28(DebugDeclare) 190 189(pos) 76 + 193: 90(int) Load 94(i) + 194: 188(ptr) AccessChain 63(input) 193 98 + 195: 18(fvec4) Load 194 + Store 189(pos) 195 + 196: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 26 197 197 16 16 + 201: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 28(DebugDeclare) 199 198(worldPos) 76 + 202: 18(fvec4) Load 189(pos) + 203: 11(int) Load 65(InvocationID) + 204: 164(ptr) AccessChain 160 98 128 203 + 205: 132 Load 204 + 206: 18(fvec4) VectorTimesMatrix 202 205 + Store 198(worldPos) 206 + 207: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 26 208 208 16 16 + 212: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 28(DebugDeclare) 210 209(lPos) 76 + 214: 213(ptr) AccessChain 160 98 182 + 215: 18(fvec4) Load 214 + 216: 11(int) Load 65(InvocationID) + 217: 164(ptr) AccessChain 160 98 128 216 + 218: 132 Load 217 + 219: 18(fvec4) VectorTimesMatrix 215 218 + 220: 21(fvec3) VectorShuffle 219 219 0 1 2 + Store 209(lPos) 220 + 221: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 26 222 222 16 16 + 224: 21(fvec3) Load 209(lPos) + 225: 18(fvec4) Load 198(worldPos) + 226: 21(fvec3) VectorShuffle 225 225 0 1 2 + 227: 21(fvec3) FSub 224 226 + 228: 129(ptr) AccessChain 117(output) 223 + Store 228 227 + 229: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 26 230 230 16 16 + 232: 18(fvec4) Load 198(worldPos) + 233: 21(fvec3) VectorShuffle 232 232 0 1 2 + 234: 21(fvec3) FNegate 233 + 235: 129(ptr) AccessChain 117(output) 231 + Store 235 234 + 236: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 26 237 237 16 16 + 238: 18(fvec4) Load 198(worldPos) + 239: 11(int) Load 65(InvocationID) + 240: 164(ptr) AccessChain 160 98 98 239 + 241: 132 Load 240 + 242: 18(fvec4) VectorTimesMatrix 238 241 + 243: 188(ptr) AccessChain 117(output) 98 + Store 243 242 + 244: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 26 245 245 16 16 + 246: 11(int) Load 65(InvocationID) + 247: 60(ptr) AccessChain 117(output) 128 + Store 247 246 + 248: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 26 249 249 16 16 + 250: 11(int) Load 66(PrimitiveID) + 251: 60(ptr) AccessChain 117(output) 182 + Store 251 250 + 252: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 26 253 253 16 16 + 258: 188(ptr) AccessChain 117(output) 98 + 259: 18(fvec4) Load 258 + Store 255(outStream.Pos) 259 + 264: 60(ptr) AccessChain 117(output) 128 + 265: 11(int) Load 264 + Store 261(outStream.ViewportIndex) 265 + 269: 60(ptr) AccessChain 117(output) 182 + 270: 11(int) Load 269 + Store 266(outStream.PrimitiveID) 270 + 275: 129(ptr) AccessChain 117(output) 109 + 276: 21(fvec3) Load 275 + Store 272(outStream.Normal) 276 + 280: 129(ptr) AccessChain 117(output) 180 + 281: 21(fvec3) Load 280 + Store 277(outStream.Color) 281 + 285: 129(ptr) AccessChain 117(output) 231 + 286: 21(fvec3) Load 285 + Store 282(outStream.ViewVec) 286 + 290: 129(ptr) AccessChain 117(output) 223 + 291: 21(fvec3) Load 290 + Store 287(outStream.LightVec) 291 + EmitVertex + Branch 102 + 102: Label + 292: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 23(DebugScope) 69 + 293: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 26 89 89 16 16 + 294: 90(int) Load 94(i) + 295: 90(int) IAdd 294 128 + Store 94(i) 295 + Branch 99 + 101: Label + 296: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 23(DebugScope) 69 + 297: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 26 298 298 16 16 + EndPrimitive + Return + FunctionEnd diff --git a/Test/baseResults/spv.debuginfo.hlsl.tesc.out b/Test/baseResults/spv.debuginfo.hlsl.tesc.out new file mode 100644 index 0000000000..998eef5f87 --- /dev/null +++ b/Test/baseResults/spv.debuginfo.hlsl.tesc.out @@ -0,0 +1,917 @@ +spv.debuginfo.hlsl.tesc +WARNING: 0:158: '' : attribute does not apply to entry point + +// Module Version 10000 +// Generated by (magic number): 8000b +// Id's are bound by 688 + + Capability Tessellation + Extension "SPV_KHR_non_semantic_info" + 2: ExtInstImport "NonSemantic.Shader.DebugInfo.100" + 3: ExtInstImport "GLSL.std.450" + MemoryModel Logical GLSL450 + EntryPoint TessellationControl 6 "main" 580 587 594 628 637 644 651 666 681 + ExecutionMode 6 OutputVertices 4 + ExecutionMode 6 Quads + ExecutionMode 6 SpacingEqual + ExecutionMode 6 VertexOrderCw + 1: String "" + 9: String "float" + 12: String "uint" + 27: String "screenSpaceTessFactor" + 30: String "// OpModuleProcessed auto-map-locations +// OpModuleProcessed auto-map-bindings +// OpModuleProcessed entry-point main +// OpModuleProcessed client vulkan100 +// OpModuleProcessed target-env vulkan1.0 +// OpModuleProcessed keep-uncalled +// OpModuleProcessed hlsl-offsets +#line 1 +" + 38: String "p0" + 42: String "p1" + 49: String "bool" + 56: String "frustumCheck" + 62: String "Pos" + 65: String "inUV" + 74: String "Normal" + 78: String "UV" + 82: String "VSOutput" + 92: String "TessLevelOuter" + 96: String "TessLevelInner" + 99: String "ConstantsHSOutput" + 104: String "ConstantsHS" + 110: String "patch" + 121: String "HSOutput" + 127: String "@main" + 135: String "InvocationID" + 143: String "midPoint" + 155: String "radius" + 166: String "v0" + 176: String "modelview" + 181: String "lightPos" + 185: String "frustumPlanes" + 188: String "tessellatedEdgeSize" + 192: String "viewportDim" + 196: String "UBO" + 199: String "ubo" + 207: String "int" + 219: String "clip0" + 237: String "clip1" + 312: String "pos" + 319: String "type.2d.image" + 320: String "@type.2d.image" + 325: String "textureHeight" + 329: String "type.sampler" + 330: String "@type.sampler" + 334: String "samplerHeight" + 338: String "type.sampled.image" + 339: String "@type.sampled.image" + 357: String "i" + 410: String "output" + Name 6 "main" + Name 26 "screenSpaceTessFactor(vf4;vf4;" + Name 24 "p0" + Name 25 "p1" + Name 55 "frustumCheck(vf4;vf2;" + Name 53 "Pos" + Name 54 "inUV" + Name 69 "VSOutput" + MemberName 69(VSOutput) 0 "Pos" + MemberName 69(VSOutput) 1 "Normal" + MemberName 69(VSOutput) 2 "UV" + Name 90 "ConstantsHSOutput" + MemberName 90(ConstantsHSOutput) 0 "TessLevelOuter" + MemberName 90(ConstantsHSOutput) 1 "TessLevelInner" + Name 103 "ConstantsHS(struct-VSOutput-vf4-vf3-vf21[4];" + Name 102 "patch" + Name 113 "HSOutput" + MemberName 113(HSOutput) 0 "Pos" + MemberName 113(HSOutput) 1 "Normal" + MemberName 113(HSOutput) 2 "UV" + Name 126 "@main(struct-VSOutput-vf4-vf3-vf21[4];u1;" + Name 124 "patch" + Name 125 "InvocationID" + Name 141 "midPoint" + Name 153 "radius" + Name 164 "v0" + Name 174 "UBO" + MemberName 174(UBO) 0 "projection" + MemberName 174(UBO) 1 "modelview" + MemberName 174(UBO) 2 "lightPos" + MemberName 174(UBO) 3 "frustumPlanes" + MemberName 174(UBO) 4 "displacementFactor" + MemberName 174(UBO) 5 "tessellationFactor" + MemberName 174(UBO) 6 "viewportDim" + MemberName 174(UBO) 7 "tessellatedEdgeSize" + Name 197 "ubo" + MemberName 197(ubo) 0 "ubo" + Name 203 "" + Name 217 "clip0" + Name 235 "clip1" + Name 310 "pos" + Name 323 "textureHeight" + Name 332 "samplerHeight" + Name 355 "i" + Name 408 "output" + Name 418 "param" + Name 421 "param" + Name 462 "param" + Name 465 "param" + Name 472 "param" + Name 475 "param" + Name 482 "param" + Name 485 "param" + Name 492 "param" + Name 495 "param" + Name 547 "output" + Name 577 "patch" + Name 580 "patch.Pos" + Name 587 "patch.Normal" + Name 594 "patch.UV" + Name 626 "InvocationID" + Name 628 "InvocationID" + Name 630 "flattenTemp" + Name 631 "param" + Name 633 "param" + Name 637 "@entryPointOutput.Pos" + Name 644 "@entryPointOutput.Normal" + Name 651 "@entryPointOutput.UV" + Name 661 "@patchConstantResult" + Name 662 "param" + Name 666 "@patchConstantOutput.TessLevelOuter" + Name 681 "@patchConstantOutput.TessLevelInner" + Decorate 172 ArrayStride 16 + MemberDecorate 174(UBO) 0 RowMajor + MemberDecorate 174(UBO) 0 Offset 0 + MemberDecorate 174(UBO) 0 MatrixStride 16 + MemberDecorate 174(UBO) 1 RowMajor + MemberDecorate 174(UBO) 1 Offset 64 + MemberDecorate 174(UBO) 1 MatrixStride 16 + MemberDecorate 174(UBO) 2 Offset 128 + MemberDecorate 174(UBO) 3 Offset 144 + MemberDecorate 174(UBO) 4 Offset 240 + MemberDecorate 174(UBO) 5 Offset 244 + MemberDecorate 174(UBO) 6 Offset 248 + MemberDecorate 174(UBO) 7 Offset 256 + MemberDecorate 197(ubo) 0 Offset 0 + Decorate 197(ubo) Block + Decorate 203 DescriptorSet 0 + Decorate 203 Binding 0 + Decorate 323(textureHeight) DescriptorSet 0 + Decorate 323(textureHeight) Binding 1 + Decorate 332(samplerHeight) DescriptorSet 0 + Decorate 332(samplerHeight) Binding 1 + Decorate 580(patch.Pos) BuiltIn Position + Decorate 587(patch.Normal) Location 0 + Decorate 594(patch.UV) Location 1 + Decorate 628(InvocationID) BuiltIn InvocationId + Decorate 637(@entryPointOutput.Pos) BuiltIn Position + Decorate 644(@entryPointOutput.Normal) Location 0 + Decorate 651(@entryPointOutput.UV) Location 1 + Decorate 666(@patchConstantOutput.TessLevelOuter) Patch + Decorate 666(@patchConstantOutput.TessLevelOuter) BuiltIn TessLevelOuter + Decorate 681(@patchConstantOutput.TessLevelInner) Patch + Decorate 681(@patchConstantOutput.TessLevelInner) BuiltIn TessLevelInner + 4: TypeVoid + 5: TypeFunction 4 + 8: TypeFloat 32 + 11: TypeInt 32 0 + 14: 11(int) Constant 32 + 15: 11(int) Constant 6 + 16: 11(int) Constant 0 + 13: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 2(DebugTypeBasic) 12 14 15 16 + 17: 11(int) Constant 3 + 10: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 2(DebugTypeBasic) 9 14 17 16 + 18: TypeVector 8(float) 4 + 19: 11(int) Constant 4 + 20: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 6(DebugTypeVector) 10 19 + 21: TypePointer Function 18(fvec4) + 22: TypeFunction 8(float) 21(ptr) 21(ptr) + 23: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 8(DebugTypeFunction) 17 10 20 20 + 29: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 35(DebugSource) 1 30 + 32: 11(int) Constant 1 + 33: 11(int) Constant 5 + 31: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 1(DebugCompilationUnit) 32 19 29 33 + 28: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 20(DebugFunction) 27 23 29 16 16 31 27 17 16 + 37: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 26(DebugLocalVariable) 38 20 29 16 16 28 19 32 + 40: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 31(DebugExpression) + 43: 11(int) Constant 2 + 41: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 26(DebugLocalVariable) 42 20 29 16 16 28 19 43 + 45: TypeVector 8(float) 2 + 46: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 6(DebugTypeVector) 10 43 + 47: TypePointer Function 45(fvec2) + 48: TypeBool + 50: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 2(DebugTypeBasic) 49 14 43 16 + 51: TypeFunction 48(bool) 21(ptr) 47(ptr) + 52: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 8(DebugTypeFunction) 17 50 20 46 + 57: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 20(DebugFunction) 56 52 29 16 16 31 56 17 16 + 61: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 26(DebugLocalVariable) 62 20 29 16 16 57 19 32 + 64: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 26(DebugLocalVariable) 65 46 29 16 16 57 19 43 + 67: TypeVector 8(float) 3 + 68: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 6(DebugTypeVector) 10 17 + 69(VSOutput): TypeStruct 18(fvec4) 67(fvec3) 45(fvec2) + 71: 11(int) Constant 44 + 72: 11(int) Constant 13 + 70: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 11(DebugTypeMember) 62 20 29 71 72 16 16 17 + 75: 11(int) Constant 45 + 76: 11(int) Constant 35 + 73: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 11(DebugTypeMember) 74 68 29 75 76 16 16 17 + 79: 11(int) Constant 46 + 80: 11(int) Constant 31 + 77: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 11(DebugTypeMember) 78 46 29 79 80 16 16 17 + 81: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 10(DebugTypeComposite) 82 32 29 16 16 31 82 16 17 70 73 77 + 83: TypeArray 69(VSOutput) 19 + 84: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 5(DebugTypeArray) 81 19 + 85: TypePointer Function 83 + 86: TypeArray 8(float) 19 + 87: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 5(DebugTypeArray) 10 19 + 88: TypeArray 8(float) 43 + 89: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 5(DebugTypeArray) 10 43 +90(ConstantsHSOutput): TypeStruct 86 88 + 93: 11(int) Constant 58 + 94: 11(int) Constant 25 + 91: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 11(DebugTypeMember) 92 87 29 93 94 16 16 17 + 97: 11(int) Constant 59 + 95: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 11(DebugTypeMember) 96 89 29 97 94 16 16 17 + 98: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 10(DebugTypeComposite) 99 32 29 16 16 31 99 16 17 91 95 + 100: TypeFunction 90(ConstantsHSOutput) 85(ptr) + 101: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 8(DebugTypeFunction) 17 98 84 + 105: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 20(DebugFunction) 104 101 29 16 16 31 104 17 16 + 109: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 26(DebugLocalVariable) 110 84 29 16 16 105 19 32 + 112: TypePointer Function 11(int) + 113(HSOutput): TypeStruct 18(fvec4) 67(fvec3) 45(fvec2) + 115: 11(int) Constant 51 + 114: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 11(DebugTypeMember) 62 20 29 115 14 16 16 17 + 117: 11(int) Constant 52 + 116: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 11(DebugTypeMember) 74 68 29 117 76 16 16 17 + 119: 11(int) Constant 53 + 118: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 11(DebugTypeMember) 78 46 29 119 80 16 16 17 + 120: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 10(DebugTypeComposite) 121 32 29 16 16 31 121 16 17 114 116 118 + 122: TypeFunction 113(HSOutput) 85(ptr) 112(ptr) + 123: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 8(DebugTypeFunction) 17 120 84 13 + 128: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 20(DebugFunction) 127 123 29 16 16 31 127 17 16 + 132: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 26(DebugLocalVariable) 110 84 29 16 16 128 19 32 + 134: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 26(DebugLocalVariable) 135 13 29 16 16 128 19 43 + 140: 11(int) Constant 67 + 142: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 26(DebugLocalVariable) 143 20 29 140 16 28 19 + 145: 8(float) Constant 1056964608 + 151: 11(int) Constant 69 + 152: TypePointer Function 8(float) + 154: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 26(DebugLocalVariable) 155 10 29 151 16 28 19 + 160: 8(float) Constant 1073741824 + 163: 11(int) Constant 72 + 165: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 26(DebugLocalVariable) 166 20 29 163 16 28 19 + 169: TypeMatrix 18(fvec4) 4 + 171: 48(bool) ConstantTrue + 170: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 108(DebugTypeMatrix) 20 19 171 + 172: TypeArray 18(fvec4) 15 + 173: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 5(DebugTypeArray) 20 15 + 174(UBO): TypeStruct 169 169 18(fvec4) 172 8(float) 8(float) 45(fvec2) 8(float) + 177: 11(int) Constant 29 + 178: 11(int) Constant 20 + 175: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 11(DebugTypeMember) 176 170 29 177 178 16 16 17 + 179: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 11(DebugTypeMember) 176 170 29 177 178 16 16 17 + 182: 11(int) Constant 30 + 183: 11(int) Constant 17 + 180: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 11(DebugTypeMember) 181 20 29 182 183 16 16 17 + 186: 11(int) Constant 22 + 184: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 11(DebugTypeMember) 185 173 29 80 186 16 16 17 + 189: 11(int) Constant 27 + 187: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 11(DebugTypeMember) 188 10 29 76 189 16 16 17 + 190: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 11(DebugTypeMember) 188 10 29 76 189 16 16 17 + 193: 11(int) Constant 34 + 191: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 11(DebugTypeMember) 192 46 29 193 178 16 16 17 + 194: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 11(DebugTypeMember) 188 10 29 76 189 16 16 17 + 195: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 10(DebugTypeComposite) 196 32 29 163 16 31 196 16 17 175 179 180 184 187 190 191 194 + 197(ubo): TypeStruct 174(UBO) + 200: 11(int) Constant 37 + 198: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 11(DebugTypeMember) 199 195 29 200 200 16 16 17 + 201: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 10(DebugTypeComposite) 199 32 29 163 16 31 199 16 17 198 + 202: TypePointer Uniform 197(ubo) + 203: 202(ptr) Variable Uniform + 205: 11(int) Constant 8 + 204: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 18(DebugGlobalVariable) 1 201 29 163 16 31 1 203 205 + 206: TypeInt 32 1 + 208: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 2(DebugTypeBasic) 207 14 19 16 + 209: 206(int) Constant 0 + 210: 206(int) Constant 1 + 211: TypePointer Uniform 169 + 216: 11(int) Constant 75 + 218: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 26(DebugLocalVariable) 219 20 29 216 16 28 19 + 223: 8(float) Constant 0 + 224: 67(fvec3) ConstantComposite 223 223 223 + 234: 11(int) Constant 76 + 236: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 26(DebugLocalVariable) 237 20 29 234 16 28 19 + 250: 11(int) Constant 79 + 257: 11(int) Constant 80 + 264: 11(int) Constant 83 + 265: 206(int) Constant 6 + 266: TypePointer Uniform 45(fvec2) + 277: 11(int) Constant 84 + 288: 11(int) Constant 89 + 292: 206(int) Constant 7 + 293: TypePointer Uniform 8(float) + 297: 206(int) Constant 5 + 301: 8(float) Constant 1065353216 + 302: 8(float) Constant 1115684864 + 309: 11(int) Constant 98 + 311: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 26(DebugLocalVariable) 312 20 29 309 16 57 19 + 316: 11(int) Constant 99 + 317: TypeImage 8(float) 2D sampled format:Unknown + 321: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 0(DebugInfoNone) + 318: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 10(DebugTypeComposite) 319 16 29 316 16 31 320 321 17 + 322: TypePointer UniformConstant 317 +323(textureHeight): 322(ptr) Variable UniformConstant + 324: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 18(DebugGlobalVariable) 325 318 29 316 16 31 325 323(textureHeight) 205 + 327: TypeSampler + 328: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 10(DebugTypeComposite) 329 32 29 316 16 31 330 321 17 + 331: TypePointer UniformConstant 327 +332(samplerHeight): 331(ptr) Variable UniformConstant + 333: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 18(DebugGlobalVariable) 334 328 29 316 16 31 334 332(samplerHeight) 205 + 336: TypeSampledImage 317 + 337: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 10(DebugTypeComposite) 338 16 29 316 16 31 339 321 17 + 344: 206(int) Constant 4 + 353: 11(int) Constant 102 + 354: TypePointer Function 206(int) + 356: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 26(DebugLocalVariable) 357 208 29 353 16 57 19 + 369: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 2(DebugTypeBasic) 49 14 43 16 + 373: 11(int) Constant 103 + 375: 206(int) Constant 3 + 377: TypePointer Uniform 18(fvec4) + 381: 8(float) Constant 1090519040 + 383: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 2(DebugTypeBasic) 49 14 43 16 + 387: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 2(DebugTypeBasic) 49 14 43 16 + 388: 48(bool) ConstantFalse + 391: 11(int) Constant 105 + 397: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 2(DebugTypeBasic) 49 14 43 16 + 400: 11(int) Constant 108 + 406: 11(int) Constant 113 + 407: TypePointer Function 90(ConstantsHSOutput) + 409: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 26(DebugLocalVariable) 410 98 29 406 16 105 19 + 412: 86 ConstantComposite 223 223 223 223 + 413: 88 ConstantComposite 223 223 + 414:90(ConstantsHSOutput) ConstantComposite 412 413 + 416: 11(int) Constant 115 + 417: 206(int) Constant 2 + 425: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 2(DebugTypeBasic) 49 14 43 16 + 426: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 2(DebugTypeBasic) 49 14 43 16 + 432: 11(int) Constant 117 + 435: 11(int) Constant 118 + 438: 11(int) Constant 119 + 441: 11(int) Constant 120 + 444: 11(int) Constant 121 + 447: 11(int) Constant 122 + 452: 11(int) Constant 126 + 455: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 2(DebugTypeBasic) 49 14 43 16 + 461: 11(int) Constant 128 + 471: 11(int) Constant 129 + 481: 11(int) Constant 130 + 491: 11(int) Constant 131 + 501: 11(int) Constant 132 + 509: 11(int) Constant 133 + 519: 11(int) Constant 139 + 522: 11(int) Constant 140 + 525: 11(int) Constant 141 + 528: 11(int) Constant 142 + 531: 11(int) Constant 143 + 534: 11(int) Constant 144 + 538: 11(int) Constant 148 + 545: 11(int) Constant 159 + 546: TypePointer Function 113(HSOutput) + 548: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 26(DebugLocalVariable) 410 120 29 545 16 128 19 + 550: 18(fvec4) ConstantComposite 223 223 223 223 + 551: 45(fvec2) ConstantComposite 223 223 + 552:113(HSOutput) ConstantComposite 550 224 551 + 554: 11(int) Constant 160 + 560: 11(int) Constant 161 + 562: TypePointer Function 67(fvec3) + 567: 11(int) Constant 162 + 573: 11(int) Constant 163 + 578: TypeArray 18(fvec4) 19 + 579: TypePointer Input 578 + 580(patch.Pos): 579(ptr) Variable Input + 581: TypePointer Input 18(fvec4) + 585: TypeArray 67(fvec3) 19 + 586: TypePointer Input 585 +587(patch.Normal): 586(ptr) Variable Input + 588: TypePointer Input 67(fvec3) + 592: TypeArray 45(fvec2) 19 + 593: TypePointer Input 592 + 594(patch.UV): 593(ptr) Variable Input + 595: TypePointer Input 45(fvec2) + 627: TypePointer Input 11(int) +628(InvocationID): 627(ptr) Variable Input + 636: TypePointer Output 578 +637(@entryPointOutput.Pos): 636(ptr) Variable Output + 641: TypePointer Output 18(fvec4) + 643: TypePointer Output 585 +644(@entryPointOutput.Normal): 643(ptr) Variable Output + 648: TypePointer Output 67(fvec3) + 650: TypePointer Output 592 +651(@entryPointOutput.UV): 650(ptr) Variable Output + 655: TypePointer Output 45(fvec2) + 665: TypePointer Output 86 +666(@patchConstantOutput.TessLevelOuter): 665(ptr) Variable Output + 669: TypePointer Output 8(float) + 680: TypePointer Output 88 +681(@patchConstantOutput.TessLevelInner): 680(ptr) Variable Output + Line 1 158 1 + 6(main): 4 Function None 5 + 7: Label + 577(patch): 85(ptr) Variable Function +626(InvocationID): 112(ptr) Variable Function +630(flattenTemp): 546(ptr) Variable Function + 631(param): 85(ptr) Variable Function + 633(param): 112(ptr) Variable Function +661(@patchConstantResult): 407(ptr) Variable Function + 662(param): 85(ptr) Variable Function + Line 1 158 0 + 582: 581(ptr) AccessChain 580(patch.Pos) 209 + 583: 18(fvec4) Load 582 + 584: 21(ptr) AccessChain 577(patch) 209 209 + Store 584 583 + 589: 588(ptr) AccessChain 587(patch.Normal) 209 + 590: 67(fvec3) Load 589 + 591: 562(ptr) AccessChain 577(patch) 209 210 + Store 591 590 + 596: 595(ptr) AccessChain 594(patch.UV) 209 + 597: 45(fvec2) Load 596 + 598: 47(ptr) AccessChain 577(patch) 209 417 + Store 598 597 + 599: 581(ptr) AccessChain 580(patch.Pos) 210 + 600: 18(fvec4) Load 599 + 601: 21(ptr) AccessChain 577(patch) 210 209 + Store 601 600 + 602: 588(ptr) AccessChain 587(patch.Normal) 210 + 603: 67(fvec3) Load 602 + 604: 562(ptr) AccessChain 577(patch) 210 210 + Store 604 603 + 605: 595(ptr) AccessChain 594(patch.UV) 210 + 606: 45(fvec2) Load 605 + 607: 47(ptr) AccessChain 577(patch) 210 417 + Store 607 606 + 608: 581(ptr) AccessChain 580(patch.Pos) 417 + 609: 18(fvec4) Load 608 + 610: 21(ptr) AccessChain 577(patch) 417 209 + Store 610 609 + 611: 588(ptr) AccessChain 587(patch.Normal) 417 + 612: 67(fvec3) Load 611 + 613: 562(ptr) AccessChain 577(patch) 417 210 + Store 613 612 + 614: 595(ptr) AccessChain 594(patch.UV) 417 + 615: 45(fvec2) Load 614 + 616: 47(ptr) AccessChain 577(patch) 417 417 + Store 616 615 + 617: 581(ptr) AccessChain 580(patch.Pos) 375 + 618: 18(fvec4) Load 617 + 619: 21(ptr) AccessChain 577(patch) 375 209 + Store 619 618 + 620: 588(ptr) AccessChain 587(patch.Normal) 375 + 621: 67(fvec3) Load 620 + 622: 562(ptr) AccessChain 577(patch) 375 210 + Store 622 621 + 623: 595(ptr) AccessChain 594(patch.UV) 375 + 624: 45(fvec2) Load 623 + 625: 47(ptr) AccessChain 577(patch) 375 417 + Store 625 624 + 629: 11(int) Load 628(InvocationID) + Store 626(InvocationID) 629 + 632: 83 Load 577(patch) + Store 631(param) 632 + 634: 11(int) Load 626(InvocationID) + Store 633(param) 634 + 635:113(HSOutput) FunctionCall 126(@main(struct-VSOutput-vf4-vf3-vf21[4];u1;) 631(param) 633(param) + Store 630(flattenTemp) 635 + 638: 11(int) Load 628(InvocationID) + 639: 21(ptr) AccessChain 630(flattenTemp) 209 + 640: 18(fvec4) Load 639 + 642: 641(ptr) AccessChain 637(@entryPointOutput.Pos) 638 + Store 642 640 + 645: 11(int) Load 628(InvocationID) + 646: 562(ptr) AccessChain 630(flattenTemp) 210 + 647: 67(fvec3) Load 646 + 649: 648(ptr) AccessChain 644(@entryPointOutput.Normal) 645 + Store 649 647 + 652: 11(int) Load 628(InvocationID) + 653: 47(ptr) AccessChain 630(flattenTemp) 417 + 654: 45(fvec2) Load 653 + 656: 655(ptr) AccessChain 651(@entryPointOutput.UV) 652 + Store 656 654 + ControlBarrier 43 19 16 + 657: 11(int) Load 628(InvocationID) + 658: 48(bool) IEqual 657 209 + SelectionMerge 660 None + BranchConditional 658 659 660 + 659: Label + 663: 83 Load 577(patch) + Store 662(param) 663 + 664:90(ConstantsHSOutput) FunctionCall 103(ConstantsHS(struct-VSOutput-vf4-vf3-vf21[4];) 662(param) + Store 661(@patchConstantResult) 664 + 667: 152(ptr) AccessChain 661(@patchConstantResult) 209 209 + 668: 8(float) Load 667 + 670: 669(ptr) AccessChain 666(@patchConstantOutput.TessLevelOuter) 209 + Store 670 668 + 671: 152(ptr) AccessChain 661(@patchConstantResult) 209 210 + 672: 8(float) Load 671 + 673: 669(ptr) AccessChain 666(@patchConstantOutput.TessLevelOuter) 210 + Store 673 672 + 674: 152(ptr) AccessChain 661(@patchConstantResult) 209 417 + 675: 8(float) Load 674 + 676: 669(ptr) AccessChain 666(@patchConstantOutput.TessLevelOuter) 417 + Store 676 675 + 677: 152(ptr) AccessChain 661(@patchConstantResult) 209 375 + 678: 8(float) Load 677 + 679: 669(ptr) AccessChain 666(@patchConstantOutput.TessLevelOuter) 375 + Store 679 678 + 682: 152(ptr) AccessChain 661(@patchConstantResult) 210 209 + 683: 8(float) Load 682 + 684: 669(ptr) AccessChain 681(@patchConstantOutput.TessLevelInner) 209 + Store 684 683 + 685: 152(ptr) AccessChain 661(@patchConstantResult) 210 210 + 686: 8(float) Load 685 + 687: 669(ptr) AccessChain 681(@patchConstantOutput.TessLevelInner) 210 + Store 687 686 + Branch 660 + 660: Label + Return + FunctionEnd + Line 1 65 1 +26(screenSpaceTessFactor(vf4;vf4;): 8(float) Function None 22 + 24(p0): 21(ptr) FunctionParameter + 25(p1): 21(ptr) FunctionParameter + 34: Label + 141(midPoint): 21(ptr) Variable Function + 153(radius): 152(ptr) Variable Function + 164(v0): 21(ptr) Variable Function + 217(clip0): 21(ptr) Variable Function + 235(clip1): 21(ptr) Variable Function + 35: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 23(DebugScope) 28 + 36: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 29 16 16 16 16 + 39: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 28(DebugDeclare) 37 24(p0) 40 + 44: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 28(DebugDeclare) 41 25(p1) 40 + 137: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 101(DebugFunctionDefinition) 28 26(screenSpaceTessFactor(vf4;vf4;) + 138: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 23(DebugScope) 28 + 139: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 29 140 140 16 16 + 144: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 28(DebugDeclare) 142 141(midPoint) 40 + 146: 18(fvec4) Load 24(p0) + 147: 18(fvec4) Load 25(p1) + 148: 18(fvec4) FAdd 146 147 + 149: 18(fvec4) VectorTimesScalar 148 145 + Store 141(midPoint) 149 + 150: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 29 151 151 16 16 + 156: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 28(DebugDeclare) 154 153(radius) 40 + 157: 18(fvec4) Load 24(p0) + 158: 18(fvec4) Load 25(p1) + 159: 8(float) ExtInst 3(GLSL.std.450) 67(Distance) 157 158 + 161: 8(float) FDiv 159 160 + Store 153(radius) 161 + 162: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 29 163 163 16 16 + 167: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 28(DebugDeclare) 165 164(v0) 40 + 168: 18(fvec4) Load 141(midPoint) + 212: 211(ptr) AccessChain 203 209 210 + 213: 169 Load 212 + 214: 18(fvec4) VectorTimesMatrix 168 213 + Store 164(v0) 214 + 215: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 29 216 216 16 16 + 220: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 28(DebugDeclare) 218 217(clip0) 40 + 221: 18(fvec4) Load 164(v0) + 222: 8(float) Load 153(radius) + 225: 8(float) CompositeExtract 224 0 + 226: 8(float) CompositeExtract 224 1 + 227: 8(float) CompositeExtract 224 2 + 228: 18(fvec4) CompositeConstruct 222 225 226 227 + 229: 18(fvec4) FSub 221 228 + 230: 211(ptr) AccessChain 203 209 209 + 231: 169 Load 230 + 232: 18(fvec4) VectorTimesMatrix 229 231 + Store 217(clip0) 232 + 233: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 29 234 234 16 16 + 238: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 28(DebugDeclare) 236 235(clip1) 40 + 239: 18(fvec4) Load 164(v0) + 240: 8(float) Load 153(radius) + 241: 8(float) CompositeExtract 224 0 + 242: 8(float) CompositeExtract 224 1 + 243: 8(float) CompositeExtract 224 2 + 244: 18(fvec4) CompositeConstruct 240 241 242 243 + 245: 18(fvec4) FAdd 239 244 + 246: 211(ptr) AccessChain 203 209 209 + 247: 169 Load 246 + 248: 18(fvec4) VectorTimesMatrix 245 247 + Store 235(clip1) 248 + 249: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 29 250 250 16 16 + 251: 152(ptr) AccessChain 217(clip0) 17 + 252: 8(float) Load 251 + 253: 18(fvec4) Load 217(clip0) + 254: 18(fvec4) CompositeConstruct 252 252 252 252 + 255: 18(fvec4) FDiv 253 254 + Store 217(clip0) 255 + 256: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 29 257 257 16 16 + 258: 152(ptr) AccessChain 235(clip1) 17 + 259: 8(float) Load 258 + 260: 18(fvec4) Load 235(clip1) + 261: 18(fvec4) CompositeConstruct 259 259 259 259 + 262: 18(fvec4) FDiv 260 261 + Store 235(clip1) 262 + 263: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 29 264 264 16 16 + 267: 266(ptr) AccessChain 203 209 265 + 268: 45(fvec2) Load 267 + 269: 18(fvec4) Load 217(clip0) + 270: 45(fvec2) VectorShuffle 269 269 0 1 + 271: 45(fvec2) FMul 270 268 + 272: 152(ptr) AccessChain 217(clip0) 16 + 273: 8(float) CompositeExtract 271 0 + Store 272 273 + 274: 152(ptr) AccessChain 217(clip0) 32 + 275: 8(float) CompositeExtract 271 1 + Store 274 275 + 276: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 29 277 277 16 16 + 278: 266(ptr) AccessChain 203 209 265 + 279: 45(fvec2) Load 278 + 280: 18(fvec4) Load 235(clip1) + 281: 45(fvec2) VectorShuffle 280 280 0 1 + 282: 45(fvec2) FMul 281 279 + 283: 152(ptr) AccessChain 235(clip1) 16 + 284: 8(float) CompositeExtract 282 0 + Store 283 284 + 285: 152(ptr) AccessChain 235(clip1) 32 + 286: 8(float) CompositeExtract 282 1 + Store 285 286 + 287: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 29 288 288 16 16 + 289: 18(fvec4) Load 217(clip0) + 290: 18(fvec4) Load 235(clip1) + 291: 8(float) ExtInst 3(GLSL.std.450) 67(Distance) 289 290 + 294: 293(ptr) AccessChain 203 209 292 + 295: 8(float) Load 294 + 296: 8(float) FDiv 291 295 + 298: 293(ptr) AccessChain 203 209 297 + 299: 8(float) Load 298 + 300: 8(float) FMul 296 299 + 303: 8(float) ExtInst 3(GLSL.std.450) 43(FClamp) 300 301 302 + ReturnValue 303 + FunctionEnd + Line 1 95 1 +55(frustumCheck(vf4;vf2;): 48(bool) Function None 51 + 53(Pos): 21(ptr) FunctionParameter + 54(inUV): 47(ptr) FunctionParameter + 58: Label + 310(pos): 21(ptr) Variable Function + 355(i): 354(ptr) Variable Function + 59: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 23(DebugScope) 57 + 60: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 29 16 16 16 16 + 63: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 28(DebugDeclare) 61 53(Pos) 40 + 66: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 28(DebugDeclare) 64 54(inUV) 40 + 306: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 101(DebugFunctionDefinition) 57 55(frustumCheck(vf4;vf2;) + 307: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 23(DebugScope) 57 + 308: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 29 309 309 16 16 + 313: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 28(DebugDeclare) 311 310(pos) 40 + 314: 18(fvec4) Load 53(Pos) + Store 310(pos) 314 + 315: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 29 316 316 16 16 + 326: 317 Load 323(textureHeight) + 335: 327 Load 332(samplerHeight) + 340: 336 SampledImage 326 335 + 341: 45(fvec2) Load 54(inUV) + 342: 18(fvec4) ImageSampleExplicitLod 340 341 Lod 223 + 343: 8(float) CompositeExtract 342 0 + 345: 293(ptr) AccessChain 203 209 344 + 346: 8(float) Load 345 + 347: 8(float) FMul 343 346 + 348: 152(ptr) AccessChain 310(pos) 32 + 349: 8(float) Load 348 + 350: 8(float) FSub 349 347 + 351: 152(ptr) AccessChain 310(pos) 32 + Store 351 350 + 352: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 29 353 353 16 16 + 358: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 28(DebugDeclare) 356 355(i) 40 + Store 355(i) 209 + Branch 359 + 359: Label + 363: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 23(DebugScope) 57 + 364: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 29 353 353 16 16 + LoopMerge 361 362 None + Branch 365 + 365: Label + 366: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 23(DebugScope) 57 + 367: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 29 353 353 16 16 + 368: 206(int) Load 355(i) + 370: 48(bool) SLessThan 368 265 + BranchConditional 370 360 361 + 360: Label + 371: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 23(DebugScope) 57 + 372: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 29 373 373 16 16 + 374: 18(fvec4) Load 310(pos) + 376: 206(int) Load 355(i) + 378: 377(ptr) AccessChain 203 209 375 376 + 379: 18(fvec4) Load 378 + 380: 8(float) Dot 374 379 + 382: 8(float) FAdd 380 381 + 384: 48(bool) FOrdLessThan 382 223 + SelectionMerge 386 None + BranchConditional 384 385 386 + 385: Label + 389: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 23(DebugScope) 57 + 390: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 29 391 391 16 16 + ReturnValue 388 + 386: Label + Branch 362 + 362: Label + 393: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 23(DebugScope) 57 + 394: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 29 353 353 16 16 + 395: 206(int) Load 355(i) + 396: 206(int) IAdd 395 210 + Store 355(i) 396 + Branch 359 + 361: Label + 398: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 23(DebugScope) 57 + 399: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 29 400 400 16 16 + ReturnValue 171 + FunctionEnd + Line 1 112 1 +103(ConstantsHS(struct-VSOutput-vf4-vf3-vf21[4];):90(ConstantsHSOutput) Function None 100 + 102(patch): 85(ptr) FunctionParameter + 106: Label + 408(output): 407(ptr) Variable Function + 418(param): 21(ptr) Variable Function + 421(param): 47(ptr) Variable Function + 462(param): 21(ptr) Variable Function + 465(param): 21(ptr) Variable Function + 472(param): 21(ptr) Variable Function + 475(param): 21(ptr) Variable Function + 482(param): 21(ptr) Variable Function + 485(param): 21(ptr) Variable Function + 492(param): 21(ptr) Variable Function + 495(param): 21(ptr) Variable Function + 107: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 23(DebugScope) 105 + 108: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 29 16 16 16 16 + 111: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 28(DebugDeclare) 109 102(patch) 40 + 403: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 101(DebugFunctionDefinition) 105 103(ConstantsHS(struct-VSOutput-vf4-vf3-vf21[4];) + 404: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 23(DebugScope) 105 + 405: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 29 406 406 16 16 + 411: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 28(DebugDeclare) 409 408(output) 40 + Store 408(output) 414 + 415: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 29 416 416 16 16 + 419: 21(ptr) AccessChain 102(patch) 209 209 + 420: 18(fvec4) Load 419 + Store 418(param) 420 + 422: 47(ptr) AccessChain 102(patch) 209 417 + 423: 45(fvec2) Load 422 + Store 421(param) 423 + 424: 48(bool) FunctionCall 55(frustumCheck(vf4;vf2;) 418(param) 421(param) + 427: 48(bool) LogicalNot 424 + SelectionMerge 429 None + BranchConditional 427 428 449 + 428: Label + 430: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 23(DebugScope) 105 + 431: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 29 432 432 16 16 + 433: 152(ptr) AccessChain 408(output) 210 209 + Store 433 223 + 434: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 29 435 435 16 16 + 436: 152(ptr) AccessChain 408(output) 210 210 + Store 436 223 + 437: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 29 438 438 16 16 + 439: 152(ptr) AccessChain 408(output) 209 209 + Store 439 223 + 440: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 29 441 441 16 16 + 442: 152(ptr) AccessChain 408(output) 209 210 + Store 442 223 + 443: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 29 444 444 16 16 + 445: 152(ptr) AccessChain 408(output) 209 417 + Store 445 223 + 446: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 29 447 447 16 16 + 448: 152(ptr) AccessChain 408(output) 209 375 + Store 448 223 + Branch 429 + 449: Label + 450: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 23(DebugScope) 105 + 451: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 29 452 452 16 16 + 453: 293(ptr) AccessChain 203 209 297 + 454: 8(float) Load 453 + 456: 48(bool) FOrdGreaterThan 454 223 + SelectionMerge 458 None + BranchConditional 456 457 516 + 457: Label + 459: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 23(DebugScope) 105 + 460: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 29 461 461 16 16 + 463: 21(ptr) AccessChain 102(patch) 375 209 + 464: 18(fvec4) Load 463 + Store 462(param) 464 + 466: 21(ptr) AccessChain 102(patch) 209 209 + 467: 18(fvec4) Load 466 + Store 465(param) 467 + 468: 8(float) FunctionCall 26(screenSpaceTessFactor(vf4;vf4;) 462(param) 465(param) + 469: 152(ptr) AccessChain 408(output) 209 209 + Store 469 468 + 470: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 29 471 471 16 16 + 473: 21(ptr) AccessChain 102(patch) 209 209 + 474: 18(fvec4) Load 473 + Store 472(param) 474 + 476: 21(ptr) AccessChain 102(patch) 210 209 + 477: 18(fvec4) Load 476 + Store 475(param) 477 + 478: 8(float) FunctionCall 26(screenSpaceTessFactor(vf4;vf4;) 472(param) 475(param) + 479: 152(ptr) AccessChain 408(output) 209 210 + Store 479 478 + 480: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 29 481 481 16 16 + 483: 21(ptr) AccessChain 102(patch) 210 209 + 484: 18(fvec4) Load 483 + Store 482(param) 484 + 486: 21(ptr) AccessChain 102(patch) 417 209 + 487: 18(fvec4) Load 486 + Store 485(param) 487 + 488: 8(float) FunctionCall 26(screenSpaceTessFactor(vf4;vf4;) 482(param) 485(param) + 489: 152(ptr) AccessChain 408(output) 209 417 + Store 489 488 + 490: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 29 491 491 16 16 + 493: 21(ptr) AccessChain 102(patch) 417 209 + 494: 18(fvec4) Load 493 + Store 492(param) 494 + 496: 21(ptr) AccessChain 102(patch) 375 209 + 497: 18(fvec4) Load 496 + Store 495(param) 497 + 498: 8(float) FunctionCall 26(screenSpaceTessFactor(vf4;vf4;) 492(param) 495(param) + 499: 152(ptr) AccessChain 408(output) 209 375 + Store 499 498 + 500: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 29 501 501 16 16 + 502: 152(ptr) AccessChain 408(output) 209 209 + 503: 8(float) Load 502 + 504: 152(ptr) AccessChain 408(output) 209 375 + 505: 8(float) Load 504 + 506: 8(float) ExtInst 3(GLSL.std.450) 46(FMix) 503 505 145 + 507: 152(ptr) AccessChain 408(output) 210 209 + Store 507 506 + 508: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 29 509 509 16 16 + 510: 152(ptr) AccessChain 408(output) 209 417 + 511: 8(float) Load 510 + 512: 152(ptr) AccessChain 408(output) 209 210 + 513: 8(float) Load 512 + 514: 8(float) ExtInst 3(GLSL.std.450) 46(FMix) 511 513 145 + 515: 152(ptr) AccessChain 408(output) 210 210 + Store 515 514 + Branch 458 + 516: Label + 517: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 23(DebugScope) 105 + 518: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 29 519 519 16 16 + 520: 152(ptr) AccessChain 408(output) 210 209 + Store 520 301 + 521: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 29 522 522 16 16 + 523: 152(ptr) AccessChain 408(output) 210 210 + Store 523 301 + 524: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 29 525 525 16 16 + 526: 152(ptr) AccessChain 408(output) 209 209 + Store 526 301 + 527: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 29 528 528 16 16 + 529: 152(ptr) AccessChain 408(output) 209 210 + Store 529 301 + 530: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 29 531 531 16 16 + 532: 152(ptr) AccessChain 408(output) 209 417 + Store 532 301 + 533: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 29 534 534 16 16 + 535: 152(ptr) AccessChain 408(output) 209 375 + Store 535 301 + Branch 458 + 458: Label + Branch 429 + 429: Label + 536: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 23(DebugScope) 105 + 537: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 29 538 538 16 16 + 539:90(ConstantsHSOutput) Load 408(output) + ReturnValue 539 + FunctionEnd + Line 1 158 1 +126(@main(struct-VSOutput-vf4-vf3-vf21[4];u1;):113(HSOutput) Function None 122 + 124(patch): 85(ptr) FunctionParameter +125(InvocationID): 112(ptr) FunctionParameter + 129: Label + 547(output): 546(ptr) Variable Function + 130: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 23(DebugScope) 128 + 131: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 29 16 16 16 16 + 133: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 28(DebugDeclare) 132 124(patch) 40 + 136: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 28(DebugDeclare) 134 125(InvocationID) 40 + 542: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 101(DebugFunctionDefinition) 128 126(@main(struct-VSOutput-vf4-vf3-vf21[4];u1;) + 543: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 23(DebugScope) 128 + 544: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 29 545 545 16 16 + 549: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 28(DebugDeclare) 548 547(output) 40 + Store 547(output) 552 + 553: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 29 554 554 16 16 + 555: 11(int) Load 125(InvocationID) + 556: 21(ptr) AccessChain 124(patch) 555 209 + 557: 18(fvec4) Load 556 + 558: 21(ptr) AccessChain 547(output) 209 + Store 558 557 + 559: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 29 560 560 16 16 + 561: 11(int) Load 125(InvocationID) + 563: 562(ptr) AccessChain 124(patch) 561 210 + 564: 67(fvec3) Load 563 + 565: 562(ptr) AccessChain 547(output) 210 + Store 565 564 + 566: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 29 567 567 16 16 + 568: 11(int) Load 125(InvocationID) + 569: 47(ptr) AccessChain 124(patch) 568 417 + 570: 45(fvec2) Load 569 + 571: 47(ptr) AccessChain 547(output) 417 + Store 571 570 + 572: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 29 573 573 16 16 + 574:113(HSOutput) Load 547(output) + ReturnValue 574 + FunctionEnd diff --git a/Test/baseResults/spv.debuginfo.hlsl.tese.out b/Test/baseResults/spv.debuginfo.hlsl.tese.out new file mode 100644 index 0000000000..d0901eb615 --- /dev/null +++ b/Test/baseResults/spv.debuginfo.hlsl.tese.out @@ -0,0 +1,626 @@ +spv.debuginfo.hlsl.tese +// Module Version 10000 +// Generated by (magic number): 8000b +// Id's are bound by 461 + + Capability Tessellation + Extension "SPV_KHR_non_semantic_info" + 2: ExtInstImport "NonSemantic.Shader.DebugInfo.100" + 3: ExtInstImport "GLSL.std.450" + MemoryModel Logical GLSL450 + EntryPoint TessellationEvaluation 6 "main" 352 367 376 385 392 398 438 442 446 449 452 455 458 + ExecutionMode 6 Quads + 1: String "" + 9: String "float" + 12: String "uint" + 26: String "TessLevelOuter" + 28: String "// OpModuleProcessed auto-map-locations +// OpModuleProcessed auto-map-bindings +// OpModuleProcessed entry-point main +// OpModuleProcessed client vulkan100 +// OpModuleProcessed target-env vulkan1.0 +// OpModuleProcessed keep-uncalled +// OpModuleProcessed hlsl-offsets +#line 1 +" + 32: String "TessLevelInner" + 35: String "ConstantsHSOutput" + 49: String "Pos" + 52: String "Normal" + 56: String "UV" + 60: String "HSOutput" + 68: String "WorldPos" + 78: String "DSOutput" + 85: String "@main" + 91: String "input" + 95: String "TessCoord" + 98: String "patch" + 107: String "output" + 118: String "uv1" + 121: String "int" + 137: String "uv2" + 160: String "n1" + 172: String "n2" + 194: String "pos1" + 206: String "pos2" + 218: String "pos" + 230: String "type.2d.image" + 231: String "@type.2d.image" + 236: String "displacementMapTexture" + 241: String "type.sampler" + 242: String "@type.sampler" + 246: String "displacementMapSampler" + 250: String "type.sampled.image" + 251: String "@type.sampled.image" + 265: String "modelview" + 270: String "lightPos" + 274: String "frustumPlanes" + 277: String "tessellatedEdgeSize" + 281: String "viewportDim" + 285: String "UBO" + 288: String "ubo" + Name 6 "main" + Name 24 "ConstantsHSOutput" + MemberName 24(ConstantsHSOutput) 0 "TessLevelOuter" + MemberName 24(ConstantsHSOutput) 1 "TessLevelInner" + Name 47 "HSOutput" + MemberName 47(HSOutput) 0 "Pos" + MemberName 47(HSOutput) 1 "Normal" + MemberName 47(HSOutput) 2 "UV" + Name 63 "DSOutput" + MemberName 63(DSOutput) 0 "Pos" + MemberName 63(DSOutput) 1 "Normal" + MemberName 63(DSOutput) 2 "UV" + MemberName 63(DSOutput) 3 "ViewVec" + MemberName 63(DSOutput) 4 "LightVec" + MemberName 63(DSOutput) 5 "EyePos" + MemberName 63(DSOutput) 6 "WorldPos" + Name 84 "@main(struct-ConstantsHSOutput-f1[4]-f1[2]1;vf2;struct-HSOutput-vf4-vf3-vf21[4];" + Name 81 "input" + Name 82 "TessCoord" + Name 83 "patch" + Name 105 "output" + Name 116 "uv1" + Name 135 "uv2" + Name 158 "n1" + Name 170 "n2" + Name 192 "pos1" + Name 204 "pos2" + Name 216 "pos" + Name 234 "displacementMapTexture" + Name 244 "displacementMapSampler" + Name 263 "UBO" + MemberName 263(UBO) 0 "projection" + MemberName 263(UBO) 1 "modelview" + MemberName 263(UBO) 2 "lightPos" + MemberName 263(UBO) 3 "frustumPlanes" + MemberName 263(UBO) 4 "displacementFactor" + MemberName 263(UBO) 5 "tessellationFactor" + MemberName 263(UBO) 6 "viewportDim" + MemberName 263(UBO) 7 "tessellatedEdgeSize" + Name 286 "ubo" + MemberName 286(ubo) 0 "ubo" + Name 291 "" + Name 350 "input" + Name 352 "input.TessLevelOuter" + Name 367 "input.TessLevelInner" + Name 374 "TessCoord" + Name 376 "TessCoord" + Name 382 "patch" + Name 385 "patch.Pos" + Name 392 "patch.Normal" + Name 398 "patch.UV" + Name 430 "flattenTemp" + Name 432 "param" + Name 434 "param" + Name 438 "@entryPointOutput.Pos" + Name 442 "@entryPointOutput.Normal" + Name 446 "@entryPointOutput.UV" + Name 449 "@entryPointOutput.ViewVec" + Name 452 "@entryPointOutput.LightVec" + Name 455 "@entryPointOutput.EyePos" + Name 458 "@entryPointOutput.WorldPos" + Decorate 234(displacementMapTexture) DescriptorSet 0 + Decorate 234(displacementMapTexture) Binding 1 + Decorate 244(displacementMapSampler) DescriptorSet 0 + Decorate 244(displacementMapSampler) Binding 1 + Decorate 261 ArrayStride 16 + MemberDecorate 263(UBO) 0 RowMajor + MemberDecorate 263(UBO) 0 Offset 0 + MemberDecorate 263(UBO) 0 MatrixStride 16 + MemberDecorate 263(UBO) 1 RowMajor + MemberDecorate 263(UBO) 1 Offset 64 + MemberDecorate 263(UBO) 1 MatrixStride 16 + MemberDecorate 263(UBO) 2 Offset 128 + MemberDecorate 263(UBO) 3 Offset 144 + MemberDecorate 263(UBO) 4 Offset 240 + MemberDecorate 263(UBO) 5 Offset 244 + MemberDecorate 263(UBO) 6 Offset 248 + MemberDecorate 263(UBO) 7 Offset 256 + MemberDecorate 286(ubo) 0 Offset 0 + Decorate 286(ubo) Block + Decorate 291 DescriptorSet 0 + Decorate 291 Binding 0 + Decorate 352(input.TessLevelOuter) Patch + Decorate 352(input.TessLevelOuter) BuiltIn TessLevelOuter + Decorate 367(input.TessLevelInner) Patch + Decorate 367(input.TessLevelInner) BuiltIn TessLevelInner + Decorate 376(TessCoord) Patch + Decorate 376(TessCoord) BuiltIn TessCoord + Decorate 385(patch.Pos) BuiltIn Position + Decorate 392(patch.Normal) Location 0 + Decorate 398(patch.UV) Location 1 + Decorate 438(@entryPointOutput.Pos) BuiltIn Position + Decorate 442(@entryPointOutput.Normal) Location 0 + Decorate 446(@entryPointOutput.UV) Location 1 + Decorate 449(@entryPointOutput.ViewVec) Location 2 + Decorate 452(@entryPointOutput.LightVec) Location 3 + Decorate 455(@entryPointOutput.EyePos) Location 4 + Decorate 458(@entryPointOutput.WorldPos) Location 5 + 4: TypeVoid + 5: TypeFunction 4 + 8: TypeFloat 32 + 11: TypeInt 32 0 + 14: 11(int) Constant 32 + 15: 11(int) Constant 6 + 16: 11(int) Constant 0 + 13: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 2(DebugTypeBasic) 12 14 15 16 + 17: 11(int) Constant 3 + 10: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 2(DebugTypeBasic) 9 14 17 16 + 18: 11(int) Constant 4 + 19: TypeArray 8(float) 18 + 20: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 5(DebugTypeArray) 10 18 + 21: 11(int) Constant 2 + 22: TypeArray 8(float) 21 + 23: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 5(DebugTypeArray) 10 21 +24(ConstantsHSOutput): TypeStruct 19 22 + 27: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 35(DebugSource) 1 28 + 29: 11(int) Constant 51 + 30: 11(int) Constant 25 + 25: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 11(DebugTypeMember) 26 20 27 29 30 16 16 17 + 33: 11(int) Constant 52 + 31: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 11(DebugTypeMember) 32 23 27 33 30 16 16 17 + 36: 11(int) Constant 1 + 38: 11(int) Constant 5 + 37: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 1(DebugCompilationUnit) 36 18 27 38 + 34: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 10(DebugTypeComposite) 35 36 27 16 16 37 35 16 17 25 31 + 39: TypePointer Function 24(ConstantsHSOutput) + 40: TypeVector 8(float) 2 + 41: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 6(DebugTypeVector) 10 21 + 42: TypePointer Function 40(fvec2) + 43: TypeVector 8(float) 4 + 44: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 6(DebugTypeVector) 10 18 + 45: TypeVector 8(float) 3 + 46: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 6(DebugTypeVector) 10 17 + 47(HSOutput): TypeStruct 43(fvec4) 45(fvec3) 40(fvec2) + 50: 11(int) Constant 44 + 48: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 11(DebugTypeMember) 49 44 27 50 14 16 16 17 + 53: 11(int) Constant 45 + 54: 11(int) Constant 35 + 51: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 11(DebugTypeMember) 52 46 27 53 54 16 16 17 + 57: 11(int) Constant 46 + 58: 11(int) Constant 31 + 55: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 11(DebugTypeMember) 56 41 27 57 58 16 16 17 + 59: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 10(DebugTypeComposite) 60 36 27 16 16 37 60 16 17 48 51 55 + 61: TypeArray 47(HSOutput) 18 + 62: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 5(DebugTypeArray) 59 18 + 63(DSOutput): TypeStruct 43(fvec4) 45(fvec3) 40(fvec2) 45(fvec3) 45(fvec3) 45(fvec3) 45(fvec3) + 65: 11(int) Constant 57 + 66: 11(int) Constant 13 + 64: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 11(DebugTypeMember) 49 44 27 65 66 16 16 17 + 69: 11(int) Constant 63 + 70: 11(int) Constant 37 + 67: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 11(DebugTypeMember) 68 46 27 69 70 16 16 17 + 72: 11(int) Constant 59 + 71: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 11(DebugTypeMember) 56 41 27 72 58 16 16 17 + 73: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 11(DebugTypeMember) 68 46 27 69 70 16 16 17 + 74: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 11(DebugTypeMember) 68 46 27 69 70 16 16 17 + 75: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 11(DebugTypeMember) 68 46 27 69 70 16 16 17 + 76: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 11(DebugTypeMember) 68 46 27 69 70 16 16 17 + 77: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 10(DebugTypeComposite) 78 36 27 16 16 37 78 16 17 64 67 71 73 74 75 76 + 79: TypeFunction 63(DSOutput) 39(ptr) 42(ptr) 61 + 80: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 8(DebugTypeFunction) 17 77 34 41 59 + 86: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 20(DebugFunction) 85 80 27 16 16 37 85 17 16 + 90: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 26(DebugLocalVariable) 91 34 27 16 16 86 18 36 + 93: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 31(DebugExpression) + 94: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 26(DebugLocalVariable) 95 41 27 16 16 86 18 21 + 97: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 26(DebugLocalVariable) 98 59 27 16 16 86 18 17 + 103: 11(int) Constant 70 + 104: TypePointer Function 63(DSOutput) + 106: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 26(DebugLocalVariable) 107 77 27 103 16 86 18 + 109: 8(float) Constant 0 + 110: 43(fvec4) ConstantComposite 109 109 109 109 + 111: 45(fvec3) ConstantComposite 109 109 109 + 112: 40(fvec2) ConstantComposite 109 109 + 113:63(DSOutput) ConstantComposite 110 111 112 111 111 111 111 + 115: 11(int) Constant 71 + 117: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 26(DebugLocalVariable) 118 41 27 115 16 86 18 + 120: TypeInt 32 1 + 122: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 2(DebugTypeBasic) 121 14 18 16 + 123: 120(int) Constant 0 + 124: 120(int) Constant 2 + 126: 120(int) Constant 1 + 128: TypePointer Function 8(float) + 134: 11(int) Constant 72 + 136: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 26(DebugLocalVariable) 137 41 27 134 16 86 18 + 139: 120(int) Constant 3 + 147: 11(int) Constant 73 + 156: 11(int) Constant 75 + 157: TypePointer Function 45(fvec3) + 159: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 26(DebugLocalVariable) 160 46 27 156 16 86 18 + 169: 11(int) Constant 76 + 171: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 26(DebugLocalVariable) 172 46 27 169 16 86 18 + 181: 11(int) Constant 77 + 190: 11(int) Constant 80 + 191: TypePointer Function 43(fvec4) + 193: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 26(DebugLocalVariable) 194 44 27 190 16 86 18 + 203: 11(int) Constant 81 + 205: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 26(DebugLocalVariable) 206 44 27 203 16 86 18 + 215: 11(int) Constant 82 + 217: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 26(DebugLocalVariable) 218 44 27 215 16 86 18 + 227: 11(int) Constant 84 + 228: TypeImage 8(float) 2D sampled format:Unknown + 232: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 0(DebugInfoNone) + 229: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 10(DebugTypeComposite) 230 16 27 227 16 37 231 232 17 + 233: TypePointer UniformConstant 228 +234(displacementMapTexture): 233(ptr) Variable UniformConstant + 237: 11(int) Constant 8 + 235: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 18(DebugGlobalVariable) 236 229 27 227 16 37 236 234(displacementMapTexture) 237 + 239: TypeSampler + 240: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 10(DebugTypeComposite) 241 36 27 227 16 37 242 232 17 + 243: TypePointer UniformConstant 239 +244(displacementMapSampler): 243(ptr) Variable UniformConstant + 245: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 18(DebugGlobalVariable) 246 240 27 227 16 37 246 244(displacementMapSampler) 237 + 248: TypeSampledImage 228 + 249: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 10(DebugTypeComposite) 250 16 27 227 16 37 251 232 17 + 257: TypeMatrix 43(fvec4) 4 + 259: TypeBool + 260: 259(bool) ConstantTrue + 258: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 108(DebugTypeMatrix) 44 18 260 + 261: TypeArray 43(fvec4) 15 + 262: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 5(DebugTypeArray) 44 15 + 263(UBO): TypeStruct 257 257 43(fvec4) 261 8(float) 8(float) 40(fvec2) 8(float) + 266: 11(int) Constant 29 + 267: 11(int) Constant 20 + 264: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 11(DebugTypeMember) 265 258 27 266 267 16 16 17 + 268: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 11(DebugTypeMember) 265 258 27 266 267 16 16 17 + 271: 11(int) Constant 30 + 272: 11(int) Constant 17 + 269: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 11(DebugTypeMember) 270 44 27 271 272 16 16 17 + 275: 11(int) Constant 22 + 273: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 11(DebugTypeMember) 274 262 27 58 275 16 16 17 + 278: 11(int) Constant 27 + 276: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 11(DebugTypeMember) 277 10 27 54 278 16 16 17 + 279: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 11(DebugTypeMember) 277 10 27 54 278 16 16 17 + 282: 11(int) Constant 34 + 280: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 11(DebugTypeMember) 281 41 27 282 267 16 16 17 + 283: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 11(DebugTypeMember) 277 10 27 54 278 16 16 17 + 284: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 10(DebugTypeComposite) 285 36 27 227 16 37 285 16 17 264 268 269 273 276 279 280 283 + 286(ubo): TypeStruct 263(UBO) + 287: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 11(DebugTypeMember) 288 284 27 70 70 16 16 17 + 289: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 10(DebugTypeComposite) 288 36 27 227 16 37 288 16 17 287 + 290: TypePointer Uniform 286(ubo) + 291: 290(ptr) Variable Uniform + 292: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 18(DebugGlobalVariable) 1 289 27 227 16 37 1 291 237 + 293: 120(int) Constant 4 + 294: TypePointer Uniform 8(float) + 303: 11(int) Constant 86 + 305: TypePointer Uniform 257 + 314: 11(int) Constant 89 + 320: 11(int) Constant 90 + 321: TypePointer Uniform 43(fvec4) + 331: 11(int) Constant 91 + 332: 120(int) Constant 6 + 337: 11(int) Constant 92 + 338: 120(int) Constant 5 + 346: 11(int) Constant 93 + 351: TypePointer Input 19 +352(input.TessLevelOuter): 351(ptr) Variable Input + 353: TypePointer Input 8(float) + 366: TypePointer Input 22 +367(input.TessLevelInner): 366(ptr) Variable Input + 375: TypePointer Input 45(fvec3) + 376(TessCoord): 375(ptr) Variable Input + 381: TypePointer Function 61 + 383: TypeArray 43(fvec4) 18 + 384: TypePointer Input 383 + 385(patch.Pos): 384(ptr) Variable Input + 386: TypePointer Input 43(fvec4) + 390: TypeArray 45(fvec3) 18 + 391: TypePointer Input 390 +392(patch.Normal): 391(ptr) Variable Input + 396: TypeArray 40(fvec2) 18 + 397: TypePointer Input 396 + 398(patch.UV): 397(ptr) Variable Input + 399: TypePointer Input 40(fvec2) + 437: TypePointer Output 43(fvec4) +438(@entryPointOutput.Pos): 437(ptr) Variable Output + 441: TypePointer Output 45(fvec3) +442(@entryPointOutput.Normal): 441(ptr) Variable Output + 445: TypePointer Output 40(fvec2) +446(@entryPointOutput.UV): 445(ptr) Variable Output +449(@entryPointOutput.ViewVec): 441(ptr) Variable Output +452(@entryPointOutput.LightVec): 441(ptr) Variable Output +455(@entryPointOutput.EyePos): 441(ptr) Variable Output +458(@entryPointOutput.WorldPos): 441(ptr) Variable Output + Line 1 68 1 + 6(main): 4 Function None 5 + 7: Label + 350(input): 39(ptr) Variable Function + 374(TessCoord): 42(ptr) Variable Function + 382(patch): 381(ptr) Variable Function +430(flattenTemp): 104(ptr) Variable Function + 432(param): 39(ptr) Variable Function + 434(param): 42(ptr) Variable Function + Line 1 68 0 + 354: 353(ptr) AccessChain 352(input.TessLevelOuter) 123 + 355: 8(float) Load 354 + 356: 128(ptr) AccessChain 350(input) 123 123 + Store 356 355 + 357: 353(ptr) AccessChain 352(input.TessLevelOuter) 126 + 358: 8(float) Load 357 + 359: 128(ptr) AccessChain 350(input) 123 126 + Store 359 358 + 360: 353(ptr) AccessChain 352(input.TessLevelOuter) 124 + 361: 8(float) Load 360 + 362: 128(ptr) AccessChain 350(input) 123 124 + Store 362 361 + 363: 353(ptr) AccessChain 352(input.TessLevelOuter) 139 + 364: 8(float) Load 363 + 365: 128(ptr) AccessChain 350(input) 123 139 + Store 365 364 + 368: 353(ptr) AccessChain 367(input.TessLevelInner) 123 + 369: 8(float) Load 368 + 370: 128(ptr) AccessChain 350(input) 126 123 + Store 370 369 + 371: 353(ptr) AccessChain 367(input.TessLevelInner) 126 + 372: 8(float) Load 371 + 373: 128(ptr) AccessChain 350(input) 126 126 + Store 373 372 + 377: 45(fvec3) Load 376(TessCoord) + 378: 8(float) CompositeExtract 377 0 + 379: 8(float) CompositeExtract 377 1 + 380: 40(fvec2) CompositeConstruct 378 379 + Store 374(TessCoord) 380 + 387: 386(ptr) AccessChain 385(patch.Pos) 123 + 388: 43(fvec4) Load 387 + 389: 191(ptr) AccessChain 382(patch) 123 123 + Store 389 388 + 393: 375(ptr) AccessChain 392(patch.Normal) 123 + 394: 45(fvec3) Load 393 + 395: 157(ptr) AccessChain 382(patch) 123 126 + Store 395 394 + 400: 399(ptr) AccessChain 398(patch.UV) 123 + 401: 40(fvec2) Load 400 + 402: 42(ptr) AccessChain 382(patch) 123 124 + Store 402 401 + 403: 386(ptr) AccessChain 385(patch.Pos) 126 + 404: 43(fvec4) Load 403 + 405: 191(ptr) AccessChain 382(patch) 126 123 + Store 405 404 + 406: 375(ptr) AccessChain 392(patch.Normal) 126 + 407: 45(fvec3) Load 406 + 408: 157(ptr) AccessChain 382(patch) 126 126 + Store 408 407 + 409: 399(ptr) AccessChain 398(patch.UV) 126 + 410: 40(fvec2) Load 409 + 411: 42(ptr) AccessChain 382(patch) 126 124 + Store 411 410 + 412: 386(ptr) AccessChain 385(patch.Pos) 124 + 413: 43(fvec4) Load 412 + 414: 191(ptr) AccessChain 382(patch) 124 123 + Store 414 413 + 415: 375(ptr) AccessChain 392(patch.Normal) 124 + 416: 45(fvec3) Load 415 + 417: 157(ptr) AccessChain 382(patch) 124 126 + Store 417 416 + 418: 399(ptr) AccessChain 398(patch.UV) 124 + 419: 40(fvec2) Load 418 + 420: 42(ptr) AccessChain 382(patch) 124 124 + Store 420 419 + 421: 386(ptr) AccessChain 385(patch.Pos) 139 + 422: 43(fvec4) Load 421 + 423: 191(ptr) AccessChain 382(patch) 139 123 + Store 423 422 + 424: 375(ptr) AccessChain 392(patch.Normal) 139 + 425: 45(fvec3) Load 424 + 426: 157(ptr) AccessChain 382(patch) 139 126 + Store 426 425 + 427: 399(ptr) AccessChain 398(patch.UV) 139 + 428: 40(fvec2) Load 427 + 429: 42(ptr) AccessChain 382(patch) 139 124 + Store 429 428 + 431: 61 Load 382(patch) + 433:24(ConstantsHSOutput) Load 350(input) + Store 432(param) 433 + 435: 40(fvec2) Load 374(TessCoord) + Store 434(param) 435 + 436:63(DSOutput) FunctionCall 84(@main(struct-ConstantsHSOutput-f1[4]-f1[2]1;vf2;struct-HSOutput-vf4-vf3-vf21[4];) 432(param) 434(param) 431 + Store 430(flattenTemp) 436 + 439: 191(ptr) AccessChain 430(flattenTemp) 123 + 440: 43(fvec4) Load 439 + Store 438(@entryPointOutput.Pos) 440 + 443: 157(ptr) AccessChain 430(flattenTemp) 126 + 444: 45(fvec3) Load 443 + Store 442(@entryPointOutput.Normal) 444 + 447: 42(ptr) AccessChain 430(flattenTemp) 124 + 448: 40(fvec2) Load 447 + Store 446(@entryPointOutput.UV) 448 + 450: 157(ptr) AccessChain 430(flattenTemp) 139 + 451: 45(fvec3) Load 450 + Store 449(@entryPointOutput.ViewVec) 451 + 453: 157(ptr) AccessChain 430(flattenTemp) 293 + 454: 45(fvec3) Load 453 + Store 452(@entryPointOutput.LightVec) 454 + 456: 157(ptr) AccessChain 430(flattenTemp) 338 + 457: 45(fvec3) Load 456 + Store 455(@entryPointOutput.EyePos) 457 + 459: 157(ptr) AccessChain 430(flattenTemp) 332 + 460: 45(fvec3) Load 459 + Store 458(@entryPointOutput.WorldPos) 460 + Return + FunctionEnd + Line 1 68 1 +84(@main(struct-ConstantsHSOutput-f1[4]-f1[2]1;vf2;struct-HSOutput-vf4-vf3-vf21[4];):63(DSOutput) Function None 79 + 81(input): 39(ptr) FunctionParameter + 82(TessCoord): 42(ptr) FunctionParameter + 83(patch): 61 FunctionParameter + 87: Label + 105(output): 104(ptr) Variable Function + 116(uv1): 42(ptr) Variable Function + 135(uv2): 42(ptr) Variable Function + 158(n1): 157(ptr) Variable Function + 170(n2): 157(ptr) Variable Function + 192(pos1): 191(ptr) Variable Function + 204(pos2): 191(ptr) Variable Function + 216(pos): 191(ptr) Variable Function + 88: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 23(DebugScope) 86 + 89: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 27 16 16 16 16 + 92: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 28(DebugDeclare) 90 81(input) 93 + 96: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 28(DebugDeclare) 94 82(TessCoord) 93 + 99: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 28(DebugDeclare) 97 83(patch) 93 + 100: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 101(DebugFunctionDefinition) 86 84(@main(struct-ConstantsHSOutput-f1[4]-f1[2]1;vf2;struct-HSOutput-vf4-vf3-vf21[4];) + 101: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 23(DebugScope) 86 + 102: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 27 103 103 16 16 + 108: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 28(DebugDeclare) 106 105(output) 93 + Store 105(output) 113 + 114: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 27 115 115 16 16 + 119: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 28(DebugDeclare) 117 116(uv1) 93 + 125: 40(fvec2) CompositeExtract 83(patch) 0 2 + 127: 40(fvec2) CompositeExtract 83(patch) 1 2 + 129: 128(ptr) AccessChain 82(TessCoord) 16 + 130: 8(float) Load 129 + 131: 40(fvec2) CompositeConstruct 130 130 + 132: 40(fvec2) ExtInst 3(GLSL.std.450) 46(FMix) 125 127 131 + Store 116(uv1) 132 + 133: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 27 134 134 16 16 + 138: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 28(DebugDeclare) 136 135(uv2) 93 + 140: 40(fvec2) CompositeExtract 83(patch) 3 2 + 141: 40(fvec2) CompositeExtract 83(patch) 2 2 + 142: 128(ptr) AccessChain 82(TessCoord) 16 + 143: 8(float) Load 142 + 144: 40(fvec2) CompositeConstruct 143 143 + 145: 40(fvec2) ExtInst 3(GLSL.std.450) 46(FMix) 140 141 144 + Store 135(uv2) 145 + 146: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 27 147 147 16 16 + 148: 40(fvec2) Load 116(uv1) + 149: 40(fvec2) Load 135(uv2) + 150: 128(ptr) AccessChain 82(TessCoord) 36 + 151: 8(float) Load 150 + 152: 40(fvec2) CompositeConstruct 151 151 + 153: 40(fvec2) ExtInst 3(GLSL.std.450) 46(FMix) 148 149 152 + 154: 42(ptr) AccessChain 105(output) 124 + Store 154 153 + 155: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 27 156 156 16 16 + 161: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 28(DebugDeclare) 159 158(n1) 93 + 162: 45(fvec3) CompositeExtract 83(patch) 0 1 + 163: 45(fvec3) CompositeExtract 83(patch) 1 1 + 164: 128(ptr) AccessChain 82(TessCoord) 16 + 165: 8(float) Load 164 + 166: 45(fvec3) CompositeConstruct 165 165 165 + 167: 45(fvec3) ExtInst 3(GLSL.std.450) 46(FMix) 162 163 166 + Store 158(n1) 167 + 168: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 27 169 169 16 16 + 173: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 28(DebugDeclare) 171 170(n2) 93 + 174: 45(fvec3) CompositeExtract 83(patch) 3 1 + 175: 45(fvec3) CompositeExtract 83(patch) 2 1 + 176: 128(ptr) AccessChain 82(TessCoord) 16 + 177: 8(float) Load 176 + 178: 45(fvec3) CompositeConstruct 177 177 177 + 179: 45(fvec3) ExtInst 3(GLSL.std.450) 46(FMix) 174 175 178 + Store 170(n2) 179 + 180: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 27 181 181 16 16 + 182: 45(fvec3) Load 158(n1) + 183: 45(fvec3) Load 170(n2) + 184: 128(ptr) AccessChain 82(TessCoord) 36 + 185: 8(float) Load 184 + 186: 45(fvec3) CompositeConstruct 185 185 185 + 187: 45(fvec3) ExtInst 3(GLSL.std.450) 46(FMix) 182 183 186 + 188: 157(ptr) AccessChain 105(output) 126 + Store 188 187 + 189: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 27 190 190 16 16 + 195: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 28(DebugDeclare) 193 192(pos1) 93 + 196: 43(fvec4) CompositeExtract 83(patch) 0 0 + 197: 43(fvec4) CompositeExtract 83(patch) 1 0 + 198: 128(ptr) AccessChain 82(TessCoord) 16 + 199: 8(float) Load 198 + 200: 43(fvec4) CompositeConstruct 199 199 199 199 + 201: 43(fvec4) ExtInst 3(GLSL.std.450) 46(FMix) 196 197 200 + Store 192(pos1) 201 + 202: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 27 203 203 16 16 + 207: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 28(DebugDeclare) 205 204(pos2) 93 + 208: 43(fvec4) CompositeExtract 83(patch) 3 0 + 209: 43(fvec4) CompositeExtract 83(patch) 2 0 + 210: 128(ptr) AccessChain 82(TessCoord) 16 + 211: 8(float) Load 210 + 212: 43(fvec4) CompositeConstruct 211 211 211 211 + 213: 43(fvec4) ExtInst 3(GLSL.std.450) 46(FMix) 208 209 212 + Store 204(pos2) 213 + 214: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 27 215 215 16 16 + 219: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 28(DebugDeclare) 217 216(pos) 93 + 220: 43(fvec4) Load 192(pos1) + 221: 43(fvec4) Load 204(pos2) + 222: 128(ptr) AccessChain 82(TessCoord) 36 + 223: 8(float) Load 222 + 224: 43(fvec4) CompositeConstruct 223 223 223 223 + 225: 43(fvec4) ExtInst 3(GLSL.std.450) 46(FMix) 220 221 224 + Store 216(pos) 225 + 226: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 27 227 227 16 16 + 238: 228 Load 234(displacementMapTexture) + 247: 239 Load 244(displacementMapSampler) + 252: 248 SampledImage 238 247 + 253: 42(ptr) AccessChain 105(output) 124 + 254: 40(fvec2) Load 253 + 255: 43(fvec4) ImageSampleExplicitLod 252 254 Lod 109 + 256: 8(float) CompositeExtract 255 0 + 295: 294(ptr) AccessChain 291 123 293 + 296: 8(float) Load 295 + 297: 8(float) FMul 256 296 + 298: 128(ptr) AccessChain 216(pos) 36 + 299: 8(float) Load 298 + 300: 8(float) FSub 299 297 + 301: 128(ptr) AccessChain 216(pos) 36 + Store 301 300 + 302: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 27 303 303 16 16 + 304: 43(fvec4) Load 216(pos) + 306: 305(ptr) AccessChain 291 123 126 + 307: 257 Load 306 + 308: 43(fvec4) VectorTimesMatrix 304 307 + 309: 305(ptr) AccessChain 291 123 123 + 310: 257 Load 309 + 311: 43(fvec4) VectorTimesMatrix 308 310 + 312: 191(ptr) AccessChain 105(output) 123 + Store 312 311 + 313: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 27 314 314 16 16 + 315: 43(fvec4) Load 216(pos) + 316: 45(fvec3) VectorShuffle 315 315 0 1 2 + 317: 45(fvec3) FNegate 316 + 318: 157(ptr) AccessChain 105(output) 139 + Store 318 317 + 319: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 27 320 320 16 16 + 322: 321(ptr) AccessChain 291 123 124 + 323: 43(fvec4) Load 322 + 324: 45(fvec3) VectorShuffle 323 323 0 1 2 + 325: 157(ptr) AccessChain 105(output) 139 + 326: 45(fvec3) Load 325 + 327: 45(fvec3) FAdd 324 326 + 328: 45(fvec3) ExtInst 3(GLSL.std.450) 69(Normalize) 327 + 329: 157(ptr) AccessChain 105(output) 293 + Store 329 328 + 330: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 27 331 331 16 16 + 333: 43(fvec4) Load 216(pos) + 334: 45(fvec3) VectorShuffle 333 333 0 1 2 + 335: 157(ptr) AccessChain 105(output) 332 + Store 335 334 + 336: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 27 337 337 16 16 + 339: 43(fvec4) Load 216(pos) + 340: 305(ptr) AccessChain 291 123 126 + 341: 257 Load 340 + 342: 43(fvec4) VectorTimesMatrix 339 341 + 343: 45(fvec3) VectorShuffle 342 342 0 1 2 + 344: 157(ptr) AccessChain 105(output) 338 + Store 344 343 + 345: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 27 346 346 16 16 + 347:63(DSOutput) Load 105(output) + ReturnValue 347 + FunctionEnd diff --git a/Test/baseResults/spv.debuginfo.hlsl.vert.out b/Test/baseResults/spv.debuginfo.hlsl.vert.out new file mode 100644 index 0000000000..94431eddaa --- /dev/null +++ b/Test/baseResults/spv.debuginfo.hlsl.vert.out @@ -0,0 +1,642 @@ +spv.debuginfo.hlsl.vert +// Module Version 10000 +// Generated by (magic number): 8000b +// Id's are bound by 495 + + Capability Shader + Extension "SPV_KHR_non_semantic_info" + 2: ExtInstImport "NonSemantic.Shader.DebugInfo.100" + 3: ExtInstImport "GLSL.std.450" + MemoryModel Logical GLSL450 + EntryPoint Vertex 6 "main" 444 447 451 454 457 460 464 468 476 480 483 486 489 492 + 1: String "" + 9: String "float" + 12: String "uint" + 24: String "int" + 29: String "instanceRot" + 31: String "// OpModuleProcessed auto-map-locations +// OpModuleProcessed auto-map-bindings +// OpModuleProcessed entry-point main +// OpModuleProcessed client vulkan100 +// OpModuleProcessed target-env vulkan1.0 +// OpModuleProcessed keep-uncalled +// OpModuleProcessed hlsl-offsets +#line 1 +" + 36: String "UV" + 43: String "instanceScale" + 47: String "instanceTexIndex" + 51: String "VSInput" + 60: String "Pos" + 64: String "LightVec" + 71: String "VSOutput" + 76: String "@main" + 82: String "input" + 92: String "output" + 125: String "s" + 136: String "modelview" + 141: String "lightPos" + 145: String "globSpeed" + 149: String "UBO" + 152: String "ubo" + 169: String "c" + 184: String "mx" + 219: String "my" + 253: String "mz" + 273: String "rotMat" + 302: String "gRotMat" + 329: String "locPos" + 343: String "pos" + 408: String "lPos" + Name 6 "main" + Name 27 "VSInput" + MemberName 27(VSInput) 0 "Pos" + MemberName 27(VSInput) 1 "Normal" + MemberName 27(VSInput) 2 "UV" + MemberName 27(VSInput) 3 "Color" + MemberName 27(VSInput) 4 "instancePos" + MemberName 27(VSInput) 5 "instanceRot" + MemberName 27(VSInput) 6 "instanceScale" + MemberName 27(VSInput) 7 "instanceTexIndex" + Name 58 "VSOutput" + MemberName 58(VSOutput) 0 "Pos" + MemberName 58(VSOutput) 1 "Normal" + MemberName 58(VSOutput) 2 "Color" + MemberName 58(VSOutput) 3 "UV" + MemberName 58(VSOutput) 4 "ViewVec" + MemberName 58(VSOutput) 5 "LightVec" + Name 75 "@main(struct-VSInput-vf3-vf3-vf2-vf3-vf3-vf3-f1-i11;" + Name 74 "input" + Name 90 "output" + Name 123 "s" + Name 134 "UBO" + MemberName 134(UBO) 0 "projection" + MemberName 134(UBO) 1 "modelview" + MemberName 134(UBO) 2 "lightPos" + MemberName 134(UBO) 3 "locSpeed" + MemberName 134(UBO) 4 "globSpeed" + Name 150 "ubo" + MemberName 150(ubo) 0 "ubo" + Name 156 "" + Name 167 "c" + Name 182 "mx" + Name 217 "my" + Name 251 "mz" + Name 271 "rotMat" + Name 300 "gRotMat" + Name 327 "locPos" + Name 341 "pos" + Name 406 "lPos" + Name 442 "input" + Name 444 "input.Pos" + Name 447 "input.Normal" + Name 451 "input.UV" + Name 454 "input.Color" + Name 457 "input.instancePos" + Name 460 "input.instanceRot" + Name 464 "input.instanceScale" + Name 468 "input.instanceTexIndex" + Name 471 "flattenTemp" + Name 472 "param" + Name 476 "@entryPointOutput.Pos" + Name 480 "@entryPointOutput.Normal" + Name 483 "@entryPointOutput.Color" + Name 486 "@entryPointOutput.UV" + Name 489 "@entryPointOutput.ViewVec" + Name 492 "@entryPointOutput.LightVec" + MemberDecorate 134(UBO) 0 RowMajor + MemberDecorate 134(UBO) 0 Offset 0 + MemberDecorate 134(UBO) 0 MatrixStride 16 + MemberDecorate 134(UBO) 1 RowMajor + MemberDecorate 134(UBO) 1 Offset 64 + MemberDecorate 134(UBO) 1 MatrixStride 16 + MemberDecorate 134(UBO) 2 Offset 128 + MemberDecorate 134(UBO) 3 Offset 144 + MemberDecorate 134(UBO) 4 Offset 148 + MemberDecorate 150(ubo) 0 Offset 0 + Decorate 150(ubo) Block + Decorate 156 DescriptorSet 0 + Decorate 156 Binding 0 + Decorate 444(input.Pos) Location 0 + Decorate 447(input.Normal) Location 1 + Decorate 451(input.UV) Location 2 + Decorate 454(input.Color) Location 3 + Decorate 457(input.instancePos) Location 4 + Decorate 460(input.instanceRot) Location 5 + Decorate 464(input.instanceScale) Location 6 + Decorate 468(input.instanceTexIndex) Location 7 + Decorate 476(@entryPointOutput.Pos) BuiltIn Position + Decorate 480(@entryPointOutput.Normal) Location 0 + Decorate 483(@entryPointOutput.Color) Location 1 + Decorate 486(@entryPointOutput.UV) Location 2 + Decorate 489(@entryPointOutput.ViewVec) Location 3 + Decorate 492(@entryPointOutput.LightVec) Location 4 + 4: TypeVoid + 5: TypeFunction 4 + 8: TypeFloat 32 + 11: TypeInt 32 0 + 14: 11(int) Constant 32 + 15: 11(int) Constant 6 + 16: 11(int) Constant 0 + 13: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 2(DebugTypeBasic) 12 14 15 16 + 17: 11(int) Constant 3 + 10: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 2(DebugTypeBasic) 9 14 17 16 + 18: TypeVector 8(float) 3 + 19: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 6(DebugTypeVector) 10 17 + 20: TypeVector 8(float) 2 + 21: 11(int) Constant 2 + 22: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 6(DebugTypeVector) 10 21 + 23: TypeInt 32 1 + 26: 11(int) Constant 4 + 25: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 2(DebugTypeBasic) 24 14 26 16 + 27(VSInput): TypeStruct 18(fvec3) 18(fvec3) 20(fvec2) 18(fvec3) 18(fvec3) 18(fvec3) 8(float) 23(int) + 30: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 35(DebugSource) 1 31 + 32: 11(int) Constant 35 + 33: 11(int) Constant 40 + 28: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 11(DebugTypeMember) 29 19 30 32 33 16 16 17 + 34: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 11(DebugTypeMember) 29 19 30 32 33 16 16 17 + 37: 11(int) Constant 30 + 38: 11(int) Constant 31 + 35: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 11(DebugTypeMember) 36 22 30 37 38 16 16 17 + 39: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 11(DebugTypeMember) 29 19 30 32 33 16 16 17 + 40: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 11(DebugTypeMember) 29 19 30 32 33 16 16 17 + 41: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 11(DebugTypeMember) 29 19 30 32 33 16 16 17 + 44: 11(int) Constant 36 + 45: 11(int) Constant 41 + 42: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 11(DebugTypeMember) 43 10 30 44 45 16 16 17 + 48: 11(int) Constant 37 + 49: 11(int) Constant 42 + 46: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 11(DebugTypeMember) 47 25 30 48 49 16 16 17 + 52: 11(int) Constant 1 + 54: 11(int) Constant 5 + 53: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 1(DebugCompilationUnit) 52 26 30 54 + 50: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 10(DebugTypeComposite) 51 52 30 16 16 53 51 16 17 28 34 35 39 40 41 42 46 + 55: TypePointer Function 27(VSInput) + 56: TypeVector 8(float) 4 + 57: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 6(DebugTypeVector) 10 26 + 58(VSOutput): TypeStruct 56(fvec4) 18(fvec3) 18(fvec3) 18(fvec3) 18(fvec3) 18(fvec3) + 61: 11(int) Constant 53 + 62: 11(int) Constant 13 + 59: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 11(DebugTypeMember) 60 57 30 61 62 16 16 17 + 65: 11(int) Constant 58 + 63: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 11(DebugTypeMember) 64 19 30 65 48 16 16 17 + 66: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 11(DebugTypeMember) 64 19 30 65 48 16 16 17 + 67: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 11(DebugTypeMember) 64 19 30 65 48 16 16 17 + 68: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 11(DebugTypeMember) 64 19 30 65 48 16 16 17 + 69: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 11(DebugTypeMember) 64 19 30 65 48 16 16 17 + 70: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 10(DebugTypeComposite) 71 52 30 16 16 53 71 16 17 59 63 66 67 68 69 + 72: TypeFunction 58(VSOutput) 55(ptr) + 73: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 8(DebugTypeFunction) 17 70 50 + 77: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 20(DebugFunction) 76 73 30 16 16 53 76 17 16 + 81: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 26(DebugLocalVariable) 82 50 30 16 16 77 26 52 + 84: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 31(DebugExpression) + 88: 11(int) Constant 63 + 89: TypePointer Function 58(VSOutput) + 91: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 26(DebugLocalVariable) 92 70 30 88 16 77 26 + 94: 8(float) Constant 0 + 95: 56(fvec4) ConstantComposite 94 94 94 94 + 96: 18(fvec3) ConstantComposite 94 94 94 + 97:58(VSOutput) ConstantComposite 95 96 96 96 96 96 + 99: 11(int) Constant 64 + 100: 23(int) Constant 2 + 101: 23(int) Constant 3 + 102: TypePointer Function 18(fvec3) + 107: 11(int) Constant 65 + 108: TypePointer Function 20(fvec2) + 111: 23(int) Constant 7 + 112: TypePointer Function 23(int) + 121: 11(int) Constant 68 + 122: TypePointer Function 8(float) + 124: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 26(DebugLocalVariable) 125 10 30 121 16 77 26 + 127: 23(int) Constant 5 + 130: TypeMatrix 56(fvec4) 4 + 132: TypeBool + 133: 132(bool) ConstantTrue + 131: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 108(DebugTypeMatrix) 57 26 133 + 134(UBO): TypeStruct 130 130 56(fvec4) 8(float) 8(float) + 137: 11(int) Constant 43 + 138: 11(int) Constant 20 + 135: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 11(DebugTypeMember) 136 131 30 137 138 16 16 17 + 139: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 11(DebugTypeMember) 136 131 30 137 138 16 16 17 + 142: 11(int) Constant 44 + 143: 11(int) Constant 17 + 140: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 11(DebugTypeMember) 141 57 30 142 143 16 16 17 + 146: 11(int) Constant 46 + 144: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 11(DebugTypeMember) 145 10 30 146 143 16 16 17 + 147: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 11(DebugTypeMember) 145 10 30 146 143 16 16 17 + 148: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 10(DebugTypeComposite) 149 52 30 121 16 53 149 16 17 135 139 140 144 147 + 150(ubo): TypeStruct 134(UBO) + 153: 11(int) Constant 49 + 151: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 11(DebugTypeMember) 152 148 30 153 48 16 16 17 + 154: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 10(DebugTypeComposite) 152 52 30 121 16 53 152 16 17 151 + 155: TypePointer Uniform 150(ubo) + 156: 155(ptr) Variable Uniform + 158: 11(int) Constant 8 + 157: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 18(DebugGlobalVariable) 1 154 30 121 16 53 1 156 158 + 159: 23(int) Constant 0 + 160: TypePointer Uniform 8(float) + 166: 11(int) Constant 69 + 168: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 26(DebugLocalVariable) 169 10 30 166 16 77 26 + 178: 11(int) Constant 71 + 179: TypeMatrix 18(fvec3) 3 + 180: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 108(DebugTypeMatrix) 19 17 133 + 181: TypePointer Function 179 + 183: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 26(DebugLocalVariable) 184 180 30 178 16 77 26 + 190: 11(int) Constant 72 + 193: 8(float) Constant 1065353216 + 200: 11(int) Constant 76 + 208: 11(int) Constant 77 + 216: 11(int) Constant 79 + 218: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 26(DebugLocalVariable) 219 180 30 216 16 77 26 + 225: 11(int) Constant 81 + 234: 11(int) Constant 84 + 242: 11(int) Constant 85 + 250: 11(int) Constant 87 + 252: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 26(DebugLocalVariable) 253 180 30 250 16 77 26 + 256: 11(int) Constant 88 + 261: 11(int) Constant 89 + 270: 11(int) Constant 91 + 272: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 26(DebugLocalVariable) 273 180 30 270 16 77 26 + 281: 11(int) Constant 94 + 284: 23(int) Constant 4 + 290: 11(int) Constant 95 + 298: 11(int) Constant 96 + 299: TypePointer Function 130 + 301: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 26(DebugLocalVariable) 302 131 30 298 16 77 26 + 308: TypePointer Function 56(fvec4) + 311: 11(int) Constant 97 + 312: 23(int) Constant 1 + 313: 56(fvec4) ConstantComposite 94 193 94 94 + 316: 11(int) Constant 98 + 322: 11(int) Constant 99 + 323: 56(fvec4) ConstantComposite 94 94 94 193 + 326: 11(int) Constant 101 + 328: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 26(DebugLocalVariable) 329 57 30 326 16 77 26 + 340: 11(int) Constant 102 + 342: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 26(DebugLocalVariable) 343 57 30 340 16 77 26 + 347: 23(int) Constant 6 + 359: 11(int) Constant 104 + 363: TypePointer Uniform 130 + 372: 11(int) Constant 105 + 391: 11(int) Constant 107 + 405: 11(int) Constant 108 + 407: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 26(DebugLocalVariable) 408 19 30 405 16 77 26 + 410: TypePointer Uniform 56(fvec4) + 425: 11(int) Constant 109 + 432: 11(int) Constant 110 + 438: 11(int) Constant 111 + 443: TypePointer Input 18(fvec3) + 444(input.Pos): 443(ptr) Variable Input +447(input.Normal): 443(ptr) Variable Input + 450: TypePointer Input 20(fvec2) + 451(input.UV): 450(ptr) Variable Input +454(input.Color): 443(ptr) Variable Input +457(input.instancePos): 443(ptr) Variable Input +460(input.instanceRot): 443(ptr) Variable Input + 463: TypePointer Input 8(float) +464(input.instanceScale): 463(ptr) Variable Input + 467: TypePointer Input 23(int) +468(input.instanceTexIndex): 467(ptr) Variable Input + 475: TypePointer Output 56(fvec4) +476(@entryPointOutput.Pos): 475(ptr) Variable Output + 479: TypePointer Output 18(fvec3) +480(@entryPointOutput.Normal): 479(ptr) Variable Output +483(@entryPointOutput.Color): 479(ptr) Variable Output +486(@entryPointOutput.UV): 479(ptr) Variable Output +489(@entryPointOutput.ViewVec): 479(ptr) Variable Output +492(@entryPointOutput.LightVec): 479(ptr) Variable Output + Line 1 62 1 + 6(main): 4 Function None 5 + 7: Label + 442(input): 55(ptr) Variable Function +471(flattenTemp): 89(ptr) Variable Function + 472(param): 55(ptr) Variable Function + Line 1 62 0 + 445: 18(fvec3) Load 444(input.Pos) + 446: 102(ptr) AccessChain 442(input) 159 + Store 446 445 + 448: 18(fvec3) Load 447(input.Normal) + 449: 102(ptr) AccessChain 442(input) 312 + Store 449 448 + 452: 20(fvec2) Load 451(input.UV) + 453: 108(ptr) AccessChain 442(input) 100 + Store 453 452 + 455: 18(fvec3) Load 454(input.Color) + 456: 102(ptr) AccessChain 442(input) 101 + Store 456 455 + 458: 18(fvec3) Load 457(input.instancePos) + 459: 102(ptr) AccessChain 442(input) 284 + Store 459 458 + 461: 18(fvec3) Load 460(input.instanceRot) + 462: 102(ptr) AccessChain 442(input) 127 + Store 462 461 + 465: 8(float) Load 464(input.instanceScale) + 466: 122(ptr) AccessChain 442(input) 347 + Store 466 465 + 469: 23(int) Load 468(input.instanceTexIndex) + 470: 112(ptr) AccessChain 442(input) 111 + Store 470 469 + 473: 27(VSInput) Load 442(input) + Store 472(param) 473 + 474:58(VSOutput) FunctionCall 75(@main(struct-VSInput-vf3-vf3-vf2-vf3-vf3-vf3-f1-i11;) 472(param) + Store 471(flattenTemp) 474 + 477: 308(ptr) AccessChain 471(flattenTemp) 159 + 478: 56(fvec4) Load 477 + Store 476(@entryPointOutput.Pos) 478 + 481: 102(ptr) AccessChain 471(flattenTemp) 312 + 482: 18(fvec3) Load 481 + Store 480(@entryPointOutput.Normal) 482 + 484: 102(ptr) AccessChain 471(flattenTemp) 100 + 485: 18(fvec3) Load 484 + Store 483(@entryPointOutput.Color) 485 + 487: 102(ptr) AccessChain 471(flattenTemp) 101 + 488: 18(fvec3) Load 487 + Store 486(@entryPointOutput.UV) 488 + 490: 102(ptr) AccessChain 471(flattenTemp) 284 + 491: 18(fvec3) Load 490 + Store 489(@entryPointOutput.ViewVec) 491 + 493: 102(ptr) AccessChain 471(flattenTemp) 127 + 494: 18(fvec3) Load 493 + Store 492(@entryPointOutput.LightVec) 494 + Return + FunctionEnd + Line 1 62 1 +75(@main(struct-VSInput-vf3-vf3-vf2-vf3-vf3-vf3-f1-i11;):58(VSOutput) Function None 72 + 74(input): 55(ptr) FunctionParameter + 78: Label + 90(output): 89(ptr) Variable Function + 123(s): 122(ptr) Variable Function + 167(c): 122(ptr) Variable Function + 182(mx): 181(ptr) Variable Function + 217(my): 181(ptr) Variable Function + 251(mz): 181(ptr) Variable Function + 271(rotMat): 181(ptr) Variable Function + 300(gRotMat): 299(ptr) Variable Function + 327(locPos): 308(ptr) Variable Function + 341(pos): 308(ptr) Variable Function + 406(lPos): 102(ptr) Variable Function + 79: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 23(DebugScope) 77 + 80: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 30 16 16 16 16 + 83: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 28(DebugDeclare) 81 74(input) 84 + 85: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 101(DebugFunctionDefinition) 77 75(@main(struct-VSInput-vf3-vf3-vf2-vf3-vf3-vf3-f1-i11;) + 86: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 23(DebugScope) 77 + 87: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 30 88 88 16 16 + 93: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 28(DebugDeclare) 91 90(output) 84 + Store 90(output) 97 + 98: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 30 99 99 16 16 + 103: 102(ptr) AccessChain 74(input) 101 + 104: 18(fvec3) Load 103 + 105: 102(ptr) AccessChain 90(output) 100 + Store 105 104 + 106: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 30 107 107 16 16 + 109: 108(ptr) AccessChain 74(input) 100 + 110: 20(fvec2) Load 109 + 113: 112(ptr) AccessChain 74(input) 111 + 114: 23(int) Load 113 + 115: 8(float) ConvertSToF 114 + 116: 8(float) CompositeExtract 110 0 + 117: 8(float) CompositeExtract 110 1 + 118: 18(fvec3) CompositeConstruct 116 117 115 + 119: 102(ptr) AccessChain 90(output) 101 + Store 119 118 + 120: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 30 121 121 16 16 + 126: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 28(DebugDeclare) 124 123(s) 84 + 128: 122(ptr) AccessChain 74(input) 127 16 + 129: 8(float) Load 128 + 161: 160(ptr) AccessChain 156 159 101 + 162: 8(float) Load 161 + 163: 8(float) FAdd 129 162 + 164: 8(float) ExtInst 3(GLSL.std.450) 13(Sin) 163 + Store 123(s) 164 + 165: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 30 166 166 16 16 + 170: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 28(DebugDeclare) 168 167(c) 84 + 171: 122(ptr) AccessChain 74(input) 127 16 + 172: 8(float) Load 171 + 173: 160(ptr) AccessChain 156 159 101 + 174: 8(float) Load 173 + 175: 8(float) FAdd 172 174 + 176: 8(float) ExtInst 3(GLSL.std.450) 14(Cos) 175 + Store 167(c) 176 + 177: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 30 178 178 16 16 + 185: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 28(DebugDeclare) 183 182(mx) 84 + 186: 8(float) Load 167(c) + 187: 8(float) Load 123(s) + 188: 8(float) FNegate 187 + 189: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 30 190 190 16 16 + 191: 8(float) Load 123(s) + 192: 8(float) Load 167(c) + 194: 18(fvec3) CompositeConstruct 186 188 94 + 195: 18(fvec3) CompositeConstruct 191 192 94 + 196: 18(fvec3) CompositeConstruct 94 94 193 + 197: 179 CompositeConstruct 194 195 196 + 198: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 30 178 178 16 16 + Store 182(mx) 197 + 199: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 30 200 200 16 16 + 201: 122(ptr) AccessChain 74(input) 127 52 + 202: 8(float) Load 201 + 203: 160(ptr) AccessChain 156 159 101 + 204: 8(float) Load 203 + 205: 8(float) FAdd 202 204 + 206: 8(float) ExtInst 3(GLSL.std.450) 13(Sin) 205 + Store 123(s) 206 + 207: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 30 208 208 16 16 + 209: 122(ptr) AccessChain 74(input) 127 52 + 210: 8(float) Load 209 + 211: 160(ptr) AccessChain 156 159 101 + 212: 8(float) Load 211 + 213: 8(float) FAdd 210 212 + 214: 8(float) ExtInst 3(GLSL.std.450) 14(Cos) 213 + Store 167(c) 214 + 215: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 30 216 216 16 16 + 220: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 28(DebugDeclare) 218 217(my) 84 + 221: 8(float) Load 167(c) + 222: 8(float) Load 123(s) + 223: 8(float) FNegate 222 + 224: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 30 225 225 16 16 + 226: 8(float) Load 123(s) + 227: 8(float) Load 167(c) + 228: 18(fvec3) CompositeConstruct 221 94 223 + 229: 18(fvec3) CompositeConstruct 94 193 94 + 230: 18(fvec3) CompositeConstruct 226 94 227 + 231: 179 CompositeConstruct 228 229 230 + 232: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 30 216 216 16 16 + Store 217(my) 231 + 233: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 30 234 234 16 16 + 235: 122(ptr) AccessChain 74(input) 127 21 + 236: 8(float) Load 235 + 237: 160(ptr) AccessChain 156 159 101 + 238: 8(float) Load 237 + 239: 8(float) FAdd 236 238 + 240: 8(float) ExtInst 3(GLSL.std.450) 13(Sin) 239 + Store 123(s) 240 + 241: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 30 242 242 16 16 + 243: 122(ptr) AccessChain 74(input) 127 21 + 244: 8(float) Load 243 + 245: 160(ptr) AccessChain 156 159 101 + 246: 8(float) Load 245 + 247: 8(float) FAdd 244 246 + 248: 8(float) ExtInst 3(GLSL.std.450) 14(Cos) 247 + Store 167(c) 248 + 249: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 30 250 250 16 16 + 254: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 28(DebugDeclare) 252 251(mz) 84 + 255: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 30 256 256 16 16 + 257: 8(float) Load 167(c) + 258: 8(float) Load 123(s) + 259: 8(float) FNegate 258 + 260: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 30 261 261 16 16 + 262: 8(float) Load 123(s) + 263: 8(float) Load 167(c) + 264: 18(fvec3) CompositeConstruct 193 94 94 + 265: 18(fvec3) CompositeConstruct 94 257 259 + 266: 18(fvec3) CompositeConstruct 94 262 263 + 267: 179 CompositeConstruct 264 265 266 + 268: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 30 250 250 16 16 + Store 251(mz) 267 + 269: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 30 270 270 16 16 + 274: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 28(DebugDeclare) 272 271(rotMat) 84 + 275: 179 Load 182(mx) + 276: 179 Load 217(my) + 277: 179 MatrixTimesMatrix 275 276 + 278: 179 Load 251(mz) + 279: 179 MatrixTimesMatrix 277 278 + Store 271(rotMat) 279 + 280: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 30 281 281 16 16 + 282: 122(ptr) AccessChain 74(input) 127 52 + 283: 8(float) Load 282 + 285: 160(ptr) AccessChain 156 159 284 + 286: 8(float) Load 285 + 287: 8(float) FAdd 283 286 + 288: 8(float) ExtInst 3(GLSL.std.450) 13(Sin) 287 + Store 123(s) 288 + 289: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 30 290 290 16 16 + 291: 122(ptr) AccessChain 74(input) 127 52 + 292: 8(float) Load 291 + 293: 160(ptr) AccessChain 156 159 284 + 294: 8(float) Load 293 + 295: 8(float) FAdd 292 294 + 296: 8(float) ExtInst 3(GLSL.std.450) 14(Cos) 295 + Store 167(c) 296 + 297: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 30 298 298 16 16 + 303: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 28(DebugDeclare) 301 300(gRotMat) 84 + 304: 8(float) Load 167(c) + 305: 8(float) Load 123(s) + 306: 8(float) FNegate 305 + 307: 56(fvec4) CompositeConstruct 304 94 306 94 + 309: 308(ptr) AccessChain 300(gRotMat) 159 + Store 309 307 + 310: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 30 311 311 16 16 + 314: 308(ptr) AccessChain 300(gRotMat) 312 + Store 314 313 + 315: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 30 316 316 16 16 + 317: 8(float) Load 123(s) + 318: 8(float) Load 167(c) + 319: 56(fvec4) CompositeConstruct 317 94 318 94 + 320: 308(ptr) AccessChain 300(gRotMat) 100 + Store 320 319 + 321: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 30 322 322 16 16 + 324: 308(ptr) AccessChain 300(gRotMat) 101 + Store 324 323 + 325: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 30 326 326 16 16 + 330: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 28(DebugDeclare) 328 327(locPos) 84 + 331: 102(ptr) AccessChain 74(input) 159 + 332: 18(fvec3) Load 331 + 333: 179 Load 271(rotMat) + 334: 18(fvec3) VectorTimesMatrix 332 333 + 335: 8(float) CompositeExtract 334 0 + 336: 8(float) CompositeExtract 334 1 + 337: 8(float) CompositeExtract 334 2 + 338: 56(fvec4) CompositeConstruct 335 336 337 193 + Store 327(locPos) 338 + 339: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 30 340 340 16 16 + 344: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 28(DebugDeclare) 342 341(pos) 84 + 345: 56(fvec4) Load 327(locPos) + 346: 18(fvec3) VectorShuffle 345 345 0 1 2 + 348: 122(ptr) AccessChain 74(input) 347 + 349: 8(float) Load 348 + 350: 18(fvec3) VectorTimesScalar 346 349 + 351: 102(ptr) AccessChain 74(input) 284 + 352: 18(fvec3) Load 351 + 353: 18(fvec3) FAdd 350 352 + 354: 8(float) CompositeExtract 353 0 + 355: 8(float) CompositeExtract 353 1 + 356: 8(float) CompositeExtract 353 2 + 357: 56(fvec4) CompositeConstruct 354 355 356 193 + Store 341(pos) 357 + 358: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 30 359 359 16 16 + 360: 56(fvec4) Load 341(pos) + 361: 130 Load 300(gRotMat) + 362: 56(fvec4) VectorTimesMatrix 360 361 + 364: 363(ptr) AccessChain 156 159 312 + 365: 130 Load 364 + 366: 56(fvec4) VectorTimesMatrix 362 365 + 367: 363(ptr) AccessChain 156 159 159 + 368: 130 Load 367 + 369: 56(fvec4) VectorTimesMatrix 366 368 + 370: 308(ptr) AccessChain 90(output) 159 + Store 370 369 + 371: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 30 372 372 16 16 + 373: 102(ptr) AccessChain 74(input) 312 + 374: 18(fvec3) Load 373 + 375: 179 Load 271(rotMat) + 376: 18(fvec3) VectorTimesMatrix 374 375 + 377: 130 Load 300(gRotMat) + 378: 363(ptr) AccessChain 156 159 312 + 379: 130 Load 378 + 380: 130 MatrixTimesMatrix 377 379 + 381: 56(fvec4) CompositeExtract 380 0 + 382: 18(fvec3) VectorShuffle 381 381 0 1 2 + 383: 56(fvec4) CompositeExtract 380 1 + 384: 18(fvec3) VectorShuffle 383 383 0 1 2 + 385: 56(fvec4) CompositeExtract 380 2 + 386: 18(fvec3) VectorShuffle 385 385 0 1 2 + 387: 179 CompositeConstruct 382 384 386 + 388: 18(fvec3) VectorTimesMatrix 376 387 + 389: 102(ptr) AccessChain 90(output) 312 + Store 389 388 + 390: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 30 391 391 16 16 + 392: 102(ptr) AccessChain 74(input) 159 + 393: 18(fvec3) Load 392 + 394: 102(ptr) AccessChain 74(input) 284 + 395: 18(fvec3) Load 394 + 396: 18(fvec3) FAdd 393 395 + 397: 8(float) CompositeExtract 396 0 + 398: 8(float) CompositeExtract 396 1 + 399: 8(float) CompositeExtract 396 2 + 400: 56(fvec4) CompositeConstruct 397 398 399 193 + 401: 363(ptr) AccessChain 156 159 312 + 402: 130 Load 401 + 403: 56(fvec4) VectorTimesMatrix 400 402 + Store 341(pos) 403 + 404: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 30 405 405 16 16 + 409: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 28(DebugDeclare) 407 406(lPos) 84 + 411: 410(ptr) AccessChain 156 159 100 + 412: 56(fvec4) Load 411 + 413: 18(fvec3) VectorShuffle 412 412 0 1 2 + 414: 363(ptr) AccessChain 156 159 312 + 415: 130 Load 414 + 416: 56(fvec4) CompositeExtract 415 0 + 417: 18(fvec3) VectorShuffle 416 416 0 1 2 + 418: 56(fvec4) CompositeExtract 415 1 + 419: 18(fvec3) VectorShuffle 418 418 0 1 2 + 420: 56(fvec4) CompositeExtract 415 2 + 421: 18(fvec3) VectorShuffle 420 420 0 1 2 + 422: 179 CompositeConstruct 417 419 421 + 423: 18(fvec3) VectorTimesMatrix 413 422 + Store 406(lPos) 423 + 424: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 30 425 425 16 16 + 426: 18(fvec3) Load 406(lPos) + 427: 56(fvec4) Load 341(pos) + 428: 18(fvec3) VectorShuffle 427 427 0 1 2 + 429: 18(fvec3) FSub 426 428 + 430: 102(ptr) AccessChain 90(output) 127 + Store 430 429 + 431: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 30 432 432 16 16 + 433: 56(fvec4) Load 341(pos) + 434: 18(fvec3) VectorShuffle 433 433 0 1 2 + 435: 18(fvec3) FNegate 434 + 436: 102(ptr) AccessChain 90(output) 284 + Store 436 435 + 437: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 30 438 438 16 16 + 439:58(VSOutput) Load 90(output) + ReturnValue 439 + FunctionEnd diff --git a/Test/baseResults/spv.debuginfo.scalar_types.glsl.frag.out b/Test/baseResults/spv.debuginfo.scalar_types.glsl.frag.out new file mode 100644 index 0000000000..30ad60c823 --- /dev/null +++ b/Test/baseResults/spv.debuginfo.scalar_types.glsl.frag.out @@ -0,0 +1,196 @@ +spv.debuginfo.scalar_types.glsl.frag +// Module Version 10000 +// Generated by (magic number): 8000b +// Id's are bound by 146 + + Capability Shader + Capability Float16 + Capability Float64 + Capability Int64 + Capability Int16 + Capability Int8 + Extension "SPV_KHR_non_semantic_info" + 2: ExtInstImport "NonSemantic.Shader.DebugInfo.100" + 3: ExtInstImport "GLSL.std.450" + MemoryModel Logical GLSL450 + EntryPoint Fragment 14 "main" + ExecutionMode 14 OriginUpperLeft + 1: String "" + 8: String "uint" + 15: String "main" + 18: String "// OpModuleProcessed auto-map-locations +// OpModuleProcessed auto-map-bindings +// OpModuleProcessed client vulkan100 +// OpModuleProcessed target-env vulkan1.0 +// OpModuleProcessed keep-uncalled +// OpModuleProcessed entry-point main +#line 1 +" + 29: String "bool" + 34: String "VAR_bool" + 41: String "int" + 46: String "VAR_int" + 53: String "VAR_uint" + 57: String "float" + 62: String "VAR_float" + 67: String "double" + 73: String "VAR_double" + 78: String "int8_t" + 83: String "VAR_int8_t" + 88: String "uint8_t" + 93: String "VAR_uint8_t" + 98: String "int16_t" + 104: String "VAR_int16_t" + 109: String "uint16_t" + 114: String "VAR_uint16_t" + 119: String "int64_t" + 124: String "VAR_int64_t" + 129: String "uint64_t" + 134: String "VAR_uint64_t" + 139: String "float16_t" + 144: String "VAR_float16_t" + SourceExtension "GL_EXT_shader_explicit_arithmetic_types" + Name 14 "main" + Name 32 "VAR_bool" + Name 44 "VAR_int" + Name 51 "VAR_uint" + Name 60 "VAR_float" + Name 71 "VAR_double" + Name 81 "VAR_int8_t" + Name 91 "VAR_uint8_t" + Name 102 "VAR_int16_t" + Name 112 "VAR_uint16_t" + Name 122 "VAR_int64_t" + Name 132 "VAR_uint64_t" + Name 142 "VAR_float16_t" + 4: TypeVoid + 5: TypeFunction 4 + 7: TypeInt 32 0 + 10: 7(int) Constant 32 + 11: 7(int) Constant 6 + 12: 7(int) Constant 0 + 9: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 2(DebugTypeBasic) 8 10 11 12 + 13: 7(int) Constant 3 + 6: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 8(DebugTypeFunction) 13 4 + 17: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 35(DebugSource) 1 18 + 20: 7(int) Constant 1 + 21: 7(int) Constant 4 + 22: 7(int) Constant 2 + 19: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 1(DebugCompilationUnit) 20 21 17 22 + 16: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 20(DebugFunction) 15 6 17 12 12 19 15 13 12 + 27: 7(int) Constant 43 + 28: TypeBool + 30: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 2(DebugTypeBasic) 29 10 22 12 + 31: TypePointer Private 28(bool) + 32(VAR_bool): 31(ptr) Variable Private + 35: 7(int) Constant 8 + 33: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 18(DebugGlobalVariable) 34 30 17 27 12 19 34 32(VAR_bool) 35 + 36: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 2(DebugTypeBasic) 29 10 22 12 + 37: 28(bool) ConstantFalse + 39: 7(int) Constant 44 + 40: TypeInt 32 1 + 42: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 2(DebugTypeBasic) 41 10 21 12 + 43: TypePointer Private 40(int) + 44(VAR_int): 43(ptr) Variable Private + 45: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 18(DebugGlobalVariable) 46 42 17 39 12 19 46 44(VAR_int) 35 + 47: 40(int) Constant 0 + 49: 7(int) Constant 45 + 50: TypePointer Private 7(int) + 51(VAR_uint): 50(ptr) Variable Private + 52: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 18(DebugGlobalVariable) 53 9 17 49 12 19 53 51(VAR_uint) 35 + 55: 7(int) Constant 46 + 56: TypeFloat 32 + 58: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 2(DebugTypeBasic) 57 10 13 12 + 59: TypePointer Private 56(float) + 60(VAR_float): 59(ptr) Variable Private + 61: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 18(DebugGlobalVariable) 62 58 17 55 12 19 62 60(VAR_float) 35 + 63: 56(float) Constant 0 + 65: 7(int) Constant 47 + 66: TypeFloat 64 + 69: 7(int) Constant 64 + 68: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 2(DebugTypeBasic) 67 69 13 12 + 70: TypePointer Private 66(float64_t) + 71(VAR_double): 70(ptr) Variable Private + 72: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 18(DebugGlobalVariable) 73 68 17 65 12 19 73 71(VAR_double) 35 + 74:66(float64_t) Constant 0 0 + 76: 7(int) Constant 48 + 77: TypeInt 8 1 + 79: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 2(DebugTypeBasic) 78 35 21 12 + 80: TypePointer Private 77(int8_t) + 81(VAR_int8_t): 80(ptr) Variable Private + 82: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 18(DebugGlobalVariable) 83 79 17 76 12 19 83 81(VAR_int8_t) 35 + 84: 77(int8_t) Constant 0 + 86: 7(int) Constant 49 + 87: TypeInt 8 0 + 89: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 2(DebugTypeBasic) 88 35 11 12 + 90: TypePointer Private 87(int8_t) + 91(VAR_uint8_t): 90(ptr) Variable Private + 92: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 18(DebugGlobalVariable) 93 89 17 86 12 19 93 91(VAR_uint8_t) 35 + 94: 87(int8_t) Constant 0 + 96: 7(int) Constant 50 + 97: TypeInt 16 1 + 100: 7(int) Constant 16 + 99: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 2(DebugTypeBasic) 98 100 21 12 + 101: TypePointer Private 97(int16_t) +102(VAR_int16_t): 101(ptr) Variable Private + 103: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 18(DebugGlobalVariable) 104 99 17 96 12 19 104 102(VAR_int16_t) 35 + 105: 97(int16_t) Constant 0 + 107: 7(int) Constant 51 + 108: TypeInt 16 0 + 110: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 2(DebugTypeBasic) 109 100 11 12 + 111: TypePointer Private 108(int16_t) +112(VAR_uint16_t): 111(ptr) Variable Private + 113: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 18(DebugGlobalVariable) 114 110 17 107 12 19 114 112(VAR_uint16_t) 35 + 115:108(int16_t) Constant 0 + 117: 7(int) Constant 52 + 118: TypeInt 64 1 + 120: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 2(DebugTypeBasic) 119 69 21 12 + 121: TypePointer Private 118(int64_t) +122(VAR_int64_t): 121(ptr) Variable Private + 123: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 18(DebugGlobalVariable) 124 120 17 117 12 19 124 122(VAR_int64_t) 35 + 125:118(int64_t) Constant 0 0 + 127: 7(int) Constant 53 + 128: TypeInt 64 0 + 130: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 2(DebugTypeBasic) 129 69 11 12 + 131: TypePointer Private 128(int64_t) +132(VAR_uint64_t): 131(ptr) Variable Private + 133: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 18(DebugGlobalVariable) 134 130 17 127 12 19 134 132(VAR_uint64_t) 35 + 135:128(int64_t) Constant 0 0 + 137: 7(int) Constant 54 + 138: TypeFloat 16 + 140: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 2(DebugTypeBasic) 139 100 13 12 + 141: TypePointer Private 138(float16_t) +142(VAR_float16_t): 141(ptr) Variable Private + 143: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 18(DebugGlobalVariable) 144 140 17 137 12 19 144 142(VAR_float16_t) 35 + 145:138(float16_t) Constant 0 + Line 1 42 11 + 14(main): 4 Function None 5 + 23: Label + 24: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 101(DebugFunctionDefinition) 16 14(main) + 25: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 23(DebugScope) 16 + 26: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 17 27 27 12 12 + Store 32(VAR_bool) 37 + 38: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 17 39 39 12 12 + Store 44(VAR_int) 47 + 48: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 17 49 49 12 12 + Store 51(VAR_uint) 12 + 54: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 17 55 55 12 12 + Store 60(VAR_float) 63 + 64: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 17 65 65 12 12 + Store 71(VAR_double) 74 + 75: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 17 76 76 12 12 + Store 81(VAR_int8_t) 84 + 85: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 17 86 86 12 12 + Store 91(VAR_uint8_t) 94 + 95: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 17 96 96 12 12 + Store 102(VAR_int16_t) 105 + 106: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 17 107 107 12 12 + Store 112(VAR_uint16_t) 115 + 116: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 17 117 117 12 12 + Store 122(VAR_int64_t) 125 + 126: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 17 127 127 12 12 + Store 132(VAR_uint64_t) 135 + 136: 4 ExtInst 2(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 17 137 137 12 12 + Store 142(VAR_float16_t) 145 + Return + FunctionEnd diff --git a/Test/baseResults/spv.deepRvalue.frag.out b/Test/baseResults/spv.deepRvalue.frag.out index d46159d705..efb9d2ec69 100644 --- a/Test/baseResults/spv.deepRvalue.frag.out +++ b/Test/baseResults/spv.deepRvalue.frag.out @@ -1,6 +1,6 @@ spv.deepRvalue.frag // Module Version 10000 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 152 Capability Shader diff --git a/Test/baseResults/spv.depthOut.frag.out b/Test/baseResults/spv.depthOut.frag.out index 50c4770268..4d69949fcf 100644 --- a/Test/baseResults/spv.depthOut.frag.out +++ b/Test/baseResults/spv.depthOut.frag.out @@ -1,6 +1,6 @@ spv.depthOut.frag // Module Version 10000 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 15 Capability Shader diff --git a/Test/baseResults/spv.depthUnchanged.frag.out b/Test/baseResults/spv.depthUnchanged.frag.out index 0074007836..34785c086a 100644 --- a/Test/baseResults/spv.depthUnchanged.frag.out +++ b/Test/baseResults/spv.depthUnchanged.frag.out @@ -1,6 +1,6 @@ spv.depthUnchanged.frag // Module Version 10000 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 22 Capability Shader diff --git a/Test/baseResults/spv.deviceGroup.frag.out b/Test/baseResults/spv.deviceGroup.frag.out index 57c443c0e5..68285a1bdf 100644 --- a/Test/baseResults/spv.deviceGroup.frag.out +++ b/Test/baseResults/spv.deviceGroup.frag.out @@ -1,6 +1,6 @@ spv.deviceGroup.frag // Module Version 10300 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 17 Capability Shader diff --git a/Test/baseResults/spv.discard-dce.frag.out b/Test/baseResults/spv.discard-dce.frag.out index 93c2de8fc2..bddf6f9e8b 100644 --- a/Test/baseResults/spv.discard-dce.frag.out +++ b/Test/baseResults/spv.discard-dce.frag.out @@ -1,6 +1,6 @@ spv.discard-dce.frag // Module Version 10000 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 84 Capability Shader diff --git a/Test/baseResults/spv.do-simple.vert.out b/Test/baseResults/spv.do-simple.vert.out index c240c449ca..c0196c2b5b 100644 --- a/Test/baseResults/spv.do-simple.vert.out +++ b/Test/baseResults/spv.do-simple.vert.out @@ -1,6 +1,6 @@ spv.do-simple.vert // Module Version 10000 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 21 Capability Shader diff --git a/Test/baseResults/spv.do-while-continue-break.vert.out b/Test/baseResults/spv.do-while-continue-break.vert.out index 081dc62033..26e67fcb29 100644 --- a/Test/baseResults/spv.do-while-continue-break.vert.out +++ b/Test/baseResults/spv.do-while-continue-break.vert.out @@ -1,6 +1,6 @@ spv.do-while-continue-break.vert // Module Version 10000 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 43 Capability Shader diff --git a/Test/baseResults/spv.doWhileLoop.frag.out b/Test/baseResults/spv.doWhileLoop.frag.out index a57b9b2e83..145776c978 100644 --- a/Test/baseResults/spv.doWhileLoop.frag.out +++ b/Test/baseResults/spv.doWhileLoop.frag.out @@ -1,6 +1,6 @@ spv.doWhileLoop.frag // Module Version 10000 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 34 Capability Shader diff --git a/Test/baseResults/spv.double.comp.out b/Test/baseResults/spv.double.comp.out index 800464cca0..3a5eef8a0d 100644 --- a/Test/baseResults/spv.double.comp.out +++ b/Test/baseResults/spv.double.comp.out @@ -1,6 +1,6 @@ spv.double.comp // Module Version 10000 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 60 Capability Shader diff --git a/Test/baseResults/spv.drawParams.vert.out b/Test/baseResults/spv.drawParams.vert.out index a8dab45c4f..23ba8a73c4 100644 --- a/Test/baseResults/spv.drawParams.vert.out +++ b/Test/baseResults/spv.drawParams.vert.out @@ -1,6 +1,6 @@ spv.drawParams.vert // Module Version 10300 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 29 Capability Shader diff --git a/Test/baseResults/spv.earlyReturnDiscard.frag.out b/Test/baseResults/spv.earlyReturnDiscard.frag.out index 8f983cb548..273b7753d0 100644 --- a/Test/baseResults/spv.earlyReturnDiscard.frag.out +++ b/Test/baseResults/spv.earlyReturnDiscard.frag.out @@ -1,6 +1,6 @@ spv.earlyReturnDiscard.frag // Module Version 10000 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 110 Capability Shader diff --git a/Test/baseResults/spv.explicittypes.frag.out b/Test/baseResults/spv.explicittypes.frag.out index 3382872020..65d3b1ff24 100644 --- a/Test/baseResults/spv.explicittypes.frag.out +++ b/Test/baseResults/spv.explicittypes.frag.out @@ -1,6 +1,6 @@ spv.explicittypes.frag // Module Version 10300 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 576 Capability Shader diff --git a/Test/baseResults/spv.exportFunctions.comp.out b/Test/baseResults/spv.exportFunctions.comp.out new file mode 100644 index 0000000000..958cf680e8 --- /dev/null +++ b/Test/baseResults/spv.exportFunctions.comp.out @@ -0,0 +1,36 @@ +spv.exportFunctions.comp +// Module Version 10000 +// Generated by (magic number): 8000b +// Id's are bound by 22 + + Capability Shader + Capability Linkage + 1: ExtInstImport "GLSL.std.450" + MemoryModel Logical GLSL450 + Source GLSL 450 + Name 7 "add(f1;f1;" + Name 5 "a" + Name 6 "b" + Name 11 "foo(" + Decorate 7(add(f1;f1;) Linkage Attributes 6579297 0 + Decorate 11(foo() Linkage Attributes 7303014 0 + 2: TypeFloat 32 + 3: TypePointer Function 2(float) + 4: TypeFunction 2(float) 3(ptr) 3(ptr) + 9: TypeInt 32 1 + 10: TypeFunction 9(int) + 17: TypeVoid + 19: 9(int) Constant 0 + 7(add(f1;f1;): 2(float) Function None 4 + 5(a): 3(ptr) FunctionParameter + 6(b): 3(ptr) FunctionParameter + 8: Label + 13: 2(float) Load 5(a) + 14: 2(float) Load 6(b) + 15: 2(float) FAdd 13 14 + ReturnValue 15 + FunctionEnd + 11(foo(): 9(int) Function None 10 + 12: Label + ReturnValue 19 + FunctionEnd diff --git a/Test/baseResults/spv.ext.AccelDecl.frag.out b/Test/baseResults/spv.ext.AccelDecl.frag.out index 11d456065f..e329ee9224 100644 --- a/Test/baseResults/spv.ext.AccelDecl.frag.out +++ b/Test/baseResults/spv.ext.AccelDecl.frag.out @@ -1,6 +1,6 @@ spv.ext.AccelDecl.frag // Module Version 10400 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 15 Capability Shader diff --git a/Test/baseResults/spv.ext.AnyHitShader.rahit.out b/Test/baseResults/spv.ext.AnyHitShader.rahit.out index 0a6db643bd..02803ad6b1 100644 --- a/Test/baseResults/spv.ext.AnyHitShader.rahit.out +++ b/Test/baseResults/spv.ext.AnyHitShader.rahit.out @@ -1,19 +1,22 @@ spv.ext.AnyHitShader.rahit // Module Version 10400 -// Generated by (magic number): 8000a -// Id's are bound by 108 +// Generated by (magic number): 8000b +// Id's are bound by 116 Capability GroupNonUniform Capability RayTracingKHR + Capability RayTracingPositionFetchKHR Capability RayCullMaskKHR Extension "SPV_KHR_ray_cull_mask" Extension "SPV_KHR_ray_tracing" + Extension "SPV_KHR_ray_tracing_position_fetch" 1: ExtInstImport "GLSL.std.450" MemoryModel Logical GLSL450 - EntryPoint AnyHitKHR 4 "main" 11 14 20 23 26 33 36 39 42 47 50 53 58 64 67 70 82 85 99 + EntryPoint AnyHitKHR 4 "main" 11 14 20 23 26 33 36 39 42 47 50 53 58 64 67 70 82 88 93 107 Source GLSL 460 SourceExtension "GL_EXT_ray_cull_mask" SourceExtension "GL_EXT_ray_tracing" + SourceExtension "GL_EXT_ray_tracing_position_fetch" SourceExtension "GL_KHR_shader_subgroup_basic" Name 4 "main" Name 9 "v0" @@ -52,8 +55,10 @@ spv.ext.AnyHitShader.rahit Name 78 "v17" Name 81 "v18" Name 82 "gl_CullMaskEXT" - Name 85 "incomingPayload" - Name 99 "gl_SubgroupSize" + Name 84 "v19" + Name 88 "gl_HitTriangleVertexPositionsEXT" + Name 93 "incomingPayload" + Name 107 "gl_SubgroupSize" Decorate 11(gl_LaunchIDEXT) BuiltIn LaunchIdKHR Decorate 14(gl_LaunchSizeEXT) BuiltIn LaunchSizeKHR Decorate 20(gl_PrimitiveID) BuiltIn PrimitiveId @@ -71,10 +76,11 @@ spv.ext.AnyHitShader.rahit Decorate 67(gl_WorldToObjectEXT) BuiltIn WorldToObjectKHR Decorate 70(gl_GeometryIndexEXT) BuiltIn RayGeometryIndexKHR Decorate 82(gl_CullMaskEXT) BuiltIn CullMaskKHR - Decorate 99(gl_SubgroupSize) RelaxedPrecision - Decorate 99(gl_SubgroupSize) BuiltIn SubgroupSize - Decorate 100 RelaxedPrecision - Decorate 101 RelaxedPrecision + Decorate 88(gl_HitTriangleVertexPositionsEXT) BuiltIn HitTriangleVertexPositionsKHR + Decorate 107(gl_SubgroupSize) RelaxedPrecision + Decorate 107(gl_SubgroupSize) BuiltIn SubgroupSize + Decorate 108 RelaxedPrecision + Decorate 109 RelaxedPrecision 2: TypeVoid 3: TypeFunction 2 6: TypeInt 32 0 @@ -115,15 +121,20 @@ spv.ext.AnyHitShader.rahit 73: TypeMatrix 72(fvec4) 3 74: TypePointer Function 73 82(gl_CullMaskEXT): 57(ptr) Variable Input - 84: TypePointer IncomingRayPayloadKHR 72(fvec4) -85(incomingPayload): 84(ptr) Variable IncomingRayPayloadKHR - 86: 28(float) Constant 1056964608 - 87: 72(fvec4) ConstantComposite 86 86 86 86 - 89: 16(int) Constant 1 - 90: TypeBool - 95: 6(int) Constant 0 -99(gl_SubgroupSize): 57(ptr) Variable Input - 102: TypePointer IncomingRayPayloadKHR 28(float) + 85: 6(int) Constant 3 + 86: TypeArray 29(fvec3) 85 + 87: TypePointer Input 86 +88(gl_HitTriangleVertexPositionsEXT): 87(ptr) Variable Input + 89: 16(int) Constant 0 + 92: TypePointer IncomingRayPayloadKHR 72(fvec4) +93(incomingPayload): 92(ptr) Variable IncomingRayPayloadKHR + 94: 28(float) Constant 1056964608 + 95: 72(fvec4) ConstantComposite 94 94 94 94 + 97: 16(int) Constant 1 + 98: TypeBool + 103: 6(int) Constant 0 +107(gl_SubgroupSize): 57(ptr) Variable Input + 110: TypePointer IncomingRayPayloadKHR 28(float) 4(main): 2 Function None 3 5: Label 9(v0): 8(ptr) Variable Function @@ -145,6 +156,7 @@ spv.ext.AnyHitShader.rahit 75(v16): 74(ptr) Variable Function 78(v17): 74(ptr) Variable Function 81(v18): 55(ptr) Variable Function + 84(v19): 30(ptr) Variable Function 12: 7(ivec3) Load 11(gl_LaunchIDEXT) Store 9(v0) 12 15: 7(ivec3) Load 14(gl_LaunchSizeEXT) @@ -185,20 +197,23 @@ spv.ext.AnyHitShader.rahit Store 78(v17) 80 83: 6(int) Load 82(gl_CullMaskEXT) Store 81(v18) 83 - Store 85(incomingPayload) 87 - 88: 16(int) Load 18(v2) - 91: 90(bool) IEqual 88 89 - SelectionMerge 93 None - BranchConditional 91 92 93 - 92: Label + 90: 32(ptr) AccessChain 88(gl_HitTriangleVertexPositionsEXT) 89 + 91: 29(fvec3) Load 90 + Store 84(v19) 91 + Store 93(incomingPayload) 95 + 96: 16(int) Load 18(v2) + 99: 98(bool) IEqual 96 97 + SelectionMerge 101 None + BranchConditional 99 100 101 + 100: Label IgnoreIntersectionKHR - 93: Label - 100: 6(int) Load 99(gl_SubgroupSize) - 101: 28(float) ConvertUToF 100 - 103: 102(ptr) AccessChain 85(incomingPayload) 95 - 104: 28(float) Load 103 - 105: 28(float) FAdd 104 101 - 106: 102(ptr) AccessChain 85(incomingPayload) 95 - Store 106 105 + 101: Label + 108: 6(int) Load 107(gl_SubgroupSize) + 109: 28(float) ConvertUToF 108 + 111: 110(ptr) AccessChain 93(incomingPayload) 103 + 112: 28(float) Load 111 + 113: 28(float) FAdd 112 109 + 114: 110(ptr) AccessChain 93(incomingPayload) 103 + Store 114 113 TerminateRayKHR FunctionEnd diff --git a/Test/baseResults/spv.ext.ClosestHitShader.rchit.out b/Test/baseResults/spv.ext.ClosestHitShader.rchit.out index 4a7178e9c2..5cfc8a25b9 100644 --- a/Test/baseResults/spv.ext.ClosestHitShader.rchit.out +++ b/Test/baseResults/spv.ext.ClosestHitShader.rchit.out @@ -1,18 +1,21 @@ spv.ext.ClosestHitShader.rchit // Module Version 10400 -// Generated by (magic number): 8000a -// Id's are bound by 102 +// Generated by (magic number): 8000b +// Id's are bound by 109 Capability RayTracingKHR + Capability RayTracingPositionFetchKHR Capability RayCullMaskKHR Extension "SPV_KHR_ray_cull_mask" Extension "SPV_KHR_ray_tracing" + Extension "SPV_KHR_ray_tracing_position_fetch" 1: ExtInstImport "GLSL.std.450" MemoryModel Logical GLSL450 - EntryPoint ClosestHitKHR 4 "main" 11 14 20 23 26 33 36 39 42 47 50 53 58 64 67 70 82 86 99 101 + EntryPoint ClosestHitKHR 4 "main" 11 14 20 23 26 33 36 39 42 47 50 53 58 64 67 70 82 88 94 106 108 Source GLSL 460 SourceExtension "GL_EXT_ray_cull_mask" SourceExtension "GL_EXT_ray_tracing" + SourceExtension "GL_EXT_ray_tracing_position_fetch" Name 4 "main" Name 9 "v0" Name 11 "gl_LaunchIDEXT" @@ -50,9 +53,11 @@ spv.ext.ClosestHitShader.rchit Name 78 "v17" Name 81 "v18" Name 82 "gl_CullMaskEXT" - Name 86 "accEXT" - Name 99 "incomingPayload" - Name 101 "localPayload" + Name 84 "v19" + Name 88 "gl_HitTriangleVertexPositionsEXT" + Name 94 "accEXT" + Name 106 "incomingPayload" + Name 108 "localPayload" Decorate 11(gl_LaunchIDEXT) BuiltIn LaunchIdKHR Decorate 14(gl_LaunchSizeEXT) BuiltIn LaunchSizeKHR Decorate 20(gl_PrimitiveID) BuiltIn PrimitiveId @@ -70,8 +75,9 @@ spv.ext.ClosestHitShader.rchit Decorate 67(gl_WorldToObjectEXT) BuiltIn WorldToObjectKHR Decorate 70(gl_GeometryIndexEXT) BuiltIn RayGeometryIndexKHR Decorate 82(gl_CullMaskEXT) BuiltIn CullMaskKHR - Decorate 86(accEXT) DescriptorSet 0 - Decorate 86(accEXT) Binding 0 + Decorate 88(gl_HitTriangleVertexPositionsEXT) BuiltIn HitTriangleVertexPositionsKHR + Decorate 94(accEXT) DescriptorSet 0 + Decorate 94(accEXT) Binding 0 2: TypeVoid 3: TypeFunction 2 6: TypeInt 32 0 @@ -112,23 +118,27 @@ spv.ext.ClosestHitShader.rchit 73: TypeMatrix 72(fvec4) 3 74: TypePointer Function 73 82(gl_CullMaskEXT): 57(ptr) Variable Input - 84: TypeAccelerationStructureKHR - 85: TypePointer UniformConstant 84 - 86(accEXT): 85(ptr) Variable UniformConstant - 88: 6(int) Constant 0 - 89: 6(int) Constant 1 - 90: 6(int) Constant 2 - 91: 6(int) Constant 3 - 92: 28(float) Constant 1056964608 - 93: 29(fvec3) ConstantComposite 92 92 92 - 94: 28(float) Constant 1065353216 - 95: 29(fvec3) ConstantComposite 94 94 94 - 96: 28(float) Constant 1061158912 - 97: 16(int) Constant 1 - 98: TypePointer IncomingRayPayloadKHR 72(fvec4) -99(incomingPayload): 98(ptr) Variable IncomingRayPayloadKHR - 100: TypePointer RayPayloadKHR 72(fvec4) -101(localPayload): 100(ptr) Variable RayPayloadKHR + 85: 6(int) Constant 3 + 86: TypeArray 29(fvec3) 85 + 87: TypePointer Input 86 +88(gl_HitTriangleVertexPositionsEXT): 87(ptr) Variable Input + 89: 16(int) Constant 0 + 92: TypeAccelerationStructureKHR + 93: TypePointer UniformConstant 92 + 94(accEXT): 93(ptr) Variable UniformConstant + 96: 6(int) Constant 0 + 97: 6(int) Constant 1 + 98: 6(int) Constant 2 + 99: 28(float) Constant 1056964608 + 100: 29(fvec3) ConstantComposite 99 99 99 + 101: 28(float) Constant 1065353216 + 102: 29(fvec3) ConstantComposite 101 101 101 + 103: 28(float) Constant 1061158912 + 104: 16(int) Constant 1 + 105: TypePointer IncomingRayPayloadKHR 72(fvec4) +106(incomingPayload): 105(ptr) Variable IncomingRayPayloadKHR + 107: TypePointer RayPayloadKHR 72(fvec4) +108(localPayload): 107(ptr) Variable RayPayloadKHR 4(main): 2 Function None 3 5: Label 9(v0): 8(ptr) Variable Function @@ -150,6 +160,7 @@ spv.ext.ClosestHitShader.rchit 75(v16): 74(ptr) Variable Function 78(v17): 74(ptr) Variable Function 81(v18): 55(ptr) Variable Function + 84(v19): 30(ptr) Variable Function 12: 7(ivec3) Load 11(gl_LaunchIDEXT) Store 9(v0) 12 15: 7(ivec3) Load 14(gl_LaunchSizeEXT) @@ -190,7 +201,10 @@ spv.ext.ClosestHitShader.rchit Store 78(v17) 80 83: 6(int) Load 82(gl_CullMaskEXT) Store 81(v18) 83 - 87: 84 Load 86(accEXT) - TraceRayKHR 87 88 89 90 91 88 93 92 95 96 99(incomingPayload) + 90: 32(ptr) AccessChain 88(gl_HitTriangleVertexPositionsEXT) 89 + 91: 29(fvec3) Load 90 + Store 84(v19) 91 + 95: 92 Load 94(accEXT) + TraceRayKHR 95 96 97 98 85 96 100 99 102 103 106(incomingPayload) Return FunctionEnd diff --git a/Test/baseResults/spv.ext.ClosestHitShader_Subgroup.rchit.out b/Test/baseResults/spv.ext.ClosestHitShader_Subgroup.rchit.out index 24ab4f46c3..e5b62d7c6c 100644 --- a/Test/baseResults/spv.ext.ClosestHitShader_Subgroup.rchit.out +++ b/Test/baseResults/spv.ext.ClosestHitShader_Subgroup.rchit.out @@ -1,6 +1,6 @@ spv.ext.ClosestHitShader_Subgroup.rchit // Module Version 10400 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 67 Capability Int64 diff --git a/Test/baseResults/spv.ext.IntersectShader.rint.out b/Test/baseResults/spv.ext.IntersectShader.rint.out index dcceea4897..fad466bb37 100644 --- a/Test/baseResults/spv.ext.IntersectShader.rint.out +++ b/Test/baseResults/spv.ext.IntersectShader.rint.out @@ -1,6 +1,6 @@ spv.ext.IntersectShader.rint // Module Version 10400 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 84 Capability RayTracingKHR diff --git a/Test/baseResults/spv.ext.MissShader.rmiss.out b/Test/baseResults/spv.ext.MissShader.rmiss.out index e4a5b88bcb..246eefa625 100644 --- a/Test/baseResults/spv.ext.MissShader.rmiss.out +++ b/Test/baseResults/spv.ext.MissShader.rmiss.out @@ -1,6 +1,6 @@ spv.ext.MissShader.rmiss // Module Version 10400 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 94 Capability MinLod diff --git a/Test/baseResults/spv.ext.RayCallable.rcall.out b/Test/baseResults/spv.ext.RayCallable.rcall.out index 50e7fd8ff6..9e6cef1340 100644 --- a/Test/baseResults/spv.ext.RayCallable.rcall.out +++ b/Test/baseResults/spv.ext.RayCallable.rcall.out @@ -1,6 +1,6 @@ spv.ext.RayCallable.rcall // Module Version 10400 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 30 Capability RayTracingKHR diff --git a/Test/baseResults/spv.ext.RayConstants.rgen.out b/Test/baseResults/spv.ext.RayConstants.rgen.out index 6ef9dd4de0..9cd294a9a2 100644 --- a/Test/baseResults/spv.ext.RayConstants.rgen.out +++ b/Test/baseResults/spv.ext.RayConstants.rgen.out @@ -1,6 +1,6 @@ spv.ext.RayConstants.rgen // Module Version 10400 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 27 Capability RayTracingKHR diff --git a/Test/baseResults/spv.ext.RayGenSBTlayout.rgen.out b/Test/baseResults/spv.ext.RayGenSBTlayout.rgen.out index 88e3c004ce..31a8bda0fe 100644 --- a/Test/baseResults/spv.ext.RayGenSBTlayout.rgen.out +++ b/Test/baseResults/spv.ext.RayGenSBTlayout.rgen.out @@ -1,6 +1,6 @@ spv.ext.RayGenSBTlayout.rgen // Module Version 10400 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 74 Capability Int64 diff --git a/Test/baseResults/spv.ext.RayGenSBTlayout140.rgen.out b/Test/baseResults/spv.ext.RayGenSBTlayout140.rgen.out index ce5c306322..f0302f746a 100644 --- a/Test/baseResults/spv.ext.RayGenSBTlayout140.rgen.out +++ b/Test/baseResults/spv.ext.RayGenSBTlayout140.rgen.out @@ -1,6 +1,6 @@ spv.ext.RayGenSBTlayout140.rgen // Module Version 10400 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 74 Capability Int64 diff --git a/Test/baseResults/spv.ext.RayGenSBTlayout430.rgen.out b/Test/baseResults/spv.ext.RayGenSBTlayout430.rgen.out index 7462abd9b4..e83dd42422 100644 --- a/Test/baseResults/spv.ext.RayGenSBTlayout430.rgen.out +++ b/Test/baseResults/spv.ext.RayGenSBTlayout430.rgen.out @@ -1,6 +1,6 @@ spv.ext.RayGenSBTlayout430.rgen // Module Version 10400 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 74 Capability Int64 diff --git a/Test/baseResults/spv.ext.RayGenSBTlayoutscalar.rgen.out b/Test/baseResults/spv.ext.RayGenSBTlayoutscalar.rgen.out index 3573455616..a24b64c7d1 100644 --- a/Test/baseResults/spv.ext.RayGenSBTlayoutscalar.rgen.out +++ b/Test/baseResults/spv.ext.RayGenSBTlayoutscalar.rgen.out @@ -1,6 +1,6 @@ spv.ext.RayGenSBTlayoutscalar.rgen // Module Version 10400 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 74 Capability Int64 diff --git a/Test/baseResults/spv.ext.RayGenShader.rgen.out b/Test/baseResults/spv.ext.RayGenShader.rgen.out index 46f920ac55..b872d9e0f2 100644 --- a/Test/baseResults/spv.ext.RayGenShader.rgen.out +++ b/Test/baseResults/spv.ext.RayGenShader.rgen.out @@ -1,6 +1,6 @@ spv.ext.RayGenShader.rgen // Module Version 10400 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 58 Capability RayTraversalPrimitiveCullingKHR @@ -10,6 +10,7 @@ spv.ext.RayGenShader.rgen MemoryModel Logical GLSL450 EntryPoint RayGenerationKHR 4 "main" 11 21 29 40 53 54 57 Source GLSL 460 + SourceExtension "GL_EXT_opacity_micromap" SourceExtension "GL_EXT_ray_flags_primitive_culling" SourceExtension "GL_EXT_ray_tracing" Name 4 "main" @@ -52,7 +53,7 @@ spv.ext.RayGenShader.rgen 27: TypeAccelerationStructureKHR 28: TypePointer UniformConstant 27 29(accEXT0): 28(ptr) Variable UniformConstant - 35: 6(int) Constant 768 + 35: 6(int) Constant 1792 36: TypeFloat 32 37: TypeVector 36(float) 3 38(block): TypeStruct 37(fvec3) 37(fvec3) diff --git a/Test/baseResults/spv.ext.RayGenShader11.rgen.out b/Test/baseResults/spv.ext.RayGenShader11.rgen.out index b31ebd9abb..d79f4f37dc 100644 --- a/Test/baseResults/spv.ext.RayGenShader11.rgen.out +++ b/Test/baseResults/spv.ext.RayGenShader11.rgen.out @@ -1,6 +1,6 @@ spv.ext.RayGenShader11.rgen // Module Version 10400 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 53 Capability RayTracingKHR diff --git a/Test/baseResults/spv.ext.RayGenShaderArray.rgen.out b/Test/baseResults/spv.ext.RayGenShaderArray.rgen.out index 08f72b28ef..7e351d75d5 100644 --- a/Test/baseResults/spv.ext.RayGenShaderArray.rgen.out +++ b/Test/baseResults/spv.ext.RayGenShaderArray.rgen.out @@ -1,6 +1,6 @@ spv.ext.RayGenShaderArray.rgen // Module Version 10400 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 117 Capability Int64 diff --git a/Test/baseResults/spv.ext.RayQueryDecl.frag.out b/Test/baseResults/spv.ext.RayQueryDecl.frag.out index 97681e9f53..2eb14216d6 100644 --- a/Test/baseResults/spv.ext.RayQueryDecl.frag.out +++ b/Test/baseResults/spv.ext.RayQueryDecl.frag.out @@ -1,6 +1,6 @@ spv.ext.RayQueryDecl.frag // Module Version 10400 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 15 Capability Shader diff --git a/Test/baseResults/spv.ext.ShaderTileImage.color.frag.out b/Test/baseResults/spv.ext.ShaderTileImage.color.frag.out new file mode 100644 index 0000000000..942a850c0a --- /dev/null +++ b/Test/baseResults/spv.ext.ShaderTileImage.color.frag.out @@ -0,0 +1,38 @@ +spv.ext.ShaderTileImage.color.frag +WARNING: 0:6: '' : all default precisions are highp; use precision statements to quiet warning, e.g.: + "precision mediump int; precision highp float;" + +// Module Version 10000 +// Generated by (magic number): 8000b +// Id's are bound by 15 + + Capability Shader + Capability TileImageColorReadAccessEXT + Extension "SPV_EXT_shader_tile_image" + 1: ExtInstImport "GLSL.std.450" + MemoryModel Logical GLSL450 + EntryPoint Fragment 4 "main" 9 + ExecutionMode 4 OriginUpperLeft + Source GLSL 460 + SourceExtension "GL_EXT_shader_tile_image" + Name 4 "main" + Name 9 "out_color" + Name 12 "in_color" + Decorate 9(out_color) Location 0 + Decorate 12(in_color) Location 1 + 2: TypeVoid + 3: TypeFunction 2 + 6: TypeFloat 32 + 7: TypeVector 6(float) 4 + 8: TypePointer Output 7(fvec4) + 9(out_color): 8(ptr) Variable Output + 10: TypeImage 6(float) TileImageDataEXT nonsampled format:Unknown + 11: TypePointer TileImageEXT 10 + 12(in_color): 11(ptr) Variable TileImageEXT + 4(main): 2 Function None 3 + 5: Label + 13: 10 Load 12(in_color) + 14: 7(fvec4) ColorAttachmentReadEXT 13 + Store 9(out_color) 14 + Return + FunctionEnd diff --git a/Test/baseResults/spv.ext.ShaderTileImage.depth_stencil.frag.out b/Test/baseResults/spv.ext.ShaderTileImage.depth_stencil.frag.out new file mode 100644 index 0000000000..0dcf014812 --- /dev/null +++ b/Test/baseResults/spv.ext.ShaderTileImage.depth_stencil.frag.out @@ -0,0 +1,56 @@ +spv.ext.ShaderTileImage.depth_stencil.frag +WARNING: 0:6: '' : all default precisions are highp; use precision statements to quiet warning, e.g.: + "precision mediump int; precision highp float;" + +// Module Version 10000 +// Generated by (magic number): 8000b +// Id's are bound by 26 + + Capability Shader + Capability TileImageDepthReadAccessEXT + Capability TileImageStencilReadAccessEXT + Extension "SPV_EXT_shader_tile_image" + 1: ExtInstImport "GLSL.std.450" + MemoryModel Logical GLSL450 + EntryPoint Fragment 4 "main" 16 22 + ExecutionMode 4 OriginUpperLeft + Source GLSL 460 + SourceExtension "GL_EXT_shader_tile_image" + Name 4 "main" + Name 8 "depth" + Name 12 "stencil_value" + Name 16 "stencil_out" + Name 22 "depth_out" + Decorate 13 RelaxedPrecision + Decorate 16(stencil_out) Location 0 + Decorate 22(depth_out) Location 1 + 2: TypeVoid + 3: TypeFunction 2 + 6: TypeFloat 32 + 7: TypePointer Function 6(float) + 10: TypeInt 32 0 + 11: TypePointer Function 10(int) + 14: TypeVector 10(int) 4 + 15: TypePointer Output 14(ivec4) + 16(stencil_out): 15(ptr) Variable Output + 18: 10(int) Constant 0 + 20: TypeVector 6(float) 4 + 21: TypePointer Output 20(fvec4) + 22(depth_out): 21(ptr) Variable Output + 24: 6(float) Constant 0 + 4(main): 2 Function None 3 + 5: Label + 8(depth): 7(ptr) Variable Function +12(stencil_value): 11(ptr) Variable Function + 9: 6(float) DepthAttachmentReadEXT + Store 8(depth) 9 + 13: 10(int) StencilAttachmentReadEXT + Store 12(stencil_value) 13 + 17: 10(int) Load 12(stencil_value) + 19: 14(ivec4) CompositeConstruct 17 18 18 18 + Store 16(stencil_out) 19 + 23: 6(float) Load 8(depth) + 25: 20(fvec4) CompositeConstruct 23 24 24 24 + Store 22(depth_out) 25 + Return + FunctionEnd diff --git a/Test/baseResults/spv.ext.ShaderTileImage.overlap.frag.out b/Test/baseResults/spv.ext.ShaderTileImage.overlap.frag.out new file mode 100644 index 0000000000..e7af421380 --- /dev/null +++ b/Test/baseResults/spv.ext.ShaderTileImage.overlap.frag.out @@ -0,0 +1,6 @@ +spv.ext.ShaderTileImage.overlap.frag +ERROR: 0:8: 'location' : overlapping use of location 1 +ERROR: 1 compilation errors. No code generated. + + +SPIR-V is not generated for failed compile or link diff --git a/Test/baseResults/spv.ext.ShaderTileImage.subpassinput.frag.out b/Test/baseResults/spv.ext.ShaderTileImage.subpassinput.frag.out new file mode 100644 index 0000000000..0f08f49246 --- /dev/null +++ b/Test/baseResults/spv.ext.ShaderTileImage.subpassinput.frag.out @@ -0,0 +1,6 @@ +spv.ext.ShaderTileImage.subpassinput.frag +ERROR: 0:6: 'subpassInput' : can not be used with GL_EXT_shader_tile_image enabled +ERROR: 1 compilation errors. No code generated. + + +SPIR-V is not generated for failed compile or link diff --git a/Test/baseResults/spv.ext.ShaderTileImage.typemismatch.frag.out b/Test/baseResults/spv.ext.ShaderTileImage.typemismatch.frag.out new file mode 100644 index 0000000000..e91ffb73f3 --- /dev/null +++ b/Test/baseResults/spv.ext.ShaderTileImage.typemismatch.frag.out @@ -0,0 +1,6 @@ +spv.ext.ShaderTileImage.typemismatch.frag +ERROR: 0:7: 'location' : fragment outputs or tileImageEXTs sharing the same location 0 must be the same basic type +ERROR: 1 compilation errors. No code generated. + + +SPIR-V is not generated for failed compile or link diff --git a/Test/baseResults/spv.ext.ShaderTileImage.wronglayout.frag.out b/Test/baseResults/spv.ext.ShaderTileImage.wronglayout.frag.out new file mode 100644 index 0000000000..aa3a1982f6 --- /dev/null +++ b/Test/baseResults/spv.ext.ShaderTileImage.wronglayout.frag.out @@ -0,0 +1,9 @@ +spv.ext.ShaderTileImage.wronglayout.frag +ERROR: 0:7: 'binding' : requires uniform or buffer storage qualifier +ERROR: 0:7: 'set' : cannot be used with tileImageEXT +ERROR: 0:7: 'tileImageEXT' : can only be used with an explicit location +ERROR: 0:7: 'input_attachment_index' : can only be used with a subpass +ERROR: 4 compilation errors. No code generated. + + +SPIR-V is not generated for failed compile or link diff --git a/Test/baseResults/spv.ext.World3x4.rahit.out b/Test/baseResults/spv.ext.World3x4.rahit.out index 8c60912c40..92ad18fbe0 100644 --- a/Test/baseResults/spv.ext.World3x4.rahit.out +++ b/Test/baseResults/spv.ext.World3x4.rahit.out @@ -1,6 +1,6 @@ spv.ext.World3x4.rahit // Module Version 10400 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 90 Capability RayTracingKHR diff --git a/Test/baseResults/spv.ext.meshShaderBuiltins.mesh.out b/Test/baseResults/spv.ext.meshShaderBuiltins.mesh.out new file mode 100644 index 0000000000..a1d71a5b07 --- /dev/null +++ b/Test/baseResults/spv.ext.meshShaderBuiltins.mesh.out @@ -0,0 +1,267 @@ +spv.ext.meshShaderBuiltins.mesh +// Module Version 10400 +// Generated by (magic number): 8000b +// Id's are bound by 158 + + Capability ClipDistance + Capability CullDistance + Capability DrawParameters + Capability MultiView + Capability MeshShadingEXT + Extension "SPV_EXT_mesh_shader" + 1: ExtInstImport "GLSL.std.450" + MemoryModel Logical GLSL450 + EntryPoint MeshEXT 4 "main" 13 19 24 41 93 134 152 155 + ExecutionMode 4 LocalSize 32 1 1 + ExecutionMode 4 OutputVertices 81 + ExecutionMode 4 OutputPrimitivesNV 32 + ExecutionMode 4 OutputTrianglesNV + Source GLSL 460 + SourceExtension "GL_ARB_shader_draw_parameters" + SourceExtension "GL_EXT_mesh_shader" + SourceExtension "GL_EXT_multiview" + Name 4 "main" + Name 6 "testAdditionalBuiltins(" + Name 10 "iid" + Name 13 "gl_LocalInvocationID" + Name 18 "gid" + Name 19 "gl_WorkGroupID" + Name 23 "numWorkGrous" + Name 24 "gl_NumWorkGroups" + Name 26 "vertexCount" + Name 28 "primitiveCount" + Name 38 "gl_MeshPerVertexEXT" + MemberName 38(gl_MeshPerVertexEXT) 0 "gl_Position" + MemberName 38(gl_MeshPerVertexEXT) 1 "gl_PointSize" + MemberName 38(gl_MeshPerVertexEXT) 2 "gl_ClipDistance" + MemberName 38(gl_MeshPerVertexEXT) 3 "gl_CullDistance" + Name 41 "gl_MeshVerticesEXT" + Name 90 "gl_MeshPerPrimitiveEXT" + MemberName 90(gl_MeshPerPrimitiveEXT) 0 "gl_PrimitiveID" + MemberName 90(gl_MeshPerPrimitiveEXT) 1 "gl_Layer" + MemberName 90(gl_MeshPerPrimitiveEXT) 2 "gl_ViewportIndex" + MemberName 90(gl_MeshPerPrimitiveEXT) 3 "gl_CullPrimitiveEXT" + Name 93 "gl_MeshPrimitivesEXT" + Name 134 "gl_PrimitiveTriangleIndicesEXT" + Name 150 "id" + Name 152 "gl_DrawIDARB" + Name 154 "viewIdx" + Name 155 "gl_ViewIndex" + Decorate 13(gl_LocalInvocationID) BuiltIn LocalInvocationId + Decorate 19(gl_WorkGroupID) BuiltIn WorkgroupId + Decorate 24(gl_NumWorkGroups) BuiltIn NumWorkgroups + MemberDecorate 38(gl_MeshPerVertexEXT) 0 BuiltIn Position + MemberDecorate 38(gl_MeshPerVertexEXT) 1 BuiltIn PointSize + MemberDecorate 38(gl_MeshPerVertexEXT) 2 BuiltIn ClipDistance + MemberDecorate 38(gl_MeshPerVertexEXT) 3 BuiltIn CullDistance + Decorate 38(gl_MeshPerVertexEXT) Block + MemberDecorate 90(gl_MeshPerPrimitiveEXT) 0 PerPrimitiveNV + MemberDecorate 90(gl_MeshPerPrimitiveEXT) 0 BuiltIn PrimitiveId + MemberDecorate 90(gl_MeshPerPrimitiveEXT) 1 PerPrimitiveNV + MemberDecorate 90(gl_MeshPerPrimitiveEXT) 1 BuiltIn Layer + MemberDecorate 90(gl_MeshPerPrimitiveEXT) 2 PerPrimitiveNV + MemberDecorate 90(gl_MeshPerPrimitiveEXT) 2 BuiltIn ViewportIndex + MemberDecorate 90(gl_MeshPerPrimitiveEXT) 3 PerPrimitiveNV + MemberDecorate 90(gl_MeshPerPrimitiveEXT) 3 BuiltIn CullPrimitiveEXT + Decorate 90(gl_MeshPerPrimitiveEXT) Block + Decorate 134(gl_PrimitiveTriangleIndicesEXT) BuiltIn PrimitiveTriangleIndicesEXT + Decorate 152(gl_DrawIDARB) BuiltIn DrawIndex + Decorate 155(gl_ViewIndex) BuiltIn ViewIndex + Decorate 157 BuiltIn WorkgroupSize + 2: TypeVoid + 3: TypeFunction 2 + 8: TypeInt 32 0 + 9: TypePointer Function 8(int) + 11: TypeVector 8(int) 3 + 12: TypePointer Input 11(ivec3) +13(gl_LocalInvocationID): 12(ptr) Variable Input + 14: 8(int) Constant 0 + 15: TypePointer Input 8(int) +19(gl_WorkGroupID): 12(ptr) Variable Input + 22: TypePointer Function 11(ivec3) +24(gl_NumWorkGroups): 12(ptr) Variable Input + 27: 8(int) Constant 81 + 29: 8(int) Constant 32 + 32: TypeFloat 32 + 33: TypeVector 32(float) 4 + 34: 8(int) Constant 4 + 35: TypeArray 32(float) 34 + 36: 8(int) Constant 3 + 37: TypeArray 32(float) 36 +38(gl_MeshPerVertexEXT): TypeStruct 33(fvec4) 32(float) 35 37 + 39: TypeArray 38(gl_MeshPerVertexEXT) 27 + 40: TypePointer Output 39 +41(gl_MeshVerticesEXT): 40(ptr) Variable Output + 43: TypeInt 32 1 + 44: 43(int) Constant 0 + 45: 32(float) Constant 1065353216 + 46: 33(fvec4) ConstantComposite 45 45 45 45 + 47: TypePointer Output 33(fvec4) + 50: 43(int) Constant 1 + 51: 32(float) Constant 1073741824 + 52: TypePointer Output 32(float) + 55: 43(int) Constant 2 + 56: 43(int) Constant 3 + 57: 32(float) Constant 1077936128 + 60: 32(float) Constant 1082130432 + 62: 8(int) Constant 1 + 63: 8(int) Constant 264 + 64: 8(int) Constant 2 + 89: TypeBool +90(gl_MeshPerPrimitiveEXT): TypeStruct 43(int) 43(int) 43(int) 89(bool) + 91: TypeArray 90(gl_MeshPerPrimitiveEXT) 29 + 92: TypePointer Output 91 +93(gl_MeshPrimitivesEXT): 92(ptr) Variable Output + 95: 43(int) Constant 6 + 96: TypePointer Output 43(int) + 99: 43(int) Constant 7 + 102: 43(int) Constant 8 + 105: 89(bool) ConstantFalse + 106: TypePointer Output 89(bool) + 132: TypeArray 11(ivec3) 29 + 133: TypePointer Output 132 +134(gl_PrimitiveTriangleIndicesEXT): 133(ptr) Variable Output + 135: 8(int) Constant 257 + 136: 11(ivec3) ConstantComposite 135 135 135 + 137: TypePointer Output 11(ivec3) + 141: 11(ivec3) ConstantComposite 64 64 64 + 149: TypePointer Function 43(int) + 151: TypePointer Input 43(int) +152(gl_DrawIDARB): 151(ptr) Variable Input +155(gl_ViewIndex): 151(ptr) Variable Input + 157: 11(ivec3) ConstantComposite 29 62 62 + 4(main): 2 Function None 3 + 5: Label + 10(iid): 9(ptr) Variable Function + 18(gid): 9(ptr) Variable Function +23(numWorkGrous): 22(ptr) Variable Function + 26(vertexCount): 9(ptr) Variable Function +28(primitiveCount): 9(ptr) Variable Function + 16: 15(ptr) AccessChain 13(gl_LocalInvocationID) 14 + 17: 8(int) Load 16 + Store 10(iid) 17 + 20: 15(ptr) AccessChain 19(gl_WorkGroupID) 14 + 21: 8(int) Load 20 + Store 18(gid) 21 + 25: 11(ivec3) Load 24(gl_NumWorkGroups) + Store 23(numWorkGrous) 25 + Store 26(vertexCount) 27 + Store 28(primitiveCount) 29 + 30: 8(int) Load 26(vertexCount) + 31: 8(int) Load 28(primitiveCount) + SetMeshOutputsEXT 30 31 + 42: 8(int) Load 10(iid) + 48: 47(ptr) AccessChain 41(gl_MeshVerticesEXT) 42 44 + Store 48 46 + 49: 8(int) Load 10(iid) + 53: 52(ptr) AccessChain 41(gl_MeshVerticesEXT) 49 50 + Store 53 51 + 54: 8(int) Load 10(iid) + 58: 52(ptr) AccessChain 41(gl_MeshVerticesEXT) 54 55 56 + Store 58 57 + 59: 8(int) Load 10(iid) + 61: 52(ptr) AccessChain 41(gl_MeshVerticesEXT) 59 56 55 + Store 61 60 + MemoryBarrier 62 63 + ControlBarrier 64 64 63 + 65: 8(int) Load 10(iid) + 66: 8(int) IAdd 65 62 + 67: 8(int) Load 10(iid) + 68: 47(ptr) AccessChain 41(gl_MeshVerticesEXT) 67 44 + 69: 33(fvec4) Load 68 + 70: 47(ptr) AccessChain 41(gl_MeshVerticesEXT) 66 44 + Store 70 69 + 71: 8(int) Load 10(iid) + 72: 8(int) IAdd 71 62 + 73: 8(int) Load 10(iid) + 74: 52(ptr) AccessChain 41(gl_MeshVerticesEXT) 73 50 + 75: 32(float) Load 74 + 76: 52(ptr) AccessChain 41(gl_MeshVerticesEXT) 72 50 + Store 76 75 + 77: 8(int) Load 10(iid) + 78: 8(int) IAdd 77 62 + 79: 8(int) Load 10(iid) + 80: 52(ptr) AccessChain 41(gl_MeshVerticesEXT) 79 55 56 + 81: 32(float) Load 80 + 82: 52(ptr) AccessChain 41(gl_MeshVerticesEXT) 78 55 56 + Store 82 81 + 83: 8(int) Load 10(iid) + 84: 8(int) IAdd 83 62 + 85: 8(int) Load 10(iid) + 86: 52(ptr) AccessChain 41(gl_MeshVerticesEXT) 85 56 55 + 87: 32(float) Load 86 + 88: 52(ptr) AccessChain 41(gl_MeshVerticesEXT) 84 56 55 + Store 88 87 + MemoryBarrier 62 63 + ControlBarrier 64 64 63 + 94: 8(int) Load 10(iid) + 97: 96(ptr) AccessChain 93(gl_MeshPrimitivesEXT) 94 44 + Store 97 95 + 98: 8(int) Load 10(iid) + 100: 96(ptr) AccessChain 93(gl_MeshPrimitivesEXT) 98 50 + Store 100 99 + 101: 8(int) Load 10(iid) + 103: 96(ptr) AccessChain 93(gl_MeshPrimitivesEXT) 101 55 + Store 103 102 + 104: 8(int) Load 10(iid) + 107: 106(ptr) AccessChain 93(gl_MeshPrimitivesEXT) 104 56 + Store 107 105 + MemoryBarrier 62 63 + ControlBarrier 64 64 63 + 108: 8(int) Load 10(iid) + 109: 8(int) IAdd 108 62 + 110: 8(int) Load 10(iid) + 111: 96(ptr) AccessChain 93(gl_MeshPrimitivesEXT) 110 44 + 112: 43(int) Load 111 + 113: 96(ptr) AccessChain 93(gl_MeshPrimitivesEXT) 109 44 + Store 113 112 + 114: 8(int) Load 10(iid) + 115: 8(int) IAdd 114 62 + 116: 8(int) Load 10(iid) + 117: 96(ptr) AccessChain 93(gl_MeshPrimitivesEXT) 116 50 + 118: 43(int) Load 117 + 119: 96(ptr) AccessChain 93(gl_MeshPrimitivesEXT) 115 50 + Store 119 118 + 120: 8(int) Load 10(iid) + 121: 8(int) IAdd 120 62 + 122: 8(int) Load 10(iid) + 123: 96(ptr) AccessChain 93(gl_MeshPrimitivesEXT) 122 55 + 124: 43(int) Load 123 + 125: 96(ptr) AccessChain 93(gl_MeshPrimitivesEXT) 121 55 + Store 125 124 + 126: 8(int) Load 10(iid) + 127: 8(int) IAdd 126 62 + 128: 8(int) Load 10(iid) + 129: 106(ptr) AccessChain 93(gl_MeshPrimitivesEXT) 128 56 + 130: 89(bool) Load 129 + 131: 106(ptr) AccessChain 93(gl_MeshPrimitivesEXT) 127 56 + Store 131 130 + MemoryBarrier 62 63 + ControlBarrier 64 64 63 + 138: 137(ptr) AccessChain 134(gl_PrimitiveTriangleIndicesEXT) 44 + Store 138 136 + 139: 8(int) Load 28(primitiveCount) + 140: 8(int) ISub 139 62 + 142: 137(ptr) AccessChain 134(gl_PrimitiveTriangleIndicesEXT) 140 + Store 142 141 + 143: 8(int) Load 18(gid) + 144: 8(int) Load 18(gid) + 145: 8(int) ISub 144 62 + 146: 137(ptr) AccessChain 134(gl_PrimitiveTriangleIndicesEXT) 145 + 147: 11(ivec3) Load 146 + 148: 137(ptr) AccessChain 134(gl_PrimitiveTriangleIndicesEXT) 143 + Store 148 147 + MemoryBarrier 62 63 + ControlBarrier 64 64 63 + Return + FunctionEnd +6(testAdditionalBuiltins(): 2 Function None 3 + 7: Label + 150(id): 149(ptr) Variable Function + 154(viewIdx): 149(ptr) Variable Function + 153: 43(int) Load 152(gl_DrawIDARB) + Store 150(id) 153 + 156: 43(int) Load 155(gl_ViewIndex) + Store 154(viewIdx) 156 + Return + FunctionEnd diff --git a/Test/baseResults/spv.ext.meshShaderBuiltinsShadingRate.mesh.out b/Test/baseResults/spv.ext.meshShaderBuiltinsShadingRate.mesh.out new file mode 100644 index 0000000000..65bd740d44 --- /dev/null +++ b/Test/baseResults/spv.ext.meshShaderBuiltinsShadingRate.mesh.out @@ -0,0 +1,281 @@ +spv.ext.meshShaderBuiltinsShadingRate.mesh +// Module Version 10400 +// Generated by (magic number): 8000b +// Id's are bound by 164 + + Capability ClipDistance + Capability CullDistance + Capability FragmentShadingRateKHR + Capability DrawParameters + Capability MultiView + Capability MeshShadingEXT + Extension "SPV_EXT_mesh_shader" + Extension "SPV_KHR_fragment_shading_rate" + 1: ExtInstImport "GLSL.std.450" + MemoryModel Logical GLSL450 + EntryPoint MeshEXT 4 "main" 13 19 24 41 93 140 158 161 + ExecutionMode 4 LocalSize 32 1 1 + ExecutionMode 4 OutputVertices 81 + ExecutionMode 4 OutputPrimitivesNV 32 + ExecutionMode 4 OutputTrianglesNV + Source GLSL 460 + SourceExtension "GL_ARB_shader_draw_parameters" + SourceExtension "GL_EXT_fragment_shading_rate" + SourceExtension "GL_EXT_mesh_shader" + SourceExtension "GL_EXT_multiview" + Name 4 "main" + Name 6 "testAdditionalBuiltins(" + Name 10 "iid" + Name 13 "gl_LocalInvocationID" + Name 18 "gid" + Name 19 "gl_WorkGroupID" + Name 23 "numWorkGrous" + Name 24 "gl_NumWorkGroups" + Name 26 "vertexCount" + Name 28 "primitiveCount" + Name 38 "gl_MeshPerVertexEXT" + MemberName 38(gl_MeshPerVertexEXT) 0 "gl_Position" + MemberName 38(gl_MeshPerVertexEXT) 1 "gl_PointSize" + MemberName 38(gl_MeshPerVertexEXT) 2 "gl_ClipDistance" + MemberName 38(gl_MeshPerVertexEXT) 3 "gl_CullDistance" + Name 41 "gl_MeshVerticesEXT" + Name 90 "gl_MeshPerPrimitiveEXT" + MemberName 90(gl_MeshPerPrimitiveEXT) 0 "gl_PrimitiveID" + MemberName 90(gl_MeshPerPrimitiveEXT) 1 "gl_Layer" + MemberName 90(gl_MeshPerPrimitiveEXT) 2 "gl_ViewportIndex" + MemberName 90(gl_MeshPerPrimitiveEXT) 3 "gl_CullPrimitiveEXT" + MemberName 90(gl_MeshPerPrimitiveEXT) 4 "gl_PrimitiveShadingRateEXT" + Name 93 "gl_MeshPrimitivesEXT" + Name 140 "gl_PrimitiveTriangleIndicesEXT" + Name 156 "id" + Name 158 "gl_DrawIDARB" + Name 160 "viewIdx" + Name 161 "gl_ViewIndex" + Decorate 13(gl_LocalInvocationID) BuiltIn LocalInvocationId + Decorate 19(gl_WorkGroupID) BuiltIn WorkgroupId + Decorate 24(gl_NumWorkGroups) BuiltIn NumWorkgroups + MemberDecorate 38(gl_MeshPerVertexEXT) 0 BuiltIn Position + MemberDecorate 38(gl_MeshPerVertexEXT) 1 BuiltIn PointSize + MemberDecorate 38(gl_MeshPerVertexEXT) 2 BuiltIn ClipDistance + MemberDecorate 38(gl_MeshPerVertexEXT) 3 BuiltIn CullDistance + Decorate 38(gl_MeshPerVertexEXT) Block + MemberDecorate 90(gl_MeshPerPrimitiveEXT) 0 PerPrimitiveNV + MemberDecorate 90(gl_MeshPerPrimitiveEXT) 0 BuiltIn PrimitiveId + MemberDecorate 90(gl_MeshPerPrimitiveEXT) 1 PerPrimitiveNV + MemberDecorate 90(gl_MeshPerPrimitiveEXT) 1 BuiltIn Layer + MemberDecorate 90(gl_MeshPerPrimitiveEXT) 2 PerPrimitiveNV + MemberDecorate 90(gl_MeshPerPrimitiveEXT) 2 BuiltIn ViewportIndex + MemberDecorate 90(gl_MeshPerPrimitiveEXT) 3 PerPrimitiveNV + MemberDecorate 90(gl_MeshPerPrimitiveEXT) 3 BuiltIn CullPrimitiveEXT + MemberDecorate 90(gl_MeshPerPrimitiveEXT) 4 PerPrimitiveNV + MemberDecorate 90(gl_MeshPerPrimitiveEXT) 4 BuiltIn PrimitiveShadingRateKHR + Decorate 90(gl_MeshPerPrimitiveEXT) Block + Decorate 140(gl_PrimitiveTriangleIndicesEXT) BuiltIn PrimitiveTriangleIndicesEXT + Decorate 158(gl_DrawIDARB) BuiltIn DrawIndex + Decorate 161(gl_ViewIndex) BuiltIn ViewIndex + Decorate 163 BuiltIn WorkgroupSize + 2: TypeVoid + 3: TypeFunction 2 + 8: TypeInt 32 0 + 9: TypePointer Function 8(int) + 11: TypeVector 8(int) 3 + 12: TypePointer Input 11(ivec3) +13(gl_LocalInvocationID): 12(ptr) Variable Input + 14: 8(int) Constant 0 + 15: TypePointer Input 8(int) +19(gl_WorkGroupID): 12(ptr) Variable Input + 22: TypePointer Function 11(ivec3) +24(gl_NumWorkGroups): 12(ptr) Variable Input + 27: 8(int) Constant 81 + 29: 8(int) Constant 32 + 32: TypeFloat 32 + 33: TypeVector 32(float) 4 + 34: 8(int) Constant 4 + 35: TypeArray 32(float) 34 + 36: 8(int) Constant 3 + 37: TypeArray 32(float) 36 +38(gl_MeshPerVertexEXT): TypeStruct 33(fvec4) 32(float) 35 37 + 39: TypeArray 38(gl_MeshPerVertexEXT) 27 + 40: TypePointer Output 39 +41(gl_MeshVerticesEXT): 40(ptr) Variable Output + 43: TypeInt 32 1 + 44: 43(int) Constant 0 + 45: 32(float) Constant 1065353216 + 46: 33(fvec4) ConstantComposite 45 45 45 45 + 47: TypePointer Output 33(fvec4) + 50: 43(int) Constant 1 + 51: 32(float) Constant 1073741824 + 52: TypePointer Output 32(float) + 55: 43(int) Constant 2 + 56: 43(int) Constant 3 + 57: 32(float) Constant 1077936128 + 60: 32(float) Constant 1082130432 + 62: 8(int) Constant 1 + 63: 8(int) Constant 264 + 64: 8(int) Constant 2 + 89: TypeBool +90(gl_MeshPerPrimitiveEXT): TypeStruct 43(int) 43(int) 43(int) 89(bool) 43(int) + 91: TypeArray 90(gl_MeshPerPrimitiveEXT) 29 + 92: TypePointer Output 91 +93(gl_MeshPrimitivesEXT): 92(ptr) Variable Output + 95: 43(int) Constant 6 + 96: TypePointer Output 43(int) + 99: 43(int) Constant 7 + 102: 43(int) Constant 8 + 105: 89(bool) ConstantFalse + 106: TypePointer Output 89(bool) + 109: 43(int) Constant 4 + 138: TypeArray 11(ivec3) 29 + 139: TypePointer Output 138 +140(gl_PrimitiveTriangleIndicesEXT): 139(ptr) Variable Output + 141: 8(int) Constant 257 + 142: 11(ivec3) ConstantComposite 141 141 141 + 143: TypePointer Output 11(ivec3) + 147: 11(ivec3) ConstantComposite 64 64 64 + 155: TypePointer Function 43(int) + 157: TypePointer Input 43(int) +158(gl_DrawIDARB): 157(ptr) Variable Input +161(gl_ViewIndex): 157(ptr) Variable Input + 163: 11(ivec3) ConstantComposite 29 62 62 + 4(main): 2 Function None 3 + 5: Label + 10(iid): 9(ptr) Variable Function + 18(gid): 9(ptr) Variable Function +23(numWorkGrous): 22(ptr) Variable Function + 26(vertexCount): 9(ptr) Variable Function +28(primitiveCount): 9(ptr) Variable Function + 16: 15(ptr) AccessChain 13(gl_LocalInvocationID) 14 + 17: 8(int) Load 16 + Store 10(iid) 17 + 20: 15(ptr) AccessChain 19(gl_WorkGroupID) 14 + 21: 8(int) Load 20 + Store 18(gid) 21 + 25: 11(ivec3) Load 24(gl_NumWorkGroups) + Store 23(numWorkGrous) 25 + Store 26(vertexCount) 27 + Store 28(primitiveCount) 29 + 30: 8(int) Load 26(vertexCount) + 31: 8(int) Load 28(primitiveCount) + SetMeshOutputsEXT 30 31 + 42: 8(int) Load 10(iid) + 48: 47(ptr) AccessChain 41(gl_MeshVerticesEXT) 42 44 + Store 48 46 + 49: 8(int) Load 10(iid) + 53: 52(ptr) AccessChain 41(gl_MeshVerticesEXT) 49 50 + Store 53 51 + 54: 8(int) Load 10(iid) + 58: 52(ptr) AccessChain 41(gl_MeshVerticesEXT) 54 55 56 + Store 58 57 + 59: 8(int) Load 10(iid) + 61: 52(ptr) AccessChain 41(gl_MeshVerticesEXT) 59 56 55 + Store 61 60 + MemoryBarrier 62 63 + ControlBarrier 64 64 63 + 65: 8(int) Load 10(iid) + 66: 8(int) IAdd 65 62 + 67: 8(int) Load 10(iid) + 68: 47(ptr) AccessChain 41(gl_MeshVerticesEXT) 67 44 + 69: 33(fvec4) Load 68 + 70: 47(ptr) AccessChain 41(gl_MeshVerticesEXT) 66 44 + Store 70 69 + 71: 8(int) Load 10(iid) + 72: 8(int) IAdd 71 62 + 73: 8(int) Load 10(iid) + 74: 52(ptr) AccessChain 41(gl_MeshVerticesEXT) 73 50 + 75: 32(float) Load 74 + 76: 52(ptr) AccessChain 41(gl_MeshVerticesEXT) 72 50 + Store 76 75 + 77: 8(int) Load 10(iid) + 78: 8(int) IAdd 77 62 + 79: 8(int) Load 10(iid) + 80: 52(ptr) AccessChain 41(gl_MeshVerticesEXT) 79 55 56 + 81: 32(float) Load 80 + 82: 52(ptr) AccessChain 41(gl_MeshVerticesEXT) 78 55 56 + Store 82 81 + 83: 8(int) Load 10(iid) + 84: 8(int) IAdd 83 62 + 85: 8(int) Load 10(iid) + 86: 52(ptr) AccessChain 41(gl_MeshVerticesEXT) 85 56 55 + 87: 32(float) Load 86 + 88: 52(ptr) AccessChain 41(gl_MeshVerticesEXT) 84 56 55 + Store 88 87 + MemoryBarrier 62 63 + ControlBarrier 64 64 63 + 94: 8(int) Load 10(iid) + 97: 96(ptr) AccessChain 93(gl_MeshPrimitivesEXT) 94 44 + Store 97 95 + 98: 8(int) Load 10(iid) + 100: 96(ptr) AccessChain 93(gl_MeshPrimitivesEXT) 98 50 + Store 100 99 + 101: 8(int) Load 10(iid) + 103: 96(ptr) AccessChain 93(gl_MeshPrimitivesEXT) 101 55 + Store 103 102 + 104: 8(int) Load 10(iid) + 107: 106(ptr) AccessChain 93(gl_MeshPrimitivesEXT) 104 56 + Store 107 105 + 108: 8(int) Load 10(iid) + 110: 96(ptr) AccessChain 93(gl_MeshPrimitivesEXT) 108 109 + Store 110 44 + MemoryBarrier 62 63 + ControlBarrier 64 64 63 + 111: 8(int) Load 10(iid) + 112: 8(int) IAdd 111 62 + 113: 8(int) Load 10(iid) + 114: 96(ptr) AccessChain 93(gl_MeshPrimitivesEXT) 113 44 + 115: 43(int) Load 114 + 116: 96(ptr) AccessChain 93(gl_MeshPrimitivesEXT) 112 44 + Store 116 115 + 117: 8(int) Load 10(iid) + 118: 8(int) IAdd 117 62 + 119: 8(int) Load 10(iid) + 120: 96(ptr) AccessChain 93(gl_MeshPrimitivesEXT) 119 50 + 121: 43(int) Load 120 + 122: 96(ptr) AccessChain 93(gl_MeshPrimitivesEXT) 118 50 + Store 122 121 + 123: 8(int) Load 10(iid) + 124: 8(int) IAdd 123 62 + 125: 8(int) Load 10(iid) + 126: 96(ptr) AccessChain 93(gl_MeshPrimitivesEXT) 125 55 + 127: 43(int) Load 126 + 128: 96(ptr) AccessChain 93(gl_MeshPrimitivesEXT) 124 55 + Store 128 127 + 129: 8(int) Load 10(iid) + 130: 8(int) IAdd 129 62 + 131: 8(int) Load 10(iid) + 132: 106(ptr) AccessChain 93(gl_MeshPrimitivesEXT) 131 56 + 133: 89(bool) Load 132 + 134: 106(ptr) AccessChain 93(gl_MeshPrimitivesEXT) 130 56 + Store 134 133 + 135: 8(int) Load 10(iid) + 136: 8(int) IAdd 135 62 + 137: 96(ptr) AccessChain 93(gl_MeshPrimitivesEXT) 136 109 + Store 137 44 + MemoryBarrier 62 63 + ControlBarrier 64 64 63 + 144: 143(ptr) AccessChain 140(gl_PrimitiveTriangleIndicesEXT) 44 + Store 144 142 + 145: 8(int) Load 28(primitiveCount) + 146: 8(int) ISub 145 62 + 148: 143(ptr) AccessChain 140(gl_PrimitiveTriangleIndicesEXT) 146 + Store 148 147 + 149: 8(int) Load 18(gid) + 150: 8(int) Load 18(gid) + 151: 8(int) ISub 150 62 + 152: 143(ptr) AccessChain 140(gl_PrimitiveTriangleIndicesEXT) 151 + 153: 11(ivec3) Load 152 + 154: 143(ptr) AccessChain 140(gl_PrimitiveTriangleIndicesEXT) 149 + Store 154 153 + MemoryBarrier 62 63 + ControlBarrier 64 64 63 + Return + FunctionEnd +6(testAdditionalBuiltins(): 2 Function None 3 + 7: Label + 156(id): 155(ptr) Variable Function + 160(viewIdx): 155(ptr) Variable Function + 159: 43(int) Load 158(gl_DrawIDARB) + Store 156(id) 159 + 162: 43(int) Load 161(gl_ViewIndex) + Store 160(viewIdx) 162 + Return + FunctionEnd diff --git a/Test/baseResults/spv.ext.meshShaderRedeclBuiltins.mesh.out b/Test/baseResults/spv.ext.meshShaderRedeclBuiltins.mesh.out new file mode 100644 index 0000000000..357730076c --- /dev/null +++ b/Test/baseResults/spv.ext.meshShaderRedeclBuiltins.mesh.out @@ -0,0 +1,211 @@ +spv.ext.meshShaderRedeclBuiltins.mesh +// Module Version 10400 +// Generated by (magic number): 8000b +// Id's are bound by 128 + + Capability ClipDistance + Capability CullDistance + Capability MeshShadingEXT + Extension "SPV_EXT_mesh_shader" + 1: ExtInstImport "GLSL.std.450" + MemoryModel Logical GLSL450 + EntryPoint MeshEXT 4 "main" 11 17 29 81 122 + ExecutionMode 4 LocalSize 32 1 1 + ExecutionMode 4 OutputVertices 81 + ExecutionMode 4 OutputPrimitivesNV 32 + ExecutionMode 4 OutputPoints + Source GLSL 460 + SourceExtension "GL_EXT_mesh_shader" + Name 4 "main" + Name 8 "iid" + Name 11 "gl_LocalInvocationID" + Name 16 "gid" + Name 17 "gl_WorkGroupID" + Name 26 "gl_MeshPerVertexEXT" + MemberName 26(gl_MeshPerVertexEXT) 0 "gl_Position" + MemberName 26(gl_MeshPerVertexEXT) 1 "gl_PointSize" + MemberName 26(gl_MeshPerVertexEXT) 2 "gl_ClipDistance" + MemberName 26(gl_MeshPerVertexEXT) 3 "gl_CullDistance" + Name 29 "gl_MeshVerticesEXT" + Name 78 "gl_MeshPerPrimitiveEXT" + MemberName 78(gl_MeshPerPrimitiveEXT) 0 "gl_PrimitiveID" + MemberName 78(gl_MeshPerPrimitiveEXT) 1 "gl_Layer" + MemberName 78(gl_MeshPerPrimitiveEXT) 2 "gl_ViewportIndex" + MemberName 78(gl_MeshPerPrimitiveEXT) 3 "gl_CullPrimitiveEXT" + Name 81 "gl_MeshPrimitivesEXT" + Name 122 "gl_PrimitivePointIndicesEXT" + Decorate 11(gl_LocalInvocationID) BuiltIn LocalInvocationId + Decorate 17(gl_WorkGroupID) BuiltIn WorkgroupId + MemberDecorate 26(gl_MeshPerVertexEXT) 0 BuiltIn Position + MemberDecorate 26(gl_MeshPerVertexEXT) 1 BuiltIn PointSize + MemberDecorate 26(gl_MeshPerVertexEXT) 2 BuiltIn ClipDistance + MemberDecorate 26(gl_MeshPerVertexEXT) 3 BuiltIn CullDistance + Decorate 26(gl_MeshPerVertexEXT) Block + MemberDecorate 78(gl_MeshPerPrimitiveEXT) 0 PerPrimitiveNV + MemberDecorate 78(gl_MeshPerPrimitiveEXT) 0 BuiltIn PrimitiveId + MemberDecorate 78(gl_MeshPerPrimitiveEXT) 1 PerPrimitiveNV + MemberDecorate 78(gl_MeshPerPrimitiveEXT) 1 BuiltIn Layer + MemberDecorate 78(gl_MeshPerPrimitiveEXT) 2 PerPrimitiveNV + MemberDecorate 78(gl_MeshPerPrimitiveEXT) 2 BuiltIn ViewportIndex + MemberDecorate 78(gl_MeshPerPrimitiveEXT) 3 PerPrimitiveNV + MemberDecorate 78(gl_MeshPerPrimitiveEXT) 3 BuiltIn CullPrimitiveEXT + Decorate 78(gl_MeshPerPrimitiveEXT) Block + Decorate 122(gl_PrimitivePointIndicesEXT) BuiltIn PrimitivePointIndicesEXT + Decorate 127 BuiltIn WorkgroupSize + 2: TypeVoid + 3: TypeFunction 2 + 6: TypeInt 32 0 + 7: TypePointer Function 6(int) + 9: TypeVector 6(int) 3 + 10: TypePointer Input 9(ivec3) +11(gl_LocalInvocationID): 10(ptr) Variable Input + 12: 6(int) Constant 0 + 13: TypePointer Input 6(int) +17(gl_WorkGroupID): 10(ptr) Variable Input + 20: 6(int) Constant 81 + 21: 6(int) Constant 32 + 22: TypeFloat 32 + 23: TypeVector 22(float) 4 + 24: 6(int) Constant 4 + 25: TypeArray 22(float) 24 +26(gl_MeshPerVertexEXT): TypeStruct 23(fvec4) 22(float) 25 25 + 27: TypeArray 26(gl_MeshPerVertexEXT) 20 + 28: TypePointer Output 27 +29(gl_MeshVerticesEXT): 28(ptr) Variable Output + 31: TypeInt 32 1 + 32: 31(int) Constant 0 + 33: 22(float) Constant 1065353216 + 34: 23(fvec4) ConstantComposite 33 33 33 33 + 35: TypePointer Output 23(fvec4) + 38: 31(int) Constant 1 + 39: 22(float) Constant 1073741824 + 40: TypePointer Output 22(float) + 43: 31(int) Constant 2 + 44: 31(int) Constant 3 + 45: 22(float) Constant 1077936128 + 48: 22(float) Constant 1082130432 + 50: 6(int) Constant 1 + 51: 6(int) Constant 264 + 52: 6(int) Constant 2 + 77: TypeBool +78(gl_MeshPerPrimitiveEXT): TypeStruct 31(int) 31(int) 31(int) 77(bool) + 79: TypeArray 78(gl_MeshPerPrimitiveEXT) 21 + 80: TypePointer Output 79 +81(gl_MeshPrimitivesEXT): 80(ptr) Variable Output + 83: 31(int) Constant 6 + 84: TypePointer Output 31(int) + 87: 31(int) Constant 7 + 90: 31(int) Constant 8 + 93: 77(bool) ConstantFalse + 94: TypePointer Output 77(bool) + 120: TypeArray 6(int) 21 + 121: TypePointer Output 120 +122(gl_PrimitivePointIndicesEXT): 121(ptr) Variable Output + 123: TypePointer Output 6(int) + 125: 31(int) Constant 31 + 127: 9(ivec3) ConstantComposite 21 50 50 + 4(main): 2 Function None 3 + 5: Label + 8(iid): 7(ptr) Variable Function + 16(gid): 7(ptr) Variable Function + 14: 13(ptr) AccessChain 11(gl_LocalInvocationID) 12 + 15: 6(int) Load 14 + Store 8(iid) 15 + 18: 13(ptr) AccessChain 17(gl_WorkGroupID) 12 + 19: 6(int) Load 18 + Store 16(gid) 19 + SetMeshOutputsEXT 20 21 + 30: 6(int) Load 8(iid) + 36: 35(ptr) AccessChain 29(gl_MeshVerticesEXT) 30 32 + Store 36 34 + 37: 6(int) Load 8(iid) + 41: 40(ptr) AccessChain 29(gl_MeshVerticesEXT) 37 38 + Store 41 39 + 42: 6(int) Load 8(iid) + 46: 40(ptr) AccessChain 29(gl_MeshVerticesEXT) 42 43 44 + Store 46 45 + 47: 6(int) Load 8(iid) + 49: 40(ptr) AccessChain 29(gl_MeshVerticesEXT) 47 44 43 + Store 49 48 + MemoryBarrier 50 51 + ControlBarrier 52 52 51 + 53: 6(int) Load 8(iid) + 54: 6(int) IAdd 53 50 + 55: 6(int) Load 8(iid) + 56: 35(ptr) AccessChain 29(gl_MeshVerticesEXT) 55 32 + 57: 23(fvec4) Load 56 + 58: 35(ptr) AccessChain 29(gl_MeshVerticesEXT) 54 32 + Store 58 57 + 59: 6(int) Load 8(iid) + 60: 6(int) IAdd 59 50 + 61: 6(int) Load 8(iid) + 62: 40(ptr) AccessChain 29(gl_MeshVerticesEXT) 61 38 + 63: 22(float) Load 62 + 64: 40(ptr) AccessChain 29(gl_MeshVerticesEXT) 60 38 + Store 64 63 + 65: 6(int) Load 8(iid) + 66: 6(int) IAdd 65 50 + 67: 6(int) Load 8(iid) + 68: 40(ptr) AccessChain 29(gl_MeshVerticesEXT) 67 43 44 + 69: 22(float) Load 68 + 70: 40(ptr) AccessChain 29(gl_MeshVerticesEXT) 66 43 44 + Store 70 69 + 71: 6(int) Load 8(iid) + 72: 6(int) IAdd 71 50 + 73: 6(int) Load 8(iid) + 74: 40(ptr) AccessChain 29(gl_MeshVerticesEXT) 73 44 43 + 75: 22(float) Load 74 + 76: 40(ptr) AccessChain 29(gl_MeshVerticesEXT) 72 44 43 + Store 76 75 + MemoryBarrier 50 51 + ControlBarrier 52 52 51 + 82: 6(int) Load 8(iid) + 85: 84(ptr) AccessChain 81(gl_MeshPrimitivesEXT) 82 32 + Store 85 83 + 86: 6(int) Load 8(iid) + 88: 84(ptr) AccessChain 81(gl_MeshPrimitivesEXT) 86 38 + Store 88 87 + 89: 6(int) Load 8(iid) + 91: 84(ptr) AccessChain 81(gl_MeshPrimitivesEXT) 89 43 + Store 91 90 + 92: 6(int) Load 8(iid) + 95: 94(ptr) AccessChain 81(gl_MeshPrimitivesEXT) 92 44 + Store 95 93 + MemoryBarrier 50 51 + ControlBarrier 52 52 51 + 96: 6(int) Load 8(iid) + 97: 6(int) IAdd 96 50 + 98: 6(int) Load 8(iid) + 99: 84(ptr) AccessChain 81(gl_MeshPrimitivesEXT) 98 32 + 100: 31(int) Load 99 + 101: 84(ptr) AccessChain 81(gl_MeshPrimitivesEXT) 97 32 + Store 101 100 + 102: 6(int) Load 8(iid) + 103: 6(int) IAdd 102 50 + 104: 6(int) Load 8(iid) + 105: 84(ptr) AccessChain 81(gl_MeshPrimitivesEXT) 104 38 + 106: 31(int) Load 105 + 107: 84(ptr) AccessChain 81(gl_MeshPrimitivesEXT) 103 38 + Store 107 106 + 108: 6(int) Load 8(iid) + 109: 6(int) IAdd 108 50 + 110: 6(int) Load 8(iid) + 111: 84(ptr) AccessChain 81(gl_MeshPrimitivesEXT) 110 43 + 112: 31(int) Load 111 + 113: 84(ptr) AccessChain 81(gl_MeshPrimitivesEXT) 109 43 + Store 113 112 + 114: 6(int) Load 8(iid) + 115: 6(int) IAdd 114 50 + 116: 6(int) Load 8(iid) + 117: 94(ptr) AccessChain 81(gl_MeshPrimitivesEXT) 116 44 + 118: 77(bool) Load 117 + 119: 94(ptr) AccessChain 81(gl_MeshPrimitivesEXT) 115 44 + Store 119 118 + MemoryBarrier 50 51 + ControlBarrier 52 52 51 + 124: 123(ptr) AccessChain 122(gl_PrimitivePointIndicesEXT) 32 + Store 124 50 + 126: 123(ptr) AccessChain 122(gl_PrimitivePointIndicesEXT) 125 + Store 126 52 + Return + FunctionEnd diff --git a/Test/baseResults/spv.ext.meshShaderTaskMem.mesh.out b/Test/baseResults/spv.ext.meshShaderTaskMem.mesh.out new file mode 100644 index 0000000000..b206177e22 --- /dev/null +++ b/Test/baseResults/spv.ext.meshShaderTaskMem.mesh.out @@ -0,0 +1,102 @@ +spv.ext.meshShaderTaskMem.mesh +// Module Version 10400 +// Generated by (magic number): 8000b +// Id's are bound by 58 + + Capability MeshShadingEXT + Extension "SPV_EXT_mesh_shader" + 1: ExtInstImport "GLSL.std.450" + MemoryModel Logical GLSL450 + EntryPoint MeshEXT 4 "main" 11 22 30 38 + ExecutionMode 4 LocalSize 32 1 1 + ExecutionMode 4 OutputVertices 81 + ExecutionMode 4 OutputPrimitivesNV 32 + ExecutionMode 4 OutputTrianglesNV + Source GLSL 450 + SourceExtension "GL_EXT_mesh_shader" + Name 4 "main" + Name 8 "iid" + Name 11 "gl_LocalInvocationID" + Name 18 "outBlock" + MemberName 18(outBlock) 0 "gid5" + MemberName 18(outBlock) 1 "gid6" + Name 22 "myblk" + Name 28 "taskBlock" + MemberName 28(taskBlock) 0 "gid1" + MemberName 28(taskBlock) 1 "gid2" + Name 30 "mytask" + Name 36 "bufferBlock" + MemberName 36(bufferBlock) 0 "gid3" + MemberName 36(bufferBlock) 1 "gid4" + Name 38 "mybuf" + Decorate 11(gl_LocalInvocationID) BuiltIn LocalInvocationId + Decorate 18(outBlock) Block + Decorate 22(myblk) Location 0 + Decorate 35 ArrayStride 4 + MemberDecorate 36(bufferBlock) 0 Offset 0 + MemberDecorate 36(bufferBlock) 1 Offset 16 + Decorate 36(bufferBlock) Block + Decorate 38(mybuf) DescriptorSet 0 + Decorate 38(mybuf) Binding 0 + Decorate 57 BuiltIn WorkgroupSize + 2: TypeVoid + 3: TypeFunction 2 + 6: TypeInt 32 0 + 7: TypePointer Function 6(int) + 9: TypeVector 6(int) 3 + 10: TypePointer Input 9(ivec3) +11(gl_LocalInvocationID): 10(ptr) Variable Input + 12: 6(int) Constant 0 + 13: TypePointer Input 6(int) + 16: TypeFloat 32 + 17: TypeVector 16(float) 4 + 18(outBlock): TypeStruct 16(float) 17(fvec4) + 19: 6(int) Constant 81 + 20: TypeArray 18(outBlock) 19 + 21: TypePointer Output 20 + 22(myblk): 21(ptr) Variable Output + 24: TypeInt 32 1 + 25: 24(int) Constant 0 + 26: 6(int) Constant 2 + 27: TypeArray 16(float) 26 + 28(taskBlock): TypeStruct 27 17(fvec4) + 29: TypePointer TaskPayloadWorkgroupEXT 28(taskBlock) + 30(mytask): 29(ptr) Variable TaskPayloadWorkgroupEXT + 31: 24(int) Constant 1 + 32: TypePointer TaskPayloadWorkgroupEXT 16(float) + 35: TypeArray 16(float) 26 + 36(bufferBlock): TypeStruct 35 17(fvec4) + 37: TypePointer StorageBuffer 36(bufferBlock) + 38(mybuf): 37(ptr) Variable StorageBuffer + 39: TypePointer StorageBuffer 16(float) + 43: TypePointer Output 16(float) + 46: TypePointer TaskPayloadWorkgroupEXT 17(fvec4) + 49: TypePointer StorageBuffer 17(fvec4) + 53: TypePointer Output 17(fvec4) + 55: 6(int) Constant 32 + 56: 6(int) Constant 1 + 57: 9(ivec3) ConstantComposite 55 56 56 + 4(main): 2 Function None 3 + 5: Label + 8(iid): 7(ptr) Variable Function + 14: 13(ptr) AccessChain 11(gl_LocalInvocationID) 12 + 15: 6(int) Load 14 + Store 8(iid) 15 + 23: 6(int) Load 8(iid) + 33: 32(ptr) AccessChain 30(mytask) 25 31 + 34: 16(float) Load 33 + 40: 39(ptr) AccessChain 38(mybuf) 25 31 + 41: 16(float) Load 40 + 42: 16(float) FAdd 34 41 + 44: 43(ptr) AccessChain 22(myblk) 23 25 + Store 44 42 + 45: 6(int) Load 8(iid) + 47: 46(ptr) AccessChain 30(mytask) 31 + 48: 17(fvec4) Load 47 + 50: 49(ptr) AccessChain 38(mybuf) 31 + 51: 17(fvec4) Load 50 + 52: 17(fvec4) FAdd 48 51 + 54: 53(ptr) AccessChain 22(myblk) 45 31 + Store 54 52 + Return + FunctionEnd diff --git a/Test/baseResults/spv.ext.meshShaderUserDefined.mesh.out b/Test/baseResults/spv.ext.meshShaderUserDefined.mesh.out new file mode 100644 index 0000000000..dc347aac32 --- /dev/null +++ b/Test/baseResults/spv.ext.meshShaderUserDefined.mesh.out @@ -0,0 +1,208 @@ +spv.ext.meshShaderUserDefined.mesh +// Module Version 10400 +// Generated by (magic number): 8000b +// Id's are bound by 141 + + Capability MeshShadingEXT + Extension "SPV_EXT_mesh_shader" + 1: ExtInstImport "GLSL.std.450" + MemoryModel Logical GLSL450 + EntryPoint MeshEXT 4 "main" 11 17 34 104 + ExecutionMode 4 LocalSize 32 1 1 + ExecutionMode 4 OutputVertices 81 + ExecutionMode 4 OutputPrimitivesNV 32 + ExecutionMode 4 OutputTrianglesNV + Source GLSL 450 + SourceExtension "GL_EXT_mesh_shader" + Name 4 "main" + Name 8 "iid" + Name 11 "gl_LocalInvocationID" + Name 16 "gid" + Name 17 "gl_WorkGroupID" + Name 30 "myblock" + MemberName 30(myblock) 0 "f" + MemberName 30(myblock) 1 "fArr" + MemberName 30(myblock) 2 "pos" + MemberName 30(myblock) 3 "posArr" + MemberName 30(myblock) 4 "m" + MemberName 30(myblock) 5 "mArr" + Name 34 "blk" + Name 100 "myblock2" + MemberName 100(myblock2) 0 "f" + MemberName 100(myblock2) 1 "pos" + MemberName 100(myblock2) 2 "m" + Name 104 "blk2" + Decorate 11(gl_LocalInvocationID) BuiltIn LocalInvocationId + Decorate 17(gl_WorkGroupID) BuiltIn WorkgroupId + MemberDecorate 30(myblock) 0 PerPrimitiveNV + MemberDecorate 30(myblock) 1 PerPrimitiveNV + MemberDecorate 30(myblock) 2 PerPrimitiveNV + MemberDecorate 30(myblock) 3 PerPrimitiveNV + MemberDecorate 30(myblock) 4 PerPrimitiveNV + MemberDecorate 30(myblock) 5 PerPrimitiveNV + Decorate 30(myblock) Block + Decorate 34(blk) Location 0 + Decorate 100(myblock2) Block + Decorate 104(blk2) Location 20 + Decorate 140 BuiltIn WorkgroupSize + 2: TypeVoid + 3: TypeFunction 2 + 6: TypeInt 32 0 + 7: TypePointer Function 6(int) + 9: TypeVector 6(int) 3 + 10: TypePointer Input 9(ivec3) +11(gl_LocalInvocationID): 10(ptr) Variable Input + 12: 6(int) Constant 0 + 13: TypePointer Input 6(int) +17(gl_WorkGroupID): 10(ptr) Variable Input + 20: TypeFloat 32 + 21: 6(int) Constant 4 + 22: TypeArray 20(float) 21 + 23: TypeVector 20(float) 3 + 24: TypeVector 20(float) 4 + 25: TypeArray 24(fvec4) 21 + 26: TypeMatrix 24(fvec4) 4 + 27: TypeMatrix 23(fvec3) 3 + 28: 6(int) Constant 2 + 29: TypeArray 27 28 + 30(myblock): TypeStruct 20(float) 22 23(fvec3) 25 26 29 + 31: 6(int) Constant 32 + 32: TypeArray 30(myblock) 31 + 33: TypePointer Output 32 + 34(blk): 33(ptr) Variable Output + 36: TypeInt 32 1 + 37: 36(int) Constant 0 + 38: 20(float) Constant 1093664768 + 39: TypePointer Output 20(float) + 42: 6(int) Constant 1 + 44: 36(int) Constant 1 + 52: 36(int) Constant 2 + 53: 20(float) Constant 1096810496 + 54: 20(float) Constant 1097859072 + 55: 20(float) Constant 1095761920 + 56: 23(fvec3) ConstantComposite 53 54 55 + 57: TypePointer Output 23(fvec3) + 63: 36(int) Constant 3 + 72: 6(int) Constant 3 + 77: 36(int) Constant 4 + 78: 20(float) Constant 1098907648 + 79: 24(fvec4) ConstantComposite 55 53 54 78 + 80: TypePointer Output 24(fvec4) + 85: 36(int) Constant 5 + 94: 20(float) Constant 1099431936 + 95: 20(float) Constant 1099956224 + 96: 20(float) Constant 1100480512 + 97: 23(fvec3) ConstantComposite 94 95 96 + 99: 6(int) Constant 264 + 100(myblock2): TypeStruct 20(float) 24(fvec4) 26 + 101: 6(int) Constant 81 + 102: TypeArray 100(myblock2) 101 + 103: TypePointer Output 102 + 104(blk2): 103(ptr) Variable Output + 110: 20(float) Constant 1101004800 + 114: 20(float) Constant 1101529088 + 115: 20(float) Constant 1102053376 + 116: 20(float) Constant 1102577664 + 117: 20(float) Constant 1103101952 + 118: 24(fvec4) ConstantComposite 114 115 116 117 + 130: 20(float) Constant 1105723392 + 140: 9(ivec3) ConstantComposite 31 42 42 + 4(main): 2 Function None 3 + 5: Label + 8(iid): 7(ptr) Variable Function + 16(gid): 7(ptr) Variable Function + 14: 13(ptr) AccessChain 11(gl_LocalInvocationID) 12 + 15: 6(int) Load 14 + Store 8(iid) 15 + 18: 13(ptr) AccessChain 17(gl_WorkGroupID) 12 + 19: 6(int) Load 18 + Store 16(gid) 19 + 35: 6(int) Load 8(iid) + 40: 39(ptr) AccessChain 34(blk) 35 37 + Store 40 38 + 41: 6(int) Load 8(iid) + 43: 6(int) IAdd 41 42 + 45: 6(int) Load 16(gid) + 46: 6(int) Load 8(iid) + 47: 39(ptr) AccessChain 34(blk) 46 37 + 48: 20(float) Load 47 + 49: 39(ptr) AccessChain 34(blk) 43 44 45 + Store 49 48 + 50: 6(int) Load 8(iid) + 51: 6(int) UDiv 50 28 + 58: 57(ptr) AccessChain 34(blk) 51 52 + 59: 23(fvec3) Load 58 + 60: 23(fvec3) VectorShuffle 59 56 5 3 4 + Store 58 60 + 61: 6(int) Load 8(iid) + 62: 6(int) IMul 61 28 + 64: 6(int) Load 8(iid) + 65: 6(int) UDiv 64 28 + 66: 57(ptr) AccessChain 34(blk) 65 52 + 67: 23(fvec3) Load 66 + 68: 39(ptr) AccessChain 34(blk) 62 63 44 42 + 69: 20(float) CompositeExtract 67 0 + Store 68 69 + 70: 39(ptr) AccessChain 34(blk) 62 63 44 28 + 71: 20(float) CompositeExtract 67 1 + Store 70 71 + 73: 39(ptr) AccessChain 34(blk) 62 63 44 72 + 74: 20(float) CompositeExtract 67 2 + Store 73 74 + 75: 6(int) Load 8(iid) + 76: 6(int) UDiv 75 21 + 81: 80(ptr) AccessChain 34(blk) 76 77 52 + 82: 24(fvec4) Load 81 + 83: 24(fvec4) VectorShuffle 82 79 7 6 5 4 + Store 81 83 + 84: 6(int) Load 8(iid) + 86: 6(int) Load 8(iid) + 87: 6(int) UDiv 86 21 + 88: 39(ptr) AccessChain 34(blk) 87 77 52 72 + 89: 20(float) Load 88 + 90: 39(ptr) AccessChain 34(blk) 84 85 37 44 42 + Store 90 89 + 91: 6(int) Load 8(iid) + 92: 6(int) IMul 91 21 + 93: 6(int) Load 16(gid) + 98: 57(ptr) AccessChain 34(blk) 92 85 44 93 + Store 98 97 + MemoryBarrier 42 99 + ControlBarrier 28 28 99 + 105: 6(int) Load 8(iid) + 106: 6(int) Load 8(iid) + 107: 6(int) ISub 106 42 + 108: 39(ptr) AccessChain 104(blk2) 107 37 + 109: 20(float) Load 108 + 111: 20(float) FAdd 109 110 + 112: 39(ptr) AccessChain 104(blk2) 105 37 + Store 112 111 + 113: 6(int) Load 8(iid) + 119: 80(ptr) AccessChain 104(blk2) 113 44 + Store 119 118 + 120: 6(int) Load 8(iid) + 121: 6(int) IAdd 120 42 + 122: 6(int) Load 16(gid) + 123: 6(int) Load 8(iid) + 124: 80(ptr) AccessChain 104(blk2) 123 44 + 125: 24(fvec4) Load 124 + 126: 80(ptr) AccessChain 104(blk2) 121 52 122 + Store 126 125 + 127: 6(int) Load 8(iid) + 128: 6(int) IAdd 127 42 + 129: 6(int) Load 16(gid) + 131: 39(ptr) AccessChain 104(blk2) 128 52 129 28 + Store 131 130 + 132: 6(int) Load 8(iid) + 133: 6(int) IAdd 132 28 + 134: 6(int) Load 8(iid) + 135: 6(int) IAdd 134 42 + 136: 6(int) Load 16(gid) + 137: 80(ptr) AccessChain 104(blk2) 135 52 136 + 138: 24(fvec4) Load 137 + 139: 80(ptr) AccessChain 104(blk2) 133 52 63 + Store 139 138 + MemoryBarrier 42 99 + ControlBarrier 28 28 99 + Return + FunctionEnd diff --git a/Test/baseResults/spv.ext.meshTaskShader.task.out b/Test/baseResults/spv.ext.meshTaskShader.task.out new file mode 100644 index 0000000000..41a81d0a1d --- /dev/null +++ b/Test/baseResults/spv.ext.meshTaskShader.task.out @@ -0,0 +1,162 @@ +spv.ext.meshTaskShader.task +// Module Version 10400 +// Generated by (magic number): 8000b +// Id's are bound by 103 + + Capability StorageImageWriteWithoutFormat + Capability MeshShadingEXT + Extension "SPV_EXT_mesh_shader" + 1: ExtInstImport "GLSL.std.450" + MemoryModel Logical GLSL450 + EntryPoint TaskEXT 4 "main" 11 17 34 39 55 80 + ExecutionMode 4 LocalSize 32 1 1 + Source GLSL 450 + SourceExtension "GL_EXT_mesh_shader" + Name 4 "main" + Name 8 "iid" + Name 11 "gl_LocalInvocationID" + Name 16 "gid" + Name 17 "gl_WorkGroupID" + Name 20 "i" + Name 34 "mem" + Name 37 "block0" + MemberName 37(block0) 0 "uni_value" + Name 39 "" + Name 55 "uni_image" + Name 78 "Task" + MemberName 78(Task) 0 "dummy" + MemberName 78(Task) 1 "submesh" + Name 80 "mytask" + Decorate 11(gl_LocalInvocationID) BuiltIn LocalInvocationId + Decorate 17(gl_WorkGroupID) BuiltIn WorkgroupId + MemberDecorate 37(block0) 0 Offset 0 + Decorate 37(block0) Block + Decorate 39 DescriptorSet 0 + Decorate 39 Binding 1 + Decorate 55(uni_image) DescriptorSet 0 + Decorate 55(uni_image) Binding 0 + Decorate 55(uni_image) NonReadable + Decorate 102 BuiltIn WorkgroupSize + 2: TypeVoid + 3: TypeFunction 2 + 6: TypeInt 32 0 + 7: TypePointer Function 6(int) + 9: TypeVector 6(int) 3 + 10: TypePointer Input 9(ivec3) +11(gl_LocalInvocationID): 10(ptr) Variable Input + 12: 6(int) Constant 0 + 13: TypePointer Input 6(int) +17(gl_WorkGroupID): 10(ptr) Variable Input + 27: 6(int) Constant 10 + 28: TypeBool + 30: TypeFloat 32 + 31: TypeVector 30(float) 4 + 32: TypeArray 31(fvec4) 27 + 33: TypePointer Workgroup 32 + 34(mem): 33(ptr) Variable Workgroup + 37(block0): TypeStruct 6(int) + 38: TypePointer Uniform 37(block0) + 39: 38(ptr) Variable Uniform + 40: TypeInt 32 1 + 41: 40(int) Constant 0 + 42: TypePointer Uniform 6(int) + 48: TypePointer Workgroup 31(fvec4) + 51: 40(int) Constant 1 + 53: TypeImage 30(float) 2D nonsampled format:Unknown + 54: TypePointer UniformConstant 53 + 55(uni_image): 54(ptr) Variable UniformConstant + 59: TypeVector 40(int) 2 + 69: 6(int) Constant 1 + 73: 6(int) Constant 264 + 74: 6(int) Constant 2 + 75: TypeVector 30(float) 2 + 76: 6(int) Constant 3 + 77: TypeArray 75(fvec2) 76 + 78(Task): TypeStruct 75(fvec2) 77 + 79: TypePointer TaskPayloadWorkgroupEXT 78(Task) + 80(mytask): 79(ptr) Variable TaskPayloadWorkgroupEXT + 81: 30(float) Constant 1106247680 + 82: 30(float) Constant 1106771968 + 83: 75(fvec2) ConstantComposite 81 82 + 84: TypePointer TaskPayloadWorkgroupEXT 75(fvec2) + 86: 30(float) Constant 1107296256 + 87: 30(float) Constant 1107558400 + 88: 75(fvec2) ConstantComposite 86 87 + 90: 30(float) Constant 1107820544 + 91: 30(float) Constant 1108082688 + 92: 75(fvec2) ConstantComposite 90 91 + 94: 40(int) Constant 2 + 101: 6(int) Constant 32 + 102: 9(ivec3) ConstantComposite 101 69 69 + 4(main): 2 Function None 3 + 5: Label + 8(iid): 7(ptr) Variable Function + 16(gid): 7(ptr) Variable Function + 20(i): 7(ptr) Variable Function + 14: 13(ptr) AccessChain 11(gl_LocalInvocationID) 12 + 15: 6(int) Load 14 + Store 8(iid) 15 + 18: 13(ptr) AccessChain 17(gl_WorkGroupID) 12 + 19: 6(int) Load 18 + Store 16(gid) 19 + Store 20(i) 12 + Branch 21 + 21: Label + LoopMerge 23 24 None + Branch 25 + 25: Label + 26: 6(int) Load 20(i) + 29: 28(bool) ULessThan 26 27 + BranchConditional 29 22 23 + 22: Label + 35: 6(int) Load 20(i) + 36: 6(int) Load 20(i) + 43: 42(ptr) AccessChain 39 41 + 44: 6(int) Load 43 + 45: 6(int) IAdd 36 44 + 46: 30(float) ConvertUToF 45 + 47: 31(fvec4) CompositeConstruct 46 46 46 46 + 49: 48(ptr) AccessChain 34(mem) 35 + Store 49 47 + Branch 24 + 24: Label + 50: 6(int) Load 20(i) + 52: 6(int) IAdd 50 51 + Store 20(i) 52 + Branch 21 + 23: Label + 56: 53 Load 55(uni_image) + 57: 6(int) Load 8(iid) + 58: 40(int) Bitcast 57 + 60: 59(ivec2) CompositeConstruct 58 58 + 61: 6(int) Load 16(gid) + 62: 48(ptr) AccessChain 34(mem) 61 + 63: 31(fvec4) Load 62 + ImageWrite 56 60 63 + 64: 53 Load 55(uni_image) + 65: 6(int) Load 8(iid) + 66: 40(int) Bitcast 65 + 67: 59(ivec2) CompositeConstruct 66 66 + 68: 6(int) Load 16(gid) + 70: 6(int) IAdd 68 69 + 71: 48(ptr) AccessChain 34(mem) 70 + 72: 31(fvec4) Load 71 + ImageWrite 64 67 72 + MemoryBarrier 69 73 + ControlBarrier 74 74 73 + 85: 84(ptr) AccessChain 80(mytask) 41 + Store 85 83 + 89: 84(ptr) AccessChain 80(mytask) 51 41 + Store 89 88 + 93: 84(ptr) AccessChain 80(mytask) 51 51 + Store 93 92 + 95: 6(int) Load 16(gid) + 96: 6(int) UMod 95 74 + 97: 84(ptr) AccessChain 80(mytask) 51 96 + 98: 75(fvec2) Load 97 + 99: 84(ptr) AccessChain 80(mytask) 51 94 + Store 99 98 + MemoryBarrier 69 73 + ControlBarrier 74 74 73 + EmitMeshTasksEXT 76 69 69 80(mytask) + FunctionEnd diff --git a/Test/baseResults/spv.ext.textureShadowLod.error.frag.out b/Test/baseResults/spv.ext.textureShadowLod.error.frag.out new file mode 100644 index 0000000000..18adb05962 --- /dev/null +++ b/Test/baseResults/spv.ext.textureShadowLod.error.frag.out @@ -0,0 +1,6 @@ +spv.ext.textureShadowLod.error.frag +ERROR: 0:11: 'textureLod(..., float lod)' : required extension not requested: GL_EXT_texture_shadow_lod +ERROR: 1 compilation errors. No code generated. + + +SPIR-V is not generated for failed compile or link diff --git a/Test/baseResults/spv.ext.textureShadowLod.frag.out b/Test/baseResults/spv.ext.textureShadowLod.frag.out new file mode 100644 index 0000000000..ca4a872777 --- /dev/null +++ b/Test/baseResults/spv.ext.textureShadowLod.frag.out @@ -0,0 +1,89 @@ +spv.ext.textureShadowLod.frag +// Module Version 10000 +// Generated by (magic number): 8000b +// Id's are bound by 55 + + Capability Shader + Capability SampledCubeArray + 1: ExtInstImport "GLSL.std.450" + MemoryModel Logical GLSL450 + EntryPoint Fragment 4 "main" 8 16 + ExecutionMode 4 OriginUpperLeft + Source GLSL 450 + SourceExtension "GL_EXT_texture_shadow_lod" + Name 4 "main" + Name 8 "c" + Name 12 "s2da" + Name 16 "tc" + Name 24 "sca" + Name 43 "sc" + Decorate 8(c) Location 0 + Decorate 12(s2da) DescriptorSet 0 + Decorate 12(s2da) Binding 0 + Decorate 16(tc) Location 0 + Decorate 24(sca) DescriptorSet 0 + Decorate 24(sca) Binding 1 + Decorate 43(sc) DescriptorSet 0 + Decorate 43(sc) Binding 2 + 2: TypeVoid + 3: TypeFunction 2 + 6: TypeFloat 32 + 7: TypePointer Output 6(float) + 8(c): 7(ptr) Variable Output + 9: TypeImage 6(float) 2D depth array sampled format:Unknown + 10: TypeSampledImage 9 + 11: TypePointer UniformConstant 10 + 12(s2da): 11(ptr) Variable UniformConstant + 14: TypeVector 6(float) 4 + 15: TypePointer Input 14(fvec4) + 16(tc): 15(ptr) Variable Input + 18: 6(float) Constant 0 + 21: TypeImage 6(float) Cube depth array sampled format:Unknown + 22: TypeSampledImage 21 + 23: TypePointer UniformConstant 22 + 24(sca): 23(ptr) Variable UniformConstant + 30: TypeInt 32 1 + 31: TypeVector 30(int) 2 + 32: 30(int) Constant 0 + 33: 31(ivec2) ConstantComposite 32 32 + 40: TypeImage 6(float) Cube depth sampled format:Unknown + 41: TypeSampledImage 40 + 42: TypePointer UniformConstant 41 + 43(sc): 42(ptr) Variable UniformConstant + 4(main): 2 Function None 3 + 5: Label + 13: 10 Load 12(s2da) + 17: 14(fvec4) Load 16(tc) + 19: 6(float) CompositeExtract 17 3 + 20: 6(float) ImageSampleDrefImplicitLod 13 17 19 Bias 18 + Store 8(c) 20 + 25: 22 Load 24(sca) + 26: 14(fvec4) Load 16(tc) + 27: 6(float) ImageSampleDrefImplicitLod 25 26 18 + Store 8(c) 27 + 28: 10 Load 12(s2da) + 29: 14(fvec4) Load 16(tc) + 34: 6(float) CompositeExtract 29 3 + 35: 6(float) ImageSampleDrefImplicitLod 28 29 34 Bias ConstOffset 18 33 + Store 8(c) 35 + 36: 10 Load 12(s2da) + 37: 14(fvec4) Load 16(tc) + 38: 6(float) CompositeExtract 37 3 + 39: 6(float) ImageSampleDrefExplicitLod 36 37 38 Lod 18 + Store 8(c) 39 + 44: 41 Load 43(sc) + 45: 14(fvec4) Load 16(tc) + 46: 6(float) CompositeExtract 45 3 + 47: 6(float) ImageSampleDrefExplicitLod 44 45 46 Lod 18 + Store 8(c) 47 + 48: 22 Load 24(sca) + 49: 14(fvec4) Load 16(tc) + 50: 6(float) ImageSampleDrefExplicitLod 48 49 18 Lod 18 + Store 8(c) 50 + 51: 10 Load 12(s2da) + 52: 14(fvec4) Load 16(tc) + 53: 6(float) CompositeExtract 52 3 + 54: 6(float) ImageSampleDrefExplicitLod 51 52 53 Lod ConstOffset 18 33 + Store 8(c) 54 + Return + FunctionEnd diff --git a/Test/baseResults/spv.extPostDepthCoverage.frag.out b/Test/baseResults/spv.extPostDepthCoverage.frag.out index cc96fb4f9c..7e4c6f5dfa 100644 --- a/Test/baseResults/spv.extPostDepthCoverage.frag.out +++ b/Test/baseResults/spv.extPostDepthCoverage.frag.out @@ -1,6 +1,6 @@ spv.extPostDepthCoverage.frag // Module Version 10000 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 6 Capability Shader diff --git a/Test/baseResults/spv.float16.frag.out b/Test/baseResults/spv.float16.frag.out index 8c33a66724..2cce81550d 100644 --- a/Test/baseResults/spv.float16.frag.out +++ b/Test/baseResults/spv.float16.frag.out @@ -1,7 +1,7 @@ spv.float16.frag Validation failed // Module Version 10000 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 542 Capability Shader diff --git a/Test/baseResults/spv.float16Fetch.frag.out b/Test/baseResults/spv.float16Fetch.frag.out index da4aa4ddbc..17eb5b3b9f 100644 --- a/Test/baseResults/spv.float16Fetch.frag.out +++ b/Test/baseResults/spv.float16Fetch.frag.out @@ -1,7 +1,7 @@ spv.float16Fetch.frag Validation failed // Module Version 10000 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 5979 Capability Shader diff --git a/Test/baseResults/spv.float16NoRelaxed.vert.out b/Test/baseResults/spv.float16NoRelaxed.vert.out index 8872b4637d..9e821ab2a2 100644 --- a/Test/baseResults/spv.float16NoRelaxed.vert.out +++ b/Test/baseResults/spv.float16NoRelaxed.vert.out @@ -1,6 +1,6 @@ spv.float16NoRelaxed.vert // Module Version 10300 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 35 Capability Shader diff --git a/Test/baseResults/spv.float16convertonlyarith.comp.out b/Test/baseResults/spv.float16convertonlyarith.comp.out index 1666f79f3d..81d1c60203 100644 --- a/Test/baseResults/spv.float16convertonlyarith.comp.out +++ b/Test/baseResults/spv.float16convertonlyarith.comp.out @@ -1,6 +1,6 @@ spv.float16convertonlyarith.comp // Module Version 10000 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 22 Capability Shader diff --git a/Test/baseResults/spv.float16convertonlystorage.comp.out b/Test/baseResults/spv.float16convertonlystorage.comp.out index 8eb42f6fd5..be15f43c86 100644 --- a/Test/baseResults/spv.float16convertonlystorage.comp.out +++ b/Test/baseResults/spv.float16convertonlystorage.comp.out @@ -1,6 +1,6 @@ spv.float16convertonlystorage.comp // Module Version 10000 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 22 Capability Shader diff --git a/Test/baseResults/spv.float32.frag.out b/Test/baseResults/spv.float32.frag.out index 2ffa2311f0..d2cc609458 100644 --- a/Test/baseResults/spv.float32.frag.out +++ b/Test/baseResults/spv.float32.frag.out @@ -1,6 +1,6 @@ spv.float32.frag // Module Version 10300 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 541 Capability Shader diff --git a/Test/baseResults/spv.float64.frag.out b/Test/baseResults/spv.float64.frag.out index cd5f80d677..68e8f1c7db 100644 --- a/Test/baseResults/spv.float64.frag.out +++ b/Test/baseResults/spv.float64.frag.out @@ -1,7 +1,7 @@ spv.float64.frag Validation failed // Module Version 10300 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 485 Capability Shader diff --git a/Test/baseResults/spv.floatFetch.frag.out b/Test/baseResults/spv.floatFetch.frag.out new file mode 100644 index 0000000000..8b9fc7290a --- /dev/null +++ b/Test/baseResults/spv.floatFetch.frag.out @@ -0,0 +1,4423 @@ +spv.floatFetch.frag +Validation failed +// Module Version 10000 +// Generated by (magic number): 8000b +// Id's are bound by 3599 + + Capability Shader + Capability ImageGatherExtended + Capability StorageImageMultisample + Capability ImageCubeArray + Capability ImageRect + Capability SampledRect + Capability InputAttachment + Capability SparseResidency + Capability MinLod + Capability Sampled1D + Capability Image1D + Capability SampledCubeArray + Capability SampledBuffer + Capability ImageBuffer + Capability ImageMSArray + Capability ImageQuery + Capability ImageGatherBiasLodAMD + Extension "SPV_AMD_texture_gather_bias_lod" + 1: ExtInstImport "GLSL.std.450" + MemoryModel Logical GLSL450 + EntryPoint Fragment 4 "main" 127 138 150 197 283 371 866 874 882 2665 3590 3598 + ExecutionMode 4 OriginUpperLeft + Source GLSL 450 + SourceExtension "GL_AMD_texture_gather_bias_lod" + SourceExtension "GL_ARB_sparse_texture2" + SourceExtension "GL_ARB_sparse_texture_clamp" + Name 4 "main" + Name 9 "testTexture(" + Name 11 "testTextureProj(" + Name 13 "testTextureLod(" + Name 15 "testTextureOffset(" + Name 17 "testTextureProjOffset(" + Name 19 "testTextureLodOffset(" + Name 21 "testTextureProjLodOffset(" + Name 23 "testTexelFetch(" + Name 25 "testTexelFetchOffset(" + Name 27 "testTextureGrad(" + Name 29 "testTextureGradOffset(" + Name 31 "testTextureProjGrad(" + Name 33 "testTextureProjGradoffset(" + Name 35 "testTextureGather(" + Name 37 "testTextureGatherOffset(" + Name 39 "testTextureGatherOffsets(" + Name 41 "testTextureGatherLod(" + Name 43 "testTextureGatherLodOffset(" + Name 45 "testTextureGatherLodOffsets(" + Name 50 "testTextureSize(" + Name 54 "testTextureQueryLod(" + Name 57 "testTextureQueryLevels(" + Name 59 "testTextureSamples(" + Name 61 "testImageLoad(" + Name 66 "testImageStore(vf4;" + Name 65 "data" + Name 68 "testSparseTexture(" + Name 70 "testSparseTextureLod(" + Name 72 "testSparseTextureOffset(" + Name 74 "testSparseTextureLodOffset(" + Name 76 "testSparseTextureGrad(" + Name 78 "testSparseTextureGradOffset(" + Name 80 "testSparseTexelFetch(" + Name 82 "testSparseTexelFetchOffset(" + Name 84 "testSparseTextureGather(" + Name 86 "testSparseTextureGatherOffset(" + Name 88 "testSparseTextureGatherOffsets(" + Name 90 "testSparseTextureGatherLod(" + Name 92 "testSparseTextureGatherLodOffset(" + Name 94 "testSparseTextureGatherLodOffsets(" + Name 96 "testSparseImageLoad(" + Name 98 "testSparseTextureClamp(" + Name 100 "testTextureClamp(" + Name 102 "testSparseTextureOffsetClamp(" + Name 104 "testTextureOffsetClamp(" + Name 106 "testSparseTextureGradClamp(" + Name 108 "testTextureGradClamp(" + Name 110 "testSparseTextureGradOffsetClamp(" + Name 112 "testTextureGradOffsetClamp(" + Name 114 "testCombinedTextureSampler(" + Name 116 "testSubpassLoad(" + Name 118 "texel" + Name 124 "s1D" + Name 127 "c1" + Name 135 "s2D" + Name 138 "c2" + Name 146 "s3D" + Name 150 "c3" + Name 158 "sCube" + Name 167 "s1DShadow" + Name 182 "s2DShadow" + Name 194 "sCubeShadow" + Name 197 "c4" + Name 208 "s1DArray" + Name 217 "s2DArray" + Name 226 "sCubeArray" + Name 235 "s1DArrayShadow" + Name 247 "s2DArrayShadow" + Name 259 "s2DRect" + Name 268 "s2DRectShadow" + Name 280 "sCubeArrayShadow" + Name 283 "compare" + Name 293 "texel" + Name 368 "texel" + Name 371 "lod" + Name 442 "texel" + Name 521 "texel" + Name 596 "texel" + Name 657 "texel" + Name 717 "texel" + Name 773 "sBuffer" + Name 784 "s2DMS" + Name 795 "s2DMSArray" + Name 807 "texel" + Name 863 "texel" + Name 866 "dPdxy1" + Name 874 "dPdxy2" + Name 882 "dPdxy3" + Name 986 "texel" + Name 1082 "texel" + Name 1177 "texel" + Name 1272 "texel" + Name 1332 "texel" + Name 1369 "texel" + Name 1409 "texel" + Name 1437 "texel" + Name 1453 "texel" + Name 1470 "size" + Name 1688 "lod" + Name 1758 "levels" + Name 1827 "samples" + Name 1841 "texel" + Name 1844 "i1D" + Name 1853 "i2D" + Name 1862 "i3D" + Name 1871 "i2DRect" + Name 1880 "iCube" + Name 1889 "iBuffer" + Name 1898 "i1DArray" + Name 1907 "i2DArray" + Name 1916 "iCubeArray" + Name 1925 "i2DMS" + Name 1934 "i2DMSArray" + Name 1988 "texel" + Name 1991 "ResType" + Name 2009 "ResType" + Name 2059 "texel" + Name 2101 "texel" + Name 2146 "texel" + Name 2176 "texel" + Name 2258 "texel" + Name 2317 "texel" + Name 2369 "texel" + Name 2407 "texel" + Name 2466 "texel" + Name 2503 "texel" + Name 2550 "texel" + Name 2578 "texel" + Name 2594 "texel" + Name 2610 "texel" + Name 2662 "texel" + Name 2665 "lodClamp" + Name 2729 "texel" + Name 2829 "texel" + Name 2867 "texel" + Name 2937 "texel" + Name 3011 "texel" + Name 3126 "texel" + Name 3174 "texel" + Name 3262 "texel" + Name 3264 "t1D" + Name 3268 "s" + Name 3276 "t2D" + Name 3285 "t3D" + Name 3294 "tCube" + Name 3303 "sShadow" + Name 3334 "t1DArray" + Name 3343 "t2DArray" + Name 3352 "tCubeArray" + Name 3381 "t2DRect" + Name 3414 "subpass" + Name 3420 "subpassMS" + Name 3426 "result" + Name 3511 "param" + Name 3590 "fragColor" + Name 3593 "tBuffer" + Name 3595 "t2DMS" + Name 3597 "t2DMSArray" + Name 3598 "bias" + Decorate 124(s1D) DescriptorSet 0 + Decorate 124(s1D) Binding 0 + Decorate 127(c1) Location 0 + Decorate 135(s2D) DescriptorSet 0 + Decorate 135(s2D) Binding 1 + Decorate 138(c2) Location 1 + Decorate 146(s3D) DescriptorSet 0 + Decorate 146(s3D) Binding 2 + Decorate 150(c3) Location 2 + Decorate 158(sCube) DescriptorSet 0 + Decorate 158(sCube) Binding 4 + Decorate 167(s1DShadow) DescriptorSet 0 + Decorate 167(s1DShadow) Binding 11 + Decorate 182(s2DShadow) DescriptorSet 0 + Decorate 182(s2DShadow) Binding 12 + Decorate 194(sCubeShadow) DescriptorSet 0 + Decorate 194(sCubeShadow) Binding 14 + Decorate 197(c4) Location 3 + Decorate 208(s1DArray) DescriptorSet 0 + Decorate 208(s1DArray) Binding 7 + Decorate 217(s2DArray) DescriptorSet 0 + Decorate 217(s2DArray) Binding 8 + Decorate 226(sCubeArray) DescriptorSet 0 + Decorate 226(sCubeArray) Binding 9 + Decorate 235(s1DArrayShadow) DescriptorSet 0 + Decorate 235(s1DArrayShadow) Binding 15 + Decorate 247(s2DArrayShadow) DescriptorSet 0 + Decorate 247(s2DArrayShadow) Binding 16 + Decorate 259(s2DRect) DescriptorSet 0 + Decorate 259(s2DRect) Binding 3 + Decorate 268(s2DRectShadow) DescriptorSet 0 + Decorate 268(s2DRectShadow) Binding 13 + Decorate 280(sCubeArrayShadow) DescriptorSet 0 + Decorate 280(sCubeArrayShadow) Binding 17 + Decorate 283(compare) Location 4 + Decorate 371(lod) Location 5 + Decorate 773(sBuffer) DescriptorSet 0 + Decorate 773(sBuffer) Binding 5 + Decorate 784(s2DMS) DescriptorSet 0 + Decorate 784(s2DMS) Binding 6 + Decorate 795(s2DMSArray) DescriptorSet 0 + Decorate 795(s2DMSArray) Binding 10 + Decorate 866(dPdxy1) Location 8 + Decorate 874(dPdxy2) Location 9 + Decorate 882(dPdxy3) Location 10 + Decorate 1844(i1D) DescriptorSet 1 + Decorate 1844(i1D) Binding 0 + Decorate 1853(i2D) DescriptorSet 1 + Decorate 1853(i2D) Binding 1 + Decorate 1862(i3D) DescriptorSet 1 + Decorate 1862(i3D) Binding 2 + Decorate 1871(i2DRect) DescriptorSet 1 + Decorate 1871(i2DRect) Binding 3 + Decorate 1880(iCube) DescriptorSet 1 + Decorate 1880(iCube) Binding 4 + Decorate 1889(iBuffer) DescriptorSet 1 + Decorate 1889(iBuffer) Binding 8 + Decorate 1898(i1DArray) DescriptorSet 1 + Decorate 1898(i1DArray) Binding 5 + Decorate 1907(i2DArray) DescriptorSet 1 + Decorate 1907(i2DArray) Binding 6 + Decorate 1916(iCubeArray) DescriptorSet 1 + Decorate 1916(iCubeArray) Binding 7 + Decorate 1925(i2DMS) DescriptorSet 1 + Decorate 1925(i2DMS) Binding 9 + Decorate 1934(i2DMSArray) DescriptorSet 1 + Decorate 1934(i2DMSArray) Binding 10 + Decorate 2665(lodClamp) Location 7 + Decorate 3264(t1D) DescriptorSet 2 + Decorate 3264(t1D) Binding 0 + Decorate 3268(s) DescriptorSet 2 + Decorate 3268(s) Binding 11 + Decorate 3276(t2D) DescriptorSet 2 + Decorate 3276(t2D) Binding 1 + Decorate 3285(t3D) DescriptorSet 2 + Decorate 3285(t3D) Binding 2 + Decorate 3294(tCube) DescriptorSet 2 + Decorate 3294(tCube) Binding 4 + Decorate 3303(sShadow) DescriptorSet 2 + Decorate 3303(sShadow) Binding 12 + Decorate 3334(t1DArray) DescriptorSet 2 + Decorate 3334(t1DArray) Binding 5 + Decorate 3343(t2DArray) DescriptorSet 2 + Decorate 3343(t2DArray) Binding 6 + Decorate 3352(tCubeArray) DescriptorSet 2 + Decorate 3352(tCubeArray) Binding 7 + Decorate 3381(t2DRect) DescriptorSet 2 + Decorate 3381(t2DRect) Binding 3 + Decorate 3414(subpass) DescriptorSet 3 + Decorate 3414(subpass) Binding 0 + Decorate 3414(subpass) InputAttachmentIndex 0 + Decorate 3420(subpassMS) DescriptorSet 3 + Decorate 3420(subpassMS) Binding 1 + Decorate 3420(subpassMS) InputAttachmentIndex 0 + Decorate 3590(fragColor) Location 0 + Decorate 3593(tBuffer) DescriptorSet 2 + Decorate 3593(tBuffer) Binding 8 + Decorate 3595(t2DMS) DescriptorSet 2 + Decorate 3595(t2DMS) Binding 9 + Decorate 3597(t2DMSArray) DescriptorSet 2 + Decorate 3597(t2DMSArray) Binding 10 + Decorate 3598(bias) Location 6 + 2: TypeVoid + 3: TypeFunction 2 + 6: TypeFloat 32 + 7: TypeVector 6(float) 4 + 8: TypeFunction 7(fvec4) + 47: TypeInt 32 1 + 48: TypeVector 47(int) 4 + 49: TypeFunction 48(ivec4) + 52: TypeVector 6(float) 2 + 53: TypeFunction 52(fvec2) + 56: TypeFunction 47(int) + 63: TypePointer Function 7(fvec4) + 64: TypeFunction 2 63(ptr) + 119: 6(float) Constant 0 + 120: 7(fvec4) ConstantComposite 119 119 119 119 + 121: TypeImage 6(float) 1D sampled format:Unknown + 122: TypeSampledImage 121 + 123: TypePointer UniformConstant 122 + 124(s1D): 123(ptr) Variable UniformConstant + 126: TypePointer Input 6(float) + 127(c1): 126(ptr) Variable Input + 132: TypeImage 6(float) 2D sampled format:Unknown + 133: TypeSampledImage 132 + 134: TypePointer UniformConstant 133 + 135(s2D): 134(ptr) Variable UniformConstant + 137: TypePointer Input 52(fvec2) + 138(c2): 137(ptr) Variable Input + 143: TypeImage 6(float) 3D sampled format:Unknown + 144: TypeSampledImage 143 + 145: TypePointer UniformConstant 144 + 146(s3D): 145(ptr) Variable UniformConstant + 148: TypeVector 6(float) 3 + 149: TypePointer Input 148(fvec3) + 150(c3): 149(ptr) Variable Input + 155: TypeImage 6(float) Cube sampled format:Unknown + 156: TypeSampledImage 155 + 157: TypePointer UniformConstant 156 + 158(sCube): 157(ptr) Variable UniformConstant + 164: TypeImage 6(float) 1D depth sampled format:Unknown + 165: TypeSampledImage 164 + 166: TypePointer UniformConstant 165 + 167(s1DShadow): 166(ptr) Variable UniformConstant + 172: TypeInt 32 0 + 173: 172(int) Constant 0 + 174: TypePointer Function 6(float) + 179: TypeImage 6(float) 2D depth sampled format:Unknown + 180: TypeSampledImage 179 + 181: TypePointer UniformConstant 180 + 182(s2DShadow): 181(ptr) Variable UniformConstant + 191: TypeImage 6(float) Cube depth sampled format:Unknown + 192: TypeSampledImage 191 + 193: TypePointer UniformConstant 192 +194(sCubeShadow): 193(ptr) Variable UniformConstant + 196: TypePointer Input 7(fvec4) + 197(c4): 196(ptr) Variable Input + 205: TypeImage 6(float) 1D array sampled format:Unknown + 206: TypeSampledImage 205 + 207: TypePointer UniformConstant 206 + 208(s1DArray): 207(ptr) Variable UniformConstant + 214: TypeImage 6(float) 2D array sampled format:Unknown + 215: TypeSampledImage 214 + 216: TypePointer UniformConstant 215 + 217(s2DArray): 216(ptr) Variable UniformConstant + 223: TypeImage 6(float) Cube array sampled format:Unknown + 224: TypeSampledImage 223 + 225: TypePointer UniformConstant 224 + 226(sCubeArray): 225(ptr) Variable UniformConstant + 232: TypeImage 6(float) 1D depth array sampled format:Unknown + 233: TypeSampledImage 232 + 234: TypePointer UniformConstant 233 +235(s1DArrayShadow): 234(ptr) Variable UniformConstant + 244: TypeImage 6(float) 2D depth array sampled format:Unknown + 245: TypeSampledImage 244 + 246: TypePointer UniformConstant 245 +247(s2DArrayShadow): 246(ptr) Variable UniformConstant + 256: TypeImage 6(float) Rect sampled format:Unknown + 257: TypeSampledImage 256 + 258: TypePointer UniformConstant 257 + 259(s2DRect): 258(ptr) Variable UniformConstant + 265: TypeImage 6(float) Rect depth sampled format:Unknown + 266: TypeSampledImage 265 + 267: TypePointer UniformConstant 266 +268(s2DRectShadow): 267(ptr) Variable UniformConstant + 277: TypeImage 6(float) Cube depth array sampled format:Unknown + 278: TypeSampledImage 277 + 279: TypePointer UniformConstant 278 +280(sCubeArrayShadow): 279(ptr) Variable UniformConstant + 283(compare): 126(ptr) Variable Input + 371(lod): 126(ptr) Variable Input + 445: 47(int) Constant 1 + 451: TypeVector 47(int) 2 + 452: 451(ivec2) ConstantComposite 445 445 + 458: TypeVector 47(int) 3 + 459: 458(ivec3) ConstantComposite 445 445 445 + 770: TypeImage 6(float) Buffer sampled format:Unknown + 771: TypeSampledImage 770 + 772: TypePointer UniformConstant 771 + 773(sBuffer): 772(ptr) Variable UniformConstant + 781: TypeImage 6(float) 2D multi-sampled sampled format:Unknown + 782: TypeSampledImage 781 + 783: TypePointer UniformConstant 782 + 784(s2DMS): 783(ptr) Variable UniformConstant + 792: TypeImage 6(float) 2D array multi-sampled sampled format:Unknown + 793: TypeSampledImage 792 + 794: TypePointer UniformConstant 793 + 795(s2DMSArray): 794(ptr) Variable UniformConstant + 799: 47(int) Constant 2 + 866(dPdxy1): 126(ptr) Variable Input + 874(dPdxy2): 137(ptr) Variable Input + 882(dPdxy3): 149(ptr) Variable Input + 1275: 47(int) Constant 0 + 1372: 172(int) Constant 4 + 1373: TypeArray 451(ivec2) 1372 + 1374: 1373 ConstantComposite 452 452 452 452 + 1469: TypePointer Function 48(ivec4) + 1471: 48(ivec4) ConstantComposite 1275 1275 1275 1275 + 1477: TypePointer Function 47(int) + 1492: 172(int) Constant 1 + 1507: 172(int) Constant 2 + 1687: TypePointer Function 52(fvec2) + 1689: 52(fvec2) ConstantComposite 119 119 + 1842: TypeImage 6(float) 1D nonsampled format:Rgba16f + 1843: TypePointer UniformConstant 1842 + 1844(i1D): 1843(ptr) Variable UniformConstant + 1851: TypeImage 6(float) 2D nonsampled format:Rgba16f + 1852: TypePointer UniformConstant 1851 + 1853(i2D): 1852(ptr) Variable UniformConstant + 1860: TypeImage 6(float) 3D nonsampled format:Rgba16f + 1861: TypePointer UniformConstant 1860 + 1862(i3D): 1861(ptr) Variable UniformConstant + 1869: TypeImage 6(float) Rect nonsampled format:Rgba16f + 1870: TypePointer UniformConstant 1869 + 1871(i2DRect): 1870(ptr) Variable UniformConstant + 1878: TypeImage 6(float) Cube nonsampled format:Rgba16f + 1879: TypePointer UniformConstant 1878 + 1880(iCube): 1879(ptr) Variable UniformConstant + 1887: TypeImage 6(float) Buffer nonsampled format:Rgba16f + 1888: TypePointer UniformConstant 1887 + 1889(iBuffer): 1888(ptr) Variable UniformConstant + 1896: TypeImage 6(float) 1D array nonsampled format:Rgba16f + 1897: TypePointer UniformConstant 1896 + 1898(i1DArray): 1897(ptr) Variable UniformConstant + 1905: TypeImage 6(float) 2D array nonsampled format:Rgba16f + 1906: TypePointer UniformConstant 1905 + 1907(i2DArray): 1906(ptr) Variable UniformConstant + 1914: TypeImage 6(float) Cube array nonsampled format:Rgba16f + 1915: TypePointer UniformConstant 1914 +1916(iCubeArray): 1915(ptr) Variable UniformConstant + 1923: TypeImage 6(float) 2D multi-sampled nonsampled format:Rgba16f + 1924: TypePointer UniformConstant 1923 + 1925(i2DMS): 1924(ptr) Variable UniformConstant + 1932: TypeImage 6(float) 2D array multi-sampled nonsampled format:Rgba16f + 1933: TypePointer UniformConstant 1932 +1934(i2DMSArray): 1933(ptr) Variable UniformConstant + 1991(ResType): TypeStruct 47(int) 7(fvec4) + 2009(ResType): TypeStruct 47(int) 6(float) + 2506: 451(ivec2) ConstantComposite 445 799 + 2507: 47(int) Constant 3 + 2508: 47(int) Constant 4 + 2509: 451(ivec2) ConstantComposite 2507 2508 + 2510: 47(int) Constant 15 + 2511: 47(int) Constant 16 + 2512: 451(ivec2) ConstantComposite 2510 2511 + 2513: 47(int) Constant 4294967294 + 2514: 451(ivec2) ConstantComposite 2513 1275 + 2515: 1373 ConstantComposite 2506 2509 2512 2514 + 2665(lodClamp): 126(ptr) Variable Input + 3263: TypePointer UniformConstant 121 + 3264(t1D): 3263(ptr) Variable UniformConstant + 3266: TypeSampler + 3267: TypePointer UniformConstant 3266 + 3268(s): 3267(ptr) Variable UniformConstant + 3275: TypePointer UniformConstant 132 + 3276(t2D): 3275(ptr) Variable UniformConstant + 3284: TypePointer UniformConstant 143 + 3285(t3D): 3284(ptr) Variable UniformConstant + 3293: TypePointer UniformConstant 155 + 3294(tCube): 3293(ptr) Variable UniformConstant + 3303(sShadow): 3267(ptr) Variable UniformConstant + 3333: TypePointer UniformConstant 205 + 3334(t1DArray): 3333(ptr) Variable UniformConstant + 3342: TypePointer UniformConstant 214 + 3343(t2DArray): 3342(ptr) Variable UniformConstant + 3351: TypePointer UniformConstant 223 +3352(tCubeArray): 3351(ptr) Variable UniformConstant + 3380: TypePointer UniformConstant 256 + 3381(t2DRect): 3380(ptr) Variable UniformConstant + 3412: TypeImage 6(float) SubpassData nonsampled format:Unknown + 3413: TypePointer UniformConstant 3412 + 3414(subpass): 3413(ptr) Variable UniformConstant + 3416: 451(ivec2) ConstantComposite 1275 1275 + 3418: TypeImage 6(float) SubpassData multi-sampled nonsampled format:Unknown + 3419: TypePointer UniformConstant 3418 + 3420(subpassMS): 3419(ptr) Variable UniformConstant + 3589: TypePointer Output 7(fvec4) + 3590(fragColor): 3589(ptr) Variable Output + 3592: TypePointer UniformConstant 770 + 3593(tBuffer): 3592(ptr) Variable UniformConstant + 3594: TypePointer UniformConstant 781 + 3595(t2DMS): 3594(ptr) Variable UniformConstant + 3596: TypePointer UniformConstant 792 +3597(t2DMSArray): 3596(ptr) Variable UniformConstant + 3598(bias): 126(ptr) Variable Input + 4(main): 2 Function None 3 + 5: Label + 3426(result): 63(ptr) Variable Function + 3511(param): 63(ptr) Variable Function + Store 3426(result) 120 + 3427: 7(fvec4) FunctionCall 9(testTexture() + 3428: 7(fvec4) Load 3426(result) + 3429: 7(fvec4) FAdd 3428 3427 + Store 3426(result) 3429 + 3430: 7(fvec4) FunctionCall 11(testTextureProj() + 3431: 7(fvec4) Load 3426(result) + 3432: 7(fvec4) FAdd 3431 3430 + Store 3426(result) 3432 + 3433: 7(fvec4) FunctionCall 13(testTextureLod() + 3434: 7(fvec4) Load 3426(result) + 3435: 7(fvec4) FAdd 3434 3433 + Store 3426(result) 3435 + 3436: 7(fvec4) FunctionCall 15(testTextureOffset() + 3437: 7(fvec4) Load 3426(result) + 3438: 7(fvec4) FAdd 3437 3436 + Store 3426(result) 3438 + 3439: 7(fvec4) FunctionCall 19(testTextureLodOffset() + 3440: 7(fvec4) Load 3426(result) + 3441: 7(fvec4) FAdd 3440 3439 + Store 3426(result) 3441 + 3442: 7(fvec4) FunctionCall 21(testTextureProjLodOffset() + 3443: 7(fvec4) Load 3426(result) + 3444: 7(fvec4) FAdd 3443 3442 + Store 3426(result) 3444 + 3445: 7(fvec4) FunctionCall 23(testTexelFetch() + 3446: 7(fvec4) Load 3426(result) + 3447: 7(fvec4) FAdd 3446 3445 + Store 3426(result) 3447 + 3448: 7(fvec4) FunctionCall 25(testTexelFetchOffset() + 3449: 7(fvec4) Load 3426(result) + 3450: 7(fvec4) FAdd 3449 3448 + Store 3426(result) 3450 + 3451: 7(fvec4) FunctionCall 27(testTextureGrad() + 3452: 7(fvec4) Load 3426(result) + 3453: 7(fvec4) FAdd 3452 3451 + Store 3426(result) 3453 + 3454: 7(fvec4) FunctionCall 29(testTextureGradOffset() + 3455: 7(fvec4) Load 3426(result) + 3456: 7(fvec4) FAdd 3455 3454 + Store 3426(result) 3456 + 3457: 7(fvec4) FunctionCall 31(testTextureProjGrad() + 3458: 7(fvec4) Load 3426(result) + 3459: 7(fvec4) FAdd 3458 3457 + Store 3426(result) 3459 + 3460: 7(fvec4) FunctionCall 33(testTextureProjGradoffset() + 3461: 7(fvec4) Load 3426(result) + 3462: 7(fvec4) FAdd 3461 3460 + Store 3426(result) 3462 + 3463: 7(fvec4) FunctionCall 35(testTextureGather() + 3464: 7(fvec4) Load 3426(result) + 3465: 7(fvec4) FAdd 3464 3463 + Store 3426(result) 3465 + 3466: 7(fvec4) FunctionCall 37(testTextureGatherOffset() + 3467: 7(fvec4) Load 3426(result) + 3468: 7(fvec4) FAdd 3467 3466 + Store 3426(result) 3468 + 3469: 7(fvec4) FunctionCall 39(testTextureGatherOffsets() + 3470: 7(fvec4) Load 3426(result) + 3471: 7(fvec4) FAdd 3470 3469 + Store 3426(result) 3471 + 3472: 7(fvec4) FunctionCall 41(testTextureGatherLod() + 3473: 7(fvec4) Load 3426(result) + 3474: 7(fvec4) FAdd 3473 3472 + Store 3426(result) 3474 + 3475: 7(fvec4) FunctionCall 43(testTextureGatherLodOffset() + 3476: 7(fvec4) Load 3426(result) + 3477: 7(fvec4) FAdd 3476 3475 + Store 3426(result) 3477 + 3478: 7(fvec4) FunctionCall 45(testTextureGatherLodOffsets() + 3479: 7(fvec4) Load 3426(result) + 3480: 7(fvec4) FAdd 3479 3478 + Store 3426(result) 3480 + 3481: 48(ivec4) FunctionCall 50(testTextureSize() + 3482: 7(fvec4) ConvertSToF 3481 + 3483: 7(fvec4) Load 3426(result) + 3484: 7(fvec4) FAdd 3483 3482 + Store 3426(result) 3484 + 3485: 52(fvec2) FunctionCall 54(testTextureQueryLod() + 3486: 6(float) CompositeExtract 3485 0 + 3487: 6(float) CompositeExtract 3485 1 + 3488: 52(fvec2) CompositeConstruct 3486 3487 + 3489: 7(fvec4) Load 3426(result) + 3490: 52(fvec2) VectorShuffle 3489 3489 0 1 + 3491: 52(fvec2) FAdd 3490 3488 + 3492: 174(ptr) AccessChain 3426(result) 173 + 3493: 6(float) CompositeExtract 3491 0 + Store 3492 3493 + 3494: 174(ptr) AccessChain 3426(result) 1492 + 3495: 6(float) CompositeExtract 3491 1 + Store 3494 3495 + 3496: 47(int) FunctionCall 57(testTextureQueryLevels() + 3497: 6(float) ConvertSToF 3496 + 3498: 174(ptr) AccessChain 3426(result) 173 + 3499: 6(float) Load 3498 + 3500: 6(float) FAdd 3499 3497 + 3501: 174(ptr) AccessChain 3426(result) 173 + Store 3501 3500 + 3502: 47(int) FunctionCall 59(testTextureSamples() + 3503: 6(float) ConvertSToF 3502 + 3504: 174(ptr) AccessChain 3426(result) 173 + 3505: 6(float) Load 3504 + 3506: 6(float) FAdd 3505 3503 + 3507: 174(ptr) AccessChain 3426(result) 173 + Store 3507 3506 + 3508: 7(fvec4) FunctionCall 61(testImageLoad() + 3509: 7(fvec4) Load 3426(result) + 3510: 7(fvec4) FAdd 3509 3508 + Store 3426(result) 3510 + 3512: 7(fvec4) Load 3426(result) + Store 3511(param) 3512 + 3513: 2 FunctionCall 66(testImageStore(vf4;) 3511(param) + 3514: 7(fvec4) FunctionCall 68(testSparseTexture() + 3515: 7(fvec4) Load 3426(result) + 3516: 7(fvec4) FAdd 3515 3514 + Store 3426(result) 3516 + 3517: 7(fvec4) FunctionCall 70(testSparseTextureLod() + 3518: 7(fvec4) Load 3426(result) + 3519: 7(fvec4) FAdd 3518 3517 + Store 3426(result) 3519 + 3520: 7(fvec4) FunctionCall 72(testSparseTextureOffset() + 3521: 7(fvec4) Load 3426(result) + 3522: 7(fvec4) FAdd 3521 3520 + Store 3426(result) 3522 + 3523: 7(fvec4) FunctionCall 74(testSparseTextureLodOffset() + 3524: 7(fvec4) Load 3426(result) + 3525: 7(fvec4) FAdd 3524 3523 + Store 3426(result) 3525 + 3526: 7(fvec4) FunctionCall 76(testSparseTextureGrad() + 3527: 7(fvec4) Load 3426(result) + 3528: 7(fvec4) FAdd 3527 3526 + Store 3426(result) 3528 + 3529: 7(fvec4) FunctionCall 78(testSparseTextureGradOffset() + 3530: 7(fvec4) Load 3426(result) + 3531: 7(fvec4) FAdd 3530 3529 + Store 3426(result) 3531 + 3532: 7(fvec4) FunctionCall 80(testSparseTexelFetch() + 3533: 7(fvec4) Load 3426(result) + 3534: 7(fvec4) FAdd 3533 3532 + Store 3426(result) 3534 + 3535: 7(fvec4) FunctionCall 82(testSparseTexelFetchOffset() + 3536: 7(fvec4) Load 3426(result) + 3537: 7(fvec4) FAdd 3536 3535 + Store 3426(result) 3537 + 3538: 7(fvec4) FunctionCall 84(testSparseTextureGather() + 3539: 7(fvec4) Load 3426(result) + 3540: 7(fvec4) FAdd 3539 3538 + Store 3426(result) 3540 + 3541: 7(fvec4) FunctionCall 86(testSparseTextureGatherOffset() + 3542: 7(fvec4) Load 3426(result) + 3543: 7(fvec4) FAdd 3542 3541 + Store 3426(result) 3543 + 3544: 7(fvec4) FunctionCall 88(testSparseTextureGatherOffsets() + 3545: 7(fvec4) Load 3426(result) + 3546: 7(fvec4) FAdd 3545 3544 + Store 3426(result) 3546 + 3547: 7(fvec4) FunctionCall 90(testSparseTextureGatherLod() + 3548: 7(fvec4) Load 3426(result) + 3549: 7(fvec4) FAdd 3548 3547 + Store 3426(result) 3549 + 3550: 7(fvec4) FunctionCall 92(testSparseTextureGatherLodOffset() + 3551: 7(fvec4) Load 3426(result) + 3552: 7(fvec4) FAdd 3551 3550 + Store 3426(result) 3552 + 3553: 7(fvec4) FunctionCall 94(testSparseTextureGatherLodOffsets() + 3554: 7(fvec4) Load 3426(result) + 3555: 7(fvec4) FAdd 3554 3553 + Store 3426(result) 3555 + 3556: 7(fvec4) FunctionCall 96(testSparseImageLoad() + 3557: 7(fvec4) Load 3426(result) + 3558: 7(fvec4) FAdd 3557 3556 + Store 3426(result) 3558 + 3559: 7(fvec4) FunctionCall 98(testSparseTextureClamp() + 3560: 7(fvec4) Load 3426(result) + 3561: 7(fvec4) FAdd 3560 3559 + Store 3426(result) 3561 + 3562: 7(fvec4) FunctionCall 100(testTextureClamp() + 3563: 7(fvec4) Load 3426(result) + 3564: 7(fvec4) FAdd 3563 3562 + Store 3426(result) 3564 + 3565: 7(fvec4) FunctionCall 102(testSparseTextureOffsetClamp() + 3566: 7(fvec4) Load 3426(result) + 3567: 7(fvec4) FAdd 3566 3565 + Store 3426(result) 3567 + 3568: 7(fvec4) FunctionCall 104(testTextureOffsetClamp() + 3569: 7(fvec4) Load 3426(result) + 3570: 7(fvec4) FAdd 3569 3568 + Store 3426(result) 3570 + 3571: 7(fvec4) FunctionCall 76(testSparseTextureGrad() + 3572: 7(fvec4) Load 3426(result) + 3573: 7(fvec4) FAdd 3572 3571 + Store 3426(result) 3573 + 3574: 7(fvec4) FunctionCall 27(testTextureGrad() + 3575: 7(fvec4) Load 3426(result) + 3576: 7(fvec4) FAdd 3575 3574 + Store 3426(result) 3576 + 3577: 7(fvec4) FunctionCall 110(testSparseTextureGradOffsetClamp() + 3578: 7(fvec4) Load 3426(result) + 3579: 7(fvec4) FAdd 3578 3577 + Store 3426(result) 3579 + 3580: 7(fvec4) FunctionCall 112(testTextureGradOffsetClamp() + 3581: 7(fvec4) Load 3426(result) + 3582: 7(fvec4) FAdd 3581 3580 + Store 3426(result) 3582 + 3583: 7(fvec4) FunctionCall 114(testCombinedTextureSampler() + 3584: 7(fvec4) Load 3426(result) + 3585: 7(fvec4) FAdd 3584 3583 + Store 3426(result) 3585 + 3586: 7(fvec4) FunctionCall 116(testSubpassLoad() + 3587: 7(fvec4) Load 3426(result) + 3588: 7(fvec4) FAdd 3587 3586 + Store 3426(result) 3588 + 3591: 7(fvec4) Load 3426(result) + Store 3590(fragColor) 3591 + Return + FunctionEnd + 9(testTexture(): 7(fvec4) Function None 8 + 10: Label + 118(texel): 63(ptr) Variable Function + Store 118(texel) 120 + 125: 122 Load 124(s1D) + 128: 6(float) Load 127(c1) + 129: 7(fvec4) ImageSampleImplicitLod 125 128 + 130: 7(fvec4) Load 118(texel) + 131: 7(fvec4) FAdd 130 129 + Store 118(texel) 131 + 136: 133 Load 135(s2D) + 139: 52(fvec2) Load 138(c2) + 140: 7(fvec4) ImageSampleImplicitLod 136 139 + 141: 7(fvec4) Load 118(texel) + 142: 7(fvec4) FAdd 141 140 + Store 118(texel) 142 + 147: 144 Load 146(s3D) + 151: 148(fvec3) Load 150(c3) + 152: 7(fvec4) ImageSampleImplicitLod 147 151 + 153: 7(fvec4) Load 118(texel) + 154: 7(fvec4) FAdd 153 152 + Store 118(texel) 154 + 159: 156 Load 158(sCube) + 160: 148(fvec3) Load 150(c3) + 161: 7(fvec4) ImageSampleImplicitLod 159 160 + 162: 7(fvec4) Load 118(texel) + 163: 7(fvec4) FAdd 162 161 + Store 118(texel) 163 + 168: 165 Load 167(s1DShadow) + 169: 148(fvec3) Load 150(c3) + 170: 6(float) CompositeExtract 169 2 + 171: 6(float) ImageSampleDrefImplicitLod 168 169 170 + 175: 174(ptr) AccessChain 118(texel) 173 + 176: 6(float) Load 175 + 177: 6(float) FAdd 176 171 + 178: 174(ptr) AccessChain 118(texel) 173 + Store 178 177 + 183: 180 Load 182(s2DShadow) + 184: 148(fvec3) Load 150(c3) + 185: 6(float) CompositeExtract 184 2 + 186: 6(float) ImageSampleDrefImplicitLod 183 184 185 + 187: 174(ptr) AccessChain 118(texel) 173 + 188: 6(float) Load 187 + 189: 6(float) FAdd 188 186 + 190: 174(ptr) AccessChain 118(texel) 173 + Store 190 189 + 195: 192 Load 194(sCubeShadow) + 198: 7(fvec4) Load 197(c4) + 199: 6(float) CompositeExtract 198 3 + 200: 6(float) ImageSampleDrefImplicitLod 195 198 199 + 201: 174(ptr) AccessChain 118(texel) 173 + 202: 6(float) Load 201 + 203: 6(float) FAdd 202 200 + 204: 174(ptr) AccessChain 118(texel) 173 + Store 204 203 + 209: 206 Load 208(s1DArray) + 210: 52(fvec2) Load 138(c2) + 211: 7(fvec4) ImageSampleImplicitLod 209 210 + 212: 7(fvec4) Load 118(texel) + 213: 7(fvec4) FAdd 212 211 + Store 118(texel) 213 + 218: 215 Load 217(s2DArray) + 219: 148(fvec3) Load 150(c3) + 220: 7(fvec4) ImageSampleImplicitLod 218 219 + 221: 7(fvec4) Load 118(texel) + 222: 7(fvec4) FAdd 221 220 + Store 118(texel) 222 + 227: 224 Load 226(sCubeArray) + 228: 7(fvec4) Load 197(c4) + 229: 7(fvec4) ImageSampleImplicitLod 227 228 + 230: 7(fvec4) Load 118(texel) + 231: 7(fvec4) FAdd 230 229 + Store 118(texel) 231 + 236: 233 Load 235(s1DArrayShadow) + 237: 148(fvec3) Load 150(c3) + 238: 6(float) CompositeExtract 237 2 + 239: 6(float) ImageSampleDrefImplicitLod 236 237 238 + 240: 174(ptr) AccessChain 118(texel) 173 + 241: 6(float) Load 240 + 242: 6(float) FAdd 241 239 + 243: 174(ptr) AccessChain 118(texel) 173 + Store 243 242 + 248: 245 Load 247(s2DArrayShadow) + 249: 7(fvec4) Load 197(c4) + 250: 6(float) CompositeExtract 249 3 + 251: 6(float) ImageSampleDrefImplicitLod 248 249 250 + 252: 174(ptr) AccessChain 118(texel) 173 + 253: 6(float) Load 252 + 254: 6(float) FAdd 253 251 + 255: 174(ptr) AccessChain 118(texel) 173 + Store 255 254 + 260: 257 Load 259(s2DRect) + 261: 52(fvec2) Load 138(c2) + 262: 7(fvec4) ImageSampleImplicitLod 260 261 + 263: 7(fvec4) Load 118(texel) + 264: 7(fvec4) FAdd 263 262 + Store 118(texel) 264 + 269: 266 Load 268(s2DRectShadow) + 270: 148(fvec3) Load 150(c3) + 271: 6(float) CompositeExtract 270 2 + 272: 6(float) ImageSampleDrefImplicitLod 269 270 271 + 273: 174(ptr) AccessChain 118(texel) 173 + 274: 6(float) Load 273 + 275: 6(float) FAdd 274 272 + 276: 174(ptr) AccessChain 118(texel) 173 + Store 276 275 + 281: 278 Load 280(sCubeArrayShadow) + 282: 7(fvec4) Load 197(c4) + 284: 6(float) Load 283(compare) + 285: 6(float) ImageSampleDrefImplicitLod 281 282 284 + 286: 174(ptr) AccessChain 118(texel) 173 + 287: 6(float) Load 286 + 288: 6(float) FAdd 287 285 + 289: 174(ptr) AccessChain 118(texel) 173 + Store 289 288 + 290: 7(fvec4) Load 118(texel) + ReturnValue 290 + FunctionEnd +11(testTextureProj(): 7(fvec4) Function None 8 + 12: Label + 293(texel): 63(ptr) Variable Function + Store 293(texel) 120 + 294: 122 Load 124(s1D) + 295: 52(fvec2) Load 138(c2) + 296: 7(fvec4) ImageSampleProjImplicitLod 294 295 + 297: 7(fvec4) Load 293(texel) + 298: 7(fvec4) FAdd 297 296 + Store 293(texel) 298 + 299: 122 Load 124(s1D) + 300: 7(fvec4) Load 197(c4) + 301: 6(float) CompositeExtract 300 3 + 302: 7(fvec4) CompositeInsert 301 300 1 + 303: 7(fvec4) ImageSampleProjImplicitLod 299 302 + 304: 7(fvec4) Load 293(texel) + 305: 7(fvec4) FAdd 304 303 + Store 293(texel) 305 + 306: 133 Load 135(s2D) + 307: 148(fvec3) Load 150(c3) + 308: 7(fvec4) ImageSampleProjImplicitLod 306 307 + 309: 7(fvec4) Load 293(texel) + 310: 7(fvec4) FAdd 309 308 + Store 293(texel) 310 + 311: 133 Load 135(s2D) + 312: 7(fvec4) Load 197(c4) + 313: 6(float) CompositeExtract 312 3 + 314: 7(fvec4) CompositeInsert 313 312 2 + 315: 7(fvec4) ImageSampleProjImplicitLod 311 314 + 316: 7(fvec4) Load 293(texel) + 317: 7(fvec4) FAdd 316 315 + Store 293(texel) 317 + 318: 144 Load 146(s3D) + 319: 7(fvec4) Load 197(c4) + 320: 7(fvec4) ImageSampleProjImplicitLod 318 319 + 321: 7(fvec4) Load 293(texel) + 322: 7(fvec4) FAdd 321 320 + Store 293(texel) 322 + 323: 165 Load 167(s1DShadow) + 324: 7(fvec4) Load 197(c4) + 325: 6(float) CompositeExtract 324 2 + 326: 6(float) CompositeExtract 324 3 + 327: 7(fvec4) CompositeInsert 326 324 1 + 328: 6(float) ImageSampleProjDrefImplicitLod 323 327 325 + 329: 174(ptr) AccessChain 293(texel) 173 + 330: 6(float) Load 329 + 331: 6(float) FAdd 330 328 + 332: 174(ptr) AccessChain 293(texel) 173 + Store 332 331 + 333: 180 Load 182(s2DShadow) + 334: 7(fvec4) Load 197(c4) + 335: 6(float) CompositeExtract 334 2 + 336: 6(float) CompositeExtract 334 3 + 337: 7(fvec4) CompositeInsert 336 334 2 + 338: 6(float) ImageSampleProjDrefImplicitLod 333 337 335 + 339: 174(ptr) AccessChain 293(texel) 173 + 340: 6(float) Load 339 + 341: 6(float) FAdd 340 338 + 342: 174(ptr) AccessChain 293(texel) 173 + Store 342 341 + 343: 257 Load 259(s2DRect) + 344: 148(fvec3) Load 150(c3) + 345: 7(fvec4) ImageSampleProjImplicitLod 343 344 + 346: 7(fvec4) Load 293(texel) + 347: 7(fvec4) FAdd 346 345 + Store 293(texel) 347 + 348: 257 Load 259(s2DRect) + 349: 7(fvec4) Load 197(c4) + 350: 6(float) CompositeExtract 349 3 + 351: 7(fvec4) CompositeInsert 350 349 2 + 352: 7(fvec4) ImageSampleProjImplicitLod 348 351 + 353: 7(fvec4) Load 293(texel) + 354: 7(fvec4) FAdd 353 352 + Store 293(texel) 354 + 355: 266 Load 268(s2DRectShadow) + 356: 7(fvec4) Load 197(c4) + 357: 6(float) CompositeExtract 356 2 + 358: 6(float) CompositeExtract 356 3 + 359: 7(fvec4) CompositeInsert 358 356 2 + 360: 6(float) ImageSampleProjDrefImplicitLod 355 359 357 + 361: 174(ptr) AccessChain 293(texel) 173 + 362: 6(float) Load 361 + 363: 6(float) FAdd 362 360 + 364: 174(ptr) AccessChain 293(texel) 173 + Store 364 363 + 365: 7(fvec4) Load 293(texel) + ReturnValue 365 + FunctionEnd +13(testTextureLod(): 7(fvec4) Function None 8 + 14: Label + 368(texel): 63(ptr) Variable Function + Store 368(texel) 120 + 369: 122 Load 124(s1D) + 370: 6(float) Load 127(c1) + 372: 6(float) Load 371(lod) + 373: 7(fvec4) ImageSampleExplicitLod 369 370 Lod 372 + 374: 7(fvec4) Load 368(texel) + 375: 7(fvec4) FAdd 374 373 + Store 368(texel) 375 + 376: 133 Load 135(s2D) + 377: 52(fvec2) Load 138(c2) + 378: 6(float) Load 371(lod) + 379: 7(fvec4) ImageSampleExplicitLod 376 377 Lod 378 + 380: 7(fvec4) Load 368(texel) + 381: 7(fvec4) FAdd 380 379 + Store 368(texel) 381 + 382: 144 Load 146(s3D) + 383: 148(fvec3) Load 150(c3) + 384: 6(float) Load 371(lod) + 385: 7(fvec4) ImageSampleExplicitLod 382 383 Lod 384 + 386: 7(fvec4) Load 368(texel) + 387: 7(fvec4) FAdd 386 385 + Store 368(texel) 387 + 388: 156 Load 158(sCube) + 389: 148(fvec3) Load 150(c3) + 390: 6(float) Load 371(lod) + 391: 7(fvec4) ImageSampleExplicitLod 388 389 Lod 390 + 392: 7(fvec4) Load 368(texel) + 393: 7(fvec4) FAdd 392 391 + Store 368(texel) 393 + 394: 165 Load 167(s1DShadow) + 395: 148(fvec3) Load 150(c3) + 396: 6(float) Load 371(lod) + 397: 6(float) CompositeExtract 395 2 + 398: 6(float) ImageSampleDrefExplicitLod 394 395 397 Lod 396 + 399: 174(ptr) AccessChain 368(texel) 173 + 400: 6(float) Load 399 + 401: 6(float) FAdd 400 398 + 402: 174(ptr) AccessChain 368(texel) 173 + Store 402 401 + 403: 180 Load 182(s2DShadow) + 404: 148(fvec3) Load 150(c3) + 405: 6(float) Load 371(lod) + 406: 6(float) CompositeExtract 404 2 + 407: 6(float) ImageSampleDrefExplicitLod 403 404 406 Lod 405 + 408: 174(ptr) AccessChain 368(texel) 173 + 409: 6(float) Load 408 + 410: 6(float) FAdd 409 407 + 411: 174(ptr) AccessChain 368(texel) 173 + Store 411 410 + 412: 206 Load 208(s1DArray) + 413: 52(fvec2) Load 138(c2) + 414: 6(float) Load 371(lod) + 415: 7(fvec4) ImageSampleExplicitLod 412 413 Lod 414 + 416: 7(fvec4) Load 368(texel) + 417: 7(fvec4) FAdd 416 415 + Store 368(texel) 417 + 418: 215 Load 217(s2DArray) + 419: 148(fvec3) Load 150(c3) + 420: 6(float) Load 371(lod) + 421: 7(fvec4) ImageSampleExplicitLod 418 419 Lod 420 + 422: 7(fvec4) Load 368(texel) + 423: 7(fvec4) FAdd 422 421 + Store 368(texel) 423 + 424: 233 Load 235(s1DArrayShadow) + 425: 148(fvec3) Load 150(c3) + 426: 6(float) Load 371(lod) + 427: 6(float) CompositeExtract 425 2 + 428: 6(float) ImageSampleDrefExplicitLod 424 425 427 Lod 426 + 429: 174(ptr) AccessChain 368(texel) 173 + 430: 6(float) Load 429 + 431: 6(float) FAdd 430 428 + 432: 174(ptr) AccessChain 368(texel) 173 + Store 432 431 + 433: 224 Load 226(sCubeArray) + 434: 7(fvec4) Load 197(c4) + 435: 6(float) Load 371(lod) + 436: 7(fvec4) ImageSampleExplicitLod 433 434 Lod 435 + 437: 7(fvec4) Load 368(texel) + 438: 7(fvec4) FAdd 437 436 + Store 368(texel) 438 + 439: 7(fvec4) Load 368(texel) + ReturnValue 439 + FunctionEnd +15(testTextureOffset(): 7(fvec4) Function None 8 + 16: Label + 442(texel): 63(ptr) Variable Function + Store 442(texel) 120 + 443: 122 Load 124(s1D) + 444: 6(float) Load 127(c1) + 446: 7(fvec4) ImageSampleImplicitLod 443 444 ConstOffset 445 + 447: 7(fvec4) Load 442(texel) + 448: 7(fvec4) FAdd 447 446 + Store 442(texel) 448 + 449: 133 Load 135(s2D) + 450: 52(fvec2) Load 138(c2) + 453: 7(fvec4) ImageSampleImplicitLod 449 450 ConstOffset 452 + 454: 7(fvec4) Load 442(texel) + 455: 7(fvec4) FAdd 454 453 + Store 442(texel) 455 + 456: 144 Load 146(s3D) + 457: 148(fvec3) Load 150(c3) + 460: 7(fvec4) ImageSampleImplicitLod 456 457 ConstOffset 459 + 461: 7(fvec4) Load 442(texel) + 462: 7(fvec4) FAdd 461 460 + Store 442(texel) 462 + 463: 257 Load 259(s2DRect) + 464: 52(fvec2) Load 138(c2) + 465: 7(fvec4) ImageSampleImplicitLod 463 464 ConstOffset 452 + 466: 7(fvec4) Load 442(texel) + 467: 7(fvec4) FAdd 466 465 + Store 442(texel) 467 + 468: 266 Load 268(s2DRectShadow) + 469: 148(fvec3) Load 150(c3) + 470: 6(float) CompositeExtract 469 2 + 471: 6(float) ImageSampleDrefImplicitLod 468 469 470 ConstOffset 452 + 472: 174(ptr) AccessChain 442(texel) 173 + 473: 6(float) Load 472 + 474: 6(float) FAdd 473 471 + 475: 174(ptr) AccessChain 442(texel) 173 + Store 475 474 + 476: 165 Load 167(s1DShadow) + 477: 148(fvec3) Load 150(c3) + 478: 6(float) CompositeExtract 477 2 + 479: 6(float) ImageSampleDrefImplicitLod 476 477 478 ConstOffset 445 + 480: 174(ptr) AccessChain 442(texel) 173 + 481: 6(float) Load 480 + 482: 6(float) FAdd 481 479 + 483: 174(ptr) AccessChain 442(texel) 173 + Store 483 482 + 484: 180 Load 182(s2DShadow) + 485: 148(fvec3) Load 150(c3) + 486: 6(float) CompositeExtract 485 2 + 487: 6(float) ImageSampleDrefImplicitLod 484 485 486 ConstOffset 452 + 488: 174(ptr) AccessChain 442(texel) 173 + 489: 6(float) Load 488 + 490: 6(float) FAdd 489 487 + 491: 174(ptr) AccessChain 442(texel) 173 + Store 491 490 + 492: 206 Load 208(s1DArray) + 493: 52(fvec2) Load 138(c2) + 494: 7(fvec4) ImageSampleImplicitLod 492 493 ConstOffset 445 + 495: 7(fvec4) Load 442(texel) + 496: 7(fvec4) FAdd 495 494 + Store 442(texel) 496 + 497: 215 Load 217(s2DArray) + 498: 148(fvec3) Load 150(c3) + 499: 7(fvec4) ImageSampleImplicitLod 497 498 ConstOffset 452 + 500: 7(fvec4) Load 442(texel) + 501: 7(fvec4) FAdd 500 499 + Store 442(texel) 501 + 502: 233 Load 235(s1DArrayShadow) + 503: 148(fvec3) Load 150(c3) + 504: 6(float) CompositeExtract 503 2 + 505: 6(float) ImageSampleDrefImplicitLod 502 503 504 ConstOffset 445 + 506: 174(ptr) AccessChain 442(texel) 173 + 507: 6(float) Load 506 + 508: 6(float) FAdd 507 505 + 509: 174(ptr) AccessChain 442(texel) 173 + Store 509 508 + 510: 245 Load 247(s2DArrayShadow) + 511: 7(fvec4) Load 197(c4) + 512: 6(float) CompositeExtract 511 3 + 513: 6(float) ImageSampleDrefImplicitLod 510 511 512 ConstOffset 452 + 514: 174(ptr) AccessChain 442(texel) 173 + 515: 6(float) Load 514 + 516: 6(float) FAdd 515 513 + 517: 174(ptr) AccessChain 442(texel) 173 + Store 517 516 + 518: 7(fvec4) Load 442(texel) + ReturnValue 518 + FunctionEnd +17(testTextureProjOffset(): 7(fvec4) Function None 8 + 18: Label + 521(texel): 63(ptr) Variable Function + Store 521(texel) 120 + 522: 122 Load 124(s1D) + 523: 52(fvec2) Load 138(c2) + 524: 7(fvec4) ImageSampleProjImplicitLod 522 523 ConstOffset 445 + 525: 7(fvec4) Load 521(texel) + 526: 7(fvec4) FAdd 525 524 + Store 521(texel) 526 + 527: 122 Load 124(s1D) + 528: 7(fvec4) Load 197(c4) + 529: 6(float) CompositeExtract 528 3 + 530: 7(fvec4) CompositeInsert 529 528 1 + 531: 7(fvec4) ImageSampleProjImplicitLod 527 530 ConstOffset 445 + 532: 7(fvec4) Load 521(texel) + 533: 7(fvec4) FAdd 532 531 + Store 521(texel) 533 + 534: 133 Load 135(s2D) + 535: 148(fvec3) Load 150(c3) + 536: 7(fvec4) ImageSampleProjImplicitLod 534 535 ConstOffset 452 + 537: 7(fvec4) Load 521(texel) + 538: 7(fvec4) FAdd 537 536 + Store 521(texel) 538 + 539: 133 Load 135(s2D) + 540: 7(fvec4) Load 197(c4) + 541: 6(float) CompositeExtract 540 3 + 542: 7(fvec4) CompositeInsert 541 540 2 + 543: 7(fvec4) ImageSampleProjImplicitLod 539 542 ConstOffset 452 + 544: 7(fvec4) Load 521(texel) + 545: 7(fvec4) FAdd 544 543 + Store 521(texel) 545 + 546: 144 Load 146(s3D) + 547: 7(fvec4) Load 197(c4) + 548: 7(fvec4) ImageSampleProjImplicitLod 546 547 ConstOffset 459 + 549: 7(fvec4) Load 521(texel) + 550: 7(fvec4) FAdd 549 548 + Store 521(texel) 550 + 551: 257 Load 259(s2DRect) + 552: 148(fvec3) Load 150(c3) + 553: 7(fvec4) ImageSampleProjImplicitLod 551 552 ConstOffset 452 + 554: 7(fvec4) Load 521(texel) + 555: 7(fvec4) FAdd 554 553 + Store 521(texel) 555 + 556: 257 Load 259(s2DRect) + 557: 7(fvec4) Load 197(c4) + 558: 6(float) CompositeExtract 557 3 + 559: 7(fvec4) CompositeInsert 558 557 2 + 560: 7(fvec4) ImageSampleProjImplicitLod 556 559 ConstOffset 452 + 561: 7(fvec4) Load 521(texel) + 562: 7(fvec4) FAdd 561 560 + Store 521(texel) 562 + 563: 266 Load 268(s2DRectShadow) + 564: 7(fvec4) Load 197(c4) + 565: 6(float) CompositeExtract 564 2 + 566: 6(float) CompositeExtract 564 3 + 567: 7(fvec4) CompositeInsert 566 564 2 + 568: 6(float) ImageSampleProjDrefImplicitLod 563 567 565 ConstOffset 452 + 569: 174(ptr) AccessChain 521(texel) 173 + 570: 6(float) Load 569 + 571: 6(float) FAdd 570 568 + 572: 174(ptr) AccessChain 521(texel) 173 + Store 572 571 + 573: 165 Load 167(s1DShadow) + 574: 7(fvec4) Load 197(c4) + 575: 6(float) CompositeExtract 574 2 + 576: 6(float) CompositeExtract 574 3 + 577: 7(fvec4) CompositeInsert 576 574 1 + 578: 6(float) ImageSampleProjDrefImplicitLod 573 577 575 ConstOffset 445 + 579: 174(ptr) AccessChain 521(texel) 173 + 580: 6(float) Load 579 + 581: 6(float) FAdd 580 578 + 582: 174(ptr) AccessChain 521(texel) 173 + Store 582 581 + 583: 180 Load 182(s2DShadow) + 584: 7(fvec4) Load 197(c4) + 585: 6(float) CompositeExtract 584 2 + 586: 6(float) CompositeExtract 584 3 + 587: 7(fvec4) CompositeInsert 586 584 2 + 588: 6(float) ImageSampleProjDrefImplicitLod 583 587 585 ConstOffset 452 + 589: 174(ptr) AccessChain 521(texel) 173 + 590: 6(float) Load 589 + 591: 6(float) FAdd 590 588 + 592: 174(ptr) AccessChain 521(texel) 173 + Store 592 591 + 593: 7(fvec4) Load 521(texel) + ReturnValue 593 + FunctionEnd +19(testTextureLodOffset(): 7(fvec4) Function None 8 + 20: Label + 596(texel): 63(ptr) Variable Function + Store 596(texel) 120 + 597: 122 Load 124(s1D) + 598: 6(float) Load 127(c1) + 599: 6(float) Load 371(lod) + 600: 7(fvec4) ImageSampleExplicitLod 597 598 Lod ConstOffset 599 445 + 601: 7(fvec4) Load 596(texel) + 602: 7(fvec4) FAdd 601 600 + Store 596(texel) 602 + 603: 133 Load 135(s2D) + 604: 52(fvec2) Load 138(c2) + 605: 6(float) Load 371(lod) + 606: 7(fvec4) ImageSampleExplicitLod 603 604 Lod ConstOffset 605 452 + 607: 7(fvec4) Load 596(texel) + 608: 7(fvec4) FAdd 607 606 + Store 596(texel) 608 + 609: 144 Load 146(s3D) + 610: 148(fvec3) Load 150(c3) + 611: 6(float) Load 371(lod) + 612: 7(fvec4) ImageSampleExplicitLod 609 610 Lod ConstOffset 611 459 + 613: 7(fvec4) Load 596(texel) + 614: 7(fvec4) FAdd 613 612 + Store 596(texel) 614 + 615: 165 Load 167(s1DShadow) + 616: 148(fvec3) Load 150(c3) + 617: 6(float) Load 371(lod) + 618: 6(float) CompositeExtract 616 2 + 619: 6(float) ImageSampleDrefExplicitLod 615 616 618 Lod ConstOffset 617 445 + 620: 174(ptr) AccessChain 596(texel) 173 + 621: 6(float) Load 620 + 622: 6(float) FAdd 621 619 + 623: 174(ptr) AccessChain 596(texel) 173 + Store 623 622 + 624: 180 Load 182(s2DShadow) + 625: 148(fvec3) Load 150(c3) + 626: 6(float) Load 371(lod) + 627: 6(float) CompositeExtract 625 2 + 628: 6(float) ImageSampleDrefExplicitLod 624 625 627 Lod ConstOffset 626 452 + 629: 174(ptr) AccessChain 596(texel) 173 + 630: 6(float) Load 629 + 631: 6(float) FAdd 630 628 + 632: 174(ptr) AccessChain 596(texel) 173 + Store 632 631 + 633: 206 Load 208(s1DArray) + 634: 52(fvec2) Load 138(c2) + 635: 6(float) Load 371(lod) + 636: 7(fvec4) ImageSampleExplicitLod 633 634 Lod ConstOffset 635 445 + 637: 7(fvec4) Load 596(texel) + 638: 7(fvec4) FAdd 637 636 + Store 596(texel) 638 + 639: 215 Load 217(s2DArray) + 640: 148(fvec3) Load 150(c3) + 641: 6(float) Load 371(lod) + 642: 7(fvec4) ImageSampleExplicitLod 639 640 Lod ConstOffset 641 452 + 643: 7(fvec4) Load 596(texel) + 644: 7(fvec4) FAdd 643 642 + Store 596(texel) 644 + 645: 233 Load 235(s1DArrayShadow) + 646: 148(fvec3) Load 150(c3) + 647: 6(float) Load 371(lod) + 648: 6(float) CompositeExtract 646 2 + 649: 6(float) ImageSampleDrefExplicitLod 645 646 648 Lod ConstOffset 647 445 + 650: 174(ptr) AccessChain 596(texel) 173 + 651: 6(float) Load 650 + 652: 6(float) FAdd 651 649 + 653: 174(ptr) AccessChain 596(texel) 173 + Store 653 652 + 654: 7(fvec4) Load 596(texel) + ReturnValue 654 + FunctionEnd +21(testTextureProjLodOffset(): 7(fvec4) Function None 8 + 22: Label + 657(texel): 63(ptr) Variable Function + Store 657(texel) 120 + 658: 122 Load 124(s1D) + 659: 52(fvec2) Load 138(c2) + 660: 6(float) Load 371(lod) + 661: 7(fvec4) ImageSampleProjExplicitLod 658 659 Lod ConstOffset 660 445 + 662: 7(fvec4) Load 657(texel) + 663: 7(fvec4) FAdd 662 661 + Store 657(texel) 663 + 664: 122 Load 124(s1D) + 665: 7(fvec4) Load 197(c4) + 666: 6(float) Load 371(lod) + 667: 6(float) CompositeExtract 665 3 + 668: 7(fvec4) CompositeInsert 667 665 1 + 669: 7(fvec4) ImageSampleProjExplicitLod 664 668 Lod ConstOffset 666 445 + 670: 7(fvec4) Load 657(texel) + 671: 7(fvec4) FAdd 670 669 + Store 657(texel) 671 + 672: 133 Load 135(s2D) + 673: 148(fvec3) Load 150(c3) + 674: 6(float) Load 371(lod) + 675: 7(fvec4) ImageSampleProjExplicitLod 672 673 Lod ConstOffset 674 452 + 676: 7(fvec4) Load 657(texel) + 677: 7(fvec4) FAdd 676 675 + Store 657(texel) 677 + 678: 133 Load 135(s2D) + 679: 7(fvec4) Load 197(c4) + 680: 6(float) Load 371(lod) + 681: 6(float) CompositeExtract 679 3 + 682: 7(fvec4) CompositeInsert 681 679 2 + 683: 7(fvec4) ImageSampleProjExplicitLod 678 682 Lod ConstOffset 680 452 + 684: 7(fvec4) Load 657(texel) + 685: 7(fvec4) FAdd 684 683 + Store 657(texel) 685 + 686: 144 Load 146(s3D) + 687: 7(fvec4) Load 197(c4) + 688: 6(float) Load 371(lod) + 689: 7(fvec4) ImageSampleProjExplicitLod 686 687 Lod ConstOffset 688 459 + 690: 7(fvec4) Load 657(texel) + 691: 7(fvec4) FAdd 690 689 + Store 657(texel) 691 + 692: 165 Load 167(s1DShadow) + 693: 7(fvec4) Load 197(c4) + 694: 6(float) Load 371(lod) + 695: 6(float) CompositeExtract 693 2 + 696: 6(float) CompositeExtract 693 3 + 697: 7(fvec4) CompositeInsert 696 693 1 + 698: 6(float) ImageSampleProjDrefExplicitLod 692 697 695 Lod ConstOffset 694 445 + 699: 174(ptr) AccessChain 657(texel) 173 + 700: 6(float) Load 699 + 701: 6(float) FAdd 700 698 + 702: 174(ptr) AccessChain 657(texel) 173 + Store 702 701 + 703: 180 Load 182(s2DShadow) + 704: 7(fvec4) Load 197(c4) + 705: 6(float) Load 371(lod) + 706: 6(float) CompositeExtract 704 2 + 707: 6(float) CompositeExtract 704 3 + 708: 7(fvec4) CompositeInsert 707 704 2 + 709: 6(float) ImageSampleProjDrefExplicitLod 703 708 706 Lod ConstOffset 705 452 + 710: 174(ptr) AccessChain 657(texel) 173 + 711: 6(float) Load 710 + 712: 6(float) FAdd 711 709 + 713: 174(ptr) AccessChain 657(texel) 173 + Store 713 712 + 714: 7(fvec4) Load 657(texel) + ReturnValue 714 + FunctionEnd +23(testTexelFetch(): 7(fvec4) Function None 8 + 24: Label + 717(texel): 63(ptr) Variable Function + Store 717(texel) 120 + 718: 122 Load 124(s1D) + 719: 6(float) Load 127(c1) + 720: 47(int) ConvertFToS 719 + 721: 6(float) Load 371(lod) + 722: 47(int) ConvertFToS 721 + 723: 121 Image 718 + 724: 7(fvec4) ImageFetch 723 720 Lod 722 + 725: 7(fvec4) Load 717(texel) + 726: 7(fvec4) FAdd 725 724 + Store 717(texel) 726 + 727: 133 Load 135(s2D) + 728: 52(fvec2) Load 138(c2) + 729: 451(ivec2) ConvertFToS 728 + 730: 6(float) Load 371(lod) + 731: 47(int) ConvertFToS 730 + 732: 132 Image 727 + 733: 7(fvec4) ImageFetch 732 729 Lod 731 + 734: 7(fvec4) Load 717(texel) + 735: 7(fvec4) FAdd 734 733 + Store 717(texel) 735 + 736: 144 Load 146(s3D) + 737: 148(fvec3) Load 150(c3) + 738: 458(ivec3) ConvertFToS 737 + 739: 6(float) Load 371(lod) + 740: 47(int) ConvertFToS 739 + 741: 143 Image 736 + 742: 7(fvec4) ImageFetch 741 738 Lod 740 + 743: 7(fvec4) Load 717(texel) + 744: 7(fvec4) FAdd 743 742 + Store 717(texel) 744 + 745: 257 Load 259(s2DRect) + 746: 52(fvec2) Load 138(c2) + 747: 451(ivec2) ConvertFToS 746 + 748: 256 Image 745 + 749: 7(fvec4) ImageFetch 748 747 + 750: 7(fvec4) Load 717(texel) + 751: 7(fvec4) FAdd 750 749 + Store 717(texel) 751 + 752: 206 Load 208(s1DArray) + 753: 52(fvec2) Load 138(c2) + 754: 451(ivec2) ConvertFToS 753 + 755: 6(float) Load 371(lod) + 756: 47(int) ConvertFToS 755 + 757: 205 Image 752 + 758: 7(fvec4) ImageFetch 757 754 Lod 756 + 759: 7(fvec4) Load 717(texel) + 760: 7(fvec4) FAdd 759 758 + Store 717(texel) 760 + 761: 215 Load 217(s2DArray) + 762: 148(fvec3) Load 150(c3) + 763: 458(ivec3) ConvertFToS 762 + 764: 6(float) Load 371(lod) + 765: 47(int) ConvertFToS 764 + 766: 214 Image 761 + 767: 7(fvec4) ImageFetch 766 763 Lod 765 + 768: 7(fvec4) Load 717(texel) + 769: 7(fvec4) FAdd 768 767 + Store 717(texel) 769 + 774: 771 Load 773(sBuffer) + 775: 6(float) Load 127(c1) + 776: 47(int) ConvertFToS 775 + 777: 770 Image 774 + 778: 7(fvec4) ImageFetch 777 776 + 779: 7(fvec4) Load 717(texel) + 780: 7(fvec4) FAdd 779 778 + Store 717(texel) 780 + 785: 782 Load 784(s2DMS) + 786: 52(fvec2) Load 138(c2) + 787: 451(ivec2) ConvertFToS 786 + 788: 781 Image 785 + 789: 7(fvec4) ImageFetch 788 787 Sample 445 + 790: 7(fvec4) Load 717(texel) + 791: 7(fvec4) FAdd 790 789 + Store 717(texel) 791 + 796: 793 Load 795(s2DMSArray) + 797: 148(fvec3) Load 150(c3) + 798: 458(ivec3) ConvertFToS 797 + 800: 792 Image 796 + 801: 7(fvec4) ImageFetch 800 798 Sample 799 + 802: 7(fvec4) Load 717(texel) + 803: 7(fvec4) FAdd 802 801 + Store 717(texel) 803 + 804: 7(fvec4) Load 717(texel) + ReturnValue 804 + FunctionEnd +25(testTexelFetchOffset(): 7(fvec4) Function None 8 + 26: Label + 807(texel): 63(ptr) Variable Function + Store 807(texel) 120 + 808: 122 Load 124(s1D) + 809: 6(float) Load 127(c1) + 810: 47(int) ConvertFToS 809 + 811: 6(float) Load 371(lod) + 812: 47(int) ConvertFToS 811 + 813: 121 Image 808 + 814: 7(fvec4) ImageFetch 813 810 Lod ConstOffset 812 445 + 815: 7(fvec4) Load 807(texel) + 816: 7(fvec4) FAdd 815 814 + Store 807(texel) 816 + 817: 133 Load 135(s2D) + 818: 52(fvec2) Load 138(c2) + 819: 451(ivec2) ConvertFToS 818 + 820: 6(float) Load 371(lod) + 821: 47(int) ConvertFToS 820 + 822: 132 Image 817 + 823: 7(fvec4) ImageFetch 822 819 Lod ConstOffset 821 452 + 824: 7(fvec4) Load 807(texel) + 825: 7(fvec4) FAdd 824 823 + Store 807(texel) 825 + 826: 144 Load 146(s3D) + 827: 148(fvec3) Load 150(c3) + 828: 458(ivec3) ConvertFToS 827 + 829: 6(float) Load 371(lod) + 830: 47(int) ConvertFToS 829 + 831: 143 Image 826 + 832: 7(fvec4) ImageFetch 831 828 Lod ConstOffset 830 459 + 833: 7(fvec4) Load 807(texel) + 834: 7(fvec4) FAdd 833 832 + Store 807(texel) 834 + 835: 257 Load 259(s2DRect) + 836: 52(fvec2) Load 138(c2) + 837: 451(ivec2) ConvertFToS 836 + 838: 256 Image 835 + 839: 7(fvec4) ImageFetch 838 837 ConstOffset 452 + 840: 7(fvec4) Load 807(texel) + 841: 7(fvec4) FAdd 840 839 + Store 807(texel) 841 + 842: 206 Load 208(s1DArray) + 843: 52(fvec2) Load 138(c2) + 844: 451(ivec2) ConvertFToS 843 + 845: 6(float) Load 371(lod) + 846: 47(int) ConvertFToS 845 + 847: 205 Image 842 + 848: 7(fvec4) ImageFetch 847 844 Lod ConstOffset 846 445 + 849: 7(fvec4) Load 807(texel) + 850: 7(fvec4) FAdd 849 848 + Store 807(texel) 850 + 851: 215 Load 217(s2DArray) + 852: 148(fvec3) Load 150(c3) + 853: 458(ivec3) ConvertFToS 852 + 854: 6(float) Load 371(lod) + 855: 47(int) ConvertFToS 854 + 856: 214 Image 851 + 857: 7(fvec4) ImageFetch 856 853 Lod ConstOffset 855 452 + 858: 7(fvec4) Load 807(texel) + 859: 7(fvec4) FAdd 858 857 + Store 807(texel) 859 + 860: 7(fvec4) Load 807(texel) + ReturnValue 860 + FunctionEnd +27(testTextureGrad(): 7(fvec4) Function None 8 + 28: Label + 863(texel): 63(ptr) Variable Function + Store 863(texel) 120 + 864: 122 Load 124(s1D) + 865: 6(float) Load 127(c1) + 867: 6(float) Load 866(dPdxy1) + 868: 6(float) Load 866(dPdxy1) + 869: 7(fvec4) ImageSampleExplicitLod 864 865 Grad 867 868 + 870: 7(fvec4) Load 863(texel) + 871: 7(fvec4) FAdd 870 869 + Store 863(texel) 871 + 872: 133 Load 135(s2D) + 873: 52(fvec2) Load 138(c2) + 875: 52(fvec2) Load 874(dPdxy2) + 876: 52(fvec2) Load 874(dPdxy2) + 877: 7(fvec4) ImageSampleExplicitLod 872 873 Grad 875 876 + 878: 7(fvec4) Load 863(texel) + 879: 7(fvec4) FAdd 878 877 + Store 863(texel) 879 + 880: 144 Load 146(s3D) + 881: 148(fvec3) Load 150(c3) + 883: 148(fvec3) Load 882(dPdxy3) + 884: 148(fvec3) Load 882(dPdxy3) + 885: 7(fvec4) ImageSampleExplicitLod 880 881 Grad 883 884 + 886: 7(fvec4) Load 863(texel) + 887: 7(fvec4) FAdd 886 885 + Store 863(texel) 887 + 888: 156 Load 158(sCube) + 889: 148(fvec3) Load 150(c3) + 890: 148(fvec3) Load 882(dPdxy3) + 891: 148(fvec3) Load 882(dPdxy3) + 892: 7(fvec4) ImageSampleExplicitLod 888 889 Grad 890 891 + 893: 7(fvec4) Load 863(texel) + 894: 7(fvec4) FAdd 893 892 + Store 863(texel) 894 + 895: 257 Load 259(s2DRect) + 896: 52(fvec2) Load 138(c2) + 897: 52(fvec2) Load 874(dPdxy2) + 898: 52(fvec2) Load 874(dPdxy2) + 899: 7(fvec4) ImageSampleExplicitLod 895 896 Grad 897 898 + 900: 7(fvec4) Load 863(texel) + 901: 7(fvec4) FAdd 900 899 + Store 863(texel) 901 + 902: 266 Load 268(s2DRectShadow) + 903: 148(fvec3) Load 150(c3) + 904: 52(fvec2) Load 874(dPdxy2) + 905: 52(fvec2) Load 874(dPdxy2) + 906: 6(float) CompositeExtract 903 2 + 907: 6(float) ImageSampleDrefExplicitLod 902 903 906 Grad 904 905 + 908: 174(ptr) AccessChain 863(texel) 173 + 909: 6(float) Load 908 + 910: 6(float) FAdd 909 907 + 911: 174(ptr) AccessChain 863(texel) 173 + Store 911 910 + 912: 165 Load 167(s1DShadow) + 913: 148(fvec3) Load 150(c3) + 914: 6(float) Load 866(dPdxy1) + 915: 6(float) Load 866(dPdxy1) + 916: 6(float) CompositeExtract 913 2 + 917: 6(float) ImageSampleDrefExplicitLod 912 913 916 Grad 914 915 + 918: 174(ptr) AccessChain 863(texel) 173 + 919: 6(float) Load 918 + 920: 6(float) FAdd 919 917 + 921: 174(ptr) AccessChain 863(texel) 173 + Store 921 920 + 922: 180 Load 182(s2DShadow) + 923: 148(fvec3) Load 150(c3) + 924: 52(fvec2) Load 874(dPdxy2) + 925: 52(fvec2) Load 874(dPdxy2) + 926: 6(float) CompositeExtract 923 2 + 927: 6(float) ImageSampleDrefExplicitLod 922 923 926 Grad 924 925 + 928: 174(ptr) AccessChain 863(texel) 173 + 929: 6(float) Load 928 + 930: 6(float) FAdd 929 927 + 931: 174(ptr) AccessChain 863(texel) 173 + Store 931 930 + 932: 192 Load 194(sCubeShadow) + 933: 7(fvec4) Load 197(c4) + 934: 148(fvec3) Load 882(dPdxy3) + 935: 148(fvec3) Load 882(dPdxy3) + 936: 6(float) CompositeExtract 933 3 + 937: 6(float) ImageSampleDrefExplicitLod 932 933 936 Grad 934 935 + 938: 174(ptr) AccessChain 863(texel) 173 + 939: 6(float) Load 938 + 940: 6(float) FAdd 939 937 + 941: 174(ptr) AccessChain 863(texel) 173 + Store 941 940 + 942: 206 Load 208(s1DArray) + 943: 52(fvec2) Load 138(c2) + 944: 6(float) Load 866(dPdxy1) + 945: 6(float) Load 866(dPdxy1) + 946: 7(fvec4) ImageSampleExplicitLod 942 943 Grad 944 945 + 947: 7(fvec4) Load 863(texel) + 948: 7(fvec4) FAdd 947 946 + Store 863(texel) 948 + 949: 215 Load 217(s2DArray) + 950: 148(fvec3) Load 150(c3) + 951: 52(fvec2) Load 874(dPdxy2) + 952: 52(fvec2) Load 874(dPdxy2) + 953: 7(fvec4) ImageSampleExplicitLod 949 950 Grad 951 952 + 954: 7(fvec4) Load 863(texel) + 955: 7(fvec4) FAdd 954 953 + Store 863(texel) 955 + 956: 233 Load 235(s1DArrayShadow) + 957: 148(fvec3) Load 150(c3) + 958: 6(float) Load 866(dPdxy1) + 959: 6(float) Load 866(dPdxy1) + 960: 6(float) CompositeExtract 957 2 + 961: 6(float) ImageSampleDrefExplicitLod 956 957 960 Grad 958 959 + 962: 174(ptr) AccessChain 863(texel) 173 + 963: 6(float) Load 962 + 964: 6(float) FAdd 963 961 + 965: 174(ptr) AccessChain 863(texel) 173 + Store 965 964 + 966: 245 Load 247(s2DArrayShadow) + 967: 7(fvec4) Load 197(c4) + 968: 52(fvec2) Load 874(dPdxy2) + 969: 52(fvec2) Load 874(dPdxy2) + 970: 6(float) CompositeExtract 967 3 + 971: 6(float) ImageSampleDrefExplicitLod 966 967 970 Grad 968 969 + 972: 174(ptr) AccessChain 863(texel) 173 + 973: 6(float) Load 972 + 974: 6(float) FAdd 973 971 + 975: 174(ptr) AccessChain 863(texel) 173 + Store 975 974 + 976: 224 Load 226(sCubeArray) + 977: 7(fvec4) Load 197(c4) + 978: 148(fvec3) Load 882(dPdxy3) + 979: 148(fvec3) Load 882(dPdxy3) + 980: 7(fvec4) ImageSampleExplicitLod 976 977 Grad 978 979 + 981: 7(fvec4) Load 863(texel) + 982: 7(fvec4) FAdd 981 980 + Store 863(texel) 982 + 983: 7(fvec4) Load 863(texel) + ReturnValue 983 + FunctionEnd +29(testTextureGradOffset(): 7(fvec4) Function None 8 + 30: Label + 986(texel): 63(ptr) Variable Function + Store 986(texel) 120 + 987: 122 Load 124(s1D) + 988: 6(float) Load 127(c1) + 989: 6(float) Load 866(dPdxy1) + 990: 6(float) Load 866(dPdxy1) + 991: 7(fvec4) ImageSampleExplicitLod 987 988 Grad ConstOffset 989 990 445 + 992: 7(fvec4) Load 986(texel) + 993: 7(fvec4) FAdd 992 991 + Store 986(texel) 993 + 994: 133 Load 135(s2D) + 995: 52(fvec2) Load 138(c2) + 996: 52(fvec2) Load 874(dPdxy2) + 997: 52(fvec2) Load 874(dPdxy2) + 998: 7(fvec4) ImageSampleExplicitLod 994 995 Grad ConstOffset 996 997 452 + 999: 7(fvec4) Load 986(texel) + 1000: 7(fvec4) FAdd 999 998 + Store 986(texel) 1000 + 1001: 144 Load 146(s3D) + 1002: 148(fvec3) Load 150(c3) + 1003: 148(fvec3) Load 882(dPdxy3) + 1004: 148(fvec3) Load 882(dPdxy3) + 1005: 7(fvec4) ImageSampleExplicitLod 1001 1002 Grad ConstOffset 1003 1004 459 + 1006: 7(fvec4) Load 986(texel) + 1007: 7(fvec4) FAdd 1006 1005 + Store 986(texel) 1007 + 1008: 257 Load 259(s2DRect) + 1009: 52(fvec2) Load 138(c2) + 1010: 52(fvec2) Load 874(dPdxy2) + 1011: 52(fvec2) Load 874(dPdxy2) + 1012: 7(fvec4) ImageSampleExplicitLod 1008 1009 Grad ConstOffset 1010 1011 452 + 1013: 7(fvec4) Load 986(texel) + 1014: 7(fvec4) FAdd 1013 1012 + Store 986(texel) 1014 + 1015: 266 Load 268(s2DRectShadow) + 1016: 148(fvec3) Load 150(c3) + 1017: 52(fvec2) Load 874(dPdxy2) + 1018: 52(fvec2) Load 874(dPdxy2) + 1019: 6(float) CompositeExtract 1016 2 + 1020: 6(float) ImageSampleDrefExplicitLod 1015 1016 1019 Grad ConstOffset 1017 1018 452 + 1021: 174(ptr) AccessChain 986(texel) 173 + 1022: 6(float) Load 1021 + 1023: 6(float) FAdd 1022 1020 + 1024: 174(ptr) AccessChain 986(texel) 173 + Store 1024 1023 + 1025: 165 Load 167(s1DShadow) + 1026: 148(fvec3) Load 150(c3) + 1027: 6(float) Load 866(dPdxy1) + 1028: 6(float) Load 866(dPdxy1) + 1029: 6(float) CompositeExtract 1026 2 + 1030: 6(float) ImageSampleDrefExplicitLod 1025 1026 1029 Grad ConstOffset 1027 1028 445 + 1031: 174(ptr) AccessChain 986(texel) 173 + 1032: 6(float) Load 1031 + 1033: 6(float) FAdd 1032 1030 + 1034: 174(ptr) AccessChain 986(texel) 173 + Store 1034 1033 + 1035: 180 Load 182(s2DShadow) + 1036: 148(fvec3) Load 150(c3) + 1037: 52(fvec2) Load 874(dPdxy2) + 1038: 52(fvec2) Load 874(dPdxy2) + 1039: 6(float) CompositeExtract 1036 2 + 1040: 6(float) ImageSampleDrefExplicitLod 1035 1036 1039 Grad ConstOffset 1037 1038 452 + 1041: 174(ptr) AccessChain 986(texel) 173 + 1042: 6(float) Load 1041 + 1043: 6(float) FAdd 1042 1040 + 1044: 174(ptr) AccessChain 986(texel) 173 + Store 1044 1043 + 1045: 206 Load 208(s1DArray) + 1046: 52(fvec2) Load 138(c2) + 1047: 6(float) Load 866(dPdxy1) + 1048: 6(float) Load 866(dPdxy1) + 1049: 7(fvec4) ImageSampleExplicitLod 1045 1046 Grad ConstOffset 1047 1048 445 + 1050: 7(fvec4) Load 986(texel) + 1051: 7(fvec4) FAdd 1050 1049 + Store 986(texel) 1051 + 1052: 215 Load 217(s2DArray) + 1053: 148(fvec3) Load 150(c3) + 1054: 52(fvec2) Load 874(dPdxy2) + 1055: 52(fvec2) Load 874(dPdxy2) + 1056: 7(fvec4) ImageSampleExplicitLod 1052 1053 Grad ConstOffset 1054 1055 452 + 1057: 7(fvec4) Load 986(texel) + 1058: 7(fvec4) FAdd 1057 1056 + Store 986(texel) 1058 + 1059: 233 Load 235(s1DArrayShadow) + 1060: 148(fvec3) Load 150(c3) + 1061: 6(float) Load 866(dPdxy1) + 1062: 6(float) Load 866(dPdxy1) + 1063: 6(float) CompositeExtract 1060 2 + 1064: 6(float) ImageSampleDrefExplicitLod 1059 1060 1063 Grad ConstOffset 1061 1062 445 + 1065: 174(ptr) AccessChain 986(texel) 173 + 1066: 6(float) Load 1065 + 1067: 6(float) FAdd 1066 1064 + 1068: 174(ptr) AccessChain 986(texel) 173 + Store 1068 1067 + 1069: 245 Load 247(s2DArrayShadow) + 1070: 7(fvec4) Load 197(c4) + 1071: 52(fvec2) Load 874(dPdxy2) + 1072: 52(fvec2) Load 874(dPdxy2) + 1073: 6(float) CompositeExtract 1070 3 + 1074: 6(float) ImageSampleDrefExplicitLod 1069 1070 1073 Grad ConstOffset 1071 1072 452 + 1075: 174(ptr) AccessChain 986(texel) 173 + 1076: 6(float) Load 1075 + 1077: 6(float) FAdd 1076 1074 + 1078: 174(ptr) AccessChain 986(texel) 173 + Store 1078 1077 + 1079: 7(fvec4) Load 986(texel) + ReturnValue 1079 + FunctionEnd +31(testTextureProjGrad(): 7(fvec4) Function None 8 + 32: Label + 1082(texel): 63(ptr) Variable Function + Store 1082(texel) 120 + 1083: 122 Load 124(s1D) + 1084: 52(fvec2) Load 138(c2) + 1085: 6(float) Load 866(dPdxy1) + 1086: 6(float) Load 866(dPdxy1) + 1087: 7(fvec4) ImageSampleProjExplicitLod 1083 1084 Grad 1085 1086 + 1088: 7(fvec4) Load 1082(texel) + 1089: 7(fvec4) FAdd 1088 1087 + Store 1082(texel) 1089 + 1090: 122 Load 124(s1D) + 1091: 7(fvec4) Load 197(c4) + 1092: 6(float) Load 866(dPdxy1) + 1093: 6(float) Load 866(dPdxy1) + 1094: 6(float) CompositeExtract 1091 3 + 1095: 7(fvec4) CompositeInsert 1094 1091 1 + 1096: 7(fvec4) ImageSampleProjExplicitLod 1090 1095 Grad 1092 1093 + 1097: 7(fvec4) Load 1082(texel) + 1098: 7(fvec4) FAdd 1097 1096 + Store 1082(texel) 1098 + 1099: 133 Load 135(s2D) + 1100: 148(fvec3) Load 150(c3) + 1101: 52(fvec2) Load 874(dPdxy2) + 1102: 52(fvec2) Load 874(dPdxy2) + 1103: 7(fvec4) ImageSampleProjExplicitLod 1099 1100 Grad 1101 1102 + 1104: 7(fvec4) Load 1082(texel) + 1105: 7(fvec4) FAdd 1104 1103 + Store 1082(texel) 1105 + 1106: 133 Load 135(s2D) + 1107: 7(fvec4) Load 197(c4) + 1108: 52(fvec2) Load 874(dPdxy2) + 1109: 52(fvec2) Load 874(dPdxy2) + 1110: 6(float) CompositeExtract 1107 3 + 1111: 7(fvec4) CompositeInsert 1110 1107 2 + 1112: 7(fvec4) ImageSampleProjExplicitLod 1106 1111 Grad 1108 1109 + 1113: 7(fvec4) Load 1082(texel) + 1114: 7(fvec4) FAdd 1113 1112 + Store 1082(texel) 1114 + 1115: 144 Load 146(s3D) + 1116: 7(fvec4) Load 197(c4) + 1117: 148(fvec3) Load 882(dPdxy3) + 1118: 148(fvec3) Load 882(dPdxy3) + 1119: 7(fvec4) ImageSampleProjExplicitLod 1115 1116 Grad 1117 1118 + 1120: 7(fvec4) Load 1082(texel) + 1121: 7(fvec4) FAdd 1120 1119 + Store 1082(texel) 1121 + 1122: 257 Load 259(s2DRect) + 1123: 148(fvec3) Load 150(c3) + 1124: 52(fvec2) Load 874(dPdxy2) + 1125: 52(fvec2) Load 874(dPdxy2) + 1126: 7(fvec4) ImageSampleProjExplicitLod 1122 1123 Grad 1124 1125 + 1127: 7(fvec4) Load 1082(texel) + 1128: 7(fvec4) FAdd 1127 1126 + Store 1082(texel) 1128 + 1129: 257 Load 259(s2DRect) + 1130: 7(fvec4) Load 197(c4) + 1131: 52(fvec2) Load 874(dPdxy2) + 1132: 52(fvec2) Load 874(dPdxy2) + 1133: 6(float) CompositeExtract 1130 3 + 1134: 7(fvec4) CompositeInsert 1133 1130 2 + 1135: 7(fvec4) ImageSampleProjExplicitLod 1129 1134 Grad 1131 1132 + 1136: 7(fvec4) Load 1082(texel) + 1137: 7(fvec4) FAdd 1136 1135 + Store 1082(texel) 1137 + 1138: 266 Load 268(s2DRectShadow) + 1139: 7(fvec4) Load 197(c4) + 1140: 52(fvec2) Load 874(dPdxy2) + 1141: 52(fvec2) Load 874(dPdxy2) + 1142: 6(float) CompositeExtract 1139 2 + 1143: 6(float) CompositeExtract 1139 3 + 1144: 7(fvec4) CompositeInsert 1143 1139 2 + 1145: 6(float) ImageSampleProjDrefExplicitLod 1138 1144 1142 Grad 1140 1141 + 1146: 174(ptr) AccessChain 1082(texel) 173 + 1147: 6(float) Load 1146 + 1148: 6(float) FAdd 1147 1145 + 1149: 174(ptr) AccessChain 1082(texel) 173 + Store 1149 1148 + 1150: 165 Load 167(s1DShadow) + 1151: 7(fvec4) Load 197(c4) + 1152: 6(float) Load 866(dPdxy1) + 1153: 6(float) Load 866(dPdxy1) + 1154: 6(float) CompositeExtract 1151 2 + 1155: 6(float) CompositeExtract 1151 3 + 1156: 7(fvec4) CompositeInsert 1155 1151 1 + 1157: 6(float) ImageSampleProjDrefExplicitLod 1150 1156 1154 Grad 1152 1153 + 1158: 174(ptr) AccessChain 1082(texel) 173 + 1159: 6(float) Load 1158 + 1160: 6(float) FAdd 1159 1157 + 1161: 174(ptr) AccessChain 1082(texel) 173 + Store 1161 1160 + 1162: 180 Load 182(s2DShadow) + 1163: 7(fvec4) Load 197(c4) + 1164: 52(fvec2) Load 874(dPdxy2) + 1165: 52(fvec2) Load 874(dPdxy2) + 1166: 6(float) CompositeExtract 1163 2 + 1167: 6(float) CompositeExtract 1163 3 + 1168: 7(fvec4) CompositeInsert 1167 1163 2 + 1169: 6(float) ImageSampleProjDrefExplicitLod 1162 1168 1166 Grad 1164 1165 + 1170: 174(ptr) AccessChain 1082(texel) 173 + 1171: 6(float) Load 1170 + 1172: 6(float) FAdd 1171 1169 + 1173: 174(ptr) AccessChain 1082(texel) 173 + Store 1173 1172 + 1174: 7(fvec4) Load 1082(texel) + ReturnValue 1174 + FunctionEnd +33(testTextureProjGradoffset(): 7(fvec4) Function None 8 + 34: Label + 1177(texel): 63(ptr) Variable Function + Store 1177(texel) 120 + 1178: 122 Load 124(s1D) + 1179: 52(fvec2) Load 138(c2) + 1180: 6(float) Load 866(dPdxy1) + 1181: 6(float) Load 866(dPdxy1) + 1182: 7(fvec4) ImageSampleProjExplicitLod 1178 1179 Grad ConstOffset 1180 1181 445 + 1183: 7(fvec4) Load 1177(texel) + 1184: 7(fvec4) FAdd 1183 1182 + Store 1177(texel) 1184 + 1185: 122 Load 124(s1D) + 1186: 7(fvec4) Load 197(c4) + 1187: 6(float) Load 866(dPdxy1) + 1188: 6(float) Load 866(dPdxy1) + 1189: 6(float) CompositeExtract 1186 3 + 1190: 7(fvec4) CompositeInsert 1189 1186 1 + 1191: 7(fvec4) ImageSampleProjExplicitLod 1185 1190 Grad ConstOffset 1187 1188 445 + 1192: 7(fvec4) Load 1177(texel) + 1193: 7(fvec4) FAdd 1192 1191 + Store 1177(texel) 1193 + 1194: 133 Load 135(s2D) + 1195: 148(fvec3) Load 150(c3) + 1196: 52(fvec2) Load 874(dPdxy2) + 1197: 52(fvec2) Load 874(dPdxy2) + 1198: 7(fvec4) ImageSampleProjExplicitLod 1194 1195 Grad ConstOffset 1196 1197 452 + 1199: 7(fvec4) Load 1177(texel) + 1200: 7(fvec4) FAdd 1199 1198 + Store 1177(texel) 1200 + 1201: 133 Load 135(s2D) + 1202: 7(fvec4) Load 197(c4) + 1203: 52(fvec2) Load 874(dPdxy2) + 1204: 52(fvec2) Load 874(dPdxy2) + 1205: 6(float) CompositeExtract 1202 3 + 1206: 7(fvec4) CompositeInsert 1205 1202 2 + 1207: 7(fvec4) ImageSampleProjExplicitLod 1201 1206 Grad ConstOffset 1203 1204 452 + 1208: 7(fvec4) Load 1177(texel) + 1209: 7(fvec4) FAdd 1208 1207 + Store 1177(texel) 1209 + 1210: 257 Load 259(s2DRect) + 1211: 148(fvec3) Load 150(c3) + 1212: 52(fvec2) Load 874(dPdxy2) + 1213: 52(fvec2) Load 874(dPdxy2) + 1214: 7(fvec4) ImageSampleProjExplicitLod 1210 1211 Grad ConstOffset 1212 1213 452 + 1215: 7(fvec4) Load 1177(texel) + 1216: 7(fvec4) FAdd 1215 1214 + Store 1177(texel) 1216 + 1217: 257 Load 259(s2DRect) + 1218: 7(fvec4) Load 197(c4) + 1219: 52(fvec2) Load 874(dPdxy2) + 1220: 52(fvec2) Load 874(dPdxy2) + 1221: 6(float) CompositeExtract 1218 3 + 1222: 7(fvec4) CompositeInsert 1221 1218 2 + 1223: 7(fvec4) ImageSampleProjExplicitLod 1217 1222 Grad ConstOffset 1219 1220 452 + 1224: 7(fvec4) Load 1177(texel) + 1225: 7(fvec4) FAdd 1224 1223 + Store 1177(texel) 1225 + 1226: 266 Load 268(s2DRectShadow) + 1227: 7(fvec4) Load 197(c4) + 1228: 52(fvec2) Load 874(dPdxy2) + 1229: 52(fvec2) Load 874(dPdxy2) + 1230: 6(float) CompositeExtract 1227 2 + 1231: 6(float) CompositeExtract 1227 3 + 1232: 7(fvec4) CompositeInsert 1231 1227 2 + 1233: 6(float) ImageSampleProjDrefExplicitLod 1226 1232 1230 Grad ConstOffset 1228 1229 452 + 1234: 174(ptr) AccessChain 1177(texel) 173 + 1235: 6(float) Load 1234 + 1236: 6(float) FAdd 1235 1233 + 1237: 174(ptr) AccessChain 1177(texel) 173 + Store 1237 1236 + 1238: 144 Load 146(s3D) + 1239: 7(fvec4) Load 197(c4) + 1240: 148(fvec3) Load 882(dPdxy3) + 1241: 148(fvec3) Load 882(dPdxy3) + 1242: 7(fvec4) ImageSampleProjExplicitLod 1238 1239 Grad ConstOffset 1240 1241 459 + 1243: 7(fvec4) Load 1177(texel) + 1244: 7(fvec4) FAdd 1243 1242 + Store 1177(texel) 1244 + 1245: 165 Load 167(s1DShadow) + 1246: 7(fvec4) Load 197(c4) + 1247: 6(float) Load 866(dPdxy1) + 1248: 6(float) Load 866(dPdxy1) + 1249: 6(float) CompositeExtract 1246 2 + 1250: 6(float) CompositeExtract 1246 3 + 1251: 7(fvec4) CompositeInsert 1250 1246 1 + 1252: 6(float) ImageSampleProjDrefExplicitLod 1245 1251 1249 Grad ConstOffset 1247 1248 445 + 1253: 174(ptr) AccessChain 1177(texel) 173 + 1254: 6(float) Load 1253 + 1255: 6(float) FAdd 1254 1252 + 1256: 174(ptr) AccessChain 1177(texel) 173 + Store 1256 1255 + 1257: 180 Load 182(s2DShadow) + 1258: 7(fvec4) Load 197(c4) + 1259: 52(fvec2) Load 874(dPdxy2) + 1260: 52(fvec2) Load 874(dPdxy2) + 1261: 6(float) CompositeExtract 1258 2 + 1262: 6(float) CompositeExtract 1258 3 + 1263: 7(fvec4) CompositeInsert 1262 1258 2 + 1264: 6(float) ImageSampleProjDrefExplicitLod 1257 1263 1261 Grad ConstOffset 1259 1260 452 + 1265: 174(ptr) AccessChain 1177(texel) 173 + 1266: 6(float) Load 1265 + 1267: 6(float) FAdd 1266 1264 + 1268: 174(ptr) AccessChain 1177(texel) 173 + Store 1268 1267 + 1269: 7(fvec4) Load 1177(texel) + ReturnValue 1269 + FunctionEnd +35(testTextureGather(): 7(fvec4) Function None 8 + 36: Label + 1272(texel): 63(ptr) Variable Function + Store 1272(texel) 120 + 1273: 133 Load 135(s2D) + 1274: 52(fvec2) Load 138(c2) + 1276: 7(fvec4) ImageGather 1273 1274 1275 + 1277: 7(fvec4) Load 1272(texel) + 1278: 7(fvec4) FAdd 1277 1276 + Store 1272(texel) 1278 + 1279: 215 Load 217(s2DArray) + 1280: 148(fvec3) Load 150(c3) + 1281: 7(fvec4) ImageGather 1279 1280 1275 + 1282: 7(fvec4) Load 1272(texel) + 1283: 7(fvec4) FAdd 1282 1281 + Store 1272(texel) 1283 + 1284: 156 Load 158(sCube) + 1285: 148(fvec3) Load 150(c3) + 1286: 7(fvec4) ImageGather 1284 1285 1275 + 1287: 7(fvec4) Load 1272(texel) + 1288: 7(fvec4) FAdd 1287 1286 + Store 1272(texel) 1288 + 1289: 224 Load 226(sCubeArray) + 1290: 7(fvec4) Load 197(c4) + 1291: 7(fvec4) ImageGather 1289 1290 1275 + 1292: 7(fvec4) Load 1272(texel) + 1293: 7(fvec4) FAdd 1292 1291 + Store 1272(texel) 1293 + 1294: 257 Load 259(s2DRect) + 1295: 52(fvec2) Load 138(c2) + 1296: 7(fvec4) ImageGather 1294 1295 1275 + 1297: 7(fvec4) Load 1272(texel) + 1298: 7(fvec4) FAdd 1297 1296 + Store 1272(texel) 1298 + 1299: 180 Load 182(s2DShadow) + 1300: 52(fvec2) Load 138(c2) + 1301: 6(float) Load 283(compare) + 1302: 7(fvec4) ImageDrefGather 1299 1300 1301 + 1303: 7(fvec4) Load 1272(texel) + 1304: 7(fvec4) FAdd 1303 1302 + Store 1272(texel) 1304 + 1305: 245 Load 247(s2DArrayShadow) + 1306: 148(fvec3) Load 150(c3) + 1307: 6(float) Load 283(compare) + 1308: 7(fvec4) ImageDrefGather 1305 1306 1307 + 1309: 7(fvec4) Load 1272(texel) + 1310: 7(fvec4) FAdd 1309 1308 + Store 1272(texel) 1310 + 1311: 192 Load 194(sCubeShadow) + 1312: 148(fvec3) Load 150(c3) + 1313: 6(float) Load 283(compare) + 1314: 7(fvec4) ImageDrefGather 1311 1312 1313 + 1315: 7(fvec4) Load 1272(texel) + 1316: 7(fvec4) FAdd 1315 1314 + Store 1272(texel) 1316 + 1317: 278 Load 280(sCubeArrayShadow) + 1318: 7(fvec4) Load 197(c4) + 1319: 6(float) Load 283(compare) + 1320: 7(fvec4) ImageDrefGather 1317 1318 1319 + 1321: 7(fvec4) Load 1272(texel) + 1322: 7(fvec4) FAdd 1321 1320 + Store 1272(texel) 1322 + 1323: 266 Load 268(s2DRectShadow) + 1324: 52(fvec2) Load 138(c2) + 1325: 6(float) Load 283(compare) + 1326: 7(fvec4) ImageDrefGather 1323 1324 1325 + 1327: 7(fvec4) Load 1272(texel) + 1328: 7(fvec4) FAdd 1327 1326 + Store 1272(texel) 1328 + 1329: 7(fvec4) Load 1272(texel) + ReturnValue 1329 + FunctionEnd +37(testTextureGatherOffset(): 7(fvec4) Function None 8 + 38: Label + 1332(texel): 63(ptr) Variable Function + Store 1332(texel) 120 + 1333: 133 Load 135(s2D) + 1334: 52(fvec2) Load 138(c2) + 1335: 7(fvec4) ImageGather 1333 1334 1275 ConstOffset 452 + 1336: 7(fvec4) Load 1332(texel) + 1337: 7(fvec4) FAdd 1336 1335 + Store 1332(texel) 1337 + 1338: 215 Load 217(s2DArray) + 1339: 148(fvec3) Load 150(c3) + 1340: 7(fvec4) ImageGather 1338 1339 1275 ConstOffset 452 + 1341: 7(fvec4) Load 1332(texel) + 1342: 7(fvec4) FAdd 1341 1340 + Store 1332(texel) 1342 + 1343: 257 Load 259(s2DRect) + 1344: 52(fvec2) Load 138(c2) + 1345: 7(fvec4) ImageGather 1343 1344 1275 ConstOffset 452 + 1346: 7(fvec4) Load 1332(texel) + 1347: 7(fvec4) FAdd 1346 1345 + Store 1332(texel) 1347 + 1348: 180 Load 182(s2DShadow) + 1349: 52(fvec2) Load 138(c2) + 1350: 6(float) Load 283(compare) + 1351: 7(fvec4) ImageDrefGather 1348 1349 1350 ConstOffset 452 + 1352: 7(fvec4) Load 1332(texel) + 1353: 7(fvec4) FAdd 1352 1351 + Store 1332(texel) 1353 + 1354: 245 Load 247(s2DArrayShadow) + 1355: 148(fvec3) Load 150(c3) + 1356: 6(float) Load 283(compare) + 1357: 7(fvec4) ImageDrefGather 1354 1355 1356 ConstOffset 452 + 1358: 7(fvec4) Load 1332(texel) + 1359: 7(fvec4) FAdd 1358 1357 + Store 1332(texel) 1359 + 1360: 266 Load 268(s2DRectShadow) + 1361: 52(fvec2) Load 138(c2) + 1362: 6(float) Load 283(compare) + 1363: 7(fvec4) ImageDrefGather 1360 1361 1362 ConstOffset 452 + 1364: 7(fvec4) Load 1332(texel) + 1365: 7(fvec4) FAdd 1364 1363 + Store 1332(texel) 1365 + 1366: 7(fvec4) Load 1332(texel) + ReturnValue 1366 + FunctionEnd +39(testTextureGatherOffsets(): 7(fvec4) Function None 8 + 40: Label + 1369(texel): 63(ptr) Variable Function + Store 1369(texel) 120 + 1370: 133 Load 135(s2D) + 1371: 52(fvec2) Load 138(c2) + 1375: 7(fvec4) ImageGather 1370 1371 1275 ConstOffsets 1374 + 1376: 7(fvec4) Load 1369(texel) + 1377: 7(fvec4) FAdd 1376 1375 + Store 1369(texel) 1377 + 1378: 215 Load 217(s2DArray) + 1379: 148(fvec3) Load 150(c3) + 1380: 7(fvec4) ImageGather 1378 1379 1275 ConstOffsets 1374 + 1381: 7(fvec4) Load 1369(texel) + 1382: 7(fvec4) FAdd 1381 1380 + Store 1369(texel) 1382 + 1383: 257 Load 259(s2DRect) + 1384: 52(fvec2) Load 138(c2) + 1385: 7(fvec4) ImageGather 1383 1384 1275 ConstOffsets 1374 + 1386: 7(fvec4) Load 1369(texel) + 1387: 7(fvec4) FAdd 1386 1385 + Store 1369(texel) 1387 + 1388: 180 Load 182(s2DShadow) + 1389: 52(fvec2) Load 138(c2) + 1390: 6(float) Load 283(compare) + 1391: 7(fvec4) ImageDrefGather 1388 1389 1390 ConstOffsets 1374 + 1392: 7(fvec4) Load 1369(texel) + 1393: 7(fvec4) FAdd 1392 1391 + Store 1369(texel) 1393 + 1394: 245 Load 247(s2DArrayShadow) + 1395: 148(fvec3) Load 150(c3) + 1396: 6(float) Load 283(compare) + 1397: 7(fvec4) ImageDrefGather 1394 1395 1396 ConstOffsets 1374 + 1398: 7(fvec4) Load 1369(texel) + 1399: 7(fvec4) FAdd 1398 1397 + Store 1369(texel) 1399 + 1400: 266 Load 268(s2DRectShadow) + 1401: 52(fvec2) Load 138(c2) + 1402: 6(float) Load 283(compare) + 1403: 7(fvec4) ImageDrefGather 1400 1401 1402 ConstOffsets 1374 + 1404: 7(fvec4) Load 1369(texel) + 1405: 7(fvec4) FAdd 1404 1403 + Store 1369(texel) 1405 + 1406: 7(fvec4) Load 1369(texel) + ReturnValue 1406 + FunctionEnd +41(testTextureGatherLod(): 7(fvec4) Function None 8 + 42: Label + 1409(texel): 63(ptr) Variable Function + Store 1409(texel) 120 + 1410: 133 Load 135(s2D) + 1411: 52(fvec2) Load 138(c2) + 1412: 6(float) Load 371(lod) + 1413: 7(fvec4) ImageGather 1410 1411 1275 Lod 1412 + 1414: 7(fvec4) Load 1409(texel) + 1415: 7(fvec4) FAdd 1414 1413 + Store 1409(texel) 1415 + 1416: 215 Load 217(s2DArray) + 1417: 148(fvec3) Load 150(c3) + 1418: 6(float) Load 371(lod) + 1419: 7(fvec4) ImageGather 1416 1417 1275 Lod 1418 + 1420: 7(fvec4) Load 1409(texel) + 1421: 7(fvec4) FAdd 1420 1419 + Store 1409(texel) 1421 + 1422: 156 Load 158(sCube) + 1423: 148(fvec3) Load 150(c3) + 1424: 6(float) Load 371(lod) + 1425: 7(fvec4) ImageGather 1422 1423 1275 Lod 1424 + 1426: 7(fvec4) Load 1409(texel) + 1427: 7(fvec4) FAdd 1426 1425 + Store 1409(texel) 1427 + 1428: 224 Load 226(sCubeArray) + 1429: 7(fvec4) Load 197(c4) + 1430: 6(float) Load 371(lod) + 1431: 7(fvec4) ImageGather 1428 1429 1275 Lod 1430 + 1432: 7(fvec4) Load 1409(texel) + 1433: 7(fvec4) FAdd 1432 1431 + Store 1409(texel) 1433 + 1434: 7(fvec4) Load 1409(texel) + ReturnValue 1434 + FunctionEnd +43(testTextureGatherLodOffset(): 7(fvec4) Function None 8 + 44: Label + 1437(texel): 63(ptr) Variable Function + Store 1437(texel) 120 + 1438: 133 Load 135(s2D) + 1439: 52(fvec2) Load 138(c2) + 1440: 6(float) Load 371(lod) + 1441: 7(fvec4) ImageGather 1438 1439 1275 Lod ConstOffset 1440 452 + 1442: 7(fvec4) Load 1437(texel) + 1443: 7(fvec4) FAdd 1442 1441 + Store 1437(texel) 1443 + 1444: 215 Load 217(s2DArray) + 1445: 148(fvec3) Load 150(c3) + 1446: 6(float) Load 371(lod) + 1447: 7(fvec4) ImageGather 1444 1445 1275 Lod ConstOffset 1446 452 + 1448: 7(fvec4) Load 1437(texel) + 1449: 7(fvec4) FAdd 1448 1447 + Store 1437(texel) 1449 + 1450: 7(fvec4) Load 1437(texel) + ReturnValue 1450 + FunctionEnd +45(testTextureGatherLodOffsets(): 7(fvec4) Function None 8 + 46: Label + 1453(texel): 63(ptr) Variable Function + Store 1453(texel) 120 + 1454: 133 Load 135(s2D) + 1455: 52(fvec2) Load 138(c2) + 1456: 6(float) Load 371(lod) + 1457: 7(fvec4) ImageGather 1454 1455 1275 Lod ConstOffsets 1456 1374 + 1458: 7(fvec4) Load 1453(texel) + 1459: 7(fvec4) FAdd 1458 1457 + Store 1453(texel) 1459 + 1460: 215 Load 217(s2DArray) + 1461: 148(fvec3) Load 150(c3) + 1462: 6(float) Load 371(lod) + 1463: 7(fvec4) ImageGather 1460 1461 1275 Lod ConstOffsets 1462 1374 + 1464: 7(fvec4) Load 1453(texel) + 1465: 7(fvec4) FAdd 1464 1463 + Store 1453(texel) 1465 + 1466: 7(fvec4) Load 1453(texel) + ReturnValue 1466 + FunctionEnd +50(testTextureSize(): 48(ivec4) Function None 49 + 51: Label + 1470(size): 1469(ptr) Variable Function + Store 1470(size) 1471 + 1472: 122 Load 124(s1D) + 1473: 6(float) Load 371(lod) + 1474: 47(int) ConvertFToS 1473 + 1475: 121 Image 1472 + 1476: 47(int) ImageQuerySizeLod 1475 1474 + 1478: 1477(ptr) AccessChain 1470(size) 173 + 1479: 47(int) Load 1478 + 1480: 47(int) IAdd 1479 1476 + 1481: 1477(ptr) AccessChain 1470(size) 173 + Store 1481 1480 + 1482: 133 Load 135(s2D) + 1483: 6(float) Load 371(lod) + 1484: 47(int) ConvertFToS 1483 + 1485: 132 Image 1482 + 1486: 451(ivec2) ImageQuerySizeLod 1485 1484 + 1487: 48(ivec4) Load 1470(size) + 1488: 451(ivec2) VectorShuffle 1487 1487 0 1 + 1489: 451(ivec2) IAdd 1488 1486 + 1490: 1477(ptr) AccessChain 1470(size) 173 + 1491: 47(int) CompositeExtract 1489 0 + Store 1490 1491 + 1493: 1477(ptr) AccessChain 1470(size) 1492 + 1494: 47(int) CompositeExtract 1489 1 + Store 1493 1494 + 1495: 144 Load 146(s3D) + 1496: 6(float) Load 371(lod) + 1497: 47(int) ConvertFToS 1496 + 1498: 143 Image 1495 + 1499: 458(ivec3) ImageQuerySizeLod 1498 1497 + 1500: 48(ivec4) Load 1470(size) + 1501: 458(ivec3) VectorShuffle 1500 1500 0 1 2 + 1502: 458(ivec3) IAdd 1501 1499 + 1503: 1477(ptr) AccessChain 1470(size) 173 + 1504: 47(int) CompositeExtract 1502 0 + Store 1503 1504 + 1505: 1477(ptr) AccessChain 1470(size) 1492 + 1506: 47(int) CompositeExtract 1502 1 + Store 1505 1506 + 1508: 1477(ptr) AccessChain 1470(size) 1507 + 1509: 47(int) CompositeExtract 1502 2 + Store 1508 1509 + 1510: 156 Load 158(sCube) + 1511: 6(float) Load 371(lod) + 1512: 47(int) ConvertFToS 1511 + 1513: 155 Image 1510 + 1514: 451(ivec2) ImageQuerySizeLod 1513 1512 + 1515: 48(ivec4) Load 1470(size) + 1516: 451(ivec2) VectorShuffle 1515 1515 0 1 + 1517: 451(ivec2) IAdd 1516 1514 + 1518: 1477(ptr) AccessChain 1470(size) 173 + 1519: 47(int) CompositeExtract 1517 0 + Store 1518 1519 + 1520: 1477(ptr) AccessChain 1470(size) 1492 + 1521: 47(int) CompositeExtract 1517 1 + Store 1520 1521 + 1522: 165 Load 167(s1DShadow) + 1523: 6(float) Load 371(lod) + 1524: 47(int) ConvertFToS 1523 + 1525: 164 Image 1522 + 1526: 47(int) ImageQuerySizeLod 1525 1524 + 1527: 1477(ptr) AccessChain 1470(size) 173 + 1528: 47(int) Load 1527 + 1529: 47(int) IAdd 1528 1526 + 1530: 1477(ptr) AccessChain 1470(size) 173 + Store 1530 1529 + 1531: 180 Load 182(s2DShadow) + 1532: 6(float) Load 371(lod) + 1533: 47(int) ConvertFToS 1532 + 1534: 179 Image 1531 + 1535: 451(ivec2) ImageQuerySizeLod 1534 1533 + 1536: 48(ivec4) Load 1470(size) + 1537: 451(ivec2) VectorShuffle 1536 1536 0 1 + 1538: 451(ivec2) IAdd 1537 1535 + 1539: 1477(ptr) AccessChain 1470(size) 173 + 1540: 47(int) CompositeExtract 1538 0 + Store 1539 1540 + 1541: 1477(ptr) AccessChain 1470(size) 1492 + 1542: 47(int) CompositeExtract 1538 1 + Store 1541 1542 + 1543: 192 Load 194(sCubeShadow) + 1544: 6(float) Load 371(lod) + 1545: 47(int) ConvertFToS 1544 + 1546: 191 Image 1543 + 1547: 451(ivec2) ImageQuerySizeLod 1546 1545 + 1548: 48(ivec4) Load 1470(size) + 1549: 451(ivec2) VectorShuffle 1548 1548 0 1 + 1550: 451(ivec2) IAdd 1549 1547 + 1551: 1477(ptr) AccessChain 1470(size) 173 + 1552: 47(int) CompositeExtract 1550 0 + Store 1551 1552 + 1553: 1477(ptr) AccessChain 1470(size) 1492 + 1554: 47(int) CompositeExtract 1550 1 + Store 1553 1554 + 1555: 224 Load 226(sCubeArray) + 1556: 6(float) Load 371(lod) + 1557: 47(int) ConvertFToS 1556 + 1558: 223 Image 1555 + 1559: 458(ivec3) ImageQuerySizeLod 1558 1557 + 1560: 48(ivec4) Load 1470(size) + 1561: 458(ivec3) VectorShuffle 1560 1560 0 1 2 + 1562: 458(ivec3) IAdd 1561 1559 + 1563: 1477(ptr) AccessChain 1470(size) 173 + 1564: 47(int) CompositeExtract 1562 0 + Store 1563 1564 + 1565: 1477(ptr) AccessChain 1470(size) 1492 + 1566: 47(int) CompositeExtract 1562 1 + Store 1565 1566 + 1567: 1477(ptr) AccessChain 1470(size) 1507 + 1568: 47(int) CompositeExtract 1562 2 + Store 1567 1568 + 1569: 278 Load 280(sCubeArrayShadow) + 1570: 6(float) Load 371(lod) + 1571: 47(int) ConvertFToS 1570 + 1572: 277 Image 1569 + 1573: 458(ivec3) ImageQuerySizeLod 1572 1571 + 1574: 48(ivec4) Load 1470(size) + 1575: 458(ivec3) VectorShuffle 1574 1574 0 1 2 + 1576: 458(ivec3) IAdd 1575 1573 + 1577: 1477(ptr) AccessChain 1470(size) 173 + 1578: 47(int) CompositeExtract 1576 0 + Store 1577 1578 + 1579: 1477(ptr) AccessChain 1470(size) 1492 + 1580: 47(int) CompositeExtract 1576 1 + Store 1579 1580 + 1581: 1477(ptr) AccessChain 1470(size) 1507 + 1582: 47(int) CompositeExtract 1576 2 + Store 1581 1582 + 1583: 257 Load 259(s2DRect) + 1584: 256 Image 1583 + 1585: 451(ivec2) ImageQuerySize 1584 + 1586: 48(ivec4) Load 1470(size) + 1587: 451(ivec2) VectorShuffle 1586 1586 0 1 + 1588: 451(ivec2) IAdd 1587 1585 + 1589: 1477(ptr) AccessChain 1470(size) 173 + 1590: 47(int) CompositeExtract 1588 0 + Store 1589 1590 + 1591: 1477(ptr) AccessChain 1470(size) 1492 + 1592: 47(int) CompositeExtract 1588 1 + Store 1591 1592 + 1593: 266 Load 268(s2DRectShadow) + 1594: 265 Image 1593 + 1595: 451(ivec2) ImageQuerySize 1594 + 1596: 48(ivec4) Load 1470(size) + 1597: 451(ivec2) VectorShuffle 1596 1596 0 1 + 1598: 451(ivec2) IAdd 1597 1595 + 1599: 1477(ptr) AccessChain 1470(size) 173 + 1600: 47(int) CompositeExtract 1598 0 + Store 1599 1600 + 1601: 1477(ptr) AccessChain 1470(size) 1492 + 1602: 47(int) CompositeExtract 1598 1 + Store 1601 1602 + 1603: 206 Load 208(s1DArray) + 1604: 6(float) Load 371(lod) + 1605: 47(int) ConvertFToS 1604 + 1606: 205 Image 1603 + 1607: 451(ivec2) ImageQuerySizeLod 1606 1605 + 1608: 48(ivec4) Load 1470(size) + 1609: 451(ivec2) VectorShuffle 1608 1608 0 1 + 1610: 451(ivec2) IAdd 1609 1607 + 1611: 1477(ptr) AccessChain 1470(size) 173 + 1612: 47(int) CompositeExtract 1610 0 + Store 1611 1612 + 1613: 1477(ptr) AccessChain 1470(size) 1492 + 1614: 47(int) CompositeExtract 1610 1 + Store 1613 1614 + 1615: 215 Load 217(s2DArray) + 1616: 6(float) Load 371(lod) + 1617: 47(int) ConvertFToS 1616 + 1618: 214 Image 1615 + 1619: 458(ivec3) ImageQuerySizeLod 1618 1617 + 1620: 48(ivec4) Load 1470(size) + 1621: 458(ivec3) VectorShuffle 1620 1620 0 1 2 + 1622: 458(ivec3) IAdd 1621 1619 + 1623: 1477(ptr) AccessChain 1470(size) 173 + 1624: 47(int) CompositeExtract 1622 0 + Store 1623 1624 + 1625: 1477(ptr) AccessChain 1470(size) 1492 + 1626: 47(int) CompositeExtract 1622 1 + Store 1625 1626 + 1627: 1477(ptr) AccessChain 1470(size) 1507 + 1628: 47(int) CompositeExtract 1622 2 + Store 1627 1628 + 1629: 233 Load 235(s1DArrayShadow) + 1630: 6(float) Load 371(lod) + 1631: 47(int) ConvertFToS 1630 + 1632: 232 Image 1629 + 1633: 451(ivec2) ImageQuerySizeLod 1632 1631 + 1634: 48(ivec4) Load 1470(size) + 1635: 451(ivec2) VectorShuffle 1634 1634 0 1 + 1636: 451(ivec2) IAdd 1635 1633 + 1637: 1477(ptr) AccessChain 1470(size) 173 + 1638: 47(int) CompositeExtract 1636 0 + Store 1637 1638 + 1639: 1477(ptr) AccessChain 1470(size) 1492 + 1640: 47(int) CompositeExtract 1636 1 + Store 1639 1640 + 1641: 245 Load 247(s2DArrayShadow) + 1642: 6(float) Load 371(lod) + 1643: 47(int) ConvertFToS 1642 + 1644: 244 Image 1641 + 1645: 458(ivec3) ImageQuerySizeLod 1644 1643 + 1646: 48(ivec4) Load 1470(size) + 1647: 458(ivec3) VectorShuffle 1646 1646 0 1 2 + 1648: 458(ivec3) IAdd 1647 1645 + 1649: 1477(ptr) AccessChain 1470(size) 173 + 1650: 47(int) CompositeExtract 1648 0 + Store 1649 1650 + 1651: 1477(ptr) AccessChain 1470(size) 1492 + 1652: 47(int) CompositeExtract 1648 1 + Store 1651 1652 + 1653: 1477(ptr) AccessChain 1470(size) 1507 + 1654: 47(int) CompositeExtract 1648 2 + Store 1653 1654 + 1655: 771 Load 773(sBuffer) + 1656: 770 Image 1655 + 1657: 47(int) ImageQuerySize 1656 + 1658: 1477(ptr) AccessChain 1470(size) 173 + 1659: 47(int) Load 1658 + 1660: 47(int) IAdd 1659 1657 + 1661: 1477(ptr) AccessChain 1470(size) 173 + Store 1661 1660 + 1662: 782 Load 784(s2DMS) + 1663: 781 Image 1662 + 1664: 451(ivec2) ImageQuerySize 1663 + 1665: 48(ivec4) Load 1470(size) + 1666: 451(ivec2) VectorShuffle 1665 1665 0 1 + 1667: 451(ivec2) IAdd 1666 1664 + 1668: 1477(ptr) AccessChain 1470(size) 173 + 1669: 47(int) CompositeExtract 1667 0 + Store 1668 1669 + 1670: 1477(ptr) AccessChain 1470(size) 1492 + 1671: 47(int) CompositeExtract 1667 1 + Store 1670 1671 + 1672: 793 Load 795(s2DMSArray) + 1673: 792 Image 1672 + 1674: 458(ivec3) ImageQuerySize 1673 + 1675: 48(ivec4) Load 1470(size) + 1676: 458(ivec3) VectorShuffle 1675 1675 0 1 2 + 1677: 458(ivec3) IAdd 1676 1674 + 1678: 1477(ptr) AccessChain 1470(size) 173 + 1679: 47(int) CompositeExtract 1677 0 + Store 1678 1679 + 1680: 1477(ptr) AccessChain 1470(size) 1492 + 1681: 47(int) CompositeExtract 1677 1 + Store 1680 1681 + 1682: 1477(ptr) AccessChain 1470(size) 1507 + 1683: 47(int) CompositeExtract 1677 2 + Store 1682 1683 + 1684: 48(ivec4) Load 1470(size) + ReturnValue 1684 + FunctionEnd +54(testTextureQueryLod(): 52(fvec2) Function None 53 + 55: Label + 1688(lod): 1687(ptr) Variable Function + Store 1688(lod) 1689 + 1690: 122 Load 124(s1D) + 1691: 6(float) Load 127(c1) + 1692: 52(fvec2) ImageQueryLod 1690 1691 + 1693: 52(fvec2) Load 1688(lod) + 1694: 52(fvec2) FAdd 1693 1692 + Store 1688(lod) 1694 + 1695: 133 Load 135(s2D) + 1696: 52(fvec2) Load 138(c2) + 1697: 52(fvec2) ImageQueryLod 1695 1696 + 1698: 52(fvec2) Load 1688(lod) + 1699: 52(fvec2) FAdd 1698 1697 + Store 1688(lod) 1699 + 1700: 144 Load 146(s3D) + 1701: 148(fvec3) Load 150(c3) + 1702: 52(fvec2) ImageQueryLod 1700 1701 + 1703: 52(fvec2) Load 1688(lod) + 1704: 52(fvec2) FAdd 1703 1702 + Store 1688(lod) 1704 + 1705: 156 Load 158(sCube) + 1706: 148(fvec3) Load 150(c3) + 1707: 52(fvec2) ImageQueryLod 1705 1706 + 1708: 52(fvec2) Load 1688(lod) + 1709: 52(fvec2) FAdd 1708 1707 + Store 1688(lod) 1709 + 1710: 206 Load 208(s1DArray) + 1711: 6(float) Load 127(c1) + 1712: 52(fvec2) ImageQueryLod 1710 1711 + 1713: 52(fvec2) Load 1688(lod) + 1714: 52(fvec2) FAdd 1713 1712 + Store 1688(lod) 1714 + 1715: 215 Load 217(s2DArray) + 1716: 52(fvec2) Load 138(c2) + 1717: 52(fvec2) ImageQueryLod 1715 1716 + 1718: 52(fvec2) Load 1688(lod) + 1719: 52(fvec2) FAdd 1718 1717 + Store 1688(lod) 1719 + 1720: 224 Load 226(sCubeArray) + 1721: 148(fvec3) Load 150(c3) + 1722: 52(fvec2) ImageQueryLod 1720 1721 + 1723: 52(fvec2) Load 1688(lod) + 1724: 52(fvec2) FAdd 1723 1722 + Store 1688(lod) 1724 + 1725: 165 Load 167(s1DShadow) + 1726: 6(float) Load 127(c1) + 1727: 52(fvec2) ImageQueryLod 1725 1726 + 1728: 52(fvec2) Load 1688(lod) + 1729: 52(fvec2) FAdd 1728 1727 + Store 1688(lod) 1729 + 1730: 180 Load 182(s2DShadow) + 1731: 52(fvec2) Load 138(c2) + 1732: 52(fvec2) ImageQueryLod 1730 1731 + 1733: 52(fvec2) Load 1688(lod) + 1734: 52(fvec2) FAdd 1733 1732 + Store 1688(lod) 1734 + 1735: 278 Load 280(sCubeArrayShadow) + 1736: 148(fvec3) Load 150(c3) + 1737: 52(fvec2) ImageQueryLod 1735 1736 + 1738: 52(fvec2) Load 1688(lod) + 1739: 52(fvec2) FAdd 1738 1737 + Store 1688(lod) 1739 + 1740: 233 Load 235(s1DArrayShadow) + 1741: 6(float) Load 127(c1) + 1742: 52(fvec2) ImageQueryLod 1740 1741 + 1743: 52(fvec2) Load 1688(lod) + 1744: 52(fvec2) FAdd 1743 1742 + Store 1688(lod) 1744 + 1745: 245 Load 247(s2DArrayShadow) + 1746: 52(fvec2) Load 138(c2) + 1747: 52(fvec2) ImageQueryLod 1745 1746 + 1748: 52(fvec2) Load 1688(lod) + 1749: 52(fvec2) FAdd 1748 1747 + Store 1688(lod) 1749 + 1750: 278 Load 280(sCubeArrayShadow) + 1751: 148(fvec3) Load 150(c3) + 1752: 52(fvec2) ImageQueryLod 1750 1751 + 1753: 52(fvec2) Load 1688(lod) + 1754: 52(fvec2) FAdd 1753 1752 + Store 1688(lod) 1754 + 1755: 52(fvec2) Load 1688(lod) + ReturnValue 1755 + FunctionEnd +57(testTextureQueryLevels(): 47(int) Function None 56 + 58: Label + 1758(levels): 1477(ptr) Variable Function + Store 1758(levels) 1275 + 1759: 122 Load 124(s1D) + 1760: 121 Image 1759 + 1761: 47(int) ImageQueryLevels 1760 + 1762: 47(int) Load 1758(levels) + 1763: 47(int) IAdd 1762 1761 + Store 1758(levels) 1763 + 1764: 133 Load 135(s2D) + 1765: 132 Image 1764 + 1766: 47(int) ImageQueryLevels 1765 + 1767: 47(int) Load 1758(levels) + 1768: 47(int) IAdd 1767 1766 + Store 1758(levels) 1768 + 1769: 144 Load 146(s3D) + 1770: 143 Image 1769 + 1771: 47(int) ImageQueryLevels 1770 + 1772: 47(int) Load 1758(levels) + 1773: 47(int) IAdd 1772 1771 + Store 1758(levels) 1773 + 1774: 156 Load 158(sCube) + 1775: 155 Image 1774 + 1776: 47(int) ImageQueryLevels 1775 + 1777: 47(int) Load 1758(levels) + 1778: 47(int) IAdd 1777 1776 + Store 1758(levels) 1778 + 1779: 165 Load 167(s1DShadow) + 1780: 164 Image 1779 + 1781: 47(int) ImageQueryLevels 1780 + 1782: 47(int) Load 1758(levels) + 1783: 47(int) IAdd 1782 1781 + Store 1758(levels) 1783 + 1784: 180 Load 182(s2DShadow) + 1785: 179 Image 1784 + 1786: 47(int) ImageQueryLevels 1785 + 1787: 47(int) Load 1758(levels) + 1788: 47(int) IAdd 1787 1786 + Store 1758(levels) 1788 + 1789: 192 Load 194(sCubeShadow) + 1790: 191 Image 1789 + 1791: 47(int) ImageQueryLevels 1790 + 1792: 47(int) Load 1758(levels) + 1793: 47(int) IAdd 1792 1791 + Store 1758(levels) 1793 + 1794: 224 Load 226(sCubeArray) + 1795: 223 Image 1794 + 1796: 47(int) ImageQueryLevels 1795 + 1797: 47(int) Load 1758(levels) + 1798: 47(int) IAdd 1797 1796 + Store 1758(levels) 1798 + 1799: 278 Load 280(sCubeArrayShadow) + 1800: 277 Image 1799 + 1801: 47(int) ImageQueryLevels 1800 + 1802: 47(int) Load 1758(levels) + 1803: 47(int) IAdd 1802 1801 + Store 1758(levels) 1803 + 1804: 206 Load 208(s1DArray) + 1805: 205 Image 1804 + 1806: 47(int) ImageQueryLevels 1805 + 1807: 47(int) Load 1758(levels) + 1808: 47(int) IAdd 1807 1806 + Store 1758(levels) 1808 + 1809: 215 Load 217(s2DArray) + 1810: 214 Image 1809 + 1811: 47(int) ImageQueryLevels 1810 + 1812: 47(int) Load 1758(levels) + 1813: 47(int) IAdd 1812 1811 + Store 1758(levels) 1813 + 1814: 233 Load 235(s1DArrayShadow) + 1815: 232 Image 1814 + 1816: 47(int) ImageQueryLevels 1815 + 1817: 47(int) Load 1758(levels) + 1818: 47(int) IAdd 1817 1816 + Store 1758(levels) 1818 + 1819: 245 Load 247(s2DArrayShadow) + 1820: 244 Image 1819 + 1821: 47(int) ImageQueryLevels 1820 + 1822: 47(int) Load 1758(levels) + 1823: 47(int) IAdd 1822 1821 + Store 1758(levels) 1823 + 1824: 47(int) Load 1758(levels) + ReturnValue 1824 + FunctionEnd +59(testTextureSamples(): 47(int) Function None 56 + 60: Label + 1827(samples): 1477(ptr) Variable Function + Store 1827(samples) 1275 + 1828: 782 Load 784(s2DMS) + 1829: 781 Image 1828 + 1830: 47(int) ImageQuerySamples 1829 + 1831: 47(int) Load 1827(samples) + 1832: 47(int) IAdd 1831 1830 + Store 1827(samples) 1832 + 1833: 793 Load 795(s2DMSArray) + 1834: 792 Image 1833 + 1835: 47(int) ImageQuerySamples 1834 + 1836: 47(int) Load 1827(samples) + 1837: 47(int) IAdd 1836 1835 + Store 1827(samples) 1837 + 1838: 47(int) Load 1827(samples) + ReturnValue 1838 + FunctionEnd +61(testImageLoad(): 7(fvec4) Function None 8 + 62: Label + 1841(texel): 63(ptr) Variable Function + Store 1841(texel) 120 + 1845: 1842 Load 1844(i1D) + 1846: 6(float) Load 127(c1) + 1847: 47(int) ConvertFToS 1846 + 1848: 7(fvec4) ImageRead 1845 1847 + 1849: 7(fvec4) Load 1841(texel) + 1850: 7(fvec4) FAdd 1849 1848 + Store 1841(texel) 1850 + 1854: 1851 Load 1853(i2D) + 1855: 52(fvec2) Load 138(c2) + 1856: 451(ivec2) ConvertFToS 1855 + 1857: 7(fvec4) ImageRead 1854 1856 + 1858: 7(fvec4) Load 1841(texel) + 1859: 7(fvec4) FAdd 1858 1857 + Store 1841(texel) 1859 + 1863: 1860 Load 1862(i3D) + 1864: 148(fvec3) Load 150(c3) + 1865: 458(ivec3) ConvertFToS 1864 + 1866: 7(fvec4) ImageRead 1863 1865 + 1867: 7(fvec4) Load 1841(texel) + 1868: 7(fvec4) FAdd 1867 1866 + Store 1841(texel) 1868 + 1872: 1869 Load 1871(i2DRect) + 1873: 52(fvec2) Load 138(c2) + 1874: 451(ivec2) ConvertFToS 1873 + 1875: 7(fvec4) ImageRead 1872 1874 + 1876: 7(fvec4) Load 1841(texel) + 1877: 7(fvec4) FAdd 1876 1875 + Store 1841(texel) 1877 + 1881: 1878 Load 1880(iCube) + 1882: 148(fvec3) Load 150(c3) + 1883: 458(ivec3) ConvertFToS 1882 + 1884: 7(fvec4) ImageRead 1881 1883 + 1885: 7(fvec4) Load 1841(texel) + 1886: 7(fvec4) FAdd 1885 1884 + Store 1841(texel) 1886 + 1890: 1887 Load 1889(iBuffer) + 1891: 6(float) Load 127(c1) + 1892: 47(int) ConvertFToS 1891 + 1893: 7(fvec4) ImageRead 1890 1892 + 1894: 7(fvec4) Load 1841(texel) + 1895: 7(fvec4) FAdd 1894 1893 + Store 1841(texel) 1895 + 1899: 1896 Load 1898(i1DArray) + 1900: 52(fvec2) Load 138(c2) + 1901: 451(ivec2) ConvertFToS 1900 + 1902: 7(fvec4) ImageRead 1899 1901 + 1903: 7(fvec4) Load 1841(texel) + 1904: 7(fvec4) FAdd 1903 1902 + Store 1841(texel) 1904 + 1908: 1905 Load 1907(i2DArray) + 1909: 148(fvec3) Load 150(c3) + 1910: 458(ivec3) ConvertFToS 1909 + 1911: 7(fvec4) ImageRead 1908 1910 + 1912: 7(fvec4) Load 1841(texel) + 1913: 7(fvec4) FAdd 1912 1911 + Store 1841(texel) 1913 + 1917: 1914 Load 1916(iCubeArray) + 1918: 148(fvec3) Load 150(c3) + 1919: 458(ivec3) ConvertFToS 1918 + 1920: 7(fvec4) ImageRead 1917 1919 + 1921: 7(fvec4) Load 1841(texel) + 1922: 7(fvec4) FAdd 1921 1920 + Store 1841(texel) 1922 + 1926: 1923 Load 1925(i2DMS) + 1927: 52(fvec2) Load 138(c2) + 1928: 451(ivec2) ConvertFToS 1927 + 1929: 7(fvec4) ImageRead 1926 1928 Sample 445 + 1930: 7(fvec4) Load 1841(texel) + 1931: 7(fvec4) FAdd 1930 1929 + Store 1841(texel) 1931 + 1935: 1932 Load 1934(i2DMSArray) + 1936: 148(fvec3) Load 150(c3) + 1937: 458(ivec3) ConvertFToS 1936 + 1938: 7(fvec4) ImageRead 1935 1937 Sample 445 + 1939: 7(fvec4) Load 1841(texel) + 1940: 7(fvec4) FAdd 1939 1938 + Store 1841(texel) 1940 + 1941: 7(fvec4) Load 1841(texel) + ReturnValue 1941 + FunctionEnd +66(testImageStore(vf4;): 2 Function None 64 + 65(data): 63(ptr) FunctionParameter + 67: Label + 1944: 1842 Load 1844(i1D) + 1945: 6(float) Load 127(c1) + 1946: 47(int) ConvertFToS 1945 + 1947: 7(fvec4) Load 65(data) + ImageWrite 1944 1946 1947 + 1948: 1851 Load 1853(i2D) + 1949: 52(fvec2) Load 138(c2) + 1950: 451(ivec2) ConvertFToS 1949 + 1951: 7(fvec4) Load 65(data) + ImageWrite 1948 1950 1951 + 1952: 1860 Load 1862(i3D) + 1953: 148(fvec3) Load 150(c3) + 1954: 458(ivec3) ConvertFToS 1953 + 1955: 7(fvec4) Load 65(data) + ImageWrite 1952 1954 1955 + 1956: 1869 Load 1871(i2DRect) + 1957: 52(fvec2) Load 138(c2) + 1958: 451(ivec2) ConvertFToS 1957 + 1959: 7(fvec4) Load 65(data) + ImageWrite 1956 1958 1959 + 1960: 1878 Load 1880(iCube) + 1961: 148(fvec3) Load 150(c3) + 1962: 458(ivec3) ConvertFToS 1961 + 1963: 7(fvec4) Load 65(data) + ImageWrite 1960 1962 1963 + 1964: 1887 Load 1889(iBuffer) + 1965: 6(float) Load 127(c1) + 1966: 47(int) ConvertFToS 1965 + 1967: 7(fvec4) Load 65(data) + ImageWrite 1964 1966 1967 + 1968: 1896 Load 1898(i1DArray) + 1969: 52(fvec2) Load 138(c2) + 1970: 451(ivec2) ConvertFToS 1969 + 1971: 7(fvec4) Load 65(data) + ImageWrite 1968 1970 1971 + 1972: 1905 Load 1907(i2DArray) + 1973: 148(fvec3) Load 150(c3) + 1974: 458(ivec3) ConvertFToS 1973 + 1975: 7(fvec4) Load 65(data) + ImageWrite 1972 1974 1975 + 1976: 1914 Load 1916(iCubeArray) + 1977: 148(fvec3) Load 150(c3) + 1978: 458(ivec3) ConvertFToS 1977 + 1979: 7(fvec4) Load 65(data) + ImageWrite 1976 1978 1979 + 1980: 1923 Load 1925(i2DMS) + 1981: 52(fvec2) Load 138(c2) + 1982: 451(ivec2) ConvertFToS 1981 + 1983: 7(fvec4) Load 65(data) + ImageWrite 1980 1982 1983 Sample 445 + 1984: 1932 Load 1934(i2DMSArray) + 1985: 148(fvec3) Load 150(c3) + 1986: 458(ivec3) ConvertFToS 1985 + 1987: 7(fvec4) Load 65(data) + ImageWrite 1984 1986 1987 Sample 445 + Return + FunctionEnd +68(testSparseTexture(): 7(fvec4) Function None 8 + 69: Label + 1988(texel): 63(ptr) Variable Function + Store 1988(texel) 120 + 1989: 133 Load 135(s2D) + 1990: 52(fvec2) Load 138(c2) + 1992:1991(ResType) ImageSparseSampleImplicitLod 1989 1990 + 1993: 7(fvec4) CompositeExtract 1992 1 + Store 1988(texel) 1993 + 1994: 47(int) CompositeExtract 1992 0 + 1995: 144 Load 146(s3D) + 1996: 148(fvec3) Load 150(c3) + 1997:1991(ResType) ImageSparseSampleImplicitLod 1995 1996 + 1998: 7(fvec4) CompositeExtract 1997 1 + Store 1988(texel) 1998 + 1999: 47(int) CompositeExtract 1997 0 + 2000: 156 Load 158(sCube) + 2001: 148(fvec3) Load 150(c3) + 2002:1991(ResType) ImageSparseSampleImplicitLod 2000 2001 + 2003: 7(fvec4) CompositeExtract 2002 1 + Store 1988(texel) 2003 + 2004: 47(int) CompositeExtract 2002 0 + 2005: 180 Load 182(s2DShadow) + 2006: 148(fvec3) Load 150(c3) + 2007: 174(ptr) AccessChain 1988(texel) 173 + 2008: 6(float) CompositeExtract 2006 2 + 2010:2009(ResType) ImageSparseSampleDrefImplicitLod 2005 2006 2008 + 2011: 6(float) CompositeExtract 2010 1 + Store 2007 2011 + 2012: 47(int) CompositeExtract 2010 0 + 2013: 192 Load 194(sCubeShadow) + 2014: 7(fvec4) Load 197(c4) + 2015: 174(ptr) AccessChain 1988(texel) 173 + 2016: 6(float) CompositeExtract 2014 3 + 2017:2009(ResType) ImageSparseSampleDrefImplicitLod 2013 2014 2016 + 2018: 6(float) CompositeExtract 2017 1 + Store 2015 2018 + 2019: 47(int) CompositeExtract 2017 0 + 2020: 215 Load 217(s2DArray) + 2021: 148(fvec3) Load 150(c3) + 2022:1991(ResType) ImageSparseSampleImplicitLod 2020 2021 + 2023: 7(fvec4) CompositeExtract 2022 1 + Store 1988(texel) 2023 + 2024: 47(int) CompositeExtract 2022 0 + 2025: 224 Load 226(sCubeArray) + 2026: 7(fvec4) Load 197(c4) + 2027:1991(ResType) ImageSparseSampleImplicitLod 2025 2026 + 2028: 7(fvec4) CompositeExtract 2027 1 + Store 1988(texel) 2028 + 2029: 47(int) CompositeExtract 2027 0 + 2030: 245 Load 247(s2DArrayShadow) + 2031: 7(fvec4) Load 197(c4) + 2032: 174(ptr) AccessChain 1988(texel) 173 + 2033: 6(float) CompositeExtract 2031 3 + 2034:2009(ResType) ImageSparseSampleDrefImplicitLod 2030 2031 2033 + 2035: 6(float) CompositeExtract 2034 1 + Store 2032 2035 + 2036: 47(int) CompositeExtract 2034 0 + 2037: 257 Load 259(s2DRect) + 2038: 52(fvec2) Load 138(c2) + 2039:1991(ResType) ImageSparseSampleImplicitLod 2037 2038 + 2040: 7(fvec4) CompositeExtract 2039 1 + Store 1988(texel) 2040 + 2041: 47(int) CompositeExtract 2039 0 + 2042: 266 Load 268(s2DRectShadow) + 2043: 148(fvec3) Load 150(c3) + 2044: 174(ptr) AccessChain 1988(texel) 173 + 2045: 6(float) CompositeExtract 2043 2 + 2046:2009(ResType) ImageSparseSampleDrefImplicitLod 2042 2043 2045 + 2047: 6(float) CompositeExtract 2046 1 + Store 2044 2047 + 2048: 47(int) CompositeExtract 2046 0 + 2049: 278 Load 280(sCubeArrayShadow) + 2050: 7(fvec4) Load 197(c4) + 2051: 6(float) Load 283(compare) + 2052: 174(ptr) AccessChain 1988(texel) 173 + 2053:2009(ResType) ImageSparseSampleDrefImplicitLod 2049 2050 2051 + 2054: 6(float) CompositeExtract 2053 1 + Store 2052 2054 + 2055: 47(int) CompositeExtract 2053 0 + 2056: 7(fvec4) Load 1988(texel) + ReturnValue 2056 + FunctionEnd +70(testSparseTextureLod(): 7(fvec4) Function None 8 + 71: Label + 2059(texel): 63(ptr) Variable Function + Store 2059(texel) 120 + 2060: 133 Load 135(s2D) + 2061: 52(fvec2) Load 138(c2) + 2062: 6(float) Load 371(lod) + 2063:1991(ResType) ImageSparseSampleExplicitLod 2060 2061 Lod 2062 + 2064: 7(fvec4) CompositeExtract 2063 1 + Store 2059(texel) 2064 + 2065: 47(int) CompositeExtract 2063 0 + 2066: 144 Load 146(s3D) + 2067: 148(fvec3) Load 150(c3) + 2068: 6(float) Load 371(lod) + 2069:1991(ResType) ImageSparseSampleExplicitLod 2066 2067 Lod 2068 + 2070: 7(fvec4) CompositeExtract 2069 1 + Store 2059(texel) 2070 + 2071: 47(int) CompositeExtract 2069 0 + 2072: 156 Load 158(sCube) + 2073: 148(fvec3) Load 150(c3) + 2074: 6(float) Load 371(lod) + 2075:1991(ResType) ImageSparseSampleExplicitLod 2072 2073 Lod 2074 + 2076: 7(fvec4) CompositeExtract 2075 1 + Store 2059(texel) 2076 + 2077: 47(int) CompositeExtract 2075 0 + 2078: 180 Load 182(s2DShadow) + 2079: 148(fvec3) Load 150(c3) + 2080: 6(float) Load 371(lod) + 2081: 174(ptr) AccessChain 2059(texel) 173 + 2082: 6(float) CompositeExtract 2079 2 + 2083:2009(ResType) ImageSparseSampleDrefExplicitLod 2078 2079 2082 Lod 2080 + 2084: 6(float) CompositeExtract 2083 1 + Store 2081 2084 + 2085: 47(int) CompositeExtract 2083 0 + 2086: 215 Load 217(s2DArray) + 2087: 148(fvec3) Load 150(c3) + 2088: 6(float) Load 371(lod) + 2089:1991(ResType) ImageSparseSampleExplicitLod 2086 2087 Lod 2088 + 2090: 7(fvec4) CompositeExtract 2089 1 + Store 2059(texel) 2090 + 2091: 47(int) CompositeExtract 2089 0 + 2092: 224 Load 226(sCubeArray) + 2093: 7(fvec4) Load 197(c4) + 2094: 6(float) Load 371(lod) + 2095:1991(ResType) ImageSparseSampleExplicitLod 2092 2093 Lod 2094 + 2096: 7(fvec4) CompositeExtract 2095 1 + Store 2059(texel) 2096 + 2097: 47(int) CompositeExtract 2095 0 + 2098: 7(fvec4) Load 2059(texel) + ReturnValue 2098 + FunctionEnd +72(testSparseTextureOffset(): 7(fvec4) Function None 8 + 73: Label + 2101(texel): 63(ptr) Variable Function + Store 2101(texel) 120 + 2102: 133 Load 135(s2D) + 2103: 52(fvec2) Load 138(c2) + 2104:1991(ResType) ImageSparseSampleImplicitLod 2102 2103 ConstOffset 452 + 2105: 7(fvec4) CompositeExtract 2104 1 + Store 2101(texel) 2105 + 2106: 47(int) CompositeExtract 2104 0 + 2107: 144 Load 146(s3D) + 2108: 148(fvec3) Load 150(c3) + 2109:1991(ResType) ImageSparseSampleImplicitLod 2107 2108 ConstOffset 459 + 2110: 7(fvec4) CompositeExtract 2109 1 + Store 2101(texel) 2110 + 2111: 47(int) CompositeExtract 2109 0 + 2112: 257 Load 259(s2DRect) + 2113: 52(fvec2) Load 138(c2) + 2114:1991(ResType) ImageSparseSampleImplicitLod 2112 2113 ConstOffset 452 + 2115: 7(fvec4) CompositeExtract 2114 1 + Store 2101(texel) 2115 + 2116: 47(int) CompositeExtract 2114 0 + 2117: 266 Load 268(s2DRectShadow) + 2118: 148(fvec3) Load 150(c3) + 2119: 174(ptr) AccessChain 2101(texel) 173 + 2120: 6(float) CompositeExtract 2118 2 + 2121:2009(ResType) ImageSparseSampleDrefImplicitLod 2117 2118 2120 ConstOffset 452 + 2122: 6(float) CompositeExtract 2121 1 + Store 2119 2122 + 2123: 47(int) CompositeExtract 2121 0 + 2124: 180 Load 182(s2DShadow) + 2125: 148(fvec3) Load 150(c3) + 2126: 174(ptr) AccessChain 2101(texel) 173 + 2127: 6(float) CompositeExtract 2125 2 + 2128:2009(ResType) ImageSparseSampleDrefImplicitLod 2124 2125 2127 ConstOffset 452 + 2129: 6(float) CompositeExtract 2128 1 + Store 2126 2129 + 2130: 47(int) CompositeExtract 2128 0 + 2131: 215 Load 217(s2DArray) + 2132: 148(fvec3) Load 150(c3) + 2133:1991(ResType) ImageSparseSampleImplicitLod 2131 2132 ConstOffset 452 + 2134: 7(fvec4) CompositeExtract 2133 1 + Store 2101(texel) 2134 + 2135: 47(int) CompositeExtract 2133 0 + 2136: 245 Load 247(s2DArrayShadow) + 2137: 7(fvec4) Load 197(c4) + 2138: 174(ptr) AccessChain 2101(texel) 173 + 2139: 6(float) CompositeExtract 2137 3 + 2140:2009(ResType) ImageSparseSampleDrefImplicitLod 2136 2137 2139 ConstOffset 452 + 2141: 6(float) CompositeExtract 2140 1 + Store 2138 2141 + 2142: 47(int) CompositeExtract 2140 0 + 2143: 7(fvec4) Load 2101(texel) + ReturnValue 2143 + FunctionEnd +74(testSparseTextureLodOffset(): 7(fvec4) Function None 8 + 75: Label + 2146(texel): 63(ptr) Variable Function + Store 2146(texel) 120 + 2147: 133 Load 135(s2D) + 2148: 52(fvec2) Load 138(c2) + 2149: 6(float) Load 371(lod) + 2150:1991(ResType) ImageSparseSampleExplicitLod 2147 2148 Lod ConstOffset 2149 452 + 2151: 7(fvec4) CompositeExtract 2150 1 + Store 2146(texel) 2151 + 2152: 47(int) CompositeExtract 2150 0 + 2153: 144 Load 146(s3D) + 2154: 148(fvec3) Load 150(c3) + 2155: 6(float) Load 371(lod) + 2156:1991(ResType) ImageSparseSampleExplicitLod 2153 2154 Lod ConstOffset 2155 459 + 2157: 7(fvec4) CompositeExtract 2156 1 + Store 2146(texel) 2157 + 2158: 47(int) CompositeExtract 2156 0 + 2159: 180 Load 182(s2DShadow) + 2160: 148(fvec3) Load 150(c3) + 2161: 6(float) Load 371(lod) + 2162: 174(ptr) AccessChain 2146(texel) 173 + 2163: 6(float) CompositeExtract 2160 2 + 2164:2009(ResType) ImageSparseSampleDrefExplicitLod 2159 2160 2163 Lod ConstOffset 2161 452 + 2165: 6(float) CompositeExtract 2164 1 + Store 2162 2165 + 2166: 47(int) CompositeExtract 2164 0 + 2167: 215 Load 217(s2DArray) + 2168: 148(fvec3) Load 150(c3) + 2169: 6(float) Load 371(lod) + 2170:1991(ResType) ImageSparseSampleExplicitLod 2167 2168 Lod ConstOffset 2169 452 + 2171: 7(fvec4) CompositeExtract 2170 1 + Store 2146(texel) 2171 + 2172: 47(int) CompositeExtract 2170 0 + 2173: 7(fvec4) Load 2146(texel) + ReturnValue 2173 + FunctionEnd +76(testSparseTextureGrad(): 7(fvec4) Function None 8 + 77: Label + 2176(texel): 63(ptr) Variable Function + Store 2176(texel) 120 + 2177: 133 Load 135(s2D) + 2178: 52(fvec2) Load 138(c2) + 2179: 52(fvec2) Load 874(dPdxy2) + 2180: 52(fvec2) Load 874(dPdxy2) + 2181:1991(ResType) ImageSparseSampleExplicitLod 2177 2178 Grad 2179 2180 + 2182: 7(fvec4) CompositeExtract 2181 1 + Store 2176(texel) 2182 + 2183: 47(int) CompositeExtract 2181 0 + 2184: 144 Load 146(s3D) + 2185: 148(fvec3) Load 150(c3) + 2186: 148(fvec3) Load 882(dPdxy3) + 2187: 148(fvec3) Load 882(dPdxy3) + 2188:1991(ResType) ImageSparseSampleExplicitLod 2184 2185 Grad 2186 2187 + 2189: 7(fvec4) CompositeExtract 2188 1 + Store 2176(texel) 2189 + 2190: 47(int) CompositeExtract 2188 0 + 2191: 156 Load 158(sCube) + 2192: 148(fvec3) Load 150(c3) + 2193: 148(fvec3) Load 882(dPdxy3) + 2194: 148(fvec3) Load 882(dPdxy3) + 2195:1991(ResType) ImageSparseSampleExplicitLod 2191 2192 Grad 2193 2194 + 2196: 7(fvec4) CompositeExtract 2195 1 + Store 2176(texel) 2196 + 2197: 47(int) CompositeExtract 2195 0 + 2198: 257 Load 259(s2DRect) + 2199: 52(fvec2) Load 138(c2) + 2200: 52(fvec2) Load 874(dPdxy2) + 2201: 52(fvec2) Load 874(dPdxy2) + 2202:1991(ResType) ImageSparseSampleExplicitLod 2198 2199 Grad 2200 2201 + 2203: 7(fvec4) CompositeExtract 2202 1 + Store 2176(texel) 2203 + 2204: 47(int) CompositeExtract 2202 0 + 2205: 266 Load 268(s2DRectShadow) + 2206: 148(fvec3) Load 150(c3) + 2207: 52(fvec2) Load 874(dPdxy2) + 2208: 52(fvec2) Load 874(dPdxy2) + 2209: 174(ptr) AccessChain 2176(texel) 173 + 2210: 6(float) CompositeExtract 2206 2 + 2211:2009(ResType) ImageSparseSampleDrefExplicitLod 2205 2206 2210 Grad 2207 2208 + 2212: 6(float) CompositeExtract 2211 1 + Store 2209 2212 + 2213: 47(int) CompositeExtract 2211 0 + 2214: 180 Load 182(s2DShadow) + 2215: 148(fvec3) Load 150(c3) + 2216: 52(fvec2) Load 874(dPdxy2) + 2217: 52(fvec2) Load 874(dPdxy2) + 2218: 174(ptr) AccessChain 2176(texel) 173 + 2219: 6(float) CompositeExtract 2215 2 + 2220:2009(ResType) ImageSparseSampleDrefExplicitLod 2214 2215 2219 Grad 2216 2217 + 2221: 6(float) CompositeExtract 2220 1 + Store 2218 2221 + 2222: 47(int) CompositeExtract 2220 0 + 2223: 192 Load 194(sCubeShadow) + 2224: 7(fvec4) Load 197(c4) + 2225: 148(fvec3) Load 882(dPdxy3) + 2226: 148(fvec3) Load 882(dPdxy3) + 2227: 174(ptr) AccessChain 2176(texel) 173 + 2228: 6(float) CompositeExtract 2224 3 + 2229:2009(ResType) ImageSparseSampleDrefExplicitLod 2223 2224 2228 Grad 2225 2226 + 2230: 6(float) CompositeExtract 2229 1 + Store 2227 2230 + 2231: 47(int) CompositeExtract 2229 0 + 2232: 215 Load 217(s2DArray) + 2233: 148(fvec3) Load 150(c3) + 2234: 52(fvec2) Load 874(dPdxy2) + 2235: 52(fvec2) Load 874(dPdxy2) + 2236:1991(ResType) ImageSparseSampleExplicitLod 2232 2233 Grad 2234 2235 + 2237: 7(fvec4) CompositeExtract 2236 1 + Store 2176(texel) 2237 + 2238: 47(int) CompositeExtract 2236 0 + 2239: 245 Load 247(s2DArrayShadow) + 2240: 7(fvec4) Load 197(c4) + 2241: 52(fvec2) Load 874(dPdxy2) + 2242: 52(fvec2) Load 874(dPdxy2) + 2243: 174(ptr) AccessChain 2176(texel) 173 + 2244: 6(float) CompositeExtract 2240 3 + 2245:2009(ResType) ImageSparseSampleDrefExplicitLod 2239 2240 2244 Grad 2241 2242 + 2246: 6(float) CompositeExtract 2245 1 + Store 2243 2246 + 2247: 47(int) CompositeExtract 2245 0 + 2248: 224 Load 226(sCubeArray) + 2249: 7(fvec4) Load 197(c4) + 2250: 148(fvec3) Load 882(dPdxy3) + 2251: 148(fvec3) Load 882(dPdxy3) + 2252:1991(ResType) ImageSparseSampleExplicitLod 2248 2249 Grad 2250 2251 + 2253: 7(fvec4) CompositeExtract 2252 1 + Store 2176(texel) 2253 + 2254: 47(int) CompositeExtract 2252 0 + 2255: 7(fvec4) Load 2176(texel) + ReturnValue 2255 + FunctionEnd +78(testSparseTextureGradOffset(): 7(fvec4) Function None 8 + 79: Label + 2258(texel): 63(ptr) Variable Function + Store 2258(texel) 120 + 2259: 133 Load 135(s2D) + 2260: 52(fvec2) Load 138(c2) + 2261: 52(fvec2) Load 874(dPdxy2) + 2262: 52(fvec2) Load 874(dPdxy2) + 2263:1991(ResType) ImageSparseSampleExplicitLod 2259 2260 Grad ConstOffset 2261 2262 452 + 2264: 7(fvec4) CompositeExtract 2263 1 + Store 2258(texel) 2264 + 2265: 47(int) CompositeExtract 2263 0 + 2266: 144 Load 146(s3D) + 2267: 148(fvec3) Load 150(c3) + 2268: 148(fvec3) Load 882(dPdxy3) + 2269: 148(fvec3) Load 882(dPdxy3) + 2270:1991(ResType) ImageSparseSampleExplicitLod 2266 2267 Grad ConstOffset 2268 2269 459 + 2271: 7(fvec4) CompositeExtract 2270 1 + Store 2258(texel) 2271 + 2272: 47(int) CompositeExtract 2270 0 + 2273: 257 Load 259(s2DRect) + 2274: 52(fvec2) Load 138(c2) + 2275: 52(fvec2) Load 874(dPdxy2) + 2276: 52(fvec2) Load 874(dPdxy2) + 2277:1991(ResType) ImageSparseSampleExplicitLod 2273 2274 Grad ConstOffset 2275 2276 452 + 2278: 7(fvec4) CompositeExtract 2277 1 + Store 2258(texel) 2278 + 2279: 47(int) CompositeExtract 2277 0 + 2280: 266 Load 268(s2DRectShadow) + 2281: 148(fvec3) Load 150(c3) + 2282: 52(fvec2) Load 874(dPdxy2) + 2283: 52(fvec2) Load 874(dPdxy2) + 2284: 174(ptr) AccessChain 2258(texel) 173 + 2285: 6(float) CompositeExtract 2281 2 + 2286:2009(ResType) ImageSparseSampleDrefExplicitLod 2280 2281 2285 Grad ConstOffset 2282 2283 452 + 2287: 6(float) CompositeExtract 2286 1 + Store 2284 2287 + 2288: 47(int) CompositeExtract 2286 0 + 2289: 180 Load 182(s2DShadow) + 2290: 148(fvec3) Load 150(c3) + 2291: 52(fvec2) Load 874(dPdxy2) + 2292: 52(fvec2) Load 874(dPdxy2) + 2293: 174(ptr) AccessChain 2258(texel) 173 + 2294: 6(float) CompositeExtract 2290 2 + 2295:2009(ResType) ImageSparseSampleDrefExplicitLod 2289 2290 2294 Grad ConstOffset 2291 2292 452 + 2296: 6(float) CompositeExtract 2295 1 + Store 2293 2296 + 2297: 47(int) CompositeExtract 2295 0 + 2298: 215 Load 217(s2DArray) + 2299: 148(fvec3) Load 150(c3) + 2300: 52(fvec2) Load 874(dPdxy2) + 2301: 52(fvec2) Load 874(dPdxy2) + 2302:1991(ResType) ImageSparseSampleExplicitLod 2298 2299 Grad ConstOffset 2300 2301 452 + 2303: 7(fvec4) CompositeExtract 2302 1 + Store 2258(texel) 2303 + 2304: 47(int) CompositeExtract 2302 0 + 2305: 245 Load 247(s2DArrayShadow) + 2306: 7(fvec4) Load 197(c4) + 2307: 52(fvec2) Load 874(dPdxy2) + 2308: 52(fvec2) Load 874(dPdxy2) + 2309: 174(ptr) AccessChain 2258(texel) 173 + 2310: 6(float) CompositeExtract 2306 3 + 2311:2009(ResType) ImageSparseSampleDrefExplicitLod 2305 2306 2310 Grad ConstOffset 2307 2308 452 + 2312: 6(float) CompositeExtract 2311 1 + Store 2309 2312 + 2313: 47(int) CompositeExtract 2311 0 + 2314: 7(fvec4) Load 2258(texel) + ReturnValue 2314 + FunctionEnd +80(testSparseTexelFetch(): 7(fvec4) Function None 8 + 81: Label + 2317(texel): 63(ptr) Variable Function + Store 2317(texel) 120 + 2318: 133 Load 135(s2D) + 2319: 52(fvec2) Load 138(c2) + 2320: 451(ivec2) ConvertFToS 2319 + 2321: 6(float) Load 371(lod) + 2322: 47(int) ConvertFToS 2321 + 2323: 132 Image 2318 + 2324:1991(ResType) ImageSparseFetch 2323 2320 Lod 2322 + 2325: 7(fvec4) CompositeExtract 2324 1 + Store 2317(texel) 2325 + 2326: 47(int) CompositeExtract 2324 0 + 2327: 144 Load 146(s3D) + 2328: 148(fvec3) Load 150(c3) + 2329: 458(ivec3) ConvertFToS 2328 + 2330: 6(float) Load 371(lod) + 2331: 47(int) ConvertFToS 2330 + 2332: 143 Image 2327 + 2333:1991(ResType) ImageSparseFetch 2332 2329 Lod 2331 + 2334: 7(fvec4) CompositeExtract 2333 1 + Store 2317(texel) 2334 + 2335: 47(int) CompositeExtract 2333 0 + 2336: 257 Load 259(s2DRect) + 2337: 52(fvec2) Load 138(c2) + 2338: 451(ivec2) ConvertFToS 2337 + 2339: 256 Image 2336 + 2340:1991(ResType) ImageSparseFetch 2339 2338 + 2341: 7(fvec4) CompositeExtract 2340 1 + Store 2317(texel) 2341 + 2342: 47(int) CompositeExtract 2340 0 + 2343: 215 Load 217(s2DArray) + 2344: 148(fvec3) Load 150(c3) + 2345: 458(ivec3) ConvertFToS 2344 + 2346: 6(float) Load 371(lod) + 2347: 47(int) ConvertFToS 2346 + 2348: 214 Image 2343 + 2349:1991(ResType) ImageSparseFetch 2348 2345 Lod 2347 + 2350: 7(fvec4) CompositeExtract 2349 1 + Store 2317(texel) 2350 + 2351: 47(int) CompositeExtract 2349 0 + 2352: 782 Load 784(s2DMS) + 2353: 52(fvec2) Load 138(c2) + 2354: 451(ivec2) ConvertFToS 2353 + 2355: 781 Image 2352 + 2356:1991(ResType) ImageSparseFetch 2355 2354 Sample 445 + 2357: 7(fvec4) CompositeExtract 2356 1 + Store 2317(texel) 2357 + 2358: 47(int) CompositeExtract 2356 0 + 2359: 793 Load 795(s2DMSArray) + 2360: 148(fvec3) Load 150(c3) + 2361: 458(ivec3) ConvertFToS 2360 + 2362: 792 Image 2359 + 2363:1991(ResType) ImageSparseFetch 2362 2361 Sample 799 + 2364: 7(fvec4) CompositeExtract 2363 1 + Store 2317(texel) 2364 + 2365: 47(int) CompositeExtract 2363 0 + 2366: 7(fvec4) Load 2317(texel) + ReturnValue 2366 + FunctionEnd +82(testSparseTexelFetchOffset(): 7(fvec4) Function None 8 + 83: Label + 2369(texel): 63(ptr) Variable Function + Store 2369(texel) 120 + 2370: 133 Load 135(s2D) + 2371: 52(fvec2) Load 138(c2) + 2372: 451(ivec2) ConvertFToS 2371 + 2373: 6(float) Load 371(lod) + 2374: 47(int) ConvertFToS 2373 + 2375: 132 Image 2370 + 2376:1991(ResType) ImageSparseFetch 2375 2372 Lod ConstOffset 2374 452 + 2377: 7(fvec4) CompositeExtract 2376 1 + Store 2369(texel) 2377 + 2378: 47(int) CompositeExtract 2376 0 + 2379: 144 Load 146(s3D) + 2380: 148(fvec3) Load 150(c3) + 2381: 458(ivec3) ConvertFToS 2380 + 2382: 6(float) Load 371(lod) + 2383: 47(int) ConvertFToS 2382 + 2384: 143 Image 2379 + 2385:1991(ResType) ImageSparseFetch 2384 2381 Lod ConstOffset 2383 459 + 2386: 7(fvec4) CompositeExtract 2385 1 + Store 2369(texel) 2386 + 2387: 47(int) CompositeExtract 2385 0 + 2388: 257 Load 259(s2DRect) + 2389: 52(fvec2) Load 138(c2) + 2390: 451(ivec2) ConvertFToS 2389 + 2391: 256 Image 2388 + 2392:1991(ResType) ImageSparseFetch 2391 2390 ConstOffset 452 + 2393: 7(fvec4) CompositeExtract 2392 1 + Store 2369(texel) 2393 + 2394: 47(int) CompositeExtract 2392 0 + 2395: 215 Load 217(s2DArray) + 2396: 148(fvec3) Load 150(c3) + 2397: 458(ivec3) ConvertFToS 2396 + 2398: 6(float) Load 371(lod) + 2399: 47(int) ConvertFToS 2398 + 2400: 214 Image 2395 + 2401:1991(ResType) ImageSparseFetch 2400 2397 Lod ConstOffset 2399 452 + 2402: 7(fvec4) CompositeExtract 2401 1 + Store 2369(texel) 2402 + 2403: 47(int) CompositeExtract 2401 0 + 2404: 7(fvec4) Load 2369(texel) + ReturnValue 2404 + FunctionEnd +84(testSparseTextureGather(): 7(fvec4) Function None 8 + 85: Label + 2407(texel): 63(ptr) Variable Function + Store 2407(texel) 120 + 2408: 133 Load 135(s2D) + 2409: 52(fvec2) Load 138(c2) + 2410:1991(ResType) ImageSparseGather 2408 2409 1275 + 2411: 7(fvec4) CompositeExtract 2410 1 + Store 2407(texel) 2411 + 2412: 47(int) CompositeExtract 2410 0 + 2413: 215 Load 217(s2DArray) + 2414: 148(fvec3) Load 150(c3) + 2415:1991(ResType) ImageSparseGather 2413 2414 1275 + 2416: 7(fvec4) CompositeExtract 2415 1 + Store 2407(texel) 2416 + 2417: 47(int) CompositeExtract 2415 0 + 2418: 156 Load 158(sCube) + 2419: 148(fvec3) Load 150(c3) + 2420:1991(ResType) ImageSparseGather 2418 2419 1275 + 2421: 7(fvec4) CompositeExtract 2420 1 + Store 2407(texel) 2421 + 2422: 47(int) CompositeExtract 2420 0 + 2423: 224 Load 226(sCubeArray) + 2424: 7(fvec4) Load 197(c4) + 2425:1991(ResType) ImageSparseGather 2423 2424 1275 + 2426: 7(fvec4) CompositeExtract 2425 1 + Store 2407(texel) 2426 + 2427: 47(int) CompositeExtract 2425 0 + 2428: 257 Load 259(s2DRect) + 2429: 52(fvec2) Load 138(c2) + 2430:1991(ResType) ImageSparseGather 2428 2429 1275 + 2431: 7(fvec4) CompositeExtract 2430 1 + Store 2407(texel) 2431 + 2432: 47(int) CompositeExtract 2430 0 + 2433: 180 Load 182(s2DShadow) + 2434: 52(fvec2) Load 138(c2) + 2435: 6(float) Load 283(compare) + 2436:1991(ResType) ImageSparseDrefGather 2433 2434 2435 + 2437: 7(fvec4) CompositeExtract 2436 1 + Store 2407(texel) 2437 + 2438: 47(int) CompositeExtract 2436 0 + 2439: 245 Load 247(s2DArrayShadow) + 2440: 148(fvec3) Load 150(c3) + 2441: 6(float) Load 283(compare) + 2442:1991(ResType) ImageSparseDrefGather 2439 2440 2441 + 2443: 7(fvec4) CompositeExtract 2442 1 + Store 2407(texel) 2443 + 2444: 47(int) CompositeExtract 2442 0 + 2445: 192 Load 194(sCubeShadow) + 2446: 148(fvec3) Load 150(c3) + 2447: 6(float) Load 283(compare) + 2448:1991(ResType) ImageSparseDrefGather 2445 2446 2447 + 2449: 7(fvec4) CompositeExtract 2448 1 + Store 2407(texel) 2449 + 2450: 47(int) CompositeExtract 2448 0 + 2451: 278 Load 280(sCubeArrayShadow) + 2452: 7(fvec4) Load 197(c4) + 2453: 6(float) Load 283(compare) + 2454:1991(ResType) ImageSparseDrefGather 2451 2452 2453 + 2455: 7(fvec4) CompositeExtract 2454 1 + Store 2407(texel) 2455 + 2456: 47(int) CompositeExtract 2454 0 + 2457: 266 Load 268(s2DRectShadow) + 2458: 52(fvec2) Load 138(c2) + 2459: 6(float) Load 283(compare) + 2460:1991(ResType) ImageSparseDrefGather 2457 2458 2459 + 2461: 7(fvec4) CompositeExtract 2460 1 + Store 2407(texel) 2461 + 2462: 47(int) CompositeExtract 2460 0 + 2463: 7(fvec4) Load 2407(texel) + ReturnValue 2463 + FunctionEnd +86(testSparseTextureGatherOffset(): 7(fvec4) Function None 8 + 87: Label + 2466(texel): 63(ptr) Variable Function + Store 2466(texel) 120 + 2467: 133 Load 135(s2D) + 2468: 52(fvec2) Load 138(c2) + 2469:1991(ResType) ImageSparseGather 2467 2468 1275 ConstOffset 452 + 2470: 7(fvec4) CompositeExtract 2469 1 + Store 2466(texel) 2470 + 2471: 47(int) CompositeExtract 2469 0 + 2472: 215 Load 217(s2DArray) + 2473: 148(fvec3) Load 150(c3) + 2474:1991(ResType) ImageSparseGather 2472 2473 1275 ConstOffset 452 + 2475: 7(fvec4) CompositeExtract 2474 1 + Store 2466(texel) 2475 + 2476: 47(int) CompositeExtract 2474 0 + 2477: 257 Load 259(s2DRect) + 2478: 52(fvec2) Load 138(c2) + 2479:1991(ResType) ImageSparseGather 2477 2478 1275 ConstOffset 452 + 2480: 7(fvec4) CompositeExtract 2479 1 + Store 2466(texel) 2480 + 2481: 47(int) CompositeExtract 2479 0 + 2482: 180 Load 182(s2DShadow) + 2483: 52(fvec2) Load 138(c2) + 2484: 6(float) Load 283(compare) + 2485:1991(ResType) ImageSparseDrefGather 2482 2483 2484 ConstOffset 452 + 2486: 7(fvec4) CompositeExtract 2485 1 + Store 2466(texel) 2486 + 2487: 47(int) CompositeExtract 2485 0 + 2488: 245 Load 247(s2DArrayShadow) + 2489: 148(fvec3) Load 150(c3) + 2490: 6(float) Load 283(compare) + 2491:1991(ResType) ImageSparseDrefGather 2488 2489 2490 ConstOffset 452 + 2492: 7(fvec4) CompositeExtract 2491 1 + Store 2466(texel) 2492 + 2493: 47(int) CompositeExtract 2491 0 + 2494: 266 Load 268(s2DRectShadow) + 2495: 52(fvec2) Load 138(c2) + 2496: 6(float) Load 283(compare) + 2497:1991(ResType) ImageSparseDrefGather 2494 2495 2496 ConstOffset 452 + 2498: 7(fvec4) CompositeExtract 2497 1 + Store 2466(texel) 2498 + 2499: 47(int) CompositeExtract 2497 0 + 2500: 7(fvec4) Load 2466(texel) + ReturnValue 2500 + FunctionEnd +88(testSparseTextureGatherOffsets(): 7(fvec4) Function None 8 + 89: Label + 2503(texel): 63(ptr) Variable Function + Store 2503(texel) 120 + 2504: 133 Load 135(s2D) + 2505: 52(fvec2) Load 138(c2) + 2516:1991(ResType) ImageSparseGather 2504 2505 1275 ConstOffsets 2515 + 2517: 7(fvec4) CompositeExtract 2516 1 + Store 2503(texel) 2517 + 2518: 47(int) CompositeExtract 2516 0 + 2519: 215 Load 217(s2DArray) + 2520: 148(fvec3) Load 150(c3) + 2521:1991(ResType) ImageSparseGather 2519 2520 1275 ConstOffsets 2515 + 2522: 7(fvec4) CompositeExtract 2521 1 + Store 2503(texel) 2522 + 2523: 47(int) CompositeExtract 2521 0 + 2524: 257 Load 259(s2DRect) + 2525: 52(fvec2) Load 138(c2) + 2526:1991(ResType) ImageSparseGather 2524 2525 1275 ConstOffsets 2515 + 2527: 7(fvec4) CompositeExtract 2526 1 + Store 2503(texel) 2527 + 2528: 47(int) CompositeExtract 2526 0 + 2529: 180 Load 182(s2DShadow) + 2530: 52(fvec2) Load 138(c2) + 2531: 6(float) Load 283(compare) + 2532:1991(ResType) ImageSparseDrefGather 2529 2530 2531 ConstOffsets 2515 + 2533: 7(fvec4) CompositeExtract 2532 1 + Store 2503(texel) 2533 + 2534: 47(int) CompositeExtract 2532 0 + 2535: 245 Load 247(s2DArrayShadow) + 2536: 148(fvec3) Load 150(c3) + 2537: 6(float) Load 283(compare) + 2538:1991(ResType) ImageSparseDrefGather 2535 2536 2537 ConstOffsets 2515 + 2539: 7(fvec4) CompositeExtract 2538 1 + Store 2503(texel) 2539 + 2540: 47(int) CompositeExtract 2538 0 + 2541: 266 Load 268(s2DRectShadow) + 2542: 52(fvec2) Load 138(c2) + 2543: 6(float) Load 283(compare) + 2544:1991(ResType) ImageSparseDrefGather 2541 2542 2543 ConstOffsets 2515 + 2545: 7(fvec4) CompositeExtract 2544 1 + Store 2503(texel) 2545 + 2546: 47(int) CompositeExtract 2544 0 + 2547: 7(fvec4) Load 2503(texel) + ReturnValue 2547 + FunctionEnd +90(testSparseTextureGatherLod(): 7(fvec4) Function None 8 + 91: Label + 2550(texel): 63(ptr) Variable Function + Store 2550(texel) 120 + 2551: 133 Load 135(s2D) + 2552: 52(fvec2) Load 138(c2) + 2553: 6(float) Load 371(lod) + 2554:1991(ResType) ImageSparseGather 2551 2552 1275 Lod 2553 + 2555: 7(fvec4) CompositeExtract 2554 1 + Store 2550(texel) 2555 + 2556: 47(int) CompositeExtract 2554 0 + 2557: 215 Load 217(s2DArray) + 2558: 148(fvec3) Load 150(c3) + 2559: 6(float) Load 371(lod) + 2560:1991(ResType) ImageSparseGather 2557 2558 1275 Lod 2559 + 2561: 7(fvec4) CompositeExtract 2560 1 + Store 2550(texel) 2561 + 2562: 47(int) CompositeExtract 2560 0 + 2563: 156 Load 158(sCube) + 2564: 148(fvec3) Load 150(c3) + 2565: 6(float) Load 371(lod) + 2566:1991(ResType) ImageSparseGather 2563 2564 1275 Lod 2565 + 2567: 7(fvec4) CompositeExtract 2566 1 + Store 2550(texel) 2567 + 2568: 47(int) CompositeExtract 2566 0 + 2569: 224 Load 226(sCubeArray) + 2570: 7(fvec4) Load 197(c4) + 2571: 6(float) Load 371(lod) + 2572:1991(ResType) ImageSparseGather 2569 2570 1275 Lod 2571 + 2573: 7(fvec4) CompositeExtract 2572 1 + Store 2550(texel) 2573 + 2574: 47(int) CompositeExtract 2572 0 + 2575: 7(fvec4) Load 2550(texel) + ReturnValue 2575 + FunctionEnd +92(testSparseTextureGatherLodOffset(): 7(fvec4) Function None 8 + 93: Label + 2578(texel): 63(ptr) Variable Function + Store 2578(texel) 120 + 2579: 133 Load 135(s2D) + 2580: 52(fvec2) Load 138(c2) + 2581: 6(float) Load 371(lod) + 2582:1991(ResType) ImageSparseGather 2579 2580 1275 Lod ConstOffset 2581 452 + 2583: 7(fvec4) CompositeExtract 2582 1 + Store 2578(texel) 2583 + 2584: 47(int) CompositeExtract 2582 0 + 2585: 215 Load 217(s2DArray) + 2586: 148(fvec3) Load 150(c3) + 2587: 6(float) Load 371(lod) + 2588:1991(ResType) ImageSparseGather 2585 2586 1275 Lod ConstOffset 2587 452 + 2589: 7(fvec4) CompositeExtract 2588 1 + Store 2578(texel) 2589 + 2590: 47(int) CompositeExtract 2588 0 + 2591: 7(fvec4) Load 2578(texel) + ReturnValue 2591 + FunctionEnd +94(testSparseTextureGatherLodOffsets(): 7(fvec4) Function None 8 + 95: Label + 2594(texel): 63(ptr) Variable Function + Store 2594(texel) 120 + 2595: 133 Load 135(s2D) + 2596: 52(fvec2) Load 138(c2) + 2597: 6(float) Load 371(lod) + 2598:1991(ResType) ImageSparseGather 2595 2596 1275 Lod ConstOffsets 2597 1374 + 2599: 7(fvec4) CompositeExtract 2598 1 + Store 2594(texel) 2599 + 2600: 47(int) CompositeExtract 2598 0 + 2601: 215 Load 217(s2DArray) + 2602: 148(fvec3) Load 150(c3) + 2603: 6(float) Load 371(lod) + 2604:1991(ResType) ImageSparseGather 2601 2602 1275 Lod ConstOffsets 2603 1374 + 2605: 7(fvec4) CompositeExtract 2604 1 + Store 2594(texel) 2605 + 2606: 47(int) CompositeExtract 2604 0 + 2607: 7(fvec4) Load 2594(texel) + ReturnValue 2607 + FunctionEnd +96(testSparseImageLoad(): 7(fvec4) Function None 8 + 97: Label + 2610(texel): 63(ptr) Variable Function + Store 2610(texel) 120 + 2611: 1851 Load 1853(i2D) + 2612: 52(fvec2) Load 138(c2) + 2613: 451(ivec2) ConvertFToS 2612 + 2614:1991(ResType) ImageSparseRead 2611 2613 + 2615: 7(fvec4) CompositeExtract 2614 1 + Store 2610(texel) 2615 + 2616: 47(int) CompositeExtract 2614 0 + 2617: 1860 Load 1862(i3D) + 2618: 148(fvec3) Load 150(c3) + 2619: 458(ivec3) ConvertFToS 2618 + 2620:1991(ResType) ImageSparseRead 2617 2619 + 2621: 7(fvec4) CompositeExtract 2620 1 + Store 2610(texel) 2621 + 2622: 47(int) CompositeExtract 2620 0 + 2623: 1869 Load 1871(i2DRect) + 2624: 52(fvec2) Load 138(c2) + 2625: 451(ivec2) ConvertFToS 2624 + 2626:1991(ResType) ImageSparseRead 2623 2625 + 2627: 7(fvec4) CompositeExtract 2626 1 + Store 2610(texel) 2627 + 2628: 47(int) CompositeExtract 2626 0 + 2629: 1878 Load 1880(iCube) + 2630: 148(fvec3) Load 150(c3) + 2631: 458(ivec3) ConvertFToS 2630 + 2632:1991(ResType) ImageSparseRead 2629 2631 + 2633: 7(fvec4) CompositeExtract 2632 1 + Store 2610(texel) 2633 + 2634: 47(int) CompositeExtract 2632 0 + 2635: 1905 Load 1907(i2DArray) + 2636: 148(fvec3) Load 150(c3) + 2637: 458(ivec3) ConvertFToS 2636 + 2638:1991(ResType) ImageSparseRead 2635 2637 + 2639: 7(fvec4) CompositeExtract 2638 1 + Store 2610(texel) 2639 + 2640: 47(int) CompositeExtract 2638 0 + 2641: 1914 Load 1916(iCubeArray) + 2642: 148(fvec3) Load 150(c3) + 2643: 458(ivec3) ConvertFToS 2642 + 2644:1991(ResType) ImageSparseRead 2641 2643 + 2645: 7(fvec4) CompositeExtract 2644 1 + Store 2610(texel) 2645 + 2646: 47(int) CompositeExtract 2644 0 + 2647: 1923 Load 1925(i2DMS) + 2648: 52(fvec2) Load 138(c2) + 2649: 451(ivec2) ConvertFToS 2648 + 2650:1991(ResType) ImageSparseRead 2647 2649 Sample 445 + 2651: 7(fvec4) CompositeExtract 2650 1 + Store 2610(texel) 2651 + 2652: 47(int) CompositeExtract 2650 0 + 2653: 1932 Load 1934(i2DMSArray) + 2654: 148(fvec3) Load 150(c3) + 2655: 458(ivec3) ConvertFToS 2654 + 2656:1991(ResType) ImageSparseRead 2653 2655 Sample 799 + 2657: 7(fvec4) CompositeExtract 2656 1 + Store 2610(texel) 2657 + 2658: 47(int) CompositeExtract 2656 0 + 2659: 7(fvec4) Load 2610(texel) + ReturnValue 2659 + FunctionEnd +98(testSparseTextureClamp(): 7(fvec4) Function None 8 + 99: Label + 2662(texel): 63(ptr) Variable Function + Store 2662(texel) 120 + 2663: 133 Load 135(s2D) + 2664: 52(fvec2) Load 138(c2) + 2666: 6(float) Load 2665(lodClamp) + 2667:1991(ResType) ImageSparseSampleImplicitLod 2663 2664 MinLod 2666 + 2668: 7(fvec4) CompositeExtract 2667 1 + Store 2662(texel) 2668 + 2669: 47(int) CompositeExtract 2667 0 + 2670: 144 Load 146(s3D) + 2671: 148(fvec3) Load 150(c3) + 2672: 6(float) Load 2665(lodClamp) + 2673:1991(ResType) ImageSparseSampleImplicitLod 2670 2671 MinLod 2672 + 2674: 7(fvec4) CompositeExtract 2673 1 + Store 2662(texel) 2674 + 2675: 47(int) CompositeExtract 2673 0 + 2676: 156 Load 158(sCube) + 2677: 148(fvec3) Load 150(c3) + 2678: 6(float) Load 2665(lodClamp) + 2679:1991(ResType) ImageSparseSampleImplicitLod 2676 2677 MinLod 2678 + 2680: 7(fvec4) CompositeExtract 2679 1 + Store 2662(texel) 2680 + 2681: 47(int) CompositeExtract 2679 0 + 2682: 180 Load 182(s2DShadow) + 2683: 148(fvec3) Load 150(c3) + 2684: 6(float) Load 2665(lodClamp) + 2685: 174(ptr) AccessChain 2662(texel) 173 + 2686: 6(float) CompositeExtract 2683 2 + 2687:2009(ResType) ImageSparseSampleDrefImplicitLod 2682 2683 2686 MinLod 2684 + 2688: 6(float) CompositeExtract 2687 1 + Store 2685 2688 + 2689: 47(int) CompositeExtract 2687 0 + 2690: 192 Load 194(sCubeShadow) + 2691: 7(fvec4) Load 197(c4) + 2692: 6(float) Load 2665(lodClamp) + 2693: 174(ptr) AccessChain 2662(texel) 173 + 2694: 6(float) CompositeExtract 2691 3 + 2695:2009(ResType) ImageSparseSampleDrefImplicitLod 2690 2691 2694 MinLod 2692 + 2696: 6(float) CompositeExtract 2695 1 + Store 2693 2696 + 2697: 47(int) CompositeExtract 2695 0 + 2698: 215 Load 217(s2DArray) + 2699: 148(fvec3) Load 150(c3) + 2700: 6(float) Load 2665(lodClamp) + 2701:1991(ResType) ImageSparseSampleImplicitLod 2698 2699 MinLod 2700 + 2702: 7(fvec4) CompositeExtract 2701 1 + Store 2662(texel) 2702 + 2703: 47(int) CompositeExtract 2701 0 + 2704: 224 Load 226(sCubeArray) + 2705: 7(fvec4) Load 197(c4) + 2706: 6(float) Load 2665(lodClamp) + 2707:1991(ResType) ImageSparseSampleImplicitLod 2704 2705 MinLod 2706 + 2708: 7(fvec4) CompositeExtract 2707 1 + Store 2662(texel) 2708 + 2709: 47(int) CompositeExtract 2707 0 + 2710: 245 Load 247(s2DArrayShadow) + 2711: 7(fvec4) Load 197(c4) + 2712: 6(float) Load 2665(lodClamp) + 2713: 174(ptr) AccessChain 2662(texel) 173 + 2714: 6(float) CompositeExtract 2711 3 + 2715:2009(ResType) ImageSparseSampleDrefImplicitLod 2710 2711 2714 MinLod 2712 + 2716: 6(float) CompositeExtract 2715 1 + Store 2713 2716 + 2717: 47(int) CompositeExtract 2715 0 + 2718: 278 Load 280(sCubeArrayShadow) + 2719: 7(fvec4) Load 197(c4) + 2720: 6(float) Load 283(compare) + 2721: 6(float) Load 2665(lodClamp) + 2722: 174(ptr) AccessChain 2662(texel) 173 + 2723:2009(ResType) ImageSparseSampleDrefImplicitLod 2718 2719 2720 MinLod 2721 + 2724: 6(float) CompositeExtract 2723 1 + Store 2722 2724 + 2725: 47(int) CompositeExtract 2723 0 + 2726: 7(fvec4) Load 2662(texel) + ReturnValue 2726 + FunctionEnd +100(testTextureClamp(): 7(fvec4) Function None 8 + 101: Label + 2729(texel): 63(ptr) Variable Function + Store 2729(texel) 120 + 2730: 122 Load 124(s1D) + 2731: 6(float) Load 127(c1) + 2732: 6(float) Load 2665(lodClamp) + 2733: 7(fvec4) ImageSampleImplicitLod 2730 2731 MinLod 2732 + 2734: 7(fvec4) Load 2729(texel) + 2735: 7(fvec4) FAdd 2734 2733 + Store 2729(texel) 2735 + 2736: 133 Load 135(s2D) + 2737: 52(fvec2) Load 138(c2) + 2738: 6(float) Load 2665(lodClamp) + 2739: 7(fvec4) ImageSampleImplicitLod 2736 2737 MinLod 2738 + 2740: 7(fvec4) Load 2729(texel) + 2741: 7(fvec4) FAdd 2740 2739 + Store 2729(texel) 2741 + 2742: 144 Load 146(s3D) + 2743: 148(fvec3) Load 150(c3) + 2744: 6(float) Load 2665(lodClamp) + 2745: 7(fvec4) ImageSampleImplicitLod 2742 2743 MinLod 2744 + 2746: 7(fvec4) Load 2729(texel) + 2747: 7(fvec4) FAdd 2746 2745 + Store 2729(texel) 2747 + 2748: 156 Load 158(sCube) + 2749: 148(fvec3) Load 150(c3) + 2750: 6(float) Load 2665(lodClamp) + 2751: 7(fvec4) ImageSampleImplicitLod 2748 2749 MinLod 2750 + 2752: 7(fvec4) Load 2729(texel) + 2753: 7(fvec4) FAdd 2752 2751 + Store 2729(texel) 2753 + 2754: 165 Load 167(s1DShadow) + 2755: 148(fvec3) Load 150(c3) + 2756: 6(float) Load 2665(lodClamp) + 2757: 6(float) CompositeExtract 2755 2 + 2758: 6(float) ImageSampleDrefImplicitLod 2754 2755 2757 MinLod 2756 + 2759: 174(ptr) AccessChain 2729(texel) 173 + 2760: 6(float) Load 2759 + 2761: 6(float) FAdd 2760 2758 + 2762: 174(ptr) AccessChain 2729(texel) 173 + Store 2762 2761 + 2763: 180 Load 182(s2DShadow) + 2764: 148(fvec3) Load 150(c3) + 2765: 6(float) Load 2665(lodClamp) + 2766: 6(float) CompositeExtract 2764 2 + 2767: 6(float) ImageSampleDrefImplicitLod 2763 2764 2766 MinLod 2765 + 2768: 174(ptr) AccessChain 2729(texel) 173 + 2769: 6(float) Load 2768 + 2770: 6(float) FAdd 2769 2767 + 2771: 174(ptr) AccessChain 2729(texel) 173 + Store 2771 2770 + 2772: 192 Load 194(sCubeShadow) + 2773: 7(fvec4) Load 197(c4) + 2774: 6(float) Load 2665(lodClamp) + 2775: 6(float) CompositeExtract 2773 3 + 2776: 6(float) ImageSampleDrefImplicitLod 2772 2773 2775 MinLod 2774 + 2777: 174(ptr) AccessChain 2729(texel) 173 + 2778: 6(float) Load 2777 + 2779: 6(float) FAdd 2778 2776 + 2780: 174(ptr) AccessChain 2729(texel) 173 + Store 2780 2779 + 2781: 206 Load 208(s1DArray) + 2782: 52(fvec2) Load 138(c2) + 2783: 6(float) Load 2665(lodClamp) + 2784: 7(fvec4) ImageSampleImplicitLod 2781 2782 MinLod 2783 + 2785: 7(fvec4) Load 2729(texel) + 2786: 7(fvec4) FAdd 2785 2784 + Store 2729(texel) 2786 + 2787: 215 Load 217(s2DArray) + 2788: 148(fvec3) Load 150(c3) + 2789: 6(float) Load 2665(lodClamp) + 2790: 7(fvec4) ImageSampleImplicitLod 2787 2788 MinLod 2789 + 2791: 7(fvec4) Load 2729(texel) + 2792: 7(fvec4) FAdd 2791 2790 + Store 2729(texel) 2792 + 2793: 224 Load 226(sCubeArray) + 2794: 7(fvec4) Load 197(c4) + 2795: 6(float) Load 2665(lodClamp) + 2796: 7(fvec4) ImageSampleImplicitLod 2793 2794 MinLod 2795 + 2797: 7(fvec4) Load 2729(texel) + 2798: 7(fvec4) FAdd 2797 2796 + Store 2729(texel) 2798 + 2799: 233 Load 235(s1DArrayShadow) + 2800: 148(fvec3) Load 150(c3) + 2801: 6(float) Load 2665(lodClamp) + 2802: 6(float) CompositeExtract 2800 2 + 2803: 6(float) ImageSampleDrefImplicitLod 2799 2800 2802 MinLod 2801 + 2804: 174(ptr) AccessChain 2729(texel) 173 + 2805: 6(float) Load 2804 + 2806: 6(float) FAdd 2805 2803 + 2807: 174(ptr) AccessChain 2729(texel) 173 + Store 2807 2806 + 2808: 245 Load 247(s2DArrayShadow) + 2809: 7(fvec4) Load 197(c4) + 2810: 6(float) Load 2665(lodClamp) + 2811: 6(float) CompositeExtract 2809 3 + 2812: 6(float) ImageSampleDrefImplicitLod 2808 2809 2811 MinLod 2810 + 2813: 174(ptr) AccessChain 2729(texel) 173 + 2814: 6(float) Load 2813 + 2815: 6(float) FAdd 2814 2812 + 2816: 174(ptr) AccessChain 2729(texel) 173 + Store 2816 2815 + 2817: 278 Load 280(sCubeArrayShadow) + 2818: 7(fvec4) Load 197(c4) + 2819: 6(float) Load 283(compare) + 2820: 6(float) Load 2665(lodClamp) + 2821: 6(float) ImageSampleDrefImplicitLod 2817 2818 2819 MinLod 2820 + 2822: 174(ptr) AccessChain 2729(texel) 173 + 2823: 6(float) Load 2822 + 2824: 6(float) FAdd 2823 2821 + 2825: 174(ptr) AccessChain 2729(texel) 173 + Store 2825 2824 + 2826: 7(fvec4) Load 2729(texel) + ReturnValue 2826 + FunctionEnd +102(testSparseTextureOffsetClamp(): 7(fvec4) Function None 8 + 103: Label + 2829(texel): 63(ptr) Variable Function + Store 2829(texel) 120 + 2830: 133 Load 135(s2D) + 2831: 52(fvec2) Load 138(c2) + 2832: 6(float) Load 2665(lodClamp) + 2833:1991(ResType) ImageSparseSampleImplicitLod 2830 2831 ConstOffset MinLod 452 2832 + 2834: 7(fvec4) CompositeExtract 2833 1 + Store 2829(texel) 2834 + 2835: 47(int) CompositeExtract 2833 0 + 2836: 144 Load 146(s3D) + 2837: 148(fvec3) Load 150(c3) + 2838: 6(float) Load 2665(lodClamp) + 2839:1991(ResType) ImageSparseSampleImplicitLod 2836 2837 ConstOffset MinLod 459 2838 + 2840: 7(fvec4) CompositeExtract 2839 1 + Store 2829(texel) 2840 + 2841: 47(int) CompositeExtract 2839 0 + 2842: 180 Load 182(s2DShadow) + 2843: 148(fvec3) Load 150(c3) + 2844: 6(float) Load 2665(lodClamp) + 2845: 174(ptr) AccessChain 2829(texel) 173 + 2846: 6(float) CompositeExtract 2843 2 + 2847:2009(ResType) ImageSparseSampleDrefImplicitLod 2842 2843 2846 ConstOffset MinLod 452 2844 + 2848: 6(float) CompositeExtract 2847 1 + Store 2845 2848 + 2849: 47(int) CompositeExtract 2847 0 + 2850: 215 Load 217(s2DArray) + 2851: 148(fvec3) Load 150(c3) + 2852: 6(float) Load 2665(lodClamp) + 2853:1991(ResType) ImageSparseSampleImplicitLod 2850 2851 ConstOffset MinLod 452 2852 + 2854: 7(fvec4) CompositeExtract 2853 1 + Store 2829(texel) 2854 + 2855: 47(int) CompositeExtract 2853 0 + 2856: 245 Load 247(s2DArrayShadow) + 2857: 7(fvec4) Load 197(c4) + 2858: 6(float) Load 2665(lodClamp) + 2859: 174(ptr) AccessChain 2829(texel) 173 + 2860: 6(float) CompositeExtract 2857 3 + 2861:2009(ResType) ImageSparseSampleDrefImplicitLod 2856 2857 2860 ConstOffset MinLod 452 2858 + 2862: 6(float) CompositeExtract 2861 1 + Store 2859 2862 + 2863: 47(int) CompositeExtract 2861 0 + 2864: 7(fvec4) Load 2829(texel) + ReturnValue 2864 + FunctionEnd +104(testTextureOffsetClamp(): 7(fvec4) Function None 8 + 105: Label + 2867(texel): 63(ptr) Variable Function + Store 2867(texel) 120 + 2868: 122 Load 124(s1D) + 2869: 6(float) Load 127(c1) + 2870: 6(float) Load 2665(lodClamp) + 2871: 7(fvec4) ImageSampleImplicitLod 2868 2869 ConstOffset MinLod 445 2870 + 2872: 7(fvec4) Load 2867(texel) + 2873: 7(fvec4) FAdd 2872 2871 + Store 2867(texel) 2873 + 2874: 133 Load 135(s2D) + 2875: 52(fvec2) Load 138(c2) + 2876: 6(float) Load 2665(lodClamp) + 2877: 7(fvec4) ImageSampleImplicitLod 2874 2875 ConstOffset MinLod 452 2876 + 2878: 7(fvec4) Load 2867(texel) + 2879: 7(fvec4) FAdd 2878 2877 + Store 2867(texel) 2879 + 2880: 144 Load 146(s3D) + 2881: 148(fvec3) Load 150(c3) + 2882: 6(float) Load 2665(lodClamp) + 2883: 7(fvec4) ImageSampleImplicitLod 2880 2881 ConstOffset MinLod 459 2882 + 2884: 7(fvec4) Load 2867(texel) + 2885: 7(fvec4) FAdd 2884 2883 + Store 2867(texel) 2885 + 2886: 165 Load 167(s1DShadow) + 2887: 148(fvec3) Load 150(c3) + 2888: 6(float) Load 2665(lodClamp) + 2889: 6(float) CompositeExtract 2887 2 + 2890: 6(float) ImageSampleDrefImplicitLod 2886 2887 2889 ConstOffset MinLod 445 2888 + 2891: 174(ptr) AccessChain 2867(texel) 173 + 2892: 6(float) Load 2891 + 2893: 6(float) FAdd 2892 2890 + 2894: 174(ptr) AccessChain 2867(texel) 173 + Store 2894 2893 + 2895: 180 Load 182(s2DShadow) + 2896: 148(fvec3) Load 150(c3) + 2897: 6(float) Load 2665(lodClamp) + 2898: 6(float) CompositeExtract 2896 2 + 2899: 6(float) ImageSampleDrefImplicitLod 2895 2896 2898 ConstOffset MinLod 452 2897 + 2900: 174(ptr) AccessChain 2867(texel) 173 + 2901: 6(float) Load 2900 + 2902: 6(float) FAdd 2901 2899 + 2903: 174(ptr) AccessChain 2867(texel) 173 + Store 2903 2902 + 2904: 206 Load 208(s1DArray) + 2905: 52(fvec2) Load 138(c2) + 2906: 6(float) Load 2665(lodClamp) + 2907: 7(fvec4) ImageSampleImplicitLod 2904 2905 ConstOffset MinLod 445 2906 + 2908: 7(fvec4) Load 2867(texel) + 2909: 7(fvec4) FAdd 2908 2907 + Store 2867(texel) 2909 + 2910: 215 Load 217(s2DArray) + 2911: 148(fvec3) Load 150(c3) + 2912: 6(float) Load 2665(lodClamp) + 2913: 7(fvec4) ImageSampleImplicitLod 2910 2911 ConstOffset MinLod 452 2912 + 2914: 7(fvec4) Load 2867(texel) + 2915: 7(fvec4) FAdd 2914 2913 + Store 2867(texel) 2915 + 2916: 233 Load 235(s1DArrayShadow) + 2917: 148(fvec3) Load 150(c3) + 2918: 6(float) Load 2665(lodClamp) + 2919: 6(float) CompositeExtract 2917 2 + 2920: 6(float) ImageSampleDrefImplicitLod 2916 2917 2919 ConstOffset MinLod 445 2918 + 2921: 174(ptr) AccessChain 2867(texel) 173 + 2922: 6(float) Load 2921 + 2923: 6(float) FAdd 2922 2920 + 2924: 174(ptr) AccessChain 2867(texel) 173 + Store 2924 2923 + 2925: 245 Load 247(s2DArrayShadow) + 2926: 7(fvec4) Load 197(c4) + 2927: 6(float) Load 2665(lodClamp) + 2928: 6(float) CompositeExtract 2926 3 + 2929: 6(float) ImageSampleDrefImplicitLod 2925 2926 2928 ConstOffset MinLod 452 2927 + 2930: 174(ptr) AccessChain 2867(texel) 173 + 2931: 6(float) Load 2930 + 2932: 6(float) FAdd 2931 2929 + 2933: 174(ptr) AccessChain 2867(texel) 173 + Store 2933 2932 + 2934: 7(fvec4) Load 2867(texel) + ReturnValue 2934 + FunctionEnd +106(testSparseTextureGradClamp(): 7(fvec4) Function None 8 + 107: Label + 2937(texel): 63(ptr) Variable Function + Store 2937(texel) 120 + 2938: 133 Load 135(s2D) + 2939: 52(fvec2) Load 138(c2) + 2940: 52(fvec2) Load 874(dPdxy2) + 2941: 52(fvec2) Load 874(dPdxy2) + 2942: 6(float) Load 2665(lodClamp) + 2943:1991(ResType) ImageSparseSampleExplicitLod 2938 2939 Grad MinLod 2940 2941 2942 + 2944: 7(fvec4) CompositeExtract 2943 1 + Store 2937(texel) 2944 + 2945: 47(int) CompositeExtract 2943 0 + 2946: 144 Load 146(s3D) + 2947: 148(fvec3) Load 150(c3) + 2948: 148(fvec3) Load 882(dPdxy3) + 2949: 148(fvec3) Load 882(dPdxy3) + 2950: 6(float) Load 2665(lodClamp) + 2951:1991(ResType) ImageSparseSampleExplicitLod 2946 2947 Grad MinLod 2948 2949 2950 + 2952: 7(fvec4) CompositeExtract 2951 1 + Store 2937(texel) 2952 + 2953: 47(int) CompositeExtract 2951 0 + 2954: 156 Load 158(sCube) + 2955: 148(fvec3) Load 150(c3) + 2956: 148(fvec3) Load 882(dPdxy3) + 2957: 148(fvec3) Load 882(dPdxy3) + 2958: 6(float) Load 2665(lodClamp) + 2959:1991(ResType) ImageSparseSampleExplicitLod 2954 2955 Grad MinLod 2956 2957 2958 + 2960: 7(fvec4) CompositeExtract 2959 1 + Store 2937(texel) 2960 + 2961: 47(int) CompositeExtract 2959 0 + 2962: 180 Load 182(s2DShadow) + 2963: 148(fvec3) Load 150(c3) + 2964: 52(fvec2) Load 874(dPdxy2) + 2965: 52(fvec2) Load 874(dPdxy2) + 2966: 6(float) Load 2665(lodClamp) + 2967: 174(ptr) AccessChain 2937(texel) 173 + 2968: 6(float) CompositeExtract 2963 2 + 2969:2009(ResType) ImageSparseSampleDrefExplicitLod 2962 2963 2968 Grad MinLod 2964 2965 2966 + 2970: 6(float) CompositeExtract 2969 1 + Store 2967 2970 + 2971: 47(int) CompositeExtract 2969 0 + 2972: 192 Load 194(sCubeShadow) + 2973: 7(fvec4) Load 197(c4) + 2974: 148(fvec3) Load 882(dPdxy3) + 2975: 148(fvec3) Load 882(dPdxy3) + 2976: 6(float) Load 2665(lodClamp) + 2977: 174(ptr) AccessChain 2937(texel) 173 + 2978: 6(float) CompositeExtract 2973 3 + 2979:2009(ResType) ImageSparseSampleDrefExplicitLod 2972 2973 2978 Grad MinLod 2974 2975 2976 + 2980: 6(float) CompositeExtract 2979 1 + Store 2977 2980 + 2981: 47(int) CompositeExtract 2979 0 + 2982: 215 Load 217(s2DArray) + 2983: 148(fvec3) Load 150(c3) + 2984: 52(fvec2) Load 874(dPdxy2) + 2985: 52(fvec2) Load 874(dPdxy2) + 2986: 6(float) Load 2665(lodClamp) + 2987:1991(ResType) ImageSparseSampleExplicitLod 2982 2983 Grad MinLod 2984 2985 2986 + 2988: 7(fvec4) CompositeExtract 2987 1 + Store 2937(texel) 2988 + 2989: 47(int) CompositeExtract 2987 0 + 2990: 245 Load 247(s2DArrayShadow) + 2991: 7(fvec4) Load 197(c4) + 2992: 52(fvec2) Load 874(dPdxy2) + 2993: 52(fvec2) Load 874(dPdxy2) + 2994: 6(float) Load 2665(lodClamp) + 2995: 174(ptr) AccessChain 2937(texel) 173 + 2996: 6(float) CompositeExtract 2991 3 + 2997:2009(ResType) ImageSparseSampleDrefExplicitLod 2990 2991 2996 Grad MinLod 2992 2993 2994 + 2998: 6(float) CompositeExtract 2997 1 + Store 2995 2998 + 2999: 47(int) CompositeExtract 2997 0 + 3000: 224 Load 226(sCubeArray) + 3001: 7(fvec4) Load 197(c4) + 3002: 148(fvec3) Load 882(dPdxy3) + 3003: 148(fvec3) Load 882(dPdxy3) + 3004: 6(float) Load 2665(lodClamp) + 3005:1991(ResType) ImageSparseSampleExplicitLod 3000 3001 Grad MinLod 3002 3003 3004 + 3006: 7(fvec4) CompositeExtract 3005 1 + Store 2937(texel) 3006 + 3007: 47(int) CompositeExtract 3005 0 + 3008: 7(fvec4) Load 2937(texel) + ReturnValue 3008 + FunctionEnd +108(testTextureGradClamp(): 7(fvec4) Function None 8 + 109: Label + 3011(texel): 63(ptr) Variable Function + Store 3011(texel) 120 + 3012: 122 Load 124(s1D) + 3013: 6(float) Load 127(c1) + 3014: 6(float) Load 866(dPdxy1) + 3015: 6(float) Load 866(dPdxy1) + 3016: 6(float) Load 2665(lodClamp) + 3017: 7(fvec4) ImageSampleExplicitLod 3012 3013 Grad MinLod 3014 3015 3016 + 3018: 7(fvec4) Load 3011(texel) + 3019: 7(fvec4) FAdd 3018 3017 + Store 3011(texel) 3019 + 3020: 133 Load 135(s2D) + 3021: 52(fvec2) Load 138(c2) + 3022: 52(fvec2) Load 874(dPdxy2) + 3023: 52(fvec2) Load 874(dPdxy2) + 3024: 6(float) Load 2665(lodClamp) + 3025: 7(fvec4) ImageSampleExplicitLod 3020 3021 Grad MinLod 3022 3023 3024 + 3026: 7(fvec4) Load 3011(texel) + 3027: 7(fvec4) FAdd 3026 3025 + Store 3011(texel) 3027 + 3028: 144 Load 146(s3D) + 3029: 148(fvec3) Load 150(c3) + 3030: 148(fvec3) Load 882(dPdxy3) + 3031: 148(fvec3) Load 882(dPdxy3) + 3032: 6(float) Load 2665(lodClamp) + 3033: 7(fvec4) ImageSampleExplicitLod 3028 3029 Grad MinLod 3030 3031 3032 + 3034: 7(fvec4) Load 3011(texel) + 3035: 7(fvec4) FAdd 3034 3033 + Store 3011(texel) 3035 + 3036: 156 Load 158(sCube) + 3037: 148(fvec3) Load 150(c3) + 3038: 148(fvec3) Load 882(dPdxy3) + 3039: 148(fvec3) Load 882(dPdxy3) + 3040: 6(float) Load 2665(lodClamp) + 3041: 7(fvec4) ImageSampleExplicitLod 3036 3037 Grad MinLod 3038 3039 3040 + 3042: 7(fvec4) Load 3011(texel) + 3043: 7(fvec4) FAdd 3042 3041 + Store 3011(texel) 3043 + 3044: 165 Load 167(s1DShadow) + 3045: 148(fvec3) Load 150(c3) + 3046: 6(float) Load 866(dPdxy1) + 3047: 6(float) Load 866(dPdxy1) + 3048: 6(float) Load 2665(lodClamp) + 3049: 6(float) CompositeExtract 3045 2 + 3050: 6(float) ImageSampleDrefExplicitLod 3044 3045 3049 Grad MinLod 3046 3047 3048 + 3051: 174(ptr) AccessChain 3011(texel) 173 + 3052: 6(float) Load 3051 + 3053: 6(float) FAdd 3052 3050 + 3054: 174(ptr) AccessChain 3011(texel) 173 + Store 3054 3053 + 3055: 180 Load 182(s2DShadow) + 3056: 148(fvec3) Load 150(c3) + 3057: 52(fvec2) Load 874(dPdxy2) + 3058: 52(fvec2) Load 874(dPdxy2) + 3059: 6(float) Load 2665(lodClamp) + 3060: 6(float) CompositeExtract 3056 2 + 3061: 6(float) ImageSampleDrefExplicitLod 3055 3056 3060 Grad MinLod 3057 3058 3059 + 3062: 174(ptr) AccessChain 3011(texel) 173 + 3063: 6(float) Load 3062 + 3064: 6(float) FAdd 3063 3061 + 3065: 174(ptr) AccessChain 3011(texel) 173 + Store 3065 3064 + 3066: 192 Load 194(sCubeShadow) + 3067: 7(fvec4) Load 197(c4) + 3068: 148(fvec3) Load 882(dPdxy3) + 3069: 148(fvec3) Load 882(dPdxy3) + 3070: 6(float) Load 2665(lodClamp) + 3071: 6(float) CompositeExtract 3067 3 + 3072: 6(float) ImageSampleDrefExplicitLod 3066 3067 3071 Grad MinLod 3068 3069 3070 + 3073: 174(ptr) AccessChain 3011(texel) 173 + 3074: 6(float) Load 3073 + 3075: 6(float) FAdd 3074 3072 + 3076: 174(ptr) AccessChain 3011(texel) 173 + Store 3076 3075 + 3077: 206 Load 208(s1DArray) + 3078: 52(fvec2) Load 138(c2) + 3079: 6(float) Load 866(dPdxy1) + 3080: 6(float) Load 866(dPdxy1) + 3081: 6(float) Load 2665(lodClamp) + 3082: 7(fvec4) ImageSampleExplicitLod 3077 3078 Grad MinLod 3079 3080 3081 + 3083: 7(fvec4) Load 3011(texel) + 3084: 7(fvec4) FAdd 3083 3082 + Store 3011(texel) 3084 + 3085: 215 Load 217(s2DArray) + 3086: 148(fvec3) Load 150(c3) + 3087: 52(fvec2) Load 874(dPdxy2) + 3088: 52(fvec2) Load 874(dPdxy2) + 3089: 6(float) Load 2665(lodClamp) + 3090: 7(fvec4) ImageSampleExplicitLod 3085 3086 Grad MinLod 3087 3088 3089 + 3091: 7(fvec4) Load 3011(texel) + 3092: 7(fvec4) FAdd 3091 3090 + Store 3011(texel) 3092 + 3093: 233 Load 235(s1DArrayShadow) + 3094: 148(fvec3) Load 150(c3) + 3095: 6(float) Load 866(dPdxy1) + 3096: 6(float) Load 866(dPdxy1) + 3097: 6(float) Load 2665(lodClamp) + 3098: 6(float) CompositeExtract 3094 2 + 3099: 6(float) ImageSampleDrefExplicitLod 3093 3094 3098 Grad MinLod 3095 3096 3097 + 3100: 174(ptr) AccessChain 3011(texel) 173 + 3101: 6(float) Load 3100 + 3102: 6(float) FAdd 3101 3099 + 3103: 174(ptr) AccessChain 3011(texel) 173 + Store 3103 3102 + 3104: 245 Load 247(s2DArrayShadow) + 3105: 7(fvec4) Load 197(c4) + 3106: 52(fvec2) Load 874(dPdxy2) + 3107: 52(fvec2) Load 874(dPdxy2) + 3108: 6(float) Load 2665(lodClamp) + 3109: 6(float) CompositeExtract 3105 3 + 3110: 6(float) ImageSampleDrefExplicitLod 3104 3105 3109 Grad MinLod 3106 3107 3108 + 3111: 174(ptr) AccessChain 3011(texel) 173 + 3112: 6(float) Load 3111 + 3113: 6(float) FAdd 3112 3110 + 3114: 174(ptr) AccessChain 3011(texel) 173 + Store 3114 3113 + 3115: 224 Load 226(sCubeArray) + 3116: 7(fvec4) Load 197(c4) + 3117: 148(fvec3) Load 882(dPdxy3) + 3118: 148(fvec3) Load 882(dPdxy3) + 3119: 6(float) Load 2665(lodClamp) + 3120: 7(fvec4) ImageSampleExplicitLod 3115 3116 Grad MinLod 3117 3118 3119 + 3121: 7(fvec4) Load 3011(texel) + 3122: 7(fvec4) FAdd 3121 3120 + Store 3011(texel) 3122 + 3123: 7(fvec4) Load 3011(texel) + ReturnValue 3123 + FunctionEnd +110(testSparseTextureGradOffsetClamp(): 7(fvec4) Function None 8 + 111: Label + 3126(texel): 63(ptr) Variable Function + Store 3126(texel) 120 + 3127: 133 Load 135(s2D) + 3128: 52(fvec2) Load 138(c2) + 3129: 52(fvec2) Load 874(dPdxy2) + 3130: 52(fvec2) Load 874(dPdxy2) + 3131: 6(float) Load 2665(lodClamp) + 3132:1991(ResType) ImageSparseSampleExplicitLod 3127 3128 Grad ConstOffset MinLod 3129 3130 452 3131 + 3133: 7(fvec4) CompositeExtract 3132 1 + Store 3126(texel) 3133 + 3134: 47(int) CompositeExtract 3132 0 + 3135: 144 Load 146(s3D) + 3136: 148(fvec3) Load 150(c3) + 3137: 148(fvec3) Load 882(dPdxy3) + 3138: 148(fvec3) Load 882(dPdxy3) + 3139: 6(float) Load 2665(lodClamp) + 3140:1991(ResType) ImageSparseSampleExplicitLod 3135 3136 Grad ConstOffset MinLod 3137 3138 459 3139 + 3141: 7(fvec4) CompositeExtract 3140 1 + Store 3126(texel) 3141 + 3142: 47(int) CompositeExtract 3140 0 + 3143: 180 Load 182(s2DShadow) + 3144: 148(fvec3) Load 150(c3) + 3145: 52(fvec2) Load 874(dPdxy2) + 3146: 52(fvec2) Load 874(dPdxy2) + 3147: 6(float) Load 2665(lodClamp) + 3148: 174(ptr) AccessChain 3126(texel) 173 + 3149: 6(float) CompositeExtract 3144 2 + 3150:2009(ResType) ImageSparseSampleDrefExplicitLod 3143 3144 3149 Grad ConstOffset MinLod 3145 3146 452 3147 + 3151: 6(float) CompositeExtract 3150 1 + Store 3148 3151 + 3152: 47(int) CompositeExtract 3150 0 + 3153: 215 Load 217(s2DArray) + 3154: 148(fvec3) Load 150(c3) + 3155: 52(fvec2) Load 874(dPdxy2) + 3156: 52(fvec2) Load 874(dPdxy2) + 3157: 6(float) Load 2665(lodClamp) + 3158:1991(ResType) ImageSparseSampleExplicitLod 3153 3154 Grad ConstOffset MinLod 3155 3156 452 3157 + 3159: 7(fvec4) CompositeExtract 3158 1 + Store 3126(texel) 3159 + 3160: 47(int) CompositeExtract 3158 0 + 3161: 245 Load 247(s2DArrayShadow) + 3162: 7(fvec4) Load 197(c4) + 3163: 52(fvec2) Load 874(dPdxy2) + 3164: 52(fvec2) Load 874(dPdxy2) + 3165: 6(float) Load 2665(lodClamp) + 3166: 174(ptr) AccessChain 3126(texel) 173 + 3167: 6(float) CompositeExtract 3162 3 + 3168:2009(ResType) ImageSparseSampleDrefExplicitLod 3161 3162 3167 Grad ConstOffset MinLod 3163 3164 452 3165 + 3169: 6(float) CompositeExtract 3168 1 + Store 3166 3169 + 3170: 47(int) CompositeExtract 3168 0 + 3171: 7(fvec4) Load 3126(texel) + ReturnValue 3171 + FunctionEnd +112(testTextureGradOffsetClamp(): 7(fvec4) Function None 8 + 113: Label + 3174(texel): 63(ptr) Variable Function + Store 3174(texel) 120 + 3175: 122 Load 124(s1D) + 3176: 6(float) Load 127(c1) + 3177: 6(float) Load 866(dPdxy1) + 3178: 6(float) Load 866(dPdxy1) + 3179: 6(float) Load 2665(lodClamp) + 3180: 7(fvec4) ImageSampleExplicitLod 3175 3176 Grad ConstOffset MinLod 3177 3178 445 3179 + 3181: 7(fvec4) Load 3174(texel) + 3182: 7(fvec4) FAdd 3181 3180 + Store 3174(texel) 3182 + 3183: 133 Load 135(s2D) + 3184: 52(fvec2) Load 138(c2) + 3185: 52(fvec2) Load 874(dPdxy2) + 3186: 52(fvec2) Load 874(dPdxy2) + 3187: 6(float) Load 2665(lodClamp) + 3188: 7(fvec4) ImageSampleExplicitLod 3183 3184 Grad ConstOffset MinLod 3185 3186 452 3187 + 3189: 7(fvec4) Load 3174(texel) + 3190: 7(fvec4) FAdd 3189 3188 + Store 3174(texel) 3190 + 3191: 144 Load 146(s3D) + 3192: 148(fvec3) Load 150(c3) + 3193: 148(fvec3) Load 882(dPdxy3) + 3194: 148(fvec3) Load 882(dPdxy3) + 3195: 6(float) Load 2665(lodClamp) + 3196: 7(fvec4) ImageSampleExplicitLod 3191 3192 Grad ConstOffset MinLod 3193 3194 459 3195 + 3197: 7(fvec4) Load 3174(texel) + 3198: 7(fvec4) FAdd 3197 3196 + Store 3174(texel) 3198 + 3199: 165 Load 167(s1DShadow) + 3200: 148(fvec3) Load 150(c3) + 3201: 6(float) Load 866(dPdxy1) + 3202: 6(float) Load 866(dPdxy1) + 3203: 6(float) Load 2665(lodClamp) + 3204: 6(float) CompositeExtract 3200 2 + 3205: 6(float) ImageSampleDrefExplicitLod 3199 3200 3204 Grad ConstOffset MinLod 3201 3202 445 3203 + 3206: 174(ptr) AccessChain 3174(texel) 173 + 3207: 6(float) Load 3206 + 3208: 6(float) FAdd 3207 3205 + 3209: 174(ptr) AccessChain 3174(texel) 173 + Store 3209 3208 + 3210: 180 Load 182(s2DShadow) + 3211: 148(fvec3) Load 150(c3) + 3212: 52(fvec2) Load 874(dPdxy2) + 3213: 52(fvec2) Load 874(dPdxy2) + 3214: 6(float) Load 2665(lodClamp) + 3215: 6(float) CompositeExtract 3211 2 + 3216: 6(float) ImageSampleDrefExplicitLod 3210 3211 3215 Grad ConstOffset MinLod 3212 3213 452 3214 + 3217: 174(ptr) AccessChain 3174(texel) 173 + 3218: 6(float) Load 3217 + 3219: 6(float) FAdd 3218 3216 + 3220: 174(ptr) AccessChain 3174(texel) 173 + Store 3220 3219 + 3221: 206 Load 208(s1DArray) + 3222: 52(fvec2) Load 138(c2) + 3223: 6(float) Load 866(dPdxy1) + 3224: 6(float) Load 866(dPdxy1) + 3225: 6(float) Load 2665(lodClamp) + 3226: 7(fvec4) ImageSampleExplicitLod 3221 3222 Grad ConstOffset MinLod 3223 3224 445 3225 + 3227: 7(fvec4) Load 3174(texel) + 3228: 7(fvec4) FAdd 3227 3226 + Store 3174(texel) 3228 + 3229: 215 Load 217(s2DArray) + 3230: 148(fvec3) Load 150(c3) + 3231: 52(fvec2) Load 874(dPdxy2) + 3232: 52(fvec2) Load 874(dPdxy2) + 3233: 6(float) Load 2665(lodClamp) + 3234: 7(fvec4) ImageSampleExplicitLod 3229 3230 Grad ConstOffset MinLod 3231 3232 452 3233 + 3235: 7(fvec4) Load 3174(texel) + 3236: 7(fvec4) FAdd 3235 3234 + Store 3174(texel) 3236 + 3237: 233 Load 235(s1DArrayShadow) + 3238: 148(fvec3) Load 150(c3) + 3239: 6(float) Load 866(dPdxy1) + 3240: 6(float) Load 866(dPdxy1) + 3241: 6(float) Load 2665(lodClamp) + 3242: 6(float) CompositeExtract 3238 2 + 3243: 6(float) ImageSampleDrefExplicitLod 3237 3238 3242 Grad ConstOffset MinLod 3239 3240 445 3241 + 3244: 174(ptr) AccessChain 3174(texel) 173 + 3245: 6(float) Load 3244 + 3246: 6(float) FAdd 3245 3243 + 3247: 174(ptr) AccessChain 3174(texel) 173 + Store 3247 3246 + 3248: 245 Load 247(s2DArrayShadow) + 3249: 7(fvec4) Load 197(c4) + 3250: 52(fvec2) Load 874(dPdxy2) + 3251: 52(fvec2) Load 874(dPdxy2) + 3252: 6(float) Load 2665(lodClamp) + 3253: 6(float) CompositeExtract 3249 3 + 3254: 6(float) ImageSampleDrefExplicitLod 3248 3249 3253 Grad ConstOffset MinLod 3250 3251 452 3252 + 3255: 174(ptr) AccessChain 3174(texel) 173 + 3256: 6(float) Load 3255 + 3257: 6(float) FAdd 3256 3254 + 3258: 174(ptr) AccessChain 3174(texel) 173 + Store 3258 3257 + 3259: 7(fvec4) Load 3174(texel) + ReturnValue 3259 + FunctionEnd +114(testCombinedTextureSampler(): 7(fvec4) Function None 8 + 115: Label + 3262(texel): 63(ptr) Variable Function + Store 3262(texel) 120 + 3265: 121 Load 3264(t1D) + 3269: 3266 Load 3268(s) + 3270: 122 SampledImage 3265 3269 + 3271: 6(float) Load 127(c1) + 3272: 7(fvec4) ImageSampleImplicitLod 3270 3271 + 3273: 7(fvec4) Load 3262(texel) + 3274: 7(fvec4) FAdd 3273 3272 + Store 3262(texel) 3274 + 3277: 132 Load 3276(t2D) + 3278: 3266 Load 3268(s) + 3279: 133 SampledImage 3277 3278 + 3280: 52(fvec2) Load 138(c2) + 3281: 7(fvec4) ImageSampleImplicitLod 3279 3280 + 3282: 7(fvec4) Load 3262(texel) + 3283: 7(fvec4) FAdd 3282 3281 + Store 3262(texel) 3283 + 3286: 143 Load 3285(t3D) + 3287: 3266 Load 3268(s) + 3288: 144 SampledImage 3286 3287 + 3289: 148(fvec3) Load 150(c3) + 3290: 7(fvec4) ImageSampleImplicitLod 3288 3289 + 3291: 7(fvec4) Load 3262(texel) + 3292: 7(fvec4) FAdd 3291 3290 + Store 3262(texel) 3292 + 3295: 155 Load 3294(tCube) + 3296: 3266 Load 3268(s) + 3297: 156 SampledImage 3295 3296 + 3298: 148(fvec3) Load 150(c3) + 3299: 7(fvec4) ImageSampleImplicitLod 3297 3298 + 3300: 7(fvec4) Load 3262(texel) + 3301: 7(fvec4) FAdd 3300 3299 + Store 3262(texel) 3301 + 3302: 121 Load 3264(t1D) + 3304: 3266 Load 3303(sShadow) + 3305: 165 SampledImage 3302 3304 + 3306: 148(fvec3) Load 150(c3) + 3307: 6(float) CompositeExtract 3306 2 + 3308: 6(float) ImageSampleDrefImplicitLod 3305 3306 3307 + 3309: 174(ptr) AccessChain 3262(texel) 173 + 3310: 6(float) Load 3309 + 3311: 6(float) FAdd 3310 3308 + 3312: 174(ptr) AccessChain 3262(texel) 173 + Store 3312 3311 + 3313: 132 Load 3276(t2D) + 3314: 3266 Load 3303(sShadow) + 3315: 180 SampledImage 3313 3314 + 3316: 148(fvec3) Load 150(c3) + 3317: 6(float) CompositeExtract 3316 2 + 3318: 6(float) ImageSampleDrefImplicitLod 3315 3316 3317 + 3319: 174(ptr) AccessChain 3262(texel) 173 + 3320: 6(float) Load 3319 + 3321: 6(float) FAdd 3320 3318 + 3322: 174(ptr) AccessChain 3262(texel) 173 + Store 3322 3321 + 3323: 155 Load 3294(tCube) + 3324: 3266 Load 3303(sShadow) + 3325: 192 SampledImage 3323 3324 + 3326: 7(fvec4) Load 197(c4) + 3327: 6(float) CompositeExtract 3326 3 + 3328: 6(float) ImageSampleDrefImplicitLod 3325 3326 3327 + 3329: 174(ptr) AccessChain 3262(texel) 173 + 3330: 6(float) Load 3329 + 3331: 6(float) FAdd 3330 3328 + 3332: 174(ptr) AccessChain 3262(texel) 173 + Store 3332 3331 + 3335: 205 Load 3334(t1DArray) + 3336: 3266 Load 3268(s) + 3337: 206 SampledImage 3335 3336 + 3338: 52(fvec2) Load 138(c2) + 3339: 7(fvec4) ImageSampleImplicitLod 3337 3338 + 3340: 7(fvec4) Load 3262(texel) + 3341: 7(fvec4) FAdd 3340 3339 + Store 3262(texel) 3341 + 3344: 214 Load 3343(t2DArray) + 3345: 3266 Load 3268(s) + 3346: 215 SampledImage 3344 3345 + 3347: 148(fvec3) Load 150(c3) + 3348: 7(fvec4) ImageSampleImplicitLod 3346 3347 + 3349: 7(fvec4) Load 3262(texel) + 3350: 7(fvec4) FAdd 3349 3348 + Store 3262(texel) 3350 + 3353: 223 Load 3352(tCubeArray) + 3354: 3266 Load 3268(s) + 3355: 224 SampledImage 3353 3354 + 3356: 7(fvec4) Load 197(c4) + 3357: 7(fvec4) ImageSampleImplicitLod 3355 3356 + 3358: 7(fvec4) Load 3262(texel) + 3359: 7(fvec4) FAdd 3358 3357 + Store 3262(texel) 3359 + 3360: 205 Load 3334(t1DArray) + 3361: 3266 Load 3303(sShadow) + 3362: 233 SampledImage 3360 3361 + 3363: 148(fvec3) Load 150(c3) + 3364: 6(float) CompositeExtract 3363 2 + 3365: 6(float) ImageSampleDrefImplicitLod 3362 3363 3364 + 3366: 174(ptr) AccessChain 3262(texel) 173 + 3367: 6(float) Load 3366 + 3368: 6(float) FAdd 3367 3365 + 3369: 174(ptr) AccessChain 3262(texel) 173 + Store 3369 3368 + 3370: 214 Load 3343(t2DArray) + 3371: 3266 Load 3303(sShadow) + 3372: 245 SampledImage 3370 3371 + 3373: 7(fvec4) Load 197(c4) + 3374: 6(float) CompositeExtract 3373 3 + 3375: 6(float) ImageSampleDrefImplicitLod 3372 3373 3374 + 3376: 174(ptr) AccessChain 3262(texel) 173 + 3377: 6(float) Load 3376 + 3378: 6(float) FAdd 3377 3375 + 3379: 174(ptr) AccessChain 3262(texel) 173 + Store 3379 3378 + 3382: 256 Load 3381(t2DRect) + 3383: 3266 Load 3268(s) + 3384: 257 SampledImage 3382 3383 + 3385: 52(fvec2) Load 138(c2) + 3386: 7(fvec4) ImageSampleImplicitLod 3384 3385 + 3387: 7(fvec4) Load 3262(texel) + 3388: 7(fvec4) FAdd 3387 3386 + Store 3262(texel) 3388 + 3389: 256 Load 3381(t2DRect) + 3390: 3266 Load 3303(sShadow) + 3391: 266 SampledImage 3389 3390 + 3392: 148(fvec3) Load 150(c3) + 3393: 6(float) CompositeExtract 3392 2 + 3394: 6(float) ImageSampleDrefImplicitLod 3391 3392 3393 + 3395: 174(ptr) AccessChain 3262(texel) 173 + 3396: 6(float) Load 3395 + 3397: 6(float) FAdd 3396 3394 + 3398: 174(ptr) AccessChain 3262(texel) 173 + Store 3398 3397 + 3399: 223 Load 3352(tCubeArray) + 3400: 3266 Load 3303(sShadow) + 3401: 278 SampledImage 3399 3400 + 3402: 7(fvec4) Load 197(c4) + 3403: 6(float) Load 283(compare) + 3404: 6(float) ImageSampleDrefImplicitLod 3401 3402 3403 + 3405: 174(ptr) AccessChain 3262(texel) 173 + 3406: 6(float) Load 3405 + 3407: 6(float) FAdd 3406 3404 + 3408: 174(ptr) AccessChain 3262(texel) 173 + Store 3408 3407 + 3409: 7(fvec4) Load 3262(texel) + ReturnValue 3409 + FunctionEnd +116(testSubpassLoad(): 7(fvec4) Function None 8 + 117: Label + 3415: 3412 Load 3414(subpass) + 3417: 7(fvec4) ImageRead 3415 3416 + 3421: 3418 Load 3420(subpassMS) + 3422: 7(fvec4) ImageRead 3421 3416 Sample 799 + 3423: 7(fvec4) FAdd 3417 3422 + ReturnValue 3423 + FunctionEnd diff --git a/Test/baseResults/spv.flowControl.frag.out b/Test/baseResults/spv.flowControl.frag.out index efbe63ebb4..62f6ad7008 100644 --- a/Test/baseResults/spv.flowControl.frag.out +++ b/Test/baseResults/spv.flowControl.frag.out @@ -1,6 +1,6 @@ spv.flowControl.frag // Module Version 10000 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 39 Capability Shader diff --git a/Test/baseResults/spv.for-complex-condition.vert.out b/Test/baseResults/spv.for-complex-condition.vert.out index ca971fd5eb..16b23a0fa7 100644 --- a/Test/baseResults/spv.for-complex-condition.vert.out +++ b/Test/baseResults/spv.for-complex-condition.vert.out @@ -1,6 +1,6 @@ spv.for-complex-condition.vert // Module Version 10000 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 31 Capability Shader diff --git a/Test/baseResults/spv.for-continue-break.vert.out b/Test/baseResults/spv.for-continue-break.vert.out index 4ba1cb91f2..10ab24e9ea 100644 --- a/Test/baseResults/spv.for-continue-break.vert.out +++ b/Test/baseResults/spv.for-continue-break.vert.out @@ -1,6 +1,6 @@ spv.for-continue-break.vert // Module Version 10000 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 45 Capability Shader diff --git a/Test/baseResults/spv.for-nobody.vert.out b/Test/baseResults/spv.for-nobody.vert.out index b965a58e4a..7a0b6de226 100644 --- a/Test/baseResults/spv.for-nobody.vert.out +++ b/Test/baseResults/spv.for-nobody.vert.out @@ -1,6 +1,6 @@ spv.for-nobody.vert // Module Version 10000 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 25 Capability Shader diff --git a/Test/baseResults/spv.for-notest.vert.out b/Test/baseResults/spv.for-notest.vert.out index d3e96032a9..b08c6a153b 100644 --- a/Test/baseResults/spv.for-notest.vert.out +++ b/Test/baseResults/spv.for-notest.vert.out @@ -1,6 +1,6 @@ spv.for-notest.vert // Module Version 10000 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 20 Capability Shader diff --git a/Test/baseResults/spv.for-simple.vert.out b/Test/baseResults/spv.for-simple.vert.out index c4de996560..92f3083d1a 100644 --- a/Test/baseResults/spv.for-simple.vert.out +++ b/Test/baseResults/spv.for-simple.vert.out @@ -1,6 +1,6 @@ spv.for-simple.vert // Module Version 10000 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 24 Capability Shader diff --git a/Test/baseResults/spv.forLoop.frag.out b/Test/baseResults/spv.forLoop.frag.out index 3a36667776..2a359617b0 100644 --- a/Test/baseResults/spv.forLoop.frag.out +++ b/Test/baseResults/spv.forLoop.frag.out @@ -1,6 +1,6 @@ spv.forLoop.frag // Module Version 10000 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 143 Capability Shader diff --git a/Test/baseResults/spv.forwardFun.frag.out b/Test/baseResults/spv.forwardFun.frag.out index f166286586..77f3941685 100644 --- a/Test/baseResults/spv.forwardFun.frag.out +++ b/Test/baseResults/spv.forwardFun.frag.out @@ -1,6 +1,6 @@ spv.forwardFun.frag // Module Version 10000 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 60 Capability Shader diff --git a/Test/baseResults/spv.fragmentDensity-es.frag.out b/Test/baseResults/spv.fragmentDensity-es.frag.out index 253ce2ee3f..fb1407e4e0 100644 --- a/Test/baseResults/spv.fragmentDensity-es.frag.out +++ b/Test/baseResults/spv.fragmentDensity-es.frag.out @@ -1,6 +1,6 @@ spv.fragmentDensity-es.frag // Module Version 10000 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 18 Capability Shader diff --git a/Test/baseResults/spv.fragmentDensity.frag.out b/Test/baseResults/spv.fragmentDensity.frag.out index 4c831f29d8..43261cd1ad 100644 --- a/Test/baseResults/spv.fragmentDensity.frag.out +++ b/Test/baseResults/spv.fragmentDensity.frag.out @@ -1,6 +1,6 @@ spv.fragmentDensity.frag // Module Version 10000 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 21 Capability Shader diff --git a/Test/baseResults/spv.fragmentShaderBarycentric.frag.out b/Test/baseResults/spv.fragmentShaderBarycentric.frag.out index ef800bdd01..29b290bbf4 100644 --- a/Test/baseResults/spv.fragmentShaderBarycentric.frag.out +++ b/Test/baseResults/spv.fragmentShaderBarycentric.frag.out @@ -1,6 +1,6 @@ spv.fragmentShaderBarycentric.frag // Module Version 10000 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 43 Capability Shader diff --git a/Test/baseResults/spv.fragmentShaderBarycentric2.frag.out b/Test/baseResults/spv.fragmentShaderBarycentric2.frag.out index c09767631f..18f0ca376c 100644 --- a/Test/baseResults/spv.fragmentShaderBarycentric2.frag.out +++ b/Test/baseResults/spv.fragmentShaderBarycentric2.frag.out @@ -1,14 +1,14 @@ spv.fragmentShaderBarycentric2.frag // Module Version 10000 -// Generated by (magic number): 8000a -// Id's are bound by 42 +// Generated by (magic number): 8000b +// Id's are bound by 62 Capability Shader Capability FragmentBarycentricKHR Extension "SPV_NV_fragment_shader_barycentric" 1: ExtInstImport "GLSL.std.450" MemoryModel Logical GLSL450 - EntryPoint Fragment 4 "main" 8 11 20 + EntryPoint Fragment 4 "main" 8 11 20 44 ExecutionMode 4 OriginUpperLeft Source ESSL 320 SourceExtension "GL_NV_fragment_shader_barycentric" @@ -16,10 +16,13 @@ spv.fragmentShaderBarycentric2.frag Name 8 "value" Name 11 "gl_BaryCoordNoPerspNV" Name 20 "vertexIDs" + Name 44 "vertexIDs2" Decorate 8(value) Location 1 Decorate 11(gl_BaryCoordNoPerspNV) BuiltIn BaryCoordNoPerspKHR Decorate 20(vertexIDs) Location 0 Decorate 20(vertexIDs) PerVertexKHR + Decorate 44(vertexIDs2) Location 1 + Decorate 44(vertexIDs2) PerVertexKHR 2: TypeVoid 3: TypeFunction 2 6: TypeFloat 32 @@ -41,6 +44,7 @@ spv.fragmentShaderBarycentric2.frag 29: 21(int) Constant 1 34: 12(int) Constant 2 37: 21(int) Constant 2 + 44(vertexIDs2): 19(ptr) Variable Input 4(main): 2 Function None 3 5: Label 15: 14(ptr) AccessChain 11(gl_BaryCoordNoPerspNV) 13 @@ -61,5 +65,25 @@ spv.fragmentShaderBarycentric2.frag 40: 6(float) FMul 36 39 41: 6(float) FAdd 33 40 Store 8(value) 41 + 42: 14(ptr) AccessChain 11(gl_BaryCoordNoPerspNV) 13 + 43: 6(float) Load 42 + 45: 14(ptr) AccessChain 44(vertexIDs2) 22 + 46: 6(float) Load 45 + 47: 6(float) FMul 43 46 + 48: 14(ptr) AccessChain 11(gl_BaryCoordNoPerspNV) 26 + 49: 6(float) Load 48 + 50: 14(ptr) AccessChain 44(vertexIDs2) 29 + 51: 6(float) Load 50 + 52: 6(float) FMul 49 51 + 53: 6(float) FAdd 47 52 + 54: 14(ptr) AccessChain 11(gl_BaryCoordNoPerspNV) 34 + 55: 6(float) Load 54 + 56: 14(ptr) AccessChain 44(vertexIDs2) 37 + 57: 6(float) Load 56 + 58: 6(float) FMul 55 57 + 59: 6(float) FAdd 53 58 + 60: 6(float) Load 8(value) + 61: 6(float) FAdd 60 59 + Store 8(value) 61 Return FunctionEnd diff --git a/Test/baseResults/spv.fragmentShaderBarycentric3.frag.out b/Test/baseResults/spv.fragmentShaderBarycentric3.frag.out index 7fe21b34a0..60badf612d 100644 --- a/Test/baseResults/spv.fragmentShaderBarycentric3.frag.out +++ b/Test/baseResults/spv.fragmentShaderBarycentric3.frag.out @@ -1,6 +1,6 @@ spv.fragmentShaderBarycentric3.frag // Module Version 10000 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 43 Capability Shader diff --git a/Test/baseResults/spv.fragmentShaderBarycentric4.frag.out b/Test/baseResults/spv.fragmentShaderBarycentric4.frag.out index aaac6a4427..fc0e57648a 100644 --- a/Test/baseResults/spv.fragmentShaderBarycentric4.frag.out +++ b/Test/baseResults/spv.fragmentShaderBarycentric4.frag.out @@ -1,14 +1,14 @@ spv.fragmentShaderBarycentric4.frag // Module Version 10000 -// Generated by (magic number): 8000a -// Id's are bound by 42 +// Generated by (magic number): 8000b +// Id's are bound by 62 Capability Shader Capability FragmentBarycentricKHR Extension "SPV_KHR_fragment_shader_barycentric" 1: ExtInstImport "GLSL.std.450" MemoryModel Logical GLSL450 - EntryPoint Fragment 4 "main" 8 11 20 + EntryPoint Fragment 4 "main" 8 11 20 44 ExecutionMode 4 OriginUpperLeft Source ESSL 320 SourceExtension "GL_EXT_fragment_shader_barycentric" @@ -16,10 +16,13 @@ spv.fragmentShaderBarycentric4.frag Name 8 "value" Name 11 "gl_BaryCoordNoPerspEXT" Name 20 "vertexIDs" + Name 44 "vertexIDs2" Decorate 8(value) Location 1 Decorate 11(gl_BaryCoordNoPerspEXT) BuiltIn BaryCoordNoPerspKHR Decorate 20(vertexIDs) Location 0 Decorate 20(vertexIDs) PerVertexKHR + Decorate 44(vertexIDs2) Location 1 + Decorate 44(vertexIDs2) PerVertexKHR 2: TypeVoid 3: TypeFunction 2 6: TypeFloat 32 @@ -41,6 +44,7 @@ spv.fragmentShaderBarycentric4.frag 29: 21(int) Constant 1 34: 12(int) Constant 2 37: 21(int) Constant 2 + 44(vertexIDs2): 19(ptr) Variable Input 4(main): 2 Function None 3 5: Label 15: 14(ptr) AccessChain 11(gl_BaryCoordNoPerspEXT) 13 @@ -61,5 +65,25 @@ spv.fragmentShaderBarycentric4.frag 40: 6(float) FMul 36 39 41: 6(float) FAdd 33 40 Store 8(value) 41 + 42: 14(ptr) AccessChain 11(gl_BaryCoordNoPerspEXT) 13 + 43: 6(float) Load 42 + 45: 14(ptr) AccessChain 44(vertexIDs2) 22 + 46: 6(float) Load 45 + 47: 6(float) FMul 43 46 + 48: 14(ptr) AccessChain 11(gl_BaryCoordNoPerspEXT) 26 + 49: 6(float) Load 48 + 50: 14(ptr) AccessChain 44(vertexIDs2) 29 + 51: 6(float) Load 50 + 52: 6(float) FMul 49 51 + 53: 6(float) FAdd 47 52 + 54: 14(ptr) AccessChain 11(gl_BaryCoordNoPerspEXT) 34 + 55: 6(float) Load 54 + 56: 14(ptr) AccessChain 44(vertexIDs2) 37 + 57: 6(float) Load 56 + 58: 6(float) FMul 55 57 + 59: 6(float) FAdd 53 58 + 60: 6(float) Load 8(value) + 61: 6(float) FAdd 60 59 + Store 8(value) 61 Return FunctionEnd diff --git a/Test/baseResults/spv.fsi.frag.out b/Test/baseResults/spv.fsi.frag.out index 3e06aed0d4..1b5fbf4762 100644 --- a/Test/baseResults/spv.fsi.frag.out +++ b/Test/baseResults/spv.fsi.frag.out @@ -1,6 +1,6 @@ spv.fsi.frag // Module Version 10000 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 24 Capability Shader diff --git a/Test/baseResults/spv.fullyCovered.frag.out b/Test/baseResults/spv.fullyCovered.frag.out index ae7b426c94..cd730a4840 100644 --- a/Test/baseResults/spv.fullyCovered.frag.out +++ b/Test/baseResults/spv.fullyCovered.frag.out @@ -1,6 +1,6 @@ spv.fullyCovered.frag // Module Version 10000 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 18 Capability Shader diff --git a/Test/baseResults/spv.funcall.array.frag.out b/Test/baseResults/spv.funcall.array.frag.out index 616ba16c02..b4e2bfbe55 100644 --- a/Test/baseResults/spv.funcall.array.frag.out +++ b/Test/baseResults/spv.funcall.array.frag.out @@ -1,6 +1,6 @@ spv.funcall.array.frag // Module Version 10000 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 66 Capability Shader diff --git a/Test/baseResults/spv.functionCall.frag.out b/Test/baseResults/spv.functionCall.frag.out index 58b046106d..52d167c357 100644 --- a/Test/baseResults/spv.functionCall.frag.out +++ b/Test/baseResults/spv.functionCall.frag.out @@ -4,7 +4,7 @@ WARNING: 0:4: varying deprecated in version 130; may be removed in future releas WARNING: 0:5: varying deprecated in version 130; may be removed in future release // Module Version 10000 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 76 Capability Shader diff --git a/Test/baseResults/spv.functionNestedOpaque.vert.out b/Test/baseResults/spv.functionNestedOpaque.vert.out index 96a64aa3e2..58787600fb 100644 --- a/Test/baseResults/spv.functionNestedOpaque.vert.out +++ b/Test/baseResults/spv.functionNestedOpaque.vert.out @@ -1,7 +1,7 @@ spv.functionNestedOpaque.vert Validation failed // Module Version 10000 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 39 Capability Shader diff --git a/Test/baseResults/spv.functionParameterTypes.frag.out b/Test/baseResults/spv.functionParameterTypes.frag.out index 65a33da28c..19f5429278 100644 --- a/Test/baseResults/spv.functionParameterTypes.frag.out +++ b/Test/baseResults/spv.functionParameterTypes.frag.out @@ -1,6 +1,6 @@ spv.functionParameterTypes.frag // Module Version 10000 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 34 Capability Shader diff --git a/Test/baseResults/spv.functionSemantics.frag.out b/Test/baseResults/spv.functionSemantics.frag.out index f12aae0976..dc8520d375 100644 --- a/Test/baseResults/spv.functionSemantics.frag.out +++ b/Test/baseResults/spv.functionSemantics.frag.out @@ -1,6 +1,6 @@ spv.functionSemantics.frag // Module Version 10000 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 156 Capability Shader diff --git a/Test/baseResults/spv.glFragColor.frag.out b/Test/baseResults/spv.glFragColor.frag.out index df39129855..033769ffc5 100644 --- a/Test/baseResults/spv.glFragColor.frag.out +++ b/Test/baseResults/spv.glFragColor.frag.out @@ -1,6 +1,6 @@ spv.glFragColor.frag // Module Version 10000 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 12 Capability Shader diff --git a/Test/baseResults/spv.glsl.register.autoassign.frag.out b/Test/baseResults/spv.glsl.register.autoassign.frag.out index 01df400f4b..041edb9794 100644 --- a/Test/baseResults/spv.glsl.register.autoassign.frag.out +++ b/Test/baseResults/spv.glsl.register.autoassign.frag.out @@ -1,6 +1,6 @@ spv.glsl.register.autoassign.frag // Module Version 10000 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 142 Capability Shader diff --git a/Test/baseResults/spv.glsl.register.noautoassign.frag.out b/Test/baseResults/spv.glsl.register.noautoassign.frag.out index e475a0086e..ccf688045b 100644 --- a/Test/baseResults/spv.glsl.register.noautoassign.frag.out +++ b/Test/baseResults/spv.glsl.register.noautoassign.frag.out @@ -1,6 +1,6 @@ spv.glsl.register.noautoassign.frag // Module Version 10000 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 142 Capability Shader diff --git a/Test/baseResults/spv.hlslDebugInfo.frag.out b/Test/baseResults/spv.hlslDebugInfo.frag.out index 9ce266dbfe..d68c0546af 100644 --- a/Test/baseResults/spv.hlslDebugInfo.frag.out +++ b/Test/baseResults/spv.hlslDebugInfo.frag.out @@ -1,6 +1,6 @@ spv.hlslDebugInfo.vert // Module Version 10000 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 19 Capability Shader diff --git a/Test/baseResults/spv.hlslOffsets.vert.out b/Test/baseResults/spv.hlslOffsets.vert.out index cc71283910..d2d6443c52 100644 --- a/Test/baseResults/spv.hlslOffsets.vert.out +++ b/Test/baseResults/spv.hlslOffsets.vert.out @@ -18,7 +18,7 @@ Shader version: 450 0:? 'anon@0' (layout( binding=0 column_major std430) buffer block{layout( column_major std430) buffer highp float m0, layout( column_major std430) buffer highp 3-component vector of float m4, layout( column_major std430) buffer highp float m16, layout( column_major std430 offset=20) buffer highp 3-component vector of float m20, layout( column_major std430) buffer highp 3-component vector of float m32, layout( column_major std430) buffer highp 2-component vector of float m48, layout( column_major std430) buffer highp 2-component vector of float m56, layout( column_major std430) buffer highp float m64, layout( column_major std430) buffer highp 2-component vector of float m68, layout( column_major std430) buffer highp float m76, layout( column_major std430) buffer highp float m80, layout( column_major std430 offset=88) buffer highp 2-component vector of float m88, layout( column_major std430) buffer highp 2-component vector of float m96, layout( column_major std430) buffer 2-component vector of double m112}) // Module Version 10000 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 14 Capability Shader diff --git a/Test/baseResults/spv.image.frag.out b/Test/baseResults/spv.image.frag.out index 5fbb922e12..f71a1cc26f 100644 --- a/Test/baseResults/spv.image.frag.out +++ b/Test/baseResults/spv.image.frag.out @@ -1,7 +1,7 @@ spv.image.frag Validation failed // Module Version 10000 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 405 Capability Shader diff --git a/Test/baseResults/spv.imageAtomic64.comp.out b/Test/baseResults/spv.imageAtomic64.comp.out index 0b1a0939c7..4317ae05f4 100644 --- a/Test/baseResults/spv.imageAtomic64.comp.out +++ b/Test/baseResults/spv.imageAtomic64.comp.out @@ -1,6 +1,6 @@ spv.imageAtomic64.comp // Module Version 10000 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 28 Capability Shader diff --git a/Test/baseResults/spv.imageAtomic64.frag.out b/Test/baseResults/spv.imageAtomic64.frag.out index 30836978d6..1c002ab210 100644 --- a/Test/baseResults/spv.imageAtomic64.frag.out +++ b/Test/baseResults/spv.imageAtomic64.frag.out @@ -1,7 +1,7 @@ spv.imageAtomic64.frag Validation failed // Module Version 10000 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 503 Capability Shader diff --git a/Test/baseResults/spv.imageLoadStoreLod.frag.out b/Test/baseResults/spv.imageLoadStoreLod.frag.out index b809474276..4a16d75a9d 100644 --- a/Test/baseResults/spv.imageLoadStoreLod.frag.out +++ b/Test/baseResults/spv.imageLoadStoreLod.frag.out @@ -1,6 +1,6 @@ spv.imageLoadStoreLod.frag // Module Version 10000 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 148 Capability Shader diff --git a/Test/baseResults/spv.int16.amd.frag.out b/Test/baseResults/spv.int16.amd.frag.out index 676d99c1b7..53f5537796 100644 --- a/Test/baseResults/spv.int16.amd.frag.out +++ b/Test/baseResults/spv.int16.amd.frag.out @@ -1,6 +1,6 @@ spv.int16.amd.frag // Module Version 10000 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 576 Capability Shader diff --git a/Test/baseResults/spv.int16.frag.out b/Test/baseResults/spv.int16.frag.out index 3e10a7db24..ed788f87ab 100644 --- a/Test/baseResults/spv.int16.frag.out +++ b/Test/baseResults/spv.int16.frag.out @@ -1,6 +1,6 @@ spv.int16.frag // Module Version 10000 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 549 Capability Shader diff --git a/Test/baseResults/spv.int32.frag.out b/Test/baseResults/spv.int32.frag.out index af232ec3cd..2c260dd2b1 100644 --- a/Test/baseResults/spv.int32.frag.out +++ b/Test/baseResults/spv.int32.frag.out @@ -1,6 +1,6 @@ spv.int32.frag // Module Version 10300 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 505 Capability Shader diff --git a/Test/baseResults/spv.int64.frag.out b/Test/baseResults/spv.int64.frag.out index f2fd600f45..e335a54328 100644 --- a/Test/baseResults/spv.int64.frag.out +++ b/Test/baseResults/spv.int64.frag.out @@ -1,7 +1,7 @@ spv.int64.frag Validation failed // Module Version 10000 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 513 Capability Shader diff --git a/Test/baseResults/spv.int8.frag.out b/Test/baseResults/spv.int8.frag.out index e9cd5f8653..3bfeb1a49a 100644 --- a/Test/baseResults/spv.int8.frag.out +++ b/Test/baseResults/spv.int8.frag.out @@ -1,6 +1,6 @@ spv.int8.frag // Module Version 10300 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 544 Capability Shader diff --git a/Test/baseResults/spv.intOps.vert.out b/Test/baseResults/spv.intOps.vert.out index b57eac2b5c..67b11d2c86 100644 --- a/Test/baseResults/spv.intOps.vert.out +++ b/Test/baseResults/spv.intOps.vert.out @@ -1,6 +1,6 @@ spv.intOps.vert // Module Version 10000 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 302 Capability Shader diff --git a/Test/baseResults/spv.intcoopmat.comp.out b/Test/baseResults/spv.intcoopmat.comp.out index 6a69743234..24289a9f9a 100644 --- a/Test/baseResults/spv.intcoopmat.comp.out +++ b/Test/baseResults/spv.intcoopmat.comp.out @@ -1,10 +1,11 @@ spv.intcoopmat.comp // Module Version 10000 -// Generated by (magic number): 8000a -// Id's are bound by 262 +// Generated by (magic number): 8000b +// Id's are bound by 286 Capability Shader Capability Float16 + Capability Int16 Capability Int8 Capability StorageBuffer8BitAccess Capability VulkanMemoryModelKHR @@ -72,18 +73,22 @@ spv.intcoopmat.comp Name 207 "tempArg" Name 212 "shmatrix" Name 217 "ms" - Name 225 "miC" - Name 226 "muC" - Name 231 "iarr" - Name 236 "iarr2" - Name 241 "uarr" - Name 246 "uarr2" - Name 251 "S" - MemberName 251(S) 0 "a" - MemberName 251(S) 1 "b" - MemberName 251(S) 2 "c" - Name 256 "SC" - Name 261 "scm" + Name 224 "i16" + Name 230 "u16" + Name 233 "tempArg" + Name 239 "tempArg" + Name 249 "miC" + Name 250 "muC" + Name 255 "iarr" + Name 260 "iarr2" + Name 265 "uarr" + Name 270 "uarr2" + Name 275 "S" + MemberName 275(S) 0 "a" + MemberName 275(S) 1 "b" + MemberName 275(S) 2 "c" + Name 280 "SC" + Name 285 "scm" Decorate 83 ArrayStride 4 Decorate 84 ArrayStride 4 MemberDecorate 85(Block) 0 Offset 0 @@ -105,8 +110,8 @@ spv.intcoopmat.comp Decorate 108(block8) DescriptorSet 0 Decorate 108(block8) Binding 0 Decorate 156(Y) SpecId 0 - Decorate 223 BuiltIn WorkgroupSize - Decorate 256(SC) SpecId 2 + Decorate 247 BuiltIn WorkgroupSize + Decorate 280(SC) SpecId 2 2: TypeVoid 3: TypeFunction 2 6: TypeInt 8 1 @@ -196,47 +201,57 @@ spv.intcoopmat.comp 212(shmatrix): 211(ptr) Variable Workgroup 213: 7(int) Constant 2 214: TypePointer Workgroup 208(ivec4) - 221: TypeVector 7(int) 3 - 222: 7(int) Constant 64 - 223: 221(ivec3) ConstantComposite 222 100 100 - 224: TypePointer Private 166 - 225(miC): 224(ptr) Variable Private - 226(muC): 162(ptr) Variable Private - 227: 7(int) SpecConstantOp 5362 166 - 228: 72(int) SpecConstantOp 128 227 76 - 229: TypeArray 72(int) 228 - 230: TypePointer Private 229 - 231(iarr): 230(ptr) Variable Private - 232: 7(int) SpecConstantOp 5362 166 - 233: 72(int) SpecConstantOp 128 232 76 - 234: TypeArray 72(int) 233 - 235: TypePointer Private 234 - 236(iarr2): 235(ptr) Variable Private - 237: 7(int) SpecConstantOp 5362 158 - 238: 72(int) SpecConstantOp 128 237 76 - 239: TypeArray 72(int) 238 - 240: TypePointer Private 239 - 241(uarr): 240(ptr) Variable Private - 242: 7(int) SpecConstantOp 5362 158 - 243: 72(int) SpecConstantOp 128 242 76 - 244: TypeArray 72(int) 243 - 245: TypePointer Private 244 - 246(uarr2): 245(ptr) Variable Private - 247: TypeCooperativeMatrixNV 72(int) 8 157(Z) 9 - 248: 247 ConstantComposite 73 - 249: 16(int8_t) Constant 1 - 250: 17 ConstantComposite 249 - 251(S): TypeStruct 72(int) 72(int) 72(int) - 252: 72(int) Constant 12 - 253: 72(int) Constant 23 - 254: 72(int) Constant 34 - 255: 251(S) ConstantComposite 252 253 254 - 256(SC): 72(int) SpecConstant 1 - 257: TypeCooperativeMatrixNV 7(int) 8 256(SC) 256(SC) - 258: TypeArray 257 256(SC) - 259: TypeArray 258 256(SC) - 260: TypePointer Private 259 - 261(scm): 260(ptr) Variable Private + 221: TypeInt 16 1 + 222: TypeCooperativeMatrixNV 221(int16_t) 8 32 9 + 223: TypePointer Function 222 + 225:221(int16_t) Constant 0 + 226: 222 ConstantComposite 225 + 227: TypeInt 16 0 + 228: TypeCooperativeMatrixNV 227(int16_t) 8 32 9 + 229: TypePointer Function 228 + 231:227(int16_t) Constant 0 + 232: 228 ConstantComposite 231 + 245: TypeVector 7(int) 3 + 246: 7(int) Constant 64 + 247: 245(ivec3) ConstantComposite 246 100 100 + 248: TypePointer Private 166 + 249(miC): 248(ptr) Variable Private + 250(muC): 162(ptr) Variable Private + 251: 7(int) SpecConstantOp 5362 166 + 252: 72(int) SpecConstantOp 128 251 76 + 253: TypeArray 72(int) 252 + 254: TypePointer Private 253 + 255(iarr): 254(ptr) Variable Private + 256: 7(int) SpecConstantOp 5362 166 + 257: 72(int) SpecConstantOp 128 256 76 + 258: TypeArray 72(int) 257 + 259: TypePointer Private 258 + 260(iarr2): 259(ptr) Variable Private + 261: 7(int) SpecConstantOp 5362 158 + 262: 72(int) SpecConstantOp 128 261 76 + 263: TypeArray 72(int) 262 + 264: TypePointer Private 263 + 265(uarr): 264(ptr) Variable Private + 266: 7(int) SpecConstantOp 5362 158 + 267: 72(int) SpecConstantOp 128 266 76 + 268: TypeArray 72(int) 267 + 269: TypePointer Private 268 + 270(uarr2): 269(ptr) Variable Private + 271: TypeCooperativeMatrixNV 72(int) 8 157(Z) 9 + 272: 271 ConstantComposite 73 + 273: 16(int8_t) Constant 1 + 274: 17 ConstantComposite 273 + 275(S): TypeStruct 72(int) 72(int) 72(int) + 276: 72(int) Constant 12 + 277: 72(int) Constant 23 + 278: 72(int) Constant 34 + 279: 275(S) ConstantComposite 276 277 278 + 280(SC): 72(int) SpecConstant 1 + 281: TypeCooperativeMatrixNV 7(int) 8 280(SC) 280(SC) + 282: TypeArray 281 280(SC) + 283: TypeArray 282 280(SC) + 284: TypePointer Private 283 + 285(scm): 284(ptr) Variable Private 4(main): 2 Function None 3 5: Label 35(mu): 34(ptr) Variable Function @@ -264,6 +279,10 @@ spv.intcoopmat.comp 193(param): 18(ptr) Variable Function 207(tempArg): 38(ptr) Variable Function 217(ms): 38(ptr) Variable Function + 224(i16): 223(ptr) Variable Function + 230(u16): 229(ptr) Variable Function + 233(tempArg): 223(ptr) Variable Function + 239(tempArg): 229(ptr) Variable Function Store 35(mu) 36 Store 39(mi) 41 42: 33 Load 35(mu) @@ -400,6 +419,24 @@ spv.intcoopmat.comp 219: 37 Load 217(ms) 220: 214(ptr) AccessChain 212(shmatrix) 100 CooperativeMatrixStoreNV 220 219 213 93 MakePointerAvailableKHR NonPrivatePointerKHR 213 + Store 224(i16) 226 + Store 230(u16) 232 + 234: 214(ptr) AccessChain 212(shmatrix) 100 + 235: 222 CooperativeMatrixLoadNV 234 213 93 MakePointerVisibleKHR NonPrivatePointerKHR 213 + Store 233(tempArg) 235 + 236: 222 Load 233(tempArg) + Store 224(i16) 236 + 237: 222 Load 224(i16) + 238: 214(ptr) AccessChain 212(shmatrix) 100 + CooperativeMatrixStoreNV 238 237 213 93 MakePointerAvailableKHR NonPrivatePointerKHR 213 + 240: 214(ptr) AccessChain 212(shmatrix) 100 + 241: 228 CooperativeMatrixLoadNV 240 213 93 MakePointerVisibleKHR NonPrivatePointerKHR 213 + Store 239(tempArg) 241 + 242: 228 Load 239(tempArg) + Store 230(u16) 242 + 243: 228 Load 230(u16) + 244: 214(ptr) AccessChain 212(shmatrix) 100 + CooperativeMatrixStoreNV 244 243 213 93 MakePointerAvailableKHR NonPrivatePointerKHR 213 Return FunctionEnd 14(ineg(i81;): 10 Function None 12 diff --git a/Test/baseResults/spv.interpOps.frag.out b/Test/baseResults/spv.interpOps.frag.out index 808c1cdb69..62bd2b62c6 100644 --- a/Test/baseResults/spv.interpOps.frag.out +++ b/Test/baseResults/spv.interpOps.frag.out @@ -1,6 +1,6 @@ spv.interpOps.frag // Module Version 10000 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 120 Capability Shader diff --git a/Test/baseResults/spv.intrinsicsFakeEnable.vert.out b/Test/baseResults/spv.intrinsicsFakeEnable.vert.out new file mode 100644 index 0000000000..da1cbf7656 --- /dev/null +++ b/Test/baseResults/spv.intrinsicsFakeEnable.vert.out @@ -0,0 +1,6 @@ +spv.intrinsicsFakeEnable.vert +ERROR: 0:7: 'location' : overlapping use of location 0 +ERROR: 1 compilation errors. No code generated. + + +SPIR-V is not generated for failed compile or link diff --git a/Test/baseResults/spv.intrinsicsSpirvByReference.vert.out b/Test/baseResults/spv.intrinsicsSpirvByReference.vert.out index d46b33f8dd..e15bb576f1 100644 --- a/Test/baseResults/spv.intrinsicsSpirvByReference.vert.out +++ b/Test/baseResults/spv.intrinsicsSpirvByReference.vert.out @@ -1,6 +1,6 @@ spv.intrinsicsSpirvByReference.vert // Module Version 10000 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 30 Capability Shader diff --git a/Test/baseResults/spv.intrinsicsSpirvDecorate.frag.out b/Test/baseResults/spv.intrinsicsSpirvDecorate.frag.out index c41dcc9c99..b926c5195e 100644 --- a/Test/baseResults/spv.intrinsicsSpirvDecorate.frag.out +++ b/Test/baseResults/spv.intrinsicsSpirvDecorate.frag.out @@ -1,6 +1,6 @@ spv.intrinsicsSpirvDecorate.frag // Module Version 10000 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 43 Capability Shader diff --git a/Test/baseResults/spv.intrinsicsSpirvDecorateId.comp.out b/Test/baseResults/spv.intrinsicsSpirvDecorateId.comp.out new file mode 100644 index 0000000000..c454dc609e --- /dev/null +++ b/Test/baseResults/spv.intrinsicsSpirvDecorateId.comp.out @@ -0,0 +1,46 @@ +spv.intrinsicsSpirvDecorateId.comp +// Module Version 10000 +// Generated by (magic number): 8000b +// Id's are bound by 16 + + Capability Shader + Extension "SPV_GOOGLE_hlsl_functionality1" + 1: ExtInstImport "GLSL.std.450" + MemoryModel Logical GLSL450 + EntryPoint GLCompute 4 "main" + ExecutionMode 4 LocalSize 1 1 1 + Source GLSL 460 + SourceExtension "GL_EXT_spirv_intrinsics" + Name 4 "main" + Name 10 "CounterBuffer" + MemberName 10(CounterBuffer) 0 "counter" + Name 12 "x" + Name 13 "Uniform" + MemberName 13(Uniform) 0 "y" + Name 15 "" + Decorate 9 BuiltIn WorkgroupSize + MemberDecorate 10(CounterBuffer) 0 Offset 0 + Decorate 10(CounterBuffer) Block + Decorate 12(x) DescriptorSet 0 + Decorate 12(x) Binding 1 + MemberDecorate 13(Uniform) 0 Offset 0 + Decorate 13(Uniform) Block + Decorate 15 DescriptorSet 0 + Decorate 15 Binding 0 + DecorateId 15 DecorationHlslCounterBufferGOOGLE 12(x) + 2: TypeVoid + 3: TypeFunction 2 + 6: TypeInt 32 0 + 7: TypeVector 6(int) 3 + 8: 6(int) Constant 1 + 9: 7(ivec3) ConstantComposite 8 8 8 +10(CounterBuffer): TypeStruct 6(int) + 11: TypePointer Uniform 10(CounterBuffer) + 12(x): 11(ptr) Variable Uniform + 13(Uniform): TypeStruct 6(int) + 14: TypePointer Uniform 13(Uniform) + 15: 14(ptr) Variable Uniform + 4(main): 2 Function None 3 + 5: Label + Return + FunctionEnd diff --git a/Test/baseResults/spv.intrinsicsSpirvDecorateString.comp.out b/Test/baseResults/spv.intrinsicsSpirvDecorateString.comp.out new file mode 100644 index 0000000000..87225b876d --- /dev/null +++ b/Test/baseResults/spv.intrinsicsSpirvDecorateString.comp.out @@ -0,0 +1,39 @@ +spv.intrinsicsSpirvDecorateString.comp +// Module Version 10000 +// Generated by (magic number): 8000b +// Id's are bound by 16 + + Capability Shader + Extension "SPV_GOOGLE_hlsl_functionality1" + 1: ExtInstImport "GLSL.std.450" + MemoryModel Logical GLSL450 + EntryPoint GLCompute 4 "main" + ExecutionMode 4 LocalSize 1 1 1 + Source GLSL 460 + SourceExtension "GL_EXT_spirv_intrinsics" + Name 4 "main" + Name 8 "x" + Name 10 "y" + Decorate 8(x) RelaxedPrecision + DecorateStringGOOGLE 8(x) DecorationHlslSemanticGOOGLE "foobar" + Decorate 10(y) RelaxedPrecision + DecorateStringGOOGLE 10(y) DecorationHlslSemanticGOOGLE "foobar" + Decorate 15 BuiltIn WorkgroupSize + 2: TypeVoid + 3: TypeFunction 2 + 6: TypeFloat 32 + 7: TypePointer Function 6(float) + 9: 6(float) Constant 1056964608 + 11: 6(float) Constant 1065353216 + 12: TypeInt 32 0 + 13: TypeVector 12(int) 3 + 14: 12(int) Constant 1 + 15: 13(ivec3) ConstantComposite 14 14 14 + 4(main): 2 Function None 3 + 5: Label + 8(x): 7(ptr) Variable Function + 10(y): 7(ptr) Variable Function + Store 8(x) 9 + Store 10(y) 11 + Return + FunctionEnd diff --git a/Test/baseResults/spv.intrinsicsSpirvExecutionMode.frag.out b/Test/baseResults/spv.intrinsicsSpirvExecutionMode.frag.out index cdea3820e9..d5f935b51e 100644 --- a/Test/baseResults/spv.intrinsicsSpirvExecutionMode.frag.out +++ b/Test/baseResults/spv.intrinsicsSpirvExecutionMode.frag.out @@ -1,6 +1,6 @@ spv.intrinsicsSpirvExecutionMode.frag // Module Version 10000 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 12 Capability Shader diff --git a/Test/baseResults/spv.intrinsicsSpirvInstruction.vert.out b/Test/baseResults/spv.intrinsicsSpirvInstruction.vert.out index 0e95e42b03..3103505933 100644 --- a/Test/baseResults/spv.intrinsicsSpirvInstruction.vert.out +++ b/Test/baseResults/spv.intrinsicsSpirvInstruction.vert.out @@ -1,6 +1,6 @@ spv.intrinsicsSpirvInstruction.vert // Module Version 10000 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 32 Capability Shader diff --git a/Test/baseResults/spv.intrinsicsSpirvLiteral.vert.out b/Test/baseResults/spv.intrinsicsSpirvLiteral.vert.out index 096cc61179..48eef5eb89 100644 --- a/Test/baseResults/spv.intrinsicsSpirvLiteral.vert.out +++ b/Test/baseResults/spv.intrinsicsSpirvLiteral.vert.out @@ -1,6 +1,6 @@ spv.intrinsicsSpirvLiteral.vert // Module Version 10000 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 13 Capability Shader diff --git a/Test/baseResults/spv.intrinsicsSpirvStorageClass.rchit.out b/Test/baseResults/spv.intrinsicsSpirvStorageClass.rchit.out index 4be5b91453..3bf1394cf9 100644 --- a/Test/baseResults/spv.intrinsicsSpirvStorageClass.rchit.out +++ b/Test/baseResults/spv.intrinsicsSpirvStorageClass.rchit.out @@ -1,6 +1,6 @@ spv.intrinsicsSpirvStorageClass.rchit // Module Version 10000 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 13 Capability RayTracingKHR diff --git a/Test/baseResults/spv.intrinsicsSpirvType.rgen.out b/Test/baseResults/spv.intrinsicsSpirvType.rgen.out index f3937b495a..5d67de7085 100644 --- a/Test/baseResults/spv.intrinsicsSpirvType.rgen.out +++ b/Test/baseResults/spv.intrinsicsSpirvType.rgen.out @@ -1,6 +1,6 @@ spv.intrinsicsSpirvType.rgen // Module Version 10000 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 21 Capability RayQueryKHR diff --git a/Test/baseResults/spv.intrinsicsSpirvTypeLocalVar.vert.out b/Test/baseResults/spv.intrinsicsSpirvTypeLocalVar.vert.out index 75515be080..248af0831f 100644 --- a/Test/baseResults/spv.intrinsicsSpirvTypeLocalVar.vert.out +++ b/Test/baseResults/spv.intrinsicsSpirvTypeLocalVar.vert.out @@ -1,6 +1,6 @@ spv.intrinsicsSpirvTypeLocalVar.vert // Module Version 10000 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 22 Capability Shader diff --git a/Test/baseResults/spv.intrinsicsSpirvTypeWithTypeSpecifier.vert.out b/Test/baseResults/spv.intrinsicsSpirvTypeWithTypeSpecifier.vert.out new file mode 100644 index 0000000000..580c704d21 --- /dev/null +++ b/Test/baseResults/spv.intrinsicsSpirvTypeWithTypeSpecifier.vert.out @@ -0,0 +1,35 @@ +spv.intrinsicsSpirvTypeWithTypeSpecifier.vert +// Module Version 10000 +// Generated by (magic number): 8000b +// Id's are bound by 14 + + Capability Shader + Capability Int64 + Capability PhysicalStorageBufferAddressesEXT + Extension "SPV_EXT_physical_storage_buffer" + Extension "SPV_KHR_physical_storage_buffer" + Extension "SPV_KHR_variable_pointers" + 1: ExtInstImport "GLSL.std.450" + MemoryModel PhysicalStorageBuffer64EXT GLSL450 + EntryPoint Vertex 4 "main" + Source GLSL 450 + SourceExtension "GL_ARB_gpu_shader_int64" + SourceExtension "GL_EXT_buffer_reference" + SourceExtension "GL_EXT_spirv_intrinsics" + Name 4 "main" + Name 8 "value" + 2: TypeVoid + 3: TypeFunction 2 + 6: TypeInt 32 0 + 7: TypePointer Function 6(int) + 9: TypeInt 64 0 + 10: 9(int64_t) Constant 1 0 + 11: TypePointer PhysicalStorageBufferEXT 6(int) + 4(main): 2 Function None 3 + 5: Label + 8(value): 7(ptr) Variable Function + 12: 11(ptr) ConvertUToPtr 10 + 13: 6(int) Load 12 Aligned 32 + Store 8(value) 13 + Return + FunctionEnd diff --git a/Test/baseResults/spv.invariantAll.vert.out b/Test/baseResults/spv.invariantAll.vert.out index ec5ad30aca..d1703dca7a 100644 --- a/Test/baseResults/spv.invariantAll.vert.out +++ b/Test/baseResults/spv.invariantAll.vert.out @@ -1,6 +1,6 @@ spv.invariantAll.vert // Module Version 10000 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 25 Capability Shader diff --git a/Test/baseResults/spv.layer.tese.out b/Test/baseResults/spv.layer.tese.out index 906340fe8c..fb78e63cf0 100644 --- a/Test/baseResults/spv.layer.tese.out +++ b/Test/baseResults/spv.layer.tese.out @@ -1,6 +1,6 @@ spv.layer.tese // Module Version 10000 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 10 Capability Tessellation diff --git a/Test/baseResults/spv.layoutNested.vert.out b/Test/baseResults/spv.layoutNested.vert.out index 7de04d406a..2d5111c523 100644 --- a/Test/baseResults/spv.layoutNested.vert.out +++ b/Test/baseResults/spv.layoutNested.vert.out @@ -1,6 +1,6 @@ spv.layoutNested.vert // Module Version 10000 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 66 Capability Shader diff --git a/Test/baseResults/spv.length.frag.out b/Test/baseResults/spv.length.frag.out index 8957a3cdc4..93199e7d25 100644 --- a/Test/baseResults/spv.length.frag.out +++ b/Test/baseResults/spv.length.frag.out @@ -1,6 +1,6 @@ spv.length.frag // Module Version 10000 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 33 Capability Shader diff --git a/Test/baseResults/spv.load.bool.array.interface.block.frag.out b/Test/baseResults/spv.load.bool.array.interface.block.frag.out index f45736cbd0..7a80299029 100644 --- a/Test/baseResults/spv.load.bool.array.interface.block.frag.out +++ b/Test/baseResults/spv.load.bool.array.interface.block.frag.out @@ -1,6 +1,6 @@ spv.load.bool.array.interface.block.frag // Module Version 10000 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 80 Capability Shader diff --git a/Test/baseResults/spv.localAggregates.frag.out b/Test/baseResults/spv.localAggregates.frag.out index 637fb6d77d..a9ce54fb3f 100644 --- a/Test/baseResults/spv.localAggregates.frag.out +++ b/Test/baseResults/spv.localAggregates.frag.out @@ -1,6 +1,6 @@ spv.localAggregates.frag // Module Version 10000 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 136 Capability Shader diff --git a/Test/baseResults/spv.loops.frag.out b/Test/baseResults/spv.loops.frag.out index 7178f35846..17f4db458f 100644 --- a/Test/baseResults/spv.loops.frag.out +++ b/Test/baseResults/spv.loops.frag.out @@ -1,6 +1,6 @@ spv.loops.frag // Module Version 10000 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 725 Capability Shader diff --git a/Test/baseResults/spv.loopsArtificial.frag.out b/Test/baseResults/spv.loopsArtificial.frag.out index 4de834dbe1..27a84fdc3c 100644 --- a/Test/baseResults/spv.loopsArtificial.frag.out +++ b/Test/baseResults/spv.loopsArtificial.frag.out @@ -1,6 +1,6 @@ spv.loopsArtificial.frag // Module Version 10000 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 158 Capability Shader diff --git a/Test/baseResults/spv.matFun.vert.out b/Test/baseResults/spv.matFun.vert.out index 932018fa05..1201887723 100644 --- a/Test/baseResults/spv.matFun.vert.out +++ b/Test/baseResults/spv.matFun.vert.out @@ -1,6 +1,6 @@ spv.matFun.vert // Module Version 10000 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 103 Capability Shader diff --git a/Test/baseResults/spv.matrix.frag.out b/Test/baseResults/spv.matrix.frag.out index a287cda7b6..deeaf90d05 100644 --- a/Test/baseResults/spv.matrix.frag.out +++ b/Test/baseResults/spv.matrix.frag.out @@ -1,6 +1,6 @@ spv.matrix.frag // Module Version 10000 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 286 Capability Shader diff --git a/Test/baseResults/spv.matrix2.frag.out b/Test/baseResults/spv.matrix2.frag.out index 13f2708d14..f9cdaebc11 100644 --- a/Test/baseResults/spv.matrix2.frag.out +++ b/Test/baseResults/spv.matrix2.frag.out @@ -1,6 +1,6 @@ spv.matrix2.frag // Module Version 10000 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 221 Capability Shader diff --git a/Test/baseResults/spv.memoryQualifier.frag.out b/Test/baseResults/spv.memoryQualifier.frag.out index fce8c9ccd0..e0a5207f6d 100644 --- a/Test/baseResults/spv.memoryQualifier.frag.out +++ b/Test/baseResults/spv.memoryQualifier.frag.out @@ -1,7 +1,7 @@ spv.memoryQualifier.frag Validation failed // Module Version 10000 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 105 Capability Shader diff --git a/Test/baseResults/spv.memoryScopeSemantics.comp.out b/Test/baseResults/spv.memoryScopeSemantics.comp.out index 56c8470ebe..1078aa5f9e 100644 --- a/Test/baseResults/spv.memoryScopeSemantics.comp.out +++ b/Test/baseResults/spv.memoryScopeSemantics.comp.out @@ -1,6 +1,6 @@ spv.memoryScopeSemantics.comp // Module Version 10300 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 169 Capability Shader diff --git a/Test/baseResults/spv.merge-unreachable.frag.out b/Test/baseResults/spv.merge-unreachable.frag.out index dedec9c8b0..2b919dce62 100644 --- a/Test/baseResults/spv.merge-unreachable.frag.out +++ b/Test/baseResults/spv.merge-unreachable.frag.out @@ -1,6 +1,6 @@ spv.merge-unreachable.frag // Module Version 10000 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 25 Capability Shader diff --git a/Test/baseResults/spv.meshShaderBuiltins.mesh.out b/Test/baseResults/spv.meshShaderBuiltins.mesh.out index b26122ef79..f6b0f05cdf 100644 --- a/Test/baseResults/spv.meshShaderBuiltins.mesh.out +++ b/Test/baseResults/spv.meshShaderBuiltins.mesh.out @@ -1,6 +1,6 @@ spv.meshShaderBuiltins.mesh // Module Version 10000 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 148 Capability ClipDistance diff --git a/Test/baseResults/spv.meshShaderPerViewBuiltins.mesh.out b/Test/baseResults/spv.meshShaderPerViewBuiltins.mesh.out index 86a4fd2e24..111fa2bc52 100644 --- a/Test/baseResults/spv.meshShaderPerViewBuiltins.mesh.out +++ b/Test/baseResults/spv.meshShaderPerViewBuiltins.mesh.out @@ -1,6 +1,6 @@ spv.meshShaderPerViewBuiltins.mesh // Module Version 10000 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 126 Capability PerViewAttributesNV diff --git a/Test/baseResults/spv.meshShaderPerViewUserDefined.mesh.out b/Test/baseResults/spv.meshShaderPerViewUserDefined.mesh.out index e9eaed3fcf..cd6a95b888 100644 --- a/Test/baseResults/spv.meshShaderPerViewUserDefined.mesh.out +++ b/Test/baseResults/spv.meshShaderPerViewUserDefined.mesh.out @@ -1,6 +1,6 @@ spv.meshShaderPerViewUserDefined.mesh // Module Version 10000 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 108 Capability MeshShadingNV diff --git a/Test/baseResults/spv.meshShaderRedeclBuiltins.mesh.out b/Test/baseResults/spv.meshShaderRedeclBuiltins.mesh.out index bfd2d85b9c..60422d66e3 100644 --- a/Test/baseResults/spv.meshShaderRedeclBuiltins.mesh.out +++ b/Test/baseResults/spv.meshShaderRedeclBuiltins.mesh.out @@ -1,6 +1,6 @@ spv.meshShaderRedeclBuiltins.mesh // Module Version 10000 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 129 Capability ClipDistance diff --git a/Test/baseResults/spv.meshShaderRedeclPerViewBuiltins.mesh.out b/Test/baseResults/spv.meshShaderRedeclPerViewBuiltins.mesh.out index 9f881e6161..f6c20383c1 100644 --- a/Test/baseResults/spv.meshShaderRedeclPerViewBuiltins.mesh.out +++ b/Test/baseResults/spv.meshShaderRedeclPerViewBuiltins.mesh.out @@ -1,6 +1,6 @@ spv.meshShaderRedeclPerViewBuiltins.mesh // Module Version 10000 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 120 Capability PerViewAttributesNV diff --git a/Test/baseResults/spv.meshShaderSharedMem.mesh.out b/Test/baseResults/spv.meshShaderSharedMem.mesh.out index 7960ffaaf4..9ad333c85b 100644 --- a/Test/baseResults/spv.meshShaderSharedMem.mesh.out +++ b/Test/baseResults/spv.meshShaderSharedMem.mesh.out @@ -1,6 +1,6 @@ spv.meshShaderSharedMem.mesh // Module Version 10000 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 77 Capability StorageImageWriteWithoutFormat diff --git a/Test/baseResults/spv.meshShaderTaskMem.mesh.out b/Test/baseResults/spv.meshShaderTaskMem.mesh.out index be8043929b..fcbec3d662 100644 --- a/Test/baseResults/spv.meshShaderTaskMem.mesh.out +++ b/Test/baseResults/spv.meshShaderTaskMem.mesh.out @@ -1,6 +1,6 @@ spv.meshShaderTaskMem.mesh // Module Version 10000 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 58 Capability MeshShadingNV diff --git a/Test/baseResults/spv.meshShaderUserDefined.mesh.out b/Test/baseResults/spv.meshShaderUserDefined.mesh.out index 01ee933d0d..0e5fd05034 100644 --- a/Test/baseResults/spv.meshShaderUserDefined.mesh.out +++ b/Test/baseResults/spv.meshShaderUserDefined.mesh.out @@ -1,6 +1,6 @@ spv.meshShaderUserDefined.mesh // Module Version 10000 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 141 Capability MeshShadingNV diff --git a/Test/baseResults/spv.meshTaskShader.task.out b/Test/baseResults/spv.meshTaskShader.task.out index 9fed1915a7..9442f97314 100644 --- a/Test/baseResults/spv.meshTaskShader.task.out +++ b/Test/baseResults/spv.meshTaskShader.task.out @@ -1,6 +1,6 @@ spv.meshTaskShader.task // Module Version 10000 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 116 Capability StorageImageWriteWithoutFormat diff --git a/Test/baseResults/spv.multiStruct.comp.out b/Test/baseResults/spv.multiStruct.comp.out index 13a3528f8f..0ff605ccc9 100644 --- a/Test/baseResults/spv.multiStruct.comp.out +++ b/Test/baseResults/spv.multiStruct.comp.out @@ -1,6 +1,6 @@ spv.multiStruct.comp // Module Version 10000 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 161 Capability Shader diff --git a/Test/baseResults/spv.multiStructFuncall.frag.out b/Test/baseResults/spv.multiStructFuncall.frag.out index eec734a352..50f4b78b8d 100644 --- a/Test/baseResults/spv.multiStructFuncall.frag.out +++ b/Test/baseResults/spv.multiStructFuncall.frag.out @@ -1,6 +1,6 @@ spv.multiStructFuncall.frag // Module Version 10000 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 65 Capability Shader diff --git a/Test/baseResults/spv.multiView.frag.out b/Test/baseResults/spv.multiView.frag.out index a1575d988e..c6afe8f6e8 100644 --- a/Test/baseResults/spv.multiView.frag.out +++ b/Test/baseResults/spv.multiView.frag.out @@ -1,6 +1,6 @@ spv.multiView.frag // Module Version 10300 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 17 Capability Shader diff --git a/Test/baseResults/spv.multiviewPerViewAttributes.tesc.out b/Test/baseResults/spv.multiviewPerViewAttributes.tesc.out index b1c29f9bb9..9527951232 100644 --- a/Test/baseResults/spv.multiviewPerViewAttributes.tesc.out +++ b/Test/baseResults/spv.multiviewPerViewAttributes.tesc.out @@ -1,6 +1,6 @@ spv.multiviewPerViewAttributes.tesc // Module Version 10000 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 41 Capability Tessellation diff --git a/Test/baseResults/spv.multiviewPerViewAttributes.vert.out b/Test/baseResults/spv.multiviewPerViewAttributes.vert.out index 0a4e1f0b62..8268e5deaf 100644 --- a/Test/baseResults/spv.multiviewPerViewAttributes.vert.out +++ b/Test/baseResults/spv.multiviewPerViewAttributes.vert.out @@ -1,6 +1,6 @@ spv.multiviewPerViewAttributes.vert // Module Version 10000 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 29 Capability Shader diff --git a/Test/baseResults/spv.newTexture.frag.out b/Test/baseResults/spv.newTexture.frag.out index 332ca66220..723fe21a42 100644 --- a/Test/baseResults/spv.newTexture.frag.out +++ b/Test/baseResults/spv.newTexture.frag.out @@ -1,7 +1,7 @@ spv.newTexture.frag Validation failed // Module Version 10000 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 284 Capability Shader diff --git a/Test/baseResults/spv.noBuiltInLoc.vert.out b/Test/baseResults/spv.noBuiltInLoc.vert.out index 6322052092..65ee22a618 100644 --- a/Test/baseResults/spv.noBuiltInLoc.vert.out +++ b/Test/baseResults/spv.noBuiltInLoc.vert.out @@ -1,6 +1,6 @@ spv.noBuiltInLoc.vert // Module Version 10000 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 35 Capability Shader diff --git a/Test/baseResults/spv.noDeadDecorations.vert.out b/Test/baseResults/spv.noDeadDecorations.vert.out index 4a4d7b38ad..0185eaf3af 100644 --- a/Test/baseResults/spv.noDeadDecorations.vert.out +++ b/Test/baseResults/spv.noDeadDecorations.vert.out @@ -1,6 +1,6 @@ spv.noDeadDecorations.vert // Module Version 10000 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 32 Capability Shader diff --git a/Test/baseResults/spv.noWorkgroup.comp.out b/Test/baseResults/spv.noWorkgroup.comp.out index a8969e026f..e92ebcb264 100644 --- a/Test/baseResults/spv.noWorkgroup.comp.out +++ b/Test/baseResults/spv.noWorkgroup.comp.out @@ -1,6 +1,6 @@ spv.noWorkgroup.comp // Module Version 10000 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 23 Capability Shader diff --git a/Test/baseResults/spv.nonSquare.vert.out b/Test/baseResults/spv.nonSquare.vert.out index 3728dd5dec..94401be875 100644 --- a/Test/baseResults/spv.nonSquare.vert.out +++ b/Test/baseResults/spv.nonSquare.vert.out @@ -1,6 +1,6 @@ spv.nonSquare.vert // Module Version 10000 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 90 Capability Shader diff --git a/Test/baseResults/spv.nonuniform.frag.out b/Test/baseResults/spv.nonuniform.frag.out index f6febc9b94..26b020c555 100644 --- a/Test/baseResults/spv.nonuniform.frag.out +++ b/Test/baseResults/spv.nonuniform.frag.out @@ -1,6 +1,6 @@ spv.nonuniform.frag // Module Version 10000 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 289 Capability Shader diff --git a/Test/baseResults/spv.nonuniform2.frag.out b/Test/baseResults/spv.nonuniform2.frag.out index bb89ba79a2..b9d64ddce9 100644 --- a/Test/baseResults/spv.nonuniform2.frag.out +++ b/Test/baseResults/spv.nonuniform2.frag.out @@ -1,6 +1,6 @@ spv.nonuniform2.frag // Module Version 10000 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 24 Capability Shader diff --git a/Test/baseResults/spv.nonuniform3.frag.out b/Test/baseResults/spv.nonuniform3.frag.out index b48916c591..119a6d9bb7 100644 --- a/Test/baseResults/spv.nonuniform3.frag.out +++ b/Test/baseResults/spv.nonuniform3.frag.out @@ -1,6 +1,6 @@ spv.nonuniform3.frag // Module Version 10000 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 32 Capability Shader diff --git a/Test/baseResults/spv.nonuniform4.frag.out b/Test/baseResults/spv.nonuniform4.frag.out index 6bfc957532..4442e5f512 100644 --- a/Test/baseResults/spv.nonuniform4.frag.out +++ b/Test/baseResults/spv.nonuniform4.frag.out @@ -1,6 +1,6 @@ spv.nonuniform4.frag // Module Version 10000 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 24 Capability Shader diff --git a/Test/baseResults/spv.nonuniform5.frag.out b/Test/baseResults/spv.nonuniform5.frag.out index ebbb6f41b9..abf10c2c3f 100644 --- a/Test/baseResults/spv.nonuniform5.frag.out +++ b/Test/baseResults/spv.nonuniform5.frag.out @@ -1,6 +1,6 @@ spv.nonuniform5.frag // Module Version 10000 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 23 Capability Shader diff --git a/Test/baseResults/spv.nullInit.comp.out b/Test/baseResults/spv.nullInit.comp.out index b7908b57d2..f43218519b 100755 --- a/Test/baseResults/spv.nullInit.comp.out +++ b/Test/baseResults/spv.nullInit.comp.out @@ -1,6 +1,6 @@ spv.nullInit.comp // Module Version 10000 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 37 Capability Shader diff --git a/Test/baseResults/spv.nv.dmm-allops.comp.out b/Test/baseResults/spv.nv.dmm-allops.comp.out new file mode 100644 index 0000000000..b98071425a --- /dev/null +++ b/Test/baseResults/spv.nv.dmm-allops.comp.out @@ -0,0 +1,96 @@ +spv.nv.dmm-allops.comp +// Module Version 10400 +// Generated by (magic number): 8000b +// Id's are bound by 59 + + Capability Shader + Capability RayQueryKHR + Capability DisplacementMicromapNV + Extension "SPV_KHR_ray_query" + Extension "SPV_NV_displacement_micromap" + 1: ExtInstImport "GLSL.std.450" + MemoryModel Logical GLSL450 + EntryPoint GLCompute 4 "main" 11 16 + ExecutionMode 4 LocalSize 16 1 1 + Source GLSL 460 + SourceExtension "GL_EXT_ray_query" + SourceExtension "GL_NV_displacement_micromap" + Name 4 "main" + Name 9 "block" + MemberName 9(block) 0 "op_pos" + MemberName 9(block) 1 "op_bary" + Name 11 "" + Name 16 "as" + MemberDecorate 9(block) 0 Offset 0 + MemberDecorate 9(block) 1 Offset 16 + Decorate 9(block) Block + Decorate 11 DescriptorSet 0 + Decorate 11 Binding 0 + Decorate 16(as) DescriptorSet 0 + Decorate 16(as) Binding 1 + Decorate 58 BuiltIn WorkgroupSize + 2: TypeVoid + 3: TypeFunction 2 + 6: TypeFloat 32 + 7: TypeVector 6(float) 3 + 8: TypeVector 6(float) 2 + 9(block): TypeStruct 7(fvec3) 8(fvec2) + 10: TypePointer StorageBuffer 9(block) + 11: 10(ptr) Variable StorageBuffer + 12: TypeInt 32 1 + 13: 12(int) Constant 0 + 14: TypeAccelerationStructureKHR + 15: TypePointer UniformConstant 14 + 16(as): 15(ptr) Variable UniformConstant + 18: 12(int) Constant 1 + 19: TypeVector 12(int) 2 + 20: 19(ivec2) ConstantComposite 13 13 + 22: TypePointer StorageBuffer 7(fvec3) + 25: 19(ivec2) ConstantComposite 13 18 + 32: 19(ivec2) ConstantComposite 18 13 + 40: TypePointer StorageBuffer 8(fvec2) + 54: TypeInt 32 0 + 55: TypeVector 54(int) 3 + 56: 54(int) Constant 16 + 57: 54(int) Constant 1 + 58: 55(ivec3) ConstantComposite 56 57 57 + 4(main): 2 Function None 3 + 5: Label + 17: 14 Load 16(as) + 21: 7(fvec3) FetchMicroTriangleVertexPositionNV 17 18 18 18 20 + 23: 22(ptr) AccessChain 11 13 + Store 23 21 + 24: 14 Load 16(as) + 26: 7(fvec3) FetchMicroTriangleVertexPositionNV 24 18 18 18 25 + 27: 22(ptr) AccessChain 11 13 + 28: 7(fvec3) Load 27 + 29: 7(fvec3) FAdd 28 26 + 30: 22(ptr) AccessChain 11 13 + Store 30 29 + 31: 14 Load 16(as) + 33: 7(fvec3) FetchMicroTriangleVertexPositionNV 31 18 18 18 32 + 34: 22(ptr) AccessChain 11 13 + 35: 7(fvec3) Load 34 + 36: 7(fvec3) FAdd 35 33 + 37: 22(ptr) AccessChain 11 13 + Store 37 36 + 38: 14 Load 16(as) + 39: 8(fvec2) FetchMicroTriangleVertexBarycentricNV 38 18 18 18 20 + 41: 40(ptr) AccessChain 11 18 + Store 41 39 + 42: 14 Load 16(as) + 43: 8(fvec2) FetchMicroTriangleVertexBarycentricNV 42 18 18 18 25 + 44: 40(ptr) AccessChain 11 18 + 45: 8(fvec2) Load 44 + 46: 8(fvec2) FAdd 45 43 + 47: 40(ptr) AccessChain 11 18 + Store 47 46 + 48: 14 Load 16(as) + 49: 8(fvec2) FetchMicroTriangleVertexBarycentricNV 48 18 18 18 32 + 50: 40(ptr) AccessChain 11 18 + 51: 8(fvec2) Load 50 + 52: 8(fvec2) FAdd 51 49 + 53: 40(ptr) AccessChain 11 18 + Store 53 52 + Return + FunctionEnd diff --git a/Test/baseResults/spv.nv.dmm-allops.mesh.out b/Test/baseResults/spv.nv.dmm-allops.mesh.out new file mode 100644 index 0000000000..9f626c212c --- /dev/null +++ b/Test/baseResults/spv.nv.dmm-allops.mesh.out @@ -0,0 +1,95 @@ +spv.nv.dmm-allops.mesh +// Module Version 10400 +// Generated by (magic number): 8000b +// Id's are bound by 54 + + Capability RayQueryKHR + Capability MeshShadingNV + Capability DisplacementMicromapNV + Extension "SPV_KHR_ray_query" + Extension "SPV_NV_displacement_micromap" + Extension "SPV_NV_mesh_shader" + 1: ExtInstImport "GLSL.std.450" + MemoryModel Logical GLSL450 + EntryPoint MeshNV 4 "main" 11 16 + ExecutionMode 4 LocalSize 1 1 1 + ExecutionMode 4 OutputVertices 8 + ExecutionMode 4 OutputPrimitivesNV 16 + ExecutionMode 4 OutputTrianglesNV + Source GLSL 460 + SourceExtension "GL_EXT_ray_query" + SourceExtension "GL_NV_displacement_micromap" + SourceExtension "GL_NV_mesh_shader" + Name 4 "main" + Name 9 "block" + MemberName 9(block) 0 "op_pos" + MemberName 9(block) 1 "op_bary" + Name 11 "" + Name 16 "as" + MemberDecorate 9(block) 0 Offset 0 + MemberDecorate 9(block) 1 Offset 16 + Decorate 9(block) Block + Decorate 11 DescriptorSet 0 + Decorate 11 Binding 0 + Decorate 16(as) DescriptorSet 0 + Decorate 16(as) Binding 1 + 2: TypeVoid + 3: TypeFunction 2 + 6: TypeFloat 32 + 7: TypeVector 6(float) 3 + 8: TypeVector 6(float) 2 + 9(block): TypeStruct 7(fvec3) 8(fvec2) + 10: TypePointer StorageBuffer 9(block) + 11: 10(ptr) Variable StorageBuffer + 12: TypeInt 32 1 + 13: 12(int) Constant 0 + 14: TypeAccelerationStructureKHR + 15: TypePointer UniformConstant 14 + 16(as): 15(ptr) Variable UniformConstant + 18: 12(int) Constant 1 + 19: TypeVector 12(int) 2 + 20: 19(ivec2) ConstantComposite 13 13 + 22: TypePointer StorageBuffer 7(fvec3) + 25: 19(ivec2) ConstantComposite 13 18 + 32: 19(ivec2) ConstantComposite 18 13 + 40: TypePointer StorageBuffer 8(fvec2) + 4(main): 2 Function None 3 + 5: Label + 17: 14 Load 16(as) + 21: 7(fvec3) FetchMicroTriangleVertexPositionNV 17 18 18 18 20 + 23: 22(ptr) AccessChain 11 13 + Store 23 21 + 24: 14 Load 16(as) + 26: 7(fvec3) FetchMicroTriangleVertexPositionNV 24 18 18 18 25 + 27: 22(ptr) AccessChain 11 13 + 28: 7(fvec3) Load 27 + 29: 7(fvec3) FAdd 28 26 + 30: 22(ptr) AccessChain 11 13 + Store 30 29 + 31: 14 Load 16(as) + 33: 7(fvec3) FetchMicroTriangleVertexPositionNV 31 18 18 18 32 + 34: 22(ptr) AccessChain 11 13 + 35: 7(fvec3) Load 34 + 36: 7(fvec3) FAdd 35 33 + 37: 22(ptr) AccessChain 11 13 + Store 37 36 + 38: 14 Load 16(as) + 39: 8(fvec2) FetchMicroTriangleVertexBarycentricNV 38 18 18 18 20 + 41: 40(ptr) AccessChain 11 18 + Store 41 39 + 42: 14 Load 16(as) + 43: 8(fvec2) FetchMicroTriangleVertexBarycentricNV 42 18 18 18 25 + 44: 40(ptr) AccessChain 11 18 + 45: 8(fvec2) Load 44 + 46: 8(fvec2) FAdd 45 43 + 47: 40(ptr) AccessChain 11 18 + Store 47 46 + 48: 14 Load 16(as) + 49: 8(fvec2) FetchMicroTriangleVertexBarycentricNV 48 18 18 18 32 + 50: 40(ptr) AccessChain 11 18 + 51: 8(fvec2) Load 50 + 52: 8(fvec2) FAdd 51 49 + 53: 40(ptr) AccessChain 11 18 + Store 53 52 + Return + FunctionEnd diff --git a/Test/baseResults/spv.nv.dmm-allops.rahit.out b/Test/baseResults/spv.nv.dmm-allops.rahit.out new file mode 100644 index 0000000000..388ab04eaa --- /dev/null +++ b/Test/baseResults/spv.nv.dmm-allops.rahit.out @@ -0,0 +1,126 @@ +spv.nv.dmm-allops.rahit +// Module Version 10400 +// Generated by (magic number): 8000b +// Id's are bound by 77 + + Capability RayTracingKHR + Capability CapabilityRayTracingDisplacementMicromapNV + Extension "SPV_KHR_ray_tracing" + Extension "SPV_NV_displacement_micromap" + 1: ExtInstImport "GLSL.std.450" + MemoryModel Logical GLSL450 + EntryPoint AnyHitKHR 4 "main" 12 18 40 59 64 67 76 + Source GLSL 460 + SourceExtension "GL_EXT_ray_query" + SourceExtension "GL_EXT_ray_tracing" + SourceExtension "GL_NV_displacement_micromap" + Name 4 "main" + Name 10 "block" + MemberName 10(block) 0 "op_pos" + MemberName 10(block) 1 "op_bary" + MemberName 10(block) 2 "op_hit" + Name 12 "" + Name 18 "gl_HitMicroTriangleVertexPositionsNV" + Name 40 "gl_HitMicroTriangleVertexBarycentricsNV" + Name 59 "gl_HitKindEXT" + Name 64 "gl_HitKindFrontFacingMicroTriangleNV" + Name 67 "gl_HitKindBackFacingMicroTriangleNV" + Name 76 "as" + MemberDecorate 10(block) 0 Offset 0 + MemberDecorate 10(block) 1 Offset 16 + MemberDecorate 10(block) 2 Offset 24 + Decorate 10(block) Block + Decorate 12 DescriptorSet 0 + Decorate 12 Binding 0 + Decorate 18(gl_HitMicroTriangleVertexPositionsNV) BuiltIn HitMicroTriangleVertexPositionsNV + Decorate 40(gl_HitMicroTriangleVertexBarycentricsNV) BuiltIn HitMicroTriangleVertexBarycentricsNV + Decorate 59(gl_HitKindEXT) BuiltIn HitKindKHR + Decorate 64(gl_HitKindFrontFacingMicroTriangleNV) BuiltIn HitKindFrontFacingMicroTriangleNV + Decorate 67(gl_HitKindBackFacingMicroTriangleNV) BuiltIn HitKindBackFacingMicroTriangleNV + Decorate 76(as) DescriptorSet 0 + Decorate 76(as) Binding 1 + 2: TypeVoid + 3: TypeFunction 2 + 6: TypeFloat 32 + 7: TypeVector 6(float) 3 + 8: TypeVector 6(float) 2 + 9: TypeInt 32 0 + 10(block): TypeStruct 7(fvec3) 8(fvec2) 9(int) + 11: TypePointer StorageBuffer 10(block) + 12: 11(ptr) Variable StorageBuffer + 13: TypeInt 32 1 + 14: 13(int) Constant 0 + 15: 9(int) Constant 3 + 16: TypeArray 7(fvec3) 15 + 17: TypePointer Input 16 +18(gl_HitMicroTriangleVertexPositionsNV): 17(ptr) Variable Input + 19: TypePointer Input 7(fvec3) + 22: TypePointer StorageBuffer 7(fvec3) + 24: 13(int) Constant 1 + 31: 13(int) Constant 2 + 38: TypeArray 8(fvec2) 15 + 39: TypePointer Input 38 +40(gl_HitMicroTriangleVertexBarycentricsNV): 39(ptr) Variable Input + 41: TypePointer Input 8(fvec2) + 44: TypePointer StorageBuffer 8(fvec2) + 58: TypePointer Input 9(int) +59(gl_HitKindEXT): 58(ptr) Variable Input + 61: TypePointer StorageBuffer 9(int) + 63: 9(int) Constant 255 +64(gl_HitKindFrontFacingMicroTriangleNV): 58(ptr) Variable Input +67(gl_HitKindBackFacingMicroTriangleNV): 58(ptr) Variable Input + 74: TypeAccelerationStructureKHR + 75: TypePointer UniformConstant 74 + 76(as): 75(ptr) Variable UniformConstant + 4(main): 2 Function None 3 + 5: Label + 20: 19(ptr) AccessChain 18(gl_HitMicroTriangleVertexPositionsNV) 14 + 21: 7(fvec3) Load 20 + 23: 22(ptr) AccessChain 12 14 + Store 23 21 + 25: 19(ptr) AccessChain 18(gl_HitMicroTriangleVertexPositionsNV) 24 + 26: 7(fvec3) Load 25 + 27: 22(ptr) AccessChain 12 14 + 28: 7(fvec3) Load 27 + 29: 7(fvec3) FAdd 28 26 + 30: 22(ptr) AccessChain 12 14 + Store 30 29 + 32: 19(ptr) AccessChain 18(gl_HitMicroTriangleVertexPositionsNV) 31 + 33: 7(fvec3) Load 32 + 34: 22(ptr) AccessChain 12 14 + 35: 7(fvec3) Load 34 + 36: 7(fvec3) FAdd 35 33 + 37: 22(ptr) AccessChain 12 14 + Store 37 36 + 42: 41(ptr) AccessChain 40(gl_HitMicroTriangleVertexBarycentricsNV) 14 + 43: 8(fvec2) Load 42 + 45: 44(ptr) AccessChain 12 24 + Store 45 43 + 46: 41(ptr) AccessChain 40(gl_HitMicroTriangleVertexBarycentricsNV) 24 + 47: 8(fvec2) Load 46 + 48: 44(ptr) AccessChain 12 24 + 49: 8(fvec2) Load 48 + 50: 8(fvec2) FAdd 49 47 + 51: 44(ptr) AccessChain 12 24 + Store 51 50 + 52: 41(ptr) AccessChain 40(gl_HitMicroTriangleVertexBarycentricsNV) 31 + 53: 8(fvec2) Load 52 + 54: 44(ptr) AccessChain 12 24 + 55: 8(fvec2) Load 54 + 56: 8(fvec2) FAdd 55 53 + 57: 44(ptr) AccessChain 12 24 + Store 57 56 + 60: 9(int) Load 59(gl_HitKindEXT) + 62: 61(ptr) AccessChain 12 31 + Store 62 60 + 65: 9(int) Load 64(gl_HitKindFrontFacingMicroTriangleNV) + 66: 9(int) BitwiseOr 63 65 + 68: 9(int) Load 67(gl_HitKindBackFacingMicroTriangleNV) + 69: 9(int) BitwiseOr 66 68 + 70: 61(ptr) AccessChain 12 31 + 71: 9(int) Load 70 + 72: 9(int) BitwiseAnd 71 69 + 73: 61(ptr) AccessChain 12 31 + Store 73 72 + Return + FunctionEnd diff --git a/Test/baseResults/spv.nv.dmm-allops.rchit.out b/Test/baseResults/spv.nv.dmm-allops.rchit.out new file mode 100644 index 0000000000..c53bc8c17c --- /dev/null +++ b/Test/baseResults/spv.nv.dmm-allops.rchit.out @@ -0,0 +1,126 @@ +spv.nv.dmm-allops.rchit +// Module Version 10400 +// Generated by (magic number): 8000b +// Id's are bound by 77 + + Capability RayTracingKHR + Capability CapabilityRayTracingDisplacementMicromapNV + Extension "SPV_KHR_ray_tracing" + Extension "SPV_NV_displacement_micromap" + 1: ExtInstImport "GLSL.std.450" + MemoryModel Logical GLSL450 + EntryPoint ClosestHitKHR 4 "main" 12 18 40 59 64 67 76 + Source GLSL 460 + SourceExtension "GL_EXT_ray_query" + SourceExtension "GL_EXT_ray_tracing" + SourceExtension "GL_NV_displacement_micromap" + Name 4 "main" + Name 10 "block" + MemberName 10(block) 0 "op_pos" + MemberName 10(block) 1 "op_bary" + MemberName 10(block) 2 "op_hit" + Name 12 "" + Name 18 "gl_HitMicroTriangleVertexPositionsNV" + Name 40 "gl_HitMicroTriangleVertexBarycentricsNV" + Name 59 "gl_HitKindEXT" + Name 64 "gl_HitKindFrontFacingMicroTriangleNV" + Name 67 "gl_HitKindBackFacingMicroTriangleNV" + Name 76 "as" + MemberDecorate 10(block) 0 Offset 0 + MemberDecorate 10(block) 1 Offset 16 + MemberDecorate 10(block) 2 Offset 24 + Decorate 10(block) Block + Decorate 12 DescriptorSet 0 + Decorate 12 Binding 0 + Decorate 18(gl_HitMicroTriangleVertexPositionsNV) BuiltIn HitMicroTriangleVertexPositionsNV + Decorate 40(gl_HitMicroTriangleVertexBarycentricsNV) BuiltIn HitMicroTriangleVertexBarycentricsNV + Decorate 59(gl_HitKindEXT) BuiltIn HitKindKHR + Decorate 64(gl_HitKindFrontFacingMicroTriangleNV) BuiltIn HitKindFrontFacingMicroTriangleNV + Decorate 67(gl_HitKindBackFacingMicroTriangleNV) BuiltIn HitKindBackFacingMicroTriangleNV + Decorate 76(as) DescriptorSet 0 + Decorate 76(as) Binding 1 + 2: TypeVoid + 3: TypeFunction 2 + 6: TypeFloat 32 + 7: TypeVector 6(float) 3 + 8: TypeVector 6(float) 2 + 9: TypeInt 32 0 + 10(block): TypeStruct 7(fvec3) 8(fvec2) 9(int) + 11: TypePointer StorageBuffer 10(block) + 12: 11(ptr) Variable StorageBuffer + 13: TypeInt 32 1 + 14: 13(int) Constant 0 + 15: 9(int) Constant 3 + 16: TypeArray 7(fvec3) 15 + 17: TypePointer Input 16 +18(gl_HitMicroTriangleVertexPositionsNV): 17(ptr) Variable Input + 19: TypePointer Input 7(fvec3) + 22: TypePointer StorageBuffer 7(fvec3) + 24: 13(int) Constant 1 + 31: 13(int) Constant 2 + 38: TypeArray 8(fvec2) 15 + 39: TypePointer Input 38 +40(gl_HitMicroTriangleVertexBarycentricsNV): 39(ptr) Variable Input + 41: TypePointer Input 8(fvec2) + 44: TypePointer StorageBuffer 8(fvec2) + 58: TypePointer Input 9(int) +59(gl_HitKindEXT): 58(ptr) Variable Input + 61: TypePointer StorageBuffer 9(int) + 63: 9(int) Constant 255 +64(gl_HitKindFrontFacingMicroTriangleNV): 58(ptr) Variable Input +67(gl_HitKindBackFacingMicroTriangleNV): 58(ptr) Variable Input + 74: TypeAccelerationStructureKHR + 75: TypePointer UniformConstant 74 + 76(as): 75(ptr) Variable UniformConstant + 4(main): 2 Function None 3 + 5: Label + 20: 19(ptr) AccessChain 18(gl_HitMicroTriangleVertexPositionsNV) 14 + 21: 7(fvec3) Load 20 + 23: 22(ptr) AccessChain 12 14 + Store 23 21 + 25: 19(ptr) AccessChain 18(gl_HitMicroTriangleVertexPositionsNV) 24 + 26: 7(fvec3) Load 25 + 27: 22(ptr) AccessChain 12 14 + 28: 7(fvec3) Load 27 + 29: 7(fvec3) FAdd 28 26 + 30: 22(ptr) AccessChain 12 14 + Store 30 29 + 32: 19(ptr) AccessChain 18(gl_HitMicroTriangleVertexPositionsNV) 31 + 33: 7(fvec3) Load 32 + 34: 22(ptr) AccessChain 12 14 + 35: 7(fvec3) Load 34 + 36: 7(fvec3) FAdd 35 33 + 37: 22(ptr) AccessChain 12 14 + Store 37 36 + 42: 41(ptr) AccessChain 40(gl_HitMicroTriangleVertexBarycentricsNV) 14 + 43: 8(fvec2) Load 42 + 45: 44(ptr) AccessChain 12 24 + Store 45 43 + 46: 41(ptr) AccessChain 40(gl_HitMicroTriangleVertexBarycentricsNV) 24 + 47: 8(fvec2) Load 46 + 48: 44(ptr) AccessChain 12 24 + 49: 8(fvec2) Load 48 + 50: 8(fvec2) FAdd 49 47 + 51: 44(ptr) AccessChain 12 24 + Store 51 50 + 52: 41(ptr) AccessChain 40(gl_HitMicroTriangleVertexBarycentricsNV) 31 + 53: 8(fvec2) Load 52 + 54: 44(ptr) AccessChain 12 24 + 55: 8(fvec2) Load 54 + 56: 8(fvec2) FAdd 55 53 + 57: 44(ptr) AccessChain 12 24 + Store 57 56 + 60: 9(int) Load 59(gl_HitKindEXT) + 62: 61(ptr) AccessChain 12 31 + Store 62 60 + 65: 9(int) Load 64(gl_HitKindFrontFacingMicroTriangleNV) + 66: 9(int) BitwiseOr 63 65 + 68: 9(int) Load 67(gl_HitKindBackFacingMicroTriangleNV) + 69: 9(int) BitwiseOr 66 68 + 70: 61(ptr) AccessChain 12 31 + 71: 9(int) Load 70 + 72: 9(int) BitwiseAnd 71 69 + 73: 61(ptr) AccessChain 12 31 + Store 73 72 + Return + FunctionEnd diff --git a/Test/baseResults/spv.nv.dmm-allops.rgen.out b/Test/baseResults/spv.nv.dmm-allops.rgen.out new file mode 100644 index 0000000000..78001e1fea --- /dev/null +++ b/Test/baseResults/spv.nv.dmm-allops.rgen.out @@ -0,0 +1,108 @@ +spv.nv.dmm-allops.rgen +// Module Version 10400 +// Generated by (magic number): 8000b +// Id's are bound by 66 + + Capability RayTracingKHR + Capability DisplacementMicromapNV + Capability CapabilityRayTracingDisplacementMicromapNV + Extension "SPV_KHR_ray_tracing" + Extension "SPV_NV_displacement_micromap" + 1: ExtInstImport "GLSL.std.450" + MemoryModel Logical GLSL450 + EntryPoint RayGenerationKHR 4 "main" 12 17 58 61 + Source GLSL 460 + SourceExtension "GL_EXT_ray_query" + SourceExtension "GL_NV_displacement_micromap" + Name 4 "main" + Name 10 "block" + MemberName 10(block) 0 "op_pos" + MemberName 10(block) 1 "op_bary" + MemberName 10(block) 2 "op_hitmask" + Name 12 "" + Name 17 "as" + Name 58 "gl_HitKindFrontFacingMicroTriangleNV" + Name 61 "gl_HitKindBackFacingMicroTriangleNV" + MemberDecorate 10(block) 0 Offset 0 + MemberDecorate 10(block) 1 Offset 16 + MemberDecorate 10(block) 2 Offset 24 + Decorate 10(block) Block + Decorate 12 DescriptorSet 0 + Decorate 12 Binding 0 + Decorate 17(as) DescriptorSet 0 + Decorate 17(as) Binding 1 + Decorate 58(gl_HitKindFrontFacingMicroTriangleNV) BuiltIn HitKindFrontFacingMicroTriangleNV + Decorate 61(gl_HitKindBackFacingMicroTriangleNV) BuiltIn HitKindBackFacingMicroTriangleNV + 2: TypeVoid + 3: TypeFunction 2 + 6: TypeFloat 32 + 7: TypeVector 6(float) 3 + 8: TypeVector 6(float) 2 + 9: TypeInt 32 0 + 10(block): TypeStruct 7(fvec3) 8(fvec2) 9(int) + 11: TypePointer StorageBuffer 10(block) + 12: 11(ptr) Variable StorageBuffer + 13: TypeInt 32 1 + 14: 13(int) Constant 0 + 15: TypeAccelerationStructureKHR + 16: TypePointer UniformConstant 15 + 17(as): 16(ptr) Variable UniformConstant + 19: 13(int) Constant 1 + 20: TypeVector 13(int) 2 + 21: 20(ivec2) ConstantComposite 14 14 + 23: TypePointer StorageBuffer 7(fvec3) + 26: 20(ivec2) ConstantComposite 14 19 + 33: 20(ivec2) ConstantComposite 19 14 + 41: TypePointer StorageBuffer 8(fvec2) + 55: 13(int) Constant 2 + 56: 9(int) Constant 255 + 57: TypePointer Input 9(int) +58(gl_HitKindFrontFacingMicroTriangleNV): 57(ptr) Variable Input +61(gl_HitKindBackFacingMicroTriangleNV): 57(ptr) Variable Input + 64: TypePointer StorageBuffer 9(int) + 4(main): 2 Function None 3 + 5: Label + 18: 15 Load 17(as) + 22: 7(fvec3) FetchMicroTriangleVertexPositionNV 18 19 19 19 21 + 24: 23(ptr) AccessChain 12 14 + Store 24 22 + 25: 15 Load 17(as) + 27: 7(fvec3) FetchMicroTriangleVertexPositionNV 25 19 19 19 26 + 28: 23(ptr) AccessChain 12 14 + 29: 7(fvec3) Load 28 + 30: 7(fvec3) FAdd 29 27 + 31: 23(ptr) AccessChain 12 14 + Store 31 30 + 32: 15 Load 17(as) + 34: 7(fvec3) FetchMicroTriangleVertexPositionNV 32 19 19 19 33 + 35: 23(ptr) AccessChain 12 14 + 36: 7(fvec3) Load 35 + 37: 7(fvec3) FAdd 36 34 + 38: 23(ptr) AccessChain 12 14 + Store 38 37 + 39: 15 Load 17(as) + 40: 8(fvec2) FetchMicroTriangleVertexBarycentricNV 39 19 19 19 21 + 42: 41(ptr) AccessChain 12 19 + Store 42 40 + 43: 15 Load 17(as) + 44: 8(fvec2) FetchMicroTriangleVertexBarycentricNV 43 19 19 19 26 + 45: 41(ptr) AccessChain 12 19 + 46: 8(fvec2) Load 45 + 47: 8(fvec2) FAdd 46 44 + 48: 41(ptr) AccessChain 12 19 + Store 48 47 + 49: 15 Load 17(as) + 50: 8(fvec2) FetchMicroTriangleVertexBarycentricNV 49 19 19 19 33 + 51: 41(ptr) AccessChain 12 19 + 52: 8(fvec2) Load 51 + 53: 8(fvec2) FAdd 52 50 + 54: 41(ptr) AccessChain 12 19 + Store 54 53 + 59: 9(int) Load 58(gl_HitKindFrontFacingMicroTriangleNV) + 60: 9(int) BitwiseOr 56 59 + 62: 9(int) Load 61(gl_HitKindBackFacingMicroTriangleNV) + 63: 9(int) BitwiseOr 60 62 + 65: 64(ptr) AccessChain 12 55 + Store 65 63 + Return + FunctionEnd diff --git a/Test/baseResults/spv.nv.hitobject-allops.rchit.out b/Test/baseResults/spv.nv.hitobject-allops.rchit.out new file mode 100644 index 0000000000..15e6d4168e --- /dev/null +++ b/Test/baseResults/spv.nv.hitobject-allops.rchit.out @@ -0,0 +1,215 @@ +spv.nv.hitobject-allops.rchit +// Module Version 10400 +// Generated by (magic number): 8000b +// Id's are bound by 116 + + Capability RayTracingKHR + Capability ShaderInvocationReorderNV + Extension "SPV_KHR_ray_tracing" + Extension "SPV_NV_shader_invocation_reorder" + 1: ExtInstImport "GLSL.std.450" + MemoryModel Logical GLSL450 + EntryPoint ClosestHitKHR 4 "main" 9 14 22 25 36 42 48 52 53 64 + Source GLSL 460 + SourceExtension "GL_EXT_ray_tracing" + SourceExtension "GL_NV_ray_tracing_motion_blur" + SourceExtension "GL_NV_shader_invocation_reorder" + Name 4 "main" + Name 9 "attr" + Name 12 "hBlock" + MemberName 12(hBlock) 0 "attrval" + Name 14 "" + Name 22 "hObj" + Name 25 "as" + Name 36 "payload" + Name 40 "pBlock" + MemberName 40(pBlock) 0 "val1" + MemberName 40(pBlock) 1 "val2" + Name 42 "" + Name 48 "hObjHit" + Name 52 "hObjNop" + Name 53 "hObjMiss" + Name 62 "block" + MemberName 62(block) 0 "op" + Name 64 "" + Name 79 "tmin" + Name 81 "tmax" + Name 84 "orig" + Name 86 "dir" + Name 88 "oorig" + Name 90 "odir" + Name 94 "otw" + Name 96 "wto" + Name 99 "cid" + Name 101 "iid" + Name 103 "pid" + Name 105 "gid" + Name 108 "hkind" + Name 112 "handle" + Name 114 "rid" + Decorate 12(hBlock) Block + Decorate 25(as) DescriptorSet 0 + Decorate 25(as) Binding 0 + Decorate 40(pBlock) Block + MemberDecorate 62(block) 0 Offset 0 + Decorate 62(block) Block + Decorate 64 DescriptorSet 0 + Decorate 64 Binding 1 + 2: TypeVoid + 3: TypeFunction 2 + 6: TypeFloat 32 + 7: TypeVector 6(float) 2 + 8: TypePointer HitObjectAttributeNV 7(fvec2) + 9(attr): 8(ptr) Variable HitObjectAttributeNV + 10: 6(float) Constant 1065353216 + 11: 7(fvec2) ConstantComposite 10 10 + 12(hBlock): TypeStruct 6(float) + 13: TypePointer HitObjectAttributeNV 12(hBlock) + 14: 13(ptr) Variable HitObjectAttributeNV + 15: TypeInt 32 1 + 16: 15(int) Constant 0 + 17: 6(float) Constant 1073741824 + 18: TypePointer HitObjectAttributeNV 6(float) + 20: TypeHitObjectNV + 21: TypePointer Private 20 + 22(hObj): 21(ptr) Variable Private + 23: TypeAccelerationStructureKHR + 24: TypePointer UniformConstant 23 + 25(as): 24(ptr) Variable UniformConstant + 27: TypeInt 32 0 + 28: 27(int) Constant 1 + 29: TypeVector 6(float) 3 + 30: 6(float) Constant 1056964608 + 31: 29(fvec3) ConstantComposite 30 30 30 + 32: 29(fvec3) ConstantComposite 10 10 10 + 33: 15(int) Constant 1 + 34: TypeVector 6(float) 4 + 35: TypePointer RayPayloadKHR 34(fvec4) + 36(payload): 35(ptr) Variable RayPayloadKHR + 38: 6(float) Constant 1092616192 + 39: 15(int) Constant 2 + 40(pBlock): TypeStruct 7(fvec2) 7(fvec2) + 41: TypePointer RayPayloadKHR 40(pBlock) + 42: 41(ptr) Variable RayPayloadKHR + 44: 27(int) Constant 2 + 45: 29(fvec3) ConstantComposite 17 17 17 + 47: 6(float) Constant 1082130432 + 48(hObjHit): 21(ptr) Variable Private + 50: 15(int) Constant 3 + 52(hObjNop): 21(ptr) Variable Private + 53(hObjMiss): 21(ptr) Variable Private + 54: 6(float) Constant 1069547520 + 55: 29(fvec3) ConstantComposite 54 54 54 + 56: 6(float) Constant 1084227584 + 57: 6(float) Constant 1090519040 + 58: TypeBool + 62(block): TypeStruct 6(float) + 63: TypePointer StorageBuffer 62(block) + 64: 63(ptr) Variable StorageBuffer + 65: TypePointer StorageBuffer 6(float) + 76: 6(float) Constant 1077936128 + 78: TypePointer Function 6(float) + 83: TypePointer Function 29(fvec3) + 92: TypeMatrix 29(fvec3) 4 + 93: TypePointer Function 92 + 98: TypePointer Function 15(int) + 107: TypePointer Function 27(int) + 110: TypeVector 27(int) 2 + 111: TypePointer Function 110(ivec2) + 4(main): 2 Function None 3 + 5: Label + 79(tmin): 78(ptr) Variable Function + 81(tmax): 78(ptr) Variable Function + 84(orig): 83(ptr) Variable Function + 86(dir): 83(ptr) Variable Function + 88(oorig): 83(ptr) Variable Function + 90(odir): 83(ptr) Variable Function + 94(otw): 93(ptr) Variable Function + 96(wto): 93(ptr) Variable Function + 99(cid): 98(ptr) Variable Function + 101(iid): 98(ptr) Variable Function + 103(pid): 98(ptr) Variable Function + 105(gid): 98(ptr) Variable Function + 108(hkind): 107(ptr) Variable Function + 112(handle): 111(ptr) Variable Function + 114(rid): 107(ptr) Variable Function + Store 9(attr) 11 + 19: 18(ptr) AccessChain 14 16 + Store 19 17 + 26: 23 Load 25(as) + HitObjectTraceRayNV 22(hObj) 26 28 28 28 28 28 31 30 32 10 36(payload) + 37: 23 Load 25(as) + HitObjectTraceRayMotionNV 22(hObj) 37 28 28 28 28 28 31 30 32 10 38 42 + 43: 23 Load 25(as) + HitObjectRecordHitNV 22(hObj) 43 33 33 33 44 44 44 32 10 45 17 9(attr) + 46: 23 Load 25(as) + HitObjectRecordHitMotionNV 22(hObj) 46 33 33 33 44 44 44 32 10 45 17 47 9(attr) + 49: 23 Load 25(as) + HitObjectRecordHitWithIndexNV 48(hObjHit) 49 33 33 33 44 44 32 10 45 17 14 + 51: 23 Load 25(as) + HitObjectRecordHitWithIndexMotionNV 48(hObjHit) 51 33 33 33 44 44 32 10 45 17 47 14 + HitObjectRecordEmptyNV 52(hObjNop) + HitObjectRecordMissNV 53(hObjMiss) 28 31 17 55 56 + HitObjectRecordMissMotionNV 53(hObjMiss) 28 31 17 55 56 57 + HitObjectExecuteShaderNV 48(hObjHit) 42 + 59: 58(bool) HitObjectIsHitNV 22(hObj) + SelectionMerge 61 None + BranchConditional 59 60 67 + 60: Label + 66: 65(ptr) AccessChain 64 16 + Store 66 10 + Branch 61 + 67: Label + 68: 58(bool) HitObjectIsMissNV 22(hObj) + SelectionMerge 70 None + BranchConditional 68 69 72 + 69: Label + 71: 65(ptr) AccessChain 64 16 + Store 71 17 + Branch 70 + 72: Label + 73: 58(bool) HitObjectIsEmptyNV 22(hObj) + SelectionMerge 75 None + BranchConditional 73 74 75 + 74: Label + 77: 65(ptr) AccessChain 64 16 + Store 77 76 + Branch 75 + 75: Label + Branch 70 + 70: Label + Branch 61 + 61: Label + 80: 6(float) HitObjectGetRayTMinNV 48(hObjHit) + Store 79(tmin) 80 + 82: 6(float) HitObjectGetRayTMaxNV 48(hObjHit) + Store 81(tmax) 82 + 85: 29(fvec3) HitObjectGetWorldRayOriginNV 48(hObjHit) + Store 84(orig) 85 + 87: 29(fvec3) HitObjectGetWorldRayDirectionNV 48(hObjHit) + Store 86(dir) 87 + 89: 29(fvec3) HitObjectGetObjectRayOriginNV 48(hObjHit) + Store 88(oorig) 89 + 91: 29(fvec3) HitObjectGetObjectRayDirectionNV 48(hObjHit) + Store 90(odir) 91 + 95: 92 HitObjectGetObjectToWorldNV 48(hObjHit) + Store 94(otw) 95 + 97: 92 HitObjectGetWorldToObjectNV 48(hObjHit) + Store 96(wto) 97 + 100: 15(int) HitObjectGetInstanceCustomIndexNV 53(hObjMiss) + Store 99(cid) 100 + 102: 15(int) HitObjectGetInstanceIdNV 52(hObjNop) + Store 101(iid) 102 + 104: 15(int) HitObjectGetPrimitiveIndexNV 22(hObj) + Store 103(pid) 104 + 106: 15(int) HitObjectGetGeometryIndexNV 22(hObj) + Store 105(gid) 106 + 109: 27(int) HitObjectGetFrontFaceNV 22(hObj) + Store 108(hkind) 109 + HitObjectGetAttributesNV 22(hObj) 9(attr) + 113: 110(ivec2) HitObjectGetShaderRecordBufferHandleNV 22(hObj) + Store 112(handle) 113 + 115: 27(int) HitObjectGetShaderBindingTableRecordIndexNV 22(hObj) + Store 114(rid) 115 + Return + FunctionEnd diff --git a/Test/baseResults/spv.nv.hitobject-allops.rgen.out b/Test/baseResults/spv.nv.hitobject-allops.rgen.out new file mode 100644 index 0000000000..d395500a8c --- /dev/null +++ b/Test/baseResults/spv.nv.hitobject-allops.rgen.out @@ -0,0 +1,219 @@ +spv.nv.hitobject-allops.rgen +// Module Version 10400 +// Generated by (magic number): 8000b +// Id's are bound by 117 + + Capability RayTracingKHR + Capability ShaderInvocationReorderNV + Extension "SPV_KHR_ray_tracing" + Extension "SPV_NV_shader_invocation_reorder" + 1: ExtInstImport "GLSL.std.450" + MemoryModel Logical GLSL450 + EntryPoint RayGenerationKHR 4 "main" 9 14 22 25 36 42 48 52 53 64 + Source GLSL 460 + SourceExtension "GL_EXT_ray_tracing" + SourceExtension "GL_NV_ray_tracing_motion_blur" + SourceExtension "GL_NV_shader_invocation_reorder" + Name 4 "main" + Name 9 "attr" + Name 12 "hBlock" + MemberName 12(hBlock) 0 "attrval" + Name 14 "" + Name 22 "hObj" + Name 25 "as" + Name 36 "payload" + Name 40 "pBlock" + MemberName 40(pBlock) 0 "val1" + MemberName 40(pBlock) 1 "val2" + Name 42 "" + Name 48 "hObjHit" + Name 52 "hObjNop" + Name 53 "hObjMiss" + Name 62 "block" + MemberName 62(block) 0 "op" + Name 64 "" + Name 79 "tmin" + Name 81 "tmax" + Name 84 "orig" + Name 86 "dir" + Name 88 "oorig" + Name 90 "odir" + Name 94 "otw" + Name 96 "wto" + Name 99 "cid" + Name 101 "iid" + Name 103 "pid" + Name 105 "gid" + Name 108 "hkind" + Name 112 "handle" + Name 114 "rid" + Decorate 12(hBlock) Block + Decorate 25(as) DescriptorSet 0 + Decorate 25(as) Binding 0 + Decorate 40(pBlock) Block + MemberDecorate 62(block) 0 Offset 0 + Decorate 62(block) Block + Decorate 64 DescriptorSet 0 + Decorate 64 Binding 1 + 2: TypeVoid + 3: TypeFunction 2 + 6: TypeFloat 32 + 7: TypeVector 6(float) 2 + 8: TypePointer HitObjectAttributeNV 7(fvec2) + 9(attr): 8(ptr) Variable HitObjectAttributeNV + 10: 6(float) Constant 1065353216 + 11: 7(fvec2) ConstantComposite 10 10 + 12(hBlock): TypeStruct 6(float) + 13: TypePointer HitObjectAttributeNV 12(hBlock) + 14: 13(ptr) Variable HitObjectAttributeNV + 15: TypeInt 32 1 + 16: 15(int) Constant 0 + 17: 6(float) Constant 1073741824 + 18: TypePointer HitObjectAttributeNV 6(float) + 20: TypeHitObjectNV + 21: TypePointer Private 20 + 22(hObj): 21(ptr) Variable Private + 23: TypeAccelerationStructureKHR + 24: TypePointer UniformConstant 23 + 25(as): 24(ptr) Variable UniformConstant + 27: TypeInt 32 0 + 28: 27(int) Constant 1 + 29: TypeVector 6(float) 3 + 30: 6(float) Constant 1056964608 + 31: 29(fvec3) ConstantComposite 30 30 30 + 32: 29(fvec3) ConstantComposite 10 10 10 + 33: 15(int) Constant 1 + 34: TypeVector 6(float) 4 + 35: TypePointer RayPayloadKHR 34(fvec4) + 36(payload): 35(ptr) Variable RayPayloadKHR + 38: 6(float) Constant 1092616192 + 39: 15(int) Constant 2 + 40(pBlock): TypeStruct 7(fvec2) 7(fvec2) + 41: TypePointer RayPayloadKHR 40(pBlock) + 42: 41(ptr) Variable RayPayloadKHR + 44: 27(int) Constant 2 + 45: 29(fvec3) ConstantComposite 17 17 17 + 47: 6(float) Constant 1082130432 + 48(hObjHit): 21(ptr) Variable Private + 50: 15(int) Constant 3 + 52(hObjNop): 21(ptr) Variable Private + 53(hObjMiss): 21(ptr) Variable Private + 54: 6(float) Constant 1069547520 + 55: 29(fvec3) ConstantComposite 54 54 54 + 56: 6(float) Constant 1084227584 + 57: 6(float) Constant 1090519040 + 58: TypeBool + 62(block): TypeStruct 6(float) + 63: TypePointer StorageBuffer 62(block) + 64: 63(ptr) Variable StorageBuffer + 65: TypePointer StorageBuffer 6(float) + 76: 6(float) Constant 1077936128 + 78: TypePointer Function 6(float) + 83: TypePointer Function 29(fvec3) + 92: TypeMatrix 29(fvec3) 4 + 93: TypePointer Function 92 + 98: TypePointer Function 15(int) + 107: TypePointer Function 27(int) + 110: TypeVector 27(int) 2 + 111: TypePointer Function 110(ivec2) + 116: 27(int) Constant 4 + 4(main): 2 Function None 3 + 5: Label + 79(tmin): 78(ptr) Variable Function + 81(tmax): 78(ptr) Variable Function + 84(orig): 83(ptr) Variable Function + 86(dir): 83(ptr) Variable Function + 88(oorig): 83(ptr) Variable Function + 90(odir): 83(ptr) Variable Function + 94(otw): 93(ptr) Variable Function + 96(wto): 93(ptr) Variable Function + 99(cid): 98(ptr) Variable Function + 101(iid): 98(ptr) Variable Function + 103(pid): 98(ptr) Variable Function + 105(gid): 98(ptr) Variable Function + 108(hkind): 107(ptr) Variable Function + 112(handle): 111(ptr) Variable Function + 114(rid): 107(ptr) Variable Function + Store 9(attr) 11 + 19: 18(ptr) AccessChain 14 16 + Store 19 17 + 26: 23 Load 25(as) + HitObjectTraceRayNV 22(hObj) 26 28 28 28 28 28 31 30 32 10 36(payload) + 37: 23 Load 25(as) + HitObjectTraceRayMotionNV 22(hObj) 37 28 28 28 28 28 31 30 32 10 38 42 + 43: 23 Load 25(as) + HitObjectRecordHitNV 22(hObj) 43 33 33 33 44 44 44 32 10 45 17 9(attr) + 46: 23 Load 25(as) + HitObjectRecordHitMotionNV 22(hObj) 46 33 33 33 44 44 44 32 10 45 17 47 9(attr) + 49: 23 Load 25(as) + HitObjectRecordHitWithIndexNV 48(hObjHit) 49 33 33 33 44 44 32 10 45 17 14 + 51: 23 Load 25(as) + HitObjectRecordHitWithIndexMotionNV 48(hObjHit) 51 33 33 33 44 44 32 10 45 17 47 14 + HitObjectRecordEmptyNV 52(hObjNop) + HitObjectRecordMissNV 53(hObjMiss) 28 31 17 55 56 + HitObjectRecordMissMotionNV 53(hObjMiss) 28 31 17 55 56 57 + HitObjectExecuteShaderNV 48(hObjHit) 36(payload) + 59: 58(bool) HitObjectIsHitNV 22(hObj) + SelectionMerge 61 None + BranchConditional 59 60 67 + 60: Label + 66: 65(ptr) AccessChain 64 16 + Store 66 10 + Branch 61 + 67: Label + 68: 58(bool) HitObjectIsMissNV 22(hObj) + SelectionMerge 70 None + BranchConditional 68 69 72 + 69: Label + 71: 65(ptr) AccessChain 64 16 + Store 71 17 + Branch 70 + 72: Label + 73: 58(bool) HitObjectIsEmptyNV 22(hObj) + SelectionMerge 75 None + BranchConditional 73 74 75 + 74: Label + 77: 65(ptr) AccessChain 64 16 + Store 77 76 + Branch 75 + 75: Label + Branch 70 + 70: Label + Branch 61 + 61: Label + 80: 6(float) HitObjectGetRayTMinNV 48(hObjHit) + Store 79(tmin) 80 + 82: 6(float) HitObjectGetRayTMaxNV 48(hObjHit) + Store 81(tmax) 82 + 85: 29(fvec3) HitObjectGetWorldRayOriginNV 48(hObjHit) + Store 84(orig) 85 + 87: 29(fvec3) HitObjectGetWorldRayDirectionNV 48(hObjHit) + Store 86(dir) 87 + 89: 29(fvec3) HitObjectGetObjectRayOriginNV 48(hObjHit) + Store 88(oorig) 89 + 91: 29(fvec3) HitObjectGetObjectRayDirectionNV 48(hObjHit) + Store 90(odir) 91 + 95: 92 HitObjectGetObjectToWorldNV 48(hObjHit) + Store 94(otw) 95 + 97: 92 HitObjectGetWorldToObjectNV 48(hObjHit) + Store 96(wto) 97 + 100: 15(int) HitObjectGetInstanceCustomIndexNV 53(hObjMiss) + Store 99(cid) 100 + 102: 15(int) HitObjectGetInstanceIdNV 52(hObjNop) + Store 101(iid) 102 + 104: 15(int) HitObjectGetPrimitiveIndexNV 22(hObj) + Store 103(pid) 104 + 106: 15(int) HitObjectGetGeometryIndexNV 22(hObj) + Store 105(gid) 106 + 109: 27(int) HitObjectGetFrontFaceNV 22(hObj) + Store 108(hkind) 109 + HitObjectGetAttributesNV 22(hObj) 9(attr) + 113: 110(ivec2) HitObjectGetShaderRecordBufferHandleNV 22(hObj) + Store 112(handle) 113 + 115: 27(int) HitObjectGetShaderBindingTableRecordIndexNV 22(hObj) + Store 114(rid) 115 + ReorderThreadWithHintNV 116 116 + ReorderThreadWithHitObjectNV 48(hObjHit) + ReorderThreadWithHitObjectNV 48(hObjHit) 116 44 + Return + FunctionEnd diff --git a/Test/baseResults/spv.nv.hitobject-allops.rmiss.out b/Test/baseResults/spv.nv.hitobject-allops.rmiss.out new file mode 100644 index 0000000000..970d08a18d --- /dev/null +++ b/Test/baseResults/spv.nv.hitobject-allops.rmiss.out @@ -0,0 +1,215 @@ +spv.nv.hitobject-allops.rmiss +// Module Version 10400 +// Generated by (magic number): 8000b +// Id's are bound by 116 + + Capability RayTracingKHR + Capability ShaderInvocationReorderNV + Extension "SPV_KHR_ray_tracing" + Extension "SPV_NV_shader_invocation_reorder" + 1: ExtInstImport "GLSL.std.450" + MemoryModel Logical GLSL450 + EntryPoint MissKHR 4 "main" 9 14 22 25 36 42 48 52 53 64 + Source GLSL 460 + SourceExtension "GL_EXT_ray_tracing" + SourceExtension "GL_NV_ray_tracing_motion_blur" + SourceExtension "GL_NV_shader_invocation_reorder" + Name 4 "main" + Name 9 "attr" + Name 12 "hBlock" + MemberName 12(hBlock) 0 "attrval" + Name 14 "" + Name 22 "hObj" + Name 25 "as" + Name 36 "payload" + Name 40 "pBlock" + MemberName 40(pBlock) 0 "val1" + MemberName 40(pBlock) 1 "val2" + Name 42 "" + Name 48 "hObjHit" + Name 52 "hObjNop" + Name 53 "hObjMiss" + Name 62 "block" + MemberName 62(block) 0 "op" + Name 64 "" + Name 79 "tmin" + Name 81 "tmax" + Name 84 "orig" + Name 86 "dir" + Name 88 "oorig" + Name 90 "odir" + Name 94 "otw" + Name 96 "wto" + Name 99 "cid" + Name 101 "iid" + Name 103 "pid" + Name 105 "gid" + Name 108 "hkind" + Name 112 "handle" + Name 114 "rid" + Decorate 12(hBlock) Block + Decorate 25(as) DescriptorSet 0 + Decorate 25(as) Binding 0 + Decorate 40(pBlock) Block + MemberDecorate 62(block) 0 Offset 0 + Decorate 62(block) Block + Decorate 64 DescriptorSet 0 + Decorate 64 Binding 1 + 2: TypeVoid + 3: TypeFunction 2 + 6: TypeFloat 32 + 7: TypeVector 6(float) 2 + 8: TypePointer HitObjectAttributeNV 7(fvec2) + 9(attr): 8(ptr) Variable HitObjectAttributeNV + 10: 6(float) Constant 1065353216 + 11: 7(fvec2) ConstantComposite 10 10 + 12(hBlock): TypeStruct 6(float) + 13: TypePointer HitObjectAttributeNV 12(hBlock) + 14: 13(ptr) Variable HitObjectAttributeNV + 15: TypeInt 32 1 + 16: 15(int) Constant 0 + 17: 6(float) Constant 1073741824 + 18: TypePointer HitObjectAttributeNV 6(float) + 20: TypeHitObjectNV + 21: TypePointer Private 20 + 22(hObj): 21(ptr) Variable Private + 23: TypeAccelerationStructureKHR + 24: TypePointer UniformConstant 23 + 25(as): 24(ptr) Variable UniformConstant + 27: TypeInt 32 0 + 28: 27(int) Constant 1 + 29: TypeVector 6(float) 3 + 30: 6(float) Constant 1056964608 + 31: 29(fvec3) ConstantComposite 30 30 30 + 32: 29(fvec3) ConstantComposite 10 10 10 + 33: 15(int) Constant 1 + 34: TypeVector 6(float) 4 + 35: TypePointer RayPayloadKHR 34(fvec4) + 36(payload): 35(ptr) Variable RayPayloadKHR + 38: 6(float) Constant 1092616192 + 39: 15(int) Constant 2 + 40(pBlock): TypeStruct 7(fvec2) 7(fvec2) + 41: TypePointer RayPayloadKHR 40(pBlock) + 42: 41(ptr) Variable RayPayloadKHR + 44: 27(int) Constant 2 + 45: 29(fvec3) ConstantComposite 17 17 17 + 47: 6(float) Constant 1082130432 + 48(hObjHit): 21(ptr) Variable Private + 50: 15(int) Constant 3 + 52(hObjNop): 21(ptr) Variable Private + 53(hObjMiss): 21(ptr) Variable Private + 54: 6(float) Constant 1069547520 + 55: 29(fvec3) ConstantComposite 54 54 54 + 56: 6(float) Constant 1084227584 + 57: 6(float) Constant 1090519040 + 58: TypeBool + 62(block): TypeStruct 6(float) + 63: TypePointer StorageBuffer 62(block) + 64: 63(ptr) Variable StorageBuffer + 65: TypePointer StorageBuffer 6(float) + 76: 6(float) Constant 1077936128 + 78: TypePointer Function 6(float) + 83: TypePointer Function 29(fvec3) + 92: TypeMatrix 29(fvec3) 4 + 93: TypePointer Function 92 + 98: TypePointer Function 15(int) + 107: TypePointer Function 27(int) + 110: TypeVector 27(int) 2 + 111: TypePointer Function 110(ivec2) + 4(main): 2 Function None 3 + 5: Label + 79(tmin): 78(ptr) Variable Function + 81(tmax): 78(ptr) Variable Function + 84(orig): 83(ptr) Variable Function + 86(dir): 83(ptr) Variable Function + 88(oorig): 83(ptr) Variable Function + 90(odir): 83(ptr) Variable Function + 94(otw): 93(ptr) Variable Function + 96(wto): 93(ptr) Variable Function + 99(cid): 98(ptr) Variable Function + 101(iid): 98(ptr) Variable Function + 103(pid): 98(ptr) Variable Function + 105(gid): 98(ptr) Variable Function + 108(hkind): 107(ptr) Variable Function + 112(handle): 111(ptr) Variable Function + 114(rid): 107(ptr) Variable Function + Store 9(attr) 11 + 19: 18(ptr) AccessChain 14 16 + Store 19 17 + 26: 23 Load 25(as) + HitObjectTraceRayNV 22(hObj) 26 28 28 28 28 28 31 30 32 10 36(payload) + 37: 23 Load 25(as) + HitObjectTraceRayMotionNV 22(hObj) 37 28 28 28 28 28 31 30 32 10 38 42 + 43: 23 Load 25(as) + HitObjectRecordHitNV 22(hObj) 43 33 33 33 44 44 44 32 10 45 17 9(attr) + 46: 23 Load 25(as) + HitObjectRecordHitMotionNV 22(hObj) 46 33 33 33 44 44 44 32 10 45 17 47 9(attr) + 49: 23 Load 25(as) + HitObjectRecordHitWithIndexNV 48(hObjHit) 49 33 33 33 44 44 32 10 45 17 14 + 51: 23 Load 25(as) + HitObjectRecordHitWithIndexMotionNV 48(hObjHit) 51 33 33 33 44 44 32 10 45 17 47 14 + HitObjectRecordEmptyNV 52(hObjNop) + HitObjectRecordMissNV 53(hObjMiss) 28 31 17 55 56 + HitObjectRecordMissMotionNV 53(hObjMiss) 28 31 17 55 56 57 + HitObjectExecuteShaderNV 48(hObjHit) 42 + 59: 58(bool) HitObjectIsHitNV 22(hObj) + SelectionMerge 61 None + BranchConditional 59 60 67 + 60: Label + 66: 65(ptr) AccessChain 64 16 + Store 66 10 + Branch 61 + 67: Label + 68: 58(bool) HitObjectIsMissNV 22(hObj) + SelectionMerge 70 None + BranchConditional 68 69 72 + 69: Label + 71: 65(ptr) AccessChain 64 16 + Store 71 17 + Branch 70 + 72: Label + 73: 58(bool) HitObjectIsEmptyNV 22(hObj) + SelectionMerge 75 None + BranchConditional 73 74 75 + 74: Label + 77: 65(ptr) AccessChain 64 16 + Store 77 76 + Branch 75 + 75: Label + Branch 70 + 70: Label + Branch 61 + 61: Label + 80: 6(float) HitObjectGetRayTMinNV 48(hObjHit) + Store 79(tmin) 80 + 82: 6(float) HitObjectGetRayTMaxNV 48(hObjHit) + Store 81(tmax) 82 + 85: 29(fvec3) HitObjectGetWorldRayOriginNV 48(hObjHit) + Store 84(orig) 85 + 87: 29(fvec3) HitObjectGetWorldRayDirectionNV 48(hObjHit) + Store 86(dir) 87 + 89: 29(fvec3) HitObjectGetObjectRayOriginNV 48(hObjHit) + Store 88(oorig) 89 + 91: 29(fvec3) HitObjectGetObjectRayDirectionNV 48(hObjHit) + Store 90(odir) 91 + 95: 92 HitObjectGetObjectToWorldNV 48(hObjHit) + Store 94(otw) 95 + 97: 92 HitObjectGetWorldToObjectNV 48(hObjHit) + Store 96(wto) 97 + 100: 15(int) HitObjectGetInstanceCustomIndexNV 53(hObjMiss) + Store 99(cid) 100 + 102: 15(int) HitObjectGetInstanceIdNV 52(hObjNop) + Store 101(iid) 102 + 104: 15(int) HitObjectGetPrimitiveIndexNV 22(hObj) + Store 103(pid) 104 + 106: 15(int) HitObjectGetGeometryIndexNV 22(hObj) + Store 105(gid) 106 + 109: 27(int) HitObjectGetFrontFaceNV 22(hObj) + Store 108(hkind) 109 + HitObjectGetAttributesNV 22(hObj) 9(attr) + 113: 110(ivec2) HitObjectGetShaderRecordBufferHandleNV 22(hObj) + Store 112(handle) 113 + 115: 27(int) HitObjectGetShaderBindingTableRecordIndexNV 22(hObj) + Store 114(rid) 115 + Return + FunctionEnd diff --git a/Test/baseResults/spv.offsets.frag.out b/Test/baseResults/spv.offsets.frag.out index a1a9f311f5..d753f2f04c 100644 --- a/Test/baseResults/spv.offsets.frag.out +++ b/Test/baseResults/spv.offsets.frag.out @@ -1,6 +1,6 @@ spv.offsets.frag // Module Version 10000 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 15 Capability Shader diff --git a/Test/baseResults/spv.paramMemory.420.frag.out b/Test/baseResults/spv.paramMemory.420.frag.out index 4cdc35f73e..bc11df4fea 100644 --- a/Test/baseResults/spv.paramMemory.420.frag.out +++ b/Test/baseResults/spv.paramMemory.420.frag.out @@ -1,7 +1,7 @@ spv.paramMemory.420.frag Validation failed // Module Version 10000 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 69 Capability Shader diff --git a/Test/baseResults/spv.paramMemory.frag.out b/Test/baseResults/spv.paramMemory.frag.out index a535cd3fbb..ebb2ccbb47 100644 --- a/Test/baseResults/spv.paramMemory.frag.out +++ b/Test/baseResults/spv.paramMemory.frag.out @@ -1,7 +1,7 @@ spv.paramMemory.frag Validation failed // Module Version 10000 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 64 Capability Shader diff --git a/Test/baseResults/spv.perprimitiveNV.frag.out b/Test/baseResults/spv.perprimitiveNV.frag.out index 2a37f2b5d2..079a5f471e 100644 --- a/Test/baseResults/spv.perprimitiveNV.frag.out +++ b/Test/baseResults/spv.perprimitiveNV.frag.out @@ -1,6 +1,6 @@ spv.perprimitiveNV.frag // Module Version 10000 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 23 Capability Shader diff --git a/Test/baseResults/spv.pp.line.frag.out b/Test/baseResults/spv.pp.line.frag.out index dcfa897b50..7218254d27 100644 --- a/Test/baseResults/spv.pp.line.frag.out +++ b/Test/baseResults/spv.pp.line.frag.out @@ -1,18 +1,19 @@ spv.pp.line.frag -WARNING: spv.pp.line.frag:6: varying deprecated in version 130; may be removed in future release WARNING: spv.pp.line.frag:7: varying deprecated in version 130; may be removed in future release +WARNING: spv.pp.line.frag:8: varying deprecated in version 130; may be removed in future release // Module Version 10000 -// Generated by (magic number): 8000a -// Id's are bound by 65 +// Generated by (magic number): 8000b +// Id's are bound by 84 Capability Shader Capability Sampled1D 2: ExtInstImport "GLSL.std.450" MemoryModel Logical GLSL450 - EntryPoint Fragment 5 "main" 41 53 56 59 + EntryPoint Fragment 5 "main" 60 72 75 78 ExecutionMode 5 OriginUpperLeft 1: String "spv.pp.line.frag" + 13: String "header.h" Source GLSL 140 1 "// OpModuleProcessed auto-map-locations // OpModuleProcessed auto-map-bindings // OpModuleProcessed client vulkan100 @@ -21,6 +22,7 @@ WARNING: spv.pp.line.frag:7: varying deprecated in version 130; may be removed i // OpModuleProcessed entry-point main #line 1 #version 140 +#extension GL_GOOGLE_cpp_style_line_directive : require uniform sampler1D texSampler1D; uniform sampler2D texSampler2D; @@ -30,9 +32,20 @@ varying vec4 u; in vec2 coords2D; +#line 0 "header.h" +float myAbs(float x) { + if (x > 0) { + return x; + } + else { + return -x; + } +} + +#line 22 "spv.pp.line.frag" void main() { - float blendscale = 1.789; + float blendscale = myAbs(1.789); float bias = 2.0; float coords1D = 1.789; vec4 color = vec4(0.0, 0.0, 0.0, 0.0); @@ -46,105 +59,135 @@ void main() gl_FragColor = mix(color, u, blend * blendscale); } " + SourceExtension "GL_GOOGLE_cpp_style_line_directive" Name 5 "main" - Name 9 "blendscale" - Name 11 "bias" - Name 13 "coords1D" - Name 16 "color" - Name 22 "texSampler1D" - Name 37 "texSampler2D" - Name 41 "coords2D" - Name 53 "gl_FragColor" - Name 56 "u" - Name 59 "blend" - Decorate 22(texSampler1D) DescriptorSet 0 - Decorate 22(texSampler1D) Binding 0 - Decorate 37(texSampler2D) DescriptorSet 0 - Decorate 37(texSampler2D) Binding 1 - Decorate 41(coords2D) Location 2 - Decorate 53(gl_FragColor) Location 0 - Decorate 56(u) Location 1 - Decorate 59(blend) Location 0 + Name 11 "myAbs(f1;" + Name 10 "x" + Name 27 "blendscale" + Name 29 "param" + Name 31 "bias" + Name 33 "coords1D" + Name 36 "color" + Name 41 "texSampler1D" + Name 56 "texSampler2D" + Name 60 "coords2D" + Name 72 "gl_FragColor" + Name 75 "u" + Name 78 "blend" + Decorate 41(texSampler1D) DescriptorSet 0 + Decorate 41(texSampler1D) Binding 0 + Decorate 56(texSampler2D) DescriptorSet 0 + Decorate 56(texSampler2D) Binding 1 + Decorate 60(coords2D) Location 2 + Decorate 72(gl_FragColor) Location 0 + Decorate 75(u) Location 1 + Decorate 78(blend) Location 0 3: TypeVoid 4: TypeFunction 3 7: TypeFloat 32 8: TypePointer Function 7(float) - 10: 7(float) Constant 1071971828 - 12: 7(float) Constant 1073741824 - 14: TypeVector 7(float) 4 - 15: TypePointer Function 14(fvec4) - 17: 7(float) Constant 0 - 18: 14(fvec4) ConstantComposite 17 17 17 17 - 19: TypeImage 7(float) 1D sampled format:Unknown - 20: TypeSampledImage 19 - 21: TypePointer UniformConstant 20 -22(texSampler1D): 21(ptr) Variable UniformConstant - 34: TypeImage 7(float) 2D sampled format:Unknown - 35: TypeSampledImage 34 - 36: TypePointer UniformConstant 35 -37(texSampler2D): 36(ptr) Variable UniformConstant - 39: TypeVector 7(float) 2 - 40: TypePointer Input 39(fvec2) - 41(coords2D): 40(ptr) Variable Input - 52: TypePointer Output 14(fvec4) -53(gl_FragColor): 52(ptr) Variable Output - 55: TypePointer Input 14(fvec4) - 56(u): 55(ptr) Variable Input - 58: TypePointer Input 7(float) - 59(blend): 58(ptr) Variable Input - Line 1 11 11 + 9: TypeFunction 7(float) 8(ptr) + 15: 7(float) Constant 0 + 16: TypeBool + 28: 7(float) Constant 1071971828 + 32: 7(float) Constant 1073741824 + 34: TypeVector 7(float) 4 + 35: TypePointer Function 34(fvec4) + 37: 34(fvec4) ConstantComposite 15 15 15 15 + 38: TypeImage 7(float) 1D sampled format:Unknown + 39: TypeSampledImage 38 + 40: TypePointer UniformConstant 39 +41(texSampler1D): 40(ptr) Variable UniformConstant + 53: TypeImage 7(float) 2D sampled format:Unknown + 54: TypeSampledImage 53 + 55: TypePointer UniformConstant 54 +56(texSampler2D): 55(ptr) Variable UniformConstant + 58: TypeVector 7(float) 2 + 59: TypePointer Input 58(fvec2) + 60(coords2D): 59(ptr) Variable Input + 71: TypePointer Output 34(fvec4) +72(gl_FragColor): 71(ptr) Variable Output + 74: TypePointer Input 34(fvec4) + 75(u): 74(ptr) Variable Input + 77: TypePointer Input 7(float) + 78(blend): 77(ptr) Variable Input + Line 1 23 11 5(main): 3 Function None 4 6: Label - 9(blendscale): 8(ptr) Variable Function - 11(bias): 8(ptr) Variable Function - 13(coords1D): 8(ptr) Variable Function - 16(color): 15(ptr) Variable Function - Line 1 13 0 - Store 9(blendscale) 10 - Line 1 14 0 - Store 11(bias) 12 - Line 1 15 0 - Store 13(coords1D) 10 - Line 1 16 0 - Store 16(color) 18 + 27(blendscale): 8(ptr) Variable Function + 29(param): 8(ptr) Variable Function + 31(bias): 8(ptr) Variable Function + 33(coords1D): 8(ptr) Variable Function + 36(color): 35(ptr) Variable Function + Line 1 25 0 + Store 29(param) 28 + 30: 7(float) FunctionCall 11(myAbs(f1;) 29(param) + Store 27(blendscale) 30 + Line 1 26 0 + Store 31(bias) 32 + Line 1 27 0 + Store 33(coords1D) 28 + Line 1 28 0 + Store 36(color) 37 Line 1 54 0 - 23: 20 Load 22(texSampler1D) - 24: 7(float) Load 13(coords1D) - 25: 14(fvec4) ImageSampleImplicitLod 23 24 - 26: 14(fvec4) Load 16(color) - 27: 14(fvec4) FAdd 26 25 - Store 16(color) 27 + 42: 39 Load 41(texSampler1D) + 43: 7(float) Load 33(coords1D) + 44: 34(fvec4) ImageSampleImplicitLod 42 43 + 45: 34(fvec4) Load 36(color) + 46: 34(fvec4) FAdd 45 44 + Store 36(color) 46 Line 1 55 0 - 28: 20 Load 22(texSampler1D) - 29: 7(float) Load 13(coords1D) - 30: 7(float) Load 11(bias) - 31: 14(fvec4) ImageSampleImplicitLod 28 29 Bias 30 - 32: 14(fvec4) Load 16(color) - 33: 14(fvec4) FAdd 32 31 - Store 16(color) 33 + 47: 39 Load 41(texSampler1D) + 48: 7(float) Load 33(coords1D) + 49: 7(float) Load 31(bias) + 50: 34(fvec4) ImageSampleImplicitLod 47 48 Bias 49 + 51: 34(fvec4) Load 36(color) + 52: 34(fvec4) FAdd 51 50 + Store 36(color) 52 Line 1 103 0 - 38: 35 Load 37(texSampler2D) - 42: 39(fvec2) Load 41(coords2D) - 43: 14(fvec4) ImageSampleImplicitLod 38 42 - 44: 14(fvec4) Load 16(color) - 45: 14(fvec4) FAdd 44 43 - Store 16(color) 45 + 57: 54 Load 56(texSampler2D) + 61: 58(fvec2) Load 60(coords2D) + 62: 34(fvec4) ImageSampleImplicitLod 57 61 + 63: 34(fvec4) Load 36(color) + 64: 34(fvec4) FAdd 63 62 + Store 36(color) 64 Line 1 104 0 - 46: 35 Load 37(texSampler2D) - 47: 39(fvec2) Load 41(coords2D) - 48: 7(float) Load 11(bias) - 49: 14(fvec4) ImageSampleImplicitLod 46 47 Bias 48 - 50: 14(fvec4) Load 16(color) - 51: 14(fvec4) FAdd 50 49 - Store 16(color) 51 + 65: 54 Load 56(texSampler2D) + 66: 58(fvec2) Load 60(coords2D) + 67: 7(float) Load 31(bias) + 68: 34(fvec4) ImageSampleImplicitLod 65 66 Bias 67 + 69: 34(fvec4) Load 36(color) + 70: 34(fvec4) FAdd 69 68 + Store 36(color) 70 Line 1 106 0 - 54: 14(fvec4) Load 16(color) - 57: 14(fvec4) Load 56(u) - 60: 7(float) Load 59(blend) - 61: 7(float) Load 9(blendscale) - 62: 7(float) FMul 60 61 - 63: 14(fvec4) CompositeConstruct 62 62 62 62 - 64: 14(fvec4) ExtInst 2(GLSL.std.450) 46(FMix) 54 57 63 - Store 53(gl_FragColor) 64 + 73: 34(fvec4) Load 36(color) + 76: 34(fvec4) Load 75(u) + 79: 7(float) Load 78(blend) + 80: 7(float) Load 27(blendscale) + 81: 7(float) FMul 79 80 + 82: 34(fvec4) CompositeConstruct 81 81 81 81 + 83: 34(fvec4) ExtInst 2(GLSL.std.450) 46(FMix) 73 76 82 + Store 72(gl_FragColor) 83 Return FunctionEnd + Line 13 1 20 + 11(myAbs(f1;): 7(float) Function None 9 + 10(x): 8(ptr) FunctionParameter + 12: Label + Line 13 2 0 + 14: 7(float) Load 10(x) + 17: 16(bool) FOrdGreaterThan 14 15 + SelectionMerge 19 None + BranchConditional 17 18 22 + 18: Label + Line 13 3 0 + 20: 7(float) Load 10(x) + ReturnValue 20 + 22: Label + Line 13 6 0 + 23: 7(float) Load 10(x) + 24: 7(float) FNegate 23 + ReturnValue 24 + 19: Label + Unreachable + FunctionEnd diff --git a/Test/baseResults/spv.precise.tesc.out b/Test/baseResults/spv.precise.tesc.out index e13c612101..84617caeae 100644 --- a/Test/baseResults/spv.precise.tesc.out +++ b/Test/baseResults/spv.precise.tesc.out @@ -1,6 +1,6 @@ spv.precise.tesc // Module Version 10000 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 72 Capability Tessellation diff --git a/Test/baseResults/spv.precise.tese.out b/Test/baseResults/spv.precise.tese.out index 7db4ed0141..6fe183d218 100644 --- a/Test/baseResults/spv.precise.tese.out +++ b/Test/baseResults/spv.precise.tese.out @@ -1,6 +1,6 @@ spv.precise.tese // Module Version 10000 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 119 Capability Tessellation diff --git a/Test/baseResults/spv.precision.frag.out b/Test/baseResults/spv.precision.frag.out index 1d31230fa5..8144dfbf11 100644 --- a/Test/baseResults/spv.precision.frag.out +++ b/Test/baseResults/spv.precision.frag.out @@ -1,6 +1,6 @@ spv.precision.frag // Module Version 10000 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 165 Capability Shader diff --git a/Test/baseResults/spv.precisionArgs.frag.out b/Test/baseResults/spv.precisionArgs.frag.out index ae54a58aca..a35b1d3ce9 100644 --- a/Test/baseResults/spv.precisionArgs.frag.out +++ b/Test/baseResults/spv.precisionArgs.frag.out @@ -1,6 +1,6 @@ spv.precisionArgs.frag // Module Version 10000 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 83 Capability Shader diff --git a/Test/baseResults/spv.precisionNonESSamp.frag.out b/Test/baseResults/spv.precisionNonESSamp.frag.out index c4cd1eb7b6..40ca536b20 100644 --- a/Test/baseResults/spv.precisionNonESSamp.frag.out +++ b/Test/baseResults/spv.precisionNonESSamp.frag.out @@ -1,6 +1,6 @@ spv.precisionNonESSamp.frag // Module Version 10000 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 47 Capability Shader diff --git a/Test/baseResults/spv.precisionTexture.frag.out b/Test/baseResults/spv.precisionTexture.frag.out index d5e21b6c91..e46b2d79bb 100644 --- a/Test/baseResults/spv.precisionTexture.frag.out +++ b/Test/baseResults/spv.precisionTexture.frag.out @@ -1,6 +1,6 @@ spv.precisionTexture.frag // Module Version 10000 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 66 Capability Shader diff --git a/Test/baseResults/spv.prepost.frag.out b/Test/baseResults/spv.prepost.frag.out index 5fd6b3798c..b1f2d5e409 100644 --- a/Test/baseResults/spv.prepost.frag.out +++ b/Test/baseResults/spv.prepost.frag.out @@ -1,6 +1,6 @@ spv.prepost.frag // Module Version 10000 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 94 Capability Shader diff --git a/Test/baseResults/spv.privateVariableTypes.frag.out b/Test/baseResults/spv.privateVariableTypes.frag.out index d5ad68abb7..b09062a83e 100644 --- a/Test/baseResults/spv.privateVariableTypes.frag.out +++ b/Test/baseResults/spv.privateVariableTypes.frag.out @@ -1,6 +1,6 @@ spv.privateVariableTypes.frag // Module Version 10000 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 27 Capability Shader diff --git a/Test/baseResults/spv.pushConstant.vert.out b/Test/baseResults/spv.pushConstant.vert.out index 888d134bea..f6df47d578 100644 --- a/Test/baseResults/spv.pushConstant.vert.out +++ b/Test/baseResults/spv.pushConstant.vert.out @@ -1,6 +1,6 @@ spv.pushConstant.vert // Module Version 10000 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 35 Capability Shader diff --git a/Test/baseResults/spv.pushConstantAnon.vert.out b/Test/baseResults/spv.pushConstantAnon.vert.out index 75efdbc1b4..ca7d345b32 100644 --- a/Test/baseResults/spv.pushConstantAnon.vert.out +++ b/Test/baseResults/spv.pushConstantAnon.vert.out @@ -1,6 +1,6 @@ spv.pushConstantAnon.vert // Module Version 10000 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 38 Capability Shader diff --git a/Test/baseResults/spv.qualifiers.vert.out b/Test/baseResults/spv.qualifiers.vert.out index 4180e17653..0f0f347a87 100644 --- a/Test/baseResults/spv.qualifiers.vert.out +++ b/Test/baseResults/spv.qualifiers.vert.out @@ -1,6 +1,6 @@ spv.qualifiers.vert // Module Version 10000 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 21 Capability Shader diff --git a/Test/baseResults/spv.queryL.frag.out b/Test/baseResults/spv.queryL.frag.out index 1e38661656..1e18387d14 100644 --- a/Test/baseResults/spv.queryL.frag.out +++ b/Test/baseResults/spv.queryL.frag.out @@ -1,7 +1,7 @@ spv.queryL.frag Validation failed // Module Version 10000 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 224 Capability Shader diff --git a/Test/baseResults/spv.queueFamilyScope.comp.out b/Test/baseResults/spv.queueFamilyScope.comp.out index 9c239df2d9..49a59a383e 100644 --- a/Test/baseResults/spv.queueFamilyScope.comp.out +++ b/Test/baseResults/spv.queueFamilyScope.comp.out @@ -1,6 +1,6 @@ spv.queueFamilyScope.comp // Module Version 10300 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 21 Capability Shader diff --git a/Test/baseResults/spv.rankShift.comp.out b/Test/baseResults/spv.rankShift.comp.out index 1a725c13f3..cecde79580 100644 --- a/Test/baseResults/spv.rankShift.comp.out +++ b/Test/baseResults/spv.rankShift.comp.out @@ -1,6 +1,6 @@ spv.rankShift.comp // Module Version 10000 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 33 Capability Shader diff --git a/Test/baseResults/spv.register.autoassign-2.frag.out b/Test/baseResults/spv.register.autoassign-2.frag.out index 26b149b802..61d920c256 100644 --- a/Test/baseResults/spv.register.autoassign-2.frag.out +++ b/Test/baseResults/spv.register.autoassign-2.frag.out @@ -1,6 +1,6 @@ spv.register.autoassign-2.frag // Module Version 10000 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 47 Capability Shader diff --git a/Test/baseResults/spv.register.autoassign.frag.out b/Test/baseResults/spv.register.autoassign.frag.out index e347ce21d8..b4db04e650 100644 --- a/Test/baseResults/spv.register.autoassign.frag.out +++ b/Test/baseResults/spv.register.autoassign.frag.out @@ -1,6 +1,6 @@ spv.register.autoassign.frag // Module Version 10000 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 155 Capability Shader diff --git a/Test/baseResults/spv.register.autoassign.rangetest.frag.out b/Test/baseResults/spv.register.autoassign.rangetest.frag.out index 4381dababd..84a439a7ab 100644 --- a/Test/baseResults/spv.register.autoassign.rangetest.frag.out +++ b/Test/baseResults/spv.register.autoassign.rangetest.frag.out @@ -3,7 +3,7 @@ INTERNAL ERROR: mapped binding out of range: g_tSamp INTERNAL ERROR: mapped binding out of range: g_tScene // Module Version 10000 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 52 Capability Shader diff --git a/Test/baseResults/spv.register.noautoassign.frag.out b/Test/baseResults/spv.register.noautoassign.frag.out index ed8d507535..8c8cd3ccc7 100644 --- a/Test/baseResults/spv.register.noautoassign.frag.out +++ b/Test/baseResults/spv.register.noautoassign.frag.out @@ -1,6 +1,6 @@ spv.register.noautoassign.frag // Module Version 10000 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 155 Capability Shader diff --git a/Test/baseResults/spv.register.subpass.frag.out b/Test/baseResults/spv.register.subpass.frag.out index acd447d6c0..7c69c91818 100644 --- a/Test/baseResults/spv.register.subpass.frag.out +++ b/Test/baseResults/spv.register.subpass.frag.out @@ -1,6 +1,6 @@ spv.register.subpass.frag // Module Version 10000 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 40 Capability Shader diff --git a/Test/baseResults/spv.rw.autoassign.frag.out b/Test/baseResults/spv.rw.autoassign.frag.out index 27db3368a2..0c46493c15 100644 --- a/Test/baseResults/spv.rw.autoassign.frag.out +++ b/Test/baseResults/spv.rw.autoassign.frag.out @@ -1,6 +1,6 @@ spv.rw.autoassign.frag // Module Version 10000 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 45 Capability Shader diff --git a/Test/baseResults/spv.sample.frag.out b/Test/baseResults/spv.sample.frag.out index f43fc98c47..631a55967c 100644 --- a/Test/baseResults/spv.sample.frag.out +++ b/Test/baseResults/spv.sample.frag.out @@ -1,6 +1,6 @@ spv.sample.frag // Module Version 10000 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 13 Capability Shader diff --git a/Test/baseResults/spv.sampleId.frag.out b/Test/baseResults/spv.sampleId.frag.out index 8f9bc3874c..7f3232d122 100644 --- a/Test/baseResults/spv.sampleId.frag.out +++ b/Test/baseResults/spv.sampleId.frag.out @@ -1,6 +1,6 @@ spv.sampleId.frag // Module Version 10000 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 26 Capability Shader diff --git a/Test/baseResults/spv.sampleMaskOverrideCoverage.frag.out b/Test/baseResults/spv.sampleMaskOverrideCoverage.frag.out index 9b401d880b..6f22c5ab39 100644 --- a/Test/baseResults/spv.sampleMaskOverrideCoverage.frag.out +++ b/Test/baseResults/spv.sampleMaskOverrideCoverage.frag.out @@ -1,6 +1,6 @@ spv.sampleMaskOverrideCoverage.frag // Module Version 10000 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 20 Capability Shader diff --git a/Test/baseResults/spv.samplePosition.frag.out b/Test/baseResults/spv.samplePosition.frag.out index 80128303b5..6c98adddbc 100644 --- a/Test/baseResults/spv.samplePosition.frag.out +++ b/Test/baseResults/spv.samplePosition.frag.out @@ -1,6 +1,6 @@ spv.samplePosition.frag // Module Version 10000 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 30 Capability Shader diff --git a/Test/baseResults/spv.samplerlessTextureFunctions.frag.out b/Test/baseResults/spv.samplerlessTextureFunctions.frag.out index c2c431df22..447991225e 100644 --- a/Test/baseResults/spv.samplerlessTextureFunctions.frag.out +++ b/Test/baseResults/spv.samplerlessTextureFunctions.frag.out @@ -1,6 +1,6 @@ spv.samplerlessTextureFunctions.frag // Module Version 10000 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 51 Capability Shader diff --git a/Test/baseResults/spv.scalarlayout.frag.out b/Test/baseResults/spv.scalarlayout.frag.out index e08721f8b0..977f06b7bb 100644 --- a/Test/baseResults/spv.scalarlayout.frag.out +++ b/Test/baseResults/spv.scalarlayout.frag.out @@ -1,6 +1,6 @@ spv.scalarlayout.frag // Module Version 10000 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 20 Capability Shader diff --git a/Test/baseResults/spv.scalarlayoutfloat16.frag.out b/Test/baseResults/spv.scalarlayoutfloat16.frag.out index 4f22730e3e..93c0d2a134 100644 --- a/Test/baseResults/spv.scalarlayoutfloat16.frag.out +++ b/Test/baseResults/spv.scalarlayoutfloat16.frag.out @@ -1,6 +1,6 @@ spv.scalarlayoutfloat16.frag // Module Version 10000 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 18 Capability Shader diff --git a/Test/baseResults/spv.separate.frag.out b/Test/baseResults/spv.separate.frag.out index d31f8973ed..b960934c37 100644 --- a/Test/baseResults/spv.separate.frag.out +++ b/Test/baseResults/spv.separate.frag.out @@ -1,7 +1,7 @@ spv.separate.frag Validation failed // Module Version 10000 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 319 Capability Shader diff --git a/Test/baseResults/spv.set.vert.out b/Test/baseResults/spv.set.vert.out index 245b4bd8d1..b311c707aa 100644 --- a/Test/baseResults/spv.set.vert.out +++ b/Test/baseResults/spv.set.vert.out @@ -1,6 +1,6 @@ spv.set.vert // Module Version 10000 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 22 Capability Shader diff --git a/Test/baseResults/spv.shaderBallot.comp.out b/Test/baseResults/spv.shaderBallot.comp.out index 2a0106e661..143b2e931f 100644 --- a/Test/baseResults/spv.shaderBallot.comp.out +++ b/Test/baseResults/spv.shaderBallot.comp.out @@ -1,6 +1,6 @@ spv.shaderBallot.comp // Module Version 10000 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 397 Capability Shader diff --git a/Test/baseResults/spv.shaderBallotAMD.comp.out b/Test/baseResults/spv.shaderBallotAMD.comp.out index 9ea5ba0046..2d8ad553ab 100644 --- a/Test/baseResults/spv.shaderBallotAMD.comp.out +++ b/Test/baseResults/spv.shaderBallotAMD.comp.out @@ -1,6 +1,6 @@ spv.shaderBallotAMD.comp // Module Version 10000 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 1343 Capability Shader diff --git a/Test/baseResults/spv.shaderDrawParams.vert.out b/Test/baseResults/spv.shaderDrawParams.vert.out index 5baabbf5ea..a84c2fea01 100644 --- a/Test/baseResults/spv.shaderDrawParams.vert.out +++ b/Test/baseResults/spv.shaderDrawParams.vert.out @@ -1,6 +1,6 @@ spv.shaderDrawParams.vert // Module Version 10000 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 53 Capability Shader diff --git a/Test/baseResults/spv.shaderFragMaskAMD.frag.out b/Test/baseResults/spv.shaderFragMaskAMD.frag.out index ab48e04e70..3b461142be 100644 --- a/Test/baseResults/spv.shaderFragMaskAMD.frag.out +++ b/Test/baseResults/spv.shaderFragMaskAMD.frag.out @@ -1,6 +1,6 @@ spv.shaderFragMaskAMD.frag // Module Version 10000 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 80 Capability Shader diff --git a/Test/baseResults/spv.shaderGroupVote.comp.out b/Test/baseResults/spv.shaderGroupVote.comp.out index 4c45e33cf7..0724170123 100644 --- a/Test/baseResults/spv.shaderGroupVote.comp.out +++ b/Test/baseResults/spv.shaderGroupVote.comp.out @@ -1,6 +1,6 @@ spv.shaderGroupVote.comp // Module Version 10000 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 33 Capability Shader diff --git a/Test/baseResults/spv.shaderImageFootprint.frag.out b/Test/baseResults/spv.shaderImageFootprint.frag.out index ea8873c421..743fd36593 100644 --- a/Test/baseResults/spv.shaderImageFootprint.frag.out +++ b/Test/baseResults/spv.shaderImageFootprint.frag.out @@ -1,6 +1,6 @@ spv.shaderImageFootprint.frag // Module Version 10000 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 622 Capability Shader diff --git a/Test/baseResults/spv.shaderStencilExport.frag.out b/Test/baseResults/spv.shaderStencilExport.frag.out index 9bb217898f..ca85473acc 100644 --- a/Test/baseResults/spv.shaderStencilExport.frag.out +++ b/Test/baseResults/spv.shaderStencilExport.frag.out @@ -1,6 +1,6 @@ spv.shaderStencilExport.frag // Module Version 10000 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 10 Capability Shader diff --git a/Test/baseResults/spv.shadingRate.frag.out b/Test/baseResults/spv.shadingRate.frag.out index 866ae60946..86079ce0f6 100644 --- a/Test/baseResults/spv.shadingRate.frag.out +++ b/Test/baseResults/spv.shadingRate.frag.out @@ -1,6 +1,6 @@ spv.shadingRate.frag // Module Version 10000 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 21 Capability Shader diff --git a/Test/baseResults/spv.shiftOps.frag.out b/Test/baseResults/spv.shiftOps.frag.out index 03f7546727..6f232a0864 100644 --- a/Test/baseResults/spv.shiftOps.frag.out +++ b/Test/baseResults/spv.shiftOps.frag.out @@ -1,6 +1,6 @@ spv.shiftOps.frag // Module Version 10000 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 38 Capability Shader diff --git a/Test/baseResults/spv.shortCircuit.frag.out b/Test/baseResults/spv.shortCircuit.frag.out index 3c706f7715..017c88d86d 100644 --- a/Test/baseResults/spv.shortCircuit.frag.out +++ b/Test/baseResults/spv.shortCircuit.frag.out @@ -1,6 +1,6 @@ spv.shortCircuit.frag // Module Version 10000 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 147 Capability Shader diff --git a/Test/baseResults/spv.simpleFunctionCall.frag.out b/Test/baseResults/spv.simpleFunctionCall.frag.out index bda91b7f23..8e879bbd5d 100644 --- a/Test/baseResults/spv.simpleFunctionCall.frag.out +++ b/Test/baseResults/spv.simpleFunctionCall.frag.out @@ -1,6 +1,6 @@ spv.simpleFunctionCall.frag // Module Version 10000 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 19 Capability Shader diff --git a/Test/baseResults/spv.simpleMat.vert.out b/Test/baseResults/spv.simpleMat.vert.out index cc9b2b2182..e1accbf6c1 100644 --- a/Test/baseResults/spv.simpleMat.vert.out +++ b/Test/baseResults/spv.simpleMat.vert.out @@ -2,7 +2,7 @@ spv.simpleMat.vert WARNING: 0:3: varying deprecated in version 130; may be removed in future release // Module Version 10000 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 39 Capability Shader diff --git a/Test/baseResults/spv.smBuiltins.frag.out b/Test/baseResults/spv.smBuiltins.frag.out index 3fafa04c75..1619cf635e 100644 --- a/Test/baseResults/spv.smBuiltins.frag.out +++ b/Test/baseResults/spv.smBuiltins.frag.out @@ -1,6 +1,6 @@ spv.smBuiltins.frag // Module Version 10000 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 20 Capability Shader diff --git a/Test/baseResults/spv.smBuiltins.vert.out b/Test/baseResults/spv.smBuiltins.vert.out index 91ad637e99..c03c3cd959 100644 --- a/Test/baseResults/spv.smBuiltins.vert.out +++ b/Test/baseResults/spv.smBuiltins.vert.out @@ -1,6 +1,6 @@ spv.smBuiltins.vert // Module Version 10000 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 29 Capability Shader diff --git a/Test/baseResults/spv.sparseTexture.frag.out b/Test/baseResults/spv.sparseTexture.frag.out index bf44b81e00..84ca757c1f 100644 --- a/Test/baseResults/spv.sparseTexture.frag.out +++ b/Test/baseResults/spv.sparseTexture.frag.out @@ -1,7 +1,7 @@ spv.sparseTexture.frag Validation failed // Module Version 10000 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 442 Capability Shader diff --git a/Test/baseResults/spv.sparseTextureClamp.frag.out b/Test/baseResults/spv.sparseTextureClamp.frag.out index f42326d465..e56297c262 100644 --- a/Test/baseResults/spv.sparseTextureClamp.frag.out +++ b/Test/baseResults/spv.sparseTextureClamp.frag.out @@ -1,7 +1,7 @@ spv.sparseTextureClamp.frag Validation failed // Module Version 10000 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 360 Capability Shader diff --git a/Test/baseResults/spv.specConst.vert.out b/Test/baseResults/spv.specConst.vert.out index a510dc9af8..a2e234bd56 100644 --- a/Test/baseResults/spv.specConst.vert.out +++ b/Test/baseResults/spv.specConst.vert.out @@ -1,6 +1,6 @@ spv.specConst.vert // Module Version 10000 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 27 Capability Shader diff --git a/Test/baseResults/spv.specConstant.comp.out b/Test/baseResults/spv.specConstant.comp.out index a4e769fdcb..bfe7114245 100644 --- a/Test/baseResults/spv.specConstant.comp.out +++ b/Test/baseResults/spv.specConstant.comp.out @@ -1,6 +1,6 @@ spv.specConstant.comp // Module Version 10000 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 27 Capability Shader diff --git a/Test/baseResults/spv.specConstant.float16.comp.out b/Test/baseResults/spv.specConstant.float16.comp.out index be02057c1d..3381fc7e77 100644 --- a/Test/baseResults/spv.specConstant.float16.comp.out +++ b/Test/baseResults/spv.specConstant.float16.comp.out @@ -1,6 +1,6 @@ spv.specConstant.float16.comp // Module Version 10000 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 18 Capability Shader diff --git a/Test/baseResults/spv.specConstant.int16.comp.out b/Test/baseResults/spv.specConstant.int16.comp.out index 7bb4c8f333..17f385be48 100644 --- a/Test/baseResults/spv.specConstant.int16.comp.out +++ b/Test/baseResults/spv.specConstant.int16.comp.out @@ -1,6 +1,6 @@ spv.specConstant.int16.comp // Module Version 10000 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 18 Capability Shader diff --git a/Test/baseResults/spv.specConstant.int8.comp.out b/Test/baseResults/spv.specConstant.int8.comp.out index 0ab3bdc281..c906d71166 100644 --- a/Test/baseResults/spv.specConstant.int8.comp.out +++ b/Test/baseResults/spv.specConstant.int8.comp.out @@ -1,6 +1,6 @@ spv.specConstant.int8.comp // Module Version 10000 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 18 Capability Shader diff --git a/Test/baseResults/spv.specConstant.vert.out b/Test/baseResults/spv.specConstant.vert.out index f7d4381105..cc126ab5c0 100644 --- a/Test/baseResults/spv.specConstant.vert.out +++ b/Test/baseResults/spv.specConstant.vert.out @@ -1,6 +1,6 @@ spv.specConstant.vert // Module Version 10000 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 81 Capability Shader diff --git a/Test/baseResults/spv.specConstantComposite.vert.out b/Test/baseResults/spv.specConstantComposite.vert.out index 15777d8f38..ce9ce066a9 100644 --- a/Test/baseResults/spv.specConstantComposite.vert.out +++ b/Test/baseResults/spv.specConstantComposite.vert.out @@ -1,6 +1,6 @@ spv.specConstantComposite.vert // Module Version 10000 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 43 Capability Shader diff --git a/Test/baseResults/spv.specConstantOperations.vert.out b/Test/baseResults/spv.specConstantOperations.vert.out index 53664601b8..cb1f73926d 100644 --- a/Test/baseResults/spv.specConstantOperations.vert.out +++ b/Test/baseResults/spv.specConstantOperations.vert.out @@ -1,6 +1,6 @@ spv.specConstantOperations.vert // Module Version 10000 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 162 Capability Shader diff --git a/Test/baseResults/spv.specTexture.frag.out b/Test/baseResults/spv.specTexture.frag.out index 4ca488eb69..b599e3565e 100644 --- a/Test/baseResults/spv.specTexture.frag.out +++ b/Test/baseResults/spv.specTexture.frag.out @@ -1,6 +1,6 @@ spv.specTexture.frag // Module Version 10000 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 23 Capability Shader diff --git a/Test/baseResults/spv.ssbo.autoassign.frag.out b/Test/baseResults/spv.ssbo.autoassign.frag.out index e2db863c65..35381055c4 100644 --- a/Test/baseResults/spv.ssbo.autoassign.frag.out +++ b/Test/baseResults/spv.ssbo.autoassign.frag.out @@ -1,6 +1,6 @@ spv.ssbo.autoassign.frag // Module Version 10000 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 99 Capability Shader diff --git a/Test/baseResults/spv.ssboAlias.frag.out b/Test/baseResults/spv.ssboAlias.frag.out index cdcd222cd1..0a5a12b9b4 100644 --- a/Test/baseResults/spv.ssboAlias.frag.out +++ b/Test/baseResults/spv.ssboAlias.frag.out @@ -1,6 +1,6 @@ spv.ssboAlias.frag // Module Version 10000 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 44 Capability Shader diff --git a/Test/baseResults/spv.stereoViewRendering.tesc.out b/Test/baseResults/spv.stereoViewRendering.tesc.out index f01e53bf8a..100b553404 100644 --- a/Test/baseResults/spv.stereoViewRendering.tesc.out +++ b/Test/baseResults/spv.stereoViewRendering.tesc.out @@ -1,6 +1,6 @@ spv.stereoViewRendering.tesc // Module Version 10000 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 42 Capability Tessellation diff --git a/Test/baseResults/spv.stereoViewRendering.vert.out b/Test/baseResults/spv.stereoViewRendering.vert.out index e74921af9e..530d75e1f9 100644 --- a/Test/baseResults/spv.stereoViewRendering.vert.out +++ b/Test/baseResults/spv.stereoViewRendering.vert.out @@ -1,6 +1,6 @@ spv.stereoViewRendering.vert // Module Version 10000 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 27 Capability Shader diff --git a/Test/baseResults/spv.storageBuffer.vert.out b/Test/baseResults/spv.storageBuffer.vert.out index 2411d2f7f0..fdbb4db3c4 100644 --- a/Test/baseResults/spv.storageBuffer.vert.out +++ b/Test/baseResults/spv.storageBuffer.vert.out @@ -1,6 +1,6 @@ spv.storageBuffer.vert // Module Version 10000 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 31 Capability Shader diff --git a/Test/baseResults/spv.structAssignment.frag.out b/Test/baseResults/spv.structAssignment.frag.out index 8e82cac324..a0cfb54233 100644 --- a/Test/baseResults/spv.structAssignment.frag.out +++ b/Test/baseResults/spv.structAssignment.frag.out @@ -3,7 +3,7 @@ WARNING: 0:6: '' : all default precisions are highp; use precision statements to "precision mediump int; precision highp float;" // Module Version 10000 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 50 Capability Shader diff --git a/Test/baseResults/spv.structCopy.comp.out b/Test/baseResults/spv.structCopy.comp.out new file mode 100644 index 0000000000..38c7c09281 --- /dev/null +++ b/Test/baseResults/spv.structCopy.comp.out @@ -0,0 +1,142 @@ +spv.structCopy.comp +// Module Version 10000 +// Generated by (magic number): 8000b +// Id's are bound by 81 + + Capability Shader + 1: ExtInstImport "GLSL.std.450" + MemoryModel Logical GLSL450 + EntryPoint GLCompute 4 "main" 24 + ExecutionMode 4 LocalSize 512 1 1 + Source GLSL 460 + Name 4 "main" + Name 7 "MyStruct" + MemberName 7(MyStruct) 0 "a" + MemberName 7(MyStruct) 1 "b" + MemberName 7(MyStruct) 2 "c" + Name 11 "s" + Name 21 "id" + Name 24 "gl_GlobalInvocationID" + Name 30 "ms" + Name 32 "MyStruct" + MemberName 32(MyStruct) 0 "a" + MemberName 32(MyStruct) 1 "b" + MemberName 32(MyStruct) 2 "c" + Name 34 "MyStructs" + MemberName 34(MyStructs) 0 "count" + MemberName 34(MyStructs) 1 "data" + Name 36 "my_structs" + Name 65 "Output" + MemberName 65(Output) 0 "a" + MemberName 65(Output) 1 "b" + MemberName 65(Output) 2 "c" + Name 67 "o" + Decorate 24(gl_GlobalInvocationID) BuiltIn GlobalInvocationId + MemberDecorate 32(MyStruct) 0 Offset 0 + MemberDecorate 32(MyStruct) 1 Offset 4 + MemberDecorate 32(MyStruct) 2 Offset 8 + Decorate 33 ArrayStride 12 + MemberDecorate 34(MyStructs) 0 Offset 0 + MemberDecorate 34(MyStructs) 1 Offset 4 + Decorate 34(MyStructs) BufferBlock + Decorate 36(my_structs) DescriptorSet 0 + Decorate 36(my_structs) Binding 0 + MemberDecorate 65(Output) 0 Offset 0 + MemberDecorate 65(Output) 1 Offset 4 + MemberDecorate 65(Output) 2 Offset 8 + Decorate 65(Output) BufferBlock + Decorate 67(o) DescriptorSet 0 + Decorate 67(o) Binding 1 + Decorate 80 BuiltIn WorkgroupSize + 2: TypeVoid + 3: TypeFunction 2 + 6: TypeInt 32 0 + 7(MyStruct): TypeStruct 6(int) 6(int) 6(int) + 8: 6(int) Constant 512 + 9: TypeArray 7(MyStruct) 8 + 10: TypePointer Workgroup 9 + 11(s): 10(ptr) Variable Workgroup + 12: TypeInt 32 1 + 13: 12(int) Constant 0 + 14: 6(int) Constant 1 + 15: 6(int) Constant 2 + 16: 6(int) Constant 3 + 17: 7(MyStruct) ConstantComposite 14 15 16 + 18: TypePointer Workgroup 7(MyStruct) + 20: TypePointer Function 6(int) + 22: TypeVector 6(int) 3 + 23: TypePointer Input 22(ivec3) +24(gl_GlobalInvocationID): 23(ptr) Variable Input + 25: 6(int) Constant 0 + 26: TypePointer Input 6(int) + 29: TypePointer Function 7(MyStruct) + 32(MyStruct): TypeStruct 6(int) 6(int) 6(int) + 33: TypeRuntimeArray 32(MyStruct) + 34(MyStructs): TypeStruct 6(int) 33 + 35: TypePointer Uniform 34(MyStructs) + 36(my_structs): 35(ptr) Variable Uniform + 37: TypePointer Uniform 6(int) + 40: TypeBool + 52: 12(int) Constant 1 + 54: TypePointer Uniform 32(MyStruct) + 62: 12(int) Constant 2 + 65(Output): TypeStruct 6(int) 6(int) 6(int) + 66: TypePointer Uniform 65(Output) + 67(o): 66(ptr) Variable Uniform + 80: 22(ivec3) ConstantComposite 8 14 14 + 4(main): 2 Function None 3 + 5: Label + 21(id): 20(ptr) Variable Function + 30(ms): 29(ptr) Variable Function + 42: 29(ptr) Variable Function + 19: 18(ptr) AccessChain 11(s) 13 + Store 19 17 + 27: 26(ptr) AccessChain 24(gl_GlobalInvocationID) 25 + 28: 6(int) Load 27 + Store 21(id) 28 + 31: 6(int) Load 21(id) + 38: 37(ptr) AccessChain 36(my_structs) 13 + 39: 6(int) Load 38 + 41: 40(bool) UGreaterThan 31 39 + SelectionMerge 44 None + BranchConditional 41 43 51 + 43: Label + 45: 6(int) Load 21(id) + 46: 37(ptr) AccessChain 36(my_structs) 13 + 47: 6(int) Load 46 + 48: 6(int) ISub 45 47 + 49: 18(ptr) AccessChain 11(s) 48 + 50: 7(MyStruct) Load 49 + Store 42 50 + Branch 44 + 51: Label + 53: 6(int) Load 21(id) + 55: 54(ptr) AccessChain 36(my_structs) 52 53 + 56:32(MyStruct) Load 55 + 57: 6(int) CompositeExtract 56 0 + 58: 20(ptr) AccessChain 42 13 + Store 58 57 + 59: 6(int) CompositeExtract 56 1 + 60: 20(ptr) AccessChain 42 52 + Store 60 59 + 61: 6(int) CompositeExtract 56 2 + 63: 20(ptr) AccessChain 42 62 + Store 63 61 + Branch 44 + 44: Label + 64: 7(MyStruct) Load 42 + Store 30(ms) 64 + 68: 37(ptr) AccessChain 67(o) 13 + 69: 20(ptr) AccessChain 30(ms) 13 + 70: 6(int) Load 69 + 71: 6(int) AtomicIAdd 68 14 25 70 + 72: 37(ptr) AccessChain 67(o) 52 + 73: 20(ptr) AccessChain 30(ms) 52 + 74: 6(int) Load 73 + 75: 6(int) AtomicIAdd 72 14 25 74 + 76: 37(ptr) AccessChain 67(o) 62 + 77: 20(ptr) AccessChain 30(ms) 62 + 78: 6(int) Load 77 + 79: 6(int) AtomicIAdd 76 14 25 78 + Return + FunctionEnd diff --git a/Test/baseResults/spv.structDeref.frag.out b/Test/baseResults/spv.structDeref.frag.out index 94fc4e24c5..a528a599ca 100644 --- a/Test/baseResults/spv.structDeref.frag.out +++ b/Test/baseResults/spv.structDeref.frag.out @@ -1,6 +1,6 @@ spv.structDeref.frag // Module Version 10000 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 123 Capability Shader diff --git a/Test/baseResults/spv.structure.frag.out b/Test/baseResults/spv.structure.frag.out index 00fed0e015..6b39c297e4 100644 --- a/Test/baseResults/spv.structure.frag.out +++ b/Test/baseResults/spv.structure.frag.out @@ -1,6 +1,6 @@ spv.structure.frag // Module Version 10000 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 60 Capability Shader diff --git a/Test/baseResults/spv.subgroup.frag.out b/Test/baseResults/spv.subgroup.frag.out index a3e427f0cf..a882a22e68 100644 --- a/Test/baseResults/spv.subgroup.frag.out +++ b/Test/baseResults/spv.subgroup.frag.out @@ -1,6 +1,6 @@ spv.subgroup.frag // Module Version 10300 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 17 Capability Shader diff --git a/Test/baseResults/spv.subgroup.geom.out b/Test/baseResults/spv.subgroup.geom.out index 27f05b2f9e..3340595030 100644 --- a/Test/baseResults/spv.subgroup.geom.out +++ b/Test/baseResults/spv.subgroup.geom.out @@ -1,6 +1,6 @@ spv.subgroup.geom // Module Version 10300 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 26 Capability Geometry diff --git a/Test/baseResults/spv.subgroup.tesc.out b/Test/baseResults/spv.subgroup.tesc.out index 8322a4a165..aaac4b8075 100644 --- a/Test/baseResults/spv.subgroup.tesc.out +++ b/Test/baseResults/spv.subgroup.tesc.out @@ -1,6 +1,6 @@ spv.subgroup.tesc // Module Version 10300 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 26 Capability Tessellation diff --git a/Test/baseResults/spv.subgroup.tese.out b/Test/baseResults/spv.subgroup.tese.out index 360f98bef7..f989981c28 100644 --- a/Test/baseResults/spv.subgroup.tese.out +++ b/Test/baseResults/spv.subgroup.tese.out @@ -1,6 +1,6 @@ spv.subgroup.tese // Module Version 10300 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 26 Capability Tessellation diff --git a/Test/baseResults/spv.subgroup.vert.out b/Test/baseResults/spv.subgroup.vert.out index 6de8a0ae01..6add1c7caa 100644 --- a/Test/baseResults/spv.subgroup.vert.out +++ b/Test/baseResults/spv.subgroup.vert.out @@ -1,6 +1,6 @@ spv.subgroup.vert // Module Version 10300 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 26 Capability Shader diff --git a/Test/baseResults/spv.subgroupArithmetic.comp.out b/Test/baseResults/spv.subgroupArithmetic.comp.out index 87bfa3115d..bd71fc7cf8 100644 --- a/Test/baseResults/spv.subgroupArithmetic.comp.out +++ b/Test/baseResults/spv.subgroupArithmetic.comp.out @@ -1,6 +1,6 @@ spv.subgroupArithmetic.comp // Module Version 10300 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 2386 Capability Shader diff --git a/Test/baseResults/spv.subgroupBallot.comp.out b/Test/baseResults/spv.subgroupBallot.comp.out index 65cfa7a464..51cb7ac183 100644 --- a/Test/baseResults/spv.subgroupBallot.comp.out +++ b/Test/baseResults/spv.subgroupBallot.comp.out @@ -1,6 +1,6 @@ spv.subgroupBallot.comp // Module Version 10300 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 437 Capability Shader diff --git a/Test/baseResults/spv.subgroupBasic.comp.out b/Test/baseResults/spv.subgroupBasic.comp.out index fb9fa0cb50..51eae75965 100644 --- a/Test/baseResults/spv.subgroupBasic.comp.out +++ b/Test/baseResults/spv.subgroupBasic.comp.out @@ -1,6 +1,6 @@ spv.subgroupBasic.comp // Module Version 10300 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 40 Capability Shader diff --git a/Test/baseResults/spv.subgroupClustered.comp.out b/Test/baseResults/spv.subgroupClustered.comp.out index a2e486dd68..2529eeff9a 100644 --- a/Test/baseResults/spv.subgroupClustered.comp.out +++ b/Test/baseResults/spv.subgroupClustered.comp.out @@ -1,6 +1,6 @@ spv.subgroupClustered.comp // Module Version 10300 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 838 Capability Shader diff --git a/Test/baseResults/spv.subgroupExtendedTypesArithmetic.comp.out b/Test/baseResults/spv.subgroupExtendedTypesArithmetic.comp.out index 828ce61636..51c2a5e27b 100644 --- a/Test/baseResults/spv.subgroupExtendedTypesArithmetic.comp.out +++ b/Test/baseResults/spv.subgroupExtendedTypesArithmetic.comp.out @@ -1,6 +1,6 @@ spv.subgroupExtendedTypesArithmetic.comp // Module Version 10300 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 4218 Capability Shader diff --git a/Test/baseResults/spv.subgroupExtendedTypesBallot.comp.out b/Test/baseResults/spv.subgroupExtendedTypesBallot.comp.out index 60f01bccf1..0a706a504d 100644 --- a/Test/baseResults/spv.subgroupExtendedTypesBallot.comp.out +++ b/Test/baseResults/spv.subgroupExtendedTypesBallot.comp.out @@ -1,6 +1,6 @@ spv.subgroupExtendedTypesBallot.comp // Module Version 10300 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 498 Capability Shader diff --git a/Test/baseResults/spv.subgroupExtendedTypesClustered.comp.out b/Test/baseResults/spv.subgroupExtendedTypesClustered.comp.out index 98a7a89011..f876c5a55c 100644 --- a/Test/baseResults/spv.subgroupExtendedTypesClustered.comp.out +++ b/Test/baseResults/spv.subgroupExtendedTypesClustered.comp.out @@ -1,6 +1,6 @@ spv.subgroupExtendedTypesClustered.comp // Module Version 10300 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 1458 Capability Shader diff --git a/Test/baseResults/spv.subgroupExtendedTypesPartitioned.comp.out b/Test/baseResults/spv.subgroupExtendedTypesPartitioned.comp.out index 47576d9f7f..f2cb8cb1cc 100644 --- a/Test/baseResults/spv.subgroupExtendedTypesPartitioned.comp.out +++ b/Test/baseResults/spv.subgroupExtendedTypesPartitioned.comp.out @@ -1,6 +1,6 @@ spv.subgroupExtendedTypesPartitioned.comp // Module Version 10300 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 1743 Capability Shader diff --git a/Test/baseResults/spv.subgroupExtendedTypesQuad.comp.out b/Test/baseResults/spv.subgroupExtendedTypesQuad.comp.out index f385545e63..8aa7c12042 100644 --- a/Test/baseResults/spv.subgroupExtendedTypesQuad.comp.out +++ b/Test/baseResults/spv.subgroupExtendedTypesQuad.comp.out @@ -1,6 +1,6 @@ spv.subgroupExtendedTypesQuad.comp // Module Version 10300 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 918 Capability Shader diff --git a/Test/baseResults/spv.subgroupExtendedTypesShuffle.comp.out b/Test/baseResults/spv.subgroupExtendedTypesShuffle.comp.out index eaea708bcd..0051bd7d83 100644 --- a/Test/baseResults/spv.subgroupExtendedTypesShuffle.comp.out +++ b/Test/baseResults/spv.subgroupExtendedTypesShuffle.comp.out @@ -1,6 +1,6 @@ spv.subgroupExtendedTypesShuffle.comp // Module Version 10300 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 554 Capability Shader diff --git a/Test/baseResults/spv.subgroupExtendedTypesShuffleRelative.comp.out b/Test/baseResults/spv.subgroupExtendedTypesShuffleRelative.comp.out index 8665c46c26..46244baa87 100644 --- a/Test/baseResults/spv.subgroupExtendedTypesShuffleRelative.comp.out +++ b/Test/baseResults/spv.subgroupExtendedTypesShuffleRelative.comp.out @@ -1,6 +1,6 @@ spv.subgroupExtendedTypesShuffleRelative.comp // Module Version 10300 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 554 Capability Shader diff --git a/Test/baseResults/spv.subgroupExtendedTypesVote.comp.out b/Test/baseResults/spv.subgroupExtendedTypesVote.comp.out index 6fde1f938b..a53847ca7a 100644 --- a/Test/baseResults/spv.subgroupExtendedTypesVote.comp.out +++ b/Test/baseResults/spv.subgroupExtendedTypesVote.comp.out @@ -1,6 +1,6 @@ spv.subgroupExtendedTypesVote.comp // Module Version 10300 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 277 Capability Shader diff --git a/Test/baseResults/spv.subgroupPartitioned.comp.out b/Test/baseResults/spv.subgroupPartitioned.comp.out index 0e7b7ef294..922d393edf 100644 --- a/Test/baseResults/spv.subgroupPartitioned.comp.out +++ b/Test/baseResults/spv.subgroupPartitioned.comp.out @@ -1,6 +1,6 @@ spv.subgroupPartitioned.comp // Module Version 10300 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 2807 Capability Shader diff --git a/Test/baseResults/spv.subgroupQuad.comp.out b/Test/baseResults/spv.subgroupQuad.comp.out index 143d01d779..b418148cd4 100644 --- a/Test/baseResults/spv.subgroupQuad.comp.out +++ b/Test/baseResults/spv.subgroupQuad.comp.out @@ -1,6 +1,6 @@ spv.subgroupQuad.comp // Module Version 10300 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 696 Capability Shader diff --git a/Test/baseResults/spv.subgroupShuffle.comp.out b/Test/baseResults/spv.subgroupShuffle.comp.out index 02cf89f8bf..d54e8ae999 100644 --- a/Test/baseResults/spv.subgroupShuffle.comp.out +++ b/Test/baseResults/spv.subgroupShuffle.comp.out @@ -1,6 +1,6 @@ spv.subgroupShuffle.comp // Module Version 10300 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 420 Capability Shader diff --git a/Test/baseResults/spv.subgroupShuffleRelative.comp.out b/Test/baseResults/spv.subgroupShuffleRelative.comp.out index e8486b660e..6bae808f80 100644 --- a/Test/baseResults/spv.subgroupShuffleRelative.comp.out +++ b/Test/baseResults/spv.subgroupShuffleRelative.comp.out @@ -1,6 +1,6 @@ spv.subgroupShuffleRelative.comp // Module Version 10300 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 420 Capability Shader diff --git a/Test/baseResults/spv.subgroupSizeARB.frag.out b/Test/baseResults/spv.subgroupSizeARB.frag.out new file mode 100644 index 0000000000..5eeb0c094a --- /dev/null +++ b/Test/baseResults/spv.subgroupSizeARB.frag.out @@ -0,0 +1,34 @@ +spv.subgroupSizeARB.frag +// Module Version 10000 +// Generated by (magic number): 8000b +// Id's are bound by 12 + + Capability Shader + Capability SubgroupBallotKHR + Extension "SPV_KHR_shader_ballot" + 1: ExtInstImport "GLSL.std.450" + MemoryModel Logical GLSL450 + EntryPoint Fragment 4 "main" 8 10 + ExecutionMode 4 OriginUpperLeft + Source GLSL 450 + SourceExtension "GL_ARB_shader_ballot" + SourceExtension "GL_KHR_shader_subgroup_basic" + Name 4 "main" + Name 8 "result" + Name 10 "gl_SubGroupSizeARB" + Decorate 8(result) Location 0 + Decorate 10(gl_SubGroupSizeARB) Flat + Decorate 10(gl_SubGroupSizeARB) BuiltIn SubgroupSize + 2: TypeVoid + 3: TypeFunction 2 + 6: TypeInt 32 0 + 7: TypePointer Output 6(int) + 8(result): 7(ptr) Variable Output + 9: TypePointer Input 6(int) +10(gl_SubGroupSizeARB): 9(ptr) Variable Input + 4(main): 2 Function None 3 + 5: Label + 11: 6(int) Load 10(gl_SubGroupSizeARB) + Store 8(result) 11 + Return + FunctionEnd diff --git a/Test/baseResults/spv.subgroupUniformControlFlow.vert.out b/Test/baseResults/spv.subgroupUniformControlFlow.vert.out index b7fce5a3ca..a18918632c 100644 --- a/Test/baseResults/spv.subgroupUniformControlFlow.vert.out +++ b/Test/baseResults/spv.subgroupUniformControlFlow.vert.out @@ -2,7 +2,7 @@ spv.subgroupUniformControlFlow.vert WARNING: 0:7: '' : attribute with arguments not recognized, skipping // Module Version 10000 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 6 Capability Shader diff --git a/Test/baseResults/spv.subgroupVote.comp.out b/Test/baseResults/spv.subgroupVote.comp.out index ad8ffaaa35..fa0a01fb42 100644 --- a/Test/baseResults/spv.subgroupVote.comp.out +++ b/Test/baseResults/spv.subgroupVote.comp.out @@ -1,6 +1,6 @@ spv.subgroupVote.comp // Module Version 10300 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 216 Capability Shader diff --git a/Test/baseResults/spv.subpass.frag.out b/Test/baseResults/spv.subpass.frag.out index 6b534a6ab2..bf49b08df0 100644 --- a/Test/baseResults/spv.subpass.frag.out +++ b/Test/baseResults/spv.subpass.frag.out @@ -1,6 +1,6 @@ spv.subpass.frag // Module Version 10000 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 67 Capability Shader diff --git a/Test/baseResults/spv.switch.frag.out b/Test/baseResults/spv.switch.frag.out index 9c68657f2c..4e7db4df5d 100644 --- a/Test/baseResults/spv.switch.frag.out +++ b/Test/baseResults/spv.switch.frag.out @@ -4,7 +4,7 @@ WARNING: 0:134: 'switch' : last case/default label not followed by statements WARNING: 0:139: 'switch' : last case/default label not followed by statements // Module Version 10000 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 269 Capability Shader diff --git a/Test/baseResults/spv.swizzle.frag.out b/Test/baseResults/spv.swizzle.frag.out index 2aa31e8c7b..f42a34be90 100644 --- a/Test/baseResults/spv.swizzle.frag.out +++ b/Test/baseResults/spv.swizzle.frag.out @@ -1,6 +1,6 @@ spv.swizzle.frag // Module Version 10000 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 117 Capability Shader diff --git a/Test/baseResults/spv.swizzleInversion.frag.out b/Test/baseResults/spv.swizzleInversion.frag.out index 8d09934608..32a0132644 100644 --- a/Test/baseResults/spv.swizzleInversion.frag.out +++ b/Test/baseResults/spv.swizzleInversion.frag.out @@ -1,6 +1,6 @@ spv.swizzleInversion.frag // Module Version 10000 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 46 Capability Shader diff --git a/Test/baseResults/spv.terminate.frag.out b/Test/baseResults/spv.terminate.frag.out index 39cb151f0b..d76a48784d 100755 --- a/Test/baseResults/spv.terminate.frag.out +++ b/Test/baseResults/spv.terminate.frag.out @@ -1,6 +1,6 @@ spv.terminate.frag // Module Version 10000 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 7 Capability Shader diff --git a/Test/baseResults/spv.test.frag.out b/Test/baseResults/spv.test.frag.out index fddcdb84cc..c5d63845c9 100644 --- a/Test/baseResults/spv.test.frag.out +++ b/Test/baseResults/spv.test.frag.out @@ -1,6 +1,6 @@ spv.test.frag // Module Version 10000 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 55 Capability Shader diff --git a/Test/baseResults/spv.test.vert.out b/Test/baseResults/spv.test.vert.out index 3eb6435816..350ee7884b 100644 --- a/Test/baseResults/spv.test.vert.out +++ b/Test/baseResults/spv.test.vert.out @@ -2,7 +2,7 @@ spv.test.vert WARNING: 0:5: attribute deprecated in version 130; may be removed in future release // Module Version 10000 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 24 Capability Shader diff --git a/Test/baseResults/spv.texture.frag.out b/Test/baseResults/spv.texture.frag.out index 841bbd3a8f..dc1970a9fd 100644 --- a/Test/baseResults/spv.texture.frag.out +++ b/Test/baseResults/spv.texture.frag.out @@ -4,7 +4,7 @@ WARNING: 0:11: varying deprecated in version 130; may be removed in future relea WARNING: 0:12: varying deprecated in version 130; may be removed in future release // Module Version 10000 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 305 Capability Shader diff --git a/Test/baseResults/spv.texture.sampler.transform.frag.out b/Test/baseResults/spv.texture.sampler.transform.frag.out index a297ea7895..4e9534e753 100644 --- a/Test/baseResults/spv.texture.sampler.transform.frag.out +++ b/Test/baseResults/spv.texture.sampler.transform.frag.out @@ -1,6 +1,6 @@ spv.texture.sampler.transform.frag // Module Version 10000 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 20 Capability Shader diff --git a/Test/baseResults/spv.texture.vert.out b/Test/baseResults/spv.texture.vert.out index 544a0f31ab..35053f3878 100644 --- a/Test/baseResults/spv.texture.vert.out +++ b/Test/baseResults/spv.texture.vert.out @@ -1,6 +1,6 @@ spv.texture.vert // Module Version 10000 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 150 Capability Shader diff --git a/Test/baseResults/spv.textureBuffer.vert.out b/Test/baseResults/spv.textureBuffer.vert.out index d18c656104..f5b271f6da 100644 --- a/Test/baseResults/spv.textureBuffer.vert.out +++ b/Test/baseResults/spv.textureBuffer.vert.out @@ -1,6 +1,6 @@ spv.textureBuffer.vert // Module Version 10000 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 42 Capability Shader diff --git a/Test/baseResults/spv.textureGatherBiasLod.frag.out b/Test/baseResults/spv.textureGatherBiasLod.frag.out index 3a9bb80275..f47e16a76d 100644 --- a/Test/baseResults/spv.textureGatherBiasLod.frag.out +++ b/Test/baseResults/spv.textureGatherBiasLod.frag.out @@ -1,6 +1,6 @@ spv.textureGatherBiasLod.frag // Module Version 10000 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 298 Capability Shader diff --git a/Test/baseResults/spv.tpipBlockMatchSAD.frag.out b/Test/baseResults/spv.tpipBlockMatchSAD.frag.out new file mode 100644 index 0000000000..a807d9238c --- /dev/null +++ b/Test/baseResults/spv.tpipBlockMatchSAD.frag.out @@ -0,0 +1,123 @@ +spv.tpipBlockMatchSAD.frag +// Module Version 10000 +// Generated by (magic number): 8000b +// Id's are bound by 72 + + Capability Shader + Capability TextureBlockMatchQCOM + Extension "SPV_QCOM_image_processing" + 1: ExtInstImport "GLSL.std.450" + MemoryModel Logical GLSL450 + EntryPoint Fragment 4 "main" 13 41 + ExecutionMode 4 OriginUpperLeft + Source GLSL 450 + SourceExtension "GL_QCOM_image_processing" + Name 4 "main" + Name 9 "tgt_coords" + Name 13 "v_texcoord" + Name 26 "ref_coords" + Name 37 "blockSize" + Name 41 "fragColor" + Name 44 "tex2D_src1" + Name 48 "samp" + Name 53 "tex2D_src2" + Name 61 "target_samp" + Name 64 "ref_samp" + Name 71 "tex2DArray_weights" + Decorate 13(v_texcoord) Location 0 + Decorate 41(fragColor) Location 0 + Decorate 44(tex2D_src1) DescriptorSet 0 + Decorate 44(tex2D_src1) Binding 1 + Decorate 48(samp) DescriptorSet 0 + Decorate 48(samp) Binding 3 + Decorate 53(tex2D_src2) DescriptorSet 0 + Decorate 53(tex2D_src2) Binding 2 + Decorate 44(tex2D_src1) DecorationBlockMatchTextureQCOM + Decorate 53(tex2D_src2) DecorationBlockMatchTextureQCOM + Decorate 61(target_samp) DescriptorSet 0 + Decorate 61(target_samp) Binding 4 + Decorate 64(ref_samp) DescriptorSet 0 + Decorate 64(ref_samp) Binding 5 + Decorate 61(target_samp) DecorationBlockMatchTextureQCOM + Decorate 64(ref_samp) DecorationBlockMatchTextureQCOM + Decorate 71(tex2DArray_weights) DescriptorSet 0 + Decorate 71(tex2DArray_weights) Binding 0 + 2: TypeVoid + 3: TypeFunction 2 + 6: TypeInt 32 0 + 7: TypeVector 6(int) 2 + 8: TypePointer Function 7(ivec2) + 10: TypeFloat 32 + 11: TypeVector 10(float) 4 + 12: TypePointer Input 11(fvec4) + 13(v_texcoord): 12(ptr) Variable Input + 14: 6(int) Constant 0 + 15: TypePointer Input 10(float) + 19: TypePointer Function 6(int) + 21: 6(int) Constant 1 + 27: 6(int) Constant 2 + 32: 6(int) Constant 3 + 38: 6(int) Constant 4 + 39: 7(ivec2) ConstantComposite 38 38 + 40: TypePointer Output 11(fvec4) + 41(fragColor): 40(ptr) Variable Output + 42: TypeImage 10(float) 2D sampled format:Unknown + 43: TypePointer UniformConstant 42 + 44(tex2D_src1): 43(ptr) Variable UniformConstant + 46: TypeSampler + 47: TypePointer UniformConstant 46 + 48(samp): 47(ptr) Variable UniformConstant + 50: TypeSampledImage 42 + 53(tex2D_src2): 43(ptr) Variable UniformConstant + 60: TypePointer UniformConstant 50 + 61(target_samp): 60(ptr) Variable UniformConstant + 64(ref_samp): 60(ptr) Variable UniformConstant + 69: TypeImage 10(float) 2D array sampled format:Unknown + 70: TypePointer UniformConstant 69 +71(tex2DArray_weights): 70(ptr) Variable UniformConstant + 4(main): 2 Function None 3 + 5: Label + 9(tgt_coords): 8(ptr) Variable Function + 26(ref_coords): 8(ptr) Variable Function + 37(blockSize): 8(ptr) Variable Function + 16: 15(ptr) AccessChain 13(v_texcoord) 14 + 17: 10(float) Load 16 + 18: 6(int) ConvertFToU 17 + 20: 19(ptr) AccessChain 9(tgt_coords) 14 + Store 20 18 + 22: 15(ptr) AccessChain 13(v_texcoord) 21 + 23: 10(float) Load 22 + 24: 6(int) ConvertFToU 23 + 25: 19(ptr) AccessChain 9(tgt_coords) 14 + Store 25 24 + 28: 15(ptr) AccessChain 13(v_texcoord) 27 + 29: 10(float) Load 28 + 30: 6(int) ConvertFToU 29 + 31: 19(ptr) AccessChain 26(ref_coords) 14 + Store 31 30 + 33: 15(ptr) AccessChain 13(v_texcoord) 32 + 34: 10(float) Load 33 + 35: 6(int) ConvertFToU 34 + 36: 19(ptr) AccessChain 26(ref_coords) 21 + Store 36 35 + Store 37(blockSize) 39 + 45: 42 Load 44(tex2D_src1) + 49: 46 Load 48(samp) + 51: 50 SampledImage 45 49 + 52: 7(ivec2) Load 9(tgt_coords) + 54: 42 Load 53(tex2D_src2) + 55: 46 Load 48(samp) + 56: 50 SampledImage 54 55 + 57: 7(ivec2) Load 26(ref_coords) + 58: 7(ivec2) Load 37(blockSize) + 59: 11(fvec4) ImageBlockMatchSADQCOM 51 52 56 57 58 + Store 41(fragColor) 59 + 62: 50 Load 61(target_samp) + 63: 7(ivec2) Load 9(tgt_coords) + 65: 50 Load 64(ref_samp) + 66: 7(ivec2) Load 26(ref_coords) + 67: 7(ivec2) Load 37(blockSize) + 68: 11(fvec4) ImageBlockMatchSADQCOM 62 63 65 66 67 + Store 41(fragColor) 68 + Return + FunctionEnd diff --git a/Test/baseResults/spv.tpipBlockMatchSSD.frag.out b/Test/baseResults/spv.tpipBlockMatchSSD.frag.out new file mode 100644 index 0000000000..e7ac73b636 --- /dev/null +++ b/Test/baseResults/spv.tpipBlockMatchSSD.frag.out @@ -0,0 +1,123 @@ +spv.tpipBlockMatchSSD.frag +// Module Version 10000 +// Generated by (magic number): 8000b +// Id's are bound by 72 + + Capability Shader + Capability TextureBlockMatchQCOM + Extension "SPV_QCOM_image_processing" + 1: ExtInstImport "GLSL.std.450" + MemoryModel Logical GLSL450 + EntryPoint Fragment 4 "main" 13 41 + ExecutionMode 4 OriginUpperLeft + Source GLSL 450 + SourceExtension "GL_QCOM_image_processing" + Name 4 "main" + Name 9 "tgt_coords" + Name 13 "v_texcoord" + Name 26 "ref_coords" + Name 37 "blockSize" + Name 41 "fragColor" + Name 44 "tex2D_src1" + Name 48 "samp" + Name 53 "tex2D_src2" + Name 61 "target_samp" + Name 64 "ref_samp" + Name 71 "tex2DArray_weights" + Decorate 13(v_texcoord) Location 0 + Decorate 41(fragColor) Location 0 + Decorate 44(tex2D_src1) DescriptorSet 0 + Decorate 44(tex2D_src1) Binding 1 + Decorate 48(samp) DescriptorSet 0 + Decorate 48(samp) Binding 3 + Decorate 53(tex2D_src2) DescriptorSet 0 + Decorate 53(tex2D_src2) Binding 2 + Decorate 44(tex2D_src1) DecorationBlockMatchTextureQCOM + Decorate 53(tex2D_src2) DecorationBlockMatchTextureQCOM + Decorate 61(target_samp) DescriptorSet 0 + Decorate 61(target_samp) Binding 4 + Decorate 64(ref_samp) DescriptorSet 0 + Decorate 64(ref_samp) Binding 5 + Decorate 61(target_samp) DecorationBlockMatchTextureQCOM + Decorate 64(ref_samp) DecorationBlockMatchTextureQCOM + Decorate 71(tex2DArray_weights) DescriptorSet 0 + Decorate 71(tex2DArray_weights) Binding 0 + 2: TypeVoid + 3: TypeFunction 2 + 6: TypeInt 32 0 + 7: TypeVector 6(int) 2 + 8: TypePointer Function 7(ivec2) + 10: TypeFloat 32 + 11: TypeVector 10(float) 4 + 12: TypePointer Input 11(fvec4) + 13(v_texcoord): 12(ptr) Variable Input + 14: 6(int) Constant 0 + 15: TypePointer Input 10(float) + 19: TypePointer Function 6(int) + 21: 6(int) Constant 1 + 27: 6(int) Constant 2 + 32: 6(int) Constant 3 + 38: 6(int) Constant 4 + 39: 7(ivec2) ConstantComposite 38 38 + 40: TypePointer Output 11(fvec4) + 41(fragColor): 40(ptr) Variable Output + 42: TypeImage 10(float) 2D sampled format:Unknown + 43: TypePointer UniformConstant 42 + 44(tex2D_src1): 43(ptr) Variable UniformConstant + 46: TypeSampler + 47: TypePointer UniformConstant 46 + 48(samp): 47(ptr) Variable UniformConstant + 50: TypeSampledImage 42 + 53(tex2D_src2): 43(ptr) Variable UniformConstant + 60: TypePointer UniformConstant 50 + 61(target_samp): 60(ptr) Variable UniformConstant + 64(ref_samp): 60(ptr) Variable UniformConstant + 69: TypeImage 10(float) 2D array sampled format:Unknown + 70: TypePointer UniformConstant 69 +71(tex2DArray_weights): 70(ptr) Variable UniformConstant + 4(main): 2 Function None 3 + 5: Label + 9(tgt_coords): 8(ptr) Variable Function + 26(ref_coords): 8(ptr) Variable Function + 37(blockSize): 8(ptr) Variable Function + 16: 15(ptr) AccessChain 13(v_texcoord) 14 + 17: 10(float) Load 16 + 18: 6(int) ConvertFToU 17 + 20: 19(ptr) AccessChain 9(tgt_coords) 14 + Store 20 18 + 22: 15(ptr) AccessChain 13(v_texcoord) 21 + 23: 10(float) Load 22 + 24: 6(int) ConvertFToU 23 + 25: 19(ptr) AccessChain 9(tgt_coords) 14 + Store 25 24 + 28: 15(ptr) AccessChain 13(v_texcoord) 27 + 29: 10(float) Load 28 + 30: 6(int) ConvertFToU 29 + 31: 19(ptr) AccessChain 26(ref_coords) 14 + Store 31 30 + 33: 15(ptr) AccessChain 13(v_texcoord) 32 + 34: 10(float) Load 33 + 35: 6(int) ConvertFToU 34 + 36: 19(ptr) AccessChain 26(ref_coords) 21 + Store 36 35 + Store 37(blockSize) 39 + 45: 42 Load 44(tex2D_src1) + 49: 46 Load 48(samp) + 51: 50 SampledImage 45 49 + 52: 7(ivec2) Load 9(tgt_coords) + 54: 42 Load 53(tex2D_src2) + 55: 46 Load 48(samp) + 56: 50 SampledImage 54 55 + 57: 7(ivec2) Load 26(ref_coords) + 58: 7(ivec2) Load 37(blockSize) + 59: 11(fvec4) ImageBlockMatchSSDQCOM 51 52 56 57 58 + Store 41(fragColor) 59 + 62: 50 Load 61(target_samp) + 63: 7(ivec2) Load 9(tgt_coords) + 65: 50 Load 64(ref_samp) + 66: 7(ivec2) Load 26(ref_coords) + 67: 7(ivec2) Load 37(blockSize) + 68: 11(fvec4) ImageBlockMatchSSDQCOM 62 63 65 66 67 + Store 41(fragColor) 68 + Return + FunctionEnd diff --git a/Test/baseResults/spv.tpipBoxFilter.frag.out b/Test/baseResults/spv.tpipBoxFilter.frag.out new file mode 100644 index 0000000000..5620a81625 --- /dev/null +++ b/Test/baseResults/spv.tpipBoxFilter.frag.out @@ -0,0 +1,81 @@ +spv.tpipBoxFilter.frag +// Module Version 10000 +// Generated by (magic number): 8000b +// Id's are bound by 43 + + Capability Shader + Capability TextureBoxFilterQCOM + Extension "SPV_QCOM_image_processing" + 1: ExtInstImport "GLSL.std.450" + MemoryModel Logical GLSL450 + EntryPoint Fragment 4 "main" 15 27 + ExecutionMode 4 OriginUpperLeft + Source GLSL 450 + SourceExtension "GL_QCOM_image_processing" + Name 4 "main" + Name 9 "boxSize" + Name 15 "fragColor" + Name 18 "tex2D_src1" + Name 22 "samp" + Name 27 "v_texcoord" + Name 33 "tex_samp" + Name 41 "tex2DArray_weights" + Name 42 "tex2D_src2" + Decorate 15(fragColor) Location 0 + Decorate 18(tex2D_src1) DescriptorSet 0 + Decorate 18(tex2D_src1) Binding 1 + Decorate 22(samp) DescriptorSet 0 + Decorate 22(samp) Binding 3 + Decorate 27(v_texcoord) Location 0 + Decorate 33(tex_samp) DescriptorSet 0 + Decorate 33(tex_samp) Binding 4 + Decorate 41(tex2DArray_weights) DescriptorSet 0 + Decorate 41(tex2DArray_weights) Binding 0 + Decorate 42(tex2D_src2) DescriptorSet 0 + Decorate 42(tex2D_src2) Binding 2 + 2: TypeVoid + 3: TypeFunction 2 + 6: TypeFloat 32 + 7: TypeVector 6(float) 2 + 8: TypePointer Function 7(fvec2) + 10: 6(float) Constant 1075838976 + 11: 6(float) Constant 1083179008 + 12: 7(fvec2) ConstantComposite 10 11 + 13: TypeVector 6(float) 4 + 14: TypePointer Output 13(fvec4) + 15(fragColor): 14(ptr) Variable Output + 16: TypeImage 6(float) 2D sampled format:Unknown + 17: TypePointer UniformConstant 16 + 18(tex2D_src1): 17(ptr) Variable UniformConstant + 20: TypeSampler + 21: TypePointer UniformConstant 20 + 22(samp): 21(ptr) Variable UniformConstant + 24: TypeSampledImage 16 + 26: TypePointer Input 13(fvec4) + 27(v_texcoord): 26(ptr) Variable Input + 32: TypePointer UniformConstant 24 + 33(tex_samp): 32(ptr) Variable UniformConstant + 39: TypeImage 6(float) 2D array sampled format:Unknown + 40: TypePointer UniformConstant 39 +41(tex2DArray_weights): 40(ptr) Variable UniformConstant + 42(tex2D_src2): 17(ptr) Variable UniformConstant + 4(main): 2 Function None 3 + 5: Label + 9(boxSize): 8(ptr) Variable Function + Store 9(boxSize) 12 + 19: 16 Load 18(tex2D_src1) + 23: 20 Load 22(samp) + 25: 24 SampledImage 19 23 + 28: 13(fvec4) Load 27(v_texcoord) + 29: 7(fvec2) VectorShuffle 28 28 0 1 + 30: 7(fvec2) Load 9(boxSize) + 31: 13(fvec4) ImageBoxFilterQCOM 25 29 30 + Store 15(fragColor) 31 + 34: 24 Load 33(tex_samp) + 35: 13(fvec4) Load 27(v_texcoord) + 36: 7(fvec2) VectorShuffle 35 35 0 1 + 37: 7(fvec2) Load 9(boxSize) + 38: 13(fvec4) ImageBoxFilterQCOM 34 36 37 + Store 15(fragColor) 38 + Return + FunctionEnd diff --git a/Test/baseResults/spv.tpipSampleWeighted.frag.out b/Test/baseResults/spv.tpipSampleWeighted.frag.out new file mode 100644 index 0000000000..bf108742d0 --- /dev/null +++ b/Test/baseResults/spv.tpipSampleWeighted.frag.out @@ -0,0 +1,84 @@ +spv.tpipSampleWeighted.frag +// Module Version 10000 +// Generated by (magic number): 8000b +// Id's are bound by 43 + + Capability Shader + Capability TextureSampleWeightedQCOM + Extension "SPV_QCOM_image_processing" + 1: ExtInstImport "GLSL.std.450" + MemoryModel Logical GLSL450 + EntryPoint Fragment 4 "main" 9 21 + ExecutionMode 4 OriginUpperLeft + Source GLSL 450 + SourceExtension "GL_QCOM_image_processing" + Name 4 "main" + Name 9 "fragColor" + Name 12 "tex2D_src1" + Name 16 "samp" + Name 21 "v_texcoord" + Name 27 "tex2DArray_weights" + Name 34 "tex_samp" + Name 39 "tex_samp_array" + Name 42 "tex2D_src2" + Decorate 9(fragColor) Location 0 + Decorate 12(tex2D_src1) DescriptorSet 0 + Decorate 12(tex2D_src1) Binding 1 + Decorate 16(samp) DescriptorSet 0 + Decorate 16(samp) Binding 3 + Decorate 21(v_texcoord) Location 0 + Decorate 27(tex2DArray_weights) DescriptorSet 0 + Decorate 27(tex2DArray_weights) Binding 0 + Decorate 27(tex2DArray_weights) DecorationWeightTextureQCOM + Decorate 34(tex_samp) DescriptorSet 0 + Decorate 34(tex_samp) Binding 4 + Decorate 39(tex_samp_array) DescriptorSet 0 + Decorate 39(tex_samp_array) Binding 5 + Decorate 39(tex_samp_array) DecorationWeightTextureQCOM + Decorate 42(tex2D_src2) DescriptorSet 0 + Decorate 42(tex2D_src2) Binding 2 + 2: TypeVoid + 3: TypeFunction 2 + 6: TypeFloat 32 + 7: TypeVector 6(float) 4 + 8: TypePointer Output 7(fvec4) + 9(fragColor): 8(ptr) Variable Output + 10: TypeImage 6(float) 2D sampled format:Unknown + 11: TypePointer UniformConstant 10 + 12(tex2D_src1): 11(ptr) Variable UniformConstant + 14: TypeSampler + 15: TypePointer UniformConstant 14 + 16(samp): 15(ptr) Variable UniformConstant + 18: TypeSampledImage 10 + 20: TypePointer Input 7(fvec4) + 21(v_texcoord): 20(ptr) Variable Input + 22: TypeVector 6(float) 2 + 25: TypeImage 6(float) 2D array sampled format:Unknown + 26: TypePointer UniformConstant 25 +27(tex2DArray_weights): 26(ptr) Variable UniformConstant + 30: TypeSampledImage 25 + 33: TypePointer UniformConstant 18 + 34(tex_samp): 33(ptr) Variable UniformConstant + 38: TypePointer UniformConstant 30 +39(tex_samp_array): 38(ptr) Variable UniformConstant + 42(tex2D_src2): 11(ptr) Variable UniformConstant + 4(main): 2 Function None 3 + 5: Label + 13: 10 Load 12(tex2D_src1) + 17: 14 Load 16(samp) + 19: 18 SampledImage 13 17 + 23: 7(fvec4) Load 21(v_texcoord) + 24: 22(fvec2) VectorShuffle 23 23 0 1 + 28: 25 Load 27(tex2DArray_weights) + 29: 14 Load 16(samp) + 31: 30 SampledImage 28 29 + 32: 7(fvec4) ImageSampleWeightedQCOM 19 24 31 + Store 9(fragColor) 32 + 35: 18 Load 34(tex_samp) + 36: 7(fvec4) Load 21(v_texcoord) + 37: 22(fvec2) VectorShuffle 36 36 0 1 + 40: 30 Load 39(tex_samp_array) + 41: 7(fvec4) ImageSampleWeightedQCOM 35 37 40 + Store 9(fragColor) 41 + Return + FunctionEnd diff --git a/Test/baseResults/spv.tpipTextureArrays.frag.out b/Test/baseResults/spv.tpipTextureArrays.frag.out new file mode 100644 index 0000000000..28b63f5714 --- /dev/null +++ b/Test/baseResults/spv.tpipTextureArrays.frag.out @@ -0,0 +1,128 @@ +spv.tpipTextureArrays.frag +// Module Version 10000 +// Generated by (magic number): 8000b +// Id's are bound by 84 + + Capability Shader + Capability TextureBlockMatchQCOM + Extension "SPV_QCOM_image_processing" + 1: ExtInstImport "GLSL.std.450" + MemoryModel Logical GLSL450 + EntryPoint Fragment 4 "main" 13 46 + ExecutionMode 4 OriginUpperLeft + Source GLSL 450 + SourceExtension "GL_QCOM_image_processing" + Name 4 "main" + Name 9 "tgt_coords" + Name 13 "v_texcoord" + Name 26 "ref_coords" + Name 37 "blockSize" + Name 40 "ii" + Name 46 "fragColor" + Name 51 "samplers" + Name 60 "tex2D_srcs" + Name 67 "samp" + Decorate 13(v_texcoord) Location 0 + Decorate 46(fragColor) Location 0 + Decorate 51(samplers) DescriptorSet 0 + Decorate 51(samplers) Binding 5 + Decorate 60(tex2D_srcs) DescriptorSet 0 + Decorate 60(tex2D_srcs) Binding 4 + Decorate 67(samp) DescriptorSet 0 + Decorate 67(samp) Binding 3 + Decorate 55 DecorationBlockMatchTextureQCOM + Decorate 63 DecorationBlockMatchTextureQCOM + Decorate 74 DecorationBlockMatchTextureQCOM + Decorate 79 DecorationBlockMatchTextureQCOM + 2: TypeVoid + 3: TypeFunction 2 + 6: TypeInt 32 0 + 7: TypeVector 6(int) 2 + 8: TypePointer Function 7(ivec2) + 10: TypeFloat 32 + 11: TypeVector 10(float) 4 + 12: TypePointer Input 11(fvec4) + 13(v_texcoord): 12(ptr) Variable Input + 14: 6(int) Constant 0 + 15: TypePointer Input 10(float) + 19: TypePointer Function 6(int) + 21: 6(int) Constant 1 + 27: 6(int) Constant 2 + 32: 6(int) Constant 3 + 38: 6(int) Constant 4 + 39: 7(ivec2) ConstantComposite 38 38 + 43: 6(int) Constant 8 + 45: TypePointer Output 11(fvec4) + 46(fragColor): 45(ptr) Variable Output + 47: TypeImage 10(float) 2D sampled format:Unknown + 48: TypeSampledImage 47 + 49: TypeArray 48 32 + 50: TypePointer UniformConstant 49 + 51(samplers): 50(ptr) Variable UniformConstant + 52: TypeInt 32 1 + 53: 52(int) Constant 0 + 54: TypePointer UniformConstant 48 + 58: TypeArray 47 43 + 59: TypePointer UniformConstant 58 + 60(tex2D_srcs): 59(ptr) Variable UniformConstant + 62: TypePointer UniformConstant 47 + 65: TypeSampler + 66: TypePointer UniformConstant 65 + 67(samp): 66(ptr) Variable UniformConstant + 73: 52(int) Constant 1 + 4(main): 2 Function None 3 + 5: Label + 9(tgt_coords): 8(ptr) Variable Function + 26(ref_coords): 8(ptr) Variable Function + 37(blockSize): 8(ptr) Variable Function + 40(ii): 19(ptr) Variable Function + 16: 15(ptr) AccessChain 13(v_texcoord) 14 + 17: 10(float) Load 16 + 18: 6(int) ConvertFToU 17 + 20: 19(ptr) AccessChain 9(tgt_coords) 14 + Store 20 18 + 22: 15(ptr) AccessChain 13(v_texcoord) 21 + 23: 10(float) Load 22 + 24: 6(int) ConvertFToU 23 + 25: 19(ptr) AccessChain 9(tgt_coords) 14 + Store 25 24 + 28: 15(ptr) AccessChain 13(v_texcoord) 27 + 29: 10(float) Load 28 + 30: 6(int) ConvertFToU 29 + 31: 19(ptr) AccessChain 26(ref_coords) 14 + Store 31 30 + 33: 15(ptr) AccessChain 13(v_texcoord) 32 + 34: 10(float) Load 33 + 35: 6(int) ConvertFToU 34 + 36: 19(ptr) AccessChain 26(ref_coords) 21 + Store 36 35 + Store 37(blockSize) 39 + 41: 19(ptr) AccessChain 9(tgt_coords) 14 + 42: 6(int) Load 41 + 44: 6(int) UMod 42 43 + Store 40(ii) 44 + 55: 54(ptr) AccessChain 51(samplers) 53 + 56: 48 Load 55 + 57: 7(ivec2) Load 9(tgt_coords) + 61: 6(int) Load 40(ii) + 63: 62(ptr) AccessChain 60(tex2D_srcs) 61 + 64: 47 Load 63 + 68: 65 Load 67(samp) + 69: 48 SampledImage 64 68 + 70: 7(ivec2) Load 26(ref_coords) + 71: 7(ivec2) Load 37(blockSize) + 72: 11(fvec4) ImageBlockMatchSSDQCOM 56 57 69 70 71 + Store 46(fragColor) 72 + 74: 62(ptr) AccessChain 60(tex2D_srcs) 73 + 75: 47 Load 74 + 76: 65 Load 67(samp) + 77: 48 SampledImage 75 76 + 78: 7(ivec2) Load 9(tgt_coords) + 79: 54(ptr) AccessChain 51(samplers) 73 + 80: 48 Load 79 + 81: 7(ivec2) Load 26(ref_coords) + 82: 7(ivec2) Load 37(blockSize) + 83: 11(fvec4) ImageBlockMatchSADQCOM 77 78 80 81 82 + Store 46(fragColor) 83 + Return + FunctionEnd diff --git a/Test/baseResults/spv.types.frag.out b/Test/baseResults/spv.types.frag.out index 3e35da2794..6a0e0f01dd 100644 --- a/Test/baseResults/spv.types.frag.out +++ b/Test/baseResults/spv.types.frag.out @@ -1,6 +1,6 @@ spv.types.frag // Module Version 10000 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 260 Capability Shader diff --git a/Test/baseResults/spv.uint.frag.out b/Test/baseResults/spv.uint.frag.out index 7dbc3b3774..a78acae4db 100644 --- a/Test/baseResults/spv.uint.frag.out +++ b/Test/baseResults/spv.uint.frag.out @@ -1,6 +1,6 @@ spv.uint.frag // Module Version 10000 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 213 Capability Shader diff --git a/Test/baseResults/spv.uniformArray.frag.out b/Test/baseResults/spv.uniformArray.frag.out index fa66f2bbb4..09cd353221 100644 --- a/Test/baseResults/spv.uniformArray.frag.out +++ b/Test/baseResults/spv.uniformArray.frag.out @@ -1,6 +1,6 @@ spv.uniformArray.frag // Module Version 10000 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 60 Capability Shader diff --git a/Test/baseResults/spv.uniformInitializer.frag.out b/Test/baseResults/spv.uniformInitializer.frag.out index 63595aeee9..abebf6250a 100644 --- a/Test/baseResults/spv.uniformInitializer.frag.out +++ b/Test/baseResults/spv.uniformInitializer.frag.out @@ -1,6 +1,6 @@ spv.uniformInitializer.frag // Module Version 10000 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 16 Capability Shader diff --git a/Test/baseResults/spv.uniformInitializerStruct.frag.out b/Test/baseResults/spv.uniformInitializerStruct.frag.out index 5ce854dc2e..058bc34fa0 100644 --- a/Test/baseResults/spv.uniformInitializerStruct.frag.out +++ b/Test/baseResults/spv.uniformInitializerStruct.frag.out @@ -1,6 +1,6 @@ spv.uniformInitializerStruct.frag // Module Version 10000 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 63 Capability Shader diff --git a/Test/baseResults/spv.unit1.frag.out b/Test/baseResults/spv.unit1.frag.out index 02ddfecee2..b4de7bd82a 100644 --- a/Test/baseResults/spv.unit1.frag.out +++ b/Test/baseResults/spv.unit1.frag.out @@ -193,7 +193,7 @@ gl_FragCoord origin is upper left 0:? 'h3' ( global highp float) // Module Version 10000 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 69 Capability Shader diff --git a/Test/baseResults/spv.variableArrayIndex.frag.out b/Test/baseResults/spv.variableArrayIndex.frag.out index ee57d43d45..f78119c22f 100644 --- a/Test/baseResults/spv.variableArrayIndex.frag.out +++ b/Test/baseResults/spv.variableArrayIndex.frag.out @@ -1,6 +1,6 @@ spv.variableArrayIndex.frag // Module Version 10000 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 93 Capability Shader diff --git a/Test/baseResults/spv.varyingArray.frag.out b/Test/baseResults/spv.varyingArray.frag.out index 1e6334ada5..9d001bc056 100644 --- a/Test/baseResults/spv.varyingArray.frag.out +++ b/Test/baseResults/spv.varyingArray.frag.out @@ -1,6 +1,6 @@ spv.varyingArray.frag // Module Version 10000 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 61 Capability Shader diff --git a/Test/baseResults/spv.varyingArrayIndirect.frag.out b/Test/baseResults/spv.varyingArrayIndirect.frag.out index ac9d192b81..00135f6e4b 100644 --- a/Test/baseResults/spv.varyingArrayIndirect.frag.out +++ b/Test/baseResults/spv.varyingArrayIndirect.frag.out @@ -1,6 +1,6 @@ spv.varyingArrayIndirect.frag // Module Version 10000 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 70 Capability Shader diff --git a/Test/baseResults/spv.vecMatConstruct.frag.out b/Test/baseResults/spv.vecMatConstruct.frag.out index bfe5ae76ef..5f3a233fde 100644 --- a/Test/baseResults/spv.vecMatConstruct.frag.out +++ b/Test/baseResults/spv.vecMatConstruct.frag.out @@ -1,6 +1,6 @@ spv.vecMatConstruct.frag // Module Version 10000 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 62 Capability Shader diff --git a/Test/baseResults/spv.viewportArray2.tesc.out b/Test/baseResults/spv.viewportArray2.tesc.out index e95ada4988..f719a97e21 100644 --- a/Test/baseResults/spv.viewportArray2.tesc.out +++ b/Test/baseResults/spv.viewportArray2.tesc.out @@ -1,6 +1,6 @@ spv.viewportArray2.tesc // Module Version 10000 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 23 Capability Tessellation diff --git a/Test/baseResults/spv.viewportArray2.vert.out b/Test/baseResults/spv.viewportArray2.vert.out index cf29cd79df..d916b4d61e 100644 --- a/Test/baseResults/spv.viewportArray2.vert.out +++ b/Test/baseResults/spv.viewportArray2.vert.out @@ -1,6 +1,6 @@ spv.viewportArray2.vert // Module Version 10000 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 19 Capability Shader diff --git a/Test/baseResults/spv.viewportindex.tese.out b/Test/baseResults/spv.viewportindex.tese.out index 12a30cf4c3..46b1faa6cc 100644 --- a/Test/baseResults/spv.viewportindex.tese.out +++ b/Test/baseResults/spv.viewportindex.tese.out @@ -1,6 +1,6 @@ spv.viewportindex.tese // Module Version 10000 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 10 Capability Tessellation diff --git a/Test/baseResults/spv.voidFunction.frag.out b/Test/baseResults/spv.voidFunction.frag.out index c77285b191..4a0cc26011 100644 --- a/Test/baseResults/spv.voidFunction.frag.out +++ b/Test/baseResults/spv.voidFunction.frag.out @@ -1,6 +1,6 @@ spv.voidFunction.frag // Module Version 10000 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 43 Capability Shader diff --git a/Test/baseResults/spv.volatileAtomic.comp.out b/Test/baseResults/spv.volatileAtomic.comp.out index 0364d90770..53673d35a6 100644 --- a/Test/baseResults/spv.volatileAtomic.comp.out +++ b/Test/baseResults/spv.volatileAtomic.comp.out @@ -1,6 +1,6 @@ spv.volatileAtomic.comp // Module Version 10000 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 18 Capability Shader diff --git a/Test/baseResults/spv.vulkan110.int16.frag.out b/Test/baseResults/spv.vulkan110.int16.frag.out index 47388a2bc0..d5c83d52ff 100644 --- a/Test/baseResults/spv.vulkan110.int16.frag.out +++ b/Test/baseResults/spv.vulkan110.int16.frag.out @@ -1,6 +1,6 @@ spv.vulkan110.int16.frag // Module Version 10300 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 535 Capability Shader diff --git a/Test/baseResults/spv.vulkan110.storageBuffer.vert.out b/Test/baseResults/spv.vulkan110.storageBuffer.vert.out index 0774960a65..ab88c581d3 100644 --- a/Test/baseResults/spv.vulkan110.storageBuffer.vert.out +++ b/Test/baseResults/spv.vulkan110.storageBuffer.vert.out @@ -1,6 +1,6 @@ spv.vulkan110.storageBuffer.vert // Module Version 10300 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 31 Capability Shader diff --git a/Test/baseResults/spv.while-continue-break.vert.out b/Test/baseResults/spv.while-continue-break.vert.out index 246e5fd43b..7a0bfb0c75 100644 --- a/Test/baseResults/spv.while-continue-break.vert.out +++ b/Test/baseResults/spv.while-continue-break.vert.out @@ -1,6 +1,6 @@ spv.while-continue-break.vert // Module Version 10000 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 41 Capability Shader diff --git a/Test/baseResults/spv.while-simple.vert.out b/Test/baseResults/spv.while-simple.vert.out index 894dea1daf..922860fec1 100644 --- a/Test/baseResults/spv.while-simple.vert.out +++ b/Test/baseResults/spv.while-simple.vert.out @@ -1,6 +1,6 @@ spv.while-simple.vert // Module Version 10000 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 22 Capability Shader diff --git a/Test/baseResults/spv.whileLoop.frag.out b/Test/baseResults/spv.whileLoop.frag.out index 6155f7bd80..b796b2924f 100644 --- a/Test/baseResults/spv.whileLoop.frag.out +++ b/Test/baseResults/spv.whileLoop.frag.out @@ -1,6 +1,6 @@ spv.whileLoop.frag // Module Version 10000 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 35 Capability Shader diff --git a/Test/baseResults/spv.xfb.vert.out b/Test/baseResults/spv.xfb.vert.out index 3fdc60b2d1..4283e2002a 100644 --- a/Test/baseResults/spv.xfb.vert.out +++ b/Test/baseResults/spv.xfb.vert.out @@ -1,6 +1,6 @@ spv.xfb.vert // Module Version 10000 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 16 Capability Shader diff --git a/Test/baseResults/spv.xfb2.vert.out b/Test/baseResults/spv.xfb2.vert.out index cbb8fc638d..b4b09bd0e3 100644 --- a/Test/baseResults/spv.xfb2.vert.out +++ b/Test/baseResults/spv.xfb2.vert.out @@ -1,6 +1,6 @@ spv.xfb2.vert // Module Version 10000 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 35 Capability Shader diff --git a/Test/baseResults/spv.xfb3.vert.out b/Test/baseResults/spv.xfb3.vert.out index ef53b9aaec..a7e885660a 100644 --- a/Test/baseResults/spv.xfb3.vert.out +++ b/Test/baseResults/spv.xfb3.vert.out @@ -1,6 +1,6 @@ spv.xfb3.vert // Module Version 10000 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 35 Capability Shader diff --git a/Test/baseResults/spv.xfbOffsetOnBlockMembersAssignment.vert.out b/Test/baseResults/spv.xfbOffsetOnBlockMembersAssignment.vert.out index e2c6093b45..eb911002a5 100644 --- a/Test/baseResults/spv.xfbOffsetOnBlockMembersAssignment.vert.out +++ b/Test/baseResults/spv.xfbOffsetOnBlockMembersAssignment.vert.out @@ -1,6 +1,6 @@ spv.xfbOffsetOnBlockMembersAssignment.vert // Module Version 10000 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 33 Capability Shader diff --git a/Test/baseResults/spv.xfbOffsetOnStructMembersAssignment.vert.out b/Test/baseResults/spv.xfbOffsetOnStructMembersAssignment.vert.out index 499ac8c191..467a5aec46 100644 --- a/Test/baseResults/spv.xfbOffsetOnStructMembersAssignment.vert.out +++ b/Test/baseResults/spv.xfbOffsetOnStructMembersAssignment.vert.out @@ -1,6 +1,6 @@ spv.xfbOffsetOnStructMembersAssignment.vert // Module Version 10000 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 40 Capability Shader diff --git a/Test/baseResults/spv.xfbOverlapOffsetCheckWithBlockAndMember.vert.out b/Test/baseResults/spv.xfbOverlapOffsetCheckWithBlockAndMember.vert.out index f7476c7b98..633558d472 100644 --- a/Test/baseResults/spv.xfbOverlapOffsetCheckWithBlockAndMember.vert.out +++ b/Test/baseResults/spv.xfbOverlapOffsetCheckWithBlockAndMember.vert.out @@ -1,6 +1,6 @@ spv.xfbOverlapOffsetCheckWithBlockAndMember.vert // Module Version 10000 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 39 Capability Shader diff --git a/Test/baseResults/spv.xfbStrideJustOnce.vert.out b/Test/baseResults/spv.xfbStrideJustOnce.vert.out index bbd7768d35..8bf1f0d999 100644 --- a/Test/baseResults/spv.xfbStrideJustOnce.vert.out +++ b/Test/baseResults/spv.xfbStrideJustOnce.vert.out @@ -1,6 +1,6 @@ spv.xfbStrideJustOnce.vert // Module Version 10000 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 33 Capability Shader diff --git a/Test/baseResults/struct.error.frag.out b/Test/baseResults/struct.error.frag.out new file mode 100644 index 0000000000..5b0993a1d9 --- /dev/null +++ b/Test/baseResults/struct.error.frag.out @@ -0,0 +1,37 @@ +struct.error.frag +ERROR: 0:12: 'z' : no such field in structure +ERROR: 1 compilation errors. No code generated. + + +Shader version: 460 +ERROR: node is still EOpNull! +0:7 Function Definition: test( ( global structure{ global float x}) +0:7 Function Parameters: +0:8 Sequence +0:8 Branch: Return with expression +0:8 Constant: +0:8 1.000000 +0:11 Function Definition: main( ( global void) +0:11 Function Parameters: +0:12 Sequence +0:12 Function Call: test( ( global structure{ global float x}) +0:? Linker Objects + + +Linked fragment stage: + + +Shader version: 460 +ERROR: node is still EOpNull! +0:7 Function Definition: test( ( global structure{ global float x}) +0:7 Function Parameters: +0:8 Sequence +0:8 Branch: Return with expression +0:8 Constant: +0:8 1.000000 +0:11 Function Definition: main( ( global void) +0:11 Function Parameters: +0:12 Sequence +0:12 Function Call: test( ( global structure{ global float x}) +0:? Linker Objects + diff --git a/Test/baseResults/test.conf b/Test/baseResults/test.conf index 98b2a84165..e4cf409ad4 100644 --- a/Test/baseResults/test.conf +++ b/Test/baseResults/test.conf @@ -90,6 +90,15 @@ MaxTaskWorkGroupSizeX_NV 32 MaxTaskWorkGroupSizeY_NV 1 MaxTaskWorkGroupSizeZ_NV 1 MaxMeshViewCountNV 4 +MaxMeshOutputVerticesEXT 256 +MaxMeshOutputPrimitivesEXT 256 +MaxMeshWorkGroupSizeX_EXT 128 +MaxMeshWorkGroupSizeY_EXT 128 +MaxMeshWorkGroupSizeZ_EXT 128 +MaxTaskWorkGroupSizeX_EXT 128 +MaxTaskWorkGroupSizeY_EXT 128 +MaxTaskWorkGroupSizeZ_EXT 128 +MaxMeshViewCountEXT 4 MaxDualSourceDrawBuffersEXT 1 nonInductiveForLoops 1 whileLoops 1 diff --git a/Test/baseResults/tokenLength.vert.out b/Test/baseResults/tokenLength.vert.out index 8c31da9212..5f108301f6 100644 --- a/Test/baseResults/tokenLength.vert.out +++ b/Test/baseResults/tokenLength.vert.out @@ -27,7 +27,8 @@ ERROR: 0:62: 'preprocessor evaluation' : undefined macro in expression not allow ERROR: 0:67: '' : numeric literal too long ERROR: 0:70: '' : name too long ERROR: 0:70: 'preprocessor evaluation' : undefined macro in expression not allowed in es profile A000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 -ERROR: 26 compilation errors. No code generated. +ERROR: 0:74: '' : syntax error, unexpected IDENTIFIER, expecting COMMA or SEMICOLON +ERROR: 27 compilation errors. No code generated. Shader version: 300 @@ -56,7 +57,7 @@ ERROR: node is still EOpNull! 0:14 move second child to first child ( temp highp int) 0:14 'HE' ( global highp int) 0:14 Constant: -0:14 -1 (const int) +0:14 180150000 (const int) 0:17 Sequence 0:17 move second child to first child ( temp highp float) 0:17 'F' ( global highp float) @@ -119,6 +120,7 @@ ERROR: node is still EOpNull! 0:? 'superO' ( global highp int) 0:? 'superI' ( global highp int) 0:? 'superF' ( global highp float) +0:? 'BE' ( global highp int) 0:? 'gl_VertexID' ( gl_VertexId highp int VertexId) 0:? 'gl_InstanceID' ( gl_InstanceId highp int InstanceId) @@ -152,7 +154,7 @@ ERROR: node is still EOpNull! 0:14 move second child to first child ( temp highp int) 0:14 'HE' ( global highp int) 0:14 Constant: -0:14 -1 (const int) +0:14 180150000 (const int) 0:17 Sequence 0:17 move second child to first child ( temp highp float) 0:17 'F' ( global highp float) @@ -215,6 +217,7 @@ ERROR: node is still EOpNull! 0:? 'superO' ( global highp int) 0:? 'superI' ( global highp int) 0:? 'superF' ( global highp float) +0:? 'BE' ( global highp int) 0:? 'gl_VertexID' ( gl_VertexId highp int VertexId) 0:? 'gl_InstanceID' ( gl_InstanceId highp int InstanceId) diff --git a/Test/baseResults/vk.relaxed.changeSet.vert.out b/Test/baseResults/vk.relaxed.changeSet.vert.out index d2beff93d9..d7502a3ad9 100755 --- a/Test/baseResults/vk.relaxed.changeSet.vert.out +++ b/Test/baseResults/vk.relaxed.changeSet.vert.out @@ -139,7 +139,7 @@ gl_FragCoord origin is upper left 0:? 'UV' ( smooth in highp 2-component vector of float) // Module Version 10000 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 46 Capability Shader @@ -232,7 +232,7 @@ gl_FragCoord origin is upper left Return FunctionEnd // Module Version 10000 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 27 Capability Shader diff --git a/Test/baseResults/vk.relaxed.frag.out b/Test/baseResults/vk.relaxed.frag.out index d98910e6f8..c88782f30e 100644 --- a/Test/baseResults/vk.relaxed.frag.out +++ b/Test/baseResults/vk.relaxed.frag.out @@ -553,7 +553,7 @@ gl_FragCoord origin is upper left 0:? 'anon@3' (layout( column_major std430) buffer block{ coherent volatile buffer highp uint counter3}) // Module Version 10000 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 163 Capability Shader diff --git a/Test/baseResults/vk.relaxed.link1.frag.out b/Test/baseResults/vk.relaxed.link1.frag.out index 9dac4c64e2..1e67646c6b 100644 --- a/Test/baseResults/vk.relaxed.link1.frag.out +++ b/Test/baseResults/vk.relaxed.link1.frag.out @@ -348,7 +348,7 @@ gl_FragCoord origin is upper left 0:? 'anon@1' (layout( column_major std430) buffer block{ coherent volatile buffer highp uint counter1, coherent volatile buffer highp uint counter2, coherent volatile buffer highp uint counter3}) // Module Version 10000 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 105 Capability Shader diff --git a/Test/baseResults/vk.relaxed.stagelink.0.0.vert.out b/Test/baseResults/vk.relaxed.stagelink.0.0.vert.out index bcd4e2afd5..37532ed603 100755 --- a/Test/baseResults/vk.relaxed.stagelink.0.0.vert.out +++ b/Test/baseResults/vk.relaxed.stagelink.0.0.vert.out @@ -7014,7 +7014,7 @@ gl_FragCoord origin is upper left 0:? 'sTDInstanceColor' (layout( binding=17) uniform highp samplerBuffer) // Module Version 10000 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 939 Capability Shader @@ -8567,7 +8567,7 @@ gl_FragCoord origin is upper left ReturnValue 893 FunctionEnd // Module Version 10000 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 1297 Capability Shader diff --git a/Test/baseResults/vk.relaxed.stagelink.vert.out b/Test/baseResults/vk.relaxed.stagelink.vert.out index b9173f249c..47e1b4fa07 100644 --- a/Test/baseResults/vk.relaxed.stagelink.vert.out +++ b/Test/baseResults/vk.relaxed.stagelink.vert.out @@ -435,7 +435,7 @@ gl_FragCoord origin is upper left 0:? 'anon@1' (layout( column_major std430) buffer block{ coherent volatile buffer highp uint counter1, coherent volatile buffer highp uint counter2}) // Module Version 10000 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 92 Capability Shader @@ -593,7 +593,7 @@ gl_FragCoord origin is upper left ReturnValue 64 FunctionEnd // Module Version 10000 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 74 Capability Shader diff --git a/Test/baseResults/vulkan.ast.vert.out b/Test/baseResults/vulkan.ast.vert.out index 68e892b4ac..c893103c4b 100644 --- a/Test/baseResults/vulkan.ast.vert.out +++ b/Test/baseResults/vulkan.ast.vert.out @@ -258,7 +258,7 @@ Shader version: 450 0:? 2 (const int) // Module Version 10000 -// Generated by (magic number): 8000a +// Generated by (magic number): 8000b // Id's are bound by 50 Capability Shader diff --git a/Test/baseResults/vulkan.frag.out b/Test/baseResults/vulkan.frag.out index 78aea82189..8e6bfcc945 100644 --- a/Test/baseResults/vulkan.frag.out +++ b/Test/baseResults/vulkan.frag.out @@ -6,7 +6,7 @@ ERROR: 0:6: 'binding' : sampler/texture/image requires layout(binding=X) ERROR: 0:8: 'binding' : sampler/texture/image requires layout(binding=X) ERROR: 0:9: 'binding' : sampler/texture/image requires layout(binding=X) ERROR: 0:10: 'binding' : sampler/texture/image requires layout(binding=X) -ERROR: 0:14: 'sampler2D' : sampler-constructor requires two arguments +ERROR: 0:14: 'sampler2D' : sampler-constructor requires the extension GL_ARB_bindless_texture enabled ERROR: 0:15: 'sampler2D' : sampler-constructor first argument must be a scalar *texture* type ERROR: 0:16: 'sampler2D' : sampler-constructor first argument must be a scalar *texture* type ERROR: 0:17: 'sampler2D' : sampler-constructor second argument must be a scalar sampler or samplerShadow diff --git a/Test/glsl.-P.frag b/Test/glsl.-P.frag new file mode 100644 index 0000000000..72df8dedd1 --- /dev/null +++ b/Test/glsl.-P.frag @@ -0,0 +1,20 @@ +#version 450 + +layout(location=0) out vec4 color; + +void main() +{ + #ifndef TEST1 + #error TEST1 is not defined + #endif + + #ifndef TEST2 + #error TEST2 is not defined + #endif + + #ifndef TEST3 + #error TEST3 is not defined + #endif + + color = vec4(1.0); +} diff --git a/Test/glsl.-P.function.frag b/Test/glsl.-P.function.frag new file mode 100644 index 0000000000..086bb4dc7c --- /dev/null +++ b/Test/glsl.-P.function.frag @@ -0,0 +1,8 @@ +#version 450 + +layout(location=0) out vec4 color; + +void main() +{ + color = getColor(); +} diff --git a/Test/glsl.-P.include.frag b/Test/glsl.-P.include.frag new file mode 100644 index 0000000000..fdadc7178b --- /dev/null +++ b/Test/glsl.-P.include.frag @@ -0,0 +1,10 @@ +#version 450 + +#include "glsl.-P.included.glsl" + +layout(location=0) out vec4 color; + +void main() +{ + color = getColor(); +} diff --git a/Test/glsl.-P.included.glsl b/Test/glsl.-P.included.glsl new file mode 100644 index 0000000000..d870f9f940 --- /dev/null +++ b/Test/glsl.-P.included.glsl @@ -0,0 +1,4 @@ +vec4 getColor() +{ + return vec4(1.0); +} diff --git a/Test/glsl.es320.extTextureShadowLod.frag b/Test/glsl.es320.extTextureShadowLod.frag new file mode 100644 index 0000000000..49125633c8 --- /dev/null +++ b/Test/glsl.es320.extTextureShadowLod.frag @@ -0,0 +1,22 @@ +#version 320 es + +#extension GL_EXT_texture_shadow_lod : enable + + +uniform lowp sampler2DArrayShadow s2da; +uniform lowp samplerCubeArrayShadow sca; +uniform lowp samplerCubeShadow sc; + +in lowp vec4 tc; +out lowp float c; +void main() +{ + c = texture(s2da, tc, 0.0); + c = texture(sca, tc, 0.0, 0.0); + c = textureOffset(s2da, tc, ivec2(0.0), 0.0); + c = textureLod(s2da, tc, 0.0); + c = textureLod(sc, tc, 0.0); + c = textureLod(sca, tc, 0.0, 0.0); + c = textureLodOffset(s2da, tc, 0.0, ivec2(0.0)); + +} diff --git a/Test/glsl.ext.textureShadowLod.frag b/Test/glsl.ext.textureShadowLod.frag new file mode 100644 index 0000000000..79c22ff041 --- /dev/null +++ b/Test/glsl.ext.textureShadowLod.frag @@ -0,0 +1,32 @@ +#version 450 +#extension GL_EXT_texture_shadow_lod : enable + +uniform sampler2DArrayShadow s2da; +uniform samplerCubeArrayShadow sca; +uniform samplerCubeShadow sc; + +out float c; +in vec4 tc; + +void pass() { + c = texture(s2da, tc, 0.0); + c = texture(sca, tc, 0.0, 0.0); + c = textureOffset(s2da, tc, ivec2(0.0), 0.0); + c = textureLod(s2da, tc, 0.0); + c = textureLod(sc, tc, 0.0); + c = textureLod(sca, tc, 0.0, 0.0); + c = textureLodOffset(s2da, tc, 0.0, ivec2(0.0)); +} + +#extension GL_EXT_texture_shadow_lod : disable +void fail() { + // All these builtins should fail to compile + c = texture(s2da, tc, 0.0); + c = texture(sca, tc, 0.0, 0.0); + c = textureOffset(s2da, tc, ivec2(0.0), 0.0); + c = textureLod(s2da, tc, 0.0); + c = textureLod(sc, tc, 0.0); + c = textureLod(sca, tc, 0.0, 0.0); + c = textureLodOffset(s2da, tc, 0.0, ivec2(0.0)); +} + diff --git a/Test/glsl.versionOverride.geom b/Test/glsl.versionOverride.geom index bcfc2f22cd..691c99124d 100644 --- a/Test/glsl.versionOverride.geom +++ b/Test/glsl.versionOverride.geom @@ -1,6 +1,6 @@ /* -glslangValidator.exe --glsl-version 430 -V -S geom -o glsl.versionOverride.geom.out glsl.versionOverride.geom +glslang.exe --glsl-version 430 -V -S geom -o glsl.versionOverride.geom.out glsl.versionOverride.geom */ diff --git a/Test/glsl.versionOverride.tesc b/Test/glsl.versionOverride.tesc index 3b7b1e3c9a..a3bd7ed60b 100644 --- a/Test/glsl.versionOverride.tesc +++ b/Test/glsl.versionOverride.tesc @@ -1,6 +1,6 @@ /* -glslangValidator.exe --glsl-version 440 -V -S tesc -o glsl.versionOverride.tesc.out glsl.versionOverride.tesc +glslang.exe --glsl-version 440 -V -S tesc -o glsl.versionOverride.tesc.out glsl.versionOverride.tesc */ diff --git a/Test/glsl.versionOverride.tese b/Test/glsl.versionOverride.tese index e92d5a986f..bbb42d2fc9 100644 --- a/Test/glsl.versionOverride.tese +++ b/Test/glsl.versionOverride.tese @@ -1,6 +1,6 @@ /* -glslangValidator.exe --glsl-version 450 -V -S tese -o glsl.versionOverride.tese.out glsl.versionOverride.tese +glslang.exe --glsl-version 450 -V -S tese -o glsl.versionOverride.tese.out glsl.versionOverride.tese */ diff --git a/Test/glslangValidator b/Test/glslangValidator index 856aa1a995..f6b26b437a 100755 --- a/Test/glslangValidator +++ b/Test/glslangValidator @@ -1,2 +1,2 @@ #!/usr/bin/env bash -../build/install/bin/glslangValidator $* +../build/install/bin/glslang $* diff --git a/Test/hlsl.buffer_ref_parameter.comp b/Test/hlsl.buffer_ref_parameter.comp new file mode 100644 index 0000000000..acd08b3781 --- /dev/null +++ b/Test/hlsl.buffer_ref_parameter.comp @@ -0,0 +1,13 @@ +[[vk::binding(0, 0)]] ByteAddressBuffer buffer_position_ms; +[[vk::binding(1, 0)]] RWByteAddressBuffer r; + +float3 pull_position(ByteAddressBuffer buffer_position, uint vertex_id) { + return asfloat(buffer_position.Load3(vertex_id * 3 * 4)); +} + +[numthreads(64, 1, 1)] +void main(uint gi : SV_GroupIndex) { + float3 position_ms = pull_position(buffer_position_ms, gi); + + r.Store3(0, asuint(position_ms)); +} \ No newline at end of file diff --git a/Test/hlsl.conditional.frag b/Test/hlsl.conditional.frag index 91f75eec7f..7b6eb7bda4 100644 --- a/Test/hlsl.conditional.frag +++ b/Test/hlsl.conditional.frag @@ -37,6 +37,10 @@ float4 PixelShaderFunction(float4 input) : COLOR0 e = a = b ? c = d : 10, b = a ? d = c : 11; float4 f; f = ret.x < input.y ? c * input : d * input; + uint g = d > 0.0 ? 0b010101u : 0u; + uint h = g > 0.0 ? 0B111111u : 0u; + uint i = h > 0.0 ? 0b0101u : 0B01; + uint j = i > 0.0 ? 0xabcd : 0xbcda; return e * ret + f + vectorCond() + scalarCond() + float4(fbSelect(bool2(true, false), float2(1.0, 2.0), float2(3.0, 4.0)), 10.0, 10.0); } diff --git a/Test/hlsl.emptystructreturn.tesc b/Test/hlsl.emptystructreturn.tesc new file mode 100644 index 0000000000..bc84893025 --- /dev/null +++ b/Test/hlsl.emptystructreturn.tesc @@ -0,0 +1,48 @@ +struct HullInputType +{ + float4 position : SV_Position; +}; + +struct ConstantOutputType +{ + float edges[3] : SV_TessFactor; + float inside : SV_InsideTessFactor; +}; +struct EmptyStruct {}; + +struct HullOutputType {}; + +void blob(InputPatch patch) +{ +} + +ConstantOutputType ColorPatchConstantFunction(InputPatch inputPatch, uint patchId : SV_PrimitiveID) +{ + ConstantOutputType output; + + // Set the tessellation factors for the three edges of the triangle. + output.edges[0] = 2; + output.edges[1] = 2; + output.edges[2] = 2; + + // Set the tessellation factor for tessallating inside the triangle. + output.inside = 2; + + return output; +} + + +// Hull Shader +[domain("tri")] +[partitioning("integer")] +[outputtopology("triangle_cw")] +[outputcontrolpoints(3)] +[patchconstantfunc("ColorPatchConstantFunction")] +HullOutputType main(EmptyStruct stage_input, InputPatch patch, uint pointId : SV_OutputControlPointID, uint patchId : SV_PrimitiveID) +{ + HullOutputType output; + blob(patch); + + return output; +} + diff --git a/Test/hlsl.function.frag b/Test/hlsl.function.frag index 5834b31964..6fb44a9ab1 100644 --- a/Test/hlsl.function.frag +++ b/Test/hlsl.function.frag @@ -3,9 +3,14 @@ float4 fun0() return 1.0f; } -uint fun2(float4 col) +float4 fun2(float4 const col) { - return 7; + return (1.0f, 2.0f, 3.0f, 4.0f); +} + +uint fun3(const float4 col) +{ + return 7; } float4 fun4(uint id1, uniform uint id2) @@ -15,7 +20,7 @@ float4 fun4(uint id1, uniform uint id2) float4 fun1(int index) { - uint entityId = fun2(fun0()); + uint entityId = fun3(fun2(fun0())); return fun4(entityId, entityId); } diff --git a/Test/hlsl.init2.frag b/Test/hlsl.init2.frag index 2b9b7e688c..6dcb6cb7a2 100644 --- a/Test/hlsl.init2.frag +++ b/Test/hlsl.init2.frag @@ -21,16 +21,17 @@ void Test1() const mystruct2 constTest5 = { {8,}, {9,}, {10}, }; constTest5.c; - const float step = 1.f; - float n = 0; - const float3 a[8] = { - normalize(float3(1, 1, 1)) * (n += step), - normalize(float3(-1, -1, -1)) * (n += step), - normalize(float3(-1, -1, 1)) * (n += step), - normalize(float3(-1, 1, -1)) * (n += step), - normalize(float3(-1, 1, 1)) * (n += step), - normalize(float3(1, -1, -1)) * (n += step), - normalize(float3(1, -1, 1)) * (n += step), + float const origStep = 1.0f; + const float step = origStep; + float n = 0; + const float3 a[8] = { + normalize(float3(1, 1, 1)) * (n += step), + normalize(float3(-1, -1, -1)) * (n += step), + normalize(float3(-1, -1, 1)) * (n += step), + normalize(float3(-1, 1, -1)) * (n += step), + normalize(float3(-1, 1, 1)) * (n += step), + normalize(float3(1, -1, -1)) * (n += step), + normalize(float3(1, -1, 1)) * (n += step), normalize(float3(1, 1, -1)) * (n += step) }; const struct one { float3 a; } oneNonConst = { normalize(float3(-1, 1, 1)) * (n += step) }; diff --git a/Test/hlsl.intrinsics.comp b/Test/hlsl.intrinsics.comp index bce2d27d81..78f424710f 100644 --- a/Test/hlsl.intrinsics.comp +++ b/Test/hlsl.intrinsics.comp @@ -12,6 +12,8 @@ groupshared uint3 gs_uc3; groupshared uint4 gs_ua4; groupshared uint4 gs_ub4; groupshared uint4 gs_uc4; +groupshared float gs_fa; +groupshared float gs_fb; float ComputeShaderFunctionS(float inF0, float inF1, float inF2, uint inU0, uint inU1) { @@ -36,6 +38,8 @@ float ComputeShaderFunctionS(float inF0, float inF1, float inF2, uint inU0, uint InterlockedXor(gs_ua, gs_ub); InterlockedXor(gs_ua, gs_ub, out_u1); + InterlockedAdd(gs_fa, gs_fb); + // CheckAccessFullyMapped(3); // TODO: ... return 0.0; diff --git a/Test/hlsl.mintypes.frag b/Test/hlsl.mintypes.frag index ad47e68e3b..a887562b43 100644 --- a/Test/hlsl.mintypes.frag +++ b/Test/hlsl.mintypes.frag @@ -12,30 +12,75 @@ PS_OUTPUT main() min16float2 mf16_2; min16float3 mf16_3; min16float4 mf16_4; + min16float2x2 mf16_2x2; + min16float2x3 mf16_2x3; + min16float2x4 mf16_2x4; + min16float3x2 mf16_3x2; + min16float3x3 mf16_3x3; + min16float3x4 mf16_3x4; + min16float4x2 mf16_4x2; + min16float4x3 mf16_4x3; + min16float4x4 mf16_4x4; min10float mf10; min10float1 mf10_1; min10float2 mf10_2; min10float3 mf10_3; - min10float4 mf12_4; + min10float4 mf10_4; + min10float2x2 mf10_2x2; + min10float2x3 mf10_2x3; + min10float2x4 mf10_2x4; + min10float3x2 mf10_3x2; + min10float3x3 mf10_3x3; + min10float3x4 mf10_3x4; + min10float4x2 mf10_4x2; + min10float4x3 mf10_4x3; + min10float4x4 mf10_4x4; min16int mi16; min16int1 mi16_1; min16int2 mi16_2; min16int3 mi16_3; min16int4 mi16_4; + min16int2x2 mi16_2x2; + min16int2x3 mi16_2x3; + min16int2x4 mi16_2x4; + min16int3x2 mi16_3x2; + min16int3x3 mi16_3x3; + min16int3x4 mi16_3x4; + min16int4x2 mi16_4x2; + min16int4x3 mi16_4x3; + min16int4x4 mi16_4x4; min12int mi12; min12int1 mi12_1; min12int2 mi12_2; min12int3 mi12_3; min12int4 mi12_4; + min12int2x2 mi12_2x2; + min12int2x3 mi12_2x3; + min12int2x4 mi12_2x4; + min12int3x2 mi12_3x2; + min12int3x3 mi12_3x3; + min12int3x4 mi12_3x4; + min12int4x2 mi12_4x2; + min12int4x3 mi12_4x3; + min12int4x4 mi12_4x4; min16uint mu16; min16uint1 mu16_1; min16uint2 mu16_2; min16uint3 mu16_3; min16uint4 mu16_4; + min16uint2x2 mu16_2x2; + min16uint2x3 mu16_2x3; + min16uint2x4 mu16_2x4; + min16uint3x2 mu16_3x2; + min16uint3x3 mu16_3x3; + min16uint3x4 mu16_3x4; + min16uint4x2 mu16_4x2; + min16uint4x3 mu16_4x3; + min16uint4x4 mu16_4x4; mf16_2 + mf16; mf10_2 + mf10; @@ -43,6 +88,20 @@ PS_OUTPUT main() mi12_2 + mi12; mu16_2 + mu16; + mul(mf16_2, mf16_2x4); + mul(mf16_3, mf16_3x4); + mul(mf16_4, mf16_4x4); + mul(mf16_4x2, mf16_2); + mul(mf16_4x3, mf16_3); + mul(mf16_4x4, mf16_4); + + mul(mf10_2, mf10_2x4); + mul(mf10_3, mf10_3x4); + mul(mf10_4, mf10_4x4); + mul(mf10_4x2, mf10_2); + mul(mf10_4x3, mf10_3); + mul(mf10_4x4, mf10_4); + PS_OUTPUT psout; psout.Color = 0; return psout; diff --git a/Test/hlsl.nested-runtimeArray.frag b/Test/hlsl.nested-runtimeArray.frag new file mode 100644 index 0000000000..3606adac38 --- /dev/null +++ b/Test/hlsl.nested-runtimeArray.frag @@ -0,0 +1,9 @@ +struct A { + float a[]; +}; + +RWStructuredBuffer B; + +float main() { + return B[0].a[0]; +} diff --git a/Test/hlsl.numericsuffixes.frag b/Test/hlsl.numericsuffixes.frag index bccb786da0..e16d374de5 100644 --- a/Test/hlsl.numericsuffixes.frag +++ b/Test/hlsl.numericsuffixes.frag @@ -1,6 +1,9 @@ struct PS_OUTPUT { float4 color : SV_Target0; }; +#define BIN_UINT 0b00001u +#define BIN_INT 0b00011 + PS_OUTPUT main() { // Test numeric suffixes @@ -8,7 +11,7 @@ PS_OUTPUT main() uint r01 = 1u; // lower uint uint r02 = 2U; // upper uint uint r03 = 0xabcu; // lower hex uint - uint r04 = 0xABCU; // upper hex uint (upper 0X is not accepted) + uint r04 = 0XABCU; // upper hex uint int r05 = 5l; // lower long int int r06 = 6L; // upper long int int r07 = 071; // octal @@ -17,6 +20,12 @@ PS_OUTPUT main() float r10 = 1.H; // half float r11 = 1.1h; // half float r12 = 1.1H; // half + uint r13 = 0b00001u;// lower binary uint + uint r14 = 0B00010U;// upper binary uint + int r15 = 0b00011; // lower binary int + int r16 = 0B00100; // upper binary int + uint r17 = BIN_UINT;// lower binart define uint + int r18 = BIN_INT; // lower binart define int PS_OUTPUT ps_output; ps_output.color = r07; // gets 71 octal = 57 decimal diff --git a/Test/hlsl.numericsuffixes.negative.frag b/Test/hlsl.numericsuffixes.negative.frag new file mode 100644 index 0000000000..ce512fd059 --- /dev/null +++ b/Test/hlsl.numericsuffixes.negative.frag @@ -0,0 +1,15 @@ + +struct PS_OUTPUT { float4 color : SV_Target0; }; + +PS_OUTPUT main() +{ + // Test numeric suffixes + uint r01 = 0bERROR321u; // Bad digit + uint r02 = 0b11111111111111111111111111111111111111111111111111111111111111111u; // To big + uint r03 = 0xTESTu // Bad digit + uint r04 = 0xFFFFFFFFFFFFFFFFFFu; // To big + + PS_OUTPUT ps_output; + ps_output.color = r01; + return ps_output; +} diff --git a/Test/hlsl.structcopy.comp b/Test/hlsl.structcopy.comp new file mode 100644 index 0000000000..378988479d --- /dev/null +++ b/Test/hlsl.structcopy.comp @@ -0,0 +1,28 @@ +struct MyStruct { + uint a; + uint b; + uint c; +}; + +struct MyStructs { + uint count; + MyStruct data[]; +}; + +StructuredBuffer sb; +StructuredBuffer o; + +groupshared MyStruct s[128]; +static const MyStruct deflt = { 1u, 2u, 3u }; + +[numthreads(128, 1, 1)] +void main(uint id : SV_GroupIndex) +{ + s[0] = deflt; + uint count = sb.Load(0).count; + MyStruct ms = id > count ? s[id - count] : sb.Load(0).data[id]; + + InterlockedAdd(o[0].a, ms.a); + InterlockedAdd(o[0].b, ms.b); + InterlockedAdd(o[0].c, ms.c); +} diff --git a/Test/hlsl.structcopylogical.comp b/Test/hlsl.structcopylogical.comp new file mode 100644 index 0000000000..378988479d --- /dev/null +++ b/Test/hlsl.structcopylogical.comp @@ -0,0 +1,28 @@ +struct MyStruct { + uint a; + uint b; + uint c; +}; + +struct MyStructs { + uint count; + MyStruct data[]; +}; + +StructuredBuffer sb; +StructuredBuffer o; + +groupshared MyStruct s[128]; +static const MyStruct deflt = { 1u, 2u, 3u }; + +[numthreads(128, 1, 1)] +void main(uint id : SV_GroupIndex) +{ + s[0] = deflt; + uint count = sb.Load(0).count; + MyStruct ms = id > count ? s[id - count] : sb.Load(0).data[id]; + + InterlockedAdd(o[0].a, ms.a); + InterlockedAdd(o[0].b, ms.b); + InterlockedAdd(o[0].c, ms.c); +} diff --git a/Test/implicitArraySize.frag b/Test/implicitArraySize.frag new file mode 100644 index 0000000000..ca3eeb3ffe --- /dev/null +++ b/Test/implicitArraySize.frag @@ -0,0 +1,9 @@ +#version 460 core +in float a[]; +in float c[3]; +out float b[5]; + +void main(){ + b[0] = a[1]; + b[1] = c[1]; +} \ No newline at end of file diff --git a/Test/implicitArraySize.vert b/Test/implicitArraySize.vert new file mode 100644 index 0000000000..93e7495bfb --- /dev/null +++ b/Test/implicitArraySize.vert @@ -0,0 +1,8 @@ +#version 460 core +out float a[]; +out float c[]; + +void main(){ + a[0] = 0.1; + c[5] = 0.1; +} \ No newline at end of file diff --git a/Test/implicitArraySize1.geom b/Test/implicitArraySize1.geom new file mode 100644 index 0000000000..b3b52ead55 --- /dev/null +++ b/Test/implicitArraySize1.geom @@ -0,0 +1,14 @@ +#version 460 core + +layout(triangles) in; +layout(line_strip, max_vertices = 204) out; + +void f(); + +in float g[][3]; +out float o[3]; + +void main(){ + f(); + o[1] = g[2][1]; +} \ No newline at end of file diff --git a/Test/implicitArraySize2.geom b/Test/implicitArraySize2.geom new file mode 100644 index 0000000000..0bb65cd47b --- /dev/null +++ b/Test/implicitArraySize2.geom @@ -0,0 +1,8 @@ +#version 460 core + +in float g[][3]; +out float o[]; + +void f(){ + o[1] = g[1][1]; +} \ No newline at end of file diff --git a/Test/implicitArraySizeBuiltin.geom b/Test/implicitArraySizeBuiltin.geom new file mode 100644 index 0000000000..419b63314a --- /dev/null +++ b/Test/implicitArraySizeBuiltin.geom @@ -0,0 +1,20 @@ +#version 460 core + +layout(triangles) in; +layout(line_strip, max_vertices = 204) out; + +void f2(float x) +{ + gl_ClipDistance[6] = gl_in[0].gl_ClipDistance[6]; +} +void f3(float x) +{ + gl_CullDistance[1] = gl_in[0].gl_CullDistance[1]; +} + +void main(){ + #if defined(CLIP) + f2(0.1); + #endif + f3(0.1); +} \ No newline at end of file diff --git a/Test/implicitArraySizeBuiltin.vert b/Test/implicitArraySizeBuiltin.vert new file mode 100644 index 0000000000..251e975626 --- /dev/null +++ b/Test/implicitArraySizeBuiltin.vert @@ -0,0 +1,11 @@ +#version 460 core + +void f1(float x) +{ + gl_ClipDistance[6] = x; + gl_CullDistance[1] = x; +} + +void main(){ + f1(0.1); +} \ No newline at end of file diff --git a/Test/makeDoc b/Test/makeDoc deleted file mode 100644 index c9d598ec41..0000000000 --- a/Test/makeDoc +++ /dev/null @@ -1,3 +0,0 @@ -#!/usr/bin/env bash -./glslangValidator -p > instDesc -asciidoc --backend=html5 instDesc diff --git a/Test/preprocessor.function_macro.vert b/Test/preprocessor.function_macro.vert index 577ea7e358..9f437867b9 100644 --- a/Test/preprocessor.function_macro.vert +++ b/Test/preprocessor.function_macro.vert @@ -13,8 +13,11 @@ )\ 4 + 3 + Y +#define F F.a + int main() { gl_Position = vec4(X(3), Y(3, 4), Z(3)); gl_Position = vec4(REALLY_LONG_MACRO_NAME_WITH_MANY_PARAMETERS(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12)); gl_Position = vec4(A(3)); + gl_Position = A(F); } diff --git a/Test/preprocessor.simple.vert b/Test/preprocessor.simple.vert index 788df76ce5..6c44850086 100644 --- a/Test/preprocessor.simple.vert +++ b/Test/preprocessor.simple.vert @@ -46,6 +46,8 @@ struct S { vec3 b = a.yzy; \ vec3 b = a.z; +void bar(int x) {} + void foo() { S s; @@ -55,6 +57,9 @@ void foo() s.member2.yzy(); s.member2.xyz(); s.member2.yzy; + for(int i = 0;i < 100; i = i + 1) { + bar (i) + } FUN_MAC() yzy diff --git a/Test/rayQuery-allOps.comp b/Test/rayQuery-allOps.comp index 3a2a8d0d2d..6f04175840 100644 --- a/Test/rayQuery-allOps.comp +++ b/Test/rayQuery-allOps.comp @@ -1,6 +1,7 @@ #version 460 #extension GL_EXT_ray_query : enable #extension GL_EXT_ray_flags_primitive_culling : enable +#extension GL_EXT_ray_tracing_position_fetch : enable layout(primitive_culling); struct Ray @@ -147,6 +148,14 @@ void main() { doSomething(); } + { + vec3 positions[3]; + rayQueryGetIntersectionTriangleVertexPositionsEXT(rayQuery, true, positions); + if (positions[0].x < 0 && positions[2].y > 0) + { + doSomething(); + } + } break; case gl_RayQueryCommittedIntersectionGeneratedEXT : diff --git a/Test/runtests b/Test/runtests index 2ee0db0d7c..e7e1d33f48 100755 --- a/Test/runtests +++ b/Test/runtests @@ -2,12 +2,12 @@ # Arguments: # 1- TargetDirectory, where to write test results and intermediary files -# 2- Path to glslangValidator +# 2- Path to glslang # 3- Path to spirv-remap TARGETDIR=${1:-localResults} BASEDIR=baseResults -EXE=${2:-../build/install/bin/glslangValidator} +EXE=${2:-../build/install/bin/glslang} REMAPEXE=${3:-../build/install/bin/spirv-remap} HASERROR=0 mkdir -p $TARGETDIR @@ -18,7 +18,7 @@ if [ -d "${LIBPATH}" ]; then fi function run { - $EXE $@ + $EXE "$@" result=$? case "$result" in [0-6]) # Valid success and error codes @@ -201,13 +201,19 @@ run -D -Od -e main -H --depfile $TARGETDIR/hlsl.dashI.vert.d.out -Od -Iinc1/path diff -b $BASEDIR/hlsl.dashI.vert.d.out $TARGETDIR/hlsl.dashI.vert.d.out || HASERROR=1 # -# Testing -D and -U +# Testing -D, -U and -P # -echo "Testing -D and -U" +echo "Testing -D, -U and -P" run -DUNDEFED -UIN_SHADER -DFOO=200 -i -l --U UNDEFED --define-macro MUL=FOO*2 glsl.-D-U.frag > $TARGETDIR/glsl.-D-U.frag.out diff -b $BASEDIR/glsl.-D-U.frag.out $TARGETDIR/glsl.-D-U.frag.out || HASERROR=1 run -D -Od -e main -V -i -DUNDEFED -UIN_SHADER --D FOO=200 --undef-macro UNDEFED -Od hlsl.-D-U.frag > $TARGETDIR/hlsl.-D-U.frag.out diff -b $BASEDIR/hlsl.-D-U.frag.out $TARGETDIR/hlsl.-D-U.frag.out || HASERROR=1 +run -P"#define TEST1" -i -l --preamble-text "#define TEST2" --p "#define TEST3" glsl.-P.frag > $TARGETDIR/glsl.-P.frag.out +diff -b $BASEDIR/glsl.-P.frag.out $TARGETDIR/glsl.-P.frag.out || HASERROR=1 +run -i -l --preamble-text "vec4 getColor() { return vec4(1.0); }" glsl.-P.function.frag > $TARGETDIR/glsl.-P.function.frag.out +diff -b $BASEDIR/glsl.-P.function.frag.out $TARGETDIR/glsl.-P.function.frag.out || HASERROR=1 +run -i -l --preamble-text "#extension GL_GOOGLE_include_directive : require" -I. glsl.-P.include.frag > $TARGETDIR/glsl.-P.include.frag.out +diff -b $BASEDIR/glsl.-P.include.frag.out $TARGETDIR/glsl.-P.include.frag.out || HASERROR=1 # # Test --client and --target-env diff --git a/Test/spv.1.6.helperInvocation.memmodel.frag b/Test/spv.1.6.helperInvocation.memmodel.frag new file mode 100644 index 0000000000..b727f8e0ea --- /dev/null +++ b/Test/spv.1.6.helperInvocation.memmodel.frag @@ -0,0 +1,16 @@ +#version 310 es + +#pragma use_vulkan_memory_model + +#extension GL_EXT_demote_to_helper_invocation : require + +precision highp float; + +layout (set=0, binding=0) buffer B { + float o; +}; + +void main() { + demote; + o = gl_HelperInvocation ? 1.0 : 0.0; +} diff --git a/Test/spv.460.subgroupEXT.mesh b/Test/spv.460.subgroupEXT.mesh new file mode 100644 index 0000000000..8ccc14e2ee --- /dev/null +++ b/Test/spv.460.subgroupEXT.mesh @@ -0,0 +1,164 @@ +#version 460 + +#define MAX_VER 81 +#define MAX_PRIM 32 + +#define BARRIER() \ + memoryBarrierShared(); \ + barrier(); + +#extension GL_EXT_mesh_shader : enable + +layout(local_size_x = 32, local_size_y=1, local_size_z=1) in; + +layout(max_vertices=MAX_VER) out; +layout(max_primitives=MAX_PRIM) out; +layout(triangles) out; + +// test use of builtins in mesh shaders: + +void main() +{ + uint iid = gl_LocalInvocationID.x; + uint gid = gl_WorkGroupID.x; + uint vertexCount = MAX_VER; // vertexCount <= max_vertices + uint primitiveCount = MAX_PRIM; // primitiveCount <= max_primtives + SetMeshOutputsEXT(vertexCount, primitiveCount); + + gl_MeshVerticesEXT[iid].gl_Position = vec4(1.0); + gl_MeshVerticesEXT[iid].gl_PointSize = 2.0; + gl_MeshVerticesEXT[iid].gl_ClipDistance[3] = 3.0; + gl_MeshVerticesEXT[iid].gl_CullDistance[2] = 4.0; + + BARRIER(); + + gl_MeshVerticesEXT[iid+1].gl_Position = gl_MeshVerticesEXT[iid].gl_Position; + gl_MeshVerticesEXT[iid+1].gl_PointSize = gl_MeshVerticesEXT[iid].gl_PointSize; + gl_MeshVerticesEXT[iid+1].gl_ClipDistance[3] = gl_MeshVerticesEXT[iid].gl_ClipDistance[3]; + gl_MeshVerticesEXT[iid+1].gl_CullDistance[2] = gl_MeshVerticesEXT[iid].gl_CullDistance[2]; + + BARRIER(); + + gl_MeshPrimitivesEXT[iid].gl_PrimitiveID = 6; + gl_MeshPrimitivesEXT[iid].gl_Layer = 7; + gl_MeshPrimitivesEXT[iid].gl_ViewportIndex = 8; + gl_MeshPrimitivesEXT[iid].gl_CullPrimitiveEXT = false; + + BARRIER(); + + gl_MeshPrimitivesEXT[iid+1].gl_PrimitiveID = gl_MeshPrimitivesEXT[iid].gl_PrimitiveID; + gl_MeshPrimitivesEXT[iid+1].gl_Layer = gl_MeshPrimitivesEXT[iid].gl_Layer; + gl_MeshPrimitivesEXT[iid+1].gl_ViewportIndex = gl_MeshPrimitivesEXT[iid].gl_ViewportIndex; + gl_MeshPrimitivesEXT[iid+1].gl_CullPrimitiveEXT = false; + + BARRIER(); + + // check bound limits + gl_PrimitiveTriangleIndicesEXT[0] = uvec3(1, 1, 1); // range is between [0, vertexCount-1] + gl_PrimitiveTriangleIndicesEXT[primitiveCount - 1] = uvec3(2, 2, 2); // array size is primitiveCount*3 for triangle + gl_PrimitiveTriangleIndicesEXT[gid] = gl_PrimitiveTriangleIndicesEXT[gid-1]; + + + BARRIER(); +} + +#extension GL_KHR_shader_subgroup_basic: enable +void basic_works (void) +{ + gl_SubgroupSize; + gl_SubgroupInvocationID; + subgroupBarrier(); + subgroupMemoryBarrier(); + subgroupMemoryBarrierBuffer(); + subgroupMemoryBarrierImage(); + subgroupElect(); + gl_NumSubgroups; // allowed in mesh + gl_SubgroupID; // allowed in mesh + subgroupMemoryBarrierShared(); // allowed in mesh +} + +#extension GL_KHR_shader_subgroup_ballot: enable +void ballot_works(vec4 f4) { + gl_SubgroupEqMask; + gl_SubgroupGeMask; + gl_SubgroupGtMask; + gl_SubgroupLeMask; + gl_SubgroupLtMask; + subgroupBroadcast(f4, 0); + subgroupBroadcastFirst(f4); + uvec4 ballot = subgroupBallot(false); + subgroupInverseBallot(uvec4(0x1)); + subgroupBallotBitExtract(ballot, 0); + subgroupBallotBitCount(ballot); + subgroupBallotInclusiveBitCount(ballot); + subgroupBallotExclusiveBitCount(ballot); + subgroupBallotFindLSB(ballot); + subgroupBallotFindMSB(ballot); +} + +#extension GL_KHR_shader_subgroup_vote: enable +void vote_works(vec4 f4) +{ + subgroupAll(true); + subgroupAny(false); + subgroupAllEqual(f4); +} + +#extension GL_KHR_shader_subgroup_shuffle: enable +#extension GL_KHR_shader_subgroup_shuffle_relative: enable +void shuffle_works(vec4 f4) +{ + subgroupShuffle(f4, 0); + subgroupShuffleXor(f4, 0x1); + subgroupShuffleUp(f4, 1); + subgroupShuffleDown(f4, 1); +} + +#extension GL_KHR_shader_subgroup_arithmetic: enable +void arith_works(vec4 f4) +{ + uvec4 ballot; + subgroupAdd(f4); + subgroupMul(f4); + subgroupMin(f4); + subgroupMax(f4); + subgroupAnd(ballot); + subgroupOr(ballot); + subgroupXor(ballot); + subgroupInclusiveAdd(f4); + subgroupInclusiveMul(f4); + subgroupInclusiveMin(f4); + subgroupInclusiveMax(f4); + subgroupInclusiveAnd(ballot); + subgroupInclusiveOr(ballot); + subgroupInclusiveXor(ballot); + subgroupExclusiveAdd(f4); + subgroupExclusiveMul(f4); + subgroupExclusiveMin(f4); + subgroupExclusiveMax(f4); + subgroupExclusiveAnd(ballot); + subgroupExclusiveOr(ballot); + subgroupExclusiveXor(ballot); +} + +#extension GL_KHR_shader_subgroup_clustered: enable +void clustered_works(vec4 f4) +{ + uvec4 ballot = uvec4(0x55,0,0,0); + subgroupClusteredAdd(f4, 2); + subgroupClusteredMul(f4, 2); + subgroupClusteredMin(f4, 2); + subgroupClusteredMax(f4, 2); + subgroupClusteredAnd(ballot, 2); + subgroupClusteredOr(ballot, 2); + subgroupClusteredXor(ballot, 2); +} + +#extension GL_KHR_shader_subgroup_quad: enable +void quad_works(vec4 f4) +{ + subgroupQuadBroadcast(f4, 0); + subgroupQuadSwapHorizontal(f4); + subgroupQuadSwapVertical(f4); + subgroupQuadSwapDiagonal(f4); +} diff --git a/Test/spv.460.subgroupEXT.task b/Test/spv.460.subgroupEXT.task new file mode 100644 index 0000000000..cffe98e3bd --- /dev/null +++ b/Test/spv.460.subgroupEXT.task @@ -0,0 +1,153 @@ +#version 460 + + +#define BARRIER() \ + memoryBarrierShared(); \ + barrier(); + +#extension GL_EXT_mesh_shader : enable + +layout(local_size_x = 32, local_size_y=1, local_size_z=1) in; + +// test use of shared memory in task shaders: +layout(binding=0) writeonly uniform image2D uni_image; +uniform block0 { + uint uni_value; +}; +shared vec4 mem[10]; + +// test use of task memory in task shaders: +struct Task { + vec2 dummy; + vec2 submesh[3]; +}; + +taskPayloadSharedEXT Task mytask; +void main() +{ + uint iid = gl_LocalInvocationID.x; + uint gid = gl_WorkGroupID.x; + + // 1. shared memory load and stores + for (uint i = 0; i < 10; ++i) { + mem[i] = vec4(i + uni_value); + } + imageStore(uni_image, ivec2(iid), mem[gid]); + imageStore(uni_image, ivec2(iid), mem[gid+1]); + + BARRIER(); + + // 2. task memory stores + + mytask.dummy = vec2(30.0, 31.0); + mytask.submesh[0] = vec2(32.0, 33.0); + mytask.submesh[1] = vec2(34.0, 35.0); + mytask.submesh[2] = mytask.submesh[gid%2]; + + BARRIER(); + + // 3. emit task count under uniform control flow + EmitMeshTasksEXT(3U, 1U, 1U); +} + +#extension GL_KHR_shader_subgroup_basic: enable +void basic_works (void) +{ + gl_SubgroupSize; + gl_SubgroupInvocationID; + subgroupBarrier(); + subgroupMemoryBarrier(); + subgroupMemoryBarrierBuffer(); + subgroupMemoryBarrierImage(); + subgroupElect(); + gl_NumSubgroups; // allowed in task + gl_SubgroupID; // allowed in task + subgroupMemoryBarrierShared(); // allowed in task +} + +#extension GL_KHR_shader_subgroup_ballot: enable +void ballot_works(vec4 f4) { + gl_SubgroupEqMask; + gl_SubgroupGeMask; + gl_SubgroupGtMask; + gl_SubgroupLeMask; + gl_SubgroupLtMask; + subgroupBroadcast(f4, 0); + subgroupBroadcastFirst(f4); + uvec4 ballot = subgroupBallot(false); + subgroupInverseBallot(uvec4(0x1)); + subgroupBallotBitExtract(ballot, 0); + subgroupBallotBitCount(ballot); + subgroupBallotInclusiveBitCount(ballot); + subgroupBallotExclusiveBitCount(ballot); + subgroupBallotFindLSB(ballot); + subgroupBallotFindMSB(ballot); +} + +#extension GL_KHR_shader_subgroup_vote: enable +void vote_works(vec4 f4) +{ + subgroupAll(true); + subgroupAny(false); + subgroupAllEqual(f4); +} + +#extension GL_KHR_shader_subgroup_shuffle: enable +#extension GL_KHR_shader_subgroup_shuffle_relative: enable +void shuffle_works(vec4 f4) +{ + subgroupShuffle(f4, 0); + subgroupShuffleXor(f4, 0x1); + subgroupShuffleUp(f4, 1); + subgroupShuffleDown(f4, 1); +} + +#extension GL_KHR_shader_subgroup_arithmetic: enable +void arith_works(vec4 f4) +{ + uvec4 ballot; + subgroupAdd(f4); + subgroupMul(f4); + subgroupMin(f4); + subgroupMax(f4); + subgroupAnd(ballot); + subgroupOr(ballot); + subgroupXor(ballot); + subgroupInclusiveAdd(f4); + subgroupInclusiveMul(f4); + subgroupInclusiveMin(f4); + subgroupInclusiveMax(f4); + subgroupInclusiveAnd(ballot); + subgroupInclusiveOr(ballot); + subgroupInclusiveXor(ballot); + subgroupExclusiveAdd(f4); + subgroupExclusiveMul(f4); + subgroupExclusiveMin(f4); + subgroupExclusiveMax(f4); + subgroupExclusiveAnd(ballot); + subgroupExclusiveOr(ballot); + subgroupExclusiveXor(ballot); +} + +#extension GL_KHR_shader_subgroup_clustered: enable +void clustered_works(vec4 f4) +{ + uvec4 ballot = uvec4(0x55,0,0,0); + subgroupClusteredAdd(f4, 2); + subgroupClusteredMul(f4, 2); + subgroupClusteredMin(f4, 2); + subgroupClusteredMax(f4, 2); + subgroupClusteredAnd(ballot, 2); + subgroupClusteredOr(ballot, 2); + subgroupClusteredXor(ballot, 2); +} + +#extension GL_KHR_shader_subgroup_quad: enable +void quad_works(vec4 f4) +{ + subgroupQuadBroadcast(f4, 0); + subgroupQuadSwapHorizontal(f4); + subgroupQuadSwapVertical(f4); + subgroupQuadSwapDiagonal(f4); +} + diff --git a/Test/spv.ARMCoreBuiltIns.frag b/Test/spv.ARMCoreBuiltIns.frag new file mode 100644 index 0000000000..deb3e55395 --- /dev/null +++ b/Test/spv.ARMCoreBuiltIns.frag @@ -0,0 +1,8 @@ +#version 450 +#extension GL_ARM_shader_core_builtins: enable +layout(location = 0) out uvec4 data; +void main (void) +{ + uint temp = gl_WarpMaxIDARM; + data = uvec4(gl_CoreIDARM, gl_CoreCountARM, gl_CoreMaxIDARM, gl_WarpIDARM + temp); +} diff --git a/Test/spv.ARMCoreBuiltIns.vert b/Test/spv.ARMCoreBuiltIns.vert new file mode 100644 index 0000000000..2bed18e893 --- /dev/null +++ b/Test/spv.ARMCoreBuiltIns.vert @@ -0,0 +1,12 @@ +#version 450 +#extension GL_ARM_shader_core_builtins: enable +layout(set = 0, binding = 0, std430) buffer Output +{ + uvec4 result; +}; + +void main (void) +{ + uint temp = gl_WarpMaxIDARM; + result = uvec4(gl_CoreIDARM, gl_CoreCountARM, gl_CoreMaxIDARM, gl_WarpIDARM + temp); +} diff --git a/Test/spv.atomiAddEXT.error.mesh b/Test/spv.atomiAddEXT.error.mesh new file mode 100644 index 0000000000..5d4247db28 --- /dev/null +++ b/Test/spv.atomiAddEXT.error.mesh @@ -0,0 +1,22 @@ +#version 460 +#extension GL_EXT_mesh_shader : enable + +#define MAX_VER 81 +#define MAX_PRIM 32 + +layout(local_size_x = 1) in; + +layout(max_vertices=MAX_VER) out; +layout(max_primitives=MAX_PRIM) out; +layout(triangles) out; + +// use of storage qualifier "taskPayloadSharedEXT" in mesh shaders: +struct taskBlock { + int atom1; +}; +taskPayloadSharedEXT taskBlock mytask; + + +void main() { + atomicAdd(mytask.atom1, 1); +} \ No newline at end of file diff --git a/Test/spv.atomiAddEXT.task b/Test/spv.atomiAddEXT.task new file mode 100644 index 0000000000..703117dd9a --- /dev/null +++ b/Test/spv.atomiAddEXT.task @@ -0,0 +1,27 @@ +#version 460 +#extension GL_EXT_mesh_shader : enable + +layout(local_size_x = 1) in; + +struct structType{ + int y[3]; +}; + +layout(std430) buffer t2 { + structType f; +} t; + +buffer coherent Buffer { int x; }; + +// use of storage qualifier "taskPayloadSharedEXT" in mesh shaders: +struct taskBlock { + int atom1; +}; +taskPayloadSharedEXT taskBlock mytask; + + +void main() { + atomicAdd(x, 1); + atomicAdd(t.f.y[1], 1); + atomicAdd(mytask.atom1, 1); +} \ No newline at end of file diff --git a/Test/spv.atomicRvalue.error.vert b/Test/spv.atomicRvalue.error.vert new file mode 100644 index 0000000000..74b7c3bdbe --- /dev/null +++ b/Test/spv.atomicRvalue.error.vert @@ -0,0 +1,7 @@ +#version 440 + +void main() { + uint a = 5; + atomicAdd(a * 2, 0); + atomicAdd(a, 0); +} diff --git a/Test/spv.bufferhandle8.frag b/Test/spv.bufferhandle8.frag index 1bc13c3cfa..92651355c4 100644 --- a/Test/spv.bufferhandle8.frag +++ b/Test/spv.bufferhandle8.frag @@ -27,6 +27,8 @@ layout(set=0, binding=0) buffer T3 { Blah Bindings[]; } t3; + void main() { + Blah x = t3.Bindings[2]; t3.Bindings[0] = t3.Bindings[1]; } diff --git a/Test/spv.coopmatKHR.comp b/Test/spv.coopmatKHR.comp new file mode 100644 index 0000000000..3bcee7f58e --- /dev/null +++ b/Test/spv.coopmatKHR.comp @@ -0,0 +1,121 @@ +#version 450 core +#extension GL_KHR_memory_scope_semantics : enable +#extension GL_KHR_cooperative_matrix : enable +#extension GL_EXT_shader_explicit_arithmetic_types : enable +#extension GL_EXT_buffer_reference : enable + +layout (local_size_x = 64, local_size_y = 1, local_size_z = 1) in; + +const int X = 8; +layout(constant_id = 0) const int Y = 2; +const int Z = X*Y; + +coopmat mC; +coopmat mC2[3]; + +layout(constant_id = 1) const float F = 3.0; + +const coopmat mD = coopmat(0.0); +const coopmat mD2 = coopmat(1); + +struct S { int a; int b; int c; }; + +const S s = S(12, 23, 34); + +layout(set = 0, binding = 0, buffer_reference) coherent buffer Block { + float y[1024*1024]; + float x[]; +} block; + +layout(set = 0, binding = 0) coherent buffer Block16 { + float16_t y[1024*1024]; + float16_t x[]; + + Block b; +} block16; + +coopmat f16(coopmat m) { return -m; } +coopmat f32(coopmat m) { return -m; } + +layout(constant_id = 2) const int SC = 1; +coopmat scm[SC][SC]; + +// sized for coopmat +shared uvec4 shmatrix[16*16*2/16]; + +void main() +{ + coopmat1?8:4), gl_MatrixUseAccumulator> m = coopmat1?8:4), gl_MatrixUseAccumulator>(0.0); + + m = m + m; + m = m - m; + m = -m; + m = 2.0*m; + m = m*2.0; + + coopmat m2 = coopmat(m); + + float x = m[1]; + m[0] = x; + + coopMatLoad(m, block.x, 16, 128, gl_CooperativeMatrixLayoutRowMajor); + coopMatStore(m, block.x, 16, 128, gl_CooperativeMatrixLayoutRowMajor); + coopMatLoad(m2, block16.x, 16, 128, gl_CooperativeMatrixLayoutRowMajor); + coopMatStore(m2, block16.x, 16, 128, gl_CooperativeMatrixLayoutRowMajor); + coopMatLoad(m, block16.b.x, 16, 128, gl_CooperativeMatrixLayoutRowMajor); + coopMatStore(m, block16.b.x, 16, 128, gl_CooperativeMatrixLayoutRowMajor); + + coopmat A; + coopmat B; + coopmat C; + coopmat D; + D = coopMatMulAdd(A, B, C); + + int l = D.length(); + + coopmat E; + + coopmat F = coopmat(0.0); + + coopmat1?8:4), gl_MatrixUseAccumulator> a[5]; + a[3][0] = 1.0; + + float md1 = mD[1]; + + md1 += (m += m)[1234]; + + mC2[1] = mC2[2]; + + coopMatLoad(m, block.y, 16, 128, gl_CooperativeMatrixLayoutRowMajor); + coopMatStore(m, block.y, 16, 128, gl_CooperativeMatrixLayoutRowMajor); + coopMatLoad(m2, block16.y, 16, 128, gl_CooperativeMatrixLayoutRowMajor); + coopMatStore(m2, block16.y, 16, 128, gl_CooperativeMatrixLayoutRowMajor); + + coopmat p1; + coopmat p2; + + p1 = f16(p1); + p2 = f32(p2); + + p1 = coopmat(0.0); + p2 = coopmat(0.0); + + p1 /= p1; + + p1 *= float16_t(2.0); + p2 *= 4.0; + + coopmat ms; + coopMatLoad(ms, shmatrix, 1, 2, gl_CooperativeMatrixLayoutRowMajor); + coopMatStore(ms, shmatrix, 1, 2, gl_CooperativeMatrixLayoutRowMajor); + + coopmat ms8A; + coopmat ms8B; + coopmat ms8C; + coopMatMulAdd(ms8A, ms8B, ms8C); + coopMatMulAdd(ms8A, ms8B, ms8C, 0); + coopMatMulAdd(ms8A, ms8B, ms8C, gl_MatrixOperandsSaturatingAccumulation); + + coopmat m16; + coopMatStore(m16, shmatrix, 1, 2, gl_CooperativeMatrixLayoutRowMajor); +} diff --git a/Test/spv.coopmatKHR_Error.comp b/Test/spv.coopmatKHR_Error.comp new file mode 100644 index 0000000000..f2e5a52626 --- /dev/null +++ b/Test/spv.coopmatKHR_Error.comp @@ -0,0 +1,69 @@ +#version 450 core +#extension GL_KHR_memory_scope_semantics : enable +#extension GL_KHR_cooperative_matrix : enable +#extension GL_EXT_shader_explicit_arithmetic_types : enable + +layout (local_size_x = 64, local_size_y = 1, local_size_z = 1) in; + +float<16> ftemplate16; + +coopmat fnoparams; + +struct S +{ + int s; +}; + +coopmat fbadtype; +coopmat fbadtype2; +coopmat<16, gl_ScopeSubgroup, 8, 8, gl_MatrixUseA> fbadtype3; + +coopmat fbadnumparams; + +int X = 8; + +coopmat fbadparam; + +layout(constant_id = 0) const int Y = 1; + +shared coopmat sharedmat; + +layout(set = 0, binding = 0) buffer InvBlock { + coopmat bufmat; +} invblock; + +void main() +{ + coopmat f32_16_8; + coopmat f16_16_8; + + // invalid implicit conversions + f32_16_8 = f16_16_8; + f32_16_8 = f16_16_8 + f16_16_8; + + coopmat f16_8_8; + + // mismatching dimensions + f16_16_8 = f16_8_8; + + coopmat f16_8_Y; + coopmat f16_8_Y1; + + // mismatching dimensions with specialization constants + f16_8_Y = f16_8_Y1; + + // wrong arguments for constructor + f16_8_8 = coopmat(1, 1); + + // can't construct from a builtin type + mat4 m4; + coopmat f32_4_4 = coopmat(m4); + + // only support a single array subscript + f16_16_8[0][0]; + + // don't support scalar component selection + f16_16_8.x; + + transpose(f16_8_8); +} diff --git a/Test/spv.coopmatKHR_arithmetic.comp b/Test/spv.coopmatKHR_arithmetic.comp new file mode 100644 index 0000000000..611de24d89 --- /dev/null +++ b/Test/spv.coopmatKHR_arithmetic.comp @@ -0,0 +1,85 @@ +#version 450 core +#extension GL_KHR_memory_scope_semantics : enable +#extension GL_KHR_cooperative_matrix : enable +#extension GL_EXT_shader_explicit_arithmetic_types : enable + +layout (local_size_x = 64, local_size_y = 1, local_size_z = 1) in; + + +void main() +{ + coopmat f; + coopmat f2; + coopmat f3; + + coopmat f16; + + coopmat u8; + coopmat i8; + coopmat u32; + + f+f; + f-f; + f*f; + f/f; + f+=f; + f-=f; + f*=f; + f/=f; + f*2.0; + 2.0*f; + f*=2.0; + + f16+f16; + f16-f16; + f16*f16; + f16/f16; + f16+=f16; + f16-=f16; + f16*=f16; + f16/=f16; + f16*float16_t(2.0); + float16_t(2.0)*f16; + f16*=float16_t(2.0); + + u32+u32; + u32-u32; + u32*u32; + u32/u32; + u32+=u32; + u32-=u32; + u32*=u32; + u32/=u32; + u32*uint32_t(2); + uint32_t(2)*u32; + u32*=uint32_t(2); + + u8+u8; + u8-u8; + u8*u8; + u8/u8; + u8+=u8; + u8-=u8; + u8*=u8; + u8/=u8; + u8*uint8_t(2); + uint8_t(2)*u8; + u8*=uint8_t(2); + + i8+i8; + i8-i8; + i8*i8; + i8/i8; + i8+=i8; + i8-=i8; + i8*=i8; + i8/=i8; + i8*int8_t(2); + int8_t(2)*i8; + i8*=int8_t(2); + + -f; + -f16; + -i8; + -u8; +} diff --git a/Test/spv.coopmatKHR_arithmeticError.comp b/Test/spv.coopmatKHR_arithmeticError.comp new file mode 100644 index 0000000000..57381cd8e7 --- /dev/null +++ b/Test/spv.coopmatKHR_arithmeticError.comp @@ -0,0 +1,87 @@ +#version 450 core +#extension GL_KHR_memory_scope_semantics : enable +#extension GL_KHR_cooperative_matrix : enable +#extension GL_EXT_shader_explicit_arithmetic_types : enable + +layout (local_size_x = 64, local_size_y = 1, local_size_z = 1) in; + + +void main() +{ + coopmat f; + coopmat f2; + coopmat f3; + + coopmat f16; + + coopmat u8; + coopmat i8; + coopmat i32; + + f+1.0; + f-1.0; + f/1.0; + 1.0+f; + 1.0-f; + 1.0/f; + f+=1.0; + f-=1.0; + f/=1.0; + + f+f16; + f-f16; + f*f16; + f/f16; + f+=f16; + f-=f16; + f*=f16; + f/=f16; + + f+f2; + f-f2; + f*f2; + f/f2; + f+=f2; + f-=f2; + f*=f2; + f/=f2; + + f+f3; + f-f3; + f*f3; + f/f3; + f+=f3; + f-=f3; + f*=f3; + f/=f3; + + u8+i8; + u8-i8; + u8*i8; + u8/i8; + u8+=i8; + u8-=i8; + u8*=i8; + u8/=i8; + + u8+uint8_t(1); + u8-uint8_t(1); + u8/uint8_t(1); + u8+=uint8_t(1); + u8-=uint8_t(1); + u8/=uint8_t(1); + + i8+int8_t(1); + i8-int8_t(1); + i8/int8_t(1); + i8+=int8_t(1); + i8-=int8_t(1); + i8/=int8_t(1); + + i32+1; + i32-1; + i32/1; + i32+=1; + i32-=1; + i32/=1; +} diff --git a/Test/spv.coopmatKHR_constructor.comp b/Test/spv.coopmatKHR_constructor.comp new file mode 100644 index 0000000000..b0f19bea65 --- /dev/null +++ b/Test/spv.coopmatKHR_constructor.comp @@ -0,0 +1,49 @@ +#version 450 core +#extension GL_KHR_memory_scope_semantics : enable +#extension GL_KHR_cooperative_matrix : enable +#extension GL_EXT_shader_explicit_arithmetic_types : enable + +layout (local_size_x = 64, local_size_y = 1, local_size_z = 1) in; + + +void main() +{ + +#define TESTCONST(T, BASE) \ + coopmat(coopmat(BASE+1.0)); \ + coopmat(coopmat(BASE+2.0)); \ + coopmat(coopmat(BASE+3)); \ + coopmat(coopmat(BASE+4)); \ + coopmat(coopmat(BASE+5)); \ + coopmat(coopmat(BASE+6)); \ + coopmat(coopmat(BASE+7)); \ + coopmat(coopmat(BASE+8)); + + TESTCONST(float, 0) + TESTCONST(float16_t, 10) + TESTCONST(uint32_t, 20) + TESTCONST(uint16_t, 30) + TESTCONST(uint8_t, 40) + TESTCONST(int32_t, 50) + TESTCONST(int16_t, 60) + TESTCONST(int8_t, 70) + +#define TESTVAR(T, BASE) \ + { coopmat v = coopmat(BASE+1.0); coopmat(v); } \ + { coopmat v = coopmat(BASE+2.0); coopmat(v); } \ + { coopmat v = coopmat(BASE+3); coopmat(v); } \ + { coopmat v = coopmat(BASE+4); coopmat(v); } \ + { coopmat v = coopmat(BASE+5); coopmat(v); } \ + { coopmat v = coopmat(BASE+6); coopmat(v); } \ + { coopmat v = coopmat(BASE+7); coopmat(v); } \ + { coopmat v = coopmat(BASE+8); coopmat(v); } + + TESTVAR(float, 100) + TESTVAR(float16_t, 110) + TESTVAR(uint32_t, 120) + TESTVAR(uint16_t, 130) + TESTVAR(uint8_t, 140) + TESTVAR(int32_t, 150) + TESTVAR(int16_t, 160) + TESTVAR(int8_t, 170) +} diff --git a/Test/spv.coopmatKHR_constructorError.comp b/Test/spv.coopmatKHR_constructorError.comp new file mode 100644 index 0000000000..7f00eb16a9 --- /dev/null +++ b/Test/spv.coopmatKHR_constructorError.comp @@ -0,0 +1,16 @@ +#version 450 core +#extension GL_KHR_memory_scope_semantics : enable +#extension GL_KHR_cooperative_matrix : enable +#extension GL_EXT_shader_explicit_arithmetic_types : enable + +layout (local_size_x = 64, local_size_y = 1, local_size_z = 1) in; + + +void main() +{ + // Test each kind of shape mismatch + coopmat(coopmat(0.0)); + coopmat(coopmat(0.0)); + coopmat(coopmat(0.0)); + coopmat(coopmat(0.0)); +} diff --git a/Test/spv.debugInfo.frag b/Test/spv.debugInfo.frag index 3b6cd27fea..31b63341df 100644 --- a/Test/spv.debugInfo.frag +++ b/Test/spv.debugInfo.frag @@ -25,9 +25,40 @@ vec4 foo(S s) return r; } +float testBranch(float x, float y) +{ + float result = 0; + bool b = x > 0; + + // branch with load + if (b) { + result += 1; + } + else { + result -= 1; + } + + // branch with expression + if (x > y) { + result += x - y; + } + + // selection with load + result += b ? + 1 : -1; + + // selection with expression + result += x < y ? + y : + float(b); + + return result; +} + void main() { outv = foo(s); + outv += testBranch(inv.x, inv.y); outv += texture(s2d, vec2(0.5)); switch (s.a) { diff --git a/Test/spv.debuginfo.bufferref.glsl.frag b/Test/spv.debuginfo.bufferref.glsl.frag new file mode 100644 index 0000000000..c2002fa2ce --- /dev/null +++ b/Test/spv.debuginfo.bufferref.glsl.frag @@ -0,0 +1,28 @@ +#version 450 core +#extension GL_EXT_buffer_reference : enable + +layout(buffer_reference, std430) buffer MeshVertexPositions { + float data[]; +}; + +struct Mesh { + MeshVertexPositions positions; +}; + +layout(set = 0, binding = 0) readonly buffer PerPass_meshes { + Mesh data[]; +} perPass_meshes; + +layout(location = 0) out vec4 out_fragColor; + +layout(location = 0) in flat uint tri_idx0; + +void main() { + Mesh meshData = perPass_meshes.data[tri_idx0]; + + vec3 vertex_pos0 = vec3(meshData.positions.data[3 * tri_idx0], + meshData.positions.data[3 * tri_idx0 + 1], + meshData.positions.data[3 * tri_idx0 + 2]); + + out_fragColor = vec4(vertex_pos0, 1.0); +} diff --git a/Test/spv.debuginfo.const_params.glsl.comp b/Test/spv.debuginfo.const_params.glsl.comp new file mode 100644 index 0000000000..112628fe5e --- /dev/null +++ b/Test/spv.debuginfo.const_params.glsl.comp @@ -0,0 +1,14 @@ +#version 450 + +void function( + const float f, + const vec2 f2, + const vec3 f3, + const vec4 f4) +{ +} + +void main() +{ + function(0, vec2(0), vec3(0), vec4(0)); +} diff --git a/Test/spv.debuginfo.glsl.comp b/Test/spv.debuginfo.glsl.comp new file mode 100644 index 0000000000..c37d05d723 --- /dev/null +++ b/Test/spv.debuginfo.glsl.comp @@ -0,0 +1,177 @@ +/* +The MIT License (MIT) + +Copyright (c) 2022 Sascha Willems + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. +*/ + +#version 450 + +struct Particle { + vec4 pos; + vec4 vel; + vec4 uv; + vec4 normal; + float pinned; +}; + +layout(std430, binding = 0) buffer ParticleIn { + Particle particleIn[ ]; +}; + +layout(std430, binding = 1) buffer ParticleOut { + Particle particleOut[ ]; +}; + +// todo: use shared memory to speed up calculation + +layout (local_size_x = 10, local_size_y = 10) in; + +layout (binding = 2) uniform UBO +{ + float deltaT; + float particleMass; + float springStiffness; + float damping; + float restDistH; + float restDistV; + float restDistD; + float sphereRadius; + vec4 spherePos; + vec4 gravity; + ivec2 particleCount; +} params; + +layout (push_constant) uniform PushConsts { + uint calculateNormals; +} pushConsts; + +vec3 springForce(vec3 p0, vec3 p1, float restDist) +{ + vec3 dist = p0 - p1; + return normalize(dist) * params.springStiffness * (length(dist) - restDist); +} + +void main() +{ + uvec3 id = gl_GlobalInvocationID; + + uint index = id.y * params.particleCount.x + id.x; + if (index > params.particleCount.x * params.particleCount.y) + return; + + // Pinned? + if (particleIn[index].pinned == 1.0) { + particleOut[index].pos = particleOut[index].pos; + particleOut[index].vel = vec4(0.0); + return; + } + + // Initial force from gravity + vec3 force = params.gravity.xyz * params.particleMass; + + vec3 pos = particleIn[index].pos.xyz; + vec3 vel = particleIn[index].vel.xyz; + + // Spring forces from neighboring particles + // left + if (id.x > 0) { + force += springForce(particleIn[index-1].pos.xyz, pos, params.restDistH); + } + // right + if (id.x < params.particleCount.x - 1) { + force += springForce(particleIn[index + 1].pos.xyz, pos, params.restDistH); + } + // upper + if (id.y < params.particleCount.y - 1) { + force += springForce(particleIn[index + params.particleCount.x].pos.xyz, pos, params.restDistV); + } + // lower + if (id.y > 0) { + force += springForce(particleIn[index - params.particleCount.x].pos.xyz, pos, params.restDistV); + } + // upper-left + if ((id.x > 0) && (id.y < params.particleCount.y - 1)) { + force += springForce(particleIn[index + params.particleCount.x - 1].pos.xyz, pos, params.restDistD); + } + // lower-left + if ((id.x > 0) && (id.y > 0)) { + force += springForce(particleIn[index - params.particleCount.x - 1].pos.xyz, pos, params.restDistD); + } + // upper-right + if ((id.x < params.particleCount.x - 1) && (id.y < params.particleCount.y - 1)) { + force += springForce(particleIn[index + params.particleCount.x + 1].pos.xyz, pos, params.restDistD); + } + // lower-right + if ((id.x < params.particleCount.x - 1) && (id.y > 0)) { + force += springForce(particleIn[index - params.particleCount.x + 1].pos.xyz, pos, params.restDistD); + } + + force += (-params.damping * vel); + + // Integrate + vec3 f = force * (1.0 / params.particleMass); + particleOut[index].pos = vec4(pos + vel * params.deltaT + 0.5 * f * params.deltaT * params.deltaT, 1.0); + particleOut[index].vel = vec4(vel + f * params.deltaT, 0.0); + + // Sphere collision + vec3 sphereDist = particleOut[index].pos.xyz - params.spherePos.xyz; + if (length(sphereDist) < params.sphereRadius + 0.01) { + // If the particle is inside the sphere, push it to the outer radius + particleOut[index].pos.xyz = params.spherePos.xyz + normalize(sphereDist) * (params.sphereRadius + 0.01); + // Cancel out velocity + particleOut[index].vel = vec4(0.0); + } + + // Normals + if (pushConsts.calculateNormals == 1) { + vec3 normal = vec3(0.0); + vec3 a, b, c; + if (id.y > 0) { + if (id.x > 0) { + a = particleIn[index - 1].pos.xyz - pos; + b = particleIn[index - params.particleCount.x - 1].pos.xyz - pos; + c = particleIn[index - params.particleCount.x].pos.xyz - pos; + normal += cross(a,b) + cross(b,c); + } + if (id.x < params.particleCount.x - 1) { + a = particleIn[index - params.particleCount.x].pos.xyz - pos; + b = particleIn[index - params.particleCount.x + 1].pos.xyz - pos; + c = particleIn[index + 1].pos.xyz - pos; + normal += cross(a,b) + cross(b,c); + } + } + if (id.y < params.particleCount.y - 1) { + if (id.x > 0) { + a = particleIn[index + params.particleCount.x].pos.xyz - pos; + b = particleIn[index + params.particleCount.x - 1].pos.xyz - pos; + c = particleIn[index - 1].pos.xyz - pos; + normal += cross(a,b) + cross(b,c); + } + if (id.x < params.particleCount.x - 1) { + a = particleIn[index + 1].pos.xyz - pos; + b = particleIn[index + params.particleCount.x + 1].pos.xyz - pos; + c = particleIn[index + params.particleCount.x].pos.xyz - pos; + normal += cross(a,b) + cross(b,c); + } + } + particleOut[index].normal = vec4(normalize(normal), 0.0f); + } +} diff --git a/Test/spv.debuginfo.glsl.frag b/Test/spv.debuginfo.glsl.frag new file mode 100644 index 0000000000..86316af2ae --- /dev/null +++ b/Test/spv.debuginfo.glsl.frag @@ -0,0 +1,194 @@ +/* +The MIT License (MIT) + +Copyright (c) 2022 Sascha Willems + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. +*/ + +#version 450 + +layout (binding = 1) uniform sampler2D samplerposition; +layout (binding = 2) uniform sampler2D samplerNormal; +layout (binding = 3) uniform sampler2D samplerAlbedo; +layout (binding = 5) uniform sampler2DArray samplerShadowMap; + +layout (location = 0) in vec2 inUV; + +layout (location = 0) out vec4 outFragColor; + +#define LIGHT_COUNT 3 +#define SHADOW_FACTOR 0.25 +#define AMBIENT_LIGHT 0.1 +#define USE_PCF + +int global_var = 0; + +struct Light +{ + vec4 position; + vec4 target; + vec4 color; + mat4 viewMatrix; +}; + +layout (binding = 4) uniform UBO +{ + vec4 viewPos; + Light lights[LIGHT_COUNT]; + int useShadows; + int debugDisplayTarget; +} ubo; + +float textureProj(vec4 P, float layer, vec2 offset) +{ + float shadow = 1.0; + vec4 shadowCoord = P / P.w; + shadowCoord.st = shadowCoord.st * 0.5 + 0.5; + + if (shadowCoord.z > -1.0 && shadowCoord.z < 1.0) + { + float dist = texture(samplerShadowMap, vec3(shadowCoord.st + offset, layer)).r; + if (shadowCoord.w > 0.0 && dist < shadowCoord.z) + { + shadow = SHADOW_FACTOR; + } + } + return shadow; +} + +float filterPCF(vec4 sc, float layer) +{ + ivec2 texDim = textureSize(samplerShadowMap, 0).xy; + float scale = 1.5; + float dx = scale * 1.0 / float(texDim.x); + float dy = scale * 1.0 / float(texDim.y); + + float shadowFactor = 0.0; + int count = 0; + int range = 1; + + for (int x = -range; x <= range; x++) + { + for (int y = -range; y <= range; y++) + { + shadowFactor += textureProj(sc, layer, vec2(dx*x, dy*y)); + count++; + } + + } + return shadowFactor / count; +} + +vec3 shadow(vec3 fragcolor, vec3 fragpos) { + for(int i = 0; i < LIGHT_COUNT; ++i) + { + vec4 shadowClip = ubo.lights[i].viewMatrix * vec4(fragpos, 1.0); + + float shadowFactor; + #ifdef USE_PCF + shadowFactor= filterPCF(shadowClip, i); + #else + shadowFactor = textureProj(shadowClip, i, vec2(0.0)); + #endif + + fragcolor *= shadowFactor; + } + return fragcolor; +} + +void main() +{ + // Get G-Buffer values + vec3 fragPos = texture(samplerposition, inUV).rgb; + vec3 normal = texture(samplerNormal, inUV).rgb; + vec4 albedo = texture(samplerAlbedo, inUV); + + // Debug display + if (ubo.debugDisplayTarget > 0) { + switch (ubo.debugDisplayTarget) { + case 1: + outFragColor.rgb = shadow(vec3(1.0), fragPos).rgb; + break; + case 2: + outFragColor.rgb = fragPos; + break; + case 3: + outFragColor.rgb = normal; + break; + case 4: + outFragColor.rgb = albedo.rgb; + break; + case 5: + outFragColor.rgb = albedo.aaa; + break; + } + outFragColor.a = 1.0; + return; + } + + // Ambient part + vec3 fragcolor = albedo.rgb * AMBIENT_LIGHT; + + vec3 N = normalize(normal); + + for(int i = 0; i < LIGHT_COUNT; ++i) + { + // Vector to light + vec3 L = ubo.lights[i].position.xyz - fragPos; + // Distance from light to fragment position + float dist = length(L); + L = normalize(L); + + // Viewer to fragment + vec3 V = ubo.viewPos.xyz - fragPos; + V = normalize(V); + + float lightCosInnerAngle = cos(radians(15.0)); + float lightCosOuterAngle = cos(radians(25.0)); + float lightRange = 100.0; + + // Direction vector from source to target + vec3 dir = normalize(ubo.lights[i].position.xyz - ubo.lights[i].target.xyz); + + // Dual cone spot light with smooth transition between inner and outer angle + float cosDir = dot(L, dir); + float spotEffect = smoothstep(lightCosOuterAngle, lightCosInnerAngle, cosDir); + float heightAttenuation = smoothstep(lightRange, 0.0f, dist); + + // Diffuse lighting + float NdotL = max(0.0, dot(N, L)); + vec3 diff = vec3(NdotL); + + // Specular lighting + vec3 R = reflect(-L, N); + float NdotR = max(0.0, dot(R, V)); + vec3 spec = vec3(pow(NdotR, 16.0) * albedo.a * 2.5); + + fragcolor += vec3((diff + spec) * spotEffect * heightAttenuation) * ubo.lights[i].color.rgb * albedo.rgb; + } + + // Shadow calculations in a separate pass + if (ubo.useShadows > 0) + { + fragcolor = shadow(fragcolor, fragPos); + } + + outFragColor = vec4(fragcolor, 1.0); +} diff --git a/Test/spv.debuginfo.glsl.geom b/Test/spv.debuginfo.glsl.geom new file mode 100644 index 0000000000..756885f676 --- /dev/null +++ b/Test/spv.debuginfo.glsl.geom @@ -0,0 +1,69 @@ +/* +The MIT License (MIT) + +Copyright (c) 2022 Sascha Willems + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. +*/ + +#version 450 + +#extension GL_ARB_viewport_array : enable + +layout (triangles, invocations = 2) in; +layout (triangle_strip, max_vertices = 3) out; + +layout (binding = 0) uniform UBO +{ + mat4 projection[2]; + mat4 modelview[2]; + vec4 lightPos; +} ubo; + +layout (location = 0) in vec3 inNormal[]; +layout (location = 1) in vec3 inColor[]; + +layout (location = 0) out vec3 outNormal; +layout (location = 1) out vec3 outColor; +layout (location = 2) out vec3 outViewVec; +layout (location = 3) out vec3 outLightVec; + +void main(void) +{ + for(int i = 0; i < gl_in.length(); i++) + { + outNormal = mat3(ubo.modelview[gl_InvocationID]) * inNormal[i]; + outColor = inColor[i]; + + vec4 pos = gl_in[i].gl_Position; + vec4 worldPos = (ubo.modelview[gl_InvocationID] * pos); + + vec3 lPos = vec3(ubo.modelview[gl_InvocationID] * ubo.lightPos); + outLightVec = lPos - worldPos.xyz; + outViewVec = -worldPos.xyz; + + gl_Position = ubo.projection[gl_InvocationID] * worldPos; + + // Set the viewport index that the vertex will be emitted to + gl_ViewportIndex = gl_InvocationID; + gl_PrimitiveID = gl_PrimitiveIDIn; + EmitVertex(); + } + EndPrimitive(); +} diff --git a/Test/spv.debuginfo.glsl.tesc b/Test/spv.debuginfo.glsl.tesc new file mode 100644 index 0000000000..41c8fe3adc --- /dev/null +++ b/Test/spv.debuginfo.glsl.tesc @@ -0,0 +1,140 @@ +/* +The MIT License (MIT) + +Copyright (c) 2022 Sascha Willems + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. +*/ + +#version 450 + +layout(set = 0, binding = 0) uniform UBO +{ + mat4 projection; + mat4 modelview; + vec4 lightPos; + vec4 frustumPlanes[6]; + float displacementFactor; + float tessellationFactor; + vec2 viewportDim; + float tessellatedEdgeSize; +} ubo; + +layout(set = 0, binding = 1) uniform sampler2D samplerHeight; + +layout (vertices = 4) out; + +layout (location = 0) in vec3 inNormal[]; +layout (location = 1) in vec2 inUV[]; + +layout (location = 0) out vec3 outNormal[4]; +layout (location = 1) out vec2 outUV[4]; + +// Calculate the tessellation factor based on screen space +// dimensions of the edge +float screenSpaceTessFactor(vec4 p0, vec4 p1) +{ + // Calculate edge mid point + vec4 midPoint = 0.5 * (p0 + p1); + // Sphere radius as distance between the control points + float radius = distance(p0, p1) / 2.0; + + // View space + vec4 v0 = ubo.modelview * midPoint; + + // Project into clip space + vec4 clip0 = (ubo.projection * (v0 - vec4(radius, vec3(0.0)))); + vec4 clip1 = (ubo.projection * (v0 + vec4(radius, vec3(0.0)))); + + // Get normalized device coordinates + clip0 /= clip0.w; + clip1 /= clip1.w; + + // Convert to viewport coordinates + clip0.xy *= ubo.viewportDim; + clip1.xy *= ubo.viewportDim; + + // Return the tessellation factor based on the screen size + // given by the distance of the two edge control points in screen space + // and a reference (min.) tessellation size for the edge set by the application + return clamp(distance(clip0, clip1) / ubo.tessellatedEdgeSize * ubo.tessellationFactor, 1.0, 64.0); +} + +// Checks the current's patch visibility against the frustum using a sphere check +// Sphere radius is given by the patch size +bool frustumCheck() +{ + // Fixed radius (increase if patch size is increased in example) + const float radius = 8.0f; + vec4 pos = gl_in[gl_InvocationID].gl_Position; + pos.y -= textureLod(samplerHeight, inUV[0], 0.0).r * ubo.displacementFactor; + + // Check sphere against frustum planes + for (int i = 0; i < 6; i++) { + if (dot(pos, ubo.frustumPlanes[i]) + radius < 0.0) + { + return false; + } + } + return true; +} + +void main() +{ + if (gl_InvocationID == 0) + { + if (!frustumCheck()) + { + gl_TessLevelInner[0] = 0.0; + gl_TessLevelInner[1] = 0.0; + gl_TessLevelOuter[0] = 0.0; + gl_TessLevelOuter[1] = 0.0; + gl_TessLevelOuter[2] = 0.0; + gl_TessLevelOuter[3] = 0.0; + } + else + { + if (ubo.tessellationFactor > 0.0) + { + gl_TessLevelOuter[0] = screenSpaceTessFactor(gl_in[3].gl_Position, gl_in[0].gl_Position); + gl_TessLevelOuter[1] = screenSpaceTessFactor(gl_in[0].gl_Position, gl_in[1].gl_Position); + gl_TessLevelOuter[2] = screenSpaceTessFactor(gl_in[1].gl_Position, gl_in[2].gl_Position); + gl_TessLevelOuter[3] = screenSpaceTessFactor(gl_in[2].gl_Position, gl_in[3].gl_Position); + gl_TessLevelInner[0] = mix(gl_TessLevelOuter[0], gl_TessLevelOuter[3], 0.5); + gl_TessLevelInner[1] = mix(gl_TessLevelOuter[2], gl_TessLevelOuter[1], 0.5); + } + else + { + // Tessellation factor can be set to zero by example + // to demonstrate a simple passthrough + gl_TessLevelInner[0] = 1.0; + gl_TessLevelInner[1] = 1.0; + gl_TessLevelOuter[0] = 1.0; + gl_TessLevelOuter[1] = 1.0; + gl_TessLevelOuter[2] = 1.0; + gl_TessLevelOuter[3] = 1.0; + } + } + + } + + gl_out[gl_InvocationID].gl_Position = gl_in[gl_InvocationID].gl_Position; + outNormal[gl_InvocationID] = inNormal[gl_InvocationID]; + outUV[gl_InvocationID] = inUV[gl_InvocationID]; +} diff --git a/Test/spv.debuginfo.glsl.tese b/Test/spv.debuginfo.glsl.tese new file mode 100644 index 0000000000..f24ed949c4 --- /dev/null +++ b/Test/spv.debuginfo.glsl.tese @@ -0,0 +1,78 @@ +/* +The MIT License (MIT) + +Copyright (c) 2022 Sascha Willems + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. +*/ + +#version 450 + +layout (set = 0, binding = 0) uniform UBO +{ + mat4 projection; + mat4 modelview; + vec4 lightPos; + vec4 frustumPlanes[6]; + float displacementFactor; + float tessellationFactor; + vec2 viewportDim; + float tessellatedEdgeSize; +} ubo; + +layout (set = 0, binding = 1) uniform sampler2D displacementMap; + +layout(quads, equal_spacing, cw) in; + +layout (location = 0) in vec3 inNormal[]; +layout (location = 1) in vec2 inUV[]; + +layout (location = 0) out vec3 outNormal; +layout (location = 1) out vec2 outUV; +layout (location = 2) out vec3 outViewVec; +layout (location = 3) out vec3 outLightVec; +layout (location = 4) out vec3 outEyePos; +layout (location = 5) out vec3 outWorldPos; + +void main() +{ + // Interpolate UV coordinates + vec2 uv1 = mix(inUV[0], inUV[1], gl_TessCoord.x); + vec2 uv2 = mix(inUV[3], inUV[2], gl_TessCoord.x); + outUV = mix(uv1, uv2, gl_TessCoord.y); + + vec3 n1 = mix(inNormal[0], inNormal[1], gl_TessCoord.x); + vec3 n2 = mix(inNormal[3], inNormal[2], gl_TessCoord.x); + outNormal = mix(n1, n2, gl_TessCoord.y); + + // Interpolate positions + vec4 pos1 = mix(gl_in[0].gl_Position, gl_in[1].gl_Position, gl_TessCoord.x); + vec4 pos2 = mix(gl_in[3].gl_Position, gl_in[2].gl_Position, gl_TessCoord.x); + vec4 pos = mix(pos1, pos2, gl_TessCoord.y); + // Displace + pos.y -= textureLod(displacementMap, outUV, 0.0).r * ubo.displacementFactor; + // Perspective projection + gl_Position = ubo.projection * ubo.modelview * pos; + + // Calculate vectors for lighting based on tessellated position + outViewVec = -pos.xyz; + outLightVec = normalize(ubo.lightPos.xyz + outViewVec); + outWorldPos = pos.xyz; + outEyePos = vec3(ubo.modelview * pos); +} diff --git a/Test/spv.debuginfo.glsl.vert b/Test/spv.debuginfo.glsl.vert new file mode 100644 index 0000000000..d922d95799 --- /dev/null +++ b/Test/spv.debuginfo.glsl.vert @@ -0,0 +1,105 @@ +/* +The MIT License (MIT) + +Copyright (c) 2022 Sascha Willems + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. +*/ + +#version 450 + +// Vertex attributes +layout (location = 0) in vec3 inPos; +layout (location = 1) in vec3 inNormal; +layout (location = 2) in vec2 inUV; +layout (location = 3) in vec3 inColor; + +// Instanced attributes +layout (location = 4) in vec3 instancePos; +layout (location = 5) in vec3 instanceRot; +layout (location = 6) in float instanceScale; +layout (location = 7) in int instanceTexIndex; + +layout (binding = 0) uniform UBO +{ + mat4 projection; + mat4 modelview; + vec4 lightPos; + float locSpeed; + float globSpeed; +} ubo; + +layout (location = 0) out vec3 outNormal; +layout (location = 1) out vec3 outColor; +layout (location = 2) out vec3 outUV; +layout (location = 3) out vec3 outViewVec; +layout (location = 4) out vec3 outLightVec; + +void main() +{ + outColor = inColor; + outUV = vec3(inUV, instanceTexIndex); + + mat3 mx, my, mz; + + // rotate around x + float s = sin(instanceRot.x + ubo.locSpeed); + float c = cos(instanceRot.x + ubo.locSpeed); + + mx[0] = vec3(c, s, 0.0); + mx[1] = vec3(-s, c, 0.0); + mx[2] = vec3(0.0, 0.0, 1.0); + + // rotate around y + s = sin(instanceRot.y + ubo.locSpeed); + c = cos(instanceRot.y + ubo.locSpeed); + + my[0] = vec3(c, 0.0, s); + my[1] = vec3(0.0, 1.0, 0.0); + my[2] = vec3(-s, 0.0, c); + + // rot around z + s = sin(instanceRot.z + ubo.locSpeed); + c = cos(instanceRot.z + ubo.locSpeed); + + mz[0] = vec3(1.0, 0.0, 0.0); + mz[1] = vec3(0.0, c, s); + mz[2] = vec3(0.0, -s, c); + + mat3 rotMat = mz * my * mx; + + mat4 gRotMat; + s = sin(instanceRot.y + ubo.globSpeed); + c = cos(instanceRot.y + ubo.globSpeed); + gRotMat[0] = vec4(c, 0.0, s, 0.0); + gRotMat[1] = vec4(0.0, 1.0, 0.0, 0.0); + gRotMat[2] = vec4(-s, 0.0, c, 0.0); + gRotMat[3] = vec4(0.0, 0.0, 0.0, 1.0); + + vec4 locPos = vec4(inPos.xyz * rotMat, 1.0); + vec4 pos = vec4((locPos.xyz * instanceScale) + instancePos, 1.0); + + gl_Position = ubo.projection * ubo.modelview * gRotMat * pos; + outNormal = mat3(ubo.modelview * gRotMat) * inverse(rotMat) * inNormal; + + pos = ubo.modelview * vec4(inPos.xyz + instancePos, 1.0); + vec3 lPos = mat3(ubo.modelview) * ubo.lightPos.xyz; + outLightVec = lPos - pos.xyz; + outViewVec = -pos.xyz; +} diff --git a/Test/spv.debuginfo.hlsl.comp b/Test/spv.debuginfo.hlsl.comp new file mode 100644 index 0000000000..b700534e04 --- /dev/null +++ b/Test/spv.debuginfo.hlsl.comp @@ -0,0 +1,184 @@ +/* +The MIT License (MIT) + +Copyright (c) 2022 Google LLC +Copyright (c) 2022 Sascha Willems + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. +*/ + +struct Particle { + float4 pos; + float4 vel; + float4 uv; + float4 normal; + float pinned; +}; + +[[vk::binding(0)]] +StructuredBuffer particleIn; +[[vk::binding(1)]] +RWStructuredBuffer particleOut; + +struct UBO +{ + float deltaT; + float particleMass; + float springStiffness; + float damping; + float restDistH; + float restDistV; + float restDistD; + float sphereRadius; + float4 spherePos; + float4 gravity; + int2 particleCount; +}; + +cbuffer ubo : register(b2) +{ + UBO params; +}; + +#ifdef GLSLANG +layout ( push_constant ) cbuffer PushConstants +{ + uint calculateNormals; +} pushConstants; +#else +struct PushConstants +{ + uint calculateNormals; +}; + +[[vk::push_constant]] +PushConstants pushConstants; +#endif + +float3 springForce(float3 p0, float3 p1, float restDist) +{ + float3 dist = p0 - p1; + return normalize(dist) * params.springStiffness * (length(dist) - restDist); +} + +[numthreads(10, 10, 1)] +void main(uint3 id : SV_DispatchThreadID) +{ + uint index = id.y * params.particleCount.x + id.x; + if (index > params.particleCount.x * params.particleCount.y) + return; + + // Pinned? + if (particleIn[index].pinned == 1.0) { + particleOut[index].pos = particleOut[index].pos; + particleOut[index].vel = float4(0, 0, 0, 0); + return; + } + + // Initial force from gravity + float3 force = params.gravity.xyz * params.particleMass; + + float3 pos = particleIn[index].pos.xyz; + float3 vel = particleIn[index].vel.xyz; + + // Spring forces from neighboring particles + // left + if (id.x > 0) { + force += springForce(particleIn[index-1].pos.xyz, pos, params.restDistH); + } + // right + if (id.x < params.particleCount.x - 1) { + force += springForce(particleIn[index + 1].pos.xyz, pos, params.restDistH); + } + // upper + if (id.y < params.particleCount.y - 1) { + force += springForce(particleIn[index + params.particleCount.x].pos.xyz, pos, params.restDistV); + } + // lower + if (id.y > 0) { + force += springForce(particleIn[index - params.particleCount.x].pos.xyz, pos, params.restDistV); + } + // upper-left + if ((id.x > 0) && (id.y < params.particleCount.y - 1)) { + force += springForce(particleIn[index + params.particleCount.x - 1].pos.xyz, pos, params.restDistD); + } + // lower-left + if ((id.x > 0) && (id.y > 0)) { + force += springForce(particleIn[index - params.particleCount.x - 1].pos.xyz, pos, params.restDistD); + } + // upper-right + if ((id.x < params.particleCount.x - 1) && (id.y < params.particleCount.y - 1)) { + force += springForce(particleIn[index + params.particleCount.x + 1].pos.xyz, pos, params.restDistD); + } + // lower-right + if ((id.x < params.particleCount.x - 1) && (id.y > 0)) { + force += springForce(particleIn[index - params.particleCount.x + 1].pos.xyz, pos, params.restDistD); + } + + force += (-params.damping * vel); + + // Integrate + float3 f = force * (1.0 / params.particleMass); + particleOut[index].pos = float4(pos + vel * params.deltaT + 0.5 * f * params.deltaT * params.deltaT, 1.0); + particleOut[index].vel = float4(vel + f * params.deltaT, 0.0); + + // Sphere collision + float3 sphereDist = particleOut[index].pos.xyz - params.spherePos.xyz; + if (length(sphereDist) < params.sphereRadius + 0.01) { + // If the particle is inside the sphere, push it to the outer radius + particleOut[index].pos.xyz = params.spherePos.xyz + normalize(sphereDist) * (params.sphereRadius + 0.01); + // Cancel out velocity + particleOut[index].vel = float4(0, 0, 0, 0); + } + + // Normals + if (pushConstants.calculateNormals == 1) { + float3 normal = float3(0, 0, 0); + float3 a, b, c; + if (id.y > 0) { + if (id.x > 0) { + a = particleIn[index - 1].pos.xyz - pos; + b = particleIn[index - params.particleCount.x - 1].pos.xyz - pos; + c = particleIn[index - params.particleCount.x].pos.xyz - pos; + normal += cross(a,b) + cross(b,c); + } + if (id.x < params.particleCount.x - 1) { + a = particleIn[index - params.particleCount.x].pos.xyz - pos; + b = particleIn[index - params.particleCount.x + 1].pos.xyz - pos; + c = particleIn[index + 1].pos.xyz - pos; + normal += cross(a,b) + cross(b,c); + } + } + if (id.y < params.particleCount.y - 1) { + if (id.x > 0) { + a = particleIn[index + params.particleCount.x].pos.xyz - pos; + b = particleIn[index + params.particleCount.x - 1].pos.xyz - pos; + c = particleIn[index - 1].pos.xyz - pos; + normal += cross(a,b) + cross(b,c); + } + if (id.x < params.particleCount.x - 1) { + a = particleIn[index + 1].pos.xyz - pos; + b = particleIn[index + params.particleCount.x + 1].pos.xyz - pos; + c = particleIn[index + params.particleCount.x].pos.xyz - pos; + normal += cross(a,b) + cross(b,c); + } + } + particleOut[index].normal = float4(normalize(normal), 0.0f); + } +} diff --git a/Test/spv.debuginfo.hlsl.frag b/Test/spv.debuginfo.hlsl.frag new file mode 100644 index 0000000000..93072d4b19 --- /dev/null +++ b/Test/spv.debuginfo.hlsl.frag @@ -0,0 +1,197 @@ +/* +The MIT License (MIT) + +Copyright (c) 2022 Google LLC +Copyright (c) 2022 Sascha Willems + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. +*/ + +Texture2D textureposition : register(t1); +SamplerState samplerposition : register(s1); +Texture2D textureNormal : register(t2); +SamplerState samplerNormal : register(s2); +Texture2D textureAlbedo : register(t3); +SamplerState samplerAlbedo : register(s3); +// Depth from the light's point of view +//layout (binding = 5) uniform sampler2DShadow samplerShadowMap; +Texture2DArray textureShadowMap : register(t5); +SamplerState samplerShadowMap : register(s5); + +#define LIGHT_COUNT 3 +#define SHADOW_FACTOR 0.25 +#define AMBIENT_LIGHT 0.1 +#define USE_PCF + +struct Light +{ + float4 position; + float4 target; + float4 color; + float4x4 viewMatrix; +}; + +struct UBO +{ + float4 viewPos; + Light lights[LIGHT_COUNT]; + int useShadows; + int displayDebugTarget; +}; + +cbuffer ubo : register(b4) { UBO ubo; } + +float textureProj(float4 P, float layer, float2 offset) +{ + float shadow = 1.0; + float4 shadowCoord = P / P.w; + shadowCoord.xy = shadowCoord.xy * 0.5 + 0.5; + + if (shadowCoord.z > -1.0 && shadowCoord.z < 1.0) + { + float dist = textureShadowMap.Sample(samplerShadowMap, float3(shadowCoord.xy + offset, layer)).r; + if (shadowCoord.w > 0.0 && dist < shadowCoord.z) + { + shadow = SHADOW_FACTOR; + } + } + return shadow; +} + +float filterPCF(float4 sc, float layer) +{ + int2 texDim; int elements; int levels; + textureShadowMap.GetDimensions(0, texDim.x, texDim.y, elements, levels); + float scale = 1.5; + float dx = scale * 1.0 / float(texDim.x); + float dy = scale * 1.0 / float(texDim.y); + + float shadowFactor = 0.0; + int count = 0; + int range = 1; + + for (int x = -range; x <= range; x++) + { + for (int y = -range; y <= range; y++) + { + shadowFactor += textureProj(sc, layer, float2(dx*x, dy*y)); + count++; + } + + } + return shadowFactor / count; +} + +float3 shadow(float3 fragcolor, float3 fragPos) { + for (int i = 0; i < LIGHT_COUNT; ++i) + { + float4 shadowClip = mul(ubo.lights[i].viewMatrix, float4(fragPos.xyz, 1.0)); + + float shadowFactor; + #ifdef USE_PCF + shadowFactor= filterPCF(shadowClip, i); + #else + shadowFactor = textureProj(shadowClip, i, float2(0.0, 0.0)); + #endif + + fragcolor *= shadowFactor; + } + return fragcolor; +} + +float4 main([[vk::location(0)]] float2 inUV : TEXCOORD0) : SV_TARGET +{ + // Get G-Buffer values + float3 fragPos = textureposition.Sample(samplerposition, inUV).rgb; + float3 normal = textureNormal.Sample(samplerNormal, inUV).rgb; + float4 albedo = textureAlbedo.Sample(samplerAlbedo, inUV); + + float3 fragcolor; + + // Debug display + if (ubo.displayDebugTarget > 0) { + switch (ubo.displayDebugTarget) { + case 1: + fragcolor.rgb = shadow(float3(1.0, 1.0, 1.0), fragPos); + break; + case 2: + fragcolor.rgb = fragPos; + break; + case 3: + fragcolor.rgb = normal; + break; + case 4: + fragcolor.rgb = albedo.rgb; + break; + case 5: + fragcolor.rgb = albedo.aaa; + break; + } + return float4(fragcolor, 1.0); + } + + // Ambient part + fragcolor = albedo.rgb * AMBIENT_LIGHT; + + float3 N = normalize(normal); + + for(int i = 0; i < LIGHT_COUNT; ++i) + { + // Vector to light + float3 L = ubo.lights[i].position.xyz - fragPos; + // Distance from light to fragment position + float dist = length(L); + L = normalize(L); + + // Viewer to fragment + float3 V = ubo.viewPos.xyz - fragPos; + V = normalize(V); + + float lightCosInnerAngle = cos(radians(15.0)); + float lightCosOuterAngle = cos(radians(25.0)); + float lightRange = 100.0; + + // Direction vector from source to target + float3 dir = normalize(ubo.lights[i].position.xyz - ubo.lights[i].target.xyz); + + // Dual cone spot light with smooth transition between inner and outer angle + float cosDir = dot(L, dir); + float spotEffect = smoothstep(lightCosOuterAngle, lightCosInnerAngle, cosDir); + float heightAttenuation = smoothstep(lightRange, 0.0f, dist); + + // Diffuse lighting + float NdotL = max(0.0, dot(N, L)); + float3 diff = NdotL.xxx; + + // Specular lighting + float3 R = reflect(-L, N); + float NdotR = max(0.0, dot(R, V)); + float3 spec = (pow(NdotR, 16.0) * albedo.a * 2.5).xxx; + + fragcolor += float3((diff + spec) * spotEffect * heightAttenuation) * ubo.lights[i].color.rgb * albedo.rgb; + } + + // Shadow calculations in a separate pass + if (ubo.useShadows > 0) + { + fragcolor = shadow(fragcolor, fragPos); + } + + return float4(fragcolor, 1); +} diff --git a/Test/spv.debuginfo.hlsl.geom b/Test/spv.debuginfo.hlsl.geom new file mode 100644 index 0000000000..71f9b7c116 --- /dev/null +++ b/Test/spv.debuginfo.hlsl.geom @@ -0,0 +1,79 @@ +/* +The MIT License (MIT) + +Copyright (c) 2022 Google LLC +Copyright (c) 2022 Sascha Willems + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. +*/ + +struct UBO +{ + float4x4 projection[2]; + float4x4 modelview[2]; + float4 lightPos; +}; + +cbuffer ubo : register(b0) { UBO ubo; } + +struct VSOutput +{ + float4 Pos : SV_POSITION; +[[vk::location(0)]] float3 Normal : NORMAL0; +[[vk::location(1)]] float3 Color : COLOR0; +}; + +struct GSOutput +{ + float4 Pos : SV_POSITION; + uint ViewportIndex : SV_ViewportArrayIndex; + uint PrimitiveID : SV_PrimitiveID; +[[vk::location(0)]] float3 Normal : NORMAL0; +[[vk::location(1)]] float3 Color : COLOR0; +[[vk::location(2)]] float3 ViewVec : TEXCOOR1; +[[vk::location(3)]] float3 LightVec : TEXCOOR2; +}; + +[maxvertexcount(3)] +[instance(2)] +void main(triangle VSOutput input[3], inout TriangleStream outStream, uint InvocationID : SV_GSInstanceID, uint PrimitiveID : SV_PrimitiveID) +{ + for(int i = 0; i < 3; i++) + { + GSOutput output = (GSOutput)0; + output.Normal = mul((float3x3)ubo.modelview[InvocationID], input[i].Normal); + output.Color = input[i].Color; + + float4 pos = input[i].Pos; + float4 worldPos = mul(ubo.modelview[InvocationID], pos); + + float3 lPos = mul(ubo.modelview[InvocationID], ubo.lightPos).xyz; + output.LightVec = lPos - worldPos.xyz; + output.ViewVec = -worldPos.xyz; + + output.Pos = mul(ubo.projection[InvocationID], worldPos); + + // Set the viewport index that the vertex will be emitted to + output.ViewportIndex = InvocationID; + output.PrimitiveID = PrimitiveID; + outStream.Append( output ); + } + + outStream.RestartStrip(); +} diff --git a/Test/spv.debuginfo.hlsl.tesc b/Test/spv.debuginfo.hlsl.tesc new file mode 100644 index 0000000000..ba52701584 --- /dev/null +++ b/Test/spv.debuginfo.hlsl.tesc @@ -0,0 +1,164 @@ +/* +The MIT License (MIT) + +Copyright (c) 2022 Google LLC +Copyright (c) 2022 Sascha Willems + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. +*/ + +struct UBO +{ + float4x4 projection; + float4x4 modelview; + float4 lightPos; + float4 frustumPlanes[6]; + float displacementFactor; + float tessellationFactor; + float2 viewportDim; + float tessellatedEdgeSize; +}; +cbuffer ubo : register(b0) { UBO ubo; }; + +Texture2D textureHeight : register(t1); +SamplerState samplerHeight : register(s1); + +struct VSOutput +{ + float4 Pos : SV_POSITION; +[[vk::location(0)]] float3 Normal : NORMAL0; +[[vk::location(1)]] float2 UV : TEXCOORD0; +}; + +struct HSOutput +{ +[[vk::location(2)]] float4 Pos : SV_POSITION; +[[vk::location(0)]] float3 Normal : NORMAL0; +[[vk::location(1)]] float2 UV : TEXCOORD0; +}; + +struct ConstantsHSOutput +{ + float TessLevelOuter[4] : SV_TessFactor; + float TessLevelInner[2] : SV_InsideTessFactor; +}; + +// Calculate the tessellation factor based on screen space +// dimensions of the edge +float screenSpaceTessFactor(float4 p0, float4 p1) +{ + // Calculate edge mid point + float4 midPoint = 0.5 * (p0 + p1); + // Sphere radius as distance between the control points + float radius = distance(p0, p1) / 2.0; + + // View space + float4 v0 = mul(ubo.modelview, midPoint); + + // Project into clip space + float4 clip0 = mul(ubo.projection, (v0 - float4(radius, float3(0.0, 0.0, 0.0)))); + float4 clip1 = mul(ubo.projection, (v0 + float4(radius, float3(0.0, 0.0, 0.0)))); + + // Get normalized device coordinates + clip0 /= clip0.w; + clip1 /= clip1.w; + + // Convert to viewport coordinates + clip0.xy *= ubo.viewportDim; + clip1.xy *= ubo.viewportDim; + + // Return the tessellation factor based on the screen size + // given by the distance of the two edge control points in screen space + // and a reference (min.) tessellation size for the edge set by the application + return clamp(distance(clip0, clip1) / ubo.tessellatedEdgeSize * ubo.tessellationFactor, 1.0, 64.0); +} + +// Checks the current's patch visibility against the frustum using a sphere check +// Sphere radius is given by the patch size +bool frustumCheck(float4 Pos, float2 inUV) +{ + // Fixed radius (increase if patch size is increased in example) + const float radius = 8.0f; + float4 pos = Pos; + pos.y -= textureHeight.SampleLevel(samplerHeight, inUV, 0.0).r * ubo.displacementFactor; + + // Check sphere against frustum planes + for (int i = 0; i < 6; i++) { + if (dot(pos, ubo.frustumPlanes[i]) + radius < 0.0) + { + return false; + } + } + return true; +} + +ConstantsHSOutput ConstantsHS(InputPatch patch) +{ + ConstantsHSOutput output = (ConstantsHSOutput)0; + + if (!frustumCheck(patch[0].Pos, patch[0].UV)) + { + output.TessLevelInner[0] = 0.0; + output.TessLevelInner[1] = 0.0; + output.TessLevelOuter[0] = 0.0; + output.TessLevelOuter[1] = 0.0; + output.TessLevelOuter[2] = 0.0; + output.TessLevelOuter[3] = 0.0; + } + else + { + if (ubo.tessellationFactor > 0.0) + { + output.TessLevelOuter[0] = screenSpaceTessFactor(patch[3].Pos, patch[0].Pos); + output.TessLevelOuter[1] = screenSpaceTessFactor(patch[0].Pos, patch[1].Pos); + output.TessLevelOuter[2] = screenSpaceTessFactor(patch[1].Pos, patch[2].Pos); + output.TessLevelOuter[3] = screenSpaceTessFactor(patch[2].Pos, patch[3].Pos); + output.TessLevelInner[0] = lerp(output.TessLevelOuter[0], output.TessLevelOuter[3], 0.5); + output.TessLevelInner[1] = lerp(output.TessLevelOuter[2], output.TessLevelOuter[1], 0.5); + } + else + { + // Tessellation factor can be set to zero by example + // to demonstrate a simple passthrough + output.TessLevelInner[0] = 1.0; + output.TessLevelInner[1] = 1.0; + output.TessLevelOuter[0] = 1.0; + output.TessLevelOuter[1] = 1.0; + output.TessLevelOuter[2] = 1.0; + output.TessLevelOuter[3] = 1.0; + } + } + + return output; +} + +[domain("quad")] +[partitioning("integer")] +[outputtopology("triangle_cw")] +[outputcontrolpoints(4)] +[patchconstantfunc("ConstantsHS")] +[maxtessfactor(20.0f)] +HSOutput main(InputPatch patch, uint InvocationID : SV_OutputControlPointID) +{ + HSOutput output = (HSOutput)0; + output.Pos = patch[InvocationID].Pos; + output.Normal = patch[InvocationID].Normal; + output.UV = patch[InvocationID].UV; + return output; +} diff --git a/Test/spv.debuginfo.hlsl.tese b/Test/spv.debuginfo.hlsl.tese new file mode 100644 index 0000000000..e7add05bf3 --- /dev/null +++ b/Test/spv.debuginfo.hlsl.tese @@ -0,0 +1,94 @@ +/* +The MIT License (MIT) + +Copyright (c) 2022 Google LLC +Copyright (c) 2022 Sascha Willems + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. +*/ + +struct UBO +{ + float4x4 projection; + float4x4 modelview; + float4 lightPos; + float4 frustumPlanes[6]; + float displacementFactor; + float tessellationFactor; + float2 viewportDim; + float tessellatedEdgeSize; +}; +cbuffer ubo : register(b0) { UBO ubo; }; + +Texture2D displacementMapTexture : register(t1); +SamplerState displacementMapSampler : register(s1); + +struct HSOutput +{ +[[vk::location(2)]] float4 Pos : SV_POSITION; +[[vk::location(0)]] float3 Normal : NORMAL0; +[[vk::location(1)]] float2 UV : TEXCOORD0; +}; + +struct ConstantsHSOutput +{ + float TessLevelOuter[4] : SV_TessFactor; + float TessLevelInner[2] : SV_InsideTessFactor; +}; + +struct DSOutput +{ + float4 Pos : SV_POSITION; +[[vk::location(0)]] float3 Normal : NORMAL0; +[[vk::location(1)]] float2 UV : TEXCOORD0; +[[vk::location(2)]] float3 ViewVec : TEXCOORD1; +[[vk::location(3)]] float3 LightVec : TEXCOORD2; +[[vk::location(4)]] float3 EyePos : POSITION1; +[[vk::location(5)]] float3 WorldPos : POSITION0; +}; + +[domain("quad")] +DSOutput main(ConstantsHSOutput input, float2 TessCoord : SV_DomainLocation, const OutputPatch patch) +{ + // Interpolate UV coordinates + DSOutput output = (DSOutput)0; + float2 uv1 = lerp(patch[0].UV, patch[1].UV, TessCoord.x); + float2 uv2 = lerp(patch[3].UV, patch[2].UV, TessCoord.x); + output.UV = lerp(uv1, uv2, TessCoord.y); + + float3 n1 = lerp(patch[0].Normal, patch[1].Normal, TessCoord.x); + float3 n2 = lerp(patch[3].Normal, patch[2].Normal, TessCoord.x); + output.Normal = lerp(n1, n2, TessCoord.y); + + // Interpolate positions + float4 pos1 = lerp(patch[0].Pos, patch[1].Pos, TessCoord.x); + float4 pos2 = lerp(patch[3].Pos, patch[2].Pos, TessCoord.x); + float4 pos = lerp(pos1, pos2, TessCoord.y); + // Displace + pos.y -= displacementMapTexture.SampleLevel(displacementMapSampler, output.UV, 0.0).r * ubo.displacementFactor; + // Perspective projection + output.Pos = mul(ubo.projection, mul(ubo.modelview, pos)); + + // Calculate vectors for lighting based on tessellated position + output.ViewVec = -pos.xyz; + output.LightVec = normalize(ubo.lightPos.xyz + output.ViewVec); + output.WorldPos = pos.xyz; + output.EyePos = mul(ubo.modelview, pos).xyz; + return output; +} diff --git a/Test/spv.debuginfo.hlsl.vert b/Test/spv.debuginfo.hlsl.vert new file mode 100644 index 0000000000..7d34ef430a --- /dev/null +++ b/Test/spv.debuginfo.hlsl.vert @@ -0,0 +1,112 @@ +/* +The MIT License (MIT) + +Copyright (c) 2022 Google LLC +Copyright (c) 2022 Sascha Willems + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. +*/ + +struct VSInput +{ +[[vk::location(0)]] float3 Pos : POSITION0; +[[vk::location(1)]] float3 Normal : NORMAL0; +[[vk::location(2)]] float2 UV : TEXCOORD0; +[[vk::location(3)]] float3 Color : COLOR0; + +// Instanced attributes +[[vk::location(4)]] float3 instancePos : POSITION1; +[[vk::location(5)]] float3 instanceRot : TEXCOORD1; +[[vk::location(6)]] float instanceScale : TEXCOORD2; +[[vk::location(7)]] int instanceTexIndex : TEXCOORD3; +}; + +struct UBO +{ + float4x4 projection; + float4x4 modelview; + float4 lightPos; + float locSpeed; + float globSpeed; +}; + +cbuffer ubo : register(b0) { UBO ubo; } + +struct VSOutput +{ + float4 Pos : SV_POSITION; +[[vk::location(0)]] float3 Normal : NORMAL0; +[[vk::location(1)]] float3 Color : COLOR0; +[[vk::location(2)]] float3 UV : TEXCOORD0; +[[vk::location(3)]] float3 ViewVec : TEXCOORD1; +[[vk::location(4)]] float3 LightVec : TEXCOORD2; +}; + +VSOutput main(VSInput input) +{ + VSOutput output = (VSOutput)0; + output.Color = input.Color; + output.UV = float3(input.UV, input.instanceTexIndex); + + // rotate around x + float s = sin(input.instanceRot.x + ubo.locSpeed); + float c = cos(input.instanceRot.x + ubo.locSpeed); + + float3x3 mx = { c, -s, 0.0, + s, c, 0.0, + 0.0, 0.0, 1.0 }; + + // rotate around y + s = sin(input.instanceRot.y + ubo.locSpeed); + c = cos(input.instanceRot.y + ubo.locSpeed); + + float3x3 my = { c, 0.0, -s, + 0.0, 1.0, 0.0, + s, 0.0, c }; + + // rot around z + s = sin(input.instanceRot.z + ubo.locSpeed); + c = cos(input.instanceRot.z + ubo.locSpeed); + + float3x3 mz = { 1.0, 0.0, 0.0, + 0.0, c, -s, + 0.0, s, c }; + + float3x3 rotMat = mul(mz, mul(my, mx)); + + float4x4 gRotMat; + s = sin(input.instanceRot.y + ubo.globSpeed); + c = cos(input.instanceRot.y + ubo.globSpeed); + gRotMat[0] = float4(c, 0.0, -s, 0.0); + gRotMat[1] = float4(0.0, 1.0, 0.0, 0.0); + gRotMat[2] = float4(s, 0.0, c, 0.0); + gRotMat[3] = float4(0.0, 0.0, 0.0, 1.0); + + float4 locPos = float4(mul(rotMat, input.Pos.xyz), 1.0); + float4 pos = float4((locPos.xyz * input.instanceScale) + input.instancePos, 1.0); + + output.Pos = mul(ubo.projection, mul(ubo.modelview, mul(gRotMat, pos))); + output.Normal = mul((float3x3)mul(ubo.modelview, gRotMat), mul(rotMat, input.Normal)); + + pos = mul(ubo.modelview, float4(input.Pos.xyz + input.instancePos, 1.0)); + float3 lPos = mul((float3x3)ubo.modelview, ubo.lightPos.xyz); + output.LightVec = lPos - pos.xyz; + output.ViewVec = -pos.xyz; + return output; +} diff --git a/Test/spv.debuginfo.scalar_types.glsl.frag b/Test/spv.debuginfo.scalar_types.glsl.frag new file mode 100644 index 0000000000..36595ea7cf --- /dev/null +++ b/Test/spv.debuginfo.scalar_types.glsl.frag @@ -0,0 +1,55 @@ +/* +The MIT License (MIT) + +Copyright (c) 2023 NVIDIA CORPORATION. + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. +*/ + +#version 460 + +#extension GL_EXT_shader_explicit_arithmetic_types : require + +bool VAR_bool; +int VAR_int; +uint VAR_uint; +float VAR_float; +double VAR_double; +int8_t VAR_int8_t; +uint8_t VAR_uint8_t; +int16_t VAR_int16_t; +uint16_t VAR_uint16_t; +int64_t VAR_int64_t; +uint64_t VAR_uint64_t; +float16_t VAR_float16_t; + +void main() { + VAR_bool = bool(0); + VAR_int = int(0); + VAR_uint = uint(0); + VAR_float = float(0); + VAR_double = double(0); + VAR_int8_t = int8_t(0); + VAR_uint8_t = uint8_t(0); + VAR_int16_t = int16_t(0); + VAR_uint16_t = uint16_t(0); + VAR_int64_t = int64_t(0); + VAR_uint64_t = uint64_t(0); + VAR_float16_t = float16_t(0); +} \ No newline at end of file diff --git a/Test/spv.exportFunctions.comp b/Test/spv.exportFunctions.comp new file mode 100644 index 0000000000..9332c65b61 --- /dev/null +++ b/Test/spv.exportFunctions.comp @@ -0,0 +1,9 @@ +#version 450 + +float add(float a, float b) { + return a + b; +} + +int foo() { + return 0; +} diff --git a/Test/spv.ext.AnyHitShader.rahit b/Test/spv.ext.AnyHitShader.rahit old mode 100644 new mode 100755 index 44c32d9174..2d33a00095 --- a/Test/spv.ext.AnyHitShader.rahit +++ b/Test/spv.ext.AnyHitShader.rahit @@ -2,6 +2,7 @@ #extension GL_EXT_ray_tracing : enable #extension GL_KHR_shader_subgroup_basic : enable #extension GL_EXT_ray_cull_mask : enable +#extension GL_EXT_ray_tracing_position_fetch : enable layout(location = 1) rayPayloadInEXT vec4 incomingPayload; void main() @@ -25,6 +26,7 @@ void main() mat3x4 v16 = gl_ObjectToWorld3x4EXT; mat3x4 v17 = gl_WorldToObject3x4EXT; uint v18 = gl_CullMaskEXT; + vec3 v19 = gl_HitTriangleVertexPositionsEXT[0]; incomingPayload = vec4(0.5f); if (v2 == 1) { ignoreIntersectionEXT; diff --git a/Test/spv.ext.ClosestHitShader.rchit b/Test/spv.ext.ClosestHitShader.rchit old mode 100644 new mode 100755 index 8b5f848fa1..09496295a6 --- a/Test/spv.ext.ClosestHitShader.rchit +++ b/Test/spv.ext.ClosestHitShader.rchit @@ -1,6 +1,7 @@ #version 460 #extension GL_EXT_ray_tracing : enable #extension GL_EXT_ray_cull_mask : enable +#extension GL_EXT_ray_tracing_position_fetch : enable layout(binding = 0, set = 0) uniform accelerationStructureEXT accEXT; layout(location = 0) rayPayloadEXT vec4 localPayload; @@ -26,5 +27,6 @@ void main() mat3x4 v16 = gl_ObjectToWorld3x4EXT; mat3x4 v17 = gl_WorldToObject3x4EXT; uint v18 = gl_CullMaskEXT; + vec3 v19 = gl_HitTriangleVertexPositionsEXT[0]; traceRayEXT(accEXT, 0u, 1u, 2u, 3u, 0u, vec3(0.5f), 0.5f, vec3(1.0f), 0.75f, 1); } diff --git a/Test/spv.ext.RayGenShader.rgen b/Test/spv.ext.RayGenShader.rgen index e9eb2cbb90..d342d863b5 100644 --- a/Test/spv.ext.RayGenShader.rgen +++ b/Test/spv.ext.RayGenShader.rgen @@ -1,6 +1,7 @@ #version 460 #extension GL_EXT_ray_tracing : enable #extension GL_EXT_ray_flags_primitive_culling : enable +#extension GL_EXT_opacity_micromap : enable layout(binding = 0) uniform accelerationStructureEXT accEXT0; layout(binding = 1, set = 0) uniform accelerationStructureEXT accEXT1; // Unused layout(binding = 2, r32ui) shadercallcoherent uniform uimage2D imageu; @@ -18,5 +19,5 @@ void main() uint ly = gl_LaunchIDEXT.y; uint sx = gl_LaunchSizeEXT.x; uint sy = gl_LaunchSizeEXT.y; - traceRayEXT(accEXT0, lx, ly, sx, sy, gl_RayFlagsSkipTrianglesEXT | gl_RayFlagsSkipAABBEXT, origin, 0.5f, dir, 0.75f, 1); + traceRayEXT(accEXT0, lx, ly, sx, sy, gl_RayFlagsSkipTrianglesEXT | gl_RayFlagsSkipAABBEXT | gl_RayFlagsForceOpacityMicromap2StateEXT, origin, 0.5f, dir, 0.75f, 1); } diff --git a/Test/spv.ext.ShaderTileImage.color.frag b/Test/spv.ext.ShaderTileImage.color.frag new file mode 100644 index 0000000000..f3b5530851 --- /dev/null +++ b/Test/spv.ext.ShaderTileImage.color.frag @@ -0,0 +1,12 @@ +#version 460 +#extension GL_EXT_shader_tile_image : require + +precision highp float; + +layout(location=1) tileImageEXT highp attachmentEXT in_color; +layout(location=0) out highp vec4 out_color; + +void main(void) +{ + out_color = colorAttachmentReadEXT(in_color); +} diff --git a/Test/spv.ext.ShaderTileImage.depth_stencil.frag b/Test/spv.ext.ShaderTileImage.depth_stencil.frag new file mode 100644 index 0000000000..faf9d932f8 --- /dev/null +++ b/Test/spv.ext.ShaderTileImage.depth_stencil.frag @@ -0,0 +1,16 @@ +#version 460 +#extension GL_EXT_shader_tile_image : require + +precision highp float; + +layout(location=0) out highp uvec4 stencil_out; +layout(location=1) out highp vec4 depth_out; + + +void main(void) +{ + float depth = depthAttachmentReadEXT(); + uint stencil_value = stencilAttachmentReadEXT(); + stencil_out = uvec4(stencil_value,0,0,0); + depth_out = vec4(depth,0.0,0.0,0.0); +} diff --git a/Test/spv.ext.ShaderTileImage.overlap.frag b/Test/spv.ext.ShaderTileImage.overlap.frag new file mode 100644 index 0000000000..98a44e4f8b --- /dev/null +++ b/Test/spv.ext.ShaderTileImage.overlap.frag @@ -0,0 +1,15 @@ +#version 460 +#extension GL_EXT_shader_tile_image : require + +precision mediump int; +precision highp float; + +layout(location=0) tileImageEXT highp attachmentEXT in_color[2]; +layout(location=1) tileImageEXT highp attachmentEXT in_color_1; +layout(location=1) out highp vec4 out_color; + +void main(void) +{ + out_color = colorAttachmentReadEXT(in_color[0]); + out_color += colorAttachmentReadEXT(in_color_1); +} diff --git a/Test/spv.ext.ShaderTileImage.subpassinput.frag b/Test/spv.ext.ShaderTileImage.subpassinput.frag new file mode 100644 index 0000000000..ec0e85ea43 --- /dev/null +++ b/Test/spv.ext.ShaderTileImage.subpassinput.frag @@ -0,0 +1,13 @@ +#version 450 +#extension GL_EXT_shader_tile_image : require + +precision highp float; + +layout(set = 0, binding = 0, input_attachment_index = 0) uniform subpassInput i; + +layout(location = 0) out vec4 fragColor; + +void main() +{ + fragColor = subpassLoad(i); +} diff --git a/Test/spv.ext.ShaderTileImage.typemismatch.frag b/Test/spv.ext.ShaderTileImage.typemismatch.frag new file mode 100644 index 0000000000..170bfaba0c --- /dev/null +++ b/Test/spv.ext.ShaderTileImage.typemismatch.frag @@ -0,0 +1,13 @@ +#version 320 es +#extension GL_EXT_shader_tile_image : require + +layout(non_coherent_color_attachment_readEXT) in; + +layout(location=0) tileImageEXT highp iattachmentEXT in_color_i; +layout(location=0) out highp vec4 out_color_f; + +void main(void) +{ + highp ivec4 read = colorAttachmentReadEXT(in_color_i); + out_color_f = vec4(read); +} diff --git a/Test/spv.ext.ShaderTileImage.wronglayout.frag b/Test/spv.ext.ShaderTileImage.wronglayout.frag new file mode 100644 index 0000000000..7cc06edfe2 --- /dev/null +++ b/Test/spv.ext.ShaderTileImage.wronglayout.frag @@ -0,0 +1,13 @@ +#version 460 +#extension GL_EXT_shader_tile_image : require + +precision highp float; +precision mediump int; + +layout(binding=0, set=0, input_attachment_index=0) tileImageEXT highp attachmentEXT in_color; +layout(location=0) out highp vec4 out_color; + +void main(void) +{ + out_color = colorAttachmentReadEXT(in_color); +} diff --git a/Test/spv.ext.meshShaderBuiltins.mesh b/Test/spv.ext.meshShaderBuiltins.mesh new file mode 100644 index 0000000000..70a97360d7 --- /dev/null +++ b/Test/spv.ext.meshShaderBuiltins.mesh @@ -0,0 +1,74 @@ +#version 460 + +#define MAX_VER 81 +#define MAX_PRIM 32 + +#define BARRIER() \ + memoryBarrierShared(); \ + barrier(); + +#extension GL_EXT_mesh_shader : enable + +layout(local_size_x = 32, local_size_y=1, local_size_z=1) in; + +layout(max_vertices=MAX_VER) out; +layout(max_primitives=MAX_PRIM) out; +layout(triangles) out; + +// test use of builtins in mesh shaders: + +void main() +{ + uint iid = gl_LocalInvocationID.x; + uint gid = gl_WorkGroupID.x; + uvec3 numWorkGrous = gl_NumWorkGroups; + uint vertexCount = MAX_VER; // vertexCount <= max_vertices + uint primitiveCount = MAX_PRIM; // primitiveCount <= max_primtives + SetMeshOutputsEXT(vertexCount, primitiveCount); + + gl_MeshVerticesEXT[iid].gl_Position = vec4(1.0); + gl_MeshVerticesEXT[iid].gl_PointSize = 2.0; + gl_MeshVerticesEXT[iid].gl_ClipDistance[3] = 3.0; + gl_MeshVerticesEXT[iid].gl_CullDistance[2] = 4.0; + + BARRIER(); + + gl_MeshVerticesEXT[iid+1].gl_Position = gl_MeshVerticesEXT[iid].gl_Position; + gl_MeshVerticesEXT[iid+1].gl_PointSize = gl_MeshVerticesEXT[iid].gl_PointSize; + gl_MeshVerticesEXT[iid+1].gl_ClipDistance[3] = gl_MeshVerticesEXT[iid].gl_ClipDistance[3]; + gl_MeshVerticesEXT[iid+1].gl_CullDistance[2] = gl_MeshVerticesEXT[iid].gl_CullDistance[2]; + + BARRIER(); + + gl_MeshPrimitivesEXT[iid].gl_PrimitiveID = 6; + gl_MeshPrimitivesEXT[iid].gl_Layer = 7; + gl_MeshPrimitivesEXT[iid].gl_ViewportIndex = 8; + gl_MeshPrimitivesEXT[iid].gl_CullPrimitiveEXT = false; + + BARRIER(); + + gl_MeshPrimitivesEXT[iid+1].gl_PrimitiveID = gl_MeshPrimitivesEXT[iid].gl_PrimitiveID; + gl_MeshPrimitivesEXT[iid+1].gl_Layer = gl_MeshPrimitivesEXT[iid].gl_Layer; + gl_MeshPrimitivesEXT[iid+1].gl_ViewportIndex = gl_MeshPrimitivesEXT[iid].gl_ViewportIndex; + gl_MeshPrimitivesEXT[iid+1].gl_CullPrimitiveEXT = gl_MeshPrimitivesEXT[iid].gl_CullPrimitiveEXT; + + BARRIER(); + + // check bound limits + gl_PrimitiveTriangleIndicesEXT[0] = uvec3(257); // should truncate 257 -> 1, range is between [0, vertexCount-1] + gl_PrimitiveTriangleIndicesEXT[primitiveCount - 1] = uvec3(2); // array size is primitiveCount*3 for triangle + gl_PrimitiveTriangleIndicesEXT[gid] = gl_PrimitiveTriangleIndicesEXT[gid-1]; + + BARRIER(); +} + +// test use of builtins enabled by other extensions +#extension GL_ARB_shader_draw_parameters : enable +#extension GL_EXT_multiview : enable + +void testAdditionalBuiltins() +{ + int id = gl_DrawIDARB; // GL_ARB_shader_draw_parameters + int viewIdx = gl_ViewIndex; // GL_EXT_multiview + +} \ No newline at end of file diff --git a/Test/spv.ext.meshShaderBuiltinsShadingRate.mesh b/Test/spv.ext.meshShaderBuiltinsShadingRate.mesh new file mode 100644 index 0000000000..b99125dc22 --- /dev/null +++ b/Test/spv.ext.meshShaderBuiltinsShadingRate.mesh @@ -0,0 +1,77 @@ +#version 460 + +#define MAX_VER 81 +#define MAX_PRIM 32 + +#define BARRIER() \ + memoryBarrierShared(); \ + barrier(); + +#extension GL_EXT_mesh_shader : enable +#extension GL_EXT_fragment_shading_rate : enable + +layout(local_size_x = 32, local_size_y=1, local_size_z=1) in; + +layout(max_vertices=MAX_VER) out; +layout(max_primitives=MAX_PRIM) out; +layout(triangles) out; + +// test use of builtins in mesh shaders: + +void main() +{ + uint iid = gl_LocalInvocationID.x; + uint gid = gl_WorkGroupID.x; + uvec3 numWorkGrous = gl_NumWorkGroups; + uint vertexCount = MAX_VER; // vertexCount <= max_vertices + uint primitiveCount = MAX_PRIM; // primitiveCount <= max_primtives + SetMeshOutputsEXT(vertexCount, primitiveCount); + + gl_MeshVerticesEXT[iid].gl_Position = vec4(1.0); + gl_MeshVerticesEXT[iid].gl_PointSize = 2.0; + gl_MeshVerticesEXT[iid].gl_ClipDistance[3] = 3.0; + gl_MeshVerticesEXT[iid].gl_CullDistance[2] = 4.0; + + BARRIER(); + + gl_MeshVerticesEXT[iid+1].gl_Position = gl_MeshVerticesEXT[iid].gl_Position; + gl_MeshVerticesEXT[iid+1].gl_PointSize = gl_MeshVerticesEXT[iid].gl_PointSize; + gl_MeshVerticesEXT[iid+1].gl_ClipDistance[3] = gl_MeshVerticesEXT[iid].gl_ClipDistance[3]; + gl_MeshVerticesEXT[iid+1].gl_CullDistance[2] = gl_MeshVerticesEXT[iid].gl_CullDistance[2]; + + BARRIER(); + + gl_MeshPrimitivesEXT[iid].gl_PrimitiveID = 6; + gl_MeshPrimitivesEXT[iid].gl_Layer = 7; + gl_MeshPrimitivesEXT[iid].gl_ViewportIndex = 8; + gl_MeshPrimitivesEXT[iid].gl_CullPrimitiveEXT = false; + gl_MeshPrimitivesEXT[iid].gl_PrimitiveShadingRateEXT = 0; + + BARRIER(); + + gl_MeshPrimitivesEXT[iid+1].gl_PrimitiveID = gl_MeshPrimitivesEXT[iid].gl_PrimitiveID; + gl_MeshPrimitivesEXT[iid+1].gl_Layer = gl_MeshPrimitivesEXT[iid].gl_Layer; + gl_MeshPrimitivesEXT[iid+1].gl_ViewportIndex = gl_MeshPrimitivesEXT[iid].gl_ViewportIndex; + gl_MeshPrimitivesEXT[iid+1].gl_CullPrimitiveEXT = gl_MeshPrimitivesEXT[iid].gl_CullPrimitiveEXT; + gl_MeshPrimitivesEXT[iid+1].gl_PrimitiveShadingRateEXT = 0; + + BARRIER(); + + // check bound limits + gl_PrimitiveTriangleIndicesEXT[0] = uvec3(257); // should truncate 257 -> 1, range is between [0, vertexCount-1] + gl_PrimitiveTriangleIndicesEXT[primitiveCount - 1] = uvec3(2); // array size is primitiveCount*3 for triangle + gl_PrimitiveTriangleIndicesEXT[gid] = gl_PrimitiveTriangleIndicesEXT[gid-1]; + + BARRIER(); +} + +// test use of builtins enabled by other extensions +#extension GL_ARB_shader_draw_parameters : enable +#extension GL_EXT_multiview : enable + +void testAdditionalBuiltins() +{ + int id = gl_DrawIDARB; // GL_ARB_shader_draw_parameters + int viewIdx = gl_ViewIndex; // GL_EXT_multiview + +} \ No newline at end of file diff --git a/Test/spv.ext.meshShaderRedeclBuiltins.mesh b/Test/spv.ext.meshShaderRedeclBuiltins.mesh new file mode 100644 index 0000000000..8b6703450c --- /dev/null +++ b/Test/spv.ext.meshShaderRedeclBuiltins.mesh @@ -0,0 +1,75 @@ +#version 460 + +#define MAX_VER 81 +#define MAX_PRIM 32 + +#define BARRIER() \ + memoryBarrierShared(); \ + barrier(); + +#extension GL_EXT_mesh_shader : enable + +layout(local_size_x = 32, local_size_y = 1, local_size_z = 1) in; + +layout(max_vertices=MAX_VER) out; +layout(max_primitives=MAX_PRIM) out; +layout(points) out; + +// test use of redeclared single-view builtins in mesh shaders: + +out gl_MeshPerVertexEXT { + vec4 gl_Position; + float gl_PointSize; + float gl_ClipDistance[4]; + float gl_CullDistance[4]; +} gl_MeshVerticesEXT[MAX_VER]; // explicitly sized to MAX_VER + +perprimitiveEXT out gl_MeshPerPrimitiveEXT { + int gl_PrimitiveID; + int gl_Layer; + int gl_ViewportIndex; + bool gl_CullPrimitiveEXT; + int gl_PrimitiveShadingRateEXT; +} gl_MeshPrimitivesEXT[]; // implicitly sized to MAX_PRIM + +out uint gl_PrimitivePointIndicesEXT[MAX_PRIM]; // explicitly sized to MAX_PRIM + +void main() +{ + uint iid = gl_LocalInvocationID.x; + uint gid = gl_WorkGroupID.x; + + SetMeshOutputsEXT(MAX_VER, MAX_PRIM); + + gl_MeshVerticesEXT[iid].gl_Position = vec4(1.0); + gl_MeshVerticesEXT[iid].gl_PointSize = 2.0; + gl_MeshVerticesEXT[iid].gl_ClipDistance[3] = 3.0; + gl_MeshVerticesEXT[iid].gl_CullDistance[2] = 4.0; + + BARRIER(); + + gl_MeshVerticesEXT[iid+1].gl_Position = gl_MeshVerticesEXT[iid].gl_Position; + gl_MeshVerticesEXT[iid+1].gl_PointSize = gl_MeshVerticesEXT[iid].gl_PointSize; + gl_MeshVerticesEXT[iid+1].gl_ClipDistance[3] = gl_MeshVerticesEXT[iid].gl_ClipDistance[3]; + gl_MeshVerticesEXT[iid+1].gl_CullDistance[2] = gl_MeshVerticesEXT[iid].gl_CullDistance[2]; + + BARRIER(); + + gl_MeshPrimitivesEXT[iid].gl_PrimitiveID = 6; + gl_MeshPrimitivesEXT[iid].gl_Layer = 7; + gl_MeshPrimitivesEXT[iid].gl_ViewportIndex = 8; + gl_MeshPrimitivesEXT[iid].gl_CullPrimitiveEXT = false; + + BARRIER(); + + gl_MeshPrimitivesEXT[iid+1].gl_PrimitiveID = gl_MeshPrimitivesEXT[iid].gl_PrimitiveID; + gl_MeshPrimitivesEXT[iid+1].gl_Layer = gl_MeshPrimitivesEXT[iid].gl_Layer; + gl_MeshPrimitivesEXT[iid+1].gl_ViewportIndex = gl_MeshPrimitivesEXT[iid].gl_ViewportIndex; + gl_MeshPrimitivesEXT[iid+1].gl_CullPrimitiveEXT = gl_MeshPrimitivesEXT[iid].gl_CullPrimitiveEXT; + + BARRIER(); + + // check bound limits + gl_PrimitivePointIndicesEXT[0] = 1; + gl_PrimitivePointIndicesEXT[MAX_PRIM - 1] = 2; +} diff --git a/Test/spv.ext.meshShaderTaskMem.mesh b/Test/spv.ext.meshShaderTaskMem.mesh new file mode 100644 index 0000000000..c22f7670d9 --- /dev/null +++ b/Test/spv.ext.meshShaderTaskMem.mesh @@ -0,0 +1,41 @@ +#version 450 + +#define MAX_VER 81 +#define MAX_PRIM 32 + +#define BARRIER() \ + memoryBarrierShared(); \ + barrier(); + +#extension GL_EXT_mesh_shader : enable + +layout(local_size_x = 32) in; + +layout(max_vertices=MAX_VER) out; +layout(max_primitives=MAX_PRIM) out; +layout(triangles) out; + +// use of storage qualifier "taskPayloadSharedEXT" in mesh shaders: +struct taskBlock { + float gid1[2]; + vec4 gid2; +}; +taskPayloadSharedEXT taskBlock mytask; + +buffer bufferBlock { + float gid3[2]; + vec4 gid4; +} mybuf; + +layout(location=0) out outBlock { + float gid5; + vec4 gid6; +} myblk[]; + +void main() +{ + uint iid = gl_LocalInvocationID.x; + + myblk[iid].gid5 = mytask.gid1[1] + mybuf.gid3[1]; + myblk[iid].gid6 = mytask.gid2 + mybuf.gid4; +} diff --git a/Test/spv.ext.meshShaderUserDefined.mesh b/Test/spv.ext.meshShaderUserDefined.mesh new file mode 100644 index 0000000000..c8035e2b35 --- /dev/null +++ b/Test/spv.ext.meshShaderUserDefined.mesh @@ -0,0 +1,59 @@ +#version 450 + +#define MAX_VER 81 +#define MAX_PRIM 32 + +#define BARRIER() \ + memoryBarrierShared(); \ + barrier(); + +#extension GL_EXT_mesh_shader : enable + +layout(local_size_x = 32) in; + +layout(max_vertices=MAX_VER) out; +layout(max_primitives=MAX_PRIM) out; +layout(triangles) out; + +// test use of user defined interface out blocks: + +// per-primitive block +perprimitiveEXT layout(location=0) out myblock { + float f; + float fArr[4]; + vec3 pos; + vec4 posArr[4]; + mat4 m; + mat3 mArr[2]; +} blk[]; + +// per-vertex block +layout(location=20) out myblock2 { + float f; + vec4 pos; + mat4 m; +} blk2[]; + +void main() +{ + uint iid = gl_LocalInvocationID.x; + uint gid = gl_WorkGroupID.x; + + blk[iid].f = 11.0; + blk[iid+1].fArr[gid] = blk[iid].f; + blk[iid/2].pos.yzx = vec3(14.0, 15.0, 13.0); + blk[iid*2].posArr[1].yzw = blk[iid/2].pos; + blk[iid/4].m[2].wzyx = vec4(13.0, 14.0, 15.0, 16.0); + blk[iid].mArr[0][1][1] = blk[iid/4].m[2].w; + blk[iid*4].mArr[1][gid] = vec3(17.0, 18.0, 19.0); + + BARRIER(); + + blk2[iid].f = blk2[iid-1].f + 20.0; + blk2[iid].pos = vec4(21.0, 22.0, 23.0, 24.0); + blk2[iid+1].m[gid] = blk2[iid].pos; + blk2[iid+1].m[gid][2] = 29.0; + blk2[iid+2].m[3] = blk2[iid+1].m[gid]; + + BARRIER(); +} diff --git a/Test/spv.ext.meshTaskShader.task b/Test/spv.ext.meshTaskShader.task new file mode 100644 index 0000000000..074fb23f95 --- /dev/null +++ b/Test/spv.ext.meshTaskShader.task @@ -0,0 +1,51 @@ +#version 450 + +#define BARRIER() \ + memoryBarrierShared(); \ + barrier(); + +#extension GL_EXT_mesh_shader : enable + +layout(local_size_x = 32) in; + +// test use of shared memory in task shaders: +layout(binding=0) writeonly uniform image2D uni_image; +uniform block0 { + uint uni_value; +}; +shared vec4 mem[10]; + +// use of storage qualifier "taskPayloadSharedEXT" in task shaders +struct Task { + vec2 dummy; + vec2 submesh[3]; +}; +taskPayloadSharedEXT Task mytask; + +void main() +{ + uint iid = gl_LocalInvocationID.x; + uint gid = gl_WorkGroupID.x; + + // 1. shared memory load and stores + for (uint i = 0; i < 10; ++i) { + mem[i] = vec4(i + uni_value); + } + imageStore(uni_image, ivec2(iid), mem[gid]); + imageStore(uni_image, ivec2(iid), mem[gid+1]); + + BARRIER(); + + // 2. task memory stores + + mytask.dummy = vec2(30.0, 31.0); + mytask.submesh[0] = vec2(32.0, 33.0); + mytask.submesh[1] = vec2(34.0, 35.0); + mytask.submesh[2] = mytask.submesh[gid%2]; + + BARRIER(); + + // 3. emit task count under uniform control flow + EmitMeshTasksEXT(3U, 1U, 1U); + +} diff --git a/Test/spv.ext.textureShadowLod.error.frag b/Test/spv.ext.textureShadowLod.error.frag new file mode 100644 index 0000000000..ef6ec21d44 --- /dev/null +++ b/Test/spv.ext.textureShadowLod.error.frag @@ -0,0 +1,13 @@ +#version 450 + +layout(binding = 0) uniform sampler2DArrayShadow s2da; + +layout(location = 0) out vec4 c_out; + +layout(location = 0) in vec4 tc; + +void main() +{ + float c = textureLod(s2da, tc, 0); + c_out = vec4(c); +} diff --git a/Test/spv.ext.textureShadowLod.frag b/Test/spv.ext.textureShadowLod.frag new file mode 100644 index 0000000000..8c879d9b12 --- /dev/null +++ b/Test/spv.ext.textureShadowLod.frag @@ -0,0 +1,20 @@ +#version 450 +#extension GL_EXT_texture_shadow_lod : enable + +layout(binding = 0) uniform sampler2DArrayShadow s2da; +layout(binding = 1) uniform samplerCubeArrayShadow sca; +layout(binding = 2) uniform samplerCubeShadow sc; + +layout(location = 0) out float c; + +layout(location = 0) in vec4 tc; + +void main() { + c = texture(s2da, tc, 0.0); + c = texture(sca, tc, 0.0, 0.0); + c = textureOffset(s2da, tc, ivec2(0.0), 0.0); + c = textureLod(s2da, tc, 0.0); + c = textureLod(sc, tc, 0.0); + c = textureLod(sca, tc, 0.0, 0.0); + c = textureLodOffset(s2da, tc, 0.0, ivec2(0.0)); +} diff --git a/Test/spv.floatFetch.frag b/Test/spv.floatFetch.frag new file mode 100644 index 0000000000..c02ddf35fa --- /dev/null +++ b/Test/spv.floatFetch.frag @@ -0,0 +1,941 @@ +#version 450 core + +#extension GL_ARB_sparse_texture2: enable +#extension GL_ARB_sparse_texture_clamp: enable +#extension GL_AMD_texture_gather_bias_lod: enable + +layout(set = 0, binding = 0) uniform sampler1D s1D; +layout(set = 0, binding = 1) uniform sampler2D s2D; +layout(set = 0, binding = 2) uniform sampler3D s3D; +layout(set = 0, binding = 3) uniform sampler2DRect s2DRect; +layout(set = 0, binding = 4) uniform samplerCube sCube; +layout(set = 0, binding = 5) uniform samplerBuffer sBuffer; +layout(set = 0, binding = 6) uniform sampler2DMS s2DMS; +layout(set = 0, binding = 7) uniform sampler1DArray s1DArray; +layout(set = 0, binding = 8) uniform sampler2DArray s2DArray; +layout(set = 0, binding = 9) uniform samplerCubeArray sCubeArray; +layout(set = 0, binding = 10) uniform sampler2DMSArray s2DMSArray; + +layout(set = 0, binding = 11) uniform sampler1DShadow s1DShadow; +layout(set = 0, binding = 12) uniform sampler2DShadow s2DShadow; +layout(set = 0, binding = 13) uniform sampler2DRectShadow s2DRectShadow; +layout(set = 0, binding = 14) uniform samplerCubeShadow sCubeShadow; +layout(set = 0, binding = 15) uniform sampler1DArrayShadow s1DArrayShadow; +layout(set = 0, binding = 16) uniform sampler2DArrayShadow s2DArrayShadow; +layout(set = 0, binding = 17) uniform samplerCubeArrayShadow sCubeArrayShadow; + +layout(set = 1, binding = 0) layout(rgba16f) uniform image1D i1D; +layout(set = 1, binding = 1) layout(rgba16f) uniform image2D i2D; +layout(set = 1, binding = 2) layout(rgba16f) uniform image3D i3D; +layout(set = 1, binding = 3) layout(rgba16f) uniform image2DRect i2DRect; +layout(set = 1, binding = 4) layout(rgba16f) uniform imageCube iCube; +layout(set = 1, binding = 5) layout(rgba16f) uniform image1DArray i1DArray; +layout(set = 1, binding = 6) layout(rgba16f) uniform image2DArray i2DArray; +layout(set = 1, binding = 7) layout(rgba16f) uniform imageCubeArray iCubeArray; +layout(set = 1, binding = 8) layout(rgba16f) uniform imageBuffer iBuffer; +layout(set = 1, binding = 9) layout(rgba16f) uniform image2DMS i2DMS; +layout(set = 1, binding = 10) layout(rgba16f) uniform image2DMSArray i2DMSArray; + +layout(set = 2, binding = 0) uniform texture1D t1D; +layout(set = 2, binding = 1) uniform texture2D t2D; +layout(set = 2, binding = 2) uniform texture3D t3D; +layout(set = 2, binding = 3) uniform texture2DRect t2DRect; +layout(set = 2, binding = 4) uniform textureCube tCube; +layout(set = 2, binding = 5) uniform texture1DArray t1DArray; +layout(set = 2, binding = 6) uniform texture2DArray t2DArray; +layout(set = 2, binding = 7) uniform textureCubeArray tCubeArray; +layout(set = 2, binding = 8) uniform textureBuffer tBuffer; +layout(set = 2, binding = 9) uniform texture2DMS t2DMS; +layout(set = 2, binding = 10) uniform texture2DMSArray t2DMSArray; + +layout(set = 2, binding = 11) uniform sampler s; +layout(set = 2, binding = 12) uniform samplerShadow sShadow; + +layout(set = 3, binding = 0, input_attachment_index = 0) uniform subpassInput subpass; +layout(set = 3, binding = 1, input_attachment_index = 0) uniform subpassInputMS subpassMS; + +layout(location = 0) in float c1; +layout(location = 1) in vec2 c2; +layout(location = 2) in vec3 c3; +layout(location = 3) in vec4 c4; + +layout(location = 4) in float compare; +layout(location = 5) in float lod; +layout(location = 6) in float bias; +layout(location = 7) in float lodClamp; + +layout(location = 8) in float dPdxy1; +layout(location = 9) in vec2 dPdxy2; +layout(location = 10) in vec3 dPdxy3; + +const int offset1 = 1; +const ivec2 offset2 = ivec2(1); +const ivec3 offset3 = ivec3(1); +const ivec2 offsets[4] = { offset2, offset2, offset2, offset2 }; + +layout(location = 0) out vec4 fragColor; + +vec4 testTexture() +{ + vec4 texel = vec4(0.0); + + texel += texture(s1D, c1); + texel += texture(s2D, c2); + texel += texture(s3D, c3); + texel += texture(sCube, c3); + texel.x += texture(s1DShadow, c3); + texel.x += texture(s2DShadow, c3); + texel.x += texture(sCubeShadow, c4); + texel += texture(s1DArray, c2); + texel += texture(s2DArray, c3); + texel += texture(sCubeArray, c4); + texel.x += texture(s1DArrayShadow, c3); + texel.x += texture(s2DArrayShadow, c4); + texel += texture(s2DRect, c2); + texel.x += texture(s2DRectShadow, c3); + texel.x += texture(sCubeArrayShadow, c4, compare); + + return texel; +} + +vec4 testTextureProj() +{ + vec4 texel = vec4(0.0); + + texel += textureProj(s1D, c2); + texel += textureProj(s1D, c4); + texel += textureProj(s2D, c3); + texel += textureProj(s2D, c4); + texel += textureProj(s3D, c4); + texel.x += textureProj(s1DShadow, c4); + texel.x += textureProj(s2DShadow, c4); + texel += textureProj(s2DRect, c3); + texel += textureProj(s2DRect, c4); + texel.x += textureProj(s2DRectShadow, c4); + + return texel; +} + +vec4 testTextureLod() +{ + vec4 texel = vec4(0.0); + + texel += textureLod(s1D, c1, lod); + texel += textureLod(s2D, c2, lod); + texel += textureLod(s3D, c3, lod); + texel += textureLod(sCube, c3, lod); + texel.x += textureLod(s1DShadow, c3, lod); + texel.x += textureLod(s2DShadow, c3, lod); + texel += textureLod(s1DArray, c2, lod); + texel += textureLod(s2DArray, c3, lod); + texel.x += textureLod(s1DArrayShadow, c3, lod); + texel += textureLod(sCubeArray, c4, lod); + + return texel; +} + +vec4 testTextureOffset() +{ + vec4 texel = vec4(0.0); + + texel += textureOffset(s1D, c1, offset1); + texel += textureOffset(s2D, c2, offset2); + texel += textureOffset(s3D, c3, offset3); + texel += textureOffset(s2DRect, c2, offset2); + texel.x += textureOffset(s2DRectShadow, c3, offset2); + texel.x += textureOffset(s1DShadow, c3, offset1); + texel.x += textureOffset(s2DShadow, c3, offset2); + texel += textureOffset(s1DArray, c2, offset1); + texel += textureOffset(s2DArray, c3, offset2); + texel.x += textureOffset(s1DArrayShadow, c3, offset1); + texel.x += textureOffset(s2DArrayShadow, c4, offset2); + + return texel; +} + +vec4 testTextureProjOffset() +{ + vec4 texel = vec4(0.0); + + texel += textureProjOffset(s1D, c2, offset1); + texel += textureProjOffset(s1D, c4, offset1); + texel += textureProjOffset(s2D, c3, offset2); + texel += textureProjOffset(s2D, c4, offset2); + texel += textureProjOffset(s3D, c4, offset3); + texel += textureProjOffset(s2DRect, c3, offset2); + texel += textureProjOffset(s2DRect, c4, offset2); + texel.x += textureProjOffset(s2DRectShadow, c4, offset2); + texel.x += textureProjOffset(s1DShadow, c4, offset1); + texel.x += textureProjOffset(s2DShadow, c4, offset2); + + return texel; +} + +vec4 testTextureLodOffset() +{ + vec4 texel = vec4(0.0); + + texel += textureLodOffset(s1D, c1, lod, offset1); + texel += textureLodOffset(s2D, c2, lod, offset2); + texel += textureLodOffset(s3D, c3, lod, offset3); + texel.x += textureLodOffset(s1DShadow, c3, lod, offset1); + texel.x += textureLodOffset(s2DShadow, c3, lod, offset2); + texel += textureLodOffset(s1DArray, c2, lod, offset1); + texel += textureLodOffset(s2DArray, c3, lod, offset2); + texel.x += textureLodOffset(s1DArrayShadow, c3, lod, offset1); + + return texel; +} + +vec4 testTextureProjLodOffset() +{ + vec4 texel = vec4(0.0); + + texel += textureProjLodOffset(s1D, c2, lod, offset1); + texel += textureProjLodOffset(s1D, c4, lod, offset1); + texel += textureProjLodOffset(s2D, c3, lod, offset2); + texel += textureProjLodOffset(s2D, c4, lod, offset2); + texel += textureProjLodOffset(s3D, c4, lod, offset3); + texel.x += textureProjLodOffset(s1DShadow, c4, lod, offset1); + texel.x += textureProjLodOffset(s2DShadow, c4, lod, offset2); + + return texel; +} + +vec4 testTexelFetch() +{ + vec4 texel = vec4(0.0); + + texel += texelFetch(s1D, int(c1), int(lod)); + texel += texelFetch(s2D, ivec2(c2), int(lod)); + texel += texelFetch(s3D, ivec3(c3), int(lod)); + texel += texelFetch(s2DRect, ivec2(c2)); + texel += texelFetch(s1DArray, ivec2(c2), int(lod)); + texel += texelFetch(s2DArray, ivec3(c3), int(lod)); + texel += texelFetch(sBuffer, int(c1)); + texel += texelFetch(s2DMS, ivec2(c2), 1); + texel += texelFetch(s2DMSArray, ivec3(c3), 2); + + return texel; +} + +vec4 testTexelFetchOffset() +{ + vec4 texel = vec4(0.0); + + texel += texelFetchOffset(s1D, int(c1), int(lod), offset1); + texel += texelFetchOffset(s2D, ivec2(c2), int(lod), offset2); + texel += texelFetchOffset(s3D, ivec3(c3), int(lod), offset3); + texel += texelFetchOffset(s2DRect, ivec2(c2), offset2); + texel += texelFetchOffset(s1DArray, ivec2(c2), int(lod), offset1); + texel += texelFetchOffset(s2DArray, ivec3(c3), int(lod), offset2); + + return texel; +} + +vec4 testTextureGrad() +{ + vec4 texel = vec4(0.0); + + texel += textureGrad(s1D, c1, dPdxy1, dPdxy1); + texel += textureGrad(s2D, c2, dPdxy2, dPdxy2); + texel += textureGrad(s3D, c3, dPdxy3, dPdxy3); + texel += textureGrad(sCube, c3, dPdxy3, dPdxy3); + texel += textureGrad(s2DRect, c2, dPdxy2, dPdxy2); + texel.x += textureGrad(s2DRectShadow, c3, dPdxy2, dPdxy2); + texel.x += textureGrad(s1DShadow, c3, dPdxy1, dPdxy1); + texel.x += textureGrad(s2DShadow, c3, dPdxy2, dPdxy2); + texel.x += textureGrad(sCubeShadow, c4, dPdxy3, dPdxy3); + texel += textureGrad(s1DArray, c2, dPdxy1, dPdxy1); + texel += textureGrad(s2DArray, c3, dPdxy2, dPdxy2); + texel.x += textureGrad(s1DArrayShadow, c3, dPdxy1, dPdxy1); + texel.x += textureGrad(s2DArrayShadow, c4, dPdxy2, dPdxy2); + texel += textureGrad(sCubeArray, c4, dPdxy3, dPdxy3); + + return texel; +} + +vec4 testTextureGradOffset() +{ + vec4 texel = vec4(0.0); + + texel += textureGradOffset(s1D, c1, dPdxy1, dPdxy1, offset1); + texel += textureGradOffset(s2D, c2, dPdxy2, dPdxy2, offset2); + texel += textureGradOffset(s3D, c3, dPdxy3, dPdxy3, offset3); + texel += textureGradOffset(s2DRect, c2, dPdxy2, dPdxy2, offset2); + texel.x += textureGradOffset(s2DRectShadow, c3, dPdxy2, dPdxy2, offset2); + texel.x += textureGradOffset(s1DShadow, c3, dPdxy1, dPdxy1, offset1); + texel.x += textureGradOffset(s2DShadow, c3, dPdxy2, dPdxy2, offset2); + texel += textureGradOffset(s1DArray, c2, dPdxy1, dPdxy1, offset1); + texel += textureGradOffset(s2DArray, c3, dPdxy2, dPdxy2, offset2); + texel.x += textureGradOffset(s1DArrayShadow, c3, dPdxy1, dPdxy1, offset1); + texel.x += textureGradOffset(s2DArrayShadow, c4, dPdxy2, dPdxy2, offset2); + + return texel; +} + +vec4 testTextureProjGrad() +{ + vec4 texel = vec4(0.0); + + texel += textureProjGrad(s1D, c2, dPdxy1, dPdxy1); + texel += textureProjGrad(s1D, c4, dPdxy1, dPdxy1); + texel += textureProjGrad(s2D, c3, dPdxy2, dPdxy2); + texel += textureProjGrad(s2D, c4, dPdxy2, dPdxy2); + texel += textureProjGrad(s3D, c4, dPdxy3, dPdxy3); + texel += textureProjGrad(s2DRect, c3, dPdxy2, dPdxy2); + texel += textureProjGrad(s2DRect, c4, dPdxy2, dPdxy2); + texel.x += textureProjGrad(s2DRectShadow, c4, dPdxy2, dPdxy2); + texel.x += textureProjGrad(s1DShadow, c4, dPdxy1, dPdxy1); + texel.x += textureProjGrad(s2DShadow, c4, dPdxy2, dPdxy2); + + return texel; +} + +vec4 testTextureProjGradoffset() +{ + vec4 texel = vec4(0.0); + + texel += textureProjGradOffset(s1D, c2, dPdxy1, dPdxy1, offset1); + texel += textureProjGradOffset(s1D, c4, dPdxy1, dPdxy1, offset1); + texel += textureProjGradOffset(s2D, c3, dPdxy2, dPdxy2, offset2); + texel += textureProjGradOffset(s2D, c4, dPdxy2, dPdxy2, offset2); + texel += textureProjGradOffset(s2DRect, c3, dPdxy2, dPdxy2, offset2); + texel += textureProjGradOffset(s2DRect, c4, dPdxy2, dPdxy2, offset2); + texel.x += textureProjGradOffset(s2DRectShadow, c4, dPdxy2, dPdxy2, offset2); + texel += textureProjGradOffset(s3D, c4, dPdxy3, dPdxy3, offset3); + texel.x += textureProjGradOffset(s1DShadow, c4, dPdxy1, dPdxy1, offset1); + texel.x += textureProjGradOffset(s2DShadow, c4, dPdxy2, dPdxy2, offset2); + + return texel; +} + +vec4 testTextureGather() +{ + vec4 texel = vec4(0.0); + + texel += textureGather(s2D, c2, 0); + texel += textureGather(s2DArray, c3, 0); + texel += textureGather(sCube, c3, 0); + texel += textureGather(sCubeArray, c4, 0); + texel += textureGather(s2DRect, c2, 0); + texel += textureGather(s2DShadow, c2, compare); + texel += textureGather(s2DArrayShadow, c3, compare); + texel += textureGather(sCubeShadow, c3, compare); + texel += textureGather(sCubeArrayShadow, c4, compare); + texel += textureGather(s2DRectShadow, c2, compare); + + return texel; +} + +vec4 testTextureGatherOffset() +{ + vec4 texel = vec4(0.0); + + texel += textureGatherOffset(s2D, c2, offset2, 0); + texel += textureGatherOffset(s2DArray, c3, offset2, 0); + texel += textureGatherOffset(s2DRect, c2, offset2, 0); + texel += textureGatherOffset(s2DShadow, c2, compare, offset2); + texel += textureGatherOffset(s2DArrayShadow, c3, compare, offset2); + texel += textureGatherOffset(s2DRectShadow, c2, compare, offset2); + + return texel; +} + +vec4 testTextureGatherOffsets() +{ + vec4 texel = vec4(0.0); + + texel += textureGatherOffsets(s2D, c2, offsets, 0); + texel += textureGatherOffsets(s2DArray, c3, offsets, 0); + texel += textureGatherOffsets(s2DRect, c2, offsets, 0); + texel += textureGatherOffsets(s2DShadow, c2, compare, offsets); + texel += textureGatherOffsets(s2DArrayShadow, c3, compare, offsets); + texel += textureGatherOffsets(s2DRectShadow, c2, compare, offsets); + + return texel; +} + +vec4 testTextureGatherLod() +{ + vec4 texel = vec4(0.0); + + texel += textureGatherLodAMD(s2D, c2, lod, 0); + texel += textureGatherLodAMD(s2DArray, c3, lod, 0); + texel += textureGatherLodAMD(sCube, c3, lod, 0); + texel += textureGatherLodAMD(sCubeArray, c4, lod, 0); + + return texel; +} + +vec4 testTextureGatherLodOffset() +{ + vec4 texel = vec4(0.0); + + texel += textureGatherLodOffsetAMD(s2D, c2, lod, offset2, 0); + texel += textureGatherLodOffsetAMD(s2DArray, c3, lod, offset2, 0); + + return texel; +} + +vec4 testTextureGatherLodOffsets() +{ + vec4 texel = vec4(0.0); + + texel += textureGatherLodOffsetsAMD(s2D, c2, lod, offsets, 0); + texel += textureGatherLodOffsetsAMD(s2DArray, c3, lod, offsets, 0); + + return texel; +} + +ivec4 testTextureSize() +{ + ivec4 size = ivec4(0); + + size.x += textureSize(s1D, int(lod)); + size.xy += textureSize(s2D, int(lod)); + size.xyz += textureSize(s3D, int(lod)); + size.xy += textureSize(sCube, int(lod)); + size.x += textureSize(s1DShadow, int(lod)); + size.xy += textureSize(s2DShadow, int(lod)); + size.xy += textureSize(sCubeShadow, int(lod)); + size.xyz += textureSize(sCubeArray, int(lod)); + size.xyz += textureSize(sCubeArrayShadow, int(lod)); + size.xy += textureSize(s2DRect); + size.xy += textureSize(s2DRectShadow); + size.xy += textureSize(s1DArray, int(lod)); + size.xyz += textureSize(s2DArray, int(lod)); + size.xy += textureSize(s1DArrayShadow, int(lod)); + size.xyz += textureSize(s2DArrayShadow, int(lod)); + size.x += textureSize(sBuffer); + size.xy += textureSize(s2DMS); + size.xyz += textureSize(s2DMSArray); + + return size; +} + +vec2 testTextureQueryLod() +{ + vec2 lod = vec2(0.0); + + lod += textureQueryLod(s1D, c1); + lod += textureQueryLod(s2D, c2); + lod += textureQueryLod(s3D, c3); + lod += textureQueryLod(sCube, c3); + lod += textureQueryLod(s1DArray, c1); + lod += textureQueryLod(s2DArray, c2); + lod += textureQueryLod(sCubeArray, c3); + lod += textureQueryLod(s1DShadow, c1); + lod += textureQueryLod(s2DShadow, c2); + lod += textureQueryLod(sCubeArrayShadow, c3); + lod += textureQueryLod(s1DArrayShadow, c1); + lod += textureQueryLod(s2DArrayShadow, c2); + lod += textureQueryLod(sCubeArrayShadow, c3); + + return lod; +} + +int testTextureQueryLevels() +{ + int levels = 0; + + levels += textureQueryLevels(s1D); + levels += textureQueryLevels(s2D); + levels += textureQueryLevels(s3D); + levels += textureQueryLevels(sCube); + levels += textureQueryLevels(s1DShadow); + levels += textureQueryLevels(s2DShadow); + levels += textureQueryLevels(sCubeShadow); + levels += textureQueryLevels(sCubeArray); + levels += textureQueryLevels(sCubeArrayShadow); + levels += textureQueryLevels(s1DArray); + levels += textureQueryLevels(s2DArray); + levels += textureQueryLevels(s1DArrayShadow); + levels += textureQueryLevels(s2DArrayShadow); + + return levels; +} + +int testTextureSamples() +{ + int samples = 0; + + samples += textureSamples(s2DMS); + samples += textureSamples(s2DMSArray); + + return samples; +} + +vec4 testImageLoad() +{ + vec4 texel = vec4(0.0); + + texel += imageLoad(i1D, int(c1)); + texel += imageLoad(i2D, ivec2(c2)); + texel += imageLoad(i3D, ivec3(c3)); + texel += imageLoad(i2DRect, ivec2(c2)); + texel += imageLoad(iCube, ivec3(c3)); + texel += imageLoad(iBuffer, int(c1)); + texel += imageLoad(i1DArray, ivec2(c2)); + texel += imageLoad(i2DArray, ivec3(c3)); + texel += imageLoad(iCubeArray, ivec3(c3)); + texel += imageLoad(i2DMS, ivec2(c2), 1); + texel += imageLoad(i2DMSArray, ivec3(c3), 1); + + return texel; +} + +void testImageStore(vec4 data) +{ + imageStore(i1D, int(c1), data); + imageStore(i2D, ivec2(c2), data); + imageStore(i3D, ivec3(c3), data); + imageStore(i2DRect, ivec2(c2), data); + imageStore(iCube, ivec3(c3), data); + imageStore(iBuffer, int(c1), data); + imageStore(i1DArray, ivec2(c2), data); + imageStore(i2DArray, ivec3(c3), data); + imageStore(iCubeArray, ivec3(c3), data); + imageStore(i2DMS, ivec2(c2), 1, data); + imageStore(i2DMSArray, ivec3(c3), 1, data); +} + +vec4 testSparseTexture() +{ + vec4 texel = vec4(0.0); + + sparseTextureARB(s2D, c2, texel); + sparseTextureARB(s3D, c3, texel); + sparseTextureARB(sCube, c3, texel); + sparseTextureARB(s2DShadow, c3, texel.x); + sparseTextureARB(sCubeShadow, c4, texel.x); + sparseTextureARB(s2DArray, c3, texel); + sparseTextureARB(sCubeArray, c4, texel); + sparseTextureARB(s2DArrayShadow, c4, texel.x); + sparseTextureARB(s2DRect, c2, texel); + sparseTextureARB(s2DRectShadow, c3, texel.x); + sparseTextureARB(sCubeArrayShadow, c4, compare, texel.x); + + return texel; +} + +vec4 testSparseTextureLod() +{ + vec4 texel = vec4(0.0); + + sparseTextureLodARB(s2D, c2, lod, texel); + sparseTextureLodARB(s3D, c3, lod, texel); + sparseTextureLodARB(sCube, c3, lod, texel); + sparseTextureLodARB(s2DShadow, c3, lod, texel.x); + sparseTextureLodARB(s2DArray, c3, lod, texel); + sparseTextureLodARB(sCubeArray, c4, lod, texel); + + return texel; +} + +vec4 testSparseTextureOffset() +{ + vec4 texel = vec4(0.0); + + sparseTextureOffsetARB(s2D, c2, offset2, texel); + sparseTextureOffsetARB(s3D, c3, offset3, texel); + sparseTextureOffsetARB(s2DRect, c2, offset2, texel); + sparseTextureOffsetARB(s2DRectShadow, c3, offset2, texel.x); + sparseTextureOffsetARB(s2DShadow, c3, offset2, texel.x); + sparseTextureOffsetARB(s2DArray, c3, offset2, texel); + sparseTextureOffsetARB(s2DArrayShadow, c4, offset2, texel.x); + + return texel; +} + +vec4 testSparseTextureLodOffset() +{ + vec4 texel = vec4(0.0); + + sparseTextureLodOffsetARB(s2D, c2, lod, offset2, texel); + sparseTextureLodOffsetARB(s3D, c3, lod, offset3, texel); + sparseTextureLodOffsetARB(s2DShadow, c3, lod, offset2, texel.x); + sparseTextureLodOffsetARB(s2DArray, c3, lod, offset2, texel); + + return texel; +} + +vec4 testSparseTextureGrad() +{ + vec4 texel = vec4(0.0); + + sparseTextureGradARB(s2D, c2, dPdxy2, dPdxy2, texel); + sparseTextureGradARB(s3D, c3, dPdxy3, dPdxy3, texel); + sparseTextureGradARB(sCube, c3, dPdxy3, dPdxy3, texel); + sparseTextureGradARB(s2DRect, c2, dPdxy2, dPdxy2, texel); + sparseTextureGradARB(s2DRectShadow, c3, dPdxy2, dPdxy2, texel.x); + sparseTextureGradARB(s2DShadow, c3, dPdxy2, dPdxy2, texel.x); + sparseTextureGradARB(sCubeShadow, c4, dPdxy3, dPdxy3, texel.x); + sparseTextureGradARB(s2DArray, c3, dPdxy2, dPdxy2, texel); + sparseTextureGradARB(s2DArrayShadow, c4, dPdxy2, dPdxy2, texel.x); + sparseTextureGradARB(sCubeArray, c4, dPdxy3, dPdxy3, texel); + + return texel; +} + +vec4 testSparseTextureGradOffset() +{ + vec4 texel = vec4(0.0); + + sparseTextureGradOffsetARB(s2D, c2, dPdxy2, dPdxy2, offset2, texel); + sparseTextureGradOffsetARB(s3D, c3, dPdxy3, dPdxy3, offset3, texel); + sparseTextureGradOffsetARB(s2DRect, c2, dPdxy2, dPdxy2, offset2, texel); + sparseTextureGradOffsetARB(s2DRectShadow, c3, dPdxy2, dPdxy2, offset2, texel.x); + sparseTextureGradOffsetARB(s2DShadow, c3, dPdxy2, dPdxy2, offset2, texel.x); + sparseTextureGradOffsetARB(s2DArray, c3, dPdxy2, dPdxy2, offset2, texel); + sparseTextureGradOffsetARB(s2DArrayShadow, c4, dPdxy2, dPdxy2, offset2, texel.x); + + return texel; +} + +vec4 testSparseTexelFetch() +{ + vec4 texel = vec4(0.0); + + sparseTexelFetchARB(s2D, ivec2(c2), int(lod), texel); + sparseTexelFetchARB(s3D, ivec3(c3), int(lod), texel); + sparseTexelFetchARB(s2DRect, ivec2(c2), texel); + sparseTexelFetchARB(s2DArray, ivec3(c3), int(lod), texel); + sparseTexelFetchARB(s2DMS, ivec2(c2), 1, texel); + sparseTexelFetchARB(s2DMSArray, ivec3(c3), 2, texel); + + return texel; +} + +vec4 testSparseTexelFetchOffset() +{ + vec4 texel = vec4(0.0); + + sparseTexelFetchOffsetARB(s2D, ivec2(c2), int(lod), offset2, texel); + sparseTexelFetchOffsetARB(s3D, ivec3(c3), int(lod), offset3, texel); + sparseTexelFetchOffsetARB(s2DRect, ivec2(c2), offset2, texel); + sparseTexelFetchOffsetARB(s2DArray, ivec3(c3), int(lod), offset2, texel); + + return texel; +} + +vec4 testSparseTextureGather() +{ + vec4 texel = vec4(0.0); + + sparseTextureGatherARB(s2D, c2, texel, 0); + sparseTextureGatherARB(s2DArray, c3, texel, 0); + sparseTextureGatherARB(sCube, c3, texel, 0); + sparseTextureGatherARB(sCubeArray, c4, texel, 0); + sparseTextureGatherARB(s2DRect, c2, texel, 0); + sparseTextureGatherARB(s2DShadow, c2, compare, texel); + sparseTextureGatherARB(s2DArrayShadow, c3, compare, texel); + sparseTextureGatherARB(sCubeShadow, c3, compare, texel); + sparseTextureGatherARB(sCubeArrayShadow, c4, compare, texel); + sparseTextureGatherARB(s2DRectShadow, c2, compare, texel); + + return texel; +} + +vec4 testSparseTextureGatherOffset() +{ + vec4 texel = vec4(0.0); + + sparseTextureGatherOffsetARB(s2D, c2, offset2, texel, 0); + sparseTextureGatherOffsetARB(s2DArray, c3, offset2, texel, 0); + sparseTextureGatherOffsetARB(s2DRect, c2, offset2, texel, 0); + sparseTextureGatherOffsetARB(s2DShadow, c2, compare, offset2, texel); + sparseTextureGatherOffsetARB(s2DArrayShadow, c3, compare, offset2, texel); + sparseTextureGatherOffsetARB(s2DRectShadow, c2, compare, offset2, texel); + + return texel; +} + +vec4 testSparseTextureGatherOffsets() +{ + vec4 texel = vec4(0.0); + const ivec2 constOffsets[4] = ivec2[4](ivec2(1,2), ivec2(3,4), ivec2(15,16), ivec2(-2,0)); + + sparseTextureGatherOffsetsARB(s2D, c2, constOffsets, texel, 0); + sparseTextureGatherOffsetsARB(s2DArray, c3, constOffsets, texel, 0); + sparseTextureGatherOffsetsARB(s2DRect, c2, constOffsets, texel, 0); + sparseTextureGatherOffsetsARB(s2DShadow, c2, compare, constOffsets, texel); + sparseTextureGatherOffsetsARB(s2DArrayShadow, c3, compare, constOffsets, texel); + sparseTextureGatherOffsetsARB(s2DRectShadow, c2, compare, constOffsets, texel); + + return texel; +} + +vec4 testSparseTextureGatherLod() +{ + vec4 texel = vec4(0.0); + + sparseTextureGatherLodAMD(s2D, c2, lod, texel, 0); + sparseTextureGatherLodAMD(s2DArray, c3, lod, texel, 0); + sparseTextureGatherLodAMD(sCube, c3, lod, texel, 0); + sparseTextureGatherLodAMD(sCubeArray, c4, lod, texel, 0); + + return texel; +} + +vec4 testSparseTextureGatherLodOffset() +{ + vec4 texel = vec4(0.0); + + sparseTextureGatherLodOffsetAMD(s2D, c2, lod, offset2, texel, 0); + sparseTextureGatherLodOffsetAMD(s2DArray, c3, lod, offset2, texel, 0); + + return texel; +} + +vec4 testSparseTextureGatherLodOffsets() +{ + vec4 texel = vec4(0.0); + + sparseTextureGatherLodOffsetsAMD(s2D, c2, lod, offsets, texel, 0); + sparseTextureGatherLodOffsetsAMD(s2DArray, c3, lod, offsets, texel, 0); + + return texel; +} + +vec4 testSparseImageLoad() +{ + vec4 texel = vec4(0.0); + + sparseImageLoadARB(i2D, ivec2(c2), texel); + sparseImageLoadARB(i3D, ivec3(c3), texel); + sparseImageLoadARB(i2DRect, ivec2(c2), texel); + sparseImageLoadARB(iCube, ivec3(c3), texel); + sparseImageLoadARB(i2DArray, ivec3(c3), texel); + sparseImageLoadARB(iCubeArray, ivec3(c3), texel); + sparseImageLoadARB(i2DMS, ivec2(c2), 1, texel); + sparseImageLoadARB(i2DMSArray, ivec3(c3), 2, texel); + + return texel; +} + +vec4 testSparseTextureClamp() +{ + vec4 texel = vec4(0.0); + + sparseTextureClampARB(s2D, c2, lodClamp, texel); + sparseTextureClampARB(s3D, c3, lodClamp, texel); + sparseTextureClampARB(sCube, c3, lodClamp, texel); + sparseTextureClampARB(s2DShadow, c3, lodClamp, texel.x); + sparseTextureClampARB(sCubeShadow, c4, lodClamp, texel.x); + sparseTextureClampARB(s2DArray, c3, lodClamp, texel); + sparseTextureClampARB(sCubeArray, c4, lodClamp, texel); + sparseTextureClampARB(s2DArrayShadow, c4, lodClamp, texel.x); + sparseTextureClampARB(sCubeArrayShadow, c4, compare, lodClamp, texel.x); + + return texel; +} + +vec4 testTextureClamp() +{ + vec4 texel = vec4(0.0); + + texel += textureClampARB(s1D, c1, lodClamp); + texel += textureClampARB(s2D, c2, lodClamp); + texel += textureClampARB(s3D, c3, lodClamp); + texel += textureClampARB(sCube, c3, lodClamp); + texel.x += textureClampARB(s1DShadow, c3, lodClamp); + texel.x += textureClampARB(s2DShadow, c3, lodClamp); + texel.x += textureClampARB(sCubeShadow, c4, lodClamp); + texel += textureClampARB(s1DArray, c2, lodClamp); + texel += textureClampARB(s2DArray, c3, lodClamp); + texel += textureClampARB(sCubeArray, c4, lodClamp); + texel.x += textureClampARB(s1DArrayShadow, c3, lodClamp); + texel.x += textureClampARB(s2DArrayShadow, c4, lodClamp); + texel.x += textureClampARB(sCubeArrayShadow, c4, compare, lodClamp); + + return texel; +} + +vec4 testSparseTextureOffsetClamp() +{ + vec4 texel = vec4(0.0); + + sparseTextureOffsetClampARB(s2D, c2, offset2, lodClamp, texel); + sparseTextureOffsetClampARB(s3D, c3, offset3, lodClamp, texel); + sparseTextureOffsetClampARB(s2DShadow, c3, offset2, lodClamp, texel.x); + sparseTextureOffsetClampARB(s2DArray, c3, offset2, lodClamp, texel); + sparseTextureOffsetClampARB(s2DArrayShadow, c4, offset2, lodClamp, texel.x); + + return texel; +} + +vec4 testTextureOffsetClamp() +{ + vec4 texel = vec4(0.0); + + texel += textureOffsetClampARB(s1D, c1, offset1, lodClamp); + texel += textureOffsetClampARB(s2D, c2, offset2, lodClamp); + texel += textureOffsetClampARB(s3D, c3, offset3, lodClamp); + texel.x += textureOffsetClampARB(s1DShadow, c3, offset1, lodClamp); + texel.x += textureOffsetClampARB(s2DShadow, c3, offset2, lodClamp); + texel += textureOffsetClampARB(s1DArray, c2, offset1, lodClamp); + texel += textureOffsetClampARB(s2DArray, c3, offset2, lodClamp); + texel.x += textureOffsetClampARB(s1DArrayShadow, c3, offset1, lodClamp); + texel.x += textureOffsetClampARB(s2DArrayShadow, c4, offset2, lodClamp); + + return texel; +} + +vec4 testSparseTextureGradClamp() +{ + vec4 texel = vec4(0.0); + + sparseTextureGradClampARB(s2D, c2, dPdxy2, dPdxy2, lodClamp, texel); + sparseTextureGradClampARB(s3D, c3, dPdxy3, dPdxy3, lodClamp, texel); + sparseTextureGradClampARB(sCube, c3, dPdxy3, dPdxy3, lodClamp, texel); + sparseTextureGradClampARB(s2DShadow, c3, dPdxy2, dPdxy2, lodClamp, texel.x); + sparseTextureGradClampARB(sCubeShadow, c4, dPdxy3, dPdxy3, lodClamp, texel.x); + sparseTextureGradClampARB(s2DArray, c3, dPdxy2, dPdxy2, lodClamp, texel); + sparseTextureGradClampARB(s2DArrayShadow, c4, dPdxy2, dPdxy2, lodClamp, texel.x); + sparseTextureGradClampARB(sCubeArray, c4, dPdxy3, dPdxy3, lodClamp, texel); + + return texel; +} + +vec4 testTextureGradClamp() +{ + vec4 texel = vec4(0.0); + + texel += textureGradClampARB(s1D, c1, dPdxy1, dPdxy1, lodClamp); + texel += textureGradClampARB(s2D, c2, dPdxy2, dPdxy2, lodClamp); + texel += textureGradClampARB(s3D, c3, dPdxy3, dPdxy3, lodClamp); + texel += textureGradClampARB(sCube, c3, dPdxy3, dPdxy3, lodClamp); + texel.x += textureGradClampARB(s1DShadow, c3, dPdxy1, dPdxy1, lodClamp); + texel.x += textureGradClampARB(s2DShadow, c3, dPdxy2, dPdxy2, lodClamp); + texel.x += textureGradClampARB(sCubeShadow, c4, dPdxy3, dPdxy3, lodClamp); + texel += textureGradClampARB(s1DArray, c2, dPdxy1, dPdxy1, lodClamp); + texel += textureGradClampARB(s2DArray, c3, dPdxy2, dPdxy2, lodClamp); + texel.x += textureGradClampARB(s1DArrayShadow, c3, dPdxy1, dPdxy1, lodClamp); + texel.x += textureGradClampARB(s2DArrayShadow, c4, dPdxy2, dPdxy2, lodClamp); + texel += textureGradClampARB(sCubeArray, c4, dPdxy3, dPdxy3, lodClamp); + + return texel; +} + +vec4 testSparseTextureGradOffsetClamp() +{ + vec4 texel = vec4(0.0); + + sparseTextureGradOffsetClampARB(s2D, c2, dPdxy2, dPdxy2, offset2, lodClamp, texel); + sparseTextureGradOffsetClampARB(s3D, c3, dPdxy3, dPdxy3, offset3, lodClamp, texel); + sparseTextureGradOffsetClampARB(s2DShadow, c3, dPdxy2, dPdxy2, offset2, lodClamp, texel.x); + sparseTextureGradOffsetClampARB(s2DArray, c3, dPdxy2, dPdxy2, offset2, lodClamp, texel); + sparseTextureGradOffsetClampARB(s2DArrayShadow, c4, dPdxy2, dPdxy2, offset2, lodClamp, texel.x); + + return texel; +} + +vec4 testTextureGradOffsetClamp() +{ + vec4 texel = vec4(0.0); + + texel += textureGradOffsetClampARB(s1D, c1, dPdxy1, dPdxy1, offset1, lodClamp); + texel += textureGradOffsetClampARB(s2D, c2, dPdxy2, dPdxy2, offset2, lodClamp); + texel += textureGradOffsetClampARB(s3D, c3, dPdxy3, dPdxy3, offset3, lodClamp); + texel.x += textureGradOffsetClampARB(s1DShadow, c3, dPdxy1, dPdxy1, offset1, lodClamp); + texel.x += textureGradOffsetClampARB(s2DShadow, c3, dPdxy2, dPdxy2, offset2, lodClamp); + texel += textureGradOffsetClampARB(s1DArray, c2, dPdxy1, dPdxy1, offset1, lodClamp); + texel += textureGradOffsetClampARB(s2DArray, c3, dPdxy2, dPdxy2, offset2, lodClamp); + texel.x += textureGradOffsetClampARB(s1DArrayShadow, c3, dPdxy1, dPdxy1, offset1, lodClamp); + texel.x += textureGradOffsetClampARB(s2DArrayShadow, c4, dPdxy2, dPdxy2, offset2, lodClamp); + + return texel; +} + +vec4 testCombinedTextureSampler() +{ + vec4 texel = vec4(0.0); + + texel += texture(sampler1D(t1D, s), c1); + texel += texture(sampler2D(t2D, s), c2); + texel += texture(sampler3D(t3D, s), c3); + texel += texture(samplerCube(tCube, s), c3); + texel.x += texture(sampler1DShadow(t1D, sShadow), c3); + texel.x += texture(sampler2DShadow(t2D, sShadow), c3); + texel.x += texture(samplerCubeShadow(tCube, sShadow), c4); + texel += texture(sampler1DArray(t1DArray, s), c2); + texel += texture(sampler2DArray(t2DArray, s), c3); + texel += texture(samplerCubeArray(tCubeArray, s), c4); + texel.x += texture(sampler1DArrayShadow(t1DArray, sShadow), c3); + texel.x += texture(sampler2DArrayShadow(t2DArray, sShadow), c4); + texel += texture(sampler2DRect(t2DRect, s), c2); + texel.x += texture(sampler2DRectShadow(t2DRect, sShadow), c3); + texel.x += texture(samplerCubeArrayShadow(tCubeArray, sShadow), c4, compare); + + return texel; +} + +vec4 testSubpassLoad() +{ + return subpassLoad(subpass) + subpassLoad(subpassMS, 2); +} + +void main() +{ + vec4 result = vec4(0.0); + + result += testTexture(); + result += testTextureProj(); + result += testTextureLod(); + result += testTextureOffset(); + result += testTextureLodOffset(); + result += testTextureProjLodOffset(); + result += testTexelFetch(); + result += testTexelFetchOffset(); + result += testTextureGrad(); + result += testTextureGradOffset(); + result += testTextureProjGrad(); + result += testTextureProjGradoffset(); + result += testTextureGather(); + result += testTextureGatherOffset(); + result += testTextureGatherOffsets(); + result += testTextureGatherLod(); + result += testTextureGatherLodOffset(); + result += testTextureGatherLodOffsets(); + + result += vec4(testTextureSize()); + result.xy += vec2(testTextureQueryLod()); + result.x += testTextureQueryLevels(); + result.x += testTextureSamples(); + + result += testImageLoad(); + testImageStore(result); + + result += testSparseTexture(); + result += testSparseTextureLod(); + result += testSparseTextureOffset(); + result += testSparseTextureLodOffset(); + result += testSparseTextureGrad(); + result += testSparseTextureGradOffset(); + result += testSparseTexelFetch(); + result += testSparseTexelFetchOffset(); + result += testSparseTextureGather(); + result += testSparseTextureGatherOffset(); + result += testSparseTextureGatherOffsets(); + result += testSparseTextureGatherLod(); + result += testSparseTextureGatherLodOffset(); + result += testSparseTextureGatherLodOffsets(); + + result += testSparseImageLoad(); + + result += testSparseTextureClamp(); + result += testTextureClamp(); + result += testSparseTextureOffsetClamp(); + result += testTextureOffsetClamp(); + result += testSparseTextureGrad(); + result += testTextureGrad(); + result += testSparseTextureGradOffsetClamp(); + result += testTextureGradOffsetClamp(); + + result += testCombinedTextureSampler(); + result += testSubpassLoad(); + + fragColor = result; +} + diff --git a/Test/spv.fragmentShaderBarycentric2.frag b/Test/spv.fragmentShaderBarycentric2.frag index 4682e4ef43..2db44af367 100644 --- a/Test/spv.fragmentShaderBarycentric2.frag +++ b/Test/spv.fragmentShaderBarycentric2.frag @@ -4,6 +4,8 @@ precision highp float; layout(location = 0) pervertexNV in float vertexIDs[3]; +layout(location = 1) pervertexNV in float vertexIDs2[3]; + layout(location = 1) out float value; @@ -12,4 +14,8 @@ void main () { gl_BaryCoordNoPerspNV.y * vertexIDs[1] + gl_BaryCoordNoPerspNV.z * vertexIDs[2]); + value += (gl_BaryCoordNoPerspNV.x * vertexIDs2[0] + + gl_BaryCoordNoPerspNV.y * vertexIDs2[1] + + gl_BaryCoordNoPerspNV.z * vertexIDs2[2]); + } diff --git a/Test/spv.fragmentShaderBarycentric4.frag b/Test/spv.fragmentShaderBarycentric4.frag index 5b4510ecda..fd4902f873 100644 --- a/Test/spv.fragmentShaderBarycentric4.frag +++ b/Test/spv.fragmentShaderBarycentric4.frag @@ -4,6 +4,7 @@ precision highp float; layout(location = 0) pervertexEXT in float vertexIDs[3]; +layout(location = 1) pervertexEXT in float vertexIDs2[3]; layout(location = 1) out float value; @@ -12,4 +13,8 @@ void main () { gl_BaryCoordNoPerspEXT.y * vertexIDs[1] + gl_BaryCoordNoPerspEXT.z * vertexIDs[2]); + value += (gl_BaryCoordNoPerspEXT.x * vertexIDs2[0] + + gl_BaryCoordNoPerspEXT.y * vertexIDs2[1] + + gl_BaryCoordNoPerspEXT.z * vertexIDs2[2]); + } diff --git a/Test/spv.intcoopmat.comp b/Test/spv.intcoopmat.comp index 235aa16be2..65aa27a802 100644 --- a/Test/spv.intcoopmat.comp +++ b/Test/spv.intcoopmat.comp @@ -1,117 +1,123 @@ #version 450 core -#extension GL_KHR_memory_scope_semantics : enable -#extension GL_NV_cooperative_matrix : enable -#extension GL_NV_integer_cooperative_matrix : enable -#extension GL_EXT_shader_explicit_arithmetic_types : enable -#extension GL_EXT_buffer_reference : enable - +#extension GL_KHR_memory_scope_semantics : enable +#extension GL_NV_cooperative_matrix : enable +#extension GL_NV_integer_cooperative_matrix : enable +#extension GL_EXT_shader_explicit_arithmetic_types : enable +#extension GL_EXT_buffer_reference : enable + layout (local_size_x = 64, local_size_y = 1, local_size_z = 1) in; - -const int X = 8; -layout(constant_id = 0) const int Y = 2; -const int Z = X*Y; - -icoopmatNV<8, gl_ScopeSubgroup, Z, 8> miC; -icoopmatNV<8, gl_ScopeSubgroup, Z, 8> miC2[3]; -ucoopmatNV<8, gl_ScopeSubgroup, Z, 8> muC; -ucoopmatNV<8, gl_ScopeSubgroup, Z, 8> muC2[3]; - -int iarr[miC.length()]; -int iarr2[miC2[1].length()]; -int uarr[muC.length()]; -int uarr2[muC2[1].length()]; - -const icoopmatNV<32, gl_ScopeSubgroup, Z, 8> mD = icoopmatNV<32, gl_ScopeSubgroup, Z, 8>(1); -const ucoopmatNV<8, gl_ScopeSubgroup, 8, 8> mD2 = ucoopmatNV<8, gl_ScopeSubgroup, 8, 8>(1); - -struct S { int a; int b; int c; }; - -const S s = S(12, 23, 34); - -layout(set = 0, binding = 0, buffer_reference) coherent buffer Block { - uint y[1024*1024]; - uint x[]; -} block; - -layout(set = 0, binding = 0) coherent buffer Block16 { - int8_t y[1024*1024]; - int8_t x[]; - - Block b; -} block8; - -icoopmatNV<8, gl_ScopeSubgroup, 8, 8> ineg(icoopmatNV<8, gl_ScopeSubgroup, 8, 8> m) { return -m; } -ucoopmatNV<8, gl_ScopeSubgroup, 8, 8> umul(ucoopmatNV<8, gl_ScopeSubgroup, 8, 8> m) { return m * uint8_t(2); } - -layout(constant_id = 2) const int SC = 1; -ucoopmatNV<32, gl_ScopeSubgroup, SC, SC> scm[SC][SC]; - -// sized for icoopmatNV<8, gl_ScopeSubgroup, 16, 16> -shared uvec4 shmatrix[16*16*2/16]; - + +const int X = 8; +layout(constant_id = 0) const int Y = 2; +const int Z = X*Y; + +icoopmatNV<8, gl_ScopeSubgroup, Z, 8> miC; +icoopmatNV<8, gl_ScopeSubgroup, Z, 8> miC2[3]; +ucoopmatNV<8, gl_ScopeSubgroup, Z, 8> muC; +ucoopmatNV<8, gl_ScopeSubgroup, Z, 8> muC2[3]; + +int iarr[miC.length()]; +int iarr2[miC2[1].length()]; +int uarr[muC.length()]; +int uarr2[muC2[1].length()]; + +const icoopmatNV<32, gl_ScopeSubgroup, Z, 8> mD = icoopmatNV<32, gl_ScopeSubgroup, Z, 8>(1); +const ucoopmatNV<8, gl_ScopeSubgroup, 8, 8> mD2 = ucoopmatNV<8, gl_ScopeSubgroup, 8, 8>(1); + +struct S { int a; int b; int c; }; + +const S s = S(12, 23, 34); + +layout(set = 0, binding = 0, buffer_reference) coherent buffer Block { + uint y[1024*1024]; + uint x[]; +} block; + +layout(set = 0, binding = 0) coherent buffer Block16 { + int8_t y[1024*1024]; + int8_t x[]; + + Block b; +} block8; + +icoopmatNV<8, gl_ScopeSubgroup, 8, 8> ineg(icoopmatNV<8, gl_ScopeSubgroup, 8, 8> m) { return -m; } +ucoopmatNV<8, gl_ScopeSubgroup, 8, 8> umul(ucoopmatNV<8, gl_ScopeSubgroup, 8, 8> m) { return m * uint8_t(2); } + +layout(constant_id = 2) const int SC = 1; +ucoopmatNV<32, gl_ScopeSubgroup, SC, SC> scm[SC][SC]; + +// sized for icoopmatNV<8, gl_ScopeSubgroup, 16, 16> +shared uvec4 shmatrix[16*16*2/16]; + void main() { - ucoopmatNV<8, gl_ScopeSubgroup, 16, (2>1?8:4)> mu = ucoopmatNV<8, gl_ScopeSubgroup, 16, (2>1?8:4)>(2); - icoopmatNV<8, gl_ScopeSubgroup, 16, (2>1?8:4)> mi = icoopmatNV<8, gl_ScopeSubgroup, 16, (2>1?8:4)>(2); - - mu = mu + mu; - mu = mu - mu; - mi = -mi; - mi = mi * int8_t(2); - - fcoopmatNV<16, gl_ScopeSubgroup, 16, 8> mf16_0 = fcoopmatNV<16, gl_ScopeSubgroup, 16, 8>(mu); - fcoopmatNV<32, gl_ScopeSubgroup, 16, 8> mf32_0 = fcoopmatNV<32, gl_ScopeSubgroup, 16, 8>(mu); - fcoopmatNV<16, gl_ScopeSubgroup, 16, 8> mf16_1 = fcoopmatNV<16, gl_ScopeSubgroup, 16, 8>(mi); - fcoopmatNV<32, gl_ScopeSubgroup, 16, 8> mf32_1 = fcoopmatNV<32, gl_ScopeSubgroup, 16, 8>(mi); - - uint8_t x = mu[1]; - mi[0] = int8_t(x); - - coopMatLoadNV(mi, block.x, 16, 128, false); - coopMatStoreNV(mi, block.x, 16, 128, false); - coopMatLoadNV(mu, block8.x, 16, 128, false); - coopMatStoreNV(mu, block8.x, 16, 128, false); - coopMatLoadNV(mi, block8.b.x, 16, 128, false); - coopMatStoreNV(mi, block8.b.x, 16, 128, false); - - ucoopmatNV<8, gl_ScopeSubgroup, 16, 8> A; - ucoopmatNV<8, gl_ScopeSubgroup, 8, 8> B; - ucoopmatNV<8, gl_ScopeSubgroup, 16, 8> C; - ucoopmatNV<8, gl_ScopeSubgroup, 16, 8> D; - D = coopMatMulAddNV(A, B, C); - - int l = D.length(); - - - icoopmatNV<8, gl_ScopeSubgroup, 16, (2>1?8:4)> a[5]; - a[3][0] = int8_t(1); - - int md1 = mD[1]; - - md1 += (mi += mi)[1234]; - + ucoopmatNV<8, gl_ScopeSubgroup, 16, (2>1?8:4)> mu = ucoopmatNV<8, gl_ScopeSubgroup, 16, (2>1?8:4)>(2); + icoopmatNV<8, gl_ScopeSubgroup, 16, (2>1?8:4)> mi = icoopmatNV<8, gl_ScopeSubgroup, 16, (2>1?8:4)>(2); + + mu = mu + mu; + mu = mu - mu; + mi = -mi; + mi = mi * int8_t(2); + + fcoopmatNV<16, gl_ScopeSubgroup, 16, 8> mf16_0 = fcoopmatNV<16, gl_ScopeSubgroup, 16, 8>(mu); + fcoopmatNV<32, gl_ScopeSubgroup, 16, 8> mf32_0 = fcoopmatNV<32, gl_ScopeSubgroup, 16, 8>(mu); + fcoopmatNV<16, gl_ScopeSubgroup, 16, 8> mf16_1 = fcoopmatNV<16, gl_ScopeSubgroup, 16, 8>(mi); + fcoopmatNV<32, gl_ScopeSubgroup, 16, 8> mf32_1 = fcoopmatNV<32, gl_ScopeSubgroup, 16, 8>(mi); + + uint8_t x = mu[1]; + mi[0] = int8_t(x); + + coopMatLoadNV(mi, block.x, 16, 128, false); + coopMatStoreNV(mi, block.x, 16, 128, false); + coopMatLoadNV(mu, block8.x, 16, 128, false); + coopMatStoreNV(mu, block8.x, 16, 128, false); + coopMatLoadNV(mi, block8.b.x, 16, 128, false); + coopMatStoreNV(mi, block8.b.x, 16, 128, false); + + ucoopmatNV<8, gl_ScopeSubgroup, 16, 8> A; + ucoopmatNV<8, gl_ScopeSubgroup, 8, 8> B; + ucoopmatNV<8, gl_ScopeSubgroup, 16, 8> C; + ucoopmatNV<8, gl_ScopeSubgroup, 16, 8> D; + D = coopMatMulAddNV(A, B, C); + + int l = D.length(); + + + icoopmatNV<8, gl_ScopeSubgroup, 16, (2>1?8:4)> a[5]; + a[3][0] = int8_t(1); + + int md1 = mD[1]; + + md1 += (mi += mi)[1234]; + muC2[0] = muC2[1]; - muC2[1][0] = (miC2[2][0]); - - coopMatLoadNV(mi, block.y, 16, 128, false); - coopMatStoreNV(mi, block.y, 16, 128, false); - coopMatLoadNV(mu, block8.y, 16, 128, false); - coopMatStoreNV(mu, block8.y, 16, 128, false); - - icoopmatNV<8, gl_ScopeSubgroup, 8, 8> p1; - ucoopmatNV<8, gl_ScopeSubgroup, 8, 8> p2; - - p1 = ineg(p1); - p2 = umul(p2); - - p1 /= p1; + muC2[1][0] = (miC2[2][0]); + + coopMatLoadNV(mi, block.y, 16, 128, false); + coopMatStoreNV(mi, block.y, 16, 128, false); + coopMatLoadNV(mu, block8.y, 16, 128, false); + coopMatStoreNV(mu, block8.y, 16, 128, false); + + icoopmatNV<8, gl_ScopeSubgroup, 8, 8> p1; + ucoopmatNV<8, gl_ScopeSubgroup, 8, 8> p2; + + p1 = ineg(p1); + p2 = umul(p2); + + p1 /= p1; p2 /= p2; - - p1 *= int8_t(2); - p2 *= uint8_t(4); - - icoopmatNV<8, gl_ScopeSubgroup, 16, 8> ms; - coopMatLoadNV(ms, shmatrix, 1, 2, false); - coopMatStoreNV(ms, shmatrix, 1, 2, false); - + + p1 *= int8_t(2); + p2 *= uint8_t(4); + + icoopmatNV<8, gl_ScopeSubgroup, 16, 8> ms; + coopMatLoadNV(ms, shmatrix, 1, 2, false); + coopMatStoreNV(ms, shmatrix, 1, 2, false); + + icoopmatNV<16, gl_ScopeSubgroup, 16, 8> i16 = icoopmatNV<16, gl_ScopeSubgroup, 16, 8>(0); + ucoopmatNV<16, gl_ScopeSubgroup, 16, 8> u16 = ucoopmatNV<16, gl_ScopeSubgroup, 16, 8>(0); + coopMatLoadNV(i16, shmatrix, 1, 2, false); + coopMatStoreNV(i16, shmatrix, 1, 2, false); + coopMatLoadNV(u16, shmatrix, 1, 2, false); + coopMatStoreNV(u16, shmatrix, 1, 2, false); } diff --git a/Test/spv.intrinsicsFakeEnable.vert b/Test/spv.intrinsicsFakeEnable.vert new file mode 100644 index 0000000000..a6d6a312f5 --- /dev/null +++ b/Test/spv.intrinsicsFakeEnable.vert @@ -0,0 +1,10 @@ +#version 460 core +#extension GL_EXT_spirv_intrinsics : enable + +// ERROR: Overlapped input location. Make sure it could be detected even +// if GL_EXT_spirv_intrinsics is enabled. +layout(location = 0) in vec4 v4; +layout(location = 0) in vec3 v3; + +void main() { +} diff --git a/Test/spv.intrinsicsSpirvDecorateId.comp b/Test/spv.intrinsicsSpirvDecorateId.comp new file mode 100644 index 0000000000..58a35d613a --- /dev/null +++ b/Test/spv.intrinsicsSpirvDecorateId.comp @@ -0,0 +1,16 @@ +#version 460 core +#extension GL_EXT_spirv_intrinsics: enable + +layout(local_size_x = 1) in; + +layout(binding = 1) uniform CounterBuffer { + uint counter; +} x; + +layout(binding = 0) spirv_decorate_id(extensions = ["SPV_GOOGLE_hlsl_functionality1"], 5634, x) uniform Uniform { + uint y; +}; + +void main() +{ +} diff --git a/Test/spv.intrinsicsSpirvDecorateString.comp b/Test/spv.intrinsicsSpirvDecorateString.comp new file mode 100644 index 0000000000..7de65fce0f --- /dev/null +++ b/Test/spv.intrinsicsSpirvDecorateString.comp @@ -0,0 +1,15 @@ +#version 460 core +#extension GL_EXT_spirv_intrinsics : require + +spirv_decorate_string(extensions = ["SPV_GOOGLE_hlsl_functionality1"], 5635, "foobar") // UserSemantic +spirv_decorate(0) // RelaxedPrecision +float x = 0.5; + +spirv_decorate(0) // RelaxedPrecision +spirv_decorate_string(extensions = ["SPV_GOOGLE_hlsl_functionality1"], 5635, "foobar") // UserSemantic +float y = 1.0; + +layout(local_size_x = 1) in; +void main() +{ +} diff --git a/Test/spv.intrinsicsSpirvTypeWithTypeSpecifier.vert b/Test/spv.intrinsicsSpirvTypeWithTypeSpecifier.vert new file mode 100644 index 0000000000..f17da98eb0 --- /dev/null +++ b/Test/spv.intrinsicsSpirvTypeWithTypeSpecifier.vert @@ -0,0 +1,25 @@ +#version 450 core + +#extension GL_ARB_gpu_shader_int64: enable +#extension GL_EXT_buffer_reference: enable +#extension GL_EXT_spirv_intrinsics: enable + +#define CapabilityPhysicalStorageBufferAddresses 5347 +#define StorageClassPhysicalStorageBuffer 5349 +#define OpTypePointer 32 +#define OpLoad 61 +#define OpConvertUToPtr 120 + +#define uintStoragePtr spirv_type(extensions = ["SPV_EXT_physical_storage_buffer", "SPV_KHR_variable_pointers"], capabilities = [CapabilityPhysicalStorageBufferAddresses], id = OpTypePointer, StorageClassPhysicalStorageBuffer, uint) + +// Just to enable the memory model of physical storage buffer +layout(buffer_reference, std430) buffer Dummy { + uint dummy; +}; + +spirv_instruction(id = OpLoad) uint loadUint(uintStoragePtr pointer, spirv_literal uint memoryOperands, spirv_literal uint alignment); +spirv_instruction(id = OpConvertUToPtr) uintStoragePtr convertToPtr(uint64_t value); + +void main() { + uint value = loadUint(convertToPtr(1), 0x2, 32); +} diff --git a/Test/spv.nv.dmm-allops.comp b/Test/spv.nv.dmm-allops.comp new file mode 100644 index 0000000000..5c6ed360fa --- /dev/null +++ b/Test/spv.nv.dmm-allops.comp @@ -0,0 +1,19 @@ +#version 460 +#extension GL_NV_displacement_micromap : enable +#extension GL_EXT_ray_query : enable +layout(local_size_x = 16) in; +layout(binding = 1) uniform accelerationStructureEXT as; +layout(binding = 0) buffer block { + vec3 op_pos; + vec2 op_bary; +}; +void main() +{ + op_pos = fetchMicroTriangleVertexPositionNV(as, 1, 1, 1, ivec2(0,0)); + op_pos += fetchMicroTriangleVertexPositionNV(as, 1, 1, 1, ivec2(0,1)); + op_pos += fetchMicroTriangleVertexPositionNV(as, 1, 1, 1, ivec2(1,0)); + + op_bary = fetchMicroTriangleVertexBarycentricNV(as, 1, 1, 1, ivec2(0,0)); + op_bary += fetchMicroTriangleVertexBarycentricNV(as, 1, 1, 1, ivec2(0,1)); + op_bary += fetchMicroTriangleVertexBarycentricNV(as, 1, 1, 1, ivec2(1,0)); +} diff --git a/Test/spv.nv.dmm-allops.mesh b/Test/spv.nv.dmm-allops.mesh new file mode 100644 index 0000000000..6cb945b89b --- /dev/null +++ b/Test/spv.nv.dmm-allops.mesh @@ -0,0 +1,20 @@ +#version 460 +#extension GL_NV_displacement_micromap : enable +#extension GL_NV_mesh_shader : enable +#extension GL_EXT_ray_query : enable +layout(max_vertices = 8, max_primitives = 16, triangles) out; +layout(binding = 1) uniform accelerationStructureEXT as; +layout(binding = 0) buffer block { + vec3 op_pos; + vec2 op_bary; +}; +void main() +{ + op_pos = fetchMicroTriangleVertexPositionNV(as, 1, 1, 1, ivec2(0,0)); + op_pos += fetchMicroTriangleVertexPositionNV(as, 1, 1, 1, ivec2(0,1)); + op_pos += fetchMicroTriangleVertexPositionNV(as, 1, 1, 1, ivec2(1,0)); + + op_bary = fetchMicroTriangleVertexBarycentricNV(as, 1, 1, 1, ivec2(0,0)); + op_bary += fetchMicroTriangleVertexBarycentricNV(as, 1, 1, 1, ivec2(0,1)); + op_bary += fetchMicroTriangleVertexBarycentricNV(as, 1, 1, 1, ivec2(1,0)); +} diff --git a/Test/spv.nv.dmm-allops.rahit b/Test/spv.nv.dmm-allops.rahit new file mode 100644 index 0000000000..3edb676f6b --- /dev/null +++ b/Test/spv.nv.dmm-allops.rahit @@ -0,0 +1,26 @@ +#version 460 +#extension GL_EXT_ray_tracing : enable +#extension GL_EXT_ray_query : enable +#extension GL_NV_displacement_micromap : enable +layout(binding = 1) uniform accelerationStructureEXT as; +layout(binding = 0) buffer block { + vec3 op_pos; + vec2 op_bary; + uint op_hit; +}; +void main() +{ + op_pos = gl_HitMicroTriangleVertexPositionsNV[0]; + op_pos += gl_HitMicroTriangleVertexPositionsNV[1]; + op_pos += gl_HitMicroTriangleVertexPositionsNV[2]; + + op_bary = gl_HitMicroTriangleVertexBarycentricsNV[0]; + op_bary += gl_HitMicroTriangleVertexBarycentricsNV[1]; + op_bary += gl_HitMicroTriangleVertexBarycentricsNV[2]; + + op_hit = gl_HitKindEXT; + op_hit &= gl_HitKindFrontFacingTriangleEXT | + gl_HitKindBackFacingTriangleEXT | + gl_HitKindFrontFacingMicroTriangleNV | + gl_HitKindBackFacingMicroTriangleNV; +} diff --git a/Test/spv.nv.dmm-allops.rchit b/Test/spv.nv.dmm-allops.rchit new file mode 100644 index 0000000000..3edb676f6b --- /dev/null +++ b/Test/spv.nv.dmm-allops.rchit @@ -0,0 +1,26 @@ +#version 460 +#extension GL_EXT_ray_tracing : enable +#extension GL_EXT_ray_query : enable +#extension GL_NV_displacement_micromap : enable +layout(binding = 1) uniform accelerationStructureEXT as; +layout(binding = 0) buffer block { + vec3 op_pos; + vec2 op_bary; + uint op_hit; +}; +void main() +{ + op_pos = gl_HitMicroTriangleVertexPositionsNV[0]; + op_pos += gl_HitMicroTriangleVertexPositionsNV[1]; + op_pos += gl_HitMicroTriangleVertexPositionsNV[2]; + + op_bary = gl_HitMicroTriangleVertexBarycentricsNV[0]; + op_bary += gl_HitMicroTriangleVertexBarycentricsNV[1]; + op_bary += gl_HitMicroTriangleVertexBarycentricsNV[2]; + + op_hit = gl_HitKindEXT; + op_hit &= gl_HitKindFrontFacingTriangleEXT | + gl_HitKindBackFacingTriangleEXT | + gl_HitKindFrontFacingMicroTriangleNV | + gl_HitKindBackFacingMicroTriangleNV; +} diff --git a/Test/spv.nv.dmm-allops.rgen b/Test/spv.nv.dmm-allops.rgen new file mode 100644 index 0000000000..447df68aaf --- /dev/null +++ b/Test/spv.nv.dmm-allops.rgen @@ -0,0 +1,24 @@ +#version 460 +#extension GL_NV_displacement_micromap : enable +#extension GL_EXT_ray_query : enable +layout(binding = 1) uniform accelerationStructureEXT as; +layout(binding = 0) buffer block { + vec3 op_pos; + vec2 op_bary; + uint op_hitmask; +}; +void main() +{ + op_pos = fetchMicroTriangleVertexPositionNV(as, 1, 1, 1, ivec2(0,0)); + op_pos += fetchMicroTriangleVertexPositionNV(as, 1, 1, 1, ivec2(0,1)); + op_pos += fetchMicroTriangleVertexPositionNV(as, 1, 1, 1, ivec2(1,0)); + + op_bary = fetchMicroTriangleVertexBarycentricNV(as, 1, 1, 1, ivec2(0,0)); + op_bary += fetchMicroTriangleVertexBarycentricNV(as, 1, 1, 1, ivec2(0,1)); + op_bary += fetchMicroTriangleVertexBarycentricNV(as, 1, 1, 1, ivec2(1,0)); + + op_hitmask = gl_HitKindFrontFacingTriangleEXT | + gl_HitKindBackFacingTriangleEXT | + gl_HitKindFrontFacingMicroTriangleNV | + gl_HitKindBackFacingMicroTriangleNV; +} diff --git a/Test/spv.nv.hitobject-allops.rchit b/Test/spv.nv.hitobject-allops.rchit new file mode 100644 index 0000000000..e7db35931a --- /dev/null +++ b/Test/spv.nv.hitobject-allops.rchit @@ -0,0 +1,55 @@ +#version 460 +#extension GL_EXT_ray_tracing : enable +#extension GL_NV_shader_invocation_reorder : enable +#extension GL_NV_ray_tracing_motion_blur : enable +layout(location = 1) rayPayloadEXT vec4 payload; +layout(location = 2) rayPayloadEXT pBlock { vec2 val1; vec2 val2; }; +layout(location = 2) hitObjectAttributeNV vec2 attr; +layout(location = 3) hitObjectAttributeNV hBlock { float attrval;}; +layout(binding = 0) uniform accelerationStructureEXT as; +layout(binding = 1) buffer block { + float op; +}; +void main() +{ + hitObjectNV hObj; + hitObjectNV hObjHit, hObjMiss, hObjNop; + attr = vec2(1.0); + attrval = 2.0; + hitObjectTraceRayNV(hObj, as, 1U, 1U, 1U, 1U, 1U, vec3(0.5), 0.5, vec3(1), 1.0, 1); + hitObjectTraceRayMotionNV(hObj, as, 1U, 1U, 1U, 1U, 1U, vec3(0.5), 0.5, vec3(1), 1.0, 10.0, 2); + hitObjectRecordHitNV(hObj, as, 1, 1, 1, 2U, 2U, 2U, vec3(1), 1.0f, vec3(2), 2.0f, 2); + hitObjectRecordHitMotionNV(hObj, as, 1, 1, 1, 2U, 2U, 2U, vec3(1), 1.0f, vec3(2), 2.0f, 4.0f, 2); + hitObjectRecordHitWithIndexNV(hObjHit, as, 1, 1, 1, 2U, 2U, vec3(1), 1.0f, vec3(2), 2.0f, 3); + hitObjectRecordHitWithIndexMotionNV(hObjHit, as, 1, 1, 1, 2U, 2U, vec3(1), 1.0f, vec3(2), 2.0f, 4.0f, 3); + hitObjectRecordEmptyNV(hObjNop); + hitObjectRecordMissNV(hObjMiss, 1U, vec3(0.5), 2.0, vec3(1.5), 5.0); + hitObjectRecordMissMotionNV(hObjMiss, 1U, vec3(0.5), 2.0, vec3(1.5), 5.0, 8.0f); + hitObjectExecuteShaderNV(hObjHit, 2); + if (hitObjectIsHitNV(hObj)) { + op = 1.0f; + } else if (hitObjectIsMissNV(hObj)) { + op = 2.0f; + } else if (hitObjectIsEmptyNV(hObj)) { + op = 3.0f; + } + + + float tmin = hitObjectGetRayTMinNV(hObjHit); + float tmax = hitObjectGetRayTMaxNV(hObjHit); + vec3 orig = hitObjectGetWorldRayOriginNV(hObjHit); + vec3 dir = hitObjectGetWorldRayDirectionNV(hObjHit); + vec3 oorig = hitObjectGetObjectRayOriginNV(hObjHit); + vec3 odir = hitObjectGetObjectRayDirectionNV(hObjHit); + mat4x3 otw = hitObjectGetObjectToWorldNV(hObjHit); + mat4x3 wto = hitObjectGetWorldToObjectNV(hObjHit); + int cid = hitObjectGetInstanceCustomIndexNV(hObjMiss); + int iid = hitObjectGetInstanceIdNV(hObjNop); + int pid = hitObjectGetPrimitiveIndexNV(hObj); + int gid = hitObjectGetGeometryIndexNV(hObj); + uint hkind = hitObjectGetHitKindNV(hObj); + hitObjectGetAttributesNV(hObj, 2); + uvec2 handle = hitObjectGetShaderRecordBufferHandleNV(hObj); + uint rid = hitObjectGetShaderBindingTableRecordIndexNV(hObj); + +} diff --git a/Test/spv.nv.hitobject-allops.rgen b/Test/spv.nv.hitobject-allops.rgen new file mode 100644 index 0000000000..f2f37f748c --- /dev/null +++ b/Test/spv.nv.hitobject-allops.rgen @@ -0,0 +1,61 @@ +#version 460 +#extension GL_EXT_ray_tracing : enable +#extension GL_NV_shader_invocation_reorder : enable +#extension GL_NV_ray_tracing_motion_blur : enable +layout(location = 1) rayPayloadEXT vec4 payload; +layout(location = 2) rayPayloadEXT pBlock { vec2 val1; vec2 val2; }; +layout(location = 2) hitObjectAttributeNV vec2 attr; +layout(location = 3) hitObjectAttributeNV hBlock { float attrval;}; +layout(binding = 0) uniform accelerationStructureEXT as; +layout(binding = 1) buffer block { + float op; +}; +void main() +{ + hitObjectNV hObj; + hitObjectNV hObjHit, hObjMiss, hObjNop; + attr = vec2(1.0); + attrval = 2.0; + hitObjectTraceRayNV(hObj, as, 1U, 1U, 1U, 1U, 1U, vec3(0.5), 0.5, vec3(1), 1.0, 1); + hitObjectTraceRayMotionNV(hObj, as, 1U, 1U, 1U, 1U, 1U, vec3(0.5), 0.5, vec3(1), 1.0, 10.0, 2); + hitObjectRecordHitNV(hObj, as, 1, 1, 1, 2U, 2U, 2U, vec3(1), 1.0f, vec3(2), 2.0f, 2); + hitObjectRecordHitMotionNV(hObj, as, 1, 1, 1, 2U, 2U, 2U, vec3(1), 1.0f, vec3(2), 2.0f, 4.0f, 2); + hitObjectRecordHitWithIndexNV(hObjHit, as, 1, 1, 1, 2U, 2U, vec3(1), 1.0f, vec3(2), 2.0f, 3); + hitObjectRecordHitWithIndexMotionNV(hObjHit, as, 1, 1, 1, 2U, 2U, vec3(1), 1.0f, vec3(2), 2.0f, 4.0f, 3); + hitObjectRecordEmptyNV(hObjNop); + hitObjectRecordMissNV(hObjMiss, 1U, vec3(0.5), 2.0, vec3(1.5), 5.0); + hitObjectRecordMissMotionNV(hObjMiss, 1U, vec3(0.5), 2.0, vec3(1.5), 5.0, 8.0f); + hitObjectExecuteShaderNV(hObjHit, 1); + if (hitObjectIsHitNV(hObj)) { + op = 1.0f; + } else if (hitObjectIsMissNV(hObj)) { + op = 2.0f; + } else if (hitObjectIsEmptyNV(hObj)) { + op = 3.0f; + } + + + float tmin = hitObjectGetRayTMinNV(hObjHit); + float tmax = hitObjectGetRayTMaxNV(hObjHit); + vec3 orig = hitObjectGetWorldRayOriginNV(hObjHit); + vec3 dir = hitObjectGetWorldRayDirectionNV(hObjHit); + vec3 oorig = hitObjectGetObjectRayOriginNV(hObjHit); + vec3 odir = hitObjectGetObjectRayDirectionNV(hObjHit); + mat4x3 otw = hitObjectGetObjectToWorldNV(hObjHit); + mat4x3 wto = hitObjectGetWorldToObjectNV(hObjHit); + int cid = hitObjectGetInstanceCustomIndexNV(hObjMiss); + int iid = hitObjectGetInstanceIdNV(hObjNop); + int pid = hitObjectGetPrimitiveIndexNV(hObj); + int gid = hitObjectGetGeometryIndexNV(hObj); + uint hkind = hitObjectGetHitKindNV(hObj); + hitObjectGetAttributesNV(hObj, 2); + uvec2 handle = hitObjectGetShaderRecordBufferHandleNV(hObj); + uint rid = hitObjectGetShaderBindingTableRecordIndexNV(hObj); + reorderThreadNV(4,4); + reorderThreadNV(hObjHit); + reorderThreadNV(hObjHit, 4, 2); + + + + +} diff --git a/Test/spv.nv.hitobject-allops.rmiss b/Test/spv.nv.hitobject-allops.rmiss new file mode 100644 index 0000000000..045e4a5a94 --- /dev/null +++ b/Test/spv.nv.hitobject-allops.rmiss @@ -0,0 +1,58 @@ +#version 460 +#extension GL_EXT_ray_tracing : enable +#extension GL_NV_shader_invocation_reorder : enable +#extension GL_NV_ray_tracing_motion_blur : enable +layout(location = 1) rayPayloadEXT vec4 payload; +layout(location = 2) rayPayloadEXT pBlock { vec2 val1; vec2 val2; }; +layout(location = 2) hitObjectAttributeNV vec2 attr; +layout(location = 3) hitObjectAttributeNV hBlock { float attrval;}; +layout(binding = 0) uniform accelerationStructureEXT as; +layout(binding = 1) buffer block { + float op; +}; +void main() +{ + hitObjectNV hObj; + hitObjectNV hObjHit, hObjMiss, hObjNop; + attr = vec2(1.0); + attrval = 2.0; + hitObjectTraceRayNV(hObj, as, 1U, 1U, 1U, 1U, 1U, vec3(0.5), 0.5, vec3(1), 1.0, 1); + hitObjectTraceRayMotionNV(hObj, as, 1U, 1U, 1U, 1U, 1U, vec3(0.5), 0.5, vec3(1), 1.0, 10.0, 2); + hitObjectRecordHitNV(hObj, as, 1, 1, 1, 2U, 2U, 2U, vec3(1), 1.0f, vec3(2), 2.0f, 2); + hitObjectRecordHitMotionNV(hObj, as, 1, 1, 1, 2U, 2U, 2U, vec3(1), 1.0f, vec3(2), 2.0f, 4.0f, 2); + hitObjectRecordHitWithIndexNV(hObjHit, as, 1, 1, 1, 2U, 2U, vec3(1), 1.0f, vec3(2), 2.0f, 3); + hitObjectRecordHitWithIndexMotionNV(hObjHit, as, 1, 1, 1, 2U, 2U, vec3(1), 1.0f, vec3(2), 2.0f, 4.0f, 3); + hitObjectRecordEmptyNV(hObjNop); + hitObjectRecordMissNV(hObjMiss, 1U, vec3(0.5), 2.0, vec3(1.5), 5.0); + hitObjectRecordMissMotionNV(hObjMiss, 1U, vec3(0.5), 2.0, vec3(1.5), 5.0, 8.0f); + hitObjectExecuteShaderNV(hObjHit, 2); + if (hitObjectIsHitNV(hObj)) { + op = 1.0f; + } else if (hitObjectIsMissNV(hObj)) { + op = 2.0f; + } else if (hitObjectIsEmptyNV(hObj)) { + op = 3.0f; + } + + + float tmin = hitObjectGetRayTMinNV(hObjHit); + float tmax = hitObjectGetRayTMaxNV(hObjHit); + vec3 orig = hitObjectGetWorldRayOriginNV(hObjHit); + vec3 dir = hitObjectGetWorldRayDirectionNV(hObjHit); + vec3 oorig = hitObjectGetObjectRayOriginNV(hObjHit); + vec3 odir = hitObjectGetObjectRayDirectionNV(hObjHit); + mat4x3 otw = hitObjectGetObjectToWorldNV(hObjHit); + mat4x3 wto = hitObjectGetWorldToObjectNV(hObjHit); + int cid = hitObjectGetInstanceCustomIndexNV(hObjMiss); + int iid = hitObjectGetInstanceIdNV(hObjNop); + int pid = hitObjectGetPrimitiveIndexNV(hObj); + int gid = hitObjectGetGeometryIndexNV(hObj); + uint hkind = hitObjectGetHitKindNV(hObj); + hitObjectGetAttributesNV(hObj, 2); + uvec2 handle = hitObjectGetShaderRecordBufferHandleNV(hObj); + uint rid = hitObjectGetShaderBindingTableRecordIndexNV(hObj); + + + + +} diff --git a/Test/spv.pp.line.frag b/Test/spv.pp.line.frag index 464463c343..6f4702f059 100644 --- a/Test/spv.pp.line.frag +++ b/Test/spv.pp.line.frag @@ -1,4 +1,5 @@ #version 140 +#extension GL_GOOGLE_cpp_style_line_directive : require uniform sampler1D texSampler1D; uniform sampler2D texSampler2D; @@ -8,9 +9,20 @@ varying vec4 u; in vec2 coords2D; +#line 0 "header.h" +float myAbs(float x) { + if (x > 0) { + return x; + } + else { + return -x; + } +} + +#line 22 "spv.pp.line.frag" void main() { - float blendscale = 1.789; + float blendscale = myAbs(1.789); float bias = 2.0; float coords1D = 1.789; vec4 color = vec4(0.0, 0.0, 0.0, 0.0); diff --git a/Test/spv.structCopy.comp b/Test/spv.structCopy.comp new file mode 100644 index 0000000000..f915f54434 --- /dev/null +++ b/Test/spv.structCopy.comp @@ -0,0 +1,37 @@ +#version 460 +layout(local_size_x = 512, local_size_y = 1) in; +layout(std430) buffer; + +struct MyStruct { + uint a; + uint b; + uint c; +}; + +layout(binding = 0) buffer MyStructs { + uint count; + MyStruct data[]; +} +my_structs; + +layout(binding = 1) buffer Output { + uint a; + uint b; + uint c; +} +o; + +shared MyStruct s[512]; + +void main() { + s[0] = MyStruct(1, 2, 3); + + uint id = gl_GlobalInvocationID.x; + MyStruct ms = + id > my_structs.count ? s[id - my_structs.count] : my_structs.data[id]; + + atomicAdd(o.a, ms.a); + atomicAdd(o.b, ms.b); + atomicAdd(o.c, ms.c); +} + diff --git a/Test/spv.subgroupSizeARB.frag b/Test/spv.subgroupSizeARB.frag new file mode 100644 index 0000000000..45a1701db1 --- /dev/null +++ b/Test/spv.subgroupSizeARB.frag @@ -0,0 +1,10 @@ +#version 450 +#extension GL_ARB_shader_ballot : enable +#extension GL_KHR_shader_subgroup_basic : enable + +layout(location = 0) out uint result; + +void main (void) +{ + result = gl_SubGroupSizeARB; +} diff --git a/Test/spv.tpipBlockMatchSAD.frag b/Test/spv.tpipBlockMatchSAD.frag new file mode 100644 index 0000000000..832f59d491 --- /dev/null +++ b/Test/spv.tpipBlockMatchSAD.frag @@ -0,0 +1,38 @@ +#version 450 +#extension GL_QCOM_image_processing : require + +precision highp float; + +// fragment shader inputs and outputs +layout (location = 0) in vec4 v_texcoord; + +layout (location = 0) out vec4 fragColor; + +// fragment shader resources +layout(set = 0, binding = 0) uniform texture2DArray tex2DArray_weights; +layout(set = 0, binding = 1) uniform texture2D tex2D_src1; +layout(set = 0, binding = 2) uniform texture2D tex2D_src2; +layout(set = 0, binding = 3) uniform sampler samp; +layout(set = 0, binding = 4) uniform sampler2D target_samp; +layout(set = 0, binding = 5) uniform sampler2D ref_samp; + +void main() +{ + + uvec2 tgt_coords; tgt_coords.x = uint(v_texcoord.x); tgt_coords.x = uint(v_texcoord.y); + uvec2 ref_coords; ref_coords.x = uint(v_texcoord.z); ref_coords.y = uint(v_texcoord.w); + uvec2 blockSize = uvec2(4, 4); + fragColor = textureBlockMatchSADQCOM( + sampler2D(tex2D_src1, samp), // target texture + tgt_coords, // target coords + sampler2D(tex2D_src2, samp), // reference texture + ref_coords, // reference coords + blockSize); // block size + fragColor = textureBlockMatchSADQCOM( + target_samp, // target texture + tgt_coords, // target coords + ref_samp, // reference texture + ref_coords, // reference coords + blockSize); // block size +} + diff --git a/Test/spv.tpipBlockMatchSSD.frag b/Test/spv.tpipBlockMatchSSD.frag new file mode 100644 index 0000000000..aa3ff2a951 --- /dev/null +++ b/Test/spv.tpipBlockMatchSSD.frag @@ -0,0 +1,38 @@ +#version 450 +#extension GL_QCOM_image_processing : require + +precision highp float; + +// fragment shader inputs and outputs +layout (location = 0) in vec4 v_texcoord; + +layout (location = 0) out vec4 fragColor; + +// fragment shader resources +layout(set = 0, binding = 0) uniform texture2DArray tex2DArray_weights; +layout(set = 0, binding = 1) uniform texture2D tex2D_src1; +layout(set = 0, binding = 2) uniform texture2D tex2D_src2; +layout(set = 0, binding = 3) uniform sampler samp; +layout(set = 0, binding = 4) uniform sampler2D target_samp; +layout(set = 0, binding = 5) uniform sampler2D ref_samp; + +void main() +{ + + uvec2 tgt_coords; tgt_coords.x = uint(v_texcoord.x); tgt_coords.x = uint(v_texcoord.y); + uvec2 ref_coords; ref_coords.x = uint(v_texcoord.z); ref_coords.y = uint(v_texcoord.w); + uvec2 blockSize = uvec2(4, 4); + fragColor = textureBlockMatchSSDQCOM( + sampler2D(tex2D_src1, samp), // target texture + tgt_coords, // target coords + sampler2D(tex2D_src2, samp), // reference texture + ref_coords, // reference coords + blockSize); // block size + fragColor = textureBlockMatchSSDQCOM( + target_samp, // target texture + tgt_coords, // target coords + ref_samp, // reference texture + ref_coords, // reference coords + blockSize); // block size +} + diff --git a/Test/spv.tpipBoxFilter.frag b/Test/spv.tpipBoxFilter.frag new file mode 100644 index 0000000000..d86d531e25 --- /dev/null +++ b/Test/spv.tpipBoxFilter.frag @@ -0,0 +1,32 @@ +#version 450 +#extension GL_QCOM_image_processing : require + +precision highp float; + +// fragment shader inputs and outputs +layout (location = 0) in vec4 v_texcoord; + +layout (location = 0) out vec4 fragColor; + +// fragment shader resources +layout(set = 0, binding = 0) uniform texture2DArray tex2DArray_weights; +layout(set = 0, binding = 1) uniform texture2D tex2D_src1; +layout(set = 0, binding = 2) uniform texture2D tex2D_src2; +layout(set = 0, binding = 3) uniform sampler samp; +layout(set = 0, binding = 4) uniform sampler2D tex_samp; + +void main() +{ + + vec2 boxSize = vec2(2.5, 4.5); + fragColor = textureBoxFilterQCOM( + sampler2D(tex2D_src1, samp), // source texture + v_texcoord.xy, // tex coords + boxSize); // box size + fragColor = textureBoxFilterQCOM( + tex_samp, // combined source texture + v_texcoord.xy, // tex coords + boxSize); // box size + +} + diff --git a/Test/spv.tpipSampleWeighted.frag b/Test/spv.tpipSampleWeighted.frag new file mode 100644 index 0000000000..0d10028936 --- /dev/null +++ b/Test/spv.tpipSampleWeighted.frag @@ -0,0 +1,32 @@ +#version 450 +#extension GL_QCOM_image_processing : require + +precision highp float; + +// fragment shader inputs and outputs +layout (location = 0) in vec4 v_texcoord; + +layout (location = 0) out vec4 fragColor; + +// fragment shader resources +layout(set = 0, binding = 0) uniform texture2DArray tex2DArray_weights; +layout(set = 0, binding = 1) uniform texture2D tex2D_src1; +layout(set = 0, binding = 2) uniform texture2D tex2D_src2; +layout(set = 0, binding = 3) uniform sampler samp; +layout(set = 0, binding = 4) uniform sampler2D tex_samp; +layout(set = 0, binding = 5) uniform sampler2DArray tex_samp_array; + +void main() +{ + + fragColor = textureWeightedQCOM( + sampler2D(tex2D_src1, samp), // source texture + v_texcoord.xy, // tex coords + sampler2DArray(tex2DArray_weights, samp)); // weight texture + fragColor = textureWeightedQCOM( + tex_samp, // combined source texture + v_texcoord.xy, // tex coords + tex_samp_array); // combined weight texture + +} + diff --git a/Test/spv.tpipTextureArrays.frag b/Test/spv.tpipTextureArrays.frag new file mode 100644 index 0000000000..332acb318c --- /dev/null +++ b/Test/spv.tpipTextureArrays.frag @@ -0,0 +1,40 @@ +#version 450 +#extension GL_QCOM_image_processing : require + +precision highp float; + +// fragment shader inputs and outputs +layout (location = 0) in vec4 v_texcoord; + +layout (location = 0) out vec4 fragColor; + +// fragment shader resources +layout(set = 0, binding = 3) uniform sampler samp; + + +layout(set = 0, binding = 4) uniform texture2D tex2D_srcs[8]; +layout(set = 0, binding = 5) uniform sampler2D samplers[3]; + +void main() +{ + + uvec2 tgt_coords; tgt_coords.x = uint(v_texcoord.x); tgt_coords.x = uint(v_texcoord.y); + uvec2 ref_coords; ref_coords.x = uint(v_texcoord.z); ref_coords.y = uint(v_texcoord.w); + uvec2 blockSize = uvec2(4, 4); + uint ii = tgt_coords.x % 8; + fragColor = textureBlockMatchSSDQCOM( + samplers[0], // target texture + tgt_coords, // target coords + sampler2D(tex2D_srcs[ii], samp), // reference texture + ref_coords, // reference coords + blockSize); // block size + + fragColor = textureBlockMatchSADQCOM( + sampler2D(tex2D_srcs[1], samp), // target texture + tgt_coords, // target coords + samplers[1], // reference texture + ref_coords, // reference coords + blockSize); // block size + +} + diff --git a/Test/struct.error.frag b/Test/struct.error.frag new file mode 100644 index 0000000000..29aba00b64 --- /dev/null +++ b/Test/struct.error.frag @@ -0,0 +1,14 @@ +#version 460 + +struct A { + float x; +}; + +A test() { + return A(1.0); +} + +void main() { + test().z; // A.z does not exist, causes a crash +} + diff --git a/Test/tokenLength.vert b/Test/tokenLength.vert index 21d446fae4..325fbcbcb0 100644 --- a/Test/tokenLength.vert +++ b/Test/tokenLength.vert @@ -70,3 +70,5 @@ float superF = 1.012345678901234567890123456789012345678901234567890123456789012 #if A000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 #error in super long macro #if #endif + +int BE = 0b01u; // ERROR (not supported by GLSL) diff --git a/Test/validate-shaders.sh b/Test/validate-shaders.sh index 89dc95566b..c841969c51 100755 --- a/Test/validate-shaders.sh +++ b/Test/validate-shaders.sh @@ -4,7 +4,7 @@ # It is not meant to preclude the possible addition of the validator to # glslang. -declare -r EXE='../build/install/bin/glslangValidator' +declare -r EXE='../build/install/bin/glslang' # search common locations for spirv-tools: keep first one for toolsdir in '../External/spirv-tools/build/tools' '../../SPIRV-Tools/build/tools/bin' '/usr/local/bin'; do diff --git a/Test/web.runtests b/Test/web.runtests index 3283dd8331..584b6c5116 100755 --- a/Test/web.runtests +++ b/Test/web.runtests @@ -3,7 +3,7 @@ TESTLIST=web.testlist TARGETDIR=localResults BASEDIR=baseResults -EXE=../build/install/bin/glslangValidator.exe +EXE=../build/install/bin/glslang.exe HASERROR=0 mkdir -p $TARGETDIR diff --git a/WORKSPACE b/WORKSPACE deleted file mode 100644 index 488546c7cd..0000000000 --- a/WORKSPACE +++ /dev/null @@ -1,27 +0,0 @@ -workspace(name = "org_khronos_glslang") -load( - "@bazel_tools//tools/build_defs/repo:http.bzl", - "http_archive", -) - -http_archive( - name = "com_google_googletest", - sha256 = "94c634d499558a76fa649edb13721dce6e98fb1e7018dfaeba3cd7a083945e91", - strip_prefix = "googletest-release-1.10.0", - urls = ["https://github.com/google/googletest/archive/release-1.10.0.zip"], # 3-Oct-2019 -) - -http_archive( - name = "com_googlesource_code_re2", - sha256 = "b885bb965ab4b6cf8718bbb8154d8f6474cd00331481b6d3e390babb3532263e", - strip_prefix = "re2-e860767c86e577b87deadf24cc4567ea83c4f162/", - urls = ["https://github.com/google/re2/archive/e860767c86e577b87deadf24cc4567ea83c4f162.zip"], -) - -http_archive( - name = "com_google_effcee", - build_file = "BUILD.effcee.bazel", - sha256 = "b0c21a01995fdf9792510566d78d5e7fe6f83cb4ba986eba691f4926f127cb34", - strip_prefix = "effcee-8f0a61dc95e0df18c18e0ac56d83b3fa9d2fe90b/", - urls = ["https://github.com/google/effcee/archive/8f0a61dc95e0df18c18e0ac56d83b3fa9d2fe90b.zip"], -) diff --git a/gen_extension_headers.py b/gen_extension_headers.py index 2838c9622e..0638720a07 100755 --- a/gen_extension_headers.py +++ b/gen_extension_headers.py @@ -57,7 +57,7 @@ def generate_main(glsl_files, output_header_file): contents += '\tfor (int i = 0; i < n; i++) {\n' for symbol_name in symbol_name_list: - contents += '\t\tif (strstr(shaders[i], "%s") != NULL) {\n' % (symbol_name) + contents += '\t\tif (strstr(shaders[i], "%s") != nullptr) {\n' % (symbol_name) contents += '\t\t shaderString.append(%s_GLSL);\n' % (symbol_name) contents += '\t\t}\n' diff --git a/glslang/CInterface/glslang_c_interface.cpp b/glslang/CInterface/glslang_c_interface.cpp index 0e691a1f7c..870698f2a8 100644 --- a/glslang/CInterface/glslang_c_interface.cpp +++ b/glslang/CInterface/glslang_c_interface.cpp @@ -33,7 +33,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. #include "glslang/Include/glslang_c_interface.h" #include "StandAlone/DirStackFileIncluder.h" -#include "StandAlone/ResourceLimits.h" +#include "glslang/Public/ResourceLimits.h" #include "glslang/Include/ShHandle.h" #include "glslang/Include/ResourceLimits.h" @@ -80,25 +80,6 @@ typedef struct glslang_program_s { (CallbackIncluder::callbacks::free_include_result) */ class CallbackIncluder : public glslang::TShader::Includer { -public: - /* Wrapper of IncludeResult which stores a glsl_include_result object internally */ - class CallbackIncludeResult : public glslang::TShader::Includer::IncludeResult { - public: - CallbackIncludeResult(const std::string& headerName, const char* const headerData, const size_t headerLength, - void* userData, glsl_include_result_t* includeResult) - : glslang::TShader::Includer::IncludeResult(headerName, headerData, headerLength, userData), - includeResult(includeResult) - { - } - - virtual ~CallbackIncludeResult() {} - - protected: - friend class CallbackIncluder; - - glsl_include_result_t* includeResult; - }; - public: CallbackIncluder(glsl_include_callbacks_t _callbacks, void* _context) : callbacks(_callbacks), context(_context) {} @@ -110,9 +91,7 @@ class CallbackIncluder : public glslang::TShader::Includer { if (this->callbacks.include_system) { glsl_include_result_t* result = this->callbacks.include_system(this->context, headerName, includerName, inclusionDepth); - - return new CallbackIncludeResult(std::string(headerName), result->header_data, result->header_length, - nullptr, result); + return makeIncludeResult(result); } return glslang::TShader::Includer::includeSystem(headerName, includerName, inclusionDepth); @@ -124,9 +103,7 @@ class CallbackIncluder : public glslang::TShader::Includer { if (this->callbacks.include_local) { glsl_include_result_t* result = this->callbacks.include_local(this->context, headerName, includerName, inclusionDepth); - - return new CallbackIncludeResult(std::string(headerName), result->header_data, result->header_length, - nullptr, result); + return makeIncludeResult(result); } return glslang::TShader::Includer::includeLocal(headerName, includerName, inclusionDepth); @@ -139,22 +116,25 @@ class CallbackIncluder : public glslang::TShader::Includer { if (result == nullptr) return; - if (this->callbacks.free_include_result && (result->userData == nullptr)) { - CallbackIncludeResult* innerResult = static_cast(result); - /* use internal free() function */ - this->callbacks.free_include_result(this->context, innerResult->includeResult); - /* ignore internal fields of TShader::Includer::IncludeResult */ - delete result; - return; + if (this->callbacks.free_include_result) { + this->callbacks.free_include_result(this->context, static_cast(result->userData)); } - delete[] static_cast(result->userData); delete result; } private: CallbackIncluder() {} + IncludeResult* makeIncludeResult(glsl_include_result_t* result) { + if (!result) { + return nullptr; + } + + return new glslang::TShader::Includer::IncludeResult( + std::string(result->header_name), result->header_data, result->header_length, result); + } + /* C callback pointers */ glsl_include_callbacks_t callbacks; /* User-defined context */ @@ -192,10 +172,10 @@ static EShLanguage c_shader_stage(glslang_stage_t stage) return EShLangMiss; case GLSLANG_STAGE_CALLABLE_NV: return EShLangCallable; - case GLSLANG_STAGE_TASK_NV: - return EShLangTaskNV; - case GLSLANG_STAGE_MESH_NV: - return EShLangMeshNV; + case GLSLANG_STAGE_TASK: + return EShLangTask; + case GLSLANG_STAGE_MESH: + return EShLangMesh; default: break; } @@ -351,6 +331,10 @@ GLSLANG_EXPORT glslang_shader_t* glslang_shader_create(const glslang_input_t* in return shader; } +GLSLANG_EXPORT void glslang_shader_set_preamble(glslang_shader_t* shader, const char* s) { + shader->shader->setPreamble(s); +} + GLSLANG_EXPORT void glslang_shader_shift_binding(glslang_shader_t* shader, glslang_resource_type_t res, unsigned int base) { const glslang::TResourceType res_type = glslang::TResourceType(res); @@ -390,8 +374,11 @@ GLSLANG_EXPORT const char* glslang_shader_get_preprocessed_code(glslang_shader_t GLSLANG_EXPORT int glslang_shader_preprocess(glslang_shader_t* shader, const glslang_input_t* input) { - DirStackFileIncluder Includer; - /* TODO: use custom callbacks if they are available in 'i->callbacks' */ + DirStackFileIncluder dirStackFileIncluder; + CallbackIncluder callbackIncluder(input->callbacks, input->callbacks_ctx); + glslang::TShader::Includer& Includer = (input->callbacks.include_local||input->callbacks.include_system) + ? static_cast(callbackIncluder) + : static_cast(dirStackFileIncluder); return shader->shader->preprocess( reinterpret_cast(input->resource), input->default_version, diff --git a/glslang/CMakeLists.txt b/glslang/CMakeLists.txt index 45c9813a88..57fb1b9ea5 100644 --- a/glslang/CMakeLists.txt +++ b/glslang/CMakeLists.txt @@ -33,7 +33,7 @@ if(WIN32) add_subdirectory(OSDependent/Windows) -elseif(UNIX OR "${CMAKE_SYSTEM_NAME}" STREQUAL "Fuchsia") +elseif(UNIX OR "${CMAKE_SYSTEM_NAME}" STREQUAL "Fuchsia" OR ANDROID) add_subdirectory(OSDependent/Unix) else() message("unknown platform") @@ -57,7 +57,6 @@ set_property(TARGET GenericCodeGen PROPERTY FOLDER glslang) # MachineIndependent ################################################################################ set(MACHINEINDEPENDENT_SOURCES - MachineIndependent/glslang.m4 MachineIndependent/glslang.y MachineIndependent/glslang_tab.cpp MachineIndependent/attribute.cpp @@ -183,6 +182,30 @@ if(WIN32 AND BUILD_SHARED_LIBS) set_target_properties(glslang PROPERTIES PREFIX "") endif() +################################################################################ +# ResourceLimits +################################################################################ +set(RESOURCELIMITS_SOURCES + ResourceLimits/ResourceLimits.cpp + ResourceLimits/resource_limits_c.cpp +) + +set(RESOURCELIMITS_HEADERS + Public/ResourceLimits.h + Public/resource_limits_c.h +) + +add_library(glslang-default-resource-limits ${RESOURCELIMITS_SOURCES} ${RESOURCELIMITS_HEADERS}) +set_target_properties(glslang-default-resource-limits PROPERTIES + VERSION "${GLSLANG_VERSION}" + SOVERSION "${GLSLANG_VERSION_MAJOR}" + FOLDER glslang + POSITION_INDEPENDENT_CODE ON) + +target_include_directories(glslang-default-resource-limits PUBLIC + $ + $) + ################################################################################ # source_groups ################################################################################ @@ -201,30 +224,33 @@ endif() ################################################################################ if(ENABLE_GLSLANG_INSTALL) install(TARGETS glslang EXPORT glslang-targets) - install(TARGETS MachineIndependent EXPORT glslang-targets) - install(TARGETS GenericCodeGen EXPORT glslang-targets) + if(NOT BUILD_SHARED_LIBS) + install(TARGETS MachineIndependent EXPORT glslang-targets) + install(TARGETS GenericCodeGen EXPORT glslang-targets) - # Backward compatibility - file(WRITE "${CMAKE_CURRENT_BINARY_DIR}/glslangTargets.cmake" " - message(WARNING \"Using `glslangTargets.cmake` is deprecated: use `find_package(glslang)` to find glslang CMake targets.\") + # Backward compatibility + file(WRITE "${CMAKE_CURRENT_BINARY_DIR}/glslangTargets.cmake" " + message(WARNING \"Using `glslangTargets.cmake` is deprecated: use `find_package(glslang)` to find glslang CMake targets.\") - if (NOT TARGET glslang::glslang) - include(\"\${CMAKE_CURRENT_LIST_DIR}/../../${CMAKE_INSTALL_DATADIR}/${PROJECT_NAME}/glslang-targets.cmake\") - endif() + if (NOT TARGET glslang::glslang) + include(\"${CMAKE_INSTALL_FULL_LIBDIR}/cmake/${PROJECT_NAME}/glslang-targets.cmake\") + endif() - if(${BUILD_SHARED_LIBS}) - add_library(glslang ALIAS glslang::glslang) - else() - add_library(glslang ALIAS glslang::glslang) - add_library(MachineIndependent ALIAS glslang::MachineIndependent) - add_library(GenericCodeGen ALIAS glslang::GenericCodeGen) - endif() - ") - install(FILES "${CMAKE_CURRENT_BINARY_DIR}/glslangTargets.cmake" DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake) + if(${BUILD_SHARED_LIBS}) + add_library(glslang ALIAS glslang::glslang) + else() + add_library(glslang ALIAS glslang::glslang) + add_library(MachineIndependent ALIAS glslang::MachineIndependent) + add_library(GenericCodeGen ALIAS glslang::GenericCodeGen) + endif() + ") + install(FILES "${CMAKE_CURRENT_BINARY_DIR}/glslangTargets.cmake" DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake) + endif() set(ALL_HEADERS ${GLSLANG_HEADERS} - ${MACHINEINDEPENDENT_HEADERS}) + ${MACHINEINDEPENDENT_HEADERS} + ${RESOURCELIMITS_HEADERS}) foreach(file ${ALL_HEADERS}) get_filename_component(dir ${file} DIRECTORY) @@ -233,4 +259,18 @@ if(ENABLE_GLSLANG_INSTALL) install(FILES ${GLSLANG_BUILD_INFO_H} DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/glslang) + install(TARGETS glslang-default-resource-limits EXPORT glslang-targets) + + # Backward compatibility + file(WRITE "${CMAKE_CURRENT_BINARY_DIR}/glslang-default-resource-limitsTargets.cmake" " + message(WARNING \"Using `glslang-default-resource-limitsTargets.cmake` is deprecated: use `find_package(glslang)` to find glslang CMake targets.\") + + if (NOT TARGET glslang::glslang-default-resource-limits) + include(\"\${CMAKE_INSTALL_FULL_LIBDIR}/cmake/${PROJECT_NAME}/glslang-targets.cmake\") + endif() + + add_library(glslang-default-resource-limits ALIAS glslang::glslang-default-resource-limits) + ") + install(FILES "${CMAKE_CURRENT_BINARY_DIR}/glslang-default-resource-limitsTargets.cmake" DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake) + endif() diff --git a/glslang/GenericCodeGen/Link.cpp b/glslang/GenericCodeGen/Link.cpp index c38db0f69f..5e28405f04 100644 --- a/glslang/GenericCodeGen/Link.cpp +++ b/glslang/GenericCodeGen/Link.cpp @@ -82,7 +82,7 @@ void DeleteUniformMap(TUniformMap* map) TShHandleBase* ConstructBindings() { - return 0; + return nullptr; } void DeleteBindingList(TShHandleBase* bindingList) diff --git a/glslang/HLSL/hlslAttributes.cpp b/glslang/HLSL/hlslAttributes.cpp index 0cc0d3f4fc..973054931c 100644 --- a/glslang/HLSL/hlslAttributes.cpp +++ b/glslang/HLSL/hlslAttributes.cpp @@ -101,6 +101,8 @@ namespace glslang { if (name == "nonwritable") return EatNonWritable; if (name == "nonreadable") return EatNonReadable; + + if (name == "export") return EatExport; } else if (nameSpace.size() > 0) return EatNone; diff --git a/glslang/HLSL/hlslGrammar.cpp b/glslang/HLSL/hlslGrammar.cpp index bd4af922a0..11c0e45e9d 100644 --- a/glslang/HLSL/hlslGrammar.cpp +++ b/glslang/HLSL/hlslGrammar.cpp @@ -1,6 +1,7 @@ // // Copyright (C) 2016-2018 Google, Inc. // Copyright (C) 2016 LunarG, Inc. +// Copyright (C) 2023 Mobica Limited. // // All rights reserved. // @@ -594,6 +595,7 @@ bool HlslGrammar::acceptControlDeclaration(TIntermNode*& node) // fully_specified_type // : type_specifier // | type_qualifier type_specifier +// | type_specifier type_qualifier // bool HlslGrammar::acceptFullySpecifiedType(TType& type, const TAttributes& attributes) { @@ -605,7 +607,7 @@ bool HlslGrammar::acceptFullySpecifiedType(TType& type, TIntermNode*& nodeList, // type_qualifier TQualifier qualifier; qualifier.clear(); - if (! acceptQualifier(qualifier)) + if (! acceptPreQualifier(qualifier)) return false; TSourceLoc loc = token.loc; @@ -620,6 +622,10 @@ bool HlslGrammar::acceptFullySpecifiedType(TType& type, TIntermNode*& nodeList, return false; } + // type_qualifier + if (! acceptPostQualifier(qualifier)) + return false; + if (type.getBasicType() == EbtBlock) { // the type was a block, which set some parts of the qualifier parseContext.mergeQualifiers(type.getQualifier(), qualifier); @@ -634,7 +640,7 @@ bool HlslGrammar::acceptFullySpecifiedType(TType& type, TIntermNode*& nodeList, parseContext.declareBlock(loc, type); } else { // Some qualifiers are set when parsing the type. Merge those with - // whatever comes from acceptQualifier. + // whatever comes from acceptPreQualifier and acceptPostQualifier. assert(qualifier.layoutFormat == ElfNone); qualifier.layoutFormat = type.getQualifier().layoutFormat; @@ -660,7 +666,7 @@ bool HlslGrammar::acceptFullySpecifiedType(TType& type, TIntermNode*& nodeList, // // Zero or more of these, so this can't return false. // -bool HlslGrammar::acceptQualifier(TQualifier& qualifier) +bool HlslGrammar::acceptPreQualifier(TQualifier& qualifier) { do { switch (peek()) { @@ -766,6 +772,25 @@ bool HlslGrammar::acceptQualifier(TQualifier& qualifier) } while (true); } +// type_qualifier +// : qualifier qualifier ... +// +// Zero or more of these, so this can't return false. +// +bool HlslGrammar::acceptPostQualifier(TQualifier& qualifier) +{ + do { + switch (peek()) { + case EHTokConst: + qualifier.storage = EvqConst; + break; + default: + return true; + } + advanceToken(); + } while (true); +} + // layout_qualifier_list // : LAYOUT LEFT_PAREN layout_qualifier COMMA layout_qualifier ... RIGHT_PAREN // @@ -823,8 +848,10 @@ bool HlslGrammar::acceptLayoutQualifierList(TQualifier& qualifier) // | UINT // | BOOL // -bool HlslGrammar::acceptTemplateVecMatBasicType(TBasicType& basicType) +bool HlslGrammar::acceptTemplateVecMatBasicType(TBasicType& basicType, + TPrecisionQualifier& precision) { + precision = EpqNone; switch (peek()) { case EHTokFloat: basicType = EbtFloat; @@ -842,6 +869,23 @@ bool HlslGrammar::acceptTemplateVecMatBasicType(TBasicType& basicType) case EHTokBool: basicType = EbtBool; break; + case EHTokHalf: + basicType = parseContext.hlslEnable16BitTypes() ? EbtFloat16 : EbtFloat; + break; + case EHTokMin16float: + case EHTokMin10float: + basicType = parseContext.hlslEnable16BitTypes() ? EbtFloat16 : EbtFloat; + precision = EpqMedium; + break; + case EHTokMin16int: + case EHTokMin12int: + basicType = parseContext.hlslEnable16BitTypes() ? EbtInt16 : EbtInt; + precision = EpqMedium; + break; + case EHTokMin16uint: + basicType = parseContext.hlslEnable16BitTypes() ? EbtUint16 : EbtUint; + precision = EpqMedium; + break; default: return false; } @@ -867,7 +911,8 @@ bool HlslGrammar::acceptVectorTemplateType(TType& type) } TBasicType basicType; - if (! acceptTemplateVecMatBasicType(basicType)) { + TPrecisionQualifier precision; + if (! acceptTemplateVecMatBasicType(basicType, precision)) { expected("scalar type"); return false; } @@ -890,7 +935,7 @@ bool HlslGrammar::acceptVectorTemplateType(TType& type) const int vecSizeI = vecSize->getAsConstantUnion()->getConstArray()[0].getIConst(); - new(&type) TType(basicType, EvqTemporary, vecSizeI); + new(&type) TType(basicType, EvqTemporary, precision, vecSizeI); if (vecSizeI == 1) type.makeVector(); @@ -919,7 +964,8 @@ bool HlslGrammar::acceptMatrixTemplateType(TType& type) } TBasicType basicType; - if (! acceptTemplateVecMatBasicType(basicType)) { + TPrecisionQualifier precision; + if (! acceptTemplateVecMatBasicType(basicType, precision)) { expected("scalar type"); return false; } @@ -956,7 +1002,7 @@ bool HlslGrammar::acceptMatrixTemplateType(TType& type) if (! acceptLiteral(cols)) return false; - new(&type) TType(basicType, EvqTemporary, 0, + new(&type) TType(basicType, EvqTemporary, precision, 0, rows->getAsConstantUnion()->getConstArray()[0].getIConst(), cols->getAsConstantUnion()->getConstArray()[0].getIConst()); @@ -2064,6 +2110,251 @@ bool HlslGrammar::acceptType(TType& type, TIntermNode*& nodeList) new(&type) TType(EbtDouble, EvqTemporary, 0, 4, 4); break; + case EHTokMin16float1x1: + new(&type) TType(min16float_bt, EvqTemporary, EpqMedium, 0, 1, 1); + break; + case EHTokMin16float1x2: + new(&type) TType(min16float_bt, EvqTemporary, EpqMedium, 0, 1, 2); + break; + case EHTokMin16float1x3: + new(&type) TType(min16float_bt, EvqTemporary, EpqMedium, 0, 1, 3); + break; + case EHTokMin16float1x4: + new(&type) TType(min16float_bt, EvqTemporary, EpqMedium, 0, 1, 4); + break; + case EHTokMin16float2x1: + new(&type) TType(min16float_bt, EvqTemporary, EpqMedium, 0, 2, 1); + break; + case EHTokMin16float2x2: + new(&type) TType(min16float_bt, EvqTemporary, EpqMedium, 0, 2, 2); + break; + case EHTokMin16float2x3: + new(&type) TType(min16float_bt, EvqTemporary, EpqMedium, 0, 2, 3); + break; + case EHTokMin16float2x4: + new(&type) TType(min16float_bt, EvqTemporary, EpqMedium, 0, 2, 4); + break; + case EHTokMin16float3x1: + new(&type) TType(min16float_bt, EvqTemporary, EpqMedium, 0, 3, 1); + break; + case EHTokMin16float3x2: + new(&type) TType(min16float_bt, EvqTemporary, EpqMedium, 0, 3, 2); + break; + case EHTokMin16float3x3: + new(&type) TType(min16float_bt, EvqTemporary, EpqMedium, 0, 3, 3); + break; + case EHTokMin16float3x4: + new(&type) TType(min16float_bt, EvqTemporary, EpqMedium, 0, 3, 4); + break; + case EHTokMin16float4x1: + new(&type) TType(min16float_bt, EvqTemporary, EpqMedium, 0, 4, 1); + break; + case EHTokMin16float4x2: + new(&type) TType(min16float_bt, EvqTemporary, EpqMedium, 0, 4, 2); + break; + case EHTokMin16float4x3: + new(&type) TType(min16float_bt, EvqTemporary, EpqMedium, 0, 4, 3); + break; + case EHTokMin16float4x4: + new(&type) TType(min16float_bt, EvqTemporary, EpqMedium, 0, 4, 4); + break; + + case EHTokMin10float1x1: + new(&type) TType(min10float_bt, EvqTemporary, EpqMedium, 0, 1, 1); + break; + case EHTokMin10float1x2: + new(&type) TType(min10float_bt, EvqTemporary, EpqMedium, 0, 1, 2); + break; + case EHTokMin10float1x3: + new(&type) TType(min10float_bt, EvqTemporary, EpqMedium, 0, 1, 3); + break; + case EHTokMin10float1x4: + new(&type) TType(min10float_bt, EvqTemporary, EpqMedium, 0, 1, 4); + break; + case EHTokMin10float2x1: + new(&type) TType(min10float_bt, EvqTemporary, EpqMedium, 0, 2, 1); + break; + case EHTokMin10float2x2: + new(&type) TType(min10float_bt, EvqTemporary, EpqMedium, 0, 2, 2); + break; + case EHTokMin10float2x3: + new(&type) TType(min10float_bt, EvqTemporary, EpqMedium, 0, 2, 3); + break; + case EHTokMin10float2x4: + new(&type) TType(min10float_bt, EvqTemporary, EpqMedium, 0, 2, 4); + break; + case EHTokMin10float3x1: + new(&type) TType(min10float_bt, EvqTemporary, EpqMedium, 0, 3, 1); + break; + case EHTokMin10float3x2: + new(&type) TType(min10float_bt, EvqTemporary, EpqMedium, 0, 3, 2); + break; + case EHTokMin10float3x3: + new(&type) TType(min10float_bt, EvqTemporary, EpqMedium, 0, 3, 3); + break; + case EHTokMin10float3x4: + new(&type) TType(min10float_bt, EvqTemporary, EpqMedium, 0, 3, 4); + break; + case EHTokMin10float4x1: + new(&type) TType(min10float_bt, EvqTemporary, EpqMedium, 0, 4, 1); + break; + case EHTokMin10float4x2: + new(&type) TType(min10float_bt, EvqTemporary, EpqMedium, 0, 4, 2); + break; + case EHTokMin10float4x3: + new(&type) TType(min10float_bt, EvqTemporary, EpqMedium, 0, 4, 3); + break; + case EHTokMin10float4x4: + new(&type) TType(min10float_bt, EvqTemporary, EpqMedium, 0, 4, 4); + break; + + case EHTokMin16int1x1: + new(&type) TType(min16int_bt, EvqTemporary, EpqMedium, 0, 1, 1); + break; + case EHTokMin16int1x2: + new(&type) TType(min16int_bt, EvqTemporary, EpqMedium, 0, 1, 2); + break; + case EHTokMin16int1x3: + new(&type) TType(min16int_bt, EvqTemporary, EpqMedium, 0, 1, 3); + break; + case EHTokMin16int1x4: + new(&type) TType(min16int_bt, EvqTemporary, EpqMedium, 0, 1, 4); + break; + case EHTokMin16int2x1: + new(&type) TType(min16int_bt, EvqTemporary, EpqMedium, 0, 2, 1); + break; + case EHTokMin16int2x2: + new(&type) TType(min16int_bt, EvqTemporary, EpqMedium, 0, 2, 2); + break; + case EHTokMin16int2x3: + new(&type) TType(min16int_bt, EvqTemporary, EpqMedium, 0, 2, 3); + break; + case EHTokMin16int2x4: + new(&type) TType(min16int_bt, EvqTemporary, EpqMedium, 0, 2, 4); + break; + case EHTokMin16int3x1: + new(&type) TType(min16int_bt, EvqTemporary, EpqMedium, 0, 3, 1); + break; + case EHTokMin16int3x2: + new(&type) TType(min16int_bt, EvqTemporary, EpqMedium, 0, 3, 2); + break; + case EHTokMin16int3x3: + new(&type) TType(min16int_bt, EvqTemporary, EpqMedium, 0, 3, 3); + break; + case EHTokMin16int3x4: + new(&type) TType(min16int_bt, EvqTemporary, EpqMedium, 0, 3, 4); + break; + case EHTokMin16int4x1: + new(&type) TType(min16int_bt, EvqTemporary, EpqMedium, 0, 4, 1); + break; + case EHTokMin16int4x2: + new(&type) TType(min16int_bt, EvqTemporary, EpqMedium, 0, 4, 2); + break; + case EHTokMin16int4x3: + new(&type) TType(min16int_bt, EvqTemporary, EpqMedium, 0, 4, 3); + break; + case EHTokMin16int4x4: + new(&type) TType(min16int_bt, EvqTemporary, EpqMedium, 0, 4, 4); + break; + + case EHTokMin12int1x1: + new(&type) TType(min12int_bt, EvqTemporary, EpqMedium, 0, 1, 1); + break; + case EHTokMin12int1x2: + new(&type) TType(min12int_bt, EvqTemporary, EpqMedium, 0, 1, 2); + break; + case EHTokMin12int1x3: + new(&type) TType(min12int_bt, EvqTemporary, EpqMedium, 0, 1, 3); + break; + case EHTokMin12int1x4: + new(&type) TType(min12int_bt, EvqTemporary, EpqMedium, 0, 1, 4); + break; + case EHTokMin12int2x1: + new(&type) TType(min12int_bt, EvqTemporary, EpqMedium, 0, 2, 1); + break; + case EHTokMin12int2x2: + new(&type) TType(min12int_bt, EvqTemporary, EpqMedium, 0, 2, 2); + break; + case EHTokMin12int2x3: + new(&type) TType(min12int_bt, EvqTemporary, EpqMedium, 0, 2, 3); + break; + case EHTokMin12int2x4: + new(&type) TType(min12int_bt, EvqTemporary, EpqMedium, 0, 2, 4); + break; + case EHTokMin12int3x1: + new(&type) TType(min12int_bt, EvqTemporary, EpqMedium, 0, 3, 1); + break; + case EHTokMin12int3x2: + new(&type) TType(min12int_bt, EvqTemporary, EpqMedium, 0, 3, 2); + break; + case EHTokMin12int3x3: + new(&type) TType(min12int_bt, EvqTemporary, EpqMedium, 0, 3, 3); + break; + case EHTokMin12int3x4: + new(&type) TType(min12int_bt, EvqTemporary, EpqMedium, 0, 3, 4); + break; + case EHTokMin12int4x1: + new(&type) TType(min12int_bt, EvqTemporary, EpqMedium, 0, 4, 1); + break; + case EHTokMin12int4x2: + new(&type) TType(min12int_bt, EvqTemporary, EpqMedium, 0, 4, 2); + break; + case EHTokMin12int4x3: + new(&type) TType(min12int_bt, EvqTemporary, EpqMedium, 0, 4, 3); + break; + case EHTokMin12int4x4: + new(&type) TType(min12int_bt, EvqTemporary, EpqMedium, 0, 4, 4); + break; + + case EHTokMin16uint1x1: + new(&type) TType(min16uint_bt, EvqTemporary, EpqMedium, 0, 1, 1); + break; + case EHTokMin16uint1x2: + new(&type) TType(min16uint_bt, EvqTemporary, EpqMedium, 0, 1, 2); + break; + case EHTokMin16uint1x3: + new(&type) TType(min16uint_bt, EvqTemporary, EpqMedium, 0, 1, 3); + break; + case EHTokMin16uint1x4: + new(&type) TType(min16uint_bt, EvqTemporary, EpqMedium, 0, 1, 4); + break; + case EHTokMin16uint2x1: + new(&type) TType(min16uint_bt, EvqTemporary, EpqMedium, 0, 2, 1); + break; + case EHTokMin16uint2x2: + new(&type) TType(min16uint_bt, EvqTemporary, EpqMedium, 0, 2, 2); + break; + case EHTokMin16uint2x3: + new(&type) TType(min16uint_bt, EvqTemporary, EpqMedium, 0, 2, 3); + break; + case EHTokMin16uint2x4: + new(&type) TType(min16uint_bt, EvqTemporary, EpqMedium, 0, 2, 4); + break; + case EHTokMin16uint3x1: + new(&type) TType(min16uint_bt, EvqTemporary, EpqMedium, 0, 3, 1); + break; + case EHTokMin16uint3x2: + new(&type) TType(min16uint_bt, EvqTemporary, EpqMedium, 0, 3, 2); + break; + case EHTokMin16uint3x3: + new(&type) TType(min16uint_bt, EvqTemporary, EpqMedium, 0, 3, 3); + break; + case EHTokMin16uint3x4: + new(&type) TType(min16uint_bt, EvqTemporary, EpqMedium, 0, 3, 4); + break; + case EHTokMin16uint4x1: + new(&type) TType(min16uint_bt, EvqTemporary, EpqMedium, 0, 4, 1); + break; + case EHTokMin16uint4x2: + new(&type) TType(min16uint_bt, EvqTemporary, EpqMedium, 0, 4, 2); + break; + case EHTokMin16uint4x3: + new(&type) TType(min16uint_bt, EvqTemporary, EpqMedium, 0, 4, 3); + break; + case EHTokMin16uint4x4: + new(&type) TType(min16uint_bt, EvqTemporary, EpqMedium, 0, 4, 4); + break; + default: return false; } @@ -3428,7 +3719,7 @@ bool HlslGrammar::acceptCompoundStatement(TIntermNode*& retStatement) } } if (compoundStatement) - compoundStatement->setOperator(EOpSequence); + compoundStatement->setOperator(intermediate.getDebugInfo() ? EOpScope : EOpSequence); retStatement = compoundStatement; @@ -3794,7 +4085,7 @@ bool HlslGrammar::acceptIterationStatement(TIntermNode*& statement, const TAttri parseContext.unnestLooping(); --parseContext.controlFlowNestingLevel; - loopNode = intermediate.addLoop(statement, condition, 0, false, loc); + loopNode = intermediate.addLoop(statement, condition, nullptr, false, loc); statement = loopNode; break; diff --git a/glslang/HLSL/hlslGrammar.h b/glslang/HLSL/hlslGrammar.h index 27706b2b9b..cfe294bc0d 100644 --- a/glslang/HLSL/hlslGrammar.h +++ b/glslang/HLSL/hlslGrammar.h @@ -1,6 +1,7 @@ // // Copyright (C) 2016-2018 Google, Inc. // Copyright (C) 2016 LunarG, Inc. +// Copyright (C) 2023 Mobica Limited. // // All rights reserved. // @@ -72,11 +73,12 @@ namespace glslang { bool acceptSamplerState(); bool acceptFullySpecifiedType(TType&, const TAttributes&); bool acceptFullySpecifiedType(TType&, TIntermNode*& nodeList, const TAttributes&, bool forbidDeclarators = false); - bool acceptQualifier(TQualifier&); + bool acceptPreQualifier(TQualifier&); + bool acceptPostQualifier(TQualifier&); bool acceptLayoutQualifierList(TQualifier&); bool acceptType(TType&); bool acceptType(TType&, TIntermNode*& nodeList); - bool acceptTemplateVecMatBasicType(TBasicType&); + bool acceptTemplateVecMatBasicType(TBasicType&, TPrecisionQualifier&); bool acceptVectorTemplateType(TType&); bool acceptMatrixTemplateType(TType&); bool acceptTessellationDeclType(TBuiltInVariable&); diff --git a/glslang/HLSL/hlslParseHelper.cpp b/glslang/HLSL/hlslParseHelper.cpp index ffa1d7a650..ac0dee50ca 100644 --- a/glslang/HLSL/hlslParseHelper.cpp +++ b/glslang/HLSL/hlslParseHelper.cpp @@ -1177,10 +1177,13 @@ void HlslParseContext::flatten(const TVariable& variable, bool linkage, bool arr if (type.isBuiltIn() && !type.isStruct()) return; + auto entry = flattenMap.insert(std::make_pair(variable.getUniqueId(), TFlattenData(type.getQualifier().layoutBinding, type.getQualifier().layoutLocation))); + if (type.isStruct() && type.getStruct()->size()==0) + return; // if flattening arrayed io struct, array each member of dereferenced type if (arrayed) { const TType dereferencedType(type, 0); @@ -1596,7 +1599,7 @@ void HlslParseContext::handleFunctionDeclarator(const TSourceLoc& loc, TFunction // bool builtIn; TSymbol* symbol = symbolTable.find(function.getMangledName(), &builtIn); - const TFunction* prevDec = symbol ? symbol->getAsFunction() : 0; + const TFunction* prevDec = symbol ? symbol->getAsFunction() : nullptr; if (prototype) { // All built-in functions are defined, even though they don't have a body. @@ -2442,6 +2445,11 @@ void HlslParseContext::remapNonEntryPointIO(TFunction& function) clearUniformInputOutput(function[i].type->getQualifier()); } +TIntermNode* HlslParseContext::handleDeclare(const TSourceLoc& loc, TIntermTyped* var) +{ + return intermediate.addUnaryNode(EOpDeclare, var, loc, TType(EbtVoid)); +} + // Handle function returns, including type conversions to the function return type // if necessary. TIntermNode* HlslParseContext::handleReturnValue(const TSourceLoc& loc, TIntermTyped* value) @@ -2467,7 +2475,7 @@ TIntermNode* HlslParseContext::handleReturnValue(const TSourceLoc& loc, TIntermT void HlslParseContext::handleFunctionArgument(TFunction* function, TIntermTyped*& arguments, TIntermTyped* newArg) { - TParameter param = { 0, new TType, nullptr }; + TParameter param = { nullptr, new TType, nullptr }; param.type->shallowCopy(newArg->getType()); function->addParameter(param); @@ -7560,7 +7568,6 @@ const TFunction* HlslParseContext::findFunction(const TSourceLoc& loc, TFunction candidateList[0]->getBuiltInOp() == EOpMethodRestartStrip || candidateList[0]->getBuiltInOp() == EOpMethodIncrementCounter || candidateList[0]->getBuiltInOp() == EOpMethodDecrementCounter || - candidateList[0]->getBuiltInOp() == EOpMethodAppend || candidateList[0]->getBuiltInOp() == EOpMethodConsume)) { return candidateList[0]; } @@ -7785,18 +7792,18 @@ const TFunction* HlslParseContext::findFunction(const TSourceLoc& loc, TFunction // Handle aggregates: put all args into the new function call for (int arg = 0; arg < int(args->getAsAggregate()->getSequence().size()); ++arg) { // TODO: But for constness, we could avoid the new & shallowCopy, and use the pointer directly. - TParameter param = { 0, new TType, nullptr }; + TParameter param = { nullptr, new TType, nullptr }; param.type->shallowCopy(args->getAsAggregate()->getSequence()[arg]->getAsTyped()->getType()); convertedCall.addParameter(param); } } else if (args->getAsUnaryNode()) { // Handle unaries: put all args into the new function call - TParameter param = { 0, new TType, nullptr }; + TParameter param = { nullptr, new TType, nullptr }; param.type->shallowCopy(args->getAsUnaryNode()->getOperand()->getAsTyped()->getType()); convertedCall.addParameter(param); } else if (args->getAsTyped()) { // Handle bare e.g, floats, not in an aggregate. - TParameter param = { 0, new TType, nullptr }; + TParameter param = { nullptr, new TType, nullptr }; param.type->shallowCopy(args->getAsTyped()->getType()); convertedCall.addParameter(param); } else { @@ -8035,11 +8042,16 @@ TIntermNode* HlslParseContext::declareVariable(const TSourceLoc& loc, const TStr if (flattenVar) flatten(*symbol->getAsVariable(), symbolTable.atGlobalLevel()); - if (initializer == nullptr) - return nullptr; + TVariable* variable = symbol->getAsVariable(); + + if (initializer == nullptr) { + if (intermediate.getDebugInfo()) + return executeDeclaration(loc, variable); + else + return nullptr; + } // Deal with initializer - TVariable* variable = symbol->getAsVariable(); if (variable == nullptr) { error(loc, "initializer requires a variable, not a member", identifier.c_str(), ""); return nullptr; @@ -8106,6 +8118,24 @@ TVariable* HlslParseContext::declareNonArray(const TSourceLoc& loc, const TStrin return nullptr; } +// Return a declaration of a temporary variable +// +// This is used to force a variable to be declared in the correct scope +// when debug information is being generated. + +TIntermNode* HlslParseContext::executeDeclaration(const TSourceLoc& loc, TVariable* variable) +{ + // + // Identifier must be of type temporary. + // + TStorageQualifier qualifier = variable->getType().getQualifier().storage; + if (qualifier != EvqTemporary) + return nullptr; + + TIntermSymbol* intermSymbol = intermediate.addSymbol(*variable, loc); + return handleDeclare(loc, intermSymbol); +} + // // Handle all types of initializers from the grammar. // @@ -9018,7 +9048,8 @@ void HlslParseContext::fixBlockUniformOffsets(const TQualifier& qualifier, TType // "The specified offset must be a multiple // of the base alignment of the type of the block member it qualifies, or a compile-time error results." if (! IsMultipleOfPow2(memberQualifier.layoutOffset, memberAlignment)) - error(memberLoc, "must be a multiple of the member's alignment", "offset", ""); + error(memberLoc, "must be a multiple of the member's alignment", "offset", + "(layout offset = %d | member alignment = %d)", memberQualifier.layoutOffset, memberAlignment); // "The offset qualifier forces the qualified member to start at or after the specified // integral-constant expression, which will be its byte offset from the beginning of the buffer. diff --git a/glslang/HLSL/hlslParseHelper.h b/glslang/HLSL/hlslParseHelper.h index 8bebb0e2b2..97c52d453a 100644 --- a/glslang/HLSL/hlslParseHelper.h +++ b/glslang/HLSL/hlslParseHelper.h @@ -87,6 +87,7 @@ class HlslParseContext : public TParseContextBase { void handleFunctionBody(const TSourceLoc&, TFunction&, TIntermNode* functionBody, TIntermNode*& node); void remapEntryPointIO(TFunction& function, TVariable*& returnValue, TVector& inputs, TVector& outputs); void remapNonEntryPointIO(TFunction& function); + TIntermNode* handleDeclare(const TSourceLoc&, TIntermTyped*); TIntermNode* handleReturnValue(const TSourceLoc&, TIntermTyped*); void handleFunctionArgument(TFunction*, TIntermTyped*& arguments, TIntermTyped* newArg); TIntermTyped* handleAssign(const TSourceLoc&, TOperator, TIntermTyped* left, TIntermTyped* right); @@ -146,14 +147,14 @@ class HlslParseContext : public TParseContextBase { void declareTypedef(const TSourceLoc&, const TString& identifier, const TType&); void declareStruct(const TSourceLoc&, TString& structName, TType&); TSymbol* lookupUserType(const TString&, TType&); - TIntermNode* declareVariable(const TSourceLoc&, const TString& identifier, TType&, TIntermTyped* initializer = 0); + TIntermNode* declareVariable(const TSourceLoc&, const TString& identifier, TType&, TIntermTyped* initializer = nullptr); void lengthenList(const TSourceLoc&, TIntermSequence& list, int size, TIntermTyped* scalarInit); TIntermTyped* handleConstructor(const TSourceLoc&, TIntermTyped*, const TType&); TIntermTyped* addConstructor(const TSourceLoc&, TIntermTyped*, const TType&); TIntermTyped* convertArray(TIntermTyped*, const TType&); TIntermTyped* constructAggregate(TIntermNode*, const TType&, int, const TSourceLoc&); TIntermTyped* constructBuiltIn(const TType&, TOperator, TIntermTyped*, const TSourceLoc&, bool subset); - void declareBlock(const TSourceLoc&, TType&, const TString* instanceName = 0); + void declareBlock(const TSourceLoc&, TType&, const TString* instanceName = nullptr); void declareStructBufferCounter(const TSourceLoc& loc, const TType& bufferType, const TString& name); void fixBlockLocations(const TSourceLoc&, TQualifier&, TTypeList&, bool memberWithLocation, bool memberWithoutLocation); void fixXfbOffsets(TQualifier&, TTypeList&); @@ -170,10 +171,10 @@ class HlslParseContext : public TParseContextBase { void unnestAnnotations() { --annotationNestingLevel; } int getAnnotationNestingLevel() { return annotationNestingLevel; } void pushScope() { symbolTable.push(); } - void popScope() { symbolTable.pop(0); } + void popScope() { symbolTable.pop(nullptr); } void pushThisScope(const TType&, const TVector&); - void popThisScope() { symbolTable.pop(0); } + void popThisScope() { symbolTable.pop(nullptr); } void pushImplicitThis(TVariable* thisParameter) { implicitThisStack.push_back(thisParameter); } void popImplicitThis() { implicitThisStack.pop_back(); } @@ -243,6 +244,7 @@ class HlslParseContext : public TParseContextBase { TIntermSymbol* makeInternalVariableNode(const TSourceLoc&, const char* name, const TType&) const; TVariable* declareNonArray(const TSourceLoc&, const TString& identifier, const TType&, bool track); void declareArray(const TSourceLoc&, const TString& identifier, const TType&, TSymbol*&, bool track); + TIntermNode* executeDeclaration(const TSourceLoc&, TVariable* variable); TIntermNode* executeInitializer(const TSourceLoc&, TIntermTyped* initializer, TVariable* variable); TIntermTyped* convertInitializerList(const TSourceLoc&, const TType&, TIntermTyped* initializer, TIntermTyped* scalarInit); bool isScalarConstructor(const TIntermNode*); diff --git a/glslang/HLSL/hlslParseables.cpp b/glslang/HLSL/hlslParseables.cpp index 15918dc376..8fb1d2909c 100644 --- a/glslang/HLSL/hlslParseables.cpp +++ b/glslang/HLSL/hlslParseables.cpp @@ -564,8 +564,8 @@ void TBuiltInParseablesHlsl::initialize(int /*version*/, EProfile /*profile*/, c { "GetRenderTargetSamplePosition", "V2", "F", "V1", "I", EShLangAll, false }, { "GroupMemoryBarrier", nullptr, nullptr, "-", "-", EShLangCS, false }, { "GroupMemoryBarrierWithGroupSync", nullptr, nullptr, "-", "-", EShLangCS, false }, - { "InterlockedAdd", "-", "-", "SVM,,>", "UI,,", EShLangPSCS, false }, - { "InterlockedAdd", "-", "-", "SVM,", "UI,", EShLangPSCS, false }, + { "InterlockedAdd", "-", "-", "SVM,,>", "FUI,,", EShLangPSCS, false }, + { "InterlockedAdd", "-", "-", "SVM,", "FUI,", EShLangPSCS, false }, { "InterlockedAnd", "-", "-", "SVM,,>", "UI,,", EShLangPSCS, false }, { "InterlockedAnd", "-", "-", "SVM,", "UI,", EShLangPSCS, false }, { "InterlockedCompareExchange", "-", "-", "SVM,,,>", "UI,,,", EShLangPSCS, false }, diff --git a/glslang/HLSL/hlslScanContext.cpp b/glslang/HLSL/hlslScanContext.cpp index fc62672f4e..823b17aa3f 100644 --- a/glslang/HLSL/hlslScanContext.cpp +++ b/glslang/HLSL/hlslScanContext.cpp @@ -312,6 +312,86 @@ void HlslScanContext::fillInKeywordMap() (*KeywordMap)["double4x2"] = EHTokDouble4x2; (*KeywordMap)["double4x3"] = EHTokDouble4x3; (*KeywordMap)["double4x4"] = EHTokDouble4x4; + (*KeywordMap)["min16float1x1"] = EHTokMin16float1x1; + (*KeywordMap)["min16float1x2"] = EHTokMin16float1x2; + (*KeywordMap)["min16float1x3"] = EHTokMin16float1x3; + (*KeywordMap)["min16float1x4"] = EHTokMin16float1x4; + (*KeywordMap)["min16float2x1"] = EHTokMin16float2x1; + (*KeywordMap)["min16float2x2"] = EHTokMin16float2x2; + (*KeywordMap)["min16float2x3"] = EHTokMin16float2x3; + (*KeywordMap)["min16float2x4"] = EHTokMin16float2x4; + (*KeywordMap)["min16float3x1"] = EHTokMin16float3x1; + (*KeywordMap)["min16float3x2"] = EHTokMin16float3x2; + (*KeywordMap)["min16float3x3"] = EHTokMin16float3x3; + (*KeywordMap)["min16float3x4"] = EHTokMin16float3x4; + (*KeywordMap)["min16float4x1"] = EHTokMin16float4x1; + (*KeywordMap)["min16float4x2"] = EHTokMin16float4x2; + (*KeywordMap)["min16float4x3"] = EHTokMin16float4x3; + (*KeywordMap)["min16float4x4"] = EHTokMin16float4x4; + (*KeywordMap)["min10float1x1"] = EHTokMin10float1x1; + (*KeywordMap)["min10float1x2"] = EHTokMin10float1x2; + (*KeywordMap)["min10float1x3"] = EHTokMin10float1x3; + (*KeywordMap)["min10float1x4"] = EHTokMin10float1x4; + (*KeywordMap)["min10float2x1"] = EHTokMin10float2x1; + (*KeywordMap)["min10float2x2"] = EHTokMin10float2x2; + (*KeywordMap)["min10float2x3"] = EHTokMin10float2x3; + (*KeywordMap)["min10float2x4"] = EHTokMin10float2x4; + (*KeywordMap)["min10float3x1"] = EHTokMin10float3x1; + (*KeywordMap)["min10float3x2"] = EHTokMin10float3x2; + (*KeywordMap)["min10float3x3"] = EHTokMin10float3x3; + (*KeywordMap)["min10float3x4"] = EHTokMin10float3x4; + (*KeywordMap)["min10float4x1"] = EHTokMin10float4x1; + (*KeywordMap)["min10float4x2"] = EHTokMin10float4x2; + (*KeywordMap)["min10float4x3"] = EHTokMin10float4x3; + (*KeywordMap)["min10float4x4"] = EHTokMin10float4x4; + (*KeywordMap)["min16int1x1"] = EHTokMin16int1x1; + (*KeywordMap)["min16int1x2"] = EHTokMin16int1x2; + (*KeywordMap)["min16int1x3"] = EHTokMin16int1x3; + (*KeywordMap)["min16int1x4"] = EHTokMin16int1x4; + (*KeywordMap)["min16int2x1"] = EHTokMin16int2x1; + (*KeywordMap)["min16int2x2"] = EHTokMin16int2x2; + (*KeywordMap)["min16int2x3"] = EHTokMin16int2x3; + (*KeywordMap)["min16int2x4"] = EHTokMin16int2x4; + (*KeywordMap)["min16int3x1"] = EHTokMin16int3x1; + (*KeywordMap)["min16int3x2"] = EHTokMin16int3x2; + (*KeywordMap)["min16int3x3"] = EHTokMin16int3x3; + (*KeywordMap)["min16int3x4"] = EHTokMin16int3x4; + (*KeywordMap)["min16int4x1"] = EHTokMin16int4x1; + (*KeywordMap)["min16int4x2"] = EHTokMin16int4x2; + (*KeywordMap)["min16int4x3"] = EHTokMin16int4x3; + (*KeywordMap)["min16int4x4"] = EHTokMin16int4x4; + (*KeywordMap)["min12int1x1"] = EHTokMin12int1x1; + (*KeywordMap)["min12int1x2"] = EHTokMin12int1x2; + (*KeywordMap)["min12int1x3"] = EHTokMin12int1x3; + (*KeywordMap)["min12int1x4"] = EHTokMin12int1x4; + (*KeywordMap)["min12int2x1"] = EHTokMin12int2x1; + (*KeywordMap)["min12int2x2"] = EHTokMin12int2x2; + (*KeywordMap)["min12int2x3"] = EHTokMin12int2x3; + (*KeywordMap)["min12int2x4"] = EHTokMin12int2x4; + (*KeywordMap)["min12int3x1"] = EHTokMin12int3x1; + (*KeywordMap)["min12int3x2"] = EHTokMin12int3x2; + (*KeywordMap)["min12int3x3"] = EHTokMin12int3x3; + (*KeywordMap)["min12int3x4"] = EHTokMin12int3x4; + (*KeywordMap)["min12int4x1"] = EHTokMin12int4x1; + (*KeywordMap)["min12int4x2"] = EHTokMin12int4x2; + (*KeywordMap)["min12int4x3"] = EHTokMin12int4x3; + (*KeywordMap)["min12int4x4"] = EHTokMin12int4x4; + (*KeywordMap)["min16uint1x1"] = EHTokMin16uint1x1; + (*KeywordMap)["min16uint1x2"] = EHTokMin16uint1x2; + (*KeywordMap)["min16uint1x3"] = EHTokMin16uint1x3; + (*KeywordMap)["min16uint1x4"] = EHTokMin16uint1x4; + (*KeywordMap)["min16uint2x1"] = EHTokMin16uint2x1; + (*KeywordMap)["min16uint2x2"] = EHTokMin16uint2x2; + (*KeywordMap)["min16uint2x3"] = EHTokMin16uint2x3; + (*KeywordMap)["min16uint2x4"] = EHTokMin16uint2x4; + (*KeywordMap)["min16uint3x1"] = EHTokMin16uint3x1; + (*KeywordMap)["min16uint3x2"] = EHTokMin16uint3x2; + (*KeywordMap)["min16uint3x3"] = EHTokMin16uint3x3; + (*KeywordMap)["min16uint3x4"] = EHTokMin16uint3x4; + (*KeywordMap)["min16uint4x1"] = EHTokMin16uint4x1; + (*KeywordMap)["min16uint4x2"] = EHTokMin16uint4x2; + (*KeywordMap)["min16uint4x3"] = EHTokMin16uint4x3; + (*KeywordMap)["min16uint4x4"] = EHTokMin16uint4x4; (*KeywordMap)["sampler"] = EHTokSampler; (*KeywordMap)["sampler1D"] = EHTokSampler1d; @@ -806,6 +886,86 @@ EHlslTokenClass HlslScanContext::tokenizeIdentifier() case EHTokDouble4x2: case EHTokDouble4x3: case EHTokDouble4x4: + case EHTokMin16float1x1: + case EHTokMin16float1x2: + case EHTokMin16float1x3: + case EHTokMin16float1x4: + case EHTokMin16float2x1: + case EHTokMin16float2x2: + case EHTokMin16float2x3: + case EHTokMin16float2x4: + case EHTokMin16float3x1: + case EHTokMin16float3x2: + case EHTokMin16float3x3: + case EHTokMin16float3x4: + case EHTokMin16float4x1: + case EHTokMin16float4x2: + case EHTokMin16float4x3: + case EHTokMin16float4x4: + case EHTokMin10float1x1: + case EHTokMin10float1x2: + case EHTokMin10float1x3: + case EHTokMin10float1x4: + case EHTokMin10float2x1: + case EHTokMin10float2x2: + case EHTokMin10float2x3: + case EHTokMin10float2x4: + case EHTokMin10float3x1: + case EHTokMin10float3x2: + case EHTokMin10float3x3: + case EHTokMin10float3x4: + case EHTokMin10float4x1: + case EHTokMin10float4x2: + case EHTokMin10float4x3: + case EHTokMin10float4x4: + case EHTokMin16int1x1: + case EHTokMin16int1x2: + case EHTokMin16int1x3: + case EHTokMin16int1x4: + case EHTokMin16int2x1: + case EHTokMin16int2x2: + case EHTokMin16int2x3: + case EHTokMin16int2x4: + case EHTokMin16int3x1: + case EHTokMin16int3x2: + case EHTokMin16int3x3: + case EHTokMin16int3x4: + case EHTokMin16int4x1: + case EHTokMin16int4x2: + case EHTokMin16int4x3: + case EHTokMin16int4x4: + case EHTokMin12int1x1: + case EHTokMin12int1x2: + case EHTokMin12int1x3: + case EHTokMin12int1x4: + case EHTokMin12int2x1: + case EHTokMin12int2x2: + case EHTokMin12int2x3: + case EHTokMin12int2x4: + case EHTokMin12int3x1: + case EHTokMin12int3x2: + case EHTokMin12int3x3: + case EHTokMin12int3x4: + case EHTokMin12int4x1: + case EHTokMin12int4x2: + case EHTokMin12int4x3: + case EHTokMin12int4x4: + case EHTokMin16uint1x1: + case EHTokMin16uint1x2: + case EHTokMin16uint1x3: + case EHTokMin16uint1x4: + case EHTokMin16uint2x1: + case EHTokMin16uint2x2: + case EHTokMin16uint2x3: + case EHTokMin16uint2x4: + case EHTokMin16uint3x1: + case EHTokMin16uint3x2: + case EHTokMin16uint3x3: + case EHTokMin16uint3x4: + case EHTokMin16uint4x1: + case EHTokMin16uint4x2: + case EHTokMin16uint4x3: + case EHTokMin16uint4x4: return keyword; // texturing types diff --git a/glslang/HLSL/hlslTokens.h b/glslang/HLSL/hlslTokens.h index 4426bccecb..a7c129907f 100644 --- a/glslang/HLSL/hlslTokens.h +++ b/glslang/HLSL/hlslTokens.h @@ -249,6 +249,86 @@ enum EHlslTokenClass { EHTokDouble4x2, EHTokDouble4x3, EHTokDouble4x4, + EHTokMin16float1x1, + EHTokMin16float1x2, + EHTokMin16float1x3, + EHTokMin16float1x4, + EHTokMin16float2x1, + EHTokMin16float2x2, + EHTokMin16float2x3, + EHTokMin16float2x4, + EHTokMin16float3x1, + EHTokMin16float3x2, + EHTokMin16float3x3, + EHTokMin16float3x4, + EHTokMin16float4x1, + EHTokMin16float4x2, + EHTokMin16float4x3, + EHTokMin16float4x4, + EHTokMin10float1x1, + EHTokMin10float1x2, + EHTokMin10float1x3, + EHTokMin10float1x4, + EHTokMin10float2x1, + EHTokMin10float2x2, + EHTokMin10float2x3, + EHTokMin10float2x4, + EHTokMin10float3x1, + EHTokMin10float3x2, + EHTokMin10float3x3, + EHTokMin10float3x4, + EHTokMin10float4x1, + EHTokMin10float4x2, + EHTokMin10float4x3, + EHTokMin10float4x4, + EHTokMin16int1x1, + EHTokMin16int1x2, + EHTokMin16int1x3, + EHTokMin16int1x4, + EHTokMin16int2x1, + EHTokMin16int2x2, + EHTokMin16int2x3, + EHTokMin16int2x4, + EHTokMin16int3x1, + EHTokMin16int3x2, + EHTokMin16int3x3, + EHTokMin16int3x4, + EHTokMin16int4x1, + EHTokMin16int4x2, + EHTokMin16int4x3, + EHTokMin16int4x4, + EHTokMin12int1x1, + EHTokMin12int1x2, + EHTokMin12int1x3, + EHTokMin12int1x4, + EHTokMin12int2x1, + EHTokMin12int2x2, + EHTokMin12int2x3, + EHTokMin12int2x4, + EHTokMin12int3x1, + EHTokMin12int3x2, + EHTokMin12int3x3, + EHTokMin12int3x4, + EHTokMin12int4x1, + EHTokMin12int4x2, + EHTokMin12int4x3, + EHTokMin12int4x4, + EHTokMin16uint1x1, + EHTokMin16uint1x2, + EHTokMin16uint1x3, + EHTokMin16uint1x4, + EHTokMin16uint2x1, + EHTokMin16uint2x2, + EHTokMin16uint2x3, + EHTokMin16uint2x4, + EHTokMin16uint3x1, + EHTokMin16uint3x2, + EHTokMin16uint3x3, + EHTokMin16uint3x4, + EHTokMin16uint4x1, + EHTokMin16uint4x2, + EHTokMin16uint4x3, + EHTokMin16uint4x4, // texturing types EHTokSampler, diff --git a/glslang/Include/BaseTypes.h b/glslang/Include/BaseTypes.h old mode 100644 new mode 100755 index 6a429fd441..64bffa8926 --- a/glslang/Include/BaseTypes.h +++ b/glslang/Include/BaseTypes.h @@ -65,10 +65,10 @@ enum TBasicType { EbtAccStruct, EbtReference, EbtRayQuery, -#ifndef GLSLANG_WEB + EbtHitObjectNV, + EbtCoopmat, // SPIR-V type defined by spirv_type EbtSpirvType, -#endif // HLSL types that live only temporarily. EbtString, @@ -95,15 +95,16 @@ enum TStorageQualifier { EvqUniform, // read only, shared with app EvqBuffer, // read/write, shared with app EvqShared, // compute shader's read/write 'shared' qualifier -#ifndef GLSLANG_WEB EvqSpirvStorageClass, // spirv_storage_class -#endif EvqPayload, EvqPayloadIn, EvqHitAttr, EvqCallableData, EvqCallableDataIn, + EvqHitObjectAttrNV, + + EvqtaskPayloadSharedEXT, // parameters EvqIn, // also, for 'in' in the grammar before we know if it's a pipeline input or an 'in' parameter @@ -130,6 +131,8 @@ enum TStorageQualifier { EvqFragDepth, EvqFragStencil, + EvqTileImageEXT, + // end of list EvqLast }; @@ -288,6 +291,17 @@ enum TBuiltInVariable { EbvMeshViewCountNV, EbvMeshViewIndicesNV, + EbvMicroTrianglePositionNV, + EbvMicroTriangleBaryNV, + EbvHitKindFrontFacingMicroTriangleNV, + EbvHitKindBackFacingMicroTriangleNV, + + //GL_EXT_mesh_shader + EbvPrimitivePointIndicesEXT, + EbvPrimitiveLineIndicesEXT, + EbvPrimitiveTriangleIndicesEXT, + EbvCullPrimitiveEXT, + // sm builtins EbvWarpsPerSM, EbvSMCount, @@ -309,6 +323,15 @@ enum TBuiltInVariable { EbvByteAddressBuffer, EbvRWByteAddressBuffer, + // ARM specific core builtins + EbvCoreCountARM, + EbvCoreIDARM, + EbvCoreMaxIDARM, + EbvWarpIDARM, + EbvWarpMaxIDARM, + + EbvPositionFetch, + EbvLast }; @@ -321,10 +344,6 @@ enum TPrecisionQualifier { EpqHigh }; -#ifdef GLSLANG_WEB -__inline const char* GetStorageQualifierString(TStorageQualifier q) { return ""; } -__inline const char* GetPrecisionQualifierString(TPrecisionQualifier p) { return ""; } -#else // These will show up in error messages __inline const char* GetStorageQualifierString(TStorageQualifier q) { @@ -333,9 +352,7 @@ __inline const char* GetStorageQualifierString(TStorageQualifier q) case EvqGlobal: return "global"; break; case EvqConst: return "const"; break; case EvqConstReadOnly: return "const (read only)"; break; -#ifndef GLSLANG_WEB case EvqSpirvStorageClass: return "spirv_storage_class"; break; -#endif case EvqVaryingIn: return "in"; break; case EvqVaryingOut: return "out"; break; case EvqUniform: return "uniform"; break; @@ -360,6 +377,8 @@ __inline const char* GetStorageQualifierString(TStorageQualifier q) case EvqHitAttr: return "hitAttributeNV"; break; case EvqCallableData: return "callableDataNV"; break; case EvqCallableDataIn: return "callableDataInNV"; break; + case EvqtaskPayloadSharedEXT: return "taskPayloadSharedEXT"; break; + case EvqHitObjectAttrNV:return "hitObjectAttributeNV"; break; default: return "unknown qualifier"; } } @@ -496,6 +515,11 @@ __inline const char* GetBuiltInVariableString(TBuiltInVariable v) case EbvLayerPerViewNV: return "LayerPerViewNV"; case EbvMeshViewCountNV: return "MeshViewCountNV"; case EbvMeshViewIndicesNV: return "MeshViewIndicesNV"; + // GL_EXT_mesh_shader + case EbvPrimitivePointIndicesEXT: return "PrimitivePointIndicesEXT"; + case EbvPrimitiveLineIndicesEXT: return "PrimitiveLineIndicesEXT"; + case EbvPrimitiveTriangleIndicesEXT: return "PrimitiveTriangleIndicesEXT"; + case EbvCullPrimitiveEXT: return "CullPrimitiveEXT"; case EbvWarpsPerSM: return "WarpsPerSMNV"; case EbvSMCount: return "SMCountNV"; @@ -505,6 +529,9 @@ __inline const char* GetBuiltInVariableString(TBuiltInVariable v) case EbvShadingRateKHR: return "ShadingRateKHR"; case EbvPrimitiveShadingRateKHR: return "PrimitiveShadingRateKHR"; + case EbvHitKindFrontFacingMicroTriangleNV: return "HitKindFrontFacingMicroTriangleNV"; + case EbvHitKindBackFacingMicroTriangleNV: return "HitKindBackFacingMicroTriangleNV"; + default: return "unknown built-in variable"; } } @@ -519,7 +546,6 @@ __inline const char* GetPrecisionQualifierString(TPrecisionQualifier p) default: return "unknown precision qualifier"; } } -#endif __inline bool isTypeSignedInt(TBasicType type) { diff --git a/glslang/Include/Common.h b/glslang/Include/Common.h index 9042a1aa27..080b8071e4 100644 --- a/glslang/Include/Common.h +++ b/glslang/Include/Common.h @@ -44,6 +44,7 @@ #else #include #endif +#include #include #include #include @@ -54,7 +55,7 @@ #include #include -#if defined(__ANDROID__) || (defined(_MSC_VER) && _MSC_VER < 1700) +#if defined(__ANDROID__) #include namespace std { template @@ -66,7 +67,7 @@ std::string to_string(const T& val) { } #endif -#if (defined(_MSC_VER) && _MSC_VER < 1900 /*vs2015*/) || MINGW_HAS_SECURE_API +#if defined(MINGW_HAS_SECURE_API) && MINGW_HAS_SECURE_API #include #ifndef snprintf #define snprintf sprintf_s @@ -82,22 +83,6 @@ std::string to_string(const T& val) { #define UINT_PTR uintptr_t #endif -#if defined(_MSC_VER) && _MSC_VER < 1800 - #include - inline long long int strtoll (const char* str, char** endptr, int base) - { - return _strtoi64(str, endptr, base); - } - inline unsigned long long int strtoull (const char* str, char** endptr, int base) - { - return _strtoui64(str, endptr, base); - } - inline long long int atoll (const char* str) - { - return strtoll(str, NULL, 10); - } -#endif - #if defined(_MSC_VER) #define strdup _strdup #endif @@ -218,7 +203,7 @@ template T Max(const T a, const T b) { return a > b ? a : b; } // // Create a TString object from an integer. // -#if defined _MSC_VER || MINGW_HAS_SECURE_API +#if defined(_MSC_VER) || (defined(MINGW_HAS_SECURE_API) && MINGW_HAS_SECURE_API) inline const TString String(const int i, const int base = 10) { char text[16]; // 32 bit ints are at most 10 digits in base 10 diff --git a/glslang/Include/ConstantUnion.h b/glslang/Include/ConstantUnion.h index c4ffb85771..1f39fc5930 100644 --- a/glslang/Include/ConstantUnion.h +++ b/glslang/Include/ConstantUnion.h @@ -234,7 +234,6 @@ class TConstUnion { break; -#ifndef GLSLANG_WEB case EbtInt16: if (constant.i16Const == i16Const) return true; @@ -265,7 +264,6 @@ class TConstUnion { return true; break; -#endif default: assert(false && "Default missing"); } @@ -347,7 +345,6 @@ class TConstUnion { return true; return false; -#ifndef GLSLANG_WEB case EbtInt8: if (i8Const > constant.i8Const) return true; @@ -378,7 +375,6 @@ class TConstUnion { return true; return false; -#endif default: assert(false && "Default missing"); return false; @@ -389,7 +385,6 @@ class TConstUnion { { assert(type == constant.type); switch (type) { -#ifndef GLSLANG_WEB case EbtInt8: if (i8Const < constant.i8Const) return true; @@ -419,7 +414,6 @@ class TConstUnion { return true; return false; -#endif case EbtDouble: if (dConst < constant.dConst) return true; @@ -449,14 +443,12 @@ class TConstUnion { case EbtInt: returnValue.setIConst(iConst + constant.iConst); break; case EbtUint: returnValue.setUConst(uConst + constant.uConst); break; case EbtDouble: returnValue.setDConst(dConst + constant.dConst); break; -#ifndef GLSLANG_WEB case EbtInt8: returnValue.setI8Const(i8Const + constant.i8Const); break; case EbtInt16: returnValue.setI16Const(i16Const + constant.i16Const); break; case EbtInt64: returnValue.setI64Const(i64Const + constant.i64Const); break; case EbtUint8: returnValue.setU8Const(u8Const + constant.u8Const); break; case EbtUint16: returnValue.setU16Const(u16Const + constant.u16Const); break; case EbtUint64: returnValue.setU64Const(u64Const + constant.u64Const); break; -#endif default: assert(false && "Default missing"); } @@ -471,14 +463,12 @@ class TConstUnion { case EbtInt: returnValue.setIConst(iConst - constant.iConst); break; case EbtUint: returnValue.setUConst(uConst - constant.uConst); break; case EbtDouble: returnValue.setDConst(dConst - constant.dConst); break; -#ifndef GLSLANG_WEB case EbtInt8: returnValue.setI8Const(i8Const - constant.i8Const); break; case EbtInt16: returnValue.setI16Const(i16Const - constant.i16Const); break; case EbtInt64: returnValue.setI64Const(i64Const - constant.i64Const); break; case EbtUint8: returnValue.setU8Const(u8Const - constant.u8Const); break; case EbtUint16: returnValue.setU16Const(u16Const - constant.u16Const); break; case EbtUint64: returnValue.setU64Const(u64Const - constant.u64Const); break; -#endif default: assert(false && "Default missing"); } @@ -493,14 +483,12 @@ class TConstUnion { case EbtInt: returnValue.setIConst(iConst * constant.iConst); break; case EbtUint: returnValue.setUConst(uConst * constant.uConst); break; case EbtDouble: returnValue.setDConst(dConst * constant.dConst); break; -#ifndef GLSLANG_WEB case EbtInt8: returnValue.setI8Const(i8Const * constant.i8Const); break; case EbtInt16: returnValue.setI16Const(i16Const * constant.i16Const); break; case EbtInt64: returnValue.setI64Const(i64Const * constant.i64Const); break; case EbtUint8: returnValue.setU8Const(u8Const * constant.u8Const); break; case EbtUint16: returnValue.setU16Const(u16Const * constant.u16Const); break; case EbtUint64: returnValue.setU64Const(u64Const * constant.u64Const); break; -#endif default: assert(false && "Default missing"); } @@ -514,14 +502,12 @@ class TConstUnion { switch (type) { case EbtInt: returnValue.setIConst(iConst % constant.iConst); break; case EbtUint: returnValue.setUConst(uConst % constant.uConst); break; -#ifndef GLSLANG_WEB case EbtInt8: returnValue.setI8Const(i8Const % constant.i8Const); break; case EbtInt16: returnValue.setI8Const(i8Const % constant.i16Const); break; case EbtInt64: returnValue.setI64Const(i64Const % constant.i64Const); break; case EbtUint8: returnValue.setU8Const(u8Const % constant.u8Const); break; case EbtUint16: returnValue.setU16Const(u16Const % constant.u16Const); break; case EbtUint64: returnValue.setU64Const(u64Const % constant.u64Const); break; -#endif default: assert(false && "Default missing"); } @@ -532,7 +518,6 @@ class TConstUnion { { TConstUnion returnValue; switch (type) { -#ifndef GLSLANG_WEB case EbtInt8: switch (constant.type) { case EbtInt8: returnValue.setI8Const(i8Const >> constant.i8Const); break; @@ -585,19 +570,16 @@ class TConstUnion { default: assert(false && "Default missing"); } break; -#endif case EbtInt: switch (constant.type) { case EbtInt: returnValue.setIConst(iConst >> constant.iConst); break; case EbtUint: returnValue.setIConst(iConst >> constant.uConst); break; -#ifndef GLSLANG_WEB case EbtInt8: returnValue.setIConst(iConst >> constant.i8Const); break; case EbtUint8: returnValue.setIConst(iConst >> constant.u8Const); break; case EbtInt16: returnValue.setIConst(iConst >> constant.i16Const); break; case EbtUint16: returnValue.setIConst(iConst >> constant.u16Const); break; case EbtInt64: returnValue.setIConst(iConst >> constant.i64Const); break; case EbtUint64: returnValue.setIConst(iConst >> constant.u64Const); break; -#endif default: assert(false && "Default missing"); } break; @@ -605,18 +587,15 @@ class TConstUnion { switch (constant.type) { case EbtInt: returnValue.setUConst(uConst >> constant.iConst); break; case EbtUint: returnValue.setUConst(uConst >> constant.uConst); break; -#ifndef GLSLANG_WEB case EbtInt8: returnValue.setUConst(uConst >> constant.i8Const); break; case EbtUint8: returnValue.setUConst(uConst >> constant.u8Const); break; case EbtInt16: returnValue.setUConst(uConst >> constant.i16Const); break; case EbtUint16: returnValue.setUConst(uConst >> constant.u16Const); break; case EbtInt64: returnValue.setUConst(uConst >> constant.i64Const); break; case EbtUint64: returnValue.setUConst(uConst >> constant.u64Const); break; -#endif default: assert(false && "Default missing"); } break; -#ifndef GLSLANG_WEB case EbtInt64: switch (constant.type) { case EbtInt8: returnValue.setI64Const(i64Const >> constant.i8Const); break; @@ -643,7 +622,6 @@ class TConstUnion { default: assert(false && "Default missing"); } break; -#endif default: assert(false && "Default missing"); } @@ -654,7 +632,6 @@ class TConstUnion { { TConstUnion returnValue; switch (type) { -#ifndef GLSLANG_WEB case EbtInt8: switch (constant.type) { case EbtInt8: returnValue.setI8Const(i8Const << constant.i8Const); break; @@ -733,19 +710,16 @@ class TConstUnion { default: assert(false && "Default missing"); } break; -#endif case EbtInt: switch (constant.type) { case EbtInt: returnValue.setIConst(iConst << constant.iConst); break; case EbtUint: returnValue.setIConst(iConst << constant.uConst); break; -#ifndef GLSLANG_WEB case EbtInt8: returnValue.setIConst(iConst << constant.i8Const); break; case EbtUint8: returnValue.setIConst(iConst << constant.u8Const); break; case EbtInt16: returnValue.setIConst(iConst << constant.i16Const); break; case EbtUint16: returnValue.setIConst(iConst << constant.u16Const); break; case EbtInt64: returnValue.setIConst(iConst << constant.i64Const); break; case EbtUint64: returnValue.setIConst(iConst << constant.u64Const); break; -#endif default: assert(false && "Default missing"); } break; @@ -753,14 +727,12 @@ class TConstUnion { switch (constant.type) { case EbtInt: returnValue.setUConst(uConst << constant.iConst); break; case EbtUint: returnValue.setUConst(uConst << constant.uConst); break; -#ifndef GLSLANG_WEB case EbtInt8: returnValue.setUConst(uConst << constant.i8Const); break; case EbtUint8: returnValue.setUConst(uConst << constant.u8Const); break; case EbtInt16: returnValue.setUConst(uConst << constant.i16Const); break; case EbtUint16: returnValue.setUConst(uConst << constant.u16Const); break; case EbtInt64: returnValue.setUConst(uConst << constant.i64Const); break; case EbtUint64: returnValue.setUConst(uConst << constant.u64Const); break; -#endif default: assert(false && "Default missing"); } break; @@ -777,14 +749,12 @@ class TConstUnion { switch (type) { case EbtInt: returnValue.setIConst(iConst & constant.iConst); break; case EbtUint: returnValue.setUConst(uConst & constant.uConst); break; -#ifndef GLSLANG_WEB case EbtInt8: returnValue.setI8Const(i8Const & constant.i8Const); break; case EbtUint8: returnValue.setU8Const(u8Const & constant.u8Const); break; case EbtInt16: returnValue.setI16Const(i16Const & constant.i16Const); break; case EbtUint16: returnValue.setU16Const(u16Const & constant.u16Const); break; case EbtInt64: returnValue.setI64Const(i64Const & constant.i64Const); break; case EbtUint64: returnValue.setU64Const(u64Const & constant.u64Const); break; -#endif default: assert(false && "Default missing"); } @@ -798,14 +768,12 @@ class TConstUnion { switch (type) { case EbtInt: returnValue.setIConst(iConst | constant.iConst); break; case EbtUint: returnValue.setUConst(uConst | constant.uConst); break; -#ifndef GLSLANG_WEB case EbtInt8: returnValue.setI8Const(i8Const | constant.i8Const); break; case EbtUint8: returnValue.setU8Const(u8Const | constant.u8Const); break; case EbtInt16: returnValue.setI16Const(i16Const | constant.i16Const); break; case EbtUint16: returnValue.setU16Const(u16Const | constant.u16Const); break; case EbtInt64: returnValue.setI64Const(i64Const | constant.i64Const); break; case EbtUint64: returnValue.setU64Const(u64Const | constant.u64Const); break; -#endif default: assert(false && "Default missing"); } @@ -819,14 +787,12 @@ class TConstUnion { switch (type) { case EbtInt: returnValue.setIConst(iConst ^ constant.iConst); break; case EbtUint: returnValue.setUConst(uConst ^ constant.uConst); break; -#ifndef GLSLANG_WEB case EbtInt8: returnValue.setI8Const(i8Const ^ constant.i8Const); break; case EbtUint8: returnValue.setU8Const(u8Const ^ constant.u8Const); break; case EbtInt16: returnValue.setI16Const(i16Const ^ constant.i16Const); break; case EbtUint16: returnValue.setU16Const(u16Const ^ constant.u16Const); break; case EbtInt64: returnValue.setI64Const(i64Const ^ constant.i64Const); break; case EbtUint64: returnValue.setU64Const(u64Const ^ constant.u64Const); break; -#endif default: assert(false && "Default missing"); } @@ -839,14 +805,12 @@ class TConstUnion { switch (type) { case EbtInt: returnValue.setIConst(~iConst); break; case EbtUint: returnValue.setUConst(~uConst); break; -#ifndef GLSLANG_WEB case EbtInt8: returnValue.setI8Const(~i8Const); break; case EbtUint8: returnValue.setU8Const(~u8Const); break; case EbtInt16: returnValue.setI16Const(~i16Const); break; case EbtUint16: returnValue.setU16Const(~u16Const); break; case EbtInt64: returnValue.setI64Const(~i64Const); break; case EbtUint64: returnValue.setU64Const(~u64Const); break; -#endif default: assert(false && "Default missing"); } diff --git a/glslang/Include/InitializeGlobals.h b/glslang/Include/InitializeGlobals.h index 95d0a40e99..b7fdd7aabc 100644 --- a/glslang/Include/InitializeGlobals.h +++ b/glslang/Include/InitializeGlobals.h @@ -37,7 +37,7 @@ namespace glslang { -bool InitializePoolIndex(); +inline bool InitializePoolIndex() { return true; } // DEPRECATED: No need to call } // end namespace glslang diff --git a/glslang/Include/PoolAlloc.h b/glslang/Include/PoolAlloc.h index 1f5cac76de..e84ac52cd2 100644 --- a/glslang/Include/PoolAlloc.h +++ b/glslang/Include/PoolAlloc.h @@ -37,7 +37,7 @@ #ifndef _POOLALLOC_INCLUDED_ #define _POOLALLOC_INCLUDED_ -#ifdef _DEBUG +#ifndef NDEBUG # define GUARD_BLOCKS // define to enable guard block sanity checking #endif @@ -74,7 +74,7 @@ namespace glslang { class TAllocation { public: - TAllocation(size_t size, unsigned char* mem, TAllocation* prev = 0) : + TAllocation(size_t size, unsigned char* mem, TAllocation* prev = nullptr) : size(size), mem(mem), prevAlloc(prev) { // Allocations are bracketed: // [allocationHeader][initialGuardBlock][userData][finalGuardBlock] @@ -118,11 +118,16 @@ class TAllocation { unsigned char* mem; // beginning of our allocation (pts to header) TAllocation* prevAlloc; // prior allocation in the chain - const static unsigned char guardBlockBeginVal; - const static unsigned char guardBlockEndVal; - const static unsigned char userDataFill; + static inline constexpr unsigned char guardBlockBeginVal = 0xfb; + static inline constexpr unsigned char guardBlockEndVal = 0xfe; + static inline constexpr unsigned char userDataFill = 0xcd; + +# ifdef GUARD_BLOCKS + static inline constexpr size_t guardBlockSize = 16; +# else + static inline constexpr size_t guardBlockSize = 0; +# endif - const static size_t guardBlockSize; # ifdef GUARD_BLOCKS inline static size_t headerSize() { return sizeof(TAllocation); } # else @@ -171,7 +176,7 @@ class TPoolAllocator { void popAll(); // - // Call allocate() to actually acquire memory. Returns 0 if no memory + // Call allocate() to actually acquire memory. Returns nullptr if no memory // available, otherwise a properly aligned pointer to 'numBytes' of memory. // void* allocate(size_t numBytes); @@ -189,7 +194,7 @@ class TPoolAllocator { struct tHeader { tHeader(tHeader* nextPage, size_t pageCount) : #ifdef GUARD_BLOCKS - lastAllocation(0), + lastAllocation(nullptr), #endif nextPage(nextPage), pageCount(pageCount) { } diff --git a/glslang/Include/ResourceLimits.h b/glslang/Include/ResourceLimits.h index b670cf163f..b36c8d6273 100644 --- a/glslang/Include/ResourceLimits.h +++ b/glslang/Include/ResourceLimits.h @@ -142,6 +142,15 @@ struct TBuiltInResource { int maxTaskWorkGroupSizeY_NV; int maxTaskWorkGroupSizeZ_NV; int maxMeshViewCountNV; + int maxMeshOutputVerticesEXT; + int maxMeshOutputPrimitivesEXT; + int maxMeshWorkGroupSizeX_EXT; + int maxMeshWorkGroupSizeY_EXT; + int maxMeshWorkGroupSizeZ_EXT; + int maxTaskWorkGroupSizeX_EXT; + int maxTaskWorkGroupSizeY_EXT; + int maxTaskWorkGroupSizeZ_EXT; + int maxMeshViewCountEXT; int maxDualSourceDrawBuffersEXT; TLimits limits; diff --git a/glslang/Include/ShHandle.h b/glslang/Include/ShHandle.h index df07bd8eda..dee47c0dfd 100644 --- a/glslang/Include/ShHandle.h +++ b/glslang/Include/ShHandle.h @@ -58,9 +58,9 @@ class TShHandleBase { public: TShHandleBase() { pool = new glslang::TPoolAllocator; } virtual ~TShHandleBase() { delete pool; } - virtual TCompiler* getAsCompiler() { return 0; } - virtual TLinker* getAsLinker() { return 0; } - virtual TUniformMap* getAsUniformMap() { return 0; } + virtual TCompiler* getAsCompiler() { return nullptr; } + virtual TLinker* getAsLinker() { return nullptr; } + virtual TUniformMap* getAsUniformMap() { return nullptr; } virtual glslang::TPoolAllocator* getPool() const { return pool; } private: glslang::TPoolAllocator* pool; @@ -123,11 +123,11 @@ class TLinker : public TShHandleBase { infoSink(iSink), executable(e), haveReturnableObjectCode(false), - appAttributeBindings(0), - fixedAttributeBindings(0), - excludedAttributes(0), + appAttributeBindings(nullptr), + fixedAttributeBindings(nullptr), + excludedAttributes(nullptr), excludedCount(0), - uniformBindings(0) { } + uniformBindings(nullptr) { } virtual TLinker* getAsLinker() { return this; } virtual ~TLinker() { } virtual bool link(TCompilerList&, TUniformMap*) = 0; @@ -137,7 +137,7 @@ class TLinker : public TShHandleBase { virtual void getAttributeBindings(ShBindingTable const **t) const = 0; virtual void setExcludedAttributes(const int* attributes, int count) { excludedAttributes = attributes; excludedCount = count; } virtual ShBindingTable* getUniformBindings() const { return uniformBindings; } - virtual const void* getObjectCode() const { return 0; } // a real compiler would be returning object code here + virtual const void* getObjectCode() const { return nullptr; } // a real compiler would be returning object code here virtual TInfoSink& getInfoSink() { return infoSink; } TInfoSink& infoSink; protected: diff --git a/glslang/Include/SpirvIntrinsics.h b/glslang/Include/SpirvIntrinsics.h index 3c7d72ce97..0082a4d4eb 100644 --- a/glslang/Include/SpirvIntrinsics.h +++ b/glslang/Include/SpirvIntrinsics.h @@ -35,12 +35,11 @@ #pragma once -#ifndef GLSLANG_WEB - // // GL_EXT_spirv_intrinsics // #include "Common.h" +#include namespace glslang { @@ -98,12 +97,27 @@ struct TSpirvInstruction { struct TSpirvTypeParameter { POOL_ALLOCATOR_NEW_DELETE(GetThreadPoolAllocator()) - TSpirvTypeParameter(const TIntermConstantUnion* arg) { constant = arg; } + TSpirvTypeParameter(const TIntermConstantUnion* arg) { value = arg; } + TSpirvTypeParameter(const TType* arg) { value = arg; } - bool operator==(const TSpirvTypeParameter& rhs) const { return constant == rhs.constant; } + const TIntermConstantUnion* getAsConstant() const + { + if (value.index() == 0) + return std::get(value); + return nullptr; + } + const TType* getAsType() const + { + if (value.index() == 1) + return std::get(value); + return nullptr; + } + + bool operator==(const TSpirvTypeParameter& rhs) const; bool operator!=(const TSpirvTypeParameter& rhs) const { return !operator==(rhs); } - const TIntermConstantUnion* constant; + // Parameter value: constant expression or type specifier + std::variant value; }; typedef TVector TSpirvTypeParameters; @@ -124,5 +138,3 @@ struct TSpirvType { }; } // end namespace glslang - -#endif // GLSLANG_WEB diff --git a/glslang/Include/Types.h b/glslang/Include/Types.h index 93909a30b9..26aba9bbf4 100644 --- a/glslang/Include/Types.h +++ b/glslang/Include/Types.h @@ -72,6 +72,7 @@ enum TSamplerDim { EsdRect, EsdBuffer, EsdSubpass, // goes only with non-sampled image (image is true) + EsdAttachmentEXT, EsdNumDims }; @@ -85,19 +86,6 @@ struct TSampler { // misnomer now; includes images, textures without sampler, bool combined : 1; // true means texture is combined with a sampler, false means texture with no sampler bool sampler : 1; // true means a pure sampler, other fields should be clear() -#ifdef GLSLANG_WEB - bool is1D() const { return false; } - bool isBuffer() const { return false; } - bool isRect() const { return false; } - bool isSubpass() const { return false; } - bool isCombined() const { return true; } - bool isImage() const { return false; } - bool isImageClass() const { return false; } - bool isMultiSample() const { return false; } - bool isExternal() const { return false; } - void setExternal(bool e) { } - bool isYuv() const { return false; } -#else unsigned int vectorSize : 3; // vector return type size. // Some languages support structures as sample results. Storing the whole structure in the // TSampler is too large, so there is an index to a separate table. @@ -122,14 +110,14 @@ struct TSampler { // misnomer now; includes images, textures without sampler, bool isBuffer() const { return dim == EsdBuffer; } bool isRect() const { return dim == EsdRect; } bool isSubpass() const { return dim == EsdSubpass; } + bool isAttachmentEXT() const { return dim == EsdAttachmentEXT; } bool isCombined() const { return combined; } - bool isImage() const { return image && !isSubpass(); } + bool isImage() const { return image && !isSubpass() && !isAttachmentEXT();} bool isImageClass() const { return image; } bool isMultiSample() const { return ms; } bool isExternal() const { return external; } void setExternal(bool e) { external = e; } bool isYuv() const { return yuv; } -#endif bool isTexture() const { return !sampler && !image; } bool isPureSampler() const { return sampler; } @@ -149,10 +137,8 @@ struct TSampler { // misnomer now; includes images, textures without sampler, image = false; combined = false; sampler = false; -#ifndef GLSLANG_WEB external = false; yuv = false; -#endif #ifdef ENABLE_HLSL clearReturnStruct(); @@ -204,7 +190,6 @@ struct TSampler { // misnomer now; includes images, textures without sampler, shadow = s; } -#ifndef GLSLANG_WEB // make a subpass input attachment void setSubpass(TBasicType t, bool m = false) { @@ -214,7 +199,15 @@ struct TSampler { // misnomer now; includes images, textures without sampler, dim = EsdSubpass; ms = m; } -#endif + + // make an AttachmentEXT + void setAttachmentEXT(TBasicType t) + { + clear(); + type = t; + image = true; + dim = EsdAttachmentEXT; + } bool operator==(const TSampler& right) const { @@ -252,7 +245,6 @@ struct TSampler { // misnomer now; includes images, textures without sampler, switch (type) { case EbtInt: s.append("i"); break; case EbtUint: s.append("u"); break; -#ifndef GLSLANG_WEB case EbtFloat16: s.append("f16"); break; case EbtInt8: s.append("i8"); break; case EbtUint16: s.append("u8"); break; @@ -260,11 +252,12 @@ struct TSampler { // misnomer now; includes images, textures without sampler, case EbtUint8: s.append("u16"); break; case EbtInt64: s.append("i64"); break; case EbtUint64: s.append("u64"); break; -#endif default: break; } if (isImageClass()) { - if (isSubpass()) + if (isAttachmentEXT()) + s.append("attachmentEXT"); + else if (isSubpass()) s.append("subpass"); else s.append("image"); @@ -284,12 +277,11 @@ struct TSampler { // misnomer now; includes images, textures without sampler, case Esd2D: s.append("2D"); break; case Esd3D: s.append("3D"); break; case EsdCube: s.append("Cube"); break; -#ifndef GLSLANG_WEB - case Esd1D: s.append("1D"); break; - case EsdRect: s.append("2DRect"); break; - case EsdBuffer: s.append("Buffer"); break; - case EsdSubpass: s.append("Input"); break; -#endif + case Esd1D: s.append("1D"); break; + case EsdRect: s.append("2DRect"); break; + case EsdBuffer: s.append("Buffer"); break; + case EsdSubpass: s.append("Input"); break; + case EsdAttachmentEXT: s.append(""); break; default: break; // some compilers want this } if (isMultiSample()) @@ -429,6 +421,12 @@ enum TLayoutFormat { ElfR16ui, ElfR8ui, ElfR64ui, + ElfExtSizeGuard, // to help with comparisons + ElfSize1x8, + ElfSize1x16, + ElfSize1x32, + ElfSize2x32, + ElfSize4x32, ElfCount }; @@ -512,12 +510,10 @@ class TQualifier { invariant = false; makeTemporary(); declaredBuiltIn = EbvNone; -#ifndef GLSLANG_WEB noContraction = false; nullInit = false; spirvByReference = false; spirvLiteral = false; -#endif defaultBlock = false; } @@ -534,21 +530,17 @@ class TQualifier { nullInit = false; defaultBlock = false; clearLayout(); -#ifndef GLSLANG_WEB spirvStorageClass = -1; spirvDecorate = nullptr; spirvByReference = false; spirvLiteral = false; -#endif } void clearInterstage() { clearInterpolation(); -#ifndef GLSLANG_WEB patch = false; sample = false; -#endif } void clearInterpolation() @@ -556,20 +548,17 @@ class TQualifier { centroid = false; smooth = false; flat = false; -#ifndef GLSLANG_WEB nopersp = false; explicitInterp = false; pervertexNV = false; perPrimitiveNV = false; perViewNV = false; perTaskNV = false; -#endif pervertexEXT = false; } void clearMemory() { -#ifndef GLSLANG_WEB coherent = false; devicecoherent = false; queuefamilycoherent = false; @@ -581,7 +570,6 @@ class TQualifier { restrict = false; readonly = false; writeonly = false; -#endif } const char* semanticName; @@ -600,31 +588,6 @@ class TQualifier { bool explicitOffset : 1; bool defaultBlock : 1; // default blocks with matching names have structures merged when linking -#ifdef GLSLANG_WEB - bool isWriteOnly() const { return false; } - bool isReadOnly() const { return false; } - bool isRestrict() const { return false; } - bool isCoherent() const { return false; } - bool isVolatile() const { return false; } - bool isSample() const { return false; } - bool isMemory() const { return false; } - bool isMemoryQualifierImageAndSSBOOnly() const { return false; } - bool bufferReferenceNeedsVulkanMemoryModel() const { return false; } - bool isInterpolation() const { return flat || smooth; } - bool isExplicitInterpolation() const { return false; } - bool isAuxiliary() const { return centroid; } - bool isPatch() const { return false; } - bool isNoContraction() const { return false; } - void setNoContraction() { } - bool isPervertexNV() const { return false; } - bool isPervertexEXT() const { return pervertexEXT; } - void setNullInit() {} - bool isNullInit() const { return false; } - void setSpirvByReference() { } - bool isSpirvByReference() { return false; } - void setSpirvLiteral() { } - bool isSpirvLiteral() { return false; } -#else bool noContraction: 1; // prevent contraction and reassociation, e.g., for 'precise' keyword, and expressions it affects bool nopersp : 1; bool explicitInterp : 1; @@ -691,7 +654,6 @@ class TQualifier { bool isSpirvByReference() const { return spirvByReference; } void setSpirvLiteral() { spirvLiteral = true; } bool isSpirvLiteral() const { return spirvLiteral; } -#endif bool isPipeInput() const { @@ -822,9 +784,7 @@ class TQualifier { } void setBlockStorage(TBlockStorageClass newBacking) { -#ifndef GLSLANG_WEB layoutPushConstant = (newBacking == EbsPushConstant); -#endif switch (newBacking) { case EbsUniform : if (layoutPacking == ElpStd430) { @@ -833,35 +793,32 @@ class TQualifier { } storage = EvqUniform; break; - case EbsStorageBuffer : + case EbsStorageBuffer : storage = EvqBuffer; break; -#ifndef GLSLANG_WEB case EbsPushConstant : storage = EvqUniform; layoutSet = TQualifier::layoutSetEnd; layoutBinding = TQualifier::layoutBindingEnd; break; -#endif default: break; } } -#ifdef GLSLANG_WEB - bool isPerView() const { return false; } - bool isTaskMemory() const { return false; } - bool isArrayedIo(EShLanguage language) const { return false; } -#else bool isPerPrimitive() const { return perPrimitiveNV; } bool isPerView() const { return perViewNV; } bool isTaskMemory() const { return perTaskNV; } + bool isTaskPayload() const { return storage == EvqtaskPayloadSharedEXT; } bool isAnyPayload() const { return storage == EvqPayload || storage == EvqPayloadIn; } bool isAnyCallable() const { return storage == EvqCallableData || storage == EvqCallableDataIn; } + bool isHitObjectAttrNV() const { + return storage == EvqHitObjectAttrNV; + } // True if this type of IO is supposed to be arrayed with extra level for per-vertex data bool isArrayedIo(EShLanguage language) const @@ -875,21 +832,19 @@ class TQualifier { return ! patch && isPipeInput(); case EShLangFragment: return (pervertexNV || pervertexEXT) && isPipeInput(); - case EShLangMeshNV: + case EShLangMesh: return ! perTaskNV && isPipeOutput(); default: return false; } } -#endif // Implementing an embedded layout-qualifier class here, since C++ can't have a real class bitfield void clearLayout() // all layout { clearUniformLayout(); -#ifndef GLSLANG_WEB layoutPushConstant = false; layoutBufferReference = false; layoutPassthrough = false; @@ -897,9 +852,11 @@ class TQualifier { // -2048 as the default value indicating layoutSecondaryViewportRelative is not set layoutSecondaryViewportRelativeOffset = -2048; layoutShaderRecord = false; + layoutHitObjectShaderRecordNV = false; + layoutBindlessSampler = false; + layoutBindlessImage = false; layoutBufferReferenceAlign = layoutBufferReferenceAlignEnd; layoutFormat = ElfNone; -#endif clearInterstageLayout(); @@ -909,14 +866,11 @@ class TQualifier { { layoutLocation = layoutLocationEnd; layoutComponent = layoutComponentEnd; -#ifndef GLSLANG_WEB layoutIndex = layoutIndexEnd; clearStreamLayout(); clearXfbLayout(); -#endif } -#ifndef GLSLANG_WEB void clearStreamLayout() { layoutStream = layoutStreamEnd; @@ -927,7 +881,6 @@ class TQualifier { layoutXfbStride = layoutXfbStrideEnd; layoutXfbOffset = layoutXfbOffsetEnd; } -#endif bool hasNonXfbLayout() const { @@ -983,7 +936,6 @@ class TQualifier { unsigned int layoutSpecConstantId : 11; static const unsigned int layoutSpecConstantIdEnd = 0x7FF; -#ifndef GLSLANG_WEB // stored as log2 of the actual alignment value unsigned int layoutBufferReferenceAlign : 6; static const unsigned int layoutBufferReferenceAlignEnd = 0x3F; @@ -996,11 +948,14 @@ class TQualifier { bool layoutViewportRelative; int layoutSecondaryViewportRelativeOffset; bool layoutShaderRecord; + bool layoutHitObjectShaderRecordNV; // GL_EXT_spirv_intrinsics int spirvStorageClass; TSpirvDecorate* spirvDecorate; -#endif + + bool layoutBindlessSampler; + bool layoutBindlessImage; bool hasUniformLayout() const { @@ -1020,9 +975,7 @@ class TQualifier { layoutSet = layoutSetEnd; layoutBinding = layoutBindingEnd; -#ifndef GLSLANG_WEB layoutAttachment = layoutAttachmentEnd; -#endif } bool hasMatrix() const @@ -1055,26 +1008,6 @@ class TQualifier { { return layoutBinding != layoutBindingEnd; } -#ifdef GLSLANG_WEB - bool hasOffset() const { return false; } - bool isNonPerspective() const { return false; } - bool hasIndex() const { return false; } - unsigned getIndex() const { return 0; } - bool hasComponent() const { return false; } - bool hasStream() const { return false; } - bool hasFormat() const { return false; } - bool hasXfb() const { return false; } - bool hasXfbBuffer() const { return false; } - bool hasXfbStride() const { return false; } - bool hasXfbOffset() const { return false; } - bool hasAttachment() const { return false; } - TLayoutFormat getFormat() const { return ElfNone; } - bool isPushConstant() const { return false; } - bool isShaderRecord() const { return false; } - bool hasBufferReference() const { return false; } - bool hasBufferReferenceAlign() const { return false; } - bool isNonUniform() const { return false; } -#else bool hasOffset() const { return layoutOffset != layoutNotSet; @@ -1122,6 +1055,7 @@ class TQualifier { TLayoutFormat getFormat() const { return layoutFormat; } bool isPushConstant() const { return layoutPushConstant; } bool isShaderRecord() const { return layoutShaderRecord; } + bool hasHitObjectShaderRecordNV() const { return layoutHitObjectShaderRecordNV; } bool hasBufferReference() const { return layoutBufferReference; } bool hasBufferReferenceAlign() const { @@ -1131,6 +1065,14 @@ class TQualifier { { return nonUniform; } + bool isBindlessSampler() const + { + return layoutBindlessSampler; + } + bool isBindlessImage() const + { + return layoutBindlessImage; + } // GL_EXT_spirv_intrinsics bool hasSprivDecorate() const { return spirvDecorate != nullptr; } @@ -1140,7 +1082,7 @@ class TQualifier { const TSpirvDecorate& getSpirvDecorate() const { assert(spirvDecorate); return *spirvDecorate; } TSpirvDecorate& getSpirvDecorate() { assert(spirvDecorate); return *spirvDecorate; } TString getSpirvDecorateQualifierString() const; -#endif + bool hasSpecConstantId() const { // Not the same thing as being a specialization constant, this @@ -1174,12 +1116,10 @@ class TQualifier { { switch (packing) { case ElpStd140: return "std140"; -#ifndef GLSLANG_WEB case ElpPacked: return "packed"; case ElpShared: return "shared"; case ElpStd430: return "std430"; case ElpScalar: return "scalar"; -#endif default: return "none"; } } @@ -1191,9 +1131,6 @@ class TQualifier { default: return "none"; } } -#ifdef GLSLANG_WEB - static const char* getLayoutFormatString(TLayoutFormat f) { return "none"; } -#else static const char* getLayoutFormatString(TLayoutFormat f) { switch (f) { @@ -1240,6 +1177,11 @@ class TQualifier { case ElfR8ui: return "r8ui"; case ElfR64ui: return "r64ui"; case ElfR64i: return "r64i"; + case ElfSize1x8: return "size1x8"; + case ElfSize1x16: return "size1x16"; + case ElfSize1x32: return "size1x32"; + case ElfSize2x32: return "size2x32"; + case ElfSize4x32: return "size4x32"; default: return "none"; } } @@ -1342,7 +1284,6 @@ class TQualifier { default: return "none"; } } -#endif }; // Qualifiers that don't need to be keep per object. They have shader scope, not object scope. @@ -1359,10 +1300,12 @@ struct TShaderQualifiers { int localSize[3]; // compute shader bool localSizeNotDefault[3]; // compute shader int localSizeSpecId[3]; // compute shader specialization id for gl_WorkGroupSize -#ifndef GLSLANG_WEB bool earlyFragmentTests; // fragment input bool postDepthCoverage; // fragment input bool earlyAndLateFragmentTestsAMD; //fragment input + bool nonCoherentColorAttachmentReadEXT; // fragment input + bool nonCoherentDepthAttachmentReadEXT; // fragment input + bool nonCoherentStencilAttachmentReadEXT; // fragment input TLayoutDepth layoutDepth; TLayoutStencil layoutStencil; bool blendEquation; // true if any blend equation was specified @@ -1375,9 +1318,6 @@ struct TShaderQualifiers { bool layoutPrimitiveCulling; // true if layout primitive_culling set TLayoutDepth getDepth() const { return layoutDepth; } TLayoutStencil getStencil() const { return layoutStencil; } -#else - TLayoutDepth getDepth() const { return EldNone; } -#endif void init() { @@ -1398,10 +1338,12 @@ struct TShaderQualifiers { localSizeSpecId[0] = TQualifier::layoutNotSet; localSizeSpecId[1] = TQualifier::layoutNotSet; localSizeSpecId[2] = TQualifier::layoutNotSet; -#ifndef GLSLANG_WEB earlyFragmentTests = false; earlyAndLateFragmentTestsAMD = false; postDepthCoverage = false; + nonCoherentColorAttachmentReadEXT = false; + nonCoherentDepthAttachmentReadEXT = false; + nonCoherentStencilAttachmentReadEXT = false; layoutDepth = EldNone; layoutStencil = ElsNone; blendEquation = false; @@ -1412,14 +1354,9 @@ struct TShaderQualifiers { layoutPrimitiveCulling = false; primitives = TQualifier::layoutNotSet; interlockOrdering = EioNone; -#endif } -#ifdef GLSLANG_WEB - bool hasBlendEquation() const { return false; } -#else bool hasBlendEquation() const { return blendEquation; } -#endif // Merge in characteristics from the 'src' qualifier. They can override when // set, but never erase when not set. @@ -1452,13 +1389,18 @@ struct TShaderQualifiers { if (src.localSizeSpecId[i] != TQualifier::layoutNotSet) localSizeSpecId[i] = src.localSizeSpecId[i]; } -#ifndef GLSLANG_WEB if (src.earlyFragmentTests) earlyFragmentTests = true; if (src.earlyAndLateFragmentTestsAMD) earlyAndLateFragmentTestsAMD = true; if (src.postDepthCoverage) postDepthCoverage = true; + if (src.nonCoherentColorAttachmentReadEXT) + nonCoherentColorAttachmentReadEXT = true; + if (src.nonCoherentDepthAttachmentReadEXT) + nonCoherentDepthAttachmentReadEXT = true; + if (src.nonCoherentStencilAttachmentReadEXT) + nonCoherentStencilAttachmentReadEXT = true; if (src.layoutDepth) layoutDepth = src.layoutDepth; if (src.layoutStencil) @@ -1479,10 +1421,22 @@ struct TShaderQualifiers { interlockOrdering = src.interlockOrdering; if (src.layoutPrimitiveCulling) layoutPrimitiveCulling = src.layoutPrimitiveCulling; -#endif } }; +class TTypeParameters { +public: + POOL_ALLOCATOR_NEW_DELETE(GetThreadPoolAllocator()) + + TTypeParameters() : basicType(EbtVoid), arraySizes(nullptr) {} + + TBasicType basicType; + TArraySizes *arraySizes; + + bool operator==(const TTypeParameters& rhs) const { return basicType == rhs.basicType && *arraySizes == *rhs.arraySizes; } + bool operator!=(const TTypeParameters& rhs) const { return basicType != rhs.basicType || *arraySizes != *rhs.arraySizes; } +}; + // // TPublicType is just temporarily used while parsing and not quite the same // information kept per node in TType. Due to the bison stack, it can't have @@ -1497,24 +1451,21 @@ class TPublicType { TSampler sampler; TQualifier qualifier; TShaderQualifiers shaderQualifiers; - int vectorSize : 4; - int matrixCols : 4; - int matrixRows : 4; - bool coopmat : 1; + int vectorSize : 4; + int matrixCols : 4; + int matrixRows : 4; + bool coopmatNV : 1; + bool coopmatKHR : 1; TArraySizes* arraySizes; const TType* userDef; TSourceLoc loc; - TArraySizes* typeParameters; -#ifndef GLSLANG_WEB + TTypeParameters* typeParameters; // SPIR-V type defined by spirv_type directive TSpirvType* spirvType; -#endif -#ifdef GLSLANG_WEB - bool isCoopmat() const { return false; } -#else - bool isCoopmat() const { return coopmat; } -#endif + bool isCoopmat() const { return coopmatNV || coopmatKHR; } + bool isCoopmatNV() const { return coopmatNV; } + bool isCoopmatKHR() const { return coopmatKHR; } void initType(const TSourceLoc& l) { @@ -1526,10 +1477,9 @@ class TPublicType { userDef = nullptr; loc = l; typeParameters = nullptr; - coopmat = false; -#ifndef GLSLANG_WEB + coopmatNV = false; + coopmatKHR = false; spirvType = nullptr; -#endif } void initQualifiers(bool global = false) @@ -1566,14 +1516,13 @@ class TPublicType { return matrixCols == 0 && vectorSize == 1 && arraySizes == nullptr && userDef == nullptr; } -#ifndef GLSLANG_WEB // GL_EXT_spirv_intrinsics void setSpirvType(const TSpirvInstruction& spirvInst, const TSpirvTypeParameters* typeParams = nullptr); -#endif // "Image" is a superset of "Subpass" - bool isImage() const { return basicType == EbtSampler && sampler.isImage(); } - bool isSubpass() const { return basicType == EbtSampler && sampler.isSubpass(); } + bool isImage() const { return basicType == EbtSampler && sampler.isImage(); } + bool isSubpass() const { return basicType == EbtSampler && sampler.isSubpass(); } + bool isAttachmentEXT() const { return basicType == EbtSampler && sampler.isAttachmentEXT(); } }; // @@ -1586,11 +1535,9 @@ class TType { // for "empty" type (no args) or simple scalar/vector/matrix explicit TType(TBasicType t = EbtVoid, TStorageQualifier q = EvqTemporary, int vs = 1, int mc = 0, int mr = 0, bool isVector = false) : - basicType(t), vectorSize(vs), matrixCols(mc), matrixRows(mr), vector1(isVector && vs == 1), coopmat(false), - arraySizes(nullptr), structure(nullptr), fieldName(nullptr), typeName(nullptr), typeParameters(nullptr) -#ifndef GLSLANG_WEB - , spirvType(nullptr) -#endif + basicType(t), vectorSize(vs), matrixCols(mc), matrixRows(mr), vector1(isVector && vs == 1), coopmatNV(false), coopmatKHR(false), coopmatKHRuse(-1), + arraySizes(nullptr), structure(nullptr), fieldName(nullptr), typeName(nullptr), typeParameters(nullptr), + spirvType(nullptr) { sampler.clear(); qualifier.clear(); @@ -1600,11 +1547,9 @@ class TType { // for explicit precision qualifier TType(TBasicType t, TStorageQualifier q, TPrecisionQualifier p, int vs = 1, int mc = 0, int mr = 0, bool isVector = false) : - basicType(t), vectorSize(vs), matrixCols(mc), matrixRows(mr), vector1(isVector && vs == 1), coopmat(false), - arraySizes(nullptr), structure(nullptr), fieldName(nullptr), typeName(nullptr), typeParameters(nullptr) -#ifndef GLSLANG_WEB - , spirvType(nullptr) -#endif + basicType(t), vectorSize(vs), matrixCols(mc), matrixRows(mr), vector1(isVector && vs == 1), coopmatNV(false), coopmatKHR(false), coopmatKHRuse(-1), + arraySizes(nullptr), structure(nullptr), fieldName(nullptr), typeName(nullptr), typeParameters(nullptr), + spirvType(nullptr) { sampler.clear(); qualifier.clear(); @@ -1616,11 +1561,9 @@ class TType { // for turning a TPublicType into a TType, using a shallow copy explicit TType(const TPublicType& p) : basicType(p.basicType), - vectorSize(p.vectorSize), matrixCols(p.matrixCols), matrixRows(p.matrixRows), vector1(false), coopmat(p.coopmat), - arraySizes(p.arraySizes), structure(nullptr), fieldName(nullptr), typeName(nullptr), typeParameters(p.typeParameters) -#ifndef GLSLANG_WEB - , spirvType(p.spirvType) -#endif + vectorSize(p.vectorSize), matrixCols(p.matrixCols), matrixRows(p.matrixRows), vector1(false), coopmatNV(p.coopmatNV), coopmatKHR(p.coopmatKHR), coopmatKHRuse(-1), + arraySizes(p.arraySizes), structure(nullptr), fieldName(nullptr), typeName(nullptr), typeParameters(p.typeParameters), + spirvType(p.spirvType) { if (basicType == EbtSampler) sampler = p.sampler; @@ -1636,28 +1579,39 @@ class TType { } typeName = NewPoolTString(p.userDef->getTypeName().c_str()); } - if (p.isCoopmat() && p.typeParameters && p.typeParameters->getNumDims() > 0) { - int numBits = p.typeParameters->getDimSize(0); + if (p.isCoopmatNV() && p.typeParameters && p.typeParameters->arraySizes->getNumDims() > 0) { + int numBits = p.typeParameters->arraySizes->getDimSize(0); if (p.basicType == EbtFloat && numBits == 16) { basicType = EbtFloat16; qualifier.precision = EpqNone; } else if (p.basicType == EbtUint && numBits == 8) { basicType = EbtUint8; qualifier.precision = EpqNone; + } else if (p.basicType == EbtUint && numBits == 16) { + basicType = EbtUint16; + qualifier.precision = EpqNone; } else if (p.basicType == EbtInt && numBits == 8) { basicType = EbtInt8; qualifier.precision = EpqNone; + } else if (p.basicType == EbtInt && numBits == 16) { + basicType = EbtInt16; + qualifier.precision = EpqNone; + } + } + if (p.isCoopmatKHR() && p.typeParameters && p.typeParameters->arraySizes->getNumDims() > 0) { + basicType = p.typeParameters->basicType; + + if (p.typeParameters->arraySizes->getNumDims() == 4) { + coopmatKHRuse = p.typeParameters->arraySizes->getDimSize(3); + p.typeParameters->arraySizes->removeLastSize(); } } } // for construction of sampler types TType(const TSampler& sampler, TStorageQualifier q = EvqUniform, TArraySizes* as = nullptr) : - basicType(EbtSampler), vectorSize(1), matrixCols(0), matrixRows(0), vector1(false), coopmat(false), + basicType(EbtSampler), vectorSize(1), matrixCols(0), matrixRows(0), vector1(false), coopmatNV(false), coopmatKHR(false), coopmatKHRuse(-1), arraySizes(as), structure(nullptr), fieldName(nullptr), typeName(nullptr), - sampler(sampler), typeParameters(nullptr) -#ifndef GLSLANG_WEB - , spirvType(nullptr) -#endif + sampler(sampler), typeParameters(nullptr), spirvType(nullptr) { qualifier.clear(); qualifier.storage = q; @@ -1699,18 +1653,18 @@ class TType { vectorSize = 1; vector1 = false; } else if (isCoopMat()) { - coopmat = false; + coopmatNV = false; + coopmatKHR = false; + coopmatKHRuse = -1; typeParameters = nullptr; } } } // for making structures, ... TType(TTypeList* userDef, const TString& n) : - basicType(EbtStruct), vectorSize(1), matrixCols(0), matrixRows(0), vector1(false), coopmat(false), - arraySizes(nullptr), structure(userDef), fieldName(nullptr), typeParameters(nullptr) -#ifndef GLSLANG_WEB - , spirvType(nullptr) -#endif + basicType(EbtStruct), vectorSize(1), matrixCols(0), matrixRows(0), vector1(false), coopmatNV(false), coopmatKHR(false), coopmatKHRuse(-1), + arraySizes(nullptr), structure(userDef), fieldName(nullptr), typeParameters(nullptr), + spirvType(nullptr) { sampler.clear(); qualifier.clear(); @@ -1718,25 +1672,22 @@ class TType { } // For interface blocks TType(TTypeList* userDef, const TString& n, const TQualifier& q) : - basicType(EbtBlock), vectorSize(1), matrixCols(0), matrixRows(0), vector1(false), coopmat(false), - qualifier(q), arraySizes(nullptr), structure(userDef), fieldName(nullptr), typeParameters(nullptr) -#ifndef GLSLANG_WEB - , spirvType(nullptr) -#endif + basicType(EbtBlock), vectorSize(1), matrixCols(0), matrixRows(0), vector1(false), coopmatNV(false), coopmatKHR(false), coopmatKHRuse(-1), + qualifier(q), arraySizes(nullptr), structure(userDef), fieldName(nullptr), typeParameters(nullptr), + spirvType(nullptr) { sampler.clear(); typeName = NewPoolTString(n.c_str()); } // for block reference (first parameter must be EbtReference) explicit TType(TBasicType t, const TType &p, const TString& n) : - basicType(t), vectorSize(1), matrixCols(0), matrixRows(0), vector1(false), - arraySizes(nullptr), structure(nullptr), fieldName(nullptr), typeName(nullptr) -#ifndef GLSLANG_WEB - , spirvType(nullptr) -#endif + basicType(t), vectorSize(1), matrixCols(0), matrixRows(0), vector1(false), coopmatNV(false), coopmatKHR(false), coopmatKHRuse(-1), + arraySizes(nullptr), structure(nullptr), fieldName(nullptr), typeName(nullptr), typeParameters(nullptr), + spirvType(nullptr) { assert(t == EbtReference); typeName = NewPoolTString(n.c_str()); + sampler.clear(); qualifier.clear(); qualifier.storage = p.qualifier.storage; referentType = p.clone(); @@ -1764,10 +1715,10 @@ class TType { referentType = copyOf.referentType; } typeParameters = copyOf.typeParameters; -#ifndef GLSLANG_WEB spirvType = copyOf.spirvType; -#endif - coopmat = copyOf.isCoopMat(); + coopmatNV = copyOf.isCoopMatNV(); + coopmatKHR = copyOf.isCoopMatKHR(); + coopmatKHRuse = copyOf.coopmatKHRuse; } // Make complete copy of the whole type graph rooted at 'copyOf'. @@ -1843,17 +1794,13 @@ class TType { virtual int getOuterArraySize() const { return arraySizes->getOuterSize(); } virtual TIntermTyped* getOuterArrayNode() const { return arraySizes->getOuterNode(); } virtual int getCumulativeArraySize() const { return arraySizes->getCumulativeSize(); } -#ifdef GLSLANG_WEB - bool isArrayOfArrays() const { return false; } -#else bool isArrayOfArrays() const { return arraySizes != nullptr && arraySizes->getNumDims() > 1; } -#endif virtual int getImplicitArraySize() const { return arraySizes->getImplicitSize(); } virtual const TArraySizes* getArraySizes() const { return arraySizes; } virtual TArraySizes* getArraySizes() { return arraySizes; } virtual TType* getReferentType() const { return referentType; } - virtual const TArraySizes* getTypeParameters() const { return typeParameters; } - virtual TArraySizes* getTypeParameters() { return typeParameters; } + virtual const TTypeParameters* getTypeParameters() const { return typeParameters; } + virtual TTypeParameters* getTypeParameters() { return typeParameters; } virtual bool isScalar() const { return ! isVector() && ! isMatrix() && ! isStruct() && ! isArray(); } virtual bool isScalarOrVec1() const { return isScalar() || vector1; } @@ -1863,9 +1810,11 @@ class TType { virtual bool isArray() const { return arraySizes != nullptr; } virtual bool isSizedArray() const { return isArray() && arraySizes->isSized(); } virtual bool isUnsizedArray() const { return isArray() && !arraySizes->isSized(); } + virtual bool isImplicitlySizedArray() const { return isArray() && arraySizes->isImplicitlySized(); } virtual bool isArrayVariablyIndexed() const { assert(isArray()); return arraySizes->isVariablyIndexed(); } virtual void setArrayVariablyIndexed() { assert(isArray()); arraySizes->setVariablyIndexed(); } virtual void updateImplicitArraySize(int size) { assert(isArray()); arraySizes->updateImplicitSize(size); } + virtual void setImplicitlySized(bool isImplicitSized) { arraySizes->setImplicitlySized(isImplicitSized); } virtual bool isStruct() const { return basicType == EbtStruct || basicType == EbtBlock; } virtual bool isFloatingDomain() const { return basicType == EbtFloat || basicType == EbtDouble || basicType == EbtFloat16; } virtual bool isIntegerDomain() const @@ -1887,30 +1836,26 @@ class TType { return false; } virtual bool isOpaque() const { return basicType == EbtSampler -#ifndef GLSLANG_WEB || basicType == EbtAtomicUint || basicType == EbtAccStruct || basicType == EbtRayQuery -#endif - ; } + || basicType == EbtHitObjectNV; } virtual bool isBuiltIn() const { return getQualifier().builtIn != EbvNone; } - // "Image" is a superset of "Subpass" - virtual bool isImage() const { return basicType == EbtSampler && getSampler().isImage(); } + virtual bool isAttachmentEXT() const { return basicType == EbtSampler && getSampler().isAttachmentEXT(); } + virtual bool isImage() const { return basicType == EbtSampler && getSampler().isImage(); } virtual bool isSubpass() const { return basicType == EbtSampler && getSampler().isSubpass(); } virtual bool isTexture() const { return basicType == EbtSampler && getSampler().isTexture(); } + virtual bool isBindlessImage() const { return isImage() && qualifier.layoutBindlessImage; } + virtual bool isBindlessTexture() const { return isTexture() && qualifier.layoutBindlessSampler; } // Check the block-name convention of creating a block without populating it's members: virtual bool isUnusableName() const { return isStruct() && structure == nullptr; } virtual bool isParameterized() const { return typeParameters != nullptr; } -#ifdef GLSLANG_WEB - bool isAtomic() const { return false; } - bool isCoopMat() const { return false; } - bool isReference() const { return false; } - bool isSpirvType() const { return false; } -#else bool isAtomic() const { return basicType == EbtAtomicUint; } - bool isCoopMat() const { return coopmat; } + bool isCoopMat() const { return coopmatNV || coopmatKHR; } + bool isCoopMatNV() const { return coopmatNV; } + bool isCoopMatKHR() const { return coopmatKHR; } bool isReference() const { return getBasicType() == EbtReference; } bool isSpirvType() const { return getBasicType() == EbtSpirvType; } -#endif + int getCoopMatKHRuse() const { return coopmatKHRuse; } // return true if this type contains any subtype which satisfies the given predicate. template @@ -1953,6 +1898,11 @@ class TType { return contains([](const TType* t) { return t->isOpaque(); } ); } + virtual bool containsSampler() const + { + return contains([](const TType* t) { return t->isTexture() || t->isImage(); }); + } + // Recursively checks if the type contains a built-in variable virtual bool containsBuiltIn() const { @@ -1991,15 +1941,6 @@ class TType { return contains([](const TType* t) { return t->isArray() && t->arraySizes->isOuterSpecialization(); } ); } -#ifdef GLSLANG_WEB - bool containsDouble() const { return false; } - bool contains16BitFloat() const { return false; } - bool contains64BitInt() const { return false; } - bool contains16BitInt() const { return false; } - bool contains8BitInt() const { return false; } - bool containsCoopMat() const { return false; } - bool containsReference() const { return false; } -#else bool containsDouble() const { return containsBasicType(EbtDouble); @@ -2022,13 +1963,12 @@ class TType { } bool containsCoopMat() const { - return contains([](const TType* t) { return t->coopmat; } ); + return contains([](const TType* t) { return t->coopmatNV || t->coopmatKHR; } ); } bool containsReference() const { return containsBasicType(EbtReference); } -#endif // Array editing methods. Array descriptors can be shared across // type instances. This allows all uses of the same array @@ -2086,8 +2026,12 @@ class TType { // an explicit array. void adoptImplicitArraySizes(bool skipNonvariablyIndexed) { - if (isUnsizedArray() && !(skipNonvariablyIndexed || isArrayVariablyIndexed())) + if (isUnsizedArray() && + (qualifier.builtIn == EbvSampleMask || + !(skipNonvariablyIndexed || isArrayVariablyIndexed()))) { changeOuterArraySize(getImplicitArraySize()); + setImplicitlySized(true); + } // For multi-dim per-view arrays, set unsized inner dimension size to 1 if (qualifier.isPerView() && arraySizes && arraySizes->isInnerUnsized()) arraySizes->clearInnerUnsized(); @@ -2100,43 +2044,12 @@ class TType { } } - - void updateTypeParameters(const TType& type) - { - // For when we may already be sharing existing array descriptors, - // keeping the pointers the same, just updating the contents. - assert(typeParameters != nullptr); - assert(type.typeParameters != nullptr); - *typeParameters = *type.typeParameters; - } - void copyTypeParameters(const TArraySizes& s) + void copyTypeParameters(const TTypeParameters& s) { // For setting a fresh new set of type parameters, not yet worrying about sharing. - typeParameters = new TArraySizes; + typeParameters = new TTypeParameters; *typeParameters = s; } - void transferTypeParameters(TArraySizes* s) - { - // For setting an already allocated set of sizes that this type can use - // (no copy made). - typeParameters = s; - } - void clearTypeParameters() - { - typeParameters = nullptr; - } - - // Add inner array sizes, to any existing sizes, via copy; the - // sizes passed in can still be reused for other purposes. - void copyTypeParametersInnerSizes(const TArraySizes* s) - { - if (s != nullptr) { - if (typeParameters == nullptr) - copyTypeParameters(*s); - else - typeParameters->addInnerSizes(*s); - } - } const char* getBasicString() const { @@ -2150,7 +2063,6 @@ class TType { case EbtInt: return "int"; case EbtUint: return "uint"; case EbtSampler: return "sampler/image"; -#ifndef GLSLANG_WEB case EbtVoid: return "void"; case EbtDouble: return "double"; case EbtFloat16: return "float16_t"; @@ -2169,18 +2081,11 @@ class TType { case EbtReference: return "reference"; case EbtString: return "string"; case EbtSpirvType: return "spirv_type"; -#endif + case EbtCoopmat: return "coopmat"; default: return "unknown type"; } } -#ifdef GLSLANG_WEB - TString getCompleteString() const { return ""; } - const char* getStorageQualifierString() const { return ""; } - const char* getBuiltInVariableString() const { return ""; } - const char* getPrecisionQualifierString() const { return ""; } - TString getBasicTypeString() const { return ""; } -#else TString getCompleteString(bool syntactic = false, bool getQualifiers = true, bool getPrecision = true, bool getType = true, TString name = "", TString structName = "") const { @@ -2282,8 +2187,16 @@ class TType { appendStr(" layoutSecondaryViewportRelativeOffset="); appendInt(qualifier.layoutSecondaryViewportRelativeOffset); } + if (qualifier.layoutShaderRecord) appendStr(" shaderRecordNV"); + if (qualifier.layoutHitObjectShaderRecordNV) + appendStr(" hitobjectshaderrecordnv"); + + if (qualifier.layoutBindlessSampler) + appendStr(" layoutBindlessSampler"); + if (qualifier.layoutBindlessImage) + appendStr(" layoutBindlessImage"); appendStr(")"); } @@ -2471,12 +2384,21 @@ class TType { } } if (isParameterized()) { + if (isCoopMatKHR()) { + appendStr(" "); + appendStr("coopmat"); + } + appendStr("<"); - for (int i = 0; i < (int)typeParameters->getNumDims(); ++i) { - appendInt(typeParameters->getDimSize(i)); - if (i != (int)typeParameters->getNumDims() - 1) + for (int i = 0; i < (int)typeParameters->arraySizes->getNumDims(); ++i) { + appendInt(typeParameters->arraySizes->getDimSize(i)); + if (i != (int)typeParameters->arraySizes->getNumDims() - 1) appendStr(", "); } + if (coopmatKHRuse != -1) { + appendStr(", "); + appendInt(coopmatKHRuse); + } appendStr(">"); } if (getPrecision && qualifier.precision != EpqNone) { @@ -2537,13 +2459,13 @@ class TType { const char* getStorageQualifierString() const { return GetStorageQualifierString(qualifier.storage); } const char* getBuiltInVariableString() const { return GetBuiltInVariableString(qualifier.builtIn); } const char* getPrecisionQualifierString() const { return GetPrecisionQualifierString(qualifier.precision); } -#endif const TTypeList* getStruct() const { assert(isStruct()); return structure; } void setStruct(TTypeList* s) { assert(isStruct()); structure = s; } TTypeList* getWritableStruct() const { assert(isStruct()); return structure; } // This should only be used when known to not be sharing with other threads void setBasicType(const TBasicType& t) { basicType = t; } - + void setVectorSize(int s) { vectorSize = s; } + int computeNumComponents() const { int components = 0; @@ -2710,7 +2632,10 @@ class TType { bool sameArrayness(const TType& right) const { return ((arraySizes == nullptr && right.arraySizes == nullptr) || - (arraySizes != nullptr && right.arraySizes != nullptr && *arraySizes == *right.arraySizes)); + (arraySizes != nullptr && right.arraySizes != nullptr && + (*arraySizes == *right.arraySizes || + (arraySizes->isImplicitlySized() && right.arraySizes->isDefaultImplicitlySized()) || + (right.arraySizes->isImplicitlySized() && arraySizes->isDefaultImplicitlySized())))); } // See if two type's arrayness match in everything except their outer dimension @@ -2727,14 +2652,12 @@ class TType { (typeParameters != nullptr && right.typeParameters != nullptr && *typeParameters == *right.typeParameters)); } -#ifndef GLSLANG_WEB // See if two type's SPIR-V type contents match bool sameSpirvType(const TType& right) const { return ((spirvType == nullptr && right.spirvType == nullptr) || (spirvType != nullptr && right.spirvType != nullptr && *spirvType == *right.spirvType)); } -#endif // See if two type's elements match in all ways except basic type // If mismatch in structure members, return member indices in lpidx and rpidx. @@ -2749,7 +2672,8 @@ class TType { matrixCols == right.matrixCols && matrixRows == right.matrixRows && vector1 == right.vector1 && - isCoopMat() == right.isCoopMat() && + isCoopMatNV() == right.isCoopMatNV() && + isCoopMatKHR() == right.isCoopMatKHR() && sameStructType(right, lpidx, rpidx) && sameReferenceType(right); } @@ -2758,32 +2682,69 @@ class TType { // an OK function parameter bool coopMatParameterOK(const TType& right) const { - return isCoopMat() && right.isCoopMat() && (getBasicType() == right.getBasicType()) && - typeParameters == nullptr && right.typeParameters != nullptr; + if (isCoopMatNV()) { + return right.isCoopMatNV() && (getBasicType() == right.getBasicType()) && typeParameters == nullptr && + right.typeParameters != nullptr; + } + if (isCoopMatKHR() && right.isCoopMatKHR()) { + return ((getBasicType() == right.getBasicType()) || (getBasicType() == EbtCoopmat) || + (right.getBasicType() == EbtCoopmat)) && + typeParameters == nullptr && right.typeParameters != nullptr; + } + return false; } bool sameCoopMatBaseType(const TType &right) const { - bool rv = coopmat && right.coopmat; - if (getBasicType() == EbtFloat || getBasicType() == EbtFloat16) - rv = right.getBasicType() == EbtFloat || right.getBasicType() == EbtFloat16; - else if (getBasicType() == EbtUint || getBasicType() == EbtUint8) - rv = right.getBasicType() == EbtUint || right.getBasicType() == EbtUint8; - else if (getBasicType() == EbtInt || getBasicType() == EbtInt8) - rv = right.getBasicType() == EbtInt || right.getBasicType() == EbtInt8; - else - rv = false; + bool rv = false; + + if (isCoopMatNV()) { + rv = isCoopMatNV() && right.isCoopMatNV(); + if (getBasicType() == EbtFloat || getBasicType() == EbtFloat16) + rv = right.getBasicType() == EbtFloat || right.getBasicType() == EbtFloat16; + else if (getBasicType() == EbtUint || getBasicType() == EbtUint8 || getBasicType() == EbtUint16) + rv = right.getBasicType() == EbtUint || right.getBasicType() == EbtUint8 || right.getBasicType() == EbtUint16; + else if (getBasicType() == EbtInt || getBasicType() == EbtInt8 || getBasicType() == EbtInt16) + rv = right.getBasicType() == EbtInt || right.getBasicType() == EbtInt8 || right.getBasicType() == EbtInt16; + else + rv = false; + } else if (isCoopMatKHR() && right.isCoopMatKHR()) { + if (getBasicType() == EbtFloat || getBasicType() == EbtFloat16) + rv = right.getBasicType() == EbtFloat || right.getBasicType() == EbtFloat16 || right.getBasicType() == EbtCoopmat; + else if (getBasicType() == EbtUint || getBasicType() == EbtUint8 || getBasicType() == EbtUint16) + rv = right.getBasicType() == EbtUint || right.getBasicType() == EbtUint8 || right.getBasicType() == EbtUint16 || right.getBasicType() == EbtCoopmat; + else if (getBasicType() == EbtInt || getBasicType() == EbtInt8 || getBasicType() == EbtInt16) + rv = right.getBasicType() == EbtInt || right.getBasicType() == EbtInt8 || right.getBasicType() == EbtInt16 || right.getBasicType() == EbtCoopmat; + else + rv = false; + } return rv; } + bool sameCoopMatUse(const TType &right) const { + return coopmatKHRuse == right.coopmatKHRuse; + } + + bool sameCoopMatShapeAndUse(const TType &right) const + { + if (!isCoopMat() || !right.isCoopMat() || isCoopMatKHR() != right.isCoopMatKHR()) + return false; + + if (coopmatKHRuse != right.coopmatKHRuse) + return false; + + // Skip bit width type parameter (first array size) for coopmatNV + int firstArrayDimToCompare = isCoopMatNV() ? 1 : 0; + for (int i = firstArrayDimToCompare; i < typeParameters->arraySizes->getNumDims(); ++i) { + if (typeParameters->arraySizes->getDimSize(i) != right.typeParameters->arraySizes->getDimSize(i)) + return false; + } + return true; + } // See if two types match in all ways (just the actual type, not qualification) bool operator==(const TType& right) const { -#ifndef GLSLANG_WEB - return sameElementType(right) && sameArrayness(right) && sameTypeParameters(right) && sameSpirvType(right); -#else - return sameElementType(right) && sameArrayness(right) && sameTypeParameters(right); -#endif + return sameElementType(right) && sameArrayness(right) && sameTypeParameters(right) && sameCoopMatUse(right) && sameSpirvType(right); } bool operator!=(const TType& right) const @@ -2793,18 +2754,14 @@ class TType { unsigned int getBufferReferenceAlignment() const { -#ifndef GLSLANG_WEB if (getBasicType() == glslang::EbtReference) { return getReferentType()->getQualifier().hasBufferReferenceAlign() ? (1u << getReferentType()->getQualifier().layoutBufferReferenceAlign) : 16u; } -#endif return 0; } -#ifndef GLSLANG_WEB const TSpirvType& getSpirvType() const { assert(spirvType); return *spirvType; } -#endif protected: // Require consumer to pick between deep copy and shallow copy. @@ -2818,7 +2775,6 @@ class TType { { shallowCopy(copyOf); -#ifndef GLSLANG_WEB // GL_EXT_spirv_intrinsics if (copyOf.qualifier.spirvDecorate) { qualifier.spirvDecorate = new TSpirvDecorate; @@ -2829,7 +2785,6 @@ class TType { spirvType = new TSpirvType; *spirvType = *copyOf.spirvType; } -#endif if (copyOf.arraySizes) { arraySizes = new TArraySizes; @@ -2837,8 +2792,10 @@ class TType { } if (copyOf.typeParameters) { - typeParameters = new TArraySizes; - *typeParameters = *copyOf.typeParameters; + typeParameters = new TTypeParameters; + typeParameters->arraySizes = new TArraySizes; + *typeParameters->arraySizes = *copyOf.typeParameters->arraySizes; + typeParameters->basicType = copyOf.basicType; } if (copyOf.isStruct() && copyOf.structure) { @@ -2876,7 +2833,9 @@ class TType { // functionality is added. // HLSL does have a 1-component vectors, so this will be true to disambiguate // from a scalar. - bool coopmat : 1; + bool coopmatNV : 1; + bool coopmatKHR : 1; + int coopmatKHRuse : 4; // Accepts one of three values: 0, 1, 2 (gl_MatrixUseA, gl_MatrixUseB, gl_MatrixUseAccumulator) TQualifier qualifier; TArraySizes* arraySizes; // nullptr unless an array; can be shared across types @@ -2889,10 +2848,8 @@ class TType { TString *fieldName; // for structure field names TString *typeName; // for structure type name TSampler sampler; - TArraySizes* typeParameters;// nullptr unless a parameterized type; can be shared across types -#ifndef GLSLANG_WEB + TTypeParameters *typeParameters;// nullptr unless a parameterized type; can be shared across types TSpirvType* spirvType; // SPIR-V type defined by spirv_type directive -#endif }; } // end namespace glslang diff --git a/glslang/Include/arrays.h b/glslang/Include/arrays.h index 7f047d9fb1..91e1908355 100644 --- a/glslang/Include/arrays.h +++ b/glslang/Include/arrays.h @@ -147,6 +147,15 @@ struct TSmallArrayVector { sizes->erase(sizes->begin()); } + void pop_back() + { + assert(sizes != nullptr && sizes->size() > 0); + if (sizes->size() == 1) + dealloc(); + else + sizes->resize(sizes->size() - 1); + } + // 'this' should currently not be holding anything, and copyNonFront // will make it hold a copy of all but the first element of rhs. // (This would be useful for making a type that is dereferenced by @@ -222,7 +231,7 @@ struct TSmallArrayVector { struct TArraySizes { POOL_ALLOCATOR_NEW_DELETE(GetThreadPoolAllocator()) - TArraySizes() : implicitArraySize(1), variablyIndexed(false) { } + TArraySizes() : implicitArraySize(0), implicitlySized(true), variablyIndexed(false){ } // For breaking into two non-shared copies, independently modifiable. TArraySizes& operator=(const TArraySizes& from) @@ -230,6 +239,7 @@ struct TArraySizes { implicitArraySize = from.implicitArraySize; variablyIndexed = from.variablyIndexed; sizes = from.sizes; + implicitlySized = from.implicitlySized; return *this; } @@ -256,11 +266,17 @@ struct TArraySizes { void addInnerSize(int s, TIntermTyped* n) { sizes.push_back((unsigned)s, n); } void addInnerSize(TArraySize pair) { sizes.push_back(pair.size, pair.node); + implicitlySized = false; } void addInnerSizes(const TArraySizes& s) { sizes.push_back(s.sizes); } - void changeOuterSize(int s) { sizes.changeFront((unsigned)s); } - int getImplicitSize() const { return implicitArraySize; } - void updateImplicitSize(int s) { implicitArraySize = std::max(implicitArraySize, s); } + void changeOuterSize(int s) { + sizes.changeFront((unsigned)s); + implicitlySized = false; + } + int getImplicitSize() const { return implicitArraySize > 0 ? implicitArraySize : 1; } + void updateImplicitSize(int s) { + implicitArraySize = (std::max)(implicitArraySize, s); + } bool isInnerUnsized() const { for (int d = 1; d < sizes.size(); ++d) { @@ -295,7 +311,11 @@ struct TArraySizes { bool hasUnsized() const { return getOuterSize() == UnsizedArraySize || isInnerUnsized(); } bool isSized() const { return getOuterSize() != UnsizedArraySize; } + bool isImplicitlySized() const { return implicitlySized; } + bool isDefaultImplicitlySized() const { return implicitlySized && implicitArraySize == 0; } + void setImplicitlySized(bool isImplicitSizing) { implicitlySized = isImplicitSizing; } void dereference() { sizes.pop_front(); } + void removeLastSize() { sizes.pop_back(); } void copyDereferenced(const TArraySizes& rhs) { assert(sizes.size() == 0); @@ -333,6 +353,7 @@ struct TArraySizes { // the implicit size of the array, if not variably indexed and // otherwise legal. int implicitArraySize; + bool implicitlySized; bool variablyIndexed; // true if array is indexed with a non compile-time constant }; diff --git a/glslang/Include/glslang_c_interface.h b/glslang/Include/glslang_c_interface.h index 9e5909ce88..7fa1a05d51 100644 --- a/glslang/Include/glslang_c_interface.h +++ b/glslang/Include/glslang_c_interface.h @@ -148,28 +148,26 @@ typedef struct glslang_resource_s { int max_task_work_group_size_y_nv; int max_task_work_group_size_z_nv; int max_mesh_view_count_nv; - int maxDualSourceDrawBuffersEXT; + int max_mesh_output_vertices_ext; + int max_mesh_output_primitives_ext; + int max_mesh_work_group_size_x_ext; + int max_mesh_work_group_size_y_ext; + int max_mesh_work_group_size_z_ext; + int max_task_work_group_size_x_ext; + int max_task_work_group_size_y_ext; + int max_task_work_group_size_z_ext; + int max_mesh_view_count_ext; + union + { + int max_dual_source_draw_buffers_ext; + + /* Incorrectly capitalized name retained for backward compatibility */ + int maxDualSourceDrawBuffersEXT; + }; glslang_limits_t limits; } glslang_resource_t; -typedef struct glslang_input_s { - glslang_source_t language; - glslang_stage_t stage; - glslang_client_t client; - glslang_target_client_version_t client_version; - glslang_target_language_t target_language; - glslang_target_language_version_t target_language_version; - /** Shader source code */ - const char* code; - int default_version; - glslang_profile_t default_profile; - int force_default_version_and_profile; - int forward_compatible; - glslang_messages_t messages; - const glslang_resource_t* resource; -} glslang_input_t; - /* Inclusion result structure allocated by C include_local/include_system callbacks */ typedef struct glsl_include_result_s { /* Header file name or NULL if inclusion failed */ @@ -199,6 +197,25 @@ typedef struct glsl_include_callbacks_s { glsl_free_include_result_func free_include_result; } glsl_include_callbacks_t; +typedef struct glslang_input_s { + glslang_source_t language; + glslang_stage_t stage; + glslang_client_t client; + glslang_target_client_version_t client_version; + glslang_target_language_t target_language; + glslang_target_language_version_t target_language_version; + /** Shader source code */ + const char* code; + int default_version; + glslang_profile_t default_profile; + int force_default_version_and_profile; + int forward_compatible; + glslang_messages_t messages; + const glslang_resource_t* resource; + glsl_include_callbacks_t callbacks; + void* callbacks_ctx; +} glslang_input_t; + /* SpvOptions counterpart */ typedef struct glslang_spv_options_s { bool generate_debug_info; @@ -207,6 +224,9 @@ typedef struct glslang_spv_options_s { bool optimize_size; bool disassemble; bool validate; + bool emit_nonsemantic_shader_debug_info; + bool emit_nonsemantic_shader_debug_source; + bool compile_only; } glslang_spv_options_t; #ifdef __cplusplus @@ -229,11 +249,12 @@ extern "C" { #define GLSLANG_EXPORT #endif -GLSLANG_EXPORT int glslang_initialize_process(); -GLSLANG_EXPORT void glslang_finalize_process(); +GLSLANG_EXPORT int glslang_initialize_process(void); +GLSLANG_EXPORT void glslang_finalize_process(void); GLSLANG_EXPORT glslang_shader_t* glslang_shader_create(const glslang_input_t* input); GLSLANG_EXPORT void glslang_shader_delete(glslang_shader_t* shader); +GLSLANG_EXPORT void glslang_shader_set_preamble(glslang_shader_t* shader, const char* s); GLSLANG_EXPORT void glslang_shader_shift_binding(glslang_shader_t* shader, glslang_resource_type_t res, unsigned int base); GLSLANG_EXPORT void glslang_shader_shift_binding_for_set(glslang_shader_t* shader, glslang_resource_type_t res, unsigned int base, unsigned int set); GLSLANG_EXPORT void glslang_shader_set_options(glslang_shader_t* shader, int options); // glslang_shader_options_t @@ -244,7 +265,7 @@ GLSLANG_EXPORT const char* glslang_shader_get_preprocessed_code(glslang_shader_t GLSLANG_EXPORT const char* glslang_shader_get_info_log(glslang_shader_t* shader); GLSLANG_EXPORT const char* glslang_shader_get_info_debug_log(glslang_shader_t* shader); -GLSLANG_EXPORT glslang_program_t* glslang_program_create(); +GLSLANG_EXPORT glslang_program_t* glslang_program_create(void); GLSLANG_EXPORT void glslang_program_delete(glslang_program_t* program); GLSLANG_EXPORT void glslang_program_add_shader(glslang_program_t* program, glslang_shader_t* shader); GLSLANG_EXPORT int glslang_program_link(glslang_program_t* program, int messages); // glslang_messages_t diff --git a/glslang/Include/glslang_c_shader_types.h b/glslang/Include/glslang_c_shader_types.h index dc9009f302..9bc211496c 100644 --- a/glslang/Include/glslang_c_shader_types.h +++ b/glslang/Include/glslang_c_shader_types.h @@ -43,14 +43,22 @@ typedef enum { GLSLANG_STAGE_GEOMETRY, GLSLANG_STAGE_FRAGMENT, GLSLANG_STAGE_COMPUTE, - GLSLANG_STAGE_RAYGEN_NV, - GLSLANG_STAGE_INTERSECT_NV, - GLSLANG_STAGE_ANYHIT_NV, - GLSLANG_STAGE_CLOSESTHIT_NV, - GLSLANG_STAGE_MISS_NV, - GLSLANG_STAGE_CALLABLE_NV, - GLSLANG_STAGE_TASK_NV, - GLSLANG_STAGE_MESH_NV, + GLSLANG_STAGE_RAYGEN, + GLSLANG_STAGE_RAYGEN_NV = GLSLANG_STAGE_RAYGEN, + GLSLANG_STAGE_INTERSECT, + GLSLANG_STAGE_INTERSECT_NV = GLSLANG_STAGE_INTERSECT, + GLSLANG_STAGE_ANYHIT, + GLSLANG_STAGE_ANYHIT_NV = GLSLANG_STAGE_ANYHIT, + GLSLANG_STAGE_CLOSESTHIT, + GLSLANG_STAGE_CLOSESTHIT_NV = GLSLANG_STAGE_CLOSESTHIT, + GLSLANG_STAGE_MISS, + GLSLANG_STAGE_MISS_NV = GLSLANG_STAGE_MISS, + GLSLANG_STAGE_CALLABLE, + GLSLANG_STAGE_CALLABLE_NV = GLSLANG_STAGE_CALLABLE, + GLSLANG_STAGE_TASK, + GLSLANG_STAGE_TASK_NV = GLSLANG_STAGE_TASK, + GLSLANG_STAGE_MESH, + GLSLANG_STAGE_MESH_NV = GLSLANG_STAGE_MESH, LAST_ELEMENT_MARKER(GLSLANG_STAGE_COUNT), } glslang_stage_t; // would be better as stage, but this is ancient now @@ -62,14 +70,22 @@ typedef enum { GLSLANG_STAGE_GEOMETRY_MASK = (1 << GLSLANG_STAGE_GEOMETRY), GLSLANG_STAGE_FRAGMENT_MASK = (1 << GLSLANG_STAGE_FRAGMENT), GLSLANG_STAGE_COMPUTE_MASK = (1 << GLSLANG_STAGE_COMPUTE), - GLSLANG_STAGE_RAYGEN_NV_MASK = (1 << GLSLANG_STAGE_RAYGEN_NV), - GLSLANG_STAGE_INTERSECT_NV_MASK = (1 << GLSLANG_STAGE_INTERSECT_NV), - GLSLANG_STAGE_ANYHIT_NV_MASK = (1 << GLSLANG_STAGE_ANYHIT_NV), - GLSLANG_STAGE_CLOSESTHIT_NV_MASK = (1 << GLSLANG_STAGE_CLOSESTHIT_NV), - GLSLANG_STAGE_MISS_NV_MASK = (1 << GLSLANG_STAGE_MISS_NV), - GLSLANG_STAGE_CALLABLE_NV_MASK = (1 << GLSLANG_STAGE_CALLABLE_NV), - GLSLANG_STAGE_TASK_NV_MASK = (1 << GLSLANG_STAGE_TASK_NV), - GLSLANG_STAGE_MESH_NV_MASK = (1 << GLSLANG_STAGE_MESH_NV), + GLSLANG_STAGE_RAYGEN_MASK = (1 << GLSLANG_STAGE_RAYGEN), + GLSLANG_STAGE_RAYGEN_NV_MASK = GLSLANG_STAGE_RAYGEN_MASK, + GLSLANG_STAGE_INTERSECT_MASK = (1 << GLSLANG_STAGE_INTERSECT), + GLSLANG_STAGE_INTERSECT_NV_MASK = GLSLANG_STAGE_INTERSECT_MASK, + GLSLANG_STAGE_ANYHIT_MASK = (1 << GLSLANG_STAGE_ANYHIT), + GLSLANG_STAGE_ANYHIT_NV_MASK = GLSLANG_STAGE_ANYHIT_MASK, + GLSLANG_STAGE_CLOSESTHIT_MASK = (1 << GLSLANG_STAGE_CLOSESTHIT), + GLSLANG_STAGE_CLOSESTHIT_NV_MASK = GLSLANG_STAGE_CLOSESTHIT_MASK, + GLSLANG_STAGE_MISS_MASK = (1 << GLSLANG_STAGE_MISS), + GLSLANG_STAGE_MISS_NV_MASK = GLSLANG_STAGE_MISS_MASK, + GLSLANG_STAGE_CALLABLE_MASK = (1 << GLSLANG_STAGE_CALLABLE), + GLSLANG_STAGE_CALLABLE_NV_MASK = GLSLANG_STAGE_CALLABLE_MASK, + GLSLANG_STAGE_TASK_MASK = (1 << GLSLANG_STAGE_TASK), + GLSLANG_STAGE_TASK_NV_MASK = GLSLANG_STAGE_TASK_MASK, + GLSLANG_STAGE_MESH_MASK = (1 << GLSLANG_STAGE_MESH), + GLSLANG_STAGE_MESH_NV_MASK = GLSLANG_STAGE_MESH_MASK, LAST_ELEMENT_MARKER(GLSLANG_STAGE_MASK_COUNT), } glslang_stage_mask_t; diff --git a/glslang/Include/intermediate.h b/glslang/Include/intermediate.h index a64ed68378..9d311d60b5 100644 --- a/glslang/Include/intermediate.h +++ b/glslang/Include/intermediate.h @@ -67,13 +67,12 @@ class TIntermediate; enum TOperator { EOpNull, // if in a node, should only mean a node is still being built EOpSequence, // denotes a list of statements, or parameters, etc. + EOpScope, // Used by debugging to denote a scoped list of statements EOpLinkerObjects, // for aggregate node of objects the linker may need, if not reference by the rest of the AST EOpFunctionCall, EOpFunction, // For function definition EOpParameters, // an aggregate listing the parameters to a function -#ifndef GLSLANG_WEB EOpSpirvInst, -#endif // // Unary operators @@ -91,6 +90,8 @@ enum TOperator { EOpCopyObject, + EOpDeclare, // Used by debugging to force declaration of variable in correct scope + // (u)int* -> bool EOpConvInt8ToBool, EOpConvUint8ToBool, @@ -626,6 +627,9 @@ enum TOperator { EOpCooperativeMatrixLoad, EOpCooperativeMatrixStore, EOpCooperativeMatrixMulAdd, + EOpCooperativeMatrixLoadNV, + EOpCooperativeMatrixStoreNV, + EOpCooperativeMatrixMulAddNV, EOpBeginInvocationInterlock, // Fragment only EOpEndInvocationInterlock, // Fragment only @@ -763,7 +767,8 @@ enum TOperator { EOpConstructTextureSampler, EOpConstructNonuniform, // expected to be transformed away, not present in final AST EOpConstructReference, - EOpConstructCooperativeMatrix, + EOpConstructCooperativeMatrixNV, + EOpConstructCooperativeMatrixKHR, EOpConstructAccStruct, EOpConstructGuardEnd, @@ -824,6 +829,7 @@ enum TOperator { EOpSubpassLoadMS, EOpSparseImageLoad, EOpSparseImageLoadLod, + EOpColorAttachmentReadEXT, // Fragment only EOpImageGuardEnd, @@ -934,6 +940,8 @@ enum TOperator { EOpExecuteCallableNV, EOpExecuteCallableKHR, EOpWritePackedPrimitiveIndices4x8NV, + EOpEmitMeshTasksEXT, + EOpSetMeshOutputsEXT, // // GL_EXT_ray_query operations @@ -963,7 +971,44 @@ enum TOperator { EOpRayQueryGetIntersectionObjectToWorld, EOpRayQueryGetIntersectionWorldToObject, + // + // GL_NV_shader_invocation_reorder // + + EOpHitObjectTraceRayNV, + EOpHitObjectTraceRayMotionNV, + EOpHitObjectRecordHitNV, + EOpHitObjectRecordHitMotionNV, + EOpHitObjectRecordHitWithIndexNV, + EOpHitObjectRecordHitWithIndexMotionNV, + EOpHitObjectRecordMissNV, + EOpHitObjectRecordMissMotionNV, + EOpHitObjectRecordEmptyNV, + EOpHitObjectExecuteShaderNV, + EOpHitObjectIsEmptyNV, + EOpHitObjectIsMissNV, + EOpHitObjectIsHitNV, + EOpHitObjectGetRayTMinNV, + EOpHitObjectGetRayTMaxNV, + EOpHitObjectGetObjectRayOriginNV, + EOpHitObjectGetObjectRayDirectionNV, + EOpHitObjectGetWorldRayOriginNV, + EOpHitObjectGetWorldRayDirectionNV, + EOpHitObjectGetWorldToObjectNV, + EOpHitObjectGetObjectToWorldNV, + EOpHitObjectGetInstanceCustomIndexNV, + EOpHitObjectGetInstanceIdNV, + EOpHitObjectGetGeometryIndexNV, + EOpHitObjectGetPrimitiveIndexNV, + EOpHitObjectGetHitKindNV, + EOpHitObjectGetShaderBindingTableRecordIndexNV, + EOpHitObjectGetShaderRecordBufferHandleNV, + EOpHitObjectGetAttributesNV, + EOpHitObjectGetCurrentTimeNV, + EOpReorderThreadNV, + EOpFetchMicroTriangleVertexPositionNV, + EOpFetchMicroTriangleVertexBarycentricNV, + // HLSL operations // @@ -1050,6 +1095,24 @@ enum TOperator { // Shader Clock Ops EOpReadClockSubgroupKHR, EOpReadClockDeviceKHR, + + // GL_EXT_ray_tracing_position_fetch + EOpRayQueryGetIntersectionTriangleVertexPositionsEXT, + + // Shader tile image ops + EOpStencilAttachmentReadEXT, // Fragment only + EOpDepthAttachmentReadEXT, // Fragment only + + // Image processing + EOpImageSampleWeightedQCOM, + EOpImageBoxFilterQCOM, + EOpImageBlockMatchSADQCOM, + EOpImageBlockMatchSSDQCOM, +}; + +enum TLinkType { + ELinkNone, + ELinkExport, }; class TIntermTraverser; @@ -1081,31 +1144,31 @@ class TIntermNode { virtual const glslang::TSourceLoc& getLoc() const { return loc; } virtual void setLoc(const glslang::TSourceLoc& l) { loc = l; } virtual void traverse(glslang::TIntermTraverser*) = 0; - virtual glslang::TIntermTyped* getAsTyped() { return 0; } - virtual glslang::TIntermOperator* getAsOperator() { return 0; } - virtual glslang::TIntermConstantUnion* getAsConstantUnion() { return 0; } - virtual glslang::TIntermAggregate* getAsAggregate() { return 0; } - virtual glslang::TIntermUnary* getAsUnaryNode() { return 0; } - virtual glslang::TIntermBinary* getAsBinaryNode() { return 0; } - virtual glslang::TIntermSelection* getAsSelectionNode() { return 0; } - virtual glslang::TIntermSwitch* getAsSwitchNode() { return 0; } - virtual glslang::TIntermMethod* getAsMethodNode() { return 0; } - virtual glslang::TIntermSymbol* getAsSymbolNode() { return 0; } - virtual glslang::TIntermBranch* getAsBranchNode() { return 0; } - virtual glslang::TIntermLoop* getAsLoopNode() { return 0; } - - virtual const glslang::TIntermTyped* getAsTyped() const { return 0; } - virtual const glslang::TIntermOperator* getAsOperator() const { return 0; } - virtual const glslang::TIntermConstantUnion* getAsConstantUnion() const { return 0; } - virtual const glslang::TIntermAggregate* getAsAggregate() const { return 0; } - virtual const glslang::TIntermUnary* getAsUnaryNode() const { return 0; } - virtual const glslang::TIntermBinary* getAsBinaryNode() const { return 0; } - virtual const glslang::TIntermSelection* getAsSelectionNode() const { return 0; } - virtual const glslang::TIntermSwitch* getAsSwitchNode() const { return 0; } - virtual const glslang::TIntermMethod* getAsMethodNode() const { return 0; } - virtual const glslang::TIntermSymbol* getAsSymbolNode() const { return 0; } - virtual const glslang::TIntermBranch* getAsBranchNode() const { return 0; } - virtual const glslang::TIntermLoop* getAsLoopNode() const { return 0; } + virtual glslang::TIntermTyped* getAsTyped() { return nullptr; } + virtual glslang::TIntermOperator* getAsOperator() { return nullptr; } + virtual glslang::TIntermConstantUnion* getAsConstantUnion() { return nullptr; } + virtual glslang::TIntermAggregate* getAsAggregate() { return nullptr; } + virtual glslang::TIntermUnary* getAsUnaryNode() { return nullptr; } + virtual glslang::TIntermBinary* getAsBinaryNode() { return nullptr; } + virtual glslang::TIntermSelection* getAsSelectionNode() { return nullptr; } + virtual glslang::TIntermSwitch* getAsSwitchNode() { return nullptr; } + virtual glslang::TIntermMethod* getAsMethodNode() { return nullptr; } + virtual glslang::TIntermSymbol* getAsSymbolNode() { return nullptr; } + virtual glslang::TIntermBranch* getAsBranchNode() { return nullptr; } + virtual glslang::TIntermLoop* getAsLoopNode() { return nullptr; } + + virtual const glslang::TIntermTyped* getAsTyped() const { return nullptr; } + virtual const glslang::TIntermOperator* getAsOperator() const { return nullptr; } + virtual const glslang::TIntermConstantUnion* getAsConstantUnion() const { return nullptr; } + virtual const glslang::TIntermAggregate* getAsAggregate() const { return nullptr; } + virtual const glslang::TIntermUnary* getAsUnaryNode() const { return nullptr; } + virtual const glslang::TIntermBinary* getAsBinaryNode() const { return nullptr; } + virtual const glslang::TIntermSelection* getAsSelectionNode() const { return nullptr; } + virtual const glslang::TIntermSwitch* getAsSwitchNode() const { return nullptr; } + virtual const glslang::TIntermMethod* getAsMethodNode() const { return nullptr; } + virtual const glslang::TIntermSymbol* getAsSymbolNode() const { return nullptr; } + virtual const glslang::TIntermBranch* getAsBranchNode() const { return nullptr; } + virtual const glslang::TIntermLoop* getAsLoopNode() const { return nullptr; } virtual ~TIntermNode() { } protected: @@ -1269,9 +1332,11 @@ class TIntermMethod : public TIntermTyped { virtual const TString& getMethodName() const { return method; } virtual TIntermTyped* getObject() const { return object; } virtual void traverse(TIntermTraverser*); + void setExport() { linkType = ELinkExport; } protected: TIntermTyped* object; TString method; + TLinkType linkType; }; // @@ -1283,12 +1348,7 @@ class TIntermSymbol : public TIntermTyped { // per process threadPoolAllocator, then it causes increased memory usage per compile // it is essential to use "symbol = sym" to assign to symbol TIntermSymbol(long long i, const TString& n, const TType& t) - : TIntermTyped(t), id(i), -#ifndef GLSLANG_WEB - flattenSubset(-1), -#endif - constSubtree(nullptr) - { name = n; } + : TIntermTyped(t), id(i), flattenSubset(-1), constSubtree(nullptr) { name = n; } virtual long long getId() const { return id; } virtual void changeId(long long i) { id = i; } virtual const TString& getName() const { return name; } @@ -1299,12 +1359,10 @@ class TIntermSymbol : public TIntermTyped { const TConstUnionArray& getConstArray() const { return constArray; } void setConstSubtree(TIntermTyped* subtree) { constSubtree = subtree; } TIntermTyped* getConstSubtree() const { return constSubtree; } -#ifndef GLSLANG_WEB void setFlattenSubset(int subset) { flattenSubset = subset; } virtual const TString& getAccessName() const; int getFlattenSubset() const { return flattenSubset; } // -1 means full object -#endif // This is meant for cases where a node has already been constructed, and // later on, it becomes necessary to switch to a different symbol. @@ -1312,9 +1370,7 @@ class TIntermSymbol : public TIntermTyped { protected: long long id; // the unique id of the symbol this node represents -#ifndef GLSLANG_WEB int flattenSubset; // how deeply the flattened object rooted at id has been dereferenced -#endif TString name; // the name of the symbol this node represents TConstUnionArray constArray; // if the symbol is a front-end compile-time constant, this is its value TIntermTyped* constSubtree; @@ -1353,6 +1409,7 @@ struct TCrackedTextureOp { bool subpass; bool lodClamp; bool fragMask; + bool attachmentEXT; }; // @@ -1368,19 +1425,11 @@ class TIntermOperator : public TIntermTyped { bool isConstructor() const; bool isTexture() const { return op > EOpTextureGuardBegin && op < EOpTextureGuardEnd; } bool isSampling() const { return op > EOpSamplingGuardBegin && op < EOpSamplingGuardEnd; } -#ifdef GLSLANG_WEB - bool isImage() const { return false; } - bool isSparseTexture() const { return false; } - bool isImageFootprint() const { return false; } - bool isSparseImage() const { return false; } - bool isSubgroup() const { return false; } -#else bool isImage() const { return op > EOpImageGuardBegin && op < EOpImageGuardEnd; } bool isSparseTexture() const { return op > EOpSparseTextureGuardBegin && op < EOpSparseTextureGuardEnd; } bool isImageFootprint() const { return op > EOpImageFootprintGuardBegin && op < EOpImageFootprintGuardEnd; } bool isSparseImage() const { return op == EOpSparseImageLoad; } bool isSubgroup() const { return op > EOpSubgroupGuardStart && op < EOpSubgroupGuardStop; } -#endif void setOperationPrecision(TPrecisionQualifier p) { operationPrecision = p; } TPrecisionQualifier getOperationPrecision() const { return operationPrecision != EpqNone ? @@ -1409,6 +1458,7 @@ class TIntermOperator : public TIntermTyped { cracked.gather = false; cracked.grad = false; cracked.subpass = false; + cracked.attachmentEXT = false; cracked.lodClamp = false; cracked.fragMask = false; @@ -1485,7 +1535,6 @@ class TIntermOperator : public TIntermTyped { cracked.offset = true; cracked.proj = true; break; -#ifndef GLSLANG_WEB case EOpTextureClamp: case EOpSparseTextureClamp: cracked.lodClamp = true; @@ -1569,7 +1618,9 @@ class TIntermOperator : public TIntermTyped { case EOpSubpassLoadMS: cracked.subpass = true; break; -#endif + case EOpColorAttachmentReadEXT: + cracked.attachmentEXT = true; + break; default: break; } @@ -1611,8 +1662,8 @@ class TIntermBinary : public TIntermOperator { // class TIntermUnary : public TIntermOperator { public: - TIntermUnary(TOperator o, TType& t) : TIntermOperator(o, t), operand(0) {} - TIntermUnary(TOperator o) : TIntermOperator(o), operand(0) {} + TIntermUnary(TOperator o, TType& t) : TIntermOperator(o, t), operand(nullptr) {} + TIntermUnary(TOperator o) : TIntermOperator(o), operand(nullptr) {} virtual void traverse(TIntermTraverser*); virtual void setOperand(TIntermTyped* o) { operand = o; } virtual TIntermTyped* getOperand() { return operand; } @@ -1620,15 +1671,11 @@ class TIntermUnary : public TIntermOperator { virtual TIntermUnary* getAsUnaryNode() { return this; } virtual const TIntermUnary* getAsUnaryNode() const { return this; } virtual void updatePrecision(); -#ifndef GLSLANG_WEB void setSpirvInstruction(const TSpirvInstruction& inst) { spirvInst = inst; } const TSpirvInstruction& getSpirvInstruction() const { return spirvInst; } -#endif protected: TIntermTyped* operand; -#ifndef GLSLANG_WEB TSpirvInstruction spirvInst; -#endif }; typedef TVector TIntermSequence; @@ -1660,10 +1707,11 @@ class TIntermAggregate : public TIntermOperator { bool getDebug() const { return debug; } void setPragmaTable(const TPragmaTable& pTable); const TPragmaTable& getPragmaTable() const { return *pragmaTable; } -#ifndef GLSLANG_WEB void setSpirvInstruction(const TSpirvInstruction& inst) { spirvInst = inst; } const TSpirvInstruction& getSpirvInstruction() const { return spirvInst; } -#endif + + void setLinkType(TLinkType l) { linkType = l; } + TLinkType getLinkType() const { return linkType; } protected: TIntermAggregate(const TIntermAggregate&); // disallow copy constructor TIntermAggregate& operator=(const TIntermAggregate&); // disallow assignment operator @@ -1674,9 +1722,8 @@ class TIntermAggregate : public TIntermOperator { bool optimize; bool debug; TPragmaTable* pragmaTable; -#ifndef GLSLANG_WEB TSpirvInstruction spirvInst; -#endif + TLinkType linkType = ELinkNone; }; // @@ -1814,7 +1861,7 @@ class TIntermTraverser { TIntermNode *getParentNode() { - return path.size() == 0 ? NULL : path.back(); + return path.size() == 0 ? nullptr : path.back(); } const bool preVisit; diff --git a/glslang/MachineIndependent/Constant.cpp b/glslang/MachineIndependent/Constant.cpp index 5fc61dbb79..8acf9e5526 100644 --- a/glslang/MachineIndependent/Constant.cpp +++ b/glslang/MachineIndependent/Constant.cpp @@ -177,7 +177,6 @@ TIntermTyped* TIntermConstantUnion::fold(TOperator op, const TIntermTyped* right newConstArray[i].setUConst(leftUnionArray[i].getUConst() / rightUnionArray[i].getUConst()); break; -#ifndef GLSLANG_WEB case EbtInt8: if (rightUnionArray[i] == (signed char)0) newConstArray[i].setI8Const((signed char)0x7F); @@ -212,9 +211,9 @@ TIntermTyped* TIntermConstantUnion::fold(TOperator op, const TIntermTyped* right case EbtInt64: if (rightUnionArray[i] == 0ll) - newConstArray[i].setI64Const(0x7FFFFFFFFFFFFFFFll); - else if (rightUnionArray[i].getI64Const() == -1 && leftUnionArray[i].getI64Const() == (long long)-0x8000000000000000ll) - newConstArray[i].setI64Const((long long)-0x8000000000000000ll); + newConstArray[i].setI64Const(LLONG_MAX); + else if (rightUnionArray[i].getI64Const() == -1 && leftUnionArray[i].getI64Const() == LLONG_MIN) + newConstArray[i].setI64Const(LLONG_MIN); else newConstArray[i].setI64Const(leftUnionArray[i].getI64Const() / rightUnionArray[i].getI64Const()); break; @@ -226,8 +225,7 @@ TIntermTyped* TIntermConstantUnion::fold(TOperator op, const TIntermTyped* right newConstArray[i].setU64Const(leftUnionArray[i].getU64Const() / rightUnionArray[i].getU64Const()); break; default: - return 0; -#endif + return nullptr; } } break; @@ -266,7 +264,6 @@ TIntermTyped* TIntermConstantUnion::fold(TOperator op, const TIntermTyped* right newConstArray[i].setIConst(0); break; } else goto modulo_default; -#ifndef GLSLANG_WEB case EbtInt64: if (rightUnionArray[i].getI64Const() == -1 && leftUnionArray[i].getI64Const() == LLONG_MIN) { newConstArray[i].setI64Const(0); @@ -277,7 +274,6 @@ TIntermTyped* TIntermConstantUnion::fold(TOperator op, const TIntermTyped* right newConstArray[i].setIConst(0); break; } else goto modulo_default; -#endif default: modulo_default: newConstArray[i] = leftUnionArray[i] % rightUnionArray[i]; @@ -354,7 +350,7 @@ TIntermTyped* TIntermConstantUnion::fold(TOperator op, const TIntermTyped* right break; default: - return 0; + return nullptr; } TIntermConstantUnion *newNode = new TIntermConstantUnion(newConstArray, returnType); @@ -507,14 +503,12 @@ TIntermTyped* TIntermConstantUnion::fold(TOperator op, const TType& returnType) : -unionArray[i].getIConst()); break; case EbtUint: newConstArray[i].setUConst(static_cast(-static_cast(unionArray[i].getUConst()))); break; -#ifndef GLSLANG_WEB case EbtInt8: newConstArray[i].setI8Const(-unionArray[i].getI8Const()); break; case EbtUint8: newConstArray[i].setU8Const(static_cast(-static_cast(unionArray[i].getU8Const()))); break; case EbtInt16: newConstArray[i].setI16Const(-unionArray[i].getI16Const()); break; case EbtUint16:newConstArray[i].setU16Const(static_cast(-static_cast(unionArray[i].getU16Const()))); break; case EbtInt64: newConstArray[i].setI64Const(-unionArray[i].getI64Const()); break; case EbtUint64: newConstArray[i].setU64Const(static_cast(-static_cast(unionArray[i].getU64Const()))); break; -#endif default: return nullptr; } @@ -684,7 +678,6 @@ TIntermTyped* TIntermConstantUnion::fold(TOperator op, const TType& returnType) case EOpConvDoubleToInt: newConstArray[i].setIConst(static_cast(unionArray[i].getDConst())); break; -#ifndef GLSLANG_WEB case EOpConvInt8ToBool: newConstArray[i].setBConst(unionArray[i].getI8Const() != 0); break; case EOpConvUint8ToBool: @@ -919,7 +912,6 @@ TIntermTyped* TIntermConstantUnion::fold(TOperator op, const TType& returnType) case EOpConvUint64ToPtr: case EOpConstructReference: newConstArray[i].setU64Const(unionArray[i].getU64Const()); break; -#endif // TODO: 3.0 Functionality: unary constant folding: the rest of the ops have to be fleshed out @@ -1066,7 +1058,6 @@ TIntermTyped* TIntermediate::fold(TIntermAggregate* aggrNode) case EbtUint: newConstArray[comp].setUConst(std::min(childConstUnions[0][arg0comp].getUConst(), childConstUnions[1][arg1comp].getUConst())); break; -#ifndef GLSLANG_WEB case EbtInt8: newConstArray[comp].setI8Const(std::min(childConstUnions[0][arg0comp].getI8Const(), childConstUnions[1][arg1comp].getI8Const())); break; @@ -1085,7 +1076,6 @@ TIntermTyped* TIntermediate::fold(TIntermAggregate* aggrNode) case EbtUint64: newConstArray[comp].setU64Const(std::min(childConstUnions[0][arg0comp].getU64Const(), childConstUnions[1][arg1comp].getU64Const())); break; -#endif default: assert(false && "Default missing"); } break; @@ -1102,7 +1092,6 @@ TIntermTyped* TIntermediate::fold(TIntermAggregate* aggrNode) case EbtUint: newConstArray[comp].setUConst(std::max(childConstUnions[0][arg0comp].getUConst(), childConstUnions[1][arg1comp].getUConst())); break; -#ifndef GLSLANG_WEB case EbtInt8: newConstArray[comp].setI8Const(std::max(childConstUnions[0][arg0comp].getI8Const(), childConstUnions[1][arg1comp].getI8Const())); break; @@ -1121,7 +1110,6 @@ TIntermTyped* TIntermediate::fold(TIntermAggregate* aggrNode) case EbtUint64: newConstArray[comp].setU64Const(std::max(childConstUnions[0][arg0comp].getU64Const(), childConstUnions[1][arg1comp].getU64Const())); break; -#endif default: assert(false && "Default missing"); } break; @@ -1137,7 +1125,6 @@ TIntermTyped* TIntermediate::fold(TIntermAggregate* aggrNode) newConstArray[comp].setUConst(std::min(std::max(childConstUnions[0][arg0comp].getUConst(), childConstUnions[1][arg1comp].getUConst()), childConstUnions[2][arg2comp].getUConst())); break; -#ifndef GLSLANG_WEB case EbtInt8: newConstArray[comp].setI8Const(std::min(std::max(childConstUnions[0][arg0comp].getI8Const(), childConstUnions[1][arg1comp].getI8Const()), childConstUnions[2][arg2comp].getI8Const())); @@ -1166,7 +1153,6 @@ TIntermTyped* TIntermediate::fold(TIntermAggregate* aggrNode) newConstArray[comp].setU64Const(std::min(std::max(childConstUnions[0][arg0comp].getU64Const(), childConstUnions[1][arg1comp].getU64Const()), childConstUnions[2][arg2comp].getU64Const())); break; -#endif default: assert(false && "Default missing"); } break; @@ -1345,7 +1331,7 @@ TIntermTyped* TIntermediate::foldDereference(TIntermTyped* node, int index, cons { TType dereferencedType(node->getType(), index); dereferencedType.getQualifier().storage = EvqConst; - TIntermTyped* result = 0; + TIntermTyped* result = nullptr; int size = dereferencedType.computeNumComponents(); // arrays, vectors, matrices, all use simple multiplicative math @@ -1365,7 +1351,7 @@ TIntermTyped* TIntermediate::foldDereference(TIntermTyped* node, int index, cons result = addConstantUnion(TConstUnionArray(node->getAsConstantUnion()->getConstArray(), start, size), node->getType(), loc); - if (result == 0) + if (result == nullptr) result = node; else result->setType(dereferencedType); @@ -1387,7 +1373,7 @@ TIntermTyped* TIntermediate::foldSwizzle(TIntermTyped* node, TSwizzleSelectorsgetType(), loc); - if (result == 0) + if (result == nullptr) result = node; else result->setType(TType(node->getBasicType(), EvqConst, selectors.size())); diff --git a/glslang/MachineIndependent/Initialize.cpp b/glslang/MachineIndependent/Initialize.cpp old mode 100644 new mode 100755 index ff3db7cd0f..8d5ce9af8c --- a/glslang/MachineIndependent/Initialize.cpp +++ b/glslang/MachineIndependent/Initialize.cpp @@ -51,7 +51,6 @@ // including identifying what extensions are needed if a version does not allow a symbol // -#include "../Include/intermediate.h" #include "Initialize.h" namespace glslang { @@ -61,10 +60,6 @@ const bool ARBCompatibility = true; const bool ForwardCompatibility = false; -// change this back to false if depending on textual spellings of texturing calls when consuming the AST -// Using PureOperatorBuiltins=false is deprecated. -bool PureOperatorBuiltins = true; - namespace { // @@ -144,14 +139,6 @@ struct Versioning { EProfile EDesktopProfile = static_cast(ENoProfile | ECoreProfile | ECompatibilityProfile); // Declare pointers to put into the table for versioning. -#ifdef GLSLANG_WEB - const Versioning* Es300Desktop130 = nullptr; - const Versioning* Es310Desktop420 = nullptr; -#elif defined(GLSLANG_ANGLE) - const Versioning* Es300Desktop130 = nullptr; - const Versioning* Es310Desktop420 = nullptr; - const Versioning* Es310Desktop450 = nullptr; -#else const Versioning Es300Desktop130Version[] = { { EEsProfile, 0, 300, 0, nullptr }, { EDesktopProfile, 0, 130, 0, nullptr }, { EBadProfile } }; @@ -166,7 +153,6 @@ EProfile EDesktopProfile = static_cast(ENoProfile | ECoreProfile | ECo { EDesktopProfile, 0, 450, 0, nullptr }, { EBadProfile } }; const Versioning* Es310Desktop450 = &Es310Desktop450Version[0]; -#endif // The main descriptor of what a set of function prototypes can look like, and // a pointer to extra versioning information, when needed. @@ -268,10 +254,8 @@ const BuiltInFunction BaseFunctions[] = { { EOpAtomicXor, "atomicXor", 2, TypeIU, ClassV1FIOCV, Es310Desktop420 }, { EOpAtomicExchange, "atomicExchange", 2, TypeIU, ClassV1FIOCV, Es310Desktop420 }, { EOpAtomicCompSwap, "atomicCompSwap", 3, TypeIU, ClassV1FIOCV, Es310Desktop420 }, -#ifndef GLSLANG_WEB { EOpMix, "mix", 3, TypeB, ClassRegular, Es310Desktop450 }, { EOpMix, "mix", 3, TypeIU, ClassLB, Es310Desktop450 }, -#endif { EOpNull } }; @@ -390,10 +374,8 @@ void AddTabledBuiltin(TString& decls, const BuiltInFunction& function) if (arg == function.numArguments - 1 && (function.classes & ClassLO)) decls.append("out "); if (arg == 0) { -#ifndef GLSLANG_WEB if (function.classes & ClassCV) decls.append("coherent volatile "); -#endif if (function.classes & ClassFIO) decls.append("inout "); if (function.classes & ClassFO) @@ -420,11 +402,6 @@ void AddTabledBuiltin(TString& decls, const BuiltInFunction& function) // See if the tabled versioning information allows the current version. bool ValidVersion(const BuiltInFunction& function, int version, EProfile profile, const SpvVersion& /* spVersion */) { -#if defined(GLSLANG_WEB) || defined(GLSLANG_ANGLE) - // all entries in table are valid - return true; -#endif - // nullptr means always valid if (function.versioning == nullptr) return true; @@ -505,7 +482,6 @@ TBuiltIns::TBuiltIns() prefixes[EbtFloat] = ""; prefixes[EbtInt] = "i"; prefixes[EbtUint] = "u"; -#if !defined(GLSLANG_WEB) && !defined(GLSLANG_ANGLE) prefixes[EbtFloat16] = "f16"; prefixes[EbtInt8] = "i8"; prefixes[EbtUint8] = "u8"; @@ -513,7 +489,6 @@ TBuiltIns::TBuiltIns() prefixes[EbtUint16] = "u16"; prefixes[EbtInt64] = "i64"; prefixes[EbtUint64] = "u64"; -#endif postfixes[2] = "2"; postfixes[3] = "3"; @@ -523,14 +498,11 @@ TBuiltIns::TBuiltIns() dimMap[Esd2D] = 2; dimMap[Esd3D] = 3; dimMap[EsdCube] = 3; -#ifndef GLSLANG_WEB -#ifndef GLSLANG_ANGLE dimMap[Esd1D] = 1; -#endif dimMap[EsdRect] = 2; dimMap[EsdBuffer] = 1; dimMap[EsdSubpass] = 2; // potentially unused for now -#endif + dimMap[EsdAttachmentEXT] = 2; // potentially unused for now } TBuiltIns::~TBuiltIns() @@ -548,13 +520,6 @@ TBuiltIns::~TBuiltIns() // void TBuiltIns::initialize(int version, EProfile profile, const SpvVersion& spvVersion) { -#ifdef GLSLANG_WEB - version = 310; - profile = EEsProfile; -#elif defined(GLSLANG_ANGLE) - version = 450; - profile = ECoreProfile; -#endif addTabledBuiltins(version, profile, spvVersion); //============================================================================ @@ -563,7 +528,6 @@ void TBuiltIns::initialize(int version, EProfile profile, const SpvVersion& spvV // //============================================================================ -#ifndef GLSLANG_WEB // // Derivatives Functions. // @@ -599,7 +563,6 @@ void TBuiltIns::initialize(int version, EProfile profile, const SpvVersion& spvV "vec4 fwidthCoarse(vec4 p);" ); -#ifndef GLSLANG_ANGLE TString derivativesAndControl16bits ( "float16_t dFdx(float16_t);" "f16vec2 dFdx(f16vec2);" @@ -1393,7 +1356,6 @@ void TBuiltIns::initialize(int version, EProfile profile, const SpvVersion& spvV "\n" ); } -#endif // !GLSLANG_ANGLE if ((profile == EEsProfile && version >= 310) || (profile != EEsProfile && version >= 430)) { @@ -1431,7 +1393,6 @@ void TBuiltIns::initialize(int version, EProfile profile, const SpvVersion& spvV "\n"); } -#ifndef GLSLANG_ANGLE if (profile != EEsProfile && version >= 440) { commonBuiltins.append( "uint64_t atomicMin(coherent volatile inout uint64_t, uint64_t);" @@ -1511,8 +1472,6 @@ void TBuiltIns::initialize(int version, EProfile profile, const SpvVersion& spvV "void atomicStore(coherent volatile out double, double, int, int, int);" "\n"); } -#endif // !GLSLANG_ANGLE -#endif // !GLSLANG_WEB if ((profile == EEsProfile && version >= 300) || (profile != EEsProfile && version >= 150)) { // GL_ARB_shader_bit_encoding @@ -1540,7 +1499,6 @@ void TBuiltIns::initialize(int version, EProfile profile, const SpvVersion& spvV "\n"); } -#ifndef GLSLANG_WEB if ((profile != EEsProfile && version >= 400) || (profile == EEsProfile && version >= 310)) { // GL_OES_gpu_shader5 @@ -1552,7 +1510,6 @@ void TBuiltIns::initialize(int version, EProfile profile, const SpvVersion& spvV "\n"); } -#ifndef GLSLANG_ANGLE if (profile != EEsProfile && version >= 150) { // ARB_gpu_shader_fp64 commonBuiltins.append( "double fma(double, double, double);" @@ -1570,7 +1527,6 @@ void TBuiltIns::initialize(int version, EProfile profile, const SpvVersion& spvV "f64vec4 fma(f64vec4, f64vec4, f64vec4 );" "\n"); } -#endif if ((profile == EEsProfile && version >= 310) || (profile != EEsProfile && version >= 400)) { @@ -1588,7 +1544,6 @@ void TBuiltIns::initialize(int version, EProfile profile, const SpvVersion& spvV "\n"); } -#ifndef GLSLANG_ANGLE if (profile != EEsProfile && version >= 150) { // ARB_gpu_shader_fp64 commonBuiltins.append( "double frexp(double, out int);" @@ -1621,8 +1576,6 @@ void TBuiltIns::initialize(int version, EProfile profile, const SpvVersion& spvV "\n"); } -#endif -#endif if ((profile == EEsProfile && version >= 300) || (profile != EEsProfile && version >= 150)) { @@ -1651,7 +1604,6 @@ void TBuiltIns::initialize(int version, EProfile profile, const SpvVersion& spvV "\n"); } -#ifndef GLSLANG_WEB if ((profile == EEsProfile && version >= 310) || (profile != EEsProfile && version >= 150)) { commonBuiltins.append( @@ -1671,7 +1623,6 @@ void TBuiltIns::initialize(int version, EProfile profile, const SpvVersion& spvV "vec4 unpackUnorm4x8(highp uint);" "\n"); } -#endif // // Matrix Functions. @@ -1730,8 +1681,6 @@ void TBuiltIns::initialize(int version, EProfile profile, const SpvVersion& spvV } } -#ifndef GLSLANG_WEB -#ifndef GLSLANG_ANGLE // // Original-style texture functions existing in all stages. // (Per-stage functions below.) @@ -1926,7 +1875,6 @@ void TBuiltIns::initialize(int version, EProfile profile, const SpvVersion& spvV "\n"); } } -#endif // !GLSLANG_ANGLE // Bitfield if ((profile == EEsProfile && version >= 310) || @@ -2069,7 +2017,6 @@ void TBuiltIns::initialize(int version, EProfile profile, const SpvVersion& spvV "\n"); } -#ifndef GLSLANG_ANGLE // GL_ARB_shader_ballot if (profile != EEsProfile && version >= 450) { commonBuiltins.append( @@ -2268,11 +2215,11 @@ void TBuiltIns::initialize(int version, EProfile profile, const SpvVersion& spvV "\n" ); - stageBuiltins[EShLangMeshNV].append( + stageBuiltins[EShLangMesh].append( "void subgroupMemoryBarrierShared();" "\n" ); - stageBuiltins[EShLangTaskNV].append( + stageBuiltins[EShLangTask].append( "void subgroupMemoryBarrierShared();" "\n" ); @@ -3390,7 +3337,6 @@ void TBuiltIns::initialize(int version, EProfile profile, const SpvVersion& spvV "bool textureFootprintGradClampNV(sampler2D, vec2, vec2, vec2, float, int, bool, out gl_TextureFootprint2DNV);" "\n"); } -#endif // !GLSLANG_ANGLE if ((profile == EEsProfile && version >= 300 && version < 310) || (profile != EEsProfile && version >= 150 && version < 450)) { // GL_EXT_shader_integer_mix @@ -3410,7 +3356,6 @@ void TBuiltIns::initialize(int version, EProfile profile, const SpvVersion& spvV "\n"); } -#ifndef GLSLANG_ANGLE // GL_AMD_gpu_shader_half_float/Explicit types if ((profile != EEsProfile && version >= 450) || (profile == EEsProfile && version >= 310)) { commonBuiltins.append( @@ -4163,6 +4108,19 @@ void TBuiltIns::initialize(int version, EProfile profile, const SpvVersion& spvV "\n"); } + // Builtins for GL_EXT_texture_shadow_lod + if ((profile == EEsProfile && version >= 300) || ((profile != EEsProfile && version >= 130))) { + commonBuiltins.append( + "float texture(sampler2DArrayShadow, vec4, float);" + "float texture(samplerCubeArrayShadow, vec4, float, float);" + "float textureLod(sampler2DArrayShadow, vec4, float);" + "float textureLod(samplerCubeShadow, vec4, float);" + "float textureLod(samplerCubeArrayShadow, vec4, float, float);" + "float textureLodOffset(sampler2DArrayShadow, vec4, float, ivec2);" + "float textureOffset(sampler2DArrayShadow, vec4 , ivec2, float);" + "\n"); + } + if (profile != EEsProfile && version >= 450) { stageBuiltins[EShLangFragment].append(derivativesAndControl64bits); stageBuiltins[EShLangFragment].append( @@ -4184,7 +4142,18 @@ void TBuiltIns::initialize(int version, EProfile profile, const SpvVersion& spvV "\n"); } -#endif // !GLSLANG_ANGLE + + // QCOM_image_processing + if ((profile == EEsProfile && version >= 310) || + (profile != EEsProfile && version >= 140)) { + commonBuiltins.append( + "vec4 textureWeightedQCOM(sampler2D, vec2, sampler2DArray);" + "vec4 textureWeightedQCOM(sampler2D, vec2, sampler1DArray);" + "vec4 textureBoxFilterQCOM(sampler2D, vec2, vec2);" + "vec4 textureBlockMatchSADQCOM(sampler2D, uvec2, sampler2D, uvec2, uvec2);" + "vec4 textureBlockMatchSSDQCOM(sampler2D, uvec2, sampler2D, uvec2, uvec2);" + "\n"); + } //============================================================================ // @@ -4200,7 +4169,6 @@ void TBuiltIns::initialize(int version, EProfile profile, const SpvVersion& spvV if (spvVersion.vulkan == 0 && IncludeLegacy(version, profile, spvVersion)) stageBuiltins[EShLangVertex].append("vec4 ftransform();"); -#ifndef GLSLANG_ANGLE // // Original-style texture Functions with lod. // @@ -4260,7 +4228,6 @@ void TBuiltIns::initialize(int version, EProfile profile, const SpvVersion& spvV "\n"); } } -#endif // !GLSLANG_ANGLE if ((profile != EEsProfile && version >= 150) || (profile == EEsProfile && version >= 310)) { @@ -4281,7 +4248,6 @@ void TBuiltIns::initialize(int version, EProfile profile, const SpvVersion& spvV "void EndPrimitive();" "\n"); } -#endif // !GLSLANG_WEB //============================================================================ // @@ -4298,10 +4264,10 @@ void TBuiltIns::initialize(int version, EProfile profile, const SpvVersion& spvV "void barrier();" ); if ((profile != EEsProfile && version >= 450) || (profile == EEsProfile && version >= 320)) { - stageBuiltins[EShLangMeshNV].append( + stageBuiltins[EShLangMesh].append( "void barrier();" ); - stageBuiltins[EShLangTaskNV].append( + stageBuiltins[EShLangTask].append( "void barrier();" ); } @@ -4318,7 +4284,6 @@ void TBuiltIns::initialize(int version, EProfile profile, const SpvVersion& spvV "void groupMemoryBarrier();" ); } -#ifndef GLSLANG_WEB if ((profile != EEsProfile && version >= 420) || esBarrier) { if (spvVersion.vulkan == 0 || spvVersion.vulkanRelaxed) { commonBuiltins.append("void memoryBarrierAtomicCounter();"); @@ -4326,11 +4291,11 @@ void TBuiltIns::initialize(int version, EProfile profile, const SpvVersion& spvV commonBuiltins.append("void memoryBarrierImage();"); } if ((profile != EEsProfile && version >= 450) || (profile == EEsProfile && version >= 320)) { - stageBuiltins[EShLangMeshNV].append( + stageBuiltins[EShLangMesh].append( "void memoryBarrierShared();" "void groupMemoryBarrier();" ); - stageBuiltins[EShLangTaskNV].append( + stageBuiltins[EShLangTask].append( "void memoryBarrierShared();" "void groupMemoryBarrier();" ); @@ -4341,7 +4306,6 @@ void TBuiltIns::initialize(int version, EProfile profile, const SpvVersion& spvV commonBuiltins.append("void debugPrintfEXT();\n"); -#ifndef GLSLANG_ANGLE if (profile != EEsProfile && version >= 450) { // coopMatStoreNV perhaps ought to have "out" on the buf parameter, but // adding it introduces undesirable tempArgs on the stack. What we want @@ -4422,6 +4386,94 @@ void TBuiltIns::initialize(int version, EProfile profile, const SpvVersion& spvV "icoopmatNV coopMatMulAddNV(icoopmatNV A, icoopmatNV B, icoopmatNV C);\n" "ucoopmatNV coopMatMulAddNV(ucoopmatNV A, ucoopmatNV B, ucoopmatNV C);\n" ); + + std::string cooperativeMatrixFuncs = + "void coopMatLoad(out coopmat m, volatile coherent int8_t[] buf, uint element, uint stride, int matrixLayout);\n" + "void coopMatLoad(out coopmat m, volatile coherent int16_t[] buf, uint element, uint stride, int matrixLayout);\n" + "void coopMatLoad(out coopmat m, volatile coherent int32_t[] buf, uint element, uint stride, int matrixLayout);\n" + "void coopMatLoad(out coopmat m, volatile coherent int64_t[] buf, uint element, uint stride, int matrixLayout);\n" + "void coopMatLoad(out coopmat m, volatile coherent uint8_t[] buf, uint element, uint stride, int matrixLayout);\n" + "void coopMatLoad(out coopmat m, volatile coherent uint16_t[] buf, uint element, uint stride, int matrixLayout);\n" + "void coopMatLoad(out coopmat m, volatile coherent uint32_t[] buf, uint element, uint stride, int matrixLayout);\n" + "void coopMatLoad(out coopmat m, volatile coherent uint64_t[] buf, uint element, uint stride, int matrixLayout);\n" + "void coopMatLoad(out coopmat m, volatile coherent float16_t[] buf, uint element, uint stride, int matrixLayout);\n" + "void coopMatLoad(out coopmat m, volatile coherent float[] buf, uint element, uint stride, int matrixLayout);\n" + "void coopMatLoad(out coopmat m, volatile coherent float64_t[] buf, uint element, uint stride, int matrixLayout);\n" + + "void coopMatLoad(out coopmat m, volatile coherent i8vec2[] buf, uint element, uint stride, int matrixLayout);\n" + "void coopMatLoad(out coopmat m, volatile coherent i16vec2[] buf, uint element, uint stride, int matrixLayout);\n" + "void coopMatLoad(out coopmat m, volatile coherent i32vec2[] buf, uint element, uint stride, int matrixLayout);\n" + "void coopMatLoad(out coopmat m, volatile coherent i64vec2[] buf, uint element, uint stride, int matrixLayout);\n" + "void coopMatLoad(out coopmat m, volatile coherent u8vec2[] buf, uint element, uint stride, int matrixLayout);\n" + "void coopMatLoad(out coopmat m, volatile coherent u16vec2[] buf, uint element, uint stride, int matrixLayout);\n" + "void coopMatLoad(out coopmat m, volatile coherent u32vec2[] buf, uint element, uint stride, int matrixLayout);\n" + "void coopMatLoad(out coopmat m, volatile coherent u64vec2[] buf, uint element, uint stride, int matrixLayout);\n" + "void coopMatLoad(out coopmat m, volatile coherent f16vec2[] buf, uint element, uint stride, int matrixLayout);\n" + "void coopMatLoad(out coopmat m, volatile coherent f32vec2[] buf, uint element, uint stride, int matrixLayout);\n" + "void coopMatLoad(out coopmat m, volatile coherent f64vec2[] buf, uint element, uint stride, int matrixLayout);\n" + + "void coopMatLoad(out coopmat m, volatile coherent i8vec4[] buf, uint element, uint stride, int matrixLayout);\n" + "void coopMatLoad(out coopmat m, volatile coherent i16vec4[] buf, uint element, uint stride, int matrixLayout);\n" + "void coopMatLoad(out coopmat m, volatile coherent i32vec4[] buf, uint element, uint stride, int matrixLayout);\n" + "void coopMatLoad(out coopmat m, volatile coherent i64vec4[] buf, uint element, uint stride, int matrixLayout);\n" + "void coopMatLoad(out coopmat m, volatile coherent u8vec4[] buf, uint element, uint stride, int matrixLayout);\n" + "void coopMatLoad(out coopmat m, volatile coherent u16vec4[] buf, uint element, uint stride, int matrixLayout);\n" + "void coopMatLoad(out coopmat m, volatile coherent u32vec4[] buf, uint element, uint stride, int matrixLayout);\n" + "void coopMatLoad(out coopmat m, volatile coherent u64vec4[] buf, uint element, uint stride, int matrixLayout);\n" + "void coopMatLoad(out coopmat m, volatile coherent f16vec4[] buf, uint element, uint stride, int matrixLayout);\n" + "void coopMatLoad(out coopmat m, volatile coherent f32vec4[] buf, uint element, uint stride, int matrixLayout);\n" + "void coopMatLoad(out coopmat m, volatile coherent f64vec4[] buf, uint element, uint stride, int matrixLayout);\n" + + "void coopMatStore(coopmat m, volatile coherent int8_t[] buf, uint element, uint stride, int matrixLayout);\n" + "void coopMatStore(coopmat m, volatile coherent int16_t[] buf, uint element, uint stride, int matrixLayout);\n" + "void coopMatStore(coopmat m, volatile coherent int32_t[] buf, uint element, uint stride, int matrixLayout);\n" + "void coopMatStore(coopmat m, volatile coherent int64_t[] buf, uint element, uint stride, int matrixLayout);\n" + "void coopMatStore(coopmat m, volatile coherent uint8_t[] buf, uint element, uint stride, int matrixLayout);\n" + "void coopMatStore(coopmat m, volatile coherent uint16_t[] buf, uint element, uint stride, int matrixLayout);\n" + "void coopMatStore(coopmat m, volatile coherent uint32_t[] buf, uint element, uint stride, int matrixLayout);\n" + "void coopMatStore(coopmat m, volatile coherent uint64_t[] buf, uint element, uint stride, int matrixLayout);\n" + "void coopMatStore(coopmat m, volatile coherent float16_t[] buf, uint element, uint stride, int matrixLayout);\n" + "void coopMatStore(coopmat m, volatile coherent float[] buf, uint element, uint stride, int matrixLayout);\n" + "void coopMatStore(coopmat m, volatile coherent float64_t[] buf, uint element, uint stride, int matrixLayout);\n" + + "void coopMatStore(coopmat m, volatile coherent i8vec2[] buf, uint element, uint stride, int matrixLayout);\n" + "void coopMatStore(coopmat m, volatile coherent i16vec2[] buf, uint element, uint stride, int matrixLayout);\n" + "void coopMatStore(coopmat m, volatile coherent i32vec2[] buf, uint element, uint stride, int matrixLayout);\n" + "void coopMatStore(coopmat m, volatile coherent i64vec2[] buf, uint element, uint stride, int matrixLayout);\n" + "void coopMatStore(coopmat m, volatile coherent u8vec2[] buf, uint element, uint stride, int matrixLayout);\n" + "void coopMatStore(coopmat m, volatile coherent u16vec2[] buf, uint element, uint stride, int matrixLayout);\n" + "void coopMatStore(coopmat m, volatile coherent u32vec2[] buf, uint element, uint stride, int matrixLayout);\n" + "void coopMatStore(coopmat m, volatile coherent u64vec2[] buf, uint element, uint stride, int matrixLayout);\n" + "void coopMatStore(coopmat m, volatile coherent f16vec2[] buf, uint element, uint stride, int matrixLayout);\n" + "void coopMatStore(coopmat m, volatile coherent f32vec2[] buf, uint element, uint stride, int matrixLayout);\n" + "void coopMatStore(coopmat m, volatile coherent f64vec2[] buf, uint element, uint stride, int matrixLayout);\n" + + "void coopMatStore(coopmat m, volatile coherent i8vec4[] buf, uint element, uint stride, int matrixLayout);\n" + "void coopMatStore(coopmat m, volatile coherent i16vec4[] buf, uint element, uint stride, int matrixLayout);\n" + "void coopMatStore(coopmat m, volatile coherent i32vec4[] buf, uint element, uint stride, int matrixLayout);\n" + "void coopMatStore(coopmat m, volatile coherent i64vec4[] buf, uint element, uint stride, int matrixLayout);\n" + "void coopMatStore(coopmat m, volatile coherent u8vec4[] buf, uint element, uint stride, int matrixLayout);\n" + "void coopMatStore(coopmat m, volatile coherent u16vec4[] buf, uint element, uint stride, int matrixLayout);\n" + "void coopMatStore(coopmat m, volatile coherent u32vec4[] buf, uint element, uint stride, int matrixLayout);\n" + "void coopMatStore(coopmat m, volatile coherent u64vec4[] buf, uint element, uint stride, int matrixLayout);\n" + "void coopMatStore(coopmat m, volatile coherent f16vec4[] buf, uint element, uint stride, int matrixLayout);\n" + "void coopMatStore(coopmat m, volatile coherent f32vec4[] buf, uint element, uint stride, int matrixLayout);\n" + "void coopMatStore(coopmat m, volatile coherent f64vec4[] buf, uint element, uint stride, int matrixLayout);\n" + + "coopmat coopMatMulAdd(coopmat A, coopmat B, coopmat C);\n" + "coopmat coopMatMulAdd(coopmat A, coopmat B, coopmat C, int matrixOperands);\n"; + + commonBuiltins.append(cooperativeMatrixFuncs.c_str()); + + commonBuiltins.append( + "const int gl_MatrixUseA = 0;\n" + "const int gl_MatrixUseB = 1;\n" + "const int gl_MatrixUseAccumulator = 2;\n" + "const int gl_MatrixOperandsSaturatingAccumulation = 0x10;\n" + "const int gl_CooperativeMatrixLayoutRowMajor = 0;\n" + "const int gl_CooperativeMatrixLayoutColumnMajor = 1;\n" + "\n" + ); } //============================================================================ @@ -4465,7 +4517,24 @@ void TBuiltIns::initialize(int version, EProfile profile, const SpvVersion& spvV "\n"); } -#endif // !GLSLANG_ANGLE + + // GL_EXT_shader_tile_image + if (spvVersion.vulkan > 0) { + stageBuiltins[EShLangFragment].append( + "lowp uint stencilAttachmentReadEXT();" + "lowp uint stencilAttachmentReadEXT(int);" + "highp float depthAttachmentReadEXT();" + "highp float depthAttachmentReadEXT(int);" + "\n"); + stageBuiltins[EShLangFragment].append( + "vec4 colorAttachmentReadEXT(attachmentEXT);" + "vec4 colorAttachmentReadEXT(attachmentEXT, int);" + "ivec4 colorAttachmentReadEXT(iattachmentEXT);" + "ivec4 colorAttachmentReadEXT(iattachmentEXT, int);" + "uvec4 colorAttachmentReadEXT(uattachmentEXT);" + "uvec4 colorAttachmentReadEXT(uattachmentEXT, int);" + "\n"); + } // GL_ARB_derivative_control if (profile != EEsProfile && version >= 400) { @@ -4503,7 +4572,6 @@ void TBuiltIns::initialize(int version, EProfile profile, const SpvVersion& spvV "bool helperInvocationEXT();" "\n"); -#ifndef GLSLANG_ANGLE // GL_AMD_shader_explicit_vertex_parameter if (profile != EEsProfile && version >= 450) { stageBuiltins[EShLangFragment].append( @@ -4576,9 +4644,10 @@ void TBuiltIns::initialize(int version, EProfile profile, const SpvVersion& spvV "uvec4 fragmentFetchAMD(usubpassInputMS, uint);" "\n"); - } + } - // Builtins for GL_NV_ray_tracing/GL_NV_ray_tracing_motion_blur/GL_EXT_ray_tracing/GL_EXT_ray_query + // Builtins for GL_NV_ray_tracing/GL_NV_ray_tracing_motion_blur/GL_EXT_ray_tracing/GL_EXT_ray_query/ + // GL_NV_shader_invocation_reorder/GL_KHR_ray_tracing_position_Fetch if (profile != EEsProfile && version >= 460) { commonBuiltins.append("void rayQueryInitializeEXT(rayQueryEXT, accelerationStructureEXT, uint, uint, vec3, float, vec3, float);" "void rayQueryTerminateEXT(rayQueryEXT);" @@ -4603,6 +4672,7 @@ void TBuiltIns::initialize(int version, EProfile profile, const SpvVersion& spvV "vec3 rayQueryGetIntersectionObjectRayOriginEXT(rayQueryEXT, bool);" "mat4x3 rayQueryGetIntersectionObjectToWorldEXT(rayQueryEXT, bool);" "mat4x3 rayQueryGetIntersectionWorldToObjectEXT(rayQueryEXT, bool);" + "void rayQueryGetIntersectionTriangleVertexPositionsEXT(rayQueryEXT, bool, out vec3[3]);" "\n"); stageBuiltins[EShLangRayGen].append( @@ -4611,6 +4681,41 @@ void TBuiltIns::initialize(int version, EProfile profile, const SpvVersion& spvV "void traceRayEXT(accelerationStructureEXT,uint,uint,uint,uint,uint,vec3,float,vec3,float,int);" "void executeCallableNV(uint, int);" "void executeCallableEXT(uint, int);" + "void hitObjectTraceRayNV(hitObjectNV,accelerationStructureEXT,uint,uint,uint,uint,uint,vec3,float,vec3,float,int);" + "void hitObjectTraceRayMotionNV(hitObjectNV,accelerationStructureEXT,uint,uint,uint,uint,uint,vec3,float,vec3,float,float,int);" + "void hitObjectRecordHitNV(hitObjectNV,accelerationStructureEXT,int,int,int,uint,uint,uint,vec3,float,vec3,float,int);" + "void hitObjectRecordHitMotionNV(hitObjectNV,accelerationStructureEXT,int,int,int,uint,uint,uint,vec3,float,vec3,float,float,int);" + "void hitObjectRecordHitWithIndexNV(hitObjectNV, accelerationStructureEXT,int,int,int,uint,uint,vec3,float,vec3,float,int);" + "void hitObjectRecordHitWithIndexMotionNV(hitObjectNV, accelerationStructureEXT,int,int,int,uint,uint,vec3,float,vec3,float,float,int);" + "void hitObjectRecordMissNV(hitObjectNV,uint,vec3,float,vec3,float);" + "void hitObjectRecordMissMotionNV(hitObjectNV,uint,vec3,float,vec3,float,float);" + "void hitObjectRecordEmptyNV(hitObjectNV);" + "void hitObjectExecuteShaderNV(hitObjectNV,int);" + "bool hitObjectIsEmptyNV(hitObjectNV);" + "bool hitObjectIsMissNV(hitObjectNV);" + "bool hitObjectIsHitNV(hitObjectNV);" + "float hitObjectGetRayTMinNV(hitObjectNV);" + "float hitObjectGetRayTMaxNV(hitObjectNV);" + "vec3 hitObjectGetWorldRayOriginNV(hitObjectNV);" + "vec3 hitObjectGetWorldRayDirectionNV(hitObjectNV);" + "vec3 hitObjectGetObjectRayOriginNV(hitObjectNV);" + "vec3 hitObjectGetObjectRayDirectionNV(hitObjectNV);" + "mat4x3 hitObjectGetWorldToObjectNV(hitObjectNV);" + "mat4x3 hitObjectGetObjectToWorldNV(hitObjectNV);" + "int hitObjectGetInstanceCustomIndexNV(hitObjectNV);" + "int hitObjectGetInstanceIdNV(hitObjectNV);" + "int hitObjectGetGeometryIndexNV(hitObjectNV);" + "int hitObjectGetPrimitiveIndexNV(hitObjectNV);" + "uint hitObjectGetHitKindNV(hitObjectNV);" + "void hitObjectGetAttributesNV(hitObjectNV,int);" + "float hitObjectGetCurrentTimeNV(hitObjectNV);" + "uint hitObjectGetShaderBindingTableRecordIndexNV(hitObjectNV);" + "uvec2 hitObjectGetShaderRecordBufferHandleNV(hitObjectNV);" + "void reorderThreadNV(uint, uint);" + "void reorderThreadNV(hitObjectNV);" + "void reorderThreadNV(hitObjectNV, uint, uint);" + "vec3 fetchMicroTriangleVertexPositionNV(accelerationStructureEXT, int, int, int, ivec2);" + "vec2 fetchMicroTriangleVertexBarycentricNV(accelerationStructureEXT, int, int, int, ivec2);" "\n"); stageBuiltins[EShLangIntersect].append( "bool reportIntersectionNV(float, uint);" @@ -4626,6 +4731,36 @@ void TBuiltIns::initialize(int version, EProfile profile, const SpvVersion& spvV "void traceRayEXT(accelerationStructureEXT,uint,uint,uint,uint,uint,vec3,float,vec3,float,int);" "void executeCallableNV(uint, int);" "void executeCallableEXT(uint, int);" + "void hitObjectTraceRayNV(hitObjectNV,accelerationStructureEXT,uint,uint,uint,uint,uint,vec3,float,vec3,float,int);" + "void hitObjectTraceRayMotionNV(hitObjectNV,accelerationStructureEXT,uint,uint,uint,uint,uint,vec3,float,vec3,float,float,int);" + "void hitObjectRecordHitNV(hitObjectNV,accelerationStructureEXT,int,int,int,uint,uint,uint,vec3,float,vec3,float,int);" + "void hitObjectRecordHitMotionNV(hitObjectNV,accelerationStructureEXT,int,int,int,uint,uint,uint,vec3,float,vec3,float,float,int);" + "void hitObjectRecordHitWithIndexNV(hitObjectNV,accelerationStructureEXT,int,int,int,uint,uint,vec3,float,vec3,float,int);" + "void hitObjectRecordHitWithIndexMotionNV(hitObjectNV, accelerationStructureEXT,int,int,int,uint,uint,vec3,float,vec3,float,float,int);" + "void hitObjectRecordMissNV(hitObjectNV, uint, vec3, float, vec3, float);" + "void hitObjectRecordMissMotionNV(hitObjectNV,uint,vec3,float,vec3,float,float);" + "void hitObjectRecordEmptyNV(hitObjectNV);" + "void hitObjectExecuteShaderNV(hitObjectNV, int);" + "bool hitObjectIsEmptyNV(hitObjectNV);" + "bool hitObjectIsMissNV(hitObjectNV);" + "bool hitObjectIsHitNV(hitObjectNV);" + "float hitObjectGetRayTMinNV(hitObjectNV);" + "float hitObjectGetRayTMaxNV(hitObjectNV);" + "vec3 hitObjectGetWorldRayOriginNV(hitObjectNV);" + "vec3 hitObjectGetWorldRayDirectionNV(hitObjectNV);" + "vec3 hitObjectGetObjectRayOriginNV(hitObjectNV);" + "vec3 hitObjectGetObjectRayDirectionNV(hitObjectNV);" + "mat4x3 hitObjectGetWorldToObjectNV(hitObjectNV);" + "mat4x3 hitObjectGetObjectToWorldNV(hitObjectNV);" + "int hitObjectGetInstanceCustomIndexNV(hitObjectNV);" + "int hitObjectGetInstanceIdNV(hitObjectNV);" + "int hitObjectGetGeometryIndexNV(hitObjectNV);" + "int hitObjectGetPrimitiveIndexNV(hitObjectNV);" + "uint hitObjectGetHitKindNV(hitObjectNV);" + "void hitObjectGetAttributesNV(hitObjectNV,int);" + "float hitObjectGetCurrentTimeNV(hitObjectNV);" + "uint hitObjectGetShaderBindingTableRecordIndexNV(hitObjectNV);" + "uvec2 hitObjectGetShaderRecordBufferHandleNV(hitObjectNV);" "\n"); stageBuiltins[EShLangMiss].append( "void traceNV(accelerationStructureNV,uint,uint,uint,uint,uint,vec3,float,vec3,float,int);" @@ -4633,20 +4768,48 @@ void TBuiltIns::initialize(int version, EProfile profile, const SpvVersion& spvV "void traceRayEXT(accelerationStructureEXT,uint,uint,uint,uint,uint,vec3,float,vec3,float,int);" "void executeCallableNV(uint, int);" "void executeCallableEXT(uint, int);" + "void hitObjectTraceRayNV(hitObjectNV,accelerationStructureEXT,uint,uint,uint,uint,uint,vec3,float,vec3,float,int);" + "void hitObjectTraceRayMotionNV(hitObjectNV,accelerationStructureEXT,uint,uint,uint,uint,uint,vec3,float,vec3,float,float,int);" + "void hitObjectRecordHitNV(hitObjectNV,accelerationStructureEXT,int,int,int,uint,uint,uint,vec3,float,vec3,float,int);" + "void hitObjectRecordHitMotionNV(hitObjectNV,accelerationStructureEXT,int,int,int,uint,uint,uint,vec3,float,vec3,float,float,int);" + "void hitObjectRecordHitWithIndexNV(hitObjectNV,accelerationStructureEXT,int,int,int,uint,uint,vec3,float,vec3,float,int);" + "void hitObjectRecordHitWithIndexMotionNV(hitObjectNV, accelerationStructureEXT,int,int,int,uint,uint,vec3,float,vec3,float,float,int);" + "void hitObjectRecordMissNV(hitObjectNV, uint, vec3, float, vec3, float);" + "void hitObjectRecordMissMotionNV(hitObjectNV,uint,vec3,float,vec3,float,float);" + "void hitObjectRecordEmptyNV(hitObjectNV);" + "void hitObjectExecuteShaderNV(hitObjectNV, int);" + "bool hitObjectIsEmptyNV(hitObjectNV);" + "bool hitObjectIsMissNV(hitObjectNV);" + "bool hitObjectIsHitNV(hitObjectNV);" + "float hitObjectGetRayTMinNV(hitObjectNV);" + "float hitObjectGetRayTMaxNV(hitObjectNV);" + "vec3 hitObjectGetWorldRayOriginNV(hitObjectNV);" + "vec3 hitObjectGetWorldRayDirectionNV(hitObjectNV);" + "vec3 hitObjectGetObjectRayOriginNV(hitObjectNV);" + "vec3 hitObjectGetObjectRayDirectionNV(hitObjectNV);" + "mat4x3 hitObjectGetWorldToObjectNV(hitObjectNV);" + "mat4x3 hitObjectGetObjectToWorldNV(hitObjectNV);" + "int hitObjectGetInstanceCustomIndexNV(hitObjectNV);" + "int hitObjectGetInstanceIdNV(hitObjectNV);" + "int hitObjectGetGeometryIndexNV(hitObjectNV);" + "int hitObjectGetPrimitiveIndexNV(hitObjectNV);" + "uint hitObjectGetHitKindNV(hitObjectNV);" + "void hitObjectGetAttributesNV(hitObjectNV,int);" + "float hitObjectGetCurrentTimeNV(hitObjectNV);" + "uint hitObjectGetShaderBindingTableRecordIndexNV(hitObjectNV);" + "uvec2 hitObjectGetShaderRecordBufferHandleNV(hitObjectNV);" "\n"); stageBuiltins[EShLangCallable].append( "void executeCallableNV(uint, int);" "void executeCallableEXT(uint, int);" "\n"); } -#endif // !GLSLANG_ANGLE //E_SPV_NV_compute_shader_derivatives if ((profile == EEsProfile && version >= 320) || (profile != EEsProfile && version >= 450)) { stageBuiltins[EShLangCompute].append(derivativeControls); stageBuiltins[EShLangCompute].append("\n"); } -#ifndef GLSLANG_ANGLE if (profile != EEsProfile && version >= 450) { stageBuiltins[EShLangCompute].append(derivativesAndControl16bits); stageBuiltins[EShLangCompute].append(derivativesAndControl64bits); @@ -4655,12 +4818,35 @@ void TBuiltIns::initialize(int version, EProfile profile, const SpvVersion& spvV // Builtins for GL_NV_mesh_shader if ((profile != EEsProfile && version >= 450) || (profile == EEsProfile && version >= 320)) { - stageBuiltins[EShLangMeshNV].append( + stageBuiltins[EShLangMesh].append( "void writePackedPrimitiveIndices4x8NV(uint, uint);" "\n"); } -#endif // !GLSLANG_ANGLE -#endif // !GLSLANG_WEB + // Builtins for GL_EXT_mesh_shader + if ((profile != EEsProfile && version >= 450) || (profile == EEsProfile && version >= 320)) { + // Builtins for GL_EXT_mesh_shader + stageBuiltins[EShLangTask].append( + "void EmitMeshTasksEXT(uint, uint, uint);" + "\n"); + + stageBuiltins[EShLangMesh].append( + "void SetMeshOutputsEXT(uint, uint);" + "\n"); + } + // Builtins for GL_NV_displacement_micromap + if ((profile != EEsProfile && version >= 460) || (profile == EEsProfile && version >= 320)) { + stageBuiltins[EShLangMesh].append( + "vec3 fetchMicroTriangleVertexPositionNV(accelerationStructureEXT, int, int, int, ivec2);" + "vec2 fetchMicroTriangleVertexBarycentricNV(accelerationStructureEXT, int, int, int, ivec2);" + "\n"); + + stageBuiltins[EShLangCompute].append( + "vec3 fetchMicroTriangleVertexPositionNV(accelerationStructureEXT, int, int, int, ivec2);" + "vec2 fetchMicroTriangleVertexBarycentricNV(accelerationStructureEXT, int, int, int, ivec2);" + "\n"); + + } + //============================================================================ // @@ -4682,13 +4868,11 @@ void TBuiltIns::initialize(int version, EProfile profile, const SpvVersion& spvV "highp float diff;" // f - n ); } else { -#ifndef GLSLANG_WEB commonBuiltins.append( "float near;" // n "float far;" // f "float diff;" // f - n ); -#endif } commonBuiltins.append( @@ -4697,7 +4881,6 @@ void TBuiltIns::initialize(int version, EProfile profile, const SpvVersion& spvV "\n"); } -#if !defined(GLSLANG_WEB) && !defined(GLSLANG_ANGLE) if (spvVersion.spv == 0 && IncludeLegacy(version, profile, spvVersion)) { // // Matrix state. p. 31, 32, 37, 39, 40. @@ -4815,7 +4998,6 @@ void TBuiltIns::initialize(int version, EProfile profile, const SpvVersion& spvV "\n"); } -#endif // !GLSLANG_WEB && !GLSLANG_ANGLE //============================================================================ // @@ -4845,8 +5027,6 @@ void TBuiltIns::initialize(int version, EProfile profile, const SpvVersion& spvV "\n"); } -#ifndef GLSLANG_WEB -#ifndef GLSLANG_ANGLE //============================================================================ // // Define the interface to the mesh/task shader. @@ -4855,7 +5035,7 @@ void TBuiltIns::initialize(int version, EProfile profile, const SpvVersion& spvV if ((profile != EEsProfile && version >= 450) || (profile == EEsProfile && version >= 320)) { // per-vertex attributes - stageBuiltins[EShLangMeshNV].append( + stageBuiltins[EShLangMesh].append( "out gl_MeshPerVertexNV {" "vec4 gl_Position;" "float gl_PointSize;" @@ -4868,7 +5048,7 @@ void TBuiltIns::initialize(int version, EProfile profile, const SpvVersion& spvV ); // per-primitive attributes - stageBuiltins[EShLangMeshNV].append( + stageBuiltins[EShLangMesh].append( "perprimitiveNV out gl_MeshPerPrimitiveNV {" "int gl_PrimitiveID;" "int gl_Layer;" @@ -4879,7 +5059,7 @@ void TBuiltIns::initialize(int version, EProfile profile, const SpvVersion& spvV "} gl_MeshPrimitivesNV[];" ); - stageBuiltins[EShLangMeshNV].append( + stageBuiltins[EShLangMesh].append( "out uint gl_PrimitiveCountNV;" "out uint gl_PrimitiveIndicesNV[];" @@ -4893,10 +5073,38 @@ void TBuiltIns::initialize(int version, EProfile profile, const SpvVersion& spvV "in highp uvec3 gl_GlobalInvocationID;" "in highp uint gl_LocalInvocationIndex;" + "\n"); + // GL_EXT_mesh_shader + stageBuiltins[EShLangMesh].append( + "out uint gl_PrimitivePointIndicesEXT[];" + "out uvec2 gl_PrimitiveLineIndicesEXT[];" + "out uvec3 gl_PrimitiveTriangleIndicesEXT[];" + "in highp uvec3 gl_NumWorkGroups;" "\n"); - stageBuiltins[EShLangTaskNV].append( + // per-vertex attributes + stageBuiltins[EShLangMesh].append( + "out gl_MeshPerVertexEXT {" + "vec4 gl_Position;" + "float gl_PointSize;" + "float gl_ClipDistance[];" + "float gl_CullDistance[];" + "} gl_MeshVerticesEXT[];" + ); + + // per-primitive attributes + stageBuiltins[EShLangMesh].append( + "perprimitiveEXT out gl_MeshPerPrimitiveEXT {" + "int gl_PrimitiveID;" + "int gl_Layer;" + "int gl_ViewportIndex;" + "bool gl_CullPrimitiveEXT;" + "int gl_PrimitiveShadingRateEXT;" + "} gl_MeshPrimitivesEXT[];" + ); + + stageBuiltins[EShLangTask].append( "out uint gl_TaskCountNV;" "const highp uvec3 gl_WorkGroupSize = uvec3(1,1,1);" @@ -4909,32 +5117,32 @@ void TBuiltIns::initialize(int version, EProfile profile, const SpvVersion& spvV "in uint gl_MeshViewCountNV;" "in uint gl_MeshViewIndicesNV[4];" - + "in highp uvec3 gl_NumWorkGroups;" "\n"); } if (profile != EEsProfile && version >= 450) { - stageBuiltins[EShLangMeshNV].append( + stageBuiltins[EShLangMesh].append( "in highp int gl_DeviceIndex;" // GL_EXT_device_group "in int gl_DrawIDARB;" // GL_ARB_shader_draw_parameters + "in int gl_ViewIndex;" // GL_EXT_multiview "\n"); - stageBuiltins[EShLangTaskNV].append( + stageBuiltins[EShLangTask].append( "in highp int gl_DeviceIndex;" // GL_EXT_device_group "in int gl_DrawIDARB;" // GL_ARB_shader_draw_parameters "\n"); if (version >= 460) { - stageBuiltins[EShLangMeshNV].append( + stageBuiltins[EShLangMesh].append( "in int gl_DrawID;" "\n"); - stageBuiltins[EShLangTaskNV].append( + stageBuiltins[EShLangTask].append( "in int gl_DrawID;" "\n"); } } -#endif // !GLSLANG_ANGLE //============================================================================ // @@ -5101,19 +5309,15 @@ void TBuiltIns::initialize(int version, EProfile profile, const SpvVersion& spvV "in highp int gl_InstanceID;" // needs qualifier fixed later ); if (spvVersion.vulkan > 0) -#endif stageBuiltins[EShLangVertex].append( "in highp int gl_VertexIndex;" "in highp int gl_InstanceIndex;" ); -#ifndef GLSLANG_WEB if (version < 310) -#endif stageBuiltins[EShLangVertex].append( "highp vec4 gl_Position;" // needs qualifier fixed later "highp float gl_PointSize;" // needs qualifier fixed later ); -#ifndef GLSLANG_WEB else stageBuiltins[EShLangVertex].append( "out gl_PerVertex {" @@ -5591,7 +5795,6 @@ void TBuiltIns::initialize(int version, EProfile profile, const SpvVersion& spvV "mediump vec2 gl_PointCoord;" // needs qualifier fixed later ); } -#endif if (version >= 300) { stageBuiltins[EShLangFragment].append( "highp vec4 gl_FragCoord;" // needs qualifier fixed later @@ -5600,7 +5803,6 @@ void TBuiltIns::initialize(int version, EProfile profile, const SpvVersion& spvV "highp float gl_FragDepth;" // needs qualifier fixed later ); } -#ifndef GLSLANG_WEB if (version >= 310) { stageBuiltins[EShLangFragment].append( "bool gl_HelperInvocation;" // needs qualifier fixed later @@ -5645,15 +5847,12 @@ void TBuiltIns::initialize(int version, EProfile profile, const SpvVersion& spvV "flat in highp int gl_ShadingRateEXT;" // GL_EXT_fragment_shading_rate ); } -#endif stageBuiltins[EShLangFragment].append("\n"); if (version >= 130) add2ndGenerationSamplingImaging(version, profile, spvVersion); -#ifndef GLSLANG_WEB - if ((profile != EEsProfile && version >= 140) || (profile == EEsProfile && version >= 310)) { stageBuiltins[EShLangFragment].append( @@ -5668,7 +5867,6 @@ void TBuiltIns::initialize(int version, EProfile profile, const SpvVersion& spvV "\n"); } -#ifndef GLSLANG_ANGLE // GL_ARB_shader_ballot if (profile != EEsProfile && version >= 450) { const char* ballotDecls = @@ -5704,8 +5902,8 @@ void TBuiltIns::initialize(int version, EProfile profile, const SpvVersion& spvV stageBuiltins[EShLangGeometry] .append(ballotDecls); stageBuiltins[EShLangCompute] .append(ballotDecls); stageBuiltins[EShLangFragment] .append(fragmentBallotDecls); - stageBuiltins[EShLangMeshNV] .append(ballotDecls); - stageBuiltins[EShLangTaskNV] .append(ballotDecls); + stageBuiltins[EShLangMesh] .append(ballotDecls); + stageBuiltins[EShLangTask] .append(ballotDecls); stageBuiltins[EShLangRayGen] .append(rtBallotDecls); stageBuiltins[EShLangIntersect] .append(rtBallotDecls); // No volatile qualifier on these builtins in any-hit @@ -5731,6 +5929,12 @@ void TBuiltIns::initialize(int version, EProfile profile, const SpvVersion& spvV "in highp uint gl_SMCountNV;" "in highp uint gl_WarpIDNV;" "in highp uint gl_SMIDNV;" + // GL_ARM_shader_core_builtins + "in highp uint gl_CoreIDARM;" + "in highp uint gl_CoreCountARM;" + "in highp uint gl_CoreMaxIDARM;" + "in highp uint gl_WarpIDARM;" + "in highp uint gl_WarpMaxIDARM;" "\n"; const char* fragmentSubgroupDecls = "flat in mediump uint gl_SubgroupSize;" @@ -5745,6 +5949,12 @@ void TBuiltIns::initialize(int version, EProfile profile, const SpvVersion& spvV "flat in highp uint gl_SMCountNV;" "flat in highp uint gl_WarpIDNV;" "flat in highp uint gl_SMIDNV;" + // GL_ARM_shader_core_builtins + "flat in highp uint gl_CoreIDARM;" + "flat in highp uint gl_CoreCountARM;" + "flat in highp uint gl_CoreMaxIDARM;" + "flat in highp uint gl_WarpIDARM;" + "flat in highp uint gl_WarpMaxIDARM;" "\n"; const char* computeSubgroupDecls = "in highp uint gl_NumSubgroups;" @@ -5764,6 +5974,12 @@ void TBuiltIns::initialize(int version, EProfile profile, const SpvVersion& spvV "in highp uint gl_SMCountNV;" "in highp volatile uint gl_WarpIDNV;" "in highp volatile uint gl_SMIDNV;" + // GL_ARM_shader_core_builtins + "in highp uint gl_CoreIDARM;" + "in highp uint gl_CoreCountARM;" + "in highp uint gl_CoreMaxIDARM;" + "in highp uint gl_WarpIDARM;" + "in highp uint gl_WarpMaxIDARM;" "\n"; stageBuiltins[EShLangVertex] .append(subgroupDecls); @@ -5773,10 +5989,10 @@ void TBuiltIns::initialize(int version, EProfile profile, const SpvVersion& spvV stageBuiltins[EShLangCompute] .append(subgroupDecls); stageBuiltins[EShLangCompute] .append(computeSubgroupDecls); stageBuiltins[EShLangFragment] .append(fragmentSubgroupDecls); - stageBuiltins[EShLangMeshNV] .append(subgroupDecls); - stageBuiltins[EShLangMeshNV] .append(computeSubgroupDecls); - stageBuiltins[EShLangTaskNV] .append(subgroupDecls); - stageBuiltins[EShLangTaskNV] .append(computeSubgroupDecls); + stageBuiltins[EShLangMesh] .append(subgroupDecls); + stageBuiltins[EShLangMesh] .append(computeSubgroupDecls); + stageBuiltins[EShLangTask] .append(subgroupDecls); + stageBuiltins[EShLangTask] .append(computeSubgroupDecls); stageBuiltins[EShLangRayGen] .append(rtSubgroupDecls); stageBuiltins[EShLangIntersect] .append(rtSubgroupDecls); // No volatile qualifier on these builtins in any-hit @@ -5810,8 +6026,11 @@ void TBuiltIns::initialize(int version, EProfile profile, const SpvVersion& spvV "const uint gl_RayFlagsCullNoOpaqueEXT = 128U;" "const uint gl_RayFlagsSkipTrianglesEXT = 256U;" "const uint gl_RayFlagsSkipAABBEXT = 512U;" + "const uint gl_RayFlagsForceOpacityMicromap2StateEXT = 1024U;" "const uint gl_HitKindFrontFacingTriangleEXT = 254U;" "const uint gl_HitKindBackFacingTriangleEXT = 255U;" + "in uint gl_HitKindFrontFacingMicroTriangleNV;" + "in uint gl_HitKindBackFacingMicroTriangleNV;" "\n"; const char *constRayQueryIntersection = @@ -5899,7 +6118,11 @@ void TBuiltIns::initialize(int version, EProfile profile, const SpvVersion& spvV "in uint gl_IncomingRayFlagsEXT;" "in float gl_CurrentRayTimeNV;" "in uint gl_CullMaskEXT;" + "in vec3 gl_HitTriangleVertexPositionsEXT[3];" + "in vec3 gl_HitMicroTriangleVertexPositionsNV[3];" + "in vec2 gl_HitMicroTriangleVertexBarycentricsNV[3];" "\n"; + const char *missDecls = "in uvec3 gl_LaunchIDNV;" "in uvec3 gl_LaunchIDEXT;" @@ -6026,9 +6249,6 @@ void TBuiltIns::initialize(int version, EProfile profile, const SpvVersion& spvV } } } -#endif // !GLSLANG_ANGLE - -#endif // !GLSLANG_WEB // printf("%s\n", commonBuiltins.c_str()); // printf("%s\n", stageBuiltins[EShLangFragment].c_str()); @@ -6047,26 +6267,14 @@ void TBuiltIns::add2ndGenerationSamplingImaging(int version, EProfile profile, c // enumerate all the types const TBasicType bTypes[] = { EbtFloat, EbtInt, EbtUint, -#if !defined(GLSLANG_WEB) && !defined(GLSLANG_ANGLE) - EbtFloat16 -#endif + EbtFloat16 }; -#ifdef GLSLANG_WEB - bool skipBuffer = true; - bool skipCubeArrayed = true; - const int image = 0; -#else bool skipBuffer = (profile == EEsProfile && version < 310) || (profile != EEsProfile && version < 140); bool skipCubeArrayed = (profile == EEsProfile && version < 310) || (profile != EEsProfile && version < 130); for (int image = 0; image <= 1; ++image) // loop over "bool" image vs sampler -#endif { for (int shadow = 0; shadow <= 1; ++shadow) { // loop over "bool" shadow or not -#ifdef GLSLANG_WEB - const int ms = 0; -#else for (int ms = 0; ms <= 1; ++ms) // loop over "bool" multisample or not -#endif { if ((ms || image) && shadow) continue; @@ -6078,14 +6286,9 @@ void TBuiltIns::add2ndGenerationSamplingImaging(int version, EProfile profile, c continue; for (int arrayed = 0; arrayed <= 1; ++arrayed) { // loop over "bool" arrayed or not -#ifdef GLSLANG_WEB - for (int dim = Esd2D; dim <= EsdCube; ++dim) { // 2D, 3D, and Cube -#else -#if defined(GLSLANG_ANGLE) - for (int dim = Esd2D; dim < EsdNumDims; ++dim) { // 2D, ..., buffer, subpass -#else for (int dim = Esd1D; dim < EsdNumDims; ++dim) { // 1D, ..., buffer, subpass -#endif + if (dim == EsdAttachmentEXT) + continue; if (dim == EsdSubpass && spvVersion.vulkan == 0) continue; if (dim == EsdSubpass && (image || shadow || arrayed)) @@ -6106,7 +6309,6 @@ void TBuiltIns::add2ndGenerationSamplingImaging(int version, EProfile profile, c continue; if (ms && arrayed && profile == EEsProfile && version < 310) continue; -#endif if (dim == Esd3D && shadow) continue; if (dim == EsdCube && arrayed && skipCubeArrayed) @@ -6116,23 +6318,21 @@ void TBuiltIns::add2ndGenerationSamplingImaging(int version, EProfile profile, c // Loop over the bTypes for (size_t bType = 0; bType < sizeof(bTypes)/sizeof(TBasicType); ++bType) { -#ifndef GLSLANG_WEB if (bTypes[bType] == EbtFloat16 && (profile == EEsProfile || version < 450)) continue; if (dim == EsdRect && version < 140 && bType > 0) continue; -#endif if (shadow && (bTypes[bType] == EbtInt || bTypes[bType] == EbtUint)) continue; // // Now, make all the function prototypes for the type we just built... // TSampler sampler; -#ifndef GLSLANG_WEB if (dim == EsdSubpass) { sampler.setSubpass(bTypes[bType], ms ? true : false); + } else if (dim == EsdAttachmentEXT) { + sampler.setAttachmentEXT(bTypes[bType]); } else -#endif if (image) { sampler.setImage(bTypes[bType], (TSamplerDim)dim, arrayed ? true : false, shadow ? true : false, @@ -6145,12 +6345,10 @@ void TBuiltIns::add2ndGenerationSamplingImaging(int version, EProfile profile, c TString typeName = sampler.getString(); -#ifndef GLSLANG_WEB if (dim == EsdSubpass) { addSubpassSampling(sampler, typeName, version, profile); continue; } -#endif addQueryFunctions(sampler, typeName, version, profile); @@ -6158,7 +6356,6 @@ void TBuiltIns::add2ndGenerationSamplingImaging(int version, EProfile profile, c addImageFunctions(sampler, typeName, version, profile); else { addSamplingFunctions(sampler, typeName, version, profile); -#ifndef GLSLANG_WEB addGatherFunctions(sampler, typeName, version, profile); if (spvVersion.vulkan > 0 && sampler.isCombined() && !sampler.shadow) { // Base Vulkan allows texelFetch() for @@ -6174,7 +6371,6 @@ void TBuiltIns::add2ndGenerationSamplingImaging(int version, EProfile profile, c addSamplingFunctions(sampler, textureTypeName, version, profile); addQueryFunctions(sampler, textureTypeName, version, profile); } -#endif } } } @@ -6205,16 +6401,6 @@ void TBuiltIns::addQueryFunctions(TSampler sampler, const TString& typeName, int int sizeDims = dimMap[sampler.dim] + (sampler.arrayed ? 1 : 0) - (sampler.dim == EsdCube ? 1 : 0); -#ifdef GLSLANG_WEB - commonBuiltins.append("highp "); - commonBuiltins.append("ivec"); - commonBuiltins.append(postfixes[sizeDims]); - commonBuiltins.append(" textureSize("); - commonBuiltins.append(typeName); - commonBuiltins.append(",int);\n"); - return; -#endif - if (sampler.isImage() && ((profile == EEsProfile && version < 310) || (profile != EEsProfile && version < 420))) return; @@ -6534,14 +6720,6 @@ void TBuiltIns::addSubpassSampling(TSampler sampler, const TString& typeName, in // void TBuiltIns::addSamplingFunctions(TSampler sampler, const TString& typeName, int version, EProfile profile) { -#ifdef GLSLANG_WEB - profile = EEsProfile; - version = 310; -#elif defined(GLSLANG_ANGLE) - profile = ECoreProfile; - version = 450; -#endif - // // texturing // @@ -6616,11 +6794,7 @@ void TBuiltIns::addSamplingFunctions(TSampler sampler, const TString& typeName, continue; // loop over 16-bit floating-point texel addressing -#if defined(GLSLANG_WEB) || defined(GLSLANG_ANGLE) - const int f16TexAddr = 0; -#else for (int f16TexAddr = 0; f16TexAddr <= 1; ++f16TexAddr) -#endif { if (f16TexAddr && sampler.type != EbtFloat16) continue; @@ -6629,11 +6803,7 @@ void TBuiltIns::addSamplingFunctions(TSampler sampler, const TString& typeName, totalDims--; } // loop over "bool" lod clamp -#if defined(GLSLANG_WEB) || defined(GLSLANG_ANGLE) - const int lodClamp = 0; -#else for (int lodClamp = 0; lodClamp <= 1 ;++lodClamp) -#endif { if (lodClamp && (profile == EEsProfile || version < 450)) continue; @@ -6641,11 +6811,7 @@ void TBuiltIns::addSamplingFunctions(TSampler sampler, const TString& typeName, continue; // loop over "bool" sparse or not -#if defined(GLSLANG_WEB) || defined(GLSLANG_ANGLE) - const int sparse = 0; -#else for (int sparse = 0; sparse <= 1; ++sparse) -#endif { if (sparse && (profile == EEsProfile || version < 450)) continue; @@ -6822,14 +6988,6 @@ void TBuiltIns::addSamplingFunctions(TSampler sampler, const TString& typeName, // void TBuiltIns::addGatherFunctions(TSampler sampler, const TString& typeName, int version, EProfile profile) { -#ifdef GLSLANG_WEB - profile = EEsProfile; - version = 310; -#elif defined(GLSLANG_ANGLE) - profile = ECoreProfile; - version = 450; -#endif - switch (sampler.dim) { case Esd2D: case EsdRect: @@ -7068,14 +7226,6 @@ void TBuiltIns::addGatherFunctions(TSampler sampler, const TString& typeName, in // void TBuiltIns::initialize(const TBuiltInResource &resources, int version, EProfile profile, const SpvVersion& spvVersion, EShLanguage language) { -#ifdef GLSLANG_WEB - version = 310; - profile = EEsProfile; -#elif defined(GLSLANG_ANGLE) - version = 450; - profile = ECoreProfile; -#endif - // // Initialize the context-dependent (resource-dependent) built-in strings for parsing. // @@ -7133,7 +7283,6 @@ void TBuiltIns::initialize(const TBuiltInResource &resources, int version, EProf s.append(builtInConstant); } -#ifndef GLSLANG_WEB if (version >= 310) { // geometry @@ -7456,7 +7605,6 @@ void TBuiltIns::initialize(const TBuiltInResource &resources, int version, EProf snprintf(builtInConstant, maxSize, "const int gl_MaxTransformFeedbackInterleavedComponents = %d;", resources.maxTransformFeedbackInterleavedComponents); s.append(builtInConstant); } -#endif } // compute @@ -7478,7 +7626,6 @@ void TBuiltIns::initialize(const TBuiltInResource &resources, int version, EProf s.append("\n"); } -#ifndef GLSLANG_WEB // images (some in compute below) if ((profile == EEsProfile && version >= 310) || (profile != EEsProfile && version >= 130)) { @@ -7506,7 +7653,6 @@ void TBuiltIns::initialize(const TBuiltInResource &resources, int version, EProf s.append("\n"); } -#ifndef GLSLANG_ANGLE // atomic counters (some in compute below) if ((profile == EEsProfile && version >= 310) || (profile != EEsProfile && version >= 420)) { @@ -7543,7 +7689,6 @@ void TBuiltIns::initialize(const TBuiltInResource &resources, int version, EProf s.append("\n"); } -#endif // !GLSLANG_ANGLE // GL_ARB_cull_distance if (profile != EEsProfile && version >= 450) { @@ -7560,7 +7705,6 @@ void TBuiltIns::initialize(const TBuiltInResource &resources, int version, EProf s.append(builtInConstant); } -#ifndef GLSLANG_ANGLE // SPV_NV_mesh_shader if ((profile != EEsProfile && version >= 450) || (profile == EEsProfile && version >= 320)) { snprintf(builtInConstant, maxSize, "const int gl_MaxMeshOutputVerticesNV = %d;", resources.maxMeshOutputVerticesNV); @@ -7583,8 +7727,6 @@ void TBuiltIns::initialize(const TBuiltInResource &resources, int version, EProf s.append("\n"); } -#endif -#endif s.append("\n"); } @@ -7613,6 +7755,23 @@ static void SpecialQualifier(const char* name, TStorageQualifier qualifier, TBui symQualifier.builtIn = builtIn; } +// +// Modify the symbol's flat decoration. +// +// Safe to call even if name is not present. +// +// Originally written to transform gl_SubGroupSizeARB from uniform to fragment input in Vulkan. +// +static void ModifyFlatDecoration(const char* name, bool flat, TSymbolTable& symbolTable) +{ + TSymbol* symbol = symbolTable.find(name); + if (symbol == nullptr) + return; + + TQualifier& symQualifier = symbol->getWritableType().getQualifier(); + symQualifier.flat = flat; +} + // // To tag built-in variables with their TBuiltInVariable enum. Use this when the // normal declaration text already gets the qualifier right, and all that's needed @@ -7670,14 +7829,6 @@ static void BuiltInVariable(const char* blockName, const char* name, TBuiltInVar // void TBuiltIns::identifyBuiltIns(int version, EProfile profile, const SpvVersion& spvVersion, EShLanguage language, TSymbolTable& symbolTable) { -#ifdef GLSLANG_WEB - version = 310; - profile = EEsProfile; -#elif defined(GLSLANG_ANGLE) - version = 450; - profile = ECoreProfile; -#endif - // // Tag built-in variables and functions with additional qualifier and extension information // that cannot be declared with the text strings. @@ -7697,7 +7848,6 @@ void TBuiltIns::identifyBuiltIns(int version, EProfile profile, const SpvVersion BuiltInVariable("gl_InstanceIndex", EbvInstanceIndex, symbolTable); } -#ifndef GLSLANG_WEB if (spvVersion.vulkan == 0) { SpecialQualifier("gl_VertexID", EvqVertexId, EbvVertexId, symbolTable); SpecialQualifier("gl_InstanceID", EvqInstanceId, EbvInstanceId, symbolTable); @@ -7871,7 +8021,6 @@ void TBuiltIns::identifyBuiltIns(int version, EProfile profile, const SpvVersion case EShLangTessEvaluation: case EShLangGeometry: -#endif // !GLSLANG_WEB SpecialQualifier("gl_Position", EvqPosition, EbvPosition, symbolTable); SpecialQualifier("gl_PointSize", EvqPointSize, EbvPointSize, symbolTable); @@ -7881,7 +8030,6 @@ void TBuiltIns::identifyBuiltIns(int version, EProfile profile, const SpvVersion BuiltInVariable("gl_out", "gl_Position", EbvPosition, symbolTable); BuiltInVariable("gl_out", "gl_PointSize", EbvPointSize, symbolTable); -#ifndef GLSLANG_WEB SpecialQualifier("gl_ClipVertex", EvqClipVertex, EbvClipVertex, symbolTable); BuiltInVariable("gl_in", "gl_ClipDistance", EbvClipDistance, symbolTable); @@ -7988,7 +8136,7 @@ void TBuiltIns::identifyBuiltIns(int version, EProfile profile, const SpvVersion BuiltInVariable("gl_ViewIndex", EbvViewIndex, symbolTable); } - if (profile != EEsProfile) { + if (profile != EEsProfile) { BuiltInVariable("gl_SubGroupInvocationARB", EbvSubGroupInvocation, symbolTable); BuiltInVariable("gl_SubGroupEqMaskARB", EbvSubGroupEqMask, symbolTable); BuiltInVariable("gl_SubGroupGeMaskARB", EbvSubGroupGeMask, symbolTable); @@ -7996,9 +8144,12 @@ void TBuiltIns::identifyBuiltIns(int version, EProfile profile, const SpvVersion BuiltInVariable("gl_SubGroupLeMaskARB", EbvSubGroupLeMask, symbolTable); BuiltInVariable("gl_SubGroupLtMaskARB", EbvSubGroupLtMask, symbolTable); - if (spvVersion.vulkan > 0) + if (spvVersion.vulkan > 0) { // Treat "gl_SubGroupSizeARB" as shader input instead of uniform for Vulkan SpecialQualifier("gl_SubGroupSizeARB", EvqVaryingIn, EbvSubGroupSize, symbolTable); + if (language == EShLangFragment) + ModifyFlatDecoration("gl_SubGroupSizeARB", true, symbolTable); + } else BuiltInVariable("gl_SubGroupSizeARB", EbvSubGroupSize, symbolTable); } @@ -8031,6 +8182,19 @@ void TBuiltIns::identifyBuiltIns(int version, EProfile profile, const SpvVersion BuiltInVariable("gl_SMCountNV", EbvSMCount, symbolTable); BuiltInVariable("gl_WarpIDNV", EbvWarpID, symbolTable); BuiltInVariable("gl_SMIDNV", EbvSMID, symbolTable); + + // GL_ARM_shader_core_builtins + symbolTable.setVariableExtensions("gl_CoreCountARM", 1, &E_GL_ARM_shader_core_builtins); + symbolTable.setVariableExtensions("gl_CoreIDARM", 1, &E_GL_ARM_shader_core_builtins); + symbolTable.setVariableExtensions("gl_CoreMaxIDARM", 1, &E_GL_ARM_shader_core_builtins); + symbolTable.setVariableExtensions("gl_WarpIDARM", 1, &E_GL_ARM_shader_core_builtins); + symbolTable.setVariableExtensions("gl_WarpMaxIDARM", 1, &E_GL_ARM_shader_core_builtins); + + BuiltInVariable("gl_CoreCountARM", EbvCoreCountARM, symbolTable); + BuiltInVariable("gl_CoreIDARM", EbvCoreIDARM, symbolTable); + BuiltInVariable("gl_CoreMaxIDARM", EbvCoreMaxIDARM, symbolTable); + BuiltInVariable("gl_WarpIDARM", EbvWarpIDARM, symbolTable); + BuiltInVariable("gl_WarpMaxIDARM", EbvWarpMaxIDARM, symbolTable); } if (language == EShLangGeometry || language == EShLangVertex) { @@ -8045,8 +8209,6 @@ void TBuiltIns::identifyBuiltIns(int version, EProfile profile, const SpvVersion symbolTable.setVariableExtensions("gl_ShadingRateFlag4HorizontalPixelsEXT", 1, &E_GL_EXT_fragment_shading_rate); } } - -#endif // !GLSLANG_WEB break; case EShLangFragment: @@ -8063,7 +8225,6 @@ void TBuiltIns::identifyBuiltIns(int version, EProfile profile, const SpvVersion } } SpecialQualifier("gl_FragDepth", EvqFragDepth, EbvFragDepth, symbolTable); -#ifndef GLSLANG_WEB SpecialQualifier("gl_FragDepthEXT", EvqFragDepth, EbvFragDepth, symbolTable); SpecialQualifier("gl_FragStencilRefARB", EvqFragStencil, EbvFragStencilRef, symbolTable); SpecialQualifier("gl_HelperInvocation", EvqVaryingIn, EbvHelperInvocation, symbolTable); @@ -8105,8 +8266,10 @@ void TBuiltIns::identifyBuiltIns(int version, EProfile profile, const SpvVersion symbolTable.setFunctionExtensions("rayQueryGetIntersectionWorldToObjectEXT", 1, &E_GL_EXT_ray_query); symbolTable.setFunctionExtensions("rayQueryGetWorldRayOriginEXT", 1, &E_GL_EXT_ray_query); symbolTable.setFunctionExtensions("rayQueryGetWorldRayDirectionEXT", 1, &E_GL_EXT_ray_query); + symbolTable.setFunctionExtensions("rayQueryGetIntersectionTriangleVertexPositionsEXT", 1, &E_GL_EXT_ray_tracing_position_fetch); symbolTable.setVariableExtensions("gl_RayFlagsSkipAABBEXT", 1, &E_GL_EXT_ray_flags_primitive_culling); symbolTable.setVariableExtensions("gl_RayFlagsSkipTrianglesEXT", 1, &E_GL_EXT_ray_flags_primitive_culling); + symbolTable.setVariableExtensions("gl_RayFlagsForceOpacityMicromap2StateEXT", 1, &E_GL_EXT_opacity_micromap); } if ((profile != EEsProfile && version >= 130) || @@ -8430,9 +8593,12 @@ void TBuiltIns::identifyBuiltIns(int version, EProfile profile, const SpvVersion BuiltInVariable("gl_SubGroupLeMaskARB", EbvSubGroupLeMask, symbolTable); BuiltInVariable("gl_SubGroupLtMaskARB", EbvSubGroupLtMask, symbolTable); - if (spvVersion.vulkan > 0) + if (spvVersion.vulkan > 0) { // Treat "gl_SubGroupSizeARB" as shader input instead of uniform for Vulkan SpecialQualifier("gl_SubGroupSizeARB", EvqVaryingIn, EbvSubGroupSize, symbolTable); + if (language == EShLangFragment) + ModifyFlatDecoration("gl_SubGroupSizeARB", true, symbolTable); + } else BuiltInVariable("gl_SubGroupSizeARB", EbvSubGroupSize, symbolTable); } @@ -8542,6 +8708,19 @@ void TBuiltIns::identifyBuiltIns(int version, EProfile profile, const SpvVersion BuiltInVariable("gl_SMCountNV", EbvSMCount, symbolTable); BuiltInVariable("gl_WarpIDNV", EbvWarpID, symbolTable); BuiltInVariable("gl_SMIDNV", EbvSMID, symbolTable); + + // GL_ARM_shader_core_builtins + symbolTable.setVariableExtensions("gl_CoreCountARM", 1, &E_GL_ARM_shader_core_builtins); + symbolTable.setVariableExtensions("gl_CoreIDARM", 1, &E_GL_ARM_shader_core_builtins); + symbolTable.setVariableExtensions("gl_CoreMaxIDARM", 1, &E_GL_ARM_shader_core_builtins); + symbolTable.setVariableExtensions("gl_WarpIDARM", 1, &E_GL_ARM_shader_core_builtins); + symbolTable.setVariableExtensions("gl_WarpMaxIDARM", 1, &E_GL_ARM_shader_core_builtins); + + BuiltInVariable("gl_CoreCountARM", EbvCoreCountARM, symbolTable); + BuiltInVariable("gl_CoreIDARM", EbvCoreIDARM, symbolTable); + BuiltInVariable("gl_CoreMaxIDARM", EbvCoreMaxIDARM, symbolTable); + BuiltInVariable("gl_WarpIDARM", EbvWarpIDARM, symbolTable); + BuiltInVariable("gl_WarpMaxIDARM", EbvWarpMaxIDARM, symbolTable); } if (profile == EEsProfile) { @@ -8582,7 +8761,19 @@ void TBuiltIns::identifyBuiltIns(int version, EProfile profile, const SpvVersion symbolTable.setVariableExtensions("gl_ShadingRateFlag2HorizontalPixelsEXT", 1, &E_GL_EXT_fragment_shading_rate); symbolTable.setVariableExtensions("gl_ShadingRateFlag4HorizontalPixelsEXT", 1, &E_GL_EXT_fragment_shading_rate); } -#endif // !GLSLANG_WEB + + // GL_EXT_shader_tile_image + symbolTable.setFunctionExtensions("stencilAttachmentReadEXT", 1, &E_GL_EXT_shader_tile_image); + symbolTable.setFunctionExtensions("depthAttachmentReadEXT", 1, &E_GL_EXT_shader_tile_image); + symbolTable.setFunctionExtensions("colorAttachmentReadEXT", 1, &E_GL_EXT_shader_tile_image); + + if ((profile == EEsProfile && version >= 310) || + (profile != EEsProfile && version >= 140)) { + symbolTable.setFunctionExtensions("textureWeightedQCOM", 1, &E_GL_QCOM_image_processing); + symbolTable.setFunctionExtensions("textureBoxFilterQCOM", 1, &E_GL_QCOM_image_processing); + symbolTable.setFunctionExtensions("textureBlockMatchSADQCOM", 1, &E_GL_QCOM_image_processing); + symbolTable.setFunctionExtensions("textureBlockMatchSSDQCOM", 1, &E_GL_QCOM_image_processing); + } break; case EShLangCompute: @@ -8595,7 +8786,6 @@ void TBuiltIns::identifyBuiltIns(int version, EProfile profile, const SpvVersion BuiltInVariable("gl_DeviceIndex", EbvDeviceIndex, symbolTable); BuiltInVariable("gl_ViewIndex", EbvViewIndex, symbolTable); -#ifndef GLSLANG_WEB if ((profile != EEsProfile && version >= 140) || (profile == EEsProfile && version >= 310)) { symbolTable.setVariableExtensions("gl_DeviceIndex", 1, &E_GL_EXT_device_group); @@ -8647,9 +8837,12 @@ void TBuiltIns::identifyBuiltIns(int version, EProfile profile, const SpvVersion BuiltInVariable("gl_SubGroupLeMaskARB", EbvSubGroupLeMask, symbolTable); BuiltInVariable("gl_SubGroupLtMaskARB", EbvSubGroupLtMask, symbolTable); - if (spvVersion.vulkan > 0) + if (spvVersion.vulkan > 0) { // Treat "gl_SubGroupSizeARB" as shader input instead of uniform for Vulkan SpecialQualifier("gl_SubGroupSizeARB", EvqVaryingIn, EbvSubGroupSize, symbolTable); + if (language == EShLangFragment) + ModifyFlatDecoration("gl_SubGroupSizeARB", true, symbolTable); + } else BuiltInVariable("gl_SubGroupSizeARB", EbvSubGroupSize, symbolTable); } @@ -8682,6 +8875,19 @@ void TBuiltIns::identifyBuiltIns(int version, EProfile profile, const SpvVersion BuiltInVariable("gl_SMCountNV", EbvSMCount, symbolTable); BuiltInVariable("gl_WarpIDNV", EbvWarpID, symbolTable); BuiltInVariable("gl_SMIDNV", EbvSMID, symbolTable); + + // GL_ARM_shader_core_builtins + symbolTable.setVariableExtensions("gl_CoreCountARM", 1, &E_GL_ARM_shader_core_builtins); + symbolTable.setVariableExtensions("gl_CoreIDARM", 1, &E_GL_ARM_shader_core_builtins); + symbolTable.setVariableExtensions("gl_CoreMaxIDARM", 1, &E_GL_ARM_shader_core_builtins); + symbolTable.setVariableExtensions("gl_WarpIDARM", 1, &E_GL_ARM_shader_core_builtins); + symbolTable.setVariableExtensions("gl_WarpMaxIDARM", 1, &E_GL_ARM_shader_core_builtins); + + BuiltInVariable("gl_CoreCountARM", EbvCoreCountARM, symbolTable); + BuiltInVariable("gl_CoreIDARM", EbvCoreIDARM, symbolTable); + BuiltInVariable("gl_CoreMaxIDARM", EbvCoreMaxIDARM, symbolTable); + BuiltInVariable("gl_WarpIDARM", EbvWarpIDARM, symbolTable); + BuiltInVariable("gl_WarpMaxIDARM", EbvWarpMaxIDARM, symbolTable); } // GL_KHR_shader_subgroup @@ -8703,6 +8909,12 @@ void TBuiltIns::identifyBuiltIns(int version, EProfile profile, const SpvVersion symbolTable.setFunctionExtensions("coopMatMulAddNV", 2, coopExt); } + { + symbolTable.setFunctionExtensions("coopMatLoad", 1, &E_GL_KHR_cooperative_matrix); + symbolTable.setFunctionExtensions("coopMatStore", 1, &E_GL_KHR_cooperative_matrix); + symbolTable.setFunctionExtensions("coopMatMulAdd", 1, &E_GL_KHR_cooperative_matrix); + } + if ((profile != EEsProfile && version >= 450) || (profile == EEsProfile && version >= 320)) { symbolTable.setFunctionExtensions("dFdx", 1, &E_GL_NV_compute_shader_derivatives); symbolTable.setFunctionExtensions("dFdy", 1, &E_GL_NV_compute_shader_derivatives); @@ -8722,10 +8934,13 @@ void TBuiltIns::identifyBuiltIns(int version, EProfile profile, const SpvVersion symbolTable.setVariableExtensions("gl_ShadingRateFlag2HorizontalPixelsEXT", 1, &E_GL_EXT_fragment_shading_rate); symbolTable.setVariableExtensions("gl_ShadingRateFlag4HorizontalPixelsEXT", 1, &E_GL_EXT_fragment_shading_rate); } -#endif // !GLSLANG_WEB + + if ((profile != EEsProfile && version >= 460)) { + symbolTable.setFunctionExtensions("fetchMicroTriangleVertexPositionNV", 1, &E_GL_NV_displacement_micromap); + symbolTable.setFunctionExtensions("fetchMicroTriangleVertexBarycentricNV", 1, &E_GL_NV_displacement_micromap); + } break; -#if !defined(GLSLANG_WEB) && !defined(GLSLANG_ANGLE) case EShLangRayGen: case EShLangIntersect: case EShLangAnyHit: @@ -8769,6 +8984,9 @@ void TBuiltIns::identifyBuiltIns(int version, EProfile profile, const SpvVersion symbolTable.setVariableExtensions("gl_IncomingRayFlagsNV", 1, &E_GL_NV_ray_tracing); symbolTable.setVariableExtensions("gl_IncomingRayFlagsEXT", 1, &E_GL_EXT_ray_tracing); symbolTable.setVariableExtensions("gl_CurrentRayTimeNV", 1, &E_GL_NV_ray_tracing_motion_blur); + symbolTable.setVariableExtensions("gl_HitTriangleVertexPositionsEXT", 1, &E_GL_EXT_ray_tracing_position_fetch); + symbolTable.setVariableExtensions("gl_HitMicroTriangleVertexPositionsNV", 1, &E_GL_NV_displacement_micromap); + symbolTable.setVariableExtensions("gl_HitMicroTriangleVertexBarycentricsNV", 1, &E_GL_NV_displacement_micromap); symbolTable.setVariableExtensions("gl_DeviceIndex", 1, &E_GL_EXT_device_group); @@ -8783,6 +9001,40 @@ void TBuiltIns::identifyBuiltIns(int version, EProfile profile, const SpvVersion symbolTable.setFunctionExtensions("executeCallableNV", 1, &E_GL_NV_ray_tracing); symbolTable.setFunctionExtensions("executeCallableEXT", 1, &E_GL_EXT_ray_tracing); + symbolTable.setFunctionExtensions("hitObjectTraceRayNV", 1, &E_GL_NV_shader_invocation_reorder); + symbolTable.setFunctionExtensions("hitObjectTraceRayMotionNV", 1, &E_GL_NV_shader_invocation_reorder); + symbolTable.setFunctionExtensions("hitObjectRecordHitNV", 1, &E_GL_NV_shader_invocation_reorder); + symbolTable.setFunctionExtensions("hitObjectRecordHitMotionNV", 1, &E_GL_NV_shader_invocation_reorder); + symbolTable.setFunctionExtensions("hitObjectRecordHitWithIndexNV", 1, &E_GL_NV_shader_invocation_reorder); + symbolTable.setFunctionExtensions("hitObjectRecordHitWithIndexMotionNV", 1, &E_GL_NV_shader_invocation_reorder); + symbolTable.setFunctionExtensions("hitObjectRecordMissNV", 1, &E_GL_NV_shader_invocation_reorder); + symbolTable.setFunctionExtensions("hitObjectRecordMissMotionNV", 1, &E_GL_NV_shader_invocation_reorder); + symbolTable.setFunctionExtensions("hitObjectRecordEmptyNV", 1, &E_GL_NV_shader_invocation_reorder); + symbolTable.setFunctionExtensions("hitObjectExecuteShaderNV", 1, &E_GL_NV_shader_invocation_reorder); + symbolTable.setFunctionExtensions("hitObjectIsEmptyNV", 1, &E_GL_NV_shader_invocation_reorder); + symbolTable.setFunctionExtensions("hitObjectIsMissNV", 1, &E_GL_NV_shader_invocation_reorder); + symbolTable.setFunctionExtensions("hitObjectIsHitNV", 1, &E_GL_NV_shader_invocation_reorder); + symbolTable.setFunctionExtensions("hitObjectGetRayTMinNV", 1, &E_GL_NV_shader_invocation_reorder); + symbolTable.setFunctionExtensions("hitObjectGetRayTMaxNV", 1, &E_GL_NV_shader_invocation_reorder); + symbolTable.setFunctionExtensions("hitObjectGetObjectRayOriginNV", 1, &E_GL_NV_shader_invocation_reorder); + symbolTable.setFunctionExtensions("hitObjectGetObjectRayDirectionNV", 1, &E_GL_NV_shader_invocation_reorder); + symbolTable.setFunctionExtensions("hitObjectGetWorldRayOriginNV", 1, &E_GL_NV_shader_invocation_reorder); + symbolTable.setFunctionExtensions("hitObjectGetWorldRayDirectionNV", 1, &E_GL_NV_shader_invocation_reorder); + symbolTable.setFunctionExtensions("hitObjectGetWorldToObjectNV", 1, &E_GL_NV_shader_invocation_reorder); + symbolTable.setFunctionExtensions("hitObjectGetbjectToWorldNV", 1, &E_GL_NV_shader_invocation_reorder); + symbolTable.setFunctionExtensions("hitObjectGetInstanceCustomIndexNV", 1, &E_GL_NV_shader_invocation_reorder); + symbolTable.setFunctionExtensions("hitObjectGetInstanceIdNV", 1, &E_GL_NV_shader_invocation_reorder); + symbolTable.setFunctionExtensions("hitObjectGetGeometryIndexNV", 1, &E_GL_NV_shader_invocation_reorder); + symbolTable.setFunctionExtensions("hitObjectGetPrimitiveIndexNV", 1, &E_GL_NV_shader_invocation_reorder); + symbolTable.setFunctionExtensions("hitObjectGetHitKindNV", 1, &E_GL_NV_shader_invocation_reorder); + symbolTable.setFunctionExtensions("hitObjectGetAttributesNV", 1, &E_GL_NV_shader_invocation_reorder); + symbolTable.setFunctionExtensions("hitObjectGetCurrentTimeNV", 1, &E_GL_NV_shader_invocation_reorder); + symbolTable.setFunctionExtensions("hitObjectGetShaderBindingTableRecordIndexNV", 1, &E_GL_NV_shader_invocation_reorder); + symbolTable.setFunctionExtensions("hitObjectGetShaderRecordBufferHandleNV", 1, &E_GL_NV_shader_invocation_reorder); + symbolTable.setFunctionExtensions("reorderThreadNV", 1, &E_GL_NV_shader_invocation_reorder); + symbolTable.setFunctionExtensions("fetchMicroTriangleVertexPositionNV", 1, &E_GL_NV_displacement_micromap); + symbolTable.setFunctionExtensions("fetchMicroTriangleVertexBarycentricNV", 1, &E_GL_NV_displacement_micromap); + BuiltInVariable("gl_LaunchIDNV", EbvLaunchId, symbolTable); BuiltInVariable("gl_LaunchIDEXT", EbvLaunchId, symbolTable); @@ -8820,6 +9072,11 @@ void TBuiltIns::identifyBuiltIns(int version, EProfile profile, const SpvVersion BuiltInVariable("gl_IncomingRayFlagsEXT", EbvIncomingRayFlags, symbolTable); BuiltInVariable("gl_DeviceIndex", EbvDeviceIndex, symbolTable); BuiltInVariable("gl_CurrentRayTimeNV", EbvCurrentRayTimeNV, symbolTable); + BuiltInVariable("gl_HitTriangleVertexPositionsEXT", EbvPositionFetch, symbolTable); + BuiltInVariable("gl_HitMicroTriangleVertexPositionsNV", EbvMicroTrianglePositionNV, symbolTable); + BuiltInVariable("gl_HitMicroTriangleVertexBarycentricsNV", EbvMicroTriangleBaryNV, symbolTable); + BuiltInVariable("gl_HitKindFrontFacingMicroTriangleNV", EbvHitKindFrontFacingMicroTriangleNV, symbolTable); + BuiltInVariable("gl_HitKindBackFacingMicroTriangleNV", EbvHitKindBackFacingMicroTriangleNV, symbolTable); // GL_ARB_shader_ballot symbolTable.setVariableExtensions("gl_SubGroupSizeARB", 1, &E_GL_ARB_shader_ballot); @@ -8837,9 +9094,12 @@ void TBuiltIns::identifyBuiltIns(int version, EProfile profile, const SpvVersion BuiltInVariable("gl_SubGroupLeMaskARB", EbvSubGroupLeMask, symbolTable); BuiltInVariable("gl_SubGroupLtMaskARB", EbvSubGroupLtMask, symbolTable); - if (spvVersion.vulkan > 0) + if (spvVersion.vulkan > 0) { // Treat "gl_SubGroupSizeARB" as shader input instead of uniform for Vulkan SpecialQualifier("gl_SubGroupSizeARB", EvqVaryingIn, EbvSubGroupSize, symbolTable); + if (language == EShLangFragment) + ModifyFlatDecoration("gl_SubGroupSizeARB", true, symbolTable); + } else BuiltInVariable("gl_SubGroupSizeARB", EbvSubGroupSize, symbolTable); @@ -8873,6 +9133,19 @@ void TBuiltIns::identifyBuiltIns(int version, EProfile profile, const SpvVersion BuiltInVariable("gl_SMCountNV", EbvSMCount, symbolTable); BuiltInVariable("gl_WarpIDNV", EbvWarpID, symbolTable); BuiltInVariable("gl_SMIDNV", EbvSMID, symbolTable); + + // GL_ARM_shader_core_builtins + symbolTable.setVariableExtensions("gl_CoreCountARM", 1, &E_GL_ARM_shader_core_builtins); + symbolTable.setVariableExtensions("gl_CoreIDARM", 1, &E_GL_ARM_shader_core_builtins); + symbolTable.setVariableExtensions("gl_CoreMaxIDARM", 1, &E_GL_ARM_shader_core_builtins); + symbolTable.setVariableExtensions("gl_WarpIDARM", 1, &E_GL_ARM_shader_core_builtins); + symbolTable.setVariableExtensions("gl_WarpMaxIDARM", 1, &E_GL_ARM_shader_core_builtins); + + BuiltInVariable("gl_CoreCountARM", EbvCoreCountARM, symbolTable); + BuiltInVariable("gl_CoreIDARM", EbvCoreIDARM, symbolTable); + BuiltInVariable("gl_CoreMaxIDARM", EbvCoreMaxIDARM, symbolTable); + BuiltInVariable("gl_WarpIDARM", EbvWarpIDARM, symbolTable); + BuiltInVariable("gl_WarpMaxIDARM", EbvWarpMaxIDARM, symbolTable); } if ((profile == EEsProfile && version >= 310) || (profile != EEsProfile && version >= 450)) { @@ -8883,7 +9156,7 @@ void TBuiltIns::identifyBuiltIns(int version, EProfile profile, const SpvVersion } break; - case EShLangMeshNV: + case EShLangMesh: if ((profile != EEsProfile && version >= 450) || (profile == EEsProfile && version >= 320)) { // per-vertex builtins symbolTable.setVariableExtensions("gl_MeshVerticesNV", "gl_Position", 1, &E_GL_NV_mesh_shader); @@ -8927,12 +9200,19 @@ void TBuiltIns::identifyBuiltIns(int version, EProfile profile, const SpvVersion symbolTable.setVariableExtensions("gl_PrimitiveIndicesNV", 1, &E_GL_NV_mesh_shader); symbolTable.setVariableExtensions("gl_MeshViewCountNV", 1, &E_GL_NV_mesh_shader); symbolTable.setVariableExtensions("gl_MeshViewIndicesNV", 1, &E_GL_NV_mesh_shader); - symbolTable.setVariableExtensions("gl_WorkGroupSize", 1, &E_GL_NV_mesh_shader); - symbolTable.setVariableExtensions("gl_WorkGroupID", 1, &E_GL_NV_mesh_shader); - symbolTable.setVariableExtensions("gl_LocalInvocationID", 1, &E_GL_NV_mesh_shader); - symbolTable.setVariableExtensions("gl_GlobalInvocationID", 1, &E_GL_NV_mesh_shader); - symbolTable.setVariableExtensions("gl_LocalInvocationIndex", 1, &E_GL_NV_mesh_shader); - + if (profile != EEsProfile) { + symbolTable.setVariableExtensions("gl_WorkGroupSize", Num_AEP_mesh_shader, AEP_mesh_shader); + symbolTable.setVariableExtensions("gl_WorkGroupID", Num_AEP_mesh_shader, AEP_mesh_shader); + symbolTable.setVariableExtensions("gl_LocalInvocationID", Num_AEP_mesh_shader, AEP_mesh_shader); + symbolTable.setVariableExtensions("gl_GlobalInvocationID", Num_AEP_mesh_shader, AEP_mesh_shader); + symbolTable.setVariableExtensions("gl_LocalInvocationIndex", Num_AEP_mesh_shader, AEP_mesh_shader); + } else { + symbolTable.setVariableExtensions("gl_WorkGroupSize", 1, &E_GL_NV_mesh_shader); + symbolTable.setVariableExtensions("gl_WorkGroupID", 1, &E_GL_NV_mesh_shader); + symbolTable.setVariableExtensions("gl_LocalInvocationID", 1, &E_GL_NV_mesh_shader); + symbolTable.setVariableExtensions("gl_GlobalInvocationID", 1, &E_GL_NV_mesh_shader); + symbolTable.setVariableExtensions("gl_LocalInvocationIndex", 1, &E_GL_NV_mesh_shader); + } BuiltInVariable("gl_PrimitiveCountNV", EbvPrimitiveCountNV, symbolTable); BuiltInVariable("gl_PrimitiveIndicesNV", EbvPrimitiveIndicesNV, symbolTable); BuiltInVariable("gl_MeshViewCountNV", EbvMeshViewCountNV, symbolTable); @@ -8950,12 +9230,58 @@ void TBuiltIns::identifyBuiltIns(int version, EProfile profile, const SpvVersion symbolTable.setVariableExtensions("gl_MaxMeshViewCountNV", 1, &E_GL_NV_mesh_shader); // builtin functions - symbolTable.setFunctionExtensions("barrier", 1, &E_GL_NV_mesh_shader); - symbolTable.setFunctionExtensions("memoryBarrierShared", 1, &E_GL_NV_mesh_shader); - symbolTable.setFunctionExtensions("groupMemoryBarrier", 1, &E_GL_NV_mesh_shader); + if (profile != EEsProfile) { + symbolTable.setFunctionExtensions("barrier", Num_AEP_mesh_shader, AEP_mesh_shader); + symbolTable.setFunctionExtensions("memoryBarrierShared", Num_AEP_mesh_shader, AEP_mesh_shader); + symbolTable.setFunctionExtensions("groupMemoryBarrier", Num_AEP_mesh_shader, AEP_mesh_shader); + } else { + symbolTable.setFunctionExtensions("barrier", 1, &E_GL_NV_mesh_shader); + symbolTable.setFunctionExtensions("memoryBarrierShared", 1, &E_GL_NV_mesh_shader); + symbolTable.setFunctionExtensions("groupMemoryBarrier", 1, &E_GL_NV_mesh_shader); + } + symbolTable.setFunctionExtensions("writePackedPrimitiveIndices4x8NV", 1, &E_GL_NV_mesh_shader); } if (profile != EEsProfile && version >= 450) { + // GL_EXT_Mesh_shader + symbolTable.setVariableExtensions("gl_PrimitivePointIndicesEXT", 1, &E_GL_EXT_mesh_shader); + symbolTable.setVariableExtensions("gl_PrimitiveLineIndicesEXT", 1, &E_GL_EXT_mesh_shader); + symbolTable.setVariableExtensions("gl_PrimitiveTriangleIndicesEXT", 1, &E_GL_EXT_mesh_shader); + symbolTable.setVariableExtensions("gl_NumWorkGroups", 1, &E_GL_EXT_mesh_shader); + + BuiltInVariable("gl_PrimitivePointIndicesEXT", EbvPrimitivePointIndicesEXT, symbolTable); + BuiltInVariable("gl_PrimitiveLineIndicesEXT", EbvPrimitiveLineIndicesEXT, symbolTable); + BuiltInVariable("gl_PrimitiveTriangleIndicesEXT", EbvPrimitiveTriangleIndicesEXT, symbolTable); + BuiltInVariable("gl_NumWorkGroups", EbvNumWorkGroups, symbolTable); + + symbolTable.setVariableExtensions("gl_MeshVerticesEXT", "gl_Position", 1, &E_GL_EXT_mesh_shader); + symbolTable.setVariableExtensions("gl_MeshVerticesEXT", "gl_PointSize", 1, &E_GL_EXT_mesh_shader); + symbolTable.setVariableExtensions("gl_MeshVerticesEXT", "gl_ClipDistance", 1, &E_GL_EXT_mesh_shader); + symbolTable.setVariableExtensions("gl_MeshVerticesEXT", "gl_CullDistance", 1, &E_GL_EXT_mesh_shader); + + BuiltInVariable("gl_MeshVerticesEXT", "gl_Position", EbvPosition, symbolTable); + BuiltInVariable("gl_MeshVerticesEXT", "gl_PointSize", EbvPointSize, symbolTable); + BuiltInVariable("gl_MeshVerticesEXT", "gl_ClipDistance", EbvClipDistance, symbolTable); + BuiltInVariable("gl_MeshVerticesEXT", "gl_CullDistance", EbvCullDistance, symbolTable); + + symbolTable.setVariableExtensions("gl_MeshPrimitivesEXT", "gl_PrimitiveID", 1, &E_GL_EXT_mesh_shader); + symbolTable.setVariableExtensions("gl_MeshPrimitivesEXT", "gl_Layer", 1, &E_GL_EXT_mesh_shader); + symbolTable.setVariableExtensions("gl_MeshPrimitivesEXT", "gl_ViewportIndex", 1, &E_GL_EXT_mesh_shader); + symbolTable.setVariableExtensions("gl_MeshPrimitivesEXT", "gl_CullPrimitiveEXT", 1, &E_GL_EXT_mesh_shader); + + // note: technically this member requires both GL_EXT_mesh_shader and GL_EXT_fragment_shading_rate + // since setVariableExtensions only needs *one of* the extensions to validate, it's more useful to specify EXT_fragment_shading_rate + // GL_EXT_mesh_shader will be required in practice by use of other fields of gl_MeshPrimitivesEXT + symbolTable.setVariableExtensions("gl_MeshPrimitivesEXT", "gl_PrimitiveShadingRateEXT", 1, &E_GL_EXT_fragment_shading_rate); + + BuiltInVariable("gl_MeshPrimitivesEXT", "gl_PrimitiveID", EbvPrimitiveId, symbolTable); + BuiltInVariable("gl_MeshPrimitivesEXT", "gl_Layer", EbvLayer, symbolTable); + BuiltInVariable("gl_MeshPrimitivesEXT", "gl_ViewportIndex", EbvViewportIndex, symbolTable); + BuiltInVariable("gl_MeshPrimitivesEXT", "gl_CullPrimitiveEXT", EbvCullPrimitiveEXT, symbolTable); + BuiltInVariable("gl_MeshPrimitivesEXT", "gl_PrimitiveShadingRateEXT", EbvPrimitiveShadingRateKHR, symbolTable); + + symbolTable.setFunctionExtensions("SetMeshOutputsEXT", 1, &E_GL_EXT_mesh_shader); + // GL_EXT_device_group symbolTable.setVariableExtensions("gl_DeviceIndex", 1, &E_GL_EXT_device_group); BuiltInVariable("gl_DeviceIndex", EbvDeviceIndex, symbolTable); @@ -8966,6 +9292,9 @@ void TBuiltIns::identifyBuiltIns(int version, EProfile profile, const SpvVersion if (version >= 460) { BuiltInVariable("gl_DrawID", EbvDrawId, symbolTable); } + // GL_EXT_multiview + BuiltInVariable("gl_ViewIndex", EbvViewIndex, symbolTable); + symbolTable.setVariableExtensions("gl_ViewIndex", 1, &E_GL_EXT_multiview); // GL_ARB_shader_ballot symbolTable.setVariableExtensions("gl_SubGroupSizeARB", 1, &E_GL_ARB_shader_ballot); @@ -8983,9 +9312,12 @@ void TBuiltIns::identifyBuiltIns(int version, EProfile profile, const SpvVersion BuiltInVariable("gl_SubGroupLeMaskARB", EbvSubGroupLeMask, symbolTable); BuiltInVariable("gl_SubGroupLtMaskARB", EbvSubGroupLtMask, symbolTable); - if (spvVersion.vulkan > 0) + if (spvVersion.vulkan > 0) { // Treat "gl_SubGroupSizeARB" as shader input instead of uniform for Vulkan SpecialQualifier("gl_SubGroupSizeARB", EvqVaryingIn, EbvSubGroupSize, symbolTable); + if (language == EShLangFragment) + ModifyFlatDecoration("gl_SubGroupSizeARB", true, symbolTable); + } else BuiltInVariable("gl_SubGroupSizeARB", EbvSubGroupSize, symbolTable); } @@ -9024,6 +9356,19 @@ void TBuiltIns::identifyBuiltIns(int version, EProfile profile, const SpvVersion BuiltInVariable("gl_SMCountNV", EbvSMCount, symbolTable); BuiltInVariable("gl_WarpIDNV", EbvWarpID, symbolTable); BuiltInVariable("gl_SMIDNV", EbvSMID, symbolTable); + + // GL_ARM_shader_core_builtins + symbolTable.setVariableExtensions("gl_CoreCountARM", 1, &E_GL_ARM_shader_core_builtins); + symbolTable.setVariableExtensions("gl_CoreIDARM", 1, &E_GL_ARM_shader_core_builtins); + symbolTable.setVariableExtensions("gl_CoreMaxIDARM", 1, &E_GL_ARM_shader_core_builtins); + symbolTable.setVariableExtensions("gl_WarpIDARM", 1, &E_GL_ARM_shader_core_builtins); + symbolTable.setVariableExtensions("gl_WarpMaxIDARM", 1, &E_GL_ARM_shader_core_builtins); + + BuiltInVariable("gl_CoreCountARM", EbvCoreCountARM, symbolTable); + BuiltInVariable("gl_CoreIDARM", EbvCoreIDARM, symbolTable); + BuiltInVariable("gl_CoreMaxIDARM", EbvCoreMaxIDARM, symbolTable); + BuiltInVariable("gl_WarpIDARM", EbvWarpIDARM, symbolTable); + BuiltInVariable("gl_WarpMaxIDARM", EbvWarpMaxIDARM, symbolTable); } if ((profile == EEsProfile && version >= 310) || @@ -9033,18 +9378,33 @@ void TBuiltIns::identifyBuiltIns(int version, EProfile profile, const SpvVersion symbolTable.setVariableExtensions("gl_ShadingRateFlag2HorizontalPixelsEXT", 1, &E_GL_EXT_fragment_shading_rate); symbolTable.setVariableExtensions("gl_ShadingRateFlag4HorizontalPixelsEXT", 1, &E_GL_EXT_fragment_shading_rate); } + + // Builtins for GL_NV_displacment_micromap + if ((profile != EEsProfile && version >= 460)) { + symbolTable.setFunctionExtensions("fetchMicroTriangleVertexPositionNV", 1, &E_GL_NV_displacement_micromap); + symbolTable.setFunctionExtensions("fetchMicroTriangleVertexBarycentricNV", 1, &E_GL_NV_displacement_micromap); + } + break; - case EShLangTaskNV: + case EShLangTask: if ((profile != EEsProfile && version >= 450) || (profile == EEsProfile && version >= 320)) { symbolTable.setVariableExtensions("gl_TaskCountNV", 1, &E_GL_NV_mesh_shader); - symbolTable.setVariableExtensions("gl_WorkGroupSize", 1, &E_GL_NV_mesh_shader); - symbolTable.setVariableExtensions("gl_WorkGroupID", 1, &E_GL_NV_mesh_shader); - symbolTable.setVariableExtensions("gl_LocalInvocationID", 1, &E_GL_NV_mesh_shader); - symbolTable.setVariableExtensions("gl_GlobalInvocationID", 1, &E_GL_NV_mesh_shader); - symbolTable.setVariableExtensions("gl_LocalInvocationIndex", 1, &E_GL_NV_mesh_shader); symbolTable.setVariableExtensions("gl_MeshViewCountNV", 1, &E_GL_NV_mesh_shader); symbolTable.setVariableExtensions("gl_MeshViewIndicesNV", 1, &E_GL_NV_mesh_shader); + if (profile != EEsProfile) { + symbolTable.setVariableExtensions("gl_WorkGroupSize", Num_AEP_mesh_shader, AEP_mesh_shader); + symbolTable.setVariableExtensions("gl_WorkGroupID", Num_AEP_mesh_shader, AEP_mesh_shader); + symbolTable.setVariableExtensions("gl_LocalInvocationID", Num_AEP_mesh_shader, AEP_mesh_shader); + symbolTable.setVariableExtensions("gl_GlobalInvocationID", Num_AEP_mesh_shader, AEP_mesh_shader); + symbolTable.setVariableExtensions("gl_LocalInvocationIndex", Num_AEP_mesh_shader, AEP_mesh_shader); + } else { + symbolTable.setVariableExtensions("gl_WorkGroupSize", 1, &E_GL_NV_mesh_shader); + symbolTable.setVariableExtensions("gl_WorkGroupID", 1, &E_GL_NV_mesh_shader); + symbolTable.setVariableExtensions("gl_LocalInvocationID", 1, &E_GL_NV_mesh_shader); + symbolTable.setVariableExtensions("gl_GlobalInvocationID", 1, &E_GL_NV_mesh_shader); + symbolTable.setVariableExtensions("gl_LocalInvocationIndex", 1, &E_GL_NV_mesh_shader); + } BuiltInVariable("gl_TaskCountNV", EbvTaskCountNV, symbolTable); BuiltInVariable("gl_WorkGroupSize", EbvWorkGroupSize, symbolTable); @@ -9058,12 +9418,23 @@ void TBuiltIns::identifyBuiltIns(int version, EProfile profile, const SpvVersion symbolTable.setVariableExtensions("gl_MaxTaskWorkGroupSizeNV", 1, &E_GL_NV_mesh_shader); symbolTable.setVariableExtensions("gl_MaxMeshViewCountNV", 1, &E_GL_NV_mesh_shader); - symbolTable.setFunctionExtensions("barrier", 1, &E_GL_NV_mesh_shader); - symbolTable.setFunctionExtensions("memoryBarrierShared", 1, &E_GL_NV_mesh_shader); - symbolTable.setFunctionExtensions("groupMemoryBarrier", 1, &E_GL_NV_mesh_shader); + if (profile != EEsProfile) { + symbolTable.setFunctionExtensions("barrier", Num_AEP_mesh_shader, AEP_mesh_shader); + symbolTable.setFunctionExtensions("memoryBarrierShared", Num_AEP_mesh_shader, AEP_mesh_shader); + symbolTable.setFunctionExtensions("groupMemoryBarrier", Num_AEP_mesh_shader, AEP_mesh_shader); + } else { + symbolTable.setFunctionExtensions("barrier", 1, &E_GL_NV_mesh_shader); + symbolTable.setFunctionExtensions("memoryBarrierShared", 1, &E_GL_NV_mesh_shader); + symbolTable.setFunctionExtensions("groupMemoryBarrier", 1, &E_GL_NV_mesh_shader); + } } if (profile != EEsProfile && version >= 450) { + // GL_EXT_mesh_shader + symbolTable.setFunctionExtensions("EmitMeshTasksEXT", 1, &E_GL_EXT_mesh_shader); + symbolTable.setVariableExtensions("gl_NumWorkGroups", 1, &E_GL_EXT_mesh_shader); + BuiltInVariable("gl_NumWorkGroups", EbvNumWorkGroups, symbolTable); + // GL_EXT_device_group symbolTable.setVariableExtensions("gl_DeviceIndex", 1, &E_GL_EXT_device_group); BuiltInVariable("gl_DeviceIndex", EbvDeviceIndex, symbolTable); @@ -9091,9 +9462,12 @@ void TBuiltIns::identifyBuiltIns(int version, EProfile profile, const SpvVersion BuiltInVariable("gl_SubGroupLeMaskARB", EbvSubGroupLeMask, symbolTable); BuiltInVariable("gl_SubGroupLtMaskARB", EbvSubGroupLtMask, symbolTable); - if (spvVersion.vulkan > 0) + if (spvVersion.vulkan > 0) { // Treat "gl_SubGroupSizeARB" as shader input instead of uniform for Vulkan SpecialQualifier("gl_SubGroupSizeARB", EvqVaryingIn, EbvSubGroupSize, symbolTable); + if (language == EShLangFragment) + ModifyFlatDecoration("gl_SubGroupSizeARB", true, symbolTable); + } else BuiltInVariable("gl_SubGroupSizeARB", EbvSubGroupSize, symbolTable); } @@ -9132,6 +9506,19 @@ void TBuiltIns::identifyBuiltIns(int version, EProfile profile, const SpvVersion BuiltInVariable("gl_SMCountNV", EbvSMCount, symbolTable); BuiltInVariable("gl_WarpIDNV", EbvWarpID, symbolTable); BuiltInVariable("gl_SMIDNV", EbvSMID, symbolTable); + + // GL_ARM_shader_core_builtins + symbolTable.setVariableExtensions("gl_CoreCountARM", 1, &E_GL_ARM_shader_core_builtins); + symbolTable.setVariableExtensions("gl_CoreIDARM", 1, &E_GL_ARM_shader_core_builtins); + symbolTable.setVariableExtensions("gl_CoreMaxIDARM", 1, &E_GL_ARM_shader_core_builtins); + symbolTable.setVariableExtensions("gl_WarpIDARM", 1, &E_GL_ARM_shader_core_builtins); + symbolTable.setVariableExtensions("gl_WarpMaxIDARM", 1, &E_GL_ARM_shader_core_builtins); + + BuiltInVariable("gl_CoreCountARM", EbvCoreCountARM, symbolTable); + BuiltInVariable("gl_CoreIDARM", EbvCoreIDARM, symbolTable); + BuiltInVariable("gl_CoreMaxIDARM", EbvCoreMaxIDARM, symbolTable); + BuiltInVariable("gl_WarpIDARM", EbvWarpIDARM, symbolTable); + BuiltInVariable("gl_WarpMaxIDARM", EbvWarpMaxIDARM, symbolTable); } if ((profile == EEsProfile && version >= 310) || (profile != EEsProfile && version >= 450)) { @@ -9141,7 +9528,6 @@ void TBuiltIns::identifyBuiltIns(int version, EProfile profile, const SpvVersion symbolTable.setVariableExtensions("gl_ShadingRateFlag4HorizontalPixelsEXT", 1, &E_GL_EXT_fragment_shading_rate); } break; -#endif default: assert(false && "Language not supported"); @@ -9157,7 +9543,6 @@ void TBuiltIns::identifyBuiltIns(int version, EProfile profile, const SpvVersion relateTabledBuiltins(version, profile, spvVersion, language, symbolTable); -#ifndef GLSLANG_WEB symbolTable.relateToOperator("doubleBitsToInt64", EOpDoubleBitsToInt64); symbolTable.relateToOperator("doubleBitsToUint64", EOpDoubleBitsToUint64); symbolTable.relateToOperator("int64BitsToDouble", EOpInt64BitsToDouble); @@ -9574,6 +9959,14 @@ void TBuiltIns::identifyBuiltIns(int version, EProfile profile, const SpvVersion symbolTable.relateToOperator("shadow2DEXT", EOpTexture); symbolTable.relateToOperator("shadow2DProjEXT", EOpTextureProj); } + + if ((profile == EEsProfile && version >= 310) || + (profile != EEsProfile && version >= 140)) { + symbolTable.relateToOperator("textureWeightedQCOM", EOpImageSampleWeightedQCOM); + symbolTable.relateToOperator("textureBoxFilterQCOM", EOpImageBoxFilterQCOM); + symbolTable.relateToOperator("textureBlockMatchSADQCOM", EOpImageBlockMatchSADQCOM); + symbolTable.relateToOperator("textureBlockMatchSSDQCOM", EOpImageBlockMatchSSDQCOM); + } } switch(language) { @@ -9625,6 +10018,7 @@ void TBuiltIns::identifyBuiltIns(int version, EProfile profile, const SpvVersion symbolTable.relateToOperator("rayQueryGetWorldRayOriginEXT", EOpRayQueryGetWorldRayOrigin); symbolTable.relateToOperator("rayQueryGetIntersectionObjectToWorldEXT", EOpRayQueryGetIntersectionObjectToWorld); symbolTable.relateToOperator("rayQueryGetIntersectionWorldToObjectEXT", EOpRayQueryGetIntersectionWorldToObject); + symbolTable.relateToOperator("rayQueryGetIntersectionTriangleVertexPositionsEXT", EOpRayQueryGetIntersectionTriangleVertexPositionsEXT); } symbolTable.relateToOperator("interpolateAtCentroid", EOpInterpolateAtCentroid); @@ -9637,6 +10031,10 @@ void TBuiltIns::identifyBuiltIns(int version, EProfile profile, const SpvVersion symbolTable.relateToOperator("beginInvocationInterlockARB", EOpBeginInvocationInterlock); symbolTable.relateToOperator("endInvocationInterlockARB", EOpEndInvocationInterlock); + symbolTable.relateToOperator("stencilAttachmentReadEXT", EOpStencilAttachmentReadEXT); + symbolTable.relateToOperator("depthAttachmentReadEXT", EOpDepthAttachmentReadEXT); + symbolTable.relateToOperator("colorAttachmentReadEXT", EOpColorAttachmentReadEXT); + break; case EShLangCompute: @@ -9653,12 +10051,25 @@ void TBuiltIns::identifyBuiltIns(int version, EProfile profile, const SpvVersion symbolTable.relateToOperator("dFdyCoarse", EOpDPdyCoarse); symbolTable.relateToOperator("fwidthCoarse",EOpFwidthCoarse); } - symbolTable.relateToOperator("coopMatLoadNV", EOpCooperativeMatrixLoad); - symbolTable.relateToOperator("coopMatStoreNV", EOpCooperativeMatrixStore); - symbolTable.relateToOperator("coopMatMulAddNV", EOpCooperativeMatrixMulAdd); + symbolTable.relateToOperator("coopMatLoadNV", EOpCooperativeMatrixLoadNV); + symbolTable.relateToOperator("coopMatStoreNV", EOpCooperativeMatrixStoreNV); + symbolTable.relateToOperator("coopMatMulAddNV", EOpCooperativeMatrixMulAddNV); + + symbolTable.relateToOperator("coopMatLoad", EOpCooperativeMatrixLoad); + symbolTable.relateToOperator("coopMatStore", EOpCooperativeMatrixStore); + symbolTable.relateToOperator("coopMatMulAdd", EOpCooperativeMatrixMulAdd); + + if (profile != EEsProfile && version >= 460) { + symbolTable.relateToOperator("fetchMicroTriangleVertexPositionNV", EOpFetchMicroTriangleVertexPositionNV); + symbolTable.relateToOperator("fetchMicroTriangleVertexBarycentricNV", EOpFetchMicroTriangleVertexBarycentricNV); + } break; case EShLangRayGen: + if (profile != EEsProfile && version >= 460) { + symbolTable.relateToOperator("fetchMicroTriangleVertexPositionNV", EOpFetchMicroTriangleVertexPositionNV); + symbolTable.relateToOperator("fetchMicroTriangleVertexBarycentricNV", EOpFetchMicroTriangleVertexBarycentricNV); + } // fallthrough case EShLangClosestHit: case EShLangMiss: if (profile != EEsProfile && version >= 460) { @@ -9667,13 +10078,45 @@ void TBuiltIns::identifyBuiltIns(int version, EProfile profile, const SpvVersion symbolTable.relateToOperator("traceRayEXT", EOpTraceKHR); symbolTable.relateToOperator("executeCallableNV", EOpExecuteCallableNV); symbolTable.relateToOperator("executeCallableEXT", EOpExecuteCallableKHR); + + symbolTable.relateToOperator("hitObjectTraceRayNV", EOpHitObjectTraceRayNV); + symbolTable.relateToOperator("hitObjectTraceRayMotionNV", EOpHitObjectTraceRayMotionNV); + symbolTable.relateToOperator("hitObjectRecordHitNV", EOpHitObjectRecordHitNV); + symbolTable.relateToOperator("hitObjectRecordHitMotionNV", EOpHitObjectRecordHitMotionNV); + symbolTable.relateToOperator("hitObjectRecordHitWithIndexNV", EOpHitObjectRecordHitWithIndexNV); + symbolTable.relateToOperator("hitObjectRecordHitWithIndexMotionNV", EOpHitObjectRecordHitWithIndexMotionNV); + symbolTable.relateToOperator("hitObjectRecordMissNV", EOpHitObjectRecordMissNV); + symbolTable.relateToOperator("hitObjectRecordMissMotionNV", EOpHitObjectRecordMissMotionNV); + symbolTable.relateToOperator("hitObjectRecordEmptyNV", EOpHitObjectRecordEmptyNV); + symbolTable.relateToOperator("hitObjectExecuteShaderNV", EOpHitObjectExecuteShaderNV); + symbolTable.relateToOperator("hitObjectIsEmptyNV", EOpHitObjectIsEmptyNV); + symbolTable.relateToOperator("hitObjectIsMissNV", EOpHitObjectIsMissNV); + symbolTable.relateToOperator("hitObjectIsHitNV", EOpHitObjectIsHitNV); + symbolTable.relateToOperator("hitObjectGetRayTMinNV", EOpHitObjectGetRayTMinNV); + symbolTable.relateToOperator("hitObjectGetRayTMaxNV", EOpHitObjectGetRayTMaxNV); + symbolTable.relateToOperator("hitObjectGetObjectRayOriginNV", EOpHitObjectGetObjectRayOriginNV); + symbolTable.relateToOperator("hitObjectGetObjectRayDirectionNV", EOpHitObjectGetObjectRayDirectionNV); + symbolTable.relateToOperator("hitObjectGetWorldRayOriginNV", EOpHitObjectGetWorldRayOriginNV); + symbolTable.relateToOperator("hitObjectGetWorldRayDirectionNV", EOpHitObjectGetWorldRayDirectionNV); + symbolTable.relateToOperator("hitObjectGetWorldToObjectNV", EOpHitObjectGetWorldToObjectNV); + symbolTable.relateToOperator("hitObjectGetObjectToWorldNV", EOpHitObjectGetObjectToWorldNV); + symbolTable.relateToOperator("hitObjectGetInstanceCustomIndexNV", EOpHitObjectGetInstanceCustomIndexNV); + symbolTable.relateToOperator("hitObjectGetInstanceIdNV", EOpHitObjectGetInstanceIdNV); + symbolTable.relateToOperator("hitObjectGetGeometryIndexNV", EOpHitObjectGetGeometryIndexNV); + symbolTable.relateToOperator("hitObjectGetPrimitiveIndexNV", EOpHitObjectGetPrimitiveIndexNV); + symbolTable.relateToOperator("hitObjectGetHitKindNV", EOpHitObjectGetHitKindNV); + symbolTable.relateToOperator("hitObjectGetAttributesNV", EOpHitObjectGetAttributesNV); + symbolTable.relateToOperator("hitObjectGetCurrentTimeNV", EOpHitObjectGetCurrentTimeNV); + symbolTable.relateToOperator("hitObjectGetShaderBindingTableRecordIndexNV", EOpHitObjectGetShaderBindingTableRecordIndexNV); + symbolTable.relateToOperator("hitObjectGetShaderRecordBufferHandleNV", EOpHitObjectGetShaderRecordBufferHandleNV); + symbolTable.relateToOperator("reorderThreadNV", EOpReorderThreadNV); } break; case EShLangIntersect: if (profile != EEsProfile && version >= 460) { symbolTable.relateToOperator("reportIntersectionNV", EOpReportIntersection); symbolTable.relateToOperator("reportIntersectionEXT", EOpReportIntersection); - } + } break; case EShLangAnyHit: if (profile != EEsProfile && version >= 460) { @@ -9687,23 +10130,38 @@ void TBuiltIns::identifyBuiltIns(int version, EProfile profile, const SpvVersion symbolTable.relateToOperator("executeCallableEXT", EOpExecuteCallableKHR); } break; - case EShLangMeshNV: + case EShLangMesh: if ((profile != EEsProfile && version >= 450) || (profile == EEsProfile && version >= 320)) { symbolTable.relateToOperator("writePackedPrimitiveIndices4x8NV", EOpWritePackedPrimitiveIndices4x8NV); + symbolTable.relateToOperator("memoryBarrierShared", EOpMemoryBarrierShared); + symbolTable.relateToOperator("groupMemoryBarrier", EOpGroupMemoryBarrier); + symbolTable.relateToOperator("subgroupMemoryBarrierShared", EOpSubgroupMemoryBarrierShared); } - // fall through - case EShLangTaskNV: + + if (profile != EEsProfile && version >= 450) { + symbolTable.relateToOperator("SetMeshOutputsEXT", EOpSetMeshOutputsEXT); + } + + if (profile != EEsProfile && version >= 460) { + // Builtins for GL_NV_displacement_micromap. + symbolTable.relateToOperator("fetchMicroTriangleVertexPositionNV", EOpFetchMicroTriangleVertexPositionNV); + symbolTable.relateToOperator("fetchMicroTriangleVertexBarycentricNV", EOpFetchMicroTriangleVertexBarycentricNV); + } + break; + case EShLangTask: if ((profile != EEsProfile && version >= 450) || (profile == EEsProfile && version >= 320)) { symbolTable.relateToOperator("memoryBarrierShared", EOpMemoryBarrierShared); symbolTable.relateToOperator("groupMemoryBarrier", EOpGroupMemoryBarrier); symbolTable.relateToOperator("subgroupMemoryBarrierShared", EOpSubgroupMemoryBarrierShared); } + if (profile != EEsProfile && version >= 450) { + symbolTable.relateToOperator("EmitMeshTasksEXT", EOpEmitMeshTasksEXT); + } break; default: assert(false && "Language not supported"); } -#endif // !GLSLANG_WEB } // @@ -9717,11 +10175,6 @@ void TBuiltIns::identifyBuiltIns(int version, EProfile profile, const SpvVersion // void TBuiltIns::identifyBuiltIns(int version, EProfile profile, const SpvVersion& spvVersion, EShLanguage language, TSymbolTable& symbolTable, const TBuiltInResource &resources) { -#ifndef GLSLANG_WEB -#if defined(GLSLANG_ANGLE) - profile = ECoreProfile; - version = 450; -#endif if (profile != EEsProfile && version >= 430 && version < 440) { symbolTable.setVariableExtensions("gl_MaxTransformFeedbackBuffers", 1, &E_GL_ARB_enhanced_layouts); symbolTable.setVariableExtensions("gl_MaxTransformFeedbackInterleavedComponents", 1, &E_GL_ARB_enhanced_layouts); @@ -9793,7 +10246,6 @@ void TBuiltIns::identifyBuiltIns(int version, EProfile profile, const SpvVersion default: break; } -#endif } } // end namespace glslang diff --git a/glslang/MachineIndependent/Initialize.h b/glslang/MachineIndependent/Initialize.h index ac8ec33e99..42c32ddbb7 100644 --- a/glslang/MachineIndependent/Initialize.h +++ b/glslang/MachineIndependent/Initialize.h @@ -107,6 +107,9 @@ class TBuiltIns : public TBuiltInParseables { int dimMap[EsdNumDims]; }; +// change this back to false if depending on textual spellings of texturing calls when consuming the AST +// Using PureOperatorBuiltins=false is deprecated. +constexpr bool PureOperatorBuiltins = true; } // end namespace glslang #endif // _INITIALIZE_INCLUDED_ diff --git a/glslang/MachineIndependent/Intermediate.cpp b/glslang/MachineIndependent/Intermediate.cpp index 14fd053a79..a8e3b38bfd 100644 --- a/glslang/MachineIndependent/Intermediate.cpp +++ b/glslang/MachineIndependent/Intermediate.cpp @@ -352,7 +352,7 @@ TIntermTyped* TIntermediate::addIndex(TOperator op, TIntermTyped* base, TIntermT TIntermTyped* TIntermediate::addUnaryMath(TOperator op, TIntermTyped* child, const TSourceLoc& loc) { - if (child == 0) + if (child == nullptr) return nullptr; if (child->getType().getBasicType() == EbtBlock) @@ -388,7 +388,6 @@ TIntermTyped* TIntermediate::addUnaryMath(TOperator op, TIntermTyped* child, case EOpConstructFloat: newType = EbtFloat; break; case EOpConstructInt: newType = EbtInt; break; case EOpConstructUint: newType = EbtUint; break; -#ifndef GLSLANG_WEB case EOpConstructInt8: newType = EbtInt8; break; case EOpConstructUint8: newType = EbtUint8; break; case EOpConstructInt16: newType = EbtInt16; break; @@ -397,7 +396,6 @@ TIntermTyped* TIntermediate::addUnaryMath(TOperator op, TIntermTyped* child, case EOpConstructUint64: newType = EbtUint64; break; case EOpConstructDouble: newType = EbtDouble; break; case EOpConstructFloat16: newType = EbtFloat16; break; -#endif default: break; // some compilers want this } @@ -569,7 +567,6 @@ bool TIntermediate::isConversionAllowed(TOperator op, TIntermTyped* node) const bool TIntermediate::buildConvertOp(TBasicType dst, TBasicType src, TOperator& newOp) const { switch (dst) { -#ifndef GLSLANG_WEB case EbtDouble: switch (src) { case EbtUint: newOp = EOpConvUintToDouble; break; @@ -587,13 +584,11 @@ bool TIntermediate::buildConvertOp(TBasicType dst, TBasicType src, TOperator& ne return false; } break; -#endif case EbtFloat: switch (src) { case EbtInt: newOp = EOpConvIntToFloat; break; case EbtUint: newOp = EOpConvUintToFloat; break; case EbtBool: newOp = EOpConvBoolToFloat; break; -#ifndef GLSLANG_WEB case EbtDouble: newOp = EOpConvDoubleToFloat; break; case EbtInt8: newOp = EOpConvInt8ToFloat; break; case EbtUint8: newOp = EOpConvUint8ToFloat; break; @@ -602,12 +597,10 @@ bool TIntermediate::buildConvertOp(TBasicType dst, TBasicType src, TOperator& ne case EbtFloat16: newOp = EOpConvFloat16ToFloat; break; case EbtInt64: newOp = EOpConvInt64ToFloat; break; case EbtUint64: newOp = EOpConvUint64ToFloat; break; -#endif default: return false; } break; -#ifndef GLSLANG_WEB case EbtFloat16: switch (src) { case EbtInt8: newOp = EOpConvInt8ToFloat16; break; @@ -625,13 +618,11 @@ bool TIntermediate::buildConvertOp(TBasicType dst, TBasicType src, TOperator& ne return false; } break; -#endif case EbtBool: switch (src) { case EbtInt: newOp = EOpConvIntToBool; break; case EbtUint: newOp = EOpConvUintToBool; break; case EbtFloat: newOp = EOpConvFloatToBool; break; -#ifndef GLSLANG_WEB case EbtDouble: newOp = EOpConvDoubleToBool; break; case EbtInt8: newOp = EOpConvInt8ToBool; break; case EbtUint8: newOp = EOpConvUint8ToBool; break; @@ -640,12 +631,10 @@ bool TIntermediate::buildConvertOp(TBasicType dst, TBasicType src, TOperator& ne case EbtFloat16: newOp = EOpConvFloat16ToBool; break; case EbtInt64: newOp = EOpConvInt64ToBool; break; case EbtUint64: newOp = EOpConvUint64ToBool; break; -#endif default: return false; } break; -#ifndef GLSLANG_WEB case EbtInt8: switch (src) { case EbtUint8: newOp = EOpConvUint8ToInt8; break; @@ -715,14 +704,12 @@ bool TIntermediate::buildConvertOp(TBasicType dst, TBasicType src, TOperator& ne return false; } break; -#endif case EbtInt: switch (src) { case EbtUint: newOp = EOpConvUintToInt; break; case EbtBool: newOp = EOpConvBoolToInt; break; case EbtFloat: newOp = EOpConvFloatToInt; break; -#ifndef GLSLANG_WEB case EbtInt8: newOp = EOpConvInt8ToInt; break; case EbtUint8: newOp = EOpConvUint8ToInt; break; case EbtInt16: newOp = EOpConvInt16ToInt; break; @@ -731,7 +718,6 @@ bool TIntermediate::buildConvertOp(TBasicType dst, TBasicType src, TOperator& ne case EbtFloat16: newOp = EOpConvFloat16ToInt; break; case EbtInt64: newOp = EOpConvInt64ToInt; break; case EbtUint64: newOp = EOpConvUint64ToInt; break; -#endif default: return false; } @@ -741,7 +727,6 @@ bool TIntermediate::buildConvertOp(TBasicType dst, TBasicType src, TOperator& ne case EbtInt: newOp = EOpConvIntToUint; break; case EbtBool: newOp = EOpConvBoolToUint; break; case EbtFloat: newOp = EOpConvFloatToUint; break; -#ifndef GLSLANG_WEB case EbtInt8: newOp = EOpConvInt8ToUint; break; case EbtUint8: newOp = EOpConvUint8ToUint; break; case EbtInt16: newOp = EOpConvInt16ToUint; break; @@ -750,12 +735,15 @@ bool TIntermediate::buildConvertOp(TBasicType dst, TBasicType src, TOperator& ne case EbtFloat16: newOp = EOpConvFloat16ToUint; break; case EbtInt64: newOp = EOpConvInt64ToUint; break; case EbtUint64: newOp = EOpConvUint64ToUint; break; -#endif + // For bindless texture type conversion, add a dummy convert op, just + // to generate a new TIntermTyped + // uvec2(any sampler type) + // uvec2(any image type) + case EbtSampler: newOp = EOpConvIntToUint; break; default: return false; } break; -#ifndef GLSLANG_WEB case EbtInt64: switch (src) { case EbtInt8: newOp = EOpConvInt8ToInt64; break; @@ -790,7 +778,6 @@ bool TIntermediate::buildConvertOp(TBasicType dst, TBasicType src, TOperator& ne return false; } break; -#endif default: return false; } @@ -806,7 +793,6 @@ TIntermTyped* TIntermediate::createConversion(TBasicType convertTo, TIntermTyped // Add a new newNode for the conversion. // -#ifndef GLSLANG_WEB bool convertToIntTypes = (convertTo == EbtInt8 || convertTo == EbtUint8 || convertTo == EbtInt16 || convertTo == EbtUint16 || convertTo == EbtInt || convertTo == EbtUint || @@ -843,7 +829,6 @@ TIntermTyped* TIntermediate::createConversion(TBasicType convertTo, TIntermTyped return nullptr; } } -#endif TIntermUnary* newNode = nullptr; TOperator newOp = EOpNull; @@ -855,13 +840,11 @@ TIntermTyped* TIntermediate::createConversion(TBasicType convertTo, TIntermTyped newNode = addUnaryNode(newOp, node, node->getLoc(), newType); if (node->getAsConstantUnion()) { -#ifndef GLSLANG_WEB // 8/16-bit storage extensions don't support 8/16-bit constants, so don't fold conversions // to those types if ((getArithemeticInt8Enabled() || !(convertTo == EbtInt8 || convertTo == EbtUint8)) && (getArithemeticInt16Enabled() || !(convertTo == EbtInt16 || convertTo == EbtUint16)) && (getArithemeticFloat16Enabled() || !(convertTo == EbtFloat16))) -#endif { TIntermTyped* folded = node->getAsConstantUnion()->fold(newOp, newType); if (folded) @@ -1044,6 +1027,12 @@ TIntermTyped* TIntermediate::addConversion(TOperator op, const TType& type, TInt if (type.isArray() || node->getType().isArray()) return nullptr; + // Reject implicit conversions to cooperative matrix types + if (node->getType().isCoopMat() && + op != EOpConstructCooperativeMatrixNV && + op != EOpConstructCooperativeMatrixKHR) + return nullptr; + // Note: callers are responsible for other aspects of shape, // like vector and matrix sizes. @@ -1055,7 +1044,6 @@ TIntermTyped* TIntermediate::addConversion(TOperator op, const TType& type, TInt case EOpConstructFloat: case EOpConstructInt: case EOpConstructUint: -#ifndef GLSLANG_WEB case EOpConstructDouble: case EOpConstructFloat16: case EOpConstructInt8: @@ -1066,8 +1054,6 @@ TIntermTyped* TIntermediate::addConversion(TOperator op, const TType& type, TInt case EOpConstructUint64: break; -#endif - // // Implicit conversions // @@ -1112,7 +1098,8 @@ TIntermTyped* TIntermediate::addConversion(TOperator op, const TType& type, TInt case EOpSequence: case EOpConstructStruct: - case EOpConstructCooperativeMatrix: + case EOpConstructCooperativeMatrixNV: + case EOpConstructCooperativeMatrixKHR: if (type.isReference() || node->getType().isReference()) { // types must match to assign a reference @@ -1154,7 +1141,6 @@ TIntermTyped* TIntermediate::addConversion(TOperator op, const TType& type, TInt } bool canPromoteConstant = true; -#ifndef GLSLANG_WEB // GL_EXT_shader_16bit_storage can't do OpConstantComposite with // 16-bit types, so disable promotion for those types. // Many issues with this, from JohnK: @@ -1182,7 +1168,6 @@ TIntermTyped* TIntermediate::addConversion(TOperator op, const TType& type, TInt default: break; } -#endif if (canPromoteConstant && node->getAsConstantUnion()) return promoteConstantUnion(type.getBasicType(), node->getAsConstantUnion()); @@ -1479,10 +1464,6 @@ bool TIntermediate::isFPPromotion(TBasicType from, TBasicType to) const bool TIntermediate::isIntegralConversion(TBasicType from, TBasicType to) const { -#ifdef GLSLANG_WEB - return false; -#endif - switch (from) { case EbtInt: switch(to) { @@ -1563,10 +1544,6 @@ bool TIntermediate::isIntegralConversion(TBasicType from, TBasicType to) const bool TIntermediate::isFPConversion(TBasicType from, TBasicType to) const { -#ifdef GLSLANG_WEB - return false; -#endif - if (to == EbtFloat && from == EbtFloat16) { return true; } else { @@ -1587,7 +1564,6 @@ bool TIntermediate::isFPIntegralConversion(TBasicType from, TBasicType to) const break; } break; -#ifndef GLSLANG_WEB case EbtInt8: case EbtUint8: case EbtInt16: @@ -1607,7 +1583,6 @@ bool TIntermediate::isFPIntegralConversion(TBasicType from, TBasicType to) const return true; } break; -#endif default: break; } @@ -1809,10 +1784,6 @@ bool TIntermediate::canImplicitlyPromote(TBasicType from, TBasicType to, TOperat static bool canSignedIntTypeRepresentAllUnsignedValues(TBasicType sintType, TBasicType uintType) { -#ifdef GLSLANG_WEB - return false; -#endif - switch(sintType) { case EbtInt8: switch(uintType) { @@ -1873,11 +1844,6 @@ static bool canSignedIntTypeRepresentAllUnsignedValues(TBasicType sintType, TBas static TBasicType getCorrespondingUnsignedType(TBasicType type) { -#ifdef GLSLANG_WEB - assert(type == EbtInt); - return EbtUint; -#endif - switch(type) { case EbtInt8: return EbtUint8; @@ -2003,8 +1969,11 @@ TOperator TIntermediate::mapTypeToConstructorOp(const TType& type) const if (type.getQualifier().isNonUniform()) return EOpConstructNonuniform; - if (type.isCoopMat()) - return EOpConstructCooperativeMatrix; + if (type.isCoopMatNV()) + return EOpConstructCooperativeMatrixNV; + + if (type.isCoopMatKHR()) + return EOpConstructCooperativeMatrixKHR; switch (type.getBasicType()) { case EbtStruct: @@ -2167,7 +2136,6 @@ TOperator TIntermediate::mapTypeToConstructorOp(const TType& type) const } } break; -#ifndef GLSLANG_WEB case EbtDouble: if (type.getMatrixCols()) { switch (type.getMatrixCols()) { @@ -2306,7 +2274,6 @@ TOperator TIntermediate::mapTypeToConstructorOp(const TType& type) const case EbtAccStruct: op = EOpConstructAccStruct; break; -#endif default: break; } @@ -2733,10 +2700,10 @@ TIntermAggregate* TIntermediate::addForLoop(TIntermNode* body, TIntermNode* init TIntermAggregate* loopSequence = (initializer == nullptr || initializer->getAsAggregate() == nullptr) ? makeAggregate(initializer, loc) : initializer->getAsAggregate(); - if (loopSequence != nullptr && loopSequence->getOp() == EOpSequence) + if (loopSequence != nullptr && (loopSequence->getOp() == EOpSequence || loopSequence->getOp() == EOpScope)) loopSequence->setOp(EOpNull); loopSequence = growAggregate(loopSequence, node); - loopSequence->setOperator(EOpSequence); + loopSequence->setOperator(getDebugInfo() ? EOpScope : EOpSequence); return loopSequence; } @@ -2787,7 +2754,6 @@ bool TIntermediate::postProcess(TIntermNode* root, EShLanguage /*language*/) if (aggRoot && aggRoot->getOp() == EOpNull) aggRoot->setOperator(EOpSequence); -#ifndef GLSLANG_WEB // Propagate 'noContraction' label in backward from 'precise' variables. glslang::PropagateNoContraction(*this); @@ -2801,7 +2767,6 @@ bool TIntermediate::postProcess(TIntermNode* root, EShLanguage /*language*/) assert(0); break; } -#endif return true; } @@ -3521,20 +3486,28 @@ bool TIntermediate::promoteBinary(TIntermBinary& node) } if (left->getType().isCoopMat() || right->getType().isCoopMat()) { + // Operations on two cooperative matrices must have identical types if (left->getType().isCoopMat() && right->getType().isCoopMat() && - *left->getType().getTypeParameters() != *right->getType().getTypeParameters()) { + left->getType() != right->getType()) { return false; } switch (op) { case EOpMul: case EOpMulAssign: - if (left->getType().isCoopMat() && right->getType().isCoopMat()) { + // Mul not supported in NV_cooperative_matrix + if (left->getType().isCoopMatNV() && right->getType().isCoopMatNV()) { return false; } - if (op == EOpMulAssign && right->getType().isCoopMat()) { + // NV_cooperative_matrix supports MulAssign is for mat*=scalar only. + // KHR_cooperative_matrix supports it for mat*=mat as well. + if (op == EOpMulAssign && right->getType().isCoopMatNV()) { return false; } - node.setOp(op == EOpMulAssign ? EOpMatrixTimesScalarAssign : EOpMatrixTimesScalar); + // Use MatrixTimesScalar if either operand is not a matrix. Otherwise use Mul. + if (!left->getType().isCoopMat() || !right->getType().isCoopMat()) { + node.setOp(op == EOpMulAssign ? EOpMatrixTimesScalarAssign : EOpMatrixTimesScalar); + } + // In case of scalar*matrix, take the result type from the matrix. if (right->getType().isCoopMat()) { node.setType(right->getType()); } @@ -3887,16 +3860,6 @@ TIntermTyped* TIntermediate::promoteConstantUnion(TBasicType promoteTo, TIntermC #define PROMOTE(Set, CType, Get) leftUnionArray[i].Set(static_cast(rightUnionArray[i].Get())) #define PROMOTE_TO_BOOL(Get) leftUnionArray[i].setBConst(rightUnionArray[i].Get() != 0) -#ifdef GLSLANG_WEB -#define TO_ALL(Get) \ - switch (promoteTo) { \ - case EbtFloat: PROMOTE(setDConst, double, Get); break; \ - case EbtInt: PROMOTE(setIConst, int, Get); break; \ - case EbtUint: PROMOTE(setUConst, unsigned int, Get); break; \ - case EbtBool: PROMOTE_TO_BOOL(Get); break; \ - default: return node; \ - } -#else #define TO_ALL(Get) \ switch (promoteTo) { \ case EbtFloat16: PROMOTE(setDConst, double, Get); break; \ @@ -3913,14 +3876,12 @@ TIntermTyped* TIntermediate::promoteConstantUnion(TBasicType promoteTo, TIntermC case EbtBool: PROMOTE_TO_BOOL(Get); break; \ default: return node; \ } -#endif switch (node->getType().getBasicType()) { case EbtFloat: TO_ALL(getDConst); break; case EbtInt: TO_ALL(getIConst); break; case EbtUint: TO_ALL(getUConst); break; case EbtBool: TO_ALL(getBConst); break; -#ifndef GLSLANG_WEB case EbtFloat16: TO_ALL(getDConst); break; case EbtDouble: TO_ALL(getDConst); break; case EbtInt8: TO_ALL(getI8Const); break; @@ -3929,7 +3890,6 @@ TIntermTyped* TIntermediate::promoteConstantUnion(TBasicType promoteTo, TIntermC case EbtUint8: TO_ALL(getU8Const); break; case EbtUint16: TO_ALL(getU16Const); break; case EbtUint64: TO_ALL(getU64Const); break; -#endif default: return node; } } diff --git a/glslang/MachineIndependent/ParseContextBase.cpp b/glslang/MachineIndependent/ParseContextBase.cpp index 616580f993..d73f403b80 100644 --- a/glslang/MachineIndependent/ParseContextBase.cpp +++ b/glslang/MachineIndependent/ParseContextBase.cpp @@ -67,8 +67,6 @@ void TParseContextBase::outputMessage(const TSourceLoc& loc, const char* szReaso } } -#if !defined(GLSLANG_WEB) || defined(GLSLANG_WEB_DEVEL) - void C_DECL TParseContextBase::error(const TSourceLoc& loc, const char* szReason, const char* szToken, const char* szExtraInfoFormat, ...) { @@ -118,8 +116,6 @@ void C_DECL TParseContextBase::ppWarn(const TSourceLoc& loc, const char* szReaso va_end(args); } -#endif - // // Both test and if necessary, spit out an error, to see if the node is really // an l-value that can be operated on this way. @@ -140,7 +136,6 @@ bool TParseContextBase::lValueErrorCheck(const TSourceLoc& loc, const char* op, case EvqConst: message = "can't modify a const"; break; case EvqConstReadOnly: message = "can't modify a const"; break; case EvqUniform: message = "can't modify a uniform"; break; -#ifndef GLSLANG_WEB case EvqBuffer: if (node->getQualifier().isReadOnly()) message = "can't modify a readonly buffer"; @@ -151,7 +146,6 @@ bool TParseContextBase::lValueErrorCheck(const TSourceLoc& loc, const char* op, if (language != EShLangIntersect) message = "cannot modify hitAttributeNV in this stage"; break; -#endif default: // @@ -159,12 +153,12 @@ bool TParseContextBase::lValueErrorCheck(const TSourceLoc& loc, const char* op, // switch (node->getBasicType()) { case EbtSampler: - message = "can't modify a sampler"; + if (extensionTurnedOn(E_GL_ARB_bindless_texture) == false) + message = "can't modify a sampler"; break; case EbtVoid: message = "can't modify void"; break; -#ifndef GLSLANG_WEB case EbtAtomicUint: message = "can't modify an atomic_uint"; break; @@ -174,7 +168,9 @@ bool TParseContextBase::lValueErrorCheck(const TSourceLoc& loc, const char* op, case EbtRayQuery: message = "can't modify rayQueryEXT"; break; -#endif + case EbtHitObjectNV: + message = "can't modify hitObjectNV"; + break; default: break; } @@ -231,12 +227,12 @@ bool TParseContextBase::lValueErrorCheck(const TSourceLoc& loc, const char* op, // Test for and give an error if the node can't be read from. void TParseContextBase::rValueErrorCheck(const TSourceLoc& loc, const char* op, TIntermTyped* node) { - TIntermBinary* binaryNode = node->getAsBinaryNode(); - const TIntermSymbol* symNode = node->getAsSymbolNode(); - if (! node) return; + TIntermBinary* binaryNode = node->getAsBinaryNode(); + const TIntermSymbol* symNode = node->getAsSymbolNode(); + if (node->getQualifier().isWriteOnly()) { const TIntermTyped* leftMostTypeNode = TIntermediate::findLValueBase(node, true); diff --git a/glslang/MachineIndependent/ParseHelper.cpp b/glslang/MachineIndependent/ParseHelper.cpp index e6e3db8bc3..592e9aa8ad 100644 --- a/glslang/MachineIndependent/ParseHelper.cpp +++ b/glslang/MachineIndependent/ParseHelper.cpp @@ -38,6 +38,7 @@ // #include "ParseHelper.h" +#include "Initialize.h" #include "Scan.h" #include "../OSDependent/osinclude.h" @@ -57,11 +58,8 @@ TParseContext::TParseContext(TSymbolTable& symbolTable, TIntermediate& interm, b infoSink, forwardCompatible, messages, entryPoint), inMain(false), blockName(nullptr), - limits(resources.limits) -#ifndef GLSLANG_WEB - , + limits(resources.limits), atomicUintOffsets(nullptr), anyIndexLimits(false) -#endif { // decide whether precision qualifiers should be ignored or respected if (isEsProfile() || spvVersion.vulkan > 0) { @@ -80,10 +78,6 @@ TParseContext::TParseContext(TSymbolTable& symbolTable, TIntermediate& interm, b globalBufferDefaults.layoutMatrix = ElmColumnMajor; globalBufferDefaults.layoutPacking = spvVersion.spv != 0 ? ElpStd430 : ElpShared; - // use storage buffer on SPIR-V 1.3 and up - if (spvVersion.spv >= EShTargetSpv_1_3) - intermediate.setUseStorageBuffer(); - globalInputDefaults.clear(); globalOutputDefaults.clear(); @@ -91,7 +85,6 @@ TParseContext::TParseContext(TSymbolTable& symbolTable, TIntermediate& interm, b globalSharedDefaults.layoutMatrix = ElmColumnMajor; globalSharedDefaults.layoutPacking = ElpStd430; -#ifndef GLSLANG_WEB // "Shaders in the transform // feedback capturing mode have an initial global default of // layout(xfb_buffer = 0) out;" @@ -103,7 +96,6 @@ TParseContext::TParseContext(TSymbolTable& symbolTable, TIntermediate& interm, b if (language == EShLangGeometry) globalOutputDefaults.layoutStream = 0; -#endif if (entryPoint != nullptr && entryPoint->size() > 0 && *entryPoint != "main") infoSink.info.message(EPrefixError, "Source entry point must be \"main\""); @@ -111,9 +103,7 @@ TParseContext::TParseContext(TSymbolTable& symbolTable, TIntermediate& interm, b TParseContext::~TParseContext() { -#ifndef GLSLANG_WEB delete [] atomicUintOffsets; -#endif } // Set up all default precisions as needed by the current environment. @@ -177,7 +167,6 @@ void TParseContext::setLimits(const TBuiltInResource& r) resources = r; intermediate.setLimits(r); -#ifndef GLSLANG_WEB anyIndexLimits = ! limits.generalAttributeMatrixVectorIndexing || ! limits.generalConstantMatrixVectorIndexing || ! limits.generalSamplerIndexing || @@ -192,7 +181,6 @@ void TParseContext::setLimits(const TBuiltInResource& r) atomicUintOffsets = new int[resources.maxAtomicCounterBindings]; for (int b = 0; b < resources.maxAtomicCounterBindings; ++b) atomicUintOffsets[b] = 0; -#endif } // @@ -339,7 +327,6 @@ void TParseContext::setInvariant(const TSourceLoc& loc, const char* builtin) { void TParseContext::handlePragma(const TSourceLoc& loc, const TVector& tokens) { -#ifndef GLSLANG_WEB if (pragmaCallback) pragmaCallback(loc.line, tokens); @@ -441,7 +428,6 @@ void TParseContext::handlePragma(const TSourceLoc& loc, const TVector& setInvariant(loc, "gl_FragColor"); setInvariant(loc, "gl_FragData"); } -#endif } // @@ -455,7 +441,6 @@ TIntermTyped* TParseContext::handleVariable(const TSourceLoc& loc, TSymbol* symb if (symbol && symbol->getNumExtensions()) requireExtensions(loc, symbol->getNumExtensions(), symbol->getExtensions(), symbol->getName().c_str()); -#ifndef GLSLANG_WEB if (symbol && symbol->isReadOnly()) { // All shared things containing an unsized array must be copied up // on first use, so that all future references will share its array structure, @@ -475,7 +460,6 @@ TIntermTyped* TParseContext::handleVariable(const TSourceLoc& loc, TSymbol* symb makeEditable(symbol); } } -#endif const TVariable* variable; const TAnonMember* anon = symbol ? symbol->getAsAnonMember() : nullptr; @@ -502,6 +486,16 @@ TIntermTyped* TParseContext::handleVariable(const TSourceLoc& loc, TSymbol* symb error(loc, "cannot be used (maybe an instance name is needed)", string->c_str(), ""); variable = nullptr; } + + if (language == EShLangMesh && variable) { + TLayoutGeometry primitiveType = intermediate.getOutputPrimitive(); + if ((variable->getMangledName() == "gl_PrimitiveTriangleIndicesEXT" && primitiveType != ElgTriangles) || + (variable->getMangledName() == "gl_PrimitiveLineIndicesEXT" && primitiveType != ElgLines) || + (variable->getMangledName() == "gl_PrimitivePointIndicesEXT" && primitiveType != ElgPoints)) { + error(loc, "cannot be used (ouput primitive type mismatch)", string->c_str(), ""); + variable = nullptr; + } + } } else { if (symbol) error(loc, "variable name expected", string->c_str(), ""); @@ -570,7 +564,6 @@ TIntermTyped* TParseContext::handleBracketDereference(const TSourceLoc& loc, TIn // at least one of base and index is not a front-end constant variable... TIntermTyped* result = nullptr; -#ifndef GLSLANG_WEB if (base->isReference() && ! base->isArray()) { requireExtensions(loc, 1, &E_GL_EXT_buffer_reference2, "buffer reference indexing"); if (base->getType().getReferentType()->containsUnsizedArray()) { @@ -589,15 +582,22 @@ TIntermTyped* TParseContext::handleBracketDereference(const TSourceLoc& loc, TIn } if (base->getAsSymbolNode() && isIoResizeArray(base->getType())) handleIoResizeArrayAccess(loc, base); -#endif if (index->getQualifier().isFrontEndConstant()) checkIndex(loc, base->getType(), indexValue); if (index->getQualifier().isFrontEndConstant()) { -#ifndef GLSLANG_WEB if (base->getType().isUnsizedArray()) { base->getWritableType().updateImplicitArraySize(indexValue + 1); + base->getWritableType().setImplicitlySized(true); + if (base->getQualifier().builtIn == EbvClipDistance && + indexValue >= resources.maxClipDistances) { + error(loc, "gl_ClipDistance", "[", "array index out of range '%d'", indexValue); + } + else if (base->getQualifier().builtIn == EbvCullDistance && + indexValue >= resources.maxCullDistances) { + error(loc, "gl_CullDistance", "[", "array index out of range '%d'", indexValue); + } // For 2D per-view builtin arrays, update the inner dimension size in parent type if (base->getQualifier().isPerView() && base->getQualifier().builtIn != EbvNone) { TIntermBinary* binaryNode = base->getAsBinaryNode(); @@ -609,11 +609,9 @@ TIntermTyped* TParseContext::handleBracketDereference(const TSourceLoc& loc, TIn } } } else -#endif checkIndex(loc, base->getType(), indexValue); result = intermediate.addIndex(EOpIndexDirect, base, index, loc); } else { -#ifndef GLSLANG_WEB if (base->getType().isUnsizedArray()) { // we have a variable index into an unsized array, which is okay, // depending on the situation @@ -625,7 +623,6 @@ TIntermTyped* TParseContext::handleBracketDereference(const TSourceLoc& loc, TIn } base->getWritableType().setArrayVariablyIndexed(); } -#endif if (base->getBasicType() == EbtBlock) { if (base->getQualifier().storage == EvqBuffer) requireProfile(base->getLoc(), ~EEsProfile, "variable indexing buffer block array"); @@ -661,7 +658,6 @@ TIntermTyped* TParseContext::handleBracketDereference(const TSourceLoc& loc, TIn } result->setType(newType); -#ifndef GLSLANG_WEB inheritMemoryQualifiers(base->getQualifier(), result->getWritableType().getQualifier()); // Propagate nonuniform @@ -670,13 +666,10 @@ TIntermTyped* TParseContext::handleBracketDereference(const TSourceLoc& loc, TIn if (anyIndexLimits) handleIndexLimits(loc, base, index); -#endif return result; } -#ifndef GLSLANG_WEB - // for ES 2.0 (version 100) limitations for almost all index operations except vertex-shader uniforms void TParseContext::handleIndexLimits(const TSourceLoc& /*loc*/, TIntermTyped* base, TIntermTyped* index) { @@ -717,7 +710,7 @@ bool TParseContext::isIoResizeArray(const TType& type) const ! type.getQualifier().patch) || (language == EShLangFragment && type.getQualifier().storage == EvqVaryingIn && (type.getQualifier().pervertexNV || type.getQualifier().pervertexEXT)) || - (language == EShLangMeshNV && type.getQualifier().storage == EvqVaryingOut && + (language == EShLangMesh && type.getQualifier().storage == EvqVaryingOut && !type.getQualifier().perTaskNV)); } @@ -794,7 +787,7 @@ void TParseContext::checkIoArraysConsistency(const TSourceLoc &loc, bool tailOnl // As I/O array sizes don't change, fetch requiredSize only once, // except for mesh shaders which could have different I/O array sizes based on type qualifiers. - if (firstIteration || (language == EShLangMeshNV)) { + if (firstIteration || (language == EShLangMesh)) { requiredSize = getIoArrayImplicitSize(type.getQualifier(), &featureString); if (requiredSize == 0) break; @@ -823,7 +816,7 @@ int TParseContext::getIoArrayImplicitSize(const TQualifier &qualifier, TString * // Number of vertices for Fragment shader is always three. expectedSize = 3; str = "vertices"; - } else if (language == EShLangMeshNV) { + } else if (language == EShLangMesh) { unsigned int maxPrimitives = intermediate.getPrimitives() != TQualifier::layoutNotSet ? intermediate.getPrimitives() : 0; if (qualifier.builtIn == EbvPrimitiveIndicesNV) { @@ -831,6 +824,11 @@ int TParseContext::getIoArrayImplicitSize(const TQualifier &qualifier, TString * str = "max_primitives*"; str += TQualifier::getGeometryString(intermediate.getOutputPrimitive()); } + else if (qualifier.builtIn == EbvPrimitiveTriangleIndicesEXT || qualifier.builtIn == EbvPrimitiveLineIndicesEXT || + qualifier.builtIn == EbvPrimitivePointIndicesEXT) { + expectedSize = maxPrimitives; + str = "max_primitives"; + } else if (qualifier.isPerPrimitive()) { expectedSize = maxPrimitives; str = "max_primitives"; @@ -858,15 +856,13 @@ void TParseContext::checkIoArrayConsistency(const TSourceLoc& loc, int requiredS if (type.getOuterArraySize() > requiredSize) error(loc, " cannot be greater than 3 for pervertexEXT", feature, name.c_str()); } - else if (language == EShLangMeshNV) + else if (language == EShLangMesh) error(loc, "inconsistent output array size of", feature, name.c_str()); else assert(0); } } -#endif // GLSLANG_WEB - // Handle seeing a binary node with a math operation. // Returns nullptr if not semantically allowed. TIntermTyped* TParseContext::handleBinaryMath(const TSourceLoc& loc, const char* str, TOperator op, TIntermTyped* left, TIntermTyped* right) @@ -1011,14 +1007,22 @@ TIntermTyped* TParseContext::handleDotDereference(const TSourceLoc& loc, TInterm inheritMemoryQualifiers(base->getQualifier(), result->getWritableType().getQualifier()); } else { auto baseSymbol = base; - while (baseSymbol->getAsSymbolNode() == nullptr) - baseSymbol = baseSymbol->getAsBinaryNode()->getLeft(); - TString structName; - structName.append("\'").append(baseSymbol->getAsSymbolNode()->getName().c_str()).append( "\'"); - error(loc, "no such field in structure", field.c_str(), structName.c_str()); + while (baseSymbol->getAsSymbolNode() == nullptr) { + auto binaryNode = baseSymbol->getAsBinaryNode(); + if (binaryNode == nullptr) break; + baseSymbol = binaryNode->getLeft(); + } + if (baseSymbol->getAsSymbolNode() != nullptr) { + TString structName; + structName.append("\'").append(baseSymbol->getAsSymbolNode()->getName().c_str()).append("\'"); + error(loc, "no such field in structure", field.c_str(), structName.c_str()); + } else { + error(loc, "no such field in structure", field.c_str(), ""); + } } } else - error(loc, "does not apply to this type:", field.c_str(), base->getType().getCompleteString(intermediate.getEnhancedMsgs()).c_str()); + error(loc, "does not apply to this type:", field.c_str(), + base->getType().getCompleteString(intermediate.getEnhancedMsgs()).c_str()); // Propagate noContraction up the dereference chain if (base->getQualifier().isNoContraction()) @@ -1137,7 +1141,6 @@ TFunction* TParseContext::handleFunctionDeclarator(const TSourceLoc& loc, TFunct TSymbol* symbol = symbolTable.find(function.getMangledName(), &builtIn); if (symbol && symbol->getAsFunction() && builtIn) requireProfile(loc, ~EEsProfile, "redefinition of built-in function"); -#ifndef GLSLANG_WEB // Check the validity of using spirv_literal qualifier for (int i = 0; i < function.getParamCount(); ++i) { if (function[i].type->getQualifier().isSpirvLiteral() && function.getBuiltInOp() != EOpSpirvInst) @@ -1149,19 +1152,16 @@ TFunction* TParseContext::handleFunctionDeclarator(const TSourceLoc& loc, TFunct // respect this redeclared one. if (symbol && builtIn && function.getBuiltInOp() == EOpSpirvInst) symbol = nullptr; -#endif - const TFunction* prevDec = symbol ? symbol->getAsFunction() : 0; + const TFunction* prevDec = symbol ? symbol->getAsFunction() : nullptr; if (prevDec) { if (prevDec->isPrototyped() && prototype) profileRequires(loc, EEsProfile, 300, nullptr, "multiple prototypes for same function"); if (prevDec->getType() != function.getType()) error(loc, "overloaded functions must have the same return type", function.getName().c_str(), ""); -#ifndef GLSLANG_WEB if (prevDec->getSpirvInstruction() != function.getSpirvInstruction()) { error(loc, "overloaded functions must have the same qualifiers", function.getName().c_str(), "spirv_instruction"); } -#endif for (int i = 0; i < prevDec->getParamCount(); ++i) { if ((*prevDec)[i].type->getQualifier().storage != function[i].type->getQualifier().storage) error(loc, "overloaded functions must have the same parameter storage qualifiers for argument", function[i].type->getStorageQualifierString(), "%d", i+1); @@ -1243,6 +1243,8 @@ TIntermAggregate* TParseContext::handleFunctionDefinition(const TSourceLoc& loc, error(loc, "function cannot take any parameter(s)", function.getName().c_str(), ""); if (function.getType().getBasicType() != EbtVoid) error(loc, "", function.getType().getBasicTypeString().c_str(), "entry point cannot return a value"); + if (function.getLinkType() != ELinkNone) + error(loc, "main function cannot be exported", "", ""); } // @@ -1279,6 +1281,7 @@ TIntermAggregate* TParseContext::handleFunctionDefinition(const TSourceLoc& loc, } else paramNodes = intermediate.growAggregate(paramNodes, intermediate.addSymbol(*param.type, loc), loc); } + paramNodes->setLinkType(function.getLinkType()); intermediate.setAggregateOperator(paramNodes, EOpParameters, TType(EbtVoid), loc); loopNestingLevel = 0; statementNestingLevel = 0; @@ -1363,7 +1366,6 @@ TIntermTyped* TParseContext::handleFunctionCall(const TSourceLoc& loc, TFunction if (lValueErrorCheck(arguments->getLoc(), "assign", arg->getAsTyped())) error(arguments->getLoc(), "Non-L-value cannot be passed for 'out' or 'inout' parameters.", "out", ""); } -#ifndef GLSLANG_WEB if (formalQualifier.isSpirvLiteral()) { if (!arg->getAsTyped()->getQualifier().isFrontEndConstant()) { error(arguments->getLoc(), @@ -1371,12 +1373,11 @@ TIntermTyped* TParseContext::handleFunctionCall(const TSourceLoc& loc, TFunction "spirv_literal", ""); } } -#endif const TType& argType = arg->getAsTyped()->getType(); const TQualifier& argQualifier = argType.getQualifier(); - if (argQualifier.isMemory() && (argType.containsOpaque() || argType.isReference())) { + bool containsBindlessSampler = intermediate.getBindlessMode() && argType.containsSampler(); + if (argQualifier.isMemory() && !containsBindlessSampler && (argType.containsOpaque() || argType.isReference())) { const char* message = "argument cannot drop memory qualifier when passed to formal parameter"; -#ifndef GLSLANG_WEB if (argQualifier.volatil && ! formalQualifier.volatil) error(arguments->getLoc(), message, "volatile", ""); if (argQualifier.coherent && ! (formalQualifier.devicecoherent || formalQualifier.coherent)) @@ -1396,7 +1397,6 @@ TIntermTyped* TParseContext::handleFunctionCall(const TSourceLoc& loc, TFunction // Don't check 'restrict', it is different than the rest: // "...but only restrict can be taken away from a calling argument, by a formal parameter that // lacks the restrict qualifier..." -#endif } if (!builtIn && argQualifier.getFormat() != formalQualifier.getFormat()) { // we have mismatched formats, which should only be allowed if writeonly @@ -1426,11 +1426,9 @@ TIntermTyped* TParseContext::handleFunctionCall(const TSourceLoc& loc, TFunction if (builtIn && fnCandidate->getBuiltInOp() != EOpNull) { // A function call mapped to a built-in operation. result = handleBuiltInFunctionCall(loc, arguments, *fnCandidate); -#ifndef GLSLANG_WEB } else if (fnCandidate->getBuiltInOp() == EOpSpirvInst) { // When SPIR-V instruction qualifier is specified, the function call is still mapped to a built-in operation. result = handleBuiltInFunctionCall(loc, arguments, *fnCandidate); -#endif } else { // This is a function call not mapped to built-in operator. // It could still be a built-in function, but only if PureOperatorBuiltins == false. @@ -1450,11 +1448,9 @@ TIntermTyped* TParseContext::handleFunctionCall(const TSourceLoc& loc, TFunction intermediate.addToCallGraph(infoSink, currentCaller, fnCandidate->getMangledName()); } -#ifndef GLSLANG_WEB if (builtIn) nonOpBuiltInCheck(loc, *fnCandidate, *call); else -#endif userFunctionCallCheck(loc, *call); } @@ -1472,7 +1468,8 @@ TIntermTyped* TParseContext::handleFunctionCall(const TSourceLoc& loc, TFunction if (result->getAsTyped()->getType().isCoopMat() && !result->getAsTyped()->getType().isParameterized()) { - assert(fnCandidate->getBuiltInOp() == EOpCooperativeMatrixMulAdd); + assert(fnCandidate->getBuiltInOp() == EOpCooperativeMatrixMulAdd || + fnCandidate->getBuiltInOp() == EOpCooperativeMatrixMulAddNV); result->setType(result->getAsAggregate()->getSequence()[2]->getAsTyped()->getType()); } @@ -1508,7 +1505,6 @@ TIntermTyped* TParseContext::handleBuiltInFunctionCall(TSourceLoc loc, TIntermNo } else if (result->getAsOperator()) builtInOpCheck(loc, function, *result->getAsOperator()); -#ifndef GLSLANG_WEB // Special handling for function call with SPIR-V instruction qualifier specified if (function.getBuiltInOp() == EOpSpirvInst) { if (auto agg = result->getAsAggregate()) { @@ -1535,7 +1531,6 @@ TIntermTyped* TParseContext::handleBuiltInFunctionCall(TSourceLoc loc, TIntermNo } else assert(0); } -#endif return result; } @@ -1638,9 +1633,7 @@ void TParseContext::computeBuiltinPrecisions(TIntermTyped& node, const TFunction TIntermNode* TParseContext::handleReturnValue(const TSourceLoc& loc, TIntermTyped* value) { -#ifndef GLSLANG_WEB storage16BitAssignmentCheck(loc, value->getType(), "return"); -#endif functionReturnsValue = true; TIntermBranch* branch = nullptr; @@ -1660,9 +1653,13 @@ TIntermNode* TParseContext::handleReturnValue(const TSourceLoc& loc, TIntermType error(loc, "type does not match, or is not convertible to, the function's return type", "return", ""); branch = intermediate.addBranch(EOpReturn, value, loc); } - } else + } else { + if (value->getType().isTexture() || value->getType().isImage()) { + if (!extensionTurnedOn(E_GL_ARB_bindless_texture)) + error(loc, "sampler or image can be used as return type only when the extension GL_ARB_bindless_texture enabled", "return", ""); + } branch = intermediate.addBranch(EOpReturn, value, loc); - + } branch->updatePrecision(currentFunctionType->getQualifier().precision); return branch; } @@ -1670,7 +1667,6 @@ TIntermNode* TParseContext::handleReturnValue(const TSourceLoc& loc, TIntermType // See if the operation is being done in an illegal location. void TParseContext::checkLocation(const TSourceLoc& loc, TOperator op) { -#ifndef GLSLANG_WEB switch (op) { case EOpBarrier: if (language == EShLangTessControl) { @@ -1723,7 +1719,6 @@ void TParseContext::checkLocation(const TSourceLoc& loc, TOperator op) default: break; } -#endif } // Finish processing object.length(). This started earlier in handleDotDereference(), where @@ -1741,7 +1736,6 @@ TIntermTyped* TParseContext::handleLengthMethod(const TSourceLoc& loc, TFunction const TType& type = intermNode->getAsTyped()->getType(); if (type.isArray()) { if (type.isUnsizedArray()) { -#ifndef GLSLANG_WEB if (intermNode->getAsSymbolNode() && isIoResizeArray(type)) { // We could be between a layout declaration that gives a built-in io array implicit size and // a user redeclaration of that array, meaning we have to substitute its implicit size here @@ -1753,16 +1747,13 @@ TIntermTyped* TParseContext::handleLengthMethod(const TSourceLoc& loc, TFunction length = getIoArrayImplicitSize(type.getQualifier()); } } -#endif if (length == 0) { -#ifndef GLSLANG_WEB if (intermNode->getAsSymbolNode() && isIoResizeArray(type)) error(loc, "", function->getName().c_str(), "array must first be sized by a redeclaration or layout qualifier"); else if (isRuntimeLength(*intermNode->getAsTyped())) { // Create a unary op and let the back end handle it return intermediate.addBuiltInFunctionCall(loc, EOpArrayLength, true, intermNode, TType(EbtInt)); } else -#endif error(loc, "", function->getName().c_str(), "array must be declared with a size before using this method"); } } else if (type.getOuterArrayNode()) { @@ -1795,7 +1786,6 @@ TIntermTyped* TParseContext::handleLengthMethod(const TSourceLoc& loc, TFunction // void TParseContext::addInputArgumentConversions(const TFunction& function, TIntermNode*& arguments) const { -#ifndef GLSLANG_WEB TIntermAggregate* aggregate = arguments->getAsAggregate(); // Process each argument's conversion @@ -1823,7 +1813,6 @@ void TParseContext::addInputArgumentConversions(const TFunction& function, TInte } } } -#endif } // @@ -1835,9 +1824,6 @@ void TParseContext::addInputArgumentConversions(const TFunction& function, TInte // TIntermTyped* TParseContext::addOutputArgumentConversions(const TFunction& function, TIntermAggregate& intermNode) const { -#ifdef GLSLANG_WEB - return &intermNode; -#else TIntermSequence& arguments = intermNode.getSequence(); // Will there be any output conversions? @@ -1905,7 +1891,6 @@ TIntermTyped* TParseContext::addOutputArgumentConversions(const TFunction& funct conversionTree = intermediate.setAggregateOperator(conversionTree, EOpComma, intermNode.getType(), intermNode.getLoc()); return conversionTree; -#endif } TIntermTyped* TParseContext::addAssign(const TSourceLoc& loc, TOperator op, TIntermTyped* left, TIntermTyped* right) @@ -1913,6 +1898,9 @@ TIntermTyped* TParseContext::addAssign(const TSourceLoc& loc, TOperator op, TInt if ((op == EOpAddAssign || op == EOpSubAssign) && left->isReference()) requireExtensions(loc, 1, &E_GL_EXT_buffer_reference2, "+= and -= on a buffer reference"); + if (op == EOpAssign && left->getBasicType() == EbtSampler && right->getBasicType() == EbtSampler) + requireExtensions(loc, 1, &E_GL_ARB_bindless_texture, "sampler assignment for bindless texture"); + return intermediate.addAssign(op, left, right, loc); } @@ -2000,18 +1988,18 @@ void TParseContext::memorySemanticsCheck(const TSourceLoc& loc, const TFunction& break; } - if ((semantics & gl_SemanticsAcquire) && + if ((semantics & gl_SemanticsAcquire) && (callNode.getOp() == EOpAtomicStore || callNode.getOp() == EOpImageAtomicStore)) { error(loc, "gl_SemanticsAcquire must not be used with (image) atomic store", fnCandidate.getName().c_str(), ""); } - if ((semantics & gl_SemanticsRelease) && + if ((semantics & gl_SemanticsRelease) && (callNode.getOp() == EOpAtomicLoad || callNode.getOp() == EOpImageAtomicLoad)) { error(loc, "gl_SemanticsRelease must not be used with (image) atomic load", fnCandidate.getName().c_str(), ""); } - if ((semantics & gl_SemanticsAcquireRelease) && - (callNode.getOp() == EOpAtomicStore || callNode.getOp() == EOpImageAtomicStore || + if ((semantics & gl_SemanticsAcquireRelease) && + (callNode.getOp() == EOpAtomicStore || callNode.getOp() == EOpImageAtomicStore || callNode.getOp() == EOpAtomicLoad || callNode.getOp() == EOpImageAtomicLoad)) { error(loc, "gl_SemanticsAcquireRelease must not be used with (image) atomic load/store", fnCandidate.getName().c_str(), ""); @@ -2112,7 +2100,6 @@ void TParseContext::builtInOpCheck(const TSourceLoc& loc, const TFunction& fnCan TString featureString; const char* feature = nullptr; switch (callNode.getOp()) { -#ifndef GLSLANG_WEB case EOpTextureGather: case EOpTextureGatherOffset: case EOpTextureGatherOffsets: @@ -2185,6 +2172,37 @@ void TParseContext::builtInOpCheck(const TSourceLoc& loc, const TFunction& fnCan } break; } + + case EOpTexture: + case EOpTextureLod: + { + if ((fnCandidate.getParamCount() > 2) && ((*argp)[1]->getAsTyped()->getType().getBasicType() == EbtFloat) && + ((*argp)[1]->getAsTyped()->getType().getVectorSize() == 4) && fnCandidate[0].type->getSampler().shadow) { + featureString = fnCandidate.getName(); + if (callNode.getOp() == EOpTexture) + featureString += "(..., float bias)"; + else + featureString += "(..., float lod)"; + feature = featureString.c_str(); + + if ((fnCandidate[0].type->getSampler().dim == Esd2D && fnCandidate[0].type->getSampler().arrayed) || //2D Array Shadow + (fnCandidate[0].type->getSampler().dim == EsdCube && fnCandidate[0].type->getSampler().arrayed && fnCandidate.getParamCount() > 3) || // Cube Array Shadow + (fnCandidate[0].type->getSampler().dim == EsdCube && callNode.getOp() == EOpTextureLod)) { // Cube Shadow + requireExtensions(loc, 1, &E_GL_EXT_texture_shadow_lod, feature); + if (isEsProfile()) { + if (version < 320 && + !extensionsTurnedOn(Num_AEP_texture_cube_map_array, AEP_texture_cube_map_array)) + error(loc, "GL_EXT_texture_shadow_lod not supported for this ES version", feature, ""); + else + profileRequires(loc, EEsProfile, 320, nullptr, feature); + } else { // Desktop + profileRequires(loc, ~EEsProfile, 130, nullptr, feature); + } + } + } + break; + } + case EOpSparseTextureGather: case EOpSparseTextureGatherOffset: case EOpSparseTextureGatherOffsets: @@ -2253,7 +2271,6 @@ void TParseContext::builtInOpCheck(const TSourceLoc& loc, const TFunction& fnCan break; } -#endif case EOpTextureOffset: case EOpTextureFetchOffset: @@ -2281,12 +2298,10 @@ void TParseContext::builtInOpCheck(const TSourceLoc& loc, const TFunction& fnCan if (arg > 0) { -#ifndef GLSLANG_WEB bool f16ShadowCompare = (*argp)[1]->getAsTyped()->getBasicType() == EbtFloat16 && arg0->getType().getSampler().shadow; if (f16ShadowCompare) ++arg; -#endif if (! (*argp)[arg]->getAsTyped()->getQualifier().isConstant()) error(loc, "argument must be compile-time constant", "texel offset", ""); else if ((*argp)[arg]->getAsConstantUnion()) { @@ -2302,18 +2317,41 @@ void TParseContext::builtInOpCheck(const TSourceLoc& loc, const TFunction& fnCan if (callNode.getOp() == EOpTextureOffset) { TSampler s = arg0->getType().getSampler(); if (s.is2D() && s.isArrayed() && s.isShadow()) { - if (isEsProfile()) + if ( + ((*argp)[1]->getAsTyped()->getType().getBasicType() == EbtFloat) && + ((*argp)[1]->getAsTyped()->getType().getVectorSize() == 4) && + (fnCandidate.getParamCount() == 4)) { + featureString = fnCandidate.getName() + " for sampler2DArrayShadow"; + feature = featureString.c_str(); + requireExtensions(loc, 1, &E_GL_EXT_texture_shadow_lod, feature); + profileRequires(loc, EEsProfile, 300, nullptr, feature); + profileRequires(loc, ~EEsProfile, 130, nullptr, feature); + } + else if (isEsProfile()) error(loc, "TextureOffset does not support sampler2DArrayShadow : ", "sampler", "ES Profile"); else if (version <= 420) error(loc, "TextureOffset does not support sampler2DArrayShadow : ", "sampler", "version <= 420"); } } + + if (callNode.getOp() == EOpTextureLodOffset) { + TSampler s = arg0->getType().getSampler(); + if (s.is2D() && s.isArrayed() && s.isShadow() && + ((*argp)[1]->getAsTyped()->getType().getBasicType() == EbtFloat) && + ((*argp)[1]->getAsTyped()->getType().getVectorSize() == 4) && + (fnCandidate.getParamCount() == 4)) { + featureString = fnCandidate.getName() + " for sampler2DArrayShadow"; + feature = featureString.c_str(); + profileRequires(loc, EEsProfile, 300, nullptr, feature); + profileRequires(loc, ~EEsProfile, 130, nullptr, feature); + requireExtensions(loc, 1, &E_GL_EXT_texture_shadow_lod, feature); + } + } } break; } -#ifndef GLSLANG_WEB case EOpTraceNV: if (!(*argp)[10]->getAsConstantUnion()) error(loc, "argument must be compile-time constant", "payload number", "a"); @@ -2345,6 +2383,79 @@ void TParseContext::builtInOpCheck(const TSourceLoc& loc, const TFunction& fnCan } break; + case EOpHitObjectTraceRayNV: + if (!(*argp)[11]->getAsConstantUnion()) + error(loc, "argument must be compile-time constant", "payload number", ""); + else { + unsigned int location = (*argp)[11]->getAsConstantUnion()->getAsConstantUnion()->getConstArray()[0].getUConst(); + if (!extensionTurnedOn(E_GL_EXT_spirv_intrinsics) && intermediate.checkLocationRT(0, location) < 0) + error(loc, "with layout(location =", "no rayPayloadEXT/rayPayloadInEXT declared", "%d)", location); + } + break; + case EOpHitObjectTraceRayMotionNV: + if (!(*argp)[12]->getAsConstantUnion()) + error(loc, "argument must be compile-time constant", "payload number", ""); + else { + unsigned int location = (*argp)[12]->getAsConstantUnion()->getAsConstantUnion()->getConstArray()[0].getUConst(); + if (!extensionTurnedOn(E_GL_EXT_spirv_intrinsics) && intermediate.checkLocationRT(0, location) < 0) + error(loc, "with layout(location =", "no rayPayloadEXT/rayPayloadInEXT declared", "%d)", location); + } + break; + case EOpHitObjectExecuteShaderNV: + if (!(*argp)[1]->getAsConstantUnion()) + error(loc, "argument must be compile-time constant", "payload number", ""); + else { + unsigned int location = (*argp)[1]->getAsConstantUnion()->getAsConstantUnion()->getConstArray()[0].getUConst(); + if (!extensionTurnedOn(E_GL_EXT_spirv_intrinsics) && intermediate.checkLocationRT(0, location) < 0) + error(loc, "with layout(location =", "no rayPayloadEXT/rayPayloadInEXT declared", "%d)", location); + } + break; + case EOpHitObjectRecordHitNV: + if (!(*argp)[12]->getAsConstantUnion()) + error(loc, "argument must be compile-time constant", "hitobjectattribute number", ""); + else { + unsigned int location = (*argp)[12]->getAsConstantUnion()->getAsConstantUnion()->getConstArray()[0].getUConst(); + if (!extensionTurnedOn(E_GL_EXT_spirv_intrinsics) && intermediate.checkLocationRT(2, location) < 0) + error(loc, "with layout(location =", "no hitObjectAttributeNV declared", "%d)", location); + } + break; + case EOpHitObjectRecordHitMotionNV: + if (!(*argp)[13]->getAsConstantUnion()) + error(loc, "argument must be compile-time constant", "hitobjectattribute number", ""); + else { + unsigned int location = (*argp)[13]->getAsConstantUnion()->getAsConstantUnion()->getConstArray()[0].getUConst(); + if (!extensionTurnedOn(E_GL_EXT_spirv_intrinsics) && intermediate.checkLocationRT(2, location) < 0) + error(loc, "with layout(location =", "no hitObjectAttributeNV declared", "%d)", location); + } + break; + case EOpHitObjectRecordHitWithIndexNV: + if (!(*argp)[11]->getAsConstantUnion()) + error(loc, "argument must be compile-time constant", "hitobjectattribute number", ""); + else { + unsigned int location = (*argp)[11]->getAsConstantUnion()->getAsConstantUnion()->getConstArray()[0].getUConst(); + if (!extensionTurnedOn(E_GL_EXT_spirv_intrinsics) && intermediate.checkLocationRT(2, location) < 0) + error(loc, "with layout(location =", "no hitObjectAttributeNV declared", "%d)", location); + } + break; + case EOpHitObjectRecordHitWithIndexMotionNV: + if (!(*argp)[12]->getAsConstantUnion()) + error(loc, "argument must be compile-time constant", "hitobjectattribute number", ""); + else { + unsigned int location = (*argp)[12]->getAsConstantUnion()->getAsConstantUnion()->getConstArray()[0].getUConst(); + if (!extensionTurnedOn(E_GL_EXT_spirv_intrinsics) && intermediate.checkLocationRT(2, location) < 0) + error(loc, "with layout(location =", "no hitObjectAttributeNV declared", "%d)", location); + } + break; + case EOpHitObjectGetAttributesNV: + if (!(*argp)[1]->getAsConstantUnion()) + error(loc, "argument must be compile-time constant", "hitobjectattribute number", ""); + else { + unsigned int location = (*argp)[1]->getAsConstantUnion()->getAsConstantUnion()->getConstArray()[0].getUConst(); + if (!extensionTurnedOn(E_GL_EXT_spirv_intrinsics) && intermediate.checkLocationRT(2, location) < 0) + error(loc, "with layout(location =", "no hitObjectAttributeNV declared", "%d)", location); + } + break; + case EOpRayQueryGetIntersectionType: case EOpRayQueryGetIntersectionT: case EOpRayQueryGetIntersectionInstanceCustomIndex: @@ -2358,6 +2469,7 @@ void TParseContext::builtInOpCheck(const TSourceLoc& loc, const TFunction& fnCan case EOpRayQueryGetIntersectionObjectRayOrigin: case EOpRayQueryGetIntersectionObjectToWorld: case EOpRayQueryGetIntersectionWorldToObject: + case EOpRayQueryGetIntersectionTriangleVertexPositionsEXT: if (!(*argp)[1]->getAsConstantUnion()) error(loc, "argument must be compile-time constant", "committed", ""); break; @@ -2460,11 +2572,18 @@ void TParseContext::builtInOpCheck(const TSourceLoc& loc, const TFunction& fnCan } const TIntermTyped* base = TIntermediate::findLValueBase(arg0, true , true); - const TType* refType = (base->getType().isReference()) ? base->getType().getReferentType() : nullptr; - const TQualifier& qualifier = (refType != nullptr) ? refType->getQualifier() : base->getType().getQualifier(); - if (qualifier.storage != EvqShared && qualifier.storage != EvqBuffer) - error(loc,"Atomic memory function can only be used for shader storage block member or shared variable.", - fnCandidate.getName().c_str(), ""); + const char* errMsg = "Only l-values corresponding to shader block storage or shared variables can be used with " + "atomic memory functions."; + if (base) { + const TType* refType = (base->getType().isReference()) ? base->getType().getReferentType() : nullptr; + const TQualifier& qualifier = + (refType != nullptr) ? refType->getQualifier() : base->getType().getQualifier(); + if (qualifier.storage != EvqShared && qualifier.storage != EvqBuffer && + qualifier.storage != EvqtaskPayloadSharedEXT) + error(loc, errMsg, fnCandidate.getName().c_str(), ""); + } else { + error(loc, errMsg, fnCandidate.getName().c_str(), ""); + } break; } @@ -2560,7 +2679,7 @@ void TParseContext::builtInOpCheck(const TSourceLoc& loc, const TFunction& fnCan } if (profile != EEsProfile && version < 450) { - if ((*argp)[0]->getAsTyped()->getBasicType() != EbtFloat && + if ((*argp)[0]->getAsTyped()->getBasicType() != EbtFloat && (*argp)[0]->getAsTyped()->getBasicType() != EbtDouble && (*argp)[1]->getAsTyped()->getBasicType() != EbtFloat && (*argp)[1]->getAsTyped()->getBasicType() != EbtDouble && @@ -2570,7 +2689,6 @@ void TParseContext::builtInOpCheck(const TSourceLoc& loc, const TFunction& fnCan } break; -#endif default: break; @@ -2633,9 +2751,6 @@ void TParseContext::builtInOpCheck(const TSourceLoc& loc, const TFunction& fnCan } } -#ifndef GLSLANG_WEB - -extern bool PureOperatorBuiltins; // Deprecated! Use PureOperatorBuiltins == true instead, in which case this // functionality is handled in builtInOpCheck() instead of here. @@ -2761,8 +2876,6 @@ void TParseContext::nonOpBuiltInCheck(const TSourceLoc& loc, const TFunction& fn } } -#endif - // // Do any extra checking for a user function call. // @@ -2796,6 +2909,14 @@ TFunction* TParseContext::handleConstructorCall(const TSourceLoc& loc, const TPu profileRequires(loc, EEsProfile, 300, nullptr, "arrayed constructor"); } + // Reuse EOpConstructTextureSampler for bindless image constructor + // uvec2 imgHandle; + // imageLoad(image1D(imgHandle), 0); + if (type.isImage() && extensionTurnedOn(E_GL_ARB_bindless_texture)) + { + intermediate.setBindlessImageMode(currentCaller, AstRefTypeFunc); + } + TOperator op = intermediate.mapTypeToConstructorOp(type); if (op == EOpNull) { @@ -2913,7 +3034,6 @@ bool TParseContext::lValueErrorCheck(const TSourceLoc& loc, const char* op, TInt bool errorReturn = false; switch(binaryNode->getOp()) { -#ifndef GLSLANG_WEB case EOpIndexDirect: case EOpIndexIndirect: // ... tessellation control shader ... @@ -2930,7 +3050,6 @@ bool TParseContext::lValueErrorCheck(const TSourceLoc& loc, const char* op, TInt } } break; // left node is checked by base class -#endif case EOpVectorSwizzle: errorReturn = lValueErrorCheck(loc, op, binaryNode->getLeft()); if (!errorReturn) { @@ -2995,6 +3114,10 @@ bool TParseContext::lValueErrorCheck(const TSourceLoc& loc, const char* op, TInt message = "can't modify EvqFragStencil if using early_fragment_tests"; break; + case EvqtaskPayloadSharedEXT: + if (language == EShLangMesh) + message = "can't modify variable with storage qualifier taskPayloadSharedEXT in mesh shaders"; + break; default: break; } @@ -3033,7 +3156,7 @@ void TParseContext::rValueErrorCheck(const TSourceLoc& loc, const char* op, TInt if (symNode && symNode->getQualifier().isExplicitInterpolation()) error(loc, "can't read from explicitly-interpolated object: ", op, symNode->getName().c_str()); - // local_size_{xyz} must be assigned or specialized before gl_WorkGroupSize can be assigned. + // local_size_{xyz} must be assigned or specialized before gl_WorkGroupSize can be assigned. if(node->getQualifier().builtIn == EbvWorkGroupSize && !(intermediate.isLocalSizeSet() || intermediate.isLocalSizeSpecialized())) error(loc, "can't read from gl_WorkGroupSize before a fixed workgroup size has been declared", op, ""); @@ -3121,7 +3244,7 @@ void TParseContext::reservedPpErrorCheck(const TSourceLoc& loc, const char* iden ppWarn(loc, "\"defined\" is (un)defined:", op, identifier); else ppError(loc, "\"defined\" can't be (un)defined:", op, identifier); - else if (strstr(identifier, "__") != 0 && !extensionTurnedOn(E_GL_EXT_spirv_intrinsics)) { + else if (strstr(identifier, "__") != nullptr && !extensionTurnedOn(E_GL_EXT_spirv_intrinsics)) { // The extension GL_EXT_spirv_intrinsics allows us to declare macros prefixed with "__". if (isEsProfile() && version >= 300 && (strcmp(identifier, "__LINE__") == 0 || @@ -3144,10 +3267,6 @@ void TParseContext::reservedPpErrorCheck(const TSourceLoc& loc, const char* iden // bool TParseContext::lineContinuationCheck(const TSourceLoc& loc, bool endOfComment) { -#ifdef GLSLANG_WEB - return true; -#endif - const char* message = "line continuation"; bool lineContinuationAllowed = (isEsProfile() && version >= 300) || @@ -3204,7 +3323,6 @@ bool TParseContext::constructorError(const TSourceLoc& loc, TIntermNode* node, T // it, in which case the type comes from the argument instead of from the // constructor function. switch (op) { -#ifndef GLSLANG_WEB case EOpConstructNonuniform: if (node != nullptr && node->getAsTyped() != nullptr) { type.shallowCopy(node->getAsTyped()->getType()); @@ -3212,7 +3330,6 @@ bool TParseContext::constructorError(const TSourceLoc& loc, TIntermNode* node, T type.getQualifier().nonUniform = true; } break; -#endif default: type.shallowCopy(function.getType()); break; @@ -3238,7 +3355,6 @@ bool TParseContext::constructorError(const TSourceLoc& loc, TIntermNode* node, T case EOpConstructMat4x2: case EOpConstructMat4x3: case EOpConstructMat4x4: -#ifndef GLSLANG_WEB case EOpConstructDMat2x2: case EOpConstructDMat2x3: case EOpConstructDMat2x4: @@ -3257,7 +3373,6 @@ bool TParseContext::constructorError(const TSourceLoc& loc, TIntermNode* node, T case EOpConstructF16Mat4x2: case EOpConstructF16Mat4x3: case EOpConstructF16Mat4x4: -#endif constructingMatrix = true; break; default: @@ -3324,7 +3439,6 @@ bool TParseContext::constructorError(const TSourceLoc& loc, TIntermNode* node, T if (op == EOpConstructNonuniform) constType = false; -#ifndef GLSLANG_WEB switch (op) { case EOpConstructFloat16: case EOpConstructF16Vec2: @@ -3364,7 +3478,6 @@ bool TParseContext::constructorError(const TSourceLoc& loc, TIntermNode* node, T default: break; } -#endif // inherit constness from children if (constType) { @@ -3385,7 +3498,6 @@ bool TParseContext::constructorError(const TSourceLoc& loc, TIntermNode* node, T case EOpConstructUVec2: case EOpConstructUVec3: case EOpConstructUVec4: -#ifndef GLSLANG_WEB case EOpConstructUint8: case EOpConstructInt16: case EOpConstructUint16: @@ -3409,7 +3521,6 @@ bool TParseContext::constructorError(const TSourceLoc& loc, TIntermNode* node, T case EOpConstructU64Vec2: case EOpConstructU64Vec3: case EOpConstructU64Vec4: -#endif // This was the list of valid ones, if they aren't converting from float // and aren't making an array. makeSpecConst = ! floatArgument && ! type.isArray(); @@ -3520,13 +3631,24 @@ bool TParseContext::constructorError(const TSourceLoc& loc, TIntermNode* node, T } TIntermTyped* typed = node->getAsTyped(); + if (type.isCoopMat() && typed->getType().isCoopMat() && + !type.sameCoopMatShapeAndUse(typed->getType())) { + error(loc, "Cooperative matrix type parameters mismatch", constructorString.c_str(), ""); + return true; + } + if (typed == nullptr) { error(loc, "constructor argument does not have a type", constructorString.c_str(), ""); return true; } if (op != EOpConstructStruct && op != EOpConstructNonuniform && typed->getBasicType() == EbtSampler) { - error(loc, "cannot convert a sampler", constructorString.c_str(), ""); - return true; + if (op == EOpConstructUVec2 && extensionTurnedOn(E_GL_ARB_bindless_texture)) { + intermediate.setBindlessTextureMode(currentCaller, AstRefTypeFunc); + } + else { + error(loc, "cannot convert a sampler", constructorString.c_str(), ""); + return true; + } } if (op != EOpConstructStruct && typed->isAtomic()) { error(loc, "cannot convert an atomic_uint", constructorString.c_str(), ""); @@ -3546,6 +3668,26 @@ bool TParseContext::constructorTextureSamplerError(const TSourceLoc& loc, const { TString constructorName = function.getType().getBasicTypeString(); // TODO: performance: should not be making copy; interface needs to change const char* token = constructorName.c_str(); + // verify the constructor for bindless texture, the input must be ivec2 or uvec2 + if (function.getParamCount() == 1) { + TType* pType = function[0].type; + TBasicType basicType = pType->getBasicType(); + bool isIntegerVec2 = ((basicType == EbtUint || basicType == EbtInt) && pType->getVectorSize() == 2); + bool bindlessMode = extensionTurnedOn(E_GL_ARB_bindless_texture); + if (isIntegerVec2 && bindlessMode) { + if (pType->getSampler().isImage()) + intermediate.setBindlessImageMode(currentCaller, AstRefTypeFunc); + else + intermediate.setBindlessTextureMode(currentCaller, AstRefTypeFunc); + return false; + } else { + if (!bindlessMode) + error(loc, "sampler-constructor requires the extension GL_ARB_bindless_texture enabled", token, ""); + else + error(loc, "sampler-constructor requires the input to be ivec2 or uvec2", token, ""); + return true; + } + } // exactly two arguments needed if (function.getParamCount() != 2) { @@ -3641,18 +3783,38 @@ void TParseContext::samplerCheck(const TSourceLoc& loc, const TType& type, const if (type.getQualifier().storage == EvqUniform) return; - if (type.getBasicType() == EbtStruct && containsFieldWithBasicType(type, EbtSampler)) - error(loc, "non-uniform struct contains a sampler or image:", type.getBasicTypeString().c_str(), identifier.c_str()); + if (type.getBasicType() == EbtStruct && containsFieldWithBasicType(type, EbtSampler)) { + // For bindless texture, sampler can be declared as an struct member + if (extensionTurnedOn(E_GL_ARB_bindless_texture)) { + if (type.getSampler().isImage()) + intermediate.setBindlessImageMode(currentCaller, AstRefTypeVar); + else + intermediate.setBindlessTextureMode(currentCaller, AstRefTypeVar); + } + else { + error(loc, "non-uniform struct contains a sampler or image:", type.getBasicTypeString().c_str(), identifier.c_str()); + } + } else if (type.getBasicType() == EbtSampler && type.getQualifier().storage != EvqUniform) { - // non-uniform sampler - // not yet: okay if it has an initializer - // if (! initializer) - error(loc, "sampler/image types can only be used in uniform variables or function parameters:", type.getBasicTypeString().c_str(), identifier.c_str()); + // For bindless texture, sampler can be declared as an input/output/block member + if (extensionTurnedOn(E_GL_ARB_bindless_texture)) { + if (type.getSampler().isImage()) + intermediate.setBindlessImageMode(currentCaller, AstRefTypeVar); + else + intermediate.setBindlessTextureMode(currentCaller, AstRefTypeVar); + } + else { + // non-uniform sampler + // not yet: okay if it has an initializer + // if (! initializer) + if (type.getSampler().isAttachmentEXT() && type.getQualifier().storage != EvqTileImageEXT) + error(loc, "can only be used in tileImageEXT variables or function parameters:", type.getBasicTypeString().c_str(), identifier.c_str()); + else if (type.getQualifier().storage != EvqTileImageEXT) + error(loc, "sampler/image types can only be used in uniform variables or function parameters:", type.getBasicTypeString().c_str(), identifier.c_str()); + } } } -#ifndef GLSLANG_WEB - void TParseContext::atomicUintCheck(const TSourceLoc& loc, const TType& type, const TString& identifier) { if (type.getQualifier().storage == EvqUniform) @@ -3677,8 +3839,6 @@ void TParseContext::accStructCheck(const TSourceLoc& loc, const TType& type, con } -#endif // GLSLANG_WEB - void TParseContext::transparentOpaqueCheck(const TSourceLoc& loc, const TType& type, const TString& identifier) { if (parsingBuiltins) @@ -3713,7 +3873,7 @@ void TParseContext::memberQualifierCheck(glslang::TPublicType& publicType) // // Check/fix just a full qualifier (no variables or types yet, but qualifier is complete) at global level. // -void TParseContext::globalQualifierFixCheck(const TSourceLoc& loc, TQualifier& qualifier, bool isMemberCheck) +void TParseContext::globalQualifierFixCheck(const TSourceLoc& loc, TQualifier& qualifier, bool isMemberCheck, const TPublicType* publicType) { bool nonuniformOkay = false; @@ -3749,6 +3909,11 @@ void TParseContext::globalQualifierFixCheck(const TSourceLoc& loc, TQualifier& q { requireExtensions(loc, 1, &E_GL_EXT_scalar_block_layout, "default std430 layout for uniform"); } + + if (publicType != nullptr && publicType->isImage() && + (qualifier.layoutFormat > ElfExtSizeGuard && qualifier.layoutFormat < ElfCount)) + qualifier.layoutFormat = mapLegacyLayoutFormat(qualifier.layoutFormat, publicType->sampler.getBasicType()); + break; default: break; @@ -3757,13 +3922,11 @@ void TParseContext::globalQualifierFixCheck(const TSourceLoc& loc, TQualifier& q if (!nonuniformOkay && qualifier.isNonUniform()) error(loc, "for non-parameter, can only apply to 'in' or no storage qualifier", "nonuniformEXT", ""); -#ifndef GLSLANG_WEB if (qualifier.isSpirvByReference()) error(loc, "can only apply to parameter", "spirv_by_reference", ""); if (qualifier.isSpirvLiteral()) error(loc, "can only apply to parameter", "spirv_literal", ""); -#endif // Storage qualifier isn't ready for memberQualifierCheck, we should skip invariantCheck for it. if (!isMemberCheck || structNestingLevel > 0) @@ -3809,8 +3972,10 @@ void TParseContext::globalQualifierTypeCheck(const TSourceLoc& loc, const TQuali return; } - if (isTypeInt(publicType.basicType) || publicType.basicType == EbtDouble) - profileRequires(loc, EEsProfile, 300, nullptr, "shader input/output"); + if (isTypeInt(publicType.basicType) || publicType.basicType == EbtDouble) { + profileRequires(loc, EEsProfile, 300, nullptr, "non-float shader input/output"); + profileRequires(loc, ~EEsProfile, 130, nullptr, "non-float shader input/output"); + } if (!qualifier.flat && !qualifier.isExplicitInterpolation() && !qualifier.isPervertexNV() && !qualifier.isPervertexEXT()) { if (isTypeInt(publicType.basicType) || @@ -3831,6 +3996,9 @@ void TParseContext::globalQualifierTypeCheck(const TSourceLoc& loc, const TQuali if (qualifier.isPatch() && qualifier.isInterpolation()) error(loc, "cannot use interpolation qualifiers with patch", "patch", ""); + if (qualifier.isTaskPayload() && publicType.basicType == EbtBlock) + error(loc, "taskPayloadSharedEXT variables should not be declared as interface blocks", "taskPayloadSharedEXT", ""); + if (qualifier.isTaskMemory() && publicType.basicType != EbtBlock) error(loc, "taskNV variables can be declared only as blocks", "taskNV", ""); @@ -3838,7 +4006,7 @@ void TParseContext::globalQualifierTypeCheck(const TSourceLoc& loc, const TQuali switch (language) { case EShLangVertex: if (publicType.basicType == EbtStruct) { - error(loc, "cannot be a structure or array", GetStorageQualifierString(qualifier.storage), ""); + error(loc, "cannot be a structure", GetStorageQualifierString(qualifier.storage), ""); return; } if (publicType.arraySizes) { @@ -3864,12 +4032,10 @@ void TParseContext::globalQualifierTypeCheck(const TSourceLoc& loc, const TQuali if (! symbolTable.atBuiltInLevel()) error(loc, "global storage input qualifier cannot be used in a compute shader", "in", ""); break; -#ifndef GLSLANG_WEB case EShLangTessControl: if (qualifier.patch) error(loc, "can only use on output in tessellation-control shader", "patch", ""); break; -#endif default: break; } @@ -3908,12 +4074,10 @@ void TParseContext::globalQualifierTypeCheck(const TSourceLoc& loc, const TQuali case EShLangCompute: error(loc, "global storage output qualifier cannot be used in a compute shader", "out", ""); break; -#ifndef GLSLANG_WEB case EShLangTessEvaluation: if (qualifier.patch) error(loc, "can only use on input in tessellation-evaluation shader", "patch", ""); break; -#endif default: break; } @@ -3981,17 +4145,16 @@ void TParseContext::mergeQualifiers(const TSourceLoc& loc, TQualifier& dst, cons if (dst.precision == EpqNone || (force && src.precision != EpqNone)) dst.precision = src.precision; -#ifndef GLSLANG_WEB if (!force && ((src.coherent && (dst.devicecoherent || dst.queuefamilycoherent || dst.workgroupcoherent || dst.subgroupcoherent || dst.shadercallcoherent)) || (src.devicecoherent && (dst.coherent || dst.queuefamilycoherent || dst.workgroupcoherent || dst.subgroupcoherent || dst.shadercallcoherent)) || (src.queuefamilycoherent && (dst.coherent || dst.devicecoherent || dst.workgroupcoherent || dst.subgroupcoherent || dst.shadercallcoherent)) || (src.workgroupcoherent && (dst.coherent || dst.devicecoherent || dst.queuefamilycoherent || dst.subgroupcoherent || dst.shadercallcoherent)) || (src.subgroupcoherent && (dst.coherent || dst.devicecoherent || dst.queuefamilycoherent || dst.workgroupcoherent || dst.shadercallcoherent)) || (src.shadercallcoherent && (dst.coherent || dst.devicecoherent || dst.queuefamilycoherent || dst.workgroupcoherent || dst.subgroupcoherent)))) { - error(loc, "only one coherent/devicecoherent/queuefamilycoherent/workgroupcoherent/subgroupcoherent/shadercallcoherent qualifier allowed", + error(loc, "only one coherent/devicecoherent/queuefamilycoherent/workgroupcoherent/subgroupcoherent/shadercallcoherent qualifier allowed", GetPrecisionQualifierString(src.precision), ""); } -#endif + // Layout qualifiers mergeObjectLayoutQualifiers(dst, src, false); @@ -4003,7 +4166,6 @@ void TParseContext::mergeQualifiers(const TSourceLoc& loc, TQualifier& dst, cons MERGE_SINGLETON(smooth); MERGE_SINGLETON(flat); MERGE_SINGLETON(specConstant); -#ifndef GLSLANG_WEB MERGE_SINGLETON(noContraction); MERGE_SINGLETON(nopersp); MERGE_SINGLETON(explicitInterp); @@ -4024,9 +4186,7 @@ void TParseContext::mergeQualifiers(const TSourceLoc& loc, TQualifier& dst, cons MERGE_SINGLETON(readonly); MERGE_SINGLETON(writeonly); MERGE_SINGLETON(nonUniform); -#endif -#ifndef GLSLANG_WEB // SPIR-V storage class qualifier (GL_EXT_spirv_intrinsics) dst.spirvStorageClass = src.spirvStorageClass; @@ -4053,13 +4213,12 @@ void TParseContext::mergeQualifiers(const TSourceLoc& loc, TQualifier& dst, cons if (dstSpirvDecorate.decorates.find(decorateString.first) != dstSpirvDecorate.decorates.end()) error(loc, "too many SPIR-V decorate qualifiers", "spirv_decorate_string", "(decoration=%u)", decorateString.first); else - dstSpirvDecorate.decorates.insert(decorateString); + dstSpirvDecorate.decorateStrings.insert(decorateString); } } else { dst.spirvDecorate = src.spirvDecorate; } } -#endif if (repeated) error(loc, "replicated qualifiers", "", ""); @@ -4123,17 +4282,18 @@ TPrecisionQualifier TParseContext::getDefaultPrecision(TPublicType& publicType) return defaultPrecision[publicType.basicType]; } -void TParseContext::precisionQualifierCheck(const TSourceLoc& loc, TBasicType baseType, TQualifier& qualifier) +void TParseContext::precisionQualifierCheck(const TSourceLoc& loc, TBasicType baseType, TQualifier& qualifier, bool isCoopMat) { // Built-in symbols are allowed some ambiguous precisions, to be pinned down // later by context. if (! obeyPrecisionQualifiers() || parsingBuiltins) return; -#ifndef GLSLANG_WEB if (baseType == EbtAtomicUint && qualifier.precision != EpqNone && qualifier.precision != EpqHigh) error(loc, "atomic counters can only be highp", "atomic_uint", ""); -#endif + + if (isCoopMat) + return; if (baseType == EbtFloat || baseType == EbtUint || baseType == EbtInt || baseType == EbtSampler || baseType == EbtAtomicUint) { if (qualifier.precision == EpqNone) { @@ -4150,7 +4310,7 @@ void TParseContext::precisionQualifierCheck(const TSourceLoc& loc, TBasicType ba void TParseContext::parameterTypeCheck(const TSourceLoc& loc, TStorageQualifier qualifier, const TType& type) { - if ((qualifier == EvqOut || qualifier == EvqInOut) && type.isOpaque()) + if ((qualifier == EvqOut || qualifier == EvqInOut) && type.isOpaque() && !intermediate.getBindlessMode()) error(loc, "samplers and atomic_uints cannot be output parameters", type.getBasicTypeString().c_str(), ""); if (!parsingBuiltins && type.contains16BitFloat()) requireFloat16Arithmetic(loc, type.getBasicTypeString().c_str(), "float16 types can only be in uniform block or buffer storage"); @@ -4179,7 +4339,8 @@ bool TParseContext::containsFieldWithBasicType(const TType& type, TBasicType bas // // Do size checking for an array type's size. // -void TParseContext::arraySizeCheck(const TSourceLoc& loc, TIntermTyped* expr, TArraySize& sizePair, const char *sizeType) +void TParseContext::arraySizeCheck(const TSourceLoc& loc, TIntermTyped* expr, TArraySize& sizePair, + const char* sizeType, const bool allowZero) { bool isConst = false; sizePair.node = nullptr; @@ -4199,9 +4360,8 @@ void TParseContext::arraySizeCheck(const TSourceLoc& loc, TIntermTyped* expr, TA TIntermSymbol* symbol = expr->getAsSymbolNode(); if (symbol && symbol->getConstArray().size() > 0) size = symbol->getConstArray()[0].getIConst(); - } else if (expr->getAsUnaryNode() && - expr->getAsUnaryNode()->getOp() == glslang::EOpArrayLength && - expr->getAsUnaryNode()->getOperand()->getType().isCoopMat()) { + } else if (expr->getAsUnaryNode() && expr->getAsUnaryNode()->getOp() == glslang::EOpArrayLength && + expr->getAsUnaryNode()->getOperand()->getType().isCoopMatNV()) { isConst = true; size = 1; sizePair.node = expr->getAsUnaryNode(); @@ -4215,9 +4375,16 @@ void TParseContext::arraySizeCheck(const TSourceLoc& loc, TIntermTyped* expr, TA return; } - if (size <= 0) { - error(loc, sizeType, "", "must be a positive integer"); - return; + if (allowZero) { + if (size < 0) { + error(loc, sizeType, "", "must be a non-negative integer"); + return; + } + } else { + if (size <= 0) { + error(loc, sizeType, "", "must be a positive integer"); + return; + } } } @@ -4315,8 +4482,6 @@ void TParseContext::arraySizesCheck(const TSourceLoc& loc, const TQualifier& qua (qualifier.storage != EvqTemporary && qualifier.storage != EvqGlobal && qualifier.storage != EvqShared && qualifier.storage != EvqConst)) error(loc, "only outermost dimension of an array of arrays can be a specialization constant", "[]", ""); -#ifndef GLSLANG_WEB - // desktop always allows outer-dimension-unsized variable arrays, if (!isEsProfile()) return; @@ -4346,18 +4511,16 @@ void TParseContext::arraySizesCheck(const TSourceLoc& loc, const TQualifier& qua extensionsTurnedOn(Num_AEP_tessellation_shader, AEP_tessellation_shader)) return; break; - case EShLangMeshNV: + case EShLangMesh: if (qualifier.storage == EvqVaryingOut) if ((isEsProfile() && version >= 320) || - extensionTurnedOn(E_GL_NV_mesh_shader)) + extensionsTurnedOn(Num_AEP_mesh_shader, AEP_mesh_shader)) return; break; default: break; } -#endif - // last member of ssbo block exception: if (qualifier.storage == EvqBuffer && lastMember) return; @@ -4402,7 +4565,6 @@ void TParseContext::declareArray(const TSourceLoc& loc, const TString& identifie if (symbolTable.atGlobalLevel()) trackLinkage(*symbol); -#ifndef GLSLANG_WEB if (! symbolTable.atBuiltInLevel()) { if (isIoResizeArray(type)) { ioArraySymbolResizeList.push_back(symbol); @@ -4410,7 +4572,6 @@ void TParseContext::declareArray(const TSourceLoc& loc, const TString& identifie } else fixIoArraySize(loc, symbol->getWritableType()); } -#endif return; } @@ -4448,7 +4609,6 @@ void TParseContext::declareArray(const TSourceLoc& loc, const TString& identifie return; } -#ifndef GLSLANG_WEB if (existingType.isSizedArray()) { // be more leniant for input arrays to geometry shaders and tessellation control outputs, where the redeclaration is the same size if (! (isIoResizeArray(type) && existingType.getOuterArraySize() == type.getOuterArraySize())) @@ -4462,11 +4622,8 @@ void TParseContext::declareArray(const TSourceLoc& loc, const TString& identifie if (isIoResizeArray(type)) checkIoArraysConsistency(loc); -#endif } -#ifndef GLSLANG_WEB - // Policy and error check for needing a runtime sized array. void TParseContext::checkRuntimeSizable(const TSourceLoc& loc, const TIntermTyped& base) { @@ -4494,7 +4651,7 @@ void TParseContext::checkRuntimeSizable(const TSourceLoc& loc, const TIntermType // check for additional things allowed by GL_EXT_nonuniform_qualifier if (base.getBasicType() == EbtSampler || base.getBasicType() == EbtAccStruct || base.getBasicType() == EbtRayQuery || - (base.getBasicType() == EbtBlock && base.getType().getQualifier().isUniformOrBuffer())) + base.getBasicType() == EbtHitObjectNV || (base.getBasicType() == EbtBlock && base.getType().getQualifier().isUniformOrBuffer())) requireExtensions(loc, 1, &E_GL_EXT_nonuniform_qualifier, "variable index"); else error(loc, "", "[", "array must be redeclared with a size before being indexed with a variable"); @@ -4549,8 +4706,6 @@ void TParseContext::checkAndResizeMeshViewDim(const TSourceLoc& loc, TType& type } } -#endif // GLSLANG_WEB - // Returns true if the first argument to the #line directive is the line number for the next line. // // Desktop, pre-version 3.30: "After processing this directive @@ -4593,7 +4748,6 @@ void TParseContext::nonInitConstCheck(const TSourceLoc& loc, TString& identifier TSymbol* TParseContext::redeclareBuiltinVariable(const TSourceLoc& loc, const TString& identifier, const TQualifier& qualifier, const TShaderQualifiers& publicType) { -#ifndef GLSLANG_WEB if (! builtInName(identifier) || symbolTable.atBuiltInLevel() || ! symbolTable.atGlobalLevel()) return nullptr; @@ -4633,6 +4787,9 @@ TSymbol* TParseContext::redeclareBuiltinVariable(const TSourceLoc& loc, const TS identifier == "gl_SampleMask" || identifier == "gl_Layer" || identifier == "gl_PrimitiveIndicesNV" || + identifier == "gl_PrimitivePointIndicesEXT" || + identifier == "gl_PrimitiveLineIndicesEXT" || + identifier == "gl_PrimitiveTriangleIndicesEXT" || identifier == "gl_TexCoord") { // Find the existing symbol, if any. @@ -4753,7 +4910,6 @@ TSymbol* TParseContext::redeclareBuiltinVariable(const TSourceLoc& loc, const TS return symbol; } -#endif return nullptr; } @@ -4765,13 +4921,13 @@ TSymbol* TParseContext::redeclareBuiltinVariable(const TSourceLoc& loc, const TS void TParseContext::redeclareBuiltinBlock(const TSourceLoc& loc, TTypeList& newTypeList, const TString& blockName, const TString* instanceName, TArraySizes* arraySizes) { -#ifndef GLSLANG_WEB const char* feature = "built-in block redeclaration"; profileRequires(loc, EEsProfile, 320, Num_AEP_shader_io_blocks, AEP_shader_io_blocks, feature); profileRequires(loc, ~EEsProfile, 410, E_GL_ARB_separate_shader_objects, feature); if (blockName != "gl_PerVertex" && blockName != "gl_PerFragment" && - blockName != "gl_MeshPerVertexNV" && blockName != "gl_MeshPerPrimitiveNV") { + blockName != "gl_MeshPerVertexNV" && blockName != "gl_MeshPerPrimitiveNV" && + blockName != "gl_MeshPerVertexEXT" && blockName != "gl_MeshPerPrimitiveEXT") { error(loc, "cannot redeclare block: ", "block declaration", blockName.c_str()); return; } @@ -4980,7 +5136,6 @@ void TParseContext::redeclareBuiltinBlock(const TSourceLoc& loc, TTypeList& newT // Save it in the AST for linker use. trackLinkage(*block); -#endif // GLSLANG_WEB } void TParseContext::paramCheckFixStorage(const TSourceLoc& loc, const TStorageQualifier& qualifier, TType& type) @@ -4993,6 +5148,7 @@ void TParseContext::paramCheckFixStorage(const TSourceLoc& loc, const TStorageQu case EvqIn: case EvqOut: case EvqInOut: + case EvqTileImageEXT: type.getQualifier().storage = qualifier; break; case EvqGlobal: @@ -5008,7 +5164,6 @@ void TParseContext::paramCheckFixStorage(const TSourceLoc& loc, const TStorageQu void TParseContext::paramCheckFix(const TSourceLoc& loc, const TQualifier& qualifier, TType& type) { -#ifndef GLSLANG_WEB if (qualifier.isMemory()) { type.getQualifier().volatil = qualifier.volatil; type.getQualifier().coherent = qualifier.coherent; @@ -5022,7 +5177,6 @@ void TParseContext::paramCheckFix(const TSourceLoc& loc, const TQualifier& quali type.getQualifier().writeonly = qualifier.writeonly; type.getQualifier().restrict = qualifier.restrict; } -#endif if (qualifier.isAuxiliary() || qualifier.isInterpolation()) @@ -5039,7 +5193,6 @@ void TParseContext::paramCheckFix(const TSourceLoc& loc, const TQualifier& quali } if (qualifier.isNonUniform()) type.getQualifier().nonUniform = qualifier.nonUniform; -#ifndef GLSLANG_WEB if (qualifier.isSpirvByReference()) type.getQualifier().setSpirvByReference(); if (qualifier.isSpirvLiteral()) { @@ -5048,7 +5201,6 @@ void TParseContext::paramCheckFix(const TSourceLoc& loc, const TQualifier& quali type.getQualifier().setSpirvLiteral(); else error(loc, "cannot use spirv_literal qualifier", type.getBasicTypeString().c_str(), ""); -#endif } paramCheckFixStorage(loc, qualifier.storage, type); @@ -5079,21 +5231,18 @@ void TParseContext::arrayObjectCheck(const TSourceLoc& loc, const TType& type, c void TParseContext::opaqueCheck(const TSourceLoc& loc, const TType& type, const char* op) { - if (containsFieldWithBasicType(type, EbtSampler)) + if (containsFieldWithBasicType(type, EbtSampler) && !extensionTurnedOn(E_GL_ARB_bindless_texture)) error(loc, "can't use with samplers or structs containing samplers", op, ""); } void TParseContext::referenceCheck(const TSourceLoc& loc, const TType& type, const char* op) { -#ifndef GLSLANG_WEB if (containsFieldWithBasicType(type, EbtReference)) error(loc, "can't use with reference types", op, ""); -#endif } void TParseContext::storage16BitAssignmentCheck(const TSourceLoc& loc, const TType& type, const char* op) { -#ifndef GLSLANG_WEB if (type.getBasicType() == EbtStruct && containsFieldWithBasicType(type, EbtFloat16)) requireFloat16Arithmetic(loc, op, "can't use with structs containing float16"); @@ -5123,7 +5272,6 @@ void TParseContext::storage16BitAssignmentCheck(const TSourceLoc& loc, const TTy if (type.isArray() && type.getBasicType() == EbtUint8) requireInt8Arithmetic(loc, op, "can't use with arrays containing uint8"); -#endif } void TParseContext::specializationCheck(const TSourceLoc& loc, const TType& type, const char* op) @@ -5175,12 +5323,11 @@ void TParseContext::structTypeCheck(const TSourceLoc& /*loc*/, TPublicType& publ // void TParseContext::inductiveLoopCheck(const TSourceLoc& loc, TIntermNode* init, TIntermLoop* loop) { -#ifndef GLSLANG_WEB // loop index init must exist and be a declaration, which shows up in the AST as an aggregate of size 1 of the declaration bool badInit = false; if (! init || ! init->getAsAggregate() || init->getAsAggregate()->getSequence().size() != 1) badInit = true; - TIntermBinary* binaryInit = 0; + TIntermBinary* binaryInit = nullptr; if (! badInit) { // get the declaration assignment binaryInit = init->getAsAggregate()->getSequence()[0]->getAsBinaryNode(); @@ -5271,10 +5418,8 @@ void TParseContext::inductiveLoopCheck(const TSourceLoc& loc, TIntermNode* init, // the body inductiveLoopBodyCheck(loop->getBody(), loopIndex, symbolTable); -#endif } -#ifndef GLSLANG_WEB // Do limit checks for built-in arrays. void TParseContext::arrayLimitCheck(const TSourceLoc& loc, const TString& identifier, int size) { @@ -5289,7 +5434,6 @@ void TParseContext::arrayLimitCheck(const TSourceLoc& loc, const TString& identi else if (identifier.compare("gl_CullDistancePerViewNV") == 0) limitCheck(loc, size, "gl_MaxCullDistances", "gl_CullDistancePerViewNV array size"); } -#endif // GLSLANG_WEB // See if the provided value is less than or equal to the symbol indicated by limit, // which should be a constant in the symbol table. @@ -5303,8 +5447,6 @@ void TParseContext::limitCheck(const TSourceLoc& loc, int value, const char* lim error(loc, "must be less than or equal to", feature, "%s (%d)", limit, constArray[0].getIConst()); } -#ifndef GLSLANG_WEB - // // Do any additional error checking, etc., once we know the parsing is done. // @@ -5340,11 +5482,11 @@ void TParseContext::finish() if (!isEsProfile() && version < 430) requireExtensions(getCurrentLoc(), 1, &E_GL_ARB_compute_shader, "compute shaders"); break; - case EShLangTaskNV: - requireExtensions(getCurrentLoc(), 1, &E_GL_NV_mesh_shader, "task shaders"); + case EShLangTask: + requireExtensions(getCurrentLoc(), Num_AEP_mesh_shader, AEP_mesh_shader, "task shaders"); break; - case EShLangMeshNV: - requireExtensions(getCurrentLoc(), 1, &E_GL_NV_mesh_shader, "mesh shaders"); + case EShLangMesh: + requireExtensions(getCurrentLoc(), Num_AEP_mesh_shader, AEP_mesh_shader, "mesh shaders"); break; default: break; @@ -5370,7 +5512,6 @@ void TParseContext::finish() } } } -#endif // GLSLANG_WEB // // Layout qualifier stuff. @@ -5414,7 +5555,6 @@ void TParseContext::setLayoutQualifier(const TSourceLoc& loc, TPublicType& publi publicType.qualifier.layoutPacking = ElpStd140; return; } -#ifndef GLSLANG_WEB if (id == TQualifier::getLayoutPackingString(ElpStd430)) { requireProfile(loc, EEsProfile | ECoreProfile | ECompatibilityProfile, "std430"); profileRequires(loc, ECoreProfile | ECompatibilityProfile, 430, E_GL_ARB_shader_storage_buffer_object, "std430"); @@ -5454,12 +5594,34 @@ void TParseContext::setLayoutQualifier(const TSourceLoc& loc, TPublicType& publi intermediate.setUsePhysicalStorageBuffer(); return; } - if (language == EShLangGeometry || language == EShLangTessEvaluation || language == EShLangMeshNV) { + if (id == "bindless_sampler") { + requireExtensions(loc, 1, &E_GL_ARB_bindless_texture, "bindless_sampler"); + publicType.qualifier.layoutBindlessSampler = true; + intermediate.setBindlessTextureMode(currentCaller, AstRefTypeLayout); + return; + } + if (id == "bindless_image") { + requireExtensions(loc, 1, &E_GL_ARB_bindless_texture, "bindless_image"); + publicType.qualifier.layoutBindlessImage = true; + intermediate.setBindlessImageMode(currentCaller, AstRefTypeLayout); + return; + } + if (id == "bound_sampler") { + requireExtensions(loc, 1, &E_GL_ARB_bindless_texture, "bound_sampler"); + publicType.qualifier.layoutBindlessSampler = false; + return; + } + if (id == "bound_image") { + requireExtensions(loc, 1, &E_GL_ARB_bindless_texture, "bound_image"); + publicType.qualifier.layoutBindlessImage = false; + return; + } + if (language == EShLangGeometry || language == EShLangTessEvaluation || language == EShLangMesh) { if (id == TQualifier::getGeometryString(ElgTriangles)) { publicType.shaderQualifiers.geometry = ElgTriangles; return; } - if (language == EShLangGeometry || language == EShLangMeshNV) { + if (language == EShLangGeometry || language == EShLangMesh) { if (id == TQualifier::getGeometryString(ElgPoints)) { publicType.shaderQualifiers.geometry = ElgPoints; return; @@ -5578,6 +5740,22 @@ void TParseContext::setLayoutQualifier(const TSourceLoc& loc, TPublicType& publi publicType.shaderQualifiers.postDepthCoverage = true; return; } + /* id is transformed into lower case in the beginning of this function. */ + if (id == "non_coherent_color_attachment_readext") { + requireExtensions(loc, 1, &E_GL_EXT_shader_tile_image, "non_coherent_color_attachment_readEXT"); + publicType.shaderQualifiers.nonCoherentColorAttachmentReadEXT = true; + return; + } + if (id == "non_coherent_depth_attachment_readext") { + requireExtensions(loc, 1, &E_GL_EXT_shader_tile_image, "non_coherent_depth_attachment_readEXT"); + publicType.shaderQualifiers.nonCoherentDepthAttachmentReadEXT = true; + return; + } + if (id == "non_coherent_stencil_attachment_readext") { + requireExtensions(loc, 1, &E_GL_EXT_shader_tile_image, "non_coherent_stencil_attachment_readEXT"); + publicType.shaderQualifiers.nonCoherentStencilAttachmentReadEXT = true; + return; + } for (TLayoutDepth depth = (TLayoutDepth)(EldNone + 1); depth < EldCount; depth = (TLayoutDepth)(depth+1)) { if (id == TQualifier::getLayoutDepthString(depth)) { requireProfile(loc, ECoreProfile | ECompatibilityProfile, "depth layout qualifier"); @@ -5648,6 +5826,10 @@ void TParseContext::setLayoutQualifier(const TSourceLoc& loc, TPublicType& publi } publicType.qualifier.layoutShaderRecord = true; return; + } else if (id == "hitobjectshaderrecordnv") { + requireExtensions(loc, 1, &E_GL_NV_shader_invocation_reorder, "hitobject shader record NV"); + publicType.qualifier.layoutHitObjectShaderRecordNV = true; + return; } } @@ -5670,7 +5852,6 @@ void TParseContext::setLayoutQualifier(const TSourceLoc& loc, TPublicType& publi publicType.shaderQualifiers.layoutPrimitiveCulling = true; return; } -#endif error(loc, "unrecognized layout identifier, or qualifier requires assignment (e.g., binding = 4)", id.c_str(), ""); } @@ -5737,7 +5918,7 @@ void TParseContext::setLayoutQualifier(const TSourceLoc& loc, TPublicType& publi return; } else if (id == "location") { profileRequires(loc, EEsProfile, 300, nullptr, "location"); - const char* exts[2] = { E_GL_ARB_separate_shader_objects, E_GL_ARB_explicit_attrib_location }; + const char* exts[2] = { E_GL_ARB_separate_shader_objects, E_GL_ARB_explicit_attrib_location }; // GL_ARB_explicit_uniform_location requires 330 or GL_ARB_explicit_attrib_location we do not need to add it here profileRequires(loc, ~EEsProfile, 330, 2, exts, "location"); if ((unsigned int)value >= TQualifier::layoutLocationEnd) @@ -5758,10 +5939,8 @@ void TParseContext::setLayoutQualifier(const TSourceLoc& loc, TPublicType& publi error(loc, "needs a literal integer", "set", ""); return; } else if (id == "binding") { -#ifndef GLSLANG_WEB profileRequires(loc, ~EEsProfile, 420, E_GL_ARB_shading_language_420pack, "binding"); profileRequires(loc, EEsProfile, 310, nullptr, "binding"); -#endif if ((unsigned int)value >= TQualifier::layoutBindingEnd) error(loc, "binding is too large", id.c_str(), ""); else @@ -5784,7 +5963,6 @@ void TParseContext::setLayoutQualifier(const TSourceLoc& loc, TPublicType& publi error(loc, "needs a literal integer", "constant_id", ""); return; } -#ifndef GLSLANG_WEB if (id == "component") { requireProfile(loc, ECoreProfile | ECompatibilityProfile, "component"); profileRequires(loc, ECoreProfile | ECompatibilityProfile, 440, E_GL_ARB_enhanced_layouts, "component"); @@ -5882,10 +6060,8 @@ void TParseContext::setLayoutQualifier(const TSourceLoc& loc, TPublicType& publi error(loc, "needs a literal integer", "buffer_reference_align", ""); return; } -#endif switch (language) { -#ifndef GLSLANG_WEB case EShLangTessControl: if (id == "vertices") { if (value == 0) @@ -5947,40 +6123,49 @@ void TParseContext::setLayoutQualifier(const TSourceLoc& loc, TPublicType& publi } break; - case EShLangMeshNV: + case EShLangMesh: if (id == "max_vertices") { - requireExtensions(loc, 1, &E_GL_NV_mesh_shader, "max_vertices"); + requireExtensions(loc, Num_AEP_mesh_shader, AEP_mesh_shader, "max_vertices"); publicType.shaderQualifiers.vertices = value; - if (value > resources.maxMeshOutputVerticesNV) - error(loc, "too large, must be less than gl_MaxMeshOutputVerticesNV", "max_vertices", ""); + int max = extensionTurnedOn(E_GL_EXT_mesh_shader) ? resources.maxMeshOutputVerticesEXT + : resources.maxMeshOutputVerticesNV; + if (value > max) { + TString maxsErrtring = "too large, must be less than "; + maxsErrtring.append(extensionTurnedOn(E_GL_EXT_mesh_shader) ? "gl_MaxMeshOutputVerticesEXT" + : "gl_MaxMeshOutputVerticesNV"); + error(loc, maxsErrtring.c_str(), "max_vertices", ""); + } if (nonLiteral) error(loc, "needs a literal integer", "max_vertices", ""); return; } if (id == "max_primitives") { - requireExtensions(loc, 1, &E_GL_NV_mesh_shader, "max_primitives"); + requireExtensions(loc, Num_AEP_mesh_shader, AEP_mesh_shader, "max_primitives"); publicType.shaderQualifiers.primitives = value; - if (value > resources.maxMeshOutputPrimitivesNV) - error(loc, "too large, must be less than gl_MaxMeshOutputPrimitivesNV", "max_primitives", ""); + int max = extensionTurnedOn(E_GL_EXT_mesh_shader) ? resources.maxMeshOutputPrimitivesEXT + : resources.maxMeshOutputPrimitivesNV; + if (value > max) { + TString maxsErrtring = "too large, must be less than "; + maxsErrtring.append(extensionTurnedOn(E_GL_EXT_mesh_shader) ? "gl_MaxMeshOutputPrimitivesEXT" + : "gl_MaxMeshOutputPrimitivesNV"); + error(loc, maxsErrtring.c_str(), "max_primitives", ""); + } if (nonLiteral) error(loc, "needs a literal integer", "max_primitives", ""); return; } // Fall through - case EShLangTaskNV: + case EShLangTask: // Fall through -#endif case EShLangCompute: if (id.compare(0, 11, "local_size_") == 0) { -#ifndef GLSLANG_WEB - if (language == EShLangMeshNV || language == EShLangTaskNV) { - requireExtensions(loc, 1, &E_GL_NV_mesh_shader, "gl_WorkGroupSize"); + if (language == EShLangMesh || language == EShLangTask) { + requireExtensions(loc, Num_AEP_mesh_shader, AEP_mesh_shader, "gl_WorkGroupSize"); } else { - profileRequires(loc, EEsProfile, 310, 0, "gl_WorkGroupSize"); + profileRequires(loc, EEsProfile, 310, nullptr, "gl_WorkGroupSize"); profileRequires(loc, ~EEsProfile, 430, E_GL_ARB_compute_shader, "gl_WorkGroupSize"); } -#endif if (nonLiteral) error(loc, "needs a literal integer", "local_size", ""); if (id.size() == 12 && value == 0) { @@ -6047,7 +6232,6 @@ void TParseContext::mergeObjectLayoutQualifiers(TQualifier& dst, const TQualifie if (src.hasPacking()) dst.layoutPacking = src.layoutPacking; -#ifndef GLSLANG_WEB if (src.hasStream()) dst.layoutStream = src.layoutStream; if (src.hasFormat()) @@ -6056,7 +6240,6 @@ void TParseContext::mergeObjectLayoutQualifiers(TQualifier& dst, const TQualifie dst.layoutXfbBuffer = src.layoutXfbBuffer; if (src.hasBufferReferenceAlign()) dst.layoutBufferReferenceAlign = src.layoutBufferReferenceAlign; -#endif if (src.hasAlign()) dst.layoutAlign = src.layoutAlign; @@ -6074,7 +6257,6 @@ void TParseContext::mergeObjectLayoutQualifiers(TQualifier& dst, const TQualifie if (src.hasSpecConstantId()) dst.layoutSpecConstantId = src.layoutSpecConstantId; -#ifndef GLSLANG_WEB if (src.hasComponent()) dst.layoutComponent = src.layoutComponent; if (src.hasIndex()) @@ -6099,11 +6281,16 @@ void TParseContext::mergeObjectLayoutQualifiers(TQualifier& dst, const TQualifie dst.layoutSecondaryViewportRelativeOffset = src.layoutSecondaryViewportRelativeOffset; if (src.layoutShaderRecord) dst.layoutShaderRecord = true; + if (src.layoutBindlessSampler) + dst.layoutBindlessSampler = true; + if (src.layoutBindlessImage) + dst.layoutBindlessImage = true; if (src.pervertexNV) dst.pervertexNV = true; if (src.pervertexEXT) dst.pervertexEXT = true; -#endif + if (src.layoutHitObjectShaderRecordNV) + dst.layoutHitObjectShaderRecordNV = true; } } @@ -6140,9 +6327,7 @@ void TParseContext::layoutObjectCheck(const TSourceLoc& loc, const TSymbol& symb case EvqVaryingIn: case EvqVaryingOut: if (!type.getQualifier().isTaskMemory() && -#ifndef GLSLANG_WEB !type.getQualifier().hasSprivDecorate() && -#endif (type.getBasicType() != EbtBlock || (!(*type.getStruct())[0].type->getQualifier().hasLocation() && (*type.getStruct())[0].type->getQualifier().builtIn == EbvNone))) @@ -6204,11 +6389,6 @@ void TParseContext::layoutMemberLocationArrayCheck(const TSourceLoc& loc, bool m // Do layout error checking with respect to a type. void TParseContext::layoutTypeCheck(const TSourceLoc& loc, const TType& type) { -#ifndef GLSLANG_WEB - if (extensionTurnedOn(E_GL_EXT_spirv_intrinsics)) - return; // Skip any check if GL_EXT_spirv_intrinsics is turned on -#endif - const TQualifier& qualifier = type.getQualifier(); // first, intra-layout qualifier-only error checking @@ -6250,15 +6430,22 @@ void TParseContext::layoutTypeCheck(const TSourceLoc& loc, const TType& type) case EvqBuffer: if (type.getBasicType() == EbtBlock) error(loc, "cannot apply to uniform or buffer block", "location", ""); + else if (type.getBasicType() == EbtSampler && type.getSampler().isAttachmentEXT()) + error(loc, "only applies to", "location", "%s with storage tileImageEXT", type.getBasicTypeString().c_str()); + break; + case EvqtaskPayloadSharedEXT: + error(loc, "cannot apply to taskPayloadSharedEXT", "location", ""); break; -#ifndef GLSLANG_WEB case EvqPayload: case EvqPayloadIn: case EvqHitAttr: case EvqCallableData: case EvqCallableDataIn: + case EvqHitObjectAttrNV: + case EvqSpirvStorageClass: + break; + case EvqTileImageEXT: break; -#endif default: error(loc, "can only apply to uniform, buffer, in, or out storage qualifiers", "location", ""); break; @@ -6268,13 +6455,12 @@ void TParseContext::layoutTypeCheck(const TSourceLoc& loc, const TType& type) int repeated = intermediate.addUsedLocation(qualifier, type, typeCollision); if (repeated >= 0 && ! typeCollision) error(loc, "overlapping use of location", "location", "%d", repeated); - // "fragment-shader outputs ... if two variables are placed within the same + // "fragment-shader outputs/tileImageEXT ... if two variables are placed within the same // location, they must have the same underlying type (floating-point or integer)" - if (typeCollision && language == EShLangFragment && qualifier.isPipeOutput()) - error(loc, "fragment outputs sharing the same location must be the same basic type", "location", "%d", repeated); + if (typeCollision && language == EShLangFragment && (qualifier.isPipeOutput() || qualifier.storage == EvqTileImageEXT)) + error(loc, "fragment outputs or tileImageEXTs sharing the same location", "location", "%d must be the same basic type", repeated); } -#ifndef GLSLANG_WEB if (qualifier.hasXfbOffset() && qualifier.hasXfbBuffer()) { if (type.isUnsizedArray()) { error(loc, "unsized array", "xfb_offset", "in buffer %d", qualifier.layoutXfbBuffer); @@ -6303,7 +6489,6 @@ void TParseContext::layoutTypeCheck(const TSourceLoc& loc, const TType& type) if (! intermediate.setXfbBufferStride(qualifier.layoutXfbBuffer, qualifier.layoutXfbStride)) error(loc, "all stride settings must match for xfb buffer", "xfb_stride", "%d", qualifier.layoutXfbBuffer); } -#endif if (qualifier.hasBinding()) { // Binding checking, from the spec: @@ -6314,7 +6499,7 @@ void TParseContext::layoutTypeCheck(const TSourceLoc& loc, const TType& type) // an array of size N, all elements of the array from binding through binding + N - 1 must be within this // range." // - if (! type.isOpaque() && type.getBasicType() != EbtBlock) + if (!type.isOpaque() && type.getBasicType() != EbtBlock && type.getBasicType() != EbtSpirvType) error(loc, "requires block, or sampler/image, or atomic-counter type", "binding", ""); if (type.getBasicType() == EbtSampler) { int lastBinding = qualifier.layoutBinding; @@ -6323,16 +6508,12 @@ void TParseContext::layoutTypeCheck(const TSourceLoc& loc, const TType& type) if (type.isSizedArray()) lastBinding += (type.getCumulativeArraySize() - 1); else { -#ifndef GLSLANG_WEB warn(loc, "assuming binding count of one for compile-time checking of binding numbers for unsized array", "[]", ""); -#endif } } } -#ifndef GLSLANG_WEB if (spvVersion.vulkan == 0 && lastBinding >= resources.maxCombinedTextureImageUnits) error(loc, "sampler binding not less than gl_MaxCombinedTextureImageUnits", "binding", type.isArray() ? "(using array)" : ""); -#endif } if (type.isAtomic() && !spvVersion.vulkanRelaxed) { if (qualifier.layoutBinding >= (unsigned int)resources.maxAtomicCounterBindings) { @@ -6355,7 +6536,7 @@ void TParseContext::layoutTypeCheck(const TSourceLoc& loc, const TType& type) !qualifier.hasAttachment() && !qualifier.hasBufferReference()) error(loc, "uniform/buffer blocks require layout(binding=X)", "binding", ""); - else if (spvVersion.vulkan > 0 && type.getBasicType() == EbtSampler) + else if (spvVersion.vulkan > 0 && type.getBasicType() == EbtSampler && !type.getSampler().isAttachmentEXT()) error(loc, "sampler/texture/image requires layout(binding=X)", "binding", ""); } } @@ -6377,7 +6558,7 @@ void TParseContext::layoutTypeCheck(const TSourceLoc& loc, const TType& type) // Image format if (qualifier.hasFormat()) { - if (! type.isImage()) + if (! type.isImage() && !intermediate.getBindlessImageMode()) error(loc, "only apply to images", TQualifier::getLayoutFormatString(qualifier.getFormat()), ""); else { if (type.getSampler().type == EbtFloat && qualifier.getFormat() > ElfFloatGuard) @@ -6396,7 +6577,7 @@ void TParseContext::layoutTypeCheck(const TSourceLoc& loc, const TType& type) } } } - } else if (type.isImage() && ! qualifier.isWriteOnly()) { + } else if (type.isImage() && ! qualifier.isWriteOnly() && !intermediate.getBindlessImageMode()) { const char *explanation = "image variables not declared 'writeonly' and without a format layout qualifier"; requireProfile(loc, ECoreProfile | ECompatibilityProfile, explanation); profileRequires(loc, ECoreProfile | ECompatibilityProfile, 0, E_GL_EXT_shader_image_load_formatted, explanation); @@ -6417,6 +6598,8 @@ void TParseContext::layoutTypeCheck(const TSourceLoc& loc, const TType& type) // input attachment if (type.isSubpass()) { + if (extensionTurnedOn(E_GL_EXT_shader_tile_image)) + error(loc, "can not be used with GL_EXT_shader_tile_image enabled", type.getSampler().getString().c_str(), ""); if (! qualifier.hasAttachment()) error(loc, "requires an input_attachment_index layout qualifier", "subpass", ""); } else { @@ -6486,7 +6669,6 @@ void TParseContext::layoutQualifierCheck(const TSourceLoc& loc, const TQualifier // output block declarations, and output block member declarations." switch (qualifier.storage) { -#ifndef GLSLANG_WEB case EvqVaryingIn: { const char* feature = "location qualifier on input"; @@ -6521,7 +6703,6 @@ void TParseContext::layoutQualifierCheck(const TSourceLoc& loc, const TQualifier } break; } -#endif case EvqUniform: case EvqBuffer: { @@ -6584,6 +6765,14 @@ void TParseContext::layoutQualifierCheck(const TSourceLoc& loc, const TQualifier error(loc, "cannot be used with shaderRecordNV", "set", ""); } + + if (qualifier.storage == EvqTileImageEXT) { + if (qualifier.hasSet()) + error(loc, "cannot be used with tileImageEXT", "set", ""); + if (!qualifier.hasLocation()) + error(loc, "can only be used with an explicit location", "tileImageEXT", ""); + } + if (qualifier.storage == EvqHitAttr && qualifier.hasLayout()) { error(loc, "cannot apply layout qualifiers to hitAttributeNV variable", "hitAttributeNV", ""); } @@ -6592,7 +6781,6 @@ void TParseContext::layoutQualifierCheck(const TSourceLoc& loc, const TQualifier // For places that can't have shader-level layout qualifiers void TParseContext::checkNoShaderLayouts(const TSourceLoc& loc, const TShaderQualifiers& shaderQualifiers) { -#ifndef GLSLANG_WEB const char* message = "can only apply to a standalone qualifier"; if (shaderQualifiers.geometry != ElgNone) @@ -6612,7 +6800,7 @@ void TParseContext::checkNoShaderLayouts(const TSourceLoc& loc, const TShaderQua error(loc, message, "local_size id", ""); } if (shaderQualifiers.vertices != TQualifier::layoutNotSet) { - if (language == EShLangGeometry || language == EShLangMeshNV) + if (language == EShLangGeometry || language == EShLangMesh) error(loc, message, "max_vertices", ""); else if (language == EShLangTessControl) error(loc, message, "vertices", ""); @@ -6623,8 +6811,14 @@ void TParseContext::checkNoShaderLayouts(const TSourceLoc& loc, const TShaderQua error(loc, message, "early_fragment_tests", ""); if (shaderQualifiers.postDepthCoverage) error(loc, message, "post_depth_coverage", ""); + if (shaderQualifiers.nonCoherentColorAttachmentReadEXT) + error(loc, message, "non_coherent_color_attachment_readEXT", ""); + if (shaderQualifiers.nonCoherentDepthAttachmentReadEXT) + error(loc, message, "non_coherent_depth_attachment_readEXT", ""); + if (shaderQualifiers.nonCoherentStencilAttachmentReadEXT) + error(loc, message, "non_coherent_stencil_attachment_readEXT", ""); if (shaderQualifiers.primitives != TQualifier::layoutNotSet) { - if (language == EShLangMeshNV) + if (language == EShLangMesh) error(loc, message, "max_primitives", ""); else assert(0); @@ -6637,14 +6831,12 @@ void TParseContext::checkNoShaderLayouts(const TSourceLoc& loc, const TShaderQua error(loc, message, TQualifier::getInterlockOrderingString(shaderQualifiers.interlockOrdering), ""); if (shaderQualifiers.layoutPrimitiveCulling) error(loc, "can only be applied as standalone", "primitive_culling", ""); -#endif } // Correct and/or advance an object's offset layout qualifier. void TParseContext::fixOffset(const TSourceLoc& loc, TSymbol& symbol) { const TQualifier& qualifier = symbol.getType().getQualifier(); -#ifndef GLSLANG_WEB if (symbol.getType().isAtomic()) { if (qualifier.hasBinding() && (int)qualifier.layoutBinding < resources.maxAtomicCounterBindings) { @@ -6678,7 +6870,6 @@ void TParseContext::fixOffset(const TSourceLoc& loc, TSymbol& symbol) atomicUintOffsets[qualifier.layoutBinding] = offset + numOffsets; } } -#endif } // @@ -6693,10 +6884,6 @@ const TFunction* TParseContext::findFunction(const TSourceLoc& loc, const TFunct return nullptr; } -#ifdef GLSLANG_WEB - return findFunctionExact(loc, call, builtIn); -#endif - const TFunction* function = nullptr; // debugPrintfEXT has var args and is in the symbol table as "debugPrintfEXT()", @@ -7023,7 +7210,6 @@ TIntermTyped* TParseContext::vkRelaxedRemapFunctionCall(const TSourceLoc& loc, T { TIntermTyped* result = nullptr; -#ifndef GLSLANG_WEB if (function->getBuiltInOp() != EOpNull) { return nullptr; } @@ -7041,7 +7227,7 @@ TIntermTyped* TParseContext::vkRelaxedRemapFunctionCall(const TSourceLoc& loc, T realFunc.addParameter(TParameter().copyParam((*function)[i])); } - TParameter tmpP = { 0, &uintType }; + TParameter tmpP = { nullptr, &uintType }; realFunc.addParameter(TParameter().copyParam(tmpP)); arguments = intermediate.growAggregate(arguments, intermediate.addConstantUnion(1, loc, true)); @@ -7058,7 +7244,7 @@ TIntermTyped* TParseContext::vkRelaxedRemapFunctionCall(const TSourceLoc& loc, T realFunc.addParameter(TParameter().copyParam((*function)[i])); } - TParameter tmpP = { 0, &uintType }; + TParameter tmpP = { nullptr, &uintType }; realFunc.addParameter(TParameter().copyParam(tmpP)); arguments = intermediate.growAggregate(arguments, intermediate.addConstantUnion(-1, loc, true)); @@ -7074,7 +7260,6 @@ TIntermTyped* TParseContext::vkRelaxedRemapFunctionCall(const TSourceLoc& loc, T result = arguments->getAsTyped(); } } -#endif return result; } @@ -7083,7 +7268,6 @@ TIntermTyped* TParseContext::vkRelaxedRemapFunctionCall(const TSourceLoc& loc, T // to establish defaults. void TParseContext::declareTypeDefaults(const TSourceLoc& loc, const TPublicType& publicType) { -#ifndef GLSLANG_WEB if (publicType.basicType == EbtAtomicUint && publicType.qualifier.hasBinding()) { if (publicType.qualifier.layoutBinding >= (unsigned int)resources.maxAtomicCounterBindings) { error(loc, "atomic_uint binding is too large", "binding", ""); @@ -7100,7 +7284,41 @@ void TParseContext::declareTypeDefaults(const TSourceLoc& loc, const TPublicType if (publicType.qualifier.hasLayout() && !publicType.qualifier.hasBufferReference()) warn(loc, "useless application of layout qualifier", "layout", ""); -#endif +} + +void TParseContext::coopMatTypeParametersCheck(const TSourceLoc& loc, const TPublicType& publicType) +{ + if (parsingBuiltins) + return; + if (publicType.isCoopmatKHR()) { + if (publicType.typeParameters == nullptr) { + error(loc, "coopmat missing type parameters", "", ""); + return; + } + switch (publicType.typeParameters->basicType) { + case EbtFloat: + case EbtFloat16: + case EbtInt: + case EbtInt8: + case EbtInt16: + case EbtUint: + case EbtUint8: + case EbtUint16: + break; + default: + error(loc, "coopmat invalid basic type", TType::getBasicString(publicType.typeParameters->basicType), ""); + break; + } + if (publicType.typeParameters->arraySizes->getNumDims() != 4) { + error(loc, "coopmat incorrect number of type parameters", "", ""); + return; + } + int use = publicType.typeParameters->arraySizes->getDimSize(3); + if (use < 0 || use > 2) { + error(loc, "coopmat invalid matrix Use", "", ""); + return; + } + } } bool TParseContext::vkRelaxedRemapUniformVariable(const TSourceLoc& loc, TString& identifier, const TPublicType&, @@ -7108,11 +7326,7 @@ bool TParseContext::vkRelaxedRemapUniformVariable(const TSourceLoc& loc, TString { if (parsingBuiltins || symbolTable.atBuiltInLevel() || !symbolTable.atGlobalLevel() || type.getQualifier().storage != EvqUniform || - !(type.containsNonOpaque() -#ifndef GLSLANG_WEB - || type.getBasicType() == EbtAtomicUint -#endif - )) { + !(type.containsNonOpaque()|| type.getBasicType() == EbtAtomicUint)) { return false; } @@ -7141,7 +7355,6 @@ bool TParseContext::vkRelaxedRemapUniformVariable(const TSourceLoc& loc, TString int bufferBinding = TQualifier::layoutBindingEnd; TVariable* updatedBlock = nullptr; -#ifndef GLSLANG_WEB // Convert atomic_uint into members of a buffer block if (type.isAtomic()) { type.setBasicType(EbtUint); @@ -7157,7 +7370,6 @@ bool TParseContext::vkRelaxedRemapUniformVariable(const TSourceLoc& loc, TString growAtomicCounterBlock(bufferBinding, loc, type, identifier, nullptr); updatedBlock = atomicCounterBuffers[bufferBinding]; } -#endif if (!updatedBlock) { growGlobalUniformBlock(loc, type, identifier, nullptr); @@ -7212,32 +7424,49 @@ TIntermNode* TParseContext::declareVariable(const TSourceLoc& loc, TString& iden if (initializer) { if (type.getBasicType() == EbtRayQuery) { error(loc, "ray queries can only be initialized by using the rayQueryInitializeEXT intrinsic:", "=", identifier.c_str()); + } else if (type.getBasicType() == EbtHitObjectNV) { + error(loc, "hit objects cannot be initialized using initializers", "=", identifier.c_str()); } + } - if (type.isCoopMat()) { + if (type.isCoopMatKHR()) { intermediate.setUseVulkanMemoryModel(); intermediate.setUseStorageBuffer(); - if (!publicType.typeParameters || publicType.typeParameters->getNumDims() != 4) { + if (!publicType.typeParameters || !publicType.typeParameters->arraySizes || + publicType.typeParameters->arraySizes->getNumDims() != 3) { + error(loc, "unexpected number type parameters", identifier.c_str(), ""); + } + if (publicType.typeParameters) { + if (!isTypeFloat(publicType.typeParameters->basicType) && !isTypeInt(publicType.typeParameters->basicType)) { + error(loc, "expected 8, 16, 32, or 64 bit signed or unsigned integer or 16, 32, or 64 bit float type", identifier.c_str(), ""); + } + } + } + else if (type.isCoopMatNV()) { + intermediate.setUseVulkanMemoryModel(); + intermediate.setUseStorageBuffer(); + + if (!publicType.typeParameters || publicType.typeParameters->arraySizes->getNumDims() != 4) { error(loc, "expected four type parameters", identifier.c_str(), ""); } if (publicType.typeParameters) { if (isTypeFloat(publicType.basicType) && - publicType.typeParameters->getDimSize(0) != 16 && - publicType.typeParameters->getDimSize(0) != 32 && - publicType.typeParameters->getDimSize(0) != 64) { + publicType.typeParameters->arraySizes->getDimSize(0) != 16 && + publicType.typeParameters->arraySizes->getDimSize(0) != 32 && + publicType.typeParameters->arraySizes->getDimSize(0) != 64) { error(loc, "expected 16, 32, or 64 bits for first type parameter", identifier.c_str(), ""); } if (isTypeInt(publicType.basicType) && - publicType.typeParameters->getDimSize(0) != 8 && - publicType.typeParameters->getDimSize(0) != 32) { - error(loc, "expected 8 or 32 bits for first type parameter", identifier.c_str(), ""); + publicType.typeParameters->arraySizes->getDimSize(0) != 8 && + publicType.typeParameters->arraySizes->getDimSize(0) != 16 && + publicType.typeParameters->arraySizes->getDimSize(0) != 32) { + error(loc, "expected 8, 16, or 32 bits for first type parameter", identifier.c_str(), ""); } } - } else { - if (publicType.typeParameters && publicType.typeParameters->getNumDims() != 0) { + if (publicType.typeParameters && publicType.typeParameters->arraySizes->getNumDims() != 0) { error(loc, "unexpected type parameters", identifier.c_str(), ""); } } @@ -7252,11 +7481,9 @@ TIntermNode* TParseContext::declareVariable(const TSourceLoc& loc, TString& iden samplerCheck(loc, type, identifier, initializer); transparentOpaqueCheck(loc, type, identifier); -#ifndef GLSLANG_WEB atomicUintCheck(loc, type, identifier); accStructCheck(loc, type, identifier); checkAndResizeMeshViewDim(loc, type, /*isBlockMember*/ false); -#endif if (type.getQualifier().storage == EvqConst && type.containsReference()) { error(loc, "variables with reference type can't have qualifier 'const'", "qualifier", ""); } @@ -7270,6 +7497,8 @@ TIntermNode* TParseContext::declareVariable(const TSourceLoc& loc, TString& iden requireInt8Arithmetic(loc, "qualifier", "(u)int8 types can only be in uniform block or buffer storage"); } + if (type.getQualifier().storage == EvqtaskPayloadSharedEXT) + intermediate.addTaskPayloadEXTCount(); if (type.getQualifier().storage == EvqShared && type.containsCoopMat()) error(loc, "qualifier", "Cooperative matrix types must not be used in shared memory", ""); @@ -7357,14 +7586,12 @@ TIntermNode* TParseContext::declareVariable(const TSourceLoc& loc, TString& iden // Pick up global defaults from the provide global defaults into dst. void TParseContext::inheritGlobalDefaults(TQualifier& dst) const { -#ifndef GLSLANG_WEB if (dst.storage == EvqVaryingOut) { if (! dst.hasStream() && language == EShLangGeometry) dst.layoutStream = globalOutputDefaults.layoutStream; if (! dst.hasXfbBuffer()) dst.layoutXfbBuffer = globalOutputDefaults.layoutXfbBuffer; } -#endif } // @@ -7393,9 +7620,7 @@ TVariable* TParseContext::declareNonArray(const TSourceLoc& loc, const TString& // make a new variable TVariable* variable = new TVariable(&identifier, type); -#ifndef GLSLANG_WEB ioArrayCheck(loc, type, identifier); -#endif // add variable to symbol table if (symbolTable.insert(*variable)) { @@ -7472,9 +7697,7 @@ TIntermNode* TParseContext::executeInitializer(const TSourceLoc& loc, TIntermTyp TType skeletalType; skeletalType.shallowCopy(variable->getType()); skeletalType.getQualifier().makeTemporary(); -#ifndef GLSLANG_WEB initializer = convertInitializerList(loc, skeletalType, initializer); -#endif if (! initializer) { // error recovery; don't leave const without constant values if (qualifier == EvqConst) @@ -7702,12 +7925,14 @@ TIntermTyped* TParseContext::addConstructor(const TSourceLoc& loc, TIntermNode* // Combined texture-sampler constructors are completely semantic checked // in constructorTextureSamplerError() if (op == EOpConstructTextureSampler) { - if (aggrNode->getSequence()[1]->getAsTyped()->getType().getSampler().shadow) { - // Transfer depth into the texture (SPIR-V image) type, as a hint - // for tools to know this texture/image is a depth image. - aggrNode->getSequence()[0]->getAsTyped()->getWritableType().getSampler().shadow = true; + if (aggrNode != nullptr) { + if (aggrNode->getSequence()[1]->getAsTyped()->getType().getSampler().shadow) { + // Transfer depth into the texture (SPIR-V image) type, as a hint + // for tools to know this texture/image is a depth image. + aggrNode->getSequence()[0]->getAsTyped()->getWritableType().getSampler().shadow = true; + } + return intermediate.setAggregateOperator(aggrNode, op, type, loc); } - return intermediate.setAggregateOperator(aggrNode, op, type, loc); } TTypeList::const_iterator memberTypes; @@ -7842,6 +8067,16 @@ TIntermTyped* TParseContext::constructBuiltIn(const TType& type, TOperator op, T TIntermTyped* newNode = intermediate.addBuiltInFunctionCall(node->getLoc(), EOpConvPtrToUvec2, true, node, type); return newNode; + } else if (node->getType().getBasicType() == EbtSampler) { + requireExtensions(loc, 1, &E_GL_ARB_bindless_texture, "sampler conversion to uvec2"); + // force the basic type of the constructor param to uvec2, otherwise spv builder will + // report some errors + TIntermTyped* newSrcNode = intermediate.createConversion(EbtUint, node); + newSrcNode->getAsTyped()->getWritableType().setVectorSize(2); + + TIntermTyped* newNode = + intermediate.addBuiltInFunctionCall(node->getLoc(), EOpConstructUVec2, false, newSrcNode, type); + return newNode; } case EOpConstructUVec3: case EOpConstructUVec4: @@ -7855,9 +8090,15 @@ TIntermTyped* TParseContext::constructBuiltIn(const TType& type, TOperator op, T case EOpConstructBool: basicOp = EOpConstructBool; break; - -#ifndef GLSLANG_WEB - + case EOpConstructTextureSampler: + if ((node->getType().getBasicType() == EbtUint || node->getType().getBasicType() == EbtInt) && + node->getType().getVectorSize() == 2) { + requireExtensions(loc, 1, &E_GL_ARB_bindless_texture, "ivec2/uvec2 convert to texture handle"); + // No matter ivec2 or uvec2, Set EOpPackUint2x32 just to generate an opBitcast op code + TIntermTyped* newNode = + intermediate.addBuiltInFunctionCall(node->getLoc(), EOpPackUint2x32, true, node, type); + return newNode; + } case EOpConstructDVec2: case EOpConstructDVec3: case EOpConstructDVec4: @@ -8043,14 +8284,18 @@ TIntermTyped* TParseContext::constructBuiltIn(const TType& type, TOperator op, T return nullptr; } - case EOpConstructCooperativeMatrix: + case EOpConstructCooperativeMatrixNV: + case EOpConstructCooperativeMatrixKHR: + if (node->getType() == type) { + return node; + } if (!node->getType().isCoopMat()) { if (type.getBasicType() != node->getType().getBasicType()) { node = intermediate.addConversion(type.getBasicType(), node); if (node == nullptr) return nullptr; } - node = intermediate.setAggregateOperator(node, EOpConstructCooperativeMatrix, type, node->getLoc()); + node = intermediate.setAggregateOperator(node, op, type, node->getLoc()); } else { TOperator op = EOpNull; switch (type.getBasicType()) { @@ -8063,6 +8308,8 @@ TIntermTyped* TParseContext::constructBuiltIn(const TType& type, TOperator op, T case EbtFloat16: op = EOpConvFloat16ToInt; break; case EbtUint8: op = EOpConvUint8ToInt; break; case EbtInt8: op = EOpConvInt8ToInt; break; + case EbtUint16: op = EOpConvUint16ToInt; break; + case EbtInt16: op = EOpConvInt16ToInt; break; case EbtUint: op = EOpConvUintToInt; break; default: assert(0); } @@ -8073,8 +8320,33 @@ TIntermTyped* TParseContext::constructBuiltIn(const TType& type, TOperator op, T case EbtFloat16: op = EOpConvFloat16ToUint; break; case EbtUint8: op = EOpConvUint8ToUint; break; case EbtInt8: op = EOpConvInt8ToUint; break; + case EbtUint16: op = EOpConvUint16ToUint; break; + case EbtInt16: op = EOpConvInt16ToUint; break; case EbtInt: op = EOpConvIntToUint; break; - case EbtUint: op = EOpConvUintToInt8; break; + default: assert(0); + } + break; + case EbtInt16: + switch (node->getType().getBasicType()) { + case EbtFloat: op = EOpConvFloatToInt16; break; + case EbtFloat16: op = EOpConvFloat16ToInt16; break; + case EbtUint8: op = EOpConvUint8ToInt16; break; + case EbtInt8: op = EOpConvInt8ToInt16; break; + case EbtUint16: op = EOpConvUint16ToInt16; break; + case EbtInt: op = EOpConvIntToInt16; break; + case EbtUint: op = EOpConvUintToInt16; break; + default: assert(0); + } + break; + case EbtUint16: + switch (node->getType().getBasicType()) { + case EbtFloat: op = EOpConvFloatToUint16; break; + case EbtFloat16: op = EOpConvFloat16ToUint16; break; + case EbtUint8: op = EOpConvUint8ToUint16; break; + case EbtInt8: op = EOpConvInt8ToUint16; break; + case EbtInt16: op = EOpConvInt16ToUint16; break; + case EbtInt: op = EOpConvIntToUint16; break; + case EbtUint: op = EOpConvUintToUint16; break; default: assert(0); } break; @@ -8083,6 +8355,8 @@ TIntermTyped* TParseContext::constructBuiltIn(const TType& type, TOperator op, T case EbtFloat: op = EOpConvFloatToInt8; break; case EbtFloat16: op = EOpConvFloat16ToInt8; break; case EbtUint8: op = EOpConvUint8ToInt8; break; + case EbtInt16: op = EOpConvInt16ToInt8; break; + case EbtUint16: op = EOpConvUint16ToInt8; break; case EbtInt: op = EOpConvIntToInt8; break; case EbtUint: op = EOpConvUintToInt8; break; default: assert(0); @@ -8093,6 +8367,8 @@ TIntermTyped* TParseContext::constructBuiltIn(const TType& type, TOperator op, T case EbtFloat: op = EOpConvFloatToUint8; break; case EbtFloat16: op = EOpConvFloat16ToUint8; break; case EbtInt8: op = EOpConvInt8ToUint8; break; + case EbtInt16: op = EOpConvInt16ToUint8; break; + case EbtUint16: op = EOpConvUint16ToUint8; break; case EbtInt: op = EOpConvIntToUint8; break; case EbtUint: op = EOpConvUintToUint8; break; default: assert(0); @@ -8103,6 +8379,8 @@ TIntermTyped* TParseContext::constructBuiltIn(const TType& type, TOperator op, T case EbtFloat16: op = EOpConvFloat16ToFloat; break; case EbtInt8: op = EOpConvInt8ToFloat; break; case EbtUint8: op = EOpConvUint8ToFloat; break; + case EbtInt16: op = EOpConvInt16ToFloat; break; + case EbtUint16: op = EOpConvUint16ToFloat; break; case EbtInt: op = EOpConvIntToFloat; break; case EbtUint: op = EOpConvUintToFloat; break; default: assert(0); @@ -8113,6 +8391,8 @@ TIntermTyped* TParseContext::constructBuiltIn(const TType& type, TOperator op, T case EbtFloat: op = EOpConvFloatToFloat16; break; case EbtInt8: op = EOpConvInt8ToFloat16; break; case EbtUint8: op = EOpConvUint8ToFloat16; break; + case EbtInt16: op = EOpConvInt16ToFloat16; break; + case EbtUint16: op = EOpConvUint16ToFloat16; break; case EbtInt: op = EOpConvIntToFloat16; break; case EbtUint: op = EOpConvUintToFloat16; break; default: assert(0); @@ -8141,7 +8421,6 @@ TIntermTyped* TParseContext::constructBuiltIn(const TType& type, TOperator op, T type); } else return nullptr; -#endif // GLSLANG_WEB default: error(loc, "unsupported construction", "", ""); @@ -8188,7 +8467,6 @@ TIntermTyped* TParseContext::constructAggregate(TIntermNode* node, const TType& // If a memory qualifier is present in 'to', also make it present in 'from'. void TParseContext::inheritMemoryQualifiers(const TQualifier& from, TQualifier& to) { -#ifndef GLSLANG_WEB if (from.isReadOnly()) to.readonly = from.readonly; if (from.isWriteOnly()) @@ -8199,7 +8477,30 @@ void TParseContext::inheritMemoryQualifiers(const TQualifier& from, TQualifier& to.volatil = from.volatil; if (from.restrict) to.restrict = from.restrict; -#endif +} + +// +// Update qualifier layoutBindlessImage & layoutBindlessSampler on block member +// +void TParseContext::updateBindlessQualifier(TType& memberType) +{ + if (memberType.containsSampler()) { + if (memberType.isStruct()) { + TTypeList* typeList = memberType.getWritableStruct(); + for (unsigned int member = 0; member < typeList->size(); ++member) { + TType* subMemberType = (*typeList)[member].type; + updateBindlessQualifier(*subMemberType); + } + } + else if (memberType.getSampler().isImage()) { + intermediate.setBindlessImageMode(currentCaller, AstRefTypeLayout); + memberType.getQualifier().layoutBindlessImage = true; + } + else { + intermediate.setBindlessTextureMode(currentCaller, AstRefTypeLayout); + memberType.getQualifier().layoutBindlessSampler = true; + } + } } // @@ -8228,7 +8529,6 @@ void TParseContext::declareBlock(const TSourceLoc& loc, TTypeList& typeList, con error(memberLoc, "member storage qualifier cannot contradict block storage qualifier", memberType.getFieldName().c_str(), ""); memberQualifier.storage = currentBlockQualifier.storage; globalQualifierFixCheck(memberLoc, memberQualifier); -#ifndef GLSLANG_WEB inheritMemoryQualifiers(currentBlockQualifier, memberQualifier); if (currentBlockQualifier.perPrimitiveNV) memberQualifier.perPrimitiveNV = currentBlockQualifier.perPrimitiveNV; @@ -8236,11 +8536,12 @@ void TParseContext::declareBlock(const TSourceLoc& loc, TTypeList& typeList, con memberQualifier.perViewNV = currentBlockQualifier.perViewNV; if (currentBlockQualifier.perTaskNV) memberQualifier.perTaskNV = currentBlockQualifier.perTaskNV; + if (currentBlockQualifier.storage == EvqtaskPayloadSharedEXT) + memberQualifier.storage = EvqtaskPayloadSharedEXT; if (memberQualifier.storage == EvqSpirvStorageClass) error(memberLoc, "member cannot have a spirv_storage_class qualifier", memberType.getFieldName().c_str(), ""); if (memberQualifier.hasSprivDecorate() && !memberQualifier.getSpirvDecorate().decorateIds.empty()) error(memberLoc, "member cannot have a spirv_decorate_id qualifier", memberType.getFieldName().c_str(), ""); -#endif if ((currentBlockQualifier.storage == EvqUniform || currentBlockQualifier.storage == EvqBuffer) && (memberQualifier.isInterpolation() || memberQualifier.isAuxiliary())) error(memberLoc, "member of uniform or buffer block cannot have an auxiliary or interpolation qualifier", memberType.getFieldName().c_str(), ""); if (memberType.isArray()) @@ -8252,8 +8553,13 @@ void TParseContext::declareBlock(const TSourceLoc& loc, TTypeList& typeList, con } } - if (memberType.containsOpaque()) - error(memberLoc, "member of block cannot be or contain a sampler, image, or atomic_uint type", typeList[member].type->getFieldName().c_str(), ""); + // For bindless texture, sampler can be declared as uniform/storage block member, + if (memberType.containsOpaque()) { + if (memberType.containsSampler() && extensionTurnedOn(E_GL_ARB_bindless_texture)) + updateBindlessQualifier(memberType); + else + error(memberLoc, "member of block cannot be or contain a sampler, image, or atomic_uint type", typeList[member].type->getFieldName().c_str(), ""); + } if (memberType.containsCoopMat()) error(memberLoc, "member of block cannot be or contain a cooperative matrix type", typeList[member].type->getFieldName().c_str(), ""); @@ -8315,7 +8621,6 @@ void TParseContext::declareBlock(const TSourceLoc& loc, TTypeList& typeList, con for (unsigned int member = 0; member < typeList.size(); ++member) { TQualifier& memberQualifier = typeList[member].type->getQualifier(); const TSourceLoc& memberLoc = typeList[member].loc; -#ifndef GLSLANG_WEB if (memberQualifier.hasStream()) { if (defaultQualification.layoutStream != memberQualifier.layoutStream) error(memberLoc, "member cannot contradict block", "stream", ""); @@ -8329,14 +8634,12 @@ void TParseContext::declareBlock(const TSourceLoc& loc, TTypeList& typeList, con if (defaultQualification.layoutXfbBuffer != memberQualifier.layoutXfbBuffer) error(memberLoc, "member cannot contradict block (or what block inherited from global)", "xfb_buffer", ""); } -#endif if (memberQualifier.hasPacking()) error(memberLoc, "member of block cannot have a packing layout qualifier", typeList[member].type->getFieldName().c_str(), ""); if (memberQualifier.hasLocation()) { const char* feature = "location on block member"; switch (currentBlockQualifier.storage) { -#ifndef GLSLANG_WEB case EvqVaryingIn: case EvqVaryingOut: requireProfile(memberLoc, ECoreProfile | ECompatibilityProfile | EEsProfile, feature); @@ -8344,7 +8647,6 @@ void TParseContext::declareBlock(const TSourceLoc& loc, TTypeList& typeList, con profileRequires(memberLoc, EEsProfile, 320, Num_AEP_shader_io_blocks, AEP_shader_io_blocks, feature); memberWithLocation = true; break; -#endif default: error(memberLoc, "can only use in an in/out block", feature, ""); break; @@ -8372,7 +8674,6 @@ void TParseContext::declareBlock(const TSourceLoc& loc, TTypeList& typeList, con layoutMemberLocationArrayCheck(loc, memberWithLocation, arraySizes); -#ifndef GLSLANG_WEB // Ensure that the block has an XfbBuffer assigned. This is needed // because if the block has a XfbOffset assigned, then it is // assumed that it has implicitly assigned the current global @@ -8382,7 +8683,6 @@ void TParseContext::declareBlock(const TSourceLoc& loc, TTypeList& typeList, con if (!currentBlockQualifier.hasXfbBuffer() && currentBlockQualifier.hasXfbOffset()) currentBlockQualifier.layoutXfbBuffer = globalOutputDefaults.layoutXfbBuffer; } -#endif // Process the members fixBlockLocations(loc, currentBlockQualifier, typeList, memberWithLocation, memberWithoutLocation); @@ -8393,13 +8693,11 @@ void TParseContext::declareBlock(const TSourceLoc& loc, TTypeList& typeList, con for (unsigned int member = 0; member < typeList.size(); ++member) layoutTypeCheck(typeList[member].loc, *typeList[member].type); -#ifndef GLSLANG_WEB if (memberWithPerViewQualifier) { for (unsigned int member = 0; member < typeList.size(); ++member) { checkAndResizeMeshViewDim(typeList[member].loc, *typeList[member].type, /*isBlockMember*/ true); } } -#endif // reverse merge, so that currentBlockQualifier now has all layout information // (can't use defaultQualification directly, it's missing other non-layout-default-class qualifiers) @@ -8413,7 +8711,6 @@ void TParseContext::declareBlock(const TSourceLoc& loc, TTypeList& typeList, con if (arraySizes != nullptr) blockType.transferArraySizes(arraySizes); -#ifndef GLSLANG_WEB if (arraySizes == nullptr) ioArrayCheck(loc, blockType, instanceName ? *instanceName : *blockName); if (currentBlockQualifier.hasBufferReference()) { @@ -8440,9 +8737,7 @@ void TParseContext::declareBlock(const TSourceLoc& loc, TTypeList& typeList, con if (!instanceName) { return; } - } else -#endif - { + } else { // // Don't make a user-defined type out of block name; that will cause an error // if the same block name gets reused in a different interface. @@ -8490,14 +8785,12 @@ void TParseContext::declareBlock(const TSourceLoc& loc, TTypeList& typeList, con // Check for general layout qualifier errors layoutObjectCheck(loc, variable); -#ifndef GLSLANG_WEB // fix up if (isIoResizeArray(blockType)) { ioArraySymbolResizeList.push_back(&variable); checkIoArraysConsistency(loc, true); } else fixIoArraySize(loc, variable.getWritableType()); -#endif // Save it in the AST for linker use. trackLinkage(variable); @@ -8536,23 +8829,23 @@ void TParseContext::blockStageIoCheck(const TSourceLoc& loc, const TQualifier& q // It is a compile-time error to have an input block in a vertex shader or an output block in a fragment shader // "Compute shaders do not permit user-defined input variables..." requireStage(loc, (EShLanguageMask)(EShLangTessControlMask|EShLangTessEvaluationMask|EShLangGeometryMask| - EShLangFragmentMask|EShLangMeshNVMask), "input block"); + EShLangFragmentMask|EShLangMeshMask), "input block"); if (language == EShLangFragment) { profileRequires(loc, EEsProfile, 320, Num_AEP_shader_io_blocks, AEP_shader_io_blocks, "fragment input block"); - } else if (language == EShLangMeshNV && ! qualifier.isTaskMemory()) { + } else if (language == EShLangMesh && ! qualifier.isTaskMemory()) { error(loc, "input blocks cannot be used in a mesh shader", "out", ""); } break; case EvqVaryingOut: profileRequires(loc, ~EEsProfile, 150, E_GL_ARB_separate_shader_objects, "output block"); requireStage(loc, (EShLanguageMask)(EShLangVertexMask|EShLangTessControlMask|EShLangTessEvaluationMask| - EShLangGeometryMask|EShLangMeshNVMask|EShLangTaskNVMask), "output block"); + EShLangGeometryMask|EShLangMeshMask|EShLangTaskMask), "output block"); // ES 310 can have a block before shader_io is turned on, so skip this test for built-ins if (language == EShLangVertex && ! parsingBuiltins) { profileRequires(loc, EEsProfile, 320, Num_AEP_shader_io_blocks, AEP_shader_io_blocks, "vertex output block"); - } else if (language == EShLangMeshNV && qualifier.isTaskMemory()) { + } else if (language == EShLangMesh && qualifier.isTaskMemory()) { error(loc, "can only use on input blocks in mesh shader", "taskNV", ""); - } else if (language == EShLangTaskNV && ! qualifier.isTaskMemory()) { + } else if (language == EShLangTask && ! qualifier.isTaskMemory()) { error(loc, "output blocks cannot be used in a task shader", "out", ""); } break; @@ -8562,7 +8855,6 @@ void TParseContext::blockStageIoCheck(const TSourceLoc& loc, const TQualifier& q } profileRequires(loc, EEsProfile | ECoreProfile | ECompatibilityProfile, 0, E_GL_EXT_shared_memory_block, "shared block"); break; -#ifndef GLSLANG_WEB case EvqPayload: profileRequires(loc, ~EEsProfile, 460, 2, extsrt, "rayPayloadNV block"); requireStage(loc, (EShLanguageMask)(EShLangRayGenMask | EShLangAnyHitMask | EShLangClosestHitMask | EShLangMissMask), @@ -8586,7 +8878,10 @@ void TParseContext::blockStageIoCheck(const TSourceLoc& loc, const TQualifier& q profileRequires(loc, ~EEsProfile, 460, 2, extsrt, "callableDataInNV block"); requireStage(loc, (EShLanguageMask)(EShLangCallableMask), "callableDataInNV block"); break; -#endif + case EvqHitObjectAttrNV: + profileRequires(loc, ~EEsProfile, 460, E_GL_NV_shader_invocation_reorder, "hitObjectAttributeNV block"); + requireStage(loc, (EShLanguageMask)(EShLangRayGenMask | EShLangClosestHitMask | EShLangMissMask), "hitObjectAttributeNV block"); + break; default: error(loc, "only uniform, buffer, in, or out blocks are supported", blockName->c_str(), ""); break; @@ -8675,7 +8970,6 @@ void TParseContext::fixBlockLocations(const TSourceLoc& loc, TQualifier& qualifi void TParseContext::fixXfbOffsets(TQualifier& qualifier, TTypeList& typeList) { -#ifndef GLSLANG_WEB // "If a block is qualified with xfb_offset, all its // members are assigned transform feedback buffer offsets. If a block is not qualified with xfb_offset, any // members of that block not qualified with an xfb_offset will not be assigned transform feedback buffer @@ -8709,7 +9003,6 @@ void TParseContext::fixXfbOffsets(TQualifier& qualifier, TTypeList& typeList) // The above gave all block members an offset, so we can take it off the block now, // which will avoid double counting the offset usage. qualifier.layoutXfbOffset = TQualifier::layoutXfbOffsetEnd; -#endif } // Calculate and save the offset of each block member, using the recursively @@ -8742,7 +9035,8 @@ void TParseContext::fixBlockUniformOffsets(TQualifier& qualifier, TTypeList& typ // "The specified offset must be a multiple // of the base alignment of the type of the block member it qualifies, or a compile-time error results." if (! IsMultipleOfPow2(memberQualifier.layoutOffset, memberAlignment)) - error(memberLoc, "must be a multiple of the member's alignment", "offset", ""); + error(memberLoc, "must be a multiple of the member's alignment", "offset", + "(layout offset = %d | member alignment = %d)", memberQualifier.layoutOffset, memberAlignment); // GLSL: "It is a compile-time error to specify an offset that is smaller than the offset of the previous // member in the block or that lies within the previous member of the block" @@ -8885,7 +9179,7 @@ void TParseContext::addQualifierToExisting(const TSourceLoc& loc, TQualifier qua // TParseContext::declareBlock. if (!symbol && qualifier.hasBufferReference()) { TTypeList typeList; - TType blockType(&typeList, identifier, qualifier);; + TType blockType(&typeList, identifier, qualifier); TType blockNameType(EbtReference, blockType, identifier); TVariable* blockNameVar = new TVariable(&identifier, blockNameType, true); if (! symbolTable.insert(*blockNameVar)) { @@ -8964,9 +9258,8 @@ void TParseContext::invariantCheck(const TSourceLoc& loc, const TQualifier& qual // void TParseContext::updateStandaloneQualifierDefaults(const TSourceLoc& loc, const TPublicType& publicType) { -#ifndef GLSLANG_WEB if (publicType.shaderQualifiers.vertices != TQualifier::layoutNotSet) { - assert(language == EShLangTessControl || language == EShLangGeometry || language == EShLangMeshNV); + assert(language == EShLangTessControl || language == EShLangGeometry || language == EShLangMesh); const char* id = (language == EShLangTessControl) ? "vertices" : "max_vertices"; if (publicType.qualifier.storage != EvqVaryingOut) @@ -8978,7 +9271,7 @@ void TParseContext::updateStandaloneQualifierDefaults(const TSourceLoc& loc, con checkIoArraysConsistency(loc); } if (publicType.shaderQualifiers.primitives != TQualifier::layoutNotSet) { - assert(language == EShLangMeshNV); + assert(language == EShLangMesh); const char* id = "max_primitives"; if (publicType.qualifier.storage != EvqVaryingOut) @@ -9002,7 +9295,7 @@ void TParseContext::updateStandaloneQualifierDefaults(const TSourceLoc& loc, con case ElgTrianglesAdjacency: case ElgQuads: case ElgIsolines: - if (language == EShLangMeshNV) { + if (language == EShLangMesh) { error(loc, "cannot apply to input", TQualifier::getGeometryString(publicType.shaderQualifiers.geometry), ""); break; } @@ -9019,7 +9312,7 @@ void TParseContext::updateStandaloneQualifierDefaults(const TSourceLoc& loc, con switch (publicType.shaderQualifiers.geometry) { case ElgLines: case ElgTriangles: - if (language != EShLangMeshNV) { + if (language != EShLangMesh) { error(loc, "cannot apply to 'out'", TQualifier::getGeometryString(publicType.shaderQualifiers.geometry), ""); break; } @@ -9056,7 +9349,7 @@ void TParseContext::updateStandaloneQualifierDefaults(const TSourceLoc& loc, con else error(loc, "can only apply to 'in'", "point_mode", ""); } -#endif + for (int i = 0; i < 3; ++i) { if (publicType.shaderQualifiers.localSizeNotDefault[i]) { if (publicType.qualifier.storage == EvqVaryingIn) { @@ -9073,29 +9366,57 @@ void TParseContext::updateStandaloneQualifierDefaults(const TSourceLoc& loc, con } if (intermediate.getLocalSize(i) > (unsigned int)max) error(loc, "too large; see gl_MaxComputeWorkGroupSize", "local_size", ""); - } -#ifndef GLSLANG_WEB - else if (language == EShLangMeshNV) { + } else if (language == EShLangMesh) { switch (i) { - case 0: max = resources.maxMeshWorkGroupSizeX_NV; break; - case 1: max = resources.maxMeshWorkGroupSizeY_NV; break; - case 2: max = resources.maxMeshWorkGroupSizeZ_NV; break; + case 0: + max = extensionTurnedOn(E_GL_EXT_mesh_shader) ? + resources.maxMeshWorkGroupSizeX_EXT : + resources.maxMeshWorkGroupSizeX_NV; + break; + case 1: + max = extensionTurnedOn(E_GL_EXT_mesh_shader) ? + resources.maxMeshWorkGroupSizeY_EXT : + resources.maxMeshWorkGroupSizeY_NV ; + break; + case 2: + max = extensionTurnedOn(E_GL_EXT_mesh_shader) ? + resources.maxMeshWorkGroupSizeZ_EXT : + resources.maxMeshWorkGroupSizeZ_NV ; + break; default: break; } - if (intermediate.getLocalSize(i) > (unsigned int)max) - error(loc, "too large; see gl_MaxMeshWorkGroupSizeNV", "local_size", ""); - } else if (language == EShLangTaskNV) { + if (intermediate.getLocalSize(i) > (unsigned int)max) { + TString maxsErrtring = "too large, see "; + maxsErrtring.append(extensionTurnedOn(E_GL_EXT_mesh_shader) ? + "gl_MaxMeshWorkGroupSizeEXT" : "gl_MaxMeshWorkGroupSizeNV"); + error(loc, maxsErrtring.c_str(), "local_size", ""); + } + } else if (language == EShLangTask) { switch (i) { - case 0: max = resources.maxTaskWorkGroupSizeX_NV; break; - case 1: max = resources.maxTaskWorkGroupSizeY_NV; break; - case 2: max = resources.maxTaskWorkGroupSizeZ_NV; break; + case 0: + max = extensionTurnedOn(E_GL_EXT_mesh_shader) ? + resources.maxTaskWorkGroupSizeX_EXT : + resources.maxTaskWorkGroupSizeX_NV; + break; + case 1: + max = extensionTurnedOn(E_GL_EXT_mesh_shader) ? + resources.maxTaskWorkGroupSizeY_EXT: + resources.maxTaskWorkGroupSizeY_NV; + break; + case 2: + max = extensionTurnedOn(E_GL_EXT_mesh_shader) ? + resources.maxTaskWorkGroupSizeZ_EXT: + resources.maxTaskWorkGroupSizeZ_NV; + break; default: break; } - if (intermediate.getLocalSize(i) > (unsigned int)max) - error(loc, "too large; see gl_MaxTaskWorkGroupSizeNV", "local_size", ""); - } -#endif - else { + if (intermediate.getLocalSize(i) > (unsigned int)max) { + TString maxsErrtring = "too large, see "; + maxsErrtring.append(extensionTurnedOn(E_GL_EXT_mesh_shader) ? + "gl_MaxTaskWorkGroupSizeEXT" : "gl_MaxTaskWorkGroupSizeNV"); + error(loc, maxsErrtring.c_str(), "local_size", ""); + } + } else { assert(0); } @@ -9120,7 +9441,6 @@ void TParseContext::updateStandaloneQualifierDefaults(const TSourceLoc& loc, con } } -#ifndef GLSLANG_WEB if (publicType.shaderQualifiers.earlyFragmentTests) { if (publicType.qualifier.storage == EvqVaryingIn) intermediate.setEarlyFragmentTests(); @@ -9139,6 +9459,24 @@ void TParseContext::updateStandaloneQualifierDefaults(const TSourceLoc& loc, con else error(loc, "can only apply to 'in'", "post_coverage_coverage", ""); } + if (publicType.shaderQualifiers.nonCoherentColorAttachmentReadEXT) { + if (publicType.qualifier.storage == EvqVaryingIn) + intermediate.setNonCoherentColorAttachmentReadEXT(); + else + error(loc, "can only apply to 'in'", "non_coherent_color_attachment_readEXT", ""); + } + if (publicType.shaderQualifiers.nonCoherentDepthAttachmentReadEXT) { + if (publicType.qualifier.storage == EvqVaryingIn) + intermediate.setNonCoherentDepthAttachmentReadEXT(); + else + error(loc, "can only apply to 'in'", "non_coherent_depth_attachment_readEXT", ""); + } + if (publicType.shaderQualifiers.nonCoherentStencilAttachmentReadEXT) { + if (publicType.qualifier.storage == EvqVaryingIn) + intermediate.setNonCoherentStencilAttachmentReadEXT(); + else + error(loc, "can only apply to 'in'", "non_coherent_stencil_attachment_readEXT", ""); + } if (publicType.shaderQualifiers.hasBlendEquation()) { if (publicType.qualifier.storage != EvqVaryingOut) error(loc, "can only apply to 'out'", "blend equation", ""); @@ -9181,7 +9519,7 @@ void TParseContext::updateStandaloneQualifierDefaults(const TSourceLoc& loc, con error(loc, "can only apply to 'in'", "derivative_group_linearNV", ""); } // Check mesh out array sizes, once all the necessary out qualifiers are defined. - if ((language == EShLangMeshNV) && + if ((language == EShLangMesh) && (intermediate.getVertices() != TQualifier::layoutNotSet) && (intermediate.getPrimitives() != TQualifier::layoutNotSet) && (intermediate.getOutputPrimitive() != ElgNone)) @@ -9198,7 +9536,7 @@ void TParseContext::updateStandaloneQualifierDefaults(const TSourceLoc& loc, con // Exit early as further checks are not valid return; } -#endif + const TQualifier& qualifier = publicType.qualifier; if (qualifier.isAuxiliary() || @@ -9231,7 +9569,6 @@ void TParseContext::updateStandaloneQualifierDefaults(const TSourceLoc& loc, con case EvqVaryingIn: break; case EvqVaryingOut: -#ifndef GLSLANG_WEB if (qualifier.hasStream()) globalOutputDefaults.layoutStream = qualifier.layoutStream; if (qualifier.hasXfbBuffer()) @@ -9240,7 +9577,6 @@ void TParseContext::updateStandaloneQualifierDefaults(const TSourceLoc& loc, con if (! intermediate.setXfbBufferStride(globalOutputDefaults.layoutXfbBuffer, qualifier.layoutXfbStride)) error(loc, "all stride settings must match for xfb buffer", "xfb_stride", "%d", qualifier.layoutXfbBuffer); } -#endif break; case EvqShared: if (qualifier.hasMatrix()) @@ -9395,5 +9731,38 @@ const TTypeList* TParseContext::recordStructCopy(TStructRecord& record, const TT return originStruct; } -} // end namespace glslang +TLayoutFormat TParseContext::mapLegacyLayoutFormat(TLayoutFormat legacyLayoutFormat, TBasicType imageType) +{ + TLayoutFormat layoutFormat = ElfNone; + if (imageType == EbtFloat) { + switch (legacyLayoutFormat) { + case ElfSize1x16: layoutFormat = ElfR16f; break; + case ElfSize1x32: layoutFormat = ElfR32f; break; + case ElfSize2x32: layoutFormat = ElfRg32f; break; + case ElfSize4x32: layoutFormat = ElfRgba32f; break; + default: break; + } + } else if (imageType == EbtUint) { + switch (legacyLayoutFormat) { + case ElfSize1x8: layoutFormat = ElfR8ui; break; + case ElfSize1x16: layoutFormat = ElfR16ui; break; + case ElfSize1x32: layoutFormat = ElfR32ui; break; + case ElfSize2x32: layoutFormat = ElfRg32ui; break; + case ElfSize4x32: layoutFormat = ElfRgba32ui; break; + default: break; + } + } else if (imageType == EbtInt) { + switch (legacyLayoutFormat) { + case ElfSize1x8: layoutFormat = ElfR8i; break; + case ElfSize1x16: layoutFormat = ElfR16i; break; + case ElfSize1x32: layoutFormat = ElfR32i; break; + case ElfSize2x32: layoutFormat = ElfRg32i; break; + case ElfSize4x32: layoutFormat = ElfRgba32i; break; + default: break; + } + } + return layoutFormat; +} + +} // end namespace glslang diff --git a/glslang/MachineIndependent/ParseHelper.h b/glslang/MachineIndependent/ParseHelper.h index 885fd90810..05ebca275d 100644 --- a/glslang/MachineIndependent/ParseHelper.h +++ b/glslang/MachineIndependent/ParseHelper.h @@ -95,12 +95,15 @@ class TParseContextBase : public TParseVersions { globalUniformSet(TQualifier::layoutSetEnd), atomicCounterBlockSet(TQualifier::layoutSetEnd) { + // use storage buffer on SPIR-V 1.3 and up + if (spvVersion.spv >= EShTargetSpv_1_3) + intermediate.setUseStorageBuffer(); + if (entryPoint != nullptr) sourceEntryPointName = *entryPoint; } virtual ~TParseContextBase() { } -#if !defined(GLSLANG_WEB) || defined(GLSLANG_WEB_DEVEL) virtual void C_DECL error(const TSourceLoc&, const char* szReason, const char* szToken, const char* szExtraInfoFormat, ...); virtual void C_DECL warn(const TSourceLoc&, const char* szReason, const char* szToken, @@ -109,7 +112,6 @@ class TParseContextBase : public TParseVersions { const char* szExtraInfoFormat, ...); virtual void C_DECL ppWarn(const TSourceLoc&, const char* szReason, const char* szToken, const char* szExtraInfoFormat, ...); -#endif virtual void setLimits(const TBuiltInResource&) = 0; @@ -194,6 +196,7 @@ class TParseContextBase : public TParseVersions { struct TPragma contextPragma; int beginInvocationInterlockCount; int endInvocationInterlockCount; + bool compileOnly = false; protected: TParseContextBase(TParseContextBase&); @@ -327,10 +330,8 @@ class TParseContext : public TParseContextBase { TIntermTyped* handleBracketDereference(const TSourceLoc&, TIntermTyped* base, TIntermTyped* index); void handleIndexLimits(const TSourceLoc&, TIntermTyped* base, TIntermTyped* index); -#ifndef GLSLANG_WEB void makeEditable(TSymbol*&) override; void ioArrayCheck(const TSourceLoc&, const TType&, const TString& identifier); -#endif bool isIoResizeArray(const TType&) const; void fixIoArraySize(const TSourceLoc&, TType&); void handleIoResizeArrayAccess(const TSourceLoc&, TIntermTyped* base); @@ -378,7 +379,7 @@ class TParseContext : public TParseContextBase { void globalCheck(const TSourceLoc&, const char* token); bool constructorError(const TSourceLoc&, TIntermNode*, TFunction&, TOperator, TType&); bool constructorTextureSamplerError(const TSourceLoc&, const TFunction&); - void arraySizeCheck(const TSourceLoc&, TIntermTyped* expr, TArraySize&, const char *sizeType); + void arraySizeCheck(const TSourceLoc&, TIntermTyped* expr, TArraySize&, const char *sizeType, const bool allowZero = false); bool arrayQualifierError(const TSourceLoc&, const TQualifier&); bool arrayError(const TSourceLoc&, const TType&); void arraySizeRequiredCheck(const TSourceLoc&, const TArraySizes&); @@ -393,14 +394,14 @@ class TParseContext : public TParseContextBase { void accStructCheck(const TSourceLoc & loc, const TType & type, const TString & identifier); void transparentOpaqueCheck(const TSourceLoc&, const TType&, const TString& identifier); void memberQualifierCheck(glslang::TPublicType&); - void globalQualifierFixCheck(const TSourceLoc&, TQualifier&, bool isMemberCheck = false); + void globalQualifierFixCheck(const TSourceLoc&, TQualifier&, bool isMemberCheck = false, const TPublicType* publicType = nullptr); void globalQualifierTypeCheck(const TSourceLoc&, const TQualifier&, const TPublicType&); bool structQualifierErrorCheck(const TSourceLoc&, const TPublicType& pType); void mergeQualifiers(const TSourceLoc&, TQualifier& dst, const TQualifier& src, bool force); void setDefaultPrecision(const TSourceLoc&, TPublicType&, TPrecisionQualifier); int computeSamplerTypeIndex(TSampler&); TPrecisionQualifier getDefaultPrecision(TPublicType&); - void precisionQualifierCheck(const TSourceLoc&, TBasicType, TQualifier&); + void precisionQualifierCheck(const TSourceLoc&, TBasicType, TQualifier&, bool isCoopMat); void parameterTypeCheck(const TSourceLoc&, TStorageQualifier qualifier, const TType& type); bool containsFieldWithBasicType(const TType& type ,TBasicType basicType); TSymbol* redeclareBuiltinVariable(const TSourceLoc&, const TString&, const TQualifier&, const TShaderQualifiers&); @@ -418,6 +419,7 @@ class TParseContext : public TParseContextBase { void inductiveLoopCheck(const TSourceLoc&, TIntermNode* init, TIntermLoop* loop); void arrayLimitCheck(const TSourceLoc&, const TString&, int size); void limitCheck(const TSourceLoc&, int value, const char* limit, const char* feature); + void coopMatTypeParametersCheck(const TSourceLoc&, const TPublicType&); void inductiveLoopBodyCheck(TIntermNode*, long long loopIndexId, TSymbolTable&); void constantIndexExpressionCheck(TIntermNode*); @@ -438,12 +440,12 @@ class TParseContext : public TParseContextBase { const TFunction* findFunction400(const TSourceLoc& loc, const TFunction& call, bool& builtIn); const TFunction* findFunctionExplicitTypes(const TSourceLoc& loc, const TFunction& call, bool& builtIn); void declareTypeDefaults(const TSourceLoc&, const TPublicType&); - TIntermNode* declareVariable(const TSourceLoc&, TString& identifier, const TPublicType&, TArraySizes* typeArray = 0, TIntermTyped* initializer = 0); + TIntermNode* declareVariable(const TSourceLoc&, TString& identifier, const TPublicType&, TArraySizes* typeArray = nullptr, TIntermTyped* initializer = nullptr); TIntermTyped* addConstructor(const TSourceLoc&, TIntermNode*, const TType&); TIntermTyped* constructAggregate(TIntermNode*, const TType&, int, const TSourceLoc&); TIntermTyped* constructBuiltIn(const TType&, TOperator, TIntermTyped*, const TSourceLoc&, bool subset); void inheritMemoryQualifiers(const TQualifier& from, TQualifier& to); - void declareBlock(const TSourceLoc&, TTypeList& typeList, const TString* instanceName = 0, TArraySizes* arraySizes = 0); + void declareBlock(const TSourceLoc&, TTypeList& typeList, const TString* instanceName = nullptr, TArraySizes* arraySizes = nullptr); void blockStorageRemap(const TSourceLoc&, const TString*, TQualifier&); void blockStageIoCheck(const TSourceLoc&, const TQualifier&); void blockQualifierCheck(const TSourceLoc&, const TQualifier&, bool instanceName); @@ -456,11 +458,12 @@ class TParseContext : public TParseContextBase { void addQualifierToExisting(const TSourceLoc&, TQualifier, TIdentifierList&); void invariantCheck(const TSourceLoc&, const TQualifier&); void updateStandaloneQualifierDefaults(const TSourceLoc&, const TPublicType&); + void updateBindlessQualifier(TType& memberType); void wrapupSwitchSubsequence(TIntermAggregate* statements, TIntermNode* branchNode); TIntermNode* addSwitch(const TSourceLoc&, TIntermTyped* expression, TIntermAggregate* body); const TTypeList* recordStructCopy(TStructRecord&, const TType*, const TType*); + TLayoutFormat mapLegacyLayoutFormat(TLayoutFormat legacyLayoutFormat, TBasicType imageType); -#ifndef GLSLANG_WEB TAttributeType attributeFromName(const TString& name) const; TAttributes* makeAttributes(const TString& identifier) const; TAttributes* makeAttributes(const TString& identifier, TIntermNode* node) const; @@ -480,14 +483,13 @@ class TParseContext : public TParseContextBase { TSpirvRequirement* mergeSpirvRequirements(const TSourceLoc& loc, TSpirvRequirement* spirvReq1, TSpirvRequirement* spirvReq2); TSpirvTypeParameters* makeSpirvTypeParameters(const TSourceLoc& loc, const TIntermConstantUnion* constant); + TSpirvTypeParameters* makeSpirvTypeParameters(const TSourceLoc& loc, const TPublicType& type); TSpirvTypeParameters* mergeSpirvTypeParameters(TSpirvTypeParameters* spirvTypeParams1, TSpirvTypeParameters* spirvTypeParams2); TSpirvInstruction* makeSpirvInstruction(const TSourceLoc& loc, const TString& name, const TString& value); TSpirvInstruction* makeSpirvInstruction(const TSourceLoc& loc, const TString& name, int value); TSpirvInstruction* mergeSpirvInstruction(const TSourceLoc& loc, TSpirvInstruction* spirvInst1, TSpirvInstruction* spirvInst2); -#endif - void checkAndResizeMeshViewDim(const TSourceLoc&, TType&, bool isBlockMember); protected: @@ -500,9 +502,7 @@ class TParseContext : public TParseContextBase { bool isRuntimeLength(const TIntermTyped&) const; TIntermNode* executeInitializer(const TSourceLoc&, TIntermTyped* initializer, TVariable* variable); TIntermTyped* convertInitializerList(const TSourceLoc&, const TType&, TIntermTyped* initializer); -#ifndef GLSLANG_WEB void finish() override; -#endif virtual const char* getGlobalUniformBlockName() const override; virtual void finalizeGlobalUniformBlockLayout(TVariable&) override; @@ -539,7 +539,6 @@ class TParseContext : public TParseContextBase { TQualifier globalOutputDefaults; TQualifier globalSharedDefaults; TString currentCaller; // name of last function body entered (not valid when at global scope) -#ifndef GLSLANG_WEB int* atomicUintOffsets; // to become an array of the right size to hold an offset per binding point bool anyIndexLimits; TIdSetType inductiveLoopIds; @@ -580,7 +579,6 @@ class TParseContext : public TParseContextBase { // array-sizing declarations // TVector ioArraySymbolResizeList; -#endif }; } // end namespace glslang diff --git a/glslang/MachineIndependent/PoolAlloc.cpp b/glslang/MachineIndependent/PoolAlloc.cpp index 84c40f4e79..5d7173c9db 100644 --- a/glslang/MachineIndependent/PoolAlloc.cpp +++ b/glslang/MachineIndependent/PoolAlloc.cpp @@ -35,34 +35,28 @@ #include "../Include/Common.h" #include "../Include/PoolAlloc.h" -#include "../Include/InitializeGlobals.h" -#include "../OSDependent/osinclude.h" - namespace glslang { -// Process-wide TLS index -OS_TLSIndex PoolIndex; +namespace { +thread_local TPoolAllocator* threadPoolAllocator = nullptr; + +TPoolAllocator* GetDefaultThreadPoolAllocator() +{ + thread_local TPoolAllocator defaultAllocator; + return &defaultAllocator; +} +} // anonymous namespace // Return the thread-specific current pool. TPoolAllocator& GetThreadPoolAllocator() { - return *static_cast(OS_GetTLSValue(PoolIndex)); + return *(threadPoolAllocator ? threadPoolAllocator : GetDefaultThreadPoolAllocator()); } // Set the thread-specific current pool. void SetThreadPoolAllocator(TPoolAllocator* poolAllocator) { - OS_SetTLSValue(PoolIndex, poolAllocator); -} - -// Process-wide set up of the TLS pool storage. -bool InitializePoolIndex() -{ - // Allocate a TLS index. - if ((PoolIndex = OS_AllocTLSIndex()) == OS_INVALID_TLS_INDEX) - return false; - - return true; + threadPoolAllocator = poolAllocator; } // @@ -137,16 +131,6 @@ TPoolAllocator::~TPoolAllocator() } } -const unsigned char TAllocation::guardBlockBeginVal = 0xfb; -const unsigned char TAllocation::guardBlockEndVal = 0xfe; -const unsigned char TAllocation::userDataFill = 0xcd; - -# ifdef GUARD_BLOCKS - const size_t TAllocation::guardBlockSize = 16; -# else - const size_t TAllocation::guardBlockSize = 0; -# endif - // // Check a single guard block for damage // @@ -267,8 +251,8 @@ void* TPoolAllocator::allocate(size_t numBytes) // size_t numBytesToAlloc = allocationSize + headerSkip; tHeader* memory = reinterpret_cast(::new char[numBytesToAlloc]); - if (memory == 0) - return 0; + if (memory == nullptr) + return nullptr; // Use placement-new to initialize header new(memory) tHeader(inUseList, (numBytesToAlloc + pageSize - 1) / pageSize); @@ -289,8 +273,8 @@ void* TPoolAllocator::allocate(size_t numBytes) freeList = freeList->nextPage; } else { memory = reinterpret_cast(::new char[pageSize]); - if (memory == 0) - return 0; + if (memory == nullptr) + return nullptr; } // Use placement-new to initialize header @@ -308,7 +292,7 @@ void* TPoolAllocator::allocate(size_t numBytes) // void TAllocation::checkAllocList() const { - for (const TAllocation* alloc = this; alloc != 0; alloc = alloc->prevAlloc) + for (const TAllocation* alloc = this; alloc != nullptr; alloc = alloc->prevAlloc) alloc->check(); } diff --git a/glslang/MachineIndependent/Scan.cpp b/glslang/MachineIndependent/Scan.cpp index f53677f929..5c7e2e662e 100644 --- a/glslang/MachineIndependent/Scan.cpp +++ b/glslang/MachineIndependent/Scan.cpp @@ -324,11 +324,9 @@ struct str_hash // A single global usable by all threads, by all versions, by all languages. // After a single process-level initialization, this is read only and thread safe std::unordered_map* KeywordMap = nullptr; -#ifndef GLSLANG_WEB std::unordered_set* ReservedSet = nullptr; -#endif -}; +} namespace glslang { @@ -343,6 +341,7 @@ void TScanContext::fillInKeywordMap() (*KeywordMap)["const"] = CONST; (*KeywordMap)["uniform"] = UNIFORM; + (*KeywordMap)["tileImageEXT"] = TILEIMAGEEXT; (*KeywordMap)["buffer"] = BUFFER; (*KeywordMap)["in"] = IN; (*KeywordMap)["out"] = OUT; @@ -408,7 +407,6 @@ void TScanContext::fillInKeywordMap() (*KeywordMap)["uvec3"] = UVEC3; (*KeywordMap)["uvec4"] = UVEC4; -#ifndef GLSLANG_WEB (*KeywordMap)["nonuniformEXT"] = NONUNIFORM; (*KeywordMap)["demote"] = DEMOTE; (*KeywordMap)["attribute"] = ATTRIBUTE; @@ -598,7 +596,6 @@ void TScanContext::fillInKeywordMap() (*KeywordMap)["spirv_storage_class"] = SPIRV_STORAGE_CLASS; (*KeywordMap)["spirv_by_reference"] = SPIRV_BY_REFERENCE; (*KeywordMap)["spirv_literal"] = SPIRV_LITERAL; -#endif (*KeywordMap)["sampler2D"] = SAMPLER2D; (*KeywordMap)["samplerCube"] = SAMPLERCUBE; @@ -632,7 +629,6 @@ void TScanContext::fillInKeywordMap() (*KeywordMap)["sampler"] = SAMPLER; (*KeywordMap)["samplerShadow"] = SAMPLERSHADOW; -#ifndef GLSLANG_WEB (*KeywordMap)["textureCubeArray"] = TEXTURECUBEARRAY; (*KeywordMap)["itextureCubeArray"] = ITEXTURECUBEARRAY; (*KeywordMap)["utextureCubeArray"] = UTEXTURECUBEARRAY; @@ -685,6 +681,10 @@ void TScanContext::fillInKeywordMap() (*KeywordMap)["texture2DRect"] = TEXTURE2DRECT; (*KeywordMap)["texture1DArray"] = TEXTURE1DARRAY; + (*KeywordMap)["attachmentEXT"] = ATTACHMENTEXT; + (*KeywordMap)["iattachmentEXT"] = IATTACHMENTEXT; + (*KeywordMap)["uattachmentEXT"] = UATTACHMENTEXT; + (*KeywordMap)["subpassInput"] = SUBPASSINPUT; (*KeywordMap)["subpassInputMS"] = SUBPASSINPUTMS; (*KeywordMap)["isubpassInput"] = ISUBPASSINPUT; @@ -758,11 +758,18 @@ void TScanContext::fillInKeywordMap() (*KeywordMap)["perprimitiveNV"] = PERPRIMITIVENV; (*KeywordMap)["perviewNV"] = PERVIEWNV; (*KeywordMap)["taskNV"] = PERTASKNV; + (*KeywordMap)["perprimitiveEXT"] = PERPRIMITIVEEXT; + (*KeywordMap)["taskPayloadSharedEXT"] = TASKPAYLOADWORKGROUPEXT; (*KeywordMap)["fcoopmatNV"] = FCOOPMATNV; (*KeywordMap)["icoopmatNV"] = ICOOPMATNV; (*KeywordMap)["ucoopmatNV"] = UCOOPMATNV; + (*KeywordMap)["coopmat"] = COOPMAT; + + (*KeywordMap)["hitObjectNV"] = HITOBJECTNV; + (*KeywordMap)["hitObjectAttributeNV"] = HITOBJECTATTRNV; + ReservedSet = new std::unordered_set; ReservedSet->insert("common"); @@ -802,17 +809,14 @@ void TScanContext::fillInKeywordMap() ReservedSet->insert("cast"); ReservedSet->insert("namespace"); ReservedSet->insert("using"); -#endif } void TScanContext::deleteKeywordMap() { delete KeywordMap; KeywordMap = nullptr; -#ifndef GLSLANG_WEB delete ReservedSet; ReservedSet = nullptr; -#endif } // Called by yylex to get the next token. @@ -893,14 +897,12 @@ int TScanContext::tokenize(TPpContext* pp, TParserToken& token) case PpAtomConstInt: parserToken->sType.lex.i = ppToken.ival; return INTCONSTANT; case PpAtomConstUint: parserToken->sType.lex.i = ppToken.ival; return UINTCONSTANT; case PpAtomConstFloat: parserToken->sType.lex.d = ppToken.dval; return FLOATCONSTANT; -#ifndef GLSLANG_WEB case PpAtomConstInt16: parserToken->sType.lex.i = ppToken.ival; return INT16CONSTANT; case PpAtomConstUint16: parserToken->sType.lex.i = ppToken.ival; return UINT16CONSTANT; case PpAtomConstInt64: parserToken->sType.lex.i64 = ppToken.i64val; return INT64CONSTANT; case PpAtomConstUint64: parserToken->sType.lex.i64 = ppToken.i64val; return UINT64CONSTANT; case PpAtomConstDouble: parserToken->sType.lex.d = ppToken.dval; return DOUBLECONSTANT; case PpAtomConstFloat16: parserToken->sType.lex.d = ppToken.dval; return FLOAT16CONSTANT; -#endif case PpAtomIdentifier: { int token = tokenizeIdentifier(); @@ -922,10 +924,8 @@ int TScanContext::tokenize(TPpContext* pp, TParserToken& token) int TScanContext::tokenizeIdentifier() { -#ifndef GLSLANG_WEB if (ReservedSet->find(tokenText) != ReservedSet->end()) return reservedWord(); -#endif auto it = KeywordMap->find(tokenText); if (it == KeywordMap->end()) { @@ -937,6 +937,7 @@ int TScanContext::tokenizeIdentifier() switch (keyword) { case CONST: case UNIFORM: + case TILEIMAGEEXT: case IN: case OUT: case INOUT: @@ -1047,7 +1048,6 @@ int TScanContext::tokenizeIdentifier() return identifierOrReserved(reserved); } -#ifndef GLSLANG_WEB case NOPERSPECTIVE: if (parseContext.extensionTurnedOn(E_GL_NV_shader_noperspective_interpolation)) return keyword; @@ -1073,12 +1073,18 @@ int TScanContext::tokenizeIdentifier() parseContext.extensionTurnedOn(E_GL_NV_ray_tracing)) return keyword; return identifierOrType(); + case ACCSTRUCTEXT: + if (parseContext.symbolTable.atBuiltInLevel() || + parseContext.extensionTurnedOn(E_GL_EXT_ray_tracing) || + parseContext.extensionTurnedOn(E_GL_EXT_ray_query) || + parseContext.extensionTurnedOn(E_GL_NV_displacement_micromap)) + return keyword; + return identifierOrType(); case PAYLOADEXT: case PAYLOADINEXT: case HITATTREXT: case CALLDATAEXT: case CALLDATAINEXT: - case ACCSTRUCTEXT: if (parseContext.symbolTable.atBuiltInLevel() || parseContext.extensionTurnedOn(E_GL_EXT_ray_tracing) || parseContext.extensionTurnedOn(E_GL_EXT_ray_query)) @@ -1134,7 +1140,7 @@ int TScanContext::tokenizeIdentifier() case SUBROUTINE: return es30ReservedFromGLSL(400); -#endif + case SHARED: if ((parseContext.isEsProfile() && parseContext.version < 300) || (!parseContext.isEsProfile() && parseContext.version < 140)) @@ -1169,7 +1175,6 @@ int TScanContext::tokenizeIdentifier() case MAT4X4: return matNxM(); -#ifndef GLSLANG_WEB case DMAT2: case DMAT3: case DMAT4: @@ -1474,7 +1479,6 @@ int TScanContext::tokenizeIdentifier() return keyword; else return identifierOrType(); -#endif case UINT: case UVEC2: @@ -1529,7 +1533,6 @@ int TScanContext::tokenizeIdentifier() else return identifierOrType(); -#ifndef GLSLANG_WEB case ISAMPLER1D: case ISAMPLER1DARRAY: case SAMPLER1DARRAYSHADOW: @@ -1653,6 +1656,9 @@ int TScanContext::tokenizeIdentifier() case ISUBPASSINPUTMS: case USUBPASSINPUT: case USUBPASSINPUTMS: + case ATTACHMENTEXT: + case IATTACHMENTEXT: + case UATTACHMENTEXT: if (parseContext.spvVersion.vulkan > 0) return keyword; else @@ -1740,12 +1746,18 @@ int TScanContext::tokenizeIdentifier() case PERPRIMITIVENV: case PERVIEWNV: case PERTASKNV: - if ((!parseContext.isEsProfile() && parseContext.version >= 450) || - (parseContext.isEsProfile() && parseContext.version >= 320) || + if (parseContext.symbolTable.atBuiltInLevel() || parseContext.extensionTurnedOn(E_GL_NV_mesh_shader)) return keyword; return identifierOrType(); + case PERPRIMITIVEEXT: + case TASKPAYLOADWORKGROUPEXT: + if (parseContext.symbolTable.atBuiltInLevel() || + parseContext.extensionTurnedOn(E_GL_EXT_mesh_shader)) + return keyword; + return identifierOrType(); + case FCOOPMATNV: afterType = true; if (parseContext.symbolTable.atBuiltInLevel() || @@ -1761,6 +1773,13 @@ int TScanContext::tokenizeIdentifier() return keyword; return identifierOrType(); + case COOPMAT: + afterType = true; + if (parseContext.symbolTable.atBuiltInLevel() || + parseContext.extensionTurnedOn(E_GL_KHR_cooperative_matrix)) + return keyword; + return identifierOrType(); + case DEMOTE: if (parseContext.extensionTurnedOn(E_GL_EXT_demote_to_helper_invocation)) return keyword; @@ -1781,7 +1800,20 @@ int TScanContext::tokenizeIdentifier() parseContext.extensionTurnedOn(E_GL_EXT_spirv_intrinsics)) return keyword; return identifierOrType(); -#endif + + case HITOBJECTNV: + if (parseContext.symbolTable.atBuiltInLevel() || + (!parseContext.isEsProfile() && parseContext.version >= 460 + && parseContext.extensionTurnedOn(E_GL_NV_shader_invocation_reorder))) + return keyword; + return identifierOrType(); + + case HITOBJECTATTRNV: + if (parseContext.symbolTable.atBuiltInLevel() || + (!parseContext.isEsProfile() && parseContext.version >= 460 + && parseContext.extensionTurnedOn(E_GL_NV_shader_invocation_reorder))) + return keyword; + return identifierOrType(); default: parseContext.infoSink.info.message(EPrefixInternalError, "Unknown glslang keyword", loc); diff --git a/glslang/MachineIndependent/ShaderLang.cpp b/glslang/MachineIndependent/ShaderLang.cpp index a5ba40e6d9..9a42acae91 100644 --- a/glslang/MachineIndependent/ShaderLang.cpp +++ b/glslang/MachineIndependent/ShaderLang.cpp @@ -45,6 +45,7 @@ #include #include #include +#include #include "SymbolTable.h" #include "ParseHelper.h" #include "Scan.h" @@ -81,6 +82,9 @@ namespace { // anonymous namespace for file-local functions and symbols // Shared global; access should be protected by a global mutex/critical section. int NumberOfClients = 0; +// global initialization lock +std::mutex init_lock; + using namespace glslang; // Create a language specific version of parseables. @@ -295,14 +299,6 @@ void InitializeStageSymbolTable(TBuiltInParseables& builtInParseables, int versi EShLanguage language, EShSource source, TInfoSink& infoSink, TSymbolTable** commonTable, TSymbolTable** symbolTables) { -#ifdef GLSLANG_WEB - profile = EEsProfile; - version = 310; -#elif defined(GLSLANG_ANGLE) - profile = ECoreProfile; - version = 450; -#endif - (*symbolTables[language]).adoptLevels(*commonTable[CommonIndex(profile, language)]); InitializeSymbolTable(builtInParseables.getStageString(language), version, profile, spvVersion, language, source, infoSink, *symbolTables[language]); @@ -319,14 +315,6 @@ void InitializeStageSymbolTable(TBuiltInParseables& builtInParseables, int versi // bool InitializeSymbolTables(TInfoSink& infoSink, TSymbolTable** commonTable, TSymbolTable** symbolTables, int version, EProfile profile, const SpvVersion& spvVersion, EShSource source) { -#ifdef GLSLANG_WEB - profile = EEsProfile; - version = 310; -#elif defined(GLSLANG_ANGLE) - profile = ECoreProfile; - version = 450; -#endif - std::unique_ptr builtInParseables(CreateBuiltInParseables(infoSink, source)); if (builtInParseables == nullptr) @@ -349,7 +337,6 @@ bool InitializeSymbolTables(TInfoSink& infoSink, TSymbolTable** commonTable, TS InitializeStageSymbolTable(*builtInParseables, version, profile, spvVersion, EShLangFragment, source, infoSink, commonTable, symbolTables); -#ifndef GLSLANG_WEB // check for tessellation if ((profile != EEsProfile && version >= 150) || (profile == EEsProfile && version >= 310)) { @@ -371,7 +358,6 @@ bool InitializeSymbolTables(TInfoSink& infoSink, TSymbolTable** commonTable, TS InitializeStageSymbolTable(*builtInParseables, version, profile, spvVersion, EShLangCompute, source, infoSink, commonTable, symbolTables); -#ifndef GLSLANG_ANGLE // check for ray tracing stages if (profile != EEsProfile && version >= 450) { InitializeStageSymbolTable(*builtInParseables, version, profile, spvVersion, EShLangRayGen, source, @@ -391,16 +377,14 @@ bool InitializeSymbolTables(TInfoSink& infoSink, TSymbolTable** commonTable, TS // check for mesh if ((profile != EEsProfile && version >= 450) || (profile == EEsProfile && version >= 320)) - InitializeStageSymbolTable(*builtInParseables, version, profile, spvVersion, EShLangMeshNV, source, + InitializeStageSymbolTable(*builtInParseables, version, profile, spvVersion, EShLangMesh, source, infoSink, commonTable, symbolTables); // check for task if ((profile != EEsProfile && version >= 450) || (profile == EEsProfile && version >= 320)) - InitializeStageSymbolTable(*builtInParseables, version, profile, spvVersion, EShLangTaskNV, source, + InitializeStageSymbolTable(*builtInParseables, version, profile, spvVersion, EShLangTask, source, infoSink, commonTable, symbolTables); -#endif // !GLSLANG_ANGLE -#endif // !GLSLANG_WEB return true; } @@ -437,18 +421,15 @@ void SetupBuiltinSymbolTable(int version, EProfile profile, const SpvVersion& sp TInfoSink infoSink; // Make sure only one thread tries to do this at a time - glslang::GetGlobalLock(); + const std::lock_guard lock(init_lock); // See if it's already been done for this version/profile combination int versionIndex = MapVersionToIndex(version); int spvVersionIndex = MapSpvVersionToIndex(spvVersion); int profileIndex = MapProfileToIndex(profile); int sourceIndex = MapSourceToIndex(source); - if (CommonSymbolTable[versionIndex][spvVersionIndex][profileIndex][sourceIndex][EPcGeneral]) { - glslang::ReleaseGlobalLock(); - + if (CommonSymbolTable[versionIndex][spvVersionIndex][profileIndex][sourceIndex][EPcGeneral]) return; - } // Switch to a new pool TPoolAllocator& previousAllocator = GetThreadPoolAllocator(); @@ -495,20 +476,16 @@ void SetupBuiltinSymbolTable(int version, EProfile profile, const SpvVersion& sp delete builtInPoolAllocator; SetThreadPoolAllocator(&previousAllocator); - - glslang::ReleaseGlobalLock(); } // Function to Print all builtins void DumpBuiltinSymbolTable(TInfoSink& infoSink, const TSymbolTable& symbolTable) { -#if !defined(GLSLANG_WEB) && !defined(GLSLANG_ANGLE) infoSink.debug << "BuiltinSymbolTable {\n"; symbolTable.dump(infoSink, true); infoSink.debug << "}\n"; -#endif } // Return true if the shader was correctly specified for version/profile/stage. @@ -606,7 +583,6 @@ bool DeduceVersionProfile(TInfoSink& infoSink, EShLanguage stage, bool versionNo break; } -#if !defined(GLSLANG_WEB) && !defined(GLSLANG_ANGLE) // Correct for stage type... switch (stage) { case EShLangGeometry: @@ -650,8 +626,8 @@ bool DeduceVersionProfile(TInfoSink& infoSink, EShLanguage stage, bool versionNo version = 460; } break; - case EShLangMeshNV: - case EShLangTaskNV: + case EShLangMesh: + case EShLangTask: if ((profile == EEsProfile && version < 320) || (profile != EEsProfile && version < 450)) { correct = false; @@ -694,7 +670,6 @@ bool DeduceVersionProfile(TInfoSink& infoSink, EShLanguage stage, bool versionNo break; } } -#endif return correct; } @@ -821,7 +796,8 @@ bool ProcessDeferred( bool requireNonempty, TShader::Includer& includer, const std::string sourceEntryPointName = "", - const TEnvironment* environment = nullptr) // optional way of fully setting all versions, overriding the above + const TEnvironment* environment = nullptr, // optional way of fully setting all versions, overriding the above + bool compileOnly = false) { // This must be undone (.pop()) by the caller, after it finishes consuming the created tree. GetThreadPoolAllocator().push(); @@ -884,7 +860,6 @@ bool ProcessDeferred( : userInput.scanVersion(version, profile, versionNotFirstToken); bool versionNotFound = version == 0; if (forceDefaultVersionAndProfile && source == EShSourceGlsl) { -#if !defined(GLSLANG_WEB) && !defined(GLSLANG_ANGLE) if (! (messages & EShMsgSuppressWarnings) && ! versionNotFound && (version != defaultVersion || profile != defaultProfile)) { compiler->infoSink.info << "Warning, (version, profile) forced to be (" @@ -892,7 +867,7 @@ bool ProcessDeferred( << "), while in source code it is (" << version << ", " << ProfileName(profile) << ")\n"; } -#endif + if (versionNotFound) { versionNotFirstToken = false; versionNotFirst = false; @@ -907,16 +882,7 @@ bool ProcessDeferred( bool goodVersion = DeduceVersionProfile(compiler->infoSink, stage, versionNotFirst, defaultVersion, source, version, profile, spvVersion); -#ifdef GLSLANG_WEB - profile = EEsProfile; - version = 310; -#elif defined(GLSLANG_ANGLE) - profile = ECoreProfile; - version = 450; -#endif - bool versionWillBeError = (versionNotFound || (profile == EEsProfile && version >= 300 && versionNotFirst)); -#if !defined(GLSLANG_WEB) && !defined(GLSLANG_ANGLE) bool warnVersionNotFirst = false; if (! versionWillBeError && versionNotFirstToken) { if (messages & EShMsgRelaxedErrors) @@ -924,7 +890,6 @@ bool ProcessDeferred( else versionWillBeError = true; } -#endif intermediate.setSource(source); intermediate.setVersion(version); @@ -978,6 +943,7 @@ bool ProcessDeferred( std::unique_ptr parseContext(CreateParseContext(*symbolTable, intermediate, version, profile, source, stage, compiler->infoSink, spvVersion, forwardCompatible, messages, false, sourceEntryPointName)); + parseContext->compileOnly = compileOnly; TPpContext ppContext(*parseContext, names[numPre] ? names[numPre] : "", includer); // only GLSL (bison triggered, really) needs an externally set scan context @@ -989,13 +955,11 @@ bool ProcessDeferred( parseContext->setLimits(*resources); if (! goodVersion) parseContext->addError(); -#if !defined(GLSLANG_WEB) && !defined(GLSLANG_ANGLE) if (warnVersionNotFirst) { TSourceLoc loc; loc.init(); parseContext->warn(loc, "Illegal to have non-comment, non-whitespace tokens before #version", "#version", ""); } -#endif parseContext->initializeExtensionBehavior(); @@ -1027,8 +991,6 @@ bool ProcessDeferred( return success; } -#if !defined(GLSLANG_WEB) && !defined(GLSLANG_ANGLE) - // Responsible for keeping track of the most recent source string and line in // the preprocessor and outputting newlines appropriately if the source string // or line changes. @@ -1106,8 +1068,8 @@ struct DoPreprocessing { EShOptimizationLevel, EShMessages) { // This is a list of tokens that do not require a space before or after. - static const std::string unNeededSpaceTokens = ";()[]"; - static const std::string noSpaceBeforeTokens = ","; + static const std::string noNeededSpaceBeforeTokens = ";)[].,"; + static const std::string noNeededSpaceAfterTokens = ".(["; glslang::TPpToken ppToken; parseContext.setScanner(&input); @@ -1180,6 +1142,7 @@ struct DoPreprocessing { }); int lastToken = EndOfInput; // lastToken records the last token processed. + std::string lastTokenName; do { int token = ppContext.tokenize(ppToken); if (token == EndOfInput) @@ -1198,12 +1161,23 @@ struct DoPreprocessing { // Output a space in between tokens, but not at the start of a line, // and also not around special tokens. This helps with readability // and consistency. - if (!isNewString && !isNewLine && lastToken != EndOfInput && - (unNeededSpaceTokens.find((char)token) == std::string::npos) && - (unNeededSpaceTokens.find((char)lastToken) == std::string::npos) && - (noSpaceBeforeTokens.find((char)token) == std::string::npos)) { - outputBuffer += ' '; + if (!isNewString && !isNewLine && lastToken != EndOfInput) { + // left parenthesis need a leading space, except it is in a function-call-like context. + // examples: `for (xxx)`, `a * (b + c)`, `vec(2.0)`, `foo(x, y, z)` + if (token == '(') { + if (lastToken != PpAtomIdentifier || + lastTokenName == "if" || + lastTokenName == "for" || + lastTokenName == "while" || + lastTokenName == "switch") + outputBuffer += ' '; + } else if ((noNeededSpaceBeforeTokens.find((char)token) == std::string::npos) && + (noNeededSpaceAfterTokens.find((char)lastToken) == std::string::npos)) { + outputBuffer += ' '; + } } + if (token == PpAtomIdentifier) + lastTokenName = ppToken.name; lastToken = token; if (token == PpAtomConstString) outputBuffer += "\""; @@ -1225,8 +1199,6 @@ struct DoPreprocessing { std::string* outputString; }; -#endif - // DoFullParse is a valid ProcessingConext template argument for fully // parsing the shader. It populates the "intermediate" with the AST. struct DoFullParse{ @@ -1250,16 +1222,13 @@ struct DoFullParse{ parseContext.infoSink.info << parseContext.getNumErrors() << " compilation errors. No code generated.\n\n"; } -#ifndef GLSLANG_ANGLE if (messages & EShMsgAST) intermediate.output(parseContext.infoSink, true); -#endif return success; } }; -#if !defined(GLSLANG_WEB) && !defined(GLSLANG_ANGLE) // Take a single compilation unit, and run the preprocessor on it. // Return: True if there were no issues found in preprocessing, // False if during preprocessing any unknown version, pragmas or @@ -1294,7 +1263,6 @@ bool PreprocessDeferred( forwardCompatible, messages, intermediate, parser, false, includer, "", environment); } -#endif // // do a partial compile on the given strings for a single compilation unit @@ -1325,14 +1293,15 @@ bool CompileDeferred( TIntermediate& intermediate,// returned tree, etc. TShader::Includer& includer, const std::string sourceEntryPointName = "", - TEnvironment* environment = nullptr) + TEnvironment* environment = nullptr, + bool compileOnly = false) { DoFullParse parser; return ProcessDeferred(compiler, shaderStrings, numStrings, inputLengths, stringNames, preamble, optLevel, resources, defaultVersion, defaultProfile, forceDefaultVersionAndProfile, overrideVersion, forwardCompatible, messages, intermediate, parser, - true, includer, sourceEntryPointName, environment); + true, includer, sourceEntryPointName, environment, compileOnly); } } // end anonymous namespace for local functions @@ -1342,12 +1311,10 @@ bool CompileDeferred( // int ShInitialize() { - glslang::InitGlobalLock(); - if (! InitProcess()) return 0; - glslang::GetGlobalLock(); + const std::lock_guard lock(init_lock); ++NumberOfClients; if (PerProcessGPA == nullptr) @@ -1358,7 +1325,6 @@ int ShInitialize() glslang::HlslScanContext::fillInKeywordMap(); #endif - glslang::ReleaseGlobalLock(); return 1; } @@ -1370,7 +1336,7 @@ int ShInitialize() ShHandle ShConstructCompiler(const EShLanguage language, int debugOptions) { if (!InitThread()) - return 0; + return nullptr; TShHandleBase* base = static_cast(ConstructCompiler(language, debugOptions)); @@ -1380,7 +1346,7 @@ ShHandle ShConstructCompiler(const EShLanguage language, int debugOptions) ShHandle ShConstructLinker(const EShExecutable executable, int debugOptions) { if (!InitThread()) - return 0; + return nullptr; TShHandleBase* base = static_cast(ConstructLinker(executable, debugOptions)); @@ -1390,7 +1356,7 @@ ShHandle ShConstructLinker(const EShExecutable executable, int debugOptions) ShHandle ShConstructUniformMap() { if (!InitThread()) - return 0; + return nullptr; TShHandleBase* base = static_cast(ConstructUniformMap()); @@ -1399,7 +1365,7 @@ ShHandle ShConstructUniformMap() void ShDestruct(ShHandle handle) { - if (handle == 0) + if (handle == nullptr) return; TShHandleBase* base = static_cast(handle); @@ -1417,14 +1383,11 @@ void ShDestruct(ShHandle handle) // int ShFinalize() { - glslang::GetGlobalLock(); + const std::lock_guard lock(init_lock); --NumberOfClients; assert(NumberOfClients >= 0); - bool finalize = NumberOfClients == 0; - if (! finalize) { - glslang::ReleaseGlobalLock(); + if (NumberOfClients > 0) return 1; - } for (int version = 0; version < VersionCount; ++version) { for (int spvVersion = 0; spvVersion < SpvVersionCount; ++spvVersion) { @@ -1432,7 +1395,7 @@ int ShFinalize() for (int source = 0; source < SourceCount; ++source) { for (int stage = 0; stage < EShLangCount; ++stage) { delete SharedSymbolTables[version][spvVersion][p][source][stage]; - SharedSymbolTables[version][spvVersion][p][source][stage] = 0; + SharedSymbolTables[version][spvVersion][p][source][stage] = nullptr; } } } @@ -1445,7 +1408,7 @@ int ShFinalize() for (int source = 0; source < SourceCount; ++source) { for (int pc = 0; pc < EPcCount; ++pc) { delete CommonSymbolTable[version][spvVersion][p][source][pc]; - CommonSymbolTable[version][spvVersion][p][source][pc] = 0; + CommonSymbolTable[version][spvVersion][p][source][pc] = nullptr; } } } @@ -1462,7 +1425,6 @@ int ShFinalize() glslang::HlslScanContext::deleteKeywordMap(); #endif - glslang::ReleaseGlobalLock(); return 1; } @@ -1488,12 +1450,12 @@ int ShCompile( ) { // Map the generic handle to the C++ object - if (handle == 0) + if (handle == nullptr) return 0; TShHandleBase* base = reinterpret_cast(handle); TCompiler* compiler = base->getAsCompiler(); - if (compiler == 0) + if (compiler == nullptr) return 0; SetThreadPoolAllocator(compiler->getPool()); @@ -1533,13 +1495,13 @@ int ShLinkExt( const ShHandle compHandles[], const int numHandles) { - if (linkHandle == 0 || numHandles == 0) + if (linkHandle == nullptr || numHandles == 0) return 0; THandleList cObjects; for (int i = 0; i < numHandles; ++i) { - if (compHandles[i] == 0) + if (compHandles[i] == nullptr) return 0; TShHandleBase* base = reinterpret_cast(compHandles[i]); if (base->getAsLinker()) { @@ -1548,18 +1510,17 @@ int ShLinkExt( if (base->getAsCompiler()) cObjects.push_back(base->getAsCompiler()); - if (cObjects[i] == 0) + if (cObjects[i] == nullptr) return 0; } TShHandleBase* base = reinterpret_cast(linkHandle); TLinker* linker = static_cast(base->getAsLinker()); - SetThreadPoolAllocator(linker->getPool()); - - if (linker == 0) + if (linker == nullptr) return 0; - + + SetThreadPoolAllocator(linker->getPool()); linker->infoSink.info.erase(); for (int i = 0; i < numHandles; ++i) { @@ -1582,7 +1543,7 @@ int ShLinkExt( // void ShSetEncryptionMethod(ShHandle handle) { - if (handle == 0) + if (handle == nullptr) return; } @@ -1591,8 +1552,8 @@ void ShSetEncryptionMethod(ShHandle handle) // const char* ShGetInfoLog(const ShHandle handle) { - if (handle == 0) - return 0; + if (handle == nullptr) + return nullptr; TShHandleBase* base = static_cast(handle); TInfoSink* infoSink; @@ -1602,7 +1563,7 @@ const char* ShGetInfoLog(const ShHandle handle) else if (base->getAsLinker()) infoSink = &(base->getAsLinker()->getInfoSink()); else - return 0; + return nullptr; infoSink->info << infoSink->debug.c_str(); return infoSink->info.c_str(); @@ -1614,14 +1575,14 @@ const char* ShGetInfoLog(const ShHandle handle) // const void* ShGetExecutable(const ShHandle handle) { - if (handle == 0) - return 0; + if (handle == nullptr) + return nullptr; TShHandleBase* base = reinterpret_cast(handle); TLinker* linker = static_cast(base->getAsLinker()); - if (linker == 0) - return 0; + if (linker == nullptr) + return nullptr; return linker->getObjectCode(); } @@ -1636,13 +1597,13 @@ const void* ShGetExecutable(const ShHandle handle) // int ShSetVirtualAttributeBindings(const ShHandle handle, const ShBindingTable* table) { - if (handle == 0) + if (handle == nullptr) return 0; TShHandleBase* base = reinterpret_cast(handle); TLinker* linker = static_cast(base->getAsLinker()); - if (linker == 0) + if (linker == nullptr) return 0; linker->setAppAttributeBindings(table); @@ -1655,13 +1616,13 @@ int ShSetVirtualAttributeBindings(const ShHandle handle, const ShBindingTable* t // int ShSetFixedAttributeBindings(const ShHandle handle, const ShBindingTable* table) { - if (handle == 0) + if (handle == nullptr) return 0; TShHandleBase* base = reinterpret_cast(handle); TLinker* linker = static_cast(base->getAsLinker()); - if (linker == 0) + if (linker == nullptr) return 0; linker->setFixedAttributeBindings(table); @@ -1673,12 +1634,12 @@ int ShSetFixedAttributeBindings(const ShHandle handle, const ShBindingTable* tab // int ShExcludeAttributes(const ShHandle handle, int *attributes, int count) { - if (handle == 0) + if (handle == nullptr) return 0; TShHandleBase* base = reinterpret_cast(handle); TLinker* linker = static_cast(base->getAsLinker()); - if (linker == 0) + if (linker == nullptr) return 0; linker->setExcludedAttributes(attributes, count); @@ -1694,12 +1655,12 @@ int ShExcludeAttributes(const ShHandle handle, int *attributes, int count) // int ShGetUniformLocation(const ShHandle handle, const char* name) { - if (handle == 0) + if (handle == nullptr) return -1; TShHandleBase* base = reinterpret_cast(handle); TUniformMap* uniformMap= base->getAsUniformMap(); - if (uniformMap == 0) + if (uniformMap == nullptr) return -1; return uniformMap->getLocation(name); @@ -1839,13 +1800,12 @@ void TShader::setOverrideVersion(int version) overrideVersion = version; } +void TShader::setDebugInfo(bool debugInfo) { intermediate->setDebugInfo(debugInfo); } void TShader::setInvertY(bool invert) { intermediate->setInvertY(invert); } void TShader::setDxPositionW(bool invert) { intermediate->setDxPositionW(invert); } void TShader::setEnhancedMsgs() { intermediate->setEnhancedMsgs(); } void TShader::setNanMinMaxClamp(bool useNonNan) { intermediate->setNanMinMaxClamp(useNonNan); } -#ifndef GLSLANG_WEB - // Set binding base for given resource type void TShader::setShiftBinding(TResourceType res, unsigned int base) { intermediate->setShiftBinding(res, base); @@ -1887,7 +1847,6 @@ void TShader::setUniformLocationBase(int base) void TShader::setNoStorageFormat(bool useUnknownFormat) { intermediate->setNoStorageFormat(useUnknownFormat); } void TShader::setResourceSetBinding(const std::vector& base) { intermediate->setResourceSetBinding(base); } void TShader::setTextureSamplerTransformMode(EShTextureSamplerTransformMode mode) { intermediate->setTextureSamplerTransformMode(mode); } -#endif void TShader::addBlockStorageOverride(const char* nameStr, TBlockStorageClass backing) { intermediate->addBlockStorageOverride(nameStr, backing); } @@ -1923,10 +1882,9 @@ bool TShader::parse(const TBuiltInResource* builtInResources, int defaultVersion preamble, EShOptNone, builtInResources, defaultVersion, defaultProfile, forceDefaultVersionAndProfile, overrideVersion, forwardCompatible, messages, *intermediate, includer, sourceEntryPointName, - &environment); + &environment, compileOnly); } -#if !defined(GLSLANG_WEB) && !defined(GLSLANG_ANGLE) // Fill in a string with the result of preprocessing ShaderStrings // Returns true if all extensions, pragmas and version strings were valid. // @@ -1952,7 +1910,6 @@ bool TShader::preprocess(const TBuiltInResource* builtInResources, forwardCompatible, message, includer, *intermediate, output_string, &environment); } -#endif const char* TShader::getInfoLog() { @@ -1964,16 +1921,12 @@ const char* TShader::getInfoDebugLog() return infoSink->debug.c_str(); } -TProgram::TProgram() : -#if !defined(GLSLANG_WEB) && !defined(GLSLANG_ANGLE) - reflection(0), -#endif - linked(false) +TProgram::TProgram() : reflection(nullptr), linked(false) { pool = new TPoolAllocator; infoSink = new TInfoSink; for (int s = 0; s < EShLangCount; ++s) { - intermediate[s] = 0; + intermediate[s] = nullptr; newedIntermediate[s] = false; } } @@ -1981,9 +1934,7 @@ TProgram::TProgram() : TProgram::~TProgram() { delete infoSink; -#if !defined(GLSLANG_WEB) && !defined(GLSLANG_ANGLE) delete reflection; -#endif for (int s = 0; s < EShLangCount; ++s) if (newedIntermediate[s]) @@ -2031,7 +1982,6 @@ bool TProgram::linkStage(EShLanguage stage, EShMessages messages) if (stages[stage].size() == 0) return true; -#if !defined(GLSLANG_WEB) && !defined(GLSLANG_ANGLE) int numEsShaders = 0, numNonEsShaders = 0; for (auto it = stages[stage].begin(); it != stages[stage].end(); ++it) { if ((*it)->intermediate->getProfile() == EEsProfile) { @@ -2082,15 +2032,10 @@ bool TProgram::linkStage(EShLanguage stage, EShMessages messages) for (it = stages[stage].begin(); it != stages[stage].end(); ++it) intermediate[stage]->merge(*infoSink, *(*it)->intermediate); } -#else - intermediate[stage] = stages[stage].front()->intermediate; -#endif intermediate[stage]->finalCheck(*infoSink, (messages & EShMsgKeepUncalled) != 0); -#ifndef GLSLANG_ANGLE if (messages & EShMsgAST) intermediate[stage]->output(*infoSink, true); -#endif return intermediate[stage]->getNumErrors() == 0; } @@ -2168,8 +2113,6 @@ const char* TProgram::getInfoDebugLog() return infoSink->debug.c_str(); } -#if !defined(GLSLANG_WEB) && !defined(GLSLANG_ANGLE) - // // Reflection implementation. // @@ -2250,6 +2193,4 @@ bool TProgram::mapIO(TIoMapResolver* pResolver, TIoMapper* pIoMapper) return ioMapper->doMap(pResolver, *infoSink); } -#endif // !GLSLANG_WEB && !GLSLANG_ANGLE - } // end namespace glslang diff --git a/glslang/MachineIndependent/SpirvIntrinsics.cpp b/glslang/MachineIndependent/SpirvIntrinsics.cpp index 6650f7d9ee..1d08797ac2 100644 --- a/glslang/MachineIndependent/SpirvIntrinsics.cpp +++ b/glslang/MachineIndependent/SpirvIntrinsics.cpp @@ -33,8 +33,6 @@ // POSSIBILITY OF SUCH DAMAGE. // -#ifndef GLSLANG_WEB - // // GL_EXT_spirv_intrinsics // @@ -45,6 +43,15 @@ namespace glslang { +bool TSpirvTypeParameter::operator==(const TSpirvTypeParameter& rhs) const +{ + if (getAsConstant() != nullptr) + return getAsConstant()->getConstArray() == rhs.getAsConstant()->getConstArray(); + + assert(getAsType() != nullptr); + return *getAsType() == *rhs.getAsType(); +} + // // Handle SPIR-V requirements // @@ -67,7 +74,7 @@ TSpirvRequirement* TParseContext::makeSpirvRequirement(const TSourceLoc& loc, co spirvReq->capabilities.insert(capability->getAsConstantUnion()->getConstArray()[0].getIConst()); } } else - error(loc, "unknow SPIR-V requirement", name.c_str(), ""); + error(loc, "unknown SPIR-V requirement", name.c_str(), ""); return spirvReq; } @@ -168,7 +175,7 @@ void TQualifier::setSpirvDecorateId(int decoration, const TIntermAggregate* args TVector extraOperands; for (auto arg : args->getSequence()) { auto extraOperand = arg->getAsTyped(); - assert(extraOperand != nullptr && extraOperand->getQualifier().isConstant()); + assert(extraOperand != nullptr); extraOperands.push_back(extraOperand); } spirvDecorate->decorateIds[decoration] = extraOperands; @@ -202,30 +209,29 @@ TString TQualifier::getSpirvDecorateQualifierString() const const auto appendStr = [&](const char* s) { qualifierString.append(s); }; const auto appendDecorate = [&](const TIntermTyped* constant) { - auto& constArray = constant->getAsConstantUnion() != nullptr ? constant->getAsConstantUnion()->getConstArray() - : constant->getAsSymbolNode()->getConstArray(); - if (constant->getBasicType() == EbtFloat) { - float value = static_cast(constArray[0].getDConst()); - appendFloat(value); - } - else if (constant->getBasicType() == EbtInt) { - int value = constArray[0].getIConst(); - appendInt(value); - } - else if (constant->getBasicType() == EbtUint) { - unsigned value = constArray[0].getUConst(); - appendUint(value); - } - else if (constant->getBasicType() == EbtBool) { - bool value = constArray[0].getBConst(); - appendBool(value); + if (constant->getAsConstantUnion()) { + auto& constArray = constant->getAsConstantUnion()->getConstArray(); + if (constant->getBasicType() == EbtFloat) { + float value = static_cast(constArray[0].getDConst()); + appendFloat(value); + } else if (constant->getBasicType() == EbtInt) { + int value = constArray[0].getIConst(); + appendInt(value); + } else if (constant->getBasicType() == EbtUint) { + unsigned value = constArray[0].getUConst(); + appendUint(value); + } else if (constant->getBasicType() == EbtBool) { + bool value = constArray[0].getBConst(); + appendBool(value); + } else if (constant->getBasicType() == EbtString) { + const TString* value = constArray[0].getSConst(); + appendStr(value->c_str()); + } else + assert(0); + } else { + assert(constant->getAsSymbolNode()); + appendStr(constant->getAsSymbolNode()->getName().c_str()); } - else if (constant->getBasicType() == EbtString) { - const TString* value = constArray[0].getSConst(); - appendStr(value->c_str()); - } - else - assert(0); }; for (auto& decorate : spirvDecorate->decorates) { @@ -284,14 +290,20 @@ TSpirvTypeParameters* TParseContext::makeSpirvTypeParameters(const TSourceLoc& l constant->getBasicType() != EbtBool && constant->getBasicType() != EbtString) error(loc, "this type not allowed", constant->getType().getBasicString(), ""); - else { - assert(constant); + else spirvTypeParams->push_back(TSpirvTypeParameter(constant)); - } return spirvTypeParams; } +TSpirvTypeParameters* TParseContext::makeSpirvTypeParameters(const TSourceLoc& /* loc */, + const TPublicType& type) +{ + TSpirvTypeParameters* spirvTypeParams = new TSpirvTypeParameters; + spirvTypeParams->push_back(TSpirvTypeParameter(new TType(type))); + return spirvTypeParams; +} + TSpirvTypeParameters* TParseContext::mergeSpirvTypeParameters(TSpirvTypeParameters* spirvTypeParams1, TSpirvTypeParameters* spirvTypeParams2) { // Merge SPIR-V type parameters of the second one to the first one @@ -346,5 +358,3 @@ TSpirvInstruction* TParseContext::mergeSpirvInstruction(const TSourceLoc& loc, T } } // end namespace glslang - -#endif // GLSLANG_WEB diff --git a/glslang/MachineIndependent/SymbolTable.cpp b/glslang/MachineIndependent/SymbolTable.cpp index 2f1b5ac3cb..dae5a8b918 100644 --- a/glslang/MachineIndependent/SymbolTable.cpp +++ b/glslang/MachineIndependent/SymbolTable.cpp @@ -65,7 +65,6 @@ void TType::buildMangledName(TString& mangledName) const case EbtInt: mangledName += 'i'; break; case EbtUint: mangledName += 'u'; break; case EbtBool: mangledName += 'b'; break; -#ifndef GLSLANG_WEB case EbtDouble: mangledName += 'd'; break; case EbtFloat16: mangledName += "f16"; break; case EbtInt8: mangledName += "i8"; break; @@ -78,12 +77,10 @@ void TType::buildMangledName(TString& mangledName) const case EbtAccStruct: mangledName += "as"; break; case EbtRayQuery: mangledName += "rq"; break; case EbtSpirvType: mangledName += "spv-t"; break; -#endif + case EbtHitObjectNV: mangledName += "ho"; break; case EbtSampler: switch (sampler.type) { -#ifndef GLSLANG_WEB case EbtFloat16: mangledName += "f16"; break; -#endif case EbtInt: mangledName += "i"; break; case EbtUint: mangledName += "u"; break; case EbtInt64: mangledName += "i64"; break; @@ -110,12 +107,10 @@ void TType::buildMangledName(TString& mangledName) const case Esd2D: mangledName += "2"; break; case Esd3D: mangledName += "3"; break; case EsdCube: mangledName += "C"; break; -#ifndef GLSLANG_WEB case Esd1D: mangledName += "1"; break; case EsdRect: mangledName += "R2"; break; case EsdBuffer: mangledName += "B"; break; case EsdSubpass: mangledName += "P"; break; -#endif default: break; // some compilers want this } @@ -183,8 +178,6 @@ void TType::buildMangledName(TString& mangledName) const } } -#if !defined(GLSLANG_WEB) && !defined(GLSLANG_ANGLE) - // // Dump functions. // @@ -263,8 +256,6 @@ void TSymbolTable::dump(TInfoSink& infoSink, bool complete) const } } -#endif - // // Functions have buried pointers to delete. // @@ -327,6 +318,16 @@ void TSymbolTableLevel::setFunctionExtensions(const char* name, int num, const c } } +// Make a single function require an extension(s). i.e., this will only set the extensions for the symbol that matches 'name' exactly. +// This is different from setFunctionExtensions, which uses std::map::lower_bound to effectively set all symbols that start with 'name'. +// Should only be used for a version/profile that actually needs the extension(s). +void TSymbolTableLevel::setSingleFunctionExtensions(const char* name, int num, const char* const extensions[]) +{ + if (auto candidate = level.find(name); candidate != level.end()) { + candidate->second->setExtensions(num, extensions); + } +} + // // Make all symbols in this table level read only. // @@ -381,7 +382,7 @@ TVariable* TVariable::clone() const TFunction::TFunction(const TFunction& copyOf) : TSymbol(copyOf) { for (unsigned int i = 0; i < copyOf.parameters.size(); ++i) { - TParameter param; + TParameter param{}; parameters.push_back(param); (void)parameters.back().copyParam(copyOf.parameters[i]); } @@ -397,9 +398,7 @@ TFunction::TFunction(const TFunction& copyOf) : TSymbol(copyOf) implicitThis = copyOf.implicitThis; illegalImplicitThis = copyOf.illegalImplicitThis; defaultParamCount = copyOf.defaultParamCount; -#ifndef GLSLANG_WEB spirvInst = copyOf.spirvInst; -#endif } TFunction* TFunction::clone() const @@ -416,7 +415,7 @@ TAnonMember* TAnonMember::clone() const // copy of the original container. assert(0); - return 0; + return nullptr; } TSymbolTableLevel* TSymbolTableLevel::clone() const diff --git a/glslang/MachineIndependent/SymbolTable.h b/glslang/MachineIndependent/SymbolTable.h index 2e570bb3bc..94c3929da2 100644 --- a/glslang/MachineIndependent/SymbolTable.h +++ b/glslang/MachineIndependent/SymbolTable.h @@ -84,7 +84,7 @@ typedef TVector TExtensionList; class TSymbol { public: POOL_ALLOCATOR_NEW_DELETE(GetThreadPoolAllocator()) - explicit TSymbol(const TString *n) : name(n), uniqueId(0), extensions(0), writable(true) { } + explicit TSymbol(const TString *n) : name(n), uniqueId(0), extensions(nullptr), writable(true) { } virtual TSymbol* clone() const = 0; virtual ~TSymbol() { } // rely on all symbol owned memory coming from the pool @@ -97,18 +97,18 @@ class TSymbol { changeName(NewPoolTString(newName.c_str())); } virtual const TString& getMangledName() const { return getName(); } - virtual TFunction* getAsFunction() { return 0; } - virtual const TFunction* getAsFunction() const { return 0; } - virtual TVariable* getAsVariable() { return 0; } - virtual const TVariable* getAsVariable() const { return 0; } - virtual const TAnonMember* getAsAnonMember() const { return 0; } + virtual TFunction* getAsFunction() { return nullptr; } + virtual const TFunction* getAsFunction() const { return nullptr; } + virtual TVariable* getAsVariable() { return nullptr; } + virtual const TVariable* getAsVariable() const { return nullptr; } + virtual const TAnonMember* getAsAnonMember() const { return nullptr; } virtual const TType& getType() const = 0; virtual TType& getWritableType() = 0; virtual void setUniqueId(long long id) { uniqueId = id; } virtual long long getUniqueId() const { return uniqueId; } virtual void setExtensions(int numExts, const char* const exts[]) { - assert(extensions == 0); + assert(extensions == nullptr); assert(numExts > 0); extensions = NewPoolObject(extensions); for (int e = 0; e < numExts; ++e) @@ -117,10 +117,8 @@ class TSymbol { virtual int getNumExtensions() const { return extensions == nullptr ? 0 : (int)extensions->size(); } virtual const char** getExtensions() const { return extensions->data(); } -#if !defined(GLSLANG_WEB) && !defined(GLSLANG_ANGLE) virtual void dump(TInfoSink& infoSink, bool complete = false) const = 0; void dumpExtensions(TInfoSink& infoSink) const; -#endif virtual bool isReadOnly() const { return ! writable; } virtual void makeReadOnly() { writable = false; } @@ -196,9 +194,7 @@ class TVariable : public TSymbol { } virtual const char** getMemberExtensions(int member) const { return (*memberExtensions)[member].data(); } -#if !defined(GLSLANG_WEB) && !defined(GLSLANG_ANGLE) virtual void dump(TInfoSink& infoSink, bool complete = false) const; -#endif protected: explicit TVariable(const TVariable&); @@ -229,7 +225,7 @@ struct TParameter { if (param.name) name = NewPoolTString(param.name->c_str()); else - name = 0; + name = nullptr; type = param.type->clone(); defaultValue = param.defaultValue; return *this; @@ -243,14 +239,15 @@ struct TParameter { class TFunction : public TSymbol { public: explicit TFunction(TOperator o) : - TSymbol(0), + TSymbol(nullptr), op(o), defined(false), prototyped(false), implicitThis(false), illegalImplicitThis(false), defaultParamCount(0) { } TFunction(const TString *name, const TType& retType, TOperator tOp = EOpNull) : TSymbol(name), mangledName(*name + '('), op(tOp), - defined(false), prototyped(false), implicitThis(false), illegalImplicitThis(false), defaultParamCount(0) + defined(false), prototyped(false), implicitThis(false), illegalImplicitThis(false), defaultParamCount(0), + linkType(ELinkNone) { returnType.shallowCopy(retType); declaredBuiltIn = retType.getQualifier().builtIn; @@ -319,19 +316,19 @@ class TFunction : public TSymbol { virtual TParameter& operator[](int i) { assert(writable); return parameters[i]; } virtual const TParameter& operator[](int i) const { return parameters[i]; } + const TQualifier& getQualifier() const { return returnType.getQualifier(); } -#ifndef GLSLANG_WEB virtual void setSpirvInstruction(const TSpirvInstruction& inst) { relateToOperator(EOpSpirvInst); spirvInst = inst; } virtual const TSpirvInstruction& getSpirvInstruction() const { return spirvInst; } -#endif -#if !defined(GLSLANG_WEB) && !defined(GLSLANG_ANGLE) virtual void dump(TInfoSink& infoSink, bool complete = false) const override; -#endif + + void setExport() { linkType = ELinkExport; } + TLinkType getLinkType() const { return linkType; } protected: explicit TFunction(const TFunction&); @@ -353,9 +350,8 @@ class TFunction : public TSymbol { // but is not allowed to use them, or see hidden symbols instead. int defaultParamCount; -#ifndef GLSLANG_WEB TSpirvInstruction spirvInst; // SPIR-V instruction qualifiers -#endif + TLinkType linkType; }; // @@ -395,9 +391,7 @@ class TAnonMember : public TSymbol { virtual const char** getExtensions() const override { return anonContainer.getMemberExtensions(memberNumber); } virtual int getAnonId() const { return anonId; } -#if !defined(GLSLANG_WEB) && !defined(GLSLANG_ANGLE) virtual void dump(TInfoSink& infoSink, bool complete = false) const override; -#endif protected: explicit TAnonMember(const TAnonMember&); @@ -411,7 +405,7 @@ class TAnonMember : public TSymbol { class TSymbolTableLevel { public: POOL_ALLOCATOR_NEW_DELETE(GetThreadPoolAllocator()) - TSymbolTableLevel() : defaultPrecision(0), anonId(0), thisLevel(false) { } + TSymbolTableLevel() : defaultPrecision(nullptr), anonId(0), thisLevel(false) { } ~TSymbolTableLevel(); bool insert(const TString& name, TSymbol* symbol) { @@ -493,7 +487,7 @@ class TSymbolTableLevel { { tLevel::const_iterator it = level.find(name); if (it == level.end()) - return 0; + return nullptr; else return (*it).second; } @@ -561,7 +555,7 @@ class TSymbolTableLevel { { // can call multiple times at one scope, will only latch on first call, // as we're tracking the previous scope's values, not the current values - if (defaultPrecision != 0) + if (defaultPrecision != nullptr) return; defaultPrecision = new TPrecisionQualifier[EbtNumTypes]; @@ -573,7 +567,7 @@ class TSymbolTableLevel { { // can be called for table level pops that didn't set the // defaults - if (defaultPrecision == 0 || p == 0) + if (defaultPrecision == nullptr || p == nullptr) return; for (int t = 0; t < EbtNumTypes; ++t) @@ -582,9 +576,8 @@ class TSymbolTableLevel { void relateToOperator(const char* name, TOperator op); void setFunctionExtensions(const char* name, int num, const char* const extensions[]); -#if !defined(GLSLANG_WEB) && !defined(GLSLANG_ANGLE) + void setSingleFunctionExtensions(const char* name, int num, const char* const extensions[]); void dump(TInfoSink& infoSink, bool complete = false) const; -#endif TSymbolTableLevel* clone() const; void readOnly(); @@ -622,7 +615,7 @@ class TSymbolTable { // don't deallocate levels passed in from elsewhere while (table.size() > adoptedLevels) - pop(0); + pop(nullptr); } void adoptLevels(TSymbolTable& symTable) @@ -783,7 +776,7 @@ class TSymbolTable { // Normal find of a symbol, that can optionally say whether the symbol was found // at a built-in level or the current top-scope level. - TSymbol* find(const TString& name, bool* builtIn = 0, bool* currentScope = 0, int* thisDepthP = 0) + TSymbol* find(const TString& name, bool* builtIn = nullptr, bool* currentScope = nullptr, int* thisDepthP = nullptr) { int level = currentLevel(); TSymbol* symbol; @@ -827,7 +820,7 @@ class TSymbolTable { ++thisDepth; symbol = table[level]->find(name); --level; - } while (symbol == 0 && level >= 0); + } while (symbol == nullptr && level >= 0); if (! table[level + 1]->isThisLevel()) thisDepth = 0; @@ -885,6 +878,12 @@ class TSymbolTable { table[level]->setFunctionExtensions(name, num, extensions); } + void setSingleFunctionExtensions(const char* name, int num, const char* const extensions[]) + { + for (unsigned int level = 0; level < table.size(); ++level) + table[level]->setSingleFunctionExtensions(name, num, extensions); + } + void setVariableExtensions(const char* name, int numExts, const char* const extensions[]) { TSymbol* symbol = find(TString(name)); @@ -912,9 +911,7 @@ class TSymbolTable { } long long getMaxSymbolId() { return uniqueId; } -#if !defined(GLSLANG_WEB) && !defined(GLSLANG_ANGLE) void dump(TInfoSink& infoSink, bool complete = false) const; -#endif void copyTable(const TSymbolTable& copyOf); void setPreviousDefaultPrecisions(TPrecisionQualifier *p) { table[currentLevel()]->setPreviousDefaultPrecisions(p); } diff --git a/glslang/MachineIndependent/Versions.cpp b/glslang/MachineIndependent/Versions.cpp index e24d5c5451..bede71604e 100644 --- a/glslang/MachineIndependent/Versions.cpp +++ b/glslang/MachineIndependent/Versions.cpp @@ -151,8 +151,6 @@ namespace glslang { -#ifndef GLSLANG_WEB - // // Initialize all extensions, almost always to 'disable', as once their features // are incorporated into a core version, their features are supported through allowing that @@ -166,7 +164,8 @@ void TParseVersions::initializeExtensionBehavior() } extensionData; const extensionData exts[] = { {E_GL_EXT_ray_tracing, EShTargetSpv_1_4}, - {E_GL_NV_ray_tracing_motion_blur, EShTargetSpv_1_4} + {E_GL_NV_ray_tracing_motion_blur, EShTargetSpv_1_4}, + {E_GL_EXT_mesh_shader, EShTargetSpv_1_4} }; for (size_t ii = 0; ii < sizeof(exts) / sizeof(exts[0]); ii++) { @@ -226,6 +225,7 @@ void TParseVersions::initializeExtensionBehavior() extensionBehavior[E_GL_ARB_texture_query_lod] = EBhDisable; extensionBehavior[E_GL_ARB_vertex_attrib_64bit] = EBhDisable; extensionBehavior[E_GL_ARB_draw_instanced] = EBhDisable; + extensionBehavior[E_GL_ARB_bindless_texture] = EBhDisable; extensionBehavior[E_GL_ARB_fragment_coord_conventions] = EBhDisable; @@ -261,6 +261,8 @@ void TParseVersions::initializeExtensionBehavior() extensionBehavior[E_GL_EXT_fragment_shader_barycentric] = EBhDisable; + extensionBehavior[E_GL_KHR_cooperative_matrix] = EBhDisable; + // #line and #include extensionBehavior[E_GL_GOOGLE_cpp_style_line_directive] = EBhDisable; extensionBehavior[E_GL_GOOGLE_include_directive] = EBhDisable; @@ -295,10 +297,17 @@ void TParseVersions::initializeExtensionBehavior() extensionBehavior[E_GL_NV_compute_shader_derivatives] = EBhDisable; extensionBehavior[E_GL_NV_shader_texture_footprint] = EBhDisable; extensionBehavior[E_GL_NV_mesh_shader] = EBhDisable; - extensionBehavior[E_GL_NV_cooperative_matrix] = EBhDisable; extensionBehavior[E_GL_NV_shader_sm_builtins] = EBhDisable; extensionBehavior[E_GL_NV_integer_cooperative_matrix] = EBhDisable; + extensionBehavior[E_GL_NV_shader_invocation_reorder] = EBhDisable; + extensionBehavior[E_GL_NV_displacement_micromap] = EBhDisable; + + // ARM + extensionBehavior[E_GL_ARM_shader_core_builtins] = EBhDisable; + + // QCOM + extensionBehavior[E_GL_QCOM_image_processing] = EBhDisable; // AEP extensionBehavior[E_GL_ANDROID_extension_pack_es31a] = EBhDisable; @@ -341,10 +350,15 @@ void TParseVersions::initializeExtensionBehavior() extensionBehavior[E_GL_EXT_blend_func_extended] = EBhDisable; extensionBehavior[E_GL_EXT_shader_implicit_conversions] = EBhDisable; extensionBehavior[E_GL_EXT_fragment_shading_rate] = EBhDisable; - extensionBehavior[E_GL_EXT_shader_image_int64] = EBhDisable; + extensionBehavior[E_GL_EXT_shader_image_int64] = EBhDisable; extensionBehavior[E_GL_EXT_terminate_invocation] = EBhDisable; extensionBehavior[E_GL_EXT_shared_memory_block] = EBhDisable; extensionBehavior[E_GL_EXT_spirv_intrinsics] = EBhDisable; + extensionBehavior[E_GL_EXT_mesh_shader] = EBhDisable; + extensionBehavior[E_GL_EXT_opacity_micromap] = EBhDisable; + extensionBehavior[E_GL_EXT_ray_tracing_position_fetch] = EBhDisable; + extensionBehavior[E_GL_EXT_shader_tile_image] = EBhDisable; + extensionBehavior[E_GL_EXT_texture_shadow_lod] = EBhDisable; // OVR extensions extensionBehavior[E_GL_OVR_multiview] = EBhDisable; @@ -367,9 +381,10 @@ void TParseVersions::initializeExtensionBehavior() extensionBehavior[E_GL_EXT_shader_subgroup_extended_types_float16] = EBhDisable; extensionBehavior[E_GL_EXT_shader_atomic_float] = EBhDisable; extensionBehavior[E_GL_EXT_shader_atomic_float2] = EBhDisable; -} -#endif // GLSLANG_WEB + // Record extensions not for spv. + spvUnsupportedExt.push_back(E_GL_ARB_bindless_texture); +} // Get code that is not part of a shared symbol table, is specific to this shader, // or needed by the preprocessor (which does not use a shared symbol table). @@ -379,9 +394,6 @@ void TParseVersions::getPreamble(std::string& preamble) preamble = "#define GL_ES 1\n" "#define GL_FRAGMENT_PRECISION_HIGH 1\n" -#ifdef GLSLANG_WEB - ; -#else "#define GL_OES_texture_3D 1\n" "#define GL_OES_standard_derivatives 1\n" "#define GL_EXT_frag_depth 1\n" @@ -422,6 +434,8 @@ void TParseVersions::getPreamble(std::string& preamble) "#define GL_OES_texture_buffer 1\n" "#define GL_OES_texture_cube_map_array 1\n" "#define GL_EXT_shader_non_constant_global_initializers 1\n" + + "#define GL_QCOM_image_processing 1\n" ; if (version >= 300) { @@ -434,7 +448,6 @@ void TParseVersions::getPreamble(std::string& preamble) } else { // !isEsProfile() preamble = - "#define GL_FRAGMENT_PRECISION_HIGH 1\n" "#define GL_ARB_texture_rectangle 1\n" "#define GL_ARB_shading_language_420pack 1\n" "#define GL_ARB_texture_gather 1\n" @@ -474,6 +487,7 @@ void TParseVersions::getPreamble(std::string& preamble) "#define GL_ARB_vertex_attrib_64bit 1\n" "#define GL_ARB_draw_instanced 1\n" "#define GL_ARB_fragment_coord_conventions 1\n" + "#define GL_ARB_bindless_texture 1\n" "#define GL_EXT_shader_non_constant_global_initializers 1\n" "#define GL_EXT_shader_image_load_formatted 1\n" "#define GL_EXT_post_depth_coverage 1\n" @@ -503,6 +517,8 @@ void TParseVersions::getPreamble(std::string& preamble) "#define GL_KHR_shader_subgroup_clustered 1\n" "#define GL_KHR_shader_subgroup_quad 1\n" + "#define GL_KHR_cooperative_matrix 1\n" + "#define GL_EXT_shader_image_int64 1\n" "#define GL_EXT_shader_atomic_int64 1\n" "#define GL_EXT_shader_realtime_clock 1\n" @@ -510,7 +526,9 @@ void TParseVersions::getPreamble(std::string& preamble) "#define GL_EXT_ray_query 1\n" "#define GL_EXT_ray_flags_primitive_culling 1\n" "#define GL_EXT_ray_cull_mask 1\n" + "#define GL_EXT_ray_tracing_position_fetch 1\n" "#define GL_EXT_spirv_intrinsics 1\n" + "#define GL_EXT_mesh_shader 1\n" "#define GL_AMD_shader_ballot 1\n" "#define GL_AMD_shader_trinary_minmax 1\n" @@ -540,6 +558,9 @@ void TParseVersions::getPreamble(std::string& preamble) "#define GL_NV_mesh_shader 1\n" "#define GL_NV_cooperative_matrix 1\n" "#define GL_NV_integer_cooperative_matrix 1\n" + "#define GL_NV_shader_invocation_reorder 1\n" + + "#define GL_QCOM_image_processing 1\n" "#define GL_EXT_shader_explicit_arithmetic_types 1\n" "#define GL_EXT_shader_explicit_arithmetic_types_int8 1\n" @@ -572,10 +593,11 @@ void TParseVersions::getPreamble(std::string& preamble) preamble += "#define GL_EXT_null_initializer 1\n"; preamble += "#define GL_EXT_subgroup_uniform_control_flow 1\n"; } -#endif // GLSLANG_WEB + if (version >= 130) { + preamble +="#define GL_FRAGMENT_PRECISION_HIGH 1\n"; + } } -#ifndef GLSLANG_WEB if ((!isEsProfile() && version >= 140) || (isEsProfile() && version >= 310)) { preamble += @@ -603,7 +625,6 @@ void TParseVersions::getPreamble(std::string& preamble) preamble += "#define GL_EXT_terminate_invocation 1\n" ; -#endif // #define VULKAN XXXX const int numberBufSize = 12; @@ -615,7 +636,6 @@ void TParseVersions::getPreamble(std::string& preamble) preamble += "\n"; } -#ifndef GLSLANG_WEB // #define GL_SPIRV XXXX if (spvVersion.openGl > 0) { preamble += "#define GL_SPIRV "; @@ -623,9 +643,7 @@ void TParseVersions::getPreamble(std::string& preamble) preamble += numberBuf; preamble += "\n"; } -#endif -#ifndef GLSLANG_WEB // GL_EXT_spirv_intrinsics if (!isEsProfile()) { switch (language) { @@ -641,12 +659,11 @@ void TParseVersions::getPreamble(std::string& preamble) case EShLangClosestHit: preamble += "#define GL_CLOSEST_HIT_SHADER_EXT 1 \n"; break; case EShLangMiss: preamble += "#define GL_MISS_SHADER_EXT 1 \n"; break; case EShLangCallable: preamble += "#define GL_CALLABLE_SHADER_EXT 1 \n"; break; - case EShLangTaskNV: preamble += "#define GL_TASK_SHADER_NV 1 \n"; break; - case EShLangMeshNV: preamble += "#define GL_MESH_SHADER_NV 1 \n"; break; + case EShLangTask: preamble += "#define GL_TASK_SHADER_NV 1 \n"; break; + case EShLangMesh: preamble += "#define GL_MESH_SHADER_NV 1 \n"; break; default: break; } } -#endif } // @@ -658,7 +675,6 @@ const char* StageName(EShLanguage stage) case EShLangVertex: return "vertex"; case EShLangFragment: return "fragment"; case EShLangCompute: return "compute"; -#ifndef GLSLANG_WEB case EShLangTessControl: return "tessellation control"; case EShLangTessEvaluation: return "tessellation evaluation"; case EShLangGeometry: return "geometry"; @@ -668,9 +684,8 @@ const char* StageName(EShLanguage stage) case EShLangClosestHit: return "closest-hit"; case EShLangMiss: return "miss"; case EShLangCallable: return "callable"; - case EShLangMeshNV: return "mesh"; - case EShLangTaskNV: return "task"; -#endif + case EShLangMesh: return "mesh"; + case EShLangTask: return "task"; default: return "unknown stage"; } } @@ -695,7 +710,6 @@ void TParseVersions::requireStage(const TSourceLoc& loc, EShLanguage stage, cons requireStage(loc, static_cast(1 << stage), featureDesc); } -#ifndef GLSLANG_WEB // // When to use requireProfile(): // @@ -733,7 +747,6 @@ void TParseVersions::profileRequires(const TSourceLoc& loc, int profileMask, int { if (profile & profileMask) { bool okay = minVersion > 0 && version >= minVersion; -#ifndef GLSLANG_WEB for (int i = 0; i < numExtensions; ++i) { switch (getExtensionBehavior(extensions[i])) { case EBhWarn: @@ -746,7 +759,6 @@ void TParseVersions::profileRequires(const TSourceLoc& loc, int profileMask, int default: break; // some compilers want this } } -#endif if (! okay) error(loc, "not supported for this version or the enabled extensions", featureDesc, ""); } @@ -1060,10 +1072,22 @@ void TParseVersions::checkExtensionStage(const TSourceLoc& loc, const char * con { // GL_NV_mesh_shader extension is only allowed in task/mesh shaders if (strcmp(extension, "GL_NV_mesh_shader") == 0) { - requireStage(loc, (EShLanguageMask)(EShLangTaskNVMask | EShLangMeshNVMask | EShLangFragmentMask), + requireStage(loc, (EShLanguageMask)(EShLangTaskMask | EShLangMeshMask | EShLangFragmentMask), "#extension GL_NV_mesh_shader"); - profileRequires(loc, ECoreProfile, 450, 0, "#extension GL_NV_mesh_shader"); - profileRequires(loc, EEsProfile, 320, 0, "#extension GL_NV_mesh_shader"); + profileRequires(loc, ECoreProfile, 450, nullptr, "#extension GL_NV_mesh_shader"); + profileRequires(loc, EEsProfile, 320, nullptr, "#extension GL_NV_mesh_shader"); + if (extensionTurnedOn(E_GL_EXT_mesh_shader)) { + error(loc, "GL_EXT_mesh_shader is already turned on, and not allowed with", "#extension", extension); + } + } + else if (strcmp(extension, "GL_EXT_mesh_shader") == 0) { + requireStage(loc, (EShLanguageMask)(EShLangTaskMask | EShLangMeshMask | EShLangFragmentMask), + "#extension GL_EXT_mesh_shader"); + profileRequires(loc, ECoreProfile, 450, nullptr, "#extension GL_EXT_mesh_shader"); + profileRequires(loc, EEsProfile, 320, nullptr, "#extension GL_EXT_mesh_shader"); + if (extensionTurnedOn(E_GL_NV_mesh_shader)) { + error(loc, "GL_NV_mesh_shader is already turned on, and not allowed with", "#extension", extension); + } } } @@ -1083,6 +1107,13 @@ void TParseVersions::extensionRequires(const TSourceLoc &loc, const char * const minSpvVersion = iter->second; requireSpv(loc, extension, minSpvVersion); } + + if (spvVersion.spv != 0){ + for (auto ext : spvUnsupportedExt){ + if (strcmp(extension, ext.c_str()) == 0) + error(loc, "not allowed when using generating SPIR-V codes", extension, ""); + } + } } // Call for any operation needing full GLSL integer data-type support. @@ -1295,7 +1326,7 @@ void TParseVersions::int64Check(const TSourceLoc& loc, const char* op, bool buil } } -void TParseVersions::fcoopmatCheck(const TSourceLoc& loc, const char* op, bool builtIn) +void TParseVersions::fcoopmatCheckNV(const TSourceLoc& loc, const char* op, bool builtIn) { if (!builtIn) { const char* const extensions[] = {E_GL_NV_cooperative_matrix}; @@ -1303,14 +1334,22 @@ void TParseVersions::fcoopmatCheck(const TSourceLoc& loc, const char* op, bool b } } -void TParseVersions::intcoopmatCheck(const TSourceLoc& loc, const char* op, bool builtIn) +void TParseVersions::intcoopmatCheckNV(const TSourceLoc& loc, const char* op, bool builtIn) { if (!builtIn) { const char* const extensions[] = {E_GL_NV_integer_cooperative_matrix}; requireExtensions(loc, sizeof(extensions)/sizeof(extensions[0]), extensions, op); } } -#endif // GLSLANG_WEB + +void TParseVersions::coopmatCheck(const TSourceLoc& loc, const char* op, bool builtIn) +{ + if (!builtIn) { + const char* const extensions[] = {E_GL_KHR_cooperative_matrix}; + requireExtensions(loc, sizeof(extensions)/sizeof(extensions[0]), extensions, op); + } +} + // Call for any operation removed because SPIR-V is in use. void TParseVersions::spvRemoved(const TSourceLoc& loc, const char* op) { @@ -1328,26 +1367,20 @@ void TParseVersions::vulkanRemoved(const TSourceLoc& loc, const char* op) // Call for any operation that requires Vulkan. void TParseVersions::requireVulkan(const TSourceLoc& loc, const char* op) { -#ifndef GLSLANG_WEB if (spvVersion.vulkan == 0) error(loc, "only allowed when using GLSL for Vulkan", op, ""); -#endif } // Call for any operation that requires SPIR-V. void TParseVersions::requireSpv(const TSourceLoc& loc, const char* op) { -#ifndef GLSLANG_WEB if (spvVersion.spv == 0) error(loc, "only allowed when generating SPIR-V", op, ""); -#endif } void TParseVersions::requireSpv(const TSourceLoc& loc, const char *op, unsigned int version) { -#ifndef GLSLANG_WEB if (spvVersion.spv < version) error(loc, "not supported for current targeted SPIR-V version", op, ""); -#endif } } // end namespace glslang diff --git a/glslang/MachineIndependent/Versions.h b/glslang/MachineIndependent/Versions.h old mode 100644 new mode 100755 index 68e70635f7..0ebace9bb2 --- a/glslang/MachineIndependent/Versions.h +++ b/glslang/MachineIndependent/Versions.h @@ -163,6 +163,7 @@ const char* const E_GL_ARB_texture_query_lod = "GL_ARB_texture_query_ const char* const E_GL_ARB_vertex_attrib_64bit = "GL_ARB_vertex_attrib_64bit"; const char* const E_GL_ARB_draw_instanced = "GL_ARB_draw_instanced"; const char* const E_GL_ARB_fragment_coord_conventions = "GL_ARB_fragment_coord_conventions"; +const char* const E_GL_ARB_bindless_texture = "GL_ARB_bindless_texture"; const char* const E_GL_KHR_shader_subgroup_basic = "GL_KHR_shader_subgroup_basic"; const char* const E_GL_KHR_shader_subgroup_vote = "GL_KHR_shader_subgroup_vote"; @@ -173,6 +174,7 @@ const char* const E_GL_KHR_shader_subgroup_shuffle_relative = "GL_KHR_shader_sub const char* const E_GL_KHR_shader_subgroup_clustered = "GL_KHR_shader_subgroup_clustered"; const char* const E_GL_KHR_shader_subgroup_quad = "GL_KHR_shader_subgroup_quad"; const char* const E_GL_KHR_memory_scope_semantics = "GL_KHR_memory_scope_semantics"; +const char* const E_GL_KHR_cooperative_matrix = "GL_KHR_cooperative_matrix"; const char* const E_GL_EXT_shader_atomic_int64 = "GL_EXT_shader_atomic_int64"; @@ -211,6 +213,8 @@ const char* const E_GL_EXT_shared_memory_block = "GL_EXT_shared_mem const char* const E_GL_EXT_subgroup_uniform_control_flow = "GL_EXT_subgroup_uniform_control_flow"; const char* const E_GL_EXT_spirv_intrinsics = "GL_EXT_spirv_intrinsics"; const char* const E_GL_EXT_fragment_shader_barycentric = "GL_EXT_fragment_shader_barycentric"; +const char* const E_GL_EXT_mesh_shader = "GL_EXT_mesh_shader"; +const char* const E_GL_EXT_opacity_micromap = "GL_EXT_opacity_micromap"; // Arrays of extensions for the above viewportEXTs duplications @@ -262,15 +266,23 @@ const char* const E_GL_NV_fragment_shader_barycentric = "GL_NV_fragmen const char* const E_GL_NV_compute_shader_derivatives = "GL_NV_compute_shader_derivatives"; const char* const E_GL_NV_shader_texture_footprint = "GL_NV_shader_texture_footprint"; const char* const E_GL_NV_mesh_shader = "GL_NV_mesh_shader"; +const char* const E_GL_NV_cooperative_matrix = "GL_NV_cooperative_matrix"; +const char* const E_GL_NV_shader_sm_builtins = "GL_NV_shader_sm_builtins"; +const char* const E_GL_NV_integer_cooperative_matrix = "GL_NV_integer_cooperative_matrix"; +const char* const E_GL_NV_shader_invocation_reorder = "GL_NV_shader_invocation_reorder"; +const char* const E_GL_EXT_ray_tracing_position_fetch = "GL_EXT_ray_tracing_position_fetch"; +const char* const E_GL_NV_displacement_micromap = "GL_NV_displacement_micromap"; + +// ARM +const char* const E_GL_ARM_shader_core_builtins = "GL_ARM_shader_core_builtins"; // Arrays of extensions for the above viewportEXTs duplications const char* const viewportEXTs[] = { E_GL_ARB_shader_viewport_layer_array, E_GL_NV_viewport_array2 }; const int Num_viewportEXTs = sizeof(viewportEXTs) / sizeof(viewportEXTs[0]); -const char* const E_GL_NV_cooperative_matrix = "GL_NV_cooperative_matrix"; -const char* const E_GL_NV_shader_sm_builtins = "GL_NV_shader_sm_builtins"; -const char* const E_GL_NV_integer_cooperative_matrix = "GL_NV_integer_cooperative_matrix"; + +const char* const E_GL_QCOM_image_processing = "GL_QCOM_image_processing"; // AEP const char* const E_GL_ANDROID_extension_pack_es31a = "GL_ANDROID_extension_pack_es31a"; @@ -288,7 +300,7 @@ const char* const E_GL_EXT_tessellation_shader = "GL_EXT_tessel const char* const E_GL_EXT_tessellation_point_size = "GL_EXT_tessellation_point_size"; const char* const E_GL_EXT_texture_buffer = "GL_EXT_texture_buffer"; const char* const E_GL_EXT_texture_cube_map_array = "GL_EXT_texture_cube_map_array"; -const char* const E_GL_EXT_shader_integer_mix = "GL_EXT_shader_integer_mix"; +const char* const E_GL_EXT_shader_integer_mix = "GL_EXT_shader_integer_mix"; // OES matching AEP const char* const E_GL_OES_geometry_shader = "GL_OES_geometry_shader"; @@ -320,6 +332,10 @@ const char* const E_GL_EXT_terminate_invocation = "GL_EXT_terminate_invocation"; const char* const E_GL_EXT_shader_atomic_float = "GL_EXT_shader_atomic_float"; const char* const E_GL_EXT_shader_atomic_float2 = "GL_EXT_shader_atomic_float2"; +const char* const E_GL_EXT_shader_tile_image = "GL_EXT_shader_tile_image"; + +const char* const E_GL_EXT_texture_shadow_lod = "GL_EXT_texture_shadow_lod"; + // Arrays of extensions for the above AEP duplications const char* const AEP_geometry_shader[] = { E_GL_EXT_geometry_shader, E_GL_OES_geometry_shader }; @@ -349,6 +365,9 @@ const int Num_AEP_texture_buffer = sizeof(AEP_texture_buffer)/sizeof(AEP_texture const char* const AEP_texture_cube_map_array[] = { E_GL_EXT_texture_cube_map_array, E_GL_OES_texture_cube_map_array }; const int Num_AEP_texture_cube_map_array = sizeof(AEP_texture_cube_map_array)/sizeof(AEP_texture_cube_map_array[0]); +const char* const AEP_mesh_shader[] = { E_GL_NV_mesh_shader, E_GL_EXT_mesh_shader }; +const int Num_AEP_mesh_shader = sizeof(AEP_mesh_shader)/sizeof(AEP_mesh_shader[0]); + } // end namespace glslang #endif // _VERSIONS_INCLUDED_ diff --git a/glslang/MachineIndependent/attribute.cpp b/glslang/MachineIndependent/attribute.cpp index df7fdc2a60..a167c494fb 100644 --- a/glslang/MachineIndependent/attribute.cpp +++ b/glslang/MachineIndependent/attribute.cpp @@ -34,8 +34,6 @@ // POSSIBILITY OF SUCH DAMAGE. // -#ifndef GLSLANG_WEB - #include "attribute.h" #include "../Include/intermediate.h" #include "ParseHelper.h" @@ -125,6 +123,8 @@ TAttributeType TParseContext::attributeFromName(const TString& name) const return EatPartialCount; else if (name == "subgroup_uniform_control_flow") return EatSubgroupUniformControlFlow; + else if (name == "export") + return EatExport; else return EatNone; } @@ -357,6 +357,7 @@ void TParseContext::handleFunctionAttributes(const TSourceLoc& loc, const TAttri switch (it->name) { case EatSubgroupUniformControlFlow: + requireExtensions(loc, 1, &E_GL_EXT_subgroup_uniform_control_flow, "attribute"); intermediate.setSubgroupUniformControlFlow(); break; default: @@ -367,5 +368,3 @@ void TParseContext::handleFunctionAttributes(const TSourceLoc& loc, const TAttri } } // end namespace glslang - -#endif // GLSLANG_WEB diff --git a/glslang/MachineIndependent/attribute.h b/glslang/MachineIndependent/attribute.h index c5b29176c4..a0c4c43d45 100644 --- a/glslang/MachineIndependent/attribute.h +++ b/glslang/MachineIndependent/attribute.h @@ -120,6 +120,7 @@ namespace glslang { EatNonWritable, EatNonReadable, EatSubgroupUniformControlFlow, + EatExport, }; class TIntermAggregate; diff --git a/glslang/MachineIndependent/glslang.m4 b/glslang/MachineIndependent/glslang.m4 deleted file mode 100644 index 3ab7a3c0a0..0000000000 --- a/glslang/MachineIndependent/glslang.m4 +++ /dev/null @@ -1,4405 +0,0 @@ -// -// Copyright (C) 2002-2005 3Dlabs Inc. Ltd. -// Copyright (C) 2012-2013 LunarG, Inc. -// Copyright (C) 2017 ARM Limited. -// Copyright (C) 2015-2019 Google, Inc. -// Modifications Copyright (C) 2020 Advanced Micro Devices, Inc. All rights reserved. -// -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions -// are met: -// -// Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// -// Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following -// disclaimer in the documentation and/or other materials provided -// with the distribution. -// -// Neither the name of 3Dlabs Inc. Ltd. nor the names of its -// contributors may be used to endorse or promote products derived -// from this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS -// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE -// COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, -// INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, -// BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER -// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT -// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN -// ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE -// POSSIBILITY OF SUCH DAMAGE. -// - -// -// Do not edit the .y file, only edit the .m4 file. -// The .y bison file is not a source file, it is a derivative of the .m4 file. -// The m4 file needs to be processed by m4 to generate the .y bison file. -// -// Code sandwiched between a pair: -// -// GLSLANG_WEB_EXCLUDE_ON -// ... -// ... -// ... -// GLSLANG_WEB_EXCLUDE_OFF -// -// Will be excluded from the grammar when m4 is executed as: -// -// m4 -P -DGLSLANG_WEB -// -// It will be included when m4 is executed as: -// -// m4 -P -// - -m4_define(`GLSLANG_WEB_EXCLUDE_ON', `m4_ifdef(`GLSLANG_WEB', `m4_divert(`-1')')') -m4_define(`GLSLANG_WEB_EXCLUDE_OFF', `m4_ifdef(`GLSLANG_WEB', `m4_divert')') - -/** - * This is bison grammar and productions for parsing all versions of the - * GLSL shading languages. - */ -%{ - -/* Based on: -ANSI C Yacc grammar - -In 1985, Jeff Lee published his Yacc grammar (which is accompanied by a -matching Lex specification) for the April 30, 1985 draft version of the -ANSI C standard. Tom Stockfisch reposted it to net.sources in 1987; that -original, as mentioned in the answer to question 17.25 of the comp.lang.c -FAQ, can be ftp'ed from ftp.uu.net, file usenet/net.sources/ansi.c.grammar.Z. - -I intend to keep this version as close to the current C Standard grammar as -possible; please let me know if you discover discrepancies. - -Jutta Degener, 1995 -*/ - -#include "SymbolTable.h" -#include "ParseHelper.h" -#include "../Public/ShaderLang.h" -#include "attribute.h" - -using namespace glslang; - -%} - -%define parse.error verbose - -%union { - struct { - glslang::TSourceLoc loc; - union { - glslang::TString *string; - int i; - unsigned int u; - long long i64; - unsigned long long u64; - bool b; - double d; - }; - glslang::TSymbol* symbol; - } lex; - struct { - glslang::TSourceLoc loc; - glslang::TOperator op; - union { - TIntermNode* intermNode; - glslang::TIntermNodePair nodePair; - glslang::TIntermTyped* intermTypedNode; - glslang::TAttributes* attributes; - glslang::TSpirvRequirement* spirvReq; - glslang::TSpirvInstruction* spirvInst; - glslang::TSpirvTypeParameters* spirvTypeParams; - }; - union { - glslang::TPublicType type; - glslang::TFunction* function; - glslang::TParameter param; - glslang::TTypeLoc typeLine; - glslang::TTypeList* typeList; - glslang::TArraySizes* arraySizes; - glslang::TIdentifierList* identifierList; - }; - glslang::TArraySizes* typeParameters; - } interm; -} - -%{ - -/* windows only pragma */ -#ifdef _MSC_VER - #pragma warning(disable : 4065) - #pragma warning(disable : 4127) - #pragma warning(disable : 4244) -#endif - -#define parseContext (*pParseContext) -#define yyerror(context, msg) context->parserError(msg) - -extern int yylex(YYSTYPE*, TParseContext&); - -%} - -%parse-param {glslang::TParseContext* pParseContext} -%lex-param {parseContext} -%pure-parser // enable thread safety -%expect 1 // One shift reduce conflict because of if | else - -%token CONST BOOL INT UINT FLOAT -%token BVEC2 BVEC3 BVEC4 -%token IVEC2 IVEC3 IVEC4 -%token UVEC2 UVEC3 UVEC4 -%token VEC2 VEC3 VEC4 -%token MAT2 MAT3 MAT4 -%token MAT2X2 MAT2X3 MAT2X4 -%token MAT3X2 MAT3X3 MAT3X4 -%token MAT4X2 MAT4X3 MAT4X4 - -// combined image/sampler -%token SAMPLER2D SAMPLER3D SAMPLERCUBE SAMPLER2DSHADOW -%token SAMPLERCUBESHADOW SAMPLER2DARRAY -%token SAMPLER2DARRAYSHADOW ISAMPLER2D ISAMPLER3D ISAMPLERCUBE -%token ISAMPLER2DARRAY USAMPLER2D USAMPLER3D -%token USAMPLERCUBE USAMPLER2DARRAY - -// separate image/sampler -%token SAMPLER SAMPLERSHADOW -%token TEXTURE2D TEXTURE3D TEXTURECUBE TEXTURE2DARRAY -%token ITEXTURE2D ITEXTURE3D ITEXTURECUBE ITEXTURE2DARRAY -%token UTEXTURE2D UTEXTURE3D UTEXTURECUBE UTEXTURE2DARRAY - -GLSLANG_WEB_EXCLUDE_ON - -%token ATTRIBUTE VARYING -%token FLOAT16_T FLOAT32_T DOUBLE FLOAT64_T -%token INT64_T UINT64_T INT32_T UINT32_T INT16_T UINT16_T INT8_T UINT8_T -%token I64VEC2 I64VEC3 I64VEC4 -%token U64VEC2 U64VEC3 U64VEC4 -%token I32VEC2 I32VEC3 I32VEC4 -%token U32VEC2 U32VEC3 U32VEC4 -%token I16VEC2 I16VEC3 I16VEC4 -%token U16VEC2 U16VEC3 U16VEC4 -%token I8VEC2 I8VEC3 I8VEC4 -%token U8VEC2 U8VEC3 U8VEC4 -%token DVEC2 DVEC3 DVEC4 DMAT2 DMAT3 DMAT4 -%token F16VEC2 F16VEC3 F16VEC4 F16MAT2 F16MAT3 F16MAT4 -%token F32VEC2 F32VEC3 F32VEC4 F32MAT2 F32MAT3 F32MAT4 -%token F64VEC2 F64VEC3 F64VEC4 F64MAT2 F64MAT3 F64MAT4 -%token DMAT2X2 DMAT2X3 DMAT2X4 -%token DMAT3X2 DMAT3X3 DMAT3X4 -%token DMAT4X2 DMAT4X3 DMAT4X4 -%token F16MAT2X2 F16MAT2X3 F16MAT2X4 -%token F16MAT3X2 F16MAT3X3 F16MAT3X4 -%token F16MAT4X2 F16MAT4X3 F16MAT4X4 -%token F32MAT2X2 F32MAT2X3 F32MAT2X4 -%token F32MAT3X2 F32MAT3X3 F32MAT3X4 -%token F32MAT4X2 F32MAT4X3 F32MAT4X4 -%token F64MAT2X2 F64MAT2X3 F64MAT2X4 -%token F64MAT3X2 F64MAT3X3 F64MAT3X4 -%token F64MAT4X2 F64MAT4X3 F64MAT4X4 -%token ATOMIC_UINT -%token ACCSTRUCTNV -%token ACCSTRUCTEXT -%token RAYQUERYEXT -%token FCOOPMATNV ICOOPMATNV UCOOPMATNV - -// combined image/sampler -%token SAMPLERCUBEARRAY SAMPLERCUBEARRAYSHADOW -%token ISAMPLERCUBEARRAY USAMPLERCUBEARRAY -%token SAMPLER1D SAMPLER1DARRAY SAMPLER1DARRAYSHADOW ISAMPLER1D SAMPLER1DSHADOW -%token SAMPLER2DRECT SAMPLER2DRECTSHADOW ISAMPLER2DRECT USAMPLER2DRECT -%token SAMPLERBUFFER ISAMPLERBUFFER USAMPLERBUFFER -%token SAMPLER2DMS ISAMPLER2DMS USAMPLER2DMS -%token SAMPLER2DMSARRAY ISAMPLER2DMSARRAY USAMPLER2DMSARRAY -%token SAMPLEREXTERNALOES -%token SAMPLEREXTERNAL2DY2YEXT -%token ISAMPLER1DARRAY USAMPLER1D USAMPLER1DARRAY -%token F16SAMPLER1D F16SAMPLER2D F16SAMPLER3D F16SAMPLER2DRECT F16SAMPLERCUBE -%token F16SAMPLER1DARRAY F16SAMPLER2DARRAY F16SAMPLERCUBEARRAY -%token F16SAMPLERBUFFER F16SAMPLER2DMS F16SAMPLER2DMSARRAY -%token F16SAMPLER1DSHADOW F16SAMPLER2DSHADOW F16SAMPLER1DARRAYSHADOW F16SAMPLER2DARRAYSHADOW -%token F16SAMPLER2DRECTSHADOW F16SAMPLERCUBESHADOW F16SAMPLERCUBEARRAYSHADOW - -// images -%token IMAGE1D IIMAGE1D UIMAGE1D IMAGE2D IIMAGE2D -%token UIMAGE2D IMAGE3D IIMAGE3D UIMAGE3D -%token IMAGE2DRECT IIMAGE2DRECT UIMAGE2DRECT -%token IMAGECUBE IIMAGECUBE UIMAGECUBE -%token IMAGEBUFFER IIMAGEBUFFER UIMAGEBUFFER -%token IMAGE1DARRAY IIMAGE1DARRAY UIMAGE1DARRAY -%token IMAGE2DARRAY IIMAGE2DARRAY UIMAGE2DARRAY -%token IMAGECUBEARRAY IIMAGECUBEARRAY UIMAGECUBEARRAY -%token IMAGE2DMS IIMAGE2DMS UIMAGE2DMS -%token IMAGE2DMSARRAY IIMAGE2DMSARRAY UIMAGE2DMSARRAY - -%token F16IMAGE1D F16IMAGE2D F16IMAGE3D F16IMAGE2DRECT -%token F16IMAGECUBE F16IMAGE1DARRAY F16IMAGE2DARRAY F16IMAGECUBEARRAY -%token F16IMAGEBUFFER F16IMAGE2DMS F16IMAGE2DMSARRAY - -%token I64IMAGE1D U64IMAGE1D -%token I64IMAGE2D U64IMAGE2D -%token I64IMAGE3D U64IMAGE3D -%token I64IMAGE2DRECT U64IMAGE2DRECT -%token I64IMAGECUBE U64IMAGECUBE -%token I64IMAGEBUFFER U64IMAGEBUFFER -%token I64IMAGE1DARRAY U64IMAGE1DARRAY -%token I64IMAGE2DARRAY U64IMAGE2DARRAY -%token I64IMAGECUBEARRAY U64IMAGECUBEARRAY -%token I64IMAGE2DMS U64IMAGE2DMS -%token I64IMAGE2DMSARRAY U64IMAGE2DMSARRAY - -// texture without sampler -%token TEXTURECUBEARRAY ITEXTURECUBEARRAY UTEXTURECUBEARRAY -%token TEXTURE1D ITEXTURE1D UTEXTURE1D -%token TEXTURE1DARRAY ITEXTURE1DARRAY UTEXTURE1DARRAY -%token TEXTURE2DRECT ITEXTURE2DRECT UTEXTURE2DRECT -%token TEXTUREBUFFER ITEXTUREBUFFER UTEXTUREBUFFER -%token TEXTURE2DMS ITEXTURE2DMS UTEXTURE2DMS -%token TEXTURE2DMSARRAY ITEXTURE2DMSARRAY UTEXTURE2DMSARRAY - -%token F16TEXTURE1D F16TEXTURE2D F16TEXTURE3D F16TEXTURE2DRECT F16TEXTURECUBE -%token F16TEXTURE1DARRAY F16TEXTURE2DARRAY F16TEXTURECUBEARRAY -%token F16TEXTUREBUFFER F16TEXTURE2DMS F16TEXTURE2DMSARRAY - -// input attachments -%token SUBPASSINPUT SUBPASSINPUTMS ISUBPASSINPUT ISUBPASSINPUTMS USUBPASSINPUT USUBPASSINPUTMS -%token F16SUBPASSINPUT F16SUBPASSINPUTMS - -// spirv intrinsics -%token SPIRV_INSTRUCTION SPIRV_EXECUTION_MODE SPIRV_EXECUTION_MODE_ID -%token SPIRV_DECORATE SPIRV_DECORATE_ID SPIRV_DECORATE_STRING -%token SPIRV_TYPE SPIRV_STORAGE_CLASS SPIRV_BY_REFERENCE SPIRV_LITERAL - -GLSLANG_WEB_EXCLUDE_OFF - -%token LEFT_OP RIGHT_OP -%token INC_OP DEC_OP LE_OP GE_OP EQ_OP NE_OP -%token AND_OP OR_OP XOR_OP MUL_ASSIGN DIV_ASSIGN ADD_ASSIGN -%token MOD_ASSIGN LEFT_ASSIGN RIGHT_ASSIGN AND_ASSIGN XOR_ASSIGN OR_ASSIGN -%token SUB_ASSIGN -%token STRING_LITERAL - -%token LEFT_PAREN RIGHT_PAREN LEFT_BRACKET RIGHT_BRACKET LEFT_BRACE RIGHT_BRACE DOT -%token COMMA COLON EQUAL SEMICOLON BANG DASH TILDE PLUS STAR SLASH PERCENT -%token LEFT_ANGLE RIGHT_ANGLE VERTICAL_BAR CARET AMPERSAND QUESTION - -%token INVARIANT -%token HIGH_PRECISION MEDIUM_PRECISION LOW_PRECISION PRECISION -%token PACKED RESOURCE SUPERP - -%token FLOATCONSTANT INTCONSTANT UINTCONSTANT BOOLCONSTANT -%token IDENTIFIER TYPE_NAME -%token CENTROID IN OUT INOUT -%token STRUCT VOID WHILE -%token BREAK CONTINUE DO ELSE FOR IF DISCARD RETURN SWITCH CASE DEFAULT -%token TERMINATE_INVOCATION -%token TERMINATE_RAY IGNORE_INTERSECTION -%token UNIFORM SHARED BUFFER -%token FLAT SMOOTH LAYOUT - -GLSLANG_WEB_EXCLUDE_ON -%token DOUBLECONSTANT INT16CONSTANT UINT16CONSTANT FLOAT16CONSTANT INT32CONSTANT UINT32CONSTANT -%token INT64CONSTANT UINT64CONSTANT -%token SUBROUTINE DEMOTE -%token PAYLOADNV PAYLOADINNV HITATTRNV CALLDATANV CALLDATAINNV -%token PAYLOADEXT PAYLOADINEXT HITATTREXT CALLDATAEXT CALLDATAINEXT -%token PATCH SAMPLE NONUNIFORM -%token COHERENT VOLATILE RESTRICT READONLY WRITEONLY DEVICECOHERENT QUEUEFAMILYCOHERENT WORKGROUPCOHERENT -%token SUBGROUPCOHERENT NONPRIVATE SHADERCALLCOHERENT -%token NOPERSPECTIVE EXPLICITINTERPAMD PERVERTEXEXT PERVERTEXNV PERPRIMITIVENV PERVIEWNV PERTASKNV -%token PRECISE -GLSLANG_WEB_EXCLUDE_OFF - -%type assignment_operator unary_operator -%type variable_identifier primary_expression postfix_expression -%type expression integer_expression assignment_expression -%type unary_expression multiplicative_expression additive_expression -%type relational_expression equality_expression -%type conditional_expression constant_expression -%type logical_or_expression logical_xor_expression logical_and_expression -%type shift_expression and_expression exclusive_or_expression inclusive_or_expression -%type function_call initializer condition conditionopt - -%type translation_unit function_definition -%type statement simple_statement -%type statement_list switch_statement_list compound_statement -%type declaration_statement selection_statement selection_statement_nonattributed expression_statement -%type switch_statement switch_statement_nonattributed case_label -%type declaration external_declaration -%type for_init_statement compound_statement_no_new_scope -%type selection_rest_statement for_rest_statement -%type iteration_statement iteration_statement_nonattributed jump_statement statement_no_new_scope statement_scoped -%type single_declaration init_declarator_list - -%type parameter_declaration parameter_declarator parameter_type_specifier - -%type array_specifier -%type invariant_qualifier interpolation_qualifier storage_qualifier precision_qualifier -%type layout_qualifier layout_qualifier_id_list layout_qualifier_id - -%type type_parameter_specifier -%type type_parameter_specifier_opt -%type type_parameter_specifier_list - -%type type_qualifier fully_specified_type type_specifier -%type single_type_qualifier -%type type_specifier_nonarray -%type struct_specifier -%type struct_declarator -%type struct_declarator_list struct_declaration struct_declaration_list -%type block_structure -%type function_header function_declarator -%type function_header_with_parameters -%type function_call_header_with_parameters function_call_header_no_parameters function_call_generic function_prototype -%type function_call_or_method function_identifier function_call_header - -%type identifier_list - -GLSLANG_WEB_EXCLUDE_ON -%type precise_qualifier non_uniform_qualifier -%type type_name_list -%type attribute attribute_list single_attribute -%type demote_statement -%type initializer_list -%type spirv_requirements_list spirv_requirements_parameter -%type spirv_extension_list spirv_capability_list -%type spirv_execution_mode_qualifier -%type spirv_execution_mode_parameter_list spirv_execution_mode_parameter spirv_execution_mode_id_parameter_list -%type spirv_storage_class_qualifier -%type spirv_decorate_qualifier -%type spirv_decorate_parameter_list spirv_decorate_parameter -%type spirv_decorate_id_parameter_list -%type spirv_decorate_string_parameter_list -%type spirv_type_specifier -%type spirv_type_parameter_list spirv_type_parameter -%type spirv_instruction_qualifier -%type spirv_instruction_qualifier_list spirv_instruction_qualifier_id -GLSLANG_WEB_EXCLUDE_OFF - -%start translation_unit -%% - -variable_identifier - : IDENTIFIER { - $$ = parseContext.handleVariable($1.loc, $1.symbol, $1.string); - } - ; - -primary_expression - : variable_identifier { - $$ = $1; - } - | LEFT_PAREN expression RIGHT_PAREN { - $$ = $2; - if ($$->getAsConstantUnion()) - $$->getAsConstantUnion()->setExpression(); - } - | FLOATCONSTANT { - $$ = parseContext.intermediate.addConstantUnion($1.d, EbtFloat, $1.loc, true); - } - | INTCONSTANT { - $$ = parseContext.intermediate.addConstantUnion($1.i, $1.loc, true); - } - | UINTCONSTANT { - parseContext.fullIntegerCheck($1.loc, "unsigned literal"); - $$ = parseContext.intermediate.addConstantUnion($1.u, $1.loc, true); - } - | BOOLCONSTANT { - $$ = parseContext.intermediate.addConstantUnion($1.b, $1.loc, true); - } -GLSLANG_WEB_EXCLUDE_ON - | STRING_LITERAL { - $$ = parseContext.intermediate.addConstantUnion($1.string, $1.loc, true); - } - | INT32CONSTANT { - parseContext.explicitInt32Check($1.loc, "32-bit signed literal"); - $$ = parseContext.intermediate.addConstantUnion($1.i, $1.loc, true); - } - | UINT32CONSTANT { - parseContext.explicitInt32Check($1.loc, "32-bit signed literal"); - $$ = parseContext.intermediate.addConstantUnion($1.u, $1.loc, true); - } - | INT64CONSTANT { - parseContext.int64Check($1.loc, "64-bit integer literal"); - $$ = parseContext.intermediate.addConstantUnion($1.i64, $1.loc, true); - } - | UINT64CONSTANT { - parseContext.int64Check($1.loc, "64-bit unsigned integer literal"); - $$ = parseContext.intermediate.addConstantUnion($1.u64, $1.loc, true); - } - | INT16CONSTANT { - parseContext.explicitInt16Check($1.loc, "16-bit integer literal"); - $$ = parseContext.intermediate.addConstantUnion((short)$1.i, $1.loc, true); - } - | UINT16CONSTANT { - parseContext.explicitInt16Check($1.loc, "16-bit unsigned integer literal"); - $$ = parseContext.intermediate.addConstantUnion((unsigned short)$1.u, $1.loc, true); - } - | DOUBLECONSTANT { - parseContext.requireProfile($1.loc, ECoreProfile | ECompatibilityProfile, "double literal"); - if (! parseContext.symbolTable.atBuiltInLevel()) - parseContext.doubleCheck($1.loc, "double literal"); - $$ = parseContext.intermediate.addConstantUnion($1.d, EbtDouble, $1.loc, true); - } - | FLOAT16CONSTANT { - parseContext.float16Check($1.loc, "half float literal"); - $$ = parseContext.intermediate.addConstantUnion($1.d, EbtFloat16, $1.loc, true); - } -GLSLANG_WEB_EXCLUDE_OFF - ; - -postfix_expression - : primary_expression { - $$ = $1; - } - | postfix_expression LEFT_BRACKET integer_expression RIGHT_BRACKET { - $$ = parseContext.handleBracketDereference($2.loc, $1, $3); - } - | function_call { - $$ = $1; - } - | postfix_expression DOT IDENTIFIER { - $$ = parseContext.handleDotDereference($3.loc, $1, *$3.string); - } - | postfix_expression INC_OP { - parseContext.variableCheck($1); - parseContext.lValueErrorCheck($2.loc, "++", $1); - $$ = parseContext.handleUnaryMath($2.loc, "++", EOpPostIncrement, $1); - } - | postfix_expression DEC_OP { - parseContext.variableCheck($1); - parseContext.lValueErrorCheck($2.loc, "--", $1); - $$ = parseContext.handleUnaryMath($2.loc, "--", EOpPostDecrement, $1); - } - ; - -integer_expression - : expression { - parseContext.integerCheck($1, "[]"); - $$ = $1; - } - ; - -function_call - : function_call_or_method { - $$ = parseContext.handleFunctionCall($1.loc, $1.function, $1.intermNode); - delete $1.function; - } - ; - -function_call_or_method - : function_call_generic { - $$ = $1; - } - ; - -function_call_generic - : function_call_header_with_parameters RIGHT_PAREN { - $$ = $1; - $$.loc = $2.loc; - } - | function_call_header_no_parameters RIGHT_PAREN { - $$ = $1; - $$.loc = $2.loc; - } - ; - -function_call_header_no_parameters - : function_call_header VOID { - $$ = $1; - } - | function_call_header { - $$ = $1; - } - ; - -function_call_header_with_parameters - : function_call_header assignment_expression { - TParameter param = { 0, new TType }; - param.type->shallowCopy($2->getType()); - $1.function->addParameter(param); - $$.function = $1.function; - $$.intermNode = $2; - } - | function_call_header_with_parameters COMMA assignment_expression { - TParameter param = { 0, new TType }; - param.type->shallowCopy($3->getType()); - $1.function->addParameter(param); - $$.function = $1.function; - $$.intermNode = parseContext.intermediate.growAggregate($1.intermNode, $3, $2.loc); - } - ; - -function_call_header - : function_identifier LEFT_PAREN { - $$ = $1; - } - ; - -// Grammar Note: Constructors look like functions, but are recognized as types. - -function_identifier - : type_specifier { - // Constructor - $$.intermNode = 0; - $$.function = parseContext.handleConstructorCall($1.loc, $1); - } - | postfix_expression { - // - // Should be a method or subroutine call, but we haven't recognized the arguments yet. - // - $$.function = 0; - $$.intermNode = 0; - - TIntermMethod* method = $1->getAsMethodNode(); - if (method) { - $$.function = new TFunction(&method->getMethodName(), TType(EbtInt), EOpArrayLength); - $$.intermNode = method->getObject(); - } else { - TIntermSymbol* symbol = $1->getAsSymbolNode(); - if (symbol) { - parseContext.reservedErrorCheck(symbol->getLoc(), symbol->getName()); - TFunction *function = new TFunction(&symbol->getName(), TType(EbtVoid)); - $$.function = function; - } else - parseContext.error($1->getLoc(), "function call, method, or subroutine call expected", "", ""); - } - - if ($$.function == 0) { - // error recover - TString* empty = NewPoolTString(""); - $$.function = new TFunction(empty, TType(EbtVoid), EOpNull); - } - } -GLSLANG_WEB_EXCLUDE_ON - | non_uniform_qualifier { - // Constructor - $$.intermNode = 0; - $$.function = parseContext.handleConstructorCall($1.loc, $1); - } -GLSLANG_WEB_EXCLUDE_OFF - ; - -unary_expression - : postfix_expression { - parseContext.variableCheck($1); - $$ = $1; - if (TIntermMethod* method = $1->getAsMethodNode()) - parseContext.error($1->getLoc(), "incomplete method syntax", method->getMethodName().c_str(), ""); - } - | INC_OP unary_expression { - parseContext.lValueErrorCheck($1.loc, "++", $2); - $$ = parseContext.handleUnaryMath($1.loc, "++", EOpPreIncrement, $2); - } - | DEC_OP unary_expression { - parseContext.lValueErrorCheck($1.loc, "--", $2); - $$ = parseContext.handleUnaryMath($1.loc, "--", EOpPreDecrement, $2); - } - | unary_operator unary_expression { - if ($1.op != EOpNull) { - char errorOp[2] = {0, 0}; - switch($1.op) { - case EOpNegative: errorOp[0] = '-'; break; - case EOpLogicalNot: errorOp[0] = '!'; break; - case EOpBitwiseNot: errorOp[0] = '~'; break; - default: break; // some compilers want this - } - $$ = parseContext.handleUnaryMath($1.loc, errorOp, $1.op, $2); - } else { - $$ = $2; - if ($$->getAsConstantUnion()) - $$->getAsConstantUnion()->setExpression(); - } - } - ; -// Grammar Note: No traditional style type casts. - -unary_operator - : PLUS { $$.loc = $1.loc; $$.op = EOpNull; } - | DASH { $$.loc = $1.loc; $$.op = EOpNegative; } - | BANG { $$.loc = $1.loc; $$.op = EOpLogicalNot; } - | TILDE { $$.loc = $1.loc; $$.op = EOpBitwiseNot; - parseContext.fullIntegerCheck($1.loc, "bitwise not"); } - ; -// Grammar Note: No '*' or '&' unary ops. Pointers are not supported. - -multiplicative_expression - : unary_expression { $$ = $1; } - | multiplicative_expression STAR unary_expression { - $$ = parseContext.handleBinaryMath($2.loc, "*", EOpMul, $1, $3); - if ($$ == 0) - $$ = $1; - } - | multiplicative_expression SLASH unary_expression { - $$ = parseContext.handleBinaryMath($2.loc, "/", EOpDiv, $1, $3); - if ($$ == 0) - $$ = $1; - } - | multiplicative_expression PERCENT unary_expression { - parseContext.fullIntegerCheck($2.loc, "%"); - $$ = parseContext.handleBinaryMath($2.loc, "%", EOpMod, $1, $3); - if ($$ == 0) - $$ = $1; - } - ; - -additive_expression - : multiplicative_expression { $$ = $1; } - | additive_expression PLUS multiplicative_expression { - $$ = parseContext.handleBinaryMath($2.loc, "+", EOpAdd, $1, $3); - if ($$ == 0) - $$ = $1; - } - | additive_expression DASH multiplicative_expression { - $$ = parseContext.handleBinaryMath($2.loc, "-", EOpSub, $1, $3); - if ($$ == 0) - $$ = $1; - } - ; - -shift_expression - : additive_expression { $$ = $1; } - | shift_expression LEFT_OP additive_expression { - parseContext.fullIntegerCheck($2.loc, "bit shift left"); - $$ = parseContext.handleBinaryMath($2.loc, "<<", EOpLeftShift, $1, $3); - if ($$ == 0) - $$ = $1; - } - | shift_expression RIGHT_OP additive_expression { - parseContext.fullIntegerCheck($2.loc, "bit shift right"); - $$ = parseContext.handleBinaryMath($2.loc, ">>", EOpRightShift, $1, $3); - if ($$ == 0) - $$ = $1; - } - ; - -relational_expression - : shift_expression { $$ = $1; } - | relational_expression LEFT_ANGLE shift_expression { - $$ = parseContext.handleBinaryMath($2.loc, "<", EOpLessThan, $1, $3); - if ($$ == 0) - $$ = parseContext.intermediate.addConstantUnion(false, $2.loc); - } - | relational_expression RIGHT_ANGLE shift_expression { - $$ = parseContext.handleBinaryMath($2.loc, ">", EOpGreaterThan, $1, $3); - if ($$ == 0) - $$ = parseContext.intermediate.addConstantUnion(false, $2.loc); - } - | relational_expression LE_OP shift_expression { - $$ = parseContext.handleBinaryMath($2.loc, "<=", EOpLessThanEqual, $1, $3); - if ($$ == 0) - $$ = parseContext.intermediate.addConstantUnion(false, $2.loc); - } - | relational_expression GE_OP shift_expression { - $$ = parseContext.handleBinaryMath($2.loc, ">=", EOpGreaterThanEqual, $1, $3); - if ($$ == 0) - $$ = parseContext.intermediate.addConstantUnion(false, $2.loc); - } - ; - -equality_expression - : relational_expression { $$ = $1; } - | equality_expression EQ_OP relational_expression { - parseContext.arrayObjectCheck($2.loc, $1->getType(), "array comparison"); - parseContext.opaqueCheck($2.loc, $1->getType(), "=="); - parseContext.specializationCheck($2.loc, $1->getType(), "=="); - parseContext.referenceCheck($2.loc, $1->getType(), "=="); - $$ = parseContext.handleBinaryMath($2.loc, "==", EOpEqual, $1, $3); - if ($$ == 0) - $$ = parseContext.intermediate.addConstantUnion(false, $2.loc); - } - | equality_expression NE_OP relational_expression { - parseContext.arrayObjectCheck($2.loc, $1->getType(), "array comparison"); - parseContext.opaqueCheck($2.loc, $1->getType(), "!="); - parseContext.specializationCheck($2.loc, $1->getType(), "!="); - parseContext.referenceCheck($2.loc, $1->getType(), "!="); - $$ = parseContext.handleBinaryMath($2.loc, "!=", EOpNotEqual, $1, $3); - if ($$ == 0) - $$ = parseContext.intermediate.addConstantUnion(false, $2.loc); - } - ; - -and_expression - : equality_expression { $$ = $1; } - | and_expression AMPERSAND equality_expression { - parseContext.fullIntegerCheck($2.loc, "bitwise and"); - $$ = parseContext.handleBinaryMath($2.loc, "&", EOpAnd, $1, $3); - if ($$ == 0) - $$ = $1; - } - ; - -exclusive_or_expression - : and_expression { $$ = $1; } - | exclusive_or_expression CARET and_expression { - parseContext.fullIntegerCheck($2.loc, "bitwise exclusive or"); - $$ = parseContext.handleBinaryMath($2.loc, "^", EOpExclusiveOr, $1, $3); - if ($$ == 0) - $$ = $1; - } - ; - -inclusive_or_expression - : exclusive_or_expression { $$ = $1; } - | inclusive_or_expression VERTICAL_BAR exclusive_or_expression { - parseContext.fullIntegerCheck($2.loc, "bitwise inclusive or"); - $$ = parseContext.handleBinaryMath($2.loc, "|", EOpInclusiveOr, $1, $3); - if ($$ == 0) - $$ = $1; - } - ; - -logical_and_expression - : inclusive_or_expression { $$ = $1; } - | logical_and_expression AND_OP inclusive_or_expression { - $$ = parseContext.handleBinaryMath($2.loc, "&&", EOpLogicalAnd, $1, $3); - if ($$ == 0) - $$ = parseContext.intermediate.addConstantUnion(false, $2.loc); - } - ; - -logical_xor_expression - : logical_and_expression { $$ = $1; } - | logical_xor_expression XOR_OP logical_and_expression { - $$ = parseContext.handleBinaryMath($2.loc, "^^", EOpLogicalXor, $1, $3); - if ($$ == 0) - $$ = parseContext.intermediate.addConstantUnion(false, $2.loc); - } - ; - -logical_or_expression - : logical_xor_expression { $$ = $1; } - | logical_or_expression OR_OP logical_xor_expression { - $$ = parseContext.handleBinaryMath($2.loc, "||", EOpLogicalOr, $1, $3); - if ($$ == 0) - $$ = parseContext.intermediate.addConstantUnion(false, $2.loc); - } - ; - -conditional_expression - : logical_or_expression { $$ = $1; } - | logical_or_expression QUESTION { - ++parseContext.controlFlowNestingLevel; - } - expression COLON assignment_expression { - --parseContext.controlFlowNestingLevel; - parseContext.boolCheck($2.loc, $1); - parseContext.rValueErrorCheck($2.loc, "?", $1); - parseContext.rValueErrorCheck($5.loc, ":", $4); - parseContext.rValueErrorCheck($5.loc, ":", $6); - $$ = parseContext.intermediate.addSelection($1, $4, $6, $2.loc); - if ($$ == 0) { - parseContext.binaryOpError($2.loc, ":", $4->getCompleteString(parseContext.intermediate.getEnhancedMsgs()), $6->getCompleteString(parseContext.intermediate.getEnhancedMsgs())); - $$ = $6; - } - } - ; - -assignment_expression - : conditional_expression { $$ = $1; } - | unary_expression assignment_operator assignment_expression { - parseContext.arrayObjectCheck($2.loc, $1->getType(), "array assignment"); - parseContext.opaqueCheck($2.loc, $1->getType(), "="); - parseContext.storage16BitAssignmentCheck($2.loc, $1->getType(), "="); - parseContext.specializationCheck($2.loc, $1->getType(), "="); - parseContext.lValueErrorCheck($2.loc, "assign", $1); - parseContext.rValueErrorCheck($2.loc, "assign", $3); - $$ = parseContext.addAssign($2.loc, $2.op, $1, $3); - if ($$ == 0) { - parseContext.assignError($2.loc, "assign", $1->getCompleteString(parseContext.intermediate.getEnhancedMsgs()), $3->getCompleteString(parseContext.intermediate.getEnhancedMsgs())); - $$ = $1; - } - } - ; - -assignment_operator - : EQUAL { - $$.loc = $1.loc; - $$.op = EOpAssign; - } - | MUL_ASSIGN { - $$.loc = $1.loc; - $$.op = EOpMulAssign; - } - | DIV_ASSIGN { - $$.loc = $1.loc; - $$.op = EOpDivAssign; - } - | MOD_ASSIGN { - parseContext.fullIntegerCheck($1.loc, "%="); - $$.loc = $1.loc; - $$.op = EOpModAssign; - } - | ADD_ASSIGN { - $$.loc = $1.loc; - $$.op = EOpAddAssign; - } - | SUB_ASSIGN { - $$.loc = $1.loc; - $$.op = EOpSubAssign; - } - | LEFT_ASSIGN { - parseContext.fullIntegerCheck($1.loc, "bit-shift left assign"); - $$.loc = $1.loc; $$.op = EOpLeftShiftAssign; - } - | RIGHT_ASSIGN { - parseContext.fullIntegerCheck($1.loc, "bit-shift right assign"); - $$.loc = $1.loc; $$.op = EOpRightShiftAssign; - } - | AND_ASSIGN { - parseContext.fullIntegerCheck($1.loc, "bitwise-and assign"); - $$.loc = $1.loc; $$.op = EOpAndAssign; - } - | XOR_ASSIGN { - parseContext.fullIntegerCheck($1.loc, "bitwise-xor assign"); - $$.loc = $1.loc; $$.op = EOpExclusiveOrAssign; - } - | OR_ASSIGN { - parseContext.fullIntegerCheck($1.loc, "bitwise-or assign"); - $$.loc = $1.loc; $$.op = EOpInclusiveOrAssign; - } - ; - -expression - : assignment_expression { - $$ = $1; - } - | expression COMMA assignment_expression { - parseContext.samplerConstructorLocationCheck($2.loc, ",", $3); - $$ = parseContext.intermediate.addComma($1, $3, $2.loc); - if ($$ == 0) { - parseContext.binaryOpError($2.loc, ",", $1->getCompleteString(parseContext.intermediate.getEnhancedMsgs()), $3->getCompleteString(parseContext.intermediate.getEnhancedMsgs())); - $$ = $3; - } - } - ; - -constant_expression - : conditional_expression { - parseContext.constantValueCheck($1, ""); - $$ = $1; - } - ; - -declaration - : function_prototype SEMICOLON { - parseContext.handleFunctionDeclarator($1.loc, *$1.function, true /* prototype */); - $$ = 0; - // TODO: 4.0 functionality: subroutines: make the identifier a user type for this signature - } -GLSLANG_WEB_EXCLUDE_ON - | spirv_instruction_qualifier function_prototype SEMICOLON { - parseContext.requireExtensions($2.loc, 1, &E_GL_EXT_spirv_intrinsics, "SPIR-V instruction qualifier"); - $2.function->setSpirvInstruction(*$1); // Attach SPIR-V intruction qualifier - parseContext.handleFunctionDeclarator($2.loc, *$2.function, true /* prototype */); - $$ = 0; - // TODO: 4.0 functionality: subroutines: make the identifier a user type for this signature - } - | spirv_execution_mode_qualifier SEMICOLON { - parseContext.globalCheck($2.loc, "SPIR-V execution mode qualifier"); - parseContext.requireExtensions($2.loc, 1, &E_GL_EXT_spirv_intrinsics, "SPIR-V execution mode qualifier"); - $$ = 0; - } -GLSLANG_WEB_EXCLUDE_OFF - | init_declarator_list SEMICOLON { - if ($1.intermNode && $1.intermNode->getAsAggregate()) - $1.intermNode->getAsAggregate()->setOperator(EOpSequence); - $$ = $1.intermNode; - } - | PRECISION precision_qualifier type_specifier SEMICOLON { - parseContext.profileRequires($1.loc, ENoProfile, 130, 0, "precision statement"); - // lazy setting of the previous scope's defaults, has effect only the first time it is called in a particular scope - parseContext.symbolTable.setPreviousDefaultPrecisions(&parseContext.defaultPrecision[0]); - parseContext.setDefaultPrecision($1.loc, $3, $2.qualifier.precision); - $$ = 0; - } - | block_structure SEMICOLON { - parseContext.declareBlock($1.loc, *$1.typeList); - $$ = 0; - } - | block_structure IDENTIFIER SEMICOLON { - parseContext.declareBlock($1.loc, *$1.typeList, $2.string); - $$ = 0; - } - | block_structure IDENTIFIER array_specifier SEMICOLON { - parseContext.declareBlock($1.loc, *$1.typeList, $2.string, $3.arraySizes); - $$ = 0; - } - | type_qualifier SEMICOLON { - parseContext.globalQualifierFixCheck($1.loc, $1.qualifier); - parseContext.updateStandaloneQualifierDefaults($1.loc, $1); - $$ = 0; - } - | type_qualifier IDENTIFIER SEMICOLON { - parseContext.checkNoShaderLayouts($1.loc, $1.shaderQualifiers); - parseContext.addQualifierToExisting($1.loc, $1.qualifier, *$2.string); - $$ = 0; - } - | type_qualifier IDENTIFIER identifier_list SEMICOLON { - parseContext.checkNoShaderLayouts($1.loc, $1.shaderQualifiers); - $3->push_back($2.string); - parseContext.addQualifierToExisting($1.loc, $1.qualifier, *$3); - $$ = 0; - } - ; - -block_structure - : type_qualifier IDENTIFIER LEFT_BRACE { parseContext.nestedBlockCheck($1.loc); } struct_declaration_list RIGHT_BRACE { - --parseContext.blockNestingLevel; - parseContext.blockName = $2.string; - parseContext.globalQualifierFixCheck($1.loc, $1.qualifier); - parseContext.checkNoShaderLayouts($1.loc, $1.shaderQualifiers); - parseContext.currentBlockQualifier = $1.qualifier; - $$.loc = $1.loc; - $$.typeList = $5; - } - -identifier_list - : COMMA IDENTIFIER { - $$ = new TIdentifierList; - $$->push_back($2.string); - } - | identifier_list COMMA IDENTIFIER { - $$ = $1; - $$->push_back($3.string); - } - ; - -function_prototype - : function_declarator RIGHT_PAREN { - $$.function = $1; - $$.loc = $2.loc; - } - | function_declarator RIGHT_PAREN attribute { - $$.function = $1; - $$.loc = $2.loc; - parseContext.requireExtensions($2.loc, 1, &E_GL_EXT_subgroup_uniform_control_flow, "attribute"); - parseContext.handleFunctionAttributes($2.loc, *$3); - } - | attribute function_declarator RIGHT_PAREN { - $$.function = $2; - $$.loc = $3.loc; - parseContext.requireExtensions($3.loc, 1, &E_GL_EXT_subgroup_uniform_control_flow, "attribute"); - parseContext.handleFunctionAttributes($3.loc, *$1); - } - | attribute function_declarator RIGHT_PAREN attribute { - $$.function = $2; - $$.loc = $3.loc; - parseContext.requireExtensions($3.loc, 1, &E_GL_EXT_subgroup_uniform_control_flow, "attribute"); - parseContext.handleFunctionAttributes($3.loc, *$1); - parseContext.handleFunctionAttributes($3.loc, *$4); - } - ; - -function_declarator - : function_header { - $$ = $1; - } - | function_header_with_parameters { - $$ = $1; - } - ; - - -function_header_with_parameters - : function_header parameter_declaration { - // Add the parameter - $$ = $1; - if ($2.param.type->getBasicType() != EbtVoid) - $1->addParameter($2.param); - else - delete $2.param.type; - } - | function_header_with_parameters COMMA parameter_declaration { - // - // Only first parameter of one-parameter functions can be void - // The check for named parameters not being void is done in parameter_declarator - // - if ($3.param.type->getBasicType() == EbtVoid) { - // - // This parameter > first is void - // - parseContext.error($2.loc, "cannot be an argument type except for '(void)'", "void", ""); - delete $3.param.type; - } else { - // Add the parameter - $$ = $1; - $1->addParameter($3.param); - } - } - ; - -function_header - : fully_specified_type IDENTIFIER LEFT_PAREN { - if ($1.qualifier.storage != EvqGlobal && $1.qualifier.storage != EvqTemporary) { - parseContext.error($2.loc, "no qualifiers allowed for function return", - GetStorageQualifierString($1.qualifier.storage), ""); - } - if ($1.arraySizes) - parseContext.arraySizeRequiredCheck($1.loc, *$1.arraySizes); - - // Add the function as a prototype after parsing it (we do not support recursion) - TFunction *function; - TType type($1); - - // Potentially rename shader entry point function. No-op most of the time. - parseContext.renameShaderFunction($2.string); - - // Make the function - function = new TFunction($2.string, type); - $$ = function; - } - ; - -parameter_declarator - // Type + name - : type_specifier IDENTIFIER { - if ($1.arraySizes) { - parseContext.profileRequires($1.loc, ENoProfile, 120, E_GL_3DL_array_objects, "arrayed type"); - parseContext.profileRequires($1.loc, EEsProfile, 300, 0, "arrayed type"); - parseContext.arraySizeRequiredCheck($1.loc, *$1.arraySizes); - } - if ($1.basicType == EbtVoid) { - parseContext.error($2.loc, "illegal use of type 'void'", $2.string->c_str(), ""); - } - parseContext.reservedErrorCheck($2.loc, *$2.string); - - TParameter param = {$2.string, new TType($1)}; - $$.loc = $2.loc; - $$.param = param; - } - | type_specifier IDENTIFIER array_specifier { - if ($1.arraySizes) { - parseContext.profileRequires($1.loc, ENoProfile, 120, E_GL_3DL_array_objects, "arrayed type"); - parseContext.profileRequires($1.loc, EEsProfile, 300, 0, "arrayed type"); - parseContext.arraySizeRequiredCheck($1.loc, *$1.arraySizes); - } - TType* type = new TType($1); - type->transferArraySizes($3.arraySizes); - type->copyArrayInnerSizes($1.arraySizes); - - parseContext.arrayOfArrayVersionCheck($2.loc, type->getArraySizes()); - parseContext.arraySizeRequiredCheck($3.loc, *$3.arraySizes); - parseContext.reservedErrorCheck($2.loc, *$2.string); - - TParameter param = { $2.string, type }; - - $$.loc = $2.loc; - $$.param = param; - } - ; - -parameter_declaration - // - // With name - // - : type_qualifier parameter_declarator { - $$ = $2; - if ($1.qualifier.precision != EpqNone) - $$.param.type->getQualifier().precision = $1.qualifier.precision; - parseContext.precisionQualifierCheck($$.loc, $$.param.type->getBasicType(), $$.param.type->getQualifier()); - - parseContext.checkNoShaderLayouts($1.loc, $1.shaderQualifiers); - parseContext.parameterTypeCheck($2.loc, $1.qualifier.storage, *$$.param.type); - parseContext.paramCheckFix($1.loc, $1.qualifier, *$$.param.type); - - } - | parameter_declarator { - $$ = $1; - - parseContext.parameterTypeCheck($1.loc, EvqIn, *$1.param.type); - parseContext.paramCheckFixStorage($1.loc, EvqTemporary, *$$.param.type); - parseContext.precisionQualifierCheck($$.loc, $$.param.type->getBasicType(), $$.param.type->getQualifier()); - } - // - // Without name - // - | type_qualifier parameter_type_specifier { - $$ = $2; - if ($1.qualifier.precision != EpqNone) - $$.param.type->getQualifier().precision = $1.qualifier.precision; - parseContext.precisionQualifierCheck($1.loc, $$.param.type->getBasicType(), $$.param.type->getQualifier()); - - parseContext.checkNoShaderLayouts($1.loc, $1.shaderQualifiers); - parseContext.parameterTypeCheck($2.loc, $1.qualifier.storage, *$$.param.type); - parseContext.paramCheckFix($1.loc, $1.qualifier, *$$.param.type); - } - | parameter_type_specifier { - $$ = $1; - - parseContext.parameterTypeCheck($1.loc, EvqIn, *$1.param.type); - parseContext.paramCheckFixStorage($1.loc, EvqTemporary, *$$.param.type); - parseContext.precisionQualifierCheck($$.loc, $$.param.type->getBasicType(), $$.param.type->getQualifier()); - } - ; - -parameter_type_specifier - : type_specifier { - TParameter param = { 0, new TType($1) }; - $$.param = param; - if ($1.arraySizes) - parseContext.arraySizeRequiredCheck($1.loc, *$1.arraySizes); - } - ; - -init_declarator_list - : single_declaration { - $$ = $1; - } - | init_declarator_list COMMA IDENTIFIER { - $$ = $1; - parseContext.declareVariable($3.loc, *$3.string, $1.type); - } - | init_declarator_list COMMA IDENTIFIER array_specifier { - $$ = $1; - parseContext.declareVariable($3.loc, *$3.string, $1.type, $4.arraySizes); - } - | init_declarator_list COMMA IDENTIFIER array_specifier EQUAL initializer { - $$.type = $1.type; - TIntermNode* initNode = parseContext.declareVariable($3.loc, *$3.string, $1.type, $4.arraySizes, $6); - $$.intermNode = parseContext.intermediate.growAggregate($1.intermNode, initNode, $5.loc); - } - | init_declarator_list COMMA IDENTIFIER EQUAL initializer { - $$.type = $1.type; - TIntermNode* initNode = parseContext.declareVariable($3.loc, *$3.string, $1.type, 0, $5); - $$.intermNode = parseContext.intermediate.growAggregate($1.intermNode, initNode, $4.loc); - } - ; - -single_declaration - : fully_specified_type { - $$.type = $1; - $$.intermNode = 0; -GLSLANG_WEB_EXCLUDE_ON - parseContext.declareTypeDefaults($$.loc, $$.type); -GLSLANG_WEB_EXCLUDE_OFF - } - | fully_specified_type IDENTIFIER { - $$.type = $1; - $$.intermNode = 0; - parseContext.declareVariable($2.loc, *$2.string, $1); - } - | fully_specified_type IDENTIFIER array_specifier { - $$.type = $1; - $$.intermNode = 0; - parseContext.declareVariable($2.loc, *$2.string, $1, $3.arraySizes); - } - | fully_specified_type IDENTIFIER array_specifier EQUAL initializer { - $$.type = $1; - TIntermNode* initNode = parseContext.declareVariable($2.loc, *$2.string, $1, $3.arraySizes, $5); - $$.intermNode = parseContext.intermediate.growAggregate(0, initNode, $4.loc); - } - | fully_specified_type IDENTIFIER EQUAL initializer { - $$.type = $1; - TIntermNode* initNode = parseContext.declareVariable($2.loc, *$2.string, $1, 0, $4); - $$.intermNode = parseContext.intermediate.growAggregate(0, initNode, $3.loc); - } - -// Grammar Note: No 'enum', or 'typedef'. - -fully_specified_type - : type_specifier { - $$ = $1; - - parseContext.globalQualifierTypeCheck($1.loc, $1.qualifier, $$); - if ($1.arraySizes) { - parseContext.profileRequires($1.loc, ENoProfile, 120, E_GL_3DL_array_objects, "arrayed type"); - parseContext.profileRequires($1.loc, EEsProfile, 300, 0, "arrayed type"); - } - parseContext.precisionQualifierCheck($$.loc, $$.basicType, $$.qualifier); - } - | type_qualifier type_specifier { - parseContext.globalQualifierFixCheck($1.loc, $1.qualifier); - parseContext.globalQualifierTypeCheck($1.loc, $1.qualifier, $2); - - if ($2.arraySizes) { - parseContext.profileRequires($2.loc, ENoProfile, 120, E_GL_3DL_array_objects, "arrayed type"); - parseContext.profileRequires($2.loc, EEsProfile, 300, 0, "arrayed type"); - } - - if ($2.arraySizes && parseContext.arrayQualifierError($2.loc, $1.qualifier)) - $2.arraySizes = nullptr; - - parseContext.checkNoShaderLayouts($2.loc, $1.shaderQualifiers); - $2.shaderQualifiers.merge($1.shaderQualifiers); - parseContext.mergeQualifiers($2.loc, $2.qualifier, $1.qualifier, true); - parseContext.precisionQualifierCheck($2.loc, $2.basicType, $2.qualifier); - - $$ = $2; - - if (! $$.qualifier.isInterpolation() && - ((parseContext.language == EShLangVertex && $$.qualifier.storage == EvqVaryingOut) || - (parseContext.language == EShLangFragment && $$.qualifier.storage == EvqVaryingIn))) - $$.qualifier.smooth = true; - } - ; - -invariant_qualifier - : INVARIANT { - parseContext.globalCheck($1.loc, "invariant"); - parseContext.profileRequires($$.loc, ENoProfile, 120, 0, "invariant"); - $$.init($1.loc); - $$.qualifier.invariant = true; - } - ; - -interpolation_qualifier - : SMOOTH { - parseContext.globalCheck($1.loc, "smooth"); - parseContext.profileRequires($1.loc, ENoProfile, 130, 0, "smooth"); - parseContext.profileRequires($1.loc, EEsProfile, 300, 0, "smooth"); - $$.init($1.loc); - $$.qualifier.smooth = true; - } - | FLAT { - parseContext.globalCheck($1.loc, "flat"); - parseContext.profileRequires($1.loc, ENoProfile, 130, 0, "flat"); - parseContext.profileRequires($1.loc, EEsProfile, 300, 0, "flat"); - $$.init($1.loc); - $$.qualifier.flat = true; - } -GLSLANG_WEB_EXCLUDE_ON - | NOPERSPECTIVE { - parseContext.globalCheck($1.loc, "noperspective"); - parseContext.profileRequires($1.loc, EEsProfile, 0, E_GL_NV_shader_noperspective_interpolation, "noperspective"); - parseContext.profileRequires($1.loc, ENoProfile, 130, 0, "noperspective"); - $$.init($1.loc); - $$.qualifier.nopersp = true; - } - | EXPLICITINTERPAMD { - parseContext.globalCheck($1.loc, "__explicitInterpAMD"); - parseContext.profileRequires($1.loc, ECoreProfile, 450, E_GL_AMD_shader_explicit_vertex_parameter, "explicit interpolation"); - parseContext.profileRequires($1.loc, ECompatibilityProfile, 450, E_GL_AMD_shader_explicit_vertex_parameter, "explicit interpolation"); - $$.init($1.loc); - $$.qualifier.explicitInterp = true; - } - | PERVERTEXNV { - parseContext.globalCheck($1.loc, "pervertexNV"); - parseContext.profileRequires($1.loc, ECoreProfile, 0, E_GL_NV_fragment_shader_barycentric, "fragment shader barycentric"); - parseContext.profileRequires($1.loc, ECompatibilityProfile, 0, E_GL_NV_fragment_shader_barycentric, "fragment shader barycentric"); - parseContext.profileRequires($1.loc, EEsProfile, 0, E_GL_NV_fragment_shader_barycentric, "fragment shader barycentric"); - $$.init($1.loc); - $$.qualifier.pervertexNV = true; - } - | PERVERTEXEXT { - parseContext.globalCheck($1.loc, "pervertexEXT"); - parseContext.profileRequires($1.loc, ECoreProfile, 0, E_GL_EXT_fragment_shader_barycentric, "fragment shader barycentric"); - parseContext.profileRequires($1.loc, ECompatibilityProfile, 0, E_GL_EXT_fragment_shader_barycentric, "fragment shader barycentric"); - parseContext.profileRequires($1.loc, EEsProfile, 0, E_GL_EXT_fragment_shader_barycentric, "fragment shader barycentric"); - $$.init($1.loc); - $$.qualifier.pervertexEXT = true; - } - | PERPRIMITIVENV { - // No need for profile version or extension check. Shader stage already checks both. - parseContext.globalCheck($1.loc, "perprimitiveNV"); - parseContext.requireStage($1.loc, (EShLanguageMask)(EShLangFragmentMask | EShLangMeshNVMask), "perprimitiveNV"); - // Fragment shader stage doesn't check for extension. So we explicitly add below extension check. - if (parseContext.language == EShLangFragment) - parseContext.requireExtensions($1.loc, 1, &E_GL_NV_mesh_shader, "perprimitiveNV"); - $$.init($1.loc); - $$.qualifier.perPrimitiveNV = true; - } - | PERVIEWNV { - // No need for profile version or extension check. Shader stage already checks both. - parseContext.globalCheck($1.loc, "perviewNV"); - parseContext.requireStage($1.loc, EShLangMeshNV, "perviewNV"); - $$.init($1.loc); - $$.qualifier.perViewNV = true; - } - | PERTASKNV { - // No need for profile version or extension check. Shader stage already checks both. - parseContext.globalCheck($1.loc, "taskNV"); - parseContext.requireStage($1.loc, (EShLanguageMask)(EShLangTaskNVMask | EShLangMeshNVMask), "taskNV"); - $$.init($1.loc); - $$.qualifier.perTaskNV = true; - } -GLSLANG_WEB_EXCLUDE_OFF - ; - -layout_qualifier - : LAYOUT LEFT_PAREN layout_qualifier_id_list RIGHT_PAREN { - $$ = $3; - } - ; - -layout_qualifier_id_list - : layout_qualifier_id { - $$ = $1; - } - | layout_qualifier_id_list COMMA layout_qualifier_id { - $$ = $1; - $$.shaderQualifiers.merge($3.shaderQualifiers); - parseContext.mergeObjectLayoutQualifiers($$.qualifier, $3.qualifier, false); - } - -layout_qualifier_id - : IDENTIFIER { - $$.init($1.loc); - parseContext.setLayoutQualifier($1.loc, $$, *$1.string); - } - | IDENTIFIER EQUAL constant_expression { - $$.init($1.loc); - parseContext.setLayoutQualifier($1.loc, $$, *$1.string, $3); - } - | SHARED { // because "shared" is both an identifier and a keyword - $$.init($1.loc); - TString strShared("shared"); - parseContext.setLayoutQualifier($1.loc, $$, strShared); - } - ; - -GLSLANG_WEB_EXCLUDE_ON -precise_qualifier - : PRECISE { - parseContext.profileRequires($$.loc, ECoreProfile | ECompatibilityProfile, 400, E_GL_ARB_gpu_shader5, "precise"); - parseContext.profileRequires($1.loc, EEsProfile, 320, Num_AEP_gpu_shader5, AEP_gpu_shader5, "precise"); - $$.init($1.loc); - $$.qualifier.noContraction = true; - } - ; -GLSLANG_WEB_EXCLUDE_OFF - -type_qualifier - : single_type_qualifier { - $$ = $1; - } - | type_qualifier single_type_qualifier { - $$ = $1; - if ($$.basicType == EbtVoid) - $$.basicType = $2.basicType; - - $$.shaderQualifiers.merge($2.shaderQualifiers); - parseContext.mergeQualifiers($$.loc, $$.qualifier, $2.qualifier, false); - } - ; - -single_type_qualifier - : storage_qualifier { - $$ = $1; - } - | layout_qualifier { - $$ = $1; - } - | precision_qualifier { - parseContext.checkPrecisionQualifier($1.loc, $1.qualifier.precision); - $$ = $1; - } - | interpolation_qualifier { - // allow inheritance of storage qualifier from block declaration - $$ = $1; - } - | invariant_qualifier { - // allow inheritance of storage qualifier from block declaration - $$ = $1; - } -GLSLANG_WEB_EXCLUDE_ON - | precise_qualifier { - // allow inheritance of storage qualifier from block declaration - $$ = $1; - } - | non_uniform_qualifier { - $$ = $1; - } - | spirv_storage_class_qualifier { - parseContext.globalCheck($1.loc, "spirv_storage_class"); - parseContext.requireExtensions($1.loc, 1, &E_GL_EXT_spirv_intrinsics, "SPIR-V storage class qualifier"); - $$ = $1; - } - | spirv_decorate_qualifier { - parseContext.requireExtensions($1.loc, 1, &E_GL_EXT_spirv_intrinsics, "SPIR-V decorate qualifier"); - $$ = $1; - } - | SPIRV_BY_REFERENCE { - parseContext.requireExtensions($1.loc, 1, &E_GL_EXT_spirv_intrinsics, "spirv_by_reference"); - $$.init($1.loc); - $$.qualifier.setSpirvByReference(); - } - | SPIRV_LITERAL { - parseContext.requireExtensions($1.loc, 1, &E_GL_EXT_spirv_intrinsics, "spirv_by_literal"); - $$.init($1.loc); - $$.qualifier.setSpirvLiteral(); - } -GLSLANG_WEB_EXCLUDE_OFF - ; - -storage_qualifier - : CONST { - $$.init($1.loc); - $$.qualifier.storage = EvqConst; // will later turn into EvqConstReadOnly, if the initializer is not constant - } - | INOUT { - parseContext.globalCheck($1.loc, "inout"); - $$.init($1.loc); - $$.qualifier.storage = EvqInOut; - } - | IN { - parseContext.globalCheck($1.loc, "in"); - $$.init($1.loc); - // whether this is a parameter "in" or a pipeline "in" will get sorted out a bit later - $$.qualifier.storage = EvqIn; - } - | OUT { - parseContext.globalCheck($1.loc, "out"); - $$.init($1.loc); - // whether this is a parameter "out" or a pipeline "out" will get sorted out a bit later - $$.qualifier.storage = EvqOut; - } - | CENTROID { - parseContext.profileRequires($1.loc, ENoProfile, 120, 0, "centroid"); - parseContext.profileRequires($1.loc, EEsProfile, 300, 0, "centroid"); - parseContext.globalCheck($1.loc, "centroid"); - $$.init($1.loc); - $$.qualifier.centroid = true; - } - | UNIFORM { - parseContext.globalCheck($1.loc, "uniform"); - $$.init($1.loc); - $$.qualifier.storage = EvqUniform; - } - | SHARED { - parseContext.globalCheck($1.loc, "shared"); - parseContext.profileRequires($1.loc, ECoreProfile | ECompatibilityProfile, 430, E_GL_ARB_compute_shader, "shared"); - parseContext.profileRequires($1.loc, EEsProfile, 310, 0, "shared"); - parseContext.requireStage($1.loc, (EShLanguageMask)(EShLangComputeMask | EShLangMeshNVMask | EShLangTaskNVMask), "shared"); - $$.init($1.loc); - $$.qualifier.storage = EvqShared; - } - | BUFFER { - parseContext.globalCheck($1.loc, "buffer"); - $$.init($1.loc); - $$.qualifier.storage = EvqBuffer; - } -GLSLANG_WEB_EXCLUDE_ON - | ATTRIBUTE { - parseContext.requireStage($1.loc, EShLangVertex, "attribute"); - parseContext.checkDeprecated($1.loc, ECoreProfile, 130, "attribute"); - parseContext.checkDeprecated($1.loc, ENoProfile, 130, "attribute"); - parseContext.requireNotRemoved($1.loc, ECoreProfile, 420, "attribute"); - parseContext.requireNotRemoved($1.loc, EEsProfile, 300, "attribute"); - - parseContext.globalCheck($1.loc, "attribute"); - - $$.init($1.loc); - $$.qualifier.storage = EvqVaryingIn; - } - | VARYING { - parseContext.checkDeprecated($1.loc, ENoProfile, 130, "varying"); - parseContext.checkDeprecated($1.loc, ECoreProfile, 130, "varying"); - parseContext.requireNotRemoved($1.loc, ECoreProfile, 420, "varying"); - parseContext.requireNotRemoved($1.loc, EEsProfile, 300, "varying"); - - parseContext.globalCheck($1.loc, "varying"); - - $$.init($1.loc); - if (parseContext.language == EShLangVertex) - $$.qualifier.storage = EvqVaryingOut; - else - $$.qualifier.storage = EvqVaryingIn; - } - | PATCH { - parseContext.globalCheck($1.loc, "patch"); - parseContext.requireStage($1.loc, (EShLanguageMask)(EShLangTessControlMask | EShLangTessEvaluationMask), "patch"); - $$.init($1.loc); - $$.qualifier.patch = true; - } - | SAMPLE { - parseContext.globalCheck($1.loc, "sample"); - $$.init($1.loc); - $$.qualifier.sample = true; - } - | HITATTRNV { - parseContext.globalCheck($1.loc, "hitAttributeNV"); - parseContext.requireStage($1.loc, (EShLanguageMask)(EShLangIntersectMask | EShLangClosestHitMask - | EShLangAnyHitMask), "hitAttributeNV"); - parseContext.profileRequires($1.loc, ECoreProfile, 460, E_GL_NV_ray_tracing, "hitAttributeNV"); - $$.init($1.loc); - $$.qualifier.storage = EvqHitAttr; - } - | HITATTREXT { - parseContext.globalCheck($1.loc, "hitAttributeEXT"); - parseContext.requireStage($1.loc, (EShLanguageMask)(EShLangIntersectMask | EShLangClosestHitMask - | EShLangAnyHitMask), "hitAttributeEXT"); - parseContext.profileRequires($1.loc, ECoreProfile, 460, E_GL_EXT_ray_tracing, "hitAttributeNV"); - $$.init($1.loc); - $$.qualifier.storage = EvqHitAttr; - } - | PAYLOADNV { - parseContext.globalCheck($1.loc, "rayPayloadNV"); - parseContext.requireStage($1.loc, (EShLanguageMask)(EShLangRayGenMask | EShLangClosestHitMask | - EShLangAnyHitMask | EShLangMissMask), "rayPayloadNV"); - parseContext.profileRequires($1.loc, ECoreProfile, 460, E_GL_NV_ray_tracing, "rayPayloadNV"); - $$.init($1.loc); - $$.qualifier.storage = EvqPayload; - } - | PAYLOADEXT { - parseContext.globalCheck($1.loc, "rayPayloadEXT"); - parseContext.requireStage($1.loc, (EShLanguageMask)(EShLangRayGenMask | EShLangClosestHitMask | - EShLangAnyHitMask | EShLangMissMask), "rayPayloadEXT"); - parseContext.profileRequires($1.loc, ECoreProfile, 460, E_GL_EXT_ray_tracing, "rayPayloadEXT"); - $$.init($1.loc); - $$.qualifier.storage = EvqPayload; - } - | PAYLOADINNV { - parseContext.globalCheck($1.loc, "rayPayloadInNV"); - parseContext.requireStage($1.loc, (EShLanguageMask)(EShLangClosestHitMask | - EShLangAnyHitMask | EShLangMissMask), "rayPayloadInNV"); - parseContext.profileRequires($1.loc, ECoreProfile, 460, E_GL_NV_ray_tracing, "rayPayloadInNV"); - $$.init($1.loc); - $$.qualifier.storage = EvqPayloadIn; - } - | PAYLOADINEXT { - parseContext.globalCheck($1.loc, "rayPayloadInEXT"); - parseContext.requireStage($1.loc, (EShLanguageMask)(EShLangClosestHitMask | - EShLangAnyHitMask | EShLangMissMask), "rayPayloadInEXT"); - parseContext.profileRequires($1.loc, ECoreProfile, 460, E_GL_EXT_ray_tracing, "rayPayloadInEXT"); - $$.init($1.loc); - $$.qualifier.storage = EvqPayloadIn; - } - | CALLDATANV { - parseContext.globalCheck($1.loc, "callableDataNV"); - parseContext.requireStage($1.loc, (EShLanguageMask)(EShLangRayGenMask | - EShLangClosestHitMask | EShLangMissMask | EShLangCallableMask), "callableDataNV"); - parseContext.profileRequires($1.loc, ECoreProfile, 460, E_GL_NV_ray_tracing, "callableDataNV"); - $$.init($1.loc); - $$.qualifier.storage = EvqCallableData; - } - | CALLDATAEXT { - parseContext.globalCheck($1.loc, "callableDataEXT"); - parseContext.requireStage($1.loc, (EShLanguageMask)(EShLangRayGenMask | - EShLangClosestHitMask | EShLangMissMask | EShLangCallableMask), "callableDataEXT"); - parseContext.profileRequires($1.loc, ECoreProfile, 460, E_GL_EXT_ray_tracing, "callableDataEXT"); - $$.init($1.loc); - $$.qualifier.storage = EvqCallableData; - } - | CALLDATAINNV { - parseContext.globalCheck($1.loc, "callableDataInNV"); - parseContext.requireStage($1.loc, (EShLanguageMask)(EShLangCallableMask), "callableDataInNV"); - parseContext.profileRequires($1.loc, ECoreProfile, 460, E_GL_NV_ray_tracing, "callableDataInNV"); - $$.init($1.loc); - $$.qualifier.storage = EvqCallableDataIn; - } - | CALLDATAINEXT { - parseContext.globalCheck($1.loc, "callableDataInEXT"); - parseContext.requireStage($1.loc, (EShLanguageMask)(EShLangCallableMask), "callableDataInEXT"); - parseContext.profileRequires($1.loc, ECoreProfile, 460, E_GL_EXT_ray_tracing, "callableDataInEXT"); - $$.init($1.loc); - $$.qualifier.storage = EvqCallableDataIn; - } - | COHERENT { - $$.init($1.loc); - $$.qualifier.coherent = true; - } - | DEVICECOHERENT { - $$.init($1.loc); - parseContext.requireExtensions($1.loc, 1, &E_GL_KHR_memory_scope_semantics, "devicecoherent"); - $$.qualifier.devicecoherent = true; - } - | QUEUEFAMILYCOHERENT { - $$.init($1.loc); - parseContext.requireExtensions($1.loc, 1, &E_GL_KHR_memory_scope_semantics, "queuefamilycoherent"); - $$.qualifier.queuefamilycoherent = true; - } - | WORKGROUPCOHERENT { - $$.init($1.loc); - parseContext.requireExtensions($1.loc, 1, &E_GL_KHR_memory_scope_semantics, "workgroupcoherent"); - $$.qualifier.workgroupcoherent = true; - } - | SUBGROUPCOHERENT { - $$.init($1.loc); - parseContext.requireExtensions($1.loc, 1, &E_GL_KHR_memory_scope_semantics, "subgroupcoherent"); - $$.qualifier.subgroupcoherent = true; - } - | NONPRIVATE { - $$.init($1.loc); - parseContext.requireExtensions($1.loc, 1, &E_GL_KHR_memory_scope_semantics, "nonprivate"); - $$.qualifier.nonprivate = true; - } - | SHADERCALLCOHERENT { - $$.init($1.loc); - parseContext.requireExtensions($1.loc, 1, &E_GL_EXT_ray_tracing, "shadercallcoherent"); - $$.qualifier.shadercallcoherent = true; - } - | VOLATILE { - $$.init($1.loc); - $$.qualifier.volatil = true; - } - | RESTRICT { - $$.init($1.loc); - $$.qualifier.restrict = true; - } - | READONLY { - $$.init($1.loc); - $$.qualifier.readonly = true; - } - | WRITEONLY { - $$.init($1.loc); - $$.qualifier.writeonly = true; - } - | SUBROUTINE { - parseContext.spvRemoved($1.loc, "subroutine"); - parseContext.globalCheck($1.loc, "subroutine"); - parseContext.unimplemented($1.loc, "subroutine"); - $$.init($1.loc); - } - | SUBROUTINE LEFT_PAREN type_name_list RIGHT_PAREN { - parseContext.spvRemoved($1.loc, "subroutine"); - parseContext.globalCheck($1.loc, "subroutine"); - parseContext.unimplemented($1.loc, "subroutine"); - $$.init($1.loc); - } -GLSLANG_WEB_EXCLUDE_OFF - ; - -GLSLANG_WEB_EXCLUDE_ON -non_uniform_qualifier - : NONUNIFORM { - $$.init($1.loc); - $$.qualifier.nonUniform = true; - } - ; - -type_name_list - : IDENTIFIER { - // TODO - } - | type_name_list COMMA IDENTIFIER { - // TODO: 4.0 semantics: subroutines - // 1) make sure each identifier is a type declared earlier with SUBROUTINE - // 2) save all of the identifiers for future comparison with the declared function - } - ; -GLSLANG_WEB_EXCLUDE_OFF - -type_specifier - : type_specifier_nonarray type_parameter_specifier_opt { - $$ = $1; - $$.qualifier.precision = parseContext.getDefaultPrecision($$); - $$.typeParameters = $2; - } - | type_specifier_nonarray type_parameter_specifier_opt array_specifier { - parseContext.arrayOfArrayVersionCheck($3.loc, $3.arraySizes); - $$ = $1; - $$.qualifier.precision = parseContext.getDefaultPrecision($$); - $$.typeParameters = $2; - $$.arraySizes = $3.arraySizes; - } - ; - -array_specifier - : LEFT_BRACKET RIGHT_BRACKET { - $$.loc = $1.loc; - $$.arraySizes = new TArraySizes; - $$.arraySizes->addInnerSize(); - } - | LEFT_BRACKET conditional_expression RIGHT_BRACKET { - $$.loc = $1.loc; - $$.arraySizes = new TArraySizes; - - TArraySize size; - parseContext.arraySizeCheck($2->getLoc(), $2, size, "array size"); - $$.arraySizes->addInnerSize(size); - } - | array_specifier LEFT_BRACKET RIGHT_BRACKET { - $$ = $1; - $$.arraySizes->addInnerSize(); - } - | array_specifier LEFT_BRACKET conditional_expression RIGHT_BRACKET { - $$ = $1; - - TArraySize size; - parseContext.arraySizeCheck($3->getLoc(), $3, size, "array size"); - $$.arraySizes->addInnerSize(size); - } - ; - -type_parameter_specifier_opt - : type_parameter_specifier { - $$ = $1; - } - | /* May be null */ { - $$ = 0; - } - ; - -type_parameter_specifier - : LEFT_ANGLE type_parameter_specifier_list RIGHT_ANGLE { - $$ = $2; - } - ; - -type_parameter_specifier_list - : unary_expression { - $$ = new TArraySizes; - - TArraySize size; - parseContext.arraySizeCheck($1->getLoc(), $1, size, "type parameter"); - $$->addInnerSize(size); - } - | type_parameter_specifier_list COMMA unary_expression { - $$ = $1; - - TArraySize size; - parseContext.arraySizeCheck($3->getLoc(), $3, size, "type parameter"); - $$->addInnerSize(size); - } - ; - -type_specifier_nonarray - : VOID { - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtVoid; - } - | FLOAT { - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtFloat; - } - | INT { - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtInt; - } - | UINT { - parseContext.fullIntegerCheck($1.loc, "unsigned integer"); - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtUint; - } - | BOOL { - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtBool; - } - | VEC2 { - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtFloat; - $$.setVector(2); - } - | VEC3 { - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtFloat; - $$.setVector(3); - } - | VEC4 { - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtFloat; - $$.setVector(4); - } - | BVEC2 { - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtBool; - $$.setVector(2); - } - | BVEC3 { - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtBool; - $$.setVector(3); - } - | BVEC4 { - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtBool; - $$.setVector(4); - } - | IVEC2 { - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtInt; - $$.setVector(2); - } - | IVEC3 { - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtInt; - $$.setVector(3); - } - | IVEC4 { - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtInt; - $$.setVector(4); - } - | UVEC2 { - parseContext.fullIntegerCheck($1.loc, "unsigned integer vector"); - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtUint; - $$.setVector(2); - } - | UVEC3 { - parseContext.fullIntegerCheck($1.loc, "unsigned integer vector"); - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtUint; - $$.setVector(3); - } - | UVEC4 { - parseContext.fullIntegerCheck($1.loc, "unsigned integer vector"); - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtUint; - $$.setVector(4); - } - | MAT2 { - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtFloat; - $$.setMatrix(2, 2); - } - | MAT3 { - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtFloat; - $$.setMatrix(3, 3); - } - | MAT4 { - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtFloat; - $$.setMatrix(4, 4); - } - | MAT2X2 { - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtFloat; - $$.setMatrix(2, 2); - } - | MAT2X3 { - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtFloat; - $$.setMatrix(2, 3); - } - | MAT2X4 { - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtFloat; - $$.setMatrix(2, 4); - } - | MAT3X2 { - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtFloat; - $$.setMatrix(3, 2); - } - | MAT3X3 { - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtFloat; - $$.setMatrix(3, 3); - } - | MAT3X4 { - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtFloat; - $$.setMatrix(3, 4); - } - | MAT4X2 { - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtFloat; - $$.setMatrix(4, 2); - } - | MAT4X3 { - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtFloat; - $$.setMatrix(4, 3); - } - | MAT4X4 { - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtFloat; - $$.setMatrix(4, 4); - } -GLSLANG_WEB_EXCLUDE_ON - | DOUBLE { - parseContext.requireProfile($1.loc, ECoreProfile | ECompatibilityProfile, "double"); - if (! parseContext.symbolTable.atBuiltInLevel()) - parseContext.doubleCheck($1.loc, "double"); - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtDouble; - } - | FLOAT16_T { - parseContext.float16ScalarVectorCheck($1.loc, "float16_t", parseContext.symbolTable.atBuiltInLevel()); - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtFloat16; - } - | FLOAT32_T { - parseContext.explicitFloat32Check($1.loc, "float32_t", parseContext.symbolTable.atBuiltInLevel()); - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtFloat; - } - | FLOAT64_T { - parseContext.explicitFloat64Check($1.loc, "float64_t", parseContext.symbolTable.atBuiltInLevel()); - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtDouble; - } - | INT8_T { - parseContext.int8ScalarVectorCheck($1.loc, "8-bit signed integer", parseContext.symbolTable.atBuiltInLevel()); - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtInt8; - } - | UINT8_T { - parseContext.int8ScalarVectorCheck($1.loc, "8-bit unsigned integer", parseContext.symbolTable.atBuiltInLevel()); - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtUint8; - } - | INT16_T { - parseContext.int16ScalarVectorCheck($1.loc, "16-bit signed integer", parseContext.symbolTable.atBuiltInLevel()); - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtInt16; - } - | UINT16_T { - parseContext.int16ScalarVectorCheck($1.loc, "16-bit unsigned integer", parseContext.symbolTable.atBuiltInLevel()); - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtUint16; - } - | INT32_T { - parseContext.explicitInt32Check($1.loc, "32-bit signed integer", parseContext.symbolTable.atBuiltInLevel()); - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtInt; - } - | UINT32_T { - parseContext.explicitInt32Check($1.loc, "32-bit unsigned integer", parseContext.symbolTable.atBuiltInLevel()); - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtUint; - } - | INT64_T { - parseContext.int64Check($1.loc, "64-bit integer", parseContext.symbolTable.atBuiltInLevel()); - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtInt64; - } - | UINT64_T { - parseContext.int64Check($1.loc, "64-bit unsigned integer", parseContext.symbolTable.atBuiltInLevel()); - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtUint64; - } - | DVEC2 { - parseContext.requireProfile($1.loc, ECoreProfile | ECompatibilityProfile, "double vector"); - if (! parseContext.symbolTable.atBuiltInLevel()) - parseContext.doubleCheck($1.loc, "double vector"); - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtDouble; - $$.setVector(2); - } - | DVEC3 { - parseContext.requireProfile($1.loc, ECoreProfile | ECompatibilityProfile, "double vector"); - if (! parseContext.symbolTable.atBuiltInLevel()) - parseContext.doubleCheck($1.loc, "double vector"); - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtDouble; - $$.setVector(3); - } - | DVEC4 { - parseContext.requireProfile($1.loc, ECoreProfile | ECompatibilityProfile, "double vector"); - if (! parseContext.symbolTable.atBuiltInLevel()) - parseContext.doubleCheck($1.loc, "double vector"); - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtDouble; - $$.setVector(4); - } - | F16VEC2 { - parseContext.float16ScalarVectorCheck($1.loc, "half float vector", parseContext.symbolTable.atBuiltInLevel()); - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtFloat16; - $$.setVector(2); - } - | F16VEC3 { - parseContext.float16ScalarVectorCheck($1.loc, "half float vector", parseContext.symbolTable.atBuiltInLevel()); - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtFloat16; - $$.setVector(3); - } - | F16VEC4 { - parseContext.float16ScalarVectorCheck($1.loc, "half float vector", parseContext.symbolTable.atBuiltInLevel()); - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtFloat16; - $$.setVector(4); - } - | F32VEC2 { - parseContext.explicitFloat32Check($1.loc, "float32_t vector", parseContext.symbolTable.atBuiltInLevel()); - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtFloat; - $$.setVector(2); - } - | F32VEC3 { - parseContext.explicitFloat32Check($1.loc, "float32_t vector", parseContext.symbolTable.atBuiltInLevel()); - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtFloat; - $$.setVector(3); - } - | F32VEC4 { - parseContext.explicitFloat32Check($1.loc, "float32_t vector", parseContext.symbolTable.atBuiltInLevel()); - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtFloat; - $$.setVector(4); - } - | F64VEC2 { - parseContext.explicitFloat64Check($1.loc, "float64_t vector", parseContext.symbolTable.atBuiltInLevel()); - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtDouble; - $$.setVector(2); - } - | F64VEC3 { - parseContext.explicitFloat64Check($1.loc, "float64_t vector", parseContext.symbolTable.atBuiltInLevel()); - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtDouble; - $$.setVector(3); - } - | F64VEC4 { - parseContext.explicitFloat64Check($1.loc, "float64_t vector", parseContext.symbolTable.atBuiltInLevel()); - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtDouble; - $$.setVector(4); - } - | I8VEC2 { - parseContext.int8ScalarVectorCheck($1.loc, "8-bit signed integer vector", parseContext.symbolTable.atBuiltInLevel()); - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtInt8; - $$.setVector(2); - } - | I8VEC3 { - parseContext.int8ScalarVectorCheck($1.loc, "8-bit signed integer vector", parseContext.symbolTable.atBuiltInLevel()); - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtInt8; - $$.setVector(3); - } - | I8VEC4 { - parseContext.int8ScalarVectorCheck($1.loc, "8-bit signed integer vector", parseContext.symbolTable.atBuiltInLevel()); - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtInt8; - $$.setVector(4); - } - | I16VEC2 { - parseContext.int16ScalarVectorCheck($1.loc, "16-bit signed integer vector", parseContext.symbolTable.atBuiltInLevel()); - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtInt16; - $$.setVector(2); - } - | I16VEC3 { - parseContext.int16ScalarVectorCheck($1.loc, "16-bit signed integer vector", parseContext.symbolTable.atBuiltInLevel()); - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtInt16; - $$.setVector(3); - } - | I16VEC4 { - parseContext.int16ScalarVectorCheck($1.loc, "16-bit signed integer vector", parseContext.symbolTable.atBuiltInLevel()); - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtInt16; - $$.setVector(4); - } - | I32VEC2 { - parseContext.explicitInt32Check($1.loc, "32-bit signed integer vector", parseContext.symbolTable.atBuiltInLevel()); - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtInt; - $$.setVector(2); - } - | I32VEC3 { - parseContext.explicitInt32Check($1.loc, "32-bit signed integer vector", parseContext.symbolTable.atBuiltInLevel()); - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtInt; - $$.setVector(3); - } - | I32VEC4 { - parseContext.explicitInt32Check($1.loc, "32-bit signed integer vector", parseContext.symbolTable.atBuiltInLevel()); - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtInt; - $$.setVector(4); - } - | I64VEC2 { - parseContext.int64Check($1.loc, "64-bit integer vector", parseContext.symbolTable.atBuiltInLevel()); - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtInt64; - $$.setVector(2); - } - | I64VEC3 { - parseContext.int64Check($1.loc, "64-bit integer vector", parseContext.symbolTable.atBuiltInLevel()); - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtInt64; - $$.setVector(3); - } - | I64VEC4 { - parseContext.int64Check($1.loc, "64-bit integer vector", parseContext.symbolTable.atBuiltInLevel()); - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtInt64; - $$.setVector(4); - } - | U8VEC2 { - parseContext.int8ScalarVectorCheck($1.loc, "8-bit unsigned integer vector", parseContext.symbolTable.atBuiltInLevel()); - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtUint8; - $$.setVector(2); - } - | U8VEC3 { - parseContext.int8ScalarVectorCheck($1.loc, "8-bit unsigned integer vector", parseContext.symbolTable.atBuiltInLevel()); - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtUint8; - $$.setVector(3); - } - | U8VEC4 { - parseContext.int8ScalarVectorCheck($1.loc, "8-bit unsigned integer vector", parseContext.symbolTable.atBuiltInLevel()); - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtUint8; - $$.setVector(4); - } - | U16VEC2 { - parseContext.int16ScalarVectorCheck($1.loc, "16-bit unsigned integer vector", parseContext.symbolTable.atBuiltInLevel()); - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtUint16; - $$.setVector(2); - } - | U16VEC3 { - parseContext.int16ScalarVectorCheck($1.loc, "16-bit unsigned integer vector", parseContext.symbolTable.atBuiltInLevel()); - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtUint16; - $$.setVector(3); - } - | U16VEC4 { - parseContext.int16ScalarVectorCheck($1.loc, "16-bit unsigned integer vector", parseContext.symbolTable.atBuiltInLevel()); - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtUint16; - $$.setVector(4); - } - | U32VEC2 { - parseContext.explicitInt32Check($1.loc, "32-bit unsigned integer vector", parseContext.symbolTable.atBuiltInLevel()); - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtUint; - $$.setVector(2); - } - | U32VEC3 { - parseContext.explicitInt32Check($1.loc, "32-bit unsigned integer vector", parseContext.symbolTable.atBuiltInLevel()); - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtUint; - $$.setVector(3); - } - | U32VEC4 { - parseContext.explicitInt32Check($1.loc, "32-bit unsigned integer vector", parseContext.symbolTable.atBuiltInLevel()); - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtUint; - $$.setVector(4); - } - | U64VEC2 { - parseContext.int64Check($1.loc, "64-bit unsigned integer vector", parseContext.symbolTable.atBuiltInLevel()); - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtUint64; - $$.setVector(2); - } - | U64VEC3 { - parseContext.int64Check($1.loc, "64-bit unsigned integer vector", parseContext.symbolTable.atBuiltInLevel()); - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtUint64; - $$.setVector(3); - } - | U64VEC4 { - parseContext.int64Check($1.loc, "64-bit unsigned integer vector", parseContext.symbolTable.atBuiltInLevel()); - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtUint64; - $$.setVector(4); - } - | DMAT2 { - parseContext.requireProfile($1.loc, ECoreProfile | ECompatibilityProfile, "double matrix"); - if (! parseContext.symbolTable.atBuiltInLevel()) - parseContext.doubleCheck($1.loc, "double matrix"); - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtDouble; - $$.setMatrix(2, 2); - } - | DMAT3 { - parseContext.requireProfile($1.loc, ECoreProfile | ECompatibilityProfile, "double matrix"); - if (! parseContext.symbolTable.atBuiltInLevel()) - parseContext.doubleCheck($1.loc, "double matrix"); - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtDouble; - $$.setMatrix(3, 3); - } - | DMAT4 { - parseContext.requireProfile($1.loc, ECoreProfile | ECompatibilityProfile, "double matrix"); - if (! parseContext.symbolTable.atBuiltInLevel()) - parseContext.doubleCheck($1.loc, "double matrix"); - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtDouble; - $$.setMatrix(4, 4); - } - | DMAT2X2 { - parseContext.requireProfile($1.loc, ECoreProfile | ECompatibilityProfile, "double matrix"); - if (! parseContext.symbolTable.atBuiltInLevel()) - parseContext.doubleCheck($1.loc, "double matrix"); - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtDouble; - $$.setMatrix(2, 2); - } - | DMAT2X3 { - parseContext.requireProfile($1.loc, ECoreProfile | ECompatibilityProfile, "double matrix"); - if (! parseContext.symbolTable.atBuiltInLevel()) - parseContext.doubleCheck($1.loc, "double matrix"); - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtDouble; - $$.setMatrix(2, 3); - } - | DMAT2X4 { - parseContext.requireProfile($1.loc, ECoreProfile | ECompatibilityProfile, "double matrix"); - if (! parseContext.symbolTable.atBuiltInLevel()) - parseContext.doubleCheck($1.loc, "double matrix"); - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtDouble; - $$.setMatrix(2, 4); - } - | DMAT3X2 { - parseContext.requireProfile($1.loc, ECoreProfile | ECompatibilityProfile, "double matrix"); - if (! parseContext.symbolTable.atBuiltInLevel()) - parseContext.doubleCheck($1.loc, "double matrix"); - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtDouble; - $$.setMatrix(3, 2); - } - | DMAT3X3 { - parseContext.requireProfile($1.loc, ECoreProfile | ECompatibilityProfile, "double matrix"); - if (! parseContext.symbolTable.atBuiltInLevel()) - parseContext.doubleCheck($1.loc, "double matrix"); - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtDouble; - $$.setMatrix(3, 3); - } - | DMAT3X4 { - parseContext.requireProfile($1.loc, ECoreProfile | ECompatibilityProfile, "double matrix"); - if (! parseContext.symbolTable.atBuiltInLevel()) - parseContext.doubleCheck($1.loc, "double matrix"); - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtDouble; - $$.setMatrix(3, 4); - } - | DMAT4X2 { - parseContext.requireProfile($1.loc, ECoreProfile | ECompatibilityProfile, "double matrix"); - if (! parseContext.symbolTable.atBuiltInLevel()) - parseContext.doubleCheck($1.loc, "double matrix"); - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtDouble; - $$.setMatrix(4, 2); - } - | DMAT4X3 { - parseContext.requireProfile($1.loc, ECoreProfile | ECompatibilityProfile, "double matrix"); - if (! parseContext.symbolTable.atBuiltInLevel()) - parseContext.doubleCheck($1.loc, "double matrix"); - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtDouble; - $$.setMatrix(4, 3); - } - | DMAT4X4 { - parseContext.requireProfile($1.loc, ECoreProfile | ECompatibilityProfile, "double matrix"); - if (! parseContext.symbolTable.atBuiltInLevel()) - parseContext.doubleCheck($1.loc, "double matrix"); - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtDouble; - $$.setMatrix(4, 4); - } - | F16MAT2 { - parseContext.float16Check($1.loc, "half float matrix", parseContext.symbolTable.atBuiltInLevel()); - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtFloat16; - $$.setMatrix(2, 2); - } - | F16MAT3 { - parseContext.float16Check($1.loc, "half float matrix", parseContext.symbolTable.atBuiltInLevel()); - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtFloat16; - $$.setMatrix(3, 3); - } - | F16MAT4 { - parseContext.float16Check($1.loc, "half float matrix", parseContext.symbolTable.atBuiltInLevel()); - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtFloat16; - $$.setMatrix(4, 4); - } - | F16MAT2X2 { - parseContext.float16Check($1.loc, "half float matrix", parseContext.symbolTable.atBuiltInLevel()); - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtFloat16; - $$.setMatrix(2, 2); - } - | F16MAT2X3 { - parseContext.float16Check($1.loc, "half float matrix", parseContext.symbolTable.atBuiltInLevel()); - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtFloat16; - $$.setMatrix(2, 3); - } - | F16MAT2X4 { - parseContext.float16Check($1.loc, "half float matrix", parseContext.symbolTable.atBuiltInLevel()); - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtFloat16; - $$.setMatrix(2, 4); - } - | F16MAT3X2 { - parseContext.float16Check($1.loc, "half float matrix", parseContext.symbolTable.atBuiltInLevel()); - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtFloat16; - $$.setMatrix(3, 2); - } - | F16MAT3X3 { - parseContext.float16Check($1.loc, "half float matrix", parseContext.symbolTable.atBuiltInLevel()); - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtFloat16; - $$.setMatrix(3, 3); - } - | F16MAT3X4 { - parseContext.float16Check($1.loc, "half float matrix", parseContext.symbolTable.atBuiltInLevel()); - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtFloat16; - $$.setMatrix(3, 4); - } - | F16MAT4X2 { - parseContext.float16Check($1.loc, "half float matrix", parseContext.symbolTable.atBuiltInLevel()); - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtFloat16; - $$.setMatrix(4, 2); - } - | F16MAT4X3 { - parseContext.float16Check($1.loc, "half float matrix", parseContext.symbolTable.atBuiltInLevel()); - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtFloat16; - $$.setMatrix(4, 3); - } - | F16MAT4X4 { - parseContext.float16Check($1.loc, "half float matrix", parseContext.symbolTable.atBuiltInLevel()); - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtFloat16; - $$.setMatrix(4, 4); - } - | F32MAT2 { - parseContext.explicitFloat32Check($1.loc, "float32_t matrix", parseContext.symbolTable.atBuiltInLevel()); - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtFloat; - $$.setMatrix(2, 2); - } - | F32MAT3 { - parseContext.explicitFloat32Check($1.loc, "float32_t matrix", parseContext.symbolTable.atBuiltInLevel()); - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtFloat; - $$.setMatrix(3, 3); - } - | F32MAT4 { - parseContext.explicitFloat32Check($1.loc, "float32_t matrix", parseContext.symbolTable.atBuiltInLevel()); - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtFloat; - $$.setMatrix(4, 4); - } - | F32MAT2X2 { - parseContext.explicitFloat32Check($1.loc, "float32_t matrix", parseContext.symbolTable.atBuiltInLevel()); - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtFloat; - $$.setMatrix(2, 2); - } - | F32MAT2X3 { - parseContext.explicitFloat32Check($1.loc, "float32_t matrix", parseContext.symbolTable.atBuiltInLevel()); - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtFloat; - $$.setMatrix(2, 3); - } - | F32MAT2X4 { - parseContext.explicitFloat32Check($1.loc, "float32_t matrix", parseContext.symbolTable.atBuiltInLevel()); - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtFloat; - $$.setMatrix(2, 4); - } - | F32MAT3X2 { - parseContext.explicitFloat32Check($1.loc, "float32_t matrix", parseContext.symbolTable.atBuiltInLevel()); - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtFloat; - $$.setMatrix(3, 2); - } - | F32MAT3X3 { - parseContext.explicitFloat32Check($1.loc, "float32_t matrix", parseContext.symbolTable.atBuiltInLevel()); - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtFloat; - $$.setMatrix(3, 3); - } - | F32MAT3X4 { - parseContext.explicitFloat32Check($1.loc, "float32_t matrix", parseContext.symbolTable.atBuiltInLevel()); - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtFloat; - $$.setMatrix(3, 4); - } - | F32MAT4X2 { - parseContext.explicitFloat32Check($1.loc, "float32_t matrix", parseContext.symbolTable.atBuiltInLevel()); - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtFloat; - $$.setMatrix(4, 2); - } - | F32MAT4X3 { - parseContext.explicitFloat32Check($1.loc, "float32_t matrix", parseContext.symbolTable.atBuiltInLevel()); - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtFloat; - $$.setMatrix(4, 3); - } - | F32MAT4X4 { - parseContext.explicitFloat32Check($1.loc, "float32_t matrix", parseContext.symbolTable.atBuiltInLevel()); - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtFloat; - $$.setMatrix(4, 4); - } - | F64MAT2 { - parseContext.explicitFloat64Check($1.loc, "float64_t matrix", parseContext.symbolTable.atBuiltInLevel()); - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtDouble; - $$.setMatrix(2, 2); - } - | F64MAT3 { - parseContext.explicitFloat64Check($1.loc, "float64_t matrix", parseContext.symbolTable.atBuiltInLevel()); - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtDouble; - $$.setMatrix(3, 3); - } - | F64MAT4 { - parseContext.explicitFloat64Check($1.loc, "float64_t matrix", parseContext.symbolTable.atBuiltInLevel()); - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtDouble; - $$.setMatrix(4, 4); - } - | F64MAT2X2 { - parseContext.explicitFloat64Check($1.loc, "float64_t matrix", parseContext.symbolTable.atBuiltInLevel()); - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtDouble; - $$.setMatrix(2, 2); - } - | F64MAT2X3 { - parseContext.explicitFloat64Check($1.loc, "float64_t matrix", parseContext.symbolTable.atBuiltInLevel()); - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtDouble; - $$.setMatrix(2, 3); - } - | F64MAT2X4 { - parseContext.explicitFloat64Check($1.loc, "float64_t matrix", parseContext.symbolTable.atBuiltInLevel()); - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtDouble; - $$.setMatrix(2, 4); - } - | F64MAT3X2 { - parseContext.explicitFloat64Check($1.loc, "float64_t matrix", parseContext.symbolTable.atBuiltInLevel()); - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtDouble; - $$.setMatrix(3, 2); - } - | F64MAT3X3 { - parseContext.explicitFloat64Check($1.loc, "float64_t matrix", parseContext.symbolTable.atBuiltInLevel()); - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtDouble; - $$.setMatrix(3, 3); - } - | F64MAT3X4 { - parseContext.explicitFloat64Check($1.loc, "float64_t matrix", parseContext.symbolTable.atBuiltInLevel()); - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtDouble; - $$.setMatrix(3, 4); - } - | F64MAT4X2 { - parseContext.explicitFloat64Check($1.loc, "float64_t matrix", parseContext.symbolTable.atBuiltInLevel()); - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtDouble; - $$.setMatrix(4, 2); - } - | F64MAT4X3 { - parseContext.explicitFloat64Check($1.loc, "float64_t matrix", parseContext.symbolTable.atBuiltInLevel()); - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtDouble; - $$.setMatrix(4, 3); - } - | F64MAT4X4 { - parseContext.explicitFloat64Check($1.loc, "float64_t matrix", parseContext.symbolTable.atBuiltInLevel()); - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtDouble; - $$.setMatrix(4, 4); - } - | ACCSTRUCTNV { - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtAccStruct; - } - | ACCSTRUCTEXT { - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtAccStruct; - } - | RAYQUERYEXT { - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtRayQuery; - } - | ATOMIC_UINT { - parseContext.vulkanRemoved($1.loc, "atomic counter types"); - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtAtomicUint; - } - | SAMPLER1D { - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtSampler; - $$.sampler.set(EbtFloat, Esd1D); - } -GLSLANG_WEB_EXCLUDE_OFF - | SAMPLER2D { - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtSampler; - $$.sampler.set(EbtFloat, Esd2D); - } - | SAMPLER3D { - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtSampler; - $$.sampler.set(EbtFloat, Esd3D); - } - | SAMPLERCUBE { - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtSampler; - $$.sampler.set(EbtFloat, EsdCube); - } - | SAMPLER2DSHADOW { - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtSampler; - $$.sampler.set(EbtFloat, Esd2D, false, true); - } - | SAMPLERCUBESHADOW { - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtSampler; - $$.sampler.set(EbtFloat, EsdCube, false, true); - } - | SAMPLER2DARRAY { - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtSampler; - $$.sampler.set(EbtFloat, Esd2D, true); - } - | SAMPLER2DARRAYSHADOW { - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtSampler; - $$.sampler.set(EbtFloat, Esd2D, true, true); - } -GLSLANG_WEB_EXCLUDE_ON - | SAMPLER1DSHADOW { - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtSampler; - $$.sampler.set(EbtFloat, Esd1D, false, true); - } - | SAMPLER1DARRAY { - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtSampler; - $$.sampler.set(EbtFloat, Esd1D, true); - } - | SAMPLER1DARRAYSHADOW { - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtSampler; - $$.sampler.set(EbtFloat, Esd1D, true, true); - } - | SAMPLERCUBEARRAY { - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtSampler; - $$.sampler.set(EbtFloat, EsdCube, true); - } - | SAMPLERCUBEARRAYSHADOW { - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtSampler; - $$.sampler.set(EbtFloat, EsdCube, true, true); - } - | F16SAMPLER1D { - parseContext.float16OpaqueCheck($1.loc, "half float sampler", parseContext.symbolTable.atBuiltInLevel()); - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtSampler; - $$.sampler.set(EbtFloat16, Esd1D); - } - | F16SAMPLER2D { - parseContext.float16OpaqueCheck($1.loc, "half float sampler", parseContext.symbolTable.atBuiltInLevel()); - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtSampler; - $$.sampler.set(EbtFloat16, Esd2D); - } - | F16SAMPLER3D { - parseContext.float16OpaqueCheck($1.loc, "half float sampler", parseContext.symbolTable.atBuiltInLevel()); - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtSampler; - $$.sampler.set(EbtFloat16, Esd3D); - } - | F16SAMPLERCUBE { - parseContext.float16OpaqueCheck($1.loc, "half float sampler", parseContext.symbolTable.atBuiltInLevel()); - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtSampler; - $$.sampler.set(EbtFloat16, EsdCube); - } - | F16SAMPLER1DSHADOW { - parseContext.float16OpaqueCheck($1.loc, "half float sampler", parseContext.symbolTable.atBuiltInLevel()); - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtSampler; - $$.sampler.set(EbtFloat16, Esd1D, false, true); - } - | F16SAMPLER2DSHADOW { - parseContext.float16OpaqueCheck($1.loc, "half float sampler", parseContext.symbolTable.atBuiltInLevel()); - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtSampler; - $$.sampler.set(EbtFloat16, Esd2D, false, true); - } - | F16SAMPLERCUBESHADOW { - parseContext.float16OpaqueCheck($1.loc, "half float sampler", parseContext.symbolTable.atBuiltInLevel()); - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtSampler; - $$.sampler.set(EbtFloat16, EsdCube, false, true); - } - | F16SAMPLER1DARRAY { - parseContext.float16OpaqueCheck($1.loc, "half float sampler", parseContext.symbolTable.atBuiltInLevel()); - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtSampler; - $$.sampler.set(EbtFloat16, Esd1D, true); - } - | F16SAMPLER2DARRAY { - parseContext.float16OpaqueCheck($1.loc, "half float sampler", parseContext.symbolTable.atBuiltInLevel()); - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtSampler; - $$.sampler.set(EbtFloat16, Esd2D, true); - } - | F16SAMPLER1DARRAYSHADOW { - parseContext.float16OpaqueCheck($1.loc, "half float sampler", parseContext.symbolTable.atBuiltInLevel()); - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtSampler; - $$.sampler.set(EbtFloat16, Esd1D, true, true); - } - | F16SAMPLER2DARRAYSHADOW { - parseContext.float16OpaqueCheck($1.loc, "half float sampler", parseContext.symbolTable.atBuiltInLevel()); - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtSampler; - $$.sampler.set(EbtFloat16, Esd2D, true, true); - } - | F16SAMPLERCUBEARRAY { - parseContext.float16OpaqueCheck($1.loc, "half float sampler", parseContext.symbolTable.atBuiltInLevel()); - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtSampler; - $$.sampler.set(EbtFloat16, EsdCube, true); - } - | F16SAMPLERCUBEARRAYSHADOW { - parseContext.float16OpaqueCheck($1.loc, "half float sampler", parseContext.symbolTable.atBuiltInLevel()); - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtSampler; - $$.sampler.set(EbtFloat16, EsdCube, true, true); - } - | ISAMPLER1D { - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtSampler; - $$.sampler.set(EbtInt, Esd1D); - } -GLSLANG_WEB_EXCLUDE_OFF - | ISAMPLER2D { - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtSampler; - $$.sampler.set(EbtInt, Esd2D); - } - | ISAMPLER3D { - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtSampler; - $$.sampler.set(EbtInt, Esd3D); - } - | ISAMPLERCUBE { - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtSampler; - $$.sampler.set(EbtInt, EsdCube); - } - | ISAMPLER2DARRAY { - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtSampler; - $$.sampler.set(EbtInt, Esd2D, true); - } - | USAMPLER2D { - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtSampler; - $$.sampler.set(EbtUint, Esd2D); - } - | USAMPLER3D { - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtSampler; - $$.sampler.set(EbtUint, Esd3D); - } - | USAMPLERCUBE { - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtSampler; - $$.sampler.set(EbtUint, EsdCube); - } -GLSLANG_WEB_EXCLUDE_ON - | ISAMPLER1DARRAY { - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtSampler; - $$.sampler.set(EbtInt, Esd1D, true); - } - | ISAMPLERCUBEARRAY { - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtSampler; - $$.sampler.set(EbtInt, EsdCube, true); - } - | USAMPLER1D { - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtSampler; - $$.sampler.set(EbtUint, Esd1D); - } - | USAMPLER1DARRAY { - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtSampler; - $$.sampler.set(EbtUint, Esd1D, true); - } - | USAMPLERCUBEARRAY { - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtSampler; - $$.sampler.set(EbtUint, EsdCube, true); - } - | TEXTURECUBEARRAY { - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtSampler; - $$.sampler.setTexture(EbtFloat, EsdCube, true); - } - | ITEXTURECUBEARRAY { - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtSampler; - $$.sampler.setTexture(EbtInt, EsdCube, true); - } - | UTEXTURECUBEARRAY { - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtSampler; - $$.sampler.setTexture(EbtUint, EsdCube, true); - } -GLSLANG_WEB_EXCLUDE_OFF - | USAMPLER2DARRAY { - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtSampler; - $$.sampler.set(EbtUint, Esd2D, true); - } - | TEXTURE2D { - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtSampler; - $$.sampler.setTexture(EbtFloat, Esd2D); - } - | TEXTURE3D { - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtSampler; - $$.sampler.setTexture(EbtFloat, Esd3D); - } - | TEXTURE2DARRAY { - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtSampler; - $$.sampler.setTexture(EbtFloat, Esd2D, true); - } - | TEXTURECUBE { - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtSampler; - $$.sampler.setTexture(EbtFloat, EsdCube); - } - | ITEXTURE2D { - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtSampler; - $$.sampler.setTexture(EbtInt, Esd2D); - } - | ITEXTURE3D { - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtSampler; - $$.sampler.setTexture(EbtInt, Esd3D); - } - | ITEXTURECUBE { - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtSampler; - $$.sampler.setTexture(EbtInt, EsdCube); - } - | ITEXTURE2DARRAY { - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtSampler; - $$.sampler.setTexture(EbtInt, Esd2D, true); - } - | UTEXTURE2D { - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtSampler; - $$.sampler.setTexture(EbtUint, Esd2D); - } - | UTEXTURE3D { - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtSampler; - $$.sampler.setTexture(EbtUint, Esd3D); - } - | UTEXTURECUBE { - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtSampler; - $$.sampler.setTexture(EbtUint, EsdCube); - } - | UTEXTURE2DARRAY { - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtSampler; - $$.sampler.setTexture(EbtUint, Esd2D, true); - } - | SAMPLER { - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtSampler; - $$.sampler.setPureSampler(false); - } - | SAMPLERSHADOW { - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtSampler; - $$.sampler.setPureSampler(true); - } -GLSLANG_WEB_EXCLUDE_ON - | SAMPLER2DRECT { - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtSampler; - $$.sampler.set(EbtFloat, EsdRect); - } - | SAMPLER2DRECTSHADOW { - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtSampler; - $$.sampler.set(EbtFloat, EsdRect, false, true); - } - | F16SAMPLER2DRECT { - parseContext.float16OpaqueCheck($1.loc, "half float sampler", parseContext.symbolTable.atBuiltInLevel()); - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtSampler; - $$.sampler.set(EbtFloat16, EsdRect); - } - | F16SAMPLER2DRECTSHADOW { - parseContext.float16OpaqueCheck($1.loc, "half float sampler", parseContext.symbolTable.atBuiltInLevel()); - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtSampler; - $$.sampler.set(EbtFloat16, EsdRect, false, true); - } - | ISAMPLER2DRECT { - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtSampler; - $$.sampler.set(EbtInt, EsdRect); - } - | USAMPLER2DRECT { - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtSampler; - $$.sampler.set(EbtUint, EsdRect); - } - | SAMPLERBUFFER { - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtSampler; - $$.sampler.set(EbtFloat, EsdBuffer); - } - | F16SAMPLERBUFFER { - parseContext.float16OpaqueCheck($1.loc, "half float sampler", parseContext.symbolTable.atBuiltInLevel()); - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtSampler; - $$.sampler.set(EbtFloat16, EsdBuffer); - } - | ISAMPLERBUFFER { - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtSampler; - $$.sampler.set(EbtInt, EsdBuffer); - } - | USAMPLERBUFFER { - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtSampler; - $$.sampler.set(EbtUint, EsdBuffer); - } - | SAMPLER2DMS { - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtSampler; - $$.sampler.set(EbtFloat, Esd2D, false, false, true); - } - | F16SAMPLER2DMS { - parseContext.float16OpaqueCheck($1.loc, "half float sampler", parseContext.symbolTable.atBuiltInLevel()); - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtSampler; - $$.sampler.set(EbtFloat16, Esd2D, false, false, true); - } - | ISAMPLER2DMS { - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtSampler; - $$.sampler.set(EbtInt, Esd2D, false, false, true); - } - | USAMPLER2DMS { - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtSampler; - $$.sampler.set(EbtUint, Esd2D, false, false, true); - } - | SAMPLER2DMSARRAY { - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtSampler; - $$.sampler.set(EbtFloat, Esd2D, true, false, true); - } - | F16SAMPLER2DMSARRAY { - parseContext.float16OpaqueCheck($1.loc, "half float sampler", parseContext.symbolTable.atBuiltInLevel()); - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtSampler; - $$.sampler.set(EbtFloat16, Esd2D, true, false, true); - } - | ISAMPLER2DMSARRAY { - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtSampler; - $$.sampler.set(EbtInt, Esd2D, true, false, true); - } - | USAMPLER2DMSARRAY { - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtSampler; - $$.sampler.set(EbtUint, Esd2D, true, false, true); - } - | TEXTURE1D { - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtSampler; - $$.sampler.setTexture(EbtFloat, Esd1D); - } - | F16TEXTURE1D { - parseContext.float16OpaqueCheck($1.loc, "half float texture", parseContext.symbolTable.atBuiltInLevel()); - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtSampler; - $$.sampler.setTexture(EbtFloat16, Esd1D); - } - | F16TEXTURE2D { - parseContext.float16OpaqueCheck($1.loc, "half float texture", parseContext.symbolTable.atBuiltInLevel()); - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtSampler; - $$.sampler.setTexture(EbtFloat16, Esd2D); - } - | F16TEXTURE3D { - parseContext.float16OpaqueCheck($1.loc, "half float texture", parseContext.symbolTable.atBuiltInLevel()); - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtSampler; - $$.sampler.setTexture(EbtFloat16, Esd3D); - } - | F16TEXTURECUBE { - parseContext.float16OpaqueCheck($1.loc, "half float texture", parseContext.symbolTable.atBuiltInLevel()); - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtSampler; - $$.sampler.setTexture(EbtFloat16, EsdCube); - } - | TEXTURE1DARRAY { - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtSampler; - $$.sampler.setTexture(EbtFloat, Esd1D, true); - } - | F16TEXTURE1DARRAY { - parseContext.float16OpaqueCheck($1.loc, "half float texture", parseContext.symbolTable.atBuiltInLevel()); - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtSampler; - $$.sampler.setTexture(EbtFloat16, Esd1D, true); - } - | F16TEXTURE2DARRAY { - parseContext.float16OpaqueCheck($1.loc, "half float texture", parseContext.symbolTable.atBuiltInLevel()); - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtSampler; - $$.sampler.setTexture(EbtFloat16, Esd2D, true); - } - | F16TEXTURECUBEARRAY { - parseContext.float16OpaqueCheck($1.loc, "half float texture", parseContext.symbolTable.atBuiltInLevel()); - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtSampler; - $$.sampler.setTexture(EbtFloat16, EsdCube, true); - } - | ITEXTURE1D { - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtSampler; - $$.sampler.setTexture(EbtInt, Esd1D); - } - | ITEXTURE1DARRAY { - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtSampler; - $$.sampler.setTexture(EbtInt, Esd1D, true); - } - | UTEXTURE1D { - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtSampler; - $$.sampler.setTexture(EbtUint, Esd1D); - } - | UTEXTURE1DARRAY { - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtSampler; - $$.sampler.setTexture(EbtUint, Esd1D, true); - } - | TEXTURE2DRECT { - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtSampler; - $$.sampler.setTexture(EbtFloat, EsdRect); - } - | F16TEXTURE2DRECT { - parseContext.float16OpaqueCheck($1.loc, "half float texture", parseContext.symbolTable.atBuiltInLevel()); - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtSampler; - $$.sampler.setTexture(EbtFloat16, EsdRect); - } - | ITEXTURE2DRECT { - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtSampler; - $$.sampler.setTexture(EbtInt, EsdRect); - } - | UTEXTURE2DRECT { - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtSampler; - $$.sampler.setTexture(EbtUint, EsdRect); - } - | TEXTUREBUFFER { - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtSampler; - $$.sampler.setTexture(EbtFloat, EsdBuffer); - } - | F16TEXTUREBUFFER { - parseContext.float16OpaqueCheck($1.loc, "half float texture", parseContext.symbolTable.atBuiltInLevel()); - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtSampler; - $$.sampler.setTexture(EbtFloat16, EsdBuffer); - } - | ITEXTUREBUFFER { - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtSampler; - $$.sampler.setTexture(EbtInt, EsdBuffer); - } - | UTEXTUREBUFFER { - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtSampler; - $$.sampler.setTexture(EbtUint, EsdBuffer); - } - | TEXTURE2DMS { - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtSampler; - $$.sampler.setTexture(EbtFloat, Esd2D, false, false, true); - } - | F16TEXTURE2DMS { - parseContext.float16OpaqueCheck($1.loc, "half float texture", parseContext.symbolTable.atBuiltInLevel()); - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtSampler; - $$.sampler.setTexture(EbtFloat16, Esd2D, false, false, true); - } - | ITEXTURE2DMS { - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtSampler; - $$.sampler.setTexture(EbtInt, Esd2D, false, false, true); - } - | UTEXTURE2DMS { - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtSampler; - $$.sampler.setTexture(EbtUint, Esd2D, false, false, true); - } - | TEXTURE2DMSARRAY { - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtSampler; - $$.sampler.setTexture(EbtFloat, Esd2D, true, false, true); - } - | F16TEXTURE2DMSARRAY { - parseContext.float16OpaqueCheck($1.loc, "half float texture", parseContext.symbolTable.atBuiltInLevel()); - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtSampler; - $$.sampler.setTexture(EbtFloat16, Esd2D, true, false, true); - } - | ITEXTURE2DMSARRAY { - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtSampler; - $$.sampler.setTexture(EbtInt, Esd2D, true, false, true); - } - | UTEXTURE2DMSARRAY { - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtSampler; - $$.sampler.setTexture(EbtUint, Esd2D, true, false, true); - } - | IMAGE1D { - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtSampler; - $$.sampler.setImage(EbtFloat, Esd1D); - } - | F16IMAGE1D { - parseContext.float16OpaqueCheck($1.loc, "half float image", parseContext.symbolTable.atBuiltInLevel()); - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtSampler; - $$.sampler.setImage(EbtFloat16, Esd1D); - } - | IIMAGE1D { - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtSampler; - $$.sampler.setImage(EbtInt, Esd1D); - } - | UIMAGE1D { - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtSampler; - $$.sampler.setImage(EbtUint, Esd1D); - } - | IMAGE2D { - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtSampler; - $$.sampler.setImage(EbtFloat, Esd2D); - } - | F16IMAGE2D { - parseContext.float16OpaqueCheck($1.loc, "half float image", parseContext.symbolTable.atBuiltInLevel()); - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtSampler; - $$.sampler.setImage(EbtFloat16, Esd2D); - } - | IIMAGE2D { - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtSampler; - $$.sampler.setImage(EbtInt, Esd2D); - } - | UIMAGE2D { - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtSampler; - $$.sampler.setImage(EbtUint, Esd2D); - } - | IMAGE3D { - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtSampler; - $$.sampler.setImage(EbtFloat, Esd3D); - } - | F16IMAGE3D { - parseContext.float16OpaqueCheck($1.loc, "half float image", parseContext.symbolTable.atBuiltInLevel()); - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtSampler; - $$.sampler.setImage(EbtFloat16, Esd3D); - } - | IIMAGE3D { - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtSampler; - $$.sampler.setImage(EbtInt, Esd3D); - } - | UIMAGE3D { - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtSampler; - $$.sampler.setImage(EbtUint, Esd3D); - } - | IMAGE2DRECT { - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtSampler; - $$.sampler.setImage(EbtFloat, EsdRect); - } - | F16IMAGE2DRECT { - parseContext.float16OpaqueCheck($1.loc, "half float image", parseContext.symbolTable.atBuiltInLevel()); - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtSampler; - $$.sampler.setImage(EbtFloat16, EsdRect); - } - | IIMAGE2DRECT { - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtSampler; - $$.sampler.setImage(EbtInt, EsdRect); - } - | UIMAGE2DRECT { - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtSampler; - $$.sampler.setImage(EbtUint, EsdRect); - } - | IMAGECUBE { - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtSampler; - $$.sampler.setImage(EbtFloat, EsdCube); - } - | F16IMAGECUBE { - parseContext.float16OpaqueCheck($1.loc, "half float image", parseContext.symbolTable.atBuiltInLevel()); - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtSampler; - $$.sampler.setImage(EbtFloat16, EsdCube); - } - | IIMAGECUBE { - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtSampler; - $$.sampler.setImage(EbtInt, EsdCube); - } - | UIMAGECUBE { - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtSampler; - $$.sampler.setImage(EbtUint, EsdCube); - } - | IMAGEBUFFER { - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtSampler; - $$.sampler.setImage(EbtFloat, EsdBuffer); - } - | F16IMAGEBUFFER { - parseContext.float16OpaqueCheck($1.loc, "half float image", parseContext.symbolTable.atBuiltInLevel()); - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtSampler; - $$.sampler.setImage(EbtFloat16, EsdBuffer); - } - | IIMAGEBUFFER { - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtSampler; - $$.sampler.setImage(EbtInt, EsdBuffer); - } - | UIMAGEBUFFER { - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtSampler; - $$.sampler.setImage(EbtUint, EsdBuffer); - } - | IMAGE1DARRAY { - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtSampler; - $$.sampler.setImage(EbtFloat, Esd1D, true); - } - | F16IMAGE1DARRAY { - parseContext.float16OpaqueCheck($1.loc, "half float image", parseContext.symbolTable.atBuiltInLevel()); - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtSampler; - $$.sampler.setImage(EbtFloat16, Esd1D, true); - } - | IIMAGE1DARRAY { - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtSampler; - $$.sampler.setImage(EbtInt, Esd1D, true); - } - | UIMAGE1DARRAY { - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtSampler; - $$.sampler.setImage(EbtUint, Esd1D, true); - } - | IMAGE2DARRAY { - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtSampler; - $$.sampler.setImage(EbtFloat, Esd2D, true); - } - | F16IMAGE2DARRAY { - parseContext.float16OpaqueCheck($1.loc, "half float image", parseContext.symbolTable.atBuiltInLevel()); - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtSampler; - $$.sampler.setImage(EbtFloat16, Esd2D, true); - } - | IIMAGE2DARRAY { - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtSampler; - $$.sampler.setImage(EbtInt, Esd2D, true); - } - | UIMAGE2DARRAY { - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtSampler; - $$.sampler.setImage(EbtUint, Esd2D, true); - } - | IMAGECUBEARRAY { - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtSampler; - $$.sampler.setImage(EbtFloat, EsdCube, true); - } - | F16IMAGECUBEARRAY { - parseContext.float16OpaqueCheck($1.loc, "half float image", parseContext.symbolTable.atBuiltInLevel()); - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtSampler; - $$.sampler.setImage(EbtFloat16, EsdCube, true); - } - | IIMAGECUBEARRAY { - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtSampler; - $$.sampler.setImage(EbtInt, EsdCube, true); - } - | UIMAGECUBEARRAY { - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtSampler; - $$.sampler.setImage(EbtUint, EsdCube, true); - } - | IMAGE2DMS { - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtSampler; - $$.sampler.setImage(EbtFloat, Esd2D, false, false, true); - } - | F16IMAGE2DMS { - parseContext.float16OpaqueCheck($1.loc, "half float image", parseContext.symbolTable.atBuiltInLevel()); - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtSampler; - $$.sampler.setImage(EbtFloat16, Esd2D, false, false, true); - } - | IIMAGE2DMS { - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtSampler; - $$.sampler.setImage(EbtInt, Esd2D, false, false, true); - } - | UIMAGE2DMS { - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtSampler; - $$.sampler.setImage(EbtUint, Esd2D, false, false, true); - } - | IMAGE2DMSARRAY { - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtSampler; - $$.sampler.setImage(EbtFloat, Esd2D, true, false, true); - } - | F16IMAGE2DMSARRAY { - parseContext.float16OpaqueCheck($1.loc, "half float image", parseContext.symbolTable.atBuiltInLevel()); - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtSampler; - $$.sampler.setImage(EbtFloat16, Esd2D, true, false, true); - } - | IIMAGE2DMSARRAY { - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtSampler; - $$.sampler.setImage(EbtInt, Esd2D, true, false, true); - } - | UIMAGE2DMSARRAY { - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtSampler; - $$.sampler.setImage(EbtUint, Esd2D, true, false, true); - } - | I64IMAGE1D { - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtSampler; - $$.sampler.setImage(EbtInt64, Esd1D); - } - | U64IMAGE1D { - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtSampler; - $$.sampler.setImage(EbtUint64, Esd1D); - } - | I64IMAGE2D { - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtSampler; - $$.sampler.setImage(EbtInt64, Esd2D); - } - | U64IMAGE2D { - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtSampler; - $$.sampler.setImage(EbtUint64, Esd2D); - } - | I64IMAGE3D { - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtSampler; - $$.sampler.setImage(EbtInt64, Esd3D); - } - | U64IMAGE3D { - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtSampler; - $$.sampler.setImage(EbtUint64, Esd3D); - } - | I64IMAGE2DRECT { - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtSampler; - $$.sampler.setImage(EbtInt64, EsdRect); - } - | U64IMAGE2DRECT { - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtSampler; - $$.sampler.setImage(EbtUint64, EsdRect); - } - | I64IMAGECUBE { - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtSampler; - $$.sampler.setImage(EbtInt64, EsdCube); - } - | U64IMAGECUBE { - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtSampler; - $$.sampler.setImage(EbtUint64, EsdCube); - } - | I64IMAGEBUFFER { - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtSampler; - $$.sampler.setImage(EbtInt64, EsdBuffer); - } - | U64IMAGEBUFFER { - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtSampler; - $$.sampler.setImage(EbtUint64, EsdBuffer); - } - | I64IMAGE1DARRAY { - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtSampler; - $$.sampler.setImage(EbtInt64, Esd1D, true); - } - | U64IMAGE1DARRAY { - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtSampler; - $$.sampler.setImage(EbtUint64, Esd1D, true); - } - | I64IMAGE2DARRAY { - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtSampler; - $$.sampler.setImage(EbtInt64, Esd2D, true); - } - | U64IMAGE2DARRAY { - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtSampler; - $$.sampler.setImage(EbtUint64, Esd2D, true); - } - | I64IMAGECUBEARRAY { - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtSampler; - $$.sampler.setImage(EbtInt64, EsdCube, true); - } - | U64IMAGECUBEARRAY { - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtSampler; - $$.sampler.setImage(EbtUint64, EsdCube, true); - } - | I64IMAGE2DMS { - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtSampler; - $$.sampler.setImage(EbtInt64, Esd2D, false, false, true); - } - | U64IMAGE2DMS { - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtSampler; - $$.sampler.setImage(EbtUint64, Esd2D, false, false, true); - } - | I64IMAGE2DMSARRAY { - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtSampler; - $$.sampler.setImage(EbtInt64, Esd2D, true, false, true); - } - | U64IMAGE2DMSARRAY { - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtSampler; - $$.sampler.setImage(EbtUint64, Esd2D, true, false, true); - } - | SAMPLEREXTERNALOES { // GL_OES_EGL_image_external - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtSampler; - $$.sampler.set(EbtFloat, Esd2D); - $$.sampler.external = true; - } - | SAMPLEREXTERNAL2DY2YEXT { // GL_EXT_YUV_target - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtSampler; - $$.sampler.set(EbtFloat, Esd2D); - $$.sampler.yuv = true; - } - | SUBPASSINPUT { - parseContext.requireStage($1.loc, EShLangFragment, "subpass input"); - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtSampler; - $$.sampler.setSubpass(EbtFloat); - } - | SUBPASSINPUTMS { - parseContext.requireStage($1.loc, EShLangFragment, "subpass input"); - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtSampler; - $$.sampler.setSubpass(EbtFloat, true); - } - | F16SUBPASSINPUT { - parseContext.float16OpaqueCheck($1.loc, "half float subpass input", parseContext.symbolTable.atBuiltInLevel()); - parseContext.requireStage($1.loc, EShLangFragment, "subpass input"); - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtSampler; - $$.sampler.setSubpass(EbtFloat16); - } - | F16SUBPASSINPUTMS { - parseContext.float16OpaqueCheck($1.loc, "half float subpass input", parseContext.symbolTable.atBuiltInLevel()); - parseContext.requireStage($1.loc, EShLangFragment, "subpass input"); - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtSampler; - $$.sampler.setSubpass(EbtFloat16, true); - } - | ISUBPASSINPUT { - parseContext.requireStage($1.loc, EShLangFragment, "subpass input"); - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtSampler; - $$.sampler.setSubpass(EbtInt); - } - | ISUBPASSINPUTMS { - parseContext.requireStage($1.loc, EShLangFragment, "subpass input"); - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtSampler; - $$.sampler.setSubpass(EbtInt, true); - } - | USUBPASSINPUT { - parseContext.requireStage($1.loc, EShLangFragment, "subpass input"); - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtSampler; - $$.sampler.setSubpass(EbtUint); - } - | USUBPASSINPUTMS { - parseContext.requireStage($1.loc, EShLangFragment, "subpass input"); - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtSampler; - $$.sampler.setSubpass(EbtUint, true); - } - | FCOOPMATNV { - parseContext.fcoopmatCheck($1.loc, "fcoopmatNV", parseContext.symbolTable.atBuiltInLevel()); - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtFloat; - $$.coopmat = true; - } - | ICOOPMATNV { - parseContext.intcoopmatCheck($1.loc, "icoopmatNV", parseContext.symbolTable.atBuiltInLevel()); - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtInt; - $$.coopmat = true; - } - | UCOOPMATNV { - parseContext.intcoopmatCheck($1.loc, "ucoopmatNV", parseContext.symbolTable.atBuiltInLevel()); - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtUint; - $$.coopmat = true; - } - | spirv_type_specifier { - parseContext.requireExtensions($1.loc, 1, &E_GL_EXT_spirv_intrinsics, "SPIR-V type specifier"); - $$ = $1; - } -GLSLANG_WEB_EXCLUDE_OFF - | struct_specifier { - $$ = $1; - $$.qualifier.storage = parseContext.symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary; - parseContext.structTypeCheck($$.loc, $$); - } - | TYPE_NAME { - // - // This is for user defined type names. The lexical phase looked up the - // type. - // - if (const TVariable* variable = ($1.symbol)->getAsVariable()) { - const TType& structure = variable->getType(); - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.basicType = EbtStruct; - $$.userDef = &structure; - } else - parseContext.error($1.loc, "expected type name", $1.string->c_str(), ""); - } - ; - -precision_qualifier - : HIGH_PRECISION { - parseContext.profileRequires($1.loc, ENoProfile, 130, 0, "highp precision qualifier"); - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - parseContext.handlePrecisionQualifier($1.loc, $$.qualifier, EpqHigh); - } - | MEDIUM_PRECISION { - parseContext.profileRequires($1.loc, ENoProfile, 130, 0, "mediump precision qualifier"); - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - parseContext.handlePrecisionQualifier($1.loc, $$.qualifier, EpqMedium); - } - | LOW_PRECISION { - parseContext.profileRequires($1.loc, ENoProfile, 130, 0, "lowp precision qualifier"); - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - parseContext.handlePrecisionQualifier($1.loc, $$.qualifier, EpqLow); - } - ; - -struct_specifier - : STRUCT IDENTIFIER LEFT_BRACE { parseContext.nestedStructCheck($1.loc); } struct_declaration_list RIGHT_BRACE { - TType* structure = new TType($5, *$2.string); - parseContext.structArrayCheck($2.loc, *structure); - TVariable* userTypeDef = new TVariable($2.string, *structure, true); - if (! parseContext.symbolTable.insert(*userTypeDef)) - parseContext.error($2.loc, "redefinition", $2.string->c_str(), "struct"); - $$.init($1.loc); - $$.basicType = EbtStruct; - $$.userDef = structure; - --parseContext.structNestingLevel; - } - | STRUCT LEFT_BRACE { parseContext.nestedStructCheck($1.loc); } struct_declaration_list RIGHT_BRACE { - TType* structure = new TType($4, TString("")); - $$.init($1.loc); - $$.basicType = EbtStruct; - $$.userDef = structure; - --parseContext.structNestingLevel; - } - ; - -struct_declaration_list - : struct_declaration { - $$ = $1; - } - | struct_declaration_list struct_declaration { - $$ = $1; - for (unsigned int i = 0; i < $2->size(); ++i) { - for (unsigned int j = 0; j < $$->size(); ++j) { - if ((*$$)[j].type->getFieldName() == (*$2)[i].type->getFieldName()) - parseContext.error((*$2)[i].loc, "duplicate member name:", "", (*$2)[i].type->getFieldName().c_str()); - } - $$->push_back((*$2)[i]); - } - } - ; - -struct_declaration - : type_specifier struct_declarator_list SEMICOLON { - if ($1.arraySizes) { - parseContext.profileRequires($1.loc, ENoProfile, 120, E_GL_3DL_array_objects, "arrayed type"); - parseContext.profileRequires($1.loc, EEsProfile, 300, 0, "arrayed type"); - if (parseContext.isEsProfile()) - parseContext.arraySizeRequiredCheck($1.loc, *$1.arraySizes); - } - - $$ = $2; - - parseContext.voidErrorCheck($1.loc, (*$2)[0].type->getFieldName(), $1.basicType); - parseContext.precisionQualifierCheck($1.loc, $1.basicType, $1.qualifier); - - for (unsigned int i = 0; i < $$->size(); ++i) { - TType type($1); - type.setFieldName((*$$)[i].type->getFieldName()); - type.transferArraySizes((*$$)[i].type->getArraySizes()); - type.copyArrayInnerSizes($1.arraySizes); - parseContext.arrayOfArrayVersionCheck((*$$)[i].loc, type.getArraySizes()); - (*$$)[i].type->shallowCopy(type); - } - } - | type_qualifier type_specifier struct_declarator_list SEMICOLON { - if ($2.arraySizes) { - parseContext.profileRequires($2.loc, ENoProfile, 120, E_GL_3DL_array_objects, "arrayed type"); - parseContext.profileRequires($2.loc, EEsProfile, 300, 0, "arrayed type"); - if (parseContext.isEsProfile()) - parseContext.arraySizeRequiredCheck($2.loc, *$2.arraySizes); - } - - $$ = $3; - - parseContext.memberQualifierCheck($1); - parseContext.voidErrorCheck($2.loc, (*$3)[0].type->getFieldName(), $2.basicType); - parseContext.mergeQualifiers($2.loc, $2.qualifier, $1.qualifier, true); - parseContext.precisionQualifierCheck($2.loc, $2.basicType, $2.qualifier); - - for (unsigned int i = 0; i < $$->size(); ++i) { - TType type($2); - type.setFieldName((*$$)[i].type->getFieldName()); - type.transferArraySizes((*$$)[i].type->getArraySizes()); - type.copyArrayInnerSizes($2.arraySizes); - parseContext.arrayOfArrayVersionCheck((*$$)[i].loc, type.getArraySizes()); - (*$$)[i].type->shallowCopy(type); - } - } - ; - -struct_declarator_list - : struct_declarator { - $$ = new TTypeList; - $$->push_back($1); - } - | struct_declarator_list COMMA struct_declarator { - $$->push_back($3); - } - ; - -struct_declarator - : IDENTIFIER { - $$.type = new TType(EbtVoid); - $$.loc = $1.loc; - $$.type->setFieldName(*$1.string); - } - | IDENTIFIER array_specifier { - parseContext.arrayOfArrayVersionCheck($1.loc, $2.arraySizes); - - $$.type = new TType(EbtVoid); - $$.loc = $1.loc; - $$.type->setFieldName(*$1.string); - $$.type->transferArraySizes($2.arraySizes); - } - ; - -initializer - : assignment_expression { - $$ = $1; - } -GLSLANG_WEB_EXCLUDE_ON - | LEFT_BRACE initializer_list RIGHT_BRACE { - const char* initFeature = "{ } style initializers"; - parseContext.requireProfile($1.loc, ~EEsProfile, initFeature); - parseContext.profileRequires($1.loc, ~EEsProfile, 420, E_GL_ARB_shading_language_420pack, initFeature); - $$ = $2; - } - | LEFT_BRACE initializer_list COMMA RIGHT_BRACE { - const char* initFeature = "{ } style initializers"; - parseContext.requireProfile($1.loc, ~EEsProfile, initFeature); - parseContext.profileRequires($1.loc, ~EEsProfile, 420, E_GL_ARB_shading_language_420pack, initFeature); - $$ = $2; - } - | LEFT_BRACE RIGHT_BRACE { - const char* initFeature = "empty { } initializer"; - parseContext.profileRequires($1.loc, EEsProfile, 0, E_GL_EXT_null_initializer, initFeature); - parseContext.profileRequires($1.loc, ~EEsProfile, 0, E_GL_EXT_null_initializer, initFeature); - $$ = parseContext.intermediate.makeAggregate($1.loc); - } -GLSLANG_WEB_EXCLUDE_OFF - ; - -GLSLANG_WEB_EXCLUDE_ON -initializer_list - : initializer { - $$ = parseContext.intermediate.growAggregate(0, $1, $1->getLoc()); - } - | initializer_list COMMA initializer { - $$ = parseContext.intermediate.growAggregate($1, $3); - } - ; -GLSLANG_WEB_EXCLUDE_OFF - -declaration_statement - : declaration { $$ = $1; } - ; - -statement - : compound_statement { $$ = $1; } - | simple_statement { $$ = $1; } - ; - -// Grammar Note: labeled statements for switch statements only; 'goto' is not supported. - -simple_statement - : declaration_statement { $$ = $1; } - | expression_statement { $$ = $1; } - | selection_statement { $$ = $1; } - | switch_statement { $$ = $1; } - | case_label { $$ = $1; } - | iteration_statement { $$ = $1; } - | jump_statement { $$ = $1; } -GLSLANG_WEB_EXCLUDE_ON - | demote_statement { $$ = $1; } -GLSLANG_WEB_EXCLUDE_OFF - ; - -GLSLANG_WEB_EXCLUDE_ON -demote_statement - : DEMOTE SEMICOLON { - parseContext.requireStage($1.loc, EShLangFragment, "demote"); - parseContext.requireExtensions($1.loc, 1, &E_GL_EXT_demote_to_helper_invocation, "demote"); - $$ = parseContext.intermediate.addBranch(EOpDemote, $1.loc); - } - ; -GLSLANG_WEB_EXCLUDE_OFF - -compound_statement - : LEFT_BRACE RIGHT_BRACE { $$ = 0; } - | LEFT_BRACE { - parseContext.symbolTable.push(); - ++parseContext.statementNestingLevel; - } - statement_list { - parseContext.symbolTable.pop(&parseContext.defaultPrecision[0]); - --parseContext.statementNestingLevel; - } - RIGHT_BRACE { - if ($3 && $3->getAsAggregate()) - $3->getAsAggregate()->setOperator(EOpSequence); - $$ = $3; - } - ; - -statement_no_new_scope - : compound_statement_no_new_scope { $$ = $1; } - | simple_statement { $$ = $1; } - ; - -statement_scoped - : { - ++parseContext.controlFlowNestingLevel; - } - compound_statement { - --parseContext.controlFlowNestingLevel; - $$ = $2; - } - | { - parseContext.symbolTable.push(); - ++parseContext.statementNestingLevel; - ++parseContext.controlFlowNestingLevel; - } - simple_statement { - parseContext.symbolTable.pop(&parseContext.defaultPrecision[0]); - --parseContext.statementNestingLevel; - --parseContext.controlFlowNestingLevel; - $$ = $2; - } - -compound_statement_no_new_scope - // Statement that doesn't create a new scope, for selection_statement, iteration_statement - : LEFT_BRACE RIGHT_BRACE { - $$ = 0; - } - | LEFT_BRACE statement_list RIGHT_BRACE { - if ($2 && $2->getAsAggregate()) - $2->getAsAggregate()->setOperator(EOpSequence); - $$ = $2; - } - ; - -statement_list - : statement { - $$ = parseContext.intermediate.makeAggregate($1); - if ($1 && $1->getAsBranchNode() && ($1->getAsBranchNode()->getFlowOp() == EOpCase || - $1->getAsBranchNode()->getFlowOp() == EOpDefault)) { - parseContext.wrapupSwitchSubsequence(0, $1); - $$ = 0; // start a fresh subsequence for what's after this case - } - } - | statement_list statement { - if ($2 && $2->getAsBranchNode() && ($2->getAsBranchNode()->getFlowOp() == EOpCase || - $2->getAsBranchNode()->getFlowOp() == EOpDefault)) { - parseContext.wrapupSwitchSubsequence($1 ? $1->getAsAggregate() : 0, $2); - $$ = 0; // start a fresh subsequence for what's after this case - } else - $$ = parseContext.intermediate.growAggregate($1, $2); - } - ; - -expression_statement - : SEMICOLON { $$ = 0; } - | expression SEMICOLON { $$ = static_cast($1); } - ; - -selection_statement - : selection_statement_nonattributed { - $$ = $1; - } -GLSLANG_WEB_EXCLUDE_ON - | attribute selection_statement_nonattributed { - parseContext.requireExtensions($2->getLoc(), 1, &E_GL_EXT_control_flow_attributes, "attribute"); - parseContext.handleSelectionAttributes(*$1, $2); - $$ = $2; - } -GLSLANG_WEB_EXCLUDE_OFF - -selection_statement_nonattributed - : IF LEFT_PAREN expression RIGHT_PAREN selection_rest_statement { - parseContext.boolCheck($1.loc, $3); - $$ = parseContext.intermediate.addSelection($3, $5, $1.loc); - } - ; - -selection_rest_statement - : statement_scoped ELSE statement_scoped { - $$.node1 = $1; - $$.node2 = $3; - } - | statement_scoped { - $$.node1 = $1; - $$.node2 = 0; - } - ; - -condition - // In 1996 c++ draft, conditions can include single declarations - : expression { - $$ = $1; - parseContext.boolCheck($1->getLoc(), $1); - } - | fully_specified_type IDENTIFIER EQUAL initializer { - parseContext.boolCheck($2.loc, $1); - - TType type($1); - TIntermNode* initNode = parseContext.declareVariable($2.loc, *$2.string, $1, 0, $4); - if (initNode) - $$ = initNode->getAsTyped(); - else - $$ = 0; - } - ; - -switch_statement - : switch_statement_nonattributed { - $$ = $1; - } -GLSLANG_WEB_EXCLUDE_ON - | attribute switch_statement_nonattributed { - parseContext.requireExtensions($2->getLoc(), 1, &E_GL_EXT_control_flow_attributes, "attribute"); - parseContext.handleSwitchAttributes(*$1, $2); - $$ = $2; - } -GLSLANG_WEB_EXCLUDE_OFF - -switch_statement_nonattributed - : SWITCH LEFT_PAREN expression RIGHT_PAREN { - // start new switch sequence on the switch stack - ++parseContext.controlFlowNestingLevel; - ++parseContext.statementNestingLevel; - parseContext.switchSequenceStack.push_back(new TIntermSequence); - parseContext.switchLevel.push_back(parseContext.statementNestingLevel); - parseContext.symbolTable.push(); - } - LEFT_BRACE switch_statement_list RIGHT_BRACE { - $$ = parseContext.addSwitch($1.loc, $3, $7 ? $7->getAsAggregate() : 0); - delete parseContext.switchSequenceStack.back(); - parseContext.switchSequenceStack.pop_back(); - parseContext.switchLevel.pop_back(); - parseContext.symbolTable.pop(&parseContext.defaultPrecision[0]); - --parseContext.statementNestingLevel; - --parseContext.controlFlowNestingLevel; - } - ; - -switch_statement_list - : /* nothing */ { - $$ = 0; - } - | statement_list { - $$ = $1; - } - ; - -case_label - : CASE expression COLON { - $$ = 0; - if (parseContext.switchLevel.size() == 0) - parseContext.error($1.loc, "cannot appear outside switch statement", "case", ""); - else if (parseContext.switchLevel.back() != parseContext.statementNestingLevel) - parseContext.error($1.loc, "cannot be nested inside control flow", "case", ""); - else { - parseContext.constantValueCheck($2, "case"); - parseContext.integerCheck($2, "case"); - $$ = parseContext.intermediate.addBranch(EOpCase, $2, $1.loc); - } - } - | DEFAULT COLON { - $$ = 0; - if (parseContext.switchLevel.size() == 0) - parseContext.error($1.loc, "cannot appear outside switch statement", "default", ""); - else if (parseContext.switchLevel.back() != parseContext.statementNestingLevel) - parseContext.error($1.loc, "cannot be nested inside control flow", "default", ""); - else - $$ = parseContext.intermediate.addBranch(EOpDefault, $1.loc); - } - ; - -iteration_statement - : iteration_statement_nonattributed { - $$ = $1; - } -GLSLANG_WEB_EXCLUDE_ON - | attribute iteration_statement_nonattributed { - parseContext.requireExtensions($2->getLoc(), 1, &E_GL_EXT_control_flow_attributes, "attribute"); - parseContext.handleLoopAttributes(*$1, $2); - $$ = $2; - } -GLSLANG_WEB_EXCLUDE_OFF - -iteration_statement_nonattributed - : WHILE LEFT_PAREN { - if (! parseContext.limits.whileLoops) - parseContext.error($1.loc, "while loops not available", "limitation", ""); - parseContext.symbolTable.push(); - ++parseContext.loopNestingLevel; - ++parseContext.statementNestingLevel; - ++parseContext.controlFlowNestingLevel; - } - condition RIGHT_PAREN statement_no_new_scope { - parseContext.symbolTable.pop(&parseContext.defaultPrecision[0]); - $$ = parseContext.intermediate.addLoop($6, $4, 0, true, $1.loc); - --parseContext.loopNestingLevel; - --parseContext.statementNestingLevel; - --parseContext.controlFlowNestingLevel; - } - | DO { - parseContext.symbolTable.push(); - ++parseContext.loopNestingLevel; - ++parseContext.statementNestingLevel; - ++parseContext.controlFlowNestingLevel; - } - statement WHILE LEFT_PAREN expression RIGHT_PAREN SEMICOLON { - if (! parseContext.limits.whileLoops) - parseContext.error($1.loc, "do-while loops not available", "limitation", ""); - - parseContext.boolCheck($8.loc, $6); - - $$ = parseContext.intermediate.addLoop($3, $6, 0, false, $4.loc); - parseContext.symbolTable.pop(&parseContext.defaultPrecision[0]); - --parseContext.loopNestingLevel; - --parseContext.statementNestingLevel; - --parseContext.controlFlowNestingLevel; - } - | FOR LEFT_PAREN { - parseContext.symbolTable.push(); - ++parseContext.loopNestingLevel; - ++parseContext.statementNestingLevel; - ++parseContext.controlFlowNestingLevel; - } - for_init_statement for_rest_statement RIGHT_PAREN statement_no_new_scope { - parseContext.symbolTable.pop(&parseContext.defaultPrecision[0]); - $$ = parseContext.intermediate.makeAggregate($4, $2.loc); - TIntermLoop* forLoop = parseContext.intermediate.addLoop($7, reinterpret_cast($5.node1), reinterpret_cast($5.node2), true, $1.loc); - if (! parseContext.limits.nonInductiveForLoops) - parseContext.inductiveLoopCheck($1.loc, $4, forLoop); - $$ = parseContext.intermediate.growAggregate($$, forLoop, $1.loc); - $$->getAsAggregate()->setOperator(EOpSequence); - --parseContext.loopNestingLevel; - --parseContext.statementNestingLevel; - --parseContext.controlFlowNestingLevel; - } - ; - -for_init_statement - : expression_statement { - $$ = $1; - } - | declaration_statement { - $$ = $1; - } - ; - -conditionopt - : condition { - $$ = $1; - } - | /* May be null */ { - $$ = 0; - } - ; - -for_rest_statement - : conditionopt SEMICOLON { - $$.node1 = $1; - $$.node2 = 0; - } - | conditionopt SEMICOLON expression { - $$.node1 = $1; - $$.node2 = $3; - } - ; - -jump_statement - : CONTINUE SEMICOLON { - if (parseContext.loopNestingLevel <= 0) - parseContext.error($1.loc, "continue statement only allowed in loops", "", ""); - $$ = parseContext.intermediate.addBranch(EOpContinue, $1.loc); - } - | BREAK SEMICOLON { - if (parseContext.loopNestingLevel + parseContext.switchSequenceStack.size() <= 0) - parseContext.error($1.loc, "break statement only allowed in switch and loops", "", ""); - $$ = parseContext.intermediate.addBranch(EOpBreak, $1.loc); - } - | RETURN SEMICOLON { - $$ = parseContext.intermediate.addBranch(EOpReturn, $1.loc); - if (parseContext.currentFunctionType->getBasicType() != EbtVoid) - parseContext.error($1.loc, "non-void function must return a value", "return", ""); - if (parseContext.inMain) - parseContext.postEntryPointReturn = true; - } - | RETURN expression SEMICOLON { - $$ = parseContext.handleReturnValue($1.loc, $2); - } - | DISCARD SEMICOLON { - parseContext.requireStage($1.loc, EShLangFragment, "discard"); - $$ = parseContext.intermediate.addBranch(EOpKill, $1.loc); - } - | TERMINATE_INVOCATION SEMICOLON { - parseContext.requireStage($1.loc, EShLangFragment, "terminateInvocation"); - $$ = parseContext.intermediate.addBranch(EOpTerminateInvocation, $1.loc); - } -GLSLANG_WEB_EXCLUDE_ON - | TERMINATE_RAY SEMICOLON { - parseContext.requireStage($1.loc, EShLangAnyHit, "terminateRayEXT"); - $$ = parseContext.intermediate.addBranch(EOpTerminateRayKHR, $1.loc); - } - | IGNORE_INTERSECTION SEMICOLON { - parseContext.requireStage($1.loc, EShLangAnyHit, "ignoreIntersectionEXT"); - $$ = parseContext.intermediate.addBranch(EOpIgnoreIntersectionKHR, $1.loc); - } -GLSLANG_WEB_EXCLUDE_OFF - ; - -// Grammar Note: No 'goto'. Gotos are not supported. - -translation_unit - : external_declaration { - $$ = $1; - parseContext.intermediate.setTreeRoot($$); - } - | translation_unit external_declaration { - if ($2 != nullptr) { - $$ = parseContext.intermediate.growAggregate($1, $2); - parseContext.intermediate.setTreeRoot($$); - } - } - ; - -external_declaration - : function_definition { - $$ = $1; - } - | declaration { - $$ = $1; - } -GLSLANG_WEB_EXCLUDE_ON - | SEMICOLON { - parseContext.requireProfile($1.loc, ~EEsProfile, "extraneous semicolon"); - parseContext.profileRequires($1.loc, ~EEsProfile, 460, nullptr, "extraneous semicolon"); - $$ = nullptr; - } -GLSLANG_WEB_EXCLUDE_OFF - ; - -function_definition - : function_prototype { - $1.function = parseContext.handleFunctionDeclarator($1.loc, *$1.function, false /* not prototype */); - $1.intermNode = parseContext.handleFunctionDefinition($1.loc, *$1.function); - - // For ES 100 only, according to ES shading language 100 spec: A function - // body has a scope nested inside the function's definition. - if (parseContext.profile == EEsProfile && parseContext.version == 100) - { - parseContext.symbolTable.push(); - ++parseContext.statementNestingLevel; - } - } - compound_statement_no_new_scope { - // May be best done as post process phase on intermediate code - if (parseContext.currentFunctionType->getBasicType() != EbtVoid && ! parseContext.functionReturnsValue) - parseContext.error($1.loc, "function does not return a value:", "", $1.function->getName().c_str()); - parseContext.symbolTable.pop(&parseContext.defaultPrecision[0]); - $$ = parseContext.intermediate.growAggregate($1.intermNode, $3); - parseContext.intermediate.setAggregateOperator($$, EOpFunction, $1.function->getType(), $1.loc); - $$->getAsAggregate()->setName($1.function->getMangledName().c_str()); - - // store the pragma information for debug and optimize and other vendor specific - // information. This information can be queried from the parse tree - $$->getAsAggregate()->setOptimize(parseContext.contextPragma.optimize); - $$->getAsAggregate()->setDebug(parseContext.contextPragma.debug); - $$->getAsAggregate()->setPragmaTable(parseContext.contextPragma.pragmaTable); - - // Set currentFunctionType to empty pointer when goes outside of the function - parseContext.currentFunctionType = nullptr; - - // For ES 100 only, according to ES shading language 100 spec: A function - // body has a scope nested inside the function's definition. - if (parseContext.profile == EEsProfile && parseContext.version == 100) - { - parseContext.symbolTable.pop(&parseContext.defaultPrecision[0]); - --parseContext.statementNestingLevel; - } - } - ; - -GLSLANG_WEB_EXCLUDE_ON -attribute - : LEFT_BRACKET LEFT_BRACKET attribute_list RIGHT_BRACKET RIGHT_BRACKET { - $$ = $3; - } - -attribute_list - : single_attribute { - $$ = $1; - } - | attribute_list COMMA single_attribute { - $$ = parseContext.mergeAttributes($1, $3); - } - -single_attribute - : IDENTIFIER { - $$ = parseContext.makeAttributes(*$1.string); - } - | IDENTIFIER LEFT_PAREN constant_expression RIGHT_PAREN { - $$ = parseContext.makeAttributes(*$1.string, $3); - } -GLSLANG_WEB_EXCLUDE_OFF - -GLSLANG_WEB_EXCLUDE_ON -spirv_requirements_list - : spirv_requirements_parameter { - $$ = $1; - } - | spirv_requirements_list COMMA spirv_requirements_parameter { - $$ = parseContext.mergeSpirvRequirements($2.loc, $1, $3); - } - -spirv_requirements_parameter - : IDENTIFIER EQUAL LEFT_BRACKET spirv_extension_list RIGHT_BRACKET { - $$ = parseContext.makeSpirvRequirement($2.loc, *$1.string, $4->getAsAggregate(), nullptr); - } - | IDENTIFIER EQUAL LEFT_BRACKET spirv_capability_list RIGHT_BRACKET { - $$ = parseContext.makeSpirvRequirement($2.loc, *$1.string, nullptr, $4->getAsAggregate()); - } - -spirv_extension_list - : STRING_LITERAL { - $$ = parseContext.intermediate.makeAggregate(parseContext.intermediate.addConstantUnion($1.string, $1.loc, true)); - } - | spirv_extension_list COMMA STRING_LITERAL { - $$ = parseContext.intermediate.growAggregate($1, parseContext.intermediate.addConstantUnion($3.string, $3.loc, true)); - } - -spirv_capability_list - : INTCONSTANT { - $$ = parseContext.intermediate.makeAggregate(parseContext.intermediate.addConstantUnion($1.i, $1.loc, true)); - } - | spirv_capability_list COMMA INTCONSTANT { - $$ = parseContext.intermediate.growAggregate($1, parseContext.intermediate.addConstantUnion($3.i, $3.loc, true)); - } - -spirv_execution_mode_qualifier - : SPIRV_EXECUTION_MODE LEFT_PAREN INTCONSTANT RIGHT_PAREN { - parseContext.intermediate.insertSpirvExecutionMode($3.i); - $$ = 0; - } - | SPIRV_EXECUTION_MODE LEFT_PAREN spirv_requirements_list COMMA INTCONSTANT RIGHT_PAREN { - parseContext.intermediate.insertSpirvRequirement($3); - parseContext.intermediate.insertSpirvExecutionMode($5.i); - $$ = 0; - } - | SPIRV_EXECUTION_MODE LEFT_PAREN INTCONSTANT COMMA spirv_execution_mode_parameter_list RIGHT_PAREN { - parseContext.intermediate.insertSpirvExecutionMode($3.i, $5->getAsAggregate()); - $$ = 0; - } - | SPIRV_EXECUTION_MODE LEFT_PAREN spirv_requirements_list COMMA INTCONSTANT COMMA spirv_execution_mode_parameter_list RIGHT_PAREN { - parseContext.intermediate.insertSpirvRequirement($3); - parseContext.intermediate.insertSpirvExecutionMode($5.i, $7->getAsAggregate()); - $$ = 0; - } - | SPIRV_EXECUTION_MODE_ID LEFT_PAREN INTCONSTANT COMMA spirv_execution_mode_id_parameter_list RIGHT_PAREN { - parseContext.intermediate.insertSpirvExecutionModeId($3.i, $5->getAsAggregate()); - $$ = 0; - } - | SPIRV_EXECUTION_MODE_ID LEFT_PAREN spirv_requirements_list COMMA INTCONSTANT COMMA spirv_execution_mode_id_parameter_list RIGHT_PAREN { - parseContext.intermediate.insertSpirvRequirement($3); - parseContext.intermediate.insertSpirvExecutionModeId($5.i, $7->getAsAggregate()); - $$ = 0; - } - -spirv_execution_mode_parameter_list - : spirv_execution_mode_parameter { - $$ = parseContext.intermediate.makeAggregate($1); - } - | spirv_execution_mode_parameter_list COMMA spirv_execution_mode_parameter { - $$ = parseContext.intermediate.growAggregate($1, $3); - } - -spirv_execution_mode_parameter - : FLOATCONSTANT { - $$ = parseContext.intermediate.addConstantUnion($1.d, EbtFloat, $1.loc, true); - } - | INTCONSTANT { - $$ = parseContext.intermediate.addConstantUnion($1.i, $1.loc, true); - } - | UINTCONSTANT { - $$ = parseContext.intermediate.addConstantUnion($1.u, $1.loc, true); - } - | BOOLCONSTANT { - $$ = parseContext.intermediate.addConstantUnion($1.b, $1.loc, true); - } - | STRING_LITERAL { - $$ = parseContext.intermediate.addConstantUnion($1.string, $1.loc, true); - } - -spirv_execution_mode_id_parameter_list - : constant_expression { - if ($1->getBasicType() != EbtFloat && - $1->getBasicType() != EbtInt && - $1->getBasicType() != EbtUint && - $1->getBasicType() != EbtBool && - $1->getBasicType() != EbtString) - parseContext.error($1->getLoc(), "this type not allowed", $1->getType().getBasicString(), ""); - $$ = parseContext.intermediate.makeAggregate($1); - } - | spirv_execution_mode_id_parameter_list COMMA constant_expression { - if ($3->getBasicType() != EbtFloat && - $3->getBasicType() != EbtInt && - $3->getBasicType() != EbtUint && - $3->getBasicType() != EbtBool && - $3->getBasicType() != EbtString) - parseContext.error($3->getLoc(), "this type not allowed", $3->getType().getBasicString(), ""); - $$ = parseContext.intermediate.growAggregate($1, $3); - } - -spirv_storage_class_qualifier - : SPIRV_STORAGE_CLASS LEFT_PAREN INTCONSTANT RIGHT_PAREN { - $$.init($1.loc); - $$.qualifier.storage = EvqSpirvStorageClass; - $$.qualifier.spirvStorageClass = $3.i; - } - | SPIRV_STORAGE_CLASS LEFT_PAREN spirv_requirements_list COMMA INTCONSTANT RIGHT_PAREN { - $$.init($1.loc); - parseContext.intermediate.insertSpirvRequirement($3); - $$.qualifier.storage = EvqSpirvStorageClass; - $$.qualifier.spirvStorageClass = $5.i; - } - -spirv_decorate_qualifier - : SPIRV_DECORATE LEFT_PAREN INTCONSTANT RIGHT_PAREN{ - $$.init($1.loc); - $$.qualifier.setSpirvDecorate($3.i); - } - | SPIRV_DECORATE LEFT_PAREN spirv_requirements_list COMMA INTCONSTANT RIGHT_PAREN{ - $$.init($1.loc); - parseContext.intermediate.insertSpirvRequirement($3); - $$.qualifier.setSpirvDecorate($5.i); - } - | SPIRV_DECORATE LEFT_PAREN INTCONSTANT COMMA spirv_decorate_parameter_list RIGHT_PAREN { - $$.init($1.loc); - $$.qualifier.setSpirvDecorate($3.i, $5->getAsAggregate()); - } - | SPIRV_DECORATE LEFT_PAREN spirv_requirements_list COMMA INTCONSTANT COMMA spirv_decorate_parameter_list RIGHT_PAREN { - $$.init($1.loc); - parseContext.intermediate.insertSpirvRequirement($3); - $$.qualifier.setSpirvDecorate($5.i, $7->getAsAggregate()); - } - | SPIRV_DECORATE_ID LEFT_PAREN INTCONSTANT COMMA spirv_decorate_id_parameter_list RIGHT_PAREN { - $$.init($1.loc); - $$.qualifier.setSpirvDecorateId($3.i, $5->getAsAggregate()); - } - | SPIRV_DECORATE_ID LEFT_PAREN spirv_requirements_list COMMA INTCONSTANT COMMA spirv_decorate_id_parameter_list RIGHT_PAREN { - $$.init($1.loc); - parseContext.intermediate.insertSpirvRequirement($3); - $$.qualifier.setSpirvDecorateId($5.i, $7->getAsAggregate()); - } - | SPIRV_DECORATE_STRING LEFT_PAREN INTCONSTANT COMMA spirv_decorate_string_parameter_list RIGHT_PAREN { - $$.init($1.loc); - $$.qualifier.setSpirvDecorateString($3.i, $5->getAsAggregate()); - } - | SPIRV_DECORATE_STRING LEFT_PAREN spirv_requirements_list COMMA INTCONSTANT COMMA spirv_decorate_string_parameter_list RIGHT_PAREN { - $$.init($1.loc); - parseContext.intermediate.insertSpirvRequirement($3); - $$.qualifier.setSpirvDecorateString($5.i, $7->getAsAggregate()); - } - -spirv_decorate_parameter_list - : spirv_decorate_parameter { - $$ = parseContext.intermediate.makeAggregate($1); - } - | spirv_decorate_parameter_list COMMA spirv_decorate_parameter { - $$ = parseContext.intermediate.growAggregate($1, $3); - } - -spirv_decorate_parameter - : FLOATCONSTANT { - $$ = parseContext.intermediate.addConstantUnion($1.d, EbtFloat, $1.loc, true); - } - | INTCONSTANT { - $$ = parseContext.intermediate.addConstantUnion($1.i, $1.loc, true); - } - | UINTCONSTANT { - $$ = parseContext.intermediate.addConstantUnion($1.u, $1.loc, true); - } - | BOOLCONSTANT { - $$ = parseContext.intermediate.addConstantUnion($1.b, $1.loc, true); - } - -spirv_decorate_id_parameter_list - : constant_expression { - if ($1->getBasicType() != EbtFloat && - $1->getBasicType() != EbtInt && - $1->getBasicType() != EbtUint && - $1->getBasicType() != EbtBool) - parseContext.error($1->getLoc(), "this type not allowed", $1->getType().getBasicString(), ""); - $$ = parseContext.intermediate.makeAggregate($1); - } - | spirv_decorate_id_parameter_list COMMA constant_expression { - if ($3->getBasicType() != EbtFloat && - $3->getBasicType() != EbtInt && - $3->getBasicType() != EbtUint && - $3->getBasicType() != EbtBool) - parseContext.error($3->getLoc(), "this type not allowed", $3->getType().getBasicString(), ""); - $$ = parseContext.intermediate.growAggregate($1, $3); - } - -spirv_decorate_string_parameter_list - : STRING_LITERAL { - $$ = parseContext.intermediate.makeAggregate( - parseContext.intermediate.addConstantUnion($1.string, $1.loc, true)); - } - | spirv_decorate_string_parameter_list COMMA STRING_LITERAL { - $$ = parseContext.intermediate.growAggregate($1, parseContext.intermediate.addConstantUnion($3.string, $3.loc, true)); - } - -spirv_type_specifier - : SPIRV_TYPE LEFT_PAREN spirv_instruction_qualifier_list COMMA spirv_type_parameter_list RIGHT_PAREN { - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.setSpirvType(*$3, $5); - } - | SPIRV_TYPE LEFT_PAREN spirv_requirements_list COMMA spirv_instruction_qualifier_list COMMA spirv_type_parameter_list RIGHT_PAREN { - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - parseContext.intermediate.insertSpirvRequirement($3); - $$.setSpirvType(*$5, $7); - } - | SPIRV_TYPE LEFT_PAREN spirv_instruction_qualifier_list RIGHT_PAREN { - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - $$.setSpirvType(*$3); - } - | SPIRV_TYPE LEFT_PAREN spirv_requirements_list COMMA spirv_instruction_qualifier_list RIGHT_PAREN { - $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); - parseContext.intermediate.insertSpirvRequirement($3); - $$.setSpirvType(*$5); - } - -spirv_type_parameter_list - : spirv_type_parameter { - $$ = $1; - } - | spirv_type_parameter_list COMMA spirv_type_parameter { - $$ = parseContext.mergeSpirvTypeParameters($1, $3); - } - -spirv_type_parameter - : constant_expression { - $$ = parseContext.makeSpirvTypeParameters($1->getLoc(), $1->getAsConstantUnion()); - } - -spirv_instruction_qualifier - : SPIRV_INSTRUCTION LEFT_PAREN spirv_instruction_qualifier_list RIGHT_PAREN { - $$ = $3; - } - | SPIRV_INSTRUCTION LEFT_PAREN spirv_requirements_list COMMA spirv_instruction_qualifier_list RIGHT_PAREN { - parseContext.intermediate.insertSpirvRequirement($3); - $$ = $5; - } - -spirv_instruction_qualifier_list - : spirv_instruction_qualifier_id { - $$ = $1; - } - | spirv_instruction_qualifier_list COMMA spirv_instruction_qualifier_id { - $$ = parseContext.mergeSpirvInstruction($2.loc, $1, $3); - } - -spirv_instruction_qualifier_id - : IDENTIFIER EQUAL STRING_LITERAL { - $$ = parseContext.makeSpirvInstruction($2.loc, *$1.string, *$3.string); - } - | IDENTIFIER EQUAL INTCONSTANT { - $$ = parseContext.makeSpirvInstruction($2.loc, *$1.string, $3.i); - } -GLSLANG_WEB_EXCLUDE_OFF - -%% diff --git a/glslang/MachineIndependent/glslang.y b/glslang/MachineIndependent/glslang.y index d77c831585..99f0d388bc 100644 --- a/glslang/MachineIndependent/glslang.y +++ b/glslang/MachineIndependent/glslang.y @@ -37,31 +37,6 @@ // POSSIBILITY OF SUCH DAMAGE. // -// -// Do not edit the .y file, only edit the .m4 file. -// The .y bison file is not a source file, it is a derivative of the .m4 file. -// The m4 file needs to be processed by m4 to generate the .y bison file. -// -// Code sandwiched between a pair: -// -// GLSLANG_WEB_EXCLUDE_ON -// ... -// ... -// ... -// GLSLANG_WEB_EXCLUDE_OFF -// -// Will be excluded from the grammar when m4 is executed as: -// -// m4 -P -DGLSLANG_WEB -// -// It will be included when m4 is executed as: -// -// m4 -P -// - - - - /** * This is bison grammar and productions for parsing all versions of the * GLSL shading languages. @@ -129,7 +104,7 @@ using namespace glslang; glslang::TArraySizes* arraySizes; glslang::TIdentifierList* identifierList; }; - glslang::TArraySizes* typeParameters; + glslang::TTypeParameters* typeParameters; } interm; } @@ -177,8 +152,6 @@ extern int yylex(YYSTYPE*, TParseContext&); %token ITEXTURE2D ITEXTURE3D ITEXTURECUBE ITEXTURE2DARRAY %token UTEXTURE2D UTEXTURE3D UTEXTURECUBE UTEXTURE2DARRAY - - %token ATTRIBUTE VARYING %token FLOAT16_T FLOAT32_T DOUBLE FLOAT64_T %token INT64_T UINT64_T INT32_T UINT32_T INT16_T UINT16_T INT8_T UINT8_T @@ -211,6 +184,8 @@ extern int yylex(YYSTYPE*, TParseContext&); %token ACCSTRUCTEXT %token RAYQUERYEXT %token FCOOPMATNV ICOOPMATNV UCOOPMATNV +%token COOPMAT +%token HITOBJECTNV HITOBJECTATTRNV // combined image/sampler %token SAMPLERCUBEARRAY SAMPLERCUBEARRAYSHADOW @@ -278,8 +253,7 @@ extern int yylex(YYSTYPE*, TParseContext&); %token SPIRV_INSTRUCTION SPIRV_EXECUTION_MODE SPIRV_EXECUTION_MODE_ID %token SPIRV_DECORATE SPIRV_DECORATE_ID SPIRV_DECORATE_STRING %token SPIRV_TYPE SPIRV_STORAGE_CLASS SPIRV_BY_REFERENCE SPIRV_LITERAL - - +%token ATTACHMENTEXT IATTACHMENTEXT UATTACHMENTEXT %token LEFT_OP RIGHT_OP %token INC_OP DEC_OP LE_OP GE_OP EQ_OP NE_OP @@ -303,22 +277,20 @@ extern int yylex(YYSTYPE*, TParseContext&); %token BREAK CONTINUE DO ELSE FOR IF DISCARD RETURN SWITCH CASE DEFAULT %token TERMINATE_INVOCATION %token TERMINATE_RAY IGNORE_INTERSECTION -%token UNIFORM SHARED BUFFER +%token UNIFORM SHARED BUFFER TILEIMAGEEXT %token FLAT SMOOTH LAYOUT - %token DOUBLECONSTANT INT16CONSTANT UINT16CONSTANT FLOAT16CONSTANT INT32CONSTANT UINT32CONSTANT %token INT64CONSTANT UINT64CONSTANT %token SUBROUTINE DEMOTE -%token PAYLOADNV PAYLOADINNV HITATTRNV CALLDATANV CALLDATAINNV +%token PAYLOADNV PAYLOADINNV HITATTRNV CALLDATANV CALLDATAINNV %token PAYLOADEXT PAYLOADINEXT HITATTREXT CALLDATAEXT CALLDATAINEXT %token PATCH SAMPLE NONUNIFORM %token COHERENT VOLATILE RESTRICT READONLY WRITEONLY DEVICECOHERENT QUEUEFAMILYCOHERENT WORKGROUPCOHERENT %token SUBGROUPCOHERENT NONPRIVATE SHADERCALLCOHERENT -%token NOPERSPECTIVE EXPLICITINTERPAMD PERVERTEXEXT PERVERTEXNV PERPRIMITIVENV PERVIEWNV PERTASKNV +%token NOPERSPECTIVE EXPLICITINTERPAMD PERVERTEXEXT PERVERTEXNV PERPRIMITIVENV PERVIEWNV PERTASKNV PERPRIMITIVEEXT TASKPAYLOADWORKGROUPEXT %token PRECISE - %type assignment_operator unary_operator %type variable_identifier primary_expression postfix_expression %type expression integer_expression assignment_expression @@ -364,7 +336,6 @@ extern int yylex(YYSTYPE*, TParseContext&); %type identifier_list - %type precise_qualifier non_uniform_qualifier %type type_name_list %type attribute attribute_list single_attribute @@ -377,14 +348,13 @@ extern int yylex(YYSTYPE*, TParseContext&); %type spirv_storage_class_qualifier %type spirv_decorate_qualifier %type spirv_decorate_parameter_list spirv_decorate_parameter -%type spirv_decorate_id_parameter_list +%type spirv_decorate_id_parameter_list spirv_decorate_id_parameter %type spirv_decorate_string_parameter_list %type spirv_type_specifier %type spirv_type_parameter_list spirv_type_parameter %type spirv_instruction_qualifier %type spirv_instruction_qualifier_list spirv_instruction_qualifier_id - %start translation_unit %% @@ -416,7 +386,6 @@ primary_expression | BOOLCONSTANT { $$ = parseContext.intermediate.addConstantUnion($1.b, $1.loc, true); } - | STRING_LITERAL { $$ = parseContext.intermediate.addConstantUnion($1.string, $1.loc, true); } @@ -454,7 +423,6 @@ primary_expression parseContext.float16Check($1.loc, "half float literal"); $$ = parseContext.intermediate.addConstantUnion($1.d, EbtFloat16, $1.loc, true); } - ; postfix_expression @@ -580,13 +548,11 @@ function_identifier $$.function = new TFunction(empty, TType(EbtVoid), EOpNull); } } - | non_uniform_qualifier { // Constructor $$.intermNode = 0; $$.function = parseContext.handleConstructorCall($1.loc, $1); } - ; unary_expression @@ -896,7 +862,6 @@ declaration $$ = 0; // TODO: 4.0 functionality: subroutines: make the identifier a user type for this signature } - | spirv_instruction_qualifier function_prototype SEMICOLON { parseContext.requireExtensions($2.loc, 1, &E_GL_EXT_spirv_intrinsics, "SPIR-V instruction qualifier"); $2.function->setSpirvInstruction(*$1); // Attach SPIR-V intruction qualifier @@ -909,7 +874,6 @@ declaration parseContext.requireExtensions($2.loc, 1, &E_GL_EXT_spirv_intrinsics, "SPIR-V execution mode qualifier"); $$ = 0; } - | init_declarator_list SEMICOLON { if ($1.intermNode && $1.intermNode->getAsAggregate()) $1.intermNode->getAsAggregate()->setOperator(EOpSequence); @@ -977,24 +941,25 @@ identifier_list function_prototype : function_declarator RIGHT_PAREN { $$.function = $1; + if (parseContext.compileOnly) $$.function->setExport(); $$.loc = $2.loc; } | function_declarator RIGHT_PAREN attribute { $$.function = $1; + if (parseContext.compileOnly) $$.function->setExport(); $$.loc = $2.loc; - parseContext.requireExtensions($2.loc, 1, &E_GL_EXT_subgroup_uniform_control_flow, "attribute"); parseContext.handleFunctionAttributes($2.loc, *$3); } | attribute function_declarator RIGHT_PAREN { $$.function = $2; + if (parseContext.compileOnly) $$.function->setExport(); $$.loc = $3.loc; - parseContext.requireExtensions($3.loc, 1, &E_GL_EXT_subgroup_uniform_control_flow, "attribute"); parseContext.handleFunctionAttributes($3.loc, *$1); } | attribute function_declarator RIGHT_PAREN attribute { $$.function = $2; + if (parseContext.compileOnly) $$.function->setExport(); $$.loc = $3.loc; - parseContext.requireExtensions($3.loc, 1, &E_GL_EXT_subgroup_uniform_control_flow, "attribute"); parseContext.handleFunctionAttributes($3.loc, *$1); parseContext.handleFunctionAttributes($3.loc, *$4); } @@ -1106,7 +1071,7 @@ parameter_declaration $$ = $2; if ($1.qualifier.precision != EpqNone) $$.param.type->getQualifier().precision = $1.qualifier.precision; - parseContext.precisionQualifierCheck($$.loc, $$.param.type->getBasicType(), $$.param.type->getQualifier()); + parseContext.precisionQualifierCheck($$.loc, $$.param.type->getBasicType(), $$.param.type->getQualifier(), $$.param.type->isCoopMat()); parseContext.checkNoShaderLayouts($1.loc, $1.shaderQualifiers); parseContext.parameterTypeCheck($2.loc, $1.qualifier.storage, *$$.param.type); @@ -1118,7 +1083,7 @@ parameter_declaration parseContext.parameterTypeCheck($1.loc, EvqIn, *$1.param.type); parseContext.paramCheckFixStorage($1.loc, EvqTemporary, *$$.param.type); - parseContext.precisionQualifierCheck($$.loc, $$.param.type->getBasicType(), $$.param.type->getQualifier()); + parseContext.precisionQualifierCheck($$.loc, $$.param.type->getBasicType(), $$.param.type->getQualifier(), $$.param.type->isCoopMat()); } // // Without name @@ -1127,7 +1092,7 @@ parameter_declaration $$ = $2; if ($1.qualifier.precision != EpqNone) $$.param.type->getQualifier().precision = $1.qualifier.precision; - parseContext.precisionQualifierCheck($1.loc, $$.param.type->getBasicType(), $$.param.type->getQualifier()); + parseContext.precisionQualifierCheck($1.loc, $$.param.type->getBasicType(), $$.param.type->getQualifier(), $$.param.type->isCoopMat()); parseContext.checkNoShaderLayouts($1.loc, $1.shaderQualifiers); parseContext.parameterTypeCheck($2.loc, $1.qualifier.storage, *$$.param.type); @@ -1138,7 +1103,7 @@ parameter_declaration parseContext.parameterTypeCheck($1.loc, EvqIn, *$1.param.type); parseContext.paramCheckFixStorage($1.loc, EvqTemporary, *$$.param.type); - parseContext.precisionQualifierCheck($$.loc, $$.param.type->getBasicType(), $$.param.type->getQualifier()); + parseContext.precisionQualifierCheck($$.loc, $$.param.type->getBasicType(), $$.param.type->getQualifier(), $$.param.type->isCoopMat()); } ; @@ -1179,9 +1144,7 @@ single_declaration : fully_specified_type { $$.type = $1; $$.intermNode = 0; - parseContext.declareTypeDefaults($$.loc, $$.type); - } | fully_specified_type IDENTIFIER { $$.type = $1; @@ -1215,10 +1178,10 @@ fully_specified_type parseContext.profileRequires($1.loc, ENoProfile, 120, E_GL_3DL_array_objects, "arrayed type"); parseContext.profileRequires($1.loc, EEsProfile, 300, 0, "arrayed type"); } - parseContext.precisionQualifierCheck($$.loc, $$.basicType, $$.qualifier); + parseContext.precisionQualifierCheck($$.loc, $$.basicType, $$.qualifier, $$.isCoopmat()); } | type_qualifier type_specifier { - parseContext.globalQualifierFixCheck($1.loc, $1.qualifier); + parseContext.globalQualifierFixCheck($1.loc, $1.qualifier, false, &$2); parseContext.globalQualifierTypeCheck($1.loc, $1.qualifier, $2); if ($2.arraySizes) { @@ -1232,7 +1195,7 @@ fully_specified_type parseContext.checkNoShaderLayouts($2.loc, $1.shaderQualifiers); $2.shaderQualifiers.merge($1.shaderQualifiers); parseContext.mergeQualifiers($2.loc, $2.qualifier, $1.qualifier, true); - parseContext.precisionQualifierCheck($2.loc, $2.basicType, $2.qualifier); + parseContext.precisionQualifierCheck($2.loc, $2.basicType, $2.qualifier, $2.isCoopmat()); $$ = $2; @@ -1267,7 +1230,6 @@ interpolation_qualifier $$.init($1.loc); $$.qualifier.flat = true; } - | NOPERSPECTIVE { parseContext.globalCheck($1.loc, "noperspective"); parseContext.profileRequires($1.loc, EEsProfile, 0, E_GL_NV_shader_noperspective_interpolation, "noperspective"); @@ -1301,28 +1263,37 @@ interpolation_qualifier | PERPRIMITIVENV { // No need for profile version or extension check. Shader stage already checks both. parseContext.globalCheck($1.loc, "perprimitiveNV"); - parseContext.requireStage($1.loc, (EShLanguageMask)(EShLangFragmentMask | EShLangMeshNVMask), "perprimitiveNV"); + parseContext.requireStage($1.loc, (EShLanguageMask)(EShLangFragmentMask | EShLangMeshMask), "perprimitiveNV"); // Fragment shader stage doesn't check for extension. So we explicitly add below extension check. if (parseContext.language == EShLangFragment) parseContext.requireExtensions($1.loc, 1, &E_GL_NV_mesh_shader, "perprimitiveNV"); $$.init($1.loc); $$.qualifier.perPrimitiveNV = true; } + | PERPRIMITIVEEXT { + // No need for profile version or extension check. Shader stage already checks both. + parseContext.globalCheck($1.loc, "perprimitiveEXT"); + parseContext.requireStage($1.loc, (EShLanguageMask)(EShLangFragmentMask | EShLangMeshMask), "perprimitiveEXT"); + // Fragment shader stage doesn't check for extension. So we explicitly add below extension check. + if (parseContext.language == EShLangFragment) + parseContext.requireExtensions($1.loc, 1, &E_GL_EXT_mesh_shader, "perprimitiveEXT"); + $$.init($1.loc); + $$.qualifier.perPrimitiveNV = true; + } | PERVIEWNV { // No need for profile version or extension check. Shader stage already checks both. parseContext.globalCheck($1.loc, "perviewNV"); - parseContext.requireStage($1.loc, EShLangMeshNV, "perviewNV"); + parseContext.requireStage($1.loc, EShLangMesh, "perviewNV"); $$.init($1.loc); $$.qualifier.perViewNV = true; } | PERTASKNV { // No need for profile version or extension check. Shader stage already checks both. parseContext.globalCheck($1.loc, "taskNV"); - parseContext.requireStage($1.loc, (EShLanguageMask)(EShLangTaskNVMask | EShLangMeshNVMask), "taskNV"); + parseContext.requireStage($1.loc, (EShLanguageMask)(EShLangTaskMask | EShLangMeshMask), "taskNV"); $$.init($1.loc); $$.qualifier.perTaskNV = true; } - ; layout_qualifier @@ -1357,7 +1328,6 @@ layout_qualifier_id } ; - precise_qualifier : PRECISE { parseContext.profileRequires($$.loc, ECoreProfile | ECompatibilityProfile, 400, E_GL_ARB_gpu_shader5, "precise"); @@ -1367,7 +1337,6 @@ precise_qualifier } ; - type_qualifier : single_type_qualifier { $$ = $1; @@ -1401,7 +1370,6 @@ single_type_qualifier // allow inheritance of storage qualifier from block declaration $$ = $1; } - | precise_qualifier { // allow inheritance of storage qualifier from block declaration $$ = $1; @@ -1428,7 +1396,6 @@ single_type_qualifier $$.init($1.loc); $$.qualifier.setSpirvLiteral(); } - ; storage_qualifier @@ -1465,11 +1432,16 @@ storage_qualifier $$.init($1.loc); $$.qualifier.storage = EvqUniform; } + | TILEIMAGEEXT { + parseContext.globalCheck($1.loc, "tileImageEXT"); + $$.init($1.loc); + $$.qualifier.storage = EvqTileImageEXT; + } | SHARED { parseContext.globalCheck($1.loc, "shared"); parseContext.profileRequires($1.loc, ECoreProfile | ECompatibilityProfile, 430, E_GL_ARB_compute_shader, "shared"); parseContext.profileRequires($1.loc, EEsProfile, 310, 0, "shared"); - parseContext.requireStage($1.loc, (EShLanguageMask)(EShLangComputeMask | EShLangMeshNVMask | EShLangTaskNVMask), "shared"); + parseContext.requireStage($1.loc, (EShLanguageMask)(EShLangComputeMask | EShLangMeshMask | EShLangTaskMask), "shared"); $$.init($1.loc); $$.qualifier.storage = EvqShared; } @@ -1478,7 +1450,6 @@ storage_qualifier $$.init($1.loc); $$.qualifier.storage = EvqBuffer; } - | ATTRIBUTE { parseContext.requireStage($1.loc, EShLangVertex, "attribute"); parseContext.checkDeprecated($1.loc, ECoreProfile, 130, "attribute"); @@ -1524,6 +1495,14 @@ storage_qualifier $$.init($1.loc); $$.qualifier.storage = EvqHitAttr; } + | HITOBJECTATTRNV { + parseContext.globalCheck($1.loc, "hitAttributeNV"); + parseContext.requireStage($1.loc, (EShLanguageMask)(EShLangRayGenMask | EShLangClosestHitMask + | EShLangMissMask), "hitObjectAttributeNV"); + parseContext.profileRequires($1.loc, ECoreProfile, 460, E_GL_NV_shader_invocation_reorder, "hitObjectAttributeNV"); + $$.init($1.loc); + $$.qualifier.storage = EvqHitObjectAttrNV; + } | HITATTREXT { parseContext.globalCheck($1.loc, "hitAttributeEXT"); parseContext.requireStage($1.loc, (EShLanguageMask)(EShLangIntersectMask | EShLangClosestHitMask @@ -1656,10 +1635,15 @@ storage_qualifier parseContext.unimplemented($1.loc, "subroutine"); $$.init($1.loc); } - + | TASKPAYLOADWORKGROUPEXT { + // No need for profile version or extension check. Shader stage already checks both. + parseContext.globalCheck($1.loc, "taskPayloadSharedEXT"); + parseContext.requireStage($1.loc, (EShLanguageMask)(EShLangTaskMask | EShLangMeshMask), "taskPayloadSharedEXT "); + $$.init($1.loc); + $$.qualifier.storage = EvqtaskPayloadSharedEXT; + } ; - non_uniform_qualifier : NONUNIFORM { $$.init($1.loc); @@ -1678,12 +1662,13 @@ type_name_list } ; - type_specifier : type_specifier_nonarray type_parameter_specifier_opt { $$ = $1; $$.qualifier.precision = parseContext.getDefaultPrecision($$); $$.typeParameters = $2; + parseContext.coopMatTypeParametersCheck($1.loc, $$); + } | type_specifier_nonarray type_parameter_specifier_opt array_specifier { parseContext.arrayOfArrayVersionCheck($3.loc, $3.arraySizes); @@ -1691,6 +1676,7 @@ type_specifier $$.qualifier.precision = parseContext.getDefaultPrecision($$); $$.typeParameters = $2; $$.arraySizes = $3.arraySizes; + parseContext.coopMatTypeParametersCheck($1.loc, $$); } ; @@ -1737,19 +1723,25 @@ type_parameter_specifier ; type_parameter_specifier_list - : unary_expression { - $$ = new TArraySizes; + : type_specifier { + $$ = new TTypeParameters; + $$->arraySizes = new TArraySizes; + $$->basicType = $1.basicType; + } + | unary_expression { + $$ = new TTypeParameters; + $$->arraySizes = new TArraySizes; TArraySize size; - parseContext.arraySizeCheck($1->getLoc(), $1, size, "type parameter"); - $$->addInnerSize(size); + parseContext.arraySizeCheck($1->getLoc(), $1, size, "type parameter", true); + $$->arraySizes->addInnerSize(size); } | type_parameter_specifier_list COMMA unary_expression { $$ = $1; TArraySize size; - parseContext.arraySizeCheck($3->getLoc(), $3, size, "type parameter"); - $$->addInnerSize(size); + parseContext.arraySizeCheck($3->getLoc(), $3, size, "type parameter", true); + $$->arraySizes->addInnerSize(size); } ; @@ -1898,7 +1890,6 @@ type_specifier_nonarray $$.basicType = EbtFloat; $$.setMatrix(4, 4); } - | DOUBLE { parseContext.requireProfile($1.loc, ECoreProfile | ECompatibilityProfile, "double"); if (! parseContext.symbolTable.atBuiltInLevel()) @@ -2517,7 +2508,6 @@ type_specifier_nonarray $$.basicType = EbtSampler; $$.sampler.set(EbtFloat, Esd1D); } - | SAMPLER2D { $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); $$.basicType = EbtSampler; @@ -2553,7 +2543,6 @@ type_specifier_nonarray $$.basicType = EbtSampler; $$.sampler.set(EbtFloat, Esd2D, true, true); } - | SAMPLER1DSHADOW { $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); $$.basicType = EbtSampler; @@ -2662,7 +2651,6 @@ type_specifier_nonarray $$.basicType = EbtSampler; $$.sampler.set(EbtInt, Esd1D); } - | ISAMPLER2D { $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); $$.basicType = EbtSampler; @@ -2698,7 +2686,6 @@ type_specifier_nonarray $$.basicType = EbtSampler; $$.sampler.set(EbtUint, EsdCube); } - | ISAMPLER1DARRAY { $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); $$.basicType = EbtSampler; @@ -2739,7 +2726,6 @@ type_specifier_nonarray $$.basicType = EbtSampler; $$.sampler.setTexture(EbtUint, EsdCube, true); } - | USAMPLER2DARRAY { $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); $$.basicType = EbtSampler; @@ -2815,7 +2801,6 @@ type_specifier_nonarray $$.basicType = EbtSampler; $$.sampler.setPureSampler(true); } - | SAMPLER2DRECT { $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); $$.basicType = EbtSampler; @@ -3420,6 +3405,24 @@ type_specifier_nonarray $$.sampler.set(EbtFloat, Esd2D); $$.sampler.yuv = true; } + | ATTACHMENTEXT { + parseContext.requireStage($1.loc, EShLangFragment, "attachmentEXT input"); + $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); + $$.basicType = EbtSampler; + $$.sampler.setAttachmentEXT(EbtFloat); + } + | IATTACHMENTEXT { + parseContext.requireStage($1.loc, EShLangFragment, "attachmentEXT input"); + $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); + $$.basicType = EbtSampler; + $$.sampler.setAttachmentEXT(EbtInt); + } + | UATTACHMENTEXT { + parseContext.requireStage($1.loc, EShLangFragment, "attachmentEXT input"); + $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); + $$.basicType = EbtSampler; + $$.sampler.setAttachmentEXT(EbtUint); + } | SUBPASSINPUT { parseContext.requireStage($1.loc, EShLangFragment, "subpass input"); $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); @@ -3471,28 +3474,41 @@ type_specifier_nonarray $$.sampler.setSubpass(EbtUint, true); } | FCOOPMATNV { - parseContext.fcoopmatCheck($1.loc, "fcoopmatNV", parseContext.symbolTable.atBuiltInLevel()); + parseContext.fcoopmatCheckNV($1.loc, "fcoopmatNV", parseContext.symbolTable.atBuiltInLevel()); $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); $$.basicType = EbtFloat; - $$.coopmat = true; + $$.coopmatNV = true; + $$.coopmatKHR = false; } | ICOOPMATNV { - parseContext.intcoopmatCheck($1.loc, "icoopmatNV", parseContext.symbolTable.atBuiltInLevel()); + parseContext.intcoopmatCheckNV($1.loc, "icoopmatNV", parseContext.symbolTable.atBuiltInLevel()); $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); $$.basicType = EbtInt; - $$.coopmat = true; + $$.coopmatNV = true; + $$.coopmatKHR = false; } | UCOOPMATNV { - parseContext.intcoopmatCheck($1.loc, "ucoopmatNV", parseContext.symbolTable.atBuiltInLevel()); + parseContext.intcoopmatCheckNV($1.loc, "ucoopmatNV", parseContext.symbolTable.atBuiltInLevel()); $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); $$.basicType = EbtUint; - $$.coopmat = true; + $$.coopmatNV = true; + $$.coopmatKHR = false; + } + | COOPMAT { + parseContext.coopmatCheck($1.loc, "coopmat", parseContext.symbolTable.atBuiltInLevel()); + $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); + $$.basicType = EbtCoopmat; + $$.coopmatNV = false; + $$.coopmatKHR = true; } | spirv_type_specifier { parseContext.requireExtensions($1.loc, 1, &E_GL_EXT_spirv_intrinsics, "SPIR-V type specifier"); $$ = $1; } - + | HITOBJECTNV { + $$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); + $$.basicType = EbtHitObjectNV; + } | struct_specifier { $$ = $1; $$.qualifier.storage = parseContext.symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary; @@ -3580,7 +3596,7 @@ struct_declaration $$ = $2; parseContext.voidErrorCheck($1.loc, (*$2)[0].type->getFieldName(), $1.basicType); - parseContext.precisionQualifierCheck($1.loc, $1.basicType, $1.qualifier); + parseContext.precisionQualifierCheck($1.loc, $1.basicType, $1.qualifier, $1.isCoopmat()); for (unsigned int i = 0; i < $$->size(); ++i) { TType type($1); @@ -3604,7 +3620,7 @@ struct_declaration parseContext.memberQualifierCheck($1); parseContext.voidErrorCheck($2.loc, (*$3)[0].type->getFieldName(), $2.basicType); parseContext.mergeQualifiers($2.loc, $2.qualifier, $1.qualifier, true); - parseContext.precisionQualifierCheck($2.loc, $2.basicType, $2.qualifier); + parseContext.precisionQualifierCheck($2.loc, $2.basicType, $2.qualifier, $2.isCoopmat()); for (unsigned int i = 0; i < $$->size(); ++i) { TType type($2); @@ -3647,7 +3663,6 @@ initializer : assignment_expression { $$ = $1; } - | LEFT_BRACE initializer_list RIGHT_BRACE { const char* initFeature = "{ } style initializers"; parseContext.requireProfile($1.loc, ~EEsProfile, initFeature); @@ -3666,10 +3681,8 @@ initializer parseContext.profileRequires($1.loc, ~EEsProfile, 0, E_GL_EXT_null_initializer, initFeature); $$ = parseContext.intermediate.makeAggregate($1.loc); } - ; - initializer_list : initializer { $$ = parseContext.intermediate.growAggregate(0, $1, $1->getLoc()); @@ -3679,7 +3692,6 @@ initializer_list } ; - declaration_statement : declaration { $$ = $1; } ; @@ -3699,12 +3711,9 @@ simple_statement | case_label { $$ = $1; } | iteration_statement { $$ = $1; } | jump_statement { $$ = $1; } - | demote_statement { $$ = $1; } - ; - demote_statement : DEMOTE SEMICOLON { parseContext.requireStage($1.loc, EShLangFragment, "demote"); @@ -3713,7 +3722,6 @@ demote_statement } ; - compound_statement : LEFT_BRACE RIGHT_BRACE { $$ = 0; } | LEFT_BRACE { @@ -3726,7 +3734,7 @@ compound_statement } RIGHT_BRACE { if ($3 && $3->getAsAggregate()) - $3->getAsAggregate()->setOperator(EOpSequence); + $3->getAsAggregate()->setOperator(parseContext.intermediate.getDebugInfo() ? EOpScope : EOpSequence); $$ = $3; } ; @@ -3796,14 +3804,12 @@ selection_statement : selection_statement_nonattributed { $$ = $1; } - | attribute selection_statement_nonattributed { parseContext.requireExtensions($2->getLoc(), 1, &E_GL_EXT_control_flow_attributes, "attribute"); parseContext.handleSelectionAttributes(*$1, $2); $$ = $2; } - selection_statement_nonattributed : IF LEFT_PAREN expression RIGHT_PAREN selection_rest_statement { parseContext.boolCheck($1.loc, $3); @@ -3844,14 +3850,12 @@ switch_statement : switch_statement_nonattributed { $$ = $1; } - | attribute switch_statement_nonattributed { parseContext.requireExtensions($2->getLoc(), 1, &E_GL_EXT_control_flow_attributes, "attribute"); parseContext.handleSwitchAttributes(*$1, $2); $$ = $2; } - switch_statement_nonattributed : SWITCH LEFT_PAREN expression RIGHT_PAREN { // start new switch sequence on the switch stack @@ -3909,14 +3913,12 @@ iteration_statement : iteration_statement_nonattributed { $$ = $1; } - | attribute iteration_statement_nonattributed { parseContext.requireExtensions($2->getLoc(), 1, &E_GL_EXT_control_flow_attributes, "attribute"); parseContext.handleLoopAttributes(*$1, $2); $$ = $2; } - iteration_statement_nonattributed : WHILE LEFT_PAREN { if (! parseContext.limits.whileLoops) @@ -4029,7 +4031,6 @@ jump_statement parseContext.requireStage($1.loc, EShLangFragment, "terminateInvocation"); $$ = parseContext.intermediate.addBranch(EOpTerminateInvocation, $1.loc); } - | TERMINATE_RAY SEMICOLON { parseContext.requireStage($1.loc, EShLangAnyHit, "terminateRayEXT"); $$ = parseContext.intermediate.addBranch(EOpTerminateRayKHR, $1.loc); @@ -4038,7 +4039,6 @@ jump_statement parseContext.requireStage($1.loc, EShLangAnyHit, "ignoreIntersectionEXT"); $$ = parseContext.intermediate.addBranch(EOpIgnoreIntersectionKHR, $1.loc); } - ; // Grammar Note: No 'goto'. Gotos are not supported. @@ -4063,13 +4063,11 @@ external_declaration | declaration { $$ = $1; } - | SEMICOLON { parseContext.requireProfile($1.loc, ~EEsProfile, "extraneous semicolon"); parseContext.profileRequires($1.loc, ~EEsProfile, 460, nullptr, "extraneous semicolon"); $$ = nullptr; } - ; function_definition @@ -4091,6 +4089,7 @@ function_definition parseContext.error($1.loc, "function does not return a value:", "", $1.function->getName().c_str()); parseContext.symbolTable.pop(&parseContext.defaultPrecision[0]); $$ = parseContext.intermediate.growAggregate($1.intermNode, $3); + $$->getAsAggregate()->setLinkType($1.function->getLinkType()); parseContext.intermediate.setAggregateOperator($$, EOpFunction, $1.function->getType(), $1.loc); $$->getAsAggregate()->setName($1.function->getMangledName().c_str()); @@ -4113,7 +4112,6 @@ function_definition } ; - attribute : LEFT_BRACKET LEFT_BRACKET attribute_list RIGHT_BRACKET RIGHT_BRACKET { $$ = $3; @@ -4135,8 +4133,6 @@ single_attribute $$ = parseContext.makeAttributes(*$1.string, $3); } - - spirv_requirements_list : spirv_requirements_parameter { $$ = $1; @@ -4317,23 +4313,33 @@ spirv_decorate_parameter } spirv_decorate_id_parameter_list - : constant_expression { - if ($1->getBasicType() != EbtFloat && - $1->getBasicType() != EbtInt && - $1->getBasicType() != EbtUint && - $1->getBasicType() != EbtBool) - parseContext.error($1->getLoc(), "this type not allowed", $1->getType().getBasicString(), ""); + : spirv_decorate_id_parameter { $$ = parseContext.intermediate.makeAggregate($1); } - | spirv_decorate_id_parameter_list COMMA constant_expression { - if ($3->getBasicType() != EbtFloat && - $3->getBasicType() != EbtInt && - $3->getBasicType() != EbtUint && - $3->getBasicType() != EbtBool) - parseContext.error($3->getLoc(), "this type not allowed", $3->getType().getBasicString(), ""); + | spirv_decorate_id_parameter_list COMMA spirv_decorate_id_parameter { $$ = parseContext.intermediate.growAggregate($1, $3); } +spirv_decorate_id_parameter + : variable_identifier { + if ($1->getAsConstantUnion() || $1->getAsSymbolNode()) + $$ = $1; + else + parseContext.error($1->getLoc(), "only allow constants or variables which are not elements of a composite", "", ""); + } + | FLOATCONSTANT { + $$ = parseContext.intermediate.addConstantUnion($1.d, EbtFloat, $1.loc, true); + } + | INTCONSTANT { + $$ = parseContext.intermediate.addConstantUnion($1.i, $1.loc, true); + } + | UINTCONSTANT { + $$ = parseContext.intermediate.addConstantUnion($1.u, $1.loc, true); + } + | BOOLCONSTANT { + $$ = parseContext.intermediate.addConstantUnion($1.b, $1.loc, true); + } + spirv_decorate_string_parameter_list : STRING_LITERAL { $$ = parseContext.intermediate.makeAggregate( @@ -4375,6 +4381,9 @@ spirv_type_parameter : constant_expression { $$ = parseContext.makeSpirvTypeParameters($1->getLoc(), $1->getAsConstantUnion()); } + | type_specifier_nonarray { + $$ = parseContext.makeSpirvTypeParameters($1.loc, $1); + } spirv_instruction_qualifier : SPIRV_INSTRUCTION LEFT_PAREN spirv_instruction_qualifier_list RIGHT_PAREN { @@ -4401,5 +4410,4 @@ spirv_instruction_qualifier_id $$ = parseContext.makeSpirvInstruction($2.loc, *$1.string, $3.i); } - %% diff --git a/glslang/MachineIndependent/glslang_tab.cpp b/glslang/MachineIndependent/glslang_tab.cpp index 4e4768eaa5..534bee13cb 100644 --- a/glslang/MachineIndependent/glslang_tab.cpp +++ b/glslang/MachineIndependent/glslang_tab.cpp @@ -1,8 +1,8 @@ -/* A Bison parser, made by GNU Bison 3.7.4. */ +/* A Bison parser, made by GNU Bison 3.8.2. */ /* Bison implementation for Yacc-like parsers in C - Copyright (C) 1984, 1989-1990, 2000-2015, 2018-2020 Free Software Foundation, + Copyright (C) 1984, 1989-1990, 2000-2015, 2018-2021 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify @@ -16,7 +16,7 @@ GNU General Public License for more details. You should have received a copy of the GNU General Public License - along with this program. If not, see . */ + along with this program. If not, see . */ /* As a special exception, you may create a larger work that contains part or all of the Bison parser skeleton and distribute that work @@ -46,10 +46,10 @@ USER NAME SPACE" below. */ /* Identify Bison output, and Bison version. */ -#define YYBISON 30704 +#define YYBISON 30802 /* Bison version string. */ -#define YYBISON_VERSION "3.7.4" +#define YYBISON_VERSION "3.8.2" /* Skeleton name. */ #define YYSKELETON_NAME "yacc.c" @@ -67,7 +67,7 @@ /* First part of user prologue. */ -#line 69 "MachineIndependent/glslang.y" +#line 44 "MachineIndependent/glslang.y" /* Based on: @@ -287,433 +287,443 @@ enum yysymbol_kind_t YYSYMBOL_FCOOPMATNV = 163, /* FCOOPMATNV */ YYSYMBOL_ICOOPMATNV = 164, /* ICOOPMATNV */ YYSYMBOL_UCOOPMATNV = 165, /* UCOOPMATNV */ - YYSYMBOL_SAMPLERCUBEARRAY = 166, /* SAMPLERCUBEARRAY */ - YYSYMBOL_SAMPLERCUBEARRAYSHADOW = 167, /* SAMPLERCUBEARRAYSHADOW */ - YYSYMBOL_ISAMPLERCUBEARRAY = 168, /* ISAMPLERCUBEARRAY */ - YYSYMBOL_USAMPLERCUBEARRAY = 169, /* USAMPLERCUBEARRAY */ - YYSYMBOL_SAMPLER1D = 170, /* SAMPLER1D */ - YYSYMBOL_SAMPLER1DARRAY = 171, /* SAMPLER1DARRAY */ - YYSYMBOL_SAMPLER1DARRAYSHADOW = 172, /* SAMPLER1DARRAYSHADOW */ - YYSYMBOL_ISAMPLER1D = 173, /* ISAMPLER1D */ - YYSYMBOL_SAMPLER1DSHADOW = 174, /* SAMPLER1DSHADOW */ - YYSYMBOL_SAMPLER2DRECT = 175, /* SAMPLER2DRECT */ - YYSYMBOL_SAMPLER2DRECTSHADOW = 176, /* SAMPLER2DRECTSHADOW */ - YYSYMBOL_ISAMPLER2DRECT = 177, /* ISAMPLER2DRECT */ - YYSYMBOL_USAMPLER2DRECT = 178, /* USAMPLER2DRECT */ - YYSYMBOL_SAMPLERBUFFER = 179, /* SAMPLERBUFFER */ - YYSYMBOL_ISAMPLERBUFFER = 180, /* ISAMPLERBUFFER */ - YYSYMBOL_USAMPLERBUFFER = 181, /* USAMPLERBUFFER */ - YYSYMBOL_SAMPLER2DMS = 182, /* SAMPLER2DMS */ - YYSYMBOL_ISAMPLER2DMS = 183, /* ISAMPLER2DMS */ - YYSYMBOL_USAMPLER2DMS = 184, /* USAMPLER2DMS */ - YYSYMBOL_SAMPLER2DMSARRAY = 185, /* SAMPLER2DMSARRAY */ - YYSYMBOL_ISAMPLER2DMSARRAY = 186, /* ISAMPLER2DMSARRAY */ - YYSYMBOL_USAMPLER2DMSARRAY = 187, /* USAMPLER2DMSARRAY */ - YYSYMBOL_SAMPLEREXTERNALOES = 188, /* SAMPLEREXTERNALOES */ - YYSYMBOL_SAMPLEREXTERNAL2DY2YEXT = 189, /* SAMPLEREXTERNAL2DY2YEXT */ - YYSYMBOL_ISAMPLER1DARRAY = 190, /* ISAMPLER1DARRAY */ - YYSYMBOL_USAMPLER1D = 191, /* USAMPLER1D */ - YYSYMBOL_USAMPLER1DARRAY = 192, /* USAMPLER1DARRAY */ - YYSYMBOL_F16SAMPLER1D = 193, /* F16SAMPLER1D */ - YYSYMBOL_F16SAMPLER2D = 194, /* F16SAMPLER2D */ - YYSYMBOL_F16SAMPLER3D = 195, /* F16SAMPLER3D */ - YYSYMBOL_F16SAMPLER2DRECT = 196, /* F16SAMPLER2DRECT */ - YYSYMBOL_F16SAMPLERCUBE = 197, /* F16SAMPLERCUBE */ - YYSYMBOL_F16SAMPLER1DARRAY = 198, /* F16SAMPLER1DARRAY */ - YYSYMBOL_F16SAMPLER2DARRAY = 199, /* F16SAMPLER2DARRAY */ - YYSYMBOL_F16SAMPLERCUBEARRAY = 200, /* F16SAMPLERCUBEARRAY */ - YYSYMBOL_F16SAMPLERBUFFER = 201, /* F16SAMPLERBUFFER */ - YYSYMBOL_F16SAMPLER2DMS = 202, /* F16SAMPLER2DMS */ - YYSYMBOL_F16SAMPLER2DMSARRAY = 203, /* F16SAMPLER2DMSARRAY */ - YYSYMBOL_F16SAMPLER1DSHADOW = 204, /* F16SAMPLER1DSHADOW */ - YYSYMBOL_F16SAMPLER2DSHADOW = 205, /* F16SAMPLER2DSHADOW */ - YYSYMBOL_F16SAMPLER1DARRAYSHADOW = 206, /* F16SAMPLER1DARRAYSHADOW */ - YYSYMBOL_F16SAMPLER2DARRAYSHADOW = 207, /* F16SAMPLER2DARRAYSHADOW */ - YYSYMBOL_F16SAMPLER2DRECTSHADOW = 208, /* F16SAMPLER2DRECTSHADOW */ - YYSYMBOL_F16SAMPLERCUBESHADOW = 209, /* F16SAMPLERCUBESHADOW */ - YYSYMBOL_F16SAMPLERCUBEARRAYSHADOW = 210, /* F16SAMPLERCUBEARRAYSHADOW */ - YYSYMBOL_IMAGE1D = 211, /* IMAGE1D */ - YYSYMBOL_IIMAGE1D = 212, /* IIMAGE1D */ - YYSYMBOL_UIMAGE1D = 213, /* UIMAGE1D */ - YYSYMBOL_IMAGE2D = 214, /* IMAGE2D */ - YYSYMBOL_IIMAGE2D = 215, /* IIMAGE2D */ - YYSYMBOL_UIMAGE2D = 216, /* UIMAGE2D */ - YYSYMBOL_IMAGE3D = 217, /* IMAGE3D */ - YYSYMBOL_IIMAGE3D = 218, /* IIMAGE3D */ - YYSYMBOL_UIMAGE3D = 219, /* UIMAGE3D */ - YYSYMBOL_IMAGE2DRECT = 220, /* IMAGE2DRECT */ - YYSYMBOL_IIMAGE2DRECT = 221, /* IIMAGE2DRECT */ - YYSYMBOL_UIMAGE2DRECT = 222, /* UIMAGE2DRECT */ - YYSYMBOL_IMAGECUBE = 223, /* IMAGECUBE */ - YYSYMBOL_IIMAGECUBE = 224, /* IIMAGECUBE */ - YYSYMBOL_UIMAGECUBE = 225, /* UIMAGECUBE */ - YYSYMBOL_IMAGEBUFFER = 226, /* IMAGEBUFFER */ - YYSYMBOL_IIMAGEBUFFER = 227, /* IIMAGEBUFFER */ - YYSYMBOL_UIMAGEBUFFER = 228, /* UIMAGEBUFFER */ - YYSYMBOL_IMAGE1DARRAY = 229, /* IMAGE1DARRAY */ - YYSYMBOL_IIMAGE1DARRAY = 230, /* IIMAGE1DARRAY */ - YYSYMBOL_UIMAGE1DARRAY = 231, /* UIMAGE1DARRAY */ - YYSYMBOL_IMAGE2DARRAY = 232, /* IMAGE2DARRAY */ - YYSYMBOL_IIMAGE2DARRAY = 233, /* IIMAGE2DARRAY */ - YYSYMBOL_UIMAGE2DARRAY = 234, /* UIMAGE2DARRAY */ - YYSYMBOL_IMAGECUBEARRAY = 235, /* IMAGECUBEARRAY */ - YYSYMBOL_IIMAGECUBEARRAY = 236, /* IIMAGECUBEARRAY */ - YYSYMBOL_UIMAGECUBEARRAY = 237, /* UIMAGECUBEARRAY */ - YYSYMBOL_IMAGE2DMS = 238, /* IMAGE2DMS */ - YYSYMBOL_IIMAGE2DMS = 239, /* IIMAGE2DMS */ - YYSYMBOL_UIMAGE2DMS = 240, /* UIMAGE2DMS */ - YYSYMBOL_IMAGE2DMSARRAY = 241, /* IMAGE2DMSARRAY */ - YYSYMBOL_IIMAGE2DMSARRAY = 242, /* IIMAGE2DMSARRAY */ - YYSYMBOL_UIMAGE2DMSARRAY = 243, /* UIMAGE2DMSARRAY */ - YYSYMBOL_F16IMAGE1D = 244, /* F16IMAGE1D */ - YYSYMBOL_F16IMAGE2D = 245, /* F16IMAGE2D */ - YYSYMBOL_F16IMAGE3D = 246, /* F16IMAGE3D */ - YYSYMBOL_F16IMAGE2DRECT = 247, /* F16IMAGE2DRECT */ - YYSYMBOL_F16IMAGECUBE = 248, /* F16IMAGECUBE */ - YYSYMBOL_F16IMAGE1DARRAY = 249, /* F16IMAGE1DARRAY */ - YYSYMBOL_F16IMAGE2DARRAY = 250, /* F16IMAGE2DARRAY */ - YYSYMBOL_F16IMAGECUBEARRAY = 251, /* F16IMAGECUBEARRAY */ - YYSYMBOL_F16IMAGEBUFFER = 252, /* F16IMAGEBUFFER */ - YYSYMBOL_F16IMAGE2DMS = 253, /* F16IMAGE2DMS */ - YYSYMBOL_F16IMAGE2DMSARRAY = 254, /* F16IMAGE2DMSARRAY */ - YYSYMBOL_I64IMAGE1D = 255, /* I64IMAGE1D */ - YYSYMBOL_U64IMAGE1D = 256, /* U64IMAGE1D */ - YYSYMBOL_I64IMAGE2D = 257, /* I64IMAGE2D */ - YYSYMBOL_U64IMAGE2D = 258, /* U64IMAGE2D */ - YYSYMBOL_I64IMAGE3D = 259, /* I64IMAGE3D */ - YYSYMBOL_U64IMAGE3D = 260, /* U64IMAGE3D */ - YYSYMBOL_I64IMAGE2DRECT = 261, /* I64IMAGE2DRECT */ - YYSYMBOL_U64IMAGE2DRECT = 262, /* U64IMAGE2DRECT */ - YYSYMBOL_I64IMAGECUBE = 263, /* I64IMAGECUBE */ - YYSYMBOL_U64IMAGECUBE = 264, /* U64IMAGECUBE */ - YYSYMBOL_I64IMAGEBUFFER = 265, /* I64IMAGEBUFFER */ - YYSYMBOL_U64IMAGEBUFFER = 266, /* U64IMAGEBUFFER */ - YYSYMBOL_I64IMAGE1DARRAY = 267, /* I64IMAGE1DARRAY */ - YYSYMBOL_U64IMAGE1DARRAY = 268, /* U64IMAGE1DARRAY */ - YYSYMBOL_I64IMAGE2DARRAY = 269, /* I64IMAGE2DARRAY */ - YYSYMBOL_U64IMAGE2DARRAY = 270, /* U64IMAGE2DARRAY */ - YYSYMBOL_I64IMAGECUBEARRAY = 271, /* I64IMAGECUBEARRAY */ - YYSYMBOL_U64IMAGECUBEARRAY = 272, /* U64IMAGECUBEARRAY */ - YYSYMBOL_I64IMAGE2DMS = 273, /* I64IMAGE2DMS */ - YYSYMBOL_U64IMAGE2DMS = 274, /* U64IMAGE2DMS */ - YYSYMBOL_I64IMAGE2DMSARRAY = 275, /* I64IMAGE2DMSARRAY */ - YYSYMBOL_U64IMAGE2DMSARRAY = 276, /* U64IMAGE2DMSARRAY */ - YYSYMBOL_TEXTURECUBEARRAY = 277, /* TEXTURECUBEARRAY */ - YYSYMBOL_ITEXTURECUBEARRAY = 278, /* ITEXTURECUBEARRAY */ - YYSYMBOL_UTEXTURECUBEARRAY = 279, /* UTEXTURECUBEARRAY */ - YYSYMBOL_TEXTURE1D = 280, /* TEXTURE1D */ - YYSYMBOL_ITEXTURE1D = 281, /* ITEXTURE1D */ - YYSYMBOL_UTEXTURE1D = 282, /* UTEXTURE1D */ - YYSYMBOL_TEXTURE1DARRAY = 283, /* TEXTURE1DARRAY */ - YYSYMBOL_ITEXTURE1DARRAY = 284, /* ITEXTURE1DARRAY */ - YYSYMBOL_UTEXTURE1DARRAY = 285, /* UTEXTURE1DARRAY */ - YYSYMBOL_TEXTURE2DRECT = 286, /* TEXTURE2DRECT */ - YYSYMBOL_ITEXTURE2DRECT = 287, /* ITEXTURE2DRECT */ - YYSYMBOL_UTEXTURE2DRECT = 288, /* UTEXTURE2DRECT */ - YYSYMBOL_TEXTUREBUFFER = 289, /* TEXTUREBUFFER */ - YYSYMBOL_ITEXTUREBUFFER = 290, /* ITEXTUREBUFFER */ - YYSYMBOL_UTEXTUREBUFFER = 291, /* UTEXTUREBUFFER */ - YYSYMBOL_TEXTURE2DMS = 292, /* TEXTURE2DMS */ - YYSYMBOL_ITEXTURE2DMS = 293, /* ITEXTURE2DMS */ - YYSYMBOL_UTEXTURE2DMS = 294, /* UTEXTURE2DMS */ - YYSYMBOL_TEXTURE2DMSARRAY = 295, /* TEXTURE2DMSARRAY */ - YYSYMBOL_ITEXTURE2DMSARRAY = 296, /* ITEXTURE2DMSARRAY */ - YYSYMBOL_UTEXTURE2DMSARRAY = 297, /* UTEXTURE2DMSARRAY */ - YYSYMBOL_F16TEXTURE1D = 298, /* F16TEXTURE1D */ - YYSYMBOL_F16TEXTURE2D = 299, /* F16TEXTURE2D */ - YYSYMBOL_F16TEXTURE3D = 300, /* F16TEXTURE3D */ - YYSYMBOL_F16TEXTURE2DRECT = 301, /* F16TEXTURE2DRECT */ - YYSYMBOL_F16TEXTURECUBE = 302, /* F16TEXTURECUBE */ - YYSYMBOL_F16TEXTURE1DARRAY = 303, /* F16TEXTURE1DARRAY */ - YYSYMBOL_F16TEXTURE2DARRAY = 304, /* F16TEXTURE2DARRAY */ - YYSYMBOL_F16TEXTURECUBEARRAY = 305, /* F16TEXTURECUBEARRAY */ - YYSYMBOL_F16TEXTUREBUFFER = 306, /* F16TEXTUREBUFFER */ - YYSYMBOL_F16TEXTURE2DMS = 307, /* F16TEXTURE2DMS */ - YYSYMBOL_F16TEXTURE2DMSARRAY = 308, /* F16TEXTURE2DMSARRAY */ - YYSYMBOL_SUBPASSINPUT = 309, /* SUBPASSINPUT */ - YYSYMBOL_SUBPASSINPUTMS = 310, /* SUBPASSINPUTMS */ - YYSYMBOL_ISUBPASSINPUT = 311, /* ISUBPASSINPUT */ - YYSYMBOL_ISUBPASSINPUTMS = 312, /* ISUBPASSINPUTMS */ - YYSYMBOL_USUBPASSINPUT = 313, /* USUBPASSINPUT */ - YYSYMBOL_USUBPASSINPUTMS = 314, /* USUBPASSINPUTMS */ - YYSYMBOL_F16SUBPASSINPUT = 315, /* F16SUBPASSINPUT */ - YYSYMBOL_F16SUBPASSINPUTMS = 316, /* F16SUBPASSINPUTMS */ - YYSYMBOL_SPIRV_INSTRUCTION = 317, /* SPIRV_INSTRUCTION */ - YYSYMBOL_SPIRV_EXECUTION_MODE = 318, /* SPIRV_EXECUTION_MODE */ - YYSYMBOL_SPIRV_EXECUTION_MODE_ID = 319, /* SPIRV_EXECUTION_MODE_ID */ - YYSYMBOL_SPIRV_DECORATE = 320, /* SPIRV_DECORATE */ - YYSYMBOL_SPIRV_DECORATE_ID = 321, /* SPIRV_DECORATE_ID */ - YYSYMBOL_SPIRV_DECORATE_STRING = 322, /* SPIRV_DECORATE_STRING */ - YYSYMBOL_SPIRV_TYPE = 323, /* SPIRV_TYPE */ - YYSYMBOL_SPIRV_STORAGE_CLASS = 324, /* SPIRV_STORAGE_CLASS */ - YYSYMBOL_SPIRV_BY_REFERENCE = 325, /* SPIRV_BY_REFERENCE */ - YYSYMBOL_SPIRV_LITERAL = 326, /* SPIRV_LITERAL */ - YYSYMBOL_LEFT_OP = 327, /* LEFT_OP */ - YYSYMBOL_RIGHT_OP = 328, /* RIGHT_OP */ - YYSYMBOL_INC_OP = 329, /* INC_OP */ - YYSYMBOL_DEC_OP = 330, /* DEC_OP */ - YYSYMBOL_LE_OP = 331, /* LE_OP */ - YYSYMBOL_GE_OP = 332, /* GE_OP */ - YYSYMBOL_EQ_OP = 333, /* EQ_OP */ - YYSYMBOL_NE_OP = 334, /* NE_OP */ - YYSYMBOL_AND_OP = 335, /* AND_OP */ - YYSYMBOL_OR_OP = 336, /* OR_OP */ - YYSYMBOL_XOR_OP = 337, /* XOR_OP */ - YYSYMBOL_MUL_ASSIGN = 338, /* MUL_ASSIGN */ - YYSYMBOL_DIV_ASSIGN = 339, /* DIV_ASSIGN */ - YYSYMBOL_ADD_ASSIGN = 340, /* ADD_ASSIGN */ - YYSYMBOL_MOD_ASSIGN = 341, /* MOD_ASSIGN */ - YYSYMBOL_LEFT_ASSIGN = 342, /* LEFT_ASSIGN */ - YYSYMBOL_RIGHT_ASSIGN = 343, /* RIGHT_ASSIGN */ - YYSYMBOL_AND_ASSIGN = 344, /* AND_ASSIGN */ - YYSYMBOL_XOR_ASSIGN = 345, /* XOR_ASSIGN */ - YYSYMBOL_OR_ASSIGN = 346, /* OR_ASSIGN */ - YYSYMBOL_SUB_ASSIGN = 347, /* SUB_ASSIGN */ - YYSYMBOL_STRING_LITERAL = 348, /* STRING_LITERAL */ - YYSYMBOL_LEFT_PAREN = 349, /* LEFT_PAREN */ - YYSYMBOL_RIGHT_PAREN = 350, /* RIGHT_PAREN */ - YYSYMBOL_LEFT_BRACKET = 351, /* LEFT_BRACKET */ - YYSYMBOL_RIGHT_BRACKET = 352, /* RIGHT_BRACKET */ - YYSYMBOL_LEFT_BRACE = 353, /* LEFT_BRACE */ - YYSYMBOL_RIGHT_BRACE = 354, /* RIGHT_BRACE */ - YYSYMBOL_DOT = 355, /* DOT */ - YYSYMBOL_COMMA = 356, /* COMMA */ - YYSYMBOL_COLON = 357, /* COLON */ - YYSYMBOL_EQUAL = 358, /* EQUAL */ - YYSYMBOL_SEMICOLON = 359, /* SEMICOLON */ - YYSYMBOL_BANG = 360, /* BANG */ - YYSYMBOL_DASH = 361, /* DASH */ - YYSYMBOL_TILDE = 362, /* TILDE */ - YYSYMBOL_PLUS = 363, /* PLUS */ - YYSYMBOL_STAR = 364, /* STAR */ - YYSYMBOL_SLASH = 365, /* SLASH */ - YYSYMBOL_PERCENT = 366, /* PERCENT */ - YYSYMBOL_LEFT_ANGLE = 367, /* LEFT_ANGLE */ - YYSYMBOL_RIGHT_ANGLE = 368, /* RIGHT_ANGLE */ - YYSYMBOL_VERTICAL_BAR = 369, /* VERTICAL_BAR */ - YYSYMBOL_CARET = 370, /* CARET */ - YYSYMBOL_AMPERSAND = 371, /* AMPERSAND */ - YYSYMBOL_QUESTION = 372, /* QUESTION */ - YYSYMBOL_INVARIANT = 373, /* INVARIANT */ - YYSYMBOL_HIGH_PRECISION = 374, /* HIGH_PRECISION */ - YYSYMBOL_MEDIUM_PRECISION = 375, /* MEDIUM_PRECISION */ - YYSYMBOL_LOW_PRECISION = 376, /* LOW_PRECISION */ - YYSYMBOL_PRECISION = 377, /* PRECISION */ - YYSYMBOL_PACKED = 378, /* PACKED */ - YYSYMBOL_RESOURCE = 379, /* RESOURCE */ - YYSYMBOL_SUPERP = 380, /* SUPERP */ - YYSYMBOL_FLOATCONSTANT = 381, /* FLOATCONSTANT */ - YYSYMBOL_INTCONSTANT = 382, /* INTCONSTANT */ - YYSYMBOL_UINTCONSTANT = 383, /* UINTCONSTANT */ - YYSYMBOL_BOOLCONSTANT = 384, /* BOOLCONSTANT */ - YYSYMBOL_IDENTIFIER = 385, /* IDENTIFIER */ - YYSYMBOL_TYPE_NAME = 386, /* TYPE_NAME */ - YYSYMBOL_CENTROID = 387, /* CENTROID */ - YYSYMBOL_IN = 388, /* IN */ - YYSYMBOL_OUT = 389, /* OUT */ - YYSYMBOL_INOUT = 390, /* INOUT */ - YYSYMBOL_STRUCT = 391, /* STRUCT */ - YYSYMBOL_VOID = 392, /* VOID */ - YYSYMBOL_WHILE = 393, /* WHILE */ - YYSYMBOL_BREAK = 394, /* BREAK */ - YYSYMBOL_CONTINUE = 395, /* CONTINUE */ - YYSYMBOL_DO = 396, /* DO */ - YYSYMBOL_ELSE = 397, /* ELSE */ - YYSYMBOL_FOR = 398, /* FOR */ - YYSYMBOL_IF = 399, /* IF */ - YYSYMBOL_DISCARD = 400, /* DISCARD */ - YYSYMBOL_RETURN = 401, /* RETURN */ - YYSYMBOL_SWITCH = 402, /* SWITCH */ - YYSYMBOL_CASE = 403, /* CASE */ - YYSYMBOL_DEFAULT = 404, /* DEFAULT */ - YYSYMBOL_TERMINATE_INVOCATION = 405, /* TERMINATE_INVOCATION */ - YYSYMBOL_TERMINATE_RAY = 406, /* TERMINATE_RAY */ - YYSYMBOL_IGNORE_INTERSECTION = 407, /* IGNORE_INTERSECTION */ - YYSYMBOL_UNIFORM = 408, /* UNIFORM */ - YYSYMBOL_SHARED = 409, /* SHARED */ - YYSYMBOL_BUFFER = 410, /* BUFFER */ - YYSYMBOL_FLAT = 411, /* FLAT */ - YYSYMBOL_SMOOTH = 412, /* SMOOTH */ - YYSYMBOL_LAYOUT = 413, /* LAYOUT */ - YYSYMBOL_DOUBLECONSTANT = 414, /* DOUBLECONSTANT */ - YYSYMBOL_INT16CONSTANT = 415, /* INT16CONSTANT */ - YYSYMBOL_UINT16CONSTANT = 416, /* UINT16CONSTANT */ - YYSYMBOL_FLOAT16CONSTANT = 417, /* FLOAT16CONSTANT */ - YYSYMBOL_INT32CONSTANT = 418, /* INT32CONSTANT */ - YYSYMBOL_UINT32CONSTANT = 419, /* UINT32CONSTANT */ - YYSYMBOL_INT64CONSTANT = 420, /* INT64CONSTANT */ - YYSYMBOL_UINT64CONSTANT = 421, /* UINT64CONSTANT */ - YYSYMBOL_SUBROUTINE = 422, /* SUBROUTINE */ - YYSYMBOL_DEMOTE = 423, /* DEMOTE */ - YYSYMBOL_PAYLOADNV = 424, /* PAYLOADNV */ - YYSYMBOL_PAYLOADINNV = 425, /* PAYLOADINNV */ - YYSYMBOL_HITATTRNV = 426, /* HITATTRNV */ - YYSYMBOL_CALLDATANV = 427, /* CALLDATANV */ - YYSYMBOL_CALLDATAINNV = 428, /* CALLDATAINNV */ - YYSYMBOL_PAYLOADEXT = 429, /* PAYLOADEXT */ - YYSYMBOL_PAYLOADINEXT = 430, /* PAYLOADINEXT */ - YYSYMBOL_HITATTREXT = 431, /* HITATTREXT */ - YYSYMBOL_CALLDATAEXT = 432, /* CALLDATAEXT */ - YYSYMBOL_CALLDATAINEXT = 433, /* CALLDATAINEXT */ - YYSYMBOL_PATCH = 434, /* PATCH */ - YYSYMBOL_SAMPLE = 435, /* SAMPLE */ - YYSYMBOL_NONUNIFORM = 436, /* NONUNIFORM */ - YYSYMBOL_COHERENT = 437, /* COHERENT */ - YYSYMBOL_VOLATILE = 438, /* VOLATILE */ - YYSYMBOL_RESTRICT = 439, /* RESTRICT */ - YYSYMBOL_READONLY = 440, /* READONLY */ - YYSYMBOL_WRITEONLY = 441, /* WRITEONLY */ - YYSYMBOL_DEVICECOHERENT = 442, /* DEVICECOHERENT */ - YYSYMBOL_QUEUEFAMILYCOHERENT = 443, /* QUEUEFAMILYCOHERENT */ - YYSYMBOL_WORKGROUPCOHERENT = 444, /* WORKGROUPCOHERENT */ - YYSYMBOL_SUBGROUPCOHERENT = 445, /* SUBGROUPCOHERENT */ - YYSYMBOL_NONPRIVATE = 446, /* NONPRIVATE */ - YYSYMBOL_SHADERCALLCOHERENT = 447, /* SHADERCALLCOHERENT */ - YYSYMBOL_NOPERSPECTIVE = 448, /* NOPERSPECTIVE */ - YYSYMBOL_EXPLICITINTERPAMD = 449, /* EXPLICITINTERPAMD */ - YYSYMBOL_PERVERTEXEXT = 450, /* PERVERTEXEXT */ - YYSYMBOL_PERVERTEXNV = 451, /* PERVERTEXNV */ - YYSYMBOL_PERPRIMITIVENV = 452, /* PERPRIMITIVENV */ - YYSYMBOL_PERVIEWNV = 453, /* PERVIEWNV */ - YYSYMBOL_PERTASKNV = 454, /* PERTASKNV */ - YYSYMBOL_PRECISE = 455, /* PRECISE */ - YYSYMBOL_YYACCEPT = 456, /* $accept */ - YYSYMBOL_variable_identifier = 457, /* variable_identifier */ - YYSYMBOL_primary_expression = 458, /* primary_expression */ - YYSYMBOL_postfix_expression = 459, /* postfix_expression */ - YYSYMBOL_integer_expression = 460, /* integer_expression */ - YYSYMBOL_function_call = 461, /* function_call */ - YYSYMBOL_function_call_or_method = 462, /* function_call_or_method */ - YYSYMBOL_function_call_generic = 463, /* function_call_generic */ - YYSYMBOL_function_call_header_no_parameters = 464, /* function_call_header_no_parameters */ - YYSYMBOL_function_call_header_with_parameters = 465, /* function_call_header_with_parameters */ - YYSYMBOL_function_call_header = 466, /* function_call_header */ - YYSYMBOL_function_identifier = 467, /* function_identifier */ - YYSYMBOL_unary_expression = 468, /* unary_expression */ - YYSYMBOL_unary_operator = 469, /* unary_operator */ - YYSYMBOL_multiplicative_expression = 470, /* multiplicative_expression */ - YYSYMBOL_additive_expression = 471, /* additive_expression */ - YYSYMBOL_shift_expression = 472, /* shift_expression */ - YYSYMBOL_relational_expression = 473, /* relational_expression */ - YYSYMBOL_equality_expression = 474, /* equality_expression */ - YYSYMBOL_and_expression = 475, /* and_expression */ - YYSYMBOL_exclusive_or_expression = 476, /* exclusive_or_expression */ - YYSYMBOL_inclusive_or_expression = 477, /* inclusive_or_expression */ - YYSYMBOL_logical_and_expression = 478, /* logical_and_expression */ - YYSYMBOL_logical_xor_expression = 479, /* logical_xor_expression */ - YYSYMBOL_logical_or_expression = 480, /* logical_or_expression */ - YYSYMBOL_conditional_expression = 481, /* conditional_expression */ - YYSYMBOL_482_1 = 482, /* $@1 */ - YYSYMBOL_assignment_expression = 483, /* assignment_expression */ - YYSYMBOL_assignment_operator = 484, /* assignment_operator */ - YYSYMBOL_expression = 485, /* expression */ - YYSYMBOL_constant_expression = 486, /* constant_expression */ - YYSYMBOL_declaration = 487, /* declaration */ - YYSYMBOL_block_structure = 488, /* block_structure */ - YYSYMBOL_489_2 = 489, /* $@2 */ - YYSYMBOL_identifier_list = 490, /* identifier_list */ - YYSYMBOL_function_prototype = 491, /* function_prototype */ - YYSYMBOL_function_declarator = 492, /* function_declarator */ - YYSYMBOL_function_header_with_parameters = 493, /* function_header_with_parameters */ - YYSYMBOL_function_header = 494, /* function_header */ - YYSYMBOL_parameter_declarator = 495, /* parameter_declarator */ - YYSYMBOL_parameter_declaration = 496, /* parameter_declaration */ - YYSYMBOL_parameter_type_specifier = 497, /* parameter_type_specifier */ - YYSYMBOL_init_declarator_list = 498, /* init_declarator_list */ - YYSYMBOL_single_declaration = 499, /* single_declaration */ - YYSYMBOL_fully_specified_type = 500, /* fully_specified_type */ - YYSYMBOL_invariant_qualifier = 501, /* invariant_qualifier */ - YYSYMBOL_interpolation_qualifier = 502, /* interpolation_qualifier */ - YYSYMBOL_layout_qualifier = 503, /* layout_qualifier */ - YYSYMBOL_layout_qualifier_id_list = 504, /* layout_qualifier_id_list */ - YYSYMBOL_layout_qualifier_id = 505, /* layout_qualifier_id */ - YYSYMBOL_precise_qualifier = 506, /* precise_qualifier */ - YYSYMBOL_type_qualifier = 507, /* type_qualifier */ - YYSYMBOL_single_type_qualifier = 508, /* single_type_qualifier */ - YYSYMBOL_storage_qualifier = 509, /* storage_qualifier */ - YYSYMBOL_non_uniform_qualifier = 510, /* non_uniform_qualifier */ - YYSYMBOL_type_name_list = 511, /* type_name_list */ - YYSYMBOL_type_specifier = 512, /* type_specifier */ - YYSYMBOL_array_specifier = 513, /* array_specifier */ - YYSYMBOL_type_parameter_specifier_opt = 514, /* type_parameter_specifier_opt */ - YYSYMBOL_type_parameter_specifier = 515, /* type_parameter_specifier */ - YYSYMBOL_type_parameter_specifier_list = 516, /* type_parameter_specifier_list */ - YYSYMBOL_type_specifier_nonarray = 517, /* type_specifier_nonarray */ - YYSYMBOL_precision_qualifier = 518, /* precision_qualifier */ - YYSYMBOL_struct_specifier = 519, /* struct_specifier */ - YYSYMBOL_520_3 = 520, /* $@3 */ - YYSYMBOL_521_4 = 521, /* $@4 */ - YYSYMBOL_struct_declaration_list = 522, /* struct_declaration_list */ - YYSYMBOL_struct_declaration = 523, /* struct_declaration */ - YYSYMBOL_struct_declarator_list = 524, /* struct_declarator_list */ - YYSYMBOL_struct_declarator = 525, /* struct_declarator */ - YYSYMBOL_initializer = 526, /* initializer */ - YYSYMBOL_initializer_list = 527, /* initializer_list */ - YYSYMBOL_declaration_statement = 528, /* declaration_statement */ - YYSYMBOL_statement = 529, /* statement */ - YYSYMBOL_simple_statement = 530, /* simple_statement */ - YYSYMBOL_demote_statement = 531, /* demote_statement */ - YYSYMBOL_compound_statement = 532, /* compound_statement */ - YYSYMBOL_533_5 = 533, /* $@5 */ - YYSYMBOL_534_6 = 534, /* $@6 */ - YYSYMBOL_statement_no_new_scope = 535, /* statement_no_new_scope */ - YYSYMBOL_statement_scoped = 536, /* statement_scoped */ - YYSYMBOL_537_7 = 537, /* $@7 */ - YYSYMBOL_538_8 = 538, /* $@8 */ - YYSYMBOL_compound_statement_no_new_scope = 539, /* compound_statement_no_new_scope */ - YYSYMBOL_statement_list = 540, /* statement_list */ - YYSYMBOL_expression_statement = 541, /* expression_statement */ - YYSYMBOL_selection_statement = 542, /* selection_statement */ - YYSYMBOL_selection_statement_nonattributed = 543, /* selection_statement_nonattributed */ - YYSYMBOL_selection_rest_statement = 544, /* selection_rest_statement */ - YYSYMBOL_condition = 545, /* condition */ - YYSYMBOL_switch_statement = 546, /* switch_statement */ - YYSYMBOL_switch_statement_nonattributed = 547, /* switch_statement_nonattributed */ - YYSYMBOL_548_9 = 548, /* $@9 */ - YYSYMBOL_switch_statement_list = 549, /* switch_statement_list */ - YYSYMBOL_case_label = 550, /* case_label */ - YYSYMBOL_iteration_statement = 551, /* iteration_statement */ - YYSYMBOL_iteration_statement_nonattributed = 552, /* iteration_statement_nonattributed */ - YYSYMBOL_553_10 = 553, /* $@10 */ - YYSYMBOL_554_11 = 554, /* $@11 */ - YYSYMBOL_555_12 = 555, /* $@12 */ - YYSYMBOL_for_init_statement = 556, /* for_init_statement */ - YYSYMBOL_conditionopt = 557, /* conditionopt */ - YYSYMBOL_for_rest_statement = 558, /* for_rest_statement */ - YYSYMBOL_jump_statement = 559, /* jump_statement */ - YYSYMBOL_translation_unit = 560, /* translation_unit */ - YYSYMBOL_external_declaration = 561, /* external_declaration */ - YYSYMBOL_function_definition = 562, /* function_definition */ - YYSYMBOL_563_13 = 563, /* $@13 */ - YYSYMBOL_attribute = 564, /* attribute */ - YYSYMBOL_attribute_list = 565, /* attribute_list */ - YYSYMBOL_single_attribute = 566, /* single_attribute */ - YYSYMBOL_spirv_requirements_list = 567, /* spirv_requirements_list */ - YYSYMBOL_spirv_requirements_parameter = 568, /* spirv_requirements_parameter */ - YYSYMBOL_spirv_extension_list = 569, /* spirv_extension_list */ - YYSYMBOL_spirv_capability_list = 570, /* spirv_capability_list */ - YYSYMBOL_spirv_execution_mode_qualifier = 571, /* spirv_execution_mode_qualifier */ - YYSYMBOL_spirv_execution_mode_parameter_list = 572, /* spirv_execution_mode_parameter_list */ - YYSYMBOL_spirv_execution_mode_parameter = 573, /* spirv_execution_mode_parameter */ - YYSYMBOL_spirv_execution_mode_id_parameter_list = 574, /* spirv_execution_mode_id_parameter_list */ - YYSYMBOL_spirv_storage_class_qualifier = 575, /* spirv_storage_class_qualifier */ - YYSYMBOL_spirv_decorate_qualifier = 576, /* spirv_decorate_qualifier */ - YYSYMBOL_spirv_decorate_parameter_list = 577, /* spirv_decorate_parameter_list */ - YYSYMBOL_spirv_decorate_parameter = 578, /* spirv_decorate_parameter */ - YYSYMBOL_spirv_decorate_id_parameter_list = 579, /* spirv_decorate_id_parameter_list */ - YYSYMBOL_spirv_decorate_string_parameter_list = 580, /* spirv_decorate_string_parameter_list */ - YYSYMBOL_spirv_type_specifier = 581, /* spirv_type_specifier */ - YYSYMBOL_spirv_type_parameter_list = 582, /* spirv_type_parameter_list */ - YYSYMBOL_spirv_type_parameter = 583, /* spirv_type_parameter */ - YYSYMBOL_spirv_instruction_qualifier = 584, /* spirv_instruction_qualifier */ - YYSYMBOL_spirv_instruction_qualifier_list = 585, /* spirv_instruction_qualifier_list */ - YYSYMBOL_spirv_instruction_qualifier_id = 586 /* spirv_instruction_qualifier_id */ + YYSYMBOL_COOPMAT = 166, /* COOPMAT */ + YYSYMBOL_HITOBJECTNV = 167, /* HITOBJECTNV */ + YYSYMBOL_HITOBJECTATTRNV = 168, /* HITOBJECTATTRNV */ + YYSYMBOL_SAMPLERCUBEARRAY = 169, /* SAMPLERCUBEARRAY */ + YYSYMBOL_SAMPLERCUBEARRAYSHADOW = 170, /* SAMPLERCUBEARRAYSHADOW */ + YYSYMBOL_ISAMPLERCUBEARRAY = 171, /* ISAMPLERCUBEARRAY */ + YYSYMBOL_USAMPLERCUBEARRAY = 172, /* USAMPLERCUBEARRAY */ + YYSYMBOL_SAMPLER1D = 173, /* SAMPLER1D */ + YYSYMBOL_SAMPLER1DARRAY = 174, /* SAMPLER1DARRAY */ + YYSYMBOL_SAMPLER1DARRAYSHADOW = 175, /* SAMPLER1DARRAYSHADOW */ + YYSYMBOL_ISAMPLER1D = 176, /* ISAMPLER1D */ + YYSYMBOL_SAMPLER1DSHADOW = 177, /* SAMPLER1DSHADOW */ + YYSYMBOL_SAMPLER2DRECT = 178, /* SAMPLER2DRECT */ + YYSYMBOL_SAMPLER2DRECTSHADOW = 179, /* SAMPLER2DRECTSHADOW */ + YYSYMBOL_ISAMPLER2DRECT = 180, /* ISAMPLER2DRECT */ + YYSYMBOL_USAMPLER2DRECT = 181, /* USAMPLER2DRECT */ + YYSYMBOL_SAMPLERBUFFER = 182, /* SAMPLERBUFFER */ + YYSYMBOL_ISAMPLERBUFFER = 183, /* ISAMPLERBUFFER */ + YYSYMBOL_USAMPLERBUFFER = 184, /* USAMPLERBUFFER */ + YYSYMBOL_SAMPLER2DMS = 185, /* SAMPLER2DMS */ + YYSYMBOL_ISAMPLER2DMS = 186, /* ISAMPLER2DMS */ + YYSYMBOL_USAMPLER2DMS = 187, /* USAMPLER2DMS */ + YYSYMBOL_SAMPLER2DMSARRAY = 188, /* SAMPLER2DMSARRAY */ + YYSYMBOL_ISAMPLER2DMSARRAY = 189, /* ISAMPLER2DMSARRAY */ + YYSYMBOL_USAMPLER2DMSARRAY = 190, /* USAMPLER2DMSARRAY */ + YYSYMBOL_SAMPLEREXTERNALOES = 191, /* SAMPLEREXTERNALOES */ + YYSYMBOL_SAMPLEREXTERNAL2DY2YEXT = 192, /* SAMPLEREXTERNAL2DY2YEXT */ + YYSYMBOL_ISAMPLER1DARRAY = 193, /* ISAMPLER1DARRAY */ + YYSYMBOL_USAMPLER1D = 194, /* USAMPLER1D */ + YYSYMBOL_USAMPLER1DARRAY = 195, /* USAMPLER1DARRAY */ + YYSYMBOL_F16SAMPLER1D = 196, /* F16SAMPLER1D */ + YYSYMBOL_F16SAMPLER2D = 197, /* F16SAMPLER2D */ + YYSYMBOL_F16SAMPLER3D = 198, /* F16SAMPLER3D */ + YYSYMBOL_F16SAMPLER2DRECT = 199, /* F16SAMPLER2DRECT */ + YYSYMBOL_F16SAMPLERCUBE = 200, /* F16SAMPLERCUBE */ + YYSYMBOL_F16SAMPLER1DARRAY = 201, /* F16SAMPLER1DARRAY */ + YYSYMBOL_F16SAMPLER2DARRAY = 202, /* F16SAMPLER2DARRAY */ + YYSYMBOL_F16SAMPLERCUBEARRAY = 203, /* F16SAMPLERCUBEARRAY */ + YYSYMBOL_F16SAMPLERBUFFER = 204, /* F16SAMPLERBUFFER */ + YYSYMBOL_F16SAMPLER2DMS = 205, /* F16SAMPLER2DMS */ + YYSYMBOL_F16SAMPLER2DMSARRAY = 206, /* F16SAMPLER2DMSARRAY */ + YYSYMBOL_F16SAMPLER1DSHADOW = 207, /* F16SAMPLER1DSHADOW */ + YYSYMBOL_F16SAMPLER2DSHADOW = 208, /* F16SAMPLER2DSHADOW */ + YYSYMBOL_F16SAMPLER1DARRAYSHADOW = 209, /* F16SAMPLER1DARRAYSHADOW */ + YYSYMBOL_F16SAMPLER2DARRAYSHADOW = 210, /* F16SAMPLER2DARRAYSHADOW */ + YYSYMBOL_F16SAMPLER2DRECTSHADOW = 211, /* F16SAMPLER2DRECTSHADOW */ + YYSYMBOL_F16SAMPLERCUBESHADOW = 212, /* F16SAMPLERCUBESHADOW */ + YYSYMBOL_F16SAMPLERCUBEARRAYSHADOW = 213, /* F16SAMPLERCUBEARRAYSHADOW */ + YYSYMBOL_IMAGE1D = 214, /* IMAGE1D */ + YYSYMBOL_IIMAGE1D = 215, /* IIMAGE1D */ + YYSYMBOL_UIMAGE1D = 216, /* UIMAGE1D */ + YYSYMBOL_IMAGE2D = 217, /* IMAGE2D */ + YYSYMBOL_IIMAGE2D = 218, /* IIMAGE2D */ + YYSYMBOL_UIMAGE2D = 219, /* UIMAGE2D */ + YYSYMBOL_IMAGE3D = 220, /* IMAGE3D */ + YYSYMBOL_IIMAGE3D = 221, /* IIMAGE3D */ + YYSYMBOL_UIMAGE3D = 222, /* UIMAGE3D */ + YYSYMBOL_IMAGE2DRECT = 223, /* IMAGE2DRECT */ + YYSYMBOL_IIMAGE2DRECT = 224, /* IIMAGE2DRECT */ + YYSYMBOL_UIMAGE2DRECT = 225, /* UIMAGE2DRECT */ + YYSYMBOL_IMAGECUBE = 226, /* IMAGECUBE */ + YYSYMBOL_IIMAGECUBE = 227, /* IIMAGECUBE */ + YYSYMBOL_UIMAGECUBE = 228, /* UIMAGECUBE */ + YYSYMBOL_IMAGEBUFFER = 229, /* IMAGEBUFFER */ + YYSYMBOL_IIMAGEBUFFER = 230, /* IIMAGEBUFFER */ + YYSYMBOL_UIMAGEBUFFER = 231, /* UIMAGEBUFFER */ + YYSYMBOL_IMAGE1DARRAY = 232, /* IMAGE1DARRAY */ + YYSYMBOL_IIMAGE1DARRAY = 233, /* IIMAGE1DARRAY */ + YYSYMBOL_UIMAGE1DARRAY = 234, /* UIMAGE1DARRAY */ + YYSYMBOL_IMAGE2DARRAY = 235, /* IMAGE2DARRAY */ + YYSYMBOL_IIMAGE2DARRAY = 236, /* IIMAGE2DARRAY */ + YYSYMBOL_UIMAGE2DARRAY = 237, /* UIMAGE2DARRAY */ + YYSYMBOL_IMAGECUBEARRAY = 238, /* IMAGECUBEARRAY */ + YYSYMBOL_IIMAGECUBEARRAY = 239, /* IIMAGECUBEARRAY */ + YYSYMBOL_UIMAGECUBEARRAY = 240, /* UIMAGECUBEARRAY */ + YYSYMBOL_IMAGE2DMS = 241, /* IMAGE2DMS */ + YYSYMBOL_IIMAGE2DMS = 242, /* IIMAGE2DMS */ + YYSYMBOL_UIMAGE2DMS = 243, /* UIMAGE2DMS */ + YYSYMBOL_IMAGE2DMSARRAY = 244, /* IMAGE2DMSARRAY */ + YYSYMBOL_IIMAGE2DMSARRAY = 245, /* IIMAGE2DMSARRAY */ + YYSYMBOL_UIMAGE2DMSARRAY = 246, /* UIMAGE2DMSARRAY */ + YYSYMBOL_F16IMAGE1D = 247, /* F16IMAGE1D */ + YYSYMBOL_F16IMAGE2D = 248, /* F16IMAGE2D */ + YYSYMBOL_F16IMAGE3D = 249, /* F16IMAGE3D */ + YYSYMBOL_F16IMAGE2DRECT = 250, /* F16IMAGE2DRECT */ + YYSYMBOL_F16IMAGECUBE = 251, /* F16IMAGECUBE */ + YYSYMBOL_F16IMAGE1DARRAY = 252, /* F16IMAGE1DARRAY */ + YYSYMBOL_F16IMAGE2DARRAY = 253, /* F16IMAGE2DARRAY */ + YYSYMBOL_F16IMAGECUBEARRAY = 254, /* F16IMAGECUBEARRAY */ + YYSYMBOL_F16IMAGEBUFFER = 255, /* F16IMAGEBUFFER */ + YYSYMBOL_F16IMAGE2DMS = 256, /* F16IMAGE2DMS */ + YYSYMBOL_F16IMAGE2DMSARRAY = 257, /* F16IMAGE2DMSARRAY */ + YYSYMBOL_I64IMAGE1D = 258, /* I64IMAGE1D */ + YYSYMBOL_U64IMAGE1D = 259, /* U64IMAGE1D */ + YYSYMBOL_I64IMAGE2D = 260, /* I64IMAGE2D */ + YYSYMBOL_U64IMAGE2D = 261, /* U64IMAGE2D */ + YYSYMBOL_I64IMAGE3D = 262, /* I64IMAGE3D */ + YYSYMBOL_U64IMAGE3D = 263, /* U64IMAGE3D */ + YYSYMBOL_I64IMAGE2DRECT = 264, /* I64IMAGE2DRECT */ + YYSYMBOL_U64IMAGE2DRECT = 265, /* U64IMAGE2DRECT */ + YYSYMBOL_I64IMAGECUBE = 266, /* I64IMAGECUBE */ + YYSYMBOL_U64IMAGECUBE = 267, /* U64IMAGECUBE */ + YYSYMBOL_I64IMAGEBUFFER = 268, /* I64IMAGEBUFFER */ + YYSYMBOL_U64IMAGEBUFFER = 269, /* U64IMAGEBUFFER */ + YYSYMBOL_I64IMAGE1DARRAY = 270, /* I64IMAGE1DARRAY */ + YYSYMBOL_U64IMAGE1DARRAY = 271, /* U64IMAGE1DARRAY */ + YYSYMBOL_I64IMAGE2DARRAY = 272, /* I64IMAGE2DARRAY */ + YYSYMBOL_U64IMAGE2DARRAY = 273, /* U64IMAGE2DARRAY */ + YYSYMBOL_I64IMAGECUBEARRAY = 274, /* I64IMAGECUBEARRAY */ + YYSYMBOL_U64IMAGECUBEARRAY = 275, /* U64IMAGECUBEARRAY */ + YYSYMBOL_I64IMAGE2DMS = 276, /* I64IMAGE2DMS */ + YYSYMBOL_U64IMAGE2DMS = 277, /* U64IMAGE2DMS */ + YYSYMBOL_I64IMAGE2DMSARRAY = 278, /* I64IMAGE2DMSARRAY */ + YYSYMBOL_U64IMAGE2DMSARRAY = 279, /* U64IMAGE2DMSARRAY */ + YYSYMBOL_TEXTURECUBEARRAY = 280, /* TEXTURECUBEARRAY */ + YYSYMBOL_ITEXTURECUBEARRAY = 281, /* ITEXTURECUBEARRAY */ + YYSYMBOL_UTEXTURECUBEARRAY = 282, /* UTEXTURECUBEARRAY */ + YYSYMBOL_TEXTURE1D = 283, /* TEXTURE1D */ + YYSYMBOL_ITEXTURE1D = 284, /* ITEXTURE1D */ + YYSYMBOL_UTEXTURE1D = 285, /* UTEXTURE1D */ + YYSYMBOL_TEXTURE1DARRAY = 286, /* TEXTURE1DARRAY */ + YYSYMBOL_ITEXTURE1DARRAY = 287, /* ITEXTURE1DARRAY */ + YYSYMBOL_UTEXTURE1DARRAY = 288, /* UTEXTURE1DARRAY */ + YYSYMBOL_TEXTURE2DRECT = 289, /* TEXTURE2DRECT */ + YYSYMBOL_ITEXTURE2DRECT = 290, /* ITEXTURE2DRECT */ + YYSYMBOL_UTEXTURE2DRECT = 291, /* UTEXTURE2DRECT */ + YYSYMBOL_TEXTUREBUFFER = 292, /* TEXTUREBUFFER */ + YYSYMBOL_ITEXTUREBUFFER = 293, /* ITEXTUREBUFFER */ + YYSYMBOL_UTEXTUREBUFFER = 294, /* UTEXTUREBUFFER */ + YYSYMBOL_TEXTURE2DMS = 295, /* TEXTURE2DMS */ + YYSYMBOL_ITEXTURE2DMS = 296, /* ITEXTURE2DMS */ + YYSYMBOL_UTEXTURE2DMS = 297, /* UTEXTURE2DMS */ + YYSYMBOL_TEXTURE2DMSARRAY = 298, /* TEXTURE2DMSARRAY */ + YYSYMBOL_ITEXTURE2DMSARRAY = 299, /* ITEXTURE2DMSARRAY */ + YYSYMBOL_UTEXTURE2DMSARRAY = 300, /* UTEXTURE2DMSARRAY */ + YYSYMBOL_F16TEXTURE1D = 301, /* F16TEXTURE1D */ + YYSYMBOL_F16TEXTURE2D = 302, /* F16TEXTURE2D */ + YYSYMBOL_F16TEXTURE3D = 303, /* F16TEXTURE3D */ + YYSYMBOL_F16TEXTURE2DRECT = 304, /* F16TEXTURE2DRECT */ + YYSYMBOL_F16TEXTURECUBE = 305, /* F16TEXTURECUBE */ + YYSYMBOL_F16TEXTURE1DARRAY = 306, /* F16TEXTURE1DARRAY */ + YYSYMBOL_F16TEXTURE2DARRAY = 307, /* F16TEXTURE2DARRAY */ + YYSYMBOL_F16TEXTURECUBEARRAY = 308, /* F16TEXTURECUBEARRAY */ + YYSYMBOL_F16TEXTUREBUFFER = 309, /* F16TEXTUREBUFFER */ + YYSYMBOL_F16TEXTURE2DMS = 310, /* F16TEXTURE2DMS */ + YYSYMBOL_F16TEXTURE2DMSARRAY = 311, /* F16TEXTURE2DMSARRAY */ + YYSYMBOL_SUBPASSINPUT = 312, /* SUBPASSINPUT */ + YYSYMBOL_SUBPASSINPUTMS = 313, /* SUBPASSINPUTMS */ + YYSYMBOL_ISUBPASSINPUT = 314, /* ISUBPASSINPUT */ + YYSYMBOL_ISUBPASSINPUTMS = 315, /* ISUBPASSINPUTMS */ + YYSYMBOL_USUBPASSINPUT = 316, /* USUBPASSINPUT */ + YYSYMBOL_USUBPASSINPUTMS = 317, /* USUBPASSINPUTMS */ + YYSYMBOL_F16SUBPASSINPUT = 318, /* F16SUBPASSINPUT */ + YYSYMBOL_F16SUBPASSINPUTMS = 319, /* F16SUBPASSINPUTMS */ + YYSYMBOL_SPIRV_INSTRUCTION = 320, /* SPIRV_INSTRUCTION */ + YYSYMBOL_SPIRV_EXECUTION_MODE = 321, /* SPIRV_EXECUTION_MODE */ + YYSYMBOL_SPIRV_EXECUTION_MODE_ID = 322, /* SPIRV_EXECUTION_MODE_ID */ + YYSYMBOL_SPIRV_DECORATE = 323, /* SPIRV_DECORATE */ + YYSYMBOL_SPIRV_DECORATE_ID = 324, /* SPIRV_DECORATE_ID */ + YYSYMBOL_SPIRV_DECORATE_STRING = 325, /* SPIRV_DECORATE_STRING */ + YYSYMBOL_SPIRV_TYPE = 326, /* SPIRV_TYPE */ + YYSYMBOL_SPIRV_STORAGE_CLASS = 327, /* SPIRV_STORAGE_CLASS */ + YYSYMBOL_SPIRV_BY_REFERENCE = 328, /* SPIRV_BY_REFERENCE */ + YYSYMBOL_SPIRV_LITERAL = 329, /* SPIRV_LITERAL */ + YYSYMBOL_ATTACHMENTEXT = 330, /* ATTACHMENTEXT */ + YYSYMBOL_IATTACHMENTEXT = 331, /* IATTACHMENTEXT */ + YYSYMBOL_UATTACHMENTEXT = 332, /* UATTACHMENTEXT */ + YYSYMBOL_LEFT_OP = 333, /* LEFT_OP */ + YYSYMBOL_RIGHT_OP = 334, /* RIGHT_OP */ + YYSYMBOL_INC_OP = 335, /* INC_OP */ + YYSYMBOL_DEC_OP = 336, /* DEC_OP */ + YYSYMBOL_LE_OP = 337, /* LE_OP */ + YYSYMBOL_GE_OP = 338, /* GE_OP */ + YYSYMBOL_EQ_OP = 339, /* EQ_OP */ + YYSYMBOL_NE_OP = 340, /* NE_OP */ + YYSYMBOL_AND_OP = 341, /* AND_OP */ + YYSYMBOL_OR_OP = 342, /* OR_OP */ + YYSYMBOL_XOR_OP = 343, /* XOR_OP */ + YYSYMBOL_MUL_ASSIGN = 344, /* MUL_ASSIGN */ + YYSYMBOL_DIV_ASSIGN = 345, /* DIV_ASSIGN */ + YYSYMBOL_ADD_ASSIGN = 346, /* ADD_ASSIGN */ + YYSYMBOL_MOD_ASSIGN = 347, /* MOD_ASSIGN */ + YYSYMBOL_LEFT_ASSIGN = 348, /* LEFT_ASSIGN */ + YYSYMBOL_RIGHT_ASSIGN = 349, /* RIGHT_ASSIGN */ + YYSYMBOL_AND_ASSIGN = 350, /* AND_ASSIGN */ + YYSYMBOL_XOR_ASSIGN = 351, /* XOR_ASSIGN */ + YYSYMBOL_OR_ASSIGN = 352, /* OR_ASSIGN */ + YYSYMBOL_SUB_ASSIGN = 353, /* SUB_ASSIGN */ + YYSYMBOL_STRING_LITERAL = 354, /* STRING_LITERAL */ + YYSYMBOL_LEFT_PAREN = 355, /* LEFT_PAREN */ + YYSYMBOL_RIGHT_PAREN = 356, /* RIGHT_PAREN */ + YYSYMBOL_LEFT_BRACKET = 357, /* LEFT_BRACKET */ + YYSYMBOL_RIGHT_BRACKET = 358, /* RIGHT_BRACKET */ + YYSYMBOL_LEFT_BRACE = 359, /* LEFT_BRACE */ + YYSYMBOL_RIGHT_BRACE = 360, /* RIGHT_BRACE */ + YYSYMBOL_DOT = 361, /* DOT */ + YYSYMBOL_COMMA = 362, /* COMMA */ + YYSYMBOL_COLON = 363, /* COLON */ + YYSYMBOL_EQUAL = 364, /* EQUAL */ + YYSYMBOL_SEMICOLON = 365, /* SEMICOLON */ + YYSYMBOL_BANG = 366, /* BANG */ + YYSYMBOL_DASH = 367, /* DASH */ + YYSYMBOL_TILDE = 368, /* TILDE */ + YYSYMBOL_PLUS = 369, /* PLUS */ + YYSYMBOL_STAR = 370, /* STAR */ + YYSYMBOL_SLASH = 371, /* SLASH */ + YYSYMBOL_PERCENT = 372, /* PERCENT */ + YYSYMBOL_LEFT_ANGLE = 373, /* LEFT_ANGLE */ + YYSYMBOL_RIGHT_ANGLE = 374, /* RIGHT_ANGLE */ + YYSYMBOL_VERTICAL_BAR = 375, /* VERTICAL_BAR */ + YYSYMBOL_CARET = 376, /* CARET */ + YYSYMBOL_AMPERSAND = 377, /* AMPERSAND */ + YYSYMBOL_QUESTION = 378, /* QUESTION */ + YYSYMBOL_INVARIANT = 379, /* INVARIANT */ + YYSYMBOL_HIGH_PRECISION = 380, /* HIGH_PRECISION */ + YYSYMBOL_MEDIUM_PRECISION = 381, /* MEDIUM_PRECISION */ + YYSYMBOL_LOW_PRECISION = 382, /* LOW_PRECISION */ + YYSYMBOL_PRECISION = 383, /* PRECISION */ + YYSYMBOL_PACKED = 384, /* PACKED */ + YYSYMBOL_RESOURCE = 385, /* RESOURCE */ + YYSYMBOL_SUPERP = 386, /* SUPERP */ + YYSYMBOL_FLOATCONSTANT = 387, /* FLOATCONSTANT */ + YYSYMBOL_INTCONSTANT = 388, /* INTCONSTANT */ + YYSYMBOL_UINTCONSTANT = 389, /* UINTCONSTANT */ + YYSYMBOL_BOOLCONSTANT = 390, /* BOOLCONSTANT */ + YYSYMBOL_IDENTIFIER = 391, /* IDENTIFIER */ + YYSYMBOL_TYPE_NAME = 392, /* TYPE_NAME */ + YYSYMBOL_CENTROID = 393, /* CENTROID */ + YYSYMBOL_IN = 394, /* IN */ + YYSYMBOL_OUT = 395, /* OUT */ + YYSYMBOL_INOUT = 396, /* INOUT */ + YYSYMBOL_STRUCT = 397, /* STRUCT */ + YYSYMBOL_VOID = 398, /* VOID */ + YYSYMBOL_WHILE = 399, /* WHILE */ + YYSYMBOL_BREAK = 400, /* BREAK */ + YYSYMBOL_CONTINUE = 401, /* CONTINUE */ + YYSYMBOL_DO = 402, /* DO */ + YYSYMBOL_ELSE = 403, /* ELSE */ + YYSYMBOL_FOR = 404, /* FOR */ + YYSYMBOL_IF = 405, /* IF */ + YYSYMBOL_DISCARD = 406, /* DISCARD */ + YYSYMBOL_RETURN = 407, /* RETURN */ + YYSYMBOL_SWITCH = 408, /* SWITCH */ + YYSYMBOL_CASE = 409, /* CASE */ + YYSYMBOL_DEFAULT = 410, /* DEFAULT */ + YYSYMBOL_TERMINATE_INVOCATION = 411, /* TERMINATE_INVOCATION */ + YYSYMBOL_TERMINATE_RAY = 412, /* TERMINATE_RAY */ + YYSYMBOL_IGNORE_INTERSECTION = 413, /* IGNORE_INTERSECTION */ + YYSYMBOL_UNIFORM = 414, /* UNIFORM */ + YYSYMBOL_SHARED = 415, /* SHARED */ + YYSYMBOL_BUFFER = 416, /* BUFFER */ + YYSYMBOL_TILEIMAGEEXT = 417, /* TILEIMAGEEXT */ + YYSYMBOL_FLAT = 418, /* FLAT */ + YYSYMBOL_SMOOTH = 419, /* SMOOTH */ + YYSYMBOL_LAYOUT = 420, /* LAYOUT */ + YYSYMBOL_DOUBLECONSTANT = 421, /* DOUBLECONSTANT */ + YYSYMBOL_INT16CONSTANT = 422, /* INT16CONSTANT */ + YYSYMBOL_UINT16CONSTANT = 423, /* UINT16CONSTANT */ + YYSYMBOL_FLOAT16CONSTANT = 424, /* FLOAT16CONSTANT */ + YYSYMBOL_INT32CONSTANT = 425, /* INT32CONSTANT */ + YYSYMBOL_UINT32CONSTANT = 426, /* UINT32CONSTANT */ + YYSYMBOL_INT64CONSTANT = 427, /* INT64CONSTANT */ + YYSYMBOL_UINT64CONSTANT = 428, /* UINT64CONSTANT */ + YYSYMBOL_SUBROUTINE = 429, /* SUBROUTINE */ + YYSYMBOL_DEMOTE = 430, /* DEMOTE */ + YYSYMBOL_PAYLOADNV = 431, /* PAYLOADNV */ + YYSYMBOL_PAYLOADINNV = 432, /* PAYLOADINNV */ + YYSYMBOL_HITATTRNV = 433, /* HITATTRNV */ + YYSYMBOL_CALLDATANV = 434, /* CALLDATANV */ + YYSYMBOL_CALLDATAINNV = 435, /* CALLDATAINNV */ + YYSYMBOL_PAYLOADEXT = 436, /* PAYLOADEXT */ + YYSYMBOL_PAYLOADINEXT = 437, /* PAYLOADINEXT */ + YYSYMBOL_HITATTREXT = 438, /* HITATTREXT */ + YYSYMBOL_CALLDATAEXT = 439, /* CALLDATAEXT */ + YYSYMBOL_CALLDATAINEXT = 440, /* CALLDATAINEXT */ + YYSYMBOL_PATCH = 441, /* PATCH */ + YYSYMBOL_SAMPLE = 442, /* SAMPLE */ + YYSYMBOL_NONUNIFORM = 443, /* NONUNIFORM */ + YYSYMBOL_COHERENT = 444, /* COHERENT */ + YYSYMBOL_VOLATILE = 445, /* VOLATILE */ + YYSYMBOL_RESTRICT = 446, /* RESTRICT */ + YYSYMBOL_READONLY = 447, /* READONLY */ + YYSYMBOL_WRITEONLY = 448, /* WRITEONLY */ + YYSYMBOL_DEVICECOHERENT = 449, /* DEVICECOHERENT */ + YYSYMBOL_QUEUEFAMILYCOHERENT = 450, /* QUEUEFAMILYCOHERENT */ + YYSYMBOL_WORKGROUPCOHERENT = 451, /* WORKGROUPCOHERENT */ + YYSYMBOL_SUBGROUPCOHERENT = 452, /* SUBGROUPCOHERENT */ + YYSYMBOL_NONPRIVATE = 453, /* NONPRIVATE */ + YYSYMBOL_SHADERCALLCOHERENT = 454, /* SHADERCALLCOHERENT */ + YYSYMBOL_NOPERSPECTIVE = 455, /* NOPERSPECTIVE */ + YYSYMBOL_EXPLICITINTERPAMD = 456, /* EXPLICITINTERPAMD */ + YYSYMBOL_PERVERTEXEXT = 457, /* PERVERTEXEXT */ + YYSYMBOL_PERVERTEXNV = 458, /* PERVERTEXNV */ + YYSYMBOL_PERPRIMITIVENV = 459, /* PERPRIMITIVENV */ + YYSYMBOL_PERVIEWNV = 460, /* PERVIEWNV */ + YYSYMBOL_PERTASKNV = 461, /* PERTASKNV */ + YYSYMBOL_PERPRIMITIVEEXT = 462, /* PERPRIMITIVEEXT */ + YYSYMBOL_TASKPAYLOADWORKGROUPEXT = 463, /* TASKPAYLOADWORKGROUPEXT */ + YYSYMBOL_PRECISE = 464, /* PRECISE */ + YYSYMBOL_YYACCEPT = 465, /* $accept */ + YYSYMBOL_variable_identifier = 466, /* variable_identifier */ + YYSYMBOL_primary_expression = 467, /* primary_expression */ + YYSYMBOL_postfix_expression = 468, /* postfix_expression */ + YYSYMBOL_integer_expression = 469, /* integer_expression */ + YYSYMBOL_function_call = 470, /* function_call */ + YYSYMBOL_function_call_or_method = 471, /* function_call_or_method */ + YYSYMBOL_function_call_generic = 472, /* function_call_generic */ + YYSYMBOL_function_call_header_no_parameters = 473, /* function_call_header_no_parameters */ + YYSYMBOL_function_call_header_with_parameters = 474, /* function_call_header_with_parameters */ + YYSYMBOL_function_call_header = 475, /* function_call_header */ + YYSYMBOL_function_identifier = 476, /* function_identifier */ + YYSYMBOL_unary_expression = 477, /* unary_expression */ + YYSYMBOL_unary_operator = 478, /* unary_operator */ + YYSYMBOL_multiplicative_expression = 479, /* multiplicative_expression */ + YYSYMBOL_additive_expression = 480, /* additive_expression */ + YYSYMBOL_shift_expression = 481, /* shift_expression */ + YYSYMBOL_relational_expression = 482, /* relational_expression */ + YYSYMBOL_equality_expression = 483, /* equality_expression */ + YYSYMBOL_and_expression = 484, /* and_expression */ + YYSYMBOL_exclusive_or_expression = 485, /* exclusive_or_expression */ + YYSYMBOL_inclusive_or_expression = 486, /* inclusive_or_expression */ + YYSYMBOL_logical_and_expression = 487, /* logical_and_expression */ + YYSYMBOL_logical_xor_expression = 488, /* logical_xor_expression */ + YYSYMBOL_logical_or_expression = 489, /* logical_or_expression */ + YYSYMBOL_conditional_expression = 490, /* conditional_expression */ + YYSYMBOL_491_1 = 491, /* $@1 */ + YYSYMBOL_assignment_expression = 492, /* assignment_expression */ + YYSYMBOL_assignment_operator = 493, /* assignment_operator */ + YYSYMBOL_expression = 494, /* expression */ + YYSYMBOL_constant_expression = 495, /* constant_expression */ + YYSYMBOL_declaration = 496, /* declaration */ + YYSYMBOL_block_structure = 497, /* block_structure */ + YYSYMBOL_498_2 = 498, /* $@2 */ + YYSYMBOL_identifier_list = 499, /* identifier_list */ + YYSYMBOL_function_prototype = 500, /* function_prototype */ + YYSYMBOL_function_declarator = 501, /* function_declarator */ + YYSYMBOL_function_header_with_parameters = 502, /* function_header_with_parameters */ + YYSYMBOL_function_header = 503, /* function_header */ + YYSYMBOL_parameter_declarator = 504, /* parameter_declarator */ + YYSYMBOL_parameter_declaration = 505, /* parameter_declaration */ + YYSYMBOL_parameter_type_specifier = 506, /* parameter_type_specifier */ + YYSYMBOL_init_declarator_list = 507, /* init_declarator_list */ + YYSYMBOL_single_declaration = 508, /* single_declaration */ + YYSYMBOL_fully_specified_type = 509, /* fully_specified_type */ + YYSYMBOL_invariant_qualifier = 510, /* invariant_qualifier */ + YYSYMBOL_interpolation_qualifier = 511, /* interpolation_qualifier */ + YYSYMBOL_layout_qualifier = 512, /* layout_qualifier */ + YYSYMBOL_layout_qualifier_id_list = 513, /* layout_qualifier_id_list */ + YYSYMBOL_layout_qualifier_id = 514, /* layout_qualifier_id */ + YYSYMBOL_precise_qualifier = 515, /* precise_qualifier */ + YYSYMBOL_type_qualifier = 516, /* type_qualifier */ + YYSYMBOL_single_type_qualifier = 517, /* single_type_qualifier */ + YYSYMBOL_storage_qualifier = 518, /* storage_qualifier */ + YYSYMBOL_non_uniform_qualifier = 519, /* non_uniform_qualifier */ + YYSYMBOL_type_name_list = 520, /* type_name_list */ + YYSYMBOL_type_specifier = 521, /* type_specifier */ + YYSYMBOL_array_specifier = 522, /* array_specifier */ + YYSYMBOL_type_parameter_specifier_opt = 523, /* type_parameter_specifier_opt */ + YYSYMBOL_type_parameter_specifier = 524, /* type_parameter_specifier */ + YYSYMBOL_type_parameter_specifier_list = 525, /* type_parameter_specifier_list */ + YYSYMBOL_type_specifier_nonarray = 526, /* type_specifier_nonarray */ + YYSYMBOL_precision_qualifier = 527, /* precision_qualifier */ + YYSYMBOL_struct_specifier = 528, /* struct_specifier */ + YYSYMBOL_529_3 = 529, /* $@3 */ + YYSYMBOL_530_4 = 530, /* $@4 */ + YYSYMBOL_struct_declaration_list = 531, /* struct_declaration_list */ + YYSYMBOL_struct_declaration = 532, /* struct_declaration */ + YYSYMBOL_struct_declarator_list = 533, /* struct_declarator_list */ + YYSYMBOL_struct_declarator = 534, /* struct_declarator */ + YYSYMBOL_initializer = 535, /* initializer */ + YYSYMBOL_initializer_list = 536, /* initializer_list */ + YYSYMBOL_declaration_statement = 537, /* declaration_statement */ + YYSYMBOL_statement = 538, /* statement */ + YYSYMBOL_simple_statement = 539, /* simple_statement */ + YYSYMBOL_demote_statement = 540, /* demote_statement */ + YYSYMBOL_compound_statement = 541, /* compound_statement */ + YYSYMBOL_542_5 = 542, /* $@5 */ + YYSYMBOL_543_6 = 543, /* $@6 */ + YYSYMBOL_statement_no_new_scope = 544, /* statement_no_new_scope */ + YYSYMBOL_statement_scoped = 545, /* statement_scoped */ + YYSYMBOL_546_7 = 546, /* $@7 */ + YYSYMBOL_547_8 = 547, /* $@8 */ + YYSYMBOL_compound_statement_no_new_scope = 548, /* compound_statement_no_new_scope */ + YYSYMBOL_statement_list = 549, /* statement_list */ + YYSYMBOL_expression_statement = 550, /* expression_statement */ + YYSYMBOL_selection_statement = 551, /* selection_statement */ + YYSYMBOL_selection_statement_nonattributed = 552, /* selection_statement_nonattributed */ + YYSYMBOL_selection_rest_statement = 553, /* selection_rest_statement */ + YYSYMBOL_condition = 554, /* condition */ + YYSYMBOL_switch_statement = 555, /* switch_statement */ + YYSYMBOL_switch_statement_nonattributed = 556, /* switch_statement_nonattributed */ + YYSYMBOL_557_9 = 557, /* $@9 */ + YYSYMBOL_switch_statement_list = 558, /* switch_statement_list */ + YYSYMBOL_case_label = 559, /* case_label */ + YYSYMBOL_iteration_statement = 560, /* iteration_statement */ + YYSYMBOL_iteration_statement_nonattributed = 561, /* iteration_statement_nonattributed */ + YYSYMBOL_562_10 = 562, /* $@10 */ + YYSYMBOL_563_11 = 563, /* $@11 */ + YYSYMBOL_564_12 = 564, /* $@12 */ + YYSYMBOL_for_init_statement = 565, /* for_init_statement */ + YYSYMBOL_conditionopt = 566, /* conditionopt */ + YYSYMBOL_for_rest_statement = 567, /* for_rest_statement */ + YYSYMBOL_jump_statement = 568, /* jump_statement */ + YYSYMBOL_translation_unit = 569, /* translation_unit */ + YYSYMBOL_external_declaration = 570, /* external_declaration */ + YYSYMBOL_function_definition = 571, /* function_definition */ + YYSYMBOL_572_13 = 572, /* $@13 */ + YYSYMBOL_attribute = 573, /* attribute */ + YYSYMBOL_attribute_list = 574, /* attribute_list */ + YYSYMBOL_single_attribute = 575, /* single_attribute */ + YYSYMBOL_spirv_requirements_list = 576, /* spirv_requirements_list */ + YYSYMBOL_spirv_requirements_parameter = 577, /* spirv_requirements_parameter */ + YYSYMBOL_spirv_extension_list = 578, /* spirv_extension_list */ + YYSYMBOL_spirv_capability_list = 579, /* spirv_capability_list */ + YYSYMBOL_spirv_execution_mode_qualifier = 580, /* spirv_execution_mode_qualifier */ + YYSYMBOL_spirv_execution_mode_parameter_list = 581, /* spirv_execution_mode_parameter_list */ + YYSYMBOL_spirv_execution_mode_parameter = 582, /* spirv_execution_mode_parameter */ + YYSYMBOL_spirv_execution_mode_id_parameter_list = 583, /* spirv_execution_mode_id_parameter_list */ + YYSYMBOL_spirv_storage_class_qualifier = 584, /* spirv_storage_class_qualifier */ + YYSYMBOL_spirv_decorate_qualifier = 585, /* spirv_decorate_qualifier */ + YYSYMBOL_spirv_decorate_parameter_list = 586, /* spirv_decorate_parameter_list */ + YYSYMBOL_spirv_decorate_parameter = 587, /* spirv_decorate_parameter */ + YYSYMBOL_spirv_decorate_id_parameter_list = 588, /* spirv_decorate_id_parameter_list */ + YYSYMBOL_spirv_decorate_id_parameter = 589, /* spirv_decorate_id_parameter */ + YYSYMBOL_spirv_decorate_string_parameter_list = 590, /* spirv_decorate_string_parameter_list */ + YYSYMBOL_spirv_type_specifier = 591, /* spirv_type_specifier */ + YYSYMBOL_spirv_type_parameter_list = 592, /* spirv_type_parameter_list */ + YYSYMBOL_spirv_type_parameter = 593, /* spirv_type_parameter */ + YYSYMBOL_spirv_instruction_qualifier = 594, /* spirv_instruction_qualifier */ + YYSYMBOL_spirv_instruction_qualifier_list = 595, /* spirv_instruction_qualifier_list */ + YYSYMBOL_spirv_instruction_qualifier_id = 596 /* spirv_instruction_qualifier_id */ }; typedef enum yysymbol_kind_t yysymbol_kind_t; /* Second part of user prologue. */ -#line 136 "MachineIndependent/glslang.y" +#line 111 "MachineIndependent/glslang.y" /* windows only pragma */ @@ -729,7 +739,7 @@ typedef enum yysymbol_kind_t yysymbol_kind_t; extern int yylex(YYSTYPE*, TParseContext&); -#line 733 "MachineIndependent/glslang_tab.cpp" +#line 743 "MachineIndependent/glslang_tab.cpp" #ifdef short @@ -769,6 +779,18 @@ typedef int_least16_t yytype_int16; typedef short yytype_int16; #endif +/* Work around bug in HP-UX 11.23, which defines these macros + incorrectly for preprocessor constants. This workaround can likely + be removed in 2023, as HPE has promised support for HP-UX 11.23 + (aka HP-UX 11i v2) only through the end of 2022; see Table 2 of + . */ +#ifdef __hpux +# undef UINT_LEAST8_MAX +# undef UINT_LEAST16_MAX +# define UINT_LEAST8_MAX 255 +# define UINT_LEAST16_MAX 65535 +#endif + #if defined __UINT_LEAST8_MAX__ && __UINT_LEAST8_MAX__ <= __INT_MAX__ typedef __UINT_LEAST8_TYPE__ yytype_uint8; #elif (!defined __UINT_LEAST8_MAX__ && defined YY_STDINT_H \ @@ -866,17 +888,23 @@ typedef int yy_state_fast_t; /* Suppress unused-variable warnings by "using" E. */ #if ! defined lint || defined __GNUC__ -# define YYUSE(E) ((void) (E)) +# define YY_USE(E) ((void) (E)) #else -# define YYUSE(E) /* empty */ +# define YY_USE(E) /* empty */ #endif -#if defined __GNUC__ && ! defined __ICC && 407 <= __GNUC__ * 100 + __GNUC_MINOR__ /* Suppress an incorrect diagnostic about yylval being uninitialized. */ -# define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN \ +#if defined __GNUC__ && ! defined __ICC && 406 <= __GNUC__ * 100 + __GNUC_MINOR__ +# if __GNUC__ * 100 + __GNUC_MINOR__ < 407 +# define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN \ + _Pragma ("GCC diagnostic push") \ + _Pragma ("GCC diagnostic ignored \"-Wuninitialized\"") +# else +# define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN \ _Pragma ("GCC diagnostic push") \ _Pragma ("GCC diagnostic ignored \"-Wuninitialized\"") \ _Pragma ("GCC diagnostic ignored \"-Wmaybe-uninitialized\"") +# endif # define YY_IGNORE_MAYBE_UNINITIALIZED_END \ _Pragma ("GCC diagnostic pop") #else @@ -1033,21 +1061,21 @@ union yyalloc #endif /* !YYCOPY_NEEDED */ /* YYFINAL -- State number of the termination state. */ -#define YYFINAL 443 +#define YYFINAL 452 /* YYLAST -- Last index in YYTABLE. */ -#define YYLAST 12469 +#define YYLAST 12701 /* YYNTOKENS -- Number of terminals. */ -#define YYNTOKENS 456 +#define YYNTOKENS 465 /* YYNNTS -- Number of nonterminals. */ -#define YYNNTS 131 +#define YYNNTS 132 /* YYNRULES -- Number of rules. */ -#define YYNRULES 684 +#define YYNRULES 700 /* YYNSTATES -- Number of states. */ -#define YYNSTATES 930 +#define YYNSTATES 946 /* YYMAXUTOK -- Last valid token kind. */ -#define YYMAXUTOK 710 +#define YYMAXUTOK 719 /* YYTRANSLATE(TOKEN-NUM) -- Symbol number corresponding to TOKEN-NUM @@ -1132,82 +1160,84 @@ static const yytype_int16 yytranslate[] = 425, 426, 427, 428, 429, 430, 431, 432, 433, 434, 435, 436, 437, 438, 439, 440, 441, 442, 443, 444, 445, 446, 447, 448, 449, 450, 451, 452, 453, 454, - 455 + 455, 456, 457, 458, 459, 460, 461, 462, 463, 464 }; #if YYDEBUG - /* YYRLINE[YYN] -- Source line where rule number YYN was defined. */ +/* YYRLINE[YYN] -- Source line where rule number YYN was defined. */ static const yytype_int16 yyrline[] = { - 0, 392, 392, 398, 401, 406, 409, 412, 416, 420, - 423, 427, 431, 435, 439, 443, 447, 453, 461, 464, - 467, 470, 473, 478, 486, 493, 500, 506, 510, 517, - 520, 526, 533, 543, 551, 556, 584, 593, 599, 603, - 607, 627, 628, 629, 630, 636, 637, 642, 647, 656, - 657, 662, 670, 671, 677, 686, 687, 692, 697, 702, - 710, 711, 720, 732, 733, 742, 743, 752, 753, 762, - 763, 771, 772, 780, 781, 789, 790, 790, 808, 809, - 825, 829, 833, 837, 842, 846, 850, 854, 858, 862, - 866, 873, 876, 887, 894, 900, 907, 913, 918, 925, - 929, 933, 937, 942, 947, 956, 956, 967, 971, 978, - 982, 988, 994, 1004, 1007, 1014, 1022, 1042, 1065, 1080, - 1105, 1116, 1126, 1136, 1146, 1155, 1158, 1162, 1166, 1171, - 1179, 1186, 1191, 1196, 1201, 1210, 1220, 1247, 1256, 1263, - 1271, 1278, 1285, 1293, 1301, 1311, 1318, 1329, 1335, 1338, - 1345, 1349, 1353, 1362, 1372, 1375, 1386, 1389, 1392, 1396, - 1400, 1405, 1409, 1412, 1417, 1421, 1426, 1435, 1439, 1444, - 1450, 1456, 1463, 1468, 1476, 1482, 1494, 1508, 1514, 1519, - 1527, 1535, 1543, 1551, 1559, 1567, 1575, 1583, 1590, 1597, - 1601, 1606, 1611, 1616, 1621, 1626, 1631, 1635, 1639, 1643, - 1647, 1653, 1664, 1671, 1674, 1683, 1688, 1698, 1703, 1711, - 1715, 1725, 1728, 1734, 1740, 1747, 1757, 1761, 1765, 1769, - 1774, 1778, 1783, 1788, 1793, 1798, 1803, 1808, 1813, 1818, - 1823, 1829, 1835, 1841, 1846, 1851, 1856, 1861, 1866, 1871, - 1876, 1881, 1886, 1891, 1896, 1902, 1909, 1914, 1919, 1924, - 1929, 1934, 1939, 1944, 1949, 1954, 1959, 1964, 1972, 1980, - 1988, 1994, 2000, 2006, 2012, 2018, 2024, 2030, 2036, 2042, - 2048, 2054, 2060, 2066, 2072, 2078, 2084, 2090, 2096, 2102, - 2108, 2114, 2120, 2126, 2132, 2138, 2144, 2150, 2156, 2162, - 2168, 2174, 2180, 2186, 2194, 2202, 2210, 2218, 2226, 2234, - 2242, 2250, 2258, 2266, 2274, 2282, 2288, 2294, 2300, 2306, - 2312, 2318, 2324, 2330, 2336, 2342, 2348, 2354, 2360, 2366, - 2372, 2378, 2384, 2390, 2396, 2402, 2408, 2414, 2420, 2426, - 2432, 2438, 2444, 2450, 2456, 2462, 2468, 2474, 2480, 2486, - 2492, 2498, 2502, 2506, 2510, 2515, 2521, 2526, 2531, 2536, - 2541, 2546, 2551, 2557, 2562, 2567, 2572, 2577, 2582, 2588, - 2594, 2600, 2606, 2612, 2618, 2624, 2630, 2636, 2642, 2648, - 2654, 2660, 2666, 2671, 2676, 2681, 2686, 2691, 2696, 2702, - 2707, 2712, 2717, 2722, 2727, 2732, 2737, 2743, 2748, 2753, - 2758, 2763, 2768, 2773, 2778, 2783, 2788, 2793, 2798, 2803, - 2808, 2813, 2819, 2824, 2829, 2835, 2841, 2846, 2851, 2856, - 2862, 2867, 2872, 2877, 2883, 2888, 2893, 2898, 2904, 2909, - 2914, 2919, 2925, 2931, 2937, 2943, 2948, 2954, 2960, 2966, - 2971, 2976, 2981, 2986, 2991, 2997, 3002, 3007, 3012, 3018, - 3023, 3028, 3033, 3039, 3044, 3049, 3054, 3060, 3065, 3070, - 3075, 3081, 3086, 3091, 3096, 3102, 3107, 3112, 3117, 3123, - 3128, 3133, 3138, 3144, 3149, 3154, 3159, 3165, 3170, 3175, - 3180, 3186, 3191, 3196, 3201, 3207, 3212, 3217, 3222, 3228, - 3233, 3238, 3243, 3249, 3254, 3259, 3264, 3270, 3275, 3280, - 3285, 3291, 3296, 3301, 3306, 3311, 3316, 3321, 3326, 3331, - 3336, 3341, 3346, 3351, 3356, 3361, 3366, 3371, 3376, 3381, - 3386, 3391, 3396, 3401, 3406, 3411, 3417, 3423, 3429, 3435, - 3442, 3449, 3455, 3461, 3467, 3473, 3479, 3485, 3491, 3496, - 3501, 3517, 3522, 3527, 3535, 3535, 3546, 3546, 3556, 3559, - 3572, 3594, 3621, 3625, 3631, 3636, 3647, 3651, 3657, 3663, - 3674, 3677, 3684, 3688, 3689, 3695, 3696, 3697, 3698, 3699, - 3700, 3701, 3703, 3709, 3718, 3719, 3723, 3719, 3735, 3736, - 3740, 3740, 3747, 3747, 3761, 3764, 3772, 3780, 3791, 3792, - 3796, 3800, 3808, 3815, 3819, 3827, 3831, 3844, 3848, 3856, - 3856, 3876, 3879, 3885, 3897, 3909, 3913, 3921, 3921, 3936, - 3936, 3954, 3954, 3975, 3978, 3984, 3987, 3993, 3997, 4004, - 4009, 4014, 4021, 4024, 4028, 4033, 4037, 4047, 4051, 4060, - 4063, 4067, 4076, 4076, 4118, 4123, 4126, 4131, 4134, 4141, - 4144, 4149, 4152, 4157, 4160, 4165, 4168, 4173, 4177, 4182, - 4186, 4191, 4195, 4202, 4205, 4210, 4213, 4216, 4219, 4222, - 4227, 4236, 4247, 4252, 4260, 4264, 4269, 4273, 4278, 4282, - 4287, 4291, 4298, 4301, 4306, 4309, 4312, 4315, 4320, 4328, - 4338, 4342, 4347, 4351, 4356, 4360, 4367, 4370, 4375, 4380, - 4383, 4389, 4392, 4397, 4400 + 0, 362, 362, 368, 371, 376, 379, 382, 386, 389, + 392, 396, 400, 404, 408, 412, 416, 422, 429, 432, + 435, 438, 441, 446, 454, 461, 468, 474, 478, 485, + 488, 494, 501, 511, 519, 524, 551, 559, 565, 569, + 573, 593, 594, 595, 596, 602, 603, 608, 613, 622, + 623, 628, 636, 637, 643, 652, 653, 658, 663, 668, + 676, 677, 686, 698, 699, 708, 709, 718, 719, 728, + 729, 737, 738, 746, 747, 755, 756, 756, 774, 775, + 791, 795, 799, 803, 808, 812, 816, 820, 824, 828, + 832, 839, 842, 853, 860, 865, 872, 877, 882, 889, + 893, 897, 901, 906, 911, 920, 920, 931, 935, 942, + 947, 953, 959, 969, 972, 979, 987, 1007, 1030, 1045, + 1070, 1081, 1091, 1101, 1111, 1120, 1123, 1127, 1131, 1136, + 1144, 1149, 1154, 1159, 1164, 1173, 1183, 1210, 1219, 1226, + 1233, 1240, 1247, 1255, 1263, 1273, 1283, 1290, 1300, 1306, + 1309, 1316, 1320, 1324, 1332, 1341, 1344, 1355, 1358, 1361, + 1365, 1369, 1373, 1377, 1380, 1385, 1389, 1394, 1402, 1406, + 1411, 1417, 1423, 1430, 1435, 1440, 1448, 1453, 1465, 1479, + 1485, 1490, 1498, 1506, 1514, 1522, 1530, 1538, 1546, 1554, + 1562, 1569, 1576, 1580, 1585, 1590, 1595, 1600, 1605, 1610, + 1614, 1618, 1622, 1626, 1632, 1638, 1648, 1655, 1658, 1666, + 1673, 1684, 1689, 1697, 1701, 1711, 1714, 1720, 1726, 1731, + 1739, 1749, 1753, 1757, 1761, 1766, 1770, 1775, 1780, 1785, + 1790, 1795, 1800, 1805, 1810, 1815, 1821, 1827, 1833, 1838, + 1843, 1848, 1853, 1858, 1863, 1868, 1873, 1878, 1883, 1888, + 1893, 1900, 1905, 1910, 1915, 1920, 1925, 1930, 1935, 1940, + 1945, 1950, 1955, 1963, 1971, 1979, 1985, 1991, 1997, 2003, + 2009, 2015, 2021, 2027, 2033, 2039, 2045, 2051, 2057, 2063, + 2069, 2075, 2081, 2087, 2093, 2099, 2105, 2111, 2117, 2123, + 2129, 2135, 2141, 2147, 2153, 2159, 2165, 2171, 2177, 2185, + 2193, 2201, 2209, 2217, 2225, 2233, 2241, 2249, 2257, 2265, + 2273, 2279, 2285, 2291, 2297, 2303, 2309, 2315, 2321, 2327, + 2333, 2339, 2345, 2351, 2357, 2363, 2369, 2375, 2381, 2387, + 2393, 2399, 2405, 2411, 2417, 2423, 2429, 2435, 2441, 2447, + 2453, 2459, 2465, 2471, 2477, 2483, 2489, 2493, 2497, 2501, + 2506, 2511, 2516, 2521, 2526, 2531, 2536, 2541, 2546, 2551, + 2556, 2561, 2566, 2571, 2577, 2583, 2589, 2595, 2601, 2607, + 2613, 2619, 2625, 2631, 2637, 2643, 2649, 2654, 2659, 2664, + 2669, 2674, 2679, 2684, 2689, 2694, 2699, 2704, 2709, 2714, + 2719, 2724, 2729, 2734, 2739, 2744, 2749, 2754, 2759, 2764, + 2769, 2774, 2779, 2784, 2789, 2794, 2799, 2804, 2809, 2814, + 2820, 2826, 2831, 2836, 2841, 2847, 2852, 2857, 2862, 2868, + 2873, 2878, 2883, 2889, 2894, 2899, 2904, 2910, 2916, 2922, + 2928, 2933, 2939, 2945, 2951, 2956, 2961, 2966, 2971, 2976, + 2982, 2987, 2992, 2997, 3003, 3008, 3013, 3018, 3024, 3029, + 3034, 3039, 3045, 3050, 3055, 3060, 3066, 3071, 3076, 3081, + 3087, 3092, 3097, 3102, 3108, 3113, 3118, 3123, 3129, 3134, + 3139, 3144, 3150, 3155, 3160, 3165, 3171, 3176, 3181, 3186, + 3192, 3197, 3202, 3207, 3213, 3218, 3223, 3228, 3234, 3239, + 3244, 3249, 3255, 3260, 3265, 3270, 3276, 3281, 3286, 3291, + 3296, 3301, 3306, 3311, 3316, 3321, 3326, 3331, 3336, 3341, + 3346, 3351, 3356, 3361, 3366, 3371, 3376, 3381, 3386, 3391, + 3396, 3402, 3408, 3414, 3420, 3426, 3432, 3438, 3445, 3452, + 3458, 3464, 3470, 3476, 3483, 3490, 3497, 3504, 3508, 3512, + 3517, 3533, 3538, 3543, 3551, 3551, 3562, 3562, 3572, 3575, + 3588, 3610, 3637, 3641, 3647, 3652, 3663, 3666, 3672, 3678, + 3687, 3690, 3696, 3700, 3701, 3707, 3708, 3709, 3710, 3711, + 3712, 3713, 3714, 3718, 3726, 3727, 3731, 3727, 3743, 3744, + 3748, 3748, 3755, 3755, 3769, 3772, 3780, 3788, 3799, 3800, + 3804, 3807, 3814, 3821, 3825, 3833, 3837, 3850, 3853, 3860, + 3860, 3880, 3883, 3889, 3901, 3913, 3916, 3923, 3923, 3938, + 3938, 3956, 3956, 3977, 3980, 3986, 3989, 3995, 3999, 4006, + 4011, 4016, 4023, 4026, 4030, 4034, 4038, 4047, 4051, 4060, + 4063, 4066, 4074, 4074, 4116, 4121, 4124, 4129, 4132, 4137, + 4140, 4145, 4148, 4153, 4156, 4161, 4164, 4169, 4173, 4178, + 4182, 4187, 4191, 4198, 4201, 4206, 4209, 4212, 4215, 4218, + 4223, 4232, 4243, 4248, 4256, 4260, 4265, 4269, 4274, 4278, + 4283, 4287, 4294, 4297, 4302, 4305, 4308, 4311, 4316, 4319, + 4324, 4330, 4333, 4336, 4339, 4344, 4348, 4353, 4357, 4362, + 4366, 4373, 4376, 4381, 4384, 4389, 4392, 4398, 4401, 4406, + 4409 }; #endif @@ -1252,16 +1282,17 @@ static const char *const yytname[] = "F32MAT4X2", "F32MAT4X3", "F32MAT4X4", "F64MAT2X2", "F64MAT2X3", "F64MAT2X4", "F64MAT3X2", "F64MAT3X3", "F64MAT3X4", "F64MAT4X2", "F64MAT4X3", "F64MAT4X4", "ATOMIC_UINT", "ACCSTRUCTNV", "ACCSTRUCTEXT", - "RAYQUERYEXT", "FCOOPMATNV", "ICOOPMATNV", "UCOOPMATNV", - "SAMPLERCUBEARRAY", "SAMPLERCUBEARRAYSHADOW", "ISAMPLERCUBEARRAY", - "USAMPLERCUBEARRAY", "SAMPLER1D", "SAMPLER1DARRAY", - "SAMPLER1DARRAYSHADOW", "ISAMPLER1D", "SAMPLER1DSHADOW", "SAMPLER2DRECT", - "SAMPLER2DRECTSHADOW", "ISAMPLER2DRECT", "USAMPLER2DRECT", - "SAMPLERBUFFER", "ISAMPLERBUFFER", "USAMPLERBUFFER", "SAMPLER2DMS", - "ISAMPLER2DMS", "USAMPLER2DMS", "SAMPLER2DMSARRAY", "ISAMPLER2DMSARRAY", - "USAMPLER2DMSARRAY", "SAMPLEREXTERNALOES", "SAMPLEREXTERNAL2DY2YEXT", - "ISAMPLER1DARRAY", "USAMPLER1D", "USAMPLER1DARRAY", "F16SAMPLER1D", - "F16SAMPLER2D", "F16SAMPLER3D", "F16SAMPLER2DRECT", "F16SAMPLERCUBE", + "RAYQUERYEXT", "FCOOPMATNV", "ICOOPMATNV", "UCOOPMATNV", "COOPMAT", + "HITOBJECTNV", "HITOBJECTATTRNV", "SAMPLERCUBEARRAY", + "SAMPLERCUBEARRAYSHADOW", "ISAMPLERCUBEARRAY", "USAMPLERCUBEARRAY", + "SAMPLER1D", "SAMPLER1DARRAY", "SAMPLER1DARRAYSHADOW", "ISAMPLER1D", + "SAMPLER1DSHADOW", "SAMPLER2DRECT", "SAMPLER2DRECTSHADOW", + "ISAMPLER2DRECT", "USAMPLER2DRECT", "SAMPLERBUFFER", "ISAMPLERBUFFER", + "USAMPLERBUFFER", "SAMPLER2DMS", "ISAMPLER2DMS", "USAMPLER2DMS", + "SAMPLER2DMSARRAY", "ISAMPLER2DMSARRAY", "USAMPLER2DMSARRAY", + "SAMPLEREXTERNALOES", "SAMPLEREXTERNAL2DY2YEXT", "ISAMPLER1DARRAY", + "USAMPLER1D", "USAMPLER1DARRAY", "F16SAMPLER1D", "F16SAMPLER2D", + "F16SAMPLER3D", "F16SAMPLER2DRECT", "F16SAMPLERCUBE", "F16SAMPLER1DARRAY", "F16SAMPLER2DARRAY", "F16SAMPLERCUBEARRAY", "F16SAMPLERBUFFER", "F16SAMPLER2DMS", "F16SAMPLER2DMSARRAY", "F16SAMPLER1DSHADOW", "F16SAMPLER2DSHADOW", "F16SAMPLER1DARRAYSHADOW", @@ -1297,34 +1328,36 @@ static const char *const yytname[] = "F16SUBPASSINPUTMS", "SPIRV_INSTRUCTION", "SPIRV_EXECUTION_MODE", "SPIRV_EXECUTION_MODE_ID", "SPIRV_DECORATE", "SPIRV_DECORATE_ID", "SPIRV_DECORATE_STRING", "SPIRV_TYPE", "SPIRV_STORAGE_CLASS", - "SPIRV_BY_REFERENCE", "SPIRV_LITERAL", "LEFT_OP", "RIGHT_OP", "INC_OP", - "DEC_OP", "LE_OP", "GE_OP", "EQ_OP", "NE_OP", "AND_OP", "OR_OP", - "XOR_OP", "MUL_ASSIGN", "DIV_ASSIGN", "ADD_ASSIGN", "MOD_ASSIGN", - "LEFT_ASSIGN", "RIGHT_ASSIGN", "AND_ASSIGN", "XOR_ASSIGN", "OR_ASSIGN", - "SUB_ASSIGN", "STRING_LITERAL", "LEFT_PAREN", "RIGHT_PAREN", - "LEFT_BRACKET", "RIGHT_BRACKET", "LEFT_BRACE", "RIGHT_BRACE", "DOT", - "COMMA", "COLON", "EQUAL", "SEMICOLON", "BANG", "DASH", "TILDE", "PLUS", - "STAR", "SLASH", "PERCENT", "LEFT_ANGLE", "RIGHT_ANGLE", "VERTICAL_BAR", - "CARET", "AMPERSAND", "QUESTION", "INVARIANT", "HIGH_PRECISION", - "MEDIUM_PRECISION", "LOW_PRECISION", "PRECISION", "PACKED", "RESOURCE", - "SUPERP", "FLOATCONSTANT", "INTCONSTANT", "UINTCONSTANT", "BOOLCONSTANT", + "SPIRV_BY_REFERENCE", "SPIRV_LITERAL", "ATTACHMENTEXT", "IATTACHMENTEXT", + "UATTACHMENTEXT", "LEFT_OP", "RIGHT_OP", "INC_OP", "DEC_OP", "LE_OP", + "GE_OP", "EQ_OP", "NE_OP", "AND_OP", "OR_OP", "XOR_OP", "MUL_ASSIGN", + "DIV_ASSIGN", "ADD_ASSIGN", "MOD_ASSIGN", "LEFT_ASSIGN", "RIGHT_ASSIGN", + "AND_ASSIGN", "XOR_ASSIGN", "OR_ASSIGN", "SUB_ASSIGN", "STRING_LITERAL", + "LEFT_PAREN", "RIGHT_PAREN", "LEFT_BRACKET", "RIGHT_BRACKET", + "LEFT_BRACE", "RIGHT_BRACE", "DOT", "COMMA", "COLON", "EQUAL", + "SEMICOLON", "BANG", "DASH", "TILDE", "PLUS", "STAR", "SLASH", "PERCENT", + "LEFT_ANGLE", "RIGHT_ANGLE", "VERTICAL_BAR", "CARET", "AMPERSAND", + "QUESTION", "INVARIANT", "HIGH_PRECISION", "MEDIUM_PRECISION", + "LOW_PRECISION", "PRECISION", "PACKED", "RESOURCE", "SUPERP", + "FLOATCONSTANT", "INTCONSTANT", "UINTCONSTANT", "BOOLCONSTANT", "IDENTIFIER", "TYPE_NAME", "CENTROID", "IN", "OUT", "INOUT", "STRUCT", "VOID", "WHILE", "BREAK", "CONTINUE", "DO", "ELSE", "FOR", "IF", "DISCARD", "RETURN", "SWITCH", "CASE", "DEFAULT", "TERMINATE_INVOCATION", "TERMINATE_RAY", "IGNORE_INTERSECTION", "UNIFORM", "SHARED", "BUFFER", - "FLAT", "SMOOTH", "LAYOUT", "DOUBLECONSTANT", "INT16CONSTANT", - "UINT16CONSTANT", "FLOAT16CONSTANT", "INT32CONSTANT", "UINT32CONSTANT", - "INT64CONSTANT", "UINT64CONSTANT", "SUBROUTINE", "DEMOTE", "PAYLOADNV", - "PAYLOADINNV", "HITATTRNV", "CALLDATANV", "CALLDATAINNV", "PAYLOADEXT", - "PAYLOADINEXT", "HITATTREXT", "CALLDATAEXT", "CALLDATAINEXT", "PATCH", - "SAMPLE", "NONUNIFORM", "COHERENT", "VOLATILE", "RESTRICT", "READONLY", - "WRITEONLY", "DEVICECOHERENT", "QUEUEFAMILYCOHERENT", - "WORKGROUPCOHERENT", "SUBGROUPCOHERENT", "NONPRIVATE", - "SHADERCALLCOHERENT", "NOPERSPECTIVE", "EXPLICITINTERPAMD", - "PERVERTEXEXT", "PERVERTEXNV", "PERPRIMITIVENV", "PERVIEWNV", - "PERTASKNV", "PRECISE", "$accept", "variable_identifier", - "primary_expression", "postfix_expression", "integer_expression", - "function_call", "function_call_or_method", "function_call_generic", + "TILEIMAGEEXT", "FLAT", "SMOOTH", "LAYOUT", "DOUBLECONSTANT", + "INT16CONSTANT", "UINT16CONSTANT", "FLOAT16CONSTANT", "INT32CONSTANT", + "UINT32CONSTANT", "INT64CONSTANT", "UINT64CONSTANT", "SUBROUTINE", + "DEMOTE", "PAYLOADNV", "PAYLOADINNV", "HITATTRNV", "CALLDATANV", + "CALLDATAINNV", "PAYLOADEXT", "PAYLOADINEXT", "HITATTREXT", + "CALLDATAEXT", "CALLDATAINEXT", "PATCH", "SAMPLE", "NONUNIFORM", + "COHERENT", "VOLATILE", "RESTRICT", "READONLY", "WRITEONLY", + "DEVICECOHERENT", "QUEUEFAMILYCOHERENT", "WORKGROUPCOHERENT", + "SUBGROUPCOHERENT", "NONPRIVATE", "SHADERCALLCOHERENT", "NOPERSPECTIVE", + "EXPLICITINTERPAMD", "PERVERTEXEXT", "PERVERTEXNV", "PERPRIMITIVENV", + "PERVIEWNV", "PERTASKNV", "PERPRIMITIVEEXT", "TASKPAYLOADWORKGROUPEXT", + "PRECISE", "$accept", "variable_identifier", "primary_expression", + "postfix_expression", "integer_expression", "function_call", + "function_call_or_method", "function_call_generic", "function_call_header_no_parameters", "function_call_header_with_parameters", "function_call_header", "function_identifier", "unary_expression", "unary_operator", @@ -1367,7 +1400,7 @@ static const char *const yytname[] = "spirv_execution_mode_id_parameter_list", "spirv_storage_class_qualifier", "spirv_decorate_qualifier", "spirv_decorate_parameter_list", "spirv_decorate_parameter", - "spirv_decorate_id_parameter_list", + "spirv_decorate_id_parameter_list", "spirv_decorate_id_parameter", "spirv_decorate_string_parameter_list", "spirv_type_specifier", "spirv_type_parameter_list", "spirv_type_parameter", "spirv_instruction_qualifier", "spirv_instruction_qualifier_list", @@ -1381,542 +1414,358 @@ yysymbol_name (yysymbol_kind_t yysymbol) } #endif -#ifdef YYPRINT -/* YYTOKNUM[NUM] -- (External) token number corresponding to the - (internal) symbol number NUM (which must be that of a token). */ -static const yytype_int16 yytoknum[] = -{ - 0, 256, 257, 258, 259, 260, 261, 262, 263, 264, - 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, - 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, - 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, - 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, - 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, - 315, 316, 317, 318, 319, 320, 321, 322, 323, 324, - 325, 326, 327, 328, 329, 330, 331, 332, 333, 334, - 335, 336, 337, 338, 339, 340, 341, 342, 343, 344, - 345, 346, 347, 348, 349, 350, 351, 352, 353, 354, - 355, 356, 357, 358, 359, 360, 361, 362, 363, 364, - 365, 366, 367, 368, 369, 370, 371, 372, 373, 374, - 375, 376, 377, 378, 379, 380, 381, 382, 383, 384, - 385, 386, 387, 388, 389, 390, 391, 392, 393, 394, - 395, 396, 397, 398, 399, 400, 401, 402, 403, 404, - 405, 406, 407, 408, 409, 410, 411, 412, 413, 414, - 415, 416, 417, 418, 419, 420, 421, 422, 423, 424, - 425, 426, 427, 428, 429, 430, 431, 432, 433, 434, - 435, 436, 437, 438, 439, 440, 441, 442, 443, 444, - 445, 446, 447, 448, 449, 450, 451, 452, 453, 454, - 455, 456, 457, 458, 459, 460, 461, 462, 463, 464, - 465, 466, 467, 468, 469, 470, 471, 472, 473, 474, - 475, 476, 477, 478, 479, 480, 481, 482, 483, 484, - 485, 486, 487, 488, 489, 490, 491, 492, 493, 494, - 495, 496, 497, 498, 499, 500, 501, 502, 503, 504, - 505, 506, 507, 508, 509, 510, 511, 512, 513, 514, - 515, 516, 517, 518, 519, 520, 521, 522, 523, 524, - 525, 526, 527, 528, 529, 530, 531, 532, 533, 534, - 535, 536, 537, 538, 539, 540, 541, 542, 543, 544, - 545, 546, 547, 548, 549, 550, 551, 552, 553, 554, - 555, 556, 557, 558, 559, 560, 561, 562, 563, 564, - 565, 566, 567, 568, 569, 570, 571, 572, 573, 574, - 575, 576, 577, 578, 579, 580, 581, 582, 583, 584, - 585, 586, 587, 588, 589, 590, 591, 592, 593, 594, - 595, 596, 597, 598, 599, 600, 601, 602, 603, 604, - 605, 606, 607, 608, 609, 610, 611, 612, 613, 614, - 615, 616, 617, 618, 619, 620, 621, 622, 623, 624, - 625, 626, 627, 628, 629, 630, 631, 632, 633, 634, - 635, 636, 637, 638, 639, 640, 641, 642, 643, 644, - 645, 646, 647, 648, 649, 650, 651, 652, 653, 654, - 655, 656, 657, 658, 659, 660, 661, 662, 663, 664, - 665, 666, 667, 668, 669, 670, 671, 672, 673, 674, - 675, 676, 677, 678, 679, 680, 681, 682, 683, 684, - 685, 686, 687, 688, 689, 690, 691, 692, 693, 694, - 695, 696, 697, 698, 699, 700, 701, 702, 703, 704, - 705, 706, 707, 708, 709, 710 -}; -#endif - -#define YYPACT_NINF (-865) +#define YYPACT_NINF (-872) #define yypact_value_is_default(Yyn) \ ((Yyn) == YYPACT_NINF) -#define YYTABLE_NINF (-571) +#define YYTABLE_NINF (-695) #define yytable_value_is_error(Yyn) \ 0 - /* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing - STATE-NUM. */ +/* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing + STATE-NUM. */ static const yytype_int16 yypact[] = { - 4557, -865, -865, -865, -865, -865, -865, -865, -865, -865, - -865, -865, -865, -865, -865, -865, -865, -865, -865, -865, - -865, -865, -865, -865, -865, -865, -865, -865, -865, -865, - -865, -865, -865, -865, -865, -865, -865, -865, -865, -865, - -865, -865, -865, -865, -865, -865, -865, -865, -865, -865, - -865, -865, -865, -865, -865, -865, -865, -865, -865, -865, - -865, -865, -865, -865, -865, -865, -865, -865, -865, -865, - -865, -865, -865, -865, -865, -865, -865, -865, -865, -865, - -865, -865, -865, -865, -865, -865, -865, -865, -865, -865, - -865, -865, -865, -865, -865, -865, -865, -865, -865, -865, - -865, -865, -865, -865, -865, -865, -865, -865, -865, -865, - -865, -865, -865, -865, -865, -865, -865, -865, -865, -865, - -865, -865, -865, -865, -865, -865, -865, -865, -865, -865, - -865, -865, -865, -865, -865, -865, -865, -865, -865, -865, - -865, -865, -865, -865, -865, -865, -865, -865, -865, -865, - -865, -865, -865, -865, -865, -865, -865, -865, -865, -865, - -865, -865, -865, -865, -865, -865, -865, -865, -865, -865, - -865, -865, -865, -865, -865, -865, -865, -865, -865, -865, - -865, -865, -865, -865, -865, -865, -865, -865, -865, -865, - -865, -865, -865, -865, -865, -865, -865, -865, -865, -865, - -865, -865, -865, -865, -865, -865, -865, -865, -865, -865, - -865, -865, -865, -865, -865, -865, -865, -865, -865, -865, - -865, -865, -865, -865, -865, -865, -865, -865, -865, -865, - -865, -865, -865, -865, -865, -865, -865, -865, -865, -865, - -865, -865, -865, -865, -865, -865, -865, -865, -865, -865, - -865, -865, -865, -865, -865, -865, -865, -865, -865, -865, - -865, -865, -865, -865, -865, -865, -865, -865, -865, -865, - -865, -865, -865, -865, -865, -865, -865, -865, -865, -865, - -865, -865, -865, -865, -865, -865, -865, -865, -865, -865, - -865, -865, -865, -865, -865, -865, -865, -865, -865, -865, - -865, -865, -865, -865, -865, -865, -865, -865, -865, -865, - -865, -865, -865, -865, -865, -306, -260, -237, -110, -102, - -100, -83, -77, -865, -865, -301, -865, -865, -865, -865, - -865, -106, -865, -865, -865, -865, -865, -309, -865, -865, - -865, -865, -865, -865, -66, -54, -865, -865, -865, -865, - -865, -865, -865, -865, -865, -865, -865, -865, -865, -865, - -865, -865, -865, -865, -865, -865, -865, -865, -865, -865, - -865, -865, -865, -865, -865, -865, -865, -865, -865, -328, - -116, -50, -55, 7728, -245, -865, -82, -865, -865, -865, - -865, 5463, -865, -865, -865, -865, -63, -865, -865, 933, - -865, -865, 7728, -57, -865, -865, -865, 5916, -80, -334, - -251, -157, -149, -141, -80, -140, -78, 12077, -865, -47, - -351, -76, -865, -269, -865, -45, -41, 7728, -865, -865, - -865, 7728, -74, -73, -865, -263, -865, -224, -865, -865, - 10778, -38, -865, -865, -865, -36, -69, 7728, -865, -42, - -40, -37, -865, -271, -865, -256, -33, -34, -30, -28, - -202, -27, -24, -23, -22, -21, -17, -199, -10, -15, - -29, -303, -865, -14, 7728, -865, -11, -865, -195, -865, - -865, -194, 9046, -865, -268, 1386, -865, -865, -865, -865, - -865, -38, -304, -865, 9479, -248, -865, -35, -865, -133, - 10778, 10778, -865, 10778, -865, -865, -865, -865, -865, -865, - -865, -865, -865, -865, -865, -865, -865, -865, -865, -865, - -865, -865, -865, -274, -865, -865, -865, -6, -187, 11211, - 3, -865, 10778, -865, -865, -297, -2, -41, 4, -865, - -310, -80, -865, -31, -865, -321, 6, -130, 10778, -129, - -865, -166, -128, 10778, -124, 7, -122, -80, -865, 11644, - -865, -120, 10778, 10, -78, -865, 7728, -26, 6369, -865, - 7728, 10778, -865, -351, -865, -20, -865, -865, -79, -217, - -200, -299, -56, -13, -9, -3, 21, 26, -307, 15, - 9912, -865, 14, -865, -865, 20, 12, 13, -865, 24, - 25, 16, 10345, 27, 10778, 23, 18, 19, 22, 28, - -222, -865, -865, -132, -865, -116, 33, 35, -865, -865, - -865, -865, -865, 1839, -865, -865, -865, -865, -865, -865, - -865, -865, -865, 5010, -2, 9479, -225, 8180, -865, -865, - 9479, 7728, -865, 8, -865, -865, -865, -184, -865, -865, - 10778, 29, -865, -865, 10778, 38, -865, -865, -865, 10778, - -865, -865, -865, -312, -865, -865, -183, 31, -865, -865, - -865, -865, -865, -865, -182, -865, -180, -865, -865, -179, - 34, -865, -865, -865, -865, -175, -865, -172, -865, -171, - 39, -865, -167, 40, -163, 31, -865, -160, -865, 44, - 48, -865, -865, -26, -38, -121, -865, -865, -865, 6822, - -865, -865, -865, 10778, 10778, 10778, 10778, 10778, 10778, 10778, - 10778, 10778, 10778, 10778, 10778, 10778, 10778, 10778, 10778, 10778, - 10778, 10778, -865, -865, -865, 53, -865, 2292, -865, -865, - -865, 2292, -865, 10778, -865, -865, -119, 10778, -198, -865, - -865, -865, -865, -865, -865, -865, -865, -865, -865, -865, - -865, -865, -865, -865, -865, 10778, 10778, -865, -865, -865, - -865, -865, -865, -865, 9479, -865, -865, -174, -865, 7275, - -865, -865, 61, 59, -865, -865, -865, -865, -865, -254, - -142, -865, -308, -865, -321, -865, -321, -865, 10778, 10778, - -865, -166, -865, -166, -865, 10778, 10778, -865, 37, 7, - -865, 11644, -865, 10778, -865, -865, -92, -2, -26, -865, - -865, -865, -865, -865, -79, -79, -217, -217, -200, -200, - -200, -200, -299, -299, -56, -13, -9, -3, 21, 26, - 10778, -865, 2292, 4104, 30, 3651, -159, -865, -158, -865, - -865, -865, -865, -865, 8613, -865, -865, -865, 71, -865, - -12, -865, -156, -865, -155, -865, -148, -865, -147, -865, - -145, -144, -865, -865, -865, -65, 67, 59, 41, 72, - 75, -865, -865, 4104, 76, -865, -865, -865, -865, -865, - -865, -865, -865, -865, -865, -865, 10778, -865, 74, 2745, - 10778, -865, 66, 80, 36, 81, 3198, -865, 82, -865, - 9479, -865, -865, -865, -143, 10778, 2745, 76, -865, -865, - 2292, -865, 78, 59, -865, -865, 2292, 84, -865, -865 + 4648, -872, -872, -872, -872, -872, -872, -872, -872, -872, + -872, -872, -872, -872, -872, -872, -872, -872, -872, -872, + -872, -872, -872, -872, -872, -872, -872, -872, -872, -872, + -872, -872, -872, -872, -872, -872, -872, -872, -872, -872, + -872, -872, -872, -872, -872, -872, -872, -872, -872, -872, + -872, -872, -872, -872, -872, -872, -872, -872, -872, -872, + -872, -872, -872, -872, -872, -872, -872, -872, -872, -872, + -872, -872, -872, -872, -872, -872, -872, -872, -872, -872, + -872, -872, -872, -872, -872, -872, -872, -872, -872, -872, + -872, -872, -872, -872, -872, -872, -872, -872, -872, -872, + -872, -872, -872, -872, -872, -872, -872, -872, -872, -872, + -872, -872, -872, -872, -872, -872, -872, -872, -872, -872, + -872, -872, -872, -872, -872, -872, -872, -872, -872, -872, + -872, -872, -872, -872, -872, -872, -872, -872, -872, -872, + -872, -872, -872, -872, -872, -872, -872, -872, -872, -872, + -872, -872, -872, -872, -872, -872, -872, -872, -872, -872, + -872, -872, -872, -872, -872, -872, -872, -872, -872, -872, + -872, -872, -872, -872, -872, -872, -872, -872, -872, -872, + -872, -872, -872, -872, -872, -872, -872, -872, -872, -872, + -872, -872, -872, -872, -872, -872, -872, -872, -872, -872, + -872, -872, -872, -872, -872, -872, -872, -872, -872, -872, + -872, -872, -872, -872, -872, -872, -872, -872, -872, -872, + -872, -872, -872, -872, -872, -872, -872, -872, -872, -872, + -872, -872, -872, -872, -872, -872, -872, -872, -872, -872, + -872, -872, -872, -872, -872, -872, -872, -872, -872, -872, + -872, -872, -872, -872, -872, -872, -872, -872, -872, -872, + -872, -872, -872, -872, -872, -872, -872, -872, -872, -872, + -872, -872, -872, -872, -872, -872, -872, -872, -872, -872, + -872, -872, -872, -872, -872, -872, -872, -872, -872, -872, + -872, -872, -872, -872, -872, -872, -872, -872, -872, -872, + -872, -872, -872, -872, -872, -872, -872, -872, -872, -872, + -872, -872, -872, -872, -872, -872, -872, -872, -305, -301, + -289, -276, -246, -238, -227, -182, -872, -872, -872, -872, + -872, -168, -872, -872, -872, -872, -872, -55, -872, -872, + -872, -872, -872, -319, -872, -872, -872, -872, -872, -872, + -872, -135, -120, -872, -872, -872, -872, -872, -872, -872, + -872, -872, -872, -872, -872, -872, -872, -872, -872, -872, + -872, -872, -872, -872, -872, -872, -872, -872, -872, -872, + -872, -872, -872, -872, -872, -872, -872, -872, -327, -114, + -81, -124, 7882, -313, -872, -101, -872, -872, -872, -872, + 5572, -872, -872, -872, -872, -94, -872, -872, 952, -872, + -872, 7882, -73, -872, -872, -872, 6034, -78, -252, -250, + -216, -197, -136, -78, -127, -49, 12303, -872, -13, -346, + -39, -872, -309, -872, -10, -9, 7882, -872, -872, -872, + 7882, -38, -37, -872, -267, -872, -236, -872, -872, 10983, + -2, -872, -872, -872, 3, -35, 7882, -872, -8, -6, + -1, -872, -256, -872, -255, -4, 4, 7, 8, -237, + 10, 11, 13, 14, 15, 18, -232, 9, 19, 27, + -188, -872, -3, 7882, -872, 20, -872, -229, -872, -872, + -219, 9223, -872, -272, 1414, -872, -872, -872, -872, -872, + -2, -277, -872, 9663, -265, -872, -23, -872, -112, 10983, + 10983, -872, 10983, -872, -872, -872, -872, -872, -872, -872, + -872, -872, -872, -872, -872, -872, -872, -872, -872, -872, + -872, -872, -253, -872, -872, -872, 29, -204, 11423, 28, + -872, 10983, -872, 31, -321, 17, -9, 32, -872, -325, + -78, -872, 5, -872, -330, 33, -125, 10983, -123, -872, + -130, -119, -146, -118, 34, -103, -78, -872, 11863, -872, + -74, 10983, 36, -49, -872, 7882, 24, 6496, -872, 7882, + 10983, -872, -346, -872, 30, -872, -872, -33, -133, -105, + -303, -11, -14, 21, 23, 48, 52, -316, 41, -872, + 10103, -872, 42, -872, -872, 46, 38, 40, -872, 64, + 67, 60, 10543, 74, 10983, 68, 65, 69, 70, 73, + -167, -872, -872, -47, -872, -114, 77, 31, -872, -872, + -872, -872, -872, 1876, -872, -872, -872, -872, -872, -872, + -872, -872, -872, 5110, 17, 9663, -261, 8343, -872, -872, + 9663, 7882, -872, 50, -872, -872, -872, -203, -872, -872, + 10983, 51, -872, -872, 10983, 87, -872, -872, -872, 10983, + -872, -872, -872, -312, -872, -872, -200, 80, -872, -872, + -872, -872, -872, -872, -199, -872, -196, -872, -872, -195, + 71, -872, -872, -872, -872, -169, -872, -164, -872, -872, + -872, -872, -872, -161, -872, 83, -872, -160, 84, -153, + 80, -872, -278, -152, -872, 91, 94, -872, -872, 24, + -2, -43, -872, -872, -872, 6958, -872, -872, -872, 10983, + 10983, 10983, 10983, 10983, 10983, 10983, 10983, 10983, 10983, 10983, + 10983, 10983, 10983, 10983, 10983, 10983, 10983, 10983, -872, -872, + -872, 93, -872, 2338, -872, -872, -872, 2338, -872, 10983, + -872, -872, -42, 10983, -32, -872, -872, -872, -872, -872, + -872, -872, -872, -872, -872, -872, -872, -872, -872, -872, + -872, 10983, 10983, -872, -872, -872, -872, -872, -872, -872, + 9663, -872, -872, -76, -872, 7420, -872, -872, 96, 95, + -872, -872, -872, -872, -872, -132, -131, -872, -311, -872, + -330, -872, -330, -872, 10983, 10983, -872, -130, -872, -130, + -872, -146, -146, -872, 101, 34, -872, 11863, -872, 10983, + -872, -872, -41, 17, 24, -872, -872, -872, -872, -872, + -33, -33, -133, -133, -105, -105, -105, -105, -303, -303, + -11, -14, 21, 23, 48, 52, 10983, -872, 2338, 4186, + 59, 3724, -151, -872, -150, -872, -872, -872, -872, -872, + 8783, -872, -872, -872, 105, -872, 72, -872, -149, -872, + -148, -872, -141, -872, -140, -872, -139, -138, -872, -872, + -872, -28, 102, 95, 75, 107, 106, -872, -872, 4186, + 108, -872, -872, -872, -872, -872, -872, -872, -872, -872, + -872, -872, 10983, -872, 100, 2800, 10983, -872, 104, 109, + 76, 112, 3262, -872, 113, -872, 9663, -872, -872, -872, + -137, 10983, 2800, 108, -872, -872, 2338, -872, 110, 95, + -872, -872, 2338, 114, -872, -872 }; - /* YYDEFACT[STATE-NUM] -- Default reduction number in state STATE-NUM. - Performed when YYTABLE does not specify something else to do. Zero - means the default is an error. */ +/* YYDEFACT[STATE-NUM] -- Default reduction number in state STATE-NUM. + Performed when YYTABLE does not specify something else to do. Zero + means the default is an error. */ static const yytype_int16 yydefact[] = { - 0, 167, 220, 218, 219, 217, 224, 225, 226, 227, - 228, 229, 230, 231, 232, 221, 222, 223, 233, 234, - 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, - 346, 347, 348, 349, 350, 351, 352, 372, 373, 374, - 375, 376, 377, 378, 387, 400, 401, 388, 389, 391, - 390, 392, 393, 394, 395, 396, 397, 398, 399, 175, - 176, 246, 247, 245, 248, 255, 256, 253, 254, 251, - 252, 249, 250, 278, 279, 280, 290, 291, 292, 275, - 276, 277, 287, 288, 289, 272, 273, 274, 284, 285, - 286, 269, 270, 271, 281, 282, 283, 257, 258, 259, - 293, 294, 295, 260, 261, 262, 305, 306, 307, 263, - 264, 265, 317, 318, 319, 266, 267, 268, 329, 330, - 331, 296, 297, 298, 299, 300, 301, 302, 303, 304, - 308, 309, 310, 311, 312, 313, 314, 315, 316, 320, - 321, 322, 323, 324, 325, 326, 327, 328, 332, 333, - 334, 335, 336, 337, 338, 339, 340, 344, 341, 342, - 343, 525, 526, 527, 356, 357, 380, 383, 345, 354, - 355, 371, 353, 402, 403, 406, 407, 408, 410, 411, - 412, 414, 415, 416, 418, 419, 515, 516, 379, 381, - 382, 358, 359, 360, 404, 361, 365, 366, 369, 409, - 413, 417, 362, 363, 367, 368, 405, 364, 370, 449, - 451, 452, 453, 455, 456, 457, 459, 460, 461, 463, - 464, 465, 467, 468, 469, 471, 472, 473, 475, 476, - 477, 479, 480, 481, 483, 484, 485, 487, 488, 489, - 491, 492, 450, 454, 458, 462, 466, 474, 478, 482, - 470, 486, 490, 493, 494, 495, 496, 497, 498, 499, - 500, 501, 502, 503, 504, 505, 506, 507, 508, 509, - 510, 511, 512, 513, 514, 384, 385, 386, 420, 429, - 431, 425, 430, 432, 433, 435, 436, 437, 439, 440, - 441, 443, 444, 445, 447, 448, 421, 422, 423, 434, - 424, 426, 427, 428, 438, 442, 446, 517, 518, 521, - 522, 523, 524, 519, 520, 0, 0, 0, 0, 0, - 0, 0, 0, 165, 166, 0, 621, 137, 531, 532, - 533, 0, 530, 171, 169, 170, 168, 0, 216, 172, - 173, 174, 139, 138, 0, 200, 181, 183, 179, 185, - 187, 182, 184, 180, 186, 188, 177, 178, 202, 189, - 196, 197, 198, 199, 190, 191, 192, 193, 194, 195, - 140, 141, 143, 142, 144, 145, 146, 153, 620, 0, - 622, 0, 114, 113, 0, 125, 130, 160, 159, 157, - 161, 0, 154, 156, 162, 135, 212, 158, 529, 0, - 617, 619, 0, 0, 163, 164, 528, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 536, 0, - 0, 0, 99, 0, 94, 0, 109, 0, 121, 115, - 123, 0, 124, 0, 97, 131, 102, 0, 155, 136, - 0, 205, 211, 1, 618, 0, 0, 0, 96, 0, - 0, 0, 629, 0, 681, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 627, 0, 625, 0, 0, 534, 150, 152, 0, 148, - 203, 0, 0, 100, 0, 0, 623, 110, 116, 120, - 122, 118, 126, 117, 0, 132, 105, 0, 103, 0, - 0, 0, 9, 0, 43, 42, 44, 41, 5, 6, - 7, 8, 2, 16, 14, 15, 17, 10, 11, 12, - 13, 3, 18, 37, 20, 25, 26, 0, 0, 30, - 0, 214, 0, 36, 34, 0, 206, 111, 0, 95, - 0, 0, 679, 0, 637, 0, 0, 0, 0, 0, - 654, 0, 0, 0, 0, 0, 0, 0, 674, 0, - 652, 0, 0, 0, 0, 98, 0, 0, 0, 538, - 0, 0, 147, 0, 201, 0, 207, 45, 49, 52, - 55, 60, 63, 65, 67, 69, 71, 73, 75, 0, - 0, 101, 565, 574, 578, 0, 0, 0, 599, 0, + 0, 168, 225, 223, 224, 222, 229, 230, 231, 232, + 233, 234, 235, 236, 237, 226, 227, 228, 238, 239, + 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, + 351, 352, 353, 354, 355, 356, 357, 377, 378, 379, + 380, 381, 382, 383, 392, 405, 406, 393, 394, 396, + 395, 397, 398, 399, 400, 401, 402, 403, 404, 177, + 178, 251, 252, 250, 253, 260, 261, 258, 259, 256, + 257, 254, 255, 283, 284, 285, 295, 296, 297, 280, + 281, 282, 292, 293, 294, 277, 278, 279, 289, 290, + 291, 274, 275, 276, 286, 287, 288, 262, 263, 264, + 298, 299, 300, 265, 266, 267, 310, 311, 312, 268, + 269, 270, 322, 323, 324, 271, 272, 273, 334, 335, + 336, 301, 302, 303, 304, 305, 306, 307, 308, 309, + 313, 314, 315, 316, 317, 318, 319, 320, 321, 325, + 326, 327, 328, 329, 330, 331, 332, 333, 337, 338, + 339, 340, 341, 342, 343, 344, 345, 349, 346, 347, + 348, 533, 534, 535, 536, 538, 182, 361, 362, 385, + 388, 350, 359, 360, 376, 358, 407, 408, 411, 412, + 413, 415, 416, 417, 419, 420, 421, 423, 424, 520, + 521, 384, 386, 387, 363, 364, 365, 409, 366, 370, + 371, 374, 414, 418, 422, 367, 368, 372, 373, 410, + 369, 375, 454, 456, 457, 458, 460, 461, 462, 464, + 465, 466, 468, 469, 470, 472, 473, 474, 476, 477, + 478, 480, 481, 482, 484, 485, 486, 488, 489, 490, + 492, 493, 494, 496, 497, 455, 459, 463, 467, 471, + 479, 483, 487, 475, 491, 495, 498, 499, 500, 501, + 502, 503, 504, 505, 506, 507, 508, 509, 510, 511, + 512, 513, 514, 515, 516, 517, 518, 519, 389, 390, + 391, 425, 434, 436, 430, 435, 437, 438, 440, 441, + 442, 444, 445, 446, 448, 449, 450, 452, 453, 426, + 427, 428, 439, 429, 431, 432, 433, 443, 447, 451, + 525, 526, 529, 530, 531, 532, 527, 528, 0, 0, + 0, 0, 0, 0, 0, 0, 166, 167, 522, 523, + 524, 0, 631, 137, 541, 542, 543, 0, 540, 172, + 170, 171, 169, 0, 221, 173, 175, 176, 174, 139, + 138, 0, 203, 184, 186, 181, 188, 190, 185, 187, + 183, 189, 191, 179, 180, 206, 192, 199, 200, 201, + 202, 193, 194, 195, 196, 197, 198, 140, 141, 143, + 142, 144, 146, 147, 145, 205, 154, 630, 0, 632, + 0, 114, 113, 0, 125, 130, 161, 160, 158, 162, + 0, 155, 157, 163, 135, 216, 159, 539, 0, 627, + 629, 0, 0, 164, 165, 537, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 546, 0, 0, + 0, 99, 0, 94, 0, 109, 0, 121, 115, 123, + 0, 124, 0, 97, 131, 102, 0, 156, 136, 0, + 209, 215, 1, 628, 0, 0, 0, 96, 0, 0, + 0, 639, 0, 697, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 637, + 0, 635, 0, 0, 544, 151, 153, 0, 149, 207, + 0, 0, 100, 0, 0, 633, 110, 116, 120, 122, + 118, 126, 117, 0, 132, 105, 0, 103, 0, 0, + 0, 9, 0, 43, 42, 44, 41, 5, 6, 7, + 8, 2, 16, 14, 15, 17, 10, 11, 12, 13, + 3, 18, 37, 20, 25, 26, 0, 0, 30, 0, + 219, 0, 36, 218, 0, 210, 111, 0, 95, 0, + 0, 695, 0, 647, 0, 0, 0, 0, 0, 664, + 0, 0, 0, 0, 0, 0, 0, 689, 0, 662, + 0, 0, 0, 0, 98, 0, 0, 0, 548, 0, + 0, 148, 0, 204, 0, 211, 45, 49, 52, 55, + 60, 63, 65, 67, 69, 71, 73, 75, 0, 34, + 0, 101, 575, 584, 588, 0, 0, 0, 609, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 45, 78, 91, 0, 552, 0, 162, 135, 555, 576, - 554, 562, 553, 0, 556, 557, 580, 558, 587, 559, - 560, 595, 561, 0, 119, 0, 127, 0, 546, 134, + 45, 78, 91, 0, 562, 0, 163, 135, 565, 586, + 564, 572, 563, 0, 566, 567, 590, 568, 597, 569, + 570, 605, 571, 0, 119, 0, 127, 0, 556, 134, 0, 0, 107, 0, 104, 38, 39, 0, 22, 23, - 0, 0, 28, 27, 0, 216, 31, 33, 40, 0, - 213, 112, 683, 0, 684, 630, 0, 0, 682, 649, - 645, 646, 647, 648, 0, 643, 0, 93, 650, 0, - 0, 664, 665, 666, 667, 0, 662, 0, 668, 0, - 0, 670, 0, 0, 0, 2, 678, 0, 676, 0, - 0, 624, 626, 0, 544, 0, 542, 537, 539, 0, - 151, 149, 204, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 28, 27, 0, 221, 31, 33, 40, 0, + 217, 112, 699, 0, 700, 640, 0, 0, 698, 659, + 655, 656, 657, 658, 0, 653, 0, 93, 660, 0, + 0, 674, 675, 676, 677, 0, 672, 0, 681, 682, + 683, 684, 680, 0, 678, 0, 685, 0, 0, 0, + 2, 693, 216, 0, 691, 0, 0, 634, 636, 0, + 554, 0, 552, 547, 549, 0, 152, 150, 208, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 76, 208, 209, 0, 564, 0, 597, 610, - 609, 0, 601, 0, 613, 611, 0, 0, 0, 594, - 614, 615, 616, 563, 81, 82, 84, 83, 86, 87, - 88, 89, 90, 85, 80, 0, 0, 579, 575, 577, - 581, 588, 596, 129, 0, 549, 550, 0, 133, 0, - 108, 4, 0, 24, 21, 32, 215, 633, 635, 0, - 0, 680, 0, 639, 0, 638, 0, 641, 0, 0, - 656, 0, 655, 0, 658, 0, 0, 660, 0, 0, - 675, 0, 672, 0, 653, 628, 0, 545, 0, 540, - 535, 46, 47, 48, 51, 50, 53, 54, 58, 59, - 56, 57, 61, 62, 64, 66, 68, 70, 72, 74, - 0, 210, 566, 0, 0, 0, 0, 612, 0, 593, - 79, 92, 128, 547, 0, 106, 19, 631, 0, 632, - 0, 644, 0, 651, 0, 663, 0, 669, 0, 671, - 0, 0, 677, 541, 543, 0, 0, 585, 0, 0, - 0, 604, 603, 606, 572, 589, 548, 551, 634, 636, - 640, 642, 657, 659, 661, 673, 0, 567, 0, 0, - 0, 605, 0, 0, 584, 0, 0, 582, 0, 77, - 0, 569, 598, 568, 0, 607, 0, 572, 571, 573, - 591, 586, 0, 608, 602, 583, 592, 0, 600, 590 + 0, 0, 0, 0, 0, 0, 0, 0, 76, 212, + 213, 0, 574, 0, 607, 620, 619, 0, 611, 0, + 623, 621, 0, 0, 0, 604, 624, 625, 626, 573, + 81, 82, 84, 83, 86, 87, 88, 89, 90, 85, + 80, 0, 0, 589, 585, 587, 591, 598, 606, 129, + 0, 559, 560, 0, 133, 0, 108, 4, 0, 24, + 21, 32, 220, 643, 645, 0, 0, 696, 0, 649, + 0, 648, 0, 651, 0, 0, 666, 0, 665, 0, + 668, 0, 0, 670, 0, 0, 690, 0, 687, 0, + 663, 638, 0, 555, 0, 550, 545, 46, 47, 48, + 51, 50, 53, 54, 58, 59, 56, 57, 61, 62, + 64, 66, 68, 70, 72, 74, 0, 214, 576, 0, + 0, 0, 0, 622, 0, 603, 79, 92, 128, 557, + 0, 106, 19, 641, 0, 642, 0, 654, 0, 661, + 0, 673, 0, 679, 0, 686, 0, 0, 692, 551, + 553, 0, 0, 595, 0, 0, 0, 614, 613, 616, + 582, 599, 558, 561, 644, 646, 650, 652, 667, 669, + 671, 688, 0, 577, 0, 0, 0, 615, 0, 0, + 594, 0, 0, 592, 0, 77, 0, 579, 608, 578, + 0, 617, 0, 582, 581, 583, 601, 596, 0, 618, + 612, 593, 602, 0, 610, 600 }; - /* YYPGOTO[NTERM-NUM]. */ +/* YYPGOTO[NTERM-NUM]. */ static const yytype_int16 yypgoto[] = { - -865, -865, -865, -865, -865, -865, -865, -865, -865, -865, - -865, -865, -211, -865, -423, -422, -501, -426, -287, -286, - -285, -284, -288, -282, -865, -475, -865, -490, -865, -497, - -525, 11, -865, -865, -865, 5, -385, -865, -865, 32, - 42, 45, -865, -865, -399, -865, -865, -865, -865, -127, - -865, -382, -367, -865, 9, -865, 0, -425, -865, -865, - -865, -865, 119, -865, -865, -865, -544, -549, -252, -366, - -622, -865, -391, -611, -864, -865, -452, -865, -865, -461, - -460, -865, -865, 43, -716, -387, -865, -173, -865, -424, - -865, -169, -865, -865, -865, -865, -168, -865, -865, -865, - -865, -865, -865, -865, -865, 63, -865, -865, 2, -865, - -98, -272, -448, -865, -865, -865, -329, -324, -327, -865, - -865, -332, -326, -333, -331, -865, -330, -336, -865, -392, - -529 + -872, -544, -872, -872, -872, -872, -872, -872, -872, -872, + -872, -872, -436, -872, -392, -391, -490, -390, -269, -266, + -268, -264, -262, -260, -872, -482, -872, -499, -872, -492, + -534, 6, -872, -872, -872, 1, -403, -872, -872, 45, + 44, 49, -872, -872, -406, -872, -872, -872, -872, -104, + -872, -389, -375, -872, 12, -872, 0, -433, -872, -872, + -872, -553, 145, -872, -872, -872, -560, -556, -233, -344, + -614, -872, -373, -626, -871, -872, -430, -872, -872, -440, + -437, -872, -872, 63, -737, -363, -872, -144, -872, -399, + -872, -142, -872, -872, -872, -872, -134, -872, -872, -872, + -872, -872, -872, -872, -872, 97, -872, -872, 2, -872, + -71, -308, -416, -872, -872, -872, -304, -307, -302, -872, + -872, -315, -310, -306, -300, -314, -872, -299, -317, -872, + -395, -538 }; - /* YYDEFGOTO[NTERM-NUM]. */ +/* YYDEFGOTO[NTERM-NUM]. */ static const yytype_int16 yydefgoto[] = { - -1, 521, 522, 523, 782, 524, 525, 526, 527, 528, - 529, 530, 610, 532, 578, 579, 580, 581, 582, 583, - 584, 585, 586, 587, 588, 611, 840, 612, 765, 613, - 696, 614, 379, 641, 499, 615, 381, 382, 383, 428, - 429, 430, 384, 385, 386, 387, 388, 389, 478, 479, - 390, 391, 392, 393, 533, 481, 534, 484, 441, 442, - 535, 396, 397, 398, 570, 474, 568, 569, 705, 706, - 639, 777, 618, 619, 620, 621, 622, 737, 876, 912, - 904, 905, 906, 913, 623, 624, 625, 626, 907, 879, - 627, 628, 908, 927, 629, 630, 631, 843, 741, 845, - 883, 902, 903, 632, 399, 400, 401, 425, 633, 471, - 472, 451, 452, 789, 790, 403, 674, 675, 679, 404, - 405, 685, 686, 689, 692, 406, 697, 698, 407, 453, - 454 + 0, 530, 531, 532, 798, 533, 534, 535, 536, 537, + 538, 539, 620, 541, 587, 588, 589, 590, 591, 592, + 593, 594, 595, 596, 597, 621, 856, 622, 781, 623, + 711, 624, 388, 651, 508, 625, 390, 391, 392, 437, + 438, 439, 393, 394, 395, 396, 397, 398, 487, 488, + 399, 400, 401, 402, 542, 490, 599, 493, 450, 451, + 544, 405, 406, 407, 579, 483, 577, 578, 721, 722, + 649, 793, 628, 629, 630, 631, 632, 753, 892, 928, + 920, 921, 922, 929, 633, 634, 635, 636, 923, 895, + 637, 638, 924, 943, 639, 640, 641, 859, 757, 861, + 899, 918, 919, 642, 408, 409, 410, 434, 643, 480, + 481, 460, 461, 805, 806, 412, 684, 685, 689, 413, + 414, 695, 696, 703, 704, 707, 415, 713, 714, 416, + 462, 463 }; - /* YYTABLE[YYPACT[STATE-NUM]] -- What to do in state STATE-NUM. If - positive, shift that token. If negative, reduce the rule whose - number is the opposite. If YYTABLE_NINF, syntax error. */ +/* YYTABLE[YYPACT[STATE-NUM]] -- What to do in state STATE-NUM. If + positive, shift that token. If negative, reduce the rule whose + number is the opposite. If YYTABLE_NINF, syntax error. */ static const yytype_int16 yytable[] = { - 395, 431, 402, 446, 638, 380, 647, 589, 446, 394, - 495, 378, 769, 773, 668, 776, 536, 445, 778, 708, - 447, 842, 467, 678, 438, 447, 709, 669, 688, 731, - 668, 422, 720, 721, 476, 911, 787, 700, 662, 656, - 662, 663, 919, 408, 418, 431, 710, 482, 455, 563, - 416, 456, 911, 564, 635, 648, 649, 423, 477, 659, - 670, 671, 672, 673, 438, 732, 634, 636, 722, 723, - 788, 660, 664, 677, 664, -35, 419, 650, 677, 542, - 438, 651, 482, 590, 677, 543, 493, 677, 482, 409, - 483, 591, 566, 665, 544, 494, 677, 779, 857, 665, - 545, 665, 858, 590, 665, 746, 665, 748, 665, 665, - 640, 433, 410, 665, 434, 735, 754, 755, 756, 757, - 758, 759, 760, 761, 762, 763, 590, 718, 719, 496, - 844, 458, 497, 774, 456, 498, 764, 457, 459, 461, - 463, 465, 466, 469, 716, 638, 717, 638, 550, 666, - 638, 558, 852, 783, 551, 572, 574, 559, 766, 849, - 708, 573, 575, 653, 785, 694, 781, 791, 793, 654, - 795, 797, 766, 543, 794, 800, 796, 798, 802, 804, - 853, 801, 854, 807, 803, 805, 566, 810, 566, 808, - 812, 884, 885, 811, 890, 891, 813, 766, 766, 438, - 794, 798, 892, 893, 926, 894, 895, 922, 801, 805, - 859, 808, 813, 766, 860, 681, 682, 683, 684, 828, - 829, 830, 831, 643, 766, 460, 644, 767, 456, 531, - 708, 769, 887, 462, 446, 818, 456, 766, 819, 411, - 847, 464, 468, 424, 456, 456, 846, 412, 445, 413, - 848, 447, 676, 680, 687, 456, 456, 456, 690, 566, - 693, 456, 699, 456, 818, 456, 414, 873, 328, 329, - 330, 577, 415, 863, 678, 850, 851, 724, 725, 817, - 867, 688, 668, 420, 638, 713, 714, 715, 921, 645, - 646, 766, 896, 824, 825, 421, 826, 827, 832, 833, - 426, 427, 448, 435, 440, 450, 475, 470, 485, 480, - 325, 491, 492, 482, 537, 769, 538, 539, 540, 541, - 562, 658, 547, 677, 677, 546, 548, 566, 549, 552, - 677, 677, 553, 554, 555, 556, 677, 577, 677, 557, - 560, 561, 577, 875, 652, 565, 877, 571, 577, 590, - 642, 577, 657, 493, 667, 691, 729, 663, 726, 704, - 577, 727, 701, 730, 638, 712, 728, 733, 736, 738, - 889, 739, 740, 742, 743, 744, 747, 750, 751, 577, - 749, 752, -36, 432, -34, 869, 877, 753, -29, 792, - 799, 439, 394, 780, 814, 806, 809, 566, 815, 395, - 394, 402, 395, 914, 380, 841, 909, 395, 394, 402, - 378, 394, 449, 856, 784, 766, 394, 473, 923, 888, - 638, 897, 899, 880, 900, 915, 898, 432, 487, -570, - 916, 432, 910, 917, 592, 920, 394, 928, 929, 834, - 394, 835, 838, 836, 878, 837, 711, 439, 786, 839, - 417, 816, 874, 918, 881, 924, 394, 925, 882, 901, - 770, 447, 444, 489, 771, 772, 702, 862, 486, 488, - 861, 866, 864, 868, 567, 865, 490, 872, 870, 0, - 0, 871, 0, 394, 878, 617, 0, 0, 0, 0, - 0, 0, 0, 0, 616, 0, 0, 0, 0, 0, - 0, 447, 821, 822, 823, 577, 577, 577, 577, 577, - 577, 577, 577, 577, 577, 577, 577, 577, 577, 577, - 577, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 661, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 404, 389, 411, 440, 648, 455, 387, 785, 454, 598, + 455, 504, 403, 540, 678, 712, 858, 545, 702, 725, + 657, 724, 456, 688, 679, 447, 747, 456, 476, 672, + 678, 789, 673, 792, 736, 737, 794, 716, 431, 666, + 427, 669, 803, 672, 927, 485, 726, 440, 491, 442, + 417, 935, 443, 670, 418, 586, 492, 680, 681, 682, + 683, 927, 748, 674, 432, 447, 419, 644, 646, 486, + 738, 739, 428, 655, 656, 687, 804, 674, -694, 420, + 491, 447, 658, 659, -694, 600, 687, 645, 502, 687, + 491, 795, 600, 601, 575, 449, 600, 503, 687, 650, + 551, 553, -35, 790, 660, 668, 552, 554, 661, 421, + 466, 468, 470, 472, 474, 475, 478, 422, 751, 559, + 762, 586, 764, 505, 567, 560, 506, 581, 423, 507, + 568, 860, 586, 582, 675, 586, 464, 583, 467, 465, + 675, 465, 675, 584, 586, 675, 648, 675, 648, 675, + 675, 648, 663, 797, 675, 676, 807, 809, 664, 782, + 811, 813, 552, 810, 586, 801, 812, 814, 799, 724, + 572, 709, 469, 424, 573, 465, 868, 770, 771, 772, + 773, 774, 775, 776, 777, 778, 779, 816, 575, 425, + 575, 471, 818, 817, 465, 820, 823, 780, 819, 942, + 447, 821, 824, 826, 828, 900, 901, 906, 907, 827, + 829, 782, 782, 810, 814, 908, 909, 910, 911, 938, + 429, 817, 821, 824, 829, 782, 873, 875, 734, 735, + 874, 876, 785, 802, 732, 430, 733, 455, 436, 724, + 454, 698, 699, 700, 701, 521, 844, 845, 846, 847, + 653, 433, 473, 654, 456, 465, 903, 691, 692, 693, + 694, 477, 575, 686, 465, 690, 465, 862, 465, 697, + 705, 864, 465, 465, 712, 435, 712, 702, 702, 449, + 879, 688, 866, 867, 869, 708, 870, 833, 465, 678, + 444, 648, 457, 837, 838, 839, 586, 586, 586, 586, + 586, 586, 586, 586, 586, 586, 586, 586, 586, 586, + 586, 586, 937, 459, 715, 782, 785, 465, 783, 834, + 782, 834, 835, 863, 889, 334, 335, 336, 740, 741, + 782, 865, 687, 687, 782, 912, 575, 729, 730, 731, + 840, 841, 479, 842, 843, 687, 484, 687, 331, 494, + 848, 849, 489, 500, 501, 491, 547, 548, 549, 546, + 555, 550, 574, 742, 891, 569, 556, 893, 652, 557, + 558, 648, 561, 562, 600, 563, 564, 565, 586, 586, + 566, 570, 571, 667, 580, 662, -34, 502, 706, 745, + 673, 586, 441, 586, 717, 746, 677, 743, 744, 749, + 448, 754, 752, 755, 403, 756, 575, 893, 404, 389, + 411, 404, 403, 925, 387, 720, 404, 458, 411, 758, + 403, 728, 759, 403, 930, 760, 482, 648, 403, 763, + 766, 765, -36, 815, 767, 768, 441, 496, 769, 939, + 441, 796, 800, -29, 808, 822, 825, 830, 403, 543, + 831, 857, 403, 894, 872, 885, 448, 782, 896, 904, + 905, 916, 913, 915, 926, 932, 914, -580, 403, 931, + 456, 602, 936, 850, 945, 944, 852, 851, 727, 933, + 497, 853, 426, 576, 854, 498, 832, 855, 897, 499, + 890, 934, 940, 894, 627, 403, 941, 495, 898, 786, + 917, 787, 718, 877, 882, 453, 626, 881, 878, 788, + 456, 886, 888, 880, 0, 0, 884, 0, 0, 0, + 0, 883, 0, 0, 0, 0, 0, 0, 887, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 703, 0, 567, 0, - 567, 0, 0, 0, 0, 394, 0, 394, 0, 394, - 0, 0, 0, 0, 0, 0, 0, 577, 577, 0, - 0, 0, 0, 0, 577, 577, 0, 0, 0, 0, - 577, 0, 577, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 671, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 617, 0, 0, 0, 0, 0, 0, - 0, 0, 616, 395, 0, 0, 0, 0, 0, 0, - 0, 567, 394, 0, 0, 0, 0, 0, 0, 0, - 394, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 719, 0, 576, 0, 576, + 0, 0, 0, 0, 0, 0, 0, 403, 0, 403, + 0, 403, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 567, - 0, 0, 0, 0, 0, 0, 0, 0, 394, 0, + 0, 0, 0, 627, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 404, 0, 626, 0, 0, 0, 0, + 0, 576, 0, 0, 0, 403, 0, 0, 0, 0, + 0, 0, 0, 403, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 617, 0, 0, - 0, 617, 0, 0, 0, 0, 616, 0, 0, 0, - 616, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 567, - 0, 0, 0, 0, 0, 0, 0, 0, 394, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 576, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 403, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 627, 0, 0, 0, 627, 0, 0, + 0, 0, 0, 0, 0, 626, 0, 0, 0, 626, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 617, 617, 0, 617, 0, 402, 0, 0, - 0, 616, 616, 0, 616, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 576, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 403, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 617, 0, 0, 0, 0, 0, 0, - 0, 0, 616, 0, 0, 0, 0, 0, 0, 617, - 0, 0, 0, 0, 0, 0, 617, 0, 616, 0, - 0, 0, 0, 0, 0, 616, 617, 0, 0, 0, - 617, 0, 0, 0, 0, 616, 617, 0, 0, 616, - 0, 0, 0, 443, 0, 616, 1, 2, 3, 4, - 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, - 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, - 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, - 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, - 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, - 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, - 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, - 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, - 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, - 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, - 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, - 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, - 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, - 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, - 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, - 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, - 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, - 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, - 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, - 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, - 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, - 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, - 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, - 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, - 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, - 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, - 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, - 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, - 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, - 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, - 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, - 315, 316, 317, 318, 319, 320, 321, 322, 323, 324, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 325, 0, 0, 0, 0, 0, - 0, 0, 326, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 327, 328, 329, 330, - 331, 0, 0, 0, 0, 0, 0, 0, 0, 332, - 333, 334, 335, 336, 337, 338, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 339, 340, 341, 342, 343, 344, 0, 0, 0, - 0, 0, 0, 0, 0, 345, 0, 346, 347, 348, - 349, 350, 351, 352, 353, 354, 355, 356, 357, 358, - 359, 360, 361, 362, 363, 364, 365, 366, 367, 368, - 369, 370, 371, 372, 373, 374, 375, 376, 377, 1, - 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, - 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, - 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, - 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, - 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, - 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, - 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, - 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, - 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, - 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, - 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, - 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, - 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, - 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, - 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, - 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, - 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, - 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, - 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, - 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, - 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, - 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, - 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, - 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, - 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, - 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, - 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, - 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, - 282, 283, 284, 285, 286, 287, 288, 289, 290, 291, - 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, - 302, 303, 304, 305, 306, 307, 308, 309, 310, 311, - 312, 313, 314, 315, 316, 317, 318, 319, 320, 321, - 322, 323, 324, 0, 0, 500, 501, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 627, 627, + 0, 627, 0, 411, 0, 0, 0, 0, 0, 0, + 626, 626, 0, 626, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 502, 503, 0, 325, 0, 592, - 593, 0, 0, 0, 0, 594, 504, 505, 506, 507, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 327, - 328, 329, 330, 331, 0, 0, 0, 508, 509, 510, - 511, 512, 332, 333, 334, 335, 336, 337, 338, 595, - 596, 597, 598, 0, 599, 600, 601, 602, 603, 604, - 605, 606, 607, 608, 339, 340, 341, 342, 343, 344, - 513, 514, 515, 516, 517, 518, 519, 520, 345, 609, - 346, 347, 348, 349, 350, 351, 352, 353, 354, 355, - 356, 357, 358, 359, 360, 361, 362, 363, 364, 365, - 366, 367, 368, 369, 370, 371, 372, 373, 374, 375, - 376, 377, 1, 2, 3, 4, 5, 6, 7, 8, - 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, - 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, - 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, - 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, - 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, - 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, - 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, - 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, - 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, - 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, - 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, - 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, - 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, - 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, - 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, - 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, - 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, - 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, - 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, - 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, - 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, - 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, - 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, - 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, - 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, - 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, - 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, - 279, 280, 281, 282, 283, 284, 285, 286, 287, 288, - 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, - 299, 300, 301, 302, 303, 304, 305, 306, 307, 308, - 309, 310, 311, 312, 313, 314, 315, 316, 317, 318, - 319, 320, 321, 322, 323, 324, 0, 0, 500, 501, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 627, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 502, 503, 0, - 325, 0, 592, 768, 0, 0, 0, 0, 594, 504, - 505, 506, 507, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 327, 328, 329, 330, 331, 0, 0, 0, - 508, 509, 510, 511, 512, 332, 333, 334, 335, 336, - 337, 338, 595, 596, 597, 598, 0, 599, 600, 601, - 602, 603, 604, 605, 606, 607, 608, 339, 340, 341, - 342, 343, 344, 513, 514, 515, 516, 517, 518, 519, - 520, 345, 609, 346, 347, 348, 349, 350, 351, 352, - 353, 354, 355, 356, 357, 358, 359, 360, 361, 362, - 363, 364, 365, 366, 367, 368, 369, 370, 371, 372, - 373, 374, 375, 376, 377, 1, 2, 3, 4, 5, + 0, 626, 0, 0, 0, 627, 0, 0, 0, 0, + 0, 0, 627, 0, 0, 0, 0, 626, 0, 0, + 0, 0, 627, 0, 626, 0, 627, 0, 0, 0, + 0, 0, 627, 0, 626, 0, 0, 0, 626, 0, + 0, 0, 452, 0, 626, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, @@ -1948,156 +1797,21 @@ static const yytype_int16 yytable[] = 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, 315, - 316, 317, 318, 319, 320, 321, 322, 323, 324, 0, - 0, 500, 501, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 502, 503, 0, 325, 0, 592, 0, 0, 0, 0, - 0, 594, 504, 505, 506, 507, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 327, 328, 329, 330, 331, - 0, 0, 0, 508, 509, 510, 511, 512, 332, 333, - 334, 335, 336, 337, 338, 595, 596, 597, 598, 0, - 599, 600, 601, 602, 603, 604, 605, 606, 607, 608, - 339, 340, 341, 342, 343, 344, 513, 514, 515, 516, - 517, 518, 519, 520, 345, 609, 346, 347, 348, 349, - 350, 351, 352, 353, 354, 355, 356, 357, 358, 359, - 360, 361, 362, 363, 364, 365, 366, 367, 368, 369, - 370, 371, 372, 373, 374, 375, 376, 377, 1, 2, - 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, - 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, - 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, - 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, - 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, - 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, - 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, - 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, - 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, - 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, - 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, - 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, - 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, - 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, - 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, - 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, - 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, - 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, - 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, - 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, - 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, - 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, - 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, - 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, - 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, - 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, - 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, - 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, - 283, 284, 285, 286, 287, 288, 289, 290, 291, 292, - 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, - 303, 304, 305, 306, 307, 308, 309, 310, 311, 312, - 313, 314, 315, 316, 317, 318, 319, 320, 321, 322, - 323, 324, 0, 0, 500, 501, 0, 0, 0, 0, + 316, 317, 318, 319, 320, 321, 322, 323, 324, 325, + 326, 327, 328, 329, 330, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 502, 503, 0, 325, 0, 485, 0, - 0, 0, 0, 0, 594, 504, 505, 506, 507, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 327, 328, - 329, 330, 331, 0, 0, 0, 508, 509, 510, 511, - 512, 332, 333, 334, 335, 336, 337, 338, 595, 596, - 597, 598, 0, 599, 600, 601, 602, 603, 604, 605, - 606, 607, 608, 339, 340, 341, 342, 343, 344, 513, - 514, 515, 516, 517, 518, 519, 520, 345, 609, 346, - 347, 348, 349, 350, 351, 352, 353, 354, 355, 356, - 357, 358, 359, 360, 361, 362, 363, 364, 365, 366, - 367, 368, 369, 370, 371, 372, 373, 374, 375, 376, - 377, 1, 2, 3, 4, 5, 6, 7, 8, 9, - 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, - 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, - 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, - 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, - 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, - 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, - 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, - 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, - 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, - 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, - 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, - 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, - 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, - 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, - 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, - 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, - 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, - 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, - 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, - 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, - 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, - 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, - 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, - 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, - 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, - 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, - 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, - 280, 281, 282, 283, 284, 285, 286, 287, 288, 289, - 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, - 300, 301, 302, 303, 304, 305, 306, 307, 308, 309, - 310, 311, 312, 313, 314, 315, 316, 317, 318, 319, - 320, 321, 322, 323, 324, 0, 0, 500, 501, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 331, + 0, 0, 0, 0, 0, 0, 0, 332, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 502, 503, 0, 325, - 0, 0, 0, 0, 0, 0, 0, 594, 504, 505, - 506, 507, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 327, 328, 329, 330, 331, 0, 0, 0, 508, - 509, 510, 511, 512, 332, 333, 334, 335, 336, 337, - 338, 595, 596, 597, 598, 0, 599, 600, 601, 602, - 603, 604, 605, 606, 607, 608, 339, 340, 341, 342, - 343, 344, 513, 514, 515, 516, 517, 518, 519, 520, - 345, 609, 346, 347, 348, 349, 350, 351, 352, 353, - 354, 355, 356, 357, 358, 359, 360, 361, 362, 363, - 364, 365, 366, 367, 368, 369, 370, 371, 372, 373, - 374, 375, 376, 377, 1, 2, 3, 4, 5, 6, - 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, - 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, - 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, - 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, - 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, - 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, - 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, - 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, - 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, - 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, - 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, - 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, - 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, - 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, - 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, - 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, - 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, - 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, - 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, - 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, - 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, - 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, - 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, - 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, - 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, - 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, - 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, - 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, - 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, - 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, - 307, 308, 309, 310, 311, 312, 313, 314, 315, 316, - 317, 318, 319, 320, 321, 322, 323, 324, 0, 0, - 500, 501, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 502, - 503, 0, 325, 0, 0, 0, 0, 0, 0, 0, - 594, 504, 505, 506, 507, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 327, 328, 329, 330, 331, 0, - 0, 0, 508, 509, 510, 511, 512, 332, 333, 334, - 335, 336, 337, 338, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 339, - 340, 341, 342, 343, 344, 513, 514, 515, 516, 517, - 518, 519, 520, 345, 0, 346, 347, 348, 349, 350, - 351, 352, 353, 354, 355, 356, 357, 358, 359, 360, - 361, 362, 363, 364, 365, 366, 367, 368, 369, 370, - 371, 372, 373, 374, 375, 376, 377, 1, 2, 3, + 0, 333, 334, 335, 336, 337, 0, 0, 0, 0, + 0, 0, 0, 0, 338, 339, 340, 341, 342, 343, + 344, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 345, 346, 347, 348, + 349, 350, 351, 0, 0, 0, 0, 0, 0, 0, + 0, 352, 0, 353, 354, 355, 356, 357, 358, 359, + 360, 361, 362, 363, 364, 365, 366, 367, 368, 369, + 370, 371, 372, 373, 374, 375, 376, 377, 378, 379, + 380, 381, 382, 383, 384, 385, 386, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, @@ -2129,156 +1843,21 @@ static const yytype_int16 yytable[] = 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, 307, 308, 309, 310, 311, 312, 313, - 314, 0, 0, 0, 318, 319, 320, 321, 322, 323, - 324, 0, 0, 500, 501, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 502, 503, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 504, 505, 506, 507, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 327, 328, 329, - 330, 0, 0, 0, 0, 508, 509, 510, 511, 512, - 332, 333, 334, 335, 336, 337, 338, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 339, 340, 341, 342, 343, 344, 513, 514, - 515, 516, 517, 518, 519, 520, 345, 0, 346, 347, - 348, 349, 350, 351, 352, 353, 354, 355, 356, 357, + 314, 315, 316, 317, 318, 319, 320, 321, 322, 323, + 324, 325, 326, 327, 328, 329, 330, 0, 0, 509, + 510, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 511, 512, + 0, 331, 0, 602, 603, 0, 0, 0, 0, 604, + 513, 514, 515, 516, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 333, 334, 335, 336, 337, 0, 0, + 0, 517, 518, 519, 520, 521, 338, 339, 340, 341, + 342, 343, 344, 605, 606, 607, 608, 0, 609, 610, + 611, 612, 613, 614, 615, 616, 617, 618, 345, 346, + 347, 348, 349, 350, 351, 522, 523, 524, 525, 526, + 527, 528, 529, 352, 619, 353, 354, 355, 356, 357, 358, 359, 360, 361, 362, 363, 364, 365, 366, 367, 368, 369, 370, 371, 372, 373, 374, 375, 376, 377, - 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, - 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, - 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, - 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, - 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, - 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, - 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, - 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, - 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, - 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, - 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, - 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, - 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, - 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, - 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, - 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, - 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, - 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, - 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, - 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, - 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, - 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, - 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, - 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, - 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, - 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, - 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, - 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, - 281, 282, 283, 284, 285, 286, 287, 288, 289, 290, - 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, - 301, 302, 303, 304, 305, 306, 307, 308, 309, 310, - 311, 312, 313, 314, 315, 316, 317, 318, 319, 320, - 321, 322, 323, 324, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 325, 0, - 0, 0, 0, 0, 0, 0, 326, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 327, 328, 329, 330, 331, 0, 0, 0, 0, 0, - 0, 0, 0, 332, 333, 334, 335, 336, 337, 338, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 339, 340, 341, 342, 343, - 344, 0, 0, 0, 0, 0, 0, 0, 0, 345, - 0, 346, 347, 348, 349, 350, 351, 352, 353, 354, - 355, 356, 357, 358, 359, 360, 361, 362, 363, 364, - 365, 366, 367, 368, 369, 370, 371, 372, 373, 374, - 375, 376, 377, 1, 2, 3, 4, 5, 6, 7, - 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, - 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, - 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, - 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, - 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, - 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, - 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, - 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, - 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, - 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, - 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, - 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, - 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, - 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, - 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, - 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, - 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, - 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, - 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, - 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, - 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, - 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, - 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, - 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, - 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, - 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, - 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, - 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, - 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, - 298, 299, 300, 301, 302, 303, 304, 305, 306, 307, - 308, 309, 310, 311, 312, 313, 314, 0, 0, 0, - 318, 319, 320, 321, 322, 323, 324, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 327, 328, 329, 330, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 332, 333, 334, 335, - 336, 337, 338, 595, 0, 0, 598, 0, 599, 600, - 0, 0, 603, 0, 0, 0, 0, 0, 339, 340, - 341, 342, 343, 344, 0, 0, 0, 0, 0, 0, - 0, 0, 345, 0, 346, 347, 348, 349, 350, 351, - 352, 353, 354, 355, 356, 357, 358, 359, 360, 361, - 362, 363, 364, 365, 366, 367, 368, 369, 370, 371, - 372, 373, 374, 375, 376, 377, 1, 2, 3, 4, - 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, - 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, - 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, - 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, - 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, - 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, - 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, - 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, - 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, - 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, - 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, - 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, - 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, - 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, - 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, - 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, - 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, - 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, - 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, - 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, - 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, - 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, - 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, - 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, - 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, - 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, - 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, - 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, - 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, - 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, - 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, - 0, 0, 0, 318, 319, 320, 321, 322, 323, 324, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 436, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 327, 328, 329, 330, - 0, 0, 0, 0, 0, 0, 0, 0, 437, 332, - 333, 334, 335, 336, 337, 338, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 339, 340, 341, 342, 343, 344, 0, 0, 0, - 0, 0, 0, 0, 0, 345, 0, 346, 347, 348, - 349, 350, 351, 352, 353, 354, 355, 356, 357, 358, - 359, 360, 361, 362, 363, 364, 365, 366, 367, 368, - 369, 370, 371, 372, 373, 374, 375, 376, 377, 1, + 378, 379, 380, 381, 382, 383, 384, 385, 386, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, @@ -2310,157 +1889,22 @@ static const yytype_int16 yytable[] = 282, 283, 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, 307, 308, 309, 310, 311, - 312, 313, 314, 0, 0, 0, 318, 319, 320, 321, - 322, 323, 324, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 325, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 327, - 328, 329, 330, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 332, 333, 334, 335, 336, 337, 338, 0, + 312, 313, 314, 315, 316, 317, 318, 319, 320, 321, + 322, 323, 324, 325, 326, 327, 328, 329, 330, 0, + 0, 509, 510, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 339, 340, 341, 342, 343, 344, - 0, 0, 0, 0, 0, 0, 0, 0, 345, 0, - 346, 347, 348, 349, 350, 351, 352, 353, 354, 355, + 511, 512, 0, 331, 0, 602, 784, 0, 0, 0, + 0, 604, 513, 514, 515, 516, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 333, 334, 335, 336, 337, + 0, 0, 0, 517, 518, 519, 520, 521, 338, 339, + 340, 341, 342, 343, 344, 605, 606, 607, 608, 0, + 609, 610, 611, 612, 613, 614, 615, 616, 617, 618, + 345, 346, 347, 348, 349, 350, 351, 522, 523, 524, + 525, 526, 527, 528, 529, 352, 619, 353, 354, 355, 356, 357, 358, 359, 360, 361, 362, 363, 364, 365, 366, 367, 368, 369, 370, 371, 372, 373, 374, 375, - 376, 377, 1, 2, 3, 4, 5, 6, 7, 8, - 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, - 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, - 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, - 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, - 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, - 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, - 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, - 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, - 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, - 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, - 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, - 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, - 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, - 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, - 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, - 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, - 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, - 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, - 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, - 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, - 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, - 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, - 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, - 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, - 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, - 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, - 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, - 279, 280, 281, 282, 283, 284, 285, 286, 287, 288, - 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, - 299, 300, 301, 302, 303, 304, 305, 306, 307, 308, - 309, 310, 311, 312, 313, 314, 0, 0, 0, 318, - 319, 320, 321, 322, 323, 324, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 707, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 327, 328, 329, 330, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 332, 333, 334, 335, 336, - 337, 338, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 339, 340, 341, - 342, 343, 344, 0, 0, 0, 0, 0, 0, 0, - 0, 345, 0, 346, 347, 348, 349, 350, 351, 352, - 353, 354, 355, 356, 357, 358, 359, 360, 361, 362, - 363, 364, 365, 366, 367, 368, 369, 370, 371, 372, - 373, 374, 375, 376, 377, 1, 2, 3, 4, 5, - 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, - 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, - 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, - 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, - 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, - 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, - 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, - 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, - 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, - 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, - 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, - 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, - 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, - 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, - 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, - 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, - 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, - 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, - 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, - 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, - 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, - 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, - 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, - 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, - 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, - 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, - 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, - 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, - 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, - 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, - 306, 307, 308, 309, 310, 311, 312, 313, 314, 0, - 0, 0, 318, 319, 320, 321, 322, 323, 324, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 820, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 327, 328, 329, 330, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 332, 333, - 334, 335, 336, 337, 338, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 339, 340, 341, 342, 343, 344, 0, 0, 0, 0, - 0, 0, 0, 0, 345, 0, 346, 347, 348, 349, - 350, 351, 352, 353, 354, 355, 356, 357, 358, 359, - 360, 361, 362, 363, 364, 365, 366, 367, 368, 369, - 370, 371, 372, 373, 374, 375, 376, 377, 1, 2, - 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, - 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, - 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, - 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, - 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, - 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, - 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, - 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, - 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, - 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, - 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, - 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, - 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, - 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, - 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, - 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, - 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, - 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, - 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, - 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, - 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, - 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, - 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, - 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, - 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, - 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, - 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, - 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, - 283, 284, 285, 286, 287, 288, 289, 290, 291, 292, - 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, - 303, 304, 305, 306, 307, 308, 309, 310, 311, 312, - 313, 314, 0, 0, 0, 318, 319, 320, 321, 322, - 323, 324, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 855, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 327, 328, - 329, 330, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 332, 333, 334, 335, 336, 337, 338, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 339, 340, 341, 342, 343, 344, 0, - 0, 0, 0, 0, 0, 0, 0, 345, 0, 346, - 347, 348, 349, 350, 351, 352, 353, 354, 355, 356, - 357, 358, 359, 360, 361, 362, 363, 364, 365, 366, - 367, 368, 369, 370, 371, 372, 373, 374, 375, 376, - 377, 1, 2, 3, 4, 5, 6, 7, 8, 9, + 376, 377, 378, 379, 380, 381, 382, 383, 384, 385, + 386, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, @@ -2491,27 +1935,28 @@ static const yytype_int16 yytable[] = 280, 281, 282, 283, 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, 307, 308, 309, - 310, 311, 312, 313, 314, 0, 0, 0, 318, 319, - 320, 321, 322, 323, 324, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 310, 311, 312, 313, 314, 315, 316, 317, 318, 319, + 320, 321, 322, 323, 324, 325, 326, 327, 328, 329, + 330, 0, 0, 509, 510, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 327, 328, 329, 330, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 332, 333, 334, 335, 336, 337, - 338, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 339, 340, 341, 342, - 343, 344, 0, 0, 0, 0, 0, 0, 0, 0, - 345, 0, 346, 347, 348, 349, 350, 351, 352, 353, + 0, 0, 511, 512, 0, 331, 0, 602, 0, 0, + 0, 0, 0, 604, 513, 514, 515, 516, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 333, 334, 335, + 336, 337, 0, 0, 0, 517, 518, 519, 520, 521, + 338, 339, 340, 341, 342, 343, 344, 605, 606, 607, + 608, 0, 609, 610, 611, 612, 613, 614, 615, 616, + 617, 618, 345, 346, 347, 348, 349, 350, 351, 522, + 523, 524, 525, 526, 527, 528, 529, 352, 619, 353, 354, 355, 356, 357, 358, 359, 360, 361, 362, 363, 364, 365, 366, 367, 368, 369, 370, 371, 372, 373, - 374, 375, 376, 377, 2, 3, 4, 5, 6, 7, + 374, 375, 376, 377, 378, 379, 380, 381, 382, 383, + 384, 385, 386, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, - 58, 0, 0, 61, 62, 63, 64, 65, 66, 67, + 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, @@ -2536,68 +1981,120 @@ static const yytype_int16 yytable[] = 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, 307, - 308, 309, 310, 311, 312, 313, 314, 0, 0, 0, - 0, 0, 0, 321, 0, 0, 0, 0, 0, 500, - 501, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 502, 503, - 0, 0, 0, 637, 775, 0, 0, 0, 0, 0, - 504, 505, 506, 507, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 508, 509, 510, 511, 512, 332, 0, 0, 0, - 0, 337, 338, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 513, 514, 515, 516, 517, 518, - 519, 520, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 358, 2, 3, 4, - 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, - 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, - 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, - 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, - 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, - 55, 56, 57, 58, 0, 0, 61, 62, 63, 64, - 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, - 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, - 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, - 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, - 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, - 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, - 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, - 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, - 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, - 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, - 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, - 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, - 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, - 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, - 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, - 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, - 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, - 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, - 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, - 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, - 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, - 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, - 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, - 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, - 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, - 0, 0, 0, 0, 0, 0, 321, 0, 0, 0, - 0, 0, 500, 501, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 502, 503, 0, 0, 0, 637, 886, 0, 0, - 0, 0, 0, 504, 505, 506, 507, 0, 0, 0, + 308, 309, 310, 311, 312, 313, 314, 315, 316, 317, + 318, 319, 320, 321, 322, 323, 324, 325, 326, 327, + 328, 329, 330, 0, 0, 509, 510, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 508, 509, 510, 511, 512, 332, - 0, 0, 0, 0, 337, 338, 0, 0, 0, 0, + 0, 0, 0, 0, 511, 512, 0, 331, 0, 494, + 0, 0, 0, 0, 0, 604, 513, 514, 515, 516, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 333, + 334, 335, 336, 337, 0, 0, 0, 517, 518, 519, + 520, 521, 338, 339, 340, 341, 342, 343, 344, 605, + 606, 607, 608, 0, 609, 610, 611, 612, 613, 614, + 615, 616, 617, 618, 345, 346, 347, 348, 349, 350, + 351, 522, 523, 524, 525, 526, 527, 528, 529, 352, + 619, 353, 354, 355, 356, 357, 358, 359, 360, 361, + 362, 363, 364, 365, 366, 367, 368, 369, 370, 371, + 372, 373, 374, 375, 376, 377, 378, 379, 380, 381, + 382, 383, 384, 385, 386, 1, 2, 3, 4, 5, + 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, + 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, + 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, + 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, + 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, + 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, + 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, + 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, + 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, + 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, + 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, + 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, + 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, + 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, + 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, + 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, + 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, + 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, + 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, + 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, + 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, + 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, + 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, + 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, + 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, + 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, + 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, + 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, + 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, + 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, + 306, 307, 308, 309, 310, 311, 312, 313, 314, 315, + 316, 317, 318, 319, 320, 321, 322, 323, 324, 325, + 326, 327, 328, 329, 330, 0, 0, 509, 510, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 513, 514, 515, - 516, 517, 518, 519, 520, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 358, + 0, 0, 0, 0, 0, 0, 511, 512, 0, 331, + 0, 0, 0, 0, 0, 0, 0, 604, 513, 514, + 515, 516, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 333, 334, 335, 336, 337, 0, 0, 0, 517, + 518, 519, 520, 521, 338, 339, 340, 341, 342, 343, + 344, 605, 606, 607, 608, 0, 609, 610, 611, 612, + 613, 614, 615, 616, 617, 618, 345, 346, 347, 348, + 349, 350, 351, 522, 523, 524, 525, 526, 527, 528, + 529, 352, 619, 353, 354, 355, 356, 357, 358, 359, + 360, 361, 362, 363, 364, 365, 366, 367, 368, 369, + 370, 371, 372, 373, 374, 375, 376, 377, 378, 379, + 380, 381, 382, 383, 384, 385, 386, 1, 2, 3, + 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, + 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, + 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, + 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, + 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, + 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, + 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, + 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, + 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, + 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, + 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, + 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, + 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, + 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, + 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, + 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, + 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, + 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, + 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, + 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, + 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, + 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, + 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, + 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, + 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, + 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, + 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, + 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, + 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, + 294, 295, 296, 297, 298, 299, 300, 301, 302, 303, + 304, 305, 306, 307, 308, 309, 310, 311, 312, 313, + 314, 315, 316, 317, 318, 319, 320, 321, 322, 323, + 324, 325, 326, 327, 328, 329, 330, 0, 0, 509, + 510, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 511, 512, + 0, 331, 0, 0, 0, 0, 0, 0, 0, 604, + 513, 514, 515, 516, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 333, 334, 335, 336, 337, 0, 0, + 0, 517, 518, 519, 520, 521, 338, 339, 340, 341, + 342, 343, 344, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 345, 346, + 347, 348, 349, 350, 351, 522, 523, 524, 525, 526, + 527, 528, 529, 352, 0, 353, 354, 355, 356, 357, + 358, 359, 360, 361, 362, 363, 364, 365, 366, 367, + 368, 369, 370, 371, 372, 373, 374, 375, 376, 377, + 378, 379, 380, 381, 382, 383, 384, 385, 386, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, - 52, 53, 54, 55, 56, 57, 58, 0, 0, 61, + 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, @@ -2623,68 +2120,120 @@ static const yytype_int16 yytable[] = 282, 283, 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, 307, 308, 309, 310, 311, - 312, 313, 314, 0, 0, 0, 0, 0, 0, 321, - 0, 0, 0, 0, 0, 500, 501, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 502, 503, 0, 0, 576, 0, - 0, 0, 0, 0, 0, 0, 504, 505, 506, 507, + 312, 313, 314, 315, 316, 317, 0, 0, 0, 321, + 322, 323, 324, 325, 326, 327, 328, 329, 330, 0, + 0, 509, 510, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 508, 509, 510, - 511, 512, 332, 0, 0, 0, 0, 337, 338, 0, + 511, 512, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 513, 514, 515, 516, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 333, 334, 335, 336, 0, + 0, 0, 0, 517, 518, 519, 520, 521, 338, 339, + 340, 341, 342, 343, 344, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 345, 346, 347, 348, 349, 350, 351, 522, 523, 524, + 525, 526, 527, 528, 529, 352, 0, 353, 354, 355, + 356, 357, 358, 359, 360, 361, 362, 363, 364, 365, + 366, 367, 368, 369, 370, 371, 372, 373, 374, 375, + 376, 377, 378, 379, 380, 381, 382, 383, 384, 385, + 386, 1, 2, 3, 4, 5, 6, 7, 8, 9, + 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, + 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, + 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, + 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, + 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, + 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, + 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, + 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, + 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, + 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, + 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, + 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, + 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, + 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, + 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, + 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, + 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, + 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, + 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, + 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, + 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, + 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, + 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, + 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, + 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, + 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, + 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, + 280, 281, 282, 283, 284, 285, 286, 287, 288, 289, + 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, + 300, 301, 302, 303, 304, 305, 306, 307, 308, 309, + 310, 311, 312, 313, 314, 315, 316, 317, 318, 319, + 320, 321, 322, 323, 324, 325, 326, 327, 328, 329, + 330, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 513, 514, 515, 516, 517, 518, 519, 520, 0, 0, + 0, 0, 0, 0, 0, 331, 0, 0, 0, 0, + 0, 0, 0, 332, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 333, 334, 335, + 336, 337, 0, 0, 0, 0, 0, 0, 0, 0, + 338, 339, 340, 341, 342, 343, 344, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 358, 2, 3, 4, 5, 6, 7, 8, - 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, - 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, - 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, - 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, - 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, - 0, 0, 61, 62, 63, 64, 65, 66, 67, 68, - 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, - 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, - 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, - 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, - 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, - 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, - 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, - 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, - 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, - 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, - 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, - 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, - 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, - 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, - 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, - 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, - 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, - 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, - 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, - 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, - 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, - 279, 280, 281, 282, 283, 284, 285, 286, 287, 288, - 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, - 299, 300, 301, 302, 303, 304, 305, 306, 307, 308, - 309, 310, 311, 312, 313, 314, 0, 0, 0, 0, - 0, 0, 321, 0, 0, 0, 0, 0, 500, 501, + 0, 0, 345, 346, 347, 348, 349, 350, 351, 0, + 0, 0, 0, 0, 0, 0, 0, 352, 0, 353, + 354, 355, 356, 357, 358, 359, 360, 361, 362, 363, + 364, 365, 366, 367, 368, 369, 370, 371, 372, 373, + 374, 375, 376, 377, 378, 379, 380, 381, 382, 383, + 384, 385, 386, 1, 2, 3, 4, 5, 6, 7, + 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, + 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, + 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, + 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, + 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, + 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, + 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, + 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, + 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, + 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, + 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, + 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, + 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, + 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, + 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, + 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, + 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, + 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, + 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, + 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, + 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, + 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, + 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, + 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, + 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, + 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, + 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, + 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, + 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, + 298, 299, 300, 301, 302, 303, 304, 305, 306, 307, + 308, 309, 310, 311, 312, 313, 314, 315, 316, 317, + 0, 0, 0, 321, 322, 323, 324, 325, 326, 327, + 328, 329, 330, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 502, 503, 0, - 0, 0, 637, 0, 0, 0, 0, 0, 0, 504, - 505, 506, 507, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 508, 509, 510, 511, 512, 332, 0, 0, 0, 0, - 337, 338, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 513, 514, 515, 516, 517, 518, 519, - 520, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 358, 2, 3, 4, 5, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 333, + 334, 335, 336, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 338, 339, 340, 341, 342, 343, 344, 605, + 0, 0, 608, 0, 609, 610, 0, 0, 613, 0, + 0, 0, 0, 0, 345, 346, 347, 348, 349, 350, + 351, 0, 0, 0, 0, 0, 0, 0, 0, 352, + 0, 353, 354, 355, 356, 357, 358, 359, 360, 361, + 362, 363, 364, 365, 366, 367, 368, 369, 370, 371, + 372, 373, 374, 375, 376, 377, 378, 379, 380, 381, + 382, 383, 384, 385, 386, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, - 56, 57, 58, 0, 0, 61, 62, 63, 64, 65, + 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, @@ -2709,75 +2258,127 @@ static const yytype_int16 yytable[] = 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, - 306, 307, 308, 309, 310, 311, 312, 313, 314, 0, - 0, 0, 0, 0, 0, 321, 0, 0, 0, 0, - 0, 500, 501, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 502, 503, 0, 0, 734, 0, 0, 0, 0, 0, - 0, 0, 504, 505, 506, 507, 0, 0, 0, 0, + 306, 307, 308, 309, 310, 311, 312, 313, 314, 315, + 316, 317, 0, 0, 0, 321, 322, 323, 324, 325, + 326, 327, 328, 329, 330, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 508, 509, 510, 511, 512, 332, 0, - 0, 0, 0, 337, 338, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 513, 514, 515, 516, - 517, 518, 519, 520, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 358, 2, - 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, - 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, - 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, - 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, - 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, - 53, 54, 55, 56, 57, 58, 0, 0, 61, 62, - 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, - 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, - 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, - 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, - 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, - 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, - 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, - 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, - 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, - 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, - 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, - 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, - 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, - 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, - 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, - 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, - 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, - 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, - 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, - 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, - 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, - 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, - 283, 284, 285, 286, 287, 288, 289, 290, 291, 292, - 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, - 303, 304, 305, 306, 307, 308, 309, 310, 311, 312, - 313, 314, 0, 0, 0, 0, 0, 0, 321, 0, - 0, 0, 0, 0, 500, 501, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 445, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 502, 503, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 745, 504, 505, 506, 507, 0, + 0, 333, 334, 335, 336, 0, 0, 0, 0, 0, + 0, 0, 0, 446, 338, 339, 340, 341, 342, 343, + 344, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 345, 346, 347, 348, + 349, 350, 351, 0, 0, 0, 0, 0, 0, 0, + 0, 352, 0, 353, 354, 355, 356, 357, 358, 359, + 360, 361, 362, 363, 364, 365, 366, 367, 368, 369, + 370, 371, 372, 373, 374, 375, 376, 377, 378, 379, + 380, 381, 382, 383, 384, 385, 386, 1, 2, 3, + 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, + 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, + 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, + 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, + 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, + 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, + 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, + 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, + 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, + 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, + 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, + 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, + 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, + 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, + 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, + 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, + 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, + 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, + 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, + 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, + 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, + 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, + 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, + 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, + 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, + 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, + 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, + 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, + 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, + 294, 295, 296, 297, 298, 299, 300, 301, 302, 303, + 304, 305, 306, 307, 308, 309, 310, 311, 312, 313, + 314, 315, 316, 317, 0, 0, 0, 321, 322, 323, + 324, 325, 326, 327, 328, 329, 330, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 508, 509, 510, 511, - 512, 332, 0, 0, 0, 0, 337, 338, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 513, - 514, 515, 516, 517, 518, 519, 520, 0, 0, 0, + 0, 331, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 358, 2, 3, 4, 5, 6, 7, 8, 9, - 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, - 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, - 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, - 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, - 50, 51, 52, 53, 54, 55, 56, 57, 58, 0, - 0, 61, 62, 63, 64, 65, 66, 67, 68, 69, - 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, - 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, - 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, - 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, - 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, - 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, + 0, 0, 0, 333, 334, 335, 336, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 338, 339, 340, 341, + 342, 343, 344, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 345, 346, + 347, 348, 349, 350, 351, 0, 0, 0, 0, 0, + 0, 0, 0, 352, 0, 353, 354, 355, 356, 357, + 358, 359, 360, 361, 362, 363, 364, 365, 366, 367, + 368, 369, 370, 371, 372, 373, 374, 375, 376, 377, + 378, 379, 380, 381, 382, 383, 384, 385, 386, 1, + 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, + 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, + 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, + 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, + 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, + 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, + 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, + 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, + 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, + 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, + 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, + 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, + 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, + 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, + 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, + 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, + 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, + 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, + 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, + 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, + 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, + 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, + 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, + 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, + 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, + 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, + 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, + 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, + 282, 283, 284, 285, 286, 287, 288, 289, 290, 291, + 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, + 302, 303, 304, 305, 306, 307, 308, 309, 310, 311, + 312, 313, 314, 315, 316, 317, 0, 0, 0, 321, + 322, 323, 324, 325, 326, 327, 328, 329, 330, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 723, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 333, 334, 335, 336, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 338, 339, + 340, 341, 342, 343, 344, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 345, 346, 347, 348, 349, 350, 351, 0, 0, 0, + 0, 0, 0, 0, 0, 352, 0, 353, 354, 355, + 356, 357, 358, 359, 360, 361, 362, 363, 364, 365, + 366, 367, 368, 369, 370, 371, 372, 373, 374, 375, + 376, 377, 378, 379, 380, 381, 382, 383, 384, 385, + 386, 1, 2, 3, 4, 5, 6, 7, 8, 9, + 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, + 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, + 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, + 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, + 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, + 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, + 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, + 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, + 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, + 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, + 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, + 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, @@ -2796,378 +2397,22 @@ static const yytype_int16 yytable[] = 280, 281, 282, 283, 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, 307, 308, 309, - 310, 311, 312, 313, 314, 0, 0, 0, 0, 0, - 0, 321, 0, 0, 0, 0, 0, 500, 501, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 502, 503, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 504, 505, - 506, 507, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 508, - 509, 510, 511, 512, 332, 0, 0, 0, 0, 337, - 338, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 513, 514, 515, 516, 517, 518, 519, 520, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 358, 2, 3, 4, 5, 6, - 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, - 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, - 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, - 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, - 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, - 57, 58, 0, 0, 61, 62, 63, 64, 65, 66, - 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, - 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, - 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, - 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, - 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, - 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, - 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, - 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, - 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, - 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, - 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, - 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, - 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, - 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, - 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, - 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, - 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, - 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, - 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, - 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, - 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, - 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, - 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, - 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, - 307, 308, 309, 310, 311, 312, 313, 314, 0, 0, - 0, 0, 0, 0, 321, 0, 0, 0, 0, 0, - 500, 501, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 502, - 503, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 504, 505, 506, 507, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 508, 509, 510, 511, 512, 332, 0, 0, - 0, 0, 337, 655, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 513, 514, 515, 516, 517, - 518, 519, 520, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 358, 2, 3, - 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, - 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, - 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, - 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, - 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, - 54, 55, 56, 57, 58, 0, 0, 61, 62, 63, - 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, - 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, - 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, - 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, - 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, - 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, - 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, - 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, - 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, - 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, - 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, - 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, - 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, - 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, - 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, - 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, - 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, - 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, - 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, - 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, - 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, - 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, - 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, - 294, 295, 296, 297, 298, 299, 300, 301, 302, 303, - 304, 305, 306, 307, 308, 309, 310, 311, 312, 313, - 314, 0, 0, 0, 0, 0, 0, 321, 0, 0, - 0, 0, 0, 500, 501, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 502, 503, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 504, 505, 506, 507, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 508, 509, 510, 511, 695, - 332, 0, 0, 0, 0, 337, 338, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 513, 514, - 515, 516, 517, 518, 519, 520, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 358, 2, 3, 4, 5, 6, 7, 8, 9, 10, - 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, - 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, - 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, - 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, - 51, 52, 53, 54, 55, 56, 57, 58, 0, 0, - 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, - 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, - 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, - 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, - 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, - 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, - 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, - 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, - 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, - 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, - 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, - 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, - 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, - 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, - 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, - 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, - 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, - 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, - 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, - 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, - 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, - 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, - 281, 282, 283, 284, 285, 286, 287, 288, 289, 290, - 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, - 301, 302, 303, 304, 305, 306, 307, 308, 309, 310, - 311, 312, 313, 314, 0, 0, 0, 0, 0, 0, - 321, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 310, 311, 312, 313, 314, 315, 316, 317, 0, 0, + 0, 321, 322, 323, 324, 325, 326, 327, 328, 329, + 330, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 836, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 333, 334, 335, + 336, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 338, 339, 340, 341, 342, 343, 344, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 332, 0, 0, 0, 0, 337, 338 -}; - -static const yytype_int16 yycheck[] = -{ - 0, 383, 0, 402, 494, 0, 503, 482, 407, 0, - 435, 0, 623, 635, 543, 637, 441, 402, 640, 568, - 402, 737, 414, 548, 391, 407, 570, 348, 553, 336, - 559, 359, 331, 332, 385, 899, 348, 562, 348, 529, - 348, 351, 906, 349, 353, 427, 571, 351, 382, 352, - 351, 385, 916, 356, 358, 329, 330, 385, 409, 356, - 381, 382, 383, 384, 431, 372, 491, 492, 367, 368, - 382, 368, 382, 548, 382, 349, 385, 351, 553, 350, - 447, 355, 351, 351, 559, 356, 349, 562, 351, 349, - 359, 359, 474, 541, 350, 358, 571, 641, 352, 547, - 356, 549, 356, 351, 552, 602, 554, 604, 556, 557, - 358, 356, 349, 561, 359, 590, 338, 339, 340, 341, - 342, 343, 344, 345, 346, 347, 351, 327, 328, 353, - 741, 382, 356, 358, 385, 359, 358, 409, 410, 411, - 412, 413, 414, 415, 361, 635, 363, 637, 350, 541, - 640, 350, 774, 650, 356, 350, 350, 356, 356, 357, - 709, 356, 356, 350, 654, 557, 350, 350, 350, 356, - 350, 350, 356, 356, 356, 350, 356, 356, 350, 350, - 354, 356, 356, 350, 356, 356, 568, 350, 570, 356, - 350, 350, 350, 356, 350, 350, 356, 356, 356, 566, - 356, 356, 350, 350, 920, 350, 350, 350, 356, 356, - 352, 356, 356, 356, 356, 381, 382, 383, 384, 720, - 721, 722, 723, 356, 356, 382, 359, 359, 385, 440, - 779, 842, 854, 382, 633, 356, 385, 356, 359, 349, - 359, 382, 382, 359, 385, 385, 743, 349, 633, 349, - 747, 633, 382, 382, 382, 385, 385, 385, 382, 641, - 382, 385, 382, 385, 356, 385, 349, 359, 374, 375, - 376, 482, 349, 798, 799, 765, 766, 333, 334, 704, - 805, 806, 811, 349, 774, 364, 365, 366, 910, 500, - 501, 356, 357, 716, 717, 349, 718, 719, 724, 725, - 350, 356, 359, 385, 367, 385, 353, 385, 353, 385, - 351, 385, 385, 351, 350, 926, 385, 359, 358, 356, - 349, 532, 356, 798, 799, 358, 356, 709, 356, 356, - 805, 806, 356, 356, 356, 356, 811, 548, 813, 356, - 350, 356, 553, 840, 350, 359, 843, 358, 559, 351, - 385, 562, 349, 349, 385, 348, 335, 351, 371, 385, - 571, 370, 352, 337, 854, 385, 369, 352, 354, 349, - 382, 359, 359, 349, 349, 359, 349, 359, 359, 590, - 357, 359, 349, 383, 349, 348, 883, 359, 350, 358, - 356, 391, 383, 385, 350, 356, 356, 779, 350, 399, - 391, 399, 402, 900, 399, 352, 896, 407, 399, 407, - 399, 402, 407, 352, 385, 356, 407, 417, 915, 348, - 910, 354, 350, 393, 349, 359, 385, 427, 426, 353, - 350, 431, 358, 397, 353, 353, 427, 359, 354, 726, - 431, 727, 730, 728, 843, 729, 573, 447, 659, 731, - 331, 703, 818, 905, 845, 916, 447, 917, 845, 883, - 633, 843, 399, 431, 633, 633, 564, 796, 425, 427, - 794, 803, 799, 806, 474, 801, 431, 813, 809, -1, - -1, 811, -1, 474, 883, 485, -1, -1, -1, -1, - -1, -1, -1, -1, 485, -1, -1, -1, -1, -1, - -1, 883, 713, 714, 715, 716, 717, 718, 719, 720, - 721, 722, 723, 724, 725, 726, 727, 728, 729, 730, - 731, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, 537, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, 566, -1, 568, -1, - 570, -1, -1, -1, -1, 566, -1, 568, -1, 570, - -1, -1, -1, -1, -1, -1, -1, 798, 799, -1, - -1, -1, -1, -1, 805, 806, -1, -1, -1, -1, - 811, -1, 813, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, 623, -1, -1, -1, -1, -1, -1, - -1, -1, 623, 633, -1, -1, -1, -1, -1, -1, - -1, 641, 633, -1, -1, -1, -1, -1, -1, -1, - 641, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, 709, - -1, -1, -1, -1, -1, -1, -1, -1, 709, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, 737, -1, -1, - -1, 741, -1, -1, -1, -1, 737, -1, -1, -1, - 741, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, 779, - -1, -1, -1, -1, -1, -1, -1, -1, 779, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, 842, 843, -1, 845, -1, 845, -1, -1, - -1, 842, 843, -1, 845, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, 883, -1, -1, -1, -1, -1, -1, - -1, -1, 883, -1, -1, -1, -1, -1, -1, 899, - -1, -1, -1, -1, -1, -1, 906, -1, 899, -1, - -1, -1, -1, -1, -1, 906, 916, -1, -1, -1, - 920, -1, -1, -1, -1, 916, 926, -1, -1, 920, - -1, -1, -1, 0, -1, 926, 3, 4, 5, 6, - 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, - 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, - 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, - 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, - 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, - 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, - 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, - 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, - 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, - 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, - 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, - 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, - 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, - 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, - 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, - 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, - 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, - 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, - 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, - 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, - 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, - 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, - 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, - 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, - 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, - 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, - 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, - 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, - 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, - 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, - 307, 308, 309, 310, 311, 312, 313, 314, 315, 316, - 317, 318, 319, 320, 321, 322, 323, 324, 325, 326, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, 351, -1, -1, -1, -1, -1, - -1, -1, 359, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, 373, 374, 375, 376, - 377, -1, -1, -1, -1, -1, -1, -1, -1, 386, - 387, 388, 389, 390, 391, 392, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, 408, 409, 410, 411, 412, 413, -1, -1, -1, - -1, -1, -1, -1, -1, 422, -1, 424, 425, 426, - 427, 428, 429, 430, 431, 432, 433, 434, 435, 436, - 437, 438, 439, 440, 441, 442, 443, 444, 445, 446, - 447, 448, 449, 450, 451, 452, 453, 454, 455, 3, - 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, - 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, - 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, - 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, - 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, - 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, - 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, - 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, - 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, - 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, - 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, - 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, - 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, - 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, - 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, - 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, - 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, - 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, - 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, - 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, - 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, - 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, - 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, - 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, - 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, - 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, - 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, - 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, - 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, - 294, 295, 296, 297, 298, 299, 300, 301, 302, 303, - 304, 305, 306, 307, 308, 309, 310, 311, 312, 313, - 314, 315, 316, 317, 318, 319, 320, 321, 322, 323, - 324, 325, 326, -1, -1, 329, 330, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, 348, 349, -1, 351, -1, 353, - 354, -1, -1, -1, -1, 359, 360, 361, 362, 363, - -1, -1, -1, -1, -1, -1, -1, -1, -1, 373, - 374, 375, 376, 377, -1, -1, -1, 381, 382, 383, - 384, 385, 386, 387, 388, 389, 390, 391, 392, 393, - 394, 395, 396, -1, 398, 399, 400, 401, 402, 403, - 404, 405, 406, 407, 408, 409, 410, 411, 412, 413, - 414, 415, 416, 417, 418, 419, 420, 421, 422, 423, - 424, 425, 426, 427, 428, 429, 430, 431, 432, 433, - 434, 435, 436, 437, 438, 439, 440, 441, 442, 443, - 444, 445, 446, 447, 448, 449, 450, 451, 452, 453, - 454, 455, 3, 4, 5, 6, 7, 8, 9, 10, - 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, - 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, - 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, - 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, - 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, - 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, - 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, - 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, - 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, - 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, - 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, - 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, - 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, - 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, - 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, - 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, - 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, - 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, - 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, - 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, - 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, - 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, - 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, - 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, - 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, - 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, - 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, - 281, 282, 283, 284, 285, 286, 287, 288, 289, 290, - 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, - 301, 302, 303, 304, 305, 306, 307, 308, 309, 310, - 311, 312, 313, 314, 315, 316, 317, 318, 319, 320, - 321, 322, 323, 324, 325, 326, -1, -1, 329, 330, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, 348, 349, -1, - 351, -1, 353, 354, -1, -1, -1, -1, 359, 360, - 361, 362, 363, -1, -1, -1, -1, -1, -1, -1, - -1, -1, 373, 374, 375, 376, 377, -1, -1, -1, - 381, 382, 383, 384, 385, 386, 387, 388, 389, 390, - 391, 392, 393, 394, 395, 396, -1, 398, 399, 400, - 401, 402, 403, 404, 405, 406, 407, 408, 409, 410, - 411, 412, 413, 414, 415, 416, 417, 418, 419, 420, - 421, 422, 423, 424, 425, 426, 427, 428, 429, 430, - 431, 432, 433, 434, 435, 436, 437, 438, 439, 440, - 441, 442, 443, 444, 445, 446, 447, 448, 449, 450, - 451, 452, 453, 454, 455, 3, 4, 5, 6, 7, + 0, 0, 345, 346, 347, 348, 349, 350, 351, 0, + 0, 0, 0, 0, 0, 0, 0, 352, 0, 353, + 354, 355, 356, 357, 358, 359, 360, 361, 362, 363, + 364, 365, 366, 367, 368, 369, 370, 371, 372, 373, + 374, 375, 376, 377, 378, 379, 380, 381, 382, 383, + 384, 385, 386, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, @@ -3199,156 +2444,21 @@ static const yytype_int16 yycheck[] = 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, 315, 316, 317, - 318, 319, 320, 321, 322, 323, 324, 325, 326, -1, - -1, 329, 330, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - 348, 349, -1, 351, -1, 353, -1, -1, -1, -1, - -1, 359, 360, 361, 362, 363, -1, -1, -1, -1, - -1, -1, -1, -1, -1, 373, 374, 375, 376, 377, - -1, -1, -1, 381, 382, 383, 384, 385, 386, 387, - 388, 389, 390, 391, 392, 393, 394, 395, 396, -1, - 398, 399, 400, 401, 402, 403, 404, 405, 406, 407, - 408, 409, 410, 411, 412, 413, 414, 415, 416, 417, - 418, 419, 420, 421, 422, 423, 424, 425, 426, 427, - 428, 429, 430, 431, 432, 433, 434, 435, 436, 437, - 438, 439, 440, 441, 442, 443, 444, 445, 446, 447, - 448, 449, 450, 451, 452, 453, 454, 455, 3, 4, - 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, - 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, - 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, - 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, - 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, - 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, - 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, - 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, - 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, - 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, - 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, - 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, - 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, - 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, - 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, - 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, - 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, - 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, - 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, - 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, - 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, - 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, - 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, - 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, - 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, - 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, - 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, - 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, - 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, - 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, - 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, - 315, 316, 317, 318, 319, 320, 321, 322, 323, 324, - 325, 326, -1, -1, 329, 330, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, 348, 349, -1, 351, -1, 353, -1, - -1, -1, -1, -1, 359, 360, 361, 362, 363, -1, - -1, -1, -1, -1, -1, -1, -1, -1, 373, 374, - 375, 376, 377, -1, -1, -1, 381, 382, 383, 384, - 385, 386, 387, 388, 389, 390, 391, 392, 393, 394, - 395, 396, -1, 398, 399, 400, 401, 402, 403, 404, - 405, 406, 407, 408, 409, 410, 411, 412, 413, 414, - 415, 416, 417, 418, 419, 420, 421, 422, 423, 424, - 425, 426, 427, 428, 429, 430, 431, 432, 433, 434, - 435, 436, 437, 438, 439, 440, 441, 442, 443, 444, - 445, 446, 447, 448, 449, 450, 451, 452, 453, 454, - 455, 3, 4, 5, 6, 7, 8, 9, 10, 11, - 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, - 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, - 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, - 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, - 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, - 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, - 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, - 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, - 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, - 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, - 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, - 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, - 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, - 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, - 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, - 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, - 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, - 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, - 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, - 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, - 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, - 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, - 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, - 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, - 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, - 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, - 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, - 282, 283, 284, 285, 286, 287, 288, 289, 290, 291, - 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, - 302, 303, 304, 305, 306, 307, 308, 309, 310, 311, - 312, 313, 314, 315, 316, 317, 318, 319, 320, 321, - 322, 323, 324, 325, 326, -1, -1, 329, 330, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, 348, 349, -1, 351, - -1, -1, -1, -1, -1, -1, -1, 359, 360, 361, - 362, 363, -1, -1, -1, -1, -1, -1, -1, -1, - -1, 373, 374, 375, 376, 377, -1, -1, -1, 381, - 382, 383, 384, 385, 386, 387, 388, 389, 390, 391, - 392, 393, 394, 395, 396, -1, 398, 399, 400, 401, - 402, 403, 404, 405, 406, 407, 408, 409, 410, 411, - 412, 413, 414, 415, 416, 417, 418, 419, 420, 421, - 422, 423, 424, 425, 426, 427, 428, 429, 430, 431, - 432, 433, 434, 435, 436, 437, 438, 439, 440, 441, - 442, 443, 444, 445, 446, 447, 448, 449, 450, 451, - 452, 453, 454, 455, 3, 4, 5, 6, 7, 8, - 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, - 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, - 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, - 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, - 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, - 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, - 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, - 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, - 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, - 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, - 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, - 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, - 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, - 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, - 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, - 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, - 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, - 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, - 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, - 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, - 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, - 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, - 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, - 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, - 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, - 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, - 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, - 279, 280, 281, 282, 283, 284, 285, 286, 287, 288, - 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, - 299, 300, 301, 302, 303, 304, 305, 306, 307, 308, - 309, 310, 311, 312, 313, 314, 315, 316, 317, 318, - 319, 320, 321, 322, 323, 324, 325, 326, -1, -1, - 329, 330, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, 348, - 349, -1, 351, -1, -1, -1, -1, -1, -1, -1, - 359, 360, 361, 362, 363, -1, -1, -1, -1, -1, - -1, -1, -1, -1, 373, 374, 375, 376, 377, -1, - -1, -1, 381, 382, 383, 384, 385, 386, 387, 388, - 389, 390, 391, 392, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, 408, - 409, 410, 411, 412, 413, 414, 415, 416, 417, 418, - 419, 420, 421, 422, -1, 424, 425, 426, 427, 428, - 429, 430, 431, 432, 433, 434, 435, 436, 437, 438, - 439, 440, 441, 442, 443, 444, 445, 446, 447, 448, - 449, 450, 451, 452, 453, 454, 455, 3, 4, 5, + 0, 0, 0, 321, 322, 323, 324, 325, 326, 327, + 328, 329, 330, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 871, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 333, + 334, 335, 336, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 338, 339, 340, 341, 342, 343, 344, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 345, 346, 347, 348, 349, 350, + 351, 0, 0, 0, 0, 0, 0, 0, 0, 352, + 0, 353, 354, 355, 356, 357, 358, 359, 360, 361, + 362, 363, 364, 365, 366, 367, 368, 369, 370, 371, + 372, 373, 374, 375, 376, 377, 378, 379, 380, 381, + 382, 383, 384, 385, 386, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, @@ -3380,298 +2490,27 @@ static const yytype_int16 yycheck[] = 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, 315, - 316, -1, -1, -1, 320, 321, 322, 323, 324, 325, - 326, -1, -1, 329, 330, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, 348, 349, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, 360, 361, 362, 363, -1, -1, - -1, -1, -1, -1, -1, -1, -1, 373, 374, 375, - 376, -1, -1, -1, -1, 381, 382, 383, 384, 385, - 386, 387, 388, 389, 390, 391, 392, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, 408, 409, 410, 411, 412, 413, 414, 415, - 416, 417, 418, 419, 420, 421, 422, -1, 424, 425, - 426, 427, 428, 429, 430, 431, 432, 433, 434, 435, - 436, 437, 438, 439, 440, 441, 442, 443, 444, 445, - 446, 447, 448, 449, 450, 451, 452, 453, 454, 455, - 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, - 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, - 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, - 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, - 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, - 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, - 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, - 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, - 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, - 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, - 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, - 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, - 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, - 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, - 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, - 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, - 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, - 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, - 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, - 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, - 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, - 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, - 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, - 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, - 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, - 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, - 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, - 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, - 283, 284, 285, 286, 287, 288, 289, 290, 291, 292, - 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, - 303, 304, 305, 306, 307, 308, 309, 310, 311, 312, - 313, 314, 315, 316, 317, 318, 319, 320, 321, 322, - 323, 324, 325, 326, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, 351, -1, - -1, -1, -1, -1, -1, -1, 359, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - 373, 374, 375, 376, 377, -1, -1, -1, -1, -1, - -1, -1, -1, 386, 387, 388, 389, 390, 391, 392, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, 408, 409, 410, 411, 412, - 413, -1, -1, -1, -1, -1, -1, -1, -1, 422, - -1, 424, 425, 426, 427, 428, 429, 430, 431, 432, - 433, 434, 435, 436, 437, 438, 439, 440, 441, 442, - 443, 444, 445, 446, 447, 448, 449, 450, 451, 452, - 453, 454, 455, 3, 4, 5, 6, 7, 8, 9, - 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, - 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, - 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, - 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, - 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, - 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, - 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, - 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, - 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, - 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, - 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, - 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, - 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, - 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, - 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, - 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, - 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, - 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, - 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, - 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, - 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, - 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, - 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, - 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, - 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, - 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, - 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, - 280, 281, 282, 283, 284, 285, 286, 287, 288, 289, - 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, - 300, 301, 302, 303, 304, 305, 306, 307, 308, 309, - 310, 311, 312, 313, 314, 315, 316, -1, -1, -1, - 320, 321, 322, 323, 324, 325, 326, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, 373, 374, 375, 376, -1, -1, -1, - -1, -1, -1, -1, -1, -1, 386, 387, 388, 389, - 390, 391, 392, 393, -1, -1, 396, -1, 398, 399, - -1, -1, 402, -1, -1, -1, -1, -1, 408, 409, - 410, 411, 412, 413, -1, -1, -1, -1, -1, -1, - -1, -1, 422, -1, 424, 425, 426, 427, 428, 429, - 430, 431, 432, 433, 434, 435, 436, 437, 438, 439, - 440, 441, 442, 443, 444, 445, 446, 447, 448, 449, - 450, 451, 452, 453, 454, 455, 3, 4, 5, 6, - 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, - 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, - 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, - 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, - 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, - 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, - 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, - 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, - 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, - 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, - 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, - 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, - 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, - 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, - 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, - 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, - 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, - 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, - 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, - 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, - 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, - 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, - 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, - 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, - 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, - 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, - 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, - 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, - 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, - 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, - 307, 308, 309, 310, 311, 312, 313, 314, 315, 316, - -1, -1, -1, 320, 321, 322, 323, 324, 325, 326, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, 359, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, 373, 374, 375, 376, - -1, -1, -1, -1, -1, -1, -1, -1, 385, 386, - 387, 388, 389, 390, 391, 392, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, 408, 409, 410, 411, 412, 413, -1, -1, -1, - -1, -1, -1, -1, -1, 422, -1, 424, 425, 426, - 427, 428, 429, 430, 431, 432, 433, 434, 435, 436, - 437, 438, 439, 440, 441, 442, 443, 444, 445, 446, - 447, 448, 449, 450, 451, 452, 453, 454, 455, 3, - 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, - 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, - 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, - 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, - 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, - 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, - 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, - 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, - 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, - 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, - 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, - 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, - 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, - 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, - 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, - 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, - 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, - 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, - 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, - 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, - 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, - 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, - 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, - 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, - 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, - 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, - 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, - 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, - 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, - 294, 295, 296, 297, 298, 299, 300, 301, 302, 303, - 304, 305, 306, 307, 308, 309, 310, 311, 312, 313, - 314, 315, 316, -1, -1, -1, 320, 321, 322, 323, - 324, 325, 326, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, 351, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, 373, - 374, 375, 376, -1, -1, -1, -1, -1, -1, -1, - -1, -1, 386, 387, 388, 389, 390, 391, 392, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, 408, 409, 410, 411, 412, 413, - -1, -1, -1, -1, -1, -1, -1, -1, 422, -1, - 424, 425, 426, 427, 428, 429, 430, 431, 432, 433, - 434, 435, 436, 437, 438, 439, 440, 441, 442, 443, - 444, 445, 446, 447, 448, 449, 450, 451, 452, 453, - 454, 455, 3, 4, 5, 6, 7, 8, 9, 10, - 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, - 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, - 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, - 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, - 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, - 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, - 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, - 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, - 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, - 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, - 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, - 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, - 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, - 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, - 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, - 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, - 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, - 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, - 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, - 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, - 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, - 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, - 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, - 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, - 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, - 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, - 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, - 281, 282, 283, 284, 285, 286, 287, 288, 289, 290, - 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, - 301, 302, 303, 304, 305, 306, 307, 308, 309, 310, - 311, 312, 313, 314, 315, 316, -1, -1, -1, 320, - 321, 322, 323, 324, 325, 326, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, 354, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, 373, 374, 375, 376, -1, -1, -1, -1, - -1, -1, -1, -1, -1, 386, 387, 388, 389, 390, - 391, 392, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, 408, 409, 410, - 411, 412, 413, -1, -1, -1, -1, -1, -1, -1, - -1, 422, -1, 424, 425, 426, 427, 428, 429, 430, - 431, 432, 433, 434, 435, 436, 437, 438, 439, 440, - 441, 442, 443, 444, 445, 446, 447, 448, 449, 450, - 451, 452, 453, 454, 455, 3, 4, 5, 6, 7, - 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, - 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, - 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, - 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, - 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, - 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, - 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, - 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, - 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, - 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, - 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, - 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, - 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, - 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, - 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, - 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, - 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, - 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, - 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, - 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, - 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, - 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, - 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, - 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, - 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, - 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, - 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, - 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, - 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, - 298, 299, 300, 301, 302, 303, 304, 305, 306, 307, - 308, 309, 310, 311, 312, 313, 314, 315, 316, -1, - -1, -1, 320, 321, 322, 323, 324, 325, 326, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, 354, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, 373, 374, 375, 376, -1, - -1, -1, -1, -1, -1, -1, -1, -1, 386, 387, - 388, 389, 390, 391, 392, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - 408, 409, 410, 411, 412, 413, -1, -1, -1, -1, - -1, -1, -1, -1, 422, -1, 424, 425, 426, 427, - 428, 429, 430, 431, 432, 433, 434, 435, 436, 437, - 438, 439, 440, 441, 442, 443, 444, 445, 446, 447, - 448, 449, 450, 451, 452, 453, 454, 455, 3, 4, + 316, 317, 0, 0, 0, 321, 322, 323, 324, 325, + 326, 327, 328, 329, 330, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 333, 334, 335, 336, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 338, 339, 340, 341, 342, 343, + 344, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 345, 346, 347, 348, + 349, 350, 351, 0, 0, 0, 0, 0, 0, 0, + 0, 352, 0, 353, 354, 355, 356, 357, 358, 359, + 360, 361, 362, 363, 364, 365, 366, 367, 368, 369, + 370, 371, 372, 373, 374, 375, 376, 377, 378, 379, + 380, 381, 382, 383, 384, 385, 386, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, - 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, + 55, 56, 57, 58, 0, 0, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, @@ -3682,7 +2521,7 @@ static const yytype_int16 yycheck[] = 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, - 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, + 165, 0, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, @@ -3697,75 +2536,1167 @@ static const yytype_int16 yycheck[] = 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, - 315, 316, -1, -1, -1, 320, 321, 322, 323, 324, - 325, 326, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, 354, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, 373, 374, - 375, 376, -1, -1, -1, -1, -1, -1, -1, -1, - -1, 386, 387, 388, 389, 390, 391, 392, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, 408, 409, 410, 411, 412, 413, -1, - -1, -1, -1, -1, -1, -1, -1, 422, -1, 424, - 425, 426, 427, 428, 429, 430, 431, 432, 433, 434, - 435, 436, 437, 438, 439, 440, 441, 442, 443, 444, - 445, 446, 447, 448, 449, 450, 451, 452, 453, 454, - 455, 3, 4, 5, 6, 7, 8, 9, 10, 11, - 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, - 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, - 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, - 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, - 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, - 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, - 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, - 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, - 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, - 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, - 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, - 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, - 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, - 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, - 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, - 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, - 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, - 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, - 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, - 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, - 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, - 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, - 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, - 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, - 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, - 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, - 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, - 282, 283, 284, 285, 286, 287, 288, 289, 290, 291, - 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, - 302, 303, 304, 305, 306, 307, 308, 309, 310, 311, - 312, 313, 314, 315, 316, -1, -1, -1, 320, 321, - 322, 323, 324, 325, 326, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, 373, 374, 375, 376, -1, -1, -1, -1, -1, - -1, -1, -1, -1, 386, 387, 388, 389, 390, 391, - 392, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, 408, 409, 410, 411, - 412, 413, -1, -1, -1, -1, -1, -1, -1, -1, - 422, -1, 424, 425, 426, 427, 428, 429, 430, 431, - 432, 433, 434, 435, 436, 437, 438, 439, 440, 441, - 442, 443, 444, 445, 446, 447, 448, 449, 450, 451, - 452, 453, 454, 455, 4, 5, 6, 7, 8, 9, - 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, - 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, - 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, - 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, - 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, - 60, -1, -1, 63, 64, 65, 66, 67, 68, 69, - 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, - 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, - 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, + 315, 316, 317, 0, 0, 0, 0, 0, 0, 324, + 0, 0, 0, 328, 329, 330, 0, 0, 509, 510, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 511, 512, 0, + 0, 0, 647, 791, 0, 0, 0, 0, 0, 513, + 514, 515, 516, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 517, 518, 519, 520, 521, 338, 0, 0, 0, 0, + 343, 344, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 522, 523, 524, 525, 526, 527, + 528, 529, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 365, 2, 3, 4, + 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, + 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, + 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, + 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, + 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, + 55, 56, 57, 58, 0, 0, 61, 62, 63, 64, + 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, + 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, + 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, + 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, + 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, + 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, + 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, + 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, + 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, + 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, + 165, 0, 167, 168, 169, 170, 171, 172, 173, 174, + 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, + 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, + 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, + 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, + 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, + 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, + 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, + 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, + 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, + 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, + 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, + 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, + 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, + 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, + 315, 316, 317, 0, 0, 0, 0, 0, 0, 324, + 0, 0, 0, 328, 329, 330, 0, 0, 509, 510, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 511, 512, 0, + 0, 0, 647, 902, 0, 0, 0, 0, 0, 513, + 514, 515, 516, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 517, 518, 519, 520, 521, 338, 0, 0, 0, 0, + 343, 344, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 522, 523, 524, 525, 526, 527, + 528, 529, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 365, 2, 3, 4, + 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, + 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, + 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, + 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, + 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, + 55, 56, 57, 58, 0, 0, 61, 62, 63, 64, + 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, + 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, + 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, + 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, + 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, + 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, + 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, + 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, + 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, + 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, + 165, 0, 167, 168, 169, 170, 171, 172, 173, 174, + 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, + 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, + 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, + 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, + 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, + 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, + 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, + 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, + 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, + 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, + 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, + 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, + 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, + 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, + 315, 316, 317, 0, 0, 0, 0, 0, 0, 324, + 0, 0, 0, 328, 329, 330, 0, 0, 509, 510, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 511, 512, 0, + 0, 585, 0, 0, 0, 0, 0, 0, 0, 513, + 514, 515, 516, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 517, 518, 519, 520, 521, 338, 0, 0, 0, 0, + 343, 344, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 522, 523, 524, 525, 526, 527, + 528, 529, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 365, 2, 3, 4, + 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, + 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, + 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, + 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, + 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, + 55, 56, 57, 58, 0, 0, 61, 62, 63, 64, + 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, + 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, + 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, + 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, + 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, + 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, + 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, + 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, + 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, + 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, + 165, 0, 167, 168, 169, 170, 171, 172, 173, 174, + 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, + 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, + 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, + 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, + 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, + 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, + 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, + 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, + 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, + 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, + 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, + 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, + 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, + 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, + 315, 316, 317, 0, 0, 0, 0, 0, 0, 324, + 0, 0, 0, 328, 329, 330, 0, 0, 509, 510, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 511, 512, 0, + 0, 0, 647, 0, 0, 0, 0, 0, 0, 513, + 514, 515, 516, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 517, 518, 519, 520, 521, 338, 0, 0, 0, 0, + 343, 344, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 522, 523, 524, 525, 526, 527, + 528, 529, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 365, 2, 3, 4, + 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, + 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, + 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, + 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, + 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, + 55, 56, 57, 58, 0, 0, 61, 62, 63, 64, + 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, + 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, + 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, + 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, + 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, + 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, + 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, + 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, + 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, + 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, + 165, 0, 167, 168, 169, 170, 171, 172, 173, 174, + 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, + 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, + 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, + 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, + 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, + 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, + 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, + 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, + 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, + 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, + 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, + 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, + 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, + 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, + 315, 316, 317, 0, 0, 0, 0, 0, 0, 324, + 0, 0, 0, 328, 329, 330, 0, 0, 509, 510, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 511, 512, 0, + 0, 750, 0, 0, 0, 0, 0, 0, 0, 513, + 514, 515, 516, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 517, 518, 519, 520, 521, 338, 0, 0, 0, 0, + 343, 344, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 522, 523, 524, 525, 526, 527, + 528, 529, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 365, 2, 3, 4, + 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, + 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, + 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, + 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, + 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, + 55, 56, 57, 58, 0, 0, 61, 62, 63, 64, + 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, + 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, + 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, + 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, + 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, + 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, + 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, + 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, + 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, + 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, + 165, 0, 167, 168, 169, 170, 171, 172, 173, 174, + 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, + 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, + 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, + 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, + 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, + 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, + 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, + 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, + 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, + 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, + 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, + 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, + 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, + 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, + 315, 316, 317, 0, 0, 0, 0, 0, 0, 324, + 0, 0, 0, 328, 329, 330, 0, 0, 509, 510, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 511, 512, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 761, 513, + 514, 515, 516, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 517, 518, 519, 520, 521, 338, 0, 0, 0, 0, + 343, 344, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 522, 523, 524, 525, 526, 527, + 528, 529, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 365, 2, 3, 4, + 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, + 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, + 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, + 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, + 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, + 55, 56, 57, 58, 0, 0, 61, 62, 63, 64, + 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, + 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, + 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, + 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, + 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, + 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, + 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, + 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, + 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, + 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, + 165, 0, 167, 168, 169, 170, 171, 172, 173, 174, + 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, + 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, + 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, + 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, + 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, + 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, + 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, + 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, + 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, + 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, + 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, + 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, + 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, + 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, + 315, 316, 317, 0, 0, 0, 0, 0, 0, 324, + 0, 0, 0, 328, 329, 330, 0, 0, 509, 510, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 511, 512, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 513, + 514, 515, 516, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 517, 518, 519, 520, 521, 338, 0, 0, 0, 0, + 343, 344, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 522, 523, 524, 525, 526, 527, + 528, 529, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 365, 2, 3, 4, + 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, + 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, + 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, + 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, + 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, + 55, 56, 57, 58, 0, 0, 61, 62, 63, 64, + 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, + 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, + 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, + 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, + 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, + 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, + 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, + 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, + 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, + 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, + 165, 0, 167, 168, 169, 170, 171, 172, 173, 174, + 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, + 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, + 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, + 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, + 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, + 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, + 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, + 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, + 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, + 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, + 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, + 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, + 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, + 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, + 315, 316, 317, 0, 0, 0, 0, 0, 0, 324, + 0, 0, 0, 328, 329, 330, 0, 0, 509, 510, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 511, 512, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 513, + 514, 515, 516, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 517, 518, 519, 520, 521, 338, 0, 0, 0, 0, + 343, 665, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 522, 523, 524, 525, 526, 527, + 528, 529, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 365, 2, 3, 4, + 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, + 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, + 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, + 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, + 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, + 55, 56, 57, 58, 0, 0, 61, 62, 63, 64, + 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, + 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, + 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, + 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, + 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, + 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, + 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, + 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, + 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, + 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, + 165, 0, 167, 168, 169, 170, 171, 172, 173, 174, + 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, + 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, + 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, + 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, + 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, + 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, + 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, + 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, + 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, + 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, + 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, + 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, + 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, + 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, + 315, 316, 317, 0, 0, 0, 0, 0, 0, 324, + 0, 0, 0, 328, 329, 330, 0, 0, 509, 510, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 511, 512, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 513, + 514, 515, 516, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 517, 518, 519, 520, 710, 338, 0, 0, 0, 0, + 343, 344, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 522, 523, 524, 525, 526, 527, + 528, 529, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 365, 2, 3, 4, + 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, + 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, + 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, + 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, + 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, + 55, 56, 57, 58, 0, 0, 61, 62, 63, 64, + 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, + 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, + 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, + 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, + 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, + 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, + 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, + 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, + 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, + 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, + 165, 0, 167, 168, 169, 170, 171, 172, 173, 174, + 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, + 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, + 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, + 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, + 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, + 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, + 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, + 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, + 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, + 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, + 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, + 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, + 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, + 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, + 315, 316, 317, 0, 0, 0, 0, 0, 0, 324, + 0, 0, 0, 328, 329, 330, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 338, 0, 0, 0, 0, + 343, 344 +}; + +static const yytype_int16 yycheck[] = +{ + 0, 0, 0, 392, 503, 411, 0, 633, 411, 491, + 416, 444, 0, 449, 552, 568, 753, 450, 562, 579, + 512, 577, 411, 557, 354, 400, 342, 416, 423, 354, + 568, 645, 357, 647, 337, 338, 650, 571, 365, 538, + 359, 362, 354, 354, 915, 391, 580, 436, 357, 362, + 355, 922, 365, 374, 355, 491, 365, 387, 388, 389, + 390, 932, 378, 388, 391, 440, 355, 500, 501, 415, + 373, 374, 391, 509, 510, 557, 388, 388, 356, 355, + 357, 456, 335, 336, 362, 357, 568, 364, 355, 571, + 357, 651, 357, 365, 483, 373, 357, 364, 580, 364, + 356, 356, 355, 364, 357, 541, 362, 362, 361, 355, + 418, 419, 420, 421, 422, 423, 424, 355, 600, 356, + 612, 557, 614, 359, 356, 362, 362, 356, 355, 365, + 362, 757, 568, 362, 550, 571, 388, 356, 388, 391, + 556, 391, 558, 362, 580, 561, 645, 563, 647, 565, + 566, 650, 356, 356, 570, 550, 356, 356, 362, 362, + 356, 356, 362, 362, 600, 664, 362, 362, 660, 725, + 358, 566, 388, 355, 362, 391, 790, 344, 345, 346, + 347, 348, 349, 350, 351, 352, 353, 356, 577, 357, + 579, 388, 356, 362, 391, 356, 356, 364, 362, 936, + 575, 362, 362, 356, 356, 356, 356, 356, 356, 362, + 362, 362, 362, 362, 362, 356, 356, 356, 356, 356, + 355, 362, 362, 362, 362, 362, 358, 358, 333, 334, + 362, 362, 858, 669, 367, 355, 369, 643, 362, 795, + 643, 387, 388, 389, 390, 391, 736, 737, 738, 739, + 362, 365, 388, 365, 643, 391, 870, 387, 388, 389, + 390, 388, 651, 388, 391, 388, 391, 759, 391, 388, + 388, 763, 391, 391, 827, 356, 829, 821, 822, 373, + 814, 815, 781, 782, 360, 388, 362, 720, 391, 827, + 391, 790, 365, 729, 730, 731, 732, 733, 734, 735, + 736, 737, 738, 739, 740, 741, 742, 743, 744, 745, + 746, 747, 926, 391, 388, 362, 942, 391, 365, 362, + 362, 362, 365, 365, 365, 380, 381, 382, 339, 340, + 362, 363, 814, 815, 362, 363, 725, 370, 371, 372, + 732, 733, 391, 734, 735, 827, 359, 829, 357, 359, + 740, 741, 391, 391, 391, 357, 391, 365, 364, 356, + 364, 362, 365, 377, 856, 356, 362, 859, 391, 362, + 362, 870, 362, 362, 357, 362, 362, 362, 814, 815, + 362, 362, 355, 355, 364, 356, 355, 355, 354, 341, + 357, 827, 392, 829, 358, 343, 391, 376, 375, 358, + 400, 355, 360, 365, 392, 365, 795, 899, 408, 408, + 408, 411, 400, 912, 408, 391, 416, 416, 416, 355, + 408, 391, 355, 411, 916, 365, 426, 926, 416, 355, + 365, 363, 355, 362, 365, 365, 436, 435, 365, 931, + 440, 391, 391, 356, 364, 362, 362, 356, 436, 449, + 356, 358, 440, 859, 358, 354, 456, 362, 399, 354, + 388, 355, 360, 356, 364, 356, 391, 359, 456, 365, + 859, 359, 359, 742, 360, 365, 744, 743, 582, 403, + 436, 745, 337, 483, 746, 440, 719, 747, 861, 440, + 834, 921, 932, 899, 494, 483, 933, 434, 861, 643, + 899, 643, 573, 810, 819, 408, 494, 817, 812, 643, + 899, 825, 829, 815, -1, -1, 822, -1, -1, -1, + -1, 821, -1, -1, -1, -1, -1, -1, 827, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, 546, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, 575, -1, 577, -1, 579, + -1, -1, -1, -1, -1, -1, -1, 575, -1, 577, + -1, 579, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, 633, -1, -1, -1, -1, -1, -1, + -1, -1, -1, 643, -1, 633, -1, -1, -1, -1, + -1, 651, -1, -1, -1, 643, -1, -1, -1, -1, + -1, -1, -1, 651, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, 725, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, 725, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, 753, -1, -1, -1, 757, -1, -1, + -1, -1, -1, -1, -1, 753, -1, -1, -1, 757, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, 795, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, 795, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, 858, 859, + -1, 861, -1, 861, -1, -1, -1, -1, -1, -1, + 858, 859, -1, 861, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, 899, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, 899, -1, -1, -1, 915, -1, -1, -1, -1, + -1, -1, 922, -1, -1, -1, -1, 915, -1, -1, + -1, -1, 932, -1, 922, -1, 936, -1, -1, -1, + -1, -1, 942, -1, 932, -1, -1, -1, 936, -1, + -1, -1, 0, -1, 942, 3, 4, 5, 6, 7, + 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, + 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, + 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, + 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, + 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, + 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, + 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, + 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, + 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, + 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, + 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, + 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, + 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, + 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, + 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, + 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, + 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, + 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, + 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, + 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, + 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, + 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, + 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, + 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, + 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, + 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, + 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, + 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, + 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, + 298, 299, 300, 301, 302, 303, 304, 305, 306, 307, + 308, 309, 310, 311, 312, 313, 314, 315, 316, 317, + 318, 319, 320, 321, 322, 323, 324, 325, 326, 327, + 328, 329, 330, 331, 332, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, 357, + -1, -1, -1, -1, -1, -1, -1, 365, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, 379, 380, 381, 382, 383, -1, -1, -1, -1, + -1, -1, -1, -1, 392, 393, 394, 395, 396, 397, + 398, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, 414, 415, 416, 417, + 418, 419, 420, -1, -1, -1, -1, -1, -1, -1, + -1, 429, -1, 431, 432, 433, 434, 435, 436, 437, + 438, 439, 440, 441, 442, 443, 444, 445, 446, 447, + 448, 449, 450, 451, 452, 453, 454, 455, 456, 457, + 458, 459, 460, 461, 462, 463, 464, 3, 4, 5, + 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, + 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, + 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, + 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, + 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, + 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, + 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, + 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, + 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, + 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, + 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, + 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, + 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, + 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, + 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, + 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, + 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, + 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, + 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, + 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, + 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, + 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, + 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, + 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, + 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, + 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, + 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, + 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, + 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, + 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, + 306, 307, 308, 309, 310, 311, 312, 313, 314, 315, + 316, 317, 318, 319, 320, 321, 322, 323, 324, 325, + 326, 327, 328, 329, 330, 331, 332, -1, -1, 335, + 336, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, 354, 355, + -1, 357, -1, 359, 360, -1, -1, -1, -1, 365, + 366, 367, 368, 369, -1, -1, -1, -1, -1, -1, + -1, -1, -1, 379, 380, 381, 382, 383, -1, -1, + -1, 387, 388, 389, 390, 391, 392, 393, 394, 395, + 396, 397, 398, 399, 400, 401, 402, -1, 404, 405, + 406, 407, 408, 409, 410, 411, 412, 413, 414, 415, + 416, 417, 418, 419, 420, 421, 422, 423, 424, 425, + 426, 427, 428, 429, 430, 431, 432, 433, 434, 435, + 436, 437, 438, 439, 440, 441, 442, 443, 444, 445, + 446, 447, 448, 449, 450, 451, 452, 453, 454, 455, + 456, 457, 458, 459, 460, 461, 462, 463, 464, 3, + 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, + 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, + 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, + 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, + 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, + 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, + 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, + 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, + 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, + 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, + 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, + 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, + 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, + 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, + 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, + 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, + 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, + 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, + 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, + 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, + 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, + 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, + 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, + 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, + 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, + 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, + 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, + 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, + 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, + 294, 295, 296, 297, 298, 299, 300, 301, 302, 303, + 304, 305, 306, 307, 308, 309, 310, 311, 312, 313, + 314, 315, 316, 317, 318, 319, 320, 321, 322, 323, + 324, 325, 326, 327, 328, 329, 330, 331, 332, -1, + -1, 335, 336, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + 354, 355, -1, 357, -1, 359, 360, -1, -1, -1, + -1, 365, 366, 367, 368, 369, -1, -1, -1, -1, + -1, -1, -1, -1, -1, 379, 380, 381, 382, 383, + -1, -1, -1, 387, 388, 389, 390, 391, 392, 393, + 394, 395, 396, 397, 398, 399, 400, 401, 402, -1, + 404, 405, 406, 407, 408, 409, 410, 411, 412, 413, + 414, 415, 416, 417, 418, 419, 420, 421, 422, 423, + 424, 425, 426, 427, 428, 429, 430, 431, 432, 433, + 434, 435, 436, 437, 438, 439, 440, 441, 442, 443, + 444, 445, 446, 447, 448, 449, 450, 451, 452, 453, + 454, 455, 456, 457, 458, 459, 460, 461, 462, 463, + 464, 3, 4, 5, 6, 7, 8, 9, 10, 11, + 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, + 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, + 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, + 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, + 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, + 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, + 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, + 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, + 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, + 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, + 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, + 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, + 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, + 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, + 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, + 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, + 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, + 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, + 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, + 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, + 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, + 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, + 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, + 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, + 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, + 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, + 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, + 282, 283, 284, 285, 286, 287, 288, 289, 290, 291, + 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, + 302, 303, 304, 305, 306, 307, 308, 309, 310, 311, + 312, 313, 314, 315, 316, 317, 318, 319, 320, 321, + 322, 323, 324, 325, 326, 327, 328, 329, 330, 331, + 332, -1, -1, 335, 336, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, 354, 355, -1, 357, -1, 359, -1, -1, + -1, -1, -1, 365, 366, 367, 368, 369, -1, -1, + -1, -1, -1, -1, -1, -1, -1, 379, 380, 381, + 382, 383, -1, -1, -1, 387, 388, 389, 390, 391, + 392, 393, 394, 395, 396, 397, 398, 399, 400, 401, + 402, -1, 404, 405, 406, 407, 408, 409, 410, 411, + 412, 413, 414, 415, 416, 417, 418, 419, 420, 421, + 422, 423, 424, 425, 426, 427, 428, 429, 430, 431, + 432, 433, 434, 435, 436, 437, 438, 439, 440, 441, + 442, 443, 444, 445, 446, 447, 448, 449, 450, 451, + 452, 453, 454, 455, 456, 457, 458, 459, 460, 461, + 462, 463, 464, 3, 4, 5, 6, 7, 8, 9, + 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, + 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, + 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, + 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, + 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, + 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, + 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, + 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, + 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, + 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, + 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, + 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, + 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, + 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, + 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, + 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, + 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, + 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, + 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, + 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, + 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, + 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, + 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, + 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, + 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, + 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, + 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, + 280, 281, 282, 283, 284, 285, 286, 287, 288, 289, + 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, + 300, 301, 302, 303, 304, 305, 306, 307, 308, 309, + 310, 311, 312, 313, 314, 315, 316, 317, 318, 319, + 320, 321, 322, 323, 324, 325, 326, 327, 328, 329, + 330, 331, 332, -1, -1, 335, 336, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, 354, 355, -1, 357, -1, 359, + -1, -1, -1, -1, -1, 365, 366, 367, 368, 369, + -1, -1, -1, -1, -1, -1, -1, -1, -1, 379, + 380, 381, 382, 383, -1, -1, -1, 387, 388, 389, + 390, 391, 392, 393, 394, 395, 396, 397, 398, 399, + 400, 401, 402, -1, 404, 405, 406, 407, 408, 409, + 410, 411, 412, 413, 414, 415, 416, 417, 418, 419, + 420, 421, 422, 423, 424, 425, 426, 427, 428, 429, + 430, 431, 432, 433, 434, 435, 436, 437, 438, 439, + 440, 441, 442, 443, 444, 445, 446, 447, 448, 449, + 450, 451, 452, 453, 454, 455, 456, 457, 458, 459, + 460, 461, 462, 463, 464, 3, 4, 5, 6, 7, + 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, + 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, + 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, + 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, + 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, + 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, + 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, + 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, + 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, + 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, + 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, + 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, + 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, + 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, + 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, + 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, + 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, + 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, + 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, + 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, + 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, + 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, + 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, + 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, + 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, + 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, + 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, + 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, + 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, + 298, 299, 300, 301, 302, 303, 304, 305, 306, 307, + 308, 309, 310, 311, 312, 313, 314, 315, 316, 317, + 318, 319, 320, 321, 322, 323, 324, 325, 326, 327, + 328, 329, 330, 331, 332, -1, -1, 335, 336, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, 354, 355, -1, 357, + -1, -1, -1, -1, -1, -1, -1, 365, 366, 367, + 368, 369, -1, -1, -1, -1, -1, -1, -1, -1, + -1, 379, 380, 381, 382, 383, -1, -1, -1, 387, + 388, 389, 390, 391, 392, 393, 394, 395, 396, 397, + 398, 399, 400, 401, 402, -1, 404, 405, 406, 407, + 408, 409, 410, 411, 412, 413, 414, 415, 416, 417, + 418, 419, 420, 421, 422, 423, 424, 425, 426, 427, + 428, 429, 430, 431, 432, 433, 434, 435, 436, 437, + 438, 439, 440, 441, 442, 443, 444, 445, 446, 447, + 448, 449, 450, 451, 452, 453, 454, 455, 456, 457, + 458, 459, 460, 461, 462, 463, 464, 3, 4, 5, + 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, + 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, + 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, + 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, + 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, + 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, + 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, + 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, + 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, + 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, + 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, + 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, + 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, + 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, + 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, + 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, + 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, + 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, + 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, + 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, + 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, + 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, + 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, + 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, + 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, + 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, + 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, + 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, + 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, + 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, + 306, 307, 308, 309, 310, 311, 312, 313, 314, 315, + 316, 317, 318, 319, 320, 321, 322, 323, 324, 325, + 326, 327, 328, 329, 330, 331, 332, -1, -1, 335, + 336, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, 354, 355, + -1, 357, -1, -1, -1, -1, -1, -1, -1, 365, + 366, 367, 368, 369, -1, -1, -1, -1, -1, -1, + -1, -1, -1, 379, 380, 381, 382, 383, -1, -1, + -1, 387, 388, 389, 390, 391, 392, 393, 394, 395, + 396, 397, 398, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, 414, 415, + 416, 417, 418, 419, 420, 421, 422, 423, 424, 425, + 426, 427, 428, 429, -1, 431, 432, 433, 434, 435, + 436, 437, 438, 439, 440, 441, 442, 443, 444, 445, + 446, 447, 448, 449, 450, 451, 452, 453, 454, 455, + 456, 457, 458, 459, 460, 461, 462, 463, 464, 3, + 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, + 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, + 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, + 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, + 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, + 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, + 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, + 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, + 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, + 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, + 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, + 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, + 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, + 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, + 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, + 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, + 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, + 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, + 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, + 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, + 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, + 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, + 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, + 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, + 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, + 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, + 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, + 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, + 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, + 294, 295, 296, 297, 298, 299, 300, 301, 302, 303, + 304, 305, 306, 307, 308, 309, 310, 311, 312, 313, + 314, 315, 316, 317, 318, 319, -1, -1, -1, 323, + 324, 325, 326, 327, 328, 329, 330, 331, 332, -1, + -1, 335, 336, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + 354, 355, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, 366, 367, 368, 369, -1, -1, -1, -1, + -1, -1, -1, -1, -1, 379, 380, 381, 382, -1, + -1, -1, -1, 387, 388, 389, 390, 391, 392, 393, + 394, 395, 396, 397, 398, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + 414, 415, 416, 417, 418, 419, 420, 421, 422, 423, + 424, 425, 426, 427, 428, 429, -1, 431, 432, 433, + 434, 435, 436, 437, 438, 439, 440, 441, 442, 443, + 444, 445, 446, 447, 448, 449, 450, 451, 452, 453, + 454, 455, 456, 457, 458, 459, 460, 461, 462, 463, + 464, 3, 4, 5, 6, 7, 8, 9, 10, 11, + 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, + 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, + 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, + 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, + 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, + 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, + 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, + 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, + 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, + 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, + 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, + 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, + 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, + 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, + 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, + 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, + 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, + 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, + 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, + 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, + 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, + 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, + 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, + 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, + 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, + 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, + 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, + 282, 283, 284, 285, 286, 287, 288, 289, 290, 291, + 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, + 302, 303, 304, 305, 306, 307, 308, 309, 310, 311, + 312, 313, 314, 315, 316, 317, 318, 319, 320, 321, + 322, 323, 324, 325, 326, 327, 328, 329, 330, 331, + 332, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, 357, -1, -1, -1, -1, + -1, -1, -1, 365, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, 379, 380, 381, + 382, 383, -1, -1, -1, -1, -1, -1, -1, -1, + 392, 393, 394, 395, 396, 397, 398, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, 414, 415, 416, 417, 418, 419, 420, -1, + -1, -1, -1, -1, -1, -1, -1, 429, -1, 431, + 432, 433, 434, 435, 436, 437, 438, 439, 440, 441, + 442, 443, 444, 445, 446, 447, 448, 449, 450, 451, + 452, 453, 454, 455, 456, 457, 458, 459, 460, 461, + 462, 463, 464, 3, 4, 5, 6, 7, 8, 9, + 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, + 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, + 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, + 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, + 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, + 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, + 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, + 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, + 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, + 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, + 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, + 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, + 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, + 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, + 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, + 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, + 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, + 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, + 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, + 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, + 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, + 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, + 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, + 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, + 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, + 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, + 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, + 280, 281, 282, 283, 284, 285, 286, 287, 288, 289, + 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, + 300, 301, 302, 303, 304, 305, 306, 307, 308, 309, + 310, 311, 312, 313, 314, 315, 316, 317, 318, 319, + -1, -1, -1, 323, 324, 325, 326, 327, 328, 329, + 330, 331, 332, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, 379, + 380, 381, 382, -1, -1, -1, -1, -1, -1, -1, + -1, -1, 392, 393, 394, 395, 396, 397, 398, 399, + -1, -1, 402, -1, 404, 405, -1, -1, 408, -1, + -1, -1, -1, -1, 414, 415, 416, 417, 418, 419, + 420, -1, -1, -1, -1, -1, -1, -1, -1, 429, + -1, 431, 432, 433, 434, 435, 436, 437, 438, 439, + 440, 441, 442, 443, 444, 445, 446, 447, 448, 449, + 450, 451, 452, 453, 454, 455, 456, 457, 458, 459, + 460, 461, 462, 463, 464, 3, 4, 5, 6, 7, + 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, + 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, + 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, + 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, + 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, + 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, + 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, + 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, + 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, + 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, + 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, + 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, + 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, + 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, + 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, + 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, + 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, + 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, + 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, + 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, + 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, + 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, + 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, + 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, + 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, + 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, + 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, + 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, + 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, + 298, 299, 300, 301, 302, 303, 304, 305, 306, 307, + 308, 309, 310, 311, 312, 313, 314, 315, 316, 317, + 318, 319, -1, -1, -1, 323, 324, 325, 326, 327, + 328, 329, 330, 331, 332, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, 365, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, 379, 380, 381, 382, -1, -1, -1, -1, -1, + -1, -1, -1, 391, 392, 393, 394, 395, 396, 397, + 398, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, 414, 415, 416, 417, + 418, 419, 420, -1, -1, -1, -1, -1, -1, -1, + -1, 429, -1, 431, 432, 433, 434, 435, 436, 437, + 438, 439, 440, 441, 442, 443, 444, 445, 446, 447, + 448, 449, 450, 451, 452, 453, 454, 455, 456, 457, + 458, 459, 460, 461, 462, 463, 464, 3, 4, 5, + 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, + 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, + 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, + 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, + 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, + 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, + 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, + 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, + 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, + 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, + 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, + 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, + 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, + 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, + 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, + 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, + 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, + 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, + 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, + 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, + 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, + 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, + 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, + 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, + 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, + 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, + 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, + 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, + 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, + 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, + 306, 307, 308, 309, 310, 311, 312, 313, 314, 315, + 316, 317, 318, 319, -1, -1, -1, 323, 324, 325, + 326, 327, 328, 329, 330, 331, 332, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, 357, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, 379, 380, 381, 382, -1, -1, -1, + -1, -1, -1, -1, -1, -1, 392, 393, 394, 395, + 396, 397, 398, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, 414, 415, + 416, 417, 418, 419, 420, -1, -1, -1, -1, -1, + -1, -1, -1, 429, -1, 431, 432, 433, 434, 435, + 436, 437, 438, 439, 440, 441, 442, 443, 444, 445, + 446, 447, 448, 449, 450, 451, 452, 453, 454, 455, + 456, 457, 458, 459, 460, 461, 462, 463, 464, 3, + 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, + 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, + 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, + 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, + 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, + 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, + 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, + 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, + 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, + 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, + 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, + 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, + 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, + 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, + 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, + 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, + 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, + 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, + 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, + 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, + 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, + 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, + 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, + 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, + 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, + 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, + 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, + 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, + 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, + 294, 295, 296, 297, 298, 299, 300, 301, 302, 303, + 304, 305, 306, 307, 308, 309, 310, 311, 312, 313, + 314, 315, 316, 317, 318, 319, -1, -1, -1, 323, + 324, 325, 326, 327, 328, 329, 330, 331, 332, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, 360, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, 379, 380, 381, 382, -1, + -1, -1, -1, -1, -1, -1, -1, -1, 392, 393, + 394, 395, 396, 397, 398, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + 414, 415, 416, 417, 418, 419, 420, -1, -1, -1, + -1, -1, -1, -1, -1, 429, -1, 431, 432, 433, + 434, 435, 436, 437, 438, 439, 440, 441, 442, 443, + 444, 445, 446, 447, 448, 449, 450, 451, 452, 453, + 454, 455, 456, 457, 458, 459, 460, 461, 462, 463, + 464, 3, 4, 5, 6, 7, 8, 9, 10, 11, + 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, + 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, + 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, + 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, + 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, + 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, + 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, + 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, + 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, + 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, + 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, + 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, + 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, + 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, + 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, + 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, + 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, + 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, + 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, + 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, + 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, + 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, + 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, + 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, + 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, + 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, + 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, + 282, 283, 284, 285, 286, 287, 288, 289, 290, 291, + 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, + 302, 303, 304, 305, 306, 307, 308, 309, 310, 311, + 312, 313, 314, 315, 316, 317, 318, 319, -1, -1, + -1, 323, 324, 325, 326, 327, 328, 329, 330, 331, + 332, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, 360, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, 379, 380, 381, + 382, -1, -1, -1, -1, -1, -1, -1, -1, -1, + 392, 393, 394, 395, 396, 397, 398, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, 414, 415, 416, 417, 418, 419, 420, -1, + -1, -1, -1, -1, -1, -1, -1, 429, -1, 431, + 432, 433, 434, 435, 436, 437, 438, 439, 440, 441, + 442, 443, 444, 445, 446, 447, 448, 449, 450, 451, + 452, 453, 454, 455, 456, 457, 458, 459, 460, 461, + 462, 463, 464, 3, 4, 5, 6, 7, 8, 9, + 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, + 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, + 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, + 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, + 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, + 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, + 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, + 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, + 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, @@ -3787,19 +3718,200 @@ static const yytype_int16 yycheck[] = 280, 281, 282, 283, 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, 307, 308, 309, - 310, 311, 312, 313, 314, 315, 316, -1, -1, -1, - -1, -1, -1, 323, -1, -1, -1, -1, -1, 329, - 330, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, 348, 349, - -1, -1, -1, 353, 354, -1, -1, -1, -1, -1, - 360, 361, 362, 363, -1, -1, -1, -1, -1, -1, + 310, 311, 312, 313, 314, 315, 316, 317, 318, 319, + -1, -1, -1, 323, 324, 325, 326, 327, 328, 329, + 330, 331, 332, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + 360, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, 379, + 380, 381, 382, -1, -1, -1, -1, -1, -1, -1, + -1, -1, 392, 393, 394, 395, 396, 397, 398, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, 414, 415, 416, 417, 418, 419, + 420, -1, -1, -1, -1, -1, -1, -1, -1, 429, + -1, 431, 432, 433, 434, 435, 436, 437, 438, 439, + 440, 441, 442, 443, 444, 445, 446, 447, 448, 449, + 450, 451, 452, 453, 454, 455, 456, 457, 458, 459, + 460, 461, 462, 463, 464, 3, 4, 5, 6, 7, + 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, + 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, + 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, + 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, + 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, + 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, + 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, + 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, + 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, + 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, + 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, + 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, + 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, + 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, + 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, + 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, + 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, + 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, + 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, + 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, + 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, + 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, + 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, + 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, + 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, + 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, + 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, + 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, + 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, + 298, 299, 300, 301, 302, 303, 304, 305, 306, 307, + 308, 309, 310, 311, 312, 313, 314, 315, 316, 317, + 318, 319, -1, -1, -1, 323, 324, 325, 326, 327, + 328, 329, 330, 331, 332, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, 379, 380, 381, 382, -1, -1, -1, -1, -1, + -1, -1, -1, -1, 392, 393, 394, 395, 396, 397, + 398, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, 414, 415, 416, 417, + 418, 419, 420, -1, -1, -1, -1, -1, -1, -1, + -1, 429, -1, 431, 432, 433, 434, 435, 436, 437, + 438, 439, 440, 441, 442, 443, 444, 445, 446, 447, + 448, 449, 450, 451, 452, 453, 454, 455, 456, 457, + 458, 459, 460, 461, 462, 463, 464, 4, 5, 6, + 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, + 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, + 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, + 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, + 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, + 57, 58, 59, 60, -1, -1, 63, 64, 65, 66, + 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, + 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, + 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, + 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, + 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, + 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, + 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, + 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, + 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, + 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, + 167, -1, 169, 170, 171, 172, 173, 174, 175, 176, + 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, + 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, + 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, + 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, + 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, + 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, + 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, + 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, + 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, + 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, + 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, + 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, + 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, + 307, 308, 309, 310, 311, 312, 313, 314, 315, 316, + 317, 318, 319, -1, -1, -1, -1, -1, -1, 326, + -1, -1, -1, 330, 331, 332, -1, -1, 335, 336, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, 354, 355, -1, + -1, -1, 359, 360, -1, -1, -1, -1, -1, 366, + 367, 368, 369, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + 387, 388, 389, 390, 391, 392, -1, -1, -1, -1, + 397, 398, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, 421, 422, 423, 424, 425, 426, + 427, 428, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, 443, 4, 5, 6, + 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, + 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, + 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, + 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, + 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, + 57, 58, 59, 60, -1, -1, 63, 64, 65, 66, + 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, + 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, + 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, + 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, + 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, + 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, + 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, + 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, + 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, + 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, + 167, -1, 169, 170, 171, 172, 173, 174, 175, 176, + 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, + 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, + 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, + 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, + 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, + 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, + 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, + 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, + 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, + 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, + 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, + 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, + 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, + 307, 308, 309, 310, 311, 312, 313, 314, 315, 316, + 317, 318, 319, -1, -1, -1, -1, -1, -1, 326, + -1, -1, -1, 330, 331, 332, -1, -1, 335, 336, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, 354, 355, -1, + -1, -1, 359, 360, -1, -1, -1, -1, -1, 366, + 367, 368, 369, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + 387, 388, 389, 390, 391, 392, -1, -1, -1, -1, + 397, 398, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, 421, 422, 423, 424, 425, 426, + 427, 428, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, 443, 4, 5, 6, + 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, + 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, + 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, + 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, + 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, + 57, 58, 59, 60, -1, -1, 63, 64, 65, 66, + 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, + 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, + 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, + 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, + 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, + 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, + 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, + 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, + 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, + 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, + 167, -1, 169, 170, 171, 172, 173, 174, 175, 176, + 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, + 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, + 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, + 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, + 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, + 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, + 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, + 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, + 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, + 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, + 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, + 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, + 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, + 307, 308, 309, 310, 311, 312, 313, 314, 315, 316, + 317, 318, 319, -1, -1, -1, -1, -1, -1, 326, + -1, -1, -1, 330, 331, 332, -1, -1, 335, 336, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, 381, 382, 383, 384, 385, 386, -1, -1, -1, - -1, 391, 392, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, 354, 355, -1, + -1, 358, -1, -1, -1, -1, -1, -1, -1, 366, + 367, 368, 369, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, 414, 415, 416, 417, 418, 419, - 420, 421, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, 436, 4, 5, 6, + 387, 388, 389, 390, 391, 392, -1, -1, -1, -1, + 397, 398, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, 421, 422, 423, 424, 425, 426, + 427, 428, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, 443, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, @@ -3816,7 +3928,7 @@ static const yytype_int16 yycheck[] = 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, - 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, + 167, -1, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, @@ -3831,364 +3943,283 @@ static const yytype_int16 yycheck[] = 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, 315, 316, - -1, -1, -1, -1, -1, -1, 323, -1, -1, -1, - -1, -1, 329, 330, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, 348, 349, -1, -1, -1, 353, 354, -1, -1, - -1, -1, -1, 360, 361, 362, 363, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, 381, 382, 383, 384, 385, 386, - -1, -1, -1, -1, 391, 392, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, 414, 415, 416, - 417, 418, 419, 420, 421, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, 436, - 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, - 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, - 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, - 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, - 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, - 54, 55, 56, 57, 58, 59, 60, -1, -1, 63, - 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, - 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, - 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, - 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, - 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, - 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, - 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, - 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, - 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, - 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, - 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, - 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, - 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, - 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, - 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, - 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, - 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, - 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, - 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, - 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, - 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, - 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, - 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, - 294, 295, 296, 297, 298, 299, 300, 301, 302, 303, - 304, 305, 306, 307, 308, 309, 310, 311, 312, 313, - 314, 315, 316, -1, -1, -1, -1, -1, -1, 323, - -1, -1, -1, -1, -1, 329, 330, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, 348, 349, -1, -1, 352, -1, - -1, -1, -1, -1, -1, -1, 360, 361, 362, 363, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, 381, 382, 383, - 384, 385, 386, -1, -1, -1, -1, 391, 392, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - 414, 415, 416, 417, 418, 419, 420, 421, -1, -1, + 317, 318, 319, -1, -1, -1, -1, -1, -1, 326, + -1, -1, -1, 330, 331, 332, -1, -1, 335, 336, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, 436, 4, 5, 6, 7, 8, 9, 10, - 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, - 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, - 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, - 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, - 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, - -1, -1, 63, 64, 65, 66, 67, 68, 69, 70, - 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, - 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, - 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, - 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, - 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, - 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, - 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, - 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, - 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, - 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, - 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, - 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, - 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, - 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, - 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, - 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, - 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, - 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, - 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, - 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, - 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, - 281, 282, 283, 284, 285, 286, 287, 288, 289, 290, - 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, - 301, 302, 303, 304, 305, 306, 307, 308, 309, 310, - 311, 312, 313, 314, 315, 316, -1, -1, -1, -1, - -1, -1, 323, -1, -1, -1, -1, -1, 329, 330, + -1, -1, -1, -1, -1, -1, -1, 354, 355, -1, + -1, -1, 359, -1, -1, -1, -1, -1, -1, 366, + 367, 368, 369, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, 348, 349, -1, - -1, -1, 353, -1, -1, -1, -1, -1, -1, 360, - 361, 362, 363, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - 381, 382, 383, 384, 385, 386, -1, -1, -1, -1, - 391, 392, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, 414, 415, 416, 417, 418, 419, 420, - 421, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, 436, 4, 5, 6, 7, - 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, - 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, - 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, - 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, - 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, - 58, 59, 60, -1, -1, 63, 64, 65, 66, 67, - 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, - 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, - 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, - 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, - 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, - 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, - 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, - 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, - 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, - 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, - 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, - 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, - 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, - 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, - 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, - 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, - 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, - 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, - 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, - 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, - 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, - 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, - 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, - 298, 299, 300, 301, 302, 303, 304, 305, 306, 307, - 308, 309, 310, 311, 312, 313, 314, 315, 316, -1, - -1, -1, -1, -1, -1, 323, -1, -1, -1, -1, - -1, 329, 330, -1, -1, -1, -1, -1, -1, -1, + 387, 388, 389, 390, 391, 392, -1, -1, -1, -1, + 397, 398, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - 348, 349, -1, -1, 352, -1, -1, -1, -1, -1, - -1, -1, 360, 361, 362, 363, -1, -1, -1, -1, + -1, -1, -1, -1, 421, 422, 423, 424, 425, 426, + 427, 428, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, 443, 4, 5, 6, + 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, + 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, + 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, + 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, + 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, + 57, 58, 59, 60, -1, -1, 63, 64, 65, 66, + 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, + 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, + 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, + 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, + 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, + 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, + 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, + 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, + 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, + 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, + 167, -1, 169, 170, 171, 172, 173, 174, 175, 176, + 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, + 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, + 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, + 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, + 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, + 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, + 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, + 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, + 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, + 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, + 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, + 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, + 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, + 307, 308, 309, 310, 311, 312, 313, 314, 315, 316, + 317, 318, 319, -1, -1, -1, -1, -1, -1, 326, + -1, -1, -1, 330, 331, 332, -1, -1, 335, 336, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, 381, 382, 383, 384, 385, 386, -1, - -1, -1, -1, 391, 392, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, 354, 355, -1, + -1, 358, -1, -1, -1, -1, -1, -1, -1, 366, + 367, 368, 369, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, 414, 415, 416, 417, - 418, 419, 420, 421, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, 436, 4, - 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, - 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, - 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, - 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, - 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, - 55, 56, 57, 58, 59, 60, -1, -1, 63, 64, - 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, - 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, - 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, - 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, - 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, - 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, - 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, - 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, - 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, - 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, - 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, - 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, - 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, - 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, - 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, - 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, - 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, - 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, - 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, - 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, - 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, - 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, - 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, - 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, - 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, - 315, 316, -1, -1, -1, -1, -1, -1, 323, -1, - -1, -1, -1, -1, 329, 330, -1, -1, -1, -1, + 387, 388, 389, 390, 391, 392, -1, -1, -1, -1, + 397, 398, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, 348, 349, -1, -1, -1, -1, -1, - -1, -1, -1, -1, 359, 360, 361, 362, 363, -1, + -1, -1, -1, -1, 421, 422, 423, 424, 425, 426, + 427, 428, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, 443, 4, 5, 6, + 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, + 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, + 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, + 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, + 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, + 57, 58, 59, 60, -1, -1, 63, 64, 65, 66, + 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, + 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, + 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, + 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, + 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, + 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, + 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, + 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, + 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, + 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, + 167, -1, 169, 170, 171, 172, 173, 174, 175, 176, + 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, + 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, + 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, + 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, + 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, + 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, + 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, + 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, + 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, + 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, + 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, + 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, + 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, + 307, 308, 309, 310, 311, 312, 313, 314, 315, 316, + 317, 318, 319, -1, -1, -1, -1, -1, -1, 326, + -1, -1, -1, 330, 331, 332, -1, -1, 335, 336, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, 381, 382, 383, 384, - 385, 386, -1, -1, -1, -1, 391, 392, -1, -1, + -1, -1, -1, -1, -1, -1, -1, 354, 355, -1, + -1, -1, -1, -1, -1, -1, -1, -1, 365, 366, + 367, 368, 369, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, 414, - 415, 416, 417, 418, 419, 420, 421, -1, -1, -1, + 387, 388, 389, 390, 391, 392, -1, -1, -1, -1, + 397, 398, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, 436, 4, 5, 6, 7, 8, 9, 10, 11, - 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, - 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, - 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, - 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, - 52, 53, 54, 55, 56, 57, 58, 59, 60, -1, - -1, 63, 64, 65, 66, 67, 68, 69, 70, 71, - 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, - 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, - 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, - 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, - 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, - 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, - 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, - 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, - 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, - 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, - 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, - 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, - 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, - 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, - 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, - 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, - 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, - 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, - 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, - 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, - 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, - 282, 283, 284, 285, 286, 287, 288, 289, 290, 291, - 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, - 302, 303, 304, 305, 306, 307, 308, 309, 310, 311, - 312, 313, 314, 315, 316, -1, -1, -1, -1, -1, - -1, 323, -1, -1, -1, -1, -1, 329, 330, -1, + -1, -1, -1, -1, 421, 422, 423, 424, 425, 426, + 427, 428, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, 443, 4, 5, 6, + 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, + 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, + 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, + 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, + 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, + 57, 58, 59, 60, -1, -1, 63, 64, 65, 66, + 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, + 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, + 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, + 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, + 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, + 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, + 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, + 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, + 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, + 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, + 167, -1, 169, 170, 171, 172, 173, 174, 175, 176, + 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, + 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, + 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, + 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, + 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, + 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, + 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, + 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, + 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, + 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, + 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, + 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, + 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, + 307, 308, 309, 310, 311, 312, 313, 314, 315, 316, + 317, 318, 319, -1, -1, -1, -1, -1, -1, 326, + -1, -1, -1, 330, 331, 332, -1, -1, 335, 336, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, 348, 349, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, 360, 361, - 362, 363, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, 381, - 382, 383, 384, 385, 386, -1, -1, -1, -1, 391, - 392, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, 354, 355, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, 366, + 367, 368, 369, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, 414, 415, 416, 417, 418, 419, 420, 421, + 387, 388, 389, 390, 391, 392, -1, -1, -1, -1, + 397, 398, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, 436, 4, 5, 6, 7, 8, - 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, - 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, - 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, - 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, - 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, - 59, 60, -1, -1, 63, 64, 65, 66, 67, 68, - 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, - 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, - 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, - 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, - 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, - 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, - 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, - 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, - 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, - 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, - 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, - 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, - 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, - 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, - 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, - 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, - 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, - 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, - 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, - 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, - 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, - 279, 280, 281, 282, 283, 284, 285, 286, 287, 288, - 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, - 299, 300, 301, 302, 303, 304, 305, 306, 307, 308, - 309, 310, 311, 312, 313, 314, 315, 316, -1, -1, - -1, -1, -1, -1, 323, -1, -1, -1, -1, -1, - 329, 330, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, 348, - 349, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, 360, 361, 362, 363, -1, -1, -1, -1, -1, + -1, -1, -1, -1, 421, 422, 423, 424, 425, 426, + 427, 428, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, 443, 4, 5, 6, + 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, + 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, + 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, + 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, + 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, + 57, 58, 59, 60, -1, -1, 63, 64, 65, 66, + 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, + 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, + 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, + 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, + 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, + 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, + 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, + 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, + 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, + 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, + 167, -1, 169, 170, 171, 172, 173, 174, 175, 176, + 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, + 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, + 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, + 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, + 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, + 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, + 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, + 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, + 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, + 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, + 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, + 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, + 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, + 307, 308, 309, 310, 311, 312, 313, 314, 315, 316, + 317, 318, 319, -1, -1, -1, -1, -1, -1, 326, + -1, -1, -1, 330, 331, 332, -1, -1, 335, 336, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, 381, 382, 383, 384, 385, 386, -1, -1, - -1, -1, 391, 392, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, 354, 355, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, 366, + 367, 368, 369, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, 414, 415, 416, 417, 418, - 419, 420, 421, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, 436, 4, 5, - 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, - 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, - 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, - 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, - 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, - 56, 57, 58, 59, 60, -1, -1, 63, 64, 65, - 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, - 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, - 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, - 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, - 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, - 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, - 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, - 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, - 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, - 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, - 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, - 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, - 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, - 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, - 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, - 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, - 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, - 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, - 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, - 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, - 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, - 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, - 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, - 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, - 306, 307, 308, 309, 310, 311, 312, 313, 314, 315, - 316, -1, -1, -1, -1, -1, -1, 323, -1, -1, - -1, -1, -1, 329, 330, -1, -1, -1, -1, -1, + 387, 388, 389, 390, 391, 392, -1, -1, -1, -1, + 397, 398, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, 348, 349, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, 360, 361, 362, 363, -1, -1, + -1, -1, -1, -1, 421, 422, 423, 424, 425, 426, + 427, 428, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, 443, 4, 5, 6, + 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, + 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, + 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, + 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, + 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, + 57, 58, 59, 60, -1, -1, 63, 64, 65, 66, + 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, + 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, + 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, + 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, + 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, + 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, + 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, + 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, + 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, + 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, + 167, -1, 169, 170, 171, 172, 173, 174, 175, 176, + 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, + 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, + 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, + 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, + 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, + 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, + 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, + 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, + 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, + 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, + 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, + 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, + 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, + 307, 308, 309, 310, 311, 312, 313, 314, 315, 316, + 317, 318, 319, -1, -1, -1, -1, -1, -1, 326, + -1, -1, -1, 330, 331, 332, -1, -1, 335, 336, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, 381, 382, 383, 384, 385, - 386, -1, -1, -1, -1, 391, 392, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, 354, 355, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, 366, + 367, 368, 369, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, 414, 415, - 416, 417, 418, 419, 420, 421, -1, -1, -1, -1, + 387, 388, 389, 390, 391, 392, -1, -1, -1, -1, + 397, 398, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - 436, 4, 5, 6, 7, 8, 9, 10, 11, 12, - 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, - 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, - 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, - 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, - 53, 54, 55, 56, 57, 58, 59, 60, -1, -1, - 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, - 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, - 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, - 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, - 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, - 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, - 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, - 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, - 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, - 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, - 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, - 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, - 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, - 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, - 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, - 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, - 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, - 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, - 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, - 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, - 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, - 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, - 283, 284, 285, 286, 287, 288, 289, 290, 291, 292, - 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, - 303, 304, 305, 306, 307, 308, 309, 310, 311, 312, - 313, 314, 315, 316, -1, -1, -1, -1, -1, -1, - 323, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, 421, 422, 423, 424, 425, 426, + 427, 428, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, 443, 4, 5, 6, + 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, + 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, + 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, + 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, + 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, + 57, 58, 59, 60, -1, -1, 63, 64, 65, 66, + 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, + 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, + 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, + 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, + 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, + 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, + 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, + 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, + 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, + 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, + 167, -1, 169, 170, 171, 172, 173, 174, 175, 176, + 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, + 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, + 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, + 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, + 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, + 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, + 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, + 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, + 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, + 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, + 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, + 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, + 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, + 307, 308, 309, 310, 311, 312, 313, 314, 315, 316, + 317, 318, 319, -1, -1, -1, -1, -1, -1, 326, + -1, -1, -1, 330, 331, 332, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, 386, -1, -1, -1, -1, 391, 392 + -1, -1, -1, -1, -1, 392, -1, -1, -1, -1, + 397, 398 }; - /* YYSTOS[STATE-NUM] -- The (internal number of the) accessing - symbol of state STATE-NUM. */ +/* YYSTOS[STATE-NUM] -- The symbol kind of the accessing symbol of + state STATE-NUM. */ static const yytype_int16 yystos[] = { 0, 3, 4, 5, 6, 7, 8, 9, 10, 11, @@ -4223,144 +4254,148 @@ static const yytype_int16 yystos[] = 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, 315, 316, 317, 318, 319, 320, 321, - 322, 323, 324, 325, 326, 351, 359, 373, 374, 375, - 376, 377, 386, 387, 388, 389, 390, 391, 392, 408, - 409, 410, 411, 412, 413, 422, 424, 425, 426, 427, - 428, 429, 430, 431, 432, 433, 434, 435, 436, 437, + 322, 323, 324, 325, 326, 327, 328, 329, 330, 331, + 332, 357, 365, 379, 380, 381, 382, 383, 392, 393, + 394, 395, 396, 397, 398, 414, 415, 416, 417, 418, + 419, 420, 429, 431, 432, 433, 434, 435, 436, 437, 438, 439, 440, 441, 442, 443, 444, 445, 446, 447, - 448, 449, 450, 451, 452, 453, 454, 455, 487, 488, - 491, 492, 493, 494, 498, 499, 500, 501, 502, 503, - 506, 507, 508, 509, 510, 512, 517, 518, 519, 560, - 561, 562, 564, 571, 575, 576, 581, 584, 349, 349, - 349, 349, 349, 349, 349, 349, 351, 518, 353, 385, - 349, 349, 359, 385, 359, 563, 350, 356, 495, 496, - 497, 507, 512, 356, 359, 385, 359, 385, 508, 512, - 367, 514, 515, 0, 561, 492, 500, 507, 359, 491, - 385, 567, 568, 585, 586, 382, 385, 567, 382, 567, - 382, 567, 382, 567, 382, 567, 567, 585, 382, 567, - 385, 565, 566, 512, 521, 353, 385, 409, 504, 505, - 385, 511, 351, 359, 513, 353, 539, 564, 496, 495, - 497, 385, 385, 349, 358, 513, 353, 356, 359, 490, - 329, 330, 348, 349, 360, 361, 362, 363, 381, 382, - 383, 384, 385, 414, 415, 416, 417, 418, 419, 420, - 421, 457, 458, 459, 461, 462, 463, 464, 465, 466, - 467, 468, 469, 510, 512, 516, 513, 350, 385, 359, - 358, 356, 350, 356, 350, 356, 358, 356, 356, 356, - 350, 356, 356, 356, 356, 356, 356, 356, 350, 356, - 350, 356, 349, 352, 356, 359, 507, 512, 522, 523, - 520, 358, 350, 356, 350, 356, 352, 468, 470, 471, - 472, 473, 474, 475, 476, 477, 478, 479, 480, 481, - 351, 359, 353, 354, 359, 393, 394, 395, 396, 398, - 399, 400, 401, 402, 403, 404, 405, 406, 407, 423, - 468, 481, 483, 485, 487, 491, 510, 512, 528, 529, - 530, 531, 532, 540, 541, 542, 543, 546, 547, 550, - 551, 552, 559, 564, 513, 358, 513, 353, 483, 526, - 358, 489, 385, 356, 359, 468, 468, 485, 329, 330, - 351, 355, 350, 350, 356, 392, 483, 349, 468, 356, - 368, 564, 348, 351, 382, 568, 585, 385, 586, 348, - 381, 382, 383, 384, 572, 573, 382, 481, 486, 574, - 382, 381, 382, 383, 384, 577, 578, 382, 486, 579, - 382, 348, 580, 382, 585, 385, 486, 582, 583, 382, - 486, 352, 566, 512, 385, 524, 525, 354, 523, 522, - 486, 505, 385, 364, 365, 366, 361, 363, 327, 328, - 331, 332, 367, 368, 333, 334, 371, 370, 369, 335, - 337, 336, 372, 352, 352, 481, 354, 533, 349, 359, - 359, 554, 349, 349, 359, 359, 485, 349, 485, 357, - 359, 359, 359, 359, 338, 339, 340, 341, 342, 343, - 344, 345, 346, 347, 358, 484, 356, 359, 354, 529, - 543, 547, 552, 526, 358, 354, 526, 527, 526, 522, - 385, 350, 460, 485, 385, 483, 468, 348, 382, 569, - 570, 350, 358, 350, 356, 350, 356, 350, 356, 356, - 350, 356, 350, 356, 350, 356, 356, 350, 356, 356, - 350, 356, 350, 356, 350, 350, 524, 513, 356, 359, - 354, 468, 468, 468, 470, 470, 471, 471, 472, 472, - 472, 472, 473, 473, 474, 475, 476, 477, 478, 479, - 482, 352, 540, 553, 529, 555, 485, 359, 485, 357, - 483, 483, 526, 354, 356, 354, 352, 352, 356, 352, - 356, 573, 572, 486, 574, 578, 577, 486, 579, 348, - 580, 582, 583, 359, 525, 485, 534, 485, 500, 545, - 393, 528, 541, 556, 350, 350, 354, 526, 348, 382, - 350, 350, 350, 350, 350, 350, 357, 354, 385, 350, - 349, 545, 557, 558, 536, 537, 538, 544, 548, 483, - 358, 530, 535, 539, 485, 359, 350, 397, 532, 530, - 353, 526, 350, 485, 535, 536, 540, 549, 359, 354 + 448, 449, 450, 451, 452, 453, 454, 455, 456, 457, + 458, 459, 460, 461, 462, 463, 464, 496, 497, 500, + 501, 502, 503, 507, 508, 509, 510, 511, 512, 515, + 516, 517, 518, 519, 521, 526, 527, 528, 569, 570, + 571, 573, 580, 584, 585, 591, 594, 355, 355, 355, + 355, 355, 355, 355, 355, 357, 527, 359, 391, 355, + 355, 365, 391, 365, 572, 356, 362, 504, 505, 506, + 516, 521, 362, 365, 391, 365, 391, 517, 521, 373, + 523, 524, 0, 570, 501, 509, 516, 365, 500, 391, + 576, 577, 595, 596, 388, 391, 576, 388, 576, 388, + 576, 388, 576, 388, 576, 576, 595, 388, 576, 391, + 574, 575, 521, 530, 359, 391, 415, 513, 514, 391, + 520, 357, 365, 522, 359, 548, 573, 505, 504, 506, + 391, 391, 355, 364, 522, 359, 362, 365, 499, 335, + 336, 354, 355, 366, 367, 368, 369, 387, 388, 389, + 390, 391, 421, 422, 423, 424, 425, 426, 427, 428, + 466, 467, 468, 470, 471, 472, 473, 474, 475, 476, + 477, 478, 519, 521, 525, 522, 356, 391, 365, 364, + 362, 356, 362, 356, 362, 364, 362, 362, 362, 356, + 362, 362, 362, 362, 362, 362, 362, 356, 362, 356, + 362, 355, 358, 362, 365, 516, 521, 531, 532, 529, + 364, 356, 362, 356, 362, 358, 477, 479, 480, 481, + 482, 483, 484, 485, 486, 487, 488, 489, 490, 521, + 357, 365, 359, 360, 365, 399, 400, 401, 402, 404, + 405, 406, 407, 408, 409, 410, 411, 412, 413, 430, + 477, 490, 492, 494, 496, 500, 519, 521, 537, 538, + 539, 540, 541, 549, 550, 551, 552, 555, 556, 559, + 560, 561, 568, 573, 522, 364, 522, 359, 492, 535, + 364, 498, 391, 362, 365, 477, 477, 494, 335, 336, + 357, 361, 356, 356, 362, 398, 492, 355, 477, 362, + 374, 573, 354, 357, 388, 577, 595, 391, 596, 354, + 387, 388, 389, 390, 581, 582, 388, 490, 495, 583, + 388, 387, 388, 389, 390, 586, 587, 388, 387, 388, + 389, 390, 466, 588, 589, 388, 354, 590, 388, 595, + 391, 495, 526, 592, 593, 388, 495, 358, 575, 521, + 391, 533, 534, 360, 532, 531, 495, 514, 391, 370, + 371, 372, 367, 369, 333, 334, 337, 338, 373, 374, + 339, 340, 377, 376, 375, 341, 343, 342, 378, 358, + 358, 490, 360, 542, 355, 365, 365, 563, 355, 355, + 365, 365, 494, 355, 494, 363, 365, 365, 365, 365, + 344, 345, 346, 347, 348, 349, 350, 351, 352, 353, + 364, 493, 362, 365, 360, 538, 552, 556, 561, 535, + 364, 360, 535, 536, 535, 531, 391, 356, 469, 494, + 391, 492, 477, 354, 388, 578, 579, 356, 364, 356, + 362, 356, 362, 356, 362, 362, 356, 362, 356, 362, + 356, 362, 362, 356, 362, 362, 356, 362, 356, 362, + 356, 356, 533, 522, 362, 365, 360, 477, 477, 477, + 479, 479, 480, 480, 481, 481, 481, 481, 482, 482, + 483, 484, 485, 486, 487, 488, 491, 358, 549, 562, + 538, 564, 494, 365, 494, 363, 492, 492, 535, 360, + 362, 360, 358, 358, 362, 358, 362, 582, 581, 495, + 583, 587, 586, 589, 588, 354, 590, 592, 593, 365, + 534, 494, 543, 494, 509, 554, 399, 537, 550, 565, + 356, 356, 360, 535, 354, 388, 356, 356, 356, 356, + 356, 356, 363, 360, 391, 356, 355, 554, 566, 567, + 545, 546, 547, 553, 557, 492, 364, 539, 544, 548, + 494, 365, 356, 403, 541, 539, 359, 535, 356, 494, + 544, 545, 549, 558, 365, 360 }; - /* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */ +/* YYR1[RULE-NUM] -- Symbol kind of the left-hand side of rule RULE-NUM. */ static const yytype_int16 yyr1[] = { - 0, 456, 457, 458, 458, 458, 458, 458, 458, 458, - 458, 458, 458, 458, 458, 458, 458, 458, 459, 459, - 459, 459, 459, 459, 460, 461, 462, 463, 463, 464, - 464, 465, 465, 466, 467, 467, 467, 468, 468, 468, - 468, 469, 469, 469, 469, 470, 470, 470, 470, 471, - 471, 471, 472, 472, 472, 473, 473, 473, 473, 473, - 474, 474, 474, 475, 475, 476, 476, 477, 477, 478, - 478, 479, 479, 480, 480, 481, 482, 481, 483, 483, - 484, 484, 484, 484, 484, 484, 484, 484, 484, 484, - 484, 485, 485, 486, 487, 487, 487, 487, 487, 487, - 487, 487, 487, 487, 487, 489, 488, 490, 490, 491, - 491, 491, 491, 492, 492, 493, 493, 494, 495, 495, - 496, 496, 496, 496, 497, 498, 498, 498, 498, 498, - 499, 499, 499, 499, 499, 500, 500, 501, 502, 502, - 502, 502, 502, 502, 502, 502, 502, 503, 504, 504, - 505, 505, 505, 506, 507, 507, 508, 508, 508, 508, - 508, 508, 508, 508, 508, 508, 508, 509, 509, 509, - 509, 509, 509, 509, 509, 509, 509, 509, 509, 509, - 509, 509, 509, 509, 509, 509, 509, 509, 509, 509, - 509, 509, 509, 509, 509, 509, 509, 509, 509, 509, - 509, 509, 510, 511, 511, 512, 512, 513, 513, 513, - 513, 514, 514, 515, 516, 516, 517, 517, 517, 517, - 517, 517, 517, 517, 517, 517, 517, 517, 517, 517, - 517, 517, 517, 517, 517, 517, 517, 517, 517, 517, - 517, 517, 517, 517, 517, 517, 517, 517, 517, 517, - 517, 517, 517, 517, 517, 517, 517, 517, 517, 517, - 517, 517, 517, 517, 517, 517, 517, 517, 517, 517, - 517, 517, 517, 517, 517, 517, 517, 517, 517, 517, - 517, 517, 517, 517, 517, 517, 517, 517, 517, 517, - 517, 517, 517, 517, 517, 517, 517, 517, 517, 517, - 517, 517, 517, 517, 517, 517, 517, 517, 517, 517, - 517, 517, 517, 517, 517, 517, 517, 517, 517, 517, - 517, 517, 517, 517, 517, 517, 517, 517, 517, 517, - 517, 517, 517, 517, 517, 517, 517, 517, 517, 517, - 517, 517, 517, 517, 517, 517, 517, 517, 517, 517, - 517, 517, 517, 517, 517, 517, 517, 517, 517, 517, - 517, 517, 517, 517, 517, 517, 517, 517, 517, 517, - 517, 517, 517, 517, 517, 517, 517, 517, 517, 517, - 517, 517, 517, 517, 517, 517, 517, 517, 517, 517, - 517, 517, 517, 517, 517, 517, 517, 517, 517, 517, - 517, 517, 517, 517, 517, 517, 517, 517, 517, 517, - 517, 517, 517, 517, 517, 517, 517, 517, 517, 517, - 517, 517, 517, 517, 517, 517, 517, 517, 517, 517, - 517, 517, 517, 517, 517, 517, 517, 517, 517, 517, - 517, 517, 517, 517, 517, 517, 517, 517, 517, 517, - 517, 517, 517, 517, 517, 517, 517, 517, 517, 517, - 517, 517, 517, 517, 517, 517, 517, 517, 517, 517, - 517, 517, 517, 517, 517, 517, 517, 517, 517, 517, - 517, 517, 517, 517, 517, 517, 517, 517, 517, 517, - 517, 517, 517, 517, 517, 517, 517, 517, 517, 517, - 517, 517, 517, 517, 517, 517, 517, 517, 517, 517, - 517, 517, 517, 517, 517, 517, 517, 517, 517, 517, - 517, 517, 517, 517, 517, 517, 517, 517, 517, 517, - 517, 518, 518, 518, 520, 519, 521, 519, 522, 522, - 523, 523, 524, 524, 525, 525, 526, 526, 526, 526, - 527, 527, 528, 529, 529, 530, 530, 530, 530, 530, - 530, 530, 530, 531, 532, 533, 534, 532, 535, 535, - 537, 536, 538, 536, 539, 539, 540, 540, 541, 541, - 542, 542, 543, 544, 544, 545, 545, 546, 546, 548, - 547, 549, 549, 550, 550, 551, 551, 553, 552, 554, - 552, 555, 552, 556, 556, 557, 557, 558, 558, 559, - 559, 559, 559, 559, 559, 559, 559, 560, 560, 561, - 561, 561, 563, 562, 564, 565, 565, 566, 566, 567, - 567, 568, 568, 569, 569, 570, 570, 571, 571, 571, - 571, 571, 571, 572, 572, 573, 573, 573, 573, 573, - 574, 574, 575, 575, 576, 576, 576, 576, 576, 576, - 576, 576, 577, 577, 578, 578, 578, 578, 579, 579, - 580, 580, 581, 581, 581, 581, 582, 582, 583, 584, - 584, 585, 585, 586, 586 + 0, 465, 466, 467, 467, 467, 467, 467, 467, 467, + 467, 467, 467, 467, 467, 467, 467, 467, 468, 468, + 468, 468, 468, 468, 469, 470, 471, 472, 472, 473, + 473, 474, 474, 475, 476, 476, 476, 477, 477, 477, + 477, 478, 478, 478, 478, 479, 479, 479, 479, 480, + 480, 480, 481, 481, 481, 482, 482, 482, 482, 482, + 483, 483, 483, 484, 484, 485, 485, 486, 486, 487, + 487, 488, 488, 489, 489, 490, 491, 490, 492, 492, + 493, 493, 493, 493, 493, 493, 493, 493, 493, 493, + 493, 494, 494, 495, 496, 496, 496, 496, 496, 496, + 496, 496, 496, 496, 496, 498, 497, 499, 499, 500, + 500, 500, 500, 501, 501, 502, 502, 503, 504, 504, + 505, 505, 505, 505, 506, 507, 507, 507, 507, 507, + 508, 508, 508, 508, 508, 509, 509, 510, 511, 511, + 511, 511, 511, 511, 511, 511, 511, 511, 512, 513, + 513, 514, 514, 514, 515, 516, 516, 517, 517, 517, + 517, 517, 517, 517, 517, 517, 517, 517, 518, 518, + 518, 518, 518, 518, 518, 518, 518, 518, 518, 518, + 518, 518, 518, 518, 518, 518, 518, 518, 518, 518, + 518, 518, 518, 518, 518, 518, 518, 518, 518, 518, + 518, 518, 518, 518, 518, 518, 519, 520, 520, 521, + 521, 522, 522, 522, 522, 523, 523, 524, 525, 525, + 525, 526, 526, 526, 526, 526, 526, 526, 526, 526, + 526, 526, 526, 526, 526, 526, 526, 526, 526, 526, + 526, 526, 526, 526, 526, 526, 526, 526, 526, 526, + 526, 526, 526, 526, 526, 526, 526, 526, 526, 526, + 526, 526, 526, 526, 526, 526, 526, 526, 526, 526, + 526, 526, 526, 526, 526, 526, 526, 526, 526, 526, + 526, 526, 526, 526, 526, 526, 526, 526, 526, 526, + 526, 526, 526, 526, 526, 526, 526, 526, 526, 526, + 526, 526, 526, 526, 526, 526, 526, 526, 526, 526, + 526, 526, 526, 526, 526, 526, 526, 526, 526, 526, + 526, 526, 526, 526, 526, 526, 526, 526, 526, 526, + 526, 526, 526, 526, 526, 526, 526, 526, 526, 526, + 526, 526, 526, 526, 526, 526, 526, 526, 526, 526, + 526, 526, 526, 526, 526, 526, 526, 526, 526, 526, + 526, 526, 526, 526, 526, 526, 526, 526, 526, 526, + 526, 526, 526, 526, 526, 526, 526, 526, 526, 526, + 526, 526, 526, 526, 526, 526, 526, 526, 526, 526, + 526, 526, 526, 526, 526, 526, 526, 526, 526, 526, + 526, 526, 526, 526, 526, 526, 526, 526, 526, 526, + 526, 526, 526, 526, 526, 526, 526, 526, 526, 526, + 526, 526, 526, 526, 526, 526, 526, 526, 526, 526, + 526, 526, 526, 526, 526, 526, 526, 526, 526, 526, + 526, 526, 526, 526, 526, 526, 526, 526, 526, 526, + 526, 526, 526, 526, 526, 526, 526, 526, 526, 526, + 526, 526, 526, 526, 526, 526, 526, 526, 526, 526, + 526, 526, 526, 526, 526, 526, 526, 526, 526, 526, + 526, 526, 526, 526, 526, 526, 526, 526, 526, 526, + 526, 526, 526, 526, 526, 526, 526, 526, 526, 526, + 526, 526, 526, 526, 526, 526, 526, 526, 526, 526, + 526, 526, 526, 526, 526, 526, 526, 526, 526, 526, + 526, 526, 526, 526, 526, 526, 526, 526, 526, 526, + 526, 526, 526, 526, 526, 526, 526, 526, 526, 526, + 526, 527, 527, 527, 529, 528, 530, 528, 531, 531, + 532, 532, 533, 533, 534, 534, 535, 535, 535, 535, + 536, 536, 537, 538, 538, 539, 539, 539, 539, 539, + 539, 539, 539, 540, 541, 542, 543, 541, 544, 544, + 546, 545, 547, 545, 548, 548, 549, 549, 550, 550, + 551, 551, 552, 553, 553, 554, 554, 555, 555, 557, + 556, 558, 558, 559, 559, 560, 560, 562, 561, 563, + 561, 564, 561, 565, 565, 566, 566, 567, 567, 568, + 568, 568, 568, 568, 568, 568, 568, 569, 569, 570, + 570, 570, 572, 571, 573, 574, 574, 575, 575, 576, + 576, 577, 577, 578, 578, 579, 579, 580, 580, 580, + 580, 580, 580, 581, 581, 582, 582, 582, 582, 582, + 583, 583, 584, 584, 585, 585, 585, 585, 585, 585, + 585, 585, 586, 586, 587, 587, 587, 587, 588, 588, + 589, 589, 589, 589, 589, 590, 590, 591, 591, 591, + 591, 592, 592, 593, 593, 594, 594, 595, 595, 596, + 596 }; - /* YYR2[YYN] -- Number of symbols on the right hand side of rule YYN. */ +/* YYR2[RULE-NUM] -- Number of symbols on the right-hand side of rule RULE-NUM. */ static const yytype_int8 yyr2[] = { 0, 2, 1, 1, 3, 1, 1, 1, 1, 1, @@ -4377,14 +4412,15 @@ static const yytype_int8 yyr2[] = 3, 3, 4, 1, 1, 2, 3, 3, 2, 3, 2, 1, 2, 1, 1, 1, 3, 4, 6, 5, 1, 2, 3, 5, 4, 1, 2, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 4, 1, 3, - 1, 3, 1, 1, 1, 2, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 4, 1, + 3, 1, 3, 1, 1, 1, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 4, 1, 1, 3, 2, 3, 2, 3, 3, - 4, 1, 0, 3, 1, 3, 1, 1, 1, 1, + 1, 1, 1, 1, 4, 1, 1, 1, 3, 2, + 3, 2, 3, 3, 4, 1, 0, 3, 1, 1, + 3, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, @@ -4430,8 +4466,9 @@ static const yytype_int8 yyr2[] = 8, 6, 8, 1, 3, 1, 1, 1, 1, 1, 1, 3, 4, 6, 4, 6, 6, 8, 6, 8, 6, 8, 1, 3, 1, 1, 1, 1, 1, 3, - 1, 3, 6, 8, 4, 6, 1, 3, 1, 4, - 6, 1, 3, 3, 3 + 1, 1, 1, 1, 1, 1, 3, 6, 8, 4, + 6, 1, 3, 1, 1, 4, 6, 1, 3, 3, + 3 }; @@ -4443,6 +4480,7 @@ enum { YYENOMEM = -2 }; #define YYACCEPT goto yyacceptlab #define YYABORT goto yyabortlab #define YYERROR goto yyerrorlab +#define YYNOMEM goto yyexhaustedlab #define YYRECOVERING() (!!yyerrstatus) @@ -4483,10 +4521,7 @@ do { \ YYFPRINTF Args; \ } while (0) -/* This macro is provided for backward compatibility. */ -# ifndef YY_LOCATION_PRINT -# define YY_LOCATION_PRINT(File, Loc) ((void) 0) -# endif + # define YY_SYMBOL_PRINT(Title, Kind, Value, Location) \ @@ -4510,16 +4545,12 @@ yy_symbol_value_print (FILE *yyo, yysymbol_kind_t yykind, YYSTYPE const * const yyvaluep, glslang::TParseContext* pParseContext) { FILE *yyoutput = yyo; - YYUSE (yyoutput); - YYUSE (pParseContext); + YY_USE (yyoutput); + YY_USE (pParseContext); if (!yyvaluep) return; -# ifdef YYPRINT - if (yykind < YYNTOKENS) - YYPRINT (yyo, yytoknum[yykind], *yyvaluep); -# endif YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN - YYUSE (yykind); + YY_USE (yykind); YY_IGNORE_MAYBE_UNINITIALIZED_END } @@ -4900,14 +4931,14 @@ static void yydestruct (const char *yymsg, yysymbol_kind_t yykind, YYSTYPE *yyvaluep, glslang::TParseContext* pParseContext) { - YYUSE (yyvaluep); - YYUSE (pParseContext); + YY_USE (yyvaluep); + YY_USE (pParseContext); if (!yymsg) yymsg = "Deleting"; YY_SYMBOL_PRINT (yymsg, yykind, yyvaluep, yylocationp); YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN - YYUSE (yykind); + YY_USE (yykind); YY_IGNORE_MAYBE_UNINITIALIZED_END } @@ -4979,6 +5010,7 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); YYDPRINTF ((stderr, "Starting parse\n")); yychar = YYEMPTY; /* Cause a token to be read. */ + goto yysetstate; @@ -5004,7 +5036,7 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); if (yyss + yystacksize - 1 <= yyssp) #if !defined yyoverflow && !defined YYSTACK_RELOCATE - goto yyexhaustedlab; + YYNOMEM; #else { /* Get the current used size of the three stacks, in elements. */ @@ -5032,7 +5064,7 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); # else /* defined YYSTACK_RELOCATE */ /* Extend the stack our own way. */ if (YYMAXDEPTH <= yystacksize) - goto yyexhaustedlab; + YYNOMEM; yystacksize *= 2; if (YYMAXDEPTH < yystacksize) yystacksize = YYMAXDEPTH; @@ -5043,7 +5075,7 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); YY_CAST (union yyalloc *, YYSTACK_ALLOC (YY_CAST (YYSIZE_T, YYSTACK_BYTES (yystacksize)))); if (! yyptr) - goto yyexhaustedlab; + YYNOMEM; YYSTACK_RELOCATE (yyss_alloc, yyss); YYSTACK_RELOCATE (yyvs_alloc, yyvs); # undef YYSTACK_RELOCATE @@ -5065,6 +5097,7 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); } #endif /* !defined yyoverflow && !defined YYSTACK_RELOCATE */ + if (yystate == YYFINAL) YYACCEPT; @@ -5177,260 +5210,260 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); switch (yyn) { case 2: /* variable_identifier: IDENTIFIER */ -#line 392 "MachineIndependent/glslang.y" +#line 362 "MachineIndependent/glslang.y" { (yyval.interm.intermTypedNode) = parseContext.handleVariable((yyvsp[0].lex).loc, (yyvsp[0].lex).symbol, (yyvsp[0].lex).string); } -#line 5185 "MachineIndependent/glslang_tab.cpp" +#line 5218 "MachineIndependent/glslang_tab.cpp" break; case 3: /* primary_expression: variable_identifier */ -#line 398 "MachineIndependent/glslang.y" +#line 368 "MachineIndependent/glslang.y" { (yyval.interm.intermTypedNode) = (yyvsp[0].interm.intermTypedNode); } -#line 5193 "MachineIndependent/glslang_tab.cpp" +#line 5226 "MachineIndependent/glslang_tab.cpp" break; case 4: /* primary_expression: LEFT_PAREN expression RIGHT_PAREN */ -#line 401 "MachineIndependent/glslang.y" +#line 371 "MachineIndependent/glslang.y" { (yyval.interm.intermTypedNode) = (yyvsp[-1].interm.intermTypedNode); if ((yyval.interm.intermTypedNode)->getAsConstantUnion()) (yyval.interm.intermTypedNode)->getAsConstantUnion()->setExpression(); } -#line 5203 "MachineIndependent/glslang_tab.cpp" +#line 5236 "MachineIndependent/glslang_tab.cpp" break; case 5: /* primary_expression: FLOATCONSTANT */ -#line 406 "MachineIndependent/glslang.y" +#line 376 "MachineIndependent/glslang.y" { (yyval.interm.intermTypedNode) = parseContext.intermediate.addConstantUnion((yyvsp[0].lex).d, EbtFloat, (yyvsp[0].lex).loc, true); } -#line 5211 "MachineIndependent/glslang_tab.cpp" +#line 5244 "MachineIndependent/glslang_tab.cpp" break; case 6: /* primary_expression: INTCONSTANT */ -#line 409 "MachineIndependent/glslang.y" +#line 379 "MachineIndependent/glslang.y" { (yyval.interm.intermTypedNode) = parseContext.intermediate.addConstantUnion((yyvsp[0].lex).i, (yyvsp[0].lex).loc, true); } -#line 5219 "MachineIndependent/glslang_tab.cpp" +#line 5252 "MachineIndependent/glslang_tab.cpp" break; case 7: /* primary_expression: UINTCONSTANT */ -#line 412 "MachineIndependent/glslang.y" +#line 382 "MachineIndependent/glslang.y" { parseContext.fullIntegerCheck((yyvsp[0].lex).loc, "unsigned literal"); (yyval.interm.intermTypedNode) = parseContext.intermediate.addConstantUnion((yyvsp[0].lex).u, (yyvsp[0].lex).loc, true); } -#line 5228 "MachineIndependent/glslang_tab.cpp" +#line 5261 "MachineIndependent/glslang_tab.cpp" break; case 8: /* primary_expression: BOOLCONSTANT */ -#line 416 "MachineIndependent/glslang.y" +#line 386 "MachineIndependent/glslang.y" { (yyval.interm.intermTypedNode) = parseContext.intermediate.addConstantUnion((yyvsp[0].lex).b, (yyvsp[0].lex).loc, true); } -#line 5236 "MachineIndependent/glslang_tab.cpp" +#line 5269 "MachineIndependent/glslang_tab.cpp" break; case 9: /* primary_expression: STRING_LITERAL */ -#line 420 "MachineIndependent/glslang.y" +#line 389 "MachineIndependent/glslang.y" { (yyval.interm.intermTypedNode) = parseContext.intermediate.addConstantUnion((yyvsp[0].lex).string, (yyvsp[0].lex).loc, true); } -#line 5244 "MachineIndependent/glslang_tab.cpp" +#line 5277 "MachineIndependent/glslang_tab.cpp" break; case 10: /* primary_expression: INT32CONSTANT */ -#line 423 "MachineIndependent/glslang.y" +#line 392 "MachineIndependent/glslang.y" { parseContext.explicitInt32Check((yyvsp[0].lex).loc, "32-bit signed literal"); (yyval.interm.intermTypedNode) = parseContext.intermediate.addConstantUnion((yyvsp[0].lex).i, (yyvsp[0].lex).loc, true); } -#line 5253 "MachineIndependent/glslang_tab.cpp" +#line 5286 "MachineIndependent/glslang_tab.cpp" break; case 11: /* primary_expression: UINT32CONSTANT */ -#line 427 "MachineIndependent/glslang.y" +#line 396 "MachineIndependent/glslang.y" { parseContext.explicitInt32Check((yyvsp[0].lex).loc, "32-bit signed literal"); (yyval.interm.intermTypedNode) = parseContext.intermediate.addConstantUnion((yyvsp[0].lex).u, (yyvsp[0].lex).loc, true); } -#line 5262 "MachineIndependent/glslang_tab.cpp" +#line 5295 "MachineIndependent/glslang_tab.cpp" break; case 12: /* primary_expression: INT64CONSTANT */ -#line 431 "MachineIndependent/glslang.y" +#line 400 "MachineIndependent/glslang.y" { parseContext.int64Check((yyvsp[0].lex).loc, "64-bit integer literal"); (yyval.interm.intermTypedNode) = parseContext.intermediate.addConstantUnion((yyvsp[0].lex).i64, (yyvsp[0].lex).loc, true); } -#line 5271 "MachineIndependent/glslang_tab.cpp" +#line 5304 "MachineIndependent/glslang_tab.cpp" break; case 13: /* primary_expression: UINT64CONSTANT */ -#line 435 "MachineIndependent/glslang.y" +#line 404 "MachineIndependent/glslang.y" { parseContext.int64Check((yyvsp[0].lex).loc, "64-bit unsigned integer literal"); (yyval.interm.intermTypedNode) = parseContext.intermediate.addConstantUnion((yyvsp[0].lex).u64, (yyvsp[0].lex).loc, true); } -#line 5280 "MachineIndependent/glslang_tab.cpp" +#line 5313 "MachineIndependent/glslang_tab.cpp" break; case 14: /* primary_expression: INT16CONSTANT */ -#line 439 "MachineIndependent/glslang.y" +#line 408 "MachineIndependent/glslang.y" { parseContext.explicitInt16Check((yyvsp[0].lex).loc, "16-bit integer literal"); (yyval.interm.intermTypedNode) = parseContext.intermediate.addConstantUnion((short)(yyvsp[0].lex).i, (yyvsp[0].lex).loc, true); } -#line 5289 "MachineIndependent/glslang_tab.cpp" +#line 5322 "MachineIndependent/glslang_tab.cpp" break; case 15: /* primary_expression: UINT16CONSTANT */ -#line 443 "MachineIndependent/glslang.y" +#line 412 "MachineIndependent/glslang.y" { parseContext.explicitInt16Check((yyvsp[0].lex).loc, "16-bit unsigned integer literal"); (yyval.interm.intermTypedNode) = parseContext.intermediate.addConstantUnion((unsigned short)(yyvsp[0].lex).u, (yyvsp[0].lex).loc, true); } -#line 5298 "MachineIndependent/glslang_tab.cpp" +#line 5331 "MachineIndependent/glslang_tab.cpp" break; case 16: /* primary_expression: DOUBLECONSTANT */ -#line 447 "MachineIndependent/glslang.y" +#line 416 "MachineIndependent/glslang.y" { parseContext.requireProfile((yyvsp[0].lex).loc, ECoreProfile | ECompatibilityProfile, "double literal"); if (! parseContext.symbolTable.atBuiltInLevel()) parseContext.doubleCheck((yyvsp[0].lex).loc, "double literal"); (yyval.interm.intermTypedNode) = parseContext.intermediate.addConstantUnion((yyvsp[0].lex).d, EbtDouble, (yyvsp[0].lex).loc, true); } -#line 5309 "MachineIndependent/glslang_tab.cpp" +#line 5342 "MachineIndependent/glslang_tab.cpp" break; case 17: /* primary_expression: FLOAT16CONSTANT */ -#line 453 "MachineIndependent/glslang.y" +#line 422 "MachineIndependent/glslang.y" { parseContext.float16Check((yyvsp[0].lex).loc, "half float literal"); (yyval.interm.intermTypedNode) = parseContext.intermediate.addConstantUnion((yyvsp[0].lex).d, EbtFloat16, (yyvsp[0].lex).loc, true); } -#line 5318 "MachineIndependent/glslang_tab.cpp" +#line 5351 "MachineIndependent/glslang_tab.cpp" break; case 18: /* postfix_expression: primary_expression */ -#line 461 "MachineIndependent/glslang.y" +#line 429 "MachineIndependent/glslang.y" { (yyval.interm.intermTypedNode) = (yyvsp[0].interm.intermTypedNode); } -#line 5326 "MachineIndependent/glslang_tab.cpp" +#line 5359 "MachineIndependent/glslang_tab.cpp" break; case 19: /* postfix_expression: postfix_expression LEFT_BRACKET integer_expression RIGHT_BRACKET */ -#line 464 "MachineIndependent/glslang.y" +#line 432 "MachineIndependent/glslang.y" { (yyval.interm.intermTypedNode) = parseContext.handleBracketDereference((yyvsp[-2].lex).loc, (yyvsp[-3].interm.intermTypedNode), (yyvsp[-1].interm.intermTypedNode)); } -#line 5334 "MachineIndependent/glslang_tab.cpp" +#line 5367 "MachineIndependent/glslang_tab.cpp" break; case 20: /* postfix_expression: function_call */ -#line 467 "MachineIndependent/glslang.y" +#line 435 "MachineIndependent/glslang.y" { (yyval.interm.intermTypedNode) = (yyvsp[0].interm.intermTypedNode); } -#line 5342 "MachineIndependent/glslang_tab.cpp" +#line 5375 "MachineIndependent/glslang_tab.cpp" break; case 21: /* postfix_expression: postfix_expression DOT IDENTIFIER */ -#line 470 "MachineIndependent/glslang.y" +#line 438 "MachineIndependent/glslang.y" { (yyval.interm.intermTypedNode) = parseContext.handleDotDereference((yyvsp[0].lex).loc, (yyvsp[-2].interm.intermTypedNode), *(yyvsp[0].lex).string); } -#line 5350 "MachineIndependent/glslang_tab.cpp" +#line 5383 "MachineIndependent/glslang_tab.cpp" break; case 22: /* postfix_expression: postfix_expression INC_OP */ -#line 473 "MachineIndependent/glslang.y" +#line 441 "MachineIndependent/glslang.y" { parseContext.variableCheck((yyvsp[-1].interm.intermTypedNode)); parseContext.lValueErrorCheck((yyvsp[0].lex).loc, "++", (yyvsp[-1].interm.intermTypedNode)); (yyval.interm.intermTypedNode) = parseContext.handleUnaryMath((yyvsp[0].lex).loc, "++", EOpPostIncrement, (yyvsp[-1].interm.intermTypedNode)); } -#line 5360 "MachineIndependent/glslang_tab.cpp" +#line 5393 "MachineIndependent/glslang_tab.cpp" break; case 23: /* postfix_expression: postfix_expression DEC_OP */ -#line 478 "MachineIndependent/glslang.y" +#line 446 "MachineIndependent/glslang.y" { parseContext.variableCheck((yyvsp[-1].interm.intermTypedNode)); parseContext.lValueErrorCheck((yyvsp[0].lex).loc, "--", (yyvsp[-1].interm.intermTypedNode)); (yyval.interm.intermTypedNode) = parseContext.handleUnaryMath((yyvsp[0].lex).loc, "--", EOpPostDecrement, (yyvsp[-1].interm.intermTypedNode)); } -#line 5370 "MachineIndependent/glslang_tab.cpp" +#line 5403 "MachineIndependent/glslang_tab.cpp" break; case 24: /* integer_expression: expression */ -#line 486 "MachineIndependent/glslang.y" +#line 454 "MachineIndependent/glslang.y" { parseContext.integerCheck((yyvsp[0].interm.intermTypedNode), "[]"); (yyval.interm.intermTypedNode) = (yyvsp[0].interm.intermTypedNode); } -#line 5379 "MachineIndependent/glslang_tab.cpp" +#line 5412 "MachineIndependent/glslang_tab.cpp" break; case 25: /* function_call: function_call_or_method */ -#line 493 "MachineIndependent/glslang.y" +#line 461 "MachineIndependent/glslang.y" { (yyval.interm.intermTypedNode) = parseContext.handleFunctionCall((yyvsp[0].interm).loc, (yyvsp[0].interm).function, (yyvsp[0].interm).intermNode); delete (yyvsp[0].interm).function; } -#line 5388 "MachineIndependent/glslang_tab.cpp" +#line 5421 "MachineIndependent/glslang_tab.cpp" break; case 26: /* function_call_or_method: function_call_generic */ -#line 500 "MachineIndependent/glslang.y" +#line 468 "MachineIndependent/glslang.y" { (yyval.interm) = (yyvsp[0].interm); } -#line 5396 "MachineIndependent/glslang_tab.cpp" +#line 5429 "MachineIndependent/glslang_tab.cpp" break; case 27: /* function_call_generic: function_call_header_with_parameters RIGHT_PAREN */ -#line 506 "MachineIndependent/glslang.y" +#line 474 "MachineIndependent/glslang.y" { (yyval.interm) = (yyvsp[-1].interm); (yyval.interm).loc = (yyvsp[0].lex).loc; } -#line 5405 "MachineIndependent/glslang_tab.cpp" +#line 5438 "MachineIndependent/glslang_tab.cpp" break; case 28: /* function_call_generic: function_call_header_no_parameters RIGHT_PAREN */ -#line 510 "MachineIndependent/glslang.y" +#line 478 "MachineIndependent/glslang.y" { (yyval.interm) = (yyvsp[-1].interm); (yyval.interm).loc = (yyvsp[0].lex).loc; } -#line 5414 "MachineIndependent/glslang_tab.cpp" +#line 5447 "MachineIndependent/glslang_tab.cpp" break; case 29: /* function_call_header_no_parameters: function_call_header VOID */ -#line 517 "MachineIndependent/glslang.y" +#line 485 "MachineIndependent/glslang.y" { (yyval.interm) = (yyvsp[-1].interm); } -#line 5422 "MachineIndependent/glslang_tab.cpp" +#line 5455 "MachineIndependent/glslang_tab.cpp" break; case 30: /* function_call_header_no_parameters: function_call_header */ -#line 520 "MachineIndependent/glslang.y" +#line 488 "MachineIndependent/glslang.y" { (yyval.interm) = (yyvsp[0].interm); } -#line 5430 "MachineIndependent/glslang_tab.cpp" +#line 5463 "MachineIndependent/glslang_tab.cpp" break; case 31: /* function_call_header_with_parameters: function_call_header assignment_expression */ -#line 526 "MachineIndependent/glslang.y" +#line 494 "MachineIndependent/glslang.y" { TParameter param = { 0, new TType }; param.type->shallowCopy((yyvsp[0].interm.intermTypedNode)->getType()); @@ -5438,11 +5471,11 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); (yyval.interm).function = (yyvsp[-1].interm).function; (yyval.interm).intermNode = (yyvsp[0].interm.intermTypedNode); } -#line 5442 "MachineIndependent/glslang_tab.cpp" +#line 5475 "MachineIndependent/glslang_tab.cpp" break; case 32: /* function_call_header_with_parameters: function_call_header_with_parameters COMMA assignment_expression */ -#line 533 "MachineIndependent/glslang.y" +#line 501 "MachineIndependent/glslang.y" { TParameter param = { 0, new TType }; param.type->shallowCopy((yyvsp[0].interm.intermTypedNode)->getType()); @@ -5450,29 +5483,29 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); (yyval.interm).function = (yyvsp[-2].interm).function; (yyval.interm).intermNode = parseContext.intermediate.growAggregate((yyvsp[-2].interm).intermNode, (yyvsp[0].interm.intermTypedNode), (yyvsp[-1].lex).loc); } -#line 5454 "MachineIndependent/glslang_tab.cpp" +#line 5487 "MachineIndependent/glslang_tab.cpp" break; case 33: /* function_call_header: function_identifier LEFT_PAREN */ -#line 543 "MachineIndependent/glslang.y" +#line 511 "MachineIndependent/glslang.y" { (yyval.interm) = (yyvsp[-1].interm); } -#line 5462 "MachineIndependent/glslang_tab.cpp" +#line 5495 "MachineIndependent/glslang_tab.cpp" break; case 34: /* function_identifier: type_specifier */ -#line 551 "MachineIndependent/glslang.y" +#line 519 "MachineIndependent/glslang.y" { // Constructor (yyval.interm).intermNode = 0; (yyval.interm).function = parseContext.handleConstructorCall((yyvsp[0].interm.type).loc, (yyvsp[0].interm.type)); } -#line 5472 "MachineIndependent/glslang_tab.cpp" +#line 5505 "MachineIndependent/glslang_tab.cpp" break; case 35: /* function_identifier: postfix_expression */ -#line 556 "MachineIndependent/glslang.y" +#line 524 "MachineIndependent/glslang.y" { // // Should be a method or subroutine call, but we haven't recognized the arguments yet. @@ -5500,50 +5533,50 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); (yyval.interm).function = new TFunction(empty, TType(EbtVoid), EOpNull); } } -#line 5504 "MachineIndependent/glslang_tab.cpp" +#line 5537 "MachineIndependent/glslang_tab.cpp" break; case 36: /* function_identifier: non_uniform_qualifier */ -#line 584 "MachineIndependent/glslang.y" +#line 551 "MachineIndependent/glslang.y" { // Constructor (yyval.interm).intermNode = 0; (yyval.interm).function = parseContext.handleConstructorCall((yyvsp[0].interm.type).loc, (yyvsp[0].interm.type)); } -#line 5514 "MachineIndependent/glslang_tab.cpp" +#line 5547 "MachineIndependent/glslang_tab.cpp" break; case 37: /* unary_expression: postfix_expression */ -#line 593 "MachineIndependent/glslang.y" +#line 559 "MachineIndependent/glslang.y" { parseContext.variableCheck((yyvsp[0].interm.intermTypedNode)); (yyval.interm.intermTypedNode) = (yyvsp[0].interm.intermTypedNode); if (TIntermMethod* method = (yyvsp[0].interm.intermTypedNode)->getAsMethodNode()) parseContext.error((yyvsp[0].interm.intermTypedNode)->getLoc(), "incomplete method syntax", method->getMethodName().c_str(), ""); } -#line 5525 "MachineIndependent/glslang_tab.cpp" +#line 5558 "MachineIndependent/glslang_tab.cpp" break; case 38: /* unary_expression: INC_OP unary_expression */ -#line 599 "MachineIndependent/glslang.y" +#line 565 "MachineIndependent/glslang.y" { parseContext.lValueErrorCheck((yyvsp[-1].lex).loc, "++", (yyvsp[0].interm.intermTypedNode)); (yyval.interm.intermTypedNode) = parseContext.handleUnaryMath((yyvsp[-1].lex).loc, "++", EOpPreIncrement, (yyvsp[0].interm.intermTypedNode)); } -#line 5534 "MachineIndependent/glslang_tab.cpp" +#line 5567 "MachineIndependent/glslang_tab.cpp" break; case 39: /* unary_expression: DEC_OP unary_expression */ -#line 603 "MachineIndependent/glslang.y" +#line 569 "MachineIndependent/glslang.y" { parseContext.lValueErrorCheck((yyvsp[-1].lex).loc, "--", (yyvsp[0].interm.intermTypedNode)); (yyval.interm.intermTypedNode) = parseContext.handleUnaryMath((yyvsp[-1].lex).loc, "--", EOpPreDecrement, (yyvsp[0].interm.intermTypedNode)); } -#line 5543 "MachineIndependent/glslang_tab.cpp" +#line 5576 "MachineIndependent/glslang_tab.cpp" break; case 40: /* unary_expression: unary_operator unary_expression */ -#line 607 "MachineIndependent/glslang.y" +#line 573 "MachineIndependent/glslang.y" { if ((yyvsp[-1].interm).op != EOpNull) { char errorOp[2] = {0, 0}; @@ -5560,179 +5593,179 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); (yyval.interm.intermTypedNode)->getAsConstantUnion()->setExpression(); } } -#line 5564 "MachineIndependent/glslang_tab.cpp" +#line 5597 "MachineIndependent/glslang_tab.cpp" break; case 41: /* unary_operator: PLUS */ -#line 627 "MachineIndependent/glslang.y" +#line 593 "MachineIndependent/glslang.y" { (yyval.interm).loc = (yyvsp[0].lex).loc; (yyval.interm).op = EOpNull; } -#line 5570 "MachineIndependent/glslang_tab.cpp" +#line 5603 "MachineIndependent/glslang_tab.cpp" break; case 42: /* unary_operator: DASH */ -#line 628 "MachineIndependent/glslang.y" +#line 594 "MachineIndependent/glslang.y" { (yyval.interm).loc = (yyvsp[0].lex).loc; (yyval.interm).op = EOpNegative; } -#line 5576 "MachineIndependent/glslang_tab.cpp" +#line 5609 "MachineIndependent/glslang_tab.cpp" break; case 43: /* unary_operator: BANG */ -#line 629 "MachineIndependent/glslang.y" +#line 595 "MachineIndependent/glslang.y" { (yyval.interm).loc = (yyvsp[0].lex).loc; (yyval.interm).op = EOpLogicalNot; } -#line 5582 "MachineIndependent/glslang_tab.cpp" +#line 5615 "MachineIndependent/glslang_tab.cpp" break; case 44: /* unary_operator: TILDE */ -#line 630 "MachineIndependent/glslang.y" +#line 596 "MachineIndependent/glslang.y" { (yyval.interm).loc = (yyvsp[0].lex).loc; (yyval.interm).op = EOpBitwiseNot; parseContext.fullIntegerCheck((yyvsp[0].lex).loc, "bitwise not"); } -#line 5589 "MachineIndependent/glslang_tab.cpp" +#line 5622 "MachineIndependent/glslang_tab.cpp" break; case 45: /* multiplicative_expression: unary_expression */ -#line 636 "MachineIndependent/glslang.y" +#line 602 "MachineIndependent/glslang.y" { (yyval.interm.intermTypedNode) = (yyvsp[0].interm.intermTypedNode); } -#line 5595 "MachineIndependent/glslang_tab.cpp" +#line 5628 "MachineIndependent/glslang_tab.cpp" break; case 46: /* multiplicative_expression: multiplicative_expression STAR unary_expression */ -#line 637 "MachineIndependent/glslang.y" +#line 603 "MachineIndependent/glslang.y" { (yyval.interm.intermTypedNode) = parseContext.handleBinaryMath((yyvsp[-1].lex).loc, "*", EOpMul, (yyvsp[-2].interm.intermTypedNode), (yyvsp[0].interm.intermTypedNode)); if ((yyval.interm.intermTypedNode) == 0) (yyval.interm.intermTypedNode) = (yyvsp[-2].interm.intermTypedNode); } -#line 5605 "MachineIndependent/glslang_tab.cpp" +#line 5638 "MachineIndependent/glslang_tab.cpp" break; case 47: /* multiplicative_expression: multiplicative_expression SLASH unary_expression */ -#line 642 "MachineIndependent/glslang.y" +#line 608 "MachineIndependent/glslang.y" { (yyval.interm.intermTypedNode) = parseContext.handleBinaryMath((yyvsp[-1].lex).loc, "/", EOpDiv, (yyvsp[-2].interm.intermTypedNode), (yyvsp[0].interm.intermTypedNode)); if ((yyval.interm.intermTypedNode) == 0) (yyval.interm.intermTypedNode) = (yyvsp[-2].interm.intermTypedNode); } -#line 5615 "MachineIndependent/glslang_tab.cpp" +#line 5648 "MachineIndependent/glslang_tab.cpp" break; case 48: /* multiplicative_expression: multiplicative_expression PERCENT unary_expression */ -#line 647 "MachineIndependent/glslang.y" +#line 613 "MachineIndependent/glslang.y" { parseContext.fullIntegerCheck((yyvsp[-1].lex).loc, "%"); (yyval.interm.intermTypedNode) = parseContext.handleBinaryMath((yyvsp[-1].lex).loc, "%", EOpMod, (yyvsp[-2].interm.intermTypedNode), (yyvsp[0].interm.intermTypedNode)); if ((yyval.interm.intermTypedNode) == 0) (yyval.interm.intermTypedNode) = (yyvsp[-2].interm.intermTypedNode); } -#line 5626 "MachineIndependent/glslang_tab.cpp" +#line 5659 "MachineIndependent/glslang_tab.cpp" break; case 49: /* additive_expression: multiplicative_expression */ -#line 656 "MachineIndependent/glslang.y" +#line 622 "MachineIndependent/glslang.y" { (yyval.interm.intermTypedNode) = (yyvsp[0].interm.intermTypedNode); } -#line 5632 "MachineIndependent/glslang_tab.cpp" +#line 5665 "MachineIndependent/glslang_tab.cpp" break; case 50: /* additive_expression: additive_expression PLUS multiplicative_expression */ -#line 657 "MachineIndependent/glslang.y" +#line 623 "MachineIndependent/glslang.y" { (yyval.interm.intermTypedNode) = parseContext.handleBinaryMath((yyvsp[-1].lex).loc, "+", EOpAdd, (yyvsp[-2].interm.intermTypedNode), (yyvsp[0].interm.intermTypedNode)); if ((yyval.interm.intermTypedNode) == 0) (yyval.interm.intermTypedNode) = (yyvsp[-2].interm.intermTypedNode); } -#line 5642 "MachineIndependent/glslang_tab.cpp" +#line 5675 "MachineIndependent/glslang_tab.cpp" break; case 51: /* additive_expression: additive_expression DASH multiplicative_expression */ -#line 662 "MachineIndependent/glslang.y" +#line 628 "MachineIndependent/glslang.y" { (yyval.interm.intermTypedNode) = parseContext.handleBinaryMath((yyvsp[-1].lex).loc, "-", EOpSub, (yyvsp[-2].interm.intermTypedNode), (yyvsp[0].interm.intermTypedNode)); if ((yyval.interm.intermTypedNode) == 0) (yyval.interm.intermTypedNode) = (yyvsp[-2].interm.intermTypedNode); } -#line 5652 "MachineIndependent/glslang_tab.cpp" +#line 5685 "MachineIndependent/glslang_tab.cpp" break; case 52: /* shift_expression: additive_expression */ -#line 670 "MachineIndependent/glslang.y" +#line 636 "MachineIndependent/glslang.y" { (yyval.interm.intermTypedNode) = (yyvsp[0].interm.intermTypedNode); } -#line 5658 "MachineIndependent/glslang_tab.cpp" +#line 5691 "MachineIndependent/glslang_tab.cpp" break; case 53: /* shift_expression: shift_expression LEFT_OP additive_expression */ -#line 671 "MachineIndependent/glslang.y" +#line 637 "MachineIndependent/glslang.y" { parseContext.fullIntegerCheck((yyvsp[-1].lex).loc, "bit shift left"); (yyval.interm.intermTypedNode) = parseContext.handleBinaryMath((yyvsp[-1].lex).loc, "<<", EOpLeftShift, (yyvsp[-2].interm.intermTypedNode), (yyvsp[0].interm.intermTypedNode)); if ((yyval.interm.intermTypedNode) == 0) (yyval.interm.intermTypedNode) = (yyvsp[-2].interm.intermTypedNode); } -#line 5669 "MachineIndependent/glslang_tab.cpp" +#line 5702 "MachineIndependent/glslang_tab.cpp" break; case 54: /* shift_expression: shift_expression RIGHT_OP additive_expression */ -#line 677 "MachineIndependent/glslang.y" +#line 643 "MachineIndependent/glslang.y" { parseContext.fullIntegerCheck((yyvsp[-1].lex).loc, "bit shift right"); (yyval.interm.intermTypedNode) = parseContext.handleBinaryMath((yyvsp[-1].lex).loc, ">>", EOpRightShift, (yyvsp[-2].interm.intermTypedNode), (yyvsp[0].interm.intermTypedNode)); if ((yyval.interm.intermTypedNode) == 0) (yyval.interm.intermTypedNode) = (yyvsp[-2].interm.intermTypedNode); } -#line 5680 "MachineIndependent/glslang_tab.cpp" +#line 5713 "MachineIndependent/glslang_tab.cpp" break; case 55: /* relational_expression: shift_expression */ -#line 686 "MachineIndependent/glslang.y" +#line 652 "MachineIndependent/glslang.y" { (yyval.interm.intermTypedNode) = (yyvsp[0].interm.intermTypedNode); } -#line 5686 "MachineIndependent/glslang_tab.cpp" +#line 5719 "MachineIndependent/glslang_tab.cpp" break; case 56: /* relational_expression: relational_expression LEFT_ANGLE shift_expression */ -#line 687 "MachineIndependent/glslang.y" +#line 653 "MachineIndependent/glslang.y" { (yyval.interm.intermTypedNode) = parseContext.handleBinaryMath((yyvsp[-1].lex).loc, "<", EOpLessThan, (yyvsp[-2].interm.intermTypedNode), (yyvsp[0].interm.intermTypedNode)); if ((yyval.interm.intermTypedNode) == 0) (yyval.interm.intermTypedNode) = parseContext.intermediate.addConstantUnion(false, (yyvsp[-1].lex).loc); } -#line 5696 "MachineIndependent/glslang_tab.cpp" +#line 5729 "MachineIndependent/glslang_tab.cpp" break; case 57: /* relational_expression: relational_expression RIGHT_ANGLE shift_expression */ -#line 692 "MachineIndependent/glslang.y" +#line 658 "MachineIndependent/glslang.y" { (yyval.interm.intermTypedNode) = parseContext.handleBinaryMath((yyvsp[-1].lex).loc, ">", EOpGreaterThan, (yyvsp[-2].interm.intermTypedNode), (yyvsp[0].interm.intermTypedNode)); if ((yyval.interm.intermTypedNode) == 0) (yyval.interm.intermTypedNode) = parseContext.intermediate.addConstantUnion(false, (yyvsp[-1].lex).loc); } -#line 5706 "MachineIndependent/glslang_tab.cpp" +#line 5739 "MachineIndependent/glslang_tab.cpp" break; case 58: /* relational_expression: relational_expression LE_OP shift_expression */ -#line 697 "MachineIndependent/glslang.y" +#line 663 "MachineIndependent/glslang.y" { (yyval.interm.intermTypedNode) = parseContext.handleBinaryMath((yyvsp[-1].lex).loc, "<=", EOpLessThanEqual, (yyvsp[-2].interm.intermTypedNode), (yyvsp[0].interm.intermTypedNode)); if ((yyval.interm.intermTypedNode) == 0) (yyval.interm.intermTypedNode) = parseContext.intermediate.addConstantUnion(false, (yyvsp[-1].lex).loc); } -#line 5716 "MachineIndependent/glslang_tab.cpp" +#line 5749 "MachineIndependent/glslang_tab.cpp" break; case 59: /* relational_expression: relational_expression GE_OP shift_expression */ -#line 702 "MachineIndependent/glslang.y" +#line 668 "MachineIndependent/glslang.y" { (yyval.interm.intermTypedNode) = parseContext.handleBinaryMath((yyvsp[-1].lex).loc, ">=", EOpGreaterThanEqual, (yyvsp[-2].interm.intermTypedNode), (yyvsp[0].interm.intermTypedNode)); if ((yyval.interm.intermTypedNode) == 0) (yyval.interm.intermTypedNode) = parseContext.intermediate.addConstantUnion(false, (yyvsp[-1].lex).loc); } -#line 5726 "MachineIndependent/glslang_tab.cpp" +#line 5759 "MachineIndependent/glslang_tab.cpp" break; case 60: /* equality_expression: relational_expression */ -#line 710 "MachineIndependent/glslang.y" +#line 676 "MachineIndependent/glslang.y" { (yyval.interm.intermTypedNode) = (yyvsp[0].interm.intermTypedNode); } -#line 5732 "MachineIndependent/glslang_tab.cpp" +#line 5765 "MachineIndependent/glslang_tab.cpp" break; case 61: /* equality_expression: equality_expression EQ_OP relational_expression */ -#line 711 "MachineIndependent/glslang.y" +#line 677 "MachineIndependent/glslang.y" { parseContext.arrayObjectCheck((yyvsp[-1].lex).loc, (yyvsp[-2].interm.intermTypedNode)->getType(), "array comparison"); parseContext.opaqueCheck((yyvsp[-1].lex).loc, (yyvsp[-2].interm.intermTypedNode)->getType(), "=="); @@ -5742,11 +5775,11 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); if ((yyval.interm.intermTypedNode) == 0) (yyval.interm.intermTypedNode) = parseContext.intermediate.addConstantUnion(false, (yyvsp[-1].lex).loc); } -#line 5746 "MachineIndependent/glslang_tab.cpp" +#line 5779 "MachineIndependent/glslang_tab.cpp" break; case 62: /* equality_expression: equality_expression NE_OP relational_expression */ -#line 720 "MachineIndependent/glslang.y" +#line 686 "MachineIndependent/glslang.y" { parseContext.arrayObjectCheck((yyvsp[-1].lex).loc, (yyvsp[-2].interm.intermTypedNode)->getType(), "array comparison"); parseContext.opaqueCheck((yyvsp[-1].lex).loc, (yyvsp[-2].interm.intermTypedNode)->getType(), "!="); @@ -5756,124 +5789,124 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); if ((yyval.interm.intermTypedNode) == 0) (yyval.interm.intermTypedNode) = parseContext.intermediate.addConstantUnion(false, (yyvsp[-1].lex).loc); } -#line 5760 "MachineIndependent/glslang_tab.cpp" +#line 5793 "MachineIndependent/glslang_tab.cpp" break; case 63: /* and_expression: equality_expression */ -#line 732 "MachineIndependent/glslang.y" +#line 698 "MachineIndependent/glslang.y" { (yyval.interm.intermTypedNode) = (yyvsp[0].interm.intermTypedNode); } -#line 5766 "MachineIndependent/glslang_tab.cpp" +#line 5799 "MachineIndependent/glslang_tab.cpp" break; case 64: /* and_expression: and_expression AMPERSAND equality_expression */ -#line 733 "MachineIndependent/glslang.y" +#line 699 "MachineIndependent/glslang.y" { parseContext.fullIntegerCheck((yyvsp[-1].lex).loc, "bitwise and"); (yyval.interm.intermTypedNode) = parseContext.handleBinaryMath((yyvsp[-1].lex).loc, "&", EOpAnd, (yyvsp[-2].interm.intermTypedNode), (yyvsp[0].interm.intermTypedNode)); if ((yyval.interm.intermTypedNode) == 0) (yyval.interm.intermTypedNode) = (yyvsp[-2].interm.intermTypedNode); } -#line 5777 "MachineIndependent/glslang_tab.cpp" +#line 5810 "MachineIndependent/glslang_tab.cpp" break; case 65: /* exclusive_or_expression: and_expression */ -#line 742 "MachineIndependent/glslang.y" +#line 708 "MachineIndependent/glslang.y" { (yyval.interm.intermTypedNode) = (yyvsp[0].interm.intermTypedNode); } -#line 5783 "MachineIndependent/glslang_tab.cpp" +#line 5816 "MachineIndependent/glslang_tab.cpp" break; case 66: /* exclusive_or_expression: exclusive_or_expression CARET and_expression */ -#line 743 "MachineIndependent/glslang.y" +#line 709 "MachineIndependent/glslang.y" { parseContext.fullIntegerCheck((yyvsp[-1].lex).loc, "bitwise exclusive or"); (yyval.interm.intermTypedNode) = parseContext.handleBinaryMath((yyvsp[-1].lex).loc, "^", EOpExclusiveOr, (yyvsp[-2].interm.intermTypedNode), (yyvsp[0].interm.intermTypedNode)); if ((yyval.interm.intermTypedNode) == 0) (yyval.interm.intermTypedNode) = (yyvsp[-2].interm.intermTypedNode); } -#line 5794 "MachineIndependent/glslang_tab.cpp" +#line 5827 "MachineIndependent/glslang_tab.cpp" break; case 67: /* inclusive_or_expression: exclusive_or_expression */ -#line 752 "MachineIndependent/glslang.y" +#line 718 "MachineIndependent/glslang.y" { (yyval.interm.intermTypedNode) = (yyvsp[0].interm.intermTypedNode); } -#line 5800 "MachineIndependent/glslang_tab.cpp" +#line 5833 "MachineIndependent/glslang_tab.cpp" break; case 68: /* inclusive_or_expression: inclusive_or_expression VERTICAL_BAR exclusive_or_expression */ -#line 753 "MachineIndependent/glslang.y" +#line 719 "MachineIndependent/glslang.y" { parseContext.fullIntegerCheck((yyvsp[-1].lex).loc, "bitwise inclusive or"); (yyval.interm.intermTypedNode) = parseContext.handleBinaryMath((yyvsp[-1].lex).loc, "|", EOpInclusiveOr, (yyvsp[-2].interm.intermTypedNode), (yyvsp[0].interm.intermTypedNode)); if ((yyval.interm.intermTypedNode) == 0) (yyval.interm.intermTypedNode) = (yyvsp[-2].interm.intermTypedNode); } -#line 5811 "MachineIndependent/glslang_tab.cpp" +#line 5844 "MachineIndependent/glslang_tab.cpp" break; case 69: /* logical_and_expression: inclusive_or_expression */ -#line 762 "MachineIndependent/glslang.y" +#line 728 "MachineIndependent/glslang.y" { (yyval.interm.intermTypedNode) = (yyvsp[0].interm.intermTypedNode); } -#line 5817 "MachineIndependent/glslang_tab.cpp" +#line 5850 "MachineIndependent/glslang_tab.cpp" break; case 70: /* logical_and_expression: logical_and_expression AND_OP inclusive_or_expression */ -#line 763 "MachineIndependent/glslang.y" +#line 729 "MachineIndependent/glslang.y" { (yyval.interm.intermTypedNode) = parseContext.handleBinaryMath((yyvsp[-1].lex).loc, "&&", EOpLogicalAnd, (yyvsp[-2].interm.intermTypedNode), (yyvsp[0].interm.intermTypedNode)); if ((yyval.interm.intermTypedNode) == 0) (yyval.interm.intermTypedNode) = parseContext.intermediate.addConstantUnion(false, (yyvsp[-1].lex).loc); } -#line 5827 "MachineIndependent/glslang_tab.cpp" +#line 5860 "MachineIndependent/glslang_tab.cpp" break; case 71: /* logical_xor_expression: logical_and_expression */ -#line 771 "MachineIndependent/glslang.y" +#line 737 "MachineIndependent/glslang.y" { (yyval.interm.intermTypedNode) = (yyvsp[0].interm.intermTypedNode); } -#line 5833 "MachineIndependent/glslang_tab.cpp" +#line 5866 "MachineIndependent/glslang_tab.cpp" break; case 72: /* logical_xor_expression: logical_xor_expression XOR_OP logical_and_expression */ -#line 772 "MachineIndependent/glslang.y" +#line 738 "MachineIndependent/glslang.y" { (yyval.interm.intermTypedNode) = parseContext.handleBinaryMath((yyvsp[-1].lex).loc, "^^", EOpLogicalXor, (yyvsp[-2].interm.intermTypedNode), (yyvsp[0].interm.intermTypedNode)); if ((yyval.interm.intermTypedNode) == 0) (yyval.interm.intermTypedNode) = parseContext.intermediate.addConstantUnion(false, (yyvsp[-1].lex).loc); } -#line 5843 "MachineIndependent/glslang_tab.cpp" +#line 5876 "MachineIndependent/glslang_tab.cpp" break; case 73: /* logical_or_expression: logical_xor_expression */ -#line 780 "MachineIndependent/glslang.y" +#line 746 "MachineIndependent/glslang.y" { (yyval.interm.intermTypedNode) = (yyvsp[0].interm.intermTypedNode); } -#line 5849 "MachineIndependent/glslang_tab.cpp" +#line 5882 "MachineIndependent/glslang_tab.cpp" break; case 74: /* logical_or_expression: logical_or_expression OR_OP logical_xor_expression */ -#line 781 "MachineIndependent/glslang.y" +#line 747 "MachineIndependent/glslang.y" { (yyval.interm.intermTypedNode) = parseContext.handleBinaryMath((yyvsp[-1].lex).loc, "||", EOpLogicalOr, (yyvsp[-2].interm.intermTypedNode), (yyvsp[0].interm.intermTypedNode)); if ((yyval.interm.intermTypedNode) == 0) (yyval.interm.intermTypedNode) = parseContext.intermediate.addConstantUnion(false, (yyvsp[-1].lex).loc); } -#line 5859 "MachineIndependent/glslang_tab.cpp" +#line 5892 "MachineIndependent/glslang_tab.cpp" break; case 75: /* conditional_expression: logical_or_expression */ -#line 789 "MachineIndependent/glslang.y" +#line 755 "MachineIndependent/glslang.y" { (yyval.interm.intermTypedNode) = (yyvsp[0].interm.intermTypedNode); } -#line 5865 "MachineIndependent/glslang_tab.cpp" +#line 5898 "MachineIndependent/glslang_tab.cpp" break; case 76: /* $@1: %empty */ -#line 790 "MachineIndependent/glslang.y" +#line 756 "MachineIndependent/glslang.y" { ++parseContext.controlFlowNestingLevel; } -#line 5873 "MachineIndependent/glslang_tab.cpp" +#line 5906 "MachineIndependent/glslang_tab.cpp" break; case 77: /* conditional_expression: logical_or_expression QUESTION $@1 expression COLON assignment_expression */ -#line 793 "MachineIndependent/glslang.y" +#line 759 "MachineIndependent/glslang.y" { --parseContext.controlFlowNestingLevel; parseContext.boolCheck((yyvsp[-4].lex).loc, (yyvsp[-5].interm.intermTypedNode)); @@ -5886,17 +5919,17 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); (yyval.interm.intermTypedNode) = (yyvsp[0].interm.intermTypedNode); } } -#line 5890 "MachineIndependent/glslang_tab.cpp" +#line 5923 "MachineIndependent/glslang_tab.cpp" break; case 78: /* assignment_expression: conditional_expression */ -#line 808 "MachineIndependent/glslang.y" +#line 774 "MachineIndependent/glslang.y" { (yyval.interm.intermTypedNode) = (yyvsp[0].interm.intermTypedNode); } -#line 5896 "MachineIndependent/glslang_tab.cpp" +#line 5929 "MachineIndependent/glslang_tab.cpp" break; case 79: /* assignment_expression: unary_expression assignment_operator assignment_expression */ -#line 809 "MachineIndependent/glslang.y" +#line 775 "MachineIndependent/glslang.y" { parseContext.arrayObjectCheck((yyvsp[-1].interm).loc, (yyvsp[-2].interm.intermTypedNode)->getType(), "array assignment"); parseContext.opaqueCheck((yyvsp[-1].interm).loc, (yyvsp[-2].interm.intermTypedNode)->getType(), "="); @@ -5910,119 +5943,119 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); (yyval.interm.intermTypedNode) = (yyvsp[-2].interm.intermTypedNode); } } -#line 5914 "MachineIndependent/glslang_tab.cpp" +#line 5947 "MachineIndependent/glslang_tab.cpp" break; case 80: /* assignment_operator: EQUAL */ -#line 825 "MachineIndependent/glslang.y" +#line 791 "MachineIndependent/glslang.y" { (yyval.interm).loc = (yyvsp[0].lex).loc; (yyval.interm).op = EOpAssign; } -#line 5923 "MachineIndependent/glslang_tab.cpp" +#line 5956 "MachineIndependent/glslang_tab.cpp" break; case 81: /* assignment_operator: MUL_ASSIGN */ -#line 829 "MachineIndependent/glslang.y" +#line 795 "MachineIndependent/glslang.y" { (yyval.interm).loc = (yyvsp[0].lex).loc; (yyval.interm).op = EOpMulAssign; } -#line 5932 "MachineIndependent/glslang_tab.cpp" +#line 5965 "MachineIndependent/glslang_tab.cpp" break; case 82: /* assignment_operator: DIV_ASSIGN */ -#line 833 "MachineIndependent/glslang.y" +#line 799 "MachineIndependent/glslang.y" { (yyval.interm).loc = (yyvsp[0].lex).loc; (yyval.interm).op = EOpDivAssign; } -#line 5941 "MachineIndependent/glslang_tab.cpp" +#line 5974 "MachineIndependent/glslang_tab.cpp" break; case 83: /* assignment_operator: MOD_ASSIGN */ -#line 837 "MachineIndependent/glslang.y" +#line 803 "MachineIndependent/glslang.y" { parseContext.fullIntegerCheck((yyvsp[0].lex).loc, "%="); (yyval.interm).loc = (yyvsp[0].lex).loc; (yyval.interm).op = EOpModAssign; } -#line 5951 "MachineIndependent/glslang_tab.cpp" +#line 5984 "MachineIndependent/glslang_tab.cpp" break; case 84: /* assignment_operator: ADD_ASSIGN */ -#line 842 "MachineIndependent/glslang.y" +#line 808 "MachineIndependent/glslang.y" { (yyval.interm).loc = (yyvsp[0].lex).loc; (yyval.interm).op = EOpAddAssign; } -#line 5960 "MachineIndependent/glslang_tab.cpp" +#line 5993 "MachineIndependent/glslang_tab.cpp" break; case 85: /* assignment_operator: SUB_ASSIGN */ -#line 846 "MachineIndependent/glslang.y" +#line 812 "MachineIndependent/glslang.y" { (yyval.interm).loc = (yyvsp[0].lex).loc; (yyval.interm).op = EOpSubAssign; } -#line 5969 "MachineIndependent/glslang_tab.cpp" +#line 6002 "MachineIndependent/glslang_tab.cpp" break; case 86: /* assignment_operator: LEFT_ASSIGN */ -#line 850 "MachineIndependent/glslang.y" +#line 816 "MachineIndependent/glslang.y" { parseContext.fullIntegerCheck((yyvsp[0].lex).loc, "bit-shift left assign"); (yyval.interm).loc = (yyvsp[0].lex).loc; (yyval.interm).op = EOpLeftShiftAssign; } -#line 5978 "MachineIndependent/glslang_tab.cpp" +#line 6011 "MachineIndependent/glslang_tab.cpp" break; case 87: /* assignment_operator: RIGHT_ASSIGN */ -#line 854 "MachineIndependent/glslang.y" +#line 820 "MachineIndependent/glslang.y" { parseContext.fullIntegerCheck((yyvsp[0].lex).loc, "bit-shift right assign"); (yyval.interm).loc = (yyvsp[0].lex).loc; (yyval.interm).op = EOpRightShiftAssign; } -#line 5987 "MachineIndependent/glslang_tab.cpp" +#line 6020 "MachineIndependent/glslang_tab.cpp" break; case 88: /* assignment_operator: AND_ASSIGN */ -#line 858 "MachineIndependent/glslang.y" +#line 824 "MachineIndependent/glslang.y" { parseContext.fullIntegerCheck((yyvsp[0].lex).loc, "bitwise-and assign"); (yyval.interm).loc = (yyvsp[0].lex).loc; (yyval.interm).op = EOpAndAssign; } -#line 5996 "MachineIndependent/glslang_tab.cpp" +#line 6029 "MachineIndependent/glslang_tab.cpp" break; case 89: /* assignment_operator: XOR_ASSIGN */ -#line 862 "MachineIndependent/glslang.y" +#line 828 "MachineIndependent/glslang.y" { parseContext.fullIntegerCheck((yyvsp[0].lex).loc, "bitwise-xor assign"); (yyval.interm).loc = (yyvsp[0].lex).loc; (yyval.interm).op = EOpExclusiveOrAssign; } -#line 6005 "MachineIndependent/glslang_tab.cpp" +#line 6038 "MachineIndependent/glslang_tab.cpp" break; case 90: /* assignment_operator: OR_ASSIGN */ -#line 866 "MachineIndependent/glslang.y" +#line 832 "MachineIndependent/glslang.y" { parseContext.fullIntegerCheck((yyvsp[0].lex).loc, "bitwise-or assign"); (yyval.interm).loc = (yyvsp[0].lex).loc; (yyval.interm).op = EOpInclusiveOrAssign; } -#line 6014 "MachineIndependent/glslang_tab.cpp" +#line 6047 "MachineIndependent/glslang_tab.cpp" break; case 91: /* expression: assignment_expression */ -#line 873 "MachineIndependent/glslang.y" +#line 839 "MachineIndependent/glslang.y" { (yyval.interm.intermTypedNode) = (yyvsp[0].interm.intermTypedNode); } -#line 6022 "MachineIndependent/glslang_tab.cpp" +#line 6055 "MachineIndependent/glslang_tab.cpp" break; case 92: /* expression: expression COMMA assignment_expression */ -#line 876 "MachineIndependent/glslang.y" +#line 842 "MachineIndependent/glslang.y" { parseContext.samplerConstructorLocationCheck((yyvsp[-1].lex).loc, ",", (yyvsp[0].interm.intermTypedNode)); (yyval.interm.intermTypedNode) = parseContext.intermediate.addComma((yyvsp[-2].interm.intermTypedNode), (yyvsp[0].interm.intermTypedNode), (yyvsp[-1].lex).loc); @@ -6031,30 +6064,30 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); (yyval.interm.intermTypedNode) = (yyvsp[0].interm.intermTypedNode); } } -#line 6035 "MachineIndependent/glslang_tab.cpp" +#line 6068 "MachineIndependent/glslang_tab.cpp" break; case 93: /* constant_expression: conditional_expression */ -#line 887 "MachineIndependent/glslang.y" +#line 853 "MachineIndependent/glslang.y" { parseContext.constantValueCheck((yyvsp[0].interm.intermTypedNode), ""); (yyval.interm.intermTypedNode) = (yyvsp[0].interm.intermTypedNode); } -#line 6044 "MachineIndependent/glslang_tab.cpp" +#line 6077 "MachineIndependent/glslang_tab.cpp" break; case 94: /* declaration: function_prototype SEMICOLON */ -#line 894 "MachineIndependent/glslang.y" +#line 860 "MachineIndependent/glslang.y" { parseContext.handleFunctionDeclarator((yyvsp[-1].interm).loc, *(yyvsp[-1].interm).function, true /* prototype */); (yyval.interm.intermNode) = 0; // TODO: 4.0 functionality: subroutines: make the identifier a user type for this signature } -#line 6054 "MachineIndependent/glslang_tab.cpp" +#line 6087 "MachineIndependent/glslang_tab.cpp" break; case 95: /* declaration: spirv_instruction_qualifier function_prototype SEMICOLON */ -#line 900 "MachineIndependent/glslang.y" +#line 865 "MachineIndependent/glslang.y" { parseContext.requireExtensions((yyvsp[-1].interm).loc, 1, &E_GL_EXT_spirv_intrinsics, "SPIR-V instruction qualifier"); (yyvsp[-1].interm).function->setSpirvInstruction(*(yyvsp[-2].interm.spirvInst)); // Attach SPIR-V intruction qualifier @@ -6062,31 +6095,31 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); (yyval.interm.intermNode) = 0; // TODO: 4.0 functionality: subroutines: make the identifier a user type for this signature } -#line 6066 "MachineIndependent/glslang_tab.cpp" +#line 6099 "MachineIndependent/glslang_tab.cpp" break; case 96: /* declaration: spirv_execution_mode_qualifier SEMICOLON */ -#line 907 "MachineIndependent/glslang.y" +#line 872 "MachineIndependent/glslang.y" { parseContext.globalCheck((yyvsp[0].lex).loc, "SPIR-V execution mode qualifier"); parseContext.requireExtensions((yyvsp[0].lex).loc, 1, &E_GL_EXT_spirv_intrinsics, "SPIR-V execution mode qualifier"); (yyval.interm.intermNode) = 0; } -#line 6076 "MachineIndependent/glslang_tab.cpp" +#line 6109 "MachineIndependent/glslang_tab.cpp" break; case 97: /* declaration: init_declarator_list SEMICOLON */ -#line 913 "MachineIndependent/glslang.y" +#line 877 "MachineIndependent/glslang.y" { if ((yyvsp[-1].interm).intermNode && (yyvsp[-1].interm).intermNode->getAsAggregate()) (yyvsp[-1].interm).intermNode->getAsAggregate()->setOperator(EOpSequence); (yyval.interm.intermNode) = (yyvsp[-1].interm).intermNode; } -#line 6086 "MachineIndependent/glslang_tab.cpp" +#line 6119 "MachineIndependent/glslang_tab.cpp" break; case 98: /* declaration: PRECISION precision_qualifier type_specifier SEMICOLON */ -#line 918 "MachineIndependent/glslang.y" +#line 882 "MachineIndependent/glslang.y" { parseContext.profileRequires((yyvsp[-3].lex).loc, ENoProfile, 130, 0, "precision statement"); // lazy setting of the previous scope's defaults, has effect only the first time it is called in a particular scope @@ -6094,75 +6127,75 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); parseContext.setDefaultPrecision((yyvsp[-3].lex).loc, (yyvsp[-1].interm.type), (yyvsp[-2].interm.type).qualifier.precision); (yyval.interm.intermNode) = 0; } -#line 6098 "MachineIndependent/glslang_tab.cpp" +#line 6131 "MachineIndependent/glslang_tab.cpp" break; case 99: /* declaration: block_structure SEMICOLON */ -#line 925 "MachineIndependent/glslang.y" +#line 889 "MachineIndependent/glslang.y" { parseContext.declareBlock((yyvsp[-1].interm).loc, *(yyvsp[-1].interm).typeList); (yyval.interm.intermNode) = 0; } -#line 6107 "MachineIndependent/glslang_tab.cpp" +#line 6140 "MachineIndependent/glslang_tab.cpp" break; case 100: /* declaration: block_structure IDENTIFIER SEMICOLON */ -#line 929 "MachineIndependent/glslang.y" +#line 893 "MachineIndependent/glslang.y" { parseContext.declareBlock((yyvsp[-2].interm).loc, *(yyvsp[-2].interm).typeList, (yyvsp[-1].lex).string); (yyval.interm.intermNode) = 0; } -#line 6116 "MachineIndependent/glslang_tab.cpp" +#line 6149 "MachineIndependent/glslang_tab.cpp" break; case 101: /* declaration: block_structure IDENTIFIER array_specifier SEMICOLON */ -#line 933 "MachineIndependent/glslang.y" +#line 897 "MachineIndependent/glslang.y" { parseContext.declareBlock((yyvsp[-3].interm).loc, *(yyvsp[-3].interm).typeList, (yyvsp[-2].lex).string, (yyvsp[-1].interm).arraySizes); (yyval.interm.intermNode) = 0; } -#line 6125 "MachineIndependent/glslang_tab.cpp" +#line 6158 "MachineIndependent/glslang_tab.cpp" break; case 102: /* declaration: type_qualifier SEMICOLON */ -#line 937 "MachineIndependent/glslang.y" +#line 901 "MachineIndependent/glslang.y" { parseContext.globalQualifierFixCheck((yyvsp[-1].interm.type).loc, (yyvsp[-1].interm.type).qualifier); parseContext.updateStandaloneQualifierDefaults((yyvsp[-1].interm.type).loc, (yyvsp[-1].interm.type)); (yyval.interm.intermNode) = 0; } -#line 6135 "MachineIndependent/glslang_tab.cpp" +#line 6168 "MachineIndependent/glslang_tab.cpp" break; case 103: /* declaration: type_qualifier IDENTIFIER SEMICOLON */ -#line 942 "MachineIndependent/glslang.y" +#line 906 "MachineIndependent/glslang.y" { parseContext.checkNoShaderLayouts((yyvsp[-2].interm.type).loc, (yyvsp[-2].interm.type).shaderQualifiers); parseContext.addQualifierToExisting((yyvsp[-2].interm.type).loc, (yyvsp[-2].interm.type).qualifier, *(yyvsp[-1].lex).string); (yyval.interm.intermNode) = 0; } -#line 6145 "MachineIndependent/glslang_tab.cpp" +#line 6178 "MachineIndependent/glslang_tab.cpp" break; case 104: /* declaration: type_qualifier IDENTIFIER identifier_list SEMICOLON */ -#line 947 "MachineIndependent/glslang.y" +#line 911 "MachineIndependent/glslang.y" { parseContext.checkNoShaderLayouts((yyvsp[-3].interm.type).loc, (yyvsp[-3].interm.type).shaderQualifiers); (yyvsp[-1].interm.identifierList)->push_back((yyvsp[-2].lex).string); parseContext.addQualifierToExisting((yyvsp[-3].interm.type).loc, (yyvsp[-3].interm.type).qualifier, *(yyvsp[-1].interm.identifierList)); (yyval.interm.intermNode) = 0; } -#line 6156 "MachineIndependent/glslang_tab.cpp" +#line 6189 "MachineIndependent/glslang_tab.cpp" break; case 105: /* $@2: %empty */ -#line 956 "MachineIndependent/glslang.y" +#line 920 "MachineIndependent/glslang.y" { parseContext.nestedBlockCheck((yyvsp[-2].interm.type).loc); } -#line 6162 "MachineIndependent/glslang_tab.cpp" +#line 6195 "MachineIndependent/glslang_tab.cpp" break; case 106: /* block_structure: type_qualifier IDENTIFIER LEFT_BRACE $@2 struct_declaration_list RIGHT_BRACE */ -#line 956 "MachineIndependent/glslang.y" +#line 920 "MachineIndependent/glslang.y" { --parseContext.blockNestingLevel; parseContext.blockName = (yyvsp[-4].lex).string; @@ -6172,88 +6205,89 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); (yyval.interm).loc = (yyvsp[-5].interm.type).loc; (yyval.interm).typeList = (yyvsp[-1].interm.typeList); } -#line 6176 "MachineIndependent/glslang_tab.cpp" +#line 6209 "MachineIndependent/glslang_tab.cpp" break; case 107: /* identifier_list: COMMA IDENTIFIER */ -#line 967 "MachineIndependent/glslang.y" +#line 931 "MachineIndependent/glslang.y" { (yyval.interm.identifierList) = new TIdentifierList; (yyval.interm.identifierList)->push_back((yyvsp[0].lex).string); } -#line 6185 "MachineIndependent/glslang_tab.cpp" +#line 6218 "MachineIndependent/glslang_tab.cpp" break; case 108: /* identifier_list: identifier_list COMMA IDENTIFIER */ -#line 971 "MachineIndependent/glslang.y" +#line 935 "MachineIndependent/glslang.y" { (yyval.interm.identifierList) = (yyvsp[-2].interm.identifierList); (yyval.interm.identifierList)->push_back((yyvsp[0].lex).string); } -#line 6194 "MachineIndependent/glslang_tab.cpp" +#line 6227 "MachineIndependent/glslang_tab.cpp" break; case 109: /* function_prototype: function_declarator RIGHT_PAREN */ -#line 978 "MachineIndependent/glslang.y" +#line 942 "MachineIndependent/glslang.y" { (yyval.interm).function = (yyvsp[-1].interm.function); + if (parseContext.compileOnly) (yyval.interm).function->setExport(); (yyval.interm).loc = (yyvsp[0].lex).loc; } -#line 6203 "MachineIndependent/glslang_tab.cpp" +#line 6237 "MachineIndependent/glslang_tab.cpp" break; case 110: /* function_prototype: function_declarator RIGHT_PAREN attribute */ -#line 982 "MachineIndependent/glslang.y" +#line 947 "MachineIndependent/glslang.y" { (yyval.interm).function = (yyvsp[-2].interm.function); + if (parseContext.compileOnly) (yyval.interm).function->setExport(); (yyval.interm).loc = (yyvsp[-1].lex).loc; - parseContext.requireExtensions((yyvsp[-1].lex).loc, 1, &E_GL_EXT_subgroup_uniform_control_flow, "attribute"); parseContext.handleFunctionAttributes((yyvsp[-1].lex).loc, *(yyvsp[0].interm.attributes)); } -#line 6214 "MachineIndependent/glslang_tab.cpp" +#line 6248 "MachineIndependent/glslang_tab.cpp" break; case 111: /* function_prototype: attribute function_declarator RIGHT_PAREN */ -#line 988 "MachineIndependent/glslang.y" +#line 953 "MachineIndependent/glslang.y" { (yyval.interm).function = (yyvsp[-1].interm.function); + if (parseContext.compileOnly) (yyval.interm).function->setExport(); (yyval.interm).loc = (yyvsp[0].lex).loc; - parseContext.requireExtensions((yyvsp[0].lex).loc, 1, &E_GL_EXT_subgroup_uniform_control_flow, "attribute"); parseContext.handleFunctionAttributes((yyvsp[0].lex).loc, *(yyvsp[-2].interm.attributes)); } -#line 6225 "MachineIndependent/glslang_tab.cpp" +#line 6259 "MachineIndependent/glslang_tab.cpp" break; case 112: /* function_prototype: attribute function_declarator RIGHT_PAREN attribute */ -#line 994 "MachineIndependent/glslang.y" +#line 959 "MachineIndependent/glslang.y" { (yyval.interm).function = (yyvsp[-2].interm.function); + if (parseContext.compileOnly) (yyval.interm).function->setExport(); (yyval.interm).loc = (yyvsp[-1].lex).loc; - parseContext.requireExtensions((yyvsp[-1].lex).loc, 1, &E_GL_EXT_subgroup_uniform_control_flow, "attribute"); parseContext.handleFunctionAttributes((yyvsp[-1].lex).loc, *(yyvsp[-3].interm.attributes)); parseContext.handleFunctionAttributes((yyvsp[-1].lex).loc, *(yyvsp[0].interm.attributes)); } -#line 6237 "MachineIndependent/glslang_tab.cpp" +#line 6271 "MachineIndependent/glslang_tab.cpp" break; case 113: /* function_declarator: function_header */ -#line 1004 "MachineIndependent/glslang.y" +#line 969 "MachineIndependent/glslang.y" { (yyval.interm.function) = (yyvsp[0].interm.function); } -#line 6245 "MachineIndependent/glslang_tab.cpp" +#line 6279 "MachineIndependent/glslang_tab.cpp" break; case 114: /* function_declarator: function_header_with_parameters */ -#line 1007 "MachineIndependent/glslang.y" +#line 972 "MachineIndependent/glslang.y" { (yyval.interm.function) = (yyvsp[0].interm.function); } -#line 6253 "MachineIndependent/glslang_tab.cpp" +#line 6287 "MachineIndependent/glslang_tab.cpp" break; case 115: /* function_header_with_parameters: function_header parameter_declaration */ -#line 1014 "MachineIndependent/glslang.y" +#line 979 "MachineIndependent/glslang.y" { // Add the parameter (yyval.interm.function) = (yyvsp[-1].interm.function); @@ -6262,11 +6296,11 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); else delete (yyvsp[0].interm).param.type; } -#line 6266 "MachineIndependent/glslang_tab.cpp" +#line 6300 "MachineIndependent/glslang_tab.cpp" break; case 116: /* function_header_with_parameters: function_header_with_parameters COMMA parameter_declaration */ -#line 1022 "MachineIndependent/glslang.y" +#line 987 "MachineIndependent/glslang.y" { // // Only first parameter of one-parameter functions can be void @@ -6284,11 +6318,11 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); (yyvsp[-2].interm.function)->addParameter((yyvsp[0].interm).param); } } -#line 6288 "MachineIndependent/glslang_tab.cpp" +#line 6322 "MachineIndependent/glslang_tab.cpp" break; case 117: /* function_header: fully_specified_type IDENTIFIER LEFT_PAREN */ -#line 1042 "MachineIndependent/glslang.y" +#line 1007 "MachineIndependent/glslang.y" { if ((yyvsp[-2].interm.type).qualifier.storage != EvqGlobal && (yyvsp[-2].interm.type).qualifier.storage != EvqTemporary) { parseContext.error((yyvsp[-1].lex).loc, "no qualifiers allowed for function return", @@ -6308,11 +6342,11 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); function = new TFunction((yyvsp[-1].lex).string, type); (yyval.interm.function) = function; } -#line 6312 "MachineIndependent/glslang_tab.cpp" +#line 6346 "MachineIndependent/glslang_tab.cpp" break; case 118: /* parameter_declarator: type_specifier IDENTIFIER */ -#line 1065 "MachineIndependent/glslang.y" +#line 1030 "MachineIndependent/glslang.y" { if ((yyvsp[-1].interm.type).arraySizes) { parseContext.profileRequires((yyvsp[-1].interm.type).loc, ENoProfile, 120, E_GL_3DL_array_objects, "arrayed type"); @@ -6328,11 +6362,11 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); (yyval.interm).loc = (yyvsp[0].lex).loc; (yyval.interm).param = param; } -#line 6332 "MachineIndependent/glslang_tab.cpp" +#line 6366 "MachineIndependent/glslang_tab.cpp" break; case 119: /* parameter_declarator: type_specifier IDENTIFIER array_specifier */ -#line 1080 "MachineIndependent/glslang.y" +#line 1045 "MachineIndependent/glslang.y" { if ((yyvsp[-2].interm.type).arraySizes) { parseContext.profileRequires((yyvsp[-2].interm.type).loc, ENoProfile, 120, E_GL_3DL_array_objects, "arrayed type"); @@ -6352,175 +6386,173 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); (yyval.interm).loc = (yyvsp[-1].lex).loc; (yyval.interm).param = param; } -#line 6356 "MachineIndependent/glslang_tab.cpp" +#line 6390 "MachineIndependent/glslang_tab.cpp" break; case 120: /* parameter_declaration: type_qualifier parameter_declarator */ -#line 1105 "MachineIndependent/glslang.y" +#line 1070 "MachineIndependent/glslang.y" { (yyval.interm) = (yyvsp[0].interm); if ((yyvsp[-1].interm.type).qualifier.precision != EpqNone) (yyval.interm).param.type->getQualifier().precision = (yyvsp[-1].interm.type).qualifier.precision; - parseContext.precisionQualifierCheck((yyval.interm).loc, (yyval.interm).param.type->getBasicType(), (yyval.interm).param.type->getQualifier()); + parseContext.precisionQualifierCheck((yyval.interm).loc, (yyval.interm).param.type->getBasicType(), (yyval.interm).param.type->getQualifier(), (yyval.interm).param.type->isCoopMat()); parseContext.checkNoShaderLayouts((yyvsp[-1].interm.type).loc, (yyvsp[-1].interm.type).shaderQualifiers); parseContext.parameterTypeCheck((yyvsp[0].interm).loc, (yyvsp[-1].interm.type).qualifier.storage, *(yyval.interm).param.type); parseContext.paramCheckFix((yyvsp[-1].interm.type).loc, (yyvsp[-1].interm.type).qualifier, *(yyval.interm).param.type); } -#line 6372 "MachineIndependent/glslang_tab.cpp" +#line 6406 "MachineIndependent/glslang_tab.cpp" break; case 121: /* parameter_declaration: parameter_declarator */ -#line 1116 "MachineIndependent/glslang.y" +#line 1081 "MachineIndependent/glslang.y" { (yyval.interm) = (yyvsp[0].interm); parseContext.parameterTypeCheck((yyvsp[0].interm).loc, EvqIn, *(yyvsp[0].interm).param.type); parseContext.paramCheckFixStorage((yyvsp[0].interm).loc, EvqTemporary, *(yyval.interm).param.type); - parseContext.precisionQualifierCheck((yyval.interm).loc, (yyval.interm).param.type->getBasicType(), (yyval.interm).param.type->getQualifier()); + parseContext.precisionQualifierCheck((yyval.interm).loc, (yyval.interm).param.type->getBasicType(), (yyval.interm).param.type->getQualifier(), (yyval.interm).param.type->isCoopMat()); } -#line 6384 "MachineIndependent/glslang_tab.cpp" +#line 6418 "MachineIndependent/glslang_tab.cpp" break; case 122: /* parameter_declaration: type_qualifier parameter_type_specifier */ -#line 1126 "MachineIndependent/glslang.y" +#line 1091 "MachineIndependent/glslang.y" { (yyval.interm) = (yyvsp[0].interm); if ((yyvsp[-1].interm.type).qualifier.precision != EpqNone) (yyval.interm).param.type->getQualifier().precision = (yyvsp[-1].interm.type).qualifier.precision; - parseContext.precisionQualifierCheck((yyvsp[-1].interm.type).loc, (yyval.interm).param.type->getBasicType(), (yyval.interm).param.type->getQualifier()); + parseContext.precisionQualifierCheck((yyvsp[-1].interm.type).loc, (yyval.interm).param.type->getBasicType(), (yyval.interm).param.type->getQualifier(), (yyval.interm).param.type->isCoopMat()); parseContext.checkNoShaderLayouts((yyvsp[-1].interm.type).loc, (yyvsp[-1].interm.type).shaderQualifiers); parseContext.parameterTypeCheck((yyvsp[0].interm).loc, (yyvsp[-1].interm.type).qualifier.storage, *(yyval.interm).param.type); parseContext.paramCheckFix((yyvsp[-1].interm.type).loc, (yyvsp[-1].interm.type).qualifier, *(yyval.interm).param.type); } -#line 6399 "MachineIndependent/glslang_tab.cpp" +#line 6433 "MachineIndependent/glslang_tab.cpp" break; case 123: /* parameter_declaration: parameter_type_specifier */ -#line 1136 "MachineIndependent/glslang.y" +#line 1101 "MachineIndependent/glslang.y" { (yyval.interm) = (yyvsp[0].interm); parseContext.parameterTypeCheck((yyvsp[0].interm).loc, EvqIn, *(yyvsp[0].interm).param.type); parseContext.paramCheckFixStorage((yyvsp[0].interm).loc, EvqTemporary, *(yyval.interm).param.type); - parseContext.precisionQualifierCheck((yyval.interm).loc, (yyval.interm).param.type->getBasicType(), (yyval.interm).param.type->getQualifier()); + parseContext.precisionQualifierCheck((yyval.interm).loc, (yyval.interm).param.type->getBasicType(), (yyval.interm).param.type->getQualifier(), (yyval.interm).param.type->isCoopMat()); } -#line 6411 "MachineIndependent/glslang_tab.cpp" +#line 6445 "MachineIndependent/glslang_tab.cpp" break; case 124: /* parameter_type_specifier: type_specifier */ -#line 1146 "MachineIndependent/glslang.y" +#line 1111 "MachineIndependent/glslang.y" { TParameter param = { 0, new TType((yyvsp[0].interm.type)) }; (yyval.interm).param = param; if ((yyvsp[0].interm.type).arraySizes) parseContext.arraySizeRequiredCheck((yyvsp[0].interm.type).loc, *(yyvsp[0].interm.type).arraySizes); } -#line 6422 "MachineIndependent/glslang_tab.cpp" +#line 6456 "MachineIndependent/glslang_tab.cpp" break; case 125: /* init_declarator_list: single_declaration */ -#line 1155 "MachineIndependent/glslang.y" +#line 1120 "MachineIndependent/glslang.y" { (yyval.interm) = (yyvsp[0].interm); } -#line 6430 "MachineIndependent/glslang_tab.cpp" +#line 6464 "MachineIndependent/glslang_tab.cpp" break; case 126: /* init_declarator_list: init_declarator_list COMMA IDENTIFIER */ -#line 1158 "MachineIndependent/glslang.y" +#line 1123 "MachineIndependent/glslang.y" { (yyval.interm) = (yyvsp[-2].interm); parseContext.declareVariable((yyvsp[0].lex).loc, *(yyvsp[0].lex).string, (yyvsp[-2].interm).type); } -#line 6439 "MachineIndependent/glslang_tab.cpp" +#line 6473 "MachineIndependent/glslang_tab.cpp" break; case 127: /* init_declarator_list: init_declarator_list COMMA IDENTIFIER array_specifier */ -#line 1162 "MachineIndependent/glslang.y" +#line 1127 "MachineIndependent/glslang.y" { (yyval.interm) = (yyvsp[-3].interm); parseContext.declareVariable((yyvsp[-1].lex).loc, *(yyvsp[-1].lex).string, (yyvsp[-3].interm).type, (yyvsp[0].interm).arraySizes); } -#line 6448 "MachineIndependent/glslang_tab.cpp" +#line 6482 "MachineIndependent/glslang_tab.cpp" break; case 128: /* init_declarator_list: init_declarator_list COMMA IDENTIFIER array_specifier EQUAL initializer */ -#line 1166 "MachineIndependent/glslang.y" +#line 1131 "MachineIndependent/glslang.y" { (yyval.interm).type = (yyvsp[-5].interm).type; TIntermNode* initNode = parseContext.declareVariable((yyvsp[-3].lex).loc, *(yyvsp[-3].lex).string, (yyvsp[-5].interm).type, (yyvsp[-2].interm).arraySizes, (yyvsp[0].interm.intermTypedNode)); (yyval.interm).intermNode = parseContext.intermediate.growAggregate((yyvsp[-5].interm).intermNode, initNode, (yyvsp[-1].lex).loc); } -#line 6458 "MachineIndependent/glslang_tab.cpp" +#line 6492 "MachineIndependent/glslang_tab.cpp" break; case 129: /* init_declarator_list: init_declarator_list COMMA IDENTIFIER EQUAL initializer */ -#line 1171 "MachineIndependent/glslang.y" +#line 1136 "MachineIndependent/glslang.y" { (yyval.interm).type = (yyvsp[-4].interm).type; TIntermNode* initNode = parseContext.declareVariable((yyvsp[-2].lex).loc, *(yyvsp[-2].lex).string, (yyvsp[-4].interm).type, 0, (yyvsp[0].interm.intermTypedNode)); (yyval.interm).intermNode = parseContext.intermediate.growAggregate((yyvsp[-4].interm).intermNode, initNode, (yyvsp[-1].lex).loc); } -#line 6468 "MachineIndependent/glslang_tab.cpp" +#line 6502 "MachineIndependent/glslang_tab.cpp" break; case 130: /* single_declaration: fully_specified_type */ -#line 1179 "MachineIndependent/glslang.y" +#line 1144 "MachineIndependent/glslang.y" { (yyval.interm).type = (yyvsp[0].interm.type); (yyval.interm).intermNode = 0; - parseContext.declareTypeDefaults((yyval.interm).loc, (yyval.interm).type); - } -#line 6480 "MachineIndependent/glslang_tab.cpp" +#line 6512 "MachineIndependent/glslang_tab.cpp" break; case 131: /* single_declaration: fully_specified_type IDENTIFIER */ -#line 1186 "MachineIndependent/glslang.y" +#line 1149 "MachineIndependent/glslang.y" { (yyval.interm).type = (yyvsp[-1].interm.type); (yyval.interm).intermNode = 0; parseContext.declareVariable((yyvsp[0].lex).loc, *(yyvsp[0].lex).string, (yyvsp[-1].interm.type)); } -#line 6490 "MachineIndependent/glslang_tab.cpp" +#line 6522 "MachineIndependent/glslang_tab.cpp" break; case 132: /* single_declaration: fully_specified_type IDENTIFIER array_specifier */ -#line 1191 "MachineIndependent/glslang.y" +#line 1154 "MachineIndependent/glslang.y" { (yyval.interm).type = (yyvsp[-2].interm.type); (yyval.interm).intermNode = 0; parseContext.declareVariable((yyvsp[-1].lex).loc, *(yyvsp[-1].lex).string, (yyvsp[-2].interm.type), (yyvsp[0].interm).arraySizes); } -#line 6500 "MachineIndependent/glslang_tab.cpp" +#line 6532 "MachineIndependent/glslang_tab.cpp" break; case 133: /* single_declaration: fully_specified_type IDENTIFIER array_specifier EQUAL initializer */ -#line 1196 "MachineIndependent/glslang.y" +#line 1159 "MachineIndependent/glslang.y" { (yyval.interm).type = (yyvsp[-4].interm.type); TIntermNode* initNode = parseContext.declareVariable((yyvsp[-3].lex).loc, *(yyvsp[-3].lex).string, (yyvsp[-4].interm.type), (yyvsp[-2].interm).arraySizes, (yyvsp[0].interm.intermTypedNode)); (yyval.interm).intermNode = parseContext.intermediate.growAggregate(0, initNode, (yyvsp[-1].lex).loc); } -#line 6510 "MachineIndependent/glslang_tab.cpp" +#line 6542 "MachineIndependent/glslang_tab.cpp" break; case 134: /* single_declaration: fully_specified_type IDENTIFIER EQUAL initializer */ -#line 1201 "MachineIndependent/glslang.y" +#line 1164 "MachineIndependent/glslang.y" { (yyval.interm).type = (yyvsp[-3].interm.type); TIntermNode* initNode = parseContext.declareVariable((yyvsp[-2].lex).loc, *(yyvsp[-2].lex).string, (yyvsp[-3].interm.type), 0, (yyvsp[0].interm.intermTypedNode)); (yyval.interm).intermNode = parseContext.intermediate.growAggregate(0, initNode, (yyvsp[-1].lex).loc); } -#line 6520 "MachineIndependent/glslang_tab.cpp" +#line 6552 "MachineIndependent/glslang_tab.cpp" break; case 135: /* fully_specified_type: type_specifier */ -#line 1210 "MachineIndependent/glslang.y" +#line 1173 "MachineIndependent/glslang.y" { (yyval.interm.type) = (yyvsp[0].interm.type); @@ -6529,15 +6561,15 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); parseContext.profileRequires((yyvsp[0].interm.type).loc, ENoProfile, 120, E_GL_3DL_array_objects, "arrayed type"); parseContext.profileRequires((yyvsp[0].interm.type).loc, EEsProfile, 300, 0, "arrayed type"); } - parseContext.precisionQualifierCheck((yyval.interm.type).loc, (yyval.interm.type).basicType, (yyval.interm.type).qualifier); + parseContext.precisionQualifierCheck((yyval.interm.type).loc, (yyval.interm.type).basicType, (yyval.interm.type).qualifier, (yyval.interm.type).isCoopmat()); } -#line 6535 "MachineIndependent/glslang_tab.cpp" +#line 6567 "MachineIndependent/glslang_tab.cpp" break; case 136: /* fully_specified_type: type_qualifier type_specifier */ -#line 1220 "MachineIndependent/glslang.y" +#line 1183 "MachineIndependent/glslang.y" { - parseContext.globalQualifierFixCheck((yyvsp[-1].interm.type).loc, (yyvsp[-1].interm.type).qualifier); + parseContext.globalQualifierFixCheck((yyvsp[-1].interm.type).loc, (yyvsp[-1].interm.type).qualifier, false, &(yyvsp[0].interm.type)); parseContext.globalQualifierTypeCheck((yyvsp[-1].interm.type).loc, (yyvsp[-1].interm.type).qualifier, (yyvsp[0].interm.type)); if ((yyvsp[0].interm.type).arraySizes) { @@ -6551,7 +6583,7 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); parseContext.checkNoShaderLayouts((yyvsp[0].interm.type).loc, (yyvsp[-1].interm.type).shaderQualifiers); (yyvsp[0].interm.type).shaderQualifiers.merge((yyvsp[-1].interm.type).shaderQualifiers); parseContext.mergeQualifiers((yyvsp[0].interm.type).loc, (yyvsp[0].interm.type).qualifier, (yyvsp[-1].interm.type).qualifier, true); - parseContext.precisionQualifierCheck((yyvsp[0].interm.type).loc, (yyvsp[0].interm.type).basicType, (yyvsp[0].interm.type).qualifier); + parseContext.precisionQualifierCheck((yyvsp[0].interm.type).loc, (yyvsp[0].interm.type).basicType, (yyvsp[0].interm.type).qualifier, (yyvsp[0].interm.type).isCoopmat()); (yyval.interm.type) = (yyvsp[0].interm.type); @@ -6560,22 +6592,22 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); (parseContext.language == EShLangFragment && (yyval.interm.type).qualifier.storage == EvqVaryingIn))) (yyval.interm.type).qualifier.smooth = true; } -#line 6564 "MachineIndependent/glslang_tab.cpp" +#line 6596 "MachineIndependent/glslang_tab.cpp" break; case 137: /* invariant_qualifier: INVARIANT */ -#line 1247 "MachineIndependent/glslang.y" +#line 1210 "MachineIndependent/glslang.y" { parseContext.globalCheck((yyvsp[0].lex).loc, "invariant"); parseContext.profileRequires((yyval.interm.type).loc, ENoProfile, 120, 0, "invariant"); (yyval.interm.type).init((yyvsp[0].lex).loc); (yyval.interm.type).qualifier.invariant = true; } -#line 6575 "MachineIndependent/glslang_tab.cpp" +#line 6607 "MachineIndependent/glslang_tab.cpp" break; case 138: /* interpolation_qualifier: SMOOTH */ -#line 1256 "MachineIndependent/glslang.y" +#line 1219 "MachineIndependent/glslang.y" { parseContext.globalCheck((yyvsp[0].lex).loc, "smooth"); parseContext.profileRequires((yyvsp[0].lex).loc, ENoProfile, 130, 0, "smooth"); @@ -6583,11 +6615,11 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); (yyval.interm.type).init((yyvsp[0].lex).loc); (yyval.interm.type).qualifier.smooth = true; } -#line 6587 "MachineIndependent/glslang_tab.cpp" +#line 6619 "MachineIndependent/glslang_tab.cpp" break; case 139: /* interpolation_qualifier: FLAT */ -#line 1263 "MachineIndependent/glslang.y" +#line 1226 "MachineIndependent/glslang.y" { parseContext.globalCheck((yyvsp[0].lex).loc, "flat"); parseContext.profileRequires((yyvsp[0].lex).loc, ENoProfile, 130, 0, "flat"); @@ -6595,11 +6627,11 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); (yyval.interm.type).init((yyvsp[0].lex).loc); (yyval.interm.type).qualifier.flat = true; } -#line 6599 "MachineIndependent/glslang_tab.cpp" +#line 6631 "MachineIndependent/glslang_tab.cpp" break; case 140: /* interpolation_qualifier: NOPERSPECTIVE */ -#line 1271 "MachineIndependent/glslang.y" +#line 1233 "MachineIndependent/glslang.y" { parseContext.globalCheck((yyvsp[0].lex).loc, "noperspective"); parseContext.profileRequires((yyvsp[0].lex).loc, EEsProfile, 0, E_GL_NV_shader_noperspective_interpolation, "noperspective"); @@ -6607,11 +6639,11 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); (yyval.interm.type).init((yyvsp[0].lex).loc); (yyval.interm.type).qualifier.nopersp = true; } -#line 6611 "MachineIndependent/glslang_tab.cpp" +#line 6643 "MachineIndependent/glslang_tab.cpp" break; case 141: /* interpolation_qualifier: EXPLICITINTERPAMD */ -#line 1278 "MachineIndependent/glslang.y" +#line 1240 "MachineIndependent/glslang.y" { parseContext.globalCheck((yyvsp[0].lex).loc, "__explicitInterpAMD"); parseContext.profileRequires((yyvsp[0].lex).loc, ECoreProfile, 450, E_GL_AMD_shader_explicit_vertex_parameter, "explicit interpolation"); @@ -6619,11 +6651,11 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); (yyval.interm.type).init((yyvsp[0].lex).loc); (yyval.interm.type).qualifier.explicitInterp = true; } -#line 6623 "MachineIndependent/glslang_tab.cpp" +#line 6655 "MachineIndependent/glslang_tab.cpp" break; case 142: /* interpolation_qualifier: PERVERTEXNV */ -#line 1285 "MachineIndependent/glslang.y" +#line 1247 "MachineIndependent/glslang.y" { parseContext.globalCheck((yyvsp[0].lex).loc, "pervertexNV"); parseContext.profileRequires((yyvsp[0].lex).loc, ECoreProfile, 0, E_GL_NV_fragment_shader_barycentric, "fragment shader barycentric"); @@ -6632,11 +6664,11 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); (yyval.interm.type).init((yyvsp[0].lex).loc); (yyval.interm.type).qualifier.pervertexNV = true; } -#line 6636 "MachineIndependent/glslang_tab.cpp" +#line 6668 "MachineIndependent/glslang_tab.cpp" break; case 143: /* interpolation_qualifier: PERVERTEXEXT */ -#line 1293 "MachineIndependent/glslang.y" +#line 1255 "MachineIndependent/glslang.y" { parseContext.globalCheck((yyvsp[0].lex).loc, "pervertexEXT"); parseContext.profileRequires((yyvsp[0].lex).loc, ECoreProfile, 0, E_GL_EXT_fragment_shader_barycentric, "fragment shader barycentric"); @@ -6645,123 +6677,138 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); (yyval.interm.type).init((yyvsp[0].lex).loc); (yyval.interm.type).qualifier.pervertexEXT = true; } -#line 6649 "MachineIndependent/glslang_tab.cpp" +#line 6681 "MachineIndependent/glslang_tab.cpp" break; case 144: /* interpolation_qualifier: PERPRIMITIVENV */ -#line 1301 "MachineIndependent/glslang.y" +#line 1263 "MachineIndependent/glslang.y" { // No need for profile version or extension check. Shader stage already checks both. parseContext.globalCheck((yyvsp[0].lex).loc, "perprimitiveNV"); - parseContext.requireStage((yyvsp[0].lex).loc, (EShLanguageMask)(EShLangFragmentMask | EShLangMeshNVMask), "perprimitiveNV"); + parseContext.requireStage((yyvsp[0].lex).loc, (EShLanguageMask)(EShLangFragmentMask | EShLangMeshMask), "perprimitiveNV"); // Fragment shader stage doesn't check for extension. So we explicitly add below extension check. if (parseContext.language == EShLangFragment) parseContext.requireExtensions((yyvsp[0].lex).loc, 1, &E_GL_NV_mesh_shader, "perprimitiveNV"); (yyval.interm.type).init((yyvsp[0].lex).loc); (yyval.interm.type).qualifier.perPrimitiveNV = true; } -#line 6664 "MachineIndependent/glslang_tab.cpp" +#line 6696 "MachineIndependent/glslang_tab.cpp" + break; + + case 145: /* interpolation_qualifier: PERPRIMITIVEEXT */ +#line 1273 "MachineIndependent/glslang.y" + { + // No need for profile version or extension check. Shader stage already checks both. + parseContext.globalCheck((yyvsp[0].lex).loc, "perprimitiveEXT"); + parseContext.requireStage((yyvsp[0].lex).loc, (EShLanguageMask)(EShLangFragmentMask | EShLangMeshMask), "perprimitiveEXT"); + // Fragment shader stage doesn't check for extension. So we explicitly add below extension check. + if (parseContext.language == EShLangFragment) + parseContext.requireExtensions((yyvsp[0].lex).loc, 1, &E_GL_EXT_mesh_shader, "perprimitiveEXT"); + (yyval.interm.type).init((yyvsp[0].lex).loc); + (yyval.interm.type).qualifier.perPrimitiveNV = true; + } +#line 6711 "MachineIndependent/glslang_tab.cpp" break; - case 145: /* interpolation_qualifier: PERVIEWNV */ -#line 1311 "MachineIndependent/glslang.y" + case 146: /* interpolation_qualifier: PERVIEWNV */ +#line 1283 "MachineIndependent/glslang.y" { // No need for profile version or extension check. Shader stage already checks both. parseContext.globalCheck((yyvsp[0].lex).loc, "perviewNV"); - parseContext.requireStage((yyvsp[0].lex).loc, EShLangMeshNV, "perviewNV"); + parseContext.requireStage((yyvsp[0].lex).loc, EShLangMesh, "perviewNV"); (yyval.interm.type).init((yyvsp[0].lex).loc); (yyval.interm.type).qualifier.perViewNV = true; } -#line 6676 "MachineIndependent/glslang_tab.cpp" +#line 6723 "MachineIndependent/glslang_tab.cpp" break; - case 146: /* interpolation_qualifier: PERTASKNV */ -#line 1318 "MachineIndependent/glslang.y" + case 147: /* interpolation_qualifier: PERTASKNV */ +#line 1290 "MachineIndependent/glslang.y" { // No need for profile version or extension check. Shader stage already checks both. parseContext.globalCheck((yyvsp[0].lex).loc, "taskNV"); - parseContext.requireStage((yyvsp[0].lex).loc, (EShLanguageMask)(EShLangTaskNVMask | EShLangMeshNVMask), "taskNV"); + parseContext.requireStage((yyvsp[0].lex).loc, (EShLanguageMask)(EShLangTaskMask | EShLangMeshMask), "taskNV"); (yyval.interm.type).init((yyvsp[0].lex).loc); (yyval.interm.type).qualifier.perTaskNV = true; } -#line 6688 "MachineIndependent/glslang_tab.cpp" +#line 6735 "MachineIndependent/glslang_tab.cpp" break; - case 147: /* layout_qualifier: LAYOUT LEFT_PAREN layout_qualifier_id_list RIGHT_PAREN */ -#line 1329 "MachineIndependent/glslang.y" + case 148: /* layout_qualifier: LAYOUT LEFT_PAREN layout_qualifier_id_list RIGHT_PAREN */ +#line 1300 "MachineIndependent/glslang.y" { (yyval.interm.type) = (yyvsp[-1].interm.type); } -#line 6696 "MachineIndependent/glslang_tab.cpp" +#line 6743 "MachineIndependent/glslang_tab.cpp" break; - case 148: /* layout_qualifier_id_list: layout_qualifier_id */ -#line 1335 "MachineIndependent/glslang.y" + case 149: /* layout_qualifier_id_list: layout_qualifier_id */ +#line 1306 "MachineIndependent/glslang.y" { (yyval.interm.type) = (yyvsp[0].interm.type); } -#line 6704 "MachineIndependent/glslang_tab.cpp" +#line 6751 "MachineIndependent/glslang_tab.cpp" break; - case 149: /* layout_qualifier_id_list: layout_qualifier_id_list COMMA layout_qualifier_id */ -#line 1338 "MachineIndependent/glslang.y" + case 150: /* layout_qualifier_id_list: layout_qualifier_id_list COMMA layout_qualifier_id */ +#line 1309 "MachineIndependent/glslang.y" { (yyval.interm.type) = (yyvsp[-2].interm.type); (yyval.interm.type).shaderQualifiers.merge((yyvsp[0].interm.type).shaderQualifiers); parseContext.mergeObjectLayoutQualifiers((yyval.interm.type).qualifier, (yyvsp[0].interm.type).qualifier, false); } -#line 6714 "MachineIndependent/glslang_tab.cpp" +#line 6761 "MachineIndependent/glslang_tab.cpp" break; - case 150: /* layout_qualifier_id: IDENTIFIER */ -#line 1345 "MachineIndependent/glslang.y" + case 151: /* layout_qualifier_id: IDENTIFIER */ +#line 1316 "MachineIndependent/glslang.y" { (yyval.interm.type).init((yyvsp[0].lex).loc); parseContext.setLayoutQualifier((yyvsp[0].lex).loc, (yyval.interm.type), *(yyvsp[0].lex).string); } -#line 6723 "MachineIndependent/glslang_tab.cpp" +#line 6770 "MachineIndependent/glslang_tab.cpp" break; - case 151: /* layout_qualifier_id: IDENTIFIER EQUAL constant_expression */ -#line 1349 "MachineIndependent/glslang.y" + case 152: /* layout_qualifier_id: IDENTIFIER EQUAL constant_expression */ +#line 1320 "MachineIndependent/glslang.y" { (yyval.interm.type).init((yyvsp[-2].lex).loc); parseContext.setLayoutQualifier((yyvsp[-2].lex).loc, (yyval.interm.type), *(yyvsp[-2].lex).string, (yyvsp[0].interm.intermTypedNode)); } -#line 6732 "MachineIndependent/glslang_tab.cpp" +#line 6779 "MachineIndependent/glslang_tab.cpp" break; - case 152: /* layout_qualifier_id: SHARED */ -#line 1353 "MachineIndependent/glslang.y" + case 153: /* layout_qualifier_id: SHARED */ +#line 1324 "MachineIndependent/glslang.y" { // because "shared" is both an identifier and a keyword (yyval.interm.type).init((yyvsp[0].lex).loc); TString strShared("shared"); parseContext.setLayoutQualifier((yyvsp[0].lex).loc, (yyval.interm.type), strShared); } -#line 6742 "MachineIndependent/glslang_tab.cpp" +#line 6789 "MachineIndependent/glslang_tab.cpp" break; - case 153: /* precise_qualifier: PRECISE */ -#line 1362 "MachineIndependent/glslang.y" + case 154: /* precise_qualifier: PRECISE */ +#line 1332 "MachineIndependent/glslang.y" { parseContext.profileRequires((yyval.interm.type).loc, ECoreProfile | ECompatibilityProfile, 400, E_GL_ARB_gpu_shader5, "precise"); parseContext.profileRequires((yyvsp[0].lex).loc, EEsProfile, 320, Num_AEP_gpu_shader5, AEP_gpu_shader5, "precise"); (yyval.interm.type).init((yyvsp[0].lex).loc); (yyval.interm.type).qualifier.noContraction = true; } -#line 6753 "MachineIndependent/glslang_tab.cpp" +#line 6800 "MachineIndependent/glslang_tab.cpp" break; - case 154: /* type_qualifier: single_type_qualifier */ -#line 1372 "MachineIndependent/glslang.y" + case 155: /* type_qualifier: single_type_qualifier */ +#line 1341 "MachineIndependent/glslang.y" { (yyval.interm.type) = (yyvsp[0].interm.type); } -#line 6761 "MachineIndependent/glslang_tab.cpp" +#line 6808 "MachineIndependent/glslang_tab.cpp" break; - case 155: /* type_qualifier: type_qualifier single_type_qualifier */ -#line 1375 "MachineIndependent/glslang.y" + case 156: /* type_qualifier: type_qualifier single_type_qualifier */ +#line 1344 "MachineIndependent/glslang.y" { (yyval.interm.type) = (yyvsp[-1].interm.type); if ((yyval.interm.type).basicType == EbtVoid) @@ -6770,151 +6817,151 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); (yyval.interm.type).shaderQualifiers.merge((yyvsp[0].interm.type).shaderQualifiers); parseContext.mergeQualifiers((yyval.interm.type).loc, (yyval.interm.type).qualifier, (yyvsp[0].interm.type).qualifier, false); } -#line 6774 "MachineIndependent/glslang_tab.cpp" +#line 6821 "MachineIndependent/glslang_tab.cpp" break; - case 156: /* single_type_qualifier: storage_qualifier */ -#line 1386 "MachineIndependent/glslang.y" + case 157: /* single_type_qualifier: storage_qualifier */ +#line 1355 "MachineIndependent/glslang.y" { (yyval.interm.type) = (yyvsp[0].interm.type); } -#line 6782 "MachineIndependent/glslang_tab.cpp" +#line 6829 "MachineIndependent/glslang_tab.cpp" break; - case 157: /* single_type_qualifier: layout_qualifier */ -#line 1389 "MachineIndependent/glslang.y" + case 158: /* single_type_qualifier: layout_qualifier */ +#line 1358 "MachineIndependent/glslang.y" { (yyval.interm.type) = (yyvsp[0].interm.type); } -#line 6790 "MachineIndependent/glslang_tab.cpp" +#line 6837 "MachineIndependent/glslang_tab.cpp" break; - case 158: /* single_type_qualifier: precision_qualifier */ -#line 1392 "MachineIndependent/glslang.y" + case 159: /* single_type_qualifier: precision_qualifier */ +#line 1361 "MachineIndependent/glslang.y" { parseContext.checkPrecisionQualifier((yyvsp[0].interm.type).loc, (yyvsp[0].interm.type).qualifier.precision); (yyval.interm.type) = (yyvsp[0].interm.type); } -#line 6799 "MachineIndependent/glslang_tab.cpp" +#line 6846 "MachineIndependent/glslang_tab.cpp" break; - case 159: /* single_type_qualifier: interpolation_qualifier */ -#line 1396 "MachineIndependent/glslang.y" + case 160: /* single_type_qualifier: interpolation_qualifier */ +#line 1365 "MachineIndependent/glslang.y" { // allow inheritance of storage qualifier from block declaration (yyval.interm.type) = (yyvsp[0].interm.type); } -#line 6808 "MachineIndependent/glslang_tab.cpp" +#line 6855 "MachineIndependent/glslang_tab.cpp" break; - case 160: /* single_type_qualifier: invariant_qualifier */ -#line 1400 "MachineIndependent/glslang.y" + case 161: /* single_type_qualifier: invariant_qualifier */ +#line 1369 "MachineIndependent/glslang.y" { // allow inheritance of storage qualifier from block declaration (yyval.interm.type) = (yyvsp[0].interm.type); } -#line 6817 "MachineIndependent/glslang_tab.cpp" +#line 6864 "MachineIndependent/glslang_tab.cpp" break; - case 161: /* single_type_qualifier: precise_qualifier */ -#line 1405 "MachineIndependent/glslang.y" + case 162: /* single_type_qualifier: precise_qualifier */ +#line 1373 "MachineIndependent/glslang.y" { // allow inheritance of storage qualifier from block declaration (yyval.interm.type) = (yyvsp[0].interm.type); } -#line 6826 "MachineIndependent/glslang_tab.cpp" +#line 6873 "MachineIndependent/glslang_tab.cpp" break; - case 162: /* single_type_qualifier: non_uniform_qualifier */ -#line 1409 "MachineIndependent/glslang.y" + case 163: /* single_type_qualifier: non_uniform_qualifier */ +#line 1377 "MachineIndependent/glslang.y" { (yyval.interm.type) = (yyvsp[0].interm.type); } -#line 6834 "MachineIndependent/glslang_tab.cpp" +#line 6881 "MachineIndependent/glslang_tab.cpp" break; - case 163: /* single_type_qualifier: spirv_storage_class_qualifier */ -#line 1412 "MachineIndependent/glslang.y" + case 164: /* single_type_qualifier: spirv_storage_class_qualifier */ +#line 1380 "MachineIndependent/glslang.y" { parseContext.globalCheck((yyvsp[0].interm.type).loc, "spirv_storage_class"); parseContext.requireExtensions((yyvsp[0].interm.type).loc, 1, &E_GL_EXT_spirv_intrinsics, "SPIR-V storage class qualifier"); (yyval.interm.type) = (yyvsp[0].interm.type); } -#line 6844 "MachineIndependent/glslang_tab.cpp" +#line 6891 "MachineIndependent/glslang_tab.cpp" break; - case 164: /* single_type_qualifier: spirv_decorate_qualifier */ -#line 1417 "MachineIndependent/glslang.y" + case 165: /* single_type_qualifier: spirv_decorate_qualifier */ +#line 1385 "MachineIndependent/glslang.y" { parseContext.requireExtensions((yyvsp[0].interm.type).loc, 1, &E_GL_EXT_spirv_intrinsics, "SPIR-V decorate qualifier"); (yyval.interm.type) = (yyvsp[0].interm.type); } -#line 6853 "MachineIndependent/glslang_tab.cpp" +#line 6900 "MachineIndependent/glslang_tab.cpp" break; - case 165: /* single_type_qualifier: SPIRV_BY_REFERENCE */ -#line 1421 "MachineIndependent/glslang.y" + case 166: /* single_type_qualifier: SPIRV_BY_REFERENCE */ +#line 1389 "MachineIndependent/glslang.y" { parseContext.requireExtensions((yyvsp[0].lex).loc, 1, &E_GL_EXT_spirv_intrinsics, "spirv_by_reference"); (yyval.interm.type).init((yyvsp[0].lex).loc); (yyval.interm.type).qualifier.setSpirvByReference(); } -#line 6863 "MachineIndependent/glslang_tab.cpp" +#line 6910 "MachineIndependent/glslang_tab.cpp" break; - case 166: /* single_type_qualifier: SPIRV_LITERAL */ -#line 1426 "MachineIndependent/glslang.y" + case 167: /* single_type_qualifier: SPIRV_LITERAL */ +#line 1394 "MachineIndependent/glslang.y" { parseContext.requireExtensions((yyvsp[0].lex).loc, 1, &E_GL_EXT_spirv_intrinsics, "spirv_by_literal"); (yyval.interm.type).init((yyvsp[0].lex).loc); (yyval.interm.type).qualifier.setSpirvLiteral(); } -#line 6873 "MachineIndependent/glslang_tab.cpp" +#line 6920 "MachineIndependent/glslang_tab.cpp" break; - case 167: /* storage_qualifier: CONST */ -#line 1435 "MachineIndependent/glslang.y" + case 168: /* storage_qualifier: CONST */ +#line 1402 "MachineIndependent/glslang.y" { (yyval.interm.type).init((yyvsp[0].lex).loc); (yyval.interm.type).qualifier.storage = EvqConst; // will later turn into EvqConstReadOnly, if the initializer is not constant } -#line 6882 "MachineIndependent/glslang_tab.cpp" +#line 6929 "MachineIndependent/glslang_tab.cpp" break; - case 168: /* storage_qualifier: INOUT */ -#line 1439 "MachineIndependent/glslang.y" + case 169: /* storage_qualifier: INOUT */ +#line 1406 "MachineIndependent/glslang.y" { parseContext.globalCheck((yyvsp[0].lex).loc, "inout"); (yyval.interm.type).init((yyvsp[0].lex).loc); (yyval.interm.type).qualifier.storage = EvqInOut; } -#line 6892 "MachineIndependent/glslang_tab.cpp" +#line 6939 "MachineIndependent/glslang_tab.cpp" break; - case 169: /* storage_qualifier: IN */ -#line 1444 "MachineIndependent/glslang.y" + case 170: /* storage_qualifier: IN */ +#line 1411 "MachineIndependent/glslang.y" { parseContext.globalCheck((yyvsp[0].lex).loc, "in"); (yyval.interm.type).init((yyvsp[0].lex).loc); // whether this is a parameter "in" or a pipeline "in" will get sorted out a bit later (yyval.interm.type).qualifier.storage = EvqIn; } -#line 6903 "MachineIndependent/glslang_tab.cpp" +#line 6950 "MachineIndependent/glslang_tab.cpp" break; - case 170: /* storage_qualifier: OUT */ -#line 1450 "MachineIndependent/glslang.y" + case 171: /* storage_qualifier: OUT */ +#line 1417 "MachineIndependent/glslang.y" { parseContext.globalCheck((yyvsp[0].lex).loc, "out"); (yyval.interm.type).init((yyvsp[0].lex).loc); // whether this is a parameter "out" or a pipeline "out" will get sorted out a bit later (yyval.interm.type).qualifier.storage = EvqOut; } -#line 6914 "MachineIndependent/glslang_tab.cpp" +#line 6961 "MachineIndependent/glslang_tab.cpp" break; - case 171: /* storage_qualifier: CENTROID */ -#line 1456 "MachineIndependent/glslang.y" + case 172: /* storage_qualifier: CENTROID */ +#line 1423 "MachineIndependent/glslang.y" { parseContext.profileRequires((yyvsp[0].lex).loc, ENoProfile, 120, 0, "centroid"); parseContext.profileRequires((yyvsp[0].lex).loc, EEsProfile, 300, 0, "centroid"); @@ -6922,44 +6969,54 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); (yyval.interm.type).init((yyvsp[0].lex).loc); (yyval.interm.type).qualifier.centroid = true; } -#line 6926 "MachineIndependent/glslang_tab.cpp" +#line 6973 "MachineIndependent/glslang_tab.cpp" break; - case 172: /* storage_qualifier: UNIFORM */ -#line 1463 "MachineIndependent/glslang.y" + case 173: /* storage_qualifier: UNIFORM */ +#line 1430 "MachineIndependent/glslang.y" { parseContext.globalCheck((yyvsp[0].lex).loc, "uniform"); (yyval.interm.type).init((yyvsp[0].lex).loc); (yyval.interm.type).qualifier.storage = EvqUniform; } -#line 6936 "MachineIndependent/glslang_tab.cpp" +#line 6983 "MachineIndependent/glslang_tab.cpp" + break; + + case 174: /* storage_qualifier: TILEIMAGEEXT */ +#line 1435 "MachineIndependent/glslang.y" + { + parseContext.globalCheck((yyvsp[0].lex).loc, "tileImageEXT"); + (yyval.interm.type).init((yyvsp[0].lex).loc); + (yyval.interm.type).qualifier.storage = EvqTileImageEXT; + } +#line 6993 "MachineIndependent/glslang_tab.cpp" break; - case 173: /* storage_qualifier: SHARED */ -#line 1468 "MachineIndependent/glslang.y" + case 175: /* storage_qualifier: SHARED */ +#line 1440 "MachineIndependent/glslang.y" { parseContext.globalCheck((yyvsp[0].lex).loc, "shared"); parseContext.profileRequires((yyvsp[0].lex).loc, ECoreProfile | ECompatibilityProfile, 430, E_GL_ARB_compute_shader, "shared"); parseContext.profileRequires((yyvsp[0].lex).loc, EEsProfile, 310, 0, "shared"); - parseContext.requireStage((yyvsp[0].lex).loc, (EShLanguageMask)(EShLangComputeMask | EShLangMeshNVMask | EShLangTaskNVMask), "shared"); + parseContext.requireStage((yyvsp[0].lex).loc, (EShLanguageMask)(EShLangComputeMask | EShLangMeshMask | EShLangTaskMask), "shared"); (yyval.interm.type).init((yyvsp[0].lex).loc); (yyval.interm.type).qualifier.storage = EvqShared; } -#line 6949 "MachineIndependent/glslang_tab.cpp" +#line 7006 "MachineIndependent/glslang_tab.cpp" break; - case 174: /* storage_qualifier: BUFFER */ -#line 1476 "MachineIndependent/glslang.y" + case 176: /* storage_qualifier: BUFFER */ +#line 1448 "MachineIndependent/glslang.y" { parseContext.globalCheck((yyvsp[0].lex).loc, "buffer"); (yyval.interm.type).init((yyvsp[0].lex).loc); (yyval.interm.type).qualifier.storage = EvqBuffer; } -#line 6959 "MachineIndependent/glslang_tab.cpp" +#line 7016 "MachineIndependent/glslang_tab.cpp" break; - case 175: /* storage_qualifier: ATTRIBUTE */ -#line 1482 "MachineIndependent/glslang.y" + case 177: /* storage_qualifier: ATTRIBUTE */ +#line 1453 "MachineIndependent/glslang.y" { parseContext.requireStage((yyvsp[0].lex).loc, EShLangVertex, "attribute"); parseContext.checkDeprecated((yyvsp[0].lex).loc, ECoreProfile, 130, "attribute"); @@ -6972,11 +7029,11 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); (yyval.interm.type).init((yyvsp[0].lex).loc); (yyval.interm.type).qualifier.storage = EvqVaryingIn; } -#line 6976 "MachineIndependent/glslang_tab.cpp" +#line 7033 "MachineIndependent/glslang_tab.cpp" break; - case 176: /* storage_qualifier: VARYING */ -#line 1494 "MachineIndependent/glslang.y" + case 178: /* storage_qualifier: VARYING */ +#line 1465 "MachineIndependent/glslang.y" { parseContext.checkDeprecated((yyvsp[0].lex).loc, ENoProfile, 130, "varying"); parseContext.checkDeprecated((yyvsp[0].lex).loc, ECoreProfile, 130, "varying"); @@ -6991,32 +7048,32 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); else (yyval.interm.type).qualifier.storage = EvqVaryingIn; } -#line 6995 "MachineIndependent/glslang_tab.cpp" +#line 7052 "MachineIndependent/glslang_tab.cpp" break; - case 177: /* storage_qualifier: PATCH */ -#line 1508 "MachineIndependent/glslang.y" + case 179: /* storage_qualifier: PATCH */ +#line 1479 "MachineIndependent/glslang.y" { parseContext.globalCheck((yyvsp[0].lex).loc, "patch"); parseContext.requireStage((yyvsp[0].lex).loc, (EShLanguageMask)(EShLangTessControlMask | EShLangTessEvaluationMask), "patch"); (yyval.interm.type).init((yyvsp[0].lex).loc); (yyval.interm.type).qualifier.patch = true; } -#line 7006 "MachineIndependent/glslang_tab.cpp" +#line 7063 "MachineIndependent/glslang_tab.cpp" break; - case 178: /* storage_qualifier: SAMPLE */ -#line 1514 "MachineIndependent/glslang.y" + case 180: /* storage_qualifier: SAMPLE */ +#line 1485 "MachineIndependent/glslang.y" { parseContext.globalCheck((yyvsp[0].lex).loc, "sample"); (yyval.interm.type).init((yyvsp[0].lex).loc); (yyval.interm.type).qualifier.sample = true; } -#line 7016 "MachineIndependent/glslang_tab.cpp" +#line 7073 "MachineIndependent/glslang_tab.cpp" break; - case 179: /* storage_qualifier: HITATTRNV */ -#line 1519 "MachineIndependent/glslang.y" + case 181: /* storage_qualifier: HITATTRNV */ +#line 1490 "MachineIndependent/glslang.y" { parseContext.globalCheck((yyvsp[0].lex).loc, "hitAttributeNV"); parseContext.requireStage((yyvsp[0].lex).loc, (EShLanguageMask)(EShLangIntersectMask | EShLangClosestHitMask @@ -7025,11 +7082,24 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); (yyval.interm.type).init((yyvsp[0].lex).loc); (yyval.interm.type).qualifier.storage = EvqHitAttr; } -#line 7029 "MachineIndependent/glslang_tab.cpp" +#line 7086 "MachineIndependent/glslang_tab.cpp" + break; + + case 182: /* storage_qualifier: HITOBJECTATTRNV */ +#line 1498 "MachineIndependent/glslang.y" + { + parseContext.globalCheck((yyvsp[0].lex).loc, "hitAttributeNV"); + parseContext.requireStage((yyvsp[0].lex).loc, (EShLanguageMask)(EShLangRayGenMask | EShLangClosestHitMask + | EShLangMissMask), "hitObjectAttributeNV"); + parseContext.profileRequires((yyvsp[0].lex).loc, ECoreProfile, 460, E_GL_NV_shader_invocation_reorder, "hitObjectAttributeNV"); + (yyval.interm.type).init((yyvsp[0].lex).loc); + (yyval.interm.type).qualifier.storage = EvqHitObjectAttrNV; + } +#line 7099 "MachineIndependent/glslang_tab.cpp" break; - case 180: /* storage_qualifier: HITATTREXT */ -#line 1527 "MachineIndependent/glslang.y" + case 183: /* storage_qualifier: HITATTREXT */ +#line 1506 "MachineIndependent/glslang.y" { parseContext.globalCheck((yyvsp[0].lex).loc, "hitAttributeEXT"); parseContext.requireStage((yyvsp[0].lex).loc, (EShLanguageMask)(EShLangIntersectMask | EShLangClosestHitMask @@ -7038,11 +7108,11 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); (yyval.interm.type).init((yyvsp[0].lex).loc); (yyval.interm.type).qualifier.storage = EvqHitAttr; } -#line 7042 "MachineIndependent/glslang_tab.cpp" +#line 7112 "MachineIndependent/glslang_tab.cpp" break; - case 181: /* storage_qualifier: PAYLOADNV */ -#line 1535 "MachineIndependent/glslang.y" + case 184: /* storage_qualifier: PAYLOADNV */ +#line 1514 "MachineIndependent/glslang.y" { parseContext.globalCheck((yyvsp[0].lex).loc, "rayPayloadNV"); parseContext.requireStage((yyvsp[0].lex).loc, (EShLanguageMask)(EShLangRayGenMask | EShLangClosestHitMask | @@ -7051,11 +7121,11 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); (yyval.interm.type).init((yyvsp[0].lex).loc); (yyval.interm.type).qualifier.storage = EvqPayload; } -#line 7055 "MachineIndependent/glslang_tab.cpp" +#line 7125 "MachineIndependent/glslang_tab.cpp" break; - case 182: /* storage_qualifier: PAYLOADEXT */ -#line 1543 "MachineIndependent/glslang.y" + case 185: /* storage_qualifier: PAYLOADEXT */ +#line 1522 "MachineIndependent/glslang.y" { parseContext.globalCheck((yyvsp[0].lex).loc, "rayPayloadEXT"); parseContext.requireStage((yyvsp[0].lex).loc, (EShLanguageMask)(EShLangRayGenMask | EShLangClosestHitMask | @@ -7064,11 +7134,11 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); (yyval.interm.type).init((yyvsp[0].lex).loc); (yyval.interm.type).qualifier.storage = EvqPayload; } -#line 7068 "MachineIndependent/glslang_tab.cpp" +#line 7138 "MachineIndependent/glslang_tab.cpp" break; - case 183: /* storage_qualifier: PAYLOADINNV */ -#line 1551 "MachineIndependent/glslang.y" + case 186: /* storage_qualifier: PAYLOADINNV */ +#line 1530 "MachineIndependent/glslang.y" { parseContext.globalCheck((yyvsp[0].lex).loc, "rayPayloadInNV"); parseContext.requireStage((yyvsp[0].lex).loc, (EShLanguageMask)(EShLangClosestHitMask | @@ -7077,11 +7147,11 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); (yyval.interm.type).init((yyvsp[0].lex).loc); (yyval.interm.type).qualifier.storage = EvqPayloadIn; } -#line 7081 "MachineIndependent/glslang_tab.cpp" +#line 7151 "MachineIndependent/glslang_tab.cpp" break; - case 184: /* storage_qualifier: PAYLOADINEXT */ -#line 1559 "MachineIndependent/glslang.y" + case 187: /* storage_qualifier: PAYLOADINEXT */ +#line 1538 "MachineIndependent/glslang.y" { parseContext.globalCheck((yyvsp[0].lex).loc, "rayPayloadInEXT"); parseContext.requireStage((yyvsp[0].lex).loc, (EShLanguageMask)(EShLangClosestHitMask | @@ -7090,11 +7160,11 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); (yyval.interm.type).init((yyvsp[0].lex).loc); (yyval.interm.type).qualifier.storage = EvqPayloadIn; } -#line 7094 "MachineIndependent/glslang_tab.cpp" +#line 7164 "MachineIndependent/glslang_tab.cpp" break; - case 185: /* storage_qualifier: CALLDATANV */ -#line 1567 "MachineIndependent/glslang.y" + case 188: /* storage_qualifier: CALLDATANV */ +#line 1546 "MachineIndependent/glslang.y" { parseContext.globalCheck((yyvsp[0].lex).loc, "callableDataNV"); parseContext.requireStage((yyvsp[0].lex).loc, (EShLanguageMask)(EShLangRayGenMask | @@ -7103,11 +7173,11 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); (yyval.interm.type).init((yyvsp[0].lex).loc); (yyval.interm.type).qualifier.storage = EvqCallableData; } -#line 7107 "MachineIndependent/glslang_tab.cpp" +#line 7177 "MachineIndependent/glslang_tab.cpp" break; - case 186: /* storage_qualifier: CALLDATAEXT */ -#line 1575 "MachineIndependent/glslang.y" + case 189: /* storage_qualifier: CALLDATAEXT */ +#line 1554 "MachineIndependent/glslang.y" { parseContext.globalCheck((yyvsp[0].lex).loc, "callableDataEXT"); parseContext.requireStage((yyvsp[0].lex).loc, (EShLanguageMask)(EShLangRayGenMask | @@ -7116,11 +7186,11 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); (yyval.interm.type).init((yyvsp[0].lex).loc); (yyval.interm.type).qualifier.storage = EvqCallableData; } -#line 7120 "MachineIndependent/glslang_tab.cpp" +#line 7190 "MachineIndependent/glslang_tab.cpp" break; - case 187: /* storage_qualifier: CALLDATAINNV */ -#line 1583 "MachineIndependent/glslang.y" + case 190: /* storage_qualifier: CALLDATAINNV */ +#line 1562 "MachineIndependent/glslang.y" { parseContext.globalCheck((yyvsp[0].lex).loc, "callableDataInNV"); parseContext.requireStage((yyvsp[0].lex).loc, (EShLanguageMask)(EShLangCallableMask), "callableDataInNV"); @@ -7128,11 +7198,11 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); (yyval.interm.type).init((yyvsp[0].lex).loc); (yyval.interm.type).qualifier.storage = EvqCallableDataIn; } -#line 7132 "MachineIndependent/glslang_tab.cpp" +#line 7202 "MachineIndependent/glslang_tab.cpp" break; - case 188: /* storage_qualifier: CALLDATAINEXT */ -#line 1590 "MachineIndependent/glslang.y" + case 191: /* storage_qualifier: CALLDATAINEXT */ +#line 1569 "MachineIndependent/glslang.y" { parseContext.globalCheck((yyvsp[0].lex).loc, "callableDataInEXT"); parseContext.requireStage((yyvsp[0].lex).loc, (EShLanguageMask)(EShLangCallableMask), "callableDataInEXT"); @@ -7140,197 +7210,212 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); (yyval.interm.type).init((yyvsp[0].lex).loc); (yyval.interm.type).qualifier.storage = EvqCallableDataIn; } -#line 7144 "MachineIndependent/glslang_tab.cpp" +#line 7214 "MachineIndependent/glslang_tab.cpp" break; - case 189: /* storage_qualifier: COHERENT */ -#line 1597 "MachineIndependent/glslang.y" + case 192: /* storage_qualifier: COHERENT */ +#line 1576 "MachineIndependent/glslang.y" { (yyval.interm.type).init((yyvsp[0].lex).loc); (yyval.interm.type).qualifier.coherent = true; } -#line 7153 "MachineIndependent/glslang_tab.cpp" +#line 7223 "MachineIndependent/glslang_tab.cpp" break; - case 190: /* storage_qualifier: DEVICECOHERENT */ -#line 1601 "MachineIndependent/glslang.y" + case 193: /* storage_qualifier: DEVICECOHERENT */ +#line 1580 "MachineIndependent/glslang.y" { (yyval.interm.type).init((yyvsp[0].lex).loc); parseContext.requireExtensions((yyvsp[0].lex).loc, 1, &E_GL_KHR_memory_scope_semantics, "devicecoherent"); (yyval.interm.type).qualifier.devicecoherent = true; } -#line 7163 "MachineIndependent/glslang_tab.cpp" +#line 7233 "MachineIndependent/glslang_tab.cpp" break; - case 191: /* storage_qualifier: QUEUEFAMILYCOHERENT */ -#line 1606 "MachineIndependent/glslang.y" + case 194: /* storage_qualifier: QUEUEFAMILYCOHERENT */ +#line 1585 "MachineIndependent/glslang.y" { (yyval.interm.type).init((yyvsp[0].lex).loc); parseContext.requireExtensions((yyvsp[0].lex).loc, 1, &E_GL_KHR_memory_scope_semantics, "queuefamilycoherent"); (yyval.interm.type).qualifier.queuefamilycoherent = true; } -#line 7173 "MachineIndependent/glslang_tab.cpp" +#line 7243 "MachineIndependent/glslang_tab.cpp" break; - case 192: /* storage_qualifier: WORKGROUPCOHERENT */ -#line 1611 "MachineIndependent/glslang.y" + case 195: /* storage_qualifier: WORKGROUPCOHERENT */ +#line 1590 "MachineIndependent/glslang.y" { (yyval.interm.type).init((yyvsp[0].lex).loc); parseContext.requireExtensions((yyvsp[0].lex).loc, 1, &E_GL_KHR_memory_scope_semantics, "workgroupcoherent"); (yyval.interm.type).qualifier.workgroupcoherent = true; } -#line 7183 "MachineIndependent/glslang_tab.cpp" +#line 7253 "MachineIndependent/glslang_tab.cpp" break; - case 193: /* storage_qualifier: SUBGROUPCOHERENT */ -#line 1616 "MachineIndependent/glslang.y" + case 196: /* storage_qualifier: SUBGROUPCOHERENT */ +#line 1595 "MachineIndependent/glslang.y" { (yyval.interm.type).init((yyvsp[0].lex).loc); parseContext.requireExtensions((yyvsp[0].lex).loc, 1, &E_GL_KHR_memory_scope_semantics, "subgroupcoherent"); (yyval.interm.type).qualifier.subgroupcoherent = true; } -#line 7193 "MachineIndependent/glslang_tab.cpp" +#line 7263 "MachineIndependent/glslang_tab.cpp" break; - case 194: /* storage_qualifier: NONPRIVATE */ -#line 1621 "MachineIndependent/glslang.y" + case 197: /* storage_qualifier: NONPRIVATE */ +#line 1600 "MachineIndependent/glslang.y" { (yyval.interm.type).init((yyvsp[0].lex).loc); parseContext.requireExtensions((yyvsp[0].lex).loc, 1, &E_GL_KHR_memory_scope_semantics, "nonprivate"); (yyval.interm.type).qualifier.nonprivate = true; } -#line 7203 "MachineIndependent/glslang_tab.cpp" +#line 7273 "MachineIndependent/glslang_tab.cpp" break; - case 195: /* storage_qualifier: SHADERCALLCOHERENT */ -#line 1626 "MachineIndependent/glslang.y" + case 198: /* storage_qualifier: SHADERCALLCOHERENT */ +#line 1605 "MachineIndependent/glslang.y" { (yyval.interm.type).init((yyvsp[0].lex).loc); parseContext.requireExtensions((yyvsp[0].lex).loc, 1, &E_GL_EXT_ray_tracing, "shadercallcoherent"); (yyval.interm.type).qualifier.shadercallcoherent = true; } -#line 7213 "MachineIndependent/glslang_tab.cpp" +#line 7283 "MachineIndependent/glslang_tab.cpp" break; - case 196: /* storage_qualifier: VOLATILE */ -#line 1631 "MachineIndependent/glslang.y" + case 199: /* storage_qualifier: VOLATILE */ +#line 1610 "MachineIndependent/glslang.y" { (yyval.interm.type).init((yyvsp[0].lex).loc); (yyval.interm.type).qualifier.volatil = true; } -#line 7222 "MachineIndependent/glslang_tab.cpp" +#line 7292 "MachineIndependent/glslang_tab.cpp" break; - case 197: /* storage_qualifier: RESTRICT */ -#line 1635 "MachineIndependent/glslang.y" + case 200: /* storage_qualifier: RESTRICT */ +#line 1614 "MachineIndependent/glslang.y" { (yyval.interm.type).init((yyvsp[0].lex).loc); (yyval.interm.type).qualifier.restrict = true; } -#line 7231 "MachineIndependent/glslang_tab.cpp" +#line 7301 "MachineIndependent/glslang_tab.cpp" break; - case 198: /* storage_qualifier: READONLY */ -#line 1639 "MachineIndependent/glslang.y" + case 201: /* storage_qualifier: READONLY */ +#line 1618 "MachineIndependent/glslang.y" { (yyval.interm.type).init((yyvsp[0].lex).loc); (yyval.interm.type).qualifier.readonly = true; } -#line 7240 "MachineIndependent/glslang_tab.cpp" +#line 7310 "MachineIndependent/glslang_tab.cpp" break; - case 199: /* storage_qualifier: WRITEONLY */ -#line 1643 "MachineIndependent/glslang.y" + case 202: /* storage_qualifier: WRITEONLY */ +#line 1622 "MachineIndependent/glslang.y" { (yyval.interm.type).init((yyvsp[0].lex).loc); (yyval.interm.type).qualifier.writeonly = true; } -#line 7249 "MachineIndependent/glslang_tab.cpp" +#line 7319 "MachineIndependent/glslang_tab.cpp" break; - case 200: /* storage_qualifier: SUBROUTINE */ -#line 1647 "MachineIndependent/glslang.y" + case 203: /* storage_qualifier: SUBROUTINE */ +#line 1626 "MachineIndependent/glslang.y" { parseContext.spvRemoved((yyvsp[0].lex).loc, "subroutine"); parseContext.globalCheck((yyvsp[0].lex).loc, "subroutine"); parseContext.unimplemented((yyvsp[0].lex).loc, "subroutine"); (yyval.interm.type).init((yyvsp[0].lex).loc); } -#line 7260 "MachineIndependent/glslang_tab.cpp" +#line 7330 "MachineIndependent/glslang_tab.cpp" break; - case 201: /* storage_qualifier: SUBROUTINE LEFT_PAREN type_name_list RIGHT_PAREN */ -#line 1653 "MachineIndependent/glslang.y" + case 204: /* storage_qualifier: SUBROUTINE LEFT_PAREN type_name_list RIGHT_PAREN */ +#line 1632 "MachineIndependent/glslang.y" { parseContext.spvRemoved((yyvsp[-3].lex).loc, "subroutine"); parseContext.globalCheck((yyvsp[-3].lex).loc, "subroutine"); parseContext.unimplemented((yyvsp[-3].lex).loc, "subroutine"); (yyval.interm.type).init((yyvsp[-3].lex).loc); } -#line 7271 "MachineIndependent/glslang_tab.cpp" +#line 7341 "MachineIndependent/glslang_tab.cpp" + break; + + case 205: /* storage_qualifier: TASKPAYLOADWORKGROUPEXT */ +#line 1638 "MachineIndependent/glslang.y" + { + // No need for profile version or extension check. Shader stage already checks both. + parseContext.globalCheck((yyvsp[0].lex).loc, "taskPayloadSharedEXT"); + parseContext.requireStage((yyvsp[0].lex).loc, (EShLanguageMask)(EShLangTaskMask | EShLangMeshMask), "taskPayloadSharedEXT "); + (yyval.interm.type).init((yyvsp[0].lex).loc); + (yyval.interm.type).qualifier.storage = EvqtaskPayloadSharedEXT; + } +#line 7353 "MachineIndependent/glslang_tab.cpp" break; - case 202: /* non_uniform_qualifier: NONUNIFORM */ -#line 1664 "MachineIndependent/glslang.y" + case 206: /* non_uniform_qualifier: NONUNIFORM */ +#line 1648 "MachineIndependent/glslang.y" { (yyval.interm.type).init((yyvsp[0].lex).loc); (yyval.interm.type).qualifier.nonUniform = true; } -#line 7280 "MachineIndependent/glslang_tab.cpp" +#line 7362 "MachineIndependent/glslang_tab.cpp" break; - case 203: /* type_name_list: IDENTIFIER */ -#line 1671 "MachineIndependent/glslang.y" + case 207: /* type_name_list: IDENTIFIER */ +#line 1655 "MachineIndependent/glslang.y" { // TODO } -#line 7288 "MachineIndependent/glslang_tab.cpp" +#line 7370 "MachineIndependent/glslang_tab.cpp" break; - case 204: /* type_name_list: type_name_list COMMA IDENTIFIER */ -#line 1674 "MachineIndependent/glslang.y" + case 208: /* type_name_list: type_name_list COMMA IDENTIFIER */ +#line 1658 "MachineIndependent/glslang.y" { // TODO: 4.0 semantics: subroutines // 1) make sure each identifier is a type declared earlier with SUBROUTINE // 2) save all of the identifiers for future comparison with the declared function } -#line 7298 "MachineIndependent/glslang_tab.cpp" +#line 7380 "MachineIndependent/glslang_tab.cpp" break; - case 205: /* type_specifier: type_specifier_nonarray type_parameter_specifier_opt */ -#line 1683 "MachineIndependent/glslang.y" + case 209: /* type_specifier: type_specifier_nonarray type_parameter_specifier_opt */ +#line 1666 "MachineIndependent/glslang.y" { (yyval.interm.type) = (yyvsp[-1].interm.type); (yyval.interm.type).qualifier.precision = parseContext.getDefaultPrecision((yyval.interm.type)); (yyval.interm.type).typeParameters = (yyvsp[0].interm.typeParameters); + parseContext.coopMatTypeParametersCheck((yyvsp[-1].interm.type).loc, (yyval.interm.type)); + } -#line 7308 "MachineIndependent/glslang_tab.cpp" +#line 7392 "MachineIndependent/glslang_tab.cpp" break; - case 206: /* type_specifier: type_specifier_nonarray type_parameter_specifier_opt array_specifier */ -#line 1688 "MachineIndependent/glslang.y" + case 210: /* type_specifier: type_specifier_nonarray type_parameter_specifier_opt array_specifier */ +#line 1673 "MachineIndependent/glslang.y" { parseContext.arrayOfArrayVersionCheck((yyvsp[0].interm).loc, (yyvsp[0].interm).arraySizes); (yyval.interm.type) = (yyvsp[-2].interm.type); (yyval.interm.type).qualifier.precision = parseContext.getDefaultPrecision((yyval.interm.type)); (yyval.interm.type).typeParameters = (yyvsp[-1].interm.typeParameters); (yyval.interm.type).arraySizes = (yyvsp[0].interm).arraySizes; + parseContext.coopMatTypeParametersCheck((yyvsp[-2].interm.type).loc, (yyval.interm.type)); } -#line 7320 "MachineIndependent/glslang_tab.cpp" +#line 7405 "MachineIndependent/glslang_tab.cpp" break; - case 207: /* array_specifier: LEFT_BRACKET RIGHT_BRACKET */ -#line 1698 "MachineIndependent/glslang.y" + case 211: /* array_specifier: LEFT_BRACKET RIGHT_BRACKET */ +#line 1684 "MachineIndependent/glslang.y" { (yyval.interm).loc = (yyvsp[-1].lex).loc; (yyval.interm).arraySizes = new TArraySizes; (yyval.interm).arraySizes->addInnerSize(); } -#line 7330 "MachineIndependent/glslang_tab.cpp" +#line 7415 "MachineIndependent/glslang_tab.cpp" break; - case 208: /* array_specifier: LEFT_BRACKET conditional_expression RIGHT_BRACKET */ -#line 1703 "MachineIndependent/glslang.y" + case 212: /* array_specifier: LEFT_BRACKET conditional_expression RIGHT_BRACKET */ +#line 1689 "MachineIndependent/glslang.y" { (yyval.interm).loc = (yyvsp[-2].lex).loc; (yyval.interm).arraySizes = new TArraySizes; @@ -7339,20 +7424,20 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); parseContext.arraySizeCheck((yyvsp[-1].interm.intermTypedNode)->getLoc(), (yyvsp[-1].interm.intermTypedNode), size, "array size"); (yyval.interm).arraySizes->addInnerSize(size); } -#line 7343 "MachineIndependent/glslang_tab.cpp" +#line 7428 "MachineIndependent/glslang_tab.cpp" break; - case 209: /* array_specifier: array_specifier LEFT_BRACKET RIGHT_BRACKET */ -#line 1711 "MachineIndependent/glslang.y" + case 213: /* array_specifier: array_specifier LEFT_BRACKET RIGHT_BRACKET */ +#line 1697 "MachineIndependent/glslang.y" { (yyval.interm) = (yyvsp[-2].interm); (yyval.interm).arraySizes->addInnerSize(); } -#line 7352 "MachineIndependent/glslang_tab.cpp" +#line 7437 "MachineIndependent/glslang_tab.cpp" break; - case 210: /* array_specifier: array_specifier LEFT_BRACKET conditional_expression RIGHT_BRACKET */ -#line 1715 "MachineIndependent/glslang.y" + case 214: /* array_specifier: array_specifier LEFT_BRACKET conditional_expression RIGHT_BRACKET */ +#line 1701 "MachineIndependent/glslang.y" { (yyval.interm) = (yyvsp[-3].interm); @@ -7360,348 +7445,359 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); parseContext.arraySizeCheck((yyvsp[-1].interm.intermTypedNode)->getLoc(), (yyvsp[-1].interm.intermTypedNode), size, "array size"); (yyval.interm).arraySizes->addInnerSize(size); } -#line 7364 "MachineIndependent/glslang_tab.cpp" +#line 7449 "MachineIndependent/glslang_tab.cpp" break; - case 211: /* type_parameter_specifier_opt: type_parameter_specifier */ -#line 1725 "MachineIndependent/glslang.y" + case 215: /* type_parameter_specifier_opt: type_parameter_specifier */ +#line 1711 "MachineIndependent/glslang.y" { (yyval.interm.typeParameters) = (yyvsp[0].interm.typeParameters); } -#line 7372 "MachineIndependent/glslang_tab.cpp" +#line 7457 "MachineIndependent/glslang_tab.cpp" break; - case 212: /* type_parameter_specifier_opt: %empty */ -#line 1728 "MachineIndependent/glslang.y" + case 216: /* type_parameter_specifier_opt: %empty */ +#line 1714 "MachineIndependent/glslang.y" { (yyval.interm.typeParameters) = 0; } -#line 7380 "MachineIndependent/glslang_tab.cpp" +#line 7465 "MachineIndependent/glslang_tab.cpp" break; - case 213: /* type_parameter_specifier: LEFT_ANGLE type_parameter_specifier_list RIGHT_ANGLE */ -#line 1734 "MachineIndependent/glslang.y" + case 217: /* type_parameter_specifier: LEFT_ANGLE type_parameter_specifier_list RIGHT_ANGLE */ +#line 1720 "MachineIndependent/glslang.y" { (yyval.interm.typeParameters) = (yyvsp[-1].interm.typeParameters); } -#line 7388 "MachineIndependent/glslang_tab.cpp" +#line 7473 "MachineIndependent/glslang_tab.cpp" + break; + + case 218: /* type_parameter_specifier_list: type_specifier */ +#line 1726 "MachineIndependent/glslang.y" + { + (yyval.interm.typeParameters) = new TTypeParameters; + (yyval.interm.typeParameters)->arraySizes = new TArraySizes; + (yyval.interm.typeParameters)->basicType = (yyvsp[0].interm.type).basicType; + } +#line 7483 "MachineIndependent/glslang_tab.cpp" break; - case 214: /* type_parameter_specifier_list: unary_expression */ -#line 1740 "MachineIndependent/glslang.y" + case 219: /* type_parameter_specifier_list: unary_expression */ +#line 1731 "MachineIndependent/glslang.y" { - (yyval.interm.typeParameters) = new TArraySizes; + (yyval.interm.typeParameters) = new TTypeParameters; + (yyval.interm.typeParameters)->arraySizes = new TArraySizes; TArraySize size; - parseContext.arraySizeCheck((yyvsp[0].interm.intermTypedNode)->getLoc(), (yyvsp[0].interm.intermTypedNode), size, "type parameter"); - (yyval.interm.typeParameters)->addInnerSize(size); + parseContext.arraySizeCheck((yyvsp[0].interm.intermTypedNode)->getLoc(), (yyvsp[0].interm.intermTypedNode), size, "type parameter", true); + (yyval.interm.typeParameters)->arraySizes->addInnerSize(size); } -#line 7400 "MachineIndependent/glslang_tab.cpp" +#line 7496 "MachineIndependent/glslang_tab.cpp" break; - case 215: /* type_parameter_specifier_list: type_parameter_specifier_list COMMA unary_expression */ -#line 1747 "MachineIndependent/glslang.y" + case 220: /* type_parameter_specifier_list: type_parameter_specifier_list COMMA unary_expression */ +#line 1739 "MachineIndependent/glslang.y" { (yyval.interm.typeParameters) = (yyvsp[-2].interm.typeParameters); TArraySize size; - parseContext.arraySizeCheck((yyvsp[0].interm.intermTypedNode)->getLoc(), (yyvsp[0].interm.intermTypedNode), size, "type parameter"); - (yyval.interm.typeParameters)->addInnerSize(size); + parseContext.arraySizeCheck((yyvsp[0].interm.intermTypedNode)->getLoc(), (yyvsp[0].interm.intermTypedNode), size, "type parameter", true); + (yyval.interm.typeParameters)->arraySizes->addInnerSize(size); } -#line 7412 "MachineIndependent/glslang_tab.cpp" +#line 7508 "MachineIndependent/glslang_tab.cpp" break; - case 216: /* type_specifier_nonarray: VOID */ -#line 1757 "MachineIndependent/glslang.y" + case 221: /* type_specifier_nonarray: VOID */ +#line 1749 "MachineIndependent/glslang.y" { (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtVoid; } -#line 7421 "MachineIndependent/glslang_tab.cpp" +#line 7517 "MachineIndependent/glslang_tab.cpp" break; - case 217: /* type_specifier_nonarray: FLOAT */ -#line 1761 "MachineIndependent/glslang.y" + case 222: /* type_specifier_nonarray: FLOAT */ +#line 1753 "MachineIndependent/glslang.y" { (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtFloat; } -#line 7430 "MachineIndependent/glslang_tab.cpp" +#line 7526 "MachineIndependent/glslang_tab.cpp" break; - case 218: /* type_specifier_nonarray: INT */ -#line 1765 "MachineIndependent/glslang.y" + case 223: /* type_specifier_nonarray: INT */ +#line 1757 "MachineIndependent/glslang.y" { (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtInt; } -#line 7439 "MachineIndependent/glslang_tab.cpp" +#line 7535 "MachineIndependent/glslang_tab.cpp" break; - case 219: /* type_specifier_nonarray: UINT */ -#line 1769 "MachineIndependent/glslang.y" + case 224: /* type_specifier_nonarray: UINT */ +#line 1761 "MachineIndependent/glslang.y" { parseContext.fullIntegerCheck((yyvsp[0].lex).loc, "unsigned integer"); (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtUint; } -#line 7449 "MachineIndependent/glslang_tab.cpp" +#line 7545 "MachineIndependent/glslang_tab.cpp" break; - case 220: /* type_specifier_nonarray: BOOL */ -#line 1774 "MachineIndependent/glslang.y" + case 225: /* type_specifier_nonarray: BOOL */ +#line 1766 "MachineIndependent/glslang.y" { (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtBool; } -#line 7458 "MachineIndependent/glslang_tab.cpp" +#line 7554 "MachineIndependent/glslang_tab.cpp" break; - case 221: /* type_specifier_nonarray: VEC2 */ -#line 1778 "MachineIndependent/glslang.y" + case 226: /* type_specifier_nonarray: VEC2 */ +#line 1770 "MachineIndependent/glslang.y" { (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtFloat; (yyval.interm.type).setVector(2); } -#line 7468 "MachineIndependent/glslang_tab.cpp" +#line 7564 "MachineIndependent/glslang_tab.cpp" break; - case 222: /* type_specifier_nonarray: VEC3 */ -#line 1783 "MachineIndependent/glslang.y" + case 227: /* type_specifier_nonarray: VEC3 */ +#line 1775 "MachineIndependent/glslang.y" { (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtFloat; (yyval.interm.type).setVector(3); } -#line 7478 "MachineIndependent/glslang_tab.cpp" +#line 7574 "MachineIndependent/glslang_tab.cpp" break; - case 223: /* type_specifier_nonarray: VEC4 */ -#line 1788 "MachineIndependent/glslang.y" + case 228: /* type_specifier_nonarray: VEC4 */ +#line 1780 "MachineIndependent/glslang.y" { (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtFloat; (yyval.interm.type).setVector(4); } -#line 7488 "MachineIndependent/glslang_tab.cpp" +#line 7584 "MachineIndependent/glslang_tab.cpp" break; - case 224: /* type_specifier_nonarray: BVEC2 */ -#line 1793 "MachineIndependent/glslang.y" + case 229: /* type_specifier_nonarray: BVEC2 */ +#line 1785 "MachineIndependent/glslang.y" { (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtBool; (yyval.interm.type).setVector(2); } -#line 7498 "MachineIndependent/glslang_tab.cpp" +#line 7594 "MachineIndependent/glslang_tab.cpp" break; - case 225: /* type_specifier_nonarray: BVEC3 */ -#line 1798 "MachineIndependent/glslang.y" + case 230: /* type_specifier_nonarray: BVEC3 */ +#line 1790 "MachineIndependent/glslang.y" { (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtBool; (yyval.interm.type).setVector(3); } -#line 7508 "MachineIndependent/glslang_tab.cpp" +#line 7604 "MachineIndependent/glslang_tab.cpp" break; - case 226: /* type_specifier_nonarray: BVEC4 */ -#line 1803 "MachineIndependent/glslang.y" + case 231: /* type_specifier_nonarray: BVEC4 */ +#line 1795 "MachineIndependent/glslang.y" { (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtBool; (yyval.interm.type).setVector(4); } -#line 7518 "MachineIndependent/glslang_tab.cpp" +#line 7614 "MachineIndependent/glslang_tab.cpp" break; - case 227: /* type_specifier_nonarray: IVEC2 */ -#line 1808 "MachineIndependent/glslang.y" + case 232: /* type_specifier_nonarray: IVEC2 */ +#line 1800 "MachineIndependent/glslang.y" { (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtInt; (yyval.interm.type).setVector(2); } -#line 7528 "MachineIndependent/glslang_tab.cpp" +#line 7624 "MachineIndependent/glslang_tab.cpp" break; - case 228: /* type_specifier_nonarray: IVEC3 */ -#line 1813 "MachineIndependent/glslang.y" + case 233: /* type_specifier_nonarray: IVEC3 */ +#line 1805 "MachineIndependent/glslang.y" { (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtInt; (yyval.interm.type).setVector(3); } -#line 7538 "MachineIndependent/glslang_tab.cpp" +#line 7634 "MachineIndependent/glslang_tab.cpp" break; - case 229: /* type_specifier_nonarray: IVEC4 */ -#line 1818 "MachineIndependent/glslang.y" + case 234: /* type_specifier_nonarray: IVEC4 */ +#line 1810 "MachineIndependent/glslang.y" { (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtInt; (yyval.interm.type).setVector(4); } -#line 7548 "MachineIndependent/glslang_tab.cpp" +#line 7644 "MachineIndependent/glslang_tab.cpp" break; - case 230: /* type_specifier_nonarray: UVEC2 */ -#line 1823 "MachineIndependent/glslang.y" + case 235: /* type_specifier_nonarray: UVEC2 */ +#line 1815 "MachineIndependent/glslang.y" { parseContext.fullIntegerCheck((yyvsp[0].lex).loc, "unsigned integer vector"); (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtUint; (yyval.interm.type).setVector(2); } -#line 7559 "MachineIndependent/glslang_tab.cpp" +#line 7655 "MachineIndependent/glslang_tab.cpp" break; - case 231: /* type_specifier_nonarray: UVEC3 */ -#line 1829 "MachineIndependent/glslang.y" + case 236: /* type_specifier_nonarray: UVEC3 */ +#line 1821 "MachineIndependent/glslang.y" { parseContext.fullIntegerCheck((yyvsp[0].lex).loc, "unsigned integer vector"); (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtUint; (yyval.interm.type).setVector(3); } -#line 7570 "MachineIndependent/glslang_tab.cpp" +#line 7666 "MachineIndependent/glslang_tab.cpp" break; - case 232: /* type_specifier_nonarray: UVEC4 */ -#line 1835 "MachineIndependent/glslang.y" + case 237: /* type_specifier_nonarray: UVEC4 */ +#line 1827 "MachineIndependent/glslang.y" { parseContext.fullIntegerCheck((yyvsp[0].lex).loc, "unsigned integer vector"); (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtUint; (yyval.interm.type).setVector(4); } -#line 7581 "MachineIndependent/glslang_tab.cpp" +#line 7677 "MachineIndependent/glslang_tab.cpp" break; - case 233: /* type_specifier_nonarray: MAT2 */ -#line 1841 "MachineIndependent/glslang.y" + case 238: /* type_specifier_nonarray: MAT2 */ +#line 1833 "MachineIndependent/glslang.y" { (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtFloat; (yyval.interm.type).setMatrix(2, 2); } -#line 7591 "MachineIndependent/glslang_tab.cpp" +#line 7687 "MachineIndependent/glslang_tab.cpp" break; - case 234: /* type_specifier_nonarray: MAT3 */ -#line 1846 "MachineIndependent/glslang.y" + case 239: /* type_specifier_nonarray: MAT3 */ +#line 1838 "MachineIndependent/glslang.y" { (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtFloat; (yyval.interm.type).setMatrix(3, 3); } -#line 7601 "MachineIndependent/glslang_tab.cpp" +#line 7697 "MachineIndependent/glslang_tab.cpp" break; - case 235: /* type_specifier_nonarray: MAT4 */ -#line 1851 "MachineIndependent/glslang.y" + case 240: /* type_specifier_nonarray: MAT4 */ +#line 1843 "MachineIndependent/glslang.y" { (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtFloat; (yyval.interm.type).setMatrix(4, 4); } -#line 7611 "MachineIndependent/glslang_tab.cpp" +#line 7707 "MachineIndependent/glslang_tab.cpp" break; - case 236: /* type_specifier_nonarray: MAT2X2 */ -#line 1856 "MachineIndependent/glslang.y" + case 241: /* type_specifier_nonarray: MAT2X2 */ +#line 1848 "MachineIndependent/glslang.y" { (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtFloat; (yyval.interm.type).setMatrix(2, 2); } -#line 7621 "MachineIndependent/glslang_tab.cpp" +#line 7717 "MachineIndependent/glslang_tab.cpp" break; - case 237: /* type_specifier_nonarray: MAT2X3 */ -#line 1861 "MachineIndependent/glslang.y" + case 242: /* type_specifier_nonarray: MAT2X3 */ +#line 1853 "MachineIndependent/glslang.y" { (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtFloat; (yyval.interm.type).setMatrix(2, 3); } -#line 7631 "MachineIndependent/glslang_tab.cpp" +#line 7727 "MachineIndependent/glslang_tab.cpp" break; - case 238: /* type_specifier_nonarray: MAT2X4 */ -#line 1866 "MachineIndependent/glslang.y" + case 243: /* type_specifier_nonarray: MAT2X4 */ +#line 1858 "MachineIndependent/glslang.y" { (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtFloat; (yyval.interm.type).setMatrix(2, 4); } -#line 7641 "MachineIndependent/glslang_tab.cpp" +#line 7737 "MachineIndependent/glslang_tab.cpp" break; - case 239: /* type_specifier_nonarray: MAT3X2 */ -#line 1871 "MachineIndependent/glslang.y" + case 244: /* type_specifier_nonarray: MAT3X2 */ +#line 1863 "MachineIndependent/glslang.y" { (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtFloat; (yyval.interm.type).setMatrix(3, 2); } -#line 7651 "MachineIndependent/glslang_tab.cpp" +#line 7747 "MachineIndependent/glslang_tab.cpp" break; - case 240: /* type_specifier_nonarray: MAT3X3 */ -#line 1876 "MachineIndependent/glslang.y" + case 245: /* type_specifier_nonarray: MAT3X3 */ +#line 1868 "MachineIndependent/glslang.y" { (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtFloat; (yyval.interm.type).setMatrix(3, 3); } -#line 7661 "MachineIndependent/glslang_tab.cpp" +#line 7757 "MachineIndependent/glslang_tab.cpp" break; - case 241: /* type_specifier_nonarray: MAT3X4 */ -#line 1881 "MachineIndependent/glslang.y" + case 246: /* type_specifier_nonarray: MAT3X4 */ +#line 1873 "MachineIndependent/glslang.y" { (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtFloat; (yyval.interm.type).setMatrix(3, 4); } -#line 7671 "MachineIndependent/glslang_tab.cpp" +#line 7767 "MachineIndependent/glslang_tab.cpp" break; - case 242: /* type_specifier_nonarray: MAT4X2 */ -#line 1886 "MachineIndependent/glslang.y" + case 247: /* type_specifier_nonarray: MAT4X2 */ +#line 1878 "MachineIndependent/glslang.y" { (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtFloat; (yyval.interm.type).setMatrix(4, 2); } -#line 7681 "MachineIndependent/glslang_tab.cpp" +#line 7777 "MachineIndependent/glslang_tab.cpp" break; - case 243: /* type_specifier_nonarray: MAT4X3 */ -#line 1891 "MachineIndependent/glslang.y" + case 248: /* type_specifier_nonarray: MAT4X3 */ +#line 1883 "MachineIndependent/glslang.y" { (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtFloat; (yyval.interm.type).setMatrix(4, 3); } -#line 7691 "MachineIndependent/glslang_tab.cpp" +#line 7787 "MachineIndependent/glslang_tab.cpp" break; - case 244: /* type_specifier_nonarray: MAT4X4 */ -#line 1896 "MachineIndependent/glslang.y" + case 249: /* type_specifier_nonarray: MAT4X4 */ +#line 1888 "MachineIndependent/glslang.y" { (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtFloat; (yyval.interm.type).setMatrix(4, 4); } -#line 7701 "MachineIndependent/glslang_tab.cpp" +#line 7797 "MachineIndependent/glslang_tab.cpp" break; - case 245: /* type_specifier_nonarray: DOUBLE */ -#line 1902 "MachineIndependent/glslang.y" + case 250: /* type_specifier_nonarray: DOUBLE */ +#line 1893 "MachineIndependent/glslang.y" { parseContext.requireProfile((yyvsp[0].lex).loc, ECoreProfile | ECompatibilityProfile, "double"); if (! parseContext.symbolTable.atBuiltInLevel()) @@ -7709,121 +7805,121 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtDouble; } -#line 7713 "MachineIndependent/glslang_tab.cpp" +#line 7809 "MachineIndependent/glslang_tab.cpp" break; - case 246: /* type_specifier_nonarray: FLOAT16_T */ -#line 1909 "MachineIndependent/glslang.y" + case 251: /* type_specifier_nonarray: FLOAT16_T */ +#line 1900 "MachineIndependent/glslang.y" { parseContext.float16ScalarVectorCheck((yyvsp[0].lex).loc, "float16_t", parseContext.symbolTable.atBuiltInLevel()); (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtFloat16; } -#line 7723 "MachineIndependent/glslang_tab.cpp" +#line 7819 "MachineIndependent/glslang_tab.cpp" break; - case 247: /* type_specifier_nonarray: FLOAT32_T */ -#line 1914 "MachineIndependent/glslang.y" + case 252: /* type_specifier_nonarray: FLOAT32_T */ +#line 1905 "MachineIndependent/glslang.y" { parseContext.explicitFloat32Check((yyvsp[0].lex).loc, "float32_t", parseContext.symbolTable.atBuiltInLevel()); (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtFloat; } -#line 7733 "MachineIndependent/glslang_tab.cpp" +#line 7829 "MachineIndependent/glslang_tab.cpp" break; - case 248: /* type_specifier_nonarray: FLOAT64_T */ -#line 1919 "MachineIndependent/glslang.y" + case 253: /* type_specifier_nonarray: FLOAT64_T */ +#line 1910 "MachineIndependent/glslang.y" { parseContext.explicitFloat64Check((yyvsp[0].lex).loc, "float64_t", parseContext.symbolTable.atBuiltInLevel()); (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtDouble; } -#line 7743 "MachineIndependent/glslang_tab.cpp" +#line 7839 "MachineIndependent/glslang_tab.cpp" break; - case 249: /* type_specifier_nonarray: INT8_T */ -#line 1924 "MachineIndependent/glslang.y" + case 254: /* type_specifier_nonarray: INT8_T */ +#line 1915 "MachineIndependent/glslang.y" { parseContext.int8ScalarVectorCheck((yyvsp[0].lex).loc, "8-bit signed integer", parseContext.symbolTable.atBuiltInLevel()); (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtInt8; } -#line 7753 "MachineIndependent/glslang_tab.cpp" +#line 7849 "MachineIndependent/glslang_tab.cpp" break; - case 250: /* type_specifier_nonarray: UINT8_T */ -#line 1929 "MachineIndependent/glslang.y" + case 255: /* type_specifier_nonarray: UINT8_T */ +#line 1920 "MachineIndependent/glslang.y" { parseContext.int8ScalarVectorCheck((yyvsp[0].lex).loc, "8-bit unsigned integer", parseContext.symbolTable.atBuiltInLevel()); (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtUint8; } -#line 7763 "MachineIndependent/glslang_tab.cpp" +#line 7859 "MachineIndependent/glslang_tab.cpp" break; - case 251: /* type_specifier_nonarray: INT16_T */ -#line 1934 "MachineIndependent/glslang.y" + case 256: /* type_specifier_nonarray: INT16_T */ +#line 1925 "MachineIndependent/glslang.y" { parseContext.int16ScalarVectorCheck((yyvsp[0].lex).loc, "16-bit signed integer", parseContext.symbolTable.atBuiltInLevel()); (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtInt16; } -#line 7773 "MachineIndependent/glslang_tab.cpp" +#line 7869 "MachineIndependent/glslang_tab.cpp" break; - case 252: /* type_specifier_nonarray: UINT16_T */ -#line 1939 "MachineIndependent/glslang.y" + case 257: /* type_specifier_nonarray: UINT16_T */ +#line 1930 "MachineIndependent/glslang.y" { parseContext.int16ScalarVectorCheck((yyvsp[0].lex).loc, "16-bit unsigned integer", parseContext.symbolTable.atBuiltInLevel()); (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtUint16; } -#line 7783 "MachineIndependent/glslang_tab.cpp" +#line 7879 "MachineIndependent/glslang_tab.cpp" break; - case 253: /* type_specifier_nonarray: INT32_T */ -#line 1944 "MachineIndependent/glslang.y" + case 258: /* type_specifier_nonarray: INT32_T */ +#line 1935 "MachineIndependent/glslang.y" { parseContext.explicitInt32Check((yyvsp[0].lex).loc, "32-bit signed integer", parseContext.symbolTable.atBuiltInLevel()); (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtInt; } -#line 7793 "MachineIndependent/glslang_tab.cpp" +#line 7889 "MachineIndependent/glslang_tab.cpp" break; - case 254: /* type_specifier_nonarray: UINT32_T */ -#line 1949 "MachineIndependent/glslang.y" + case 259: /* type_specifier_nonarray: UINT32_T */ +#line 1940 "MachineIndependent/glslang.y" { parseContext.explicitInt32Check((yyvsp[0].lex).loc, "32-bit unsigned integer", parseContext.symbolTable.atBuiltInLevel()); (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtUint; } -#line 7803 "MachineIndependent/glslang_tab.cpp" +#line 7899 "MachineIndependent/glslang_tab.cpp" break; - case 255: /* type_specifier_nonarray: INT64_T */ -#line 1954 "MachineIndependent/glslang.y" + case 260: /* type_specifier_nonarray: INT64_T */ +#line 1945 "MachineIndependent/glslang.y" { parseContext.int64Check((yyvsp[0].lex).loc, "64-bit integer", parseContext.symbolTable.atBuiltInLevel()); (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtInt64; } -#line 7813 "MachineIndependent/glslang_tab.cpp" +#line 7909 "MachineIndependent/glslang_tab.cpp" break; - case 256: /* type_specifier_nonarray: UINT64_T */ -#line 1959 "MachineIndependent/glslang.y" + case 261: /* type_specifier_nonarray: UINT64_T */ +#line 1950 "MachineIndependent/glslang.y" { parseContext.int64Check((yyvsp[0].lex).loc, "64-bit unsigned integer", parseContext.symbolTable.atBuiltInLevel()); (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtUint64; } -#line 7823 "MachineIndependent/glslang_tab.cpp" +#line 7919 "MachineIndependent/glslang_tab.cpp" break; - case 257: /* type_specifier_nonarray: DVEC2 */ -#line 1964 "MachineIndependent/glslang.y" + case 262: /* type_specifier_nonarray: DVEC2 */ +#line 1955 "MachineIndependent/glslang.y" { parseContext.requireProfile((yyvsp[0].lex).loc, ECoreProfile | ECompatibilityProfile, "double vector"); if (! parseContext.symbolTable.atBuiltInLevel()) @@ -7832,11 +7928,11 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); (yyval.interm.type).basicType = EbtDouble; (yyval.interm.type).setVector(2); } -#line 7836 "MachineIndependent/glslang_tab.cpp" +#line 7932 "MachineIndependent/glslang_tab.cpp" break; - case 258: /* type_specifier_nonarray: DVEC3 */ -#line 1972 "MachineIndependent/glslang.y" + case 263: /* type_specifier_nonarray: DVEC3 */ +#line 1963 "MachineIndependent/glslang.y" { parseContext.requireProfile((yyvsp[0].lex).loc, ECoreProfile | ECompatibilityProfile, "double vector"); if (! parseContext.symbolTable.atBuiltInLevel()) @@ -7845,11 +7941,11 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); (yyval.interm.type).basicType = EbtDouble; (yyval.interm.type).setVector(3); } -#line 7849 "MachineIndependent/glslang_tab.cpp" +#line 7945 "MachineIndependent/glslang_tab.cpp" break; - case 259: /* type_specifier_nonarray: DVEC4 */ -#line 1980 "MachineIndependent/glslang.y" + case 264: /* type_specifier_nonarray: DVEC4 */ +#line 1971 "MachineIndependent/glslang.y" { parseContext.requireProfile((yyvsp[0].lex).loc, ECoreProfile | ECompatibilityProfile, "double vector"); if (! parseContext.symbolTable.atBuiltInLevel()) @@ -7858,374 +7954,374 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); (yyval.interm.type).basicType = EbtDouble; (yyval.interm.type).setVector(4); } -#line 7862 "MachineIndependent/glslang_tab.cpp" +#line 7958 "MachineIndependent/glslang_tab.cpp" break; - case 260: /* type_specifier_nonarray: F16VEC2 */ -#line 1988 "MachineIndependent/glslang.y" + case 265: /* type_specifier_nonarray: F16VEC2 */ +#line 1979 "MachineIndependent/glslang.y" { parseContext.float16ScalarVectorCheck((yyvsp[0].lex).loc, "half float vector", parseContext.symbolTable.atBuiltInLevel()); (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtFloat16; (yyval.interm.type).setVector(2); } -#line 7873 "MachineIndependent/glslang_tab.cpp" +#line 7969 "MachineIndependent/glslang_tab.cpp" break; - case 261: /* type_specifier_nonarray: F16VEC3 */ -#line 1994 "MachineIndependent/glslang.y" + case 266: /* type_specifier_nonarray: F16VEC3 */ +#line 1985 "MachineIndependent/glslang.y" { parseContext.float16ScalarVectorCheck((yyvsp[0].lex).loc, "half float vector", parseContext.symbolTable.atBuiltInLevel()); (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtFloat16; (yyval.interm.type).setVector(3); } -#line 7884 "MachineIndependent/glslang_tab.cpp" +#line 7980 "MachineIndependent/glslang_tab.cpp" break; - case 262: /* type_specifier_nonarray: F16VEC4 */ -#line 2000 "MachineIndependent/glslang.y" + case 267: /* type_specifier_nonarray: F16VEC4 */ +#line 1991 "MachineIndependent/glslang.y" { parseContext.float16ScalarVectorCheck((yyvsp[0].lex).loc, "half float vector", parseContext.symbolTable.atBuiltInLevel()); (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtFloat16; (yyval.interm.type).setVector(4); } -#line 7895 "MachineIndependent/glslang_tab.cpp" +#line 7991 "MachineIndependent/glslang_tab.cpp" break; - case 263: /* type_specifier_nonarray: F32VEC2 */ -#line 2006 "MachineIndependent/glslang.y" + case 268: /* type_specifier_nonarray: F32VEC2 */ +#line 1997 "MachineIndependent/glslang.y" { parseContext.explicitFloat32Check((yyvsp[0].lex).loc, "float32_t vector", parseContext.symbolTable.atBuiltInLevel()); (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtFloat; (yyval.interm.type).setVector(2); } -#line 7906 "MachineIndependent/glslang_tab.cpp" +#line 8002 "MachineIndependent/glslang_tab.cpp" break; - case 264: /* type_specifier_nonarray: F32VEC3 */ -#line 2012 "MachineIndependent/glslang.y" + case 269: /* type_specifier_nonarray: F32VEC3 */ +#line 2003 "MachineIndependent/glslang.y" { parseContext.explicitFloat32Check((yyvsp[0].lex).loc, "float32_t vector", parseContext.symbolTable.atBuiltInLevel()); (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtFloat; (yyval.interm.type).setVector(3); } -#line 7917 "MachineIndependent/glslang_tab.cpp" +#line 8013 "MachineIndependent/glslang_tab.cpp" break; - case 265: /* type_specifier_nonarray: F32VEC4 */ -#line 2018 "MachineIndependent/glslang.y" + case 270: /* type_specifier_nonarray: F32VEC4 */ +#line 2009 "MachineIndependent/glslang.y" { parseContext.explicitFloat32Check((yyvsp[0].lex).loc, "float32_t vector", parseContext.symbolTable.atBuiltInLevel()); (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtFloat; (yyval.interm.type).setVector(4); } -#line 7928 "MachineIndependent/glslang_tab.cpp" +#line 8024 "MachineIndependent/glslang_tab.cpp" break; - case 266: /* type_specifier_nonarray: F64VEC2 */ -#line 2024 "MachineIndependent/glslang.y" + case 271: /* type_specifier_nonarray: F64VEC2 */ +#line 2015 "MachineIndependent/glslang.y" { parseContext.explicitFloat64Check((yyvsp[0].lex).loc, "float64_t vector", parseContext.symbolTable.atBuiltInLevel()); (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtDouble; (yyval.interm.type).setVector(2); } -#line 7939 "MachineIndependent/glslang_tab.cpp" +#line 8035 "MachineIndependent/glslang_tab.cpp" break; - case 267: /* type_specifier_nonarray: F64VEC3 */ -#line 2030 "MachineIndependent/glslang.y" + case 272: /* type_specifier_nonarray: F64VEC3 */ +#line 2021 "MachineIndependent/glslang.y" { parseContext.explicitFloat64Check((yyvsp[0].lex).loc, "float64_t vector", parseContext.symbolTable.atBuiltInLevel()); (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtDouble; (yyval.interm.type).setVector(3); } -#line 7950 "MachineIndependent/glslang_tab.cpp" +#line 8046 "MachineIndependent/glslang_tab.cpp" break; - case 268: /* type_specifier_nonarray: F64VEC4 */ -#line 2036 "MachineIndependent/glslang.y" + case 273: /* type_specifier_nonarray: F64VEC4 */ +#line 2027 "MachineIndependent/glslang.y" { parseContext.explicitFloat64Check((yyvsp[0].lex).loc, "float64_t vector", parseContext.symbolTable.atBuiltInLevel()); (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtDouble; (yyval.interm.type).setVector(4); } -#line 7961 "MachineIndependent/glslang_tab.cpp" +#line 8057 "MachineIndependent/glslang_tab.cpp" break; - case 269: /* type_specifier_nonarray: I8VEC2 */ -#line 2042 "MachineIndependent/glslang.y" + case 274: /* type_specifier_nonarray: I8VEC2 */ +#line 2033 "MachineIndependent/glslang.y" { parseContext.int8ScalarVectorCheck((yyvsp[0].lex).loc, "8-bit signed integer vector", parseContext.symbolTable.atBuiltInLevel()); (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtInt8; (yyval.interm.type).setVector(2); } -#line 7972 "MachineIndependent/glslang_tab.cpp" +#line 8068 "MachineIndependent/glslang_tab.cpp" break; - case 270: /* type_specifier_nonarray: I8VEC3 */ -#line 2048 "MachineIndependent/glslang.y" + case 275: /* type_specifier_nonarray: I8VEC3 */ +#line 2039 "MachineIndependent/glslang.y" { parseContext.int8ScalarVectorCheck((yyvsp[0].lex).loc, "8-bit signed integer vector", parseContext.symbolTable.atBuiltInLevel()); (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtInt8; (yyval.interm.type).setVector(3); } -#line 7983 "MachineIndependent/glslang_tab.cpp" +#line 8079 "MachineIndependent/glslang_tab.cpp" break; - case 271: /* type_specifier_nonarray: I8VEC4 */ -#line 2054 "MachineIndependent/glslang.y" + case 276: /* type_specifier_nonarray: I8VEC4 */ +#line 2045 "MachineIndependent/glslang.y" { parseContext.int8ScalarVectorCheck((yyvsp[0].lex).loc, "8-bit signed integer vector", parseContext.symbolTable.atBuiltInLevel()); (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtInt8; (yyval.interm.type).setVector(4); } -#line 7994 "MachineIndependent/glslang_tab.cpp" +#line 8090 "MachineIndependent/glslang_tab.cpp" break; - case 272: /* type_specifier_nonarray: I16VEC2 */ -#line 2060 "MachineIndependent/glslang.y" + case 277: /* type_specifier_nonarray: I16VEC2 */ +#line 2051 "MachineIndependent/glslang.y" { parseContext.int16ScalarVectorCheck((yyvsp[0].lex).loc, "16-bit signed integer vector", parseContext.symbolTable.atBuiltInLevel()); (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtInt16; (yyval.interm.type).setVector(2); } -#line 8005 "MachineIndependent/glslang_tab.cpp" +#line 8101 "MachineIndependent/glslang_tab.cpp" break; - case 273: /* type_specifier_nonarray: I16VEC3 */ -#line 2066 "MachineIndependent/glslang.y" + case 278: /* type_specifier_nonarray: I16VEC3 */ +#line 2057 "MachineIndependent/glslang.y" { parseContext.int16ScalarVectorCheck((yyvsp[0].lex).loc, "16-bit signed integer vector", parseContext.symbolTable.atBuiltInLevel()); (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtInt16; (yyval.interm.type).setVector(3); } -#line 8016 "MachineIndependent/glslang_tab.cpp" +#line 8112 "MachineIndependent/glslang_tab.cpp" break; - case 274: /* type_specifier_nonarray: I16VEC4 */ -#line 2072 "MachineIndependent/glslang.y" + case 279: /* type_specifier_nonarray: I16VEC4 */ +#line 2063 "MachineIndependent/glslang.y" { parseContext.int16ScalarVectorCheck((yyvsp[0].lex).loc, "16-bit signed integer vector", parseContext.symbolTable.atBuiltInLevel()); (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtInt16; (yyval.interm.type).setVector(4); } -#line 8027 "MachineIndependent/glslang_tab.cpp" +#line 8123 "MachineIndependent/glslang_tab.cpp" break; - case 275: /* type_specifier_nonarray: I32VEC2 */ -#line 2078 "MachineIndependent/glslang.y" + case 280: /* type_specifier_nonarray: I32VEC2 */ +#line 2069 "MachineIndependent/glslang.y" { parseContext.explicitInt32Check((yyvsp[0].lex).loc, "32-bit signed integer vector", parseContext.symbolTable.atBuiltInLevel()); (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtInt; (yyval.interm.type).setVector(2); } -#line 8038 "MachineIndependent/glslang_tab.cpp" +#line 8134 "MachineIndependent/glslang_tab.cpp" break; - case 276: /* type_specifier_nonarray: I32VEC3 */ -#line 2084 "MachineIndependent/glslang.y" + case 281: /* type_specifier_nonarray: I32VEC3 */ +#line 2075 "MachineIndependent/glslang.y" { parseContext.explicitInt32Check((yyvsp[0].lex).loc, "32-bit signed integer vector", parseContext.symbolTable.atBuiltInLevel()); (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtInt; (yyval.interm.type).setVector(3); } -#line 8049 "MachineIndependent/glslang_tab.cpp" +#line 8145 "MachineIndependent/glslang_tab.cpp" break; - case 277: /* type_specifier_nonarray: I32VEC4 */ -#line 2090 "MachineIndependent/glslang.y" + case 282: /* type_specifier_nonarray: I32VEC4 */ +#line 2081 "MachineIndependent/glslang.y" { parseContext.explicitInt32Check((yyvsp[0].lex).loc, "32-bit signed integer vector", parseContext.symbolTable.atBuiltInLevel()); (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtInt; (yyval.interm.type).setVector(4); } -#line 8060 "MachineIndependent/glslang_tab.cpp" +#line 8156 "MachineIndependent/glslang_tab.cpp" break; - case 278: /* type_specifier_nonarray: I64VEC2 */ -#line 2096 "MachineIndependent/glslang.y" + case 283: /* type_specifier_nonarray: I64VEC2 */ +#line 2087 "MachineIndependent/glslang.y" { parseContext.int64Check((yyvsp[0].lex).loc, "64-bit integer vector", parseContext.symbolTable.atBuiltInLevel()); (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtInt64; (yyval.interm.type).setVector(2); } -#line 8071 "MachineIndependent/glslang_tab.cpp" +#line 8167 "MachineIndependent/glslang_tab.cpp" break; - case 279: /* type_specifier_nonarray: I64VEC3 */ -#line 2102 "MachineIndependent/glslang.y" + case 284: /* type_specifier_nonarray: I64VEC3 */ +#line 2093 "MachineIndependent/glslang.y" { parseContext.int64Check((yyvsp[0].lex).loc, "64-bit integer vector", parseContext.symbolTable.atBuiltInLevel()); (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtInt64; (yyval.interm.type).setVector(3); } -#line 8082 "MachineIndependent/glslang_tab.cpp" +#line 8178 "MachineIndependent/glslang_tab.cpp" break; - case 280: /* type_specifier_nonarray: I64VEC4 */ -#line 2108 "MachineIndependent/glslang.y" + case 285: /* type_specifier_nonarray: I64VEC4 */ +#line 2099 "MachineIndependent/glslang.y" { parseContext.int64Check((yyvsp[0].lex).loc, "64-bit integer vector", parseContext.symbolTable.atBuiltInLevel()); (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtInt64; (yyval.interm.type).setVector(4); } -#line 8093 "MachineIndependent/glslang_tab.cpp" +#line 8189 "MachineIndependent/glslang_tab.cpp" break; - case 281: /* type_specifier_nonarray: U8VEC2 */ -#line 2114 "MachineIndependent/glslang.y" + case 286: /* type_specifier_nonarray: U8VEC2 */ +#line 2105 "MachineIndependent/glslang.y" { parseContext.int8ScalarVectorCheck((yyvsp[0].lex).loc, "8-bit unsigned integer vector", parseContext.symbolTable.atBuiltInLevel()); (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtUint8; (yyval.interm.type).setVector(2); } -#line 8104 "MachineIndependent/glslang_tab.cpp" +#line 8200 "MachineIndependent/glslang_tab.cpp" break; - case 282: /* type_specifier_nonarray: U8VEC3 */ -#line 2120 "MachineIndependent/glslang.y" + case 287: /* type_specifier_nonarray: U8VEC3 */ +#line 2111 "MachineIndependent/glslang.y" { parseContext.int8ScalarVectorCheck((yyvsp[0].lex).loc, "8-bit unsigned integer vector", parseContext.symbolTable.atBuiltInLevel()); (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtUint8; (yyval.interm.type).setVector(3); } -#line 8115 "MachineIndependent/glslang_tab.cpp" +#line 8211 "MachineIndependent/glslang_tab.cpp" break; - case 283: /* type_specifier_nonarray: U8VEC4 */ -#line 2126 "MachineIndependent/glslang.y" + case 288: /* type_specifier_nonarray: U8VEC4 */ +#line 2117 "MachineIndependent/glslang.y" { parseContext.int8ScalarVectorCheck((yyvsp[0].lex).loc, "8-bit unsigned integer vector", parseContext.symbolTable.atBuiltInLevel()); (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtUint8; (yyval.interm.type).setVector(4); } -#line 8126 "MachineIndependent/glslang_tab.cpp" +#line 8222 "MachineIndependent/glslang_tab.cpp" break; - case 284: /* type_specifier_nonarray: U16VEC2 */ -#line 2132 "MachineIndependent/glslang.y" + case 289: /* type_specifier_nonarray: U16VEC2 */ +#line 2123 "MachineIndependent/glslang.y" { parseContext.int16ScalarVectorCheck((yyvsp[0].lex).loc, "16-bit unsigned integer vector", parseContext.symbolTable.atBuiltInLevel()); (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtUint16; (yyval.interm.type).setVector(2); } -#line 8137 "MachineIndependent/glslang_tab.cpp" +#line 8233 "MachineIndependent/glslang_tab.cpp" break; - case 285: /* type_specifier_nonarray: U16VEC3 */ -#line 2138 "MachineIndependent/glslang.y" + case 290: /* type_specifier_nonarray: U16VEC3 */ +#line 2129 "MachineIndependent/glslang.y" { parseContext.int16ScalarVectorCheck((yyvsp[0].lex).loc, "16-bit unsigned integer vector", parseContext.symbolTable.atBuiltInLevel()); (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtUint16; (yyval.interm.type).setVector(3); } -#line 8148 "MachineIndependent/glslang_tab.cpp" +#line 8244 "MachineIndependent/glslang_tab.cpp" break; - case 286: /* type_specifier_nonarray: U16VEC4 */ -#line 2144 "MachineIndependent/glslang.y" + case 291: /* type_specifier_nonarray: U16VEC4 */ +#line 2135 "MachineIndependent/glslang.y" { parseContext.int16ScalarVectorCheck((yyvsp[0].lex).loc, "16-bit unsigned integer vector", parseContext.symbolTable.atBuiltInLevel()); (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtUint16; (yyval.interm.type).setVector(4); } -#line 8159 "MachineIndependent/glslang_tab.cpp" +#line 8255 "MachineIndependent/glslang_tab.cpp" break; - case 287: /* type_specifier_nonarray: U32VEC2 */ -#line 2150 "MachineIndependent/glslang.y" + case 292: /* type_specifier_nonarray: U32VEC2 */ +#line 2141 "MachineIndependent/glslang.y" { parseContext.explicitInt32Check((yyvsp[0].lex).loc, "32-bit unsigned integer vector", parseContext.symbolTable.atBuiltInLevel()); (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtUint; (yyval.interm.type).setVector(2); } -#line 8170 "MachineIndependent/glslang_tab.cpp" +#line 8266 "MachineIndependent/glslang_tab.cpp" break; - case 288: /* type_specifier_nonarray: U32VEC3 */ -#line 2156 "MachineIndependent/glslang.y" + case 293: /* type_specifier_nonarray: U32VEC3 */ +#line 2147 "MachineIndependent/glslang.y" { parseContext.explicitInt32Check((yyvsp[0].lex).loc, "32-bit unsigned integer vector", parseContext.symbolTable.atBuiltInLevel()); (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtUint; (yyval.interm.type).setVector(3); } -#line 8181 "MachineIndependent/glslang_tab.cpp" +#line 8277 "MachineIndependent/glslang_tab.cpp" break; - case 289: /* type_specifier_nonarray: U32VEC4 */ -#line 2162 "MachineIndependent/glslang.y" + case 294: /* type_specifier_nonarray: U32VEC4 */ +#line 2153 "MachineIndependent/glslang.y" { parseContext.explicitInt32Check((yyvsp[0].lex).loc, "32-bit unsigned integer vector", parseContext.symbolTable.atBuiltInLevel()); (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtUint; (yyval.interm.type).setVector(4); } -#line 8192 "MachineIndependent/glslang_tab.cpp" +#line 8288 "MachineIndependent/glslang_tab.cpp" break; - case 290: /* type_specifier_nonarray: U64VEC2 */ -#line 2168 "MachineIndependent/glslang.y" + case 295: /* type_specifier_nonarray: U64VEC2 */ +#line 2159 "MachineIndependent/glslang.y" { parseContext.int64Check((yyvsp[0].lex).loc, "64-bit unsigned integer vector", parseContext.symbolTable.atBuiltInLevel()); (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtUint64; (yyval.interm.type).setVector(2); } -#line 8203 "MachineIndependent/glslang_tab.cpp" +#line 8299 "MachineIndependent/glslang_tab.cpp" break; - case 291: /* type_specifier_nonarray: U64VEC3 */ -#line 2174 "MachineIndependent/glslang.y" + case 296: /* type_specifier_nonarray: U64VEC3 */ +#line 2165 "MachineIndependent/glslang.y" { parseContext.int64Check((yyvsp[0].lex).loc, "64-bit unsigned integer vector", parseContext.symbolTable.atBuiltInLevel()); (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtUint64; (yyval.interm.type).setVector(3); } -#line 8214 "MachineIndependent/glslang_tab.cpp" +#line 8310 "MachineIndependent/glslang_tab.cpp" break; - case 292: /* type_specifier_nonarray: U64VEC4 */ -#line 2180 "MachineIndependent/glslang.y" + case 297: /* type_specifier_nonarray: U64VEC4 */ +#line 2171 "MachineIndependent/glslang.y" { parseContext.int64Check((yyvsp[0].lex).loc, "64-bit unsigned integer vector", parseContext.symbolTable.atBuiltInLevel()); (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtUint64; (yyval.interm.type).setVector(4); } -#line 8225 "MachineIndependent/glslang_tab.cpp" +#line 8321 "MachineIndependent/glslang_tab.cpp" break; - case 293: /* type_specifier_nonarray: DMAT2 */ -#line 2186 "MachineIndependent/glslang.y" + case 298: /* type_specifier_nonarray: DMAT2 */ +#line 2177 "MachineIndependent/glslang.y" { parseContext.requireProfile((yyvsp[0].lex).loc, ECoreProfile | ECompatibilityProfile, "double matrix"); if (! parseContext.symbolTable.atBuiltInLevel()) @@ -8234,11 +8330,11 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); (yyval.interm.type).basicType = EbtDouble; (yyval.interm.type).setMatrix(2, 2); } -#line 8238 "MachineIndependent/glslang_tab.cpp" +#line 8334 "MachineIndependent/glslang_tab.cpp" break; - case 294: /* type_specifier_nonarray: DMAT3 */ -#line 2194 "MachineIndependent/glslang.y" + case 299: /* type_specifier_nonarray: DMAT3 */ +#line 2185 "MachineIndependent/glslang.y" { parseContext.requireProfile((yyvsp[0].lex).loc, ECoreProfile | ECompatibilityProfile, "double matrix"); if (! parseContext.symbolTable.atBuiltInLevel()) @@ -8247,11 +8343,11 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); (yyval.interm.type).basicType = EbtDouble; (yyval.interm.type).setMatrix(3, 3); } -#line 8251 "MachineIndependent/glslang_tab.cpp" +#line 8347 "MachineIndependent/glslang_tab.cpp" break; - case 295: /* type_specifier_nonarray: DMAT4 */ -#line 2202 "MachineIndependent/glslang.y" + case 300: /* type_specifier_nonarray: DMAT4 */ +#line 2193 "MachineIndependent/glslang.y" { parseContext.requireProfile((yyvsp[0].lex).loc, ECoreProfile | ECompatibilityProfile, "double matrix"); if (! parseContext.symbolTable.atBuiltInLevel()) @@ -8260,11 +8356,11 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); (yyval.interm.type).basicType = EbtDouble; (yyval.interm.type).setMatrix(4, 4); } -#line 8264 "MachineIndependent/glslang_tab.cpp" +#line 8360 "MachineIndependent/glslang_tab.cpp" break; - case 296: /* type_specifier_nonarray: DMAT2X2 */ -#line 2210 "MachineIndependent/glslang.y" + case 301: /* type_specifier_nonarray: DMAT2X2 */ +#line 2201 "MachineIndependent/glslang.y" { parseContext.requireProfile((yyvsp[0].lex).loc, ECoreProfile | ECompatibilityProfile, "double matrix"); if (! parseContext.symbolTable.atBuiltInLevel()) @@ -8273,11 +8369,11 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); (yyval.interm.type).basicType = EbtDouble; (yyval.interm.type).setMatrix(2, 2); } -#line 8277 "MachineIndependent/glslang_tab.cpp" +#line 8373 "MachineIndependent/glslang_tab.cpp" break; - case 297: /* type_specifier_nonarray: DMAT2X3 */ -#line 2218 "MachineIndependent/glslang.y" + case 302: /* type_specifier_nonarray: DMAT2X3 */ +#line 2209 "MachineIndependent/glslang.y" { parseContext.requireProfile((yyvsp[0].lex).loc, ECoreProfile | ECompatibilityProfile, "double matrix"); if (! parseContext.symbolTable.atBuiltInLevel()) @@ -8286,11 +8382,11 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); (yyval.interm.type).basicType = EbtDouble; (yyval.interm.type).setMatrix(2, 3); } -#line 8290 "MachineIndependent/glslang_tab.cpp" +#line 8386 "MachineIndependent/glslang_tab.cpp" break; - case 298: /* type_specifier_nonarray: DMAT2X4 */ -#line 2226 "MachineIndependent/glslang.y" + case 303: /* type_specifier_nonarray: DMAT2X4 */ +#line 2217 "MachineIndependent/glslang.y" { parseContext.requireProfile((yyvsp[0].lex).loc, ECoreProfile | ECompatibilityProfile, "double matrix"); if (! parseContext.symbolTable.atBuiltInLevel()) @@ -8299,11 +8395,11 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); (yyval.interm.type).basicType = EbtDouble; (yyval.interm.type).setMatrix(2, 4); } -#line 8303 "MachineIndependent/glslang_tab.cpp" +#line 8399 "MachineIndependent/glslang_tab.cpp" break; - case 299: /* type_specifier_nonarray: DMAT3X2 */ -#line 2234 "MachineIndependent/glslang.y" + case 304: /* type_specifier_nonarray: DMAT3X2 */ +#line 2225 "MachineIndependent/glslang.y" { parseContext.requireProfile((yyvsp[0].lex).loc, ECoreProfile | ECompatibilityProfile, "double matrix"); if (! parseContext.symbolTable.atBuiltInLevel()) @@ -8312,11 +8408,11 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); (yyval.interm.type).basicType = EbtDouble; (yyval.interm.type).setMatrix(3, 2); } -#line 8316 "MachineIndependent/glslang_tab.cpp" +#line 8412 "MachineIndependent/glslang_tab.cpp" break; - case 300: /* type_specifier_nonarray: DMAT3X3 */ -#line 2242 "MachineIndependent/glslang.y" + case 305: /* type_specifier_nonarray: DMAT3X3 */ +#line 2233 "MachineIndependent/glslang.y" { parseContext.requireProfile((yyvsp[0].lex).loc, ECoreProfile | ECompatibilityProfile, "double matrix"); if (! parseContext.symbolTable.atBuiltInLevel()) @@ -8325,11 +8421,11 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); (yyval.interm.type).basicType = EbtDouble; (yyval.interm.type).setMatrix(3, 3); } -#line 8329 "MachineIndependent/glslang_tab.cpp" +#line 8425 "MachineIndependent/glslang_tab.cpp" break; - case 301: /* type_specifier_nonarray: DMAT3X4 */ -#line 2250 "MachineIndependent/glslang.y" + case 306: /* type_specifier_nonarray: DMAT3X4 */ +#line 2241 "MachineIndependent/glslang.y" { parseContext.requireProfile((yyvsp[0].lex).loc, ECoreProfile | ECompatibilityProfile, "double matrix"); if (! parseContext.symbolTable.atBuiltInLevel()) @@ -8338,11 +8434,11 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); (yyval.interm.type).basicType = EbtDouble; (yyval.interm.type).setMatrix(3, 4); } -#line 8342 "MachineIndependent/glslang_tab.cpp" +#line 8438 "MachineIndependent/glslang_tab.cpp" break; - case 302: /* type_specifier_nonarray: DMAT4X2 */ -#line 2258 "MachineIndependent/glslang.y" + case 307: /* type_specifier_nonarray: DMAT4X2 */ +#line 2249 "MachineIndependent/glslang.y" { parseContext.requireProfile((yyvsp[0].lex).loc, ECoreProfile | ECompatibilityProfile, "double matrix"); if (! parseContext.symbolTable.atBuiltInLevel()) @@ -8351,11 +8447,11 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); (yyval.interm.type).basicType = EbtDouble; (yyval.interm.type).setMatrix(4, 2); } -#line 8355 "MachineIndependent/glslang_tab.cpp" +#line 8451 "MachineIndependent/glslang_tab.cpp" break; - case 303: /* type_specifier_nonarray: DMAT4X3 */ -#line 2266 "MachineIndependent/glslang.y" + case 308: /* type_specifier_nonarray: DMAT4X3 */ +#line 2257 "MachineIndependent/glslang.y" { parseContext.requireProfile((yyvsp[0].lex).loc, ECoreProfile | ECompatibilityProfile, "double matrix"); if (! parseContext.symbolTable.atBuiltInLevel()) @@ -8364,11 +8460,11 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); (yyval.interm.type).basicType = EbtDouble; (yyval.interm.type).setMatrix(4, 3); } -#line 8368 "MachineIndependent/glslang_tab.cpp" +#line 8464 "MachineIndependent/glslang_tab.cpp" break; - case 304: /* type_specifier_nonarray: DMAT4X4 */ -#line 2274 "MachineIndependent/glslang.y" + case 309: /* type_specifier_nonarray: DMAT4X4 */ +#line 2265 "MachineIndependent/glslang.y" { parseContext.requireProfile((yyvsp[0].lex).loc, ECoreProfile | ECompatibilityProfile, "double matrix"); if (! parseContext.symbolTable.atBuiltInLevel()) @@ -8377,2228 +8473,2261 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); (yyval.interm.type).basicType = EbtDouble; (yyval.interm.type).setMatrix(4, 4); } -#line 8381 "MachineIndependent/glslang_tab.cpp" +#line 8477 "MachineIndependent/glslang_tab.cpp" break; - case 305: /* type_specifier_nonarray: F16MAT2 */ -#line 2282 "MachineIndependent/glslang.y" + case 310: /* type_specifier_nonarray: F16MAT2 */ +#line 2273 "MachineIndependent/glslang.y" { parseContext.float16Check((yyvsp[0].lex).loc, "half float matrix", parseContext.symbolTable.atBuiltInLevel()); (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtFloat16; (yyval.interm.type).setMatrix(2, 2); } -#line 8392 "MachineIndependent/glslang_tab.cpp" +#line 8488 "MachineIndependent/glslang_tab.cpp" break; - case 306: /* type_specifier_nonarray: F16MAT3 */ -#line 2288 "MachineIndependent/glslang.y" + case 311: /* type_specifier_nonarray: F16MAT3 */ +#line 2279 "MachineIndependent/glslang.y" { parseContext.float16Check((yyvsp[0].lex).loc, "half float matrix", parseContext.symbolTable.atBuiltInLevel()); (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtFloat16; (yyval.interm.type).setMatrix(3, 3); } -#line 8403 "MachineIndependent/glslang_tab.cpp" +#line 8499 "MachineIndependent/glslang_tab.cpp" break; - case 307: /* type_specifier_nonarray: F16MAT4 */ -#line 2294 "MachineIndependent/glslang.y" + case 312: /* type_specifier_nonarray: F16MAT4 */ +#line 2285 "MachineIndependent/glslang.y" { parseContext.float16Check((yyvsp[0].lex).loc, "half float matrix", parseContext.symbolTable.atBuiltInLevel()); (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtFloat16; (yyval.interm.type).setMatrix(4, 4); } -#line 8414 "MachineIndependent/glslang_tab.cpp" +#line 8510 "MachineIndependent/glslang_tab.cpp" break; - case 308: /* type_specifier_nonarray: F16MAT2X2 */ -#line 2300 "MachineIndependent/glslang.y" + case 313: /* type_specifier_nonarray: F16MAT2X2 */ +#line 2291 "MachineIndependent/glslang.y" { parseContext.float16Check((yyvsp[0].lex).loc, "half float matrix", parseContext.symbolTable.atBuiltInLevel()); (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtFloat16; (yyval.interm.type).setMatrix(2, 2); } -#line 8425 "MachineIndependent/glslang_tab.cpp" +#line 8521 "MachineIndependent/glslang_tab.cpp" break; - case 309: /* type_specifier_nonarray: F16MAT2X3 */ -#line 2306 "MachineIndependent/glslang.y" + case 314: /* type_specifier_nonarray: F16MAT2X3 */ +#line 2297 "MachineIndependent/glslang.y" { parseContext.float16Check((yyvsp[0].lex).loc, "half float matrix", parseContext.symbolTable.atBuiltInLevel()); (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtFloat16; (yyval.interm.type).setMatrix(2, 3); } -#line 8436 "MachineIndependent/glslang_tab.cpp" +#line 8532 "MachineIndependent/glslang_tab.cpp" break; - case 310: /* type_specifier_nonarray: F16MAT2X4 */ -#line 2312 "MachineIndependent/glslang.y" + case 315: /* type_specifier_nonarray: F16MAT2X4 */ +#line 2303 "MachineIndependent/glslang.y" { parseContext.float16Check((yyvsp[0].lex).loc, "half float matrix", parseContext.symbolTable.atBuiltInLevel()); (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtFloat16; (yyval.interm.type).setMatrix(2, 4); } -#line 8447 "MachineIndependent/glslang_tab.cpp" +#line 8543 "MachineIndependent/glslang_tab.cpp" break; - case 311: /* type_specifier_nonarray: F16MAT3X2 */ -#line 2318 "MachineIndependent/glslang.y" + case 316: /* type_specifier_nonarray: F16MAT3X2 */ +#line 2309 "MachineIndependent/glslang.y" { parseContext.float16Check((yyvsp[0].lex).loc, "half float matrix", parseContext.symbolTable.atBuiltInLevel()); (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtFloat16; (yyval.interm.type).setMatrix(3, 2); } -#line 8458 "MachineIndependent/glslang_tab.cpp" +#line 8554 "MachineIndependent/glslang_tab.cpp" break; - case 312: /* type_specifier_nonarray: F16MAT3X3 */ -#line 2324 "MachineIndependent/glslang.y" + case 317: /* type_specifier_nonarray: F16MAT3X3 */ +#line 2315 "MachineIndependent/glslang.y" { parseContext.float16Check((yyvsp[0].lex).loc, "half float matrix", parseContext.symbolTable.atBuiltInLevel()); (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtFloat16; (yyval.interm.type).setMatrix(3, 3); } -#line 8469 "MachineIndependent/glslang_tab.cpp" +#line 8565 "MachineIndependent/glslang_tab.cpp" break; - case 313: /* type_specifier_nonarray: F16MAT3X4 */ -#line 2330 "MachineIndependent/glslang.y" + case 318: /* type_specifier_nonarray: F16MAT3X4 */ +#line 2321 "MachineIndependent/glslang.y" { parseContext.float16Check((yyvsp[0].lex).loc, "half float matrix", parseContext.symbolTable.atBuiltInLevel()); (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtFloat16; (yyval.interm.type).setMatrix(3, 4); } -#line 8480 "MachineIndependent/glslang_tab.cpp" +#line 8576 "MachineIndependent/glslang_tab.cpp" break; - case 314: /* type_specifier_nonarray: F16MAT4X2 */ -#line 2336 "MachineIndependent/glslang.y" + case 319: /* type_specifier_nonarray: F16MAT4X2 */ +#line 2327 "MachineIndependent/glslang.y" { parseContext.float16Check((yyvsp[0].lex).loc, "half float matrix", parseContext.symbolTable.atBuiltInLevel()); (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtFloat16; (yyval.interm.type).setMatrix(4, 2); } -#line 8491 "MachineIndependent/glslang_tab.cpp" +#line 8587 "MachineIndependent/glslang_tab.cpp" break; - case 315: /* type_specifier_nonarray: F16MAT4X3 */ -#line 2342 "MachineIndependent/glslang.y" + case 320: /* type_specifier_nonarray: F16MAT4X3 */ +#line 2333 "MachineIndependent/glslang.y" { parseContext.float16Check((yyvsp[0].lex).loc, "half float matrix", parseContext.symbolTable.atBuiltInLevel()); (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtFloat16; (yyval.interm.type).setMatrix(4, 3); } -#line 8502 "MachineIndependent/glslang_tab.cpp" +#line 8598 "MachineIndependent/glslang_tab.cpp" break; - case 316: /* type_specifier_nonarray: F16MAT4X4 */ -#line 2348 "MachineIndependent/glslang.y" + case 321: /* type_specifier_nonarray: F16MAT4X4 */ +#line 2339 "MachineIndependent/glslang.y" { parseContext.float16Check((yyvsp[0].lex).loc, "half float matrix", parseContext.symbolTable.atBuiltInLevel()); (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtFloat16; (yyval.interm.type).setMatrix(4, 4); } -#line 8513 "MachineIndependent/glslang_tab.cpp" +#line 8609 "MachineIndependent/glslang_tab.cpp" break; - case 317: /* type_specifier_nonarray: F32MAT2 */ -#line 2354 "MachineIndependent/glslang.y" + case 322: /* type_specifier_nonarray: F32MAT2 */ +#line 2345 "MachineIndependent/glslang.y" { parseContext.explicitFloat32Check((yyvsp[0].lex).loc, "float32_t matrix", parseContext.symbolTable.atBuiltInLevel()); (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtFloat; (yyval.interm.type).setMatrix(2, 2); } -#line 8524 "MachineIndependent/glslang_tab.cpp" +#line 8620 "MachineIndependent/glslang_tab.cpp" break; - case 318: /* type_specifier_nonarray: F32MAT3 */ -#line 2360 "MachineIndependent/glslang.y" + case 323: /* type_specifier_nonarray: F32MAT3 */ +#line 2351 "MachineIndependent/glslang.y" { parseContext.explicitFloat32Check((yyvsp[0].lex).loc, "float32_t matrix", parseContext.symbolTable.atBuiltInLevel()); (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtFloat; (yyval.interm.type).setMatrix(3, 3); } -#line 8535 "MachineIndependent/glslang_tab.cpp" +#line 8631 "MachineIndependent/glslang_tab.cpp" break; - case 319: /* type_specifier_nonarray: F32MAT4 */ -#line 2366 "MachineIndependent/glslang.y" + case 324: /* type_specifier_nonarray: F32MAT4 */ +#line 2357 "MachineIndependent/glslang.y" { parseContext.explicitFloat32Check((yyvsp[0].lex).loc, "float32_t matrix", parseContext.symbolTable.atBuiltInLevel()); (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtFloat; (yyval.interm.type).setMatrix(4, 4); } -#line 8546 "MachineIndependent/glslang_tab.cpp" +#line 8642 "MachineIndependent/glslang_tab.cpp" break; - case 320: /* type_specifier_nonarray: F32MAT2X2 */ -#line 2372 "MachineIndependent/glslang.y" + case 325: /* type_specifier_nonarray: F32MAT2X2 */ +#line 2363 "MachineIndependent/glslang.y" { parseContext.explicitFloat32Check((yyvsp[0].lex).loc, "float32_t matrix", parseContext.symbolTable.atBuiltInLevel()); (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtFloat; (yyval.interm.type).setMatrix(2, 2); } -#line 8557 "MachineIndependent/glslang_tab.cpp" +#line 8653 "MachineIndependent/glslang_tab.cpp" break; - case 321: /* type_specifier_nonarray: F32MAT2X3 */ -#line 2378 "MachineIndependent/glslang.y" + case 326: /* type_specifier_nonarray: F32MAT2X3 */ +#line 2369 "MachineIndependent/glslang.y" { parseContext.explicitFloat32Check((yyvsp[0].lex).loc, "float32_t matrix", parseContext.symbolTable.atBuiltInLevel()); (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtFloat; (yyval.interm.type).setMatrix(2, 3); } -#line 8568 "MachineIndependent/glslang_tab.cpp" +#line 8664 "MachineIndependent/glslang_tab.cpp" break; - case 322: /* type_specifier_nonarray: F32MAT2X4 */ -#line 2384 "MachineIndependent/glslang.y" + case 327: /* type_specifier_nonarray: F32MAT2X4 */ +#line 2375 "MachineIndependent/glslang.y" { parseContext.explicitFloat32Check((yyvsp[0].lex).loc, "float32_t matrix", parseContext.symbolTable.atBuiltInLevel()); (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtFloat; (yyval.interm.type).setMatrix(2, 4); } -#line 8579 "MachineIndependent/glslang_tab.cpp" +#line 8675 "MachineIndependent/glslang_tab.cpp" break; - case 323: /* type_specifier_nonarray: F32MAT3X2 */ -#line 2390 "MachineIndependent/glslang.y" + case 328: /* type_specifier_nonarray: F32MAT3X2 */ +#line 2381 "MachineIndependent/glslang.y" { parseContext.explicitFloat32Check((yyvsp[0].lex).loc, "float32_t matrix", parseContext.symbolTable.atBuiltInLevel()); (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtFloat; (yyval.interm.type).setMatrix(3, 2); } -#line 8590 "MachineIndependent/glslang_tab.cpp" +#line 8686 "MachineIndependent/glslang_tab.cpp" break; - case 324: /* type_specifier_nonarray: F32MAT3X3 */ -#line 2396 "MachineIndependent/glslang.y" + case 329: /* type_specifier_nonarray: F32MAT3X3 */ +#line 2387 "MachineIndependent/glslang.y" { parseContext.explicitFloat32Check((yyvsp[0].lex).loc, "float32_t matrix", parseContext.symbolTable.atBuiltInLevel()); (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtFloat; (yyval.interm.type).setMatrix(3, 3); } -#line 8601 "MachineIndependent/glslang_tab.cpp" +#line 8697 "MachineIndependent/glslang_tab.cpp" break; - case 325: /* type_specifier_nonarray: F32MAT3X4 */ -#line 2402 "MachineIndependent/glslang.y" + case 330: /* type_specifier_nonarray: F32MAT3X4 */ +#line 2393 "MachineIndependent/glslang.y" { parseContext.explicitFloat32Check((yyvsp[0].lex).loc, "float32_t matrix", parseContext.symbolTable.atBuiltInLevel()); (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtFloat; (yyval.interm.type).setMatrix(3, 4); } -#line 8612 "MachineIndependent/glslang_tab.cpp" +#line 8708 "MachineIndependent/glslang_tab.cpp" break; - case 326: /* type_specifier_nonarray: F32MAT4X2 */ -#line 2408 "MachineIndependent/glslang.y" + case 331: /* type_specifier_nonarray: F32MAT4X2 */ +#line 2399 "MachineIndependent/glslang.y" { parseContext.explicitFloat32Check((yyvsp[0].lex).loc, "float32_t matrix", parseContext.symbolTable.atBuiltInLevel()); (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtFloat; (yyval.interm.type).setMatrix(4, 2); } -#line 8623 "MachineIndependent/glslang_tab.cpp" +#line 8719 "MachineIndependent/glslang_tab.cpp" break; - case 327: /* type_specifier_nonarray: F32MAT4X3 */ -#line 2414 "MachineIndependent/glslang.y" + case 332: /* type_specifier_nonarray: F32MAT4X3 */ +#line 2405 "MachineIndependent/glslang.y" { parseContext.explicitFloat32Check((yyvsp[0].lex).loc, "float32_t matrix", parseContext.symbolTable.atBuiltInLevel()); (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtFloat; (yyval.interm.type).setMatrix(4, 3); } -#line 8634 "MachineIndependent/glslang_tab.cpp" +#line 8730 "MachineIndependent/glslang_tab.cpp" break; - case 328: /* type_specifier_nonarray: F32MAT4X4 */ -#line 2420 "MachineIndependent/glslang.y" + case 333: /* type_specifier_nonarray: F32MAT4X4 */ +#line 2411 "MachineIndependent/glslang.y" { parseContext.explicitFloat32Check((yyvsp[0].lex).loc, "float32_t matrix", parseContext.symbolTable.atBuiltInLevel()); (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtFloat; (yyval.interm.type).setMatrix(4, 4); } -#line 8645 "MachineIndependent/glslang_tab.cpp" +#line 8741 "MachineIndependent/glslang_tab.cpp" break; - case 329: /* type_specifier_nonarray: F64MAT2 */ -#line 2426 "MachineIndependent/glslang.y" + case 334: /* type_specifier_nonarray: F64MAT2 */ +#line 2417 "MachineIndependent/glslang.y" { parseContext.explicitFloat64Check((yyvsp[0].lex).loc, "float64_t matrix", parseContext.symbolTable.atBuiltInLevel()); (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtDouble; (yyval.interm.type).setMatrix(2, 2); } -#line 8656 "MachineIndependent/glslang_tab.cpp" +#line 8752 "MachineIndependent/glslang_tab.cpp" break; - case 330: /* type_specifier_nonarray: F64MAT3 */ -#line 2432 "MachineIndependent/glslang.y" + case 335: /* type_specifier_nonarray: F64MAT3 */ +#line 2423 "MachineIndependent/glslang.y" { parseContext.explicitFloat64Check((yyvsp[0].lex).loc, "float64_t matrix", parseContext.symbolTable.atBuiltInLevel()); (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtDouble; (yyval.interm.type).setMatrix(3, 3); } -#line 8667 "MachineIndependent/glslang_tab.cpp" +#line 8763 "MachineIndependent/glslang_tab.cpp" break; - case 331: /* type_specifier_nonarray: F64MAT4 */ -#line 2438 "MachineIndependent/glslang.y" + case 336: /* type_specifier_nonarray: F64MAT4 */ +#line 2429 "MachineIndependent/glslang.y" { parseContext.explicitFloat64Check((yyvsp[0].lex).loc, "float64_t matrix", parseContext.symbolTable.atBuiltInLevel()); (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtDouble; (yyval.interm.type).setMatrix(4, 4); } -#line 8678 "MachineIndependent/glslang_tab.cpp" +#line 8774 "MachineIndependent/glslang_tab.cpp" break; - case 332: /* type_specifier_nonarray: F64MAT2X2 */ -#line 2444 "MachineIndependent/glslang.y" + case 337: /* type_specifier_nonarray: F64MAT2X2 */ +#line 2435 "MachineIndependent/glslang.y" { parseContext.explicitFloat64Check((yyvsp[0].lex).loc, "float64_t matrix", parseContext.symbolTable.atBuiltInLevel()); (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtDouble; (yyval.interm.type).setMatrix(2, 2); } -#line 8689 "MachineIndependent/glslang_tab.cpp" +#line 8785 "MachineIndependent/glslang_tab.cpp" break; - case 333: /* type_specifier_nonarray: F64MAT2X3 */ -#line 2450 "MachineIndependent/glslang.y" + case 338: /* type_specifier_nonarray: F64MAT2X3 */ +#line 2441 "MachineIndependent/glslang.y" { parseContext.explicitFloat64Check((yyvsp[0].lex).loc, "float64_t matrix", parseContext.symbolTable.atBuiltInLevel()); (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtDouble; (yyval.interm.type).setMatrix(2, 3); } -#line 8700 "MachineIndependent/glslang_tab.cpp" +#line 8796 "MachineIndependent/glslang_tab.cpp" break; - case 334: /* type_specifier_nonarray: F64MAT2X4 */ -#line 2456 "MachineIndependent/glslang.y" + case 339: /* type_specifier_nonarray: F64MAT2X4 */ +#line 2447 "MachineIndependent/glslang.y" { parseContext.explicitFloat64Check((yyvsp[0].lex).loc, "float64_t matrix", parseContext.symbolTable.atBuiltInLevel()); (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtDouble; (yyval.interm.type).setMatrix(2, 4); } -#line 8711 "MachineIndependent/glslang_tab.cpp" +#line 8807 "MachineIndependent/glslang_tab.cpp" break; - case 335: /* type_specifier_nonarray: F64MAT3X2 */ -#line 2462 "MachineIndependent/glslang.y" + case 340: /* type_specifier_nonarray: F64MAT3X2 */ +#line 2453 "MachineIndependent/glslang.y" { parseContext.explicitFloat64Check((yyvsp[0].lex).loc, "float64_t matrix", parseContext.symbolTable.atBuiltInLevel()); (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtDouble; (yyval.interm.type).setMatrix(3, 2); } -#line 8722 "MachineIndependent/glslang_tab.cpp" +#line 8818 "MachineIndependent/glslang_tab.cpp" break; - case 336: /* type_specifier_nonarray: F64MAT3X3 */ -#line 2468 "MachineIndependent/glslang.y" + case 341: /* type_specifier_nonarray: F64MAT3X3 */ +#line 2459 "MachineIndependent/glslang.y" { parseContext.explicitFloat64Check((yyvsp[0].lex).loc, "float64_t matrix", parseContext.symbolTable.atBuiltInLevel()); (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtDouble; (yyval.interm.type).setMatrix(3, 3); } -#line 8733 "MachineIndependent/glslang_tab.cpp" +#line 8829 "MachineIndependent/glslang_tab.cpp" break; - case 337: /* type_specifier_nonarray: F64MAT3X4 */ -#line 2474 "MachineIndependent/glslang.y" + case 342: /* type_specifier_nonarray: F64MAT3X4 */ +#line 2465 "MachineIndependent/glslang.y" { parseContext.explicitFloat64Check((yyvsp[0].lex).loc, "float64_t matrix", parseContext.symbolTable.atBuiltInLevel()); (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtDouble; (yyval.interm.type).setMatrix(3, 4); } -#line 8744 "MachineIndependent/glslang_tab.cpp" +#line 8840 "MachineIndependent/glslang_tab.cpp" break; - case 338: /* type_specifier_nonarray: F64MAT4X2 */ -#line 2480 "MachineIndependent/glslang.y" + case 343: /* type_specifier_nonarray: F64MAT4X2 */ +#line 2471 "MachineIndependent/glslang.y" { parseContext.explicitFloat64Check((yyvsp[0].lex).loc, "float64_t matrix", parseContext.symbolTable.atBuiltInLevel()); (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtDouble; (yyval.interm.type).setMatrix(4, 2); } -#line 8755 "MachineIndependent/glslang_tab.cpp" +#line 8851 "MachineIndependent/glslang_tab.cpp" break; - case 339: /* type_specifier_nonarray: F64MAT4X3 */ -#line 2486 "MachineIndependent/glslang.y" + case 344: /* type_specifier_nonarray: F64MAT4X3 */ +#line 2477 "MachineIndependent/glslang.y" { parseContext.explicitFloat64Check((yyvsp[0].lex).loc, "float64_t matrix", parseContext.symbolTable.atBuiltInLevel()); (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtDouble; (yyval.interm.type).setMatrix(4, 3); } -#line 8766 "MachineIndependent/glslang_tab.cpp" +#line 8862 "MachineIndependent/glslang_tab.cpp" break; - case 340: /* type_specifier_nonarray: F64MAT4X4 */ -#line 2492 "MachineIndependent/glslang.y" + case 345: /* type_specifier_nonarray: F64MAT4X4 */ +#line 2483 "MachineIndependent/glslang.y" { parseContext.explicitFloat64Check((yyvsp[0].lex).loc, "float64_t matrix", parseContext.symbolTable.atBuiltInLevel()); (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtDouble; (yyval.interm.type).setMatrix(4, 4); } -#line 8777 "MachineIndependent/glslang_tab.cpp" +#line 8873 "MachineIndependent/glslang_tab.cpp" break; - case 341: /* type_specifier_nonarray: ACCSTRUCTNV */ -#line 2498 "MachineIndependent/glslang.y" + case 346: /* type_specifier_nonarray: ACCSTRUCTNV */ +#line 2489 "MachineIndependent/glslang.y" { (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtAccStruct; } -#line 8786 "MachineIndependent/glslang_tab.cpp" +#line 8882 "MachineIndependent/glslang_tab.cpp" break; - case 342: /* type_specifier_nonarray: ACCSTRUCTEXT */ -#line 2502 "MachineIndependent/glslang.y" + case 347: /* type_specifier_nonarray: ACCSTRUCTEXT */ +#line 2493 "MachineIndependent/glslang.y" { (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtAccStruct; } -#line 8795 "MachineIndependent/glslang_tab.cpp" +#line 8891 "MachineIndependent/glslang_tab.cpp" break; - case 343: /* type_specifier_nonarray: RAYQUERYEXT */ -#line 2506 "MachineIndependent/glslang.y" + case 348: /* type_specifier_nonarray: RAYQUERYEXT */ +#line 2497 "MachineIndependent/glslang.y" { (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtRayQuery; } -#line 8804 "MachineIndependent/glslang_tab.cpp" +#line 8900 "MachineIndependent/glslang_tab.cpp" break; - case 344: /* type_specifier_nonarray: ATOMIC_UINT */ -#line 2510 "MachineIndependent/glslang.y" + case 349: /* type_specifier_nonarray: ATOMIC_UINT */ +#line 2501 "MachineIndependent/glslang.y" { parseContext.vulkanRemoved((yyvsp[0].lex).loc, "atomic counter types"); (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtAtomicUint; } -#line 8814 "MachineIndependent/glslang_tab.cpp" +#line 8910 "MachineIndependent/glslang_tab.cpp" break; - case 345: /* type_specifier_nonarray: SAMPLER1D */ -#line 2515 "MachineIndependent/glslang.y" + case 350: /* type_specifier_nonarray: SAMPLER1D */ +#line 2506 "MachineIndependent/glslang.y" { (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.set(EbtFloat, Esd1D); } -#line 8824 "MachineIndependent/glslang_tab.cpp" +#line 8920 "MachineIndependent/glslang_tab.cpp" break; - case 346: /* type_specifier_nonarray: SAMPLER2D */ -#line 2521 "MachineIndependent/glslang.y" + case 351: /* type_specifier_nonarray: SAMPLER2D */ +#line 2511 "MachineIndependent/glslang.y" { (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.set(EbtFloat, Esd2D); } -#line 8834 "MachineIndependent/glslang_tab.cpp" +#line 8930 "MachineIndependent/glslang_tab.cpp" break; - case 347: /* type_specifier_nonarray: SAMPLER3D */ -#line 2526 "MachineIndependent/glslang.y" + case 352: /* type_specifier_nonarray: SAMPLER3D */ +#line 2516 "MachineIndependent/glslang.y" { (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.set(EbtFloat, Esd3D); } -#line 8844 "MachineIndependent/glslang_tab.cpp" +#line 8940 "MachineIndependent/glslang_tab.cpp" break; - case 348: /* type_specifier_nonarray: SAMPLERCUBE */ -#line 2531 "MachineIndependent/glslang.y" + case 353: /* type_specifier_nonarray: SAMPLERCUBE */ +#line 2521 "MachineIndependent/glslang.y" { (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.set(EbtFloat, EsdCube); } -#line 8854 "MachineIndependent/glslang_tab.cpp" +#line 8950 "MachineIndependent/glslang_tab.cpp" break; - case 349: /* type_specifier_nonarray: SAMPLER2DSHADOW */ -#line 2536 "MachineIndependent/glslang.y" + case 354: /* type_specifier_nonarray: SAMPLER2DSHADOW */ +#line 2526 "MachineIndependent/glslang.y" { (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.set(EbtFloat, Esd2D, false, true); } -#line 8864 "MachineIndependent/glslang_tab.cpp" +#line 8960 "MachineIndependent/glslang_tab.cpp" break; - case 350: /* type_specifier_nonarray: SAMPLERCUBESHADOW */ -#line 2541 "MachineIndependent/glslang.y" + case 355: /* type_specifier_nonarray: SAMPLERCUBESHADOW */ +#line 2531 "MachineIndependent/glslang.y" { (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.set(EbtFloat, EsdCube, false, true); } -#line 8874 "MachineIndependent/glslang_tab.cpp" +#line 8970 "MachineIndependent/glslang_tab.cpp" break; - case 351: /* type_specifier_nonarray: SAMPLER2DARRAY */ -#line 2546 "MachineIndependent/glslang.y" + case 356: /* type_specifier_nonarray: SAMPLER2DARRAY */ +#line 2536 "MachineIndependent/glslang.y" { (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.set(EbtFloat, Esd2D, true); } -#line 8884 "MachineIndependent/glslang_tab.cpp" +#line 8980 "MachineIndependent/glslang_tab.cpp" break; - case 352: /* type_specifier_nonarray: SAMPLER2DARRAYSHADOW */ -#line 2551 "MachineIndependent/glslang.y" + case 357: /* type_specifier_nonarray: SAMPLER2DARRAYSHADOW */ +#line 2541 "MachineIndependent/glslang.y" { (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.set(EbtFloat, Esd2D, true, true); } -#line 8894 "MachineIndependent/glslang_tab.cpp" +#line 8990 "MachineIndependent/glslang_tab.cpp" break; - case 353: /* type_specifier_nonarray: SAMPLER1DSHADOW */ -#line 2557 "MachineIndependent/glslang.y" + case 358: /* type_specifier_nonarray: SAMPLER1DSHADOW */ +#line 2546 "MachineIndependent/glslang.y" { (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.set(EbtFloat, Esd1D, false, true); } -#line 8904 "MachineIndependent/glslang_tab.cpp" +#line 9000 "MachineIndependent/glslang_tab.cpp" break; - case 354: /* type_specifier_nonarray: SAMPLER1DARRAY */ -#line 2562 "MachineIndependent/glslang.y" + case 359: /* type_specifier_nonarray: SAMPLER1DARRAY */ +#line 2551 "MachineIndependent/glslang.y" { (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.set(EbtFloat, Esd1D, true); } -#line 8914 "MachineIndependent/glslang_tab.cpp" +#line 9010 "MachineIndependent/glslang_tab.cpp" break; - case 355: /* type_specifier_nonarray: SAMPLER1DARRAYSHADOW */ -#line 2567 "MachineIndependent/glslang.y" + case 360: /* type_specifier_nonarray: SAMPLER1DARRAYSHADOW */ +#line 2556 "MachineIndependent/glslang.y" { (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.set(EbtFloat, Esd1D, true, true); } -#line 8924 "MachineIndependent/glslang_tab.cpp" +#line 9020 "MachineIndependent/glslang_tab.cpp" break; - case 356: /* type_specifier_nonarray: SAMPLERCUBEARRAY */ -#line 2572 "MachineIndependent/glslang.y" + case 361: /* type_specifier_nonarray: SAMPLERCUBEARRAY */ +#line 2561 "MachineIndependent/glslang.y" { (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.set(EbtFloat, EsdCube, true); } -#line 8934 "MachineIndependent/glslang_tab.cpp" +#line 9030 "MachineIndependent/glslang_tab.cpp" break; - case 357: /* type_specifier_nonarray: SAMPLERCUBEARRAYSHADOW */ -#line 2577 "MachineIndependent/glslang.y" + case 362: /* type_specifier_nonarray: SAMPLERCUBEARRAYSHADOW */ +#line 2566 "MachineIndependent/glslang.y" { (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.set(EbtFloat, EsdCube, true, true); } -#line 8944 "MachineIndependent/glslang_tab.cpp" +#line 9040 "MachineIndependent/glslang_tab.cpp" break; - case 358: /* type_specifier_nonarray: F16SAMPLER1D */ -#line 2582 "MachineIndependent/glslang.y" + case 363: /* type_specifier_nonarray: F16SAMPLER1D */ +#line 2571 "MachineIndependent/glslang.y" { parseContext.float16OpaqueCheck((yyvsp[0].lex).loc, "half float sampler", parseContext.symbolTable.atBuiltInLevel()); (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.set(EbtFloat16, Esd1D); } -#line 8955 "MachineIndependent/glslang_tab.cpp" +#line 9051 "MachineIndependent/glslang_tab.cpp" break; - case 359: /* type_specifier_nonarray: F16SAMPLER2D */ -#line 2588 "MachineIndependent/glslang.y" + case 364: /* type_specifier_nonarray: F16SAMPLER2D */ +#line 2577 "MachineIndependent/glslang.y" { parseContext.float16OpaqueCheck((yyvsp[0].lex).loc, "half float sampler", parseContext.symbolTable.atBuiltInLevel()); (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.set(EbtFloat16, Esd2D); } -#line 8966 "MachineIndependent/glslang_tab.cpp" +#line 9062 "MachineIndependent/glslang_tab.cpp" break; - case 360: /* type_specifier_nonarray: F16SAMPLER3D */ -#line 2594 "MachineIndependent/glslang.y" + case 365: /* type_specifier_nonarray: F16SAMPLER3D */ +#line 2583 "MachineIndependent/glslang.y" { parseContext.float16OpaqueCheck((yyvsp[0].lex).loc, "half float sampler", parseContext.symbolTable.atBuiltInLevel()); (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.set(EbtFloat16, Esd3D); } -#line 8977 "MachineIndependent/glslang_tab.cpp" +#line 9073 "MachineIndependent/glslang_tab.cpp" break; - case 361: /* type_specifier_nonarray: F16SAMPLERCUBE */ -#line 2600 "MachineIndependent/glslang.y" + case 366: /* type_specifier_nonarray: F16SAMPLERCUBE */ +#line 2589 "MachineIndependent/glslang.y" { parseContext.float16OpaqueCheck((yyvsp[0].lex).loc, "half float sampler", parseContext.symbolTable.atBuiltInLevel()); (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.set(EbtFloat16, EsdCube); } -#line 8988 "MachineIndependent/glslang_tab.cpp" +#line 9084 "MachineIndependent/glslang_tab.cpp" break; - case 362: /* type_specifier_nonarray: F16SAMPLER1DSHADOW */ -#line 2606 "MachineIndependent/glslang.y" + case 367: /* type_specifier_nonarray: F16SAMPLER1DSHADOW */ +#line 2595 "MachineIndependent/glslang.y" { parseContext.float16OpaqueCheck((yyvsp[0].lex).loc, "half float sampler", parseContext.symbolTable.atBuiltInLevel()); (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.set(EbtFloat16, Esd1D, false, true); } -#line 8999 "MachineIndependent/glslang_tab.cpp" +#line 9095 "MachineIndependent/glslang_tab.cpp" break; - case 363: /* type_specifier_nonarray: F16SAMPLER2DSHADOW */ -#line 2612 "MachineIndependent/glslang.y" + case 368: /* type_specifier_nonarray: F16SAMPLER2DSHADOW */ +#line 2601 "MachineIndependent/glslang.y" { parseContext.float16OpaqueCheck((yyvsp[0].lex).loc, "half float sampler", parseContext.symbolTable.atBuiltInLevel()); (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.set(EbtFloat16, Esd2D, false, true); } -#line 9010 "MachineIndependent/glslang_tab.cpp" +#line 9106 "MachineIndependent/glslang_tab.cpp" break; - case 364: /* type_specifier_nonarray: F16SAMPLERCUBESHADOW */ -#line 2618 "MachineIndependent/glslang.y" + case 369: /* type_specifier_nonarray: F16SAMPLERCUBESHADOW */ +#line 2607 "MachineIndependent/glslang.y" { parseContext.float16OpaqueCheck((yyvsp[0].lex).loc, "half float sampler", parseContext.symbolTable.atBuiltInLevel()); (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.set(EbtFloat16, EsdCube, false, true); } -#line 9021 "MachineIndependent/glslang_tab.cpp" +#line 9117 "MachineIndependent/glslang_tab.cpp" break; - case 365: /* type_specifier_nonarray: F16SAMPLER1DARRAY */ -#line 2624 "MachineIndependent/glslang.y" + case 370: /* type_specifier_nonarray: F16SAMPLER1DARRAY */ +#line 2613 "MachineIndependent/glslang.y" { parseContext.float16OpaqueCheck((yyvsp[0].lex).loc, "half float sampler", parseContext.symbolTable.atBuiltInLevel()); (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.set(EbtFloat16, Esd1D, true); } -#line 9032 "MachineIndependent/glslang_tab.cpp" +#line 9128 "MachineIndependent/glslang_tab.cpp" break; - case 366: /* type_specifier_nonarray: F16SAMPLER2DARRAY */ -#line 2630 "MachineIndependent/glslang.y" + case 371: /* type_specifier_nonarray: F16SAMPLER2DARRAY */ +#line 2619 "MachineIndependent/glslang.y" { parseContext.float16OpaqueCheck((yyvsp[0].lex).loc, "half float sampler", parseContext.symbolTable.atBuiltInLevel()); (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.set(EbtFloat16, Esd2D, true); } -#line 9043 "MachineIndependent/glslang_tab.cpp" +#line 9139 "MachineIndependent/glslang_tab.cpp" break; - case 367: /* type_specifier_nonarray: F16SAMPLER1DARRAYSHADOW */ -#line 2636 "MachineIndependent/glslang.y" + case 372: /* type_specifier_nonarray: F16SAMPLER1DARRAYSHADOW */ +#line 2625 "MachineIndependent/glslang.y" { parseContext.float16OpaqueCheck((yyvsp[0].lex).loc, "half float sampler", parseContext.symbolTable.atBuiltInLevel()); (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.set(EbtFloat16, Esd1D, true, true); } -#line 9054 "MachineIndependent/glslang_tab.cpp" +#line 9150 "MachineIndependent/glslang_tab.cpp" break; - case 368: /* type_specifier_nonarray: F16SAMPLER2DARRAYSHADOW */ -#line 2642 "MachineIndependent/glslang.y" + case 373: /* type_specifier_nonarray: F16SAMPLER2DARRAYSHADOW */ +#line 2631 "MachineIndependent/glslang.y" { parseContext.float16OpaqueCheck((yyvsp[0].lex).loc, "half float sampler", parseContext.symbolTable.atBuiltInLevel()); (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.set(EbtFloat16, Esd2D, true, true); } -#line 9065 "MachineIndependent/glslang_tab.cpp" +#line 9161 "MachineIndependent/glslang_tab.cpp" break; - case 369: /* type_specifier_nonarray: F16SAMPLERCUBEARRAY */ -#line 2648 "MachineIndependent/glslang.y" + case 374: /* type_specifier_nonarray: F16SAMPLERCUBEARRAY */ +#line 2637 "MachineIndependent/glslang.y" { parseContext.float16OpaqueCheck((yyvsp[0].lex).loc, "half float sampler", parseContext.symbolTable.atBuiltInLevel()); (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.set(EbtFloat16, EsdCube, true); } -#line 9076 "MachineIndependent/glslang_tab.cpp" +#line 9172 "MachineIndependent/glslang_tab.cpp" break; - case 370: /* type_specifier_nonarray: F16SAMPLERCUBEARRAYSHADOW */ -#line 2654 "MachineIndependent/glslang.y" + case 375: /* type_specifier_nonarray: F16SAMPLERCUBEARRAYSHADOW */ +#line 2643 "MachineIndependent/glslang.y" { parseContext.float16OpaqueCheck((yyvsp[0].lex).loc, "half float sampler", parseContext.symbolTable.atBuiltInLevel()); (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.set(EbtFloat16, EsdCube, true, true); } -#line 9087 "MachineIndependent/glslang_tab.cpp" +#line 9183 "MachineIndependent/glslang_tab.cpp" break; - case 371: /* type_specifier_nonarray: ISAMPLER1D */ -#line 2660 "MachineIndependent/glslang.y" + case 376: /* type_specifier_nonarray: ISAMPLER1D */ +#line 2649 "MachineIndependent/glslang.y" { (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.set(EbtInt, Esd1D); } -#line 9097 "MachineIndependent/glslang_tab.cpp" +#line 9193 "MachineIndependent/glslang_tab.cpp" break; - case 372: /* type_specifier_nonarray: ISAMPLER2D */ -#line 2666 "MachineIndependent/glslang.y" + case 377: /* type_specifier_nonarray: ISAMPLER2D */ +#line 2654 "MachineIndependent/glslang.y" { (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.set(EbtInt, Esd2D); } -#line 9107 "MachineIndependent/glslang_tab.cpp" +#line 9203 "MachineIndependent/glslang_tab.cpp" break; - case 373: /* type_specifier_nonarray: ISAMPLER3D */ -#line 2671 "MachineIndependent/glslang.y" + case 378: /* type_specifier_nonarray: ISAMPLER3D */ +#line 2659 "MachineIndependent/glslang.y" { (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.set(EbtInt, Esd3D); } -#line 9117 "MachineIndependent/glslang_tab.cpp" +#line 9213 "MachineIndependent/glslang_tab.cpp" break; - case 374: /* type_specifier_nonarray: ISAMPLERCUBE */ -#line 2676 "MachineIndependent/glslang.y" + case 379: /* type_specifier_nonarray: ISAMPLERCUBE */ +#line 2664 "MachineIndependent/glslang.y" { (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.set(EbtInt, EsdCube); } -#line 9127 "MachineIndependent/glslang_tab.cpp" +#line 9223 "MachineIndependent/glslang_tab.cpp" break; - case 375: /* type_specifier_nonarray: ISAMPLER2DARRAY */ -#line 2681 "MachineIndependent/glslang.y" + case 380: /* type_specifier_nonarray: ISAMPLER2DARRAY */ +#line 2669 "MachineIndependent/glslang.y" { (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.set(EbtInt, Esd2D, true); } -#line 9137 "MachineIndependent/glslang_tab.cpp" +#line 9233 "MachineIndependent/glslang_tab.cpp" break; - case 376: /* type_specifier_nonarray: USAMPLER2D */ -#line 2686 "MachineIndependent/glslang.y" + case 381: /* type_specifier_nonarray: USAMPLER2D */ +#line 2674 "MachineIndependent/glslang.y" { (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.set(EbtUint, Esd2D); } -#line 9147 "MachineIndependent/glslang_tab.cpp" +#line 9243 "MachineIndependent/glslang_tab.cpp" break; - case 377: /* type_specifier_nonarray: USAMPLER3D */ -#line 2691 "MachineIndependent/glslang.y" + case 382: /* type_specifier_nonarray: USAMPLER3D */ +#line 2679 "MachineIndependent/glslang.y" { (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.set(EbtUint, Esd3D); } -#line 9157 "MachineIndependent/glslang_tab.cpp" +#line 9253 "MachineIndependent/glslang_tab.cpp" break; - case 378: /* type_specifier_nonarray: USAMPLERCUBE */ -#line 2696 "MachineIndependent/glslang.y" + case 383: /* type_specifier_nonarray: USAMPLERCUBE */ +#line 2684 "MachineIndependent/glslang.y" { (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.set(EbtUint, EsdCube); } -#line 9167 "MachineIndependent/glslang_tab.cpp" +#line 9263 "MachineIndependent/glslang_tab.cpp" break; - case 379: /* type_specifier_nonarray: ISAMPLER1DARRAY */ -#line 2702 "MachineIndependent/glslang.y" + case 384: /* type_specifier_nonarray: ISAMPLER1DARRAY */ +#line 2689 "MachineIndependent/glslang.y" { (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.set(EbtInt, Esd1D, true); } -#line 9177 "MachineIndependent/glslang_tab.cpp" +#line 9273 "MachineIndependent/glslang_tab.cpp" break; - case 380: /* type_specifier_nonarray: ISAMPLERCUBEARRAY */ -#line 2707 "MachineIndependent/glslang.y" + case 385: /* type_specifier_nonarray: ISAMPLERCUBEARRAY */ +#line 2694 "MachineIndependent/glslang.y" { (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.set(EbtInt, EsdCube, true); } -#line 9187 "MachineIndependent/glslang_tab.cpp" +#line 9283 "MachineIndependent/glslang_tab.cpp" break; - case 381: /* type_specifier_nonarray: USAMPLER1D */ -#line 2712 "MachineIndependent/glslang.y" + case 386: /* type_specifier_nonarray: USAMPLER1D */ +#line 2699 "MachineIndependent/glslang.y" { (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.set(EbtUint, Esd1D); } -#line 9197 "MachineIndependent/glslang_tab.cpp" +#line 9293 "MachineIndependent/glslang_tab.cpp" break; - case 382: /* type_specifier_nonarray: USAMPLER1DARRAY */ -#line 2717 "MachineIndependent/glslang.y" + case 387: /* type_specifier_nonarray: USAMPLER1DARRAY */ +#line 2704 "MachineIndependent/glslang.y" { (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.set(EbtUint, Esd1D, true); } -#line 9207 "MachineIndependent/glslang_tab.cpp" +#line 9303 "MachineIndependent/glslang_tab.cpp" break; - case 383: /* type_specifier_nonarray: USAMPLERCUBEARRAY */ -#line 2722 "MachineIndependent/glslang.y" + case 388: /* type_specifier_nonarray: USAMPLERCUBEARRAY */ +#line 2709 "MachineIndependent/glslang.y" { (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.set(EbtUint, EsdCube, true); } -#line 9217 "MachineIndependent/glslang_tab.cpp" +#line 9313 "MachineIndependent/glslang_tab.cpp" break; - case 384: /* type_specifier_nonarray: TEXTURECUBEARRAY */ -#line 2727 "MachineIndependent/glslang.y" + case 389: /* type_specifier_nonarray: TEXTURECUBEARRAY */ +#line 2714 "MachineIndependent/glslang.y" { (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.setTexture(EbtFloat, EsdCube, true); } -#line 9227 "MachineIndependent/glslang_tab.cpp" +#line 9323 "MachineIndependent/glslang_tab.cpp" break; - case 385: /* type_specifier_nonarray: ITEXTURECUBEARRAY */ -#line 2732 "MachineIndependent/glslang.y" + case 390: /* type_specifier_nonarray: ITEXTURECUBEARRAY */ +#line 2719 "MachineIndependent/glslang.y" { (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.setTexture(EbtInt, EsdCube, true); } -#line 9237 "MachineIndependent/glslang_tab.cpp" +#line 9333 "MachineIndependent/glslang_tab.cpp" break; - case 386: /* type_specifier_nonarray: UTEXTURECUBEARRAY */ -#line 2737 "MachineIndependent/glslang.y" + case 391: /* type_specifier_nonarray: UTEXTURECUBEARRAY */ +#line 2724 "MachineIndependent/glslang.y" { (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.setTexture(EbtUint, EsdCube, true); } -#line 9247 "MachineIndependent/glslang_tab.cpp" +#line 9343 "MachineIndependent/glslang_tab.cpp" break; - case 387: /* type_specifier_nonarray: USAMPLER2DARRAY */ -#line 2743 "MachineIndependent/glslang.y" + case 392: /* type_specifier_nonarray: USAMPLER2DARRAY */ +#line 2729 "MachineIndependent/glslang.y" { (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.set(EbtUint, Esd2D, true); } -#line 9257 "MachineIndependent/glslang_tab.cpp" +#line 9353 "MachineIndependent/glslang_tab.cpp" break; - case 388: /* type_specifier_nonarray: TEXTURE2D */ -#line 2748 "MachineIndependent/glslang.y" + case 393: /* type_specifier_nonarray: TEXTURE2D */ +#line 2734 "MachineIndependent/glslang.y" { (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.setTexture(EbtFloat, Esd2D); } -#line 9267 "MachineIndependent/glslang_tab.cpp" +#line 9363 "MachineIndependent/glslang_tab.cpp" break; - case 389: /* type_specifier_nonarray: TEXTURE3D */ -#line 2753 "MachineIndependent/glslang.y" + case 394: /* type_specifier_nonarray: TEXTURE3D */ +#line 2739 "MachineIndependent/glslang.y" { (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.setTexture(EbtFloat, Esd3D); } -#line 9277 "MachineIndependent/glslang_tab.cpp" +#line 9373 "MachineIndependent/glslang_tab.cpp" break; - case 390: /* type_specifier_nonarray: TEXTURE2DARRAY */ -#line 2758 "MachineIndependent/glslang.y" + case 395: /* type_specifier_nonarray: TEXTURE2DARRAY */ +#line 2744 "MachineIndependent/glslang.y" { (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.setTexture(EbtFloat, Esd2D, true); } -#line 9287 "MachineIndependent/glslang_tab.cpp" +#line 9383 "MachineIndependent/glslang_tab.cpp" break; - case 391: /* type_specifier_nonarray: TEXTURECUBE */ -#line 2763 "MachineIndependent/glslang.y" + case 396: /* type_specifier_nonarray: TEXTURECUBE */ +#line 2749 "MachineIndependent/glslang.y" { (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.setTexture(EbtFloat, EsdCube); } -#line 9297 "MachineIndependent/glslang_tab.cpp" +#line 9393 "MachineIndependent/glslang_tab.cpp" break; - case 392: /* type_specifier_nonarray: ITEXTURE2D */ -#line 2768 "MachineIndependent/glslang.y" + case 397: /* type_specifier_nonarray: ITEXTURE2D */ +#line 2754 "MachineIndependent/glslang.y" { (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.setTexture(EbtInt, Esd2D); } -#line 9307 "MachineIndependent/glslang_tab.cpp" +#line 9403 "MachineIndependent/glslang_tab.cpp" break; - case 393: /* type_specifier_nonarray: ITEXTURE3D */ -#line 2773 "MachineIndependent/glslang.y" + case 398: /* type_specifier_nonarray: ITEXTURE3D */ +#line 2759 "MachineIndependent/glslang.y" { (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.setTexture(EbtInt, Esd3D); } -#line 9317 "MachineIndependent/glslang_tab.cpp" +#line 9413 "MachineIndependent/glslang_tab.cpp" break; - case 394: /* type_specifier_nonarray: ITEXTURECUBE */ -#line 2778 "MachineIndependent/glslang.y" + case 399: /* type_specifier_nonarray: ITEXTURECUBE */ +#line 2764 "MachineIndependent/glslang.y" { (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.setTexture(EbtInt, EsdCube); } -#line 9327 "MachineIndependent/glslang_tab.cpp" +#line 9423 "MachineIndependent/glslang_tab.cpp" break; - case 395: /* type_specifier_nonarray: ITEXTURE2DARRAY */ -#line 2783 "MachineIndependent/glslang.y" + case 400: /* type_specifier_nonarray: ITEXTURE2DARRAY */ +#line 2769 "MachineIndependent/glslang.y" { (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.setTexture(EbtInt, Esd2D, true); } -#line 9337 "MachineIndependent/glslang_tab.cpp" +#line 9433 "MachineIndependent/glslang_tab.cpp" break; - case 396: /* type_specifier_nonarray: UTEXTURE2D */ -#line 2788 "MachineIndependent/glslang.y" + case 401: /* type_specifier_nonarray: UTEXTURE2D */ +#line 2774 "MachineIndependent/glslang.y" { (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.setTexture(EbtUint, Esd2D); } -#line 9347 "MachineIndependent/glslang_tab.cpp" +#line 9443 "MachineIndependent/glslang_tab.cpp" break; - case 397: /* type_specifier_nonarray: UTEXTURE3D */ -#line 2793 "MachineIndependent/glslang.y" + case 402: /* type_specifier_nonarray: UTEXTURE3D */ +#line 2779 "MachineIndependent/glslang.y" { (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.setTexture(EbtUint, Esd3D); } -#line 9357 "MachineIndependent/glslang_tab.cpp" +#line 9453 "MachineIndependent/glslang_tab.cpp" break; - case 398: /* type_specifier_nonarray: UTEXTURECUBE */ -#line 2798 "MachineIndependent/glslang.y" + case 403: /* type_specifier_nonarray: UTEXTURECUBE */ +#line 2784 "MachineIndependent/glslang.y" { (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.setTexture(EbtUint, EsdCube); } -#line 9367 "MachineIndependent/glslang_tab.cpp" +#line 9463 "MachineIndependent/glslang_tab.cpp" break; - case 399: /* type_specifier_nonarray: UTEXTURE2DARRAY */ -#line 2803 "MachineIndependent/glslang.y" + case 404: /* type_specifier_nonarray: UTEXTURE2DARRAY */ +#line 2789 "MachineIndependent/glslang.y" { (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.setTexture(EbtUint, Esd2D, true); } -#line 9377 "MachineIndependent/glslang_tab.cpp" +#line 9473 "MachineIndependent/glslang_tab.cpp" break; - case 400: /* type_specifier_nonarray: SAMPLER */ -#line 2808 "MachineIndependent/glslang.y" + case 405: /* type_specifier_nonarray: SAMPLER */ +#line 2794 "MachineIndependent/glslang.y" { (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.setPureSampler(false); } -#line 9387 "MachineIndependent/glslang_tab.cpp" +#line 9483 "MachineIndependent/glslang_tab.cpp" break; - case 401: /* type_specifier_nonarray: SAMPLERSHADOW */ -#line 2813 "MachineIndependent/glslang.y" + case 406: /* type_specifier_nonarray: SAMPLERSHADOW */ +#line 2799 "MachineIndependent/glslang.y" { (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.setPureSampler(true); } -#line 9397 "MachineIndependent/glslang_tab.cpp" +#line 9493 "MachineIndependent/glslang_tab.cpp" break; - case 402: /* type_specifier_nonarray: SAMPLER2DRECT */ -#line 2819 "MachineIndependent/glslang.y" + case 407: /* type_specifier_nonarray: SAMPLER2DRECT */ +#line 2804 "MachineIndependent/glslang.y" { (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.set(EbtFloat, EsdRect); } -#line 9407 "MachineIndependent/glslang_tab.cpp" +#line 9503 "MachineIndependent/glslang_tab.cpp" break; - case 403: /* type_specifier_nonarray: SAMPLER2DRECTSHADOW */ -#line 2824 "MachineIndependent/glslang.y" + case 408: /* type_specifier_nonarray: SAMPLER2DRECTSHADOW */ +#line 2809 "MachineIndependent/glslang.y" { (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.set(EbtFloat, EsdRect, false, true); } -#line 9417 "MachineIndependent/glslang_tab.cpp" +#line 9513 "MachineIndependent/glslang_tab.cpp" break; - case 404: /* type_specifier_nonarray: F16SAMPLER2DRECT */ -#line 2829 "MachineIndependent/glslang.y" + case 409: /* type_specifier_nonarray: F16SAMPLER2DRECT */ +#line 2814 "MachineIndependent/glslang.y" { parseContext.float16OpaqueCheck((yyvsp[0].lex).loc, "half float sampler", parseContext.symbolTable.atBuiltInLevel()); (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.set(EbtFloat16, EsdRect); } -#line 9428 "MachineIndependent/glslang_tab.cpp" +#line 9524 "MachineIndependent/glslang_tab.cpp" break; - case 405: /* type_specifier_nonarray: F16SAMPLER2DRECTSHADOW */ -#line 2835 "MachineIndependent/glslang.y" + case 410: /* type_specifier_nonarray: F16SAMPLER2DRECTSHADOW */ +#line 2820 "MachineIndependent/glslang.y" { parseContext.float16OpaqueCheck((yyvsp[0].lex).loc, "half float sampler", parseContext.symbolTable.atBuiltInLevel()); (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.set(EbtFloat16, EsdRect, false, true); } -#line 9439 "MachineIndependent/glslang_tab.cpp" +#line 9535 "MachineIndependent/glslang_tab.cpp" break; - case 406: /* type_specifier_nonarray: ISAMPLER2DRECT */ -#line 2841 "MachineIndependent/glslang.y" + case 411: /* type_specifier_nonarray: ISAMPLER2DRECT */ +#line 2826 "MachineIndependent/glslang.y" { (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.set(EbtInt, EsdRect); } -#line 9449 "MachineIndependent/glslang_tab.cpp" +#line 9545 "MachineIndependent/glslang_tab.cpp" break; - case 407: /* type_specifier_nonarray: USAMPLER2DRECT */ -#line 2846 "MachineIndependent/glslang.y" + case 412: /* type_specifier_nonarray: USAMPLER2DRECT */ +#line 2831 "MachineIndependent/glslang.y" { (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.set(EbtUint, EsdRect); } -#line 9459 "MachineIndependent/glslang_tab.cpp" +#line 9555 "MachineIndependent/glslang_tab.cpp" break; - case 408: /* type_specifier_nonarray: SAMPLERBUFFER */ -#line 2851 "MachineIndependent/glslang.y" + case 413: /* type_specifier_nonarray: SAMPLERBUFFER */ +#line 2836 "MachineIndependent/glslang.y" { (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.set(EbtFloat, EsdBuffer); } -#line 9469 "MachineIndependent/glslang_tab.cpp" +#line 9565 "MachineIndependent/glslang_tab.cpp" break; - case 409: /* type_specifier_nonarray: F16SAMPLERBUFFER */ -#line 2856 "MachineIndependent/glslang.y" + case 414: /* type_specifier_nonarray: F16SAMPLERBUFFER */ +#line 2841 "MachineIndependent/glslang.y" { parseContext.float16OpaqueCheck((yyvsp[0].lex).loc, "half float sampler", parseContext.symbolTable.atBuiltInLevel()); (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.set(EbtFloat16, EsdBuffer); } -#line 9480 "MachineIndependent/glslang_tab.cpp" +#line 9576 "MachineIndependent/glslang_tab.cpp" break; - case 410: /* type_specifier_nonarray: ISAMPLERBUFFER */ -#line 2862 "MachineIndependent/glslang.y" + case 415: /* type_specifier_nonarray: ISAMPLERBUFFER */ +#line 2847 "MachineIndependent/glslang.y" { (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.set(EbtInt, EsdBuffer); } -#line 9490 "MachineIndependent/glslang_tab.cpp" +#line 9586 "MachineIndependent/glslang_tab.cpp" break; - case 411: /* type_specifier_nonarray: USAMPLERBUFFER */ -#line 2867 "MachineIndependent/glslang.y" + case 416: /* type_specifier_nonarray: USAMPLERBUFFER */ +#line 2852 "MachineIndependent/glslang.y" { (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.set(EbtUint, EsdBuffer); } -#line 9500 "MachineIndependent/glslang_tab.cpp" +#line 9596 "MachineIndependent/glslang_tab.cpp" break; - case 412: /* type_specifier_nonarray: SAMPLER2DMS */ -#line 2872 "MachineIndependent/glslang.y" + case 417: /* type_specifier_nonarray: SAMPLER2DMS */ +#line 2857 "MachineIndependent/glslang.y" { (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.set(EbtFloat, Esd2D, false, false, true); } -#line 9510 "MachineIndependent/glslang_tab.cpp" +#line 9606 "MachineIndependent/glslang_tab.cpp" break; - case 413: /* type_specifier_nonarray: F16SAMPLER2DMS */ -#line 2877 "MachineIndependent/glslang.y" + case 418: /* type_specifier_nonarray: F16SAMPLER2DMS */ +#line 2862 "MachineIndependent/glslang.y" { parseContext.float16OpaqueCheck((yyvsp[0].lex).loc, "half float sampler", parseContext.symbolTable.atBuiltInLevel()); (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.set(EbtFloat16, Esd2D, false, false, true); } -#line 9521 "MachineIndependent/glslang_tab.cpp" +#line 9617 "MachineIndependent/glslang_tab.cpp" break; - case 414: /* type_specifier_nonarray: ISAMPLER2DMS */ -#line 2883 "MachineIndependent/glslang.y" + case 419: /* type_specifier_nonarray: ISAMPLER2DMS */ +#line 2868 "MachineIndependent/glslang.y" { (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.set(EbtInt, Esd2D, false, false, true); } -#line 9531 "MachineIndependent/glslang_tab.cpp" +#line 9627 "MachineIndependent/glslang_tab.cpp" break; - case 415: /* type_specifier_nonarray: USAMPLER2DMS */ -#line 2888 "MachineIndependent/glslang.y" + case 420: /* type_specifier_nonarray: USAMPLER2DMS */ +#line 2873 "MachineIndependent/glslang.y" { (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.set(EbtUint, Esd2D, false, false, true); } -#line 9541 "MachineIndependent/glslang_tab.cpp" +#line 9637 "MachineIndependent/glslang_tab.cpp" break; - case 416: /* type_specifier_nonarray: SAMPLER2DMSARRAY */ -#line 2893 "MachineIndependent/glslang.y" + case 421: /* type_specifier_nonarray: SAMPLER2DMSARRAY */ +#line 2878 "MachineIndependent/glslang.y" { (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.set(EbtFloat, Esd2D, true, false, true); } -#line 9551 "MachineIndependent/glslang_tab.cpp" +#line 9647 "MachineIndependent/glslang_tab.cpp" break; - case 417: /* type_specifier_nonarray: F16SAMPLER2DMSARRAY */ -#line 2898 "MachineIndependent/glslang.y" + case 422: /* type_specifier_nonarray: F16SAMPLER2DMSARRAY */ +#line 2883 "MachineIndependent/glslang.y" { parseContext.float16OpaqueCheck((yyvsp[0].lex).loc, "half float sampler", parseContext.symbolTable.atBuiltInLevel()); (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.set(EbtFloat16, Esd2D, true, false, true); } -#line 9562 "MachineIndependent/glslang_tab.cpp" +#line 9658 "MachineIndependent/glslang_tab.cpp" break; - case 418: /* type_specifier_nonarray: ISAMPLER2DMSARRAY */ -#line 2904 "MachineIndependent/glslang.y" + case 423: /* type_specifier_nonarray: ISAMPLER2DMSARRAY */ +#line 2889 "MachineIndependent/glslang.y" { (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.set(EbtInt, Esd2D, true, false, true); } -#line 9572 "MachineIndependent/glslang_tab.cpp" +#line 9668 "MachineIndependent/glslang_tab.cpp" break; - case 419: /* type_specifier_nonarray: USAMPLER2DMSARRAY */ -#line 2909 "MachineIndependent/glslang.y" + case 424: /* type_specifier_nonarray: USAMPLER2DMSARRAY */ +#line 2894 "MachineIndependent/glslang.y" { (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.set(EbtUint, Esd2D, true, false, true); } -#line 9582 "MachineIndependent/glslang_tab.cpp" +#line 9678 "MachineIndependent/glslang_tab.cpp" break; - case 420: /* type_specifier_nonarray: TEXTURE1D */ -#line 2914 "MachineIndependent/glslang.y" + case 425: /* type_specifier_nonarray: TEXTURE1D */ +#line 2899 "MachineIndependent/glslang.y" { (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.setTexture(EbtFloat, Esd1D); } -#line 9592 "MachineIndependent/glslang_tab.cpp" +#line 9688 "MachineIndependent/glslang_tab.cpp" break; - case 421: /* type_specifier_nonarray: F16TEXTURE1D */ -#line 2919 "MachineIndependent/glslang.y" + case 426: /* type_specifier_nonarray: F16TEXTURE1D */ +#line 2904 "MachineIndependent/glslang.y" { parseContext.float16OpaqueCheck((yyvsp[0].lex).loc, "half float texture", parseContext.symbolTable.atBuiltInLevel()); (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.setTexture(EbtFloat16, Esd1D); } -#line 9603 "MachineIndependent/glslang_tab.cpp" +#line 9699 "MachineIndependent/glslang_tab.cpp" break; - case 422: /* type_specifier_nonarray: F16TEXTURE2D */ -#line 2925 "MachineIndependent/glslang.y" + case 427: /* type_specifier_nonarray: F16TEXTURE2D */ +#line 2910 "MachineIndependent/glslang.y" { parseContext.float16OpaqueCheck((yyvsp[0].lex).loc, "half float texture", parseContext.symbolTable.atBuiltInLevel()); (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.setTexture(EbtFloat16, Esd2D); } -#line 9614 "MachineIndependent/glslang_tab.cpp" +#line 9710 "MachineIndependent/glslang_tab.cpp" break; - case 423: /* type_specifier_nonarray: F16TEXTURE3D */ -#line 2931 "MachineIndependent/glslang.y" + case 428: /* type_specifier_nonarray: F16TEXTURE3D */ +#line 2916 "MachineIndependent/glslang.y" { parseContext.float16OpaqueCheck((yyvsp[0].lex).loc, "half float texture", parseContext.symbolTable.atBuiltInLevel()); (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.setTexture(EbtFloat16, Esd3D); } -#line 9625 "MachineIndependent/glslang_tab.cpp" +#line 9721 "MachineIndependent/glslang_tab.cpp" break; - case 424: /* type_specifier_nonarray: F16TEXTURECUBE */ -#line 2937 "MachineIndependent/glslang.y" + case 429: /* type_specifier_nonarray: F16TEXTURECUBE */ +#line 2922 "MachineIndependent/glslang.y" { parseContext.float16OpaqueCheck((yyvsp[0].lex).loc, "half float texture", parseContext.symbolTable.atBuiltInLevel()); (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.setTexture(EbtFloat16, EsdCube); } -#line 9636 "MachineIndependent/glslang_tab.cpp" +#line 9732 "MachineIndependent/glslang_tab.cpp" break; - case 425: /* type_specifier_nonarray: TEXTURE1DARRAY */ -#line 2943 "MachineIndependent/glslang.y" + case 430: /* type_specifier_nonarray: TEXTURE1DARRAY */ +#line 2928 "MachineIndependent/glslang.y" { (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.setTexture(EbtFloat, Esd1D, true); } -#line 9646 "MachineIndependent/glslang_tab.cpp" +#line 9742 "MachineIndependent/glslang_tab.cpp" break; - case 426: /* type_specifier_nonarray: F16TEXTURE1DARRAY */ -#line 2948 "MachineIndependent/glslang.y" + case 431: /* type_specifier_nonarray: F16TEXTURE1DARRAY */ +#line 2933 "MachineIndependent/glslang.y" { parseContext.float16OpaqueCheck((yyvsp[0].lex).loc, "half float texture", parseContext.symbolTable.atBuiltInLevel()); (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.setTexture(EbtFloat16, Esd1D, true); } -#line 9657 "MachineIndependent/glslang_tab.cpp" +#line 9753 "MachineIndependent/glslang_tab.cpp" break; - case 427: /* type_specifier_nonarray: F16TEXTURE2DARRAY */ -#line 2954 "MachineIndependent/glslang.y" + case 432: /* type_specifier_nonarray: F16TEXTURE2DARRAY */ +#line 2939 "MachineIndependent/glslang.y" { parseContext.float16OpaqueCheck((yyvsp[0].lex).loc, "half float texture", parseContext.symbolTable.atBuiltInLevel()); (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.setTexture(EbtFloat16, Esd2D, true); } -#line 9668 "MachineIndependent/glslang_tab.cpp" +#line 9764 "MachineIndependent/glslang_tab.cpp" break; - case 428: /* type_specifier_nonarray: F16TEXTURECUBEARRAY */ -#line 2960 "MachineIndependent/glslang.y" + case 433: /* type_specifier_nonarray: F16TEXTURECUBEARRAY */ +#line 2945 "MachineIndependent/glslang.y" { parseContext.float16OpaqueCheck((yyvsp[0].lex).loc, "half float texture", parseContext.symbolTable.atBuiltInLevel()); (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.setTexture(EbtFloat16, EsdCube, true); } -#line 9679 "MachineIndependent/glslang_tab.cpp" +#line 9775 "MachineIndependent/glslang_tab.cpp" break; - case 429: /* type_specifier_nonarray: ITEXTURE1D */ -#line 2966 "MachineIndependent/glslang.y" + case 434: /* type_specifier_nonarray: ITEXTURE1D */ +#line 2951 "MachineIndependent/glslang.y" { (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.setTexture(EbtInt, Esd1D); } -#line 9689 "MachineIndependent/glslang_tab.cpp" +#line 9785 "MachineIndependent/glslang_tab.cpp" break; - case 430: /* type_specifier_nonarray: ITEXTURE1DARRAY */ -#line 2971 "MachineIndependent/glslang.y" + case 435: /* type_specifier_nonarray: ITEXTURE1DARRAY */ +#line 2956 "MachineIndependent/glslang.y" { (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.setTexture(EbtInt, Esd1D, true); } -#line 9699 "MachineIndependent/glslang_tab.cpp" +#line 9795 "MachineIndependent/glslang_tab.cpp" break; - case 431: /* type_specifier_nonarray: UTEXTURE1D */ -#line 2976 "MachineIndependent/glslang.y" + case 436: /* type_specifier_nonarray: UTEXTURE1D */ +#line 2961 "MachineIndependent/glslang.y" { (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.setTexture(EbtUint, Esd1D); } -#line 9709 "MachineIndependent/glslang_tab.cpp" +#line 9805 "MachineIndependent/glslang_tab.cpp" break; - case 432: /* type_specifier_nonarray: UTEXTURE1DARRAY */ -#line 2981 "MachineIndependent/glslang.y" + case 437: /* type_specifier_nonarray: UTEXTURE1DARRAY */ +#line 2966 "MachineIndependent/glslang.y" { (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.setTexture(EbtUint, Esd1D, true); } -#line 9719 "MachineIndependent/glslang_tab.cpp" +#line 9815 "MachineIndependent/glslang_tab.cpp" break; - case 433: /* type_specifier_nonarray: TEXTURE2DRECT */ -#line 2986 "MachineIndependent/glslang.y" + case 438: /* type_specifier_nonarray: TEXTURE2DRECT */ +#line 2971 "MachineIndependent/glslang.y" { (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.setTexture(EbtFloat, EsdRect); } -#line 9729 "MachineIndependent/glslang_tab.cpp" +#line 9825 "MachineIndependent/glslang_tab.cpp" break; - case 434: /* type_specifier_nonarray: F16TEXTURE2DRECT */ -#line 2991 "MachineIndependent/glslang.y" + case 439: /* type_specifier_nonarray: F16TEXTURE2DRECT */ +#line 2976 "MachineIndependent/glslang.y" { parseContext.float16OpaqueCheck((yyvsp[0].lex).loc, "half float texture", parseContext.symbolTable.atBuiltInLevel()); (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.setTexture(EbtFloat16, EsdRect); } -#line 9740 "MachineIndependent/glslang_tab.cpp" +#line 9836 "MachineIndependent/glslang_tab.cpp" break; - case 435: /* type_specifier_nonarray: ITEXTURE2DRECT */ -#line 2997 "MachineIndependent/glslang.y" + case 440: /* type_specifier_nonarray: ITEXTURE2DRECT */ +#line 2982 "MachineIndependent/glslang.y" { (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.setTexture(EbtInt, EsdRect); } -#line 9750 "MachineIndependent/glslang_tab.cpp" +#line 9846 "MachineIndependent/glslang_tab.cpp" break; - case 436: /* type_specifier_nonarray: UTEXTURE2DRECT */ -#line 3002 "MachineIndependent/glslang.y" + case 441: /* type_specifier_nonarray: UTEXTURE2DRECT */ +#line 2987 "MachineIndependent/glslang.y" { (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.setTexture(EbtUint, EsdRect); } -#line 9760 "MachineIndependent/glslang_tab.cpp" +#line 9856 "MachineIndependent/glslang_tab.cpp" break; - case 437: /* type_specifier_nonarray: TEXTUREBUFFER */ -#line 3007 "MachineIndependent/glslang.y" + case 442: /* type_specifier_nonarray: TEXTUREBUFFER */ +#line 2992 "MachineIndependent/glslang.y" { (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.setTexture(EbtFloat, EsdBuffer); } -#line 9770 "MachineIndependent/glslang_tab.cpp" +#line 9866 "MachineIndependent/glslang_tab.cpp" break; - case 438: /* type_specifier_nonarray: F16TEXTUREBUFFER */ -#line 3012 "MachineIndependent/glslang.y" + case 443: /* type_specifier_nonarray: F16TEXTUREBUFFER */ +#line 2997 "MachineIndependent/glslang.y" { parseContext.float16OpaqueCheck((yyvsp[0].lex).loc, "half float texture", parseContext.symbolTable.atBuiltInLevel()); (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.setTexture(EbtFloat16, EsdBuffer); } -#line 9781 "MachineIndependent/glslang_tab.cpp" +#line 9877 "MachineIndependent/glslang_tab.cpp" break; - case 439: /* type_specifier_nonarray: ITEXTUREBUFFER */ -#line 3018 "MachineIndependent/glslang.y" + case 444: /* type_specifier_nonarray: ITEXTUREBUFFER */ +#line 3003 "MachineIndependent/glslang.y" { (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.setTexture(EbtInt, EsdBuffer); } -#line 9791 "MachineIndependent/glslang_tab.cpp" +#line 9887 "MachineIndependent/glslang_tab.cpp" break; - case 440: /* type_specifier_nonarray: UTEXTUREBUFFER */ -#line 3023 "MachineIndependent/glslang.y" + case 445: /* type_specifier_nonarray: UTEXTUREBUFFER */ +#line 3008 "MachineIndependent/glslang.y" { (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.setTexture(EbtUint, EsdBuffer); } -#line 9801 "MachineIndependent/glslang_tab.cpp" +#line 9897 "MachineIndependent/glslang_tab.cpp" break; - case 441: /* type_specifier_nonarray: TEXTURE2DMS */ -#line 3028 "MachineIndependent/glslang.y" + case 446: /* type_specifier_nonarray: TEXTURE2DMS */ +#line 3013 "MachineIndependent/glslang.y" { (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.setTexture(EbtFloat, Esd2D, false, false, true); } -#line 9811 "MachineIndependent/glslang_tab.cpp" +#line 9907 "MachineIndependent/glslang_tab.cpp" break; - case 442: /* type_specifier_nonarray: F16TEXTURE2DMS */ -#line 3033 "MachineIndependent/glslang.y" + case 447: /* type_specifier_nonarray: F16TEXTURE2DMS */ +#line 3018 "MachineIndependent/glslang.y" { parseContext.float16OpaqueCheck((yyvsp[0].lex).loc, "half float texture", parseContext.symbolTable.atBuiltInLevel()); (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.setTexture(EbtFloat16, Esd2D, false, false, true); } -#line 9822 "MachineIndependent/glslang_tab.cpp" +#line 9918 "MachineIndependent/glslang_tab.cpp" break; - case 443: /* type_specifier_nonarray: ITEXTURE2DMS */ -#line 3039 "MachineIndependent/glslang.y" + case 448: /* type_specifier_nonarray: ITEXTURE2DMS */ +#line 3024 "MachineIndependent/glslang.y" { (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.setTexture(EbtInt, Esd2D, false, false, true); } -#line 9832 "MachineIndependent/glslang_tab.cpp" +#line 9928 "MachineIndependent/glslang_tab.cpp" break; - case 444: /* type_specifier_nonarray: UTEXTURE2DMS */ -#line 3044 "MachineIndependent/glslang.y" + case 449: /* type_specifier_nonarray: UTEXTURE2DMS */ +#line 3029 "MachineIndependent/glslang.y" { (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.setTexture(EbtUint, Esd2D, false, false, true); } -#line 9842 "MachineIndependent/glslang_tab.cpp" +#line 9938 "MachineIndependent/glslang_tab.cpp" break; - case 445: /* type_specifier_nonarray: TEXTURE2DMSARRAY */ -#line 3049 "MachineIndependent/glslang.y" + case 450: /* type_specifier_nonarray: TEXTURE2DMSARRAY */ +#line 3034 "MachineIndependent/glslang.y" { (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.setTexture(EbtFloat, Esd2D, true, false, true); } -#line 9852 "MachineIndependent/glslang_tab.cpp" +#line 9948 "MachineIndependent/glslang_tab.cpp" break; - case 446: /* type_specifier_nonarray: F16TEXTURE2DMSARRAY */ -#line 3054 "MachineIndependent/glslang.y" + case 451: /* type_specifier_nonarray: F16TEXTURE2DMSARRAY */ +#line 3039 "MachineIndependent/glslang.y" { parseContext.float16OpaqueCheck((yyvsp[0].lex).loc, "half float texture", parseContext.symbolTable.atBuiltInLevel()); (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.setTexture(EbtFloat16, Esd2D, true, false, true); } -#line 9863 "MachineIndependent/glslang_tab.cpp" +#line 9959 "MachineIndependent/glslang_tab.cpp" break; - case 447: /* type_specifier_nonarray: ITEXTURE2DMSARRAY */ -#line 3060 "MachineIndependent/glslang.y" + case 452: /* type_specifier_nonarray: ITEXTURE2DMSARRAY */ +#line 3045 "MachineIndependent/glslang.y" { (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.setTexture(EbtInt, Esd2D, true, false, true); } -#line 9873 "MachineIndependent/glslang_tab.cpp" +#line 9969 "MachineIndependent/glslang_tab.cpp" break; - case 448: /* type_specifier_nonarray: UTEXTURE2DMSARRAY */ -#line 3065 "MachineIndependent/glslang.y" + case 453: /* type_specifier_nonarray: UTEXTURE2DMSARRAY */ +#line 3050 "MachineIndependent/glslang.y" { (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.setTexture(EbtUint, Esd2D, true, false, true); } -#line 9883 "MachineIndependent/glslang_tab.cpp" +#line 9979 "MachineIndependent/glslang_tab.cpp" break; - case 449: /* type_specifier_nonarray: IMAGE1D */ -#line 3070 "MachineIndependent/glslang.y" + case 454: /* type_specifier_nonarray: IMAGE1D */ +#line 3055 "MachineIndependent/glslang.y" { (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.setImage(EbtFloat, Esd1D); } -#line 9893 "MachineIndependent/glslang_tab.cpp" +#line 9989 "MachineIndependent/glslang_tab.cpp" break; - case 450: /* type_specifier_nonarray: F16IMAGE1D */ -#line 3075 "MachineIndependent/glslang.y" + case 455: /* type_specifier_nonarray: F16IMAGE1D */ +#line 3060 "MachineIndependent/glslang.y" { parseContext.float16OpaqueCheck((yyvsp[0].lex).loc, "half float image", parseContext.symbolTable.atBuiltInLevel()); (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.setImage(EbtFloat16, Esd1D); } -#line 9904 "MachineIndependent/glslang_tab.cpp" +#line 10000 "MachineIndependent/glslang_tab.cpp" break; - case 451: /* type_specifier_nonarray: IIMAGE1D */ -#line 3081 "MachineIndependent/glslang.y" + case 456: /* type_specifier_nonarray: IIMAGE1D */ +#line 3066 "MachineIndependent/glslang.y" { (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.setImage(EbtInt, Esd1D); } -#line 9914 "MachineIndependent/glslang_tab.cpp" +#line 10010 "MachineIndependent/glslang_tab.cpp" break; - case 452: /* type_specifier_nonarray: UIMAGE1D */ -#line 3086 "MachineIndependent/glslang.y" + case 457: /* type_specifier_nonarray: UIMAGE1D */ +#line 3071 "MachineIndependent/glslang.y" { (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.setImage(EbtUint, Esd1D); } -#line 9924 "MachineIndependent/glslang_tab.cpp" +#line 10020 "MachineIndependent/glslang_tab.cpp" break; - case 453: /* type_specifier_nonarray: IMAGE2D */ -#line 3091 "MachineIndependent/glslang.y" + case 458: /* type_specifier_nonarray: IMAGE2D */ +#line 3076 "MachineIndependent/glslang.y" { (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.setImage(EbtFloat, Esd2D); } -#line 9934 "MachineIndependent/glslang_tab.cpp" +#line 10030 "MachineIndependent/glslang_tab.cpp" break; - case 454: /* type_specifier_nonarray: F16IMAGE2D */ -#line 3096 "MachineIndependent/glslang.y" + case 459: /* type_specifier_nonarray: F16IMAGE2D */ +#line 3081 "MachineIndependent/glslang.y" { parseContext.float16OpaqueCheck((yyvsp[0].lex).loc, "half float image", parseContext.symbolTable.atBuiltInLevel()); (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.setImage(EbtFloat16, Esd2D); } -#line 9945 "MachineIndependent/glslang_tab.cpp" +#line 10041 "MachineIndependent/glslang_tab.cpp" break; - case 455: /* type_specifier_nonarray: IIMAGE2D */ -#line 3102 "MachineIndependent/glslang.y" + case 460: /* type_specifier_nonarray: IIMAGE2D */ +#line 3087 "MachineIndependent/glslang.y" { (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.setImage(EbtInt, Esd2D); } -#line 9955 "MachineIndependent/glslang_tab.cpp" +#line 10051 "MachineIndependent/glslang_tab.cpp" break; - case 456: /* type_specifier_nonarray: UIMAGE2D */ -#line 3107 "MachineIndependent/glslang.y" + case 461: /* type_specifier_nonarray: UIMAGE2D */ +#line 3092 "MachineIndependent/glslang.y" { (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.setImage(EbtUint, Esd2D); } -#line 9965 "MachineIndependent/glslang_tab.cpp" +#line 10061 "MachineIndependent/glslang_tab.cpp" break; - case 457: /* type_specifier_nonarray: IMAGE3D */ -#line 3112 "MachineIndependent/glslang.y" + case 462: /* type_specifier_nonarray: IMAGE3D */ +#line 3097 "MachineIndependent/glslang.y" { (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.setImage(EbtFloat, Esd3D); } -#line 9975 "MachineIndependent/glslang_tab.cpp" +#line 10071 "MachineIndependent/glslang_tab.cpp" break; - case 458: /* type_specifier_nonarray: F16IMAGE3D */ -#line 3117 "MachineIndependent/glslang.y" + case 463: /* type_specifier_nonarray: F16IMAGE3D */ +#line 3102 "MachineIndependent/glslang.y" { parseContext.float16OpaqueCheck((yyvsp[0].lex).loc, "half float image", parseContext.symbolTable.atBuiltInLevel()); (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.setImage(EbtFloat16, Esd3D); } -#line 9986 "MachineIndependent/glslang_tab.cpp" +#line 10082 "MachineIndependent/glslang_tab.cpp" break; - case 459: /* type_specifier_nonarray: IIMAGE3D */ -#line 3123 "MachineIndependent/glslang.y" + case 464: /* type_specifier_nonarray: IIMAGE3D */ +#line 3108 "MachineIndependent/glslang.y" { (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.setImage(EbtInt, Esd3D); } -#line 9996 "MachineIndependent/glslang_tab.cpp" +#line 10092 "MachineIndependent/glslang_tab.cpp" break; - case 460: /* type_specifier_nonarray: UIMAGE3D */ -#line 3128 "MachineIndependent/glslang.y" + case 465: /* type_specifier_nonarray: UIMAGE3D */ +#line 3113 "MachineIndependent/glslang.y" { (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.setImage(EbtUint, Esd3D); } -#line 10006 "MachineIndependent/glslang_tab.cpp" +#line 10102 "MachineIndependent/glslang_tab.cpp" break; - case 461: /* type_specifier_nonarray: IMAGE2DRECT */ -#line 3133 "MachineIndependent/glslang.y" + case 466: /* type_specifier_nonarray: IMAGE2DRECT */ +#line 3118 "MachineIndependent/glslang.y" { (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.setImage(EbtFloat, EsdRect); } -#line 10016 "MachineIndependent/glslang_tab.cpp" +#line 10112 "MachineIndependent/glslang_tab.cpp" break; - case 462: /* type_specifier_nonarray: F16IMAGE2DRECT */ -#line 3138 "MachineIndependent/glslang.y" + case 467: /* type_specifier_nonarray: F16IMAGE2DRECT */ +#line 3123 "MachineIndependent/glslang.y" { parseContext.float16OpaqueCheck((yyvsp[0].lex).loc, "half float image", parseContext.symbolTable.atBuiltInLevel()); (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.setImage(EbtFloat16, EsdRect); } -#line 10027 "MachineIndependent/glslang_tab.cpp" +#line 10123 "MachineIndependent/glslang_tab.cpp" break; - case 463: /* type_specifier_nonarray: IIMAGE2DRECT */ -#line 3144 "MachineIndependent/glslang.y" + case 468: /* type_specifier_nonarray: IIMAGE2DRECT */ +#line 3129 "MachineIndependent/glslang.y" { (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.setImage(EbtInt, EsdRect); } -#line 10037 "MachineIndependent/glslang_tab.cpp" +#line 10133 "MachineIndependent/glslang_tab.cpp" break; - case 464: /* type_specifier_nonarray: UIMAGE2DRECT */ -#line 3149 "MachineIndependent/glslang.y" + case 469: /* type_specifier_nonarray: UIMAGE2DRECT */ +#line 3134 "MachineIndependent/glslang.y" { (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.setImage(EbtUint, EsdRect); } -#line 10047 "MachineIndependent/glslang_tab.cpp" +#line 10143 "MachineIndependent/glslang_tab.cpp" break; - case 465: /* type_specifier_nonarray: IMAGECUBE */ -#line 3154 "MachineIndependent/glslang.y" + case 470: /* type_specifier_nonarray: IMAGECUBE */ +#line 3139 "MachineIndependent/glslang.y" { (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.setImage(EbtFloat, EsdCube); } -#line 10057 "MachineIndependent/glslang_tab.cpp" +#line 10153 "MachineIndependent/glslang_tab.cpp" break; - case 466: /* type_specifier_nonarray: F16IMAGECUBE */ -#line 3159 "MachineIndependent/glslang.y" + case 471: /* type_specifier_nonarray: F16IMAGECUBE */ +#line 3144 "MachineIndependent/glslang.y" { parseContext.float16OpaqueCheck((yyvsp[0].lex).loc, "half float image", parseContext.symbolTable.atBuiltInLevel()); (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.setImage(EbtFloat16, EsdCube); } -#line 10068 "MachineIndependent/glslang_tab.cpp" +#line 10164 "MachineIndependent/glslang_tab.cpp" break; - case 467: /* type_specifier_nonarray: IIMAGECUBE */ -#line 3165 "MachineIndependent/glslang.y" + case 472: /* type_specifier_nonarray: IIMAGECUBE */ +#line 3150 "MachineIndependent/glslang.y" { (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.setImage(EbtInt, EsdCube); } -#line 10078 "MachineIndependent/glslang_tab.cpp" +#line 10174 "MachineIndependent/glslang_tab.cpp" break; - case 468: /* type_specifier_nonarray: UIMAGECUBE */ -#line 3170 "MachineIndependent/glslang.y" + case 473: /* type_specifier_nonarray: UIMAGECUBE */ +#line 3155 "MachineIndependent/glslang.y" { (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.setImage(EbtUint, EsdCube); } -#line 10088 "MachineIndependent/glslang_tab.cpp" +#line 10184 "MachineIndependent/glslang_tab.cpp" break; - case 469: /* type_specifier_nonarray: IMAGEBUFFER */ -#line 3175 "MachineIndependent/glslang.y" + case 474: /* type_specifier_nonarray: IMAGEBUFFER */ +#line 3160 "MachineIndependent/glslang.y" { (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.setImage(EbtFloat, EsdBuffer); } -#line 10098 "MachineIndependent/glslang_tab.cpp" +#line 10194 "MachineIndependent/glslang_tab.cpp" break; - case 470: /* type_specifier_nonarray: F16IMAGEBUFFER */ -#line 3180 "MachineIndependent/glslang.y" + case 475: /* type_specifier_nonarray: F16IMAGEBUFFER */ +#line 3165 "MachineIndependent/glslang.y" { parseContext.float16OpaqueCheck((yyvsp[0].lex).loc, "half float image", parseContext.symbolTable.atBuiltInLevel()); (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.setImage(EbtFloat16, EsdBuffer); } -#line 10109 "MachineIndependent/glslang_tab.cpp" +#line 10205 "MachineIndependent/glslang_tab.cpp" break; - case 471: /* type_specifier_nonarray: IIMAGEBUFFER */ -#line 3186 "MachineIndependent/glslang.y" + case 476: /* type_specifier_nonarray: IIMAGEBUFFER */ +#line 3171 "MachineIndependent/glslang.y" { (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.setImage(EbtInt, EsdBuffer); } -#line 10119 "MachineIndependent/glslang_tab.cpp" +#line 10215 "MachineIndependent/glslang_tab.cpp" break; - case 472: /* type_specifier_nonarray: UIMAGEBUFFER */ -#line 3191 "MachineIndependent/glslang.y" + case 477: /* type_specifier_nonarray: UIMAGEBUFFER */ +#line 3176 "MachineIndependent/glslang.y" { (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.setImage(EbtUint, EsdBuffer); } -#line 10129 "MachineIndependent/glslang_tab.cpp" +#line 10225 "MachineIndependent/glslang_tab.cpp" break; - case 473: /* type_specifier_nonarray: IMAGE1DARRAY */ -#line 3196 "MachineIndependent/glslang.y" + case 478: /* type_specifier_nonarray: IMAGE1DARRAY */ +#line 3181 "MachineIndependent/glslang.y" { (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.setImage(EbtFloat, Esd1D, true); } -#line 10139 "MachineIndependent/glslang_tab.cpp" +#line 10235 "MachineIndependent/glslang_tab.cpp" break; - case 474: /* type_specifier_nonarray: F16IMAGE1DARRAY */ -#line 3201 "MachineIndependent/glslang.y" + case 479: /* type_specifier_nonarray: F16IMAGE1DARRAY */ +#line 3186 "MachineIndependent/glslang.y" { parseContext.float16OpaqueCheck((yyvsp[0].lex).loc, "half float image", parseContext.symbolTable.atBuiltInLevel()); (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.setImage(EbtFloat16, Esd1D, true); } -#line 10150 "MachineIndependent/glslang_tab.cpp" +#line 10246 "MachineIndependent/glslang_tab.cpp" break; - case 475: /* type_specifier_nonarray: IIMAGE1DARRAY */ -#line 3207 "MachineIndependent/glslang.y" + case 480: /* type_specifier_nonarray: IIMAGE1DARRAY */ +#line 3192 "MachineIndependent/glslang.y" { (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.setImage(EbtInt, Esd1D, true); } -#line 10160 "MachineIndependent/glslang_tab.cpp" +#line 10256 "MachineIndependent/glslang_tab.cpp" break; - case 476: /* type_specifier_nonarray: UIMAGE1DARRAY */ -#line 3212 "MachineIndependent/glslang.y" + case 481: /* type_specifier_nonarray: UIMAGE1DARRAY */ +#line 3197 "MachineIndependent/glslang.y" { (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.setImage(EbtUint, Esd1D, true); } -#line 10170 "MachineIndependent/glslang_tab.cpp" +#line 10266 "MachineIndependent/glslang_tab.cpp" break; - case 477: /* type_specifier_nonarray: IMAGE2DARRAY */ -#line 3217 "MachineIndependent/glslang.y" + case 482: /* type_specifier_nonarray: IMAGE2DARRAY */ +#line 3202 "MachineIndependent/glslang.y" { (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.setImage(EbtFloat, Esd2D, true); } -#line 10180 "MachineIndependent/glslang_tab.cpp" +#line 10276 "MachineIndependent/glslang_tab.cpp" break; - case 478: /* type_specifier_nonarray: F16IMAGE2DARRAY */ -#line 3222 "MachineIndependent/glslang.y" + case 483: /* type_specifier_nonarray: F16IMAGE2DARRAY */ +#line 3207 "MachineIndependent/glslang.y" { parseContext.float16OpaqueCheck((yyvsp[0].lex).loc, "half float image", parseContext.symbolTable.atBuiltInLevel()); (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.setImage(EbtFloat16, Esd2D, true); } -#line 10191 "MachineIndependent/glslang_tab.cpp" +#line 10287 "MachineIndependent/glslang_tab.cpp" break; - case 479: /* type_specifier_nonarray: IIMAGE2DARRAY */ -#line 3228 "MachineIndependent/glslang.y" + case 484: /* type_specifier_nonarray: IIMAGE2DARRAY */ +#line 3213 "MachineIndependent/glslang.y" { (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.setImage(EbtInt, Esd2D, true); } -#line 10201 "MachineIndependent/glslang_tab.cpp" +#line 10297 "MachineIndependent/glslang_tab.cpp" break; - case 480: /* type_specifier_nonarray: UIMAGE2DARRAY */ -#line 3233 "MachineIndependent/glslang.y" + case 485: /* type_specifier_nonarray: UIMAGE2DARRAY */ +#line 3218 "MachineIndependent/glslang.y" { (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.setImage(EbtUint, Esd2D, true); } -#line 10211 "MachineIndependent/glslang_tab.cpp" +#line 10307 "MachineIndependent/glslang_tab.cpp" break; - case 481: /* type_specifier_nonarray: IMAGECUBEARRAY */ -#line 3238 "MachineIndependent/glslang.y" + case 486: /* type_specifier_nonarray: IMAGECUBEARRAY */ +#line 3223 "MachineIndependent/glslang.y" { (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.setImage(EbtFloat, EsdCube, true); } -#line 10221 "MachineIndependent/glslang_tab.cpp" +#line 10317 "MachineIndependent/glslang_tab.cpp" break; - case 482: /* type_specifier_nonarray: F16IMAGECUBEARRAY */ -#line 3243 "MachineIndependent/glslang.y" + case 487: /* type_specifier_nonarray: F16IMAGECUBEARRAY */ +#line 3228 "MachineIndependent/glslang.y" { parseContext.float16OpaqueCheck((yyvsp[0].lex).loc, "half float image", parseContext.symbolTable.atBuiltInLevel()); (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.setImage(EbtFloat16, EsdCube, true); } -#line 10232 "MachineIndependent/glslang_tab.cpp" +#line 10328 "MachineIndependent/glslang_tab.cpp" break; - case 483: /* type_specifier_nonarray: IIMAGECUBEARRAY */ -#line 3249 "MachineIndependent/glslang.y" + case 488: /* type_specifier_nonarray: IIMAGECUBEARRAY */ +#line 3234 "MachineIndependent/glslang.y" { (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.setImage(EbtInt, EsdCube, true); } -#line 10242 "MachineIndependent/glslang_tab.cpp" +#line 10338 "MachineIndependent/glslang_tab.cpp" break; - case 484: /* type_specifier_nonarray: UIMAGECUBEARRAY */ -#line 3254 "MachineIndependent/glslang.y" + case 489: /* type_specifier_nonarray: UIMAGECUBEARRAY */ +#line 3239 "MachineIndependent/glslang.y" { (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.setImage(EbtUint, EsdCube, true); } -#line 10252 "MachineIndependent/glslang_tab.cpp" +#line 10348 "MachineIndependent/glslang_tab.cpp" break; - case 485: /* type_specifier_nonarray: IMAGE2DMS */ -#line 3259 "MachineIndependent/glslang.y" + case 490: /* type_specifier_nonarray: IMAGE2DMS */ +#line 3244 "MachineIndependent/glslang.y" { (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.setImage(EbtFloat, Esd2D, false, false, true); } -#line 10262 "MachineIndependent/glslang_tab.cpp" +#line 10358 "MachineIndependent/glslang_tab.cpp" break; - case 486: /* type_specifier_nonarray: F16IMAGE2DMS */ -#line 3264 "MachineIndependent/glslang.y" + case 491: /* type_specifier_nonarray: F16IMAGE2DMS */ +#line 3249 "MachineIndependent/glslang.y" { parseContext.float16OpaqueCheck((yyvsp[0].lex).loc, "half float image", parseContext.symbolTable.atBuiltInLevel()); (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.setImage(EbtFloat16, Esd2D, false, false, true); } -#line 10273 "MachineIndependent/glslang_tab.cpp" +#line 10369 "MachineIndependent/glslang_tab.cpp" break; - case 487: /* type_specifier_nonarray: IIMAGE2DMS */ -#line 3270 "MachineIndependent/glslang.y" + case 492: /* type_specifier_nonarray: IIMAGE2DMS */ +#line 3255 "MachineIndependent/glslang.y" { (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.setImage(EbtInt, Esd2D, false, false, true); } -#line 10283 "MachineIndependent/glslang_tab.cpp" +#line 10379 "MachineIndependent/glslang_tab.cpp" break; - case 488: /* type_specifier_nonarray: UIMAGE2DMS */ -#line 3275 "MachineIndependent/glslang.y" + case 493: /* type_specifier_nonarray: UIMAGE2DMS */ +#line 3260 "MachineIndependent/glslang.y" { (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.setImage(EbtUint, Esd2D, false, false, true); } -#line 10293 "MachineIndependent/glslang_tab.cpp" +#line 10389 "MachineIndependent/glslang_tab.cpp" break; - case 489: /* type_specifier_nonarray: IMAGE2DMSARRAY */ -#line 3280 "MachineIndependent/glslang.y" + case 494: /* type_specifier_nonarray: IMAGE2DMSARRAY */ +#line 3265 "MachineIndependent/glslang.y" { (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.setImage(EbtFloat, Esd2D, true, false, true); } -#line 10303 "MachineIndependent/glslang_tab.cpp" +#line 10399 "MachineIndependent/glslang_tab.cpp" break; - case 490: /* type_specifier_nonarray: F16IMAGE2DMSARRAY */ -#line 3285 "MachineIndependent/glslang.y" + case 495: /* type_specifier_nonarray: F16IMAGE2DMSARRAY */ +#line 3270 "MachineIndependent/glslang.y" { parseContext.float16OpaqueCheck((yyvsp[0].lex).loc, "half float image", parseContext.symbolTable.atBuiltInLevel()); (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.setImage(EbtFloat16, Esd2D, true, false, true); } -#line 10314 "MachineIndependent/glslang_tab.cpp" +#line 10410 "MachineIndependent/glslang_tab.cpp" break; - case 491: /* type_specifier_nonarray: IIMAGE2DMSARRAY */ -#line 3291 "MachineIndependent/glslang.y" + case 496: /* type_specifier_nonarray: IIMAGE2DMSARRAY */ +#line 3276 "MachineIndependent/glslang.y" { (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.setImage(EbtInt, Esd2D, true, false, true); } -#line 10324 "MachineIndependent/glslang_tab.cpp" +#line 10420 "MachineIndependent/glslang_tab.cpp" break; - case 492: /* type_specifier_nonarray: UIMAGE2DMSARRAY */ -#line 3296 "MachineIndependent/glslang.y" + case 497: /* type_specifier_nonarray: UIMAGE2DMSARRAY */ +#line 3281 "MachineIndependent/glslang.y" { (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.setImage(EbtUint, Esd2D, true, false, true); } -#line 10334 "MachineIndependent/glslang_tab.cpp" +#line 10430 "MachineIndependent/glslang_tab.cpp" break; - case 493: /* type_specifier_nonarray: I64IMAGE1D */ -#line 3301 "MachineIndependent/glslang.y" + case 498: /* type_specifier_nonarray: I64IMAGE1D */ +#line 3286 "MachineIndependent/glslang.y" { (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.setImage(EbtInt64, Esd1D); } -#line 10344 "MachineIndependent/glslang_tab.cpp" +#line 10440 "MachineIndependent/glslang_tab.cpp" break; - case 494: /* type_specifier_nonarray: U64IMAGE1D */ -#line 3306 "MachineIndependent/glslang.y" + case 499: /* type_specifier_nonarray: U64IMAGE1D */ +#line 3291 "MachineIndependent/glslang.y" { (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.setImage(EbtUint64, Esd1D); } -#line 10354 "MachineIndependent/glslang_tab.cpp" +#line 10450 "MachineIndependent/glslang_tab.cpp" break; - case 495: /* type_specifier_nonarray: I64IMAGE2D */ -#line 3311 "MachineIndependent/glslang.y" + case 500: /* type_specifier_nonarray: I64IMAGE2D */ +#line 3296 "MachineIndependent/glslang.y" { (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.setImage(EbtInt64, Esd2D); } -#line 10364 "MachineIndependent/glslang_tab.cpp" +#line 10460 "MachineIndependent/glslang_tab.cpp" break; - case 496: /* type_specifier_nonarray: U64IMAGE2D */ -#line 3316 "MachineIndependent/glslang.y" + case 501: /* type_specifier_nonarray: U64IMAGE2D */ +#line 3301 "MachineIndependent/glslang.y" { (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.setImage(EbtUint64, Esd2D); } -#line 10374 "MachineIndependent/glslang_tab.cpp" +#line 10470 "MachineIndependent/glslang_tab.cpp" break; - case 497: /* type_specifier_nonarray: I64IMAGE3D */ -#line 3321 "MachineIndependent/glslang.y" + case 502: /* type_specifier_nonarray: I64IMAGE3D */ +#line 3306 "MachineIndependent/glslang.y" { (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.setImage(EbtInt64, Esd3D); } -#line 10384 "MachineIndependent/glslang_tab.cpp" +#line 10480 "MachineIndependent/glslang_tab.cpp" break; - case 498: /* type_specifier_nonarray: U64IMAGE3D */ -#line 3326 "MachineIndependent/glslang.y" + case 503: /* type_specifier_nonarray: U64IMAGE3D */ +#line 3311 "MachineIndependent/glslang.y" { (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.setImage(EbtUint64, Esd3D); } -#line 10394 "MachineIndependent/glslang_tab.cpp" +#line 10490 "MachineIndependent/glslang_tab.cpp" break; - case 499: /* type_specifier_nonarray: I64IMAGE2DRECT */ -#line 3331 "MachineIndependent/glslang.y" + case 504: /* type_specifier_nonarray: I64IMAGE2DRECT */ +#line 3316 "MachineIndependent/glslang.y" { (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.setImage(EbtInt64, EsdRect); } -#line 10404 "MachineIndependent/glslang_tab.cpp" +#line 10500 "MachineIndependent/glslang_tab.cpp" break; - case 500: /* type_specifier_nonarray: U64IMAGE2DRECT */ -#line 3336 "MachineIndependent/glslang.y" + case 505: /* type_specifier_nonarray: U64IMAGE2DRECT */ +#line 3321 "MachineIndependent/glslang.y" { (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.setImage(EbtUint64, EsdRect); } -#line 10414 "MachineIndependent/glslang_tab.cpp" +#line 10510 "MachineIndependent/glslang_tab.cpp" break; - case 501: /* type_specifier_nonarray: I64IMAGECUBE */ -#line 3341 "MachineIndependent/glslang.y" + case 506: /* type_specifier_nonarray: I64IMAGECUBE */ +#line 3326 "MachineIndependent/glslang.y" { (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.setImage(EbtInt64, EsdCube); } -#line 10424 "MachineIndependent/glslang_tab.cpp" +#line 10520 "MachineIndependent/glslang_tab.cpp" break; - case 502: /* type_specifier_nonarray: U64IMAGECUBE */ -#line 3346 "MachineIndependent/glslang.y" + case 507: /* type_specifier_nonarray: U64IMAGECUBE */ +#line 3331 "MachineIndependent/glslang.y" { (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.setImage(EbtUint64, EsdCube); } -#line 10434 "MachineIndependent/glslang_tab.cpp" +#line 10530 "MachineIndependent/glslang_tab.cpp" break; - case 503: /* type_specifier_nonarray: I64IMAGEBUFFER */ -#line 3351 "MachineIndependent/glslang.y" + case 508: /* type_specifier_nonarray: I64IMAGEBUFFER */ +#line 3336 "MachineIndependent/glslang.y" { (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.setImage(EbtInt64, EsdBuffer); } -#line 10444 "MachineIndependent/glslang_tab.cpp" +#line 10540 "MachineIndependent/glslang_tab.cpp" break; - case 504: /* type_specifier_nonarray: U64IMAGEBUFFER */ -#line 3356 "MachineIndependent/glslang.y" + case 509: /* type_specifier_nonarray: U64IMAGEBUFFER */ +#line 3341 "MachineIndependent/glslang.y" { (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.setImage(EbtUint64, EsdBuffer); } -#line 10454 "MachineIndependent/glslang_tab.cpp" +#line 10550 "MachineIndependent/glslang_tab.cpp" break; - case 505: /* type_specifier_nonarray: I64IMAGE1DARRAY */ -#line 3361 "MachineIndependent/glslang.y" + case 510: /* type_specifier_nonarray: I64IMAGE1DARRAY */ +#line 3346 "MachineIndependent/glslang.y" { (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.setImage(EbtInt64, Esd1D, true); } -#line 10464 "MachineIndependent/glslang_tab.cpp" +#line 10560 "MachineIndependent/glslang_tab.cpp" break; - case 506: /* type_specifier_nonarray: U64IMAGE1DARRAY */ -#line 3366 "MachineIndependent/glslang.y" + case 511: /* type_specifier_nonarray: U64IMAGE1DARRAY */ +#line 3351 "MachineIndependent/glslang.y" { (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.setImage(EbtUint64, Esd1D, true); } -#line 10474 "MachineIndependent/glslang_tab.cpp" +#line 10570 "MachineIndependent/glslang_tab.cpp" break; - case 507: /* type_specifier_nonarray: I64IMAGE2DARRAY */ -#line 3371 "MachineIndependent/glslang.y" + case 512: /* type_specifier_nonarray: I64IMAGE2DARRAY */ +#line 3356 "MachineIndependent/glslang.y" { (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.setImage(EbtInt64, Esd2D, true); } -#line 10484 "MachineIndependent/glslang_tab.cpp" +#line 10580 "MachineIndependent/glslang_tab.cpp" break; - case 508: /* type_specifier_nonarray: U64IMAGE2DARRAY */ -#line 3376 "MachineIndependent/glslang.y" + case 513: /* type_specifier_nonarray: U64IMAGE2DARRAY */ +#line 3361 "MachineIndependent/glslang.y" { (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.setImage(EbtUint64, Esd2D, true); } -#line 10494 "MachineIndependent/glslang_tab.cpp" +#line 10590 "MachineIndependent/glslang_tab.cpp" break; - case 509: /* type_specifier_nonarray: I64IMAGECUBEARRAY */ -#line 3381 "MachineIndependent/glslang.y" + case 514: /* type_specifier_nonarray: I64IMAGECUBEARRAY */ +#line 3366 "MachineIndependent/glslang.y" { (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.setImage(EbtInt64, EsdCube, true); } -#line 10504 "MachineIndependent/glslang_tab.cpp" +#line 10600 "MachineIndependent/glslang_tab.cpp" break; - case 510: /* type_specifier_nonarray: U64IMAGECUBEARRAY */ -#line 3386 "MachineIndependent/glslang.y" + case 515: /* type_specifier_nonarray: U64IMAGECUBEARRAY */ +#line 3371 "MachineIndependent/glslang.y" { (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.setImage(EbtUint64, EsdCube, true); } -#line 10514 "MachineIndependent/glslang_tab.cpp" +#line 10610 "MachineIndependent/glslang_tab.cpp" break; - case 511: /* type_specifier_nonarray: I64IMAGE2DMS */ -#line 3391 "MachineIndependent/glslang.y" + case 516: /* type_specifier_nonarray: I64IMAGE2DMS */ +#line 3376 "MachineIndependent/glslang.y" { (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.setImage(EbtInt64, Esd2D, false, false, true); } -#line 10524 "MachineIndependent/glslang_tab.cpp" +#line 10620 "MachineIndependent/glslang_tab.cpp" break; - case 512: /* type_specifier_nonarray: U64IMAGE2DMS */ -#line 3396 "MachineIndependent/glslang.y" + case 517: /* type_specifier_nonarray: U64IMAGE2DMS */ +#line 3381 "MachineIndependent/glslang.y" { (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.setImage(EbtUint64, Esd2D, false, false, true); } -#line 10534 "MachineIndependent/glslang_tab.cpp" +#line 10630 "MachineIndependent/glslang_tab.cpp" break; - case 513: /* type_specifier_nonarray: I64IMAGE2DMSARRAY */ -#line 3401 "MachineIndependent/glslang.y" + case 518: /* type_specifier_nonarray: I64IMAGE2DMSARRAY */ +#line 3386 "MachineIndependent/glslang.y" { (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.setImage(EbtInt64, Esd2D, true, false, true); } -#line 10544 "MachineIndependent/glslang_tab.cpp" +#line 10640 "MachineIndependent/glslang_tab.cpp" break; - case 514: /* type_specifier_nonarray: U64IMAGE2DMSARRAY */ -#line 3406 "MachineIndependent/glslang.y" + case 519: /* type_specifier_nonarray: U64IMAGE2DMSARRAY */ +#line 3391 "MachineIndependent/glslang.y" { (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.setImage(EbtUint64, Esd2D, true, false, true); } -#line 10554 "MachineIndependent/glslang_tab.cpp" +#line 10650 "MachineIndependent/glslang_tab.cpp" break; - case 515: /* type_specifier_nonarray: SAMPLEREXTERNALOES */ -#line 3411 "MachineIndependent/glslang.y" + case 520: /* type_specifier_nonarray: SAMPLEREXTERNALOES */ +#line 3396 "MachineIndependent/glslang.y" { // GL_OES_EGL_image_external (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.set(EbtFloat, Esd2D); (yyval.interm.type).sampler.external = true; } -#line 10565 "MachineIndependent/glslang_tab.cpp" +#line 10661 "MachineIndependent/glslang_tab.cpp" break; - case 516: /* type_specifier_nonarray: SAMPLEREXTERNAL2DY2YEXT */ -#line 3417 "MachineIndependent/glslang.y" + case 521: /* type_specifier_nonarray: SAMPLEREXTERNAL2DY2YEXT */ +#line 3402 "MachineIndependent/glslang.y" { // GL_EXT_YUV_target (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.set(EbtFloat, Esd2D); (yyval.interm.type).sampler.yuv = true; } -#line 10576 "MachineIndependent/glslang_tab.cpp" +#line 10672 "MachineIndependent/glslang_tab.cpp" + break; + + case 522: /* type_specifier_nonarray: ATTACHMENTEXT */ +#line 3408 "MachineIndependent/glslang.y" + { + parseContext.requireStage((yyvsp[0].lex).loc, EShLangFragment, "attachmentEXT input"); + (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); + (yyval.interm.type).basicType = EbtSampler; + (yyval.interm.type).sampler.setAttachmentEXT(EbtFloat); + } +#line 10683 "MachineIndependent/glslang_tab.cpp" + break; + + case 523: /* type_specifier_nonarray: IATTACHMENTEXT */ +#line 3414 "MachineIndependent/glslang.y" + { + parseContext.requireStage((yyvsp[0].lex).loc, EShLangFragment, "attachmentEXT input"); + (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); + (yyval.interm.type).basicType = EbtSampler; + (yyval.interm.type).sampler.setAttachmentEXT(EbtInt); + } +#line 10694 "MachineIndependent/glslang_tab.cpp" + break; + + case 524: /* type_specifier_nonarray: UATTACHMENTEXT */ +#line 3420 "MachineIndependent/glslang.y" + { + parseContext.requireStage((yyvsp[0].lex).loc, EShLangFragment, "attachmentEXT input"); + (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); + (yyval.interm.type).basicType = EbtSampler; + (yyval.interm.type).sampler.setAttachmentEXT(EbtUint); + } +#line 10705 "MachineIndependent/glslang_tab.cpp" break; - case 517: /* type_specifier_nonarray: SUBPASSINPUT */ -#line 3423 "MachineIndependent/glslang.y" + case 525: /* type_specifier_nonarray: SUBPASSINPUT */ +#line 3426 "MachineIndependent/glslang.y" { parseContext.requireStage((yyvsp[0].lex).loc, EShLangFragment, "subpass input"); (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.setSubpass(EbtFloat); } -#line 10587 "MachineIndependent/glslang_tab.cpp" +#line 10716 "MachineIndependent/glslang_tab.cpp" break; - case 518: /* type_specifier_nonarray: SUBPASSINPUTMS */ -#line 3429 "MachineIndependent/glslang.y" + case 526: /* type_specifier_nonarray: SUBPASSINPUTMS */ +#line 3432 "MachineIndependent/glslang.y" { parseContext.requireStage((yyvsp[0].lex).loc, EShLangFragment, "subpass input"); (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.setSubpass(EbtFloat, true); } -#line 10598 "MachineIndependent/glslang_tab.cpp" +#line 10727 "MachineIndependent/glslang_tab.cpp" break; - case 519: /* type_specifier_nonarray: F16SUBPASSINPUT */ -#line 3435 "MachineIndependent/glslang.y" + case 527: /* type_specifier_nonarray: F16SUBPASSINPUT */ +#line 3438 "MachineIndependent/glslang.y" { parseContext.float16OpaqueCheck((yyvsp[0].lex).loc, "half float subpass input", parseContext.symbolTable.atBuiltInLevel()); parseContext.requireStage((yyvsp[0].lex).loc, EShLangFragment, "subpass input"); @@ -10606,11 +10735,11 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.setSubpass(EbtFloat16); } -#line 10610 "MachineIndependent/glslang_tab.cpp" +#line 10739 "MachineIndependent/glslang_tab.cpp" break; - case 520: /* type_specifier_nonarray: F16SUBPASSINPUTMS */ -#line 3442 "MachineIndependent/glslang.y" + case 528: /* type_specifier_nonarray: F16SUBPASSINPUTMS */ +#line 3445 "MachineIndependent/glslang.y" { parseContext.float16OpaqueCheck((yyvsp[0].lex).loc, "half float subpass input", parseContext.symbolTable.atBuiltInLevel()); parseContext.requireStage((yyvsp[0].lex).loc, EShLangFragment, "subpass input"); @@ -10618,107 +10747,131 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.setSubpass(EbtFloat16, true); } -#line 10622 "MachineIndependent/glslang_tab.cpp" +#line 10751 "MachineIndependent/glslang_tab.cpp" break; - case 521: /* type_specifier_nonarray: ISUBPASSINPUT */ -#line 3449 "MachineIndependent/glslang.y" + case 529: /* type_specifier_nonarray: ISUBPASSINPUT */ +#line 3452 "MachineIndependent/glslang.y" { parseContext.requireStage((yyvsp[0].lex).loc, EShLangFragment, "subpass input"); (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.setSubpass(EbtInt); } -#line 10633 "MachineIndependent/glslang_tab.cpp" +#line 10762 "MachineIndependent/glslang_tab.cpp" break; - case 522: /* type_specifier_nonarray: ISUBPASSINPUTMS */ -#line 3455 "MachineIndependent/glslang.y" + case 530: /* type_specifier_nonarray: ISUBPASSINPUTMS */ +#line 3458 "MachineIndependent/glslang.y" { parseContext.requireStage((yyvsp[0].lex).loc, EShLangFragment, "subpass input"); (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.setSubpass(EbtInt, true); } -#line 10644 "MachineIndependent/glslang_tab.cpp" +#line 10773 "MachineIndependent/glslang_tab.cpp" break; - case 523: /* type_specifier_nonarray: USUBPASSINPUT */ -#line 3461 "MachineIndependent/glslang.y" + case 531: /* type_specifier_nonarray: USUBPASSINPUT */ +#line 3464 "MachineIndependent/glslang.y" { parseContext.requireStage((yyvsp[0].lex).loc, EShLangFragment, "subpass input"); (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.setSubpass(EbtUint); } -#line 10655 "MachineIndependent/glslang_tab.cpp" +#line 10784 "MachineIndependent/glslang_tab.cpp" break; - case 524: /* type_specifier_nonarray: USUBPASSINPUTMS */ -#line 3467 "MachineIndependent/glslang.y" + case 532: /* type_specifier_nonarray: USUBPASSINPUTMS */ +#line 3470 "MachineIndependent/glslang.y" { parseContext.requireStage((yyvsp[0].lex).loc, EShLangFragment, "subpass input"); (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtSampler; (yyval.interm.type).sampler.setSubpass(EbtUint, true); } -#line 10666 "MachineIndependent/glslang_tab.cpp" +#line 10795 "MachineIndependent/glslang_tab.cpp" break; - case 525: /* type_specifier_nonarray: FCOOPMATNV */ -#line 3473 "MachineIndependent/glslang.y" + case 533: /* type_specifier_nonarray: FCOOPMATNV */ +#line 3476 "MachineIndependent/glslang.y" { - parseContext.fcoopmatCheck((yyvsp[0].lex).loc, "fcoopmatNV", parseContext.symbolTable.atBuiltInLevel()); + parseContext.fcoopmatCheckNV((yyvsp[0].lex).loc, "fcoopmatNV", parseContext.symbolTable.atBuiltInLevel()); (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtFloat; - (yyval.interm.type).coopmat = true; + (yyval.interm.type).coopmatNV = true; + (yyval.interm.type).coopmatKHR = false; } -#line 10677 "MachineIndependent/glslang_tab.cpp" +#line 10807 "MachineIndependent/glslang_tab.cpp" break; - case 526: /* type_specifier_nonarray: ICOOPMATNV */ -#line 3479 "MachineIndependent/glslang.y" + case 534: /* type_specifier_nonarray: ICOOPMATNV */ +#line 3483 "MachineIndependent/glslang.y" { - parseContext.intcoopmatCheck((yyvsp[0].lex).loc, "icoopmatNV", parseContext.symbolTable.atBuiltInLevel()); + parseContext.intcoopmatCheckNV((yyvsp[0].lex).loc, "icoopmatNV", parseContext.symbolTable.atBuiltInLevel()); (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtInt; - (yyval.interm.type).coopmat = true; + (yyval.interm.type).coopmatNV = true; + (yyval.interm.type).coopmatKHR = false; } -#line 10688 "MachineIndependent/glslang_tab.cpp" +#line 10819 "MachineIndependent/glslang_tab.cpp" break; - case 527: /* type_specifier_nonarray: UCOOPMATNV */ -#line 3485 "MachineIndependent/glslang.y" + case 535: /* type_specifier_nonarray: UCOOPMATNV */ +#line 3490 "MachineIndependent/glslang.y" { - parseContext.intcoopmatCheck((yyvsp[0].lex).loc, "ucoopmatNV", parseContext.symbolTable.atBuiltInLevel()); + parseContext.intcoopmatCheckNV((yyvsp[0].lex).loc, "ucoopmatNV", parseContext.symbolTable.atBuiltInLevel()); (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).basicType = EbtUint; - (yyval.interm.type).coopmat = true; + (yyval.interm.type).coopmatNV = true; + (yyval.interm.type).coopmatKHR = false; + } +#line 10831 "MachineIndependent/glslang_tab.cpp" + break; + + case 536: /* type_specifier_nonarray: COOPMAT */ +#line 3497 "MachineIndependent/glslang.y" + { + parseContext.coopmatCheck((yyvsp[0].lex).loc, "coopmat", parseContext.symbolTable.atBuiltInLevel()); + (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); + (yyval.interm.type).basicType = EbtCoopmat; + (yyval.interm.type).coopmatNV = false; + (yyval.interm.type).coopmatKHR = true; } -#line 10699 "MachineIndependent/glslang_tab.cpp" +#line 10843 "MachineIndependent/glslang_tab.cpp" break; - case 528: /* type_specifier_nonarray: spirv_type_specifier */ -#line 3491 "MachineIndependent/glslang.y" + case 537: /* type_specifier_nonarray: spirv_type_specifier */ +#line 3504 "MachineIndependent/glslang.y" { parseContext.requireExtensions((yyvsp[0].interm.type).loc, 1, &E_GL_EXT_spirv_intrinsics, "SPIR-V type specifier"); (yyval.interm.type) = (yyvsp[0].interm.type); } -#line 10708 "MachineIndependent/glslang_tab.cpp" +#line 10852 "MachineIndependent/glslang_tab.cpp" + break; + + case 538: /* type_specifier_nonarray: HITOBJECTNV */ +#line 3508 "MachineIndependent/glslang.y" + { + (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); + (yyval.interm.type).basicType = EbtHitObjectNV; + } +#line 10861 "MachineIndependent/glslang_tab.cpp" break; - case 529: /* type_specifier_nonarray: struct_specifier */ -#line 3496 "MachineIndependent/glslang.y" + case 539: /* type_specifier_nonarray: struct_specifier */ +#line 3512 "MachineIndependent/glslang.y" { (yyval.interm.type) = (yyvsp[0].interm.type); (yyval.interm.type).qualifier.storage = parseContext.symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary; parseContext.structTypeCheck((yyval.interm.type).loc, (yyval.interm.type)); } -#line 10718 "MachineIndependent/glslang_tab.cpp" +#line 10871 "MachineIndependent/glslang_tab.cpp" break; - case 530: /* type_specifier_nonarray: TYPE_NAME */ -#line 3501 "MachineIndependent/glslang.y" + case 540: /* type_specifier_nonarray: TYPE_NAME */ +#line 3517 "MachineIndependent/glslang.y" { // // This is for user defined type names. The lexical phase looked up the @@ -10732,47 +10885,47 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); } else parseContext.error((yyvsp[0].lex).loc, "expected type name", (yyvsp[0].lex).string->c_str(), ""); } -#line 10736 "MachineIndependent/glslang_tab.cpp" +#line 10889 "MachineIndependent/glslang_tab.cpp" break; - case 531: /* precision_qualifier: HIGH_PRECISION */ -#line 3517 "MachineIndependent/glslang.y" + case 541: /* precision_qualifier: HIGH_PRECISION */ +#line 3533 "MachineIndependent/glslang.y" { parseContext.profileRequires((yyvsp[0].lex).loc, ENoProfile, 130, 0, "highp precision qualifier"); (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); parseContext.handlePrecisionQualifier((yyvsp[0].lex).loc, (yyval.interm.type).qualifier, EpqHigh); } -#line 10746 "MachineIndependent/glslang_tab.cpp" +#line 10899 "MachineIndependent/glslang_tab.cpp" break; - case 532: /* precision_qualifier: MEDIUM_PRECISION */ -#line 3522 "MachineIndependent/glslang.y" + case 542: /* precision_qualifier: MEDIUM_PRECISION */ +#line 3538 "MachineIndependent/glslang.y" { parseContext.profileRequires((yyvsp[0].lex).loc, ENoProfile, 130, 0, "mediump precision qualifier"); (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); parseContext.handlePrecisionQualifier((yyvsp[0].lex).loc, (yyval.interm.type).qualifier, EpqMedium); } -#line 10756 "MachineIndependent/glslang_tab.cpp" +#line 10909 "MachineIndependent/glslang_tab.cpp" break; - case 533: /* precision_qualifier: LOW_PRECISION */ -#line 3527 "MachineIndependent/glslang.y" + case 543: /* precision_qualifier: LOW_PRECISION */ +#line 3543 "MachineIndependent/glslang.y" { parseContext.profileRequires((yyvsp[0].lex).loc, ENoProfile, 130, 0, "lowp precision qualifier"); (yyval.interm.type).init((yyvsp[0].lex).loc, parseContext.symbolTable.atGlobalLevel()); parseContext.handlePrecisionQualifier((yyvsp[0].lex).loc, (yyval.interm.type).qualifier, EpqLow); } -#line 10766 "MachineIndependent/glslang_tab.cpp" +#line 10919 "MachineIndependent/glslang_tab.cpp" break; - case 534: /* $@3: %empty */ -#line 3535 "MachineIndependent/glslang.y" + case 544: /* $@3: %empty */ +#line 3551 "MachineIndependent/glslang.y" { parseContext.nestedStructCheck((yyvsp[-2].lex).loc); } -#line 10772 "MachineIndependent/glslang_tab.cpp" +#line 10925 "MachineIndependent/glslang_tab.cpp" break; - case 535: /* struct_specifier: STRUCT IDENTIFIER LEFT_BRACE $@3 struct_declaration_list RIGHT_BRACE */ -#line 3535 "MachineIndependent/glslang.y" + case 545: /* struct_specifier: STRUCT IDENTIFIER LEFT_BRACE $@3 struct_declaration_list RIGHT_BRACE */ +#line 3551 "MachineIndependent/glslang.y" { TType* structure = new TType((yyvsp[-1].interm.typeList), *(yyvsp[-4].lex).string); parseContext.structArrayCheck((yyvsp[-4].lex).loc, *structure); @@ -10784,17 +10937,17 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); (yyval.interm.type).userDef = structure; --parseContext.structNestingLevel; } -#line 10788 "MachineIndependent/glslang_tab.cpp" +#line 10941 "MachineIndependent/glslang_tab.cpp" break; - case 536: /* $@4: %empty */ -#line 3546 "MachineIndependent/glslang.y" + case 546: /* $@4: %empty */ +#line 3562 "MachineIndependent/glslang.y" { parseContext.nestedStructCheck((yyvsp[-1].lex).loc); } -#line 10794 "MachineIndependent/glslang_tab.cpp" +#line 10947 "MachineIndependent/glslang_tab.cpp" break; - case 537: /* struct_specifier: STRUCT LEFT_BRACE $@4 struct_declaration_list RIGHT_BRACE */ -#line 3546 "MachineIndependent/glslang.y" + case 547: /* struct_specifier: STRUCT LEFT_BRACE $@4 struct_declaration_list RIGHT_BRACE */ +#line 3562 "MachineIndependent/glslang.y" { TType* structure = new TType((yyvsp[-1].interm.typeList), TString("")); (yyval.interm.type).init((yyvsp[-4].lex).loc); @@ -10802,19 +10955,19 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); (yyval.interm.type).userDef = structure; --parseContext.structNestingLevel; } -#line 10806 "MachineIndependent/glslang_tab.cpp" +#line 10959 "MachineIndependent/glslang_tab.cpp" break; - case 538: /* struct_declaration_list: struct_declaration */ -#line 3556 "MachineIndependent/glslang.y" + case 548: /* struct_declaration_list: struct_declaration */ +#line 3572 "MachineIndependent/glslang.y" { (yyval.interm.typeList) = (yyvsp[0].interm.typeList); } -#line 10814 "MachineIndependent/glslang_tab.cpp" +#line 10967 "MachineIndependent/glslang_tab.cpp" break; - case 539: /* struct_declaration_list: struct_declaration_list struct_declaration */ -#line 3559 "MachineIndependent/glslang.y" + case 549: /* struct_declaration_list: struct_declaration_list struct_declaration */ +#line 3575 "MachineIndependent/glslang.y" { (yyval.interm.typeList) = (yyvsp[-1].interm.typeList); for (unsigned int i = 0; i < (yyvsp[0].interm.typeList)->size(); ++i) { @@ -10825,11 +10978,11 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); (yyval.interm.typeList)->push_back((*(yyvsp[0].interm.typeList))[i]); } } -#line 10829 "MachineIndependent/glslang_tab.cpp" +#line 10982 "MachineIndependent/glslang_tab.cpp" break; - case 540: /* struct_declaration: type_specifier struct_declarator_list SEMICOLON */ -#line 3572 "MachineIndependent/glslang.y" + case 550: /* struct_declaration: type_specifier struct_declarator_list SEMICOLON */ +#line 3588 "MachineIndependent/glslang.y" { if ((yyvsp[-2].interm.type).arraySizes) { parseContext.profileRequires((yyvsp[-2].interm.type).loc, ENoProfile, 120, E_GL_3DL_array_objects, "arrayed type"); @@ -10841,7 +10994,7 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); (yyval.interm.typeList) = (yyvsp[-1].interm.typeList); parseContext.voidErrorCheck((yyvsp[-2].interm.type).loc, (*(yyvsp[-1].interm.typeList))[0].type->getFieldName(), (yyvsp[-2].interm.type).basicType); - parseContext.precisionQualifierCheck((yyvsp[-2].interm.type).loc, (yyvsp[-2].interm.type).basicType, (yyvsp[-2].interm.type).qualifier); + parseContext.precisionQualifierCheck((yyvsp[-2].interm.type).loc, (yyvsp[-2].interm.type).basicType, (yyvsp[-2].interm.type).qualifier, (yyvsp[-2].interm.type).isCoopmat()); for (unsigned int i = 0; i < (yyval.interm.typeList)->size(); ++i) { TType type((yyvsp[-2].interm.type)); @@ -10852,11 +11005,11 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); (*(yyval.interm.typeList))[i].type->shallowCopy(type); } } -#line 10856 "MachineIndependent/glslang_tab.cpp" +#line 11009 "MachineIndependent/glslang_tab.cpp" break; - case 541: /* struct_declaration: type_qualifier type_specifier struct_declarator_list SEMICOLON */ -#line 3594 "MachineIndependent/glslang.y" + case 551: /* struct_declaration: type_qualifier type_specifier struct_declarator_list SEMICOLON */ +#line 3610 "MachineIndependent/glslang.y" { if ((yyvsp[-2].interm.type).arraySizes) { parseContext.profileRequires((yyvsp[-2].interm.type).loc, ENoProfile, 120, E_GL_3DL_array_objects, "arrayed type"); @@ -10870,7 +11023,7 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); parseContext.memberQualifierCheck((yyvsp[-3].interm.type)); parseContext.voidErrorCheck((yyvsp[-2].interm.type).loc, (*(yyvsp[-1].interm.typeList))[0].type->getFieldName(), (yyvsp[-2].interm.type).basicType); parseContext.mergeQualifiers((yyvsp[-2].interm.type).loc, (yyvsp[-2].interm.type).qualifier, (yyvsp[-3].interm.type).qualifier, true); - parseContext.precisionQualifierCheck((yyvsp[-2].interm.type).loc, (yyvsp[-2].interm.type).basicType, (yyvsp[-2].interm.type).qualifier); + parseContext.precisionQualifierCheck((yyvsp[-2].interm.type).loc, (yyvsp[-2].interm.type).basicType, (yyvsp[-2].interm.type).qualifier, (yyvsp[-2].interm.type).isCoopmat()); for (unsigned int i = 0; i < (yyval.interm.typeList)->size(); ++i) { TType type((yyvsp[-2].interm.type)); @@ -10881,38 +11034,38 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); (*(yyval.interm.typeList))[i].type->shallowCopy(type); } } -#line 10885 "MachineIndependent/glslang_tab.cpp" +#line 11038 "MachineIndependent/glslang_tab.cpp" break; - case 542: /* struct_declarator_list: struct_declarator */ -#line 3621 "MachineIndependent/glslang.y" + case 552: /* struct_declarator_list: struct_declarator */ +#line 3637 "MachineIndependent/glslang.y" { (yyval.interm.typeList) = new TTypeList; (yyval.interm.typeList)->push_back((yyvsp[0].interm.typeLine)); } -#line 10894 "MachineIndependent/glslang_tab.cpp" +#line 11047 "MachineIndependent/glslang_tab.cpp" break; - case 543: /* struct_declarator_list: struct_declarator_list COMMA struct_declarator */ -#line 3625 "MachineIndependent/glslang.y" + case 553: /* struct_declarator_list: struct_declarator_list COMMA struct_declarator */ +#line 3641 "MachineIndependent/glslang.y" { (yyval.interm.typeList)->push_back((yyvsp[0].interm.typeLine)); } -#line 10902 "MachineIndependent/glslang_tab.cpp" +#line 11055 "MachineIndependent/glslang_tab.cpp" break; - case 544: /* struct_declarator: IDENTIFIER */ -#line 3631 "MachineIndependent/glslang.y" + case 554: /* struct_declarator: IDENTIFIER */ +#line 3647 "MachineIndependent/glslang.y" { (yyval.interm.typeLine).type = new TType(EbtVoid); (yyval.interm.typeLine).loc = (yyvsp[0].lex).loc; (yyval.interm.typeLine).type->setFieldName(*(yyvsp[0].lex).string); } -#line 10912 "MachineIndependent/glslang_tab.cpp" +#line 11065 "MachineIndependent/glslang_tab.cpp" break; - case 545: /* struct_declarator: IDENTIFIER array_specifier */ -#line 3636 "MachineIndependent/glslang.y" + case 555: /* struct_declarator: IDENTIFIER array_specifier */ +#line 3652 "MachineIndependent/glslang.y" { parseContext.arrayOfArrayVersionCheck((yyvsp[-1].lex).loc, (yyvsp[0].interm).arraySizes); @@ -10921,246 +11074,246 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); (yyval.interm.typeLine).type->setFieldName(*(yyvsp[-1].lex).string); (yyval.interm.typeLine).type->transferArraySizes((yyvsp[0].interm).arraySizes); } -#line 10925 "MachineIndependent/glslang_tab.cpp" +#line 11078 "MachineIndependent/glslang_tab.cpp" break; - case 546: /* initializer: assignment_expression */ -#line 3647 "MachineIndependent/glslang.y" + case 556: /* initializer: assignment_expression */ +#line 3663 "MachineIndependent/glslang.y" { (yyval.interm.intermTypedNode) = (yyvsp[0].interm.intermTypedNode); } -#line 10933 "MachineIndependent/glslang_tab.cpp" +#line 11086 "MachineIndependent/glslang_tab.cpp" break; - case 547: /* initializer: LEFT_BRACE initializer_list RIGHT_BRACE */ -#line 3651 "MachineIndependent/glslang.y" + case 557: /* initializer: LEFT_BRACE initializer_list RIGHT_BRACE */ +#line 3666 "MachineIndependent/glslang.y" { const char* initFeature = "{ } style initializers"; parseContext.requireProfile((yyvsp[-2].lex).loc, ~EEsProfile, initFeature); parseContext.profileRequires((yyvsp[-2].lex).loc, ~EEsProfile, 420, E_GL_ARB_shading_language_420pack, initFeature); (yyval.interm.intermTypedNode) = (yyvsp[-1].interm.intermTypedNode); } -#line 10944 "MachineIndependent/glslang_tab.cpp" +#line 11097 "MachineIndependent/glslang_tab.cpp" break; - case 548: /* initializer: LEFT_BRACE initializer_list COMMA RIGHT_BRACE */ -#line 3657 "MachineIndependent/glslang.y" + case 558: /* initializer: LEFT_BRACE initializer_list COMMA RIGHT_BRACE */ +#line 3672 "MachineIndependent/glslang.y" { const char* initFeature = "{ } style initializers"; parseContext.requireProfile((yyvsp[-3].lex).loc, ~EEsProfile, initFeature); parseContext.profileRequires((yyvsp[-3].lex).loc, ~EEsProfile, 420, E_GL_ARB_shading_language_420pack, initFeature); (yyval.interm.intermTypedNode) = (yyvsp[-2].interm.intermTypedNode); } -#line 10955 "MachineIndependent/glslang_tab.cpp" +#line 11108 "MachineIndependent/glslang_tab.cpp" break; - case 549: /* initializer: LEFT_BRACE RIGHT_BRACE */ -#line 3663 "MachineIndependent/glslang.y" + case 559: /* initializer: LEFT_BRACE RIGHT_BRACE */ +#line 3678 "MachineIndependent/glslang.y" { const char* initFeature = "empty { } initializer"; parseContext.profileRequires((yyvsp[-1].lex).loc, EEsProfile, 0, E_GL_EXT_null_initializer, initFeature); parseContext.profileRequires((yyvsp[-1].lex).loc, ~EEsProfile, 0, E_GL_EXT_null_initializer, initFeature); (yyval.interm.intermTypedNode) = parseContext.intermediate.makeAggregate((yyvsp[-1].lex).loc); } -#line 10966 "MachineIndependent/glslang_tab.cpp" +#line 11119 "MachineIndependent/glslang_tab.cpp" break; - case 550: /* initializer_list: initializer */ -#line 3674 "MachineIndependent/glslang.y" + case 560: /* initializer_list: initializer */ +#line 3687 "MachineIndependent/glslang.y" { (yyval.interm.intermTypedNode) = parseContext.intermediate.growAggregate(0, (yyvsp[0].interm.intermTypedNode), (yyvsp[0].interm.intermTypedNode)->getLoc()); } -#line 10974 "MachineIndependent/glslang_tab.cpp" +#line 11127 "MachineIndependent/glslang_tab.cpp" break; - case 551: /* initializer_list: initializer_list COMMA initializer */ -#line 3677 "MachineIndependent/glslang.y" + case 561: /* initializer_list: initializer_list COMMA initializer */ +#line 3690 "MachineIndependent/glslang.y" { (yyval.interm.intermTypedNode) = parseContext.intermediate.growAggregate((yyvsp[-2].interm.intermTypedNode), (yyvsp[0].interm.intermTypedNode)); } -#line 10982 "MachineIndependent/glslang_tab.cpp" +#line 11135 "MachineIndependent/glslang_tab.cpp" break; - case 552: /* declaration_statement: declaration */ -#line 3684 "MachineIndependent/glslang.y" + case 562: /* declaration_statement: declaration */ +#line 3696 "MachineIndependent/glslang.y" { (yyval.interm.intermNode) = (yyvsp[0].interm.intermNode); } -#line 10988 "MachineIndependent/glslang_tab.cpp" +#line 11141 "MachineIndependent/glslang_tab.cpp" break; - case 553: /* statement: compound_statement */ -#line 3688 "MachineIndependent/glslang.y" + case 563: /* statement: compound_statement */ +#line 3700 "MachineIndependent/glslang.y" { (yyval.interm.intermNode) = (yyvsp[0].interm.intermNode); } -#line 10994 "MachineIndependent/glslang_tab.cpp" +#line 11147 "MachineIndependent/glslang_tab.cpp" break; - case 554: /* statement: simple_statement */ -#line 3689 "MachineIndependent/glslang.y" + case 564: /* statement: simple_statement */ +#line 3701 "MachineIndependent/glslang.y" { (yyval.interm.intermNode) = (yyvsp[0].interm.intermNode); } -#line 11000 "MachineIndependent/glslang_tab.cpp" +#line 11153 "MachineIndependent/glslang_tab.cpp" break; - case 555: /* simple_statement: declaration_statement */ -#line 3695 "MachineIndependent/glslang.y" + case 565: /* simple_statement: declaration_statement */ +#line 3707 "MachineIndependent/glslang.y" { (yyval.interm.intermNode) = (yyvsp[0].interm.intermNode); } -#line 11006 "MachineIndependent/glslang_tab.cpp" +#line 11159 "MachineIndependent/glslang_tab.cpp" break; - case 556: /* simple_statement: expression_statement */ -#line 3696 "MachineIndependent/glslang.y" + case 566: /* simple_statement: expression_statement */ +#line 3708 "MachineIndependent/glslang.y" { (yyval.interm.intermNode) = (yyvsp[0].interm.intermNode); } -#line 11012 "MachineIndependent/glslang_tab.cpp" +#line 11165 "MachineIndependent/glslang_tab.cpp" break; - case 557: /* simple_statement: selection_statement */ -#line 3697 "MachineIndependent/glslang.y" + case 567: /* simple_statement: selection_statement */ +#line 3709 "MachineIndependent/glslang.y" { (yyval.interm.intermNode) = (yyvsp[0].interm.intermNode); } -#line 11018 "MachineIndependent/glslang_tab.cpp" +#line 11171 "MachineIndependent/glslang_tab.cpp" break; - case 558: /* simple_statement: switch_statement */ -#line 3698 "MachineIndependent/glslang.y" + case 568: /* simple_statement: switch_statement */ +#line 3710 "MachineIndependent/glslang.y" { (yyval.interm.intermNode) = (yyvsp[0].interm.intermNode); } -#line 11024 "MachineIndependent/glslang_tab.cpp" +#line 11177 "MachineIndependent/glslang_tab.cpp" break; - case 559: /* simple_statement: case_label */ -#line 3699 "MachineIndependent/glslang.y" + case 569: /* simple_statement: case_label */ +#line 3711 "MachineIndependent/glslang.y" { (yyval.interm.intermNode) = (yyvsp[0].interm.intermNode); } -#line 11030 "MachineIndependent/glslang_tab.cpp" +#line 11183 "MachineIndependent/glslang_tab.cpp" break; - case 560: /* simple_statement: iteration_statement */ -#line 3700 "MachineIndependent/glslang.y" + case 570: /* simple_statement: iteration_statement */ +#line 3712 "MachineIndependent/glslang.y" { (yyval.interm.intermNode) = (yyvsp[0].interm.intermNode); } -#line 11036 "MachineIndependent/glslang_tab.cpp" +#line 11189 "MachineIndependent/glslang_tab.cpp" break; - case 561: /* simple_statement: jump_statement */ -#line 3701 "MachineIndependent/glslang.y" + case 571: /* simple_statement: jump_statement */ +#line 3713 "MachineIndependent/glslang.y" { (yyval.interm.intermNode) = (yyvsp[0].interm.intermNode); } -#line 11042 "MachineIndependent/glslang_tab.cpp" +#line 11195 "MachineIndependent/glslang_tab.cpp" break; - case 562: /* simple_statement: demote_statement */ -#line 3703 "MachineIndependent/glslang.y" + case 572: /* simple_statement: demote_statement */ +#line 3714 "MachineIndependent/glslang.y" { (yyval.interm.intermNode) = (yyvsp[0].interm.intermNode); } -#line 11048 "MachineIndependent/glslang_tab.cpp" +#line 11201 "MachineIndependent/glslang_tab.cpp" break; - case 563: /* demote_statement: DEMOTE SEMICOLON */ -#line 3709 "MachineIndependent/glslang.y" + case 573: /* demote_statement: DEMOTE SEMICOLON */ +#line 3718 "MachineIndependent/glslang.y" { parseContext.requireStage((yyvsp[-1].lex).loc, EShLangFragment, "demote"); parseContext.requireExtensions((yyvsp[-1].lex).loc, 1, &E_GL_EXT_demote_to_helper_invocation, "demote"); (yyval.interm.intermNode) = parseContext.intermediate.addBranch(EOpDemote, (yyvsp[-1].lex).loc); } -#line 11058 "MachineIndependent/glslang_tab.cpp" +#line 11211 "MachineIndependent/glslang_tab.cpp" break; - case 564: /* compound_statement: LEFT_BRACE RIGHT_BRACE */ -#line 3718 "MachineIndependent/glslang.y" + case 574: /* compound_statement: LEFT_BRACE RIGHT_BRACE */ +#line 3726 "MachineIndependent/glslang.y" { (yyval.interm.intermNode) = 0; } -#line 11064 "MachineIndependent/glslang_tab.cpp" +#line 11217 "MachineIndependent/glslang_tab.cpp" break; - case 565: /* $@5: %empty */ -#line 3719 "MachineIndependent/glslang.y" + case 575: /* $@5: %empty */ +#line 3727 "MachineIndependent/glslang.y" { parseContext.symbolTable.push(); ++parseContext.statementNestingLevel; } -#line 11073 "MachineIndependent/glslang_tab.cpp" +#line 11226 "MachineIndependent/glslang_tab.cpp" break; - case 566: /* $@6: %empty */ -#line 3723 "MachineIndependent/glslang.y" + case 576: /* $@6: %empty */ +#line 3731 "MachineIndependent/glslang.y" { parseContext.symbolTable.pop(&parseContext.defaultPrecision[0]); --parseContext.statementNestingLevel; } -#line 11082 "MachineIndependent/glslang_tab.cpp" +#line 11235 "MachineIndependent/glslang_tab.cpp" break; - case 567: /* compound_statement: LEFT_BRACE $@5 statement_list $@6 RIGHT_BRACE */ -#line 3727 "MachineIndependent/glslang.y" + case 577: /* compound_statement: LEFT_BRACE $@5 statement_list $@6 RIGHT_BRACE */ +#line 3735 "MachineIndependent/glslang.y" { if ((yyvsp[-2].interm.intermNode) && (yyvsp[-2].interm.intermNode)->getAsAggregate()) - (yyvsp[-2].interm.intermNode)->getAsAggregate()->setOperator(EOpSequence); + (yyvsp[-2].interm.intermNode)->getAsAggregate()->setOperator(parseContext.intermediate.getDebugInfo() ? EOpScope : EOpSequence); (yyval.interm.intermNode) = (yyvsp[-2].interm.intermNode); } -#line 11092 "MachineIndependent/glslang_tab.cpp" +#line 11245 "MachineIndependent/glslang_tab.cpp" break; - case 568: /* statement_no_new_scope: compound_statement_no_new_scope */ -#line 3735 "MachineIndependent/glslang.y" + case 578: /* statement_no_new_scope: compound_statement_no_new_scope */ +#line 3743 "MachineIndependent/glslang.y" { (yyval.interm.intermNode) = (yyvsp[0].interm.intermNode); } -#line 11098 "MachineIndependent/glslang_tab.cpp" +#line 11251 "MachineIndependent/glslang_tab.cpp" break; - case 569: /* statement_no_new_scope: simple_statement */ -#line 3736 "MachineIndependent/glslang.y" + case 579: /* statement_no_new_scope: simple_statement */ +#line 3744 "MachineIndependent/glslang.y" { (yyval.interm.intermNode) = (yyvsp[0].interm.intermNode); } -#line 11104 "MachineIndependent/glslang_tab.cpp" +#line 11257 "MachineIndependent/glslang_tab.cpp" break; - case 570: /* $@7: %empty */ -#line 3740 "MachineIndependent/glslang.y" + case 580: /* $@7: %empty */ +#line 3748 "MachineIndependent/glslang.y" { ++parseContext.controlFlowNestingLevel; } -#line 11112 "MachineIndependent/glslang_tab.cpp" +#line 11265 "MachineIndependent/glslang_tab.cpp" break; - case 571: /* statement_scoped: $@7 compound_statement */ -#line 3743 "MachineIndependent/glslang.y" + case 581: /* statement_scoped: $@7 compound_statement */ +#line 3751 "MachineIndependent/glslang.y" { --parseContext.controlFlowNestingLevel; (yyval.interm.intermNode) = (yyvsp[0].interm.intermNode); } -#line 11121 "MachineIndependent/glslang_tab.cpp" +#line 11274 "MachineIndependent/glslang_tab.cpp" break; - case 572: /* $@8: %empty */ -#line 3747 "MachineIndependent/glslang.y" + case 582: /* $@8: %empty */ +#line 3755 "MachineIndependent/glslang.y" { parseContext.symbolTable.push(); ++parseContext.statementNestingLevel; ++parseContext.controlFlowNestingLevel; } -#line 11131 "MachineIndependent/glslang_tab.cpp" +#line 11284 "MachineIndependent/glslang_tab.cpp" break; - case 573: /* statement_scoped: $@8 simple_statement */ -#line 3752 "MachineIndependent/glslang.y" + case 583: /* statement_scoped: $@8 simple_statement */ +#line 3760 "MachineIndependent/glslang.y" { parseContext.symbolTable.pop(&parseContext.defaultPrecision[0]); --parseContext.statementNestingLevel; --parseContext.controlFlowNestingLevel; (yyval.interm.intermNode) = (yyvsp[0].interm.intermNode); } -#line 11142 "MachineIndependent/glslang_tab.cpp" +#line 11295 "MachineIndependent/glslang_tab.cpp" break; - case 574: /* compound_statement_no_new_scope: LEFT_BRACE RIGHT_BRACE */ -#line 3761 "MachineIndependent/glslang.y" + case 584: /* compound_statement_no_new_scope: LEFT_BRACE RIGHT_BRACE */ +#line 3769 "MachineIndependent/glslang.y" { (yyval.interm.intermNode) = 0; } -#line 11150 "MachineIndependent/glslang_tab.cpp" +#line 11303 "MachineIndependent/glslang_tab.cpp" break; - case 575: /* compound_statement_no_new_scope: LEFT_BRACE statement_list RIGHT_BRACE */ -#line 3764 "MachineIndependent/glslang.y" + case 585: /* compound_statement_no_new_scope: LEFT_BRACE statement_list RIGHT_BRACE */ +#line 3772 "MachineIndependent/glslang.y" { if ((yyvsp[-1].interm.intermNode) && (yyvsp[-1].interm.intermNode)->getAsAggregate()) (yyvsp[-1].interm.intermNode)->getAsAggregate()->setOperator(EOpSequence); (yyval.interm.intermNode) = (yyvsp[-1].interm.intermNode); } -#line 11160 "MachineIndependent/glslang_tab.cpp" +#line 11313 "MachineIndependent/glslang_tab.cpp" break; - case 576: /* statement_list: statement */ -#line 3772 "MachineIndependent/glslang.y" + case 586: /* statement_list: statement */ +#line 3780 "MachineIndependent/glslang.y" { (yyval.interm.intermNode) = parseContext.intermediate.makeAggregate((yyvsp[0].interm.intermNode)); if ((yyvsp[0].interm.intermNode) && (yyvsp[0].interm.intermNode)->getAsBranchNode() && ((yyvsp[0].interm.intermNode)->getAsBranchNode()->getFlowOp() == EOpCase || @@ -11169,11 +11322,11 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); (yyval.interm.intermNode) = 0; // start a fresh subsequence for what's after this case } } -#line 11173 "MachineIndependent/glslang_tab.cpp" +#line 11326 "MachineIndependent/glslang_tab.cpp" break; - case 577: /* statement_list: statement_list statement */ -#line 3780 "MachineIndependent/glslang.y" + case 587: /* statement_list: statement_list statement */ +#line 3788 "MachineIndependent/glslang.y" { if ((yyvsp[0].interm.intermNode) && (yyvsp[0].interm.intermNode)->getAsBranchNode() && ((yyvsp[0].interm.intermNode)->getAsBranchNode()->getFlowOp() == EOpCase || (yyvsp[0].interm.intermNode)->getAsBranchNode()->getFlowOp() == EOpDefault)) { @@ -11182,77 +11335,77 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); } else (yyval.interm.intermNode) = parseContext.intermediate.growAggregate((yyvsp[-1].interm.intermNode), (yyvsp[0].interm.intermNode)); } -#line 11186 "MachineIndependent/glslang_tab.cpp" +#line 11339 "MachineIndependent/glslang_tab.cpp" break; - case 578: /* expression_statement: SEMICOLON */ -#line 3791 "MachineIndependent/glslang.y" + case 588: /* expression_statement: SEMICOLON */ +#line 3799 "MachineIndependent/glslang.y" { (yyval.interm.intermNode) = 0; } -#line 11192 "MachineIndependent/glslang_tab.cpp" +#line 11345 "MachineIndependent/glslang_tab.cpp" break; - case 579: /* expression_statement: expression SEMICOLON */ -#line 3792 "MachineIndependent/glslang.y" + case 589: /* expression_statement: expression SEMICOLON */ +#line 3800 "MachineIndependent/glslang.y" { (yyval.interm.intermNode) = static_cast((yyvsp[-1].interm.intermTypedNode)); } -#line 11198 "MachineIndependent/glslang_tab.cpp" +#line 11351 "MachineIndependent/glslang_tab.cpp" break; - case 580: /* selection_statement: selection_statement_nonattributed */ -#line 3796 "MachineIndependent/glslang.y" + case 590: /* selection_statement: selection_statement_nonattributed */ +#line 3804 "MachineIndependent/glslang.y" { (yyval.interm.intermNode) = (yyvsp[0].interm.intermNode); } -#line 11206 "MachineIndependent/glslang_tab.cpp" +#line 11359 "MachineIndependent/glslang_tab.cpp" break; - case 581: /* selection_statement: attribute selection_statement_nonattributed */ -#line 3800 "MachineIndependent/glslang.y" + case 591: /* selection_statement: attribute selection_statement_nonattributed */ +#line 3807 "MachineIndependent/glslang.y" { parseContext.requireExtensions((yyvsp[0].interm.intermNode)->getLoc(), 1, &E_GL_EXT_control_flow_attributes, "attribute"); parseContext.handleSelectionAttributes(*(yyvsp[-1].interm.attributes), (yyvsp[0].interm.intermNode)); (yyval.interm.intermNode) = (yyvsp[0].interm.intermNode); } -#line 11216 "MachineIndependent/glslang_tab.cpp" +#line 11369 "MachineIndependent/glslang_tab.cpp" break; - case 582: /* selection_statement_nonattributed: IF LEFT_PAREN expression RIGHT_PAREN selection_rest_statement */ -#line 3808 "MachineIndependent/glslang.y" + case 592: /* selection_statement_nonattributed: IF LEFT_PAREN expression RIGHT_PAREN selection_rest_statement */ +#line 3814 "MachineIndependent/glslang.y" { parseContext.boolCheck((yyvsp[-4].lex).loc, (yyvsp[-2].interm.intermTypedNode)); (yyval.interm.intermNode) = parseContext.intermediate.addSelection((yyvsp[-2].interm.intermTypedNode), (yyvsp[0].interm.nodePair), (yyvsp[-4].lex).loc); } -#line 11225 "MachineIndependent/glslang_tab.cpp" +#line 11378 "MachineIndependent/glslang_tab.cpp" break; - case 583: /* selection_rest_statement: statement_scoped ELSE statement_scoped */ -#line 3815 "MachineIndependent/glslang.y" + case 593: /* selection_rest_statement: statement_scoped ELSE statement_scoped */ +#line 3821 "MachineIndependent/glslang.y" { (yyval.interm.nodePair).node1 = (yyvsp[-2].interm.intermNode); (yyval.interm.nodePair).node2 = (yyvsp[0].interm.intermNode); } -#line 11234 "MachineIndependent/glslang_tab.cpp" +#line 11387 "MachineIndependent/glslang_tab.cpp" break; - case 584: /* selection_rest_statement: statement_scoped */ -#line 3819 "MachineIndependent/glslang.y" + case 594: /* selection_rest_statement: statement_scoped */ +#line 3825 "MachineIndependent/glslang.y" { (yyval.interm.nodePair).node1 = (yyvsp[0].interm.intermNode); (yyval.interm.nodePair).node2 = 0; } -#line 11243 "MachineIndependent/glslang_tab.cpp" +#line 11396 "MachineIndependent/glslang_tab.cpp" break; - case 585: /* condition: expression */ -#line 3827 "MachineIndependent/glslang.y" + case 595: /* condition: expression */ +#line 3833 "MachineIndependent/glslang.y" { (yyval.interm.intermTypedNode) = (yyvsp[0].interm.intermTypedNode); parseContext.boolCheck((yyvsp[0].interm.intermTypedNode)->getLoc(), (yyvsp[0].interm.intermTypedNode)); } -#line 11252 "MachineIndependent/glslang_tab.cpp" +#line 11405 "MachineIndependent/glslang_tab.cpp" break; - case 586: /* condition: fully_specified_type IDENTIFIER EQUAL initializer */ -#line 3831 "MachineIndependent/glslang.y" + case 596: /* condition: fully_specified_type IDENTIFIER EQUAL initializer */ +#line 3837 "MachineIndependent/glslang.y" { parseContext.boolCheck((yyvsp[-2].lex).loc, (yyvsp[-3].interm.type)); @@ -11263,29 +11416,29 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); else (yyval.interm.intermTypedNode) = 0; } -#line 11267 "MachineIndependent/glslang_tab.cpp" +#line 11420 "MachineIndependent/glslang_tab.cpp" break; - case 587: /* switch_statement: switch_statement_nonattributed */ -#line 3844 "MachineIndependent/glslang.y" + case 597: /* switch_statement: switch_statement_nonattributed */ +#line 3850 "MachineIndependent/glslang.y" { (yyval.interm.intermNode) = (yyvsp[0].interm.intermNode); } -#line 11275 "MachineIndependent/glslang_tab.cpp" +#line 11428 "MachineIndependent/glslang_tab.cpp" break; - case 588: /* switch_statement: attribute switch_statement_nonattributed */ -#line 3848 "MachineIndependent/glslang.y" + case 598: /* switch_statement: attribute switch_statement_nonattributed */ +#line 3853 "MachineIndependent/glslang.y" { parseContext.requireExtensions((yyvsp[0].interm.intermNode)->getLoc(), 1, &E_GL_EXT_control_flow_attributes, "attribute"); parseContext.handleSwitchAttributes(*(yyvsp[-1].interm.attributes), (yyvsp[0].interm.intermNode)); (yyval.interm.intermNode) = (yyvsp[0].interm.intermNode); } -#line 11285 "MachineIndependent/glslang_tab.cpp" +#line 11438 "MachineIndependent/glslang_tab.cpp" break; - case 589: /* $@9: %empty */ -#line 3856 "MachineIndependent/glslang.y" + case 599: /* $@9: %empty */ +#line 3860 "MachineIndependent/glslang.y" { // start new switch sequence on the switch stack ++parseContext.controlFlowNestingLevel; @@ -11294,11 +11447,11 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); parseContext.switchLevel.push_back(parseContext.statementNestingLevel); parseContext.symbolTable.push(); } -#line 11298 "MachineIndependent/glslang_tab.cpp" +#line 11451 "MachineIndependent/glslang_tab.cpp" break; - case 590: /* switch_statement_nonattributed: SWITCH LEFT_PAREN expression RIGHT_PAREN $@9 LEFT_BRACE switch_statement_list RIGHT_BRACE */ -#line 3864 "MachineIndependent/glslang.y" + case 600: /* switch_statement_nonattributed: SWITCH LEFT_PAREN expression RIGHT_PAREN $@9 LEFT_BRACE switch_statement_list RIGHT_BRACE */ +#line 3868 "MachineIndependent/glslang.y" { (yyval.interm.intermNode) = parseContext.addSwitch((yyvsp[-7].lex).loc, (yyvsp[-5].interm.intermTypedNode), (yyvsp[-1].interm.intermNode) ? (yyvsp[-1].interm.intermNode)->getAsAggregate() : 0); delete parseContext.switchSequenceStack.back(); @@ -11308,27 +11461,27 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); --parseContext.statementNestingLevel; --parseContext.controlFlowNestingLevel; } -#line 11312 "MachineIndependent/glslang_tab.cpp" +#line 11465 "MachineIndependent/glslang_tab.cpp" break; - case 591: /* switch_statement_list: %empty */ -#line 3876 "MachineIndependent/glslang.y" + case 601: /* switch_statement_list: %empty */ +#line 3880 "MachineIndependent/glslang.y" { (yyval.interm.intermNode) = 0; } -#line 11320 "MachineIndependent/glslang_tab.cpp" +#line 11473 "MachineIndependent/glslang_tab.cpp" break; - case 592: /* switch_statement_list: statement_list */ -#line 3879 "MachineIndependent/glslang.y" + case 602: /* switch_statement_list: statement_list */ +#line 3883 "MachineIndependent/glslang.y" { (yyval.interm.intermNode) = (yyvsp[0].interm.intermNode); } -#line 11328 "MachineIndependent/glslang_tab.cpp" +#line 11481 "MachineIndependent/glslang_tab.cpp" break; - case 593: /* case_label: CASE expression COLON */ -#line 3885 "MachineIndependent/glslang.y" + case 603: /* case_label: CASE expression COLON */ +#line 3889 "MachineIndependent/glslang.y" { (yyval.interm.intermNode) = 0; if (parseContext.switchLevel.size() == 0) @@ -11341,11 +11494,11 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); (yyval.interm.intermNode) = parseContext.intermediate.addBranch(EOpCase, (yyvsp[-1].interm.intermTypedNode), (yyvsp[-2].lex).loc); } } -#line 11345 "MachineIndependent/glslang_tab.cpp" +#line 11498 "MachineIndependent/glslang_tab.cpp" break; - case 594: /* case_label: DEFAULT COLON */ -#line 3897 "MachineIndependent/glslang.y" + case 604: /* case_label: DEFAULT COLON */ +#line 3901 "MachineIndependent/glslang.y" { (yyval.interm.intermNode) = 0; if (parseContext.switchLevel.size() == 0) @@ -11355,29 +11508,29 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); else (yyval.interm.intermNode) = parseContext.intermediate.addBranch(EOpDefault, (yyvsp[-1].lex).loc); } -#line 11359 "MachineIndependent/glslang_tab.cpp" +#line 11512 "MachineIndependent/glslang_tab.cpp" break; - case 595: /* iteration_statement: iteration_statement_nonattributed */ -#line 3909 "MachineIndependent/glslang.y" + case 605: /* iteration_statement: iteration_statement_nonattributed */ +#line 3913 "MachineIndependent/glslang.y" { (yyval.interm.intermNode) = (yyvsp[0].interm.intermNode); } -#line 11367 "MachineIndependent/glslang_tab.cpp" +#line 11520 "MachineIndependent/glslang_tab.cpp" break; - case 596: /* iteration_statement: attribute iteration_statement_nonattributed */ -#line 3913 "MachineIndependent/glslang.y" + case 606: /* iteration_statement: attribute iteration_statement_nonattributed */ +#line 3916 "MachineIndependent/glslang.y" { parseContext.requireExtensions((yyvsp[0].interm.intermNode)->getLoc(), 1, &E_GL_EXT_control_flow_attributes, "attribute"); parseContext.handleLoopAttributes(*(yyvsp[-1].interm.attributes), (yyvsp[0].interm.intermNode)); (yyval.interm.intermNode) = (yyvsp[0].interm.intermNode); } -#line 11377 "MachineIndependent/glslang_tab.cpp" +#line 11530 "MachineIndependent/glslang_tab.cpp" break; - case 597: /* $@10: %empty */ -#line 3921 "MachineIndependent/glslang.y" + case 607: /* $@10: %empty */ +#line 3923 "MachineIndependent/glslang.y" { if (! parseContext.limits.whileLoops) parseContext.error((yyvsp[-1].lex).loc, "while loops not available", "limitation", ""); @@ -11386,11 +11539,11 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); ++parseContext.statementNestingLevel; ++parseContext.controlFlowNestingLevel; } -#line 11390 "MachineIndependent/glslang_tab.cpp" +#line 11543 "MachineIndependent/glslang_tab.cpp" break; - case 598: /* iteration_statement_nonattributed: WHILE LEFT_PAREN $@10 condition RIGHT_PAREN statement_no_new_scope */ -#line 3929 "MachineIndependent/glslang.y" + case 608: /* iteration_statement_nonattributed: WHILE LEFT_PAREN $@10 condition RIGHT_PAREN statement_no_new_scope */ +#line 3931 "MachineIndependent/glslang.y" { parseContext.symbolTable.pop(&parseContext.defaultPrecision[0]); (yyval.interm.intermNode) = parseContext.intermediate.addLoop((yyvsp[0].interm.intermNode), (yyvsp[-2].interm.intermTypedNode), 0, true, (yyvsp[-5].lex).loc); @@ -11398,22 +11551,22 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); --parseContext.statementNestingLevel; --parseContext.controlFlowNestingLevel; } -#line 11402 "MachineIndependent/glslang_tab.cpp" +#line 11555 "MachineIndependent/glslang_tab.cpp" break; - case 599: /* $@11: %empty */ -#line 3936 "MachineIndependent/glslang.y" + case 609: /* $@11: %empty */ +#line 3938 "MachineIndependent/glslang.y" { parseContext.symbolTable.push(); ++parseContext.loopNestingLevel; ++parseContext.statementNestingLevel; ++parseContext.controlFlowNestingLevel; } -#line 11413 "MachineIndependent/glslang_tab.cpp" +#line 11566 "MachineIndependent/glslang_tab.cpp" break; - case 600: /* iteration_statement_nonattributed: DO $@11 statement WHILE LEFT_PAREN expression RIGHT_PAREN SEMICOLON */ -#line 3942 "MachineIndependent/glslang.y" + case 610: /* iteration_statement_nonattributed: DO $@11 statement WHILE LEFT_PAREN expression RIGHT_PAREN SEMICOLON */ +#line 3944 "MachineIndependent/glslang.y" { if (! parseContext.limits.whileLoops) parseContext.error((yyvsp[-7].lex).loc, "do-while loops not available", "limitation", ""); @@ -11426,22 +11579,22 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); --parseContext.statementNestingLevel; --parseContext.controlFlowNestingLevel; } -#line 11430 "MachineIndependent/glslang_tab.cpp" +#line 11583 "MachineIndependent/glslang_tab.cpp" break; - case 601: /* $@12: %empty */ -#line 3954 "MachineIndependent/glslang.y" + case 611: /* $@12: %empty */ +#line 3956 "MachineIndependent/glslang.y" { parseContext.symbolTable.push(); ++parseContext.loopNestingLevel; ++parseContext.statementNestingLevel; ++parseContext.controlFlowNestingLevel; } -#line 11441 "MachineIndependent/glslang_tab.cpp" +#line 11594 "MachineIndependent/glslang_tab.cpp" break; - case 602: /* iteration_statement_nonattributed: FOR LEFT_PAREN $@12 for_init_statement for_rest_statement RIGHT_PAREN statement_no_new_scope */ -#line 3960 "MachineIndependent/glslang.y" + case 612: /* iteration_statement_nonattributed: FOR LEFT_PAREN $@12 for_init_statement for_rest_statement RIGHT_PAREN statement_no_new_scope */ +#line 3962 "MachineIndependent/glslang.y" { parseContext.symbolTable.pop(&parseContext.defaultPrecision[0]); (yyval.interm.intermNode) = parseContext.intermediate.makeAggregate((yyvsp[-3].interm.intermNode), (yyvsp[-5].lex).loc); @@ -11454,81 +11607,81 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); --parseContext.statementNestingLevel; --parseContext.controlFlowNestingLevel; } -#line 11458 "MachineIndependent/glslang_tab.cpp" +#line 11611 "MachineIndependent/glslang_tab.cpp" break; - case 603: /* for_init_statement: expression_statement */ -#line 3975 "MachineIndependent/glslang.y" + case 613: /* for_init_statement: expression_statement */ +#line 3977 "MachineIndependent/glslang.y" { (yyval.interm.intermNode) = (yyvsp[0].interm.intermNode); } -#line 11466 "MachineIndependent/glslang_tab.cpp" +#line 11619 "MachineIndependent/glslang_tab.cpp" break; - case 604: /* for_init_statement: declaration_statement */ -#line 3978 "MachineIndependent/glslang.y" + case 614: /* for_init_statement: declaration_statement */ +#line 3980 "MachineIndependent/glslang.y" { (yyval.interm.intermNode) = (yyvsp[0].interm.intermNode); } -#line 11474 "MachineIndependent/glslang_tab.cpp" +#line 11627 "MachineIndependent/glslang_tab.cpp" break; - case 605: /* conditionopt: condition */ -#line 3984 "MachineIndependent/glslang.y" + case 615: /* conditionopt: condition */ +#line 3986 "MachineIndependent/glslang.y" { (yyval.interm.intermTypedNode) = (yyvsp[0].interm.intermTypedNode); } -#line 11482 "MachineIndependent/glslang_tab.cpp" +#line 11635 "MachineIndependent/glslang_tab.cpp" break; - case 606: /* conditionopt: %empty */ -#line 3987 "MachineIndependent/glslang.y" + case 616: /* conditionopt: %empty */ +#line 3989 "MachineIndependent/glslang.y" { (yyval.interm.intermTypedNode) = 0; } -#line 11490 "MachineIndependent/glslang_tab.cpp" +#line 11643 "MachineIndependent/glslang_tab.cpp" break; - case 607: /* for_rest_statement: conditionopt SEMICOLON */ -#line 3993 "MachineIndependent/glslang.y" + case 617: /* for_rest_statement: conditionopt SEMICOLON */ +#line 3995 "MachineIndependent/glslang.y" { (yyval.interm.nodePair).node1 = (yyvsp[-1].interm.intermTypedNode); (yyval.interm.nodePair).node2 = 0; } -#line 11499 "MachineIndependent/glslang_tab.cpp" +#line 11652 "MachineIndependent/glslang_tab.cpp" break; - case 608: /* for_rest_statement: conditionopt SEMICOLON expression */ -#line 3997 "MachineIndependent/glslang.y" + case 618: /* for_rest_statement: conditionopt SEMICOLON expression */ +#line 3999 "MachineIndependent/glslang.y" { (yyval.interm.nodePair).node1 = (yyvsp[-2].interm.intermTypedNode); (yyval.interm.nodePair).node2 = (yyvsp[0].interm.intermTypedNode); } -#line 11508 "MachineIndependent/glslang_tab.cpp" +#line 11661 "MachineIndependent/glslang_tab.cpp" break; - case 609: /* jump_statement: CONTINUE SEMICOLON */ -#line 4004 "MachineIndependent/glslang.y" + case 619: /* jump_statement: CONTINUE SEMICOLON */ +#line 4006 "MachineIndependent/glslang.y" { if (parseContext.loopNestingLevel <= 0) parseContext.error((yyvsp[-1].lex).loc, "continue statement only allowed in loops", "", ""); (yyval.interm.intermNode) = parseContext.intermediate.addBranch(EOpContinue, (yyvsp[-1].lex).loc); } -#line 11518 "MachineIndependent/glslang_tab.cpp" +#line 11671 "MachineIndependent/glslang_tab.cpp" break; - case 610: /* jump_statement: BREAK SEMICOLON */ -#line 4009 "MachineIndependent/glslang.y" + case 620: /* jump_statement: BREAK SEMICOLON */ +#line 4011 "MachineIndependent/glslang.y" { if (parseContext.loopNestingLevel + parseContext.switchSequenceStack.size() <= 0) parseContext.error((yyvsp[-1].lex).loc, "break statement only allowed in switch and loops", "", ""); (yyval.interm.intermNode) = parseContext.intermediate.addBranch(EOpBreak, (yyvsp[-1].lex).loc); } -#line 11528 "MachineIndependent/glslang_tab.cpp" +#line 11681 "MachineIndependent/glslang_tab.cpp" break; - case 611: /* jump_statement: RETURN SEMICOLON */ -#line 4014 "MachineIndependent/glslang.y" + case 621: /* jump_statement: RETURN SEMICOLON */ +#line 4016 "MachineIndependent/glslang.y" { (yyval.interm.intermNode) = parseContext.intermediate.addBranch(EOpReturn, (yyvsp[-1].lex).loc); if (parseContext.currentFunctionType->getBasicType() != EbtVoid) @@ -11536,63 +11689,63 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); if (parseContext.inMain) parseContext.postEntryPointReturn = true; } -#line 11540 "MachineIndependent/glslang_tab.cpp" +#line 11693 "MachineIndependent/glslang_tab.cpp" break; - case 612: /* jump_statement: RETURN expression SEMICOLON */ -#line 4021 "MachineIndependent/glslang.y" + case 622: /* jump_statement: RETURN expression SEMICOLON */ +#line 4023 "MachineIndependent/glslang.y" { (yyval.interm.intermNode) = parseContext.handleReturnValue((yyvsp[-2].lex).loc, (yyvsp[-1].interm.intermTypedNode)); } -#line 11548 "MachineIndependent/glslang_tab.cpp" +#line 11701 "MachineIndependent/glslang_tab.cpp" break; - case 613: /* jump_statement: DISCARD SEMICOLON */ -#line 4024 "MachineIndependent/glslang.y" + case 623: /* jump_statement: DISCARD SEMICOLON */ +#line 4026 "MachineIndependent/glslang.y" { parseContext.requireStage((yyvsp[-1].lex).loc, EShLangFragment, "discard"); (yyval.interm.intermNode) = parseContext.intermediate.addBranch(EOpKill, (yyvsp[-1].lex).loc); } -#line 11557 "MachineIndependent/glslang_tab.cpp" +#line 11710 "MachineIndependent/glslang_tab.cpp" break; - case 614: /* jump_statement: TERMINATE_INVOCATION SEMICOLON */ -#line 4028 "MachineIndependent/glslang.y" + case 624: /* jump_statement: TERMINATE_INVOCATION SEMICOLON */ +#line 4030 "MachineIndependent/glslang.y" { parseContext.requireStage((yyvsp[-1].lex).loc, EShLangFragment, "terminateInvocation"); (yyval.interm.intermNode) = parseContext.intermediate.addBranch(EOpTerminateInvocation, (yyvsp[-1].lex).loc); } -#line 11566 "MachineIndependent/glslang_tab.cpp" +#line 11719 "MachineIndependent/glslang_tab.cpp" break; - case 615: /* jump_statement: TERMINATE_RAY SEMICOLON */ -#line 4033 "MachineIndependent/glslang.y" + case 625: /* jump_statement: TERMINATE_RAY SEMICOLON */ +#line 4034 "MachineIndependent/glslang.y" { parseContext.requireStage((yyvsp[-1].lex).loc, EShLangAnyHit, "terminateRayEXT"); (yyval.interm.intermNode) = parseContext.intermediate.addBranch(EOpTerminateRayKHR, (yyvsp[-1].lex).loc); } -#line 11575 "MachineIndependent/glslang_tab.cpp" +#line 11728 "MachineIndependent/glslang_tab.cpp" break; - case 616: /* jump_statement: IGNORE_INTERSECTION SEMICOLON */ -#line 4037 "MachineIndependent/glslang.y" + case 626: /* jump_statement: IGNORE_INTERSECTION SEMICOLON */ +#line 4038 "MachineIndependent/glslang.y" { parseContext.requireStage((yyvsp[-1].lex).loc, EShLangAnyHit, "ignoreIntersectionEXT"); (yyval.interm.intermNode) = parseContext.intermediate.addBranch(EOpIgnoreIntersectionKHR, (yyvsp[-1].lex).loc); } -#line 11584 "MachineIndependent/glslang_tab.cpp" +#line 11737 "MachineIndependent/glslang_tab.cpp" break; - case 617: /* translation_unit: external_declaration */ + case 627: /* translation_unit: external_declaration */ #line 4047 "MachineIndependent/glslang.y" { (yyval.interm.intermNode) = (yyvsp[0].interm.intermNode); parseContext.intermediate.setTreeRoot((yyval.interm.intermNode)); } -#line 11593 "MachineIndependent/glslang_tab.cpp" +#line 11746 "MachineIndependent/glslang_tab.cpp" break; - case 618: /* translation_unit: translation_unit external_declaration */ + case 628: /* translation_unit: translation_unit external_declaration */ #line 4051 "MachineIndependent/glslang.y" { if ((yyvsp[0].interm.intermNode) != nullptr) { @@ -11600,37 +11753,37 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); parseContext.intermediate.setTreeRoot((yyval.interm.intermNode)); } } -#line 11604 "MachineIndependent/glslang_tab.cpp" +#line 11757 "MachineIndependent/glslang_tab.cpp" break; - case 619: /* external_declaration: function_definition */ + case 629: /* external_declaration: function_definition */ #line 4060 "MachineIndependent/glslang.y" { (yyval.interm.intermNode) = (yyvsp[0].interm.intermNode); } -#line 11612 "MachineIndependent/glslang_tab.cpp" +#line 11765 "MachineIndependent/glslang_tab.cpp" break; - case 620: /* external_declaration: declaration */ + case 630: /* external_declaration: declaration */ #line 4063 "MachineIndependent/glslang.y" { (yyval.interm.intermNode) = (yyvsp[0].interm.intermNode); } -#line 11620 "MachineIndependent/glslang_tab.cpp" +#line 11773 "MachineIndependent/glslang_tab.cpp" break; - case 621: /* external_declaration: SEMICOLON */ -#line 4067 "MachineIndependent/glslang.y" + case 631: /* external_declaration: SEMICOLON */ +#line 4066 "MachineIndependent/glslang.y" { parseContext.requireProfile((yyvsp[0].lex).loc, ~EEsProfile, "extraneous semicolon"); parseContext.profileRequires((yyvsp[0].lex).loc, ~EEsProfile, 460, nullptr, "extraneous semicolon"); (yyval.interm.intermNode) = nullptr; } -#line 11630 "MachineIndependent/glslang_tab.cpp" +#line 11783 "MachineIndependent/glslang_tab.cpp" break; - case 622: /* $@13: %empty */ -#line 4076 "MachineIndependent/glslang.y" + case 632: /* $@13: %empty */ +#line 4074 "MachineIndependent/glslang.y" { (yyvsp[0].interm).function = parseContext.handleFunctionDeclarator((yyvsp[0].interm).loc, *(yyvsp[0].interm).function, false /* not prototype */); (yyvsp[0].interm).intermNode = parseContext.handleFunctionDefinition((yyvsp[0].interm).loc, *(yyvsp[0].interm).function); @@ -11643,17 +11796,18 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); ++parseContext.statementNestingLevel; } } -#line 11647 "MachineIndependent/glslang_tab.cpp" +#line 11800 "MachineIndependent/glslang_tab.cpp" break; - case 623: /* function_definition: function_prototype $@13 compound_statement_no_new_scope */ -#line 4088 "MachineIndependent/glslang.y" + case 633: /* function_definition: function_prototype $@13 compound_statement_no_new_scope */ +#line 4086 "MachineIndependent/glslang.y" { // May be best done as post process phase on intermediate code if (parseContext.currentFunctionType->getBasicType() != EbtVoid && ! parseContext.functionReturnsValue) parseContext.error((yyvsp[-2].interm).loc, "function does not return a value:", "", (yyvsp[-2].interm).function->getName().c_str()); parseContext.symbolTable.pop(&parseContext.defaultPrecision[0]); (yyval.interm.intermNode) = parseContext.intermediate.growAggregate((yyvsp[-2].interm).intermNode, (yyvsp[0].interm.intermNode)); + (yyval.interm.intermNode)->getAsAggregate()->setLinkType((yyvsp[-2].interm).function->getLinkType()); parseContext.intermediate.setAggregateOperator((yyval.interm.intermNode), EOpFunction, (yyvsp[-2].interm).function->getType(), (yyvsp[-2].interm).loc); (yyval.interm.intermNode)->getAsAggregate()->setName((yyvsp[-2].interm).function->getMangledName().c_str()); @@ -11674,228 +11828,228 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); --parseContext.statementNestingLevel; } } -#line 11678 "MachineIndependent/glslang_tab.cpp" +#line 11832 "MachineIndependent/glslang_tab.cpp" break; - case 624: /* attribute: LEFT_BRACKET LEFT_BRACKET attribute_list RIGHT_BRACKET RIGHT_BRACKET */ -#line 4118 "MachineIndependent/glslang.y" + case 634: /* attribute: LEFT_BRACKET LEFT_BRACKET attribute_list RIGHT_BRACKET RIGHT_BRACKET */ +#line 4116 "MachineIndependent/glslang.y" { (yyval.interm.attributes) = (yyvsp[-2].interm.attributes); } -#line 11686 "MachineIndependent/glslang_tab.cpp" +#line 11840 "MachineIndependent/glslang_tab.cpp" break; - case 625: /* attribute_list: single_attribute */ -#line 4123 "MachineIndependent/glslang.y" + case 635: /* attribute_list: single_attribute */ +#line 4121 "MachineIndependent/glslang.y" { (yyval.interm.attributes) = (yyvsp[0].interm.attributes); } -#line 11694 "MachineIndependent/glslang_tab.cpp" +#line 11848 "MachineIndependent/glslang_tab.cpp" break; - case 626: /* attribute_list: attribute_list COMMA single_attribute */ -#line 4126 "MachineIndependent/glslang.y" + case 636: /* attribute_list: attribute_list COMMA single_attribute */ +#line 4124 "MachineIndependent/glslang.y" { (yyval.interm.attributes) = parseContext.mergeAttributes((yyvsp[-2].interm.attributes), (yyvsp[0].interm.attributes)); } -#line 11702 "MachineIndependent/glslang_tab.cpp" +#line 11856 "MachineIndependent/glslang_tab.cpp" break; - case 627: /* single_attribute: IDENTIFIER */ -#line 4131 "MachineIndependent/glslang.y" + case 637: /* single_attribute: IDENTIFIER */ +#line 4129 "MachineIndependent/glslang.y" { (yyval.interm.attributes) = parseContext.makeAttributes(*(yyvsp[0].lex).string); } -#line 11710 "MachineIndependent/glslang_tab.cpp" +#line 11864 "MachineIndependent/glslang_tab.cpp" break; - case 628: /* single_attribute: IDENTIFIER LEFT_PAREN constant_expression RIGHT_PAREN */ -#line 4134 "MachineIndependent/glslang.y" + case 638: /* single_attribute: IDENTIFIER LEFT_PAREN constant_expression RIGHT_PAREN */ +#line 4132 "MachineIndependent/glslang.y" { (yyval.interm.attributes) = parseContext.makeAttributes(*(yyvsp[-3].lex).string, (yyvsp[-1].interm.intermTypedNode)); } -#line 11718 "MachineIndependent/glslang_tab.cpp" +#line 11872 "MachineIndependent/glslang_tab.cpp" break; - case 629: /* spirv_requirements_list: spirv_requirements_parameter */ -#line 4141 "MachineIndependent/glslang.y" + case 639: /* spirv_requirements_list: spirv_requirements_parameter */ +#line 4137 "MachineIndependent/glslang.y" { (yyval.interm.spirvReq) = (yyvsp[0].interm.spirvReq); } -#line 11726 "MachineIndependent/glslang_tab.cpp" +#line 11880 "MachineIndependent/glslang_tab.cpp" break; - case 630: /* spirv_requirements_list: spirv_requirements_list COMMA spirv_requirements_parameter */ -#line 4144 "MachineIndependent/glslang.y" + case 640: /* spirv_requirements_list: spirv_requirements_list COMMA spirv_requirements_parameter */ +#line 4140 "MachineIndependent/glslang.y" { (yyval.interm.spirvReq) = parseContext.mergeSpirvRequirements((yyvsp[-1].lex).loc, (yyvsp[-2].interm.spirvReq), (yyvsp[0].interm.spirvReq)); } -#line 11734 "MachineIndependent/glslang_tab.cpp" +#line 11888 "MachineIndependent/glslang_tab.cpp" break; - case 631: /* spirv_requirements_parameter: IDENTIFIER EQUAL LEFT_BRACKET spirv_extension_list RIGHT_BRACKET */ -#line 4149 "MachineIndependent/glslang.y" + case 641: /* spirv_requirements_parameter: IDENTIFIER EQUAL LEFT_BRACKET spirv_extension_list RIGHT_BRACKET */ +#line 4145 "MachineIndependent/glslang.y" { (yyval.interm.spirvReq) = parseContext.makeSpirvRequirement((yyvsp[-3].lex).loc, *(yyvsp[-4].lex).string, (yyvsp[-1].interm.intermNode)->getAsAggregate(), nullptr); } -#line 11742 "MachineIndependent/glslang_tab.cpp" +#line 11896 "MachineIndependent/glslang_tab.cpp" break; - case 632: /* spirv_requirements_parameter: IDENTIFIER EQUAL LEFT_BRACKET spirv_capability_list RIGHT_BRACKET */ -#line 4152 "MachineIndependent/glslang.y" + case 642: /* spirv_requirements_parameter: IDENTIFIER EQUAL LEFT_BRACKET spirv_capability_list RIGHT_BRACKET */ +#line 4148 "MachineIndependent/glslang.y" { (yyval.interm.spirvReq) = parseContext.makeSpirvRequirement((yyvsp[-3].lex).loc, *(yyvsp[-4].lex).string, nullptr, (yyvsp[-1].interm.intermNode)->getAsAggregate()); } -#line 11750 "MachineIndependent/glslang_tab.cpp" +#line 11904 "MachineIndependent/glslang_tab.cpp" break; - case 633: /* spirv_extension_list: STRING_LITERAL */ -#line 4157 "MachineIndependent/glslang.y" + case 643: /* spirv_extension_list: STRING_LITERAL */ +#line 4153 "MachineIndependent/glslang.y" { (yyval.interm.intermNode) = parseContext.intermediate.makeAggregate(parseContext.intermediate.addConstantUnion((yyvsp[0].lex).string, (yyvsp[0].lex).loc, true)); } -#line 11758 "MachineIndependent/glslang_tab.cpp" +#line 11912 "MachineIndependent/glslang_tab.cpp" break; - case 634: /* spirv_extension_list: spirv_extension_list COMMA STRING_LITERAL */ -#line 4160 "MachineIndependent/glslang.y" + case 644: /* spirv_extension_list: spirv_extension_list COMMA STRING_LITERAL */ +#line 4156 "MachineIndependent/glslang.y" { (yyval.interm.intermNode) = parseContext.intermediate.growAggregate((yyvsp[-2].interm.intermNode), parseContext.intermediate.addConstantUnion((yyvsp[0].lex).string, (yyvsp[0].lex).loc, true)); } -#line 11766 "MachineIndependent/glslang_tab.cpp" +#line 11920 "MachineIndependent/glslang_tab.cpp" break; - case 635: /* spirv_capability_list: INTCONSTANT */ -#line 4165 "MachineIndependent/glslang.y" + case 645: /* spirv_capability_list: INTCONSTANT */ +#line 4161 "MachineIndependent/glslang.y" { (yyval.interm.intermNode) = parseContext.intermediate.makeAggregate(parseContext.intermediate.addConstantUnion((yyvsp[0].lex).i, (yyvsp[0].lex).loc, true)); } -#line 11774 "MachineIndependent/glslang_tab.cpp" +#line 11928 "MachineIndependent/glslang_tab.cpp" break; - case 636: /* spirv_capability_list: spirv_capability_list COMMA INTCONSTANT */ -#line 4168 "MachineIndependent/glslang.y" + case 646: /* spirv_capability_list: spirv_capability_list COMMA INTCONSTANT */ +#line 4164 "MachineIndependent/glslang.y" { (yyval.interm.intermNode) = parseContext.intermediate.growAggregate((yyvsp[-2].interm.intermNode), parseContext.intermediate.addConstantUnion((yyvsp[0].lex).i, (yyvsp[0].lex).loc, true)); } -#line 11782 "MachineIndependent/glslang_tab.cpp" +#line 11936 "MachineIndependent/glslang_tab.cpp" break; - case 637: /* spirv_execution_mode_qualifier: SPIRV_EXECUTION_MODE LEFT_PAREN INTCONSTANT RIGHT_PAREN */ -#line 4173 "MachineIndependent/glslang.y" + case 647: /* spirv_execution_mode_qualifier: SPIRV_EXECUTION_MODE LEFT_PAREN INTCONSTANT RIGHT_PAREN */ +#line 4169 "MachineIndependent/glslang.y" { parseContext.intermediate.insertSpirvExecutionMode((yyvsp[-1].lex).i); (yyval.interm.intermNode) = 0; } -#line 11791 "MachineIndependent/glslang_tab.cpp" +#line 11945 "MachineIndependent/glslang_tab.cpp" break; - case 638: /* spirv_execution_mode_qualifier: SPIRV_EXECUTION_MODE LEFT_PAREN spirv_requirements_list COMMA INTCONSTANT RIGHT_PAREN */ -#line 4177 "MachineIndependent/glslang.y" + case 648: /* spirv_execution_mode_qualifier: SPIRV_EXECUTION_MODE LEFT_PAREN spirv_requirements_list COMMA INTCONSTANT RIGHT_PAREN */ +#line 4173 "MachineIndependent/glslang.y" { parseContext.intermediate.insertSpirvRequirement((yyvsp[-3].interm.spirvReq)); parseContext.intermediate.insertSpirvExecutionMode((yyvsp[-1].lex).i); (yyval.interm.intermNode) = 0; } -#line 11801 "MachineIndependent/glslang_tab.cpp" +#line 11955 "MachineIndependent/glslang_tab.cpp" break; - case 639: /* spirv_execution_mode_qualifier: SPIRV_EXECUTION_MODE LEFT_PAREN INTCONSTANT COMMA spirv_execution_mode_parameter_list RIGHT_PAREN */ -#line 4182 "MachineIndependent/glslang.y" + case 649: /* spirv_execution_mode_qualifier: SPIRV_EXECUTION_MODE LEFT_PAREN INTCONSTANT COMMA spirv_execution_mode_parameter_list RIGHT_PAREN */ +#line 4178 "MachineIndependent/glslang.y" { parseContext.intermediate.insertSpirvExecutionMode((yyvsp[-3].lex).i, (yyvsp[-1].interm.intermNode)->getAsAggregate()); (yyval.interm.intermNode) = 0; } -#line 11810 "MachineIndependent/glslang_tab.cpp" +#line 11964 "MachineIndependent/glslang_tab.cpp" break; - case 640: /* spirv_execution_mode_qualifier: SPIRV_EXECUTION_MODE LEFT_PAREN spirv_requirements_list COMMA INTCONSTANT COMMA spirv_execution_mode_parameter_list RIGHT_PAREN */ -#line 4186 "MachineIndependent/glslang.y" + case 650: /* spirv_execution_mode_qualifier: SPIRV_EXECUTION_MODE LEFT_PAREN spirv_requirements_list COMMA INTCONSTANT COMMA spirv_execution_mode_parameter_list RIGHT_PAREN */ +#line 4182 "MachineIndependent/glslang.y" { parseContext.intermediate.insertSpirvRequirement((yyvsp[-5].interm.spirvReq)); parseContext.intermediate.insertSpirvExecutionMode((yyvsp[-3].lex).i, (yyvsp[-1].interm.intermNode)->getAsAggregate()); (yyval.interm.intermNode) = 0; } -#line 11820 "MachineIndependent/glslang_tab.cpp" +#line 11974 "MachineIndependent/glslang_tab.cpp" break; - case 641: /* spirv_execution_mode_qualifier: SPIRV_EXECUTION_MODE_ID LEFT_PAREN INTCONSTANT COMMA spirv_execution_mode_id_parameter_list RIGHT_PAREN */ -#line 4191 "MachineIndependent/glslang.y" + case 651: /* spirv_execution_mode_qualifier: SPIRV_EXECUTION_MODE_ID LEFT_PAREN INTCONSTANT COMMA spirv_execution_mode_id_parameter_list RIGHT_PAREN */ +#line 4187 "MachineIndependent/glslang.y" { parseContext.intermediate.insertSpirvExecutionModeId((yyvsp[-3].lex).i, (yyvsp[-1].interm.intermNode)->getAsAggregate()); (yyval.interm.intermNode) = 0; } -#line 11829 "MachineIndependent/glslang_tab.cpp" +#line 11983 "MachineIndependent/glslang_tab.cpp" break; - case 642: /* spirv_execution_mode_qualifier: SPIRV_EXECUTION_MODE_ID LEFT_PAREN spirv_requirements_list COMMA INTCONSTANT COMMA spirv_execution_mode_id_parameter_list RIGHT_PAREN */ -#line 4195 "MachineIndependent/glslang.y" + case 652: /* spirv_execution_mode_qualifier: SPIRV_EXECUTION_MODE_ID LEFT_PAREN spirv_requirements_list COMMA INTCONSTANT COMMA spirv_execution_mode_id_parameter_list RIGHT_PAREN */ +#line 4191 "MachineIndependent/glslang.y" { parseContext.intermediate.insertSpirvRequirement((yyvsp[-5].interm.spirvReq)); parseContext.intermediate.insertSpirvExecutionModeId((yyvsp[-3].lex).i, (yyvsp[-1].interm.intermNode)->getAsAggregate()); (yyval.interm.intermNode) = 0; } -#line 11839 "MachineIndependent/glslang_tab.cpp" +#line 11993 "MachineIndependent/glslang_tab.cpp" break; - case 643: /* spirv_execution_mode_parameter_list: spirv_execution_mode_parameter */ -#line 4202 "MachineIndependent/glslang.y" + case 653: /* spirv_execution_mode_parameter_list: spirv_execution_mode_parameter */ +#line 4198 "MachineIndependent/glslang.y" { (yyval.interm.intermNode) = parseContext.intermediate.makeAggregate((yyvsp[0].interm.intermNode)); } -#line 11847 "MachineIndependent/glslang_tab.cpp" +#line 12001 "MachineIndependent/glslang_tab.cpp" break; - case 644: /* spirv_execution_mode_parameter_list: spirv_execution_mode_parameter_list COMMA spirv_execution_mode_parameter */ -#line 4205 "MachineIndependent/glslang.y" + case 654: /* spirv_execution_mode_parameter_list: spirv_execution_mode_parameter_list COMMA spirv_execution_mode_parameter */ +#line 4201 "MachineIndependent/glslang.y" { (yyval.interm.intermNode) = parseContext.intermediate.growAggregate((yyvsp[-2].interm.intermNode), (yyvsp[0].interm.intermNode)); } -#line 11855 "MachineIndependent/glslang_tab.cpp" +#line 12009 "MachineIndependent/glslang_tab.cpp" break; - case 645: /* spirv_execution_mode_parameter: FLOATCONSTANT */ -#line 4210 "MachineIndependent/glslang.y" + case 655: /* spirv_execution_mode_parameter: FLOATCONSTANT */ +#line 4206 "MachineIndependent/glslang.y" { (yyval.interm.intermNode) = parseContext.intermediate.addConstantUnion((yyvsp[0].lex).d, EbtFloat, (yyvsp[0].lex).loc, true); } -#line 11863 "MachineIndependent/glslang_tab.cpp" +#line 12017 "MachineIndependent/glslang_tab.cpp" break; - case 646: /* spirv_execution_mode_parameter: INTCONSTANT */ -#line 4213 "MachineIndependent/glslang.y" + case 656: /* spirv_execution_mode_parameter: INTCONSTANT */ +#line 4209 "MachineIndependent/glslang.y" { (yyval.interm.intermNode) = parseContext.intermediate.addConstantUnion((yyvsp[0].lex).i, (yyvsp[0].lex).loc, true); } -#line 11871 "MachineIndependent/glslang_tab.cpp" +#line 12025 "MachineIndependent/glslang_tab.cpp" break; - case 647: /* spirv_execution_mode_parameter: UINTCONSTANT */ -#line 4216 "MachineIndependent/glslang.y" + case 657: /* spirv_execution_mode_parameter: UINTCONSTANT */ +#line 4212 "MachineIndependent/glslang.y" { (yyval.interm.intermNode) = parseContext.intermediate.addConstantUnion((yyvsp[0].lex).u, (yyvsp[0].lex).loc, true); } -#line 11879 "MachineIndependent/glslang_tab.cpp" +#line 12033 "MachineIndependent/glslang_tab.cpp" break; - case 648: /* spirv_execution_mode_parameter: BOOLCONSTANT */ -#line 4219 "MachineIndependent/glslang.y" + case 658: /* spirv_execution_mode_parameter: BOOLCONSTANT */ +#line 4215 "MachineIndependent/glslang.y" { (yyval.interm.intermNode) = parseContext.intermediate.addConstantUnion((yyvsp[0].lex).b, (yyvsp[0].lex).loc, true); } -#line 11887 "MachineIndependent/glslang_tab.cpp" +#line 12041 "MachineIndependent/glslang_tab.cpp" break; - case 649: /* spirv_execution_mode_parameter: STRING_LITERAL */ -#line 4222 "MachineIndependent/glslang.y" + case 659: /* spirv_execution_mode_parameter: STRING_LITERAL */ +#line 4218 "MachineIndependent/glslang.y" { (yyval.interm.intermNode) = parseContext.intermediate.addConstantUnion((yyvsp[0].lex).string, (yyvsp[0].lex).loc, true); } -#line 11895 "MachineIndependent/glslang_tab.cpp" +#line 12049 "MachineIndependent/glslang_tab.cpp" break; - case 650: /* spirv_execution_mode_id_parameter_list: constant_expression */ -#line 4227 "MachineIndependent/glslang.y" + case 660: /* spirv_execution_mode_id_parameter_list: constant_expression */ +#line 4223 "MachineIndependent/glslang.y" { if ((yyvsp[0].interm.intermTypedNode)->getBasicType() != EbtFloat && (yyvsp[0].interm.intermTypedNode)->getBasicType() != EbtInt && @@ -11905,11 +12059,11 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); parseContext.error((yyvsp[0].interm.intermTypedNode)->getLoc(), "this type not allowed", (yyvsp[0].interm.intermTypedNode)->getType().getBasicString(), ""); (yyval.interm.intermNode) = parseContext.intermediate.makeAggregate((yyvsp[0].interm.intermTypedNode)); } -#line 11909 "MachineIndependent/glslang_tab.cpp" +#line 12063 "MachineIndependent/glslang_tab.cpp" break; - case 651: /* spirv_execution_mode_id_parameter_list: spirv_execution_mode_id_parameter_list COMMA constant_expression */ -#line 4236 "MachineIndependent/glslang.y" + case 661: /* spirv_execution_mode_id_parameter_list: spirv_execution_mode_id_parameter_list COMMA constant_expression */ +#line 4232 "MachineIndependent/glslang.y" { if ((yyvsp[0].interm.intermTypedNode)->getBasicType() != EbtFloat && (yyvsp[0].interm.intermTypedNode)->getBasicType() != EbtInt && @@ -11919,310 +12073,351 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); parseContext.error((yyvsp[0].interm.intermTypedNode)->getLoc(), "this type not allowed", (yyvsp[0].interm.intermTypedNode)->getType().getBasicString(), ""); (yyval.interm.intermNode) = parseContext.intermediate.growAggregate((yyvsp[-2].interm.intermNode), (yyvsp[0].interm.intermTypedNode)); } -#line 11923 "MachineIndependent/glslang_tab.cpp" +#line 12077 "MachineIndependent/glslang_tab.cpp" break; - case 652: /* spirv_storage_class_qualifier: SPIRV_STORAGE_CLASS LEFT_PAREN INTCONSTANT RIGHT_PAREN */ -#line 4247 "MachineIndependent/glslang.y" + case 662: /* spirv_storage_class_qualifier: SPIRV_STORAGE_CLASS LEFT_PAREN INTCONSTANT RIGHT_PAREN */ +#line 4243 "MachineIndependent/glslang.y" { (yyval.interm.type).init((yyvsp[-3].lex).loc); (yyval.interm.type).qualifier.storage = EvqSpirvStorageClass; (yyval.interm.type).qualifier.spirvStorageClass = (yyvsp[-1].lex).i; } -#line 11933 "MachineIndependent/glslang_tab.cpp" +#line 12087 "MachineIndependent/glslang_tab.cpp" break; - case 653: /* spirv_storage_class_qualifier: SPIRV_STORAGE_CLASS LEFT_PAREN spirv_requirements_list COMMA INTCONSTANT RIGHT_PAREN */ -#line 4252 "MachineIndependent/glslang.y" + case 663: /* spirv_storage_class_qualifier: SPIRV_STORAGE_CLASS LEFT_PAREN spirv_requirements_list COMMA INTCONSTANT RIGHT_PAREN */ +#line 4248 "MachineIndependent/glslang.y" { (yyval.interm.type).init((yyvsp[-5].lex).loc); parseContext.intermediate.insertSpirvRequirement((yyvsp[-3].interm.spirvReq)); (yyval.interm.type).qualifier.storage = EvqSpirvStorageClass; (yyval.interm.type).qualifier.spirvStorageClass = (yyvsp[-1].lex).i; } -#line 11944 "MachineIndependent/glslang_tab.cpp" +#line 12098 "MachineIndependent/glslang_tab.cpp" break; - case 654: /* spirv_decorate_qualifier: SPIRV_DECORATE LEFT_PAREN INTCONSTANT RIGHT_PAREN */ -#line 4260 "MachineIndependent/glslang.y" + case 664: /* spirv_decorate_qualifier: SPIRV_DECORATE LEFT_PAREN INTCONSTANT RIGHT_PAREN */ +#line 4256 "MachineIndependent/glslang.y" { (yyval.interm.type).init((yyvsp[-3].lex).loc); (yyval.interm.type).qualifier.setSpirvDecorate((yyvsp[-1].lex).i); } -#line 11953 "MachineIndependent/glslang_tab.cpp" +#line 12107 "MachineIndependent/glslang_tab.cpp" break; - case 655: /* spirv_decorate_qualifier: SPIRV_DECORATE LEFT_PAREN spirv_requirements_list COMMA INTCONSTANT RIGHT_PAREN */ -#line 4264 "MachineIndependent/glslang.y" + case 665: /* spirv_decorate_qualifier: SPIRV_DECORATE LEFT_PAREN spirv_requirements_list COMMA INTCONSTANT RIGHT_PAREN */ +#line 4260 "MachineIndependent/glslang.y" { (yyval.interm.type).init((yyvsp[-5].lex).loc); parseContext.intermediate.insertSpirvRequirement((yyvsp[-3].interm.spirvReq)); (yyval.interm.type).qualifier.setSpirvDecorate((yyvsp[-1].lex).i); } -#line 11963 "MachineIndependent/glslang_tab.cpp" +#line 12117 "MachineIndependent/glslang_tab.cpp" break; - case 656: /* spirv_decorate_qualifier: SPIRV_DECORATE LEFT_PAREN INTCONSTANT COMMA spirv_decorate_parameter_list RIGHT_PAREN */ -#line 4269 "MachineIndependent/glslang.y" + case 666: /* spirv_decorate_qualifier: SPIRV_DECORATE LEFT_PAREN INTCONSTANT COMMA spirv_decorate_parameter_list RIGHT_PAREN */ +#line 4265 "MachineIndependent/glslang.y" { (yyval.interm.type).init((yyvsp[-5].lex).loc); (yyval.interm.type).qualifier.setSpirvDecorate((yyvsp[-3].lex).i, (yyvsp[-1].interm.intermNode)->getAsAggregate()); } -#line 11972 "MachineIndependent/glslang_tab.cpp" +#line 12126 "MachineIndependent/glslang_tab.cpp" break; - case 657: /* spirv_decorate_qualifier: SPIRV_DECORATE LEFT_PAREN spirv_requirements_list COMMA INTCONSTANT COMMA spirv_decorate_parameter_list RIGHT_PAREN */ -#line 4273 "MachineIndependent/glslang.y" + case 667: /* spirv_decorate_qualifier: SPIRV_DECORATE LEFT_PAREN spirv_requirements_list COMMA INTCONSTANT COMMA spirv_decorate_parameter_list RIGHT_PAREN */ +#line 4269 "MachineIndependent/glslang.y" { (yyval.interm.type).init((yyvsp[-7].lex).loc); parseContext.intermediate.insertSpirvRequirement((yyvsp[-5].interm.spirvReq)); (yyval.interm.type).qualifier.setSpirvDecorate((yyvsp[-3].lex).i, (yyvsp[-1].interm.intermNode)->getAsAggregate()); } -#line 11982 "MachineIndependent/glslang_tab.cpp" +#line 12136 "MachineIndependent/glslang_tab.cpp" break; - case 658: /* spirv_decorate_qualifier: SPIRV_DECORATE_ID LEFT_PAREN INTCONSTANT COMMA spirv_decorate_id_parameter_list RIGHT_PAREN */ -#line 4278 "MachineIndependent/glslang.y" + case 668: /* spirv_decorate_qualifier: SPIRV_DECORATE_ID LEFT_PAREN INTCONSTANT COMMA spirv_decorate_id_parameter_list RIGHT_PAREN */ +#line 4274 "MachineIndependent/glslang.y" { (yyval.interm.type).init((yyvsp[-5].lex).loc); (yyval.interm.type).qualifier.setSpirvDecorateId((yyvsp[-3].lex).i, (yyvsp[-1].interm.intermNode)->getAsAggregate()); } -#line 11991 "MachineIndependent/glslang_tab.cpp" +#line 12145 "MachineIndependent/glslang_tab.cpp" break; - case 659: /* spirv_decorate_qualifier: SPIRV_DECORATE_ID LEFT_PAREN spirv_requirements_list COMMA INTCONSTANT COMMA spirv_decorate_id_parameter_list RIGHT_PAREN */ -#line 4282 "MachineIndependent/glslang.y" + case 669: /* spirv_decorate_qualifier: SPIRV_DECORATE_ID LEFT_PAREN spirv_requirements_list COMMA INTCONSTANT COMMA spirv_decorate_id_parameter_list RIGHT_PAREN */ +#line 4278 "MachineIndependent/glslang.y" { (yyval.interm.type).init((yyvsp[-7].lex).loc); parseContext.intermediate.insertSpirvRequirement((yyvsp[-5].interm.spirvReq)); (yyval.interm.type).qualifier.setSpirvDecorateId((yyvsp[-3].lex).i, (yyvsp[-1].interm.intermNode)->getAsAggregate()); } -#line 12001 "MachineIndependent/glslang_tab.cpp" +#line 12155 "MachineIndependent/glslang_tab.cpp" break; - case 660: /* spirv_decorate_qualifier: SPIRV_DECORATE_STRING LEFT_PAREN INTCONSTANT COMMA spirv_decorate_string_parameter_list RIGHT_PAREN */ -#line 4287 "MachineIndependent/glslang.y" + case 670: /* spirv_decorate_qualifier: SPIRV_DECORATE_STRING LEFT_PAREN INTCONSTANT COMMA spirv_decorate_string_parameter_list RIGHT_PAREN */ +#line 4283 "MachineIndependent/glslang.y" { (yyval.interm.type).init((yyvsp[-5].lex).loc); (yyval.interm.type).qualifier.setSpirvDecorateString((yyvsp[-3].lex).i, (yyvsp[-1].interm.intermNode)->getAsAggregate()); } -#line 12010 "MachineIndependent/glslang_tab.cpp" +#line 12164 "MachineIndependent/glslang_tab.cpp" break; - case 661: /* spirv_decorate_qualifier: SPIRV_DECORATE_STRING LEFT_PAREN spirv_requirements_list COMMA INTCONSTANT COMMA spirv_decorate_string_parameter_list RIGHT_PAREN */ -#line 4291 "MachineIndependent/glslang.y" + case 671: /* spirv_decorate_qualifier: SPIRV_DECORATE_STRING LEFT_PAREN spirv_requirements_list COMMA INTCONSTANT COMMA spirv_decorate_string_parameter_list RIGHT_PAREN */ +#line 4287 "MachineIndependent/glslang.y" { (yyval.interm.type).init((yyvsp[-7].lex).loc); parseContext.intermediate.insertSpirvRequirement((yyvsp[-5].interm.spirvReq)); (yyval.interm.type).qualifier.setSpirvDecorateString((yyvsp[-3].lex).i, (yyvsp[-1].interm.intermNode)->getAsAggregate()); } -#line 12020 "MachineIndependent/glslang_tab.cpp" +#line 12174 "MachineIndependent/glslang_tab.cpp" break; - case 662: /* spirv_decorate_parameter_list: spirv_decorate_parameter */ -#line 4298 "MachineIndependent/glslang.y" + case 672: /* spirv_decorate_parameter_list: spirv_decorate_parameter */ +#line 4294 "MachineIndependent/glslang.y" { (yyval.interm.intermNode) = parseContext.intermediate.makeAggregate((yyvsp[0].interm.intermNode)); } -#line 12028 "MachineIndependent/glslang_tab.cpp" +#line 12182 "MachineIndependent/glslang_tab.cpp" break; - case 663: /* spirv_decorate_parameter_list: spirv_decorate_parameter_list COMMA spirv_decorate_parameter */ -#line 4301 "MachineIndependent/glslang.y" + case 673: /* spirv_decorate_parameter_list: spirv_decorate_parameter_list COMMA spirv_decorate_parameter */ +#line 4297 "MachineIndependent/glslang.y" { (yyval.interm.intermNode) = parseContext.intermediate.growAggregate((yyvsp[-2].interm.intermNode), (yyvsp[0].interm.intermNode)); } -#line 12036 "MachineIndependent/glslang_tab.cpp" +#line 12190 "MachineIndependent/glslang_tab.cpp" break; - case 664: /* spirv_decorate_parameter: FLOATCONSTANT */ -#line 4306 "MachineIndependent/glslang.y" + case 674: /* spirv_decorate_parameter: FLOATCONSTANT */ +#line 4302 "MachineIndependent/glslang.y" { (yyval.interm.intermNode) = parseContext.intermediate.addConstantUnion((yyvsp[0].lex).d, EbtFloat, (yyvsp[0].lex).loc, true); } -#line 12044 "MachineIndependent/glslang_tab.cpp" +#line 12198 "MachineIndependent/glslang_tab.cpp" break; - case 665: /* spirv_decorate_parameter: INTCONSTANT */ -#line 4309 "MachineIndependent/glslang.y" + case 675: /* spirv_decorate_parameter: INTCONSTANT */ +#line 4305 "MachineIndependent/glslang.y" { (yyval.interm.intermNode) = parseContext.intermediate.addConstantUnion((yyvsp[0].lex).i, (yyvsp[0].lex).loc, true); } -#line 12052 "MachineIndependent/glslang_tab.cpp" +#line 12206 "MachineIndependent/glslang_tab.cpp" break; - case 666: /* spirv_decorate_parameter: UINTCONSTANT */ -#line 4312 "MachineIndependent/glslang.y" + case 676: /* spirv_decorate_parameter: UINTCONSTANT */ +#line 4308 "MachineIndependent/glslang.y" { (yyval.interm.intermNode) = parseContext.intermediate.addConstantUnion((yyvsp[0].lex).u, (yyvsp[0].lex).loc, true); } -#line 12060 "MachineIndependent/glslang_tab.cpp" +#line 12214 "MachineIndependent/glslang_tab.cpp" break; - case 667: /* spirv_decorate_parameter: BOOLCONSTANT */ -#line 4315 "MachineIndependent/glslang.y" + case 677: /* spirv_decorate_parameter: BOOLCONSTANT */ +#line 4311 "MachineIndependent/glslang.y" { (yyval.interm.intermNode) = parseContext.intermediate.addConstantUnion((yyvsp[0].lex).b, (yyvsp[0].lex).loc, true); } -#line 12068 "MachineIndependent/glslang_tab.cpp" +#line 12222 "MachineIndependent/glslang_tab.cpp" + break; + + case 678: /* spirv_decorate_id_parameter_list: spirv_decorate_id_parameter */ +#line 4316 "MachineIndependent/glslang.y" + { + (yyval.interm.intermNode) = parseContext.intermediate.makeAggregate((yyvsp[0].interm.intermNode)); + } +#line 12230 "MachineIndependent/glslang_tab.cpp" + break; + + case 679: /* spirv_decorate_id_parameter_list: spirv_decorate_id_parameter_list COMMA spirv_decorate_id_parameter */ +#line 4319 "MachineIndependent/glslang.y" + { + (yyval.interm.intermNode) = parseContext.intermediate.growAggregate((yyvsp[-2].interm.intermNode), (yyvsp[0].interm.intermNode)); + } +#line 12238 "MachineIndependent/glslang_tab.cpp" break; - case 668: /* spirv_decorate_id_parameter_list: constant_expression */ -#line 4320 "MachineIndependent/glslang.y" + case 680: /* spirv_decorate_id_parameter: variable_identifier */ +#line 4324 "MachineIndependent/glslang.y" { - if ((yyvsp[0].interm.intermTypedNode)->getBasicType() != EbtFloat && - (yyvsp[0].interm.intermTypedNode)->getBasicType() != EbtInt && - (yyvsp[0].interm.intermTypedNode)->getBasicType() != EbtUint && - (yyvsp[0].interm.intermTypedNode)->getBasicType() != EbtBool) - parseContext.error((yyvsp[0].interm.intermTypedNode)->getLoc(), "this type not allowed", (yyvsp[0].interm.intermTypedNode)->getType().getBasicString(), ""); - (yyval.interm.intermNode) = parseContext.intermediate.makeAggregate((yyvsp[0].interm.intermTypedNode)); + if ((yyvsp[0].interm.intermTypedNode)->getAsConstantUnion() || (yyvsp[0].interm.intermTypedNode)->getAsSymbolNode()) + (yyval.interm.intermNode) = (yyvsp[0].interm.intermTypedNode); + else + parseContext.error((yyvsp[0].interm.intermTypedNode)->getLoc(), "only allow constants or variables which are not elements of a composite", "", ""); } -#line 12081 "MachineIndependent/glslang_tab.cpp" +#line 12249 "MachineIndependent/glslang_tab.cpp" break; - case 669: /* spirv_decorate_id_parameter_list: spirv_decorate_id_parameter_list COMMA constant_expression */ -#line 4328 "MachineIndependent/glslang.y" - { - if ((yyvsp[0].interm.intermTypedNode)->getBasicType() != EbtFloat && - (yyvsp[0].interm.intermTypedNode)->getBasicType() != EbtInt && - (yyvsp[0].interm.intermTypedNode)->getBasicType() != EbtUint && - (yyvsp[0].interm.intermTypedNode)->getBasicType() != EbtBool) - parseContext.error((yyvsp[0].interm.intermTypedNode)->getLoc(), "this type not allowed", (yyvsp[0].interm.intermTypedNode)->getType().getBasicString(), ""); - (yyval.interm.intermNode) = parseContext.intermediate.growAggregate((yyvsp[-2].interm.intermNode), (yyvsp[0].interm.intermTypedNode)); + case 681: /* spirv_decorate_id_parameter: FLOATCONSTANT */ +#line 4330 "MachineIndependent/glslang.y" + { + (yyval.interm.intermNode) = parseContext.intermediate.addConstantUnion((yyvsp[0].lex).d, EbtFloat, (yyvsp[0].lex).loc, true); } -#line 12094 "MachineIndependent/glslang_tab.cpp" +#line 12257 "MachineIndependent/glslang_tab.cpp" break; - case 670: /* spirv_decorate_string_parameter_list: STRING_LITERAL */ -#line 4338 "MachineIndependent/glslang.y" + case 682: /* spirv_decorate_id_parameter: INTCONSTANT */ +#line 4333 "MachineIndependent/glslang.y" + { + (yyval.interm.intermNode) = parseContext.intermediate.addConstantUnion((yyvsp[0].lex).i, (yyvsp[0].lex).loc, true); + } +#line 12265 "MachineIndependent/glslang_tab.cpp" + break; + + case 683: /* spirv_decorate_id_parameter: UINTCONSTANT */ +#line 4336 "MachineIndependent/glslang.y" + { + (yyval.interm.intermNode) = parseContext.intermediate.addConstantUnion((yyvsp[0].lex).u, (yyvsp[0].lex).loc, true); + } +#line 12273 "MachineIndependent/glslang_tab.cpp" + break; + + case 684: /* spirv_decorate_id_parameter: BOOLCONSTANT */ +#line 4339 "MachineIndependent/glslang.y" + { + (yyval.interm.intermNode) = parseContext.intermediate.addConstantUnion((yyvsp[0].lex).b, (yyvsp[0].lex).loc, true); + } +#line 12281 "MachineIndependent/glslang_tab.cpp" + break; + + case 685: /* spirv_decorate_string_parameter_list: STRING_LITERAL */ +#line 4344 "MachineIndependent/glslang.y" { (yyval.interm.intermNode) = parseContext.intermediate.makeAggregate( parseContext.intermediate.addConstantUnion((yyvsp[0].lex).string, (yyvsp[0].lex).loc, true)); } -#line 12103 "MachineIndependent/glslang_tab.cpp" +#line 12290 "MachineIndependent/glslang_tab.cpp" break; - case 671: /* spirv_decorate_string_parameter_list: spirv_decorate_string_parameter_list COMMA STRING_LITERAL */ -#line 4342 "MachineIndependent/glslang.y" + case 686: /* spirv_decorate_string_parameter_list: spirv_decorate_string_parameter_list COMMA STRING_LITERAL */ +#line 4348 "MachineIndependent/glslang.y" { (yyval.interm.intermNode) = parseContext.intermediate.growAggregate((yyvsp[-2].interm.intermNode), parseContext.intermediate.addConstantUnion((yyvsp[0].lex).string, (yyvsp[0].lex).loc, true)); } -#line 12111 "MachineIndependent/glslang_tab.cpp" +#line 12298 "MachineIndependent/glslang_tab.cpp" break; - case 672: /* spirv_type_specifier: SPIRV_TYPE LEFT_PAREN spirv_instruction_qualifier_list COMMA spirv_type_parameter_list RIGHT_PAREN */ -#line 4347 "MachineIndependent/glslang.y" + case 687: /* spirv_type_specifier: SPIRV_TYPE LEFT_PAREN spirv_instruction_qualifier_list COMMA spirv_type_parameter_list RIGHT_PAREN */ +#line 4353 "MachineIndependent/glslang.y" { (yyval.interm.type).init((yyvsp[-5].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).setSpirvType(*(yyvsp[-3].interm.spirvInst), (yyvsp[-1].interm.spirvTypeParams)); } -#line 12120 "MachineIndependent/glslang_tab.cpp" +#line 12307 "MachineIndependent/glslang_tab.cpp" break; - case 673: /* spirv_type_specifier: SPIRV_TYPE LEFT_PAREN spirv_requirements_list COMMA spirv_instruction_qualifier_list COMMA spirv_type_parameter_list RIGHT_PAREN */ -#line 4351 "MachineIndependent/glslang.y" + case 688: /* spirv_type_specifier: SPIRV_TYPE LEFT_PAREN spirv_requirements_list COMMA spirv_instruction_qualifier_list COMMA spirv_type_parameter_list RIGHT_PAREN */ +#line 4357 "MachineIndependent/glslang.y" { (yyval.interm.type).init((yyvsp[-7].lex).loc, parseContext.symbolTable.atGlobalLevel()); parseContext.intermediate.insertSpirvRequirement((yyvsp[-5].interm.spirvReq)); (yyval.interm.type).setSpirvType(*(yyvsp[-3].interm.spirvInst), (yyvsp[-1].interm.spirvTypeParams)); } -#line 12130 "MachineIndependent/glslang_tab.cpp" +#line 12317 "MachineIndependent/glslang_tab.cpp" break; - case 674: /* spirv_type_specifier: SPIRV_TYPE LEFT_PAREN spirv_instruction_qualifier_list RIGHT_PAREN */ -#line 4356 "MachineIndependent/glslang.y" + case 689: /* spirv_type_specifier: SPIRV_TYPE LEFT_PAREN spirv_instruction_qualifier_list RIGHT_PAREN */ +#line 4362 "MachineIndependent/glslang.y" { (yyval.interm.type).init((yyvsp[-3].lex).loc, parseContext.symbolTable.atGlobalLevel()); (yyval.interm.type).setSpirvType(*(yyvsp[-1].interm.spirvInst)); } -#line 12139 "MachineIndependent/glslang_tab.cpp" +#line 12326 "MachineIndependent/glslang_tab.cpp" break; - case 675: /* spirv_type_specifier: SPIRV_TYPE LEFT_PAREN spirv_requirements_list COMMA spirv_instruction_qualifier_list RIGHT_PAREN */ -#line 4360 "MachineIndependent/glslang.y" + case 690: /* spirv_type_specifier: SPIRV_TYPE LEFT_PAREN spirv_requirements_list COMMA spirv_instruction_qualifier_list RIGHT_PAREN */ +#line 4366 "MachineIndependent/glslang.y" { (yyval.interm.type).init((yyvsp[-5].lex).loc, parseContext.symbolTable.atGlobalLevel()); parseContext.intermediate.insertSpirvRequirement((yyvsp[-3].interm.spirvReq)); (yyval.interm.type).setSpirvType(*(yyvsp[-1].interm.spirvInst)); } -#line 12149 "MachineIndependent/glslang_tab.cpp" +#line 12336 "MachineIndependent/glslang_tab.cpp" break; - case 676: /* spirv_type_parameter_list: spirv_type_parameter */ -#line 4367 "MachineIndependent/glslang.y" + case 691: /* spirv_type_parameter_list: spirv_type_parameter */ +#line 4373 "MachineIndependent/glslang.y" { (yyval.interm.spirvTypeParams) = (yyvsp[0].interm.spirvTypeParams); } -#line 12157 "MachineIndependent/glslang_tab.cpp" +#line 12344 "MachineIndependent/glslang_tab.cpp" break; - case 677: /* spirv_type_parameter_list: spirv_type_parameter_list COMMA spirv_type_parameter */ -#line 4370 "MachineIndependent/glslang.y" + case 692: /* spirv_type_parameter_list: spirv_type_parameter_list COMMA spirv_type_parameter */ +#line 4376 "MachineIndependent/glslang.y" { (yyval.interm.spirvTypeParams) = parseContext.mergeSpirvTypeParameters((yyvsp[-2].interm.spirvTypeParams), (yyvsp[0].interm.spirvTypeParams)); } -#line 12165 "MachineIndependent/glslang_tab.cpp" +#line 12352 "MachineIndependent/glslang_tab.cpp" break; - case 678: /* spirv_type_parameter: constant_expression */ -#line 4375 "MachineIndependent/glslang.y" + case 693: /* spirv_type_parameter: constant_expression */ +#line 4381 "MachineIndependent/glslang.y" { (yyval.interm.spirvTypeParams) = parseContext.makeSpirvTypeParameters((yyvsp[0].interm.intermTypedNode)->getLoc(), (yyvsp[0].interm.intermTypedNode)->getAsConstantUnion()); } -#line 12173 "MachineIndependent/glslang_tab.cpp" +#line 12360 "MachineIndependent/glslang_tab.cpp" + break; + + case 694: /* spirv_type_parameter: type_specifier_nonarray */ +#line 4384 "MachineIndependent/glslang.y" + { + (yyval.interm.spirvTypeParams) = parseContext.makeSpirvTypeParameters((yyvsp[0].interm.type).loc, (yyvsp[0].interm.type)); + } +#line 12368 "MachineIndependent/glslang_tab.cpp" break; - case 679: /* spirv_instruction_qualifier: SPIRV_INSTRUCTION LEFT_PAREN spirv_instruction_qualifier_list RIGHT_PAREN */ -#line 4380 "MachineIndependent/glslang.y" + case 695: /* spirv_instruction_qualifier: SPIRV_INSTRUCTION LEFT_PAREN spirv_instruction_qualifier_list RIGHT_PAREN */ +#line 4389 "MachineIndependent/glslang.y" { (yyval.interm.spirvInst) = (yyvsp[-1].interm.spirvInst); } -#line 12181 "MachineIndependent/glslang_tab.cpp" +#line 12376 "MachineIndependent/glslang_tab.cpp" break; - case 680: /* spirv_instruction_qualifier: SPIRV_INSTRUCTION LEFT_PAREN spirv_requirements_list COMMA spirv_instruction_qualifier_list RIGHT_PAREN */ -#line 4383 "MachineIndependent/glslang.y" + case 696: /* spirv_instruction_qualifier: SPIRV_INSTRUCTION LEFT_PAREN spirv_requirements_list COMMA spirv_instruction_qualifier_list RIGHT_PAREN */ +#line 4392 "MachineIndependent/glslang.y" { parseContext.intermediate.insertSpirvRequirement((yyvsp[-3].interm.spirvReq)); (yyval.interm.spirvInst) = (yyvsp[-1].interm.spirvInst); } -#line 12190 "MachineIndependent/glslang_tab.cpp" +#line 12385 "MachineIndependent/glslang_tab.cpp" break; - case 681: /* spirv_instruction_qualifier_list: spirv_instruction_qualifier_id */ -#line 4389 "MachineIndependent/glslang.y" + case 697: /* spirv_instruction_qualifier_list: spirv_instruction_qualifier_id */ +#line 4398 "MachineIndependent/glslang.y" { (yyval.interm.spirvInst) = (yyvsp[0].interm.spirvInst); } -#line 12198 "MachineIndependent/glslang_tab.cpp" +#line 12393 "MachineIndependent/glslang_tab.cpp" break; - case 682: /* spirv_instruction_qualifier_list: spirv_instruction_qualifier_list COMMA spirv_instruction_qualifier_id */ -#line 4392 "MachineIndependent/glslang.y" + case 698: /* spirv_instruction_qualifier_list: spirv_instruction_qualifier_list COMMA spirv_instruction_qualifier_id */ +#line 4401 "MachineIndependent/glslang.y" { (yyval.interm.spirvInst) = parseContext.mergeSpirvInstruction((yyvsp[-1].lex).loc, (yyvsp[-2].interm.spirvInst), (yyvsp[0].interm.spirvInst)); } -#line 12206 "MachineIndependent/glslang_tab.cpp" +#line 12401 "MachineIndependent/glslang_tab.cpp" break; - case 683: /* spirv_instruction_qualifier_id: IDENTIFIER EQUAL STRING_LITERAL */ -#line 4397 "MachineIndependent/glslang.y" + case 699: /* spirv_instruction_qualifier_id: IDENTIFIER EQUAL STRING_LITERAL */ +#line 4406 "MachineIndependent/glslang.y" { (yyval.interm.spirvInst) = parseContext.makeSpirvInstruction((yyvsp[-1].lex).loc, *(yyvsp[-2].lex).string, *(yyvsp[0].lex).string); } -#line 12214 "MachineIndependent/glslang_tab.cpp" +#line 12409 "MachineIndependent/glslang_tab.cpp" break; - case 684: /* spirv_instruction_qualifier_id: IDENTIFIER EQUAL INTCONSTANT */ -#line 4400 "MachineIndependent/glslang.y" + case 700: /* spirv_instruction_qualifier_id: IDENTIFIER EQUAL INTCONSTANT */ +#line 4409 "MachineIndependent/glslang.y" { (yyval.interm.spirvInst) = parseContext.makeSpirvInstruction((yyvsp[-1].lex).loc, *(yyvsp[-2].lex).string, (yyvsp[0].lex).i); } -#line 12222 "MachineIndependent/glslang_tab.cpp" +#line 12417 "MachineIndependent/glslang_tab.cpp" break; -#line 12226 "MachineIndependent/glslang_tab.cpp" +#line 12421 "MachineIndependent/glslang_tab.cpp" default: break; } @@ -12298,7 +12493,7 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); } yyerror (pParseContext, yymsgp); if (yysyntax_error_status == YYENOMEM) - goto yyexhaustedlab; + YYNOMEM; } } @@ -12334,6 +12529,7 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); label yyerrorlab therefore never appears in user code. */ if (0) YYERROR; + ++yynerrs; /* Do not reclaim the symbols of the rule whose action triggered this YYERROR. */ @@ -12394,7 +12590,7 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); `-------------------------------------*/ yyacceptlab: yyresult = 0; - goto yyreturn; + goto yyreturnlab; /*-----------------------------------. @@ -12402,24 +12598,22 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); `-----------------------------------*/ yyabortlab: yyresult = 1; - goto yyreturn; + goto yyreturnlab; -#if 1 -/*-------------------------------------------------. -| yyexhaustedlab -- memory exhaustion comes here. | -`-------------------------------------------------*/ +/*-----------------------------------------------------------. +| yyexhaustedlab -- YYNOMEM (memory exhaustion) comes here. | +`-----------------------------------------------------------*/ yyexhaustedlab: yyerror (pParseContext, YY_("memory exhausted")); yyresult = 2; - goto yyreturn; -#endif + goto yyreturnlab; -/*-------------------------------------------------------. -| yyreturn -- parsing is finished, clean up and return. | -`-------------------------------------------------------*/ -yyreturn: +/*----------------------------------------------------------. +| yyreturnlab -- parsing is finished, clean up and return. | +`----------------------------------------------------------*/ +yyreturnlab: if (yychar != YYEMPTY) { /* Make sure we have latest lookahead translation. See comments at @@ -12447,5 +12641,5 @@ YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default); return yyresult; } -#line 4405 "MachineIndependent/glslang.y" +#line 4413 "MachineIndependent/glslang.y" diff --git a/glslang/MachineIndependent/glslang_tab.cpp.h b/glslang/MachineIndependent/glslang_tab.cpp.h index a6871b319b..d6484924d6 100644 --- a/glslang/MachineIndependent/glslang_tab.cpp.h +++ b/glslang/MachineIndependent/glslang_tab.cpp.h @@ -1,8 +1,8 @@ -/* A Bison parser, made by GNU Bison 3.7.4. */ +/* A Bison parser, made by GNU Bison 3.8.2. */ /* Bison interface for Yacc-like parsers in C - Copyright (C) 1984, 1989-1990, 2000-2015, 2018-2020 Free Software Foundation, + Copyright (C) 1984, 1989-1990, 2000-2015, 2018-2021 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify @@ -16,7 +16,7 @@ GNU General Public License for more details. You should have received a copy of the GNU General Public License - along with this program. If not, see . */ + along with this program. If not, see . */ /* As a special exception, you may create a larger work that contains part or all of the Bison parser skeleton and distribute that work @@ -217,296 +217,305 @@ extern int yydebug; FCOOPMATNV = 418, /* FCOOPMATNV */ ICOOPMATNV = 419, /* ICOOPMATNV */ UCOOPMATNV = 420, /* UCOOPMATNV */ - SAMPLERCUBEARRAY = 421, /* SAMPLERCUBEARRAY */ - SAMPLERCUBEARRAYSHADOW = 422, /* SAMPLERCUBEARRAYSHADOW */ - ISAMPLERCUBEARRAY = 423, /* ISAMPLERCUBEARRAY */ - USAMPLERCUBEARRAY = 424, /* USAMPLERCUBEARRAY */ - SAMPLER1D = 425, /* SAMPLER1D */ - SAMPLER1DARRAY = 426, /* SAMPLER1DARRAY */ - SAMPLER1DARRAYSHADOW = 427, /* SAMPLER1DARRAYSHADOW */ - ISAMPLER1D = 428, /* ISAMPLER1D */ - SAMPLER1DSHADOW = 429, /* SAMPLER1DSHADOW */ - SAMPLER2DRECT = 430, /* SAMPLER2DRECT */ - SAMPLER2DRECTSHADOW = 431, /* SAMPLER2DRECTSHADOW */ - ISAMPLER2DRECT = 432, /* ISAMPLER2DRECT */ - USAMPLER2DRECT = 433, /* USAMPLER2DRECT */ - SAMPLERBUFFER = 434, /* SAMPLERBUFFER */ - ISAMPLERBUFFER = 435, /* ISAMPLERBUFFER */ - USAMPLERBUFFER = 436, /* USAMPLERBUFFER */ - SAMPLER2DMS = 437, /* SAMPLER2DMS */ - ISAMPLER2DMS = 438, /* ISAMPLER2DMS */ - USAMPLER2DMS = 439, /* USAMPLER2DMS */ - SAMPLER2DMSARRAY = 440, /* SAMPLER2DMSARRAY */ - ISAMPLER2DMSARRAY = 441, /* ISAMPLER2DMSARRAY */ - USAMPLER2DMSARRAY = 442, /* USAMPLER2DMSARRAY */ - SAMPLEREXTERNALOES = 443, /* SAMPLEREXTERNALOES */ - SAMPLEREXTERNAL2DY2YEXT = 444, /* SAMPLEREXTERNAL2DY2YEXT */ - ISAMPLER1DARRAY = 445, /* ISAMPLER1DARRAY */ - USAMPLER1D = 446, /* USAMPLER1D */ - USAMPLER1DARRAY = 447, /* USAMPLER1DARRAY */ - F16SAMPLER1D = 448, /* F16SAMPLER1D */ - F16SAMPLER2D = 449, /* F16SAMPLER2D */ - F16SAMPLER3D = 450, /* F16SAMPLER3D */ - F16SAMPLER2DRECT = 451, /* F16SAMPLER2DRECT */ - F16SAMPLERCUBE = 452, /* F16SAMPLERCUBE */ - F16SAMPLER1DARRAY = 453, /* F16SAMPLER1DARRAY */ - F16SAMPLER2DARRAY = 454, /* F16SAMPLER2DARRAY */ - F16SAMPLERCUBEARRAY = 455, /* F16SAMPLERCUBEARRAY */ - F16SAMPLERBUFFER = 456, /* F16SAMPLERBUFFER */ - F16SAMPLER2DMS = 457, /* F16SAMPLER2DMS */ - F16SAMPLER2DMSARRAY = 458, /* F16SAMPLER2DMSARRAY */ - F16SAMPLER1DSHADOW = 459, /* F16SAMPLER1DSHADOW */ - F16SAMPLER2DSHADOW = 460, /* F16SAMPLER2DSHADOW */ - F16SAMPLER1DARRAYSHADOW = 461, /* F16SAMPLER1DARRAYSHADOW */ - F16SAMPLER2DARRAYSHADOW = 462, /* F16SAMPLER2DARRAYSHADOW */ - F16SAMPLER2DRECTSHADOW = 463, /* F16SAMPLER2DRECTSHADOW */ - F16SAMPLERCUBESHADOW = 464, /* F16SAMPLERCUBESHADOW */ - F16SAMPLERCUBEARRAYSHADOW = 465, /* F16SAMPLERCUBEARRAYSHADOW */ - IMAGE1D = 466, /* IMAGE1D */ - IIMAGE1D = 467, /* IIMAGE1D */ - UIMAGE1D = 468, /* UIMAGE1D */ - IMAGE2D = 469, /* IMAGE2D */ - IIMAGE2D = 470, /* IIMAGE2D */ - UIMAGE2D = 471, /* UIMAGE2D */ - IMAGE3D = 472, /* IMAGE3D */ - IIMAGE3D = 473, /* IIMAGE3D */ - UIMAGE3D = 474, /* UIMAGE3D */ - IMAGE2DRECT = 475, /* IMAGE2DRECT */ - IIMAGE2DRECT = 476, /* IIMAGE2DRECT */ - UIMAGE2DRECT = 477, /* UIMAGE2DRECT */ - IMAGECUBE = 478, /* IMAGECUBE */ - IIMAGECUBE = 479, /* IIMAGECUBE */ - UIMAGECUBE = 480, /* UIMAGECUBE */ - IMAGEBUFFER = 481, /* IMAGEBUFFER */ - IIMAGEBUFFER = 482, /* IIMAGEBUFFER */ - UIMAGEBUFFER = 483, /* UIMAGEBUFFER */ - IMAGE1DARRAY = 484, /* IMAGE1DARRAY */ - IIMAGE1DARRAY = 485, /* IIMAGE1DARRAY */ - UIMAGE1DARRAY = 486, /* UIMAGE1DARRAY */ - IMAGE2DARRAY = 487, /* IMAGE2DARRAY */ - IIMAGE2DARRAY = 488, /* IIMAGE2DARRAY */ - UIMAGE2DARRAY = 489, /* UIMAGE2DARRAY */ - IMAGECUBEARRAY = 490, /* IMAGECUBEARRAY */ - IIMAGECUBEARRAY = 491, /* IIMAGECUBEARRAY */ - UIMAGECUBEARRAY = 492, /* UIMAGECUBEARRAY */ - IMAGE2DMS = 493, /* IMAGE2DMS */ - IIMAGE2DMS = 494, /* IIMAGE2DMS */ - UIMAGE2DMS = 495, /* UIMAGE2DMS */ - IMAGE2DMSARRAY = 496, /* IMAGE2DMSARRAY */ - IIMAGE2DMSARRAY = 497, /* IIMAGE2DMSARRAY */ - UIMAGE2DMSARRAY = 498, /* UIMAGE2DMSARRAY */ - F16IMAGE1D = 499, /* F16IMAGE1D */ - F16IMAGE2D = 500, /* F16IMAGE2D */ - F16IMAGE3D = 501, /* F16IMAGE3D */ - F16IMAGE2DRECT = 502, /* F16IMAGE2DRECT */ - F16IMAGECUBE = 503, /* F16IMAGECUBE */ - F16IMAGE1DARRAY = 504, /* F16IMAGE1DARRAY */ - F16IMAGE2DARRAY = 505, /* F16IMAGE2DARRAY */ - F16IMAGECUBEARRAY = 506, /* F16IMAGECUBEARRAY */ - F16IMAGEBUFFER = 507, /* F16IMAGEBUFFER */ - F16IMAGE2DMS = 508, /* F16IMAGE2DMS */ - F16IMAGE2DMSARRAY = 509, /* F16IMAGE2DMSARRAY */ - I64IMAGE1D = 510, /* I64IMAGE1D */ - U64IMAGE1D = 511, /* U64IMAGE1D */ - I64IMAGE2D = 512, /* I64IMAGE2D */ - U64IMAGE2D = 513, /* U64IMAGE2D */ - I64IMAGE3D = 514, /* I64IMAGE3D */ - U64IMAGE3D = 515, /* U64IMAGE3D */ - I64IMAGE2DRECT = 516, /* I64IMAGE2DRECT */ - U64IMAGE2DRECT = 517, /* U64IMAGE2DRECT */ - I64IMAGECUBE = 518, /* I64IMAGECUBE */ - U64IMAGECUBE = 519, /* U64IMAGECUBE */ - I64IMAGEBUFFER = 520, /* I64IMAGEBUFFER */ - U64IMAGEBUFFER = 521, /* U64IMAGEBUFFER */ - I64IMAGE1DARRAY = 522, /* I64IMAGE1DARRAY */ - U64IMAGE1DARRAY = 523, /* U64IMAGE1DARRAY */ - I64IMAGE2DARRAY = 524, /* I64IMAGE2DARRAY */ - U64IMAGE2DARRAY = 525, /* U64IMAGE2DARRAY */ - I64IMAGECUBEARRAY = 526, /* I64IMAGECUBEARRAY */ - U64IMAGECUBEARRAY = 527, /* U64IMAGECUBEARRAY */ - I64IMAGE2DMS = 528, /* I64IMAGE2DMS */ - U64IMAGE2DMS = 529, /* U64IMAGE2DMS */ - I64IMAGE2DMSARRAY = 530, /* I64IMAGE2DMSARRAY */ - U64IMAGE2DMSARRAY = 531, /* U64IMAGE2DMSARRAY */ - TEXTURECUBEARRAY = 532, /* TEXTURECUBEARRAY */ - ITEXTURECUBEARRAY = 533, /* ITEXTURECUBEARRAY */ - UTEXTURECUBEARRAY = 534, /* UTEXTURECUBEARRAY */ - TEXTURE1D = 535, /* TEXTURE1D */ - ITEXTURE1D = 536, /* ITEXTURE1D */ - UTEXTURE1D = 537, /* UTEXTURE1D */ - TEXTURE1DARRAY = 538, /* TEXTURE1DARRAY */ - ITEXTURE1DARRAY = 539, /* ITEXTURE1DARRAY */ - UTEXTURE1DARRAY = 540, /* UTEXTURE1DARRAY */ - TEXTURE2DRECT = 541, /* TEXTURE2DRECT */ - ITEXTURE2DRECT = 542, /* ITEXTURE2DRECT */ - UTEXTURE2DRECT = 543, /* UTEXTURE2DRECT */ - TEXTUREBUFFER = 544, /* TEXTUREBUFFER */ - ITEXTUREBUFFER = 545, /* ITEXTUREBUFFER */ - UTEXTUREBUFFER = 546, /* UTEXTUREBUFFER */ - TEXTURE2DMS = 547, /* TEXTURE2DMS */ - ITEXTURE2DMS = 548, /* ITEXTURE2DMS */ - UTEXTURE2DMS = 549, /* UTEXTURE2DMS */ - TEXTURE2DMSARRAY = 550, /* TEXTURE2DMSARRAY */ - ITEXTURE2DMSARRAY = 551, /* ITEXTURE2DMSARRAY */ - UTEXTURE2DMSARRAY = 552, /* UTEXTURE2DMSARRAY */ - F16TEXTURE1D = 553, /* F16TEXTURE1D */ - F16TEXTURE2D = 554, /* F16TEXTURE2D */ - F16TEXTURE3D = 555, /* F16TEXTURE3D */ - F16TEXTURE2DRECT = 556, /* F16TEXTURE2DRECT */ - F16TEXTURECUBE = 557, /* F16TEXTURECUBE */ - F16TEXTURE1DARRAY = 558, /* F16TEXTURE1DARRAY */ - F16TEXTURE2DARRAY = 559, /* F16TEXTURE2DARRAY */ - F16TEXTURECUBEARRAY = 560, /* F16TEXTURECUBEARRAY */ - F16TEXTUREBUFFER = 561, /* F16TEXTUREBUFFER */ - F16TEXTURE2DMS = 562, /* F16TEXTURE2DMS */ - F16TEXTURE2DMSARRAY = 563, /* F16TEXTURE2DMSARRAY */ - SUBPASSINPUT = 564, /* SUBPASSINPUT */ - SUBPASSINPUTMS = 565, /* SUBPASSINPUTMS */ - ISUBPASSINPUT = 566, /* ISUBPASSINPUT */ - ISUBPASSINPUTMS = 567, /* ISUBPASSINPUTMS */ - USUBPASSINPUT = 568, /* USUBPASSINPUT */ - USUBPASSINPUTMS = 569, /* USUBPASSINPUTMS */ - F16SUBPASSINPUT = 570, /* F16SUBPASSINPUT */ - F16SUBPASSINPUTMS = 571, /* F16SUBPASSINPUTMS */ - SPIRV_INSTRUCTION = 572, /* SPIRV_INSTRUCTION */ - SPIRV_EXECUTION_MODE = 573, /* SPIRV_EXECUTION_MODE */ - SPIRV_EXECUTION_MODE_ID = 574, /* SPIRV_EXECUTION_MODE_ID */ - SPIRV_DECORATE = 575, /* SPIRV_DECORATE */ - SPIRV_DECORATE_ID = 576, /* SPIRV_DECORATE_ID */ - SPIRV_DECORATE_STRING = 577, /* SPIRV_DECORATE_STRING */ - SPIRV_TYPE = 578, /* SPIRV_TYPE */ - SPIRV_STORAGE_CLASS = 579, /* SPIRV_STORAGE_CLASS */ - SPIRV_BY_REFERENCE = 580, /* SPIRV_BY_REFERENCE */ - SPIRV_LITERAL = 581, /* SPIRV_LITERAL */ - LEFT_OP = 582, /* LEFT_OP */ - RIGHT_OP = 583, /* RIGHT_OP */ - INC_OP = 584, /* INC_OP */ - DEC_OP = 585, /* DEC_OP */ - LE_OP = 586, /* LE_OP */ - GE_OP = 587, /* GE_OP */ - EQ_OP = 588, /* EQ_OP */ - NE_OP = 589, /* NE_OP */ - AND_OP = 590, /* AND_OP */ - OR_OP = 591, /* OR_OP */ - XOR_OP = 592, /* XOR_OP */ - MUL_ASSIGN = 593, /* MUL_ASSIGN */ - DIV_ASSIGN = 594, /* DIV_ASSIGN */ - ADD_ASSIGN = 595, /* ADD_ASSIGN */ - MOD_ASSIGN = 596, /* MOD_ASSIGN */ - LEFT_ASSIGN = 597, /* LEFT_ASSIGN */ - RIGHT_ASSIGN = 598, /* RIGHT_ASSIGN */ - AND_ASSIGN = 599, /* AND_ASSIGN */ - XOR_ASSIGN = 600, /* XOR_ASSIGN */ - OR_ASSIGN = 601, /* OR_ASSIGN */ - SUB_ASSIGN = 602, /* SUB_ASSIGN */ - STRING_LITERAL = 603, /* STRING_LITERAL */ - LEFT_PAREN = 604, /* LEFT_PAREN */ - RIGHT_PAREN = 605, /* RIGHT_PAREN */ - LEFT_BRACKET = 606, /* LEFT_BRACKET */ - RIGHT_BRACKET = 607, /* RIGHT_BRACKET */ - LEFT_BRACE = 608, /* LEFT_BRACE */ - RIGHT_BRACE = 609, /* RIGHT_BRACE */ - DOT = 610, /* DOT */ - COMMA = 611, /* COMMA */ - COLON = 612, /* COLON */ - EQUAL = 613, /* EQUAL */ - SEMICOLON = 614, /* SEMICOLON */ - BANG = 615, /* BANG */ - DASH = 616, /* DASH */ - TILDE = 617, /* TILDE */ - PLUS = 618, /* PLUS */ - STAR = 619, /* STAR */ - SLASH = 620, /* SLASH */ - PERCENT = 621, /* PERCENT */ - LEFT_ANGLE = 622, /* LEFT_ANGLE */ - RIGHT_ANGLE = 623, /* RIGHT_ANGLE */ - VERTICAL_BAR = 624, /* VERTICAL_BAR */ - CARET = 625, /* CARET */ - AMPERSAND = 626, /* AMPERSAND */ - QUESTION = 627, /* QUESTION */ - INVARIANT = 628, /* INVARIANT */ - HIGH_PRECISION = 629, /* HIGH_PRECISION */ - MEDIUM_PRECISION = 630, /* MEDIUM_PRECISION */ - LOW_PRECISION = 631, /* LOW_PRECISION */ - PRECISION = 632, /* PRECISION */ - PACKED = 633, /* PACKED */ - RESOURCE = 634, /* RESOURCE */ - SUPERP = 635, /* SUPERP */ - FLOATCONSTANT = 636, /* FLOATCONSTANT */ - INTCONSTANT = 637, /* INTCONSTANT */ - UINTCONSTANT = 638, /* UINTCONSTANT */ - BOOLCONSTANT = 639, /* BOOLCONSTANT */ - IDENTIFIER = 640, /* IDENTIFIER */ - TYPE_NAME = 641, /* TYPE_NAME */ - CENTROID = 642, /* CENTROID */ - IN = 643, /* IN */ - OUT = 644, /* OUT */ - INOUT = 645, /* INOUT */ - STRUCT = 646, /* STRUCT */ - VOID = 647, /* VOID */ - WHILE = 648, /* WHILE */ - BREAK = 649, /* BREAK */ - CONTINUE = 650, /* CONTINUE */ - DO = 651, /* DO */ - ELSE = 652, /* ELSE */ - FOR = 653, /* FOR */ - IF = 654, /* IF */ - DISCARD = 655, /* DISCARD */ - RETURN = 656, /* RETURN */ - SWITCH = 657, /* SWITCH */ - CASE = 658, /* CASE */ - DEFAULT = 659, /* DEFAULT */ - TERMINATE_INVOCATION = 660, /* TERMINATE_INVOCATION */ - TERMINATE_RAY = 661, /* TERMINATE_RAY */ - IGNORE_INTERSECTION = 662, /* IGNORE_INTERSECTION */ - UNIFORM = 663, /* UNIFORM */ - SHARED = 664, /* SHARED */ - BUFFER = 665, /* BUFFER */ - FLAT = 666, /* FLAT */ - SMOOTH = 667, /* SMOOTH */ - LAYOUT = 668, /* LAYOUT */ - DOUBLECONSTANT = 669, /* DOUBLECONSTANT */ - INT16CONSTANT = 670, /* INT16CONSTANT */ - UINT16CONSTANT = 671, /* UINT16CONSTANT */ - FLOAT16CONSTANT = 672, /* FLOAT16CONSTANT */ - INT32CONSTANT = 673, /* INT32CONSTANT */ - UINT32CONSTANT = 674, /* UINT32CONSTANT */ - INT64CONSTANT = 675, /* INT64CONSTANT */ - UINT64CONSTANT = 676, /* UINT64CONSTANT */ - SUBROUTINE = 677, /* SUBROUTINE */ - DEMOTE = 678, /* DEMOTE */ - PAYLOADNV = 679, /* PAYLOADNV */ - PAYLOADINNV = 680, /* PAYLOADINNV */ - HITATTRNV = 681, /* HITATTRNV */ - CALLDATANV = 682, /* CALLDATANV */ - CALLDATAINNV = 683, /* CALLDATAINNV */ - PAYLOADEXT = 684, /* PAYLOADEXT */ - PAYLOADINEXT = 685, /* PAYLOADINEXT */ - HITATTREXT = 686, /* HITATTREXT */ - CALLDATAEXT = 687, /* CALLDATAEXT */ - CALLDATAINEXT = 688, /* CALLDATAINEXT */ - PATCH = 689, /* PATCH */ - SAMPLE = 690, /* SAMPLE */ - NONUNIFORM = 691, /* NONUNIFORM */ - COHERENT = 692, /* COHERENT */ - VOLATILE = 693, /* VOLATILE */ - RESTRICT = 694, /* RESTRICT */ - READONLY = 695, /* READONLY */ - WRITEONLY = 696, /* WRITEONLY */ - DEVICECOHERENT = 697, /* DEVICECOHERENT */ - QUEUEFAMILYCOHERENT = 698, /* QUEUEFAMILYCOHERENT */ - WORKGROUPCOHERENT = 699, /* WORKGROUPCOHERENT */ - SUBGROUPCOHERENT = 700, /* SUBGROUPCOHERENT */ - NONPRIVATE = 701, /* NONPRIVATE */ - SHADERCALLCOHERENT = 702, /* SHADERCALLCOHERENT */ - NOPERSPECTIVE = 703, /* NOPERSPECTIVE */ - EXPLICITINTERPAMD = 704, /* EXPLICITINTERPAMD */ - PERVERTEXEXT = 705, /* PERVERTEXEXT */ - PERVERTEXNV = 706, /* PERVERTEXNV */ - PERPRIMITIVENV = 707, /* PERPRIMITIVENV */ - PERVIEWNV = 708, /* PERVIEWNV */ - PERTASKNV = 709, /* PERTASKNV */ - PRECISE = 710 /* PRECISE */ + COOPMAT = 421, /* COOPMAT */ + HITOBJECTNV = 422, /* HITOBJECTNV */ + HITOBJECTATTRNV = 423, /* HITOBJECTATTRNV */ + SAMPLERCUBEARRAY = 424, /* SAMPLERCUBEARRAY */ + SAMPLERCUBEARRAYSHADOW = 425, /* SAMPLERCUBEARRAYSHADOW */ + ISAMPLERCUBEARRAY = 426, /* ISAMPLERCUBEARRAY */ + USAMPLERCUBEARRAY = 427, /* USAMPLERCUBEARRAY */ + SAMPLER1D = 428, /* SAMPLER1D */ + SAMPLER1DARRAY = 429, /* SAMPLER1DARRAY */ + SAMPLER1DARRAYSHADOW = 430, /* SAMPLER1DARRAYSHADOW */ + ISAMPLER1D = 431, /* ISAMPLER1D */ + SAMPLER1DSHADOW = 432, /* SAMPLER1DSHADOW */ + SAMPLER2DRECT = 433, /* SAMPLER2DRECT */ + SAMPLER2DRECTSHADOW = 434, /* SAMPLER2DRECTSHADOW */ + ISAMPLER2DRECT = 435, /* ISAMPLER2DRECT */ + USAMPLER2DRECT = 436, /* USAMPLER2DRECT */ + SAMPLERBUFFER = 437, /* SAMPLERBUFFER */ + ISAMPLERBUFFER = 438, /* ISAMPLERBUFFER */ + USAMPLERBUFFER = 439, /* USAMPLERBUFFER */ + SAMPLER2DMS = 440, /* SAMPLER2DMS */ + ISAMPLER2DMS = 441, /* ISAMPLER2DMS */ + USAMPLER2DMS = 442, /* USAMPLER2DMS */ + SAMPLER2DMSARRAY = 443, /* SAMPLER2DMSARRAY */ + ISAMPLER2DMSARRAY = 444, /* ISAMPLER2DMSARRAY */ + USAMPLER2DMSARRAY = 445, /* USAMPLER2DMSARRAY */ + SAMPLEREXTERNALOES = 446, /* SAMPLEREXTERNALOES */ + SAMPLEREXTERNAL2DY2YEXT = 447, /* SAMPLEREXTERNAL2DY2YEXT */ + ISAMPLER1DARRAY = 448, /* ISAMPLER1DARRAY */ + USAMPLER1D = 449, /* USAMPLER1D */ + USAMPLER1DARRAY = 450, /* USAMPLER1DARRAY */ + F16SAMPLER1D = 451, /* F16SAMPLER1D */ + F16SAMPLER2D = 452, /* F16SAMPLER2D */ + F16SAMPLER3D = 453, /* F16SAMPLER3D */ + F16SAMPLER2DRECT = 454, /* F16SAMPLER2DRECT */ + F16SAMPLERCUBE = 455, /* F16SAMPLERCUBE */ + F16SAMPLER1DARRAY = 456, /* F16SAMPLER1DARRAY */ + F16SAMPLER2DARRAY = 457, /* F16SAMPLER2DARRAY */ + F16SAMPLERCUBEARRAY = 458, /* F16SAMPLERCUBEARRAY */ + F16SAMPLERBUFFER = 459, /* F16SAMPLERBUFFER */ + F16SAMPLER2DMS = 460, /* F16SAMPLER2DMS */ + F16SAMPLER2DMSARRAY = 461, /* F16SAMPLER2DMSARRAY */ + F16SAMPLER1DSHADOW = 462, /* F16SAMPLER1DSHADOW */ + F16SAMPLER2DSHADOW = 463, /* F16SAMPLER2DSHADOW */ + F16SAMPLER1DARRAYSHADOW = 464, /* F16SAMPLER1DARRAYSHADOW */ + F16SAMPLER2DARRAYSHADOW = 465, /* F16SAMPLER2DARRAYSHADOW */ + F16SAMPLER2DRECTSHADOW = 466, /* F16SAMPLER2DRECTSHADOW */ + F16SAMPLERCUBESHADOW = 467, /* F16SAMPLERCUBESHADOW */ + F16SAMPLERCUBEARRAYSHADOW = 468, /* F16SAMPLERCUBEARRAYSHADOW */ + IMAGE1D = 469, /* IMAGE1D */ + IIMAGE1D = 470, /* IIMAGE1D */ + UIMAGE1D = 471, /* UIMAGE1D */ + IMAGE2D = 472, /* IMAGE2D */ + IIMAGE2D = 473, /* IIMAGE2D */ + UIMAGE2D = 474, /* UIMAGE2D */ + IMAGE3D = 475, /* IMAGE3D */ + IIMAGE3D = 476, /* IIMAGE3D */ + UIMAGE3D = 477, /* UIMAGE3D */ + IMAGE2DRECT = 478, /* IMAGE2DRECT */ + IIMAGE2DRECT = 479, /* IIMAGE2DRECT */ + UIMAGE2DRECT = 480, /* UIMAGE2DRECT */ + IMAGECUBE = 481, /* IMAGECUBE */ + IIMAGECUBE = 482, /* IIMAGECUBE */ + UIMAGECUBE = 483, /* UIMAGECUBE */ + IMAGEBUFFER = 484, /* IMAGEBUFFER */ + IIMAGEBUFFER = 485, /* IIMAGEBUFFER */ + UIMAGEBUFFER = 486, /* UIMAGEBUFFER */ + IMAGE1DARRAY = 487, /* IMAGE1DARRAY */ + IIMAGE1DARRAY = 488, /* IIMAGE1DARRAY */ + UIMAGE1DARRAY = 489, /* UIMAGE1DARRAY */ + IMAGE2DARRAY = 490, /* IMAGE2DARRAY */ + IIMAGE2DARRAY = 491, /* IIMAGE2DARRAY */ + UIMAGE2DARRAY = 492, /* UIMAGE2DARRAY */ + IMAGECUBEARRAY = 493, /* IMAGECUBEARRAY */ + IIMAGECUBEARRAY = 494, /* IIMAGECUBEARRAY */ + UIMAGECUBEARRAY = 495, /* UIMAGECUBEARRAY */ + IMAGE2DMS = 496, /* IMAGE2DMS */ + IIMAGE2DMS = 497, /* IIMAGE2DMS */ + UIMAGE2DMS = 498, /* UIMAGE2DMS */ + IMAGE2DMSARRAY = 499, /* IMAGE2DMSARRAY */ + IIMAGE2DMSARRAY = 500, /* IIMAGE2DMSARRAY */ + UIMAGE2DMSARRAY = 501, /* UIMAGE2DMSARRAY */ + F16IMAGE1D = 502, /* F16IMAGE1D */ + F16IMAGE2D = 503, /* F16IMAGE2D */ + F16IMAGE3D = 504, /* F16IMAGE3D */ + F16IMAGE2DRECT = 505, /* F16IMAGE2DRECT */ + F16IMAGECUBE = 506, /* F16IMAGECUBE */ + F16IMAGE1DARRAY = 507, /* F16IMAGE1DARRAY */ + F16IMAGE2DARRAY = 508, /* F16IMAGE2DARRAY */ + F16IMAGECUBEARRAY = 509, /* F16IMAGECUBEARRAY */ + F16IMAGEBUFFER = 510, /* F16IMAGEBUFFER */ + F16IMAGE2DMS = 511, /* F16IMAGE2DMS */ + F16IMAGE2DMSARRAY = 512, /* F16IMAGE2DMSARRAY */ + I64IMAGE1D = 513, /* I64IMAGE1D */ + U64IMAGE1D = 514, /* U64IMAGE1D */ + I64IMAGE2D = 515, /* I64IMAGE2D */ + U64IMAGE2D = 516, /* U64IMAGE2D */ + I64IMAGE3D = 517, /* I64IMAGE3D */ + U64IMAGE3D = 518, /* U64IMAGE3D */ + I64IMAGE2DRECT = 519, /* I64IMAGE2DRECT */ + U64IMAGE2DRECT = 520, /* U64IMAGE2DRECT */ + I64IMAGECUBE = 521, /* I64IMAGECUBE */ + U64IMAGECUBE = 522, /* U64IMAGECUBE */ + I64IMAGEBUFFER = 523, /* I64IMAGEBUFFER */ + U64IMAGEBUFFER = 524, /* U64IMAGEBUFFER */ + I64IMAGE1DARRAY = 525, /* I64IMAGE1DARRAY */ + U64IMAGE1DARRAY = 526, /* U64IMAGE1DARRAY */ + I64IMAGE2DARRAY = 527, /* I64IMAGE2DARRAY */ + U64IMAGE2DARRAY = 528, /* U64IMAGE2DARRAY */ + I64IMAGECUBEARRAY = 529, /* I64IMAGECUBEARRAY */ + U64IMAGECUBEARRAY = 530, /* U64IMAGECUBEARRAY */ + I64IMAGE2DMS = 531, /* I64IMAGE2DMS */ + U64IMAGE2DMS = 532, /* U64IMAGE2DMS */ + I64IMAGE2DMSARRAY = 533, /* I64IMAGE2DMSARRAY */ + U64IMAGE2DMSARRAY = 534, /* U64IMAGE2DMSARRAY */ + TEXTURECUBEARRAY = 535, /* TEXTURECUBEARRAY */ + ITEXTURECUBEARRAY = 536, /* ITEXTURECUBEARRAY */ + UTEXTURECUBEARRAY = 537, /* UTEXTURECUBEARRAY */ + TEXTURE1D = 538, /* TEXTURE1D */ + ITEXTURE1D = 539, /* ITEXTURE1D */ + UTEXTURE1D = 540, /* UTEXTURE1D */ + TEXTURE1DARRAY = 541, /* TEXTURE1DARRAY */ + ITEXTURE1DARRAY = 542, /* ITEXTURE1DARRAY */ + UTEXTURE1DARRAY = 543, /* UTEXTURE1DARRAY */ + TEXTURE2DRECT = 544, /* TEXTURE2DRECT */ + ITEXTURE2DRECT = 545, /* ITEXTURE2DRECT */ + UTEXTURE2DRECT = 546, /* UTEXTURE2DRECT */ + TEXTUREBUFFER = 547, /* TEXTUREBUFFER */ + ITEXTUREBUFFER = 548, /* ITEXTUREBUFFER */ + UTEXTUREBUFFER = 549, /* UTEXTUREBUFFER */ + TEXTURE2DMS = 550, /* TEXTURE2DMS */ + ITEXTURE2DMS = 551, /* ITEXTURE2DMS */ + UTEXTURE2DMS = 552, /* UTEXTURE2DMS */ + TEXTURE2DMSARRAY = 553, /* TEXTURE2DMSARRAY */ + ITEXTURE2DMSARRAY = 554, /* ITEXTURE2DMSARRAY */ + UTEXTURE2DMSARRAY = 555, /* UTEXTURE2DMSARRAY */ + F16TEXTURE1D = 556, /* F16TEXTURE1D */ + F16TEXTURE2D = 557, /* F16TEXTURE2D */ + F16TEXTURE3D = 558, /* F16TEXTURE3D */ + F16TEXTURE2DRECT = 559, /* F16TEXTURE2DRECT */ + F16TEXTURECUBE = 560, /* F16TEXTURECUBE */ + F16TEXTURE1DARRAY = 561, /* F16TEXTURE1DARRAY */ + F16TEXTURE2DARRAY = 562, /* F16TEXTURE2DARRAY */ + F16TEXTURECUBEARRAY = 563, /* F16TEXTURECUBEARRAY */ + F16TEXTUREBUFFER = 564, /* F16TEXTUREBUFFER */ + F16TEXTURE2DMS = 565, /* F16TEXTURE2DMS */ + F16TEXTURE2DMSARRAY = 566, /* F16TEXTURE2DMSARRAY */ + SUBPASSINPUT = 567, /* SUBPASSINPUT */ + SUBPASSINPUTMS = 568, /* SUBPASSINPUTMS */ + ISUBPASSINPUT = 569, /* ISUBPASSINPUT */ + ISUBPASSINPUTMS = 570, /* ISUBPASSINPUTMS */ + USUBPASSINPUT = 571, /* USUBPASSINPUT */ + USUBPASSINPUTMS = 572, /* USUBPASSINPUTMS */ + F16SUBPASSINPUT = 573, /* F16SUBPASSINPUT */ + F16SUBPASSINPUTMS = 574, /* F16SUBPASSINPUTMS */ + SPIRV_INSTRUCTION = 575, /* SPIRV_INSTRUCTION */ + SPIRV_EXECUTION_MODE = 576, /* SPIRV_EXECUTION_MODE */ + SPIRV_EXECUTION_MODE_ID = 577, /* SPIRV_EXECUTION_MODE_ID */ + SPIRV_DECORATE = 578, /* SPIRV_DECORATE */ + SPIRV_DECORATE_ID = 579, /* SPIRV_DECORATE_ID */ + SPIRV_DECORATE_STRING = 580, /* SPIRV_DECORATE_STRING */ + SPIRV_TYPE = 581, /* SPIRV_TYPE */ + SPIRV_STORAGE_CLASS = 582, /* SPIRV_STORAGE_CLASS */ + SPIRV_BY_REFERENCE = 583, /* SPIRV_BY_REFERENCE */ + SPIRV_LITERAL = 584, /* SPIRV_LITERAL */ + ATTACHMENTEXT = 585, /* ATTACHMENTEXT */ + IATTACHMENTEXT = 586, /* IATTACHMENTEXT */ + UATTACHMENTEXT = 587, /* UATTACHMENTEXT */ + LEFT_OP = 588, /* LEFT_OP */ + RIGHT_OP = 589, /* RIGHT_OP */ + INC_OP = 590, /* INC_OP */ + DEC_OP = 591, /* DEC_OP */ + LE_OP = 592, /* LE_OP */ + GE_OP = 593, /* GE_OP */ + EQ_OP = 594, /* EQ_OP */ + NE_OP = 595, /* NE_OP */ + AND_OP = 596, /* AND_OP */ + OR_OP = 597, /* OR_OP */ + XOR_OP = 598, /* XOR_OP */ + MUL_ASSIGN = 599, /* MUL_ASSIGN */ + DIV_ASSIGN = 600, /* DIV_ASSIGN */ + ADD_ASSIGN = 601, /* ADD_ASSIGN */ + MOD_ASSIGN = 602, /* MOD_ASSIGN */ + LEFT_ASSIGN = 603, /* LEFT_ASSIGN */ + RIGHT_ASSIGN = 604, /* RIGHT_ASSIGN */ + AND_ASSIGN = 605, /* AND_ASSIGN */ + XOR_ASSIGN = 606, /* XOR_ASSIGN */ + OR_ASSIGN = 607, /* OR_ASSIGN */ + SUB_ASSIGN = 608, /* SUB_ASSIGN */ + STRING_LITERAL = 609, /* STRING_LITERAL */ + LEFT_PAREN = 610, /* LEFT_PAREN */ + RIGHT_PAREN = 611, /* RIGHT_PAREN */ + LEFT_BRACKET = 612, /* LEFT_BRACKET */ + RIGHT_BRACKET = 613, /* RIGHT_BRACKET */ + LEFT_BRACE = 614, /* LEFT_BRACE */ + RIGHT_BRACE = 615, /* RIGHT_BRACE */ + DOT = 616, /* DOT */ + COMMA = 617, /* COMMA */ + COLON = 618, /* COLON */ + EQUAL = 619, /* EQUAL */ + SEMICOLON = 620, /* SEMICOLON */ + BANG = 621, /* BANG */ + DASH = 622, /* DASH */ + TILDE = 623, /* TILDE */ + PLUS = 624, /* PLUS */ + STAR = 625, /* STAR */ + SLASH = 626, /* SLASH */ + PERCENT = 627, /* PERCENT */ + LEFT_ANGLE = 628, /* LEFT_ANGLE */ + RIGHT_ANGLE = 629, /* RIGHT_ANGLE */ + VERTICAL_BAR = 630, /* VERTICAL_BAR */ + CARET = 631, /* CARET */ + AMPERSAND = 632, /* AMPERSAND */ + QUESTION = 633, /* QUESTION */ + INVARIANT = 634, /* INVARIANT */ + HIGH_PRECISION = 635, /* HIGH_PRECISION */ + MEDIUM_PRECISION = 636, /* MEDIUM_PRECISION */ + LOW_PRECISION = 637, /* LOW_PRECISION */ + PRECISION = 638, /* PRECISION */ + PACKED = 639, /* PACKED */ + RESOURCE = 640, /* RESOURCE */ + SUPERP = 641, /* SUPERP */ + FLOATCONSTANT = 642, /* FLOATCONSTANT */ + INTCONSTANT = 643, /* INTCONSTANT */ + UINTCONSTANT = 644, /* UINTCONSTANT */ + BOOLCONSTANT = 645, /* BOOLCONSTANT */ + IDENTIFIER = 646, /* IDENTIFIER */ + TYPE_NAME = 647, /* TYPE_NAME */ + CENTROID = 648, /* CENTROID */ + IN = 649, /* IN */ + OUT = 650, /* OUT */ + INOUT = 651, /* INOUT */ + STRUCT = 652, /* STRUCT */ + VOID = 653, /* VOID */ + WHILE = 654, /* WHILE */ + BREAK = 655, /* BREAK */ + CONTINUE = 656, /* CONTINUE */ + DO = 657, /* DO */ + ELSE = 658, /* ELSE */ + FOR = 659, /* FOR */ + IF = 660, /* IF */ + DISCARD = 661, /* DISCARD */ + RETURN = 662, /* RETURN */ + SWITCH = 663, /* SWITCH */ + CASE = 664, /* CASE */ + DEFAULT = 665, /* DEFAULT */ + TERMINATE_INVOCATION = 666, /* TERMINATE_INVOCATION */ + TERMINATE_RAY = 667, /* TERMINATE_RAY */ + IGNORE_INTERSECTION = 668, /* IGNORE_INTERSECTION */ + UNIFORM = 669, /* UNIFORM */ + SHARED = 670, /* SHARED */ + BUFFER = 671, /* BUFFER */ + TILEIMAGEEXT = 672, /* TILEIMAGEEXT */ + FLAT = 673, /* FLAT */ + SMOOTH = 674, /* SMOOTH */ + LAYOUT = 675, /* LAYOUT */ + DOUBLECONSTANT = 676, /* DOUBLECONSTANT */ + INT16CONSTANT = 677, /* INT16CONSTANT */ + UINT16CONSTANT = 678, /* UINT16CONSTANT */ + FLOAT16CONSTANT = 679, /* FLOAT16CONSTANT */ + INT32CONSTANT = 680, /* INT32CONSTANT */ + UINT32CONSTANT = 681, /* UINT32CONSTANT */ + INT64CONSTANT = 682, /* INT64CONSTANT */ + UINT64CONSTANT = 683, /* UINT64CONSTANT */ + SUBROUTINE = 684, /* SUBROUTINE */ + DEMOTE = 685, /* DEMOTE */ + PAYLOADNV = 686, /* PAYLOADNV */ + PAYLOADINNV = 687, /* PAYLOADINNV */ + HITATTRNV = 688, /* HITATTRNV */ + CALLDATANV = 689, /* CALLDATANV */ + CALLDATAINNV = 690, /* CALLDATAINNV */ + PAYLOADEXT = 691, /* PAYLOADEXT */ + PAYLOADINEXT = 692, /* PAYLOADINEXT */ + HITATTREXT = 693, /* HITATTREXT */ + CALLDATAEXT = 694, /* CALLDATAEXT */ + CALLDATAINEXT = 695, /* CALLDATAINEXT */ + PATCH = 696, /* PATCH */ + SAMPLE = 697, /* SAMPLE */ + NONUNIFORM = 698, /* NONUNIFORM */ + COHERENT = 699, /* COHERENT */ + VOLATILE = 700, /* VOLATILE */ + RESTRICT = 701, /* RESTRICT */ + READONLY = 702, /* READONLY */ + WRITEONLY = 703, /* WRITEONLY */ + DEVICECOHERENT = 704, /* DEVICECOHERENT */ + QUEUEFAMILYCOHERENT = 705, /* QUEUEFAMILYCOHERENT */ + WORKGROUPCOHERENT = 706, /* WORKGROUPCOHERENT */ + SUBGROUPCOHERENT = 707, /* SUBGROUPCOHERENT */ + NONPRIVATE = 708, /* NONPRIVATE */ + SHADERCALLCOHERENT = 709, /* SHADERCALLCOHERENT */ + NOPERSPECTIVE = 710, /* NOPERSPECTIVE */ + EXPLICITINTERPAMD = 711, /* EXPLICITINTERPAMD */ + PERVERTEXEXT = 712, /* PERVERTEXEXT */ + PERVERTEXNV = 713, /* PERVERTEXNV */ + PERPRIMITIVENV = 714, /* PERPRIMITIVENV */ + PERVIEWNV = 715, /* PERVIEWNV */ + PERTASKNV = 716, /* PERTASKNV */ + PERPRIMITIVEEXT = 717, /* PERPRIMITIVEEXT */ + TASKPAYLOADWORKGROUPEXT = 718, /* TASKPAYLOADWORKGROUPEXT */ + PRECISE = 719 /* PRECISE */ }; typedef enum yytokentype yytoken_kind_t; #endif @@ -515,7 +524,7 @@ extern int yydebug; #if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED union YYSTYPE { -#line 97 "MachineIndependent/glslang.y" +#line 72 "MachineIndependent/glslang.y" struct { glslang::TSourceLoc loc; @@ -551,10 +560,10 @@ union YYSTYPE glslang::TArraySizes* arraySizes; glslang::TIdentifierList* identifierList; }; - glslang::TArraySizes* typeParameters; + glslang::TTypeParameters* typeParameters; } interm; -#line 558 "MachineIndependent/glslang_tab.cpp.h" +#line 567 "MachineIndependent/glslang_tab.cpp.h" }; typedef union YYSTYPE YYSTYPE; @@ -564,6 +573,8 @@ typedef union YYSTYPE YYSTYPE; + int yyparse (glslang::TParseContext* pParseContext); + #endif /* !YY_YY_MACHINEINDEPENDENT_GLSLANG_TAB_CPP_H_INCLUDED */ diff --git a/glslang/MachineIndependent/intermOut.cpp b/glslang/MachineIndependent/intermOut.cpp index d8a3aab5d0..32c3c573f9 100644 --- a/glslang/MachineIndependent/intermOut.cpp +++ b/glslang/MachineIndependent/intermOut.cpp @@ -36,8 +36,6 @@ // POSSIBILITY OF SUCH DAMAGE. // -#if !defined(GLSLANG_WEB) && !defined(GLSLANG_ANGLE) - #include "localintermediate.h" #include "../Include/InfoSink.h" @@ -663,11 +661,13 @@ bool TOutputTraverser::visitUnary(TVisit /* visit */, TIntermUnary* node) case EOpSubpassLoad: out.debug << "subpassLoad"; break; case EOpSubpassLoadMS: out.debug << "subpassLoadMS"; break; + case EOpColorAttachmentReadEXT: out.debug << "colorAttachmentReadEXT"; break; + case EOpConstructReference: out.debug << "Construct reference type"; break; -#ifndef GLSLANG_WEB + case EOpDeclare: out.debug << "Declare"; break; + case EOpSpirvInst: out.debug << "spirv_instruction"; break; -#endif default: out.debug.message(EPrefixError, "Bad unary op"); } @@ -692,6 +692,7 @@ bool TOutputTraverser::visitAggregate(TVisit /* visit */, TIntermAggregate* node switch (node->getOp()) { case EOpSequence: out.debug << "Sequence\n"; return true; + case EOpScope: out.debug << "Scope\n"; return true; case EOpLinkerObjects: out.debug << "Linker Objects\n"; return true; case EOpComma: out.debug << "Comma"; break; case EOpFunction: out.debug << "Function Definition: " << node->getName(); break; @@ -804,7 +805,8 @@ bool TOutputTraverser::visitAggregate(TVisit /* visit */, TIntermAggregate* node case EOpConstructStruct: out.debug << "Construct structure"; break; case EOpConstructTextureSampler: out.debug << "Construct combined texture-sampler"; break; case EOpConstructReference: out.debug << "Construct reference"; break; - case EOpConstructCooperativeMatrix: out.debug << "Construct cooperative matrix"; break; + case EOpConstructCooperativeMatrixNV: out.debug << "Construct cooperative matrix NV"; break; + case EOpConstructCooperativeMatrixKHR: out.debug << "Construct cooperative matrix KHR"; break; case EOpConstructAccStruct: out.debug << "Construct acceleration structure"; break; case EOpLessThan: out.debug << "Compare Less Than"; break; @@ -1057,6 +1059,8 @@ bool TOutputTraverser::visitAggregate(TVisit /* visit */, TIntermAggregate* node case EOpSubpassLoad: out.debug << "subpassLoad"; break; case EOpSubpassLoadMS: out.debug << "subpassLoadMS"; break; + case EOpColorAttachmentReadEXT: out.debug << "colorAttachmentReadEXT"; break; + case EOpTraceNV: out.debug << "traceNV"; break; case EOpTraceRayMotionNV: out.debug << "traceRayMotionNV"; break; case EOpTraceKHR: out.debug << "traceRayKHR"; break; @@ -1068,6 +1072,8 @@ bool TOutputTraverser::visitAggregate(TVisit /* visit */, TIntermAggregate* node case EOpExecuteCallableNV: out.debug << "executeCallableNV"; break; case EOpExecuteCallableKHR: out.debug << "executeCallableKHR"; break; case EOpWritePackedPrimitiveIndices4x8NV: out.debug << "writePackedPrimitiveIndices4x8NV"; break; + case EOpEmitMeshTasksEXT: out.debug << "EmitMeshTasksEXT"; break; + case EOpSetMeshOutputsEXT: out.debug << "SetMeshOutputsEXT"; break; case EOpRayQueryInitialize: out.debug << "rayQueryInitializeEXT"; break; case EOpRayQueryTerminate: out.debug << "rayQueryTerminateEXT"; break; @@ -1092,22 +1098,60 @@ bool TOutputTraverser::visitAggregate(TVisit /* visit */, TIntermAggregate* node case EOpRayQueryGetWorldRayOrigin: out.debug << "rayQueryGetWorldRayOriginEXT"; break; case EOpRayQueryGetIntersectionObjectToWorld: out.debug << "rayQueryGetIntersectionObjectToWorldEXT"; break; case EOpRayQueryGetIntersectionWorldToObject: out.debug << "rayQueryGetIntersectionWorldToObjectEXT"; break; + case EOpRayQueryGetIntersectionTriangleVertexPositionsEXT: out.debug << "rayQueryGetIntersectionTriangleVertexPositionsEXT"; break; - case EOpCooperativeMatrixLoad: out.debug << "Load cooperative matrix"; break; - case EOpCooperativeMatrixStore: out.debug << "Store cooperative matrix"; break; - case EOpCooperativeMatrixMulAdd: out.debug << "MulAdd cooperative matrices"; break; + case EOpCooperativeMatrixLoad: out.debug << "Load cooperative matrix KHR"; break; + case EOpCooperativeMatrixStore: out.debug << "Store cooperative matrix KHR"; break; + case EOpCooperativeMatrixMulAdd: out.debug << "MulAdd cooperative matrices KHR"; break; + case EOpCooperativeMatrixLoadNV: out.debug << "Load cooperative matrix NV"; break; + case EOpCooperativeMatrixStoreNV: out.debug << "Store cooperative matrix NV"; break; + case EOpCooperativeMatrixMulAddNV: out.debug << "MulAdd cooperative matrices NV"; break; case EOpIsHelperInvocation: out.debug << "IsHelperInvocation"; break; case EOpDebugPrintf: out.debug << "Debug printf"; break; -#ifndef GLSLANG_WEB + case EOpHitObjectTraceRayNV: out.debug << "HitObjectTraceRayNV"; break; + case EOpHitObjectTraceRayMotionNV: out.debug << "HitObjectTraceRayMotionNV"; break; + case EOpHitObjectRecordHitNV: out.debug << "HitObjectRecordHitNV"; break; + case EOpHitObjectRecordHitMotionNV: out.debug << "HitObjectRecordHitMotionNV"; break; + case EOpHitObjectRecordHitWithIndexNV: out.debug << "HitObjectRecordHitWithIndexNV"; break; + case EOpHitObjectRecordHitWithIndexMotionNV: out.debug << "HitObjectRecordHitWithIndexMotionNV"; break; + case EOpHitObjectRecordMissNV: out.debug << "HitObjectRecordMissNV"; break; + case EOpHitObjectRecordMissMotionNV: out.debug << "HitObjectRecordMissMotionNV"; break; + case EOpHitObjectRecordEmptyNV: out.debug << "HitObjectRecordEmptyNV"; break; + case EOpHitObjectExecuteShaderNV: out.debug << "HitObjectExecuteShaderNV"; break; + case EOpHitObjectIsEmptyNV: out.debug << "HitObjectIsEmptyNV"; break; + case EOpHitObjectIsMissNV: out.debug << "HitObjectIsMissNV"; break; + case EOpHitObjectIsHitNV: out.debug << "HitObjectIsHitNV"; break; + case EOpHitObjectGetRayTMinNV: out.debug << "HitObjectGetRayTMinNV"; break; + case EOpHitObjectGetRayTMaxNV: out.debug << "HitObjectGetRayTMaxNV"; break; + case EOpHitObjectGetObjectRayOriginNV: out.debug << "HitObjectGetObjectRayOriginNV"; break; + case EOpHitObjectGetObjectRayDirectionNV: out.debug << "HitObjectGetObjectRayDirectionNV"; break; + case EOpHitObjectGetWorldRayOriginNV: out.debug << "HitObjectGetWorldRayOriginNV"; break; + case EOpHitObjectGetWorldRayDirectionNV: out.debug << "HitObjectGetWorldRayDirectionNV"; break; + case EOpHitObjectGetObjectToWorldNV: out.debug << "HitObjectGetObjectToWorldNV"; break; + case EOpHitObjectGetWorldToObjectNV: out.debug << "HitObjectGetWorldToObjectNV"; break; + case EOpHitObjectGetInstanceCustomIndexNV: out.debug<< "HitObjectGetInstanceCustomIndexNV"; break; + case EOpHitObjectGetInstanceIdNV: out.debug << "HitObjectGetInstaneIdNV"; break; + case EOpHitObjectGetGeometryIndexNV: out.debug << "HitObjectGetGeometryIndexNV"; break; + case EOpHitObjectGetPrimitiveIndexNV: out.debug << "HitObjectGetPrimitiveIndexNV"; break; + case EOpHitObjectGetHitKindNV: out.debug << "HitObjectGetHitKindNV"; break; + case EOpHitObjectGetAttributesNV: out.debug << "HitObjectGetAttributesNV"; break; + case EOpHitObjectGetCurrentTimeNV: out.debug << "HitObjectGetCurrentTimeNV"; break; + case EOpHitObjectGetShaderBindingTableRecordIndexNV: out.debug << "HitObjectGetShaderBindingTableRecordIndexNV"; break; + case EOpHitObjectGetShaderRecordBufferHandleNV: out.debug << "HitObjectReadShaderRecordBufferHandleNV"; break; + case EOpReorderThreadNV: out.debug << "ReorderThreadNV"; break; + case EOpFetchMicroTriangleVertexPositionNV: out.debug << "MicroTriangleVertexPositionNV"; break; + case EOpFetchMicroTriangleVertexBarycentricNV: out.debug << "MicroTriangleVertexBarycentricNV"; break; + case EOpSpirvInst: out.debug << "spirv_instruction"; break; -#endif + case EOpStencilAttachmentReadEXT: out.debug << "stencilAttachmentReadEXT"; break; + case EOpDepthAttachmentReadEXT: out.debug << "depthAttachmentReadEXT"; break; default: out.debug.message(EPrefixError, "Bad aggregation op"); } - if (node->getOp() != EOpSequence && node->getOp() != EOpParameters) + if (node->getOp() != EOpSequence && node->getOp() != EOpScope && node->getOp() != EOpParameters) out.debug << " (" << node->getCompleteString() << ")"; out.debug << "\n"; @@ -1507,6 +1551,12 @@ void TIntermediate::output(TInfoSink& infoSink, bool tree) infoSink.debug << "using early_fragment_tests\n"; if (postDepthCoverage) infoSink.debug << "using post_depth_coverage\n"; + if (nonCoherentColorAttachmentReadEXT) + infoSink.debug << "using non_coherent_color_attachment_readEXT\n"; + if (nonCoherentDepthAttachmentReadEXT) + infoSink.debug << "using non_coherent_depth_attachment_readEXT\n"; + if (nonCoherentStencilAttachmentReadEXT) + infoSink.debug << "using non_coherent_stencil_attachment_readEXT\n"; if (depthLayout != EldNone) infoSink.debug << "using " << TQualifier::getLayoutDepthString(depthLayout) << "\n"; if (blendEquations != 0) { @@ -1522,12 +1572,12 @@ void TIntermediate::output(TInfoSink& infoSink, bool tree) infoSink.debug << "interlock ordering = " << TQualifier::getInterlockOrderingString(interlockOrdering) << "\n"; break; - case EShLangMeshNV: + case EShLangMesh: infoSink.debug << "max_vertices = " << vertices << "\n"; infoSink.debug << "max_primitives = " << primitives << "\n"; infoSink.debug << "output primitive = " << TQualifier::getGeometryString(outputPrimitive) << "\n"; // Fall through - case EShLangTaskNV: + case EShLangTask: // Fall through case EShLangCompute: infoSink.debug << "local_size = (" << localSize[0] << ", " << localSize[1] << ", " << localSize[2] << ")\n"; @@ -1547,7 +1597,7 @@ void TIntermediate::output(TInfoSink& infoSink, bool tree) break; } - if (treeRoot == 0 || ! tree) + if (treeRoot == nullptr || ! tree) return; TOutputTraverser it(infoSink); @@ -1557,5 +1607,3 @@ void TIntermediate::output(TInfoSink& infoSink, bool tree) } } // end namespace glslang - -#endif // !GLSLANG_WEB && !GLSLANG_ANGLE diff --git a/glslang/MachineIndependent/iomapper.cpp b/glslang/MachineIndependent/iomapper.cpp index 4250e92da6..63dedf76c6 100644 --- a/glslang/MachineIndependent/iomapper.cpp +++ b/glslang/MachineIndependent/iomapper.cpp @@ -33,8 +33,6 @@ // POSSIBILITY OF SUCH DAMAGE. // -#if !defined(GLSLANG_WEB) && !defined(GLSLANG_ANGLE) - #include "../Include/Common.h" #include "../Include/InfoSink.h" #include "../Include/Types.h" @@ -145,6 +143,8 @@ class TVarSetTraverser : public TLiveTraverser base->getWritableType().getQualifier().layoutComponent = at->second.newComponent; if (at->second.newIndex != -1) base->getWritableType().getQualifier().layoutIndex = at->second.newIndex; + if (at->second.upgradedToPushConstant) + base->getWritableType().getQualifier().layoutPushConstant = true; } private: @@ -1670,31 +1670,34 @@ bool TGlslIoMapper::doMap(TIoMapResolver* resolver, TInfoSink& infoSink) { } } } - // If it's been upgraded to push_constant, then remove it from the uniformVector + // If it's been upgraded to push_constant, then set the flag so when its traversed + // in the next for loop, all references to this symbol will get their flag changed. // so it doesn't get a set/binding assigned to it. if (upgraded) { - while (1) { - auto at = std::find_if(uniformVector.begin(), uniformVector.end(), - [this](const TVarLivePair& p) { return p.first == autoPushConstantBlockName; }); - if (at != uniformVector.end()) - uniformVector.erase(at); - else - break; - } + std::for_each(uniformVector.begin(), uniformVector.end(), + [this](TVarLivePair& p) { + if (p.first == autoPushConstantBlockName) { + p.second.upgradedToPushConstant = true; + } + }); } } for (size_t stage = 0; stage < EShLangCount; stage++) { if (intermediates[stage] != nullptr) { // traverse each stage, set new location to each input/output and unifom symbol, set new binding to - // ubo, ssbo and opaque symbols + // ubo, ssbo and opaque symbols. Assign push_constant upgrades as well. TVarLiveMap** pUniformVarMap = uniformResolve.uniformVarMap; std::for_each(uniformVector.begin(), uniformVector.end(), [pUniformVarMap, stage](TVarLivePair p) { auto at = pUniformVarMap[stage]->find(p.second.symbol->getAccessName()); if (at != pUniformVarMap[stage]->end() && at->second.id == p.second.id){ - int resolvedBinding = at->second.newBinding; - at->second = p.second; - if (resolvedBinding > 0) - at->second.newBinding = resolvedBinding; + if (p.second.upgradedToPushConstant) { + at->second.upgradedToPushConstant = true; + } else { + int resolvedBinding = at->second.newBinding; + at->second = p.second; + if (resolvedBinding > 0) + at->second.newBinding = resolvedBinding; + } } }); TVarSetTraverser iter_iomap(*intermediates[stage], *inVarMaps[stage], *outVarMaps[stage], @@ -1709,5 +1712,3 @@ bool TGlslIoMapper::doMap(TIoMapResolver* resolver, TInfoSink& infoSink) { } } // end namespace glslang - -#endif // !GLSLANG_WEB && !GLSLANG_ANGLE diff --git a/glslang/MachineIndependent/iomapper.h b/glslang/MachineIndependent/iomapper.h index ba7bc3bbc7..35babbce1b 100644 --- a/glslang/MachineIndependent/iomapper.h +++ b/glslang/MachineIndependent/iomapper.h @@ -33,8 +33,6 @@ // POSSIBILITY OF SUCH DAMAGE. // -#if !defined(GLSLANG_WEB) && !defined(GLSLANG_ANGLE) - #ifndef _IOMAPPER_INCLUDED #define _IOMAPPER_INCLUDED @@ -55,6 +53,7 @@ struct TVarEntryInfo { long long id; TIntermSymbol* symbol; bool live; + bool upgradedToPushConstant; int newBinding; int newSet; int newLocation; @@ -63,6 +62,7 @@ struct TVarEntryInfo { EShLanguage stage; void clearNewAssignments() { + upgradedToPushConstant = false; newBinding = -1; newSet = -1; newLocation = -1; @@ -357,5 +357,3 @@ class TGlslIoMapper : public TIoMapper { } // end namespace glslang #endif // _IOMAPPER_INCLUDED - -#endif // !GLSLANG_WEB && !GLSLANG_ANGLE diff --git a/glslang/MachineIndependent/limits.cpp b/glslang/MachineIndependent/limits.cpp index 391570579d..4404beca4f 100644 --- a/glslang/MachineIndependent/limits.cpp +++ b/glslang/MachineIndependent/limits.cpp @@ -187,14 +187,12 @@ bool TIndexTraverser::visitAggregate(TVisit /* visit */, TIntermAggregate* node) // void TParseContext::constantIndexExpressionCheck(TIntermNode* index) { -#ifndef GLSLANG_WEB TIndexTraverser it(inductiveLoopIds); index->traverse(&it); if (it.bad) error(it.badLoc, "Non-constant-index-expression", "limitations", ""); -#endif } } // end namespace glslang diff --git a/glslang/MachineIndependent/linkValidate.cpp b/glslang/MachineIndependent/linkValidate.cpp index 6e60155aaf..d69300b84d 100644 --- a/glslang/MachineIndependent/linkValidate.cpp +++ b/glslang/MachineIndependent/linkValidate.cpp @@ -57,13 +57,11 @@ namespace glslang { // void TIntermediate::error(TInfoSink& infoSink, const char* message, EShLanguage unitStage) { -#ifndef GLSLANG_WEB infoSink.info.prefix(EPrefixError); if (unitStage < EShLangCount) infoSink.info << "Linking " << StageName(getStage()) << " and " << StageName(unitStage) << " stages: " << message << "\n"; else infoSink.info << "Linking " << StageName(language) << " stage: " << message << "\n"; -#endif ++numErrors; } @@ -71,13 +69,11 @@ void TIntermediate::error(TInfoSink& infoSink, const char* message, EShLanguage // Link-time warning. void TIntermediate::warn(TInfoSink& infoSink, const char* message, EShLanguage unitStage) { -#ifndef GLSLANG_WEB infoSink.info.prefix(EPrefixWarning); if (unitStage < EShLangCount) infoSink.info << "Linking " << StageName(language) << " and " << StageName(unitStage) << " stages: " << message << "\n"; else infoSink.info << "Linking " << StageName(language) << " stage: " << message << "\n"; -#endif } // TODO: 4.4 offset/align: "Two blocks linked together in the same program with the same block @@ -89,11 +85,9 @@ void TIntermediate::warn(TInfoSink& infoSink, const char* message, EShLanguage u // void TIntermediate::merge(TInfoSink& infoSink, TIntermediate& unit) { -#if !defined(GLSLANG_WEB) && !defined(GLSLANG_ANGLE) mergeCallGraphs(infoSink, unit); mergeModes(infoSink, unit); mergeTrees(infoSink, unit); -#endif } // @@ -120,7 +114,7 @@ void TIntermediate::mergeUniformObjects(TInfoSink& infoSink, TIntermediate& unit } // -// do error checking on the shader boundary in / out vars +// do error checking on the shader boundary in / out vars // void TIntermediate::checkStageIO(TInfoSink& infoSink, TIntermediate& unit) { if (unit.treeRoot == nullptr || treeRoot == nullptr) @@ -161,8 +155,6 @@ void TIntermediate::mergeCallGraphs(TInfoSink& infoSink, TIntermediate& unit) callGraph.insert(callGraph.end(), unit.callGraph.begin(), unit.callGraph.end()); } -#if !defined(GLSLANG_WEB) && !defined(GLSLANG_ANGLE) - #define MERGE_MAX(member) member = std::max(member, unit.member) #define MERGE_TRUE(member) if (unit.member) member = unit.member; @@ -212,7 +204,7 @@ void TIntermediate::mergeModes(TInfoSink& infoSink, TIntermediate& unit) if (vertices == TQualifier::layoutNotSet) vertices = unit.vertices; else if (unit.vertices != TQualifier::layoutNotSet && vertices != unit.vertices) { - if (language == EShLangGeometry || language == EShLangMeshNV) + if (language == EShLangGeometry || language == EShLangMesh) error(infoSink, "Contradictory layout max_vertices values"); else if (language == EShLangTessControl) error(infoSink, "Contradictory layout vertices values"); @@ -222,7 +214,7 @@ void TIntermediate::mergeModes(TInfoSink& infoSink, TIntermediate& unit) if (primitives == TQualifier::layoutNotSet) primitives = unit.primitives; else if (primitives != unit.primitives) { - if (language == EShLangMeshNV) + if (language == EShLangMesh) error(infoSink, "Contradictory layout max_primitives values"); else assert(0); @@ -271,6 +263,9 @@ void TIntermediate::mergeModes(TInfoSink& infoSink, TIntermediate& unit) MERGE_TRUE(earlyFragmentTests); MERGE_TRUE(postDepthCoverage); + MERGE_TRUE(nonCoherentColorAttachmentReadEXT); + MERGE_TRUE(nonCoherentDepthAttachmentReadEXT); + MERGE_TRUE(nonCoherentStencilAttachmentReadEXT); if (depthLayout == EldNone) depthLayout = unit.depthLayout; @@ -319,6 +314,7 @@ void TIntermediate::mergeModes(TInfoSink& infoSink, TIntermediate& unit) MERGE_TRUE(autoMapLocations); MERGE_TRUE(invertY); MERGE_TRUE(dxPositionW); + MERGE_TRUE(debugInfo); MERGE_TRUE(flattenUniformArrays); MERGE_TRUE(useUnknownFormat); MERGE_TRUE(hlslOffsets); @@ -377,8 +373,6 @@ void TIntermediate::mergeTrees(TInfoSink& infoSink, TIntermediate& unit) ioAccessed.insert(unit.ioAccessed.begin(), unit.ioAccessed.end()); } -#endif - static const TString& getNameForIdMap(TIntermSymbol* symbol) { TShaderInterface si = symbol->getType().getShaderInterface(); @@ -637,18 +631,18 @@ void TIntermediate::mergeBlockDefinitions(TInfoSink& infoSink, TIntermSymbol* bl class TMergeBlockTraverser : public TIntermTraverser { public: TMergeBlockTraverser(const TIntermSymbol* newSym) - : newSymbol(newSym), unitType(nullptr), unit(nullptr), memberIndexUpdates(nullptr) + : newSymbol(newSym), newType(nullptr), unit(nullptr), memberIndexUpdates(nullptr) { } TMergeBlockTraverser(const TIntermSymbol* newSym, const glslang::TType* unitType, glslang::TIntermediate* unit, const std::map* memberIdxUpdates) - : TIntermTraverser(false, true), newSymbol(newSym), unitType(unitType), unit(unit), memberIndexUpdates(memberIdxUpdates) + : TIntermTraverser(false, true), newSymbol(newSym), newType(unitType), unit(unit), memberIndexUpdates(memberIdxUpdates) { } virtual ~TMergeBlockTraverser() {} const TIntermSymbol* newSymbol; - const glslang::TType* unitType; // copy of original type + const glslang::TType* newType; // shallow copy of the new type glslang::TIntermediate* unit; // intermediate that is being updated const std::map* memberIndexUpdates; @@ -664,10 +658,10 @@ void TIntermediate::mergeBlockDefinitions(TInfoSink& infoSink, TIntermSymbol* bl virtual bool visitBinary(TVisit, glslang::TIntermBinary* node) { - if (!unit || !unitType || !memberIndexUpdates || memberIndexUpdates->empty()) + if (!unit || !newType || !memberIndexUpdates || memberIndexUpdates->empty()) return true; - if (node->getOp() == EOpIndexDirectStruct && node->getLeft()->getType() == *unitType) { + if (node->getOp() == EOpIndexDirectStruct && node->getLeft()->getType() == *newType) { // this is a dereference to a member of the block since the // member list changed, need to update this to point to the // right index @@ -692,12 +686,12 @@ void TIntermediate::mergeBlockDefinitions(TInfoSink& infoSink, TIntermSymbol* bl TMergeBlockTraverser finalLinkTraverser(block); getTreeRoot()->traverse(&finalLinkTraverser); - // The 'unit' intermediate needs the block structures update, but also structure entry indices + // The 'unit' intermediate needs the block structures update, but also structure entry indices // may have changed from the old block to the new one that it was merged into, so update those // in 'visitBinary' - TType unitType; - unitType.shallowCopy(unitBlock->getType()); - TMergeBlockTraverser unitFinalLinkTraverser(block, &unitType, unit, &memberIndexUpdates); + TType newType; + newType.shallowCopy(block->getType()); + TMergeBlockTraverser unitFinalLinkTraverser(block, &newType, unit, &memberIndexUpdates); unit->getTreeRoot()->traverse(&unitFinalLinkTraverser); // update the member list @@ -748,6 +742,21 @@ void TIntermediate::mergeLinkerObjects(TInfoSink& infoSink, TIntermSequence& lin symbol->getQualifier().layoutLocation = unitSymbol->getQualifier().layoutLocation; } + // Update implicit array sizes + if (symbol->getWritableType().isImplicitlySizedArray() && unitSymbol->getType().isImplicitlySizedArray()) { + if (unitSymbol->getType().getImplicitArraySize() > symbol->getType().getImplicitArraySize()){ + symbol->getWritableType().updateImplicitArraySize(unitSymbol->getType().getImplicitArraySize()); + } + } + else if (symbol->getWritableType().isImplicitlySizedArray() && unitSymbol->getType().isSizedArray()) { + if (symbol->getWritableType().getImplicitArraySize() > unitSymbol->getType().getOuterArraySize()) + error(infoSink, "Implicit size of unsized array doesn't match same symbol among multiple shaders."); + } + else if (unitSymbol->getType().isImplicitlySizedArray() && symbol->getWritableType().isSizedArray()) { + if (unitSymbol->getType().getImplicitArraySize() > symbol->getWritableType().getOuterArraySize()) + error(infoSink, "Implicit size of unsized array doesn't match same symbol among multiple shaders."); + } + // Update implicit array sizes mergeImplicitArraySizes(symbol->getWritableType(), unitSymbol->getType()); @@ -758,6 +767,19 @@ void TIntermediate::mergeLinkerObjects(TInfoSink& infoSink, TIntermSequence& lin else if (symbol->getQualifier().isPushConstant() && unitSymbol->getQualifier().isPushConstant() && getStage() == unitStage) error(infoSink, "Only one push_constant block is allowed per stage"); } + + // Check conflicts between preset primitives and sizes of I/O variables among multiple geometry shaders + if (language == EShLangGeometry && unitStage == EShLangGeometry) + { + TIntermSymbol* unitSymbol = unitLinkerObjects[unitLinkObj]->getAsSymbolNode(); + if (unitSymbol->isArray() && unitSymbol->getQualifier().storage == EvqVaryingIn && unitSymbol->getQualifier().builtIn == EbvNone) + if ((unitSymbol->getArraySizes()->isImplicitlySized() && + unitSymbol->getArraySizes()->getImplicitSize() != TQualifier::mapGeometryToSize(getInputPrimitive())) || + (! unitSymbol->getArraySizes()->isImplicitlySized() && + unitSymbol->getArraySizes()->getDimSize(0) != TQualifier::mapGeometryToSize(getInputPrimitive()))) + error(infoSink, "Not all array sizes match across all geometry shaders in the program"); + } + if (merge) { linkerObjects.push_back(unitLinkerObjects[unitLinkObj]); @@ -827,7 +849,6 @@ void TIntermediate::mergeImplicitArraySizes(TType& type, const TType& unitType) // void TIntermediate::mergeErrorCheck(TInfoSink& infoSink, const TIntermSymbol& symbol, const TIntermSymbol& unitSymbol, EShLanguage unitStage) { -#if !defined(GLSLANG_WEB) && !defined(GLSLANG_ANGLE) bool crossStage = getStage() != unitStage; bool writeTypeComparison = false; bool errorReported = false; @@ -862,7 +883,8 @@ void TIntermediate::mergeErrorCheck(TInfoSink& infoSink, const TIntermSymbol& sy else { arraysMatch = symbol.getType().sameArrayness(unitSymbol.getType()) || (symbol.getType().isArray() && unitSymbol.getType().isArray() && - (symbol.getType().isUnsizedArray() || unitSymbol.getType().isUnsizedArray())); + (symbol.getType().isImplicitlySizedArray() || unitSymbol.getType().isImplicitlySizedArray() || + symbol.getType().isUnsizedArray() || unitSymbol.getType().isUnsizedArray())); } int lpidx = -1; @@ -1012,7 +1034,7 @@ void TIntermediate::mergeErrorCheck(TInfoSink& infoSink, const TIntermSymbol& sy } // Auxiliary and interpolation... - // "interpolation qualification (e.g., flat) and auxiliary qualification (e.g. centroid) may differ. + // "interpolation qualification (e.g., flat) and auxiliary qualification (e.g. centroid) may differ. // These mismatches are allowed between any pair of stages ... // those provided in the fragment shader supersede those provided in previous stages." if (!crossStage && @@ -1154,7 +1176,6 @@ void TIntermediate::mergeErrorCheck(TInfoSink& infoSink, const TIntermSymbol& sy } } } -#endif } void TIntermediate::sharedBlockCheck(TInfoSink& infoSink) @@ -1201,7 +1222,6 @@ void TIntermediate::finalCheck(TInfoSink& infoSink, bool keepUncalled) // overlap/alias/missing I/O, etc. inOutLocationCheck(infoSink); -#ifndef GLSLANG_WEB if (getNumPushConstants() > 1) error(infoSink, "Only one push_constant block is allowed per stage"); @@ -1294,8 +1314,8 @@ void TIntermediate::finalCheck(TInfoSink& infoSink, bool keepUncalled) error(infoSink, "At least one shader must specify a layout(max_vertices = value)"); break; case EShLangFragment: - // for GL_ARB_post_depth_coverage, EarlyFragmentTest is set automatically in - // ParseHelper.cpp. So if we reach here, this must be GL_EXT_post_depth_coverage + // for GL_ARB_post_depth_coverage, EarlyFragmentTest is set automatically in + // ParseHelper.cpp. So if we reach here, this must be GL_EXT_post_depth_coverage // requiring explicit early_fragment_tests if (getPostDepthCoverage() && !getEarlyFragmentTests()) error(infoSink, "post_depth_coverage requires early_fragment_tests"); @@ -1312,7 +1332,7 @@ void TIntermediate::finalCheck(TInfoSink& infoSink, bool keepUncalled) if (numShaderRecordBlocks > 1) error(infoSink, "Only one shaderRecordNV buffer block is allowed per stage"); break; - case EShLangMeshNV: + case EShLangMesh: // NV_mesh_shader doesn't allow use of both single-view and per-view builtins. if (inIoAccessed("gl_Position") && inIoAccessed("gl_PositionPerViewNV")) error(infoSink, "Can only use one of gl_Position or gl_PositionPerViewNV"); @@ -1331,9 +1351,11 @@ void TIntermediate::finalCheck(TInfoSink& infoSink, bool keepUncalled) if (primitives == TQualifier::layoutNotSet) error(infoSink, "At least one shader must specify a layout(max_primitives = value)"); // fall through - case EShLangTaskNV: + case EShLangTask: if (numTaskNVBlocks > 1) error(infoSink, "Only one taskNV interface block is allowed per shader"); + if (numTaskEXTPayloads > 1) + error(infoSink, "Only single variable of type taskPayloadSharedEXT is allowed per shader"); sharedBlockCheck(infoSink); break; default: @@ -1357,7 +1379,6 @@ void TIntermediate::finalCheck(TInfoSink& infoSink, bool keepUncalled) } finalLinkTraverser; treeRoot->traverse(&finalLinkTraverser); -#endif } // @@ -1380,7 +1401,7 @@ void TIntermediate::checkCallGraphCycles(TInfoSink& infoSink) TCall* newRoot; do { // See if we have unvisited parts of the graph. - newRoot = 0; + newRoot = nullptr; for (TGraph::iterator call = callGraph.begin(); call != callGraph.end(); ++call) { if (! call->visited) { newRoot = &(*call); @@ -1514,7 +1535,10 @@ void TIntermediate::checkCallGraphBodies(TInfoSink& infoSink, bool keepUncalled) if (! keepUncalled) { for (int f = 0; f < (int)functionSequence.size(); ++f) { if (! reachable[f]) + { + resetTopLevelUncalledStatus(functionSequence[f]->getAsAggregate()->getName()); functionSequence[f] = nullptr; + } } functionSequence.erase(std::remove(functionSequence.begin(), functionSequence.end(), nullptr), functionSequence.end()); } @@ -1582,7 +1606,7 @@ bool TIntermediate::userOutputUsed() const return found; } -// Accumulate locations used for inputs, outputs, and uniforms, payload and callable data +// Accumulate locations used for inputs, outputs, and uniforms, payload, callable data, and tileImageEXT // and check for collisions as the accumulation is done. // // Returns < 0 if no collision, >= 0 if collision and the value returned is a colliding value. @@ -1595,7 +1619,6 @@ int TIntermediate::addUsedLocation(const TQualifier& qualifier, const TType& typ typeCollision = false; int set; - int setRT; if (qualifier.isPipeInput()) set = 0; else if (qualifier.isPipeOutput()) @@ -1604,10 +1627,14 @@ int TIntermediate::addUsedLocation(const TQualifier& qualifier, const TType& typ set = 2; else if (qualifier.storage == EvqBuffer) set = 3; + else if (qualifier.storage == EvqTileImageEXT) + set = 4; else if (qualifier.isAnyPayload()) - setRT = 0; + set = 0; else if (qualifier.isAnyCallable()) - setRT = 1; + set = 1; + else if (qualifier.isHitObjectAttrNV()) + set = 2; else return -1; @@ -1646,13 +1673,14 @@ int TIntermediate::addUsedLocation(const TQualifier& qualifier, const TType& typ // For raytracing IO (payloads and callabledata) each declaration occupies a single // slot irrespective of type. int collision = -1; // no collision -#ifndef GLSLANG_WEB - if (qualifier.isAnyPayload() || qualifier.isAnyCallable()) { + if (qualifier.isAnyPayload() || qualifier.isAnyCallable() || qualifier.isHitObjectAttrNV()) { TRange range(qualifier.layoutLocation, qualifier.layoutLocation); - collision = checkLocationRT(setRT, qualifier.layoutLocation); + collision = checkLocationRT(set, qualifier.layoutLocation); if (collision < 0) - usedIoRT[setRT].push_back(range); - } else if (size == 2 && type.getBasicType() == EbtDouble && type.getVectorSize() == 3 && + usedIoRT[set].push_back(range); + return collision; + } + if (size == 2 && type.getBasicType() == EbtDouble && type.getVectorSize() == 3 && (qualifier.isPipeInput() || qualifier.isPipeOutput())) { // Dealing with dvec3 in/out split across two locations. // Need two io-ranges. @@ -1678,31 +1706,33 @@ int TIntermediate::addUsedLocation(const TQualifier& qualifier, const TType& typ if (collision < 0) usedIo[set].push_back(range2); } - } else -#endif - { - // Not a dvec3 in/out split across two locations, generic path. - // Need a single IO-range block. + return collision; + } - TRange locationRange(qualifier.layoutLocation, qualifier.layoutLocation + size - 1); - TRange componentRange(0, 3); - if (qualifier.hasComponent() || type.getVectorSize() > 0) { - int consumedComponents = type.getVectorSize() * (type.getBasicType() == EbtDouble ? 2 : 1); - if (qualifier.hasComponent()) - componentRange.start = qualifier.layoutComponent; - componentRange.last = componentRange.start + consumedComponents - 1; - } + // Not a dvec3 in/out split across two locations, generic path. + // Need a single IO-range block. - // combine location and component ranges - TIoRange range(locationRange, componentRange, type.getBasicType(), qualifier.hasIndex() ? qualifier.getIndex() : 0); + TRange locationRange(qualifier.layoutLocation, qualifier.layoutLocation + size - 1); + TRange componentRange(0, 3); + if (qualifier.hasComponent() || type.getVectorSize() > 0) { + int consumedComponents = type.getVectorSize() * (type.getBasicType() == EbtDouble ? 2 : 1); + if (qualifier.hasComponent()) + componentRange.start = qualifier.layoutComponent; + componentRange.last = componentRange.start + consumedComponents - 1; + } - // check for collisions, except for vertex inputs on desktop targeting OpenGL - if (! (!isEsProfile() && language == EShLangVertex && qualifier.isPipeInput()) || spvVersion.vulkan > 0) - collision = checkLocationRange(set, range, type, typeCollision); + // combine location and component ranges + TBasicType basicTy = type.getBasicType(); + if (basicTy == EbtSampler && type.getSampler().isAttachmentEXT()) + basicTy = type.getSampler().type; + TIoRange range(locationRange, componentRange, basicTy, qualifier.hasIndex() ? qualifier.getIndex() : 0); - if (collision < 0) - usedIo[set].push_back(range); - } + // check for collisions, except for vertex inputs on desktop targeting OpenGL + if (! (!isEsProfile() && language == EShLangVertex && qualifier.isPipeInput()) || spvVersion.vulkan > 0) + collision = checkLocationRange(set, range, type, typeCollision); + + if (collision < 0) + usedIo[set].push_back(range); return collision; } @@ -1725,6 +1755,19 @@ int TIntermediate::checkLocationRange(int set, const TIoRange& range, const TTyp } } + // check typeCollision between tileImageEXT and out + if (set == 4 || set == 1) { + // if the set is "tileImageEXT", check against "out" and vice versa + int againstSet = (set == 4) ? 1 : 4; + for (size_t r = 0; r < usedIo[againstSet].size(); ++r) { + if (range.location.overlap(usedIo[againstSet][r].location) && type.getBasicType() != usedIo[againstSet][r].basicType) { + // aliased-type mismatch + typeCollision = true; + return std::max(range.location.start, usedIo[againstSet][r].location.start); + } + } + } + return -1; // no collision } @@ -1788,10 +1831,8 @@ int TIntermediate::computeTypeLocationSize(const TType& type, EShLanguage stage) if (type.isSizedArray() && !type.getQualifier().isPerView()) return type.getOuterArraySize() * computeTypeLocationSize(elementType, stage); else { -#ifndef GLSLANG_WEB // unset perViewNV attributes for arrayed per-view outputs: "perviewNV vec4 v[MAX_VIEWS][3];" elementType.getQualifier().perViewNV = false; -#endif return computeTypeLocationSize(elementType, stage); } } @@ -1867,8 +1908,6 @@ int TIntermediate::computeTypeUniformLocationSize(const TType& type) return 1; } -#ifndef GLSLANG_WEB - // Accumulate xfb buffer ranges and check for collisions as the accumulation is done. // // Returns < 0 if no collision, >= 0 if collision and the value returned is a colliding value. @@ -1986,8 +2025,6 @@ unsigned int TIntermediate::computeTypeXfbSize(const TType& type, bool& contains } } -#endif - const int baseAlignmentVec4Std140 = 16; // Return the size and alignment of a component of the given type. @@ -1995,10 +2032,6 @@ const int baseAlignmentVec4Std140 = 16; // Return value is the alignment.. int TIntermediate::getBaseAlignmentScalar(const TType& type, int& size) { -#ifdef GLSLANG_WEB - size = 4; return 4; -#endif - switch (type.getBasicType()) { case EbtInt64: case EbtUint64: @@ -2009,6 +2042,15 @@ int TIntermediate::getBaseAlignmentScalar(const TType& type, int& size) case EbtInt16: case EbtUint16: size = 2; return 2; case EbtReference: size = 8; return 8; + case EbtSampler: + { + if (type.isBindlessImage() || type.isBindlessTexture()) { + size = 8; return 8; + } + else { + size = 4; return 4; + } + } default: size = 4; return 4; } } @@ -2226,7 +2268,7 @@ int TIntermediate::getScalarAlignment(const TType& type, int& size, int& stride, if (type.isVector()) { int scalarAlign = getBaseAlignmentScalar(type, size); - + size *= type.getVectorSize(); return scalarAlign; } @@ -2247,7 +2289,7 @@ int TIntermediate::getScalarAlignment(const TType& type, int& size, int& stride, assert(0); // all cases should be covered above size = 1; - return 1; + return 1; } int TIntermediate::getMemberAlignment(const TType& type, int& size, int& stride, TLayoutPacking layoutPacking, bool rowMajor) @@ -2329,7 +2371,6 @@ int TIntermediate::computeBufferReferenceTypeSize(const TType& type) return size; } -#ifndef GLSLANG_WEB bool TIntermediate::isIoResizeArray(const TType& type, EShLanguage language) { return type.isArray() && ((language == EShLangGeometry && type.getQualifier().storage == EvqVaryingIn) || @@ -2338,9 +2379,8 @@ bool TIntermediate::isIoResizeArray(const TType& type, EShLanguage language) { (language == EShLangTessEvaluation && type.getQualifier().storage == EvqVaryingIn) || (language == EShLangFragment && type.getQualifier().storage == EvqVaryingIn && (type.getQualifier().pervertexNV || type.getQualifier().pervertexEXT)) || - (language == EShLangMeshNV && type.getQualifier().storage == EvqVaryingOut && + (language == EShLangMesh && type.getQualifier().storage == EvqVaryingOut && !type.getQualifier().perTaskNV)); } -#endif // not GLSLANG_WEB } // end namespace glslang diff --git a/glslang/MachineIndependent/localintermediate.h b/glslang/MachineIndependent/localintermediate.h index ddeaa3530e..2f0e65ce39 100644 --- a/glslang/MachineIndependent/localintermediate.h +++ b/glslang/MachineIndependent/localintermediate.h @@ -147,7 +147,6 @@ struct TOffsetRange { TRange offset; }; -#ifndef GLSLANG_WEB // Things that need to be tracked per xfb buffer. struct TXfbBuffer { TXfbBuffer() : stride(TQualifier::layoutXfbStrideEnd), implicitStride(0), contains64BitType(false), @@ -159,7 +158,6 @@ struct TXfbBuffer { bool contains32BitType; bool contains16BitType; }; -#endif // Track a set of strings describing how the module was processed. // This includes command line options, transforms, etc., ideally inclusive enough @@ -225,6 +223,16 @@ enum ComputeDerivativeMode { LayoutDerivativeGroupLinear, // derivative_group_linearNV }; +// +// Status type on AST level. Some uncalled status or functions would be reset in call graph. +// Currently we will keep status set by explicitly declared layout or variable decl. +// +enum AstRefType { + AstRefTypeVar, // Status set by variable decl + AstRefTypeFunc, // Status set by function decl + AstRefTypeLayout, // Status set by layout decl +}; + class TIdMaps { public: TMap& operator[](long long i) { return maps[i]; } @@ -283,15 +291,14 @@ class TIntermediate { public: explicit TIntermediate(EShLanguage l, int v = 0, EProfile p = ENoProfile) : language(l), -#ifndef GLSLANG_ANGLE profile(p), version(v), -#endif - treeRoot(0), + treeRoot(nullptr), resources(TBuiltInResource{}), numEntryPoints(0), numErrors(0), numPushConstants(0), recursive(false), invertY(false), dxPositionW(false), enhancedMsgs(false), + debugInfo(false), useStorageBuffer(false), invariantAll(false), nanMinMaxClamp(false), @@ -302,9 +309,7 @@ class TIntermediate { atomicCounterBlockName(""), globalUniformBlockSet(TQualifier::layoutSetEnd), globalUniformBlockBinding(TQualifier::layoutBindingEnd), - atomicCounterBlockSet(TQualifier::layoutSetEnd) -#ifndef GLSLANG_WEB - , + atomicCounterBlockSet(TQualifier::layoutSetEnd), implicitThisName("@this"), implicitCounterName("@count"), source(EShSourceNone), useVulkanMemoryModel(false), @@ -312,7 +317,12 @@ class TIntermediate { inputPrimitive(ElgNone), outputPrimitive(ElgNone), pixelCenterInteger(false), originUpperLeft(false),texCoordBuiltinRedeclared(false), vertexSpacing(EvsNone), vertexOrder(EvoNone), interlockOrdering(EioNone), pointMode(false), earlyFragmentTests(false), - postDepthCoverage(false), earlyAndLateFragmentTestsAMD(false), depthLayout(EldNone), stencilLayout(ElsNone), + postDepthCoverage(false), earlyAndLateFragmentTestsAMD(false), + nonCoherentColorAttachmentReadEXT(false), + nonCoherentDepthAttachmentReadEXT(false), + nonCoherentStencilAttachmentReadEXT(false), + depthLayout(EldNone), + stencilLayout(ElsNone), hlslFunctionality1(false), blendEquations(0), xfbMode(false), multiStream(false), layoutOverrideCoverage(false), @@ -322,6 +332,7 @@ class TIntermediate { primitives(TQualifier::layoutNotSet), numTaskNVBlocks(0), layoutPrimitiveCulling(false), + numTaskEXTPayloads(0), autoMapBindings(false), autoMapLocations(false), flattenUniformArrays(false), @@ -337,7 +348,6 @@ class TIntermediate { spirvRequirement(nullptr), spirvExecutionMode(nullptr), uniformLocationBase(0) -#endif { localSize[0] = 1; localSize[1] = 1; @@ -348,23 +358,17 @@ class TIntermediate { localSizeSpecId[0] = TQualifier::layoutNotSet; localSizeSpecId[1] = TQualifier::layoutNotSet; localSizeSpecId[2] = TQualifier::layoutNotSet; -#ifndef GLSLANG_WEB xfbBuffers.resize(TQualifier::layoutXfbBufferEnd); shiftBinding.fill(0); -#endif } void setVersion(int v) { -#ifndef GLSLANG_ANGLE version = v; -#endif } void setProfile(EProfile p) { -#ifndef GLSLANG_ANGLE profile = p; -#endif } int getVersion() const { return version; } @@ -461,6 +465,12 @@ class TIntermediate { const std::string& getEntryPointName() const { return entryPointName; } const std::string& getEntryPointMangledName() const { return entryPointMangledName; } + void setDebugInfo(bool debuginfo) + { + debugInfo = debuginfo; + } + bool getDebugInfo() const { return debugInfo; } + void setInvertY(bool invert) { invertY = invert; @@ -619,34 +629,6 @@ class TIntermediate { localSizeSpecId[1] != TQualifier::layoutNotSet || localSizeSpecId[2] != TQualifier::layoutNotSet; } -#ifdef GLSLANG_WEB - void output(TInfoSink&, bool tree) { } - - bool isEsProfile() const { return false; } - bool getXfbMode() const { return false; } - bool isMultiStream() const { return false; } - TLayoutGeometry getOutputPrimitive() const { return ElgNone; } - bool getPostDepthCoverage() const { return false; } - bool getEarlyFragmentTests() const { return false; } - TLayoutDepth getDepth() const { return EldNone; } - bool getPixelCenterInteger() const { return false; } - void setOriginUpperLeft() { } - bool getOriginUpperLeft() const { return true; } - TInterlockOrdering getInterlockOrdering() const { return EioNone; } - - bool getAutoMapBindings() const { return false; } - bool getAutoMapLocations() const { return false; } - int getNumPushConstants() const { return 0; } - void addShaderRecordCount() { } - void addTaskNVCount() { } - void setUseVulkanMemoryModel() { } - bool usingVulkanMemoryModel() const { return false; } - bool usingPhysicalStorageBuffer() const { return false; } - bool usingVariablePointers() const { return false; } - unsigned getXfbStride(int buffer) const { return 0; } - bool hasLayoutDerivativeModeNone() const { return false; } - ComputeDerivativeMode getLayoutDerivativeModeNone() const { return LayoutDerivativeNone; } -#else void output(TInfoSink&, bool tree); bool isEsProfile() const { return profile == EEsProfile; } @@ -741,6 +723,65 @@ class TIntermediate { useVariablePointers = true; processes.addProcess("use-variable-pointers"); } + // Set the global flag for bindless texture + void setBindlessTextureMode(const TString& currentCaller, AstRefType type) + { + // When type is not func, currentCaller should be "" (empty string) + bindlessTextureModeCaller[currentCaller] = type; + } + + // Get the global flag for bindless texture + bool getBindlessTextureMode() const + { + return (bindlessTextureModeCaller.size() > 0); + } + + // Set the global flag for bindless image + void setBindlessImageMode(const TString& currentCaller, AstRefType type) + { + // When type is not func, currentCaller should be "" (empty string) + bindlessImageModeCaller[currentCaller] = type; + } + + // Get the global flag for bindless image + bool getBindlessImageMode() const + { + return (bindlessImageModeCaller.size() > 0); + } + + // Get the global flag for bindless texture + bool resetTopLevelUncalledStatus(const TString& deadCaller) + { + // For reflection collection purpose, currently uniform layout setting and some + // flags introduced by variables (IO, global, etc,.) won't be reset here. + // Remove each global status (AST top level) introduced by uncalled functions. + // If a status is set by several functions, keep those which in call graph. + bool result = false; + + // For two types of bindless mode flag, we would only reset which is set by an uncalled function. + // If one status flag's key in caller vec is empty, it should be come from a non-function setting. + if (!bindlessTextureModeCaller.empty()) { + auto caller = bindlessTextureModeCaller.find(deadCaller); + if (caller != bindlessTextureModeCaller.end() && bindlessTextureModeCaller[deadCaller] == AstRefTypeFunc) { + bindlessTextureModeCaller.erase(caller); + result = true; + } + } + if (!bindlessImageModeCaller.empty()) { + auto caller = bindlessImageModeCaller.find(deadCaller); + if (caller != bindlessImageModeCaller.end() && bindlessImageModeCaller[deadCaller] == AstRefTypeFunc) { + bindlessImageModeCaller.erase(caller); + result = true; + } + } + return result; + } + + bool getBindlessMode() const + { + return getBindlessTextureMode() || getBindlessImageMode(); + } + bool usingVariablePointers() const { return useVariablePointers; } #ifdef ENABLE_HLSL @@ -756,6 +797,7 @@ class TIntermediate { int getNumPushConstants() const { return numPushConstants; } void addShaderRecordCount() { ++numShaderRecordBlocks; } void addTaskNVCount() { ++numTaskNVBlocks; } + void addTaskPayloadEXTCount() { ++numTaskEXTPayloads; } bool setInvocations(int i) { @@ -821,6 +863,12 @@ class TIntermediate { return true; } TLayoutGeometry getOutputPrimitive() const { return outputPrimitive; } + void setNonCoherentColorAttachmentReadEXT() { nonCoherentColorAttachmentReadEXT = true; } + bool getNonCoherentColorAttachmentReadEXT() const { return nonCoherentColorAttachmentReadEXT; } + void setNonCoherentDepthAttachmentReadEXT() { nonCoherentDepthAttachmentReadEXT = true; } + bool getNonCoherentDepthAttachmentReadEXT() const { return nonCoherentDepthAttachmentReadEXT; } + void setNonCoherentStencilAttachmentReadEXT() { nonCoherentStencilAttachmentReadEXT = true; } + bool getNonCoherentStencilAttachmentReadEXT() const { return nonCoherentStencilAttachmentReadEXT; } void setPostDepthCoverage() { postDepthCoverage = true; } bool getPostDepthCoverage() const { return postDepthCoverage; } void setEarlyFragmentTests() { earlyFragmentTests = true; } @@ -919,7 +967,6 @@ class TIntermediate { void insertSpirvExecutionModeId(int executionMode, const TIntermAggregate* args); bool hasSpirvExecutionMode() const { return spirvExecutionMode != nullptr; } const TSpirvExecutionMode& getSpirvExecutionMode() const { return *spirvExecutionMode; } -#endif // GLSLANG_WEB void addBlockStorageOverride(const char* nameStr, TBlockStorageClass backing) { @@ -1026,12 +1073,6 @@ class TIntermediate { void setUniqueId(unsigned long long id) { uniqueId = id; } // Certain explicit conversions are allowed conditionally -#ifdef GLSLANG_WEB - bool getArithemeticInt8Enabled() const { return false; } - bool getArithemeticInt16Enabled() const { return false; } - bool getArithemeticFloat16Enabled() const { return false; } - void updateNumericFeature(TNumericFeatures::feature f, bool on) { } -#else bool getArithemeticInt8Enabled() const { return numericFeatures.contains(TNumericFeatures::shader_explicit_arithmetic_types) || numericFeatures.contains(TNumericFeatures::shader_explicit_arithmetic_types_int8); @@ -1049,7 +1090,6 @@ class TIntermediate { } void updateNumericFeature(TNumericFeatures::feature f, bool on) { on ? numericFeatures.insert(f) : numericFeatures.erase(f); } -#endif protected: TIntermSymbol* addSymbol(long long Id, const TString&, const TType&, const TConstUnionArray&, TIntermTyped* subtree, const TSourceLoc&); @@ -1091,13 +1131,8 @@ class TIntermediate { typedef std::list TGraph; TGraph callGraph; -#ifdef GLSLANG_ANGLE - const EProfile profile = ECoreProfile; - const int version = 450; -#else EProfile profile; // source profile int version; // source version -#endif SpvVersion spvVersion; TIntermNode* treeRoot; std::set requestedExtensions; // cumulation of all enabled or required extensions; not connected to what subset of the shader used them @@ -1109,6 +1144,7 @@ class TIntermediate { bool invertY; bool dxPositionW; bool enhancedMsgs; + bool debugInfo; bool useStorageBuffer; bool invariantAll; bool nanMinMaxClamp; // true if desiring min/max/clamp to favor non-NaN over NaN @@ -1125,7 +1161,6 @@ class TIntermediate { unsigned int globalUniformBlockBinding; unsigned int atomicCounterBlockSet; -#ifndef GLSLANG_WEB public: const char* const implicitThisName; const char* const implicitCounterName; @@ -1146,6 +1181,9 @@ class TIntermediate { bool earlyFragmentTests; bool postDepthCoverage; bool earlyAndLateFragmentTestsAMD; + bool nonCoherentColorAttachmentReadEXT; + bool nonCoherentDepthAttachmentReadEXT; + bool nonCoherentStencilAttachmentReadEXT; TLayoutDepth depthLayout; TLayoutStencil stencilLayout; bool hlslFunctionality1; @@ -1160,6 +1198,7 @@ class TIntermediate { int primitives; int numTaskNVBlocks; bool layoutPrimitiveCulling; + int numTaskEXTPayloads; // Base shift values std::array shiftBinding; @@ -1187,18 +1226,19 @@ class TIntermediate { TSpirvRequirement* spirvRequirement; TSpirvExecutionMode* spirvExecutionMode; - + std::map bindlessTextureModeCaller; + std::map bindlessImageModeCaller; std::unordered_map uniformLocationOverrides; int uniformLocationBase; TNumericFeatures numericFeatures; -#endif std::unordered_map blockBackingOverrides; std::unordered_set usedConstantId; // specialization constant ids used std::vector usedAtomics; // sets of bindings used by atomic counters std::vector usedIo[4]; // sets of used locations, one for each of in, out, uniform, and buffers - std::vector usedIoRT[2]; // sets of used location, one for rayPayload/rayPayloadIN and other - // for callableData/callableDataIn + std::vector usedIoRT[4]; // sets of used location, one for rayPayload/rayPayloadIN, + // one for callableData/callableDataIn, one for hitObjectAttributeNV and + // one for shaderrecordhitobjectNV // set of names of statically read/written I/O that might need extra checking std::set ioAccessed; diff --git a/glslang/MachineIndependent/parseConst.cpp b/glslang/MachineIndependent/parseConst.cpp index 6c182991f5..835097234e 100644 --- a/glslang/MachineIndependent/parseConst.cpp +++ b/glslang/MachineIndependent/parseConst.cpp @@ -198,7 +198,7 @@ void TConstTraverser::visitConstantUnion(TIntermConstantUnion* node) bool TIntermediate::parseConstTree(TIntermNode* root, TConstUnionArray unionArray, TOperator constructorType, const TType& t, bool singleConstantParam) { - if (root == 0) + if (root == nullptr) return false; TConstTraverser it(unionArray, singleConstantParam, constructorType, t); diff --git a/glslang/MachineIndependent/parseVersions.h b/glslang/MachineIndependent/parseVersions.h index 7248354e4b..63841c408a 100644 --- a/glslang/MachineIndependent/parseVersions.h +++ b/glslang/MachineIndependent/parseVersions.h @@ -58,72 +58,18 @@ class TParseVersions { const SpvVersion& spvVersion, EShLanguage language, TInfoSink& infoSink, bool forwardCompatible, EShMessages messages) : -#if !defined(GLSLANG_WEB) && !defined(GLSLANG_ANGLE) forwardCompatible(forwardCompatible), profile(profile), -#endif infoSink(infoSink), version(version), language(language), spvVersion(spvVersion), - intermediate(interm), messages(messages), numErrors(0), currentScanner(0) { } + intermediate(interm), messages(messages), numErrors(0), currentScanner(nullptr) { } virtual ~TParseVersions() { } void requireStage(const TSourceLoc&, EShLanguageMask, const char* featureDesc); void requireStage(const TSourceLoc&, EShLanguage, const char* featureDesc); -#ifdef GLSLANG_WEB - const EProfile profile = EEsProfile; - bool isEsProfile() const { return true; } - void requireProfile(const TSourceLoc& loc, int profileMask, const char* featureDesc) - { - if (! (EEsProfile & profileMask)) - error(loc, "not supported with this profile:", featureDesc, ProfileName(profile)); - } - void profileRequires(const TSourceLoc& loc, int profileMask, int minVersion, int numExtensions, - const char* const extensions[], const char* featureDesc) - { - if ((EEsProfile & profileMask) && (minVersion == 0 || version < minVersion)) - error(loc, "not supported for this version or the enabled extensions", featureDesc, ""); - } - void profileRequires(const TSourceLoc& loc, int profileMask, int minVersion, const char* extension, - const char* featureDesc) - { - profileRequires(loc, profileMask, minVersion, extension ? 1 : 0, &extension, featureDesc); - } - void initializeExtensionBehavior() { } - void checkDeprecated(const TSourceLoc&, int queryProfiles, int depVersion, const char* featureDesc) { } - void requireNotRemoved(const TSourceLoc&, int queryProfiles, int removedVersion, const char* featureDesc) { } - void requireExtensions(const TSourceLoc&, int numExtensions, const char* const extensions[], - const char* featureDesc) { } - void ppRequireExtensions(const TSourceLoc&, int numExtensions, const char* const extensions[], - const char* featureDesc) { } - TExtensionBehavior getExtensionBehavior(const char*) { return EBhMissing; } - bool extensionTurnedOn(const char* const extension) { return false; } - bool extensionsTurnedOn(int numExtensions, const char* const extensions[]) { return false; } - void updateExtensionBehavior(int line, const char* const extension, const char* behavior) { } - void updateExtensionBehavior(const char* const extension, TExtensionBehavior) { } - void checkExtensionStage(const TSourceLoc&, const char* const extension) { } - void extensionRequires(const TSourceLoc&, const char* const extension, const char* behavior) { } - void fullIntegerCheck(const TSourceLoc&, const char* op) { } - void doubleCheck(const TSourceLoc&, const char* op) { } - bool float16Arithmetic() { return false; } - void requireFloat16Arithmetic(const TSourceLoc& loc, const char* op, const char* featureDesc) { } - bool int16Arithmetic() { return false; } - void requireInt16Arithmetic(const TSourceLoc& loc, const char* op, const char* featureDesc) { } - bool int8Arithmetic() { return false; } - void requireInt8Arithmetic(const TSourceLoc& loc, const char* op, const char* featureDesc) { } - void int64Check(const TSourceLoc&, const char* op, bool builtIn = false) { } - void explicitFloat32Check(const TSourceLoc&, const char* op, bool builtIn = false) { } - void explicitFloat64Check(const TSourceLoc&, const char* op, bool builtIn = false) { } - bool relaxedErrors() const { return false; } - bool suppressWarnings() const { return true; } - bool isForwardCompatible() const { return false; } -#else -#ifdef GLSLANG_ANGLE - const bool forwardCompatible = true; - const EProfile profile = ECoreProfile; -#else + bool forwardCompatible; // true if errors are to be given for use of deprecated features EProfile profile; // the declared profile in the shader (core by default) -#endif bool isEsProfile() const { return profile == EEsProfile; } void requireProfile(const TSourceLoc& loc, int profileMask, const char* featureDesc); void profileRequires(const TSourceLoc& loc, int profileMask, int minVersion, int numExtensions, @@ -167,29 +113,19 @@ class TParseVersions { virtual void explicitInt32Check(const TSourceLoc&, const char* op, bool builtIn = false); virtual void explicitFloat32Check(const TSourceLoc&, const char* op, bool builtIn = false); virtual void explicitFloat64Check(const TSourceLoc&, const char* op, bool builtIn = false); - virtual void fcoopmatCheck(const TSourceLoc&, const char* op, bool builtIn = false); - virtual void intcoopmatCheck(const TSourceLoc&, const char *op, bool builtIn = false); + virtual void fcoopmatCheckNV(const TSourceLoc&, const char* op, bool builtIn = false); + virtual void intcoopmatCheckNV(const TSourceLoc&, const char *op, bool builtIn = false); + virtual void coopmatCheck(const TSourceLoc&, const char* op, bool builtIn = false); bool relaxedErrors() const { return (messages & EShMsgRelaxedErrors) != 0; } bool suppressWarnings() const { return (messages & EShMsgSuppressWarnings) != 0; } bool isForwardCompatible() const { return forwardCompatible; } -#endif // GLSLANG_WEB + virtual void spvRemoved(const TSourceLoc&, const char* op); virtual void vulkanRemoved(const TSourceLoc&, const char* op); virtual void requireVulkan(const TSourceLoc&, const char* op); virtual void requireSpv(const TSourceLoc&, const char* op); virtual void requireSpv(const TSourceLoc&, const char *op, unsigned int version); - -#if defined(GLSLANG_WEB) && !defined(GLSLANG_WEB_DEVEL) - void C_DECL error(const TSourceLoc&, const char* szReason, const char* szToken, - const char* szExtraInfoFormat, ...) { addError(); } - void C_DECL warn(const TSourceLoc&, const char* szReason, const char* szToken, - const char* szExtraInfoFormat, ...) { } - void C_DECL ppError(const TSourceLoc&, const char* szReason, const char* szToken, - const char* szExtraInfoFormat, ...) { addError(); } - void C_DECL ppWarn(const TSourceLoc&, const char* szReason, const char* szToken, - const char* szExtraInfoFormat, ...) { } -#else virtual void C_DECL error(const TSourceLoc&, const char* szReason, const char* szToken, const char* szExtraInfoFormat, ...) = 0; virtual void C_DECL warn(const TSourceLoc&, const char* szReason, const char* szToken, @@ -198,7 +134,6 @@ class TParseVersions { const char* szExtraInfoFormat, ...) = 0; virtual void C_DECL ppWarn(const TSourceLoc&, const char* szReason, const char* szToken, const char* szExtraInfoFormat, ...) = 0; -#endif void addError() { ++numErrors; } int getNumErrors() const { return numErrors; } @@ -231,6 +166,7 @@ class TParseVersions { protected: TMap extensionBehavior; // for each extension string, what its current behavior is TMap extensionMinSpv; // for each extension string, store minimum spirv required + TVector spvUnsupportedExt; // for extensions reserved for spv usage. EShMessages messages; // errors/warnings/rule-sets int numErrors; // number of compile-time errors encountered TInputScanner* currentScanner; diff --git a/glslang/MachineIndependent/preprocessor/Pp.cpp b/glslang/MachineIndependent/preprocessor/Pp.cpp index aa1e0d7451..16b9d24376 100644 --- a/glslang/MachineIndependent/preprocessor/Pp.cpp +++ b/glslang/MachineIndependent/preprocessor/Pp.cpp @@ -378,8 +378,6 @@ namespace { int op_cmpl(int a) { return ~a; } int op_not(int a) { return !a; } -}; - struct TBinop { int token, precedence, (*op)(int, int); } binop[] = { @@ -412,6 +410,8 @@ struct TUnop { { '!', op_not }, }; +} // anonymous namespace + #define NUM_ELEMENTS(A) (sizeof(A) / sizeof(A[0])) int TPpContext::eval(int token, int precedence, bool shortCircuit, int& res, bool& err, TPpToken* ppToken) @@ -736,7 +736,6 @@ int TPpContext::CPPline(TPpToken* ppToken) parseContext.setCurrentLine(lineRes); if (token != '\n') { -#ifndef GLSLANG_WEB if (token == PpAtomConstString) { parseContext.ppRequireExtensions(directiveLoc, 1, &E_GL_GOOGLE_cpp_style_line_directive, "filename-based #line"); // We need to save a copy of the string instead of pointing @@ -746,9 +745,7 @@ int TPpContext::CPPline(TPpToken* ppToken) parseContext.setCurrentSourceName(sourceName); hasFile = true; token = scanToken(ppToken); - } else -#endif - { + } else { token = eval(token, MIN_PRECEDENCE, false, fileRes, fileErr, ppToken); if (! fileErr) { parseContext.setCurrentString(fileRes); @@ -974,7 +971,6 @@ int TPpContext::readCPPline(TPpToken* ppToken) case PpAtomLine: token = CPPline(ppToken); break; -#ifndef GLSLANG_WEB case PpAtomInclude: if(!parseContext.isReadingHLSL()) { parseContext.ppRequireExtensions(ppToken->loc, 1, &E_GL_GOOGLE_include_directive, "#include"); @@ -984,7 +980,6 @@ int TPpContext::readCPPline(TPpToken* ppToken) case PpAtomPragma: token = CPPpragma(ppToken); break; -#endif case PpAtomUndef: token = CPPundef(ppToken); break; @@ -1126,9 +1121,6 @@ int TPpContext::tMacroInput::scan(TPpToken* ppToken) pasting = true; } - // HLSL does expand macros before concatenation - if (pasting && pp->parseContext.isReadingHLSL()) - pasting = false; // TODO: preprocessor: properly handle whitespace (or lack of it) between tokens when expanding if (token == PpAtomIdentifier) { @@ -1138,9 +1130,12 @@ int TPpContext::tMacroInput::scan(TPpToken* ppToken) break; if (i >= 0) { TokenStream* arg = expandedArgs[i]; - if (arg == nullptr || pasting) + bool expanded = !!arg && !pasting; + // HLSL does expand macros before concatenation + if (arg == nullptr || (pasting && !pp->parseContext.isReadingHLSL()) ) { arg = args[i]; - pp->pushTokenStreamInput(*arg, prepaste); + } + pp->pushTokenStreamInput(*arg, prepaste, expanded); return pp->scanToken(ppToken); } @@ -1183,6 +1178,9 @@ MacroExpandResult TPpContext::MacroExpand(TPpToken* ppToken, bool expandUndef, b { ppToken->space = false; int macroAtom = atomStrings.getAtom(ppToken->name); + if (ppToken->fullyExpanded) + return MacroExpandNotStarted; + switch (macroAtom) { case PpAtomLineMacro: // Arguments which are macro have been replaced in the first stage. @@ -1214,8 +1212,10 @@ MacroExpandResult TPpContext::MacroExpand(TPpToken* ppToken, bool expandUndef, b MacroSymbol* macro = macroAtom == 0 ? nullptr : lookupMacroDef(macroAtom); // no recursive expansions - if (macro != nullptr && macro->busy) + if (macro != nullptr && macro->busy) { + ppToken->fullyExpanded = true; return MacroExpandNotStarted; + } // not expanding undefined macros if ((macro == nullptr || macro->undef) && ! expandUndef) diff --git a/glslang/MachineIndependent/preprocessor/PpContext.cpp b/glslang/MachineIndependent/preprocessor/PpContext.cpp index 1363ce2be0..70f511978c 100644 --- a/glslang/MachineIndependent/preprocessor/PpContext.cpp +++ b/glslang/MachineIndependent/preprocessor/PpContext.cpp @@ -85,7 +85,7 @@ NVIDIA HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. namespace glslang { TPpContext::TPpContext(TParseContextBase& pc, const std::string& rootFileName, TShader::Includer& inclr) : - preamble(0), strings(0), previous_token('\n'), parseContext(pc), includer(inclr), inComment(false), + preamble(nullptr), strings(nullptr), previous_token('\n'), parseContext(pc), includer(inclr), inComment(false), rootFileName(rootFileName), currentSourceFile(rootFileName), disableEscapeSequences(false) diff --git a/glslang/MachineIndependent/preprocessor/PpContext.h b/glslang/MachineIndependent/preprocessor/PpContext.h index 714b5eadba..590eab6b20 100644 --- a/glslang/MachineIndependent/preprocessor/PpContext.h +++ b/glslang/MachineIndependent/preprocessor/PpContext.h @@ -102,6 +102,7 @@ class TPpToken { i64val = 0; loc.init(); name[0] = 0; + fullyExpanded = false; } // Used for comparing macro definitions, so checks what is relevant for that. @@ -117,6 +118,8 @@ class TPpToken { // True if a space (for white space or a removed comment) should also be // recognized, in front of the token returned: bool space; + + bool fullyExpanded; // Numeric value of the token: union { int ival; @@ -475,16 +478,27 @@ class TPpContext { // // From PpTokens.cpp // - void pushTokenStreamInput(TokenStream&, bool pasting = false); + void pushTokenStreamInput(TokenStream&, bool pasting = false, bool expanded = false); void UngetToken(int token, TPpToken*); class tTokenInput : public tInput { public: - tTokenInput(TPpContext* pp, TokenStream* t, bool prepasting) : + tTokenInput(TPpContext* pp, TokenStream* t, bool prepasting, bool expanded) : tInput(pp), tokens(t), - lastTokenPastes(prepasting) { } - virtual int scan(TPpToken *ppToken) override { return tokens->getToken(pp->parseContext, ppToken); } + lastTokenPastes(prepasting), + preExpanded(expanded) { } + virtual int scan(TPpToken *ppToken) override { + int token = tokens->getToken(pp->parseContext, ppToken); + ppToken->fullyExpanded = preExpanded; + if (tokens->atEnd() && token == PpAtomIdentifier) { + int macroAtom = pp->atomStrings.getAtom(ppToken->name); + MacroSymbol* macro = macroAtom == 0 ? nullptr : pp->lookupMacroDef(macroAtom); + if (macro && macro->functionLike) + ppToken->fullyExpanded = false; + } + return token; + } virtual int getch() override { assert(0); return EndOfInput; } virtual void ungetch() override { assert(0); } virtual bool peekPasting() override { return tokens->peekTokenizedPasting(lastTokenPastes); } @@ -492,6 +506,7 @@ class TPpContext { protected: TokenStream* tokens; bool lastTokenPastes; // true if the last token in the input is to be pasted, rather than consumed as a token + bool preExpanded; }; class tUngotTokenInput : public tInput { diff --git a/glslang/MachineIndependent/preprocessor/PpScanner.cpp b/glslang/MachineIndependent/preprocessor/PpScanner.cpp index ad11792002..34dec20769 100644 --- a/glslang/MachineIndependent/preprocessor/PpScanner.cpp +++ b/glslang/MachineIndependent/preprocessor/PpScanner.cpp @@ -3,6 +3,7 @@ // Copyright (C) 2013 LunarG, Inc. // Copyright (C) 2017 ARM Limited. // Copyright (C) 2015-2018 Google, Inc. +// Copyright (c) 2023, Mobica Limited // // All rights reserved. // @@ -259,7 +260,6 @@ int TPpContext::lFloatConst(int len, int ch, TPpToken* ppToken) // Suffix: bool isDouble = false; bool isFloat16 = false; -#ifndef GLSLANG_WEB if (ch == 'l' || ch == 'L') { if (ifdepth == 0 && parseContext.intermediate.getSource() == EShSourceGlsl) parseContext.doubleCheck(ppToken->loc, "double floating-point suffix"); @@ -299,14 +299,11 @@ int TPpContext::lFloatConst(int len, int ch, TPpToken* ppToken) isFloat16 = true; } } else -#endif if (ch == 'f' || ch == 'F') { -#ifndef GLSLANG_WEB if (ifdepth == 0) parseContext.profileRequires(ppToken->loc, EEsProfile, 300, nullptr, "floating-point suffix"); if (ifdepth == 0 && !parseContext.relaxedErrors()) parseContext.profileRequires(ppToken->loc, ~EEsProfile, 120, nullptr, "floating-point suffix"); -#endif if (ifdepth == 0 && !hasDecimalOrExponent) parseContext.ppError(ppToken->loc, "float literal needs a decimal point or exponent", "", ""); saveName(ch); @@ -480,9 +477,7 @@ int TPpContext::tStringInput::scan(TPpToken* ppToken) E_GL_EXT_shader_explicit_arithmetic_types_int16 }; static const int Num_Int16_Extensions = sizeof(Int16_Extensions) / sizeof(Int16_Extensions[0]); - ppToken->ival = 0; - ppToken->i64val = 0; - ppToken->space = false; + ppToken->clear(); ch = getch(); for (;;) { while (ch == ' ' || ch == '\t') { @@ -551,7 +546,7 @@ int TPpContext::tStringInput::scan(TPpToken* ppToken) ival = 0; do { - if (len < MaxTokenLength && ival <= 0x0fffffffffffffffull) { + if (len < MaxTokenLength && ival <= 0x7fffffffffffffffull) { ppToken->name[len++] = (char)ch; if (ch >= '0' && ch <= '9') { ii = ch - '0'; @@ -584,7 +579,6 @@ int TPpContext::tStringInput::scan(TPpToken* ppToken) ppToken->name[len++] = (char)ch; isUnsigned = true; -#ifndef GLSLANG_WEB int nextCh = getch(); if (nextCh == 'l' || nextCh == 'L') { if (len < MaxTokenLength) @@ -610,7 +604,6 @@ int TPpContext::tStringInput::scan(TPpToken* ppToken) if (len < MaxTokenLength) ppToken->name[len++] = (char)ch; isInt16 = true; -#endif } else ungetch(); ppToken->name[len] = '\0'; @@ -641,6 +634,108 @@ int TPpContext::tStringInput::scan(TPpToken* ppToken) ppToken->ival = (int)ival; return isUnsigned ? PpAtomConstUint : PpAtomConstInt; } + } else if ((ch == 'b' || ch == 'B') && pp->parseContext.intermediate.getSource() == EShSourceHlsl) { + // must be binary + bool isUnsigned = false; + bool isInt64 = false; + bool isInt16 = false; + ppToken->name[len++] = (char)ch; + ch = getch(); + + // Check value + if ((ch == '0' || ch == '1')) + { + ival = 0; + do { + if (len < MaxTokenLength && ival <= 0x7fffffffffffffffull) { + ppToken->name[len++] = (char)ch; + if (ch == '0' || ch == '1') { + ii = ch - '0'; + } else { + pp->parseContext.ppError(ppToken->loc, "bad digit in binary literal", "", ""); + } + ival = (ival << 1) | ii; + } + else + { + if (! AlreadyComplained) { + if(len < MaxTokenLength) + pp->parseContext.ppError(ppToken->loc, "binary literal too big", "", ""); + else + pp->parseContext.ppError(ppToken->loc, "binary literal too long", "", ""); + AlreadyComplained = 1; + } + ival = 0xffffffffffffffffull; + } + ch = getch(); + } while (ch == '0' || ch == '1'); + } + else + { + pp->parseContext.ppError(ppToken->loc, "bad digit in binary literal", "", ""); + } + + // check type + if (ch == 'u' || ch == 'U') { + if (len < MaxTokenLength) + ppToken->name[len++] = (char)ch; + isUnsigned = true; + + int nextCh = getch(); + if (nextCh == 'l' || nextCh == 'L') { + if (len < MaxTokenLength) + ppToken->name[len++] = (char)nextCh; + isInt64 = true; + } else + ungetch(); + + nextCh = getch(); + if ((nextCh == 's' || nextCh == 'S') && + pp->parseContext.intermediate.getSource() == EShSourceGlsl) { + if (len < MaxTokenLength) + ppToken->name[len++] = (char)nextCh; + isInt16 = true; + } else + ungetch(); + } else if (ch == 'l' || ch == 'L') { + if (len < MaxTokenLength) + ppToken->name[len++] = (char)ch; + isInt64 = true; + } else if ((ch == 's' || ch == 'S') && + pp->parseContext.intermediate.getSource() == EShSourceGlsl) { + if (len < MaxTokenLength) + ppToken->name[len++] = (char)ch; + isInt16 = true; + } else { + ungetch(); + } + ppToken->name[len] = '\0'; + + // Assign value + if (isInt64 && pp->parseContext.intermediate.getSource() == EShSourceGlsl) { + if (pp->ifdepth == 0) { + pp->parseContext.requireProfile(ppToken->loc, ~EEsProfile, + "64-bit binary literal"); + pp->parseContext.profileRequires(ppToken->loc, ~EEsProfile, 0, + Num_Int64_Extensions, Int64_Extensions, "64-bit binary literal"); + } + ppToken->i64val = ival; + return isUnsigned ? PpAtomConstUint64 : PpAtomConstInt64; + } else if (isInt16) { + if (pp->ifdepth == 0) { + if (pp->parseContext.intermediate.getSource() == EShSourceGlsl) { + pp->parseContext.requireProfile(ppToken->loc, ~EEsProfile, + "16-bit binary literal"); + pp->parseContext.profileRequires(ppToken->loc, ~EEsProfile, 0, + Num_Int16_Extensions, Int16_Extensions, "16-bit binary literal"); + } + } + ppToken->ival = (int)ival; + return isUnsigned ? PpAtomConstUint16 : PpAtomConstInt16; + } else { + ppToken->ival = (int)ival; + return isUnsigned ? PpAtomConstUint : PpAtomConstInt; + } } else { // could be octal integer or floating point, speculative pursue octal until it must be floating point @@ -692,7 +787,6 @@ int TPpContext::tStringInput::scan(TPpToken* ppToken) ppToken->name[len++] = (char)ch; isUnsigned = true; -#ifndef GLSLANG_WEB int nextCh = getch(); if (nextCh == 'l' || nextCh == 'L') { if (len < MaxTokenLength) @@ -718,7 +812,6 @@ int TPpContext::tStringInput::scan(TPpToken* ppToken) if (len < MaxTokenLength) ppToken->name[len++] = (char)ch; isInt16 = true; -#endif } else ungetch(); ppToken->name[len] = '\0'; @@ -781,7 +874,6 @@ int TPpContext::tStringInput::scan(TPpToken* ppToken) ppToken->name[len++] = (char)ch; isUnsigned = true; -#ifndef GLSLANG_WEB int nextCh = getch(); if (nextCh == 'l' || nextCh == 'L') { if (len < MaxTokenLength) @@ -807,7 +899,6 @@ int TPpContext::tStringInput::scan(TPpToken* ppToken) if (len < MaxTokenLength) ppToken->name[len++] = (char)ch; isInt16 = true; -#endif } else ungetch(); diff --git a/glslang/MachineIndependent/preprocessor/PpTokens.cpp b/glslang/MachineIndependent/preprocessor/PpTokens.cpp index 7ed58703f2..e6ee64cf9e 100644 --- a/glslang/MachineIndependent/preprocessor/PpTokens.cpp +++ b/glslang/MachineIndependent/preprocessor/PpTokens.cpp @@ -85,9 +85,6 @@ NVIDIA HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. #ifndef _CRT_SECURE_NO_WARNINGS #define _CRT_SECURE_NO_WARNINGS #endif -#if (defined(_MSC_VER) && _MSC_VER < 1900 /*vs2015*/) -#define snprintf sprintf_s -#endif #include #include @@ -116,17 +113,15 @@ int TPpContext::TokenStream::getToken(TParseContextBase& parseContext, TPpToken int atom = stream[currentPos++].get(*ppToken); ppToken->loc = parseContext.getCurrentLoc(); -#ifndef GLSLANG_WEB // Check for ##, unless the current # is the last character if (atom == '#') { if (peekToken('#')) { parseContext.requireProfile(ppToken->loc, ~EEsProfile, "token pasting (##)"); - parseContext.profileRequires(ppToken->loc, ~EEsProfile, 130, 0, "token pasting (##)"); + parseContext.profileRequires(ppToken->loc, ~EEsProfile, 130, nullptr, "token pasting (##)"); currentPos++; atom = PpAtomPaste; } } -#endif return atom; } @@ -195,9 +190,9 @@ bool TPpContext::TokenStream::peekUntokenizedPasting() return pasting; } -void TPpContext::pushTokenStreamInput(TokenStream& ts, bool prepasting) +void TPpContext::pushTokenStreamInput(TokenStream& ts, bool prepasting, bool expanded) { - pushInput(new tTokenInput(this, &ts, prepasting)); + pushInput(new tTokenInput(this, &ts, prepasting, expanded)); ts.reset(); } diff --git a/glslang/MachineIndependent/propagateNoContraction.cpp b/glslang/MachineIndependent/propagateNoContraction.cpp index 9def592baf..7b5cd03fa6 100644 --- a/glslang/MachineIndependent/propagateNoContraction.cpp +++ b/glslang/MachineIndependent/propagateNoContraction.cpp @@ -37,8 +37,6 @@ // propagate the 'noContraction' qualifier. // -#ifndef GLSLANG_WEB - #include "propagateNoContraction.h" #include @@ -423,7 +421,7 @@ getSymbolToDefinitionMappingAndPreciseSymbolIDs(const glslang::TIntermediate& in ReturnBranchNodeSet()); TIntermNode* root = intermediate.getTreeRoot(); - if (root == 0) + if (root == nullptr) return result_tuple; NodeMapping& symbol_definition_mapping = std::get<0>(result_tuple); @@ -865,6 +863,4 @@ void PropagateNoContraction(const glslang::TIntermediate& intermediate) precise_object_accesschains.erase(precise_object_accesschain); } } -}; - -#endif // GLSLANG_WEB +} diff --git a/glslang/MachineIndependent/reflection.cpp b/glslang/MachineIndependent/reflection.cpp index 9ea48c452d..6c7d3a2c99 100644 --- a/glslang/MachineIndependent/reflection.cpp +++ b/glslang/MachineIndependent/reflection.cpp @@ -33,8 +33,6 @@ // POSSIBILITY OF SUCH DAMAGE. // -#if !defined(GLSLANG_WEB) && !defined(GLSLANG_ANGLE) - #include "../Include/Common.h" #include "reflection.h" #include "LiveTraverser.h" @@ -682,7 +680,7 @@ class TReflectionTraverser : public TIntermTraverser { } // For a binary operation indexing into an aggregate, chase down the base of the aggregate. - // Return 0 if the topology does not fit this situation. + // Return nullptr if the topology does not fit this situation. TIntermSymbol* findBase(const TIntermBinary* node) { TIntermSymbol *base = node->getLeft()->getAsSymbolNode(); @@ -1270,5 +1268,3 @@ void TReflection::dump() } } // end namespace glslang - -#endif // !GLSLANG_WEB && !GLSLANG_ANGLE diff --git a/glslang/MachineIndependent/reflection.h b/glslang/MachineIndependent/reflection.h index 5af4467c1f..221d93f8b5 100644 --- a/glslang/MachineIndependent/reflection.h +++ b/glslang/MachineIndependent/reflection.h @@ -33,8 +33,6 @@ // POSSIBILITY OF SUCH DAMAGE. // -#if !defined(GLSLANG_WEB) && !defined(GLSLANG_ANGLE) - #ifndef _REFLECTION_INCLUDED #define _REFLECTION_INCLUDED @@ -219,5 +217,3 @@ class TReflection { } // end namespace glslang #endif // _REFLECTION_INCLUDED - -#endif // !GLSLANG_WEB && !GLSLANG_ANGLE diff --git a/glslang/OSDependent/Unix/CMakeLists.txt b/glslang/OSDependent/Unix/CMakeLists.txt index 96ae216040..f6b1c6afb7 100644 --- a/glslang/OSDependent/Unix/CMakeLists.txt +++ b/glslang/OSDependent/Unix/CMakeLists.txt @@ -36,23 +36,11 @@ set_property(TARGET OSDependent PROPERTY FOLDER glslang) set_property(TARGET OSDependent PROPERTY POSITION_INDEPENDENT_CODE ON) # Link pthread -set(CMAKE_THREAD_PREFER_PTHREAD ON) -if(${CMAKE_VERSION} VERSION_LESS "3.1.0" OR CMAKE_CROSSCOMPILING) - # Needed as long as we support CMake 2.8 for Ubuntu 14.04, - # which does not support the recommended Threads::Threads target. - # https://cmake.org/cmake/help/v2.8.12/cmake.html#module:FindThreads - # Also needed when cross-compiling to work around - # https://gitlab.kitware.com/cmake/cmake/issues/16920 - find_package(Threads) - target_link_libraries(OSDependent ${CMAKE_THREAD_LIBS_INIT}) -else() - # This is the recommended way, so we use it for 3.1+. - set(THREADS_PREFER_PTHREAD_FLAG ON) - find_package(Threads) - target_link_libraries(OSDependent Threads::Threads) -endif() +set(THREADS_PREFER_PTHREAD_FLAG ON) +find_package(Threads REQUIRED) +target_link_libraries(OSDependent Threads::Threads) -if(ENABLE_GLSLANG_INSTALL) +if(ENABLE_GLSLANG_INSTALL AND NOT BUILD_SHARED_LIBS) install(TARGETS OSDependent EXPORT glslang-targets) # Backward compatibility @@ -60,7 +48,7 @@ if(ENABLE_GLSLANG_INSTALL) message(WARNING \"Using `OSDependentTargets.cmake` is deprecated: use `find_package(glslang)` to find glslang CMake targets.\") if (NOT TARGET glslang::OSDependent) - include(\"\${CMAKE_CURRENT_LIST_DIR}/../../${CMAKE_INSTALL_DATADIR}/${PROJECT_NAME}/glslang-targets.cmake\") + include(\"${CMAKE_INSTALL_FULL_LIBDIR}/cmake/${PROJECT_NAME}/glslang-targets.cmake\") endif() add_library(OSDependent ALIAS glslang::OSDependent) diff --git a/glslang/OSDependent/Unix/ossource.cpp b/glslang/OSDependent/Unix/ossource.cpp index 81da99c2c4..fbb51f7bd1 100644 --- a/glslang/OSDependent/Unix/ossource.cpp +++ b/glslang/OSDependent/Unix/ossource.cpp @@ -36,15 +36,8 @@ // This file contains the Linux-specific functions // #include "../osinclude.h" -#include "../../../OGLCompilersDLL/InitializeDll.h" -#include -#include -#include -#include -#include #include -#include #if !defined(__Fuchsia__) #include @@ -52,150 +45,6 @@ namespace glslang { -// -// Thread cleanup -// - -// -// Wrapper for Linux call to DetachThread. This is required as pthread_cleanup_push() expects -// the cleanup routine to return void. -// -static void DetachThreadLinux(void *) -{ - DetachThread(); -} - -// -// Registers cleanup handler, sets cancel type and state, and executes the thread specific -// cleanup handler. This function will be called in the Standalone.cpp for regression -// testing. When OpenGL applications are run with the driver code, Linux OS does the -// thread cleanup. -// -void OS_CleanupThreadData(void) -{ -#if defined(__ANDROID__) || defined(__Fuchsia__) - DetachThreadLinux(NULL); -#else - int old_cancel_state, old_cancel_type; - void *cleanupArg = NULL; - - // - // Set thread cancel state and push cleanup handler. - // - pthread_setcancelstate(PTHREAD_CANCEL_ENABLE, &old_cancel_state); - pthread_cleanup_push(DetachThreadLinux, (void *) cleanupArg); - - // - // Put the thread in deferred cancellation mode. - // - pthread_setcanceltype(PTHREAD_CANCEL_DEFERRED, &old_cancel_type); - - // - // Pop cleanup handler and execute it prior to unregistering the cleanup handler. - // - pthread_cleanup_pop(1); - - // - // Restore the thread's previous cancellation mode. - // - pthread_setcanceltype(old_cancel_state, NULL); -#endif -} - -// -// Thread Local Storage Operations -// -inline OS_TLSIndex PthreadKeyToTLSIndex(pthread_key_t key) -{ - return (OS_TLSIndex)((uintptr_t)key + 1); -} - -inline pthread_key_t TLSIndexToPthreadKey(OS_TLSIndex nIndex) -{ - return (pthread_key_t)((uintptr_t)nIndex - 1); -} - -OS_TLSIndex OS_AllocTLSIndex() -{ - pthread_key_t pPoolIndex; - - // - // Create global pool key. - // - if ((pthread_key_create(&pPoolIndex, NULL)) != 0) { - assert(0 && "OS_AllocTLSIndex(): Unable to allocate Thread Local Storage"); - return OS_INVALID_TLS_INDEX; - } - else - return PthreadKeyToTLSIndex(pPoolIndex); -} - -bool OS_SetTLSValue(OS_TLSIndex nIndex, void *lpvValue) -{ - if (nIndex == OS_INVALID_TLS_INDEX) { - assert(0 && "OS_SetTLSValue(): Invalid TLS Index"); - return false; - } - - if (pthread_setspecific(TLSIndexToPthreadKey(nIndex), lpvValue) == 0) - return true; - else - return false; -} - -void* OS_GetTLSValue(OS_TLSIndex nIndex) -{ - // - // This function should return 0 if nIndex is invalid. - // - assert(nIndex != OS_INVALID_TLS_INDEX); - return pthread_getspecific(TLSIndexToPthreadKey(nIndex)); -} - -bool OS_FreeTLSIndex(OS_TLSIndex nIndex) -{ - if (nIndex == OS_INVALID_TLS_INDEX) { - assert(0 && "OS_SetTLSValue(): Invalid TLS Index"); - return false; - } - - // - // Delete the global pool key. - // - if (pthread_key_delete(TLSIndexToPthreadKey(nIndex)) == 0) - return true; - else - return false; -} - -namespace { - pthread_mutex_t gMutex; -} - -static void InitMutex(void) -{ - pthread_mutexattr_t mutexattr; - pthread_mutexattr_init(&mutexattr); - pthread_mutexattr_settype(&mutexattr, PTHREAD_MUTEX_RECURSIVE); - pthread_mutex_init(&gMutex, &mutexattr); -} - -void InitGlobalLock() -{ - static pthread_once_t once = PTHREAD_ONCE_INIT; - pthread_once(&once, InitMutex); -} - -void GetGlobalLock() -{ - pthread_mutex_lock(&gMutex); -} - -void ReleaseGlobalLock() -{ - pthread_mutex_unlock(&gMutex); -} - // #define DUMP_COUNTERS void OS_DumpMemoryCounters() diff --git a/glslang/OSDependent/Web/CMakeLists.txt b/glslang/OSDependent/Web/CMakeLists.txt index 5bfbed415c..5d17496088 100644 --- a/glslang/OSDependent/Web/CMakeLists.txt +++ b/glslang/OSDependent/Web/CMakeLists.txt @@ -53,6 +53,9 @@ if(ENABLE_GLSLANG_JS) target_link_libraries(glslang.js "-s ALLOW_MEMORY_GROWTH=1") target_link_libraries(glslang.js "-s FILESYSTEM=0") + # We use ccall in glslang.pre.js, so make sure it's exposed + target_link_libraries(glslang.js "-s EXPORTED_RUNTIME_METHODS=ccall") + if(ENABLE_EMSCRIPTEN_SINGLE_FILE) target_link_libraries(glslang.js "-s SINGLE_FILE=1") endif() @@ -64,8 +67,28 @@ if(ENABLE_GLSLANG_JS) endif() if(NOT ENABLE_EMSCRIPTEN_ENVIRONMENT_NODE) - add_custom_command(TARGET glslang.js POST_BUILD - COMMAND cat ${CMAKE_CURRENT_SOURCE_DIR}/glslang.after.js >> ${CMAKE_CURRENT_BINARY_DIR}/glslang.js) + if (CMAKE_VERSION VERSION_GREATER_EQUAL "3.18") + add_custom_command(TARGET glslang.js POST_BUILD + COMMAND ${CMAKE_COMMAND} -E cat ${CMAKE_CURRENT_SOURCE_DIR}/glslang.after.js >> ${CMAKE_CURRENT_BINARY_DIR}/glslang.js + ) + else() + if (MINGW) + message(FATAL_ERROR "Must use at least CMake 3.18") + endif() + + if (CMAKE_HOST_SYSTEM MATCHES "Windows.*") + # There are several ways we could append one file to another on Windows, but unfortunately 'cat' is not one of them + # (there is no 'cat' command in cmd). Also, since this will ultimately run in cmd and not pwsh, we need to ensure + # Windows path separators are used. + file(TO_NATIVE_PATH "${CMAKE_CURRENT_BINARY_DIR}/glslang.js" glslang_js_path) + file(TO_NATIVE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/glslang.after.js" glslang_after_js_path) + add_custom_command(TARGET glslang.js POST_BUILD + COMMAND type "${glslang_after_js_path}" >> "${glslang_js_path}") + else() + add_custom_command(TARGET glslang.js POST_BUILD + COMMAND cat ${CMAKE_CURRENT_SOURCE_DIR}/glslang.after.js >> ${CMAKE_CURRENT_BINARY_DIR}/glslang.js) + endif() + endif() endif() endif() -endif() +endif() \ No newline at end of file diff --git a/glslang/OSDependent/Web/glslang.js.cpp b/glslang/OSDependent/Web/glslang.js.cpp index f2306a6092..c820da6aa4 100644 --- a/glslang/OSDependent/Web/glslang.js.cpp +++ b/glslang/OSDependent/Web/glslang.js.cpp @@ -141,6 +141,15 @@ const TBuiltInResource DefaultTBuiltInResource = { /* .maxTaskWorkGroupSizeY_NV = */ 1, /* .maxTaskWorkGroupSizeZ_NV = */ 1, /* .maxMeshViewCountNV = */ 4, + /* .maxMeshOutputVerticesEXT = */ 256, + /* .maxMeshOutputPrimitivesEXT = */ 512, + /* .maxMeshWorkGroupSizeX_EXT = */ 32, + /* .maxMeshWorkGroupSizeY_EXT = */ 1, + /* .maxMeshWorkGroupSizeZ_EXT = */ 1, + /* .maxTaskWorkGroupSizeX_EXT = */ 32, + /* .maxTaskWorkGroupSizeY_EXT = */ 1, + /* .maxTaskWorkGroupSizeZ_EXT = */ 1, + /* .maxMeshViewCountEXT = */ 4, /* .maxDualSourceDrawBuffersEXT = */ 1, /* .limits = */ { diff --git a/glslang/OSDependent/Web/glslang.pre.js b/glslang/OSDependent/Web/glslang.pre.js index 46a569506d..390390e99f 100644 --- a/glslang/OSDependent/Web/glslang.pre.js +++ b/glslang/OSDependent/Web/glslang.pre.js @@ -25,7 +25,7 @@ Module['compileGLSLZeroCopy'] = function(glsl, shader_stage, gen_debug, spirv_ve var p_output = Module['_malloc'](4); var p_output_len = Module['_malloc'](4); - var id = ccall('convert_glsl_to_spirv', + var id = Module['ccall']('convert_glsl_to_spirv', 'number', ['string', 'number', 'boolean', 'number', 'number', 'number'], [glsl, shader_stage_int, gen_debug, spirv_version_int, p_output, p_output_len]); diff --git a/glslang/OSDependent/Windows/CMakeLists.txt b/glslang/OSDependent/Windows/CMakeLists.txt index 548984470f..882133ab30 100644 --- a/glslang/OSDependent/Windows/CMakeLists.txt +++ b/glslang/OSDependent/Windows/CMakeLists.txt @@ -55,7 +55,7 @@ if(ENABLE_GLSLANG_INSTALL) message(WARNING \"Using `OSDependentTargets.cmake` is deprecated: use `find_package(glslang)` to find glslang CMake targets.\") if (NOT TARGET glslang::OSDependent) - include(\"\${CMAKE_CURRENT_LIST_DIR}/../../${CMAKE_INSTALL_DATADIR}/${PROJECT_NAME}/glslang-targets.cmake\") + include(\"${CMAKE_INSTALL_FULL_LIBDIR}/cmake/${PROJECT_NAME}/glslang-targets.cmake\") endif() add_library(OSDependent ALIAS glslang::OSDependent) diff --git a/glslang/OSDependent/Windows/ossource.cpp b/glslang/OSDependent/Windows/ossource.cpp index 870840c56e..d7f89f71b6 100644 --- a/glslang/OSDependent/Windows/ossource.cpp +++ b/glslang/OSDependent/Windows/ossource.cpp @@ -37,11 +37,9 @@ #define STRICT #define VC_EXTRALEAN 1 #include -#include #include #include #include -#include // // This file contains the Window-OS-specific functions @@ -53,84 +51,6 @@ namespace glslang { -inline OS_TLSIndex ToGenericTLSIndex (DWORD handle) -{ - return (OS_TLSIndex)((uintptr_t)handle + 1); -} - -inline DWORD ToNativeTLSIndex (OS_TLSIndex nIndex) -{ - return (DWORD)((uintptr_t)nIndex - 1); -} - -// -// Thread Local Storage Operations -// -OS_TLSIndex OS_AllocTLSIndex() -{ - DWORD dwIndex = TlsAlloc(); - if (dwIndex == TLS_OUT_OF_INDEXES) { - assert(0 && "OS_AllocTLSIndex(): Unable to allocate Thread Local Storage"); - return OS_INVALID_TLS_INDEX; - } - - return ToGenericTLSIndex(dwIndex); -} - -bool OS_SetTLSValue(OS_TLSIndex nIndex, void *lpvValue) -{ - if (nIndex == OS_INVALID_TLS_INDEX) { - assert(0 && "OS_SetTLSValue(): Invalid TLS Index"); - return false; - } - - if (TlsSetValue(ToNativeTLSIndex(nIndex), lpvValue)) - return true; - else - return false; -} - -void* OS_GetTLSValue(OS_TLSIndex nIndex) -{ - assert(nIndex != OS_INVALID_TLS_INDEX); - return TlsGetValue(ToNativeTLSIndex(nIndex)); -} - -bool OS_FreeTLSIndex(OS_TLSIndex nIndex) -{ - if (nIndex == OS_INVALID_TLS_INDEX) { - assert(0 && "OS_SetTLSValue(): Invalid TLS Index"); - return false; - } - - if (TlsFree(ToNativeTLSIndex(nIndex))) - return true; - else - return false; -} - -HANDLE GlobalLock; - -void InitGlobalLock() -{ - GlobalLock = CreateMutex(0, false, 0); -} - -void GetGlobalLock() -{ - WaitForSingleObject(GlobalLock, INFINITE); -} - -void ReleaseGlobalLock() -{ - ReleaseMutex(GlobalLock); -} - -unsigned int __stdcall EnterGenericThread (void* entry) -{ - return ((TThreadEntrypoint)entry)(0); -} - //#define DUMP_COUNTERS void OS_DumpMemoryCounters() diff --git a/glslang/OSDependent/osinclude.h b/glslang/OSDependent/osinclude.h index 218abe4f23..0d677e4afd 100644 --- a/glslang/OSDependent/osinclude.h +++ b/glslang/OSDependent/osinclude.h @@ -37,25 +37,6 @@ namespace glslang { -// -// Thread Local Storage Operations -// -typedef void* OS_TLSIndex; -#define OS_INVALID_TLS_INDEX ((void*)0) - -OS_TLSIndex OS_AllocTLSIndex(); -bool OS_SetTLSValue(OS_TLSIndex nIndex, void *lpvValue); -bool OS_FreeTLSIndex(OS_TLSIndex nIndex); -void* OS_GetTLSValue(OS_TLSIndex nIndex); - -void InitGlobalLock(); -void GetGlobalLock(); -void ReleaseGlobalLock(); - -typedef unsigned int (*TThreadEntrypoint)(void*); - -void OS_CleanupThreadData(void); - void OS_DumpMemoryCounters(); } // end namespace glslang diff --git a/StandAlone/ResourceLimits.h b/glslang/Public/ResourceLimits.h similarity index 90% rename from StandAlone/ResourceLimits.h rename to glslang/Public/ResourceLimits.h index 736248eb39..f70be8172a 100644 --- a/StandAlone/ResourceLimits.h +++ b/glslang/Public/ResourceLimits.h @@ -37,14 +37,16 @@ #include -#include "../glslang/Include/ResourceLimits.h" +#include "../Include/ResourceLimits.h" -namespace glslang { +// Return pointer to user-writable Resource to pass through API in +// future-proof way. +extern TBuiltInResource* GetResources(); // These are the default resources for TBuiltInResources, used for both // - parsing this string for the case where the user didn't supply one, // - dumping out a template for user construction of a config file. -extern const TBuiltInResource DefaultTBuiltInResource; +extern const TBuiltInResource* GetDefaultResources(); // Returns the DefaultTBuiltInResource as a human-readable string. std::string GetDefaultTBuiltInResourceString(); @@ -52,6 +54,4 @@ std::string GetDefaultTBuiltInResourceString(); // Decodes the resource limits from |config| to |resources|. void DecodeResourceLimits(TBuiltInResource* resources, char* config); -} // end namespace glslang - #endif // _STAND_ALONE_RESOURCE_LIMITS_INCLUDED_ diff --git a/glslang/Public/ShaderLang.h b/glslang/Public/ShaderLang.h index e44339db53..c22cb2b43e 100644 --- a/glslang/Public/ShaderLang.h +++ b/glslang/Public/ShaderLang.h @@ -108,8 +108,10 @@ typedef enum { EShLangMissNV = EShLangMiss, EShLangCallable, EShLangCallableNV = EShLangCallable, - EShLangTaskNV, - EShLangMeshNV, + EShLangTask, + EShLangTaskNV = EShLangTask, + EShLangMesh, + EShLangMeshNV = EShLangMesh, LAST_ELEMENT_MARKER(EShLangCount), } EShLanguage; // would be better as stage, but this is ancient now @@ -132,8 +134,10 @@ typedef enum : unsigned { EShLangMissNVMask = EShLangMissMask, EShLangCallableMask = (1 << EShLangCallable), EShLangCallableNVMask = EShLangCallableMask, - EShLangTaskNVMask = (1 << EShLangTaskNV), - EShLangMeshNVMask = (1 << EShLangMeshNV), + EShLangTaskMask = (1 << EShLangTask), + EShLangTaskNVMask = EShLangTaskMask, + EShLangMeshMask = (1 << EShLangMesh), + EShLangMeshNVMask = EShLangMeshMask, LAST_ELEMENT_MARKER(EShLanguageMaskCount), } EShLanguageMask; @@ -301,7 +305,7 @@ typedef struct { // // ShHandle held by but opaque to the driver. It is allocated, -// managed, and de-allocated by the compiler/linker. It's contents +// managed, and de-allocated by the compiler/linker. Its contents // are defined by and used by the compiler and linker. For example, // symbol table information and object code passed from the compiler // to the linker can be stored where ShHandle points. @@ -472,6 +476,7 @@ class TShader { GLSLANG_EXPORT void addProcesses(const std::vector&); GLSLANG_EXPORT void setUniqueId(unsigned long long id); GLSLANG_EXPORT void setOverrideVersion(int version); + GLSLANG_EXPORT void setDebugInfo(bool debugInfo); // IO resolver binding data: see comments in ShaderLang.cpp GLSLANG_EXPORT void setShiftBinding(TResourceType res, unsigned int base); @@ -525,7 +530,7 @@ class TShader { // See the definitions of TEnvironment, EShSource, EShLanguage, // and EShClient for choices and more detail. // - // setEnvClient: The client that will be hosting the execution, and it's version. + // setEnvClient: The client that will be hosting the execution, and its version. // Note 'version' is not the version of the languages involved, but // the version of the client environment. // Use EShClientNone and version of 0 if there is no client, e.g. @@ -568,6 +573,9 @@ class TShader { void setEnvInputVulkanRulesRelaxed() { environment.input.vulkanRulesRelaxed = true; } bool getEnvInputVulkanRulesRelaxed() const { return environment.input.vulkanRulesRelaxed; } + void setCompileOnly() { compileOnly = true; } + bool getCompileOnly() const { return compileOnly; } + // Interface to #include handlers. // // To support #include, a client of Glslang does the following: @@ -717,14 +725,15 @@ class TShader { TEnvironment environment; + // Indicates this shader is meant to be used without linking + bool compileOnly = false; + friend class TProgram; private: TShader& operator=(TShader&); }; -#if !defined(GLSLANG_WEB) && !defined(GLSLANG_ANGLE) - // // A reflection database and its interface, consistent with the OpenGL API reflection queries. // @@ -841,8 +850,6 @@ class TIoMapResolver virtual void addStage(EShLanguage stage, TIntermediate& stageIntermediate) = 0; }; -#endif // !GLSLANG_WEB && !GLSLANG_ANGLE - // Make one TProgram per set of shaders that will get linked together. Add all // the shaders that are to be linked together. After calling shader.parse() // for all shaders, call link(). @@ -862,8 +869,6 @@ class TProgram { TIntermediate* getIntermediate(EShLanguage stage) const { return intermediate[stage]; } -#if !defined(GLSLANG_WEB) && !defined(GLSLANG_ANGLE) - // Reflection Interface // call first, to do liveness analysis, index mapping, etc.; returns false on failure @@ -956,7 +961,6 @@ class TProgram { // If resolver is not provided it uses the previous approach // and respects auto assignment and offsets. GLSLANG_EXPORT bool mapIO(TIoMapResolver* pResolver = nullptr, TIoMapper* pIoMapper = nullptr); -#endif // !GLSLANG_WEB && !GLSLANG_ANGLE protected: GLSLANG_EXPORT bool linkStage(EShLanguage, EShMessages); @@ -967,9 +971,7 @@ class TProgram { TIntermediate* intermediate[EShLangCount]; bool newedIntermediate[EShLangCount]; // track which intermediate were "new" versus reusing a singleton unit in a stage TInfoSink* infoSink; -#if !defined(GLSLANG_WEB) && !defined(GLSLANG_ANGLE) TReflection* reflection; -#endif bool linked; private: diff --git a/StandAlone/resource_limits_c.h b/glslang/Public/resource_limits_c.h similarity index 93% rename from StandAlone/resource_limits_c.h rename to glslang/Public/resource_limits_c.h index 108fd5e21e..05aa8eb026 100644 --- a/StandAlone/resource_limits_c.h +++ b/glslang/Public/resource_limits_c.h @@ -29,12 +29,15 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. #ifndef _STAND_ALONE_RESOURCE_LIMITS_C_INCLUDED_ #define _STAND_ALONE_RESOURCE_LIMITS_C_INCLUDED_ -#include "../glslang/Include/glslang_c_interface.h" +#include "../Include/glslang_c_interface.h" #ifdef __cplusplus extern "C" { #endif +// Returns a struct that can be use to create custom resource values. +glslang_resource_t* glslang_resource(void); + // These are the default resources for TBuiltInResources, used for both // - parsing this string for the case where the user didn't supply one, // - dumping out a template for user construction of a config file. diff --git a/StandAlone/ResourceLimits.cpp b/glslang/ResourceLimits/ResourceLimits.cpp similarity index 91% rename from StandAlone/ResourceLimits.cpp rename to glslang/ResourceLimits/ResourceLimits.cpp index 7c7f4c4e49..0e9d1b5480 100644 --- a/StandAlone/ResourceLimits.cpp +++ b/glslang/ResourceLimits/ResourceLimits.cpp @@ -37,9 +37,9 @@ #include #include -#include "ResourceLimits.h" +#include "glslang/Public/ResourceLimits.h" -namespace glslang { +TBuiltInResource Resources; const TBuiltInResource DefaultTBuiltInResource = { /* .MaxLights = */ 32, @@ -134,6 +134,15 @@ const TBuiltInResource DefaultTBuiltInResource = { /* .maxTaskWorkGroupSizeY_NV = */ 1, /* .maxTaskWorkGroupSizeZ_NV = */ 1, /* .maxMeshViewCountNV = */ 4, + /* .maxMeshOutputVerticesEXT = */ 256, + /* .maxMeshOutputPrimitivesEXT = */ 256, + /* .maxMeshWorkGroupSizeX_EXT = */ 128, + /* .maxMeshWorkGroupSizeY_EXT = */ 128, + /* .maxMeshWorkGroupSizeZ_EXT = */ 128, + /* .maxTaskWorkGroupSizeX_EXT = */ 128, + /* .maxTaskWorkGroupSizeY_EXT = */ 128, + /* .maxTaskWorkGroupSizeZ_EXT = */ 128, + /* .maxMeshViewCountEXT = */ 4, /* .maxDualSourceDrawBuffersEXT = */ 1, /* .limits = */ { @@ -244,6 +253,15 @@ std::string GetDefaultTBuiltInResourceString() << "MaxTaskWorkGroupSizeY_NV " << DefaultTBuiltInResource.maxTaskWorkGroupSizeY_NV << "\n" << "MaxTaskWorkGroupSizeZ_NV " << DefaultTBuiltInResource.maxTaskWorkGroupSizeZ_NV << "\n" << "MaxMeshViewCountNV " << DefaultTBuiltInResource.maxMeshViewCountNV << "\n" + << "MaxMeshOutputVerticesEXT " << DefaultTBuiltInResource.maxMeshOutputVerticesEXT << "\n" + << "MaxMeshOutputPrimitivesEXT " << DefaultTBuiltInResource.maxMeshOutputPrimitivesEXT << "\n" + << "MaxMeshWorkGroupSizeX_EXT " << DefaultTBuiltInResource.maxMeshWorkGroupSizeX_EXT << "\n" + << "MaxMeshWorkGroupSizeY_EXT " << DefaultTBuiltInResource.maxMeshWorkGroupSizeY_EXT << "\n" + << "MaxMeshWorkGroupSizeZ_EXT " << DefaultTBuiltInResource.maxMeshWorkGroupSizeZ_EXT << "\n" + << "MaxTaskWorkGroupSizeX_EXT " << DefaultTBuiltInResource.maxTaskWorkGroupSizeX_EXT << "\n" + << "MaxTaskWorkGroupSizeY_EXT " << DefaultTBuiltInResource.maxTaskWorkGroupSizeY_EXT << "\n" + << "MaxTaskWorkGroupSizeZ_EXT " << DefaultTBuiltInResource.maxTaskWorkGroupSizeZ_EXT << "\n" + << "MaxMeshViewCountEXT " << DefaultTBuiltInResource.maxMeshViewCountEXT << "\n" << "MaxDualSourceDrawBuffersEXT " << DefaultTBuiltInResource.maxDualSourceDrawBuffersEXT << "\n" << "nonInductiveForLoops " << DefaultTBuiltInResource.limits.nonInductiveForLoops << "\n" << "whileLoops " << DefaultTBuiltInResource.limits.whileLoops << "\n" @@ -469,6 +487,26 @@ void DecodeResourceLimits(TBuiltInResource* resources, char* config) resources->maxTaskWorkGroupSizeZ_NV = value; else if (tokenStr == "MaxMeshViewCountNV") resources->maxMeshViewCountNV = value; + else if (tokenStr == "MaxMeshOutputVerticesEXT") + resources->maxMeshOutputVerticesEXT = value; + else if (tokenStr == "MaxMeshOutputPrimitivesEXT") + resources->maxMeshOutputPrimitivesEXT = value; + else if (tokenStr == "MaxMeshWorkGroupSizeX_EXT") + resources->maxMeshWorkGroupSizeX_EXT = value; + else if (tokenStr == "MaxMeshWorkGroupSizeY_EXT") + resources->maxMeshWorkGroupSizeY_EXT = value; + else if (tokenStr == "MaxMeshWorkGroupSizeZ_EXT") + resources->maxMeshWorkGroupSizeZ_EXT = value; + else if (tokenStr == "MaxTaskWorkGroupSizeX_EXT") + resources->maxTaskWorkGroupSizeX_EXT = value; + else if (tokenStr == "MaxTaskWorkGroupSizeY_EXT") + resources->maxTaskWorkGroupSizeY_EXT = value; + else if (tokenStr == "MaxTaskWorkGroupSizeZ_EXT") + resources->maxTaskWorkGroupSizeZ_EXT = value; + else if (tokenStr == "MaxMeshViewCountEXT") + resources->maxMeshViewCountEXT = value; + else if (tokenStr == "MaxDualSourceDrawBuffersEXT") + resources->maxDualSourceDrawBuffersEXT = value; else if (tokenStr == "nonInductiveForLoops") resources->limits.nonInductiveForLoops = (value != 0); else if (tokenStr == "whileLoops") @@ -493,4 +531,12 @@ void DecodeResourceLimits(TBuiltInResource* resources, char* config) } } -} // end namespace glslang +TBuiltInResource* GetResources() +{ + return &Resources; +} + +const TBuiltInResource* GetDefaultResources() +{ + return &DefaultTBuiltInResource; +} diff --git a/StandAlone/resource_limits_c.cpp b/glslang/ResourceLimits/resource_limits_c.cpp similarity index 82% rename from StandAlone/resource_limits_c.cpp rename to glslang/ResourceLimits/resource_limits_c.cpp index a1f681c7b8..0eeac23a5e 100644 --- a/StandAlone/resource_limits_c.cpp +++ b/glslang/ResourceLimits/resource_limits_c.cpp @@ -26,15 +26,20 @@ OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. **/ -#include "resource_limits_c.h" -#include "ResourceLimits.h" +#include "glslang/Public/resource_limits_c.h" +#include "glslang/Public/ResourceLimits.h" #include #include #include +glslang_resource_t* glslang_resource(void) +{ + return reinterpret_cast(GetResources()); +} + const glslang_resource_t* glslang_default_resource(void) { - return reinterpret_cast(&glslang::DefaultTBuiltInResource); + return reinterpret_cast(GetDefaultResources()); } #if defined(__clang__) || defined(__GNUC__) @@ -47,7 +52,7 @@ const glslang_resource_t* glslang_default_resource(void) const char* glslang_default_resource_string() { - std::string cpp_str = glslang::GetDefaultTBuiltInResourceString(); + std::string cpp_str = GetDefaultTBuiltInResourceString(); char* c_str = (char*)malloc(cpp_str.length() + 1); strcpy(c_str, cpp_str.c_str()); return c_str; @@ -61,5 +66,5 @@ const char* glslang_default_resource_string() void glslang_decode_resource_limits(glslang_resource_t* resources, char* config) { - glslang::DecodeResourceLimits(reinterpret_cast(resources), config); + DecodeResourceLimits(reinterpret_cast(resources), config); } diff --git a/glslang/updateGrammar b/glslang/updateGrammar index 9209493f38..a15dc24b30 100755 --- a/glslang/updateGrammar +++ b/glslang/updateGrammar @@ -1,4 +1,4 @@ -#!/bin/bash +#!/bin/sh # Copyright (C) 2020 The Khronos Group Inc. # @@ -33,17 +33,4 @@ # ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE # POSSIBILITY OF SUCH DAMAGE. -if [ "$1" = 'web' ] -then - m4 -P -DGLSLANG_WEB MachineIndependent/glslang.m4 > MachineIndependent/glslang.y -elif [ "$#" -eq 0 ] -then - m4 -P MachineIndependent/glslang.m4 > MachineIndependent/glslang.y -else - echo usage: - echo $0 web - echo $0 - exit -fi - bison --defines=MachineIndependent/glslang_tab.cpp.h -t MachineIndependent/glslang.y -o MachineIndependent/glslang_tab.cpp diff --git a/gtests/AST.FromFile.cpp b/gtests/AST.FromFile.cpp index 1d975464f1..828dabec47 100644 --- a/gtests/AST.FromFile.cpp +++ b/gtests/AST.FromFile.cpp @@ -211,6 +211,7 @@ INSTANTIATE_TEST_SUITE_P( "runtimeArray.vert", "simpleFunctionCall.frag", "stringToDouble.vert", + "struct.error.frag", "structAssignment.frag", "structDeref.frag", "structure.frag", @@ -280,6 +281,8 @@ INSTANTIATE_TEST_SUITE_P( "glsl.es320.subgroupShuffleRelative.comp", "glsl.es320.subgroupQuad.comp", "glsl.es320.subgroupVote.comp", + "glsl.es320.extTextureShadowLod.frag", + "glsl.ext.textureShadowLod.frag", "terminate.frag", "terminate.vert", "negativeWorkGroupSize.comp", @@ -291,6 +294,7 @@ INSTANTIATE_TEST_SUITE_P( "GL_EXT_shader_integer_mix.vert", "GL_ARB_draw_instanced.vert", "GL_ARB_fragment_coord_conventions.vert", + "GL_ARB_bindless_texture.frag", "BestMatchFunction.vert", "EndStreamPrimitive.geom", "floatBitsToInt.vert", diff --git a/gtests/BuiltInResource.FromFile.cpp b/gtests/BuiltInResource.FromFile.cpp index da81fe98c3..eeea51187d 100644 --- a/gtests/BuiltInResource.FromFile.cpp +++ b/gtests/BuiltInResource.FromFile.cpp @@ -36,7 +36,7 @@ #include -#include "StandAlone/ResourceLimits.h" +#include "glslang/Public/ResourceLimits.h" #include "TestFixture.h" namespace glslangtest { @@ -49,9 +49,19 @@ TEST_F(DefaultResourceTest, FromFile) const std::string path = GlobalTestSettings.testRoot + "/baseResults/test.conf"; std::string expectedConfig; tryLoadFile(path, "expected resource limit", &expectedConfig); - const std::string realConfig = glslang::GetDefaultTBuiltInResourceString(); + const std::string realConfig = GetDefaultTBuiltInResourceString(); ASSERT_EQ(expectedConfig, realConfig); } +TEST_F(DefaultResourceTest, UnrecognizedLimit) +{ + const std::string defaultConfig = GetDefaultTBuiltInResourceString(); + testing::internal::CaptureStdout(); + TBuiltInResource resources; + DecodeResourceLimits(&resources, const_cast(defaultConfig.c_str())); + std::string output = testing::internal::GetCapturedStdout(); + ASSERT_EQ(output.find("unrecognized limit"), std::string::npos); +} + } // anonymous namespace } // namespace glslangtest diff --git a/gtests/CMakeLists.txt b/gtests/CMakeLists.txt index dd555ecca3..408a92db53 100644 --- a/gtests/CMakeLists.txt +++ b/gtests/CMakeLists.txt @@ -76,7 +76,7 @@ if(BUILD_TESTING) message(WARNING \"Using `glslangtestsTargets.cmake` is deprecated: use `find_package(glslang)` to find glslang CMake targets.\") if (NOT TARGET glslang::glslangtests) - include(\"\${CMAKE_CURRENT_LIST_DIR}/../../${CMAKE_INSTALL_DATADIR}/${PROJECT_NAME}/glslang-targets.cmake\") + include(\"${CMAKE_INSTALL_FULL_LIBDIR}/cmake/${PROJECT_NAME}/glslang-targets.cmake\") endif() add_library(glslangtests ALIAS glslang::glslangtests) diff --git a/gtests/Config.FromFile.cpp b/gtests/Config.FromFile.cpp index dd18c13a93..05107e7870 100644 --- a/gtests/Config.FromFile.cpp +++ b/gtests/Config.FromFile.cpp @@ -32,7 +32,7 @@ // ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE // POSSIBILITY OF SUCH DAMAGE. -#include "StandAlone/ResourceLimits.h" +#include "glslang/Public/ResourceLimits.h" #include "TestFixture.h" namespace glslangtest { @@ -65,7 +65,7 @@ TEST_P(ConfigTest, FromFile) char* configChars = new char[len + 1]; memcpy(configChars, configContents.data(), len); configChars[len] = 0; - glslang::DecodeResourceLimits(&resources, configChars); + DecodeResourceLimits(&resources, configChars); delete[] configChars; } diff --git a/gtests/GlslMapIO.FromFile.cpp b/gtests/GlslMapIO.FromFile.cpp index aabb4ae203..1dba5c0c99 100644 --- a/gtests/GlslMapIO.FromFile.cpp +++ b/gtests/GlslMapIO.FromFile.cpp @@ -42,7 +42,6 @@ #include "glslang/MachineIndependent/iomapper.h" #include "glslang/MachineIndependent/reflection.h" -#ifndef GLSLANG_WEB namespace glslangtest { namespace { @@ -352,4 +351,3 @@ INSTANTIATE_TEST_SUITE_P( } // anonymous namespace } // namespace glslangtest -#endif diff --git a/gtests/Hlsl.FromFile.cpp b/gtests/Hlsl.FromFile.cpp index d3e38bb7ff..9f32495580 100644 --- a/gtests/Hlsl.FromFile.cpp +++ b/gtests/Hlsl.FromFile.cpp @@ -59,12 +59,14 @@ std::string FileNameAsCustomTestSuffix( using HlslCompileTest = GlslangTest<::testing::TestWithParam>; using HlslVulkan1_1CompileTest = GlslangTest<::testing::TestWithParam>; +using HlslVulkan1_2CompileTest = GlslangTest<::testing::TestWithParam>; using HlslSpv1_6CompileTest = GlslangTest<::testing::TestWithParam>; using HlslCompileAndFlattenTest = GlslangTest<::testing::TestWithParam>; using HlslLegalizeTest = GlslangTest<::testing::TestWithParam>; using HlslDebugTest = GlslangTest<::testing::TestWithParam>; using HlslDX9CompatibleTest = GlslangTest<::testing::TestWithParam>; using HlslLegalDebugTest = GlslangTest<::testing::TestWithParam>; +using HlslNonSemanticShaderDebugInfoTest = GlslangTest<::testing::TestWithParam>; // Compiling HLSL to pre-legalized SPIR-V under Vulkan semantics. Expected // to successfully generate both AST and SPIR-V. @@ -82,6 +84,13 @@ TEST_P(HlslVulkan1_1CompileTest, FromFile) Target::BothASTAndSpv, true, GetParam().entryPoint); } +TEST_P(HlslVulkan1_2CompileTest, FromFile) +{ + loadFileCompileAndCheck(GlobalTestSettings.testRoot, GetParam().fileName, Source::HLSL, Semantics::Vulkan, + glslang::EShTargetVulkan_1_2, glslang::EShTargetSpv_1_4, Target::BothASTAndSpv, true, + GetParam().entryPoint); +} + TEST_P(HlslSpv1_6CompileTest, FromFile) { loadFileCompileAndCheck(GlobalTestSettings.testRoot, GetParam().fileName, @@ -136,6 +145,13 @@ TEST_P(HlslLegalDebugTest, FromFile) "/baseResults/", true, true); } +TEST_P(HlslNonSemanticShaderDebugInfoTest, FromFile) +{ + loadFileCompileAndCheck(GlobalTestSettings.testRoot, GetParam().fileName, + Source::HLSL, Semantics::Vulkan, glslang::EShTargetVulkan_1_0, glslang::EShTargetSpv_1_0, + Target::Spv, true, GetParam().entryPoint, "/baseResults/", false, false, true); +} + // clang-format off INSTANTIATE_TEST_SUITE_P( ToSpirv, HlslCompileTest, @@ -197,6 +213,7 @@ INSTANTIATE_TEST_SUITE_P( {"hlsl.earlydepthstencil.frag", "main"}, {"hlsl.emptystructreturn.frag", "main"}, {"hlsl.emptystructreturn.vert", "main"}, + {"hlsl.emptystructreturn.tesc", "main"}, {"hlsl.emptystruct.init.vert", "main"}, {"hlsl.entry-in.frag", "PixelShaderFunction"}, {"hlsl.entry-out.frag", "PixelShaderFunction"}, @@ -304,6 +321,7 @@ INSTANTIATE_TEST_SUITE_P( {"hlsl.matrixindex.frag", "main"}, {"hlsl.nonstaticMemberFunction.frag", "main"}, {"hlsl.numericsuffixes.frag", "main"}, + {"hlsl.numericsuffixes.negative.frag", "main"}, {"hlsl.numthreads.comp", "main_aux2"}, {"hlsl.overload.frag", "PixelShaderFunction"}, {"hlsl.opaque-type-bug.frag", "main"}, @@ -394,6 +412,7 @@ INSTANTIATE_TEST_SUITE_P( {"hlsl.structbuffer.rw.frag", "main"}, {"hlsl.structbuffer.rwbyte.frag", "main"}, {"hlsl.structbuffer.rwbyte2.comp", "main"}, + {"hlsl.structcopy.comp", "main"}, {"hlsl.structin.vert", "main"}, {"hlsl.structIoFourWay.frag", "main"}, {"hlsl.structStructName.frag", "main"}, @@ -409,6 +428,7 @@ INSTANTIATE_TEST_SUITE_P( {"hlsl.matType.bool.frag", "main"}, {"hlsl.matType.int.frag", "main"}, {"hlsl.max.frag", "PixelShaderFunction"}, + {"hlsl.nested-runtimeArray.frag", "main"}, {"hlsl.preprocessor.frag", "main"}, {"hlsl.precedence.frag", "PixelShaderFunction"}, {"hlsl.precedence2.frag", "PixelShaderFunction"}, @@ -457,13 +477,22 @@ INSTANTIATE_TEST_SUITE_P( }), FileNameAsCustomTestSuffix ); + +INSTANTIATE_TEST_SUITE_P( + ToSpirv, HlslVulkan1_2CompileTest, + ::testing::ValuesIn(std::vector{ + {"hlsl.buffer_ref_parameter.comp", "main"}, + }), + FileNameAsCustomTestSuffix +); // clang-format on // clang-format off INSTANTIATE_TEST_SUITE_P( ToSpirv, HlslSpv1_6CompileTest, ::testing::ValuesIn(std::vector{ - {"hlsl.spv.1.6.discard.frag", "PixelShaderFunction"} + {"hlsl.spv.1.6.discard.frag", "PixelShaderFunction"}, + {"hlsl.structcopylogical.comp","main"}, }), FileNameAsCustomTestSuffix ); @@ -527,7 +556,21 @@ INSTANTIATE_TEST_SUITE_P( }), FileNameAsCustomTestSuffix ); +// clang-format on +// clang-format off +INSTANTIATE_TEST_SUITE_P( + ToSpirv, HlslNonSemanticShaderDebugInfoTest, + ::testing::ValuesIn(std::vector{ + {"spv.debuginfo.hlsl.vert", "main"}, + {"spv.debuginfo.hlsl.frag", "main"}, + {"spv.debuginfo.hlsl.comp", "main"}, + {"spv.debuginfo.hlsl.geom", "main"}, + {"spv.debuginfo.hlsl.tesc", "main"}, + {"spv.debuginfo.hlsl.tese", "main"}, + }), + FileNameAsCustomTestSuffix +); // clang-format on } // anonymous namespace diff --git a/gtests/Link.FromFile.Vk.cpp b/gtests/Link.FromFile.Vk.cpp index 4db71c2c96..fed5d260cf 100644 --- a/gtests/Link.FromFile.Vk.cpp +++ b/gtests/Link.FromFile.Vk.cpp @@ -75,10 +75,8 @@ TEST_P(LinkTestVulkan, FromFile) result.linkingOutput = program.getInfoLog(); result.linkingError = program.getInfoDebugLog(); -#if !defined(GLSLANG_WEB) && !defined(GLSLANG_ANGLE) - if (success) - program.mapIO(); -#endif + if (success) + program.mapIO(); if (success && (controls & EShMsgSpvRules)) { spv::SpvBuildLogger logger; diff --git a/gtests/Link.FromFile.cpp b/gtests/Link.FromFile.cpp index 9e029fc7b2..3b769bbb6e 100644 --- a/gtests/Link.FromFile.cpp +++ b/gtests/Link.FromFile.cpp @@ -90,6 +90,9 @@ INSTANTIATE_TEST_SUITE_P( Glsl, LinkTest, ::testing::ValuesIn(std::vector>({ {"mains1.frag", "mains2.frag", "noMain1.geom", "noMain2.geom"}, + {"implicitArraySize.vert", "implicitArraySize.frag"}, + {"implicitArraySizeBuiltin.vert", "implicitArraySizeBuiltin.geom"}, + {"implicitArraySize1.geom", "implicitArraySize2.geom"}, {"noMain.vert", "mains.frag"}, {"link1.frag", "link2.frag", "link3.frag"}, {"recurse1.vert", "recurse1.frag", "recurse2.frag"}, diff --git a/gtests/Spv.FromFile.cpp b/gtests/Spv.FromFile.cpp index 5d60ccde7d..90fb2fc668 100644 --- a/gtests/Spv.FromFile.cpp +++ b/gtests/Spv.FromFile.cpp @@ -65,6 +65,7 @@ std::string FileNameAsCustomTestSuffixIoMap( } using CompileVulkanToSpirvTest = GlslangTest<::testing::TestWithParam>; +using CompileVulkanToSpirvTestNoLink = GlslangTest<::testing::TestWithParam>; using CompileVulkanToSpirvDeadCodeElimTest = GlslangTest<::testing::TestWithParam>; using CompileVulkanToDebugSpirvTest = GlslangTest<::testing::TestWithParam>; using CompileVulkan1_1ToSpirvTest = GlslangTest<::testing::TestWithParam>; @@ -76,10 +77,12 @@ using OpenGLSemantics = GlslangTest<::testing::TestWithParam>; using VulkanAstSemantics = GlslangTest<::testing::TestWithParam>; using HlslIoMap = GlslangTest<::testing::TestWithParam>; using GlslIoMap = GlslangTest<::testing::TestWithParam>; +using CompileVulkanToSpirvTestQCOM = GlslangTest<::testing::TestWithParam>; using CompileVulkanToSpirvTestAMD = GlslangTest<::testing::TestWithParam>; using CompileVulkanToSpirvTestNV = GlslangTest<::testing::TestWithParam>; using CompileVulkanToSpirv14TestNV = GlslangTest<::testing::TestWithParam>; using CompileUpgradeTextureToSampledTextureAndDropSamplersTest = GlslangTest<::testing::TestWithParam>; +using CompileVulkanToNonSemanticShaderDebugInfoTest = GlslangTest<::testing::TestWithParam>; // Compiling GLSL to SPIR-V under Vulkan semantics. Expected to successfully // generate SPIR-V. @@ -90,6 +93,16 @@ TEST_P(CompileVulkanToSpirvTest, FromFile) Target::Spv); } +// Compiling GLSL to SPIR-V under Vulkan semantics without linking. Expected to successfully generate SPIR-V. +TEST_P(CompileVulkanToSpirvTestNoLink, FromFile) +{ + options().compileOnly = true; + // NOTE: Vulkan 1.3 is currently required to use the linkage capability + // TODO(ncesario) make sure this is actually necessary + loadFileCompileAndCheck(GlobalTestSettings.testRoot, GetParam(), Source::GLSL, Semantics::Vulkan, + glslang::EShTargetVulkan_1_3, glslang::EShTargetSpv_1_0, Target::Spv); +} + TEST_P(CompileVulkanToSpirvDeadCodeElimTest, FromFile) { loadFileCompileAndCheck(GlobalTestSettings.testRoot, GetParam(), @@ -195,6 +208,15 @@ TEST_P(GlslIoMap, FromFile) GetParam().flattenUniforms); } +// Compiling GLSL to SPIR-V under Vulkan semantics (QCOM extensions enabled). +// Expected to successfully generate SPIR-V. +TEST_P(CompileVulkanToSpirvTestQCOM, FromFile) +{ + loadFileCompileAndCheck(GlobalTestSettings.testRoot, GetParam(), + Source::GLSL, Semantics::Vulkan, glslang::EShTargetVulkan_1_0, glslang::EShTargetSpv_1_0, + Target::Spv); +} + // Compiling GLSL to SPIR-V under Vulkan semantics (AMD extensions enabled). // Expected to successfully generate SPIR-V. TEST_P(CompileVulkanToSpirvTestAMD, FromFile) @@ -229,6 +251,13 @@ TEST_P(CompileUpgradeTextureToSampledTextureAndDropSamplersTest, FromFile) Target::Spv); } +TEST_P(CompileVulkanToNonSemanticShaderDebugInfoTest, FromFile) +{ + loadFileCompileAndCheck(GlobalTestSettings.testRoot, GetParam(), + Source::GLSL, Semantics::Vulkan, glslang::EShTargetVulkan_1_0, glslang::EShTargetSpv_1_0, + Target::Spv, true, "", "/baseResults/", false, false, true); +} + // clang-format off INSTANTIATE_TEST_SUITE_P( Glsl, CompileVulkanToSpirvTest, @@ -337,6 +366,12 @@ INSTANTIATE_TEST_SUITE_P( "spv.conversion.frag", "spv.coopmat.comp", "spv.coopmat_Error.comp", + "spv.coopmatKHR.comp", + "spv.coopmatKHR_arithmetic.comp", + "spv.coopmatKHR_arithmeticError.comp", + "spv.coopmatKHR_Error.comp", + "spv.coopmatKHR_constructor.comp", + "spv.coopmatKHR_constructorError.comp", "spv.dataOut.frag", "spv.dataOutIndirect.frag", "spv.dataOutIndirect.vert", @@ -349,6 +384,12 @@ INSTANTIATE_TEST_SUITE_P( "spv.discard-dce.frag", "spv.doWhileLoop.frag", "spv.earlyReturnDiscard.frag", + "spv.ext.ShaderTileImage.color.frag", + "spv.ext.ShaderTileImage.depth_stencil.frag", + "spv.ext.ShaderTileImage.subpassinput.frag", + "spv.ext.ShaderTileImage.typemismatch.frag", + "spv.ext.ShaderTileImage.overlap.frag", + "spv.ext.ShaderTileImage.wronglayout.frag", "spv.extPostDepthCoverage.frag", "spv.extPostDepthCoverage_Error.frag", "spv.float16convertonlyarith.comp", @@ -376,12 +417,15 @@ INSTANTIATE_TEST_SUITE_P( "spv.intOps.vert", "spv.intrinsicsSpirvByReference.vert", "spv.intrinsicsSpirvDecorate.frag", + "spv.intrinsicsSpirvDecorateId.comp", + "spv.intrinsicsSpirvDecorateString.comp", "spv.intrinsicsSpirvExecutionMode.frag", "spv.intrinsicsSpirvInstruction.vert", "spv.intrinsicsSpirvLiteral.vert", "spv.intrinsicsSpirvStorageClass.rchit", "spv.intrinsicsSpirvType.rgen", "spv.intrinsicsSpirvTypeLocalVar.vert", + "spv.intrinsicsSpirvTypeWithTypeSpecifier.vert", "spv.invariantAll.vert", "spv.layer.tese", "spv.layoutNested.vert", @@ -433,6 +477,7 @@ INSTANTIATE_TEST_SUITE_P( "spv.sparseTexture.frag", "spv.sparseTextureClamp.frag", "spv.structAssignment.frag", + "spv.structCopy.comp", "spv.structDeref.frag", "spv.structure.frag", "spv.switch.frag", @@ -472,6 +517,7 @@ INSTANTIATE_TEST_SUITE_P( "spv.storageBuffer.vert", "spv.terminate.frag", "spv.subgroupUniformControlFlow.vert", + "spv.subgroupSizeARB.frag", "spv.precise.tese", "spv.precise.tesc", "spv.viewportindex.tese", @@ -484,11 +530,25 @@ INSTANTIATE_TEST_SUITE_P( "spv.samplerlessTextureFunctions.frag", "spv.smBuiltins.vert", "spv.smBuiltins.frag", + "spv.ARMCoreBuiltIns.vert", + "spv.ARMCoreBuiltIns.frag", "spv.builtin.PrimitiveShadingRateEXT.vert", "spv.builtin.ShadingRateEXT.frag", "spv.atomicAdd.bufferReference.comp", "spv.fragmentShaderBarycentric3.frag", "spv.fragmentShaderBarycentric4.frag", + "spv.ext.textureShadowLod.frag", + "spv.ext.textureShadowLod.error.frag", + "spv.floatFetch.frag", + "spv.atomicRvalue.error.vert", + })), + FileNameAsCustomTestSuffix +); + +INSTANTIATE_TEST_SUITE_P( + Glsl, CompileVulkanToSpirvTestNoLink, + ::testing::ValuesIn(std::vector({ + "spv.exportFunctions.comp", })), FileNameAsCustomTestSuffix ); @@ -630,6 +690,33 @@ INSTANTIATE_TEST_SUITE_P( "spv.WorkgroupMemoryExplicitLayout.std140.comp", "spv.WorkgroupMemoryExplicitLayout.std430.comp", "spv.WorkgroupMemoryExplicitLayout.scalar.comp", + + // SPV_EXT_mesh_shader + "spv.ext.meshShaderBuiltins.mesh", + "spv.ext.meshShaderBuiltinsShadingRate.mesh", + "spv.ext.meshShaderRedeclBuiltins.mesh", + "spv.ext.meshShaderTaskMem.mesh", + "spv.ext.meshShaderUserDefined.mesh", + "spv.ext.meshTaskShader.task", + "spv.atomiAddEXT.error.mesh", + "spv.atomiAddEXT.task", + "spv.460.subgroupEXT.task", + "spv.460.subgroupEXT.mesh", + + // SPV_NV_shader_execution_reorder + + "spv.nv.hitobject-allops.rgen", + "spv.nv.hitobject-allops.rchit", + "spv.nv.hitobject-allops.rmiss", + + + // SPV_NV_displacment_micromap + + "spv.nv.dmm-allops.rgen", + "spv.nv.dmm-allops.rchit", + "spv.nv.dmm-allops.rahit", + "spv.nv.dmm-allops.mesh", + "spv.nv.dmm-allops.comp", })), FileNameAsCustomTestSuffix ); @@ -640,6 +727,7 @@ INSTANTIATE_TEST_SUITE_P( ::testing::ValuesIn(std::vector({ "spv.1.6.conditionalDiscard.frag", "spv.1.6.helperInvocation.frag", + "spv.1.6.helperInvocation.memmodel.frag", "spv.1.6.specConstant.comp", "spv.1.6.samplerBuffer.frag", "spv.1.6.separate.frag", @@ -711,6 +799,7 @@ INSTANTIATE_TEST_SUITE_P( "vulkan.vert", "vulkan.comp", "samplerlessTextureFunctions.frag", + "spv.intrinsicsFakeEnable.vert", "spv.specConstArrayCheck.vert", })), FileNameAsCustomTestSuffix @@ -736,6 +825,18 @@ INSTANTIATE_TEST_SUITE_P( FileNameAsCustomTestSuffix ); +INSTANTIATE_TEST_SUITE_P( + Glsl, CompileVulkanToSpirvTestQCOM, + ::testing::ValuesIn(std::vector({ + "spv.tpipSampleWeighted.frag", + "spv.tpipBoxFilter.frag", + "spv.tpipBlockMatchSSD.frag", + "spv.tpipBlockMatchSAD.frag", + "spv.tpipTextureArrays.frag", + })), + FileNameAsCustomTestSuffix +); + INSTANTIATE_TEST_SUITE_P( Glsl, CompileVulkanToSpirvTestAMD, ::testing::ValuesIn(std::vector({ @@ -812,6 +913,7 @@ INSTANTIATE_TEST_SUITE_P( })), FileNameAsCustomTestSuffix ); + INSTANTIATE_TEST_SUITE_P( Glsl, CompileUpgradeTextureToSampledTextureAndDropSamplersTest, ::testing::ValuesIn(std::vector({ @@ -819,6 +921,22 @@ INSTANTIATE_TEST_SUITE_P( })), FileNameAsCustomTestSuffix ); + +INSTANTIATE_TEST_SUITE_P( + Glsl, CompileVulkanToNonSemanticShaderDebugInfoTest, + ::testing::ValuesIn(std::vector({ + "spv.debuginfo.glsl.vert", + "spv.debuginfo.glsl.frag", + "spv.debuginfo.glsl.comp", + "spv.debuginfo.glsl.geom", + "spv.debuginfo.glsl.tesc", + "spv.debuginfo.glsl.tese", + "spv.debuginfo.bufferref.glsl.frag", + "spv.debuginfo.const_params.glsl.comp", + "spv.debuginfo.scalar_types.glsl.frag", + })), + FileNameAsCustomTestSuffix +); // clang-format on } // anonymous namespace diff --git a/gtests/TestFixture.cpp b/gtests/TestFixture.cpp index ced6fcce6e..4c935f8850 100644 --- a/gtests/TestFixture.cpp +++ b/gtests/TestFixture.cpp @@ -73,9 +73,9 @@ EShLanguage GetShaderStage(const std::string& stage) } else if (stage == "rcall") { return EShLangCallable; } else if (stage == "task") { - return EShLangTaskNV; + return EShLangTask; } else if (stage == "mesh") { - return EShLangMeshNV; + return EShLangMesh; } else { assert(0 && "Unknown shader stage"); return EShLangCount; diff --git a/gtests/TestFixture.h b/gtests/TestFixture.h index 5b66dece71..df3433bfce 100644 --- a/gtests/TestFixture.h +++ b/gtests/TestFixture.h @@ -48,7 +48,7 @@ #include "SPIRV/disassemble.h" #include "SPIRV/doc.h" #include "SPIRV/SPVRemapper.h" -#include "StandAlone/ResourceLimits.h" +#include "glslang/Public/ResourceLimits.h" #include "glslang/Public/ShaderLang.h" #include "Initializer.h" @@ -199,7 +199,7 @@ class GlslangTest : public GT { shader->setStringsWithLengths(&shaderStrings, &shaderLengths, 1); if (!entryPointName.empty()) shader->setEntryPoint(entryPointName.c_str()); return shader->parse( - (resources ? resources : &glslang::DefaultTBuiltInResource), + (resources ? resources : GetDefaultResources()), defaultVersion, isForwardCompatible, controls); } @@ -217,6 +217,7 @@ class GlslangTest : public GT { EShTextureSamplerTransformMode texSampTransMode = EShTexSampTransKeep, bool enableOptimizer = false, bool enableDebug = false, + bool enableNonSemanticShaderDebugInfo = false, bool automap = true) { const EShLanguage stage = GetShaderStage(GetSuffix(shaderName)); @@ -247,36 +248,58 @@ class GlslangTest : public GT { } } + if (options().compileOnly) + shader.setCompileOnly(); + bool success = compile( &shader, code, entryPointName, controls, nullptr, &shaderName); glslang::TProgram program; - program.addShader(&shader); - success &= program.link(controls); -#if !defined(GLSLANG_WEB) && !defined(GLSLANG_ANGLE) - if (success) - program.mapIO(); -#endif - - if (success && (controls & EShMsgSpvRules)) { - spv::SpvBuildLogger logger; - std::vector spirv_binary; + spv::SpvBuildLogger logger; + std::vector spirv_binary; + + if (!options().compileOnly) { + program.addShader(&shader); + success &= program.link(controls); + if (success) + program.mapIO(); + + if (success && (controls & EShMsgSpvRules)) { + options().disableOptimizer = !enableOptimizer; + options().generateDebugInfo = enableDebug; + options().emitNonSemanticShaderDebugInfo = enableNonSemanticShaderDebugInfo; + options().emitNonSemanticShaderDebugSource = enableNonSemanticShaderDebugInfo; + glslang::GlslangToSpv(*program.getIntermediate(stage), spirv_binary, &logger, &options()); + } else { + return {{ + {shaderName, shader.getInfoLog(), shader.getInfoDebugLog()}, + }, + program.getInfoLog(), + program.getInfoDebugLog(), + true, + "", + ""}; + } + } else { options().disableOptimizer = !enableOptimizer; options().generateDebugInfo = enableDebug; - glslang::GlslangToSpv(*program.getIntermediate(stage), - spirv_binary, &logger, &options()); - - std::ostringstream disassembly_stream; - spv::Parameterize(); - spv::Disassemble(disassembly_stream, spirv_binary); - bool validation_result = !options().validate || logger.getAllMessages().empty(); - return {{{shaderName, shader.getInfoLog(), shader.getInfoDebugLog()},}, - program.getInfoLog(), program.getInfoDebugLog(), - validation_result, logger.getAllMessages(), disassembly_stream.str()}; - } else { - return {{{shaderName, shader.getInfoLog(), shader.getInfoDebugLog()},}, - program.getInfoLog(), program.getInfoDebugLog(), true, "", ""}; + options().emitNonSemanticShaderDebugInfo = enableNonSemanticShaderDebugInfo; + options().emitNonSemanticShaderDebugSource = enableNonSemanticShaderDebugInfo; + glslang::GlslangToSpv(*shader.getIntermediate(), spirv_binary, &logger, &options()); } + + std::ostringstream disassembly_stream; + spv::Parameterize(); + spv::Disassemble(disassembly_stream, spirv_binary); + bool validation_result = !options().validate || logger.getAllMessages().empty(); + return {{ + {shaderName, shader.getInfoLog(), shader.getInfoDebugLog()}, + }, + program.getInfoLog(), + program.getInfoDebugLog(), + validation_result, + logger.getAllMessages(), + disassembly_stream.str()}; } // Compiles and links the given source |code| of the given shader @@ -315,10 +338,8 @@ class GlslangTest : public GT { program.addShader(&shader); success &= program.link(controls); -#if !defined(GLSLANG_WEB) && !defined(GLSLANG_ANGLE) if (success) program.mapIO(); -#endif spv::SpvBuildLogger logger; @@ -360,10 +381,8 @@ class GlslangTest : public GT { glslang::TProgram program; program.addShader(&shader); success &= program.link(controls); -#if !defined(GLSLANG_WEB) && !defined(GLSLANG_ANGLE) if (success) program.mapIO(); -#endif if (success && (controls & EShMsgSpvRules)) { spv::SpvBuildLogger logger; @@ -448,7 +467,8 @@ class GlslangTest : public GT { const std::string& entryPointName="", const std::string& baseDir="/baseResults/", const bool enableOptimizer = false, - const bool enableDebug = false) + const bool enableDebug = false, + const bool enableNonSemanticShaderDebugInfo = false) { const std::string inputFname = testDir + "/" + testName; const std::string expectedOutputFname = @@ -464,9 +484,10 @@ class GlslangTest : public GT { if (enableDebug) controls = static_cast(controls | EShMsgDebugInfo); GlslangResult result = compileAndLink(testName, input, entryPointName, controls, clientTargetVersion, - targetLanguageVersion, false, EShTexSampTransKeep, enableOptimizer, enableDebug, automap); + targetLanguageVersion, false, EShTexSampTransKeep, enableOptimizer, enableDebug, + enableNonSemanticShaderDebugInfo, automap); - // Generate the hybrid output in the way of glslangValidator. + // Generate the hybrid output in the way of glslang. std::ostringstream stream; outputResultToStream(&stream, result, controls); @@ -496,7 +517,7 @@ class GlslangTest : public GT { GlslangResult result = compileAndLink(testName, input, entryPointName, controls, clientTargetVersion, targetLanguageVersion, false, EShTexSampTransKeep, false, automap); - // Generate the hybrid output in the way of glslangValidator. + // Generate the hybrid output in the way of glslang. std::ostringstream stream; outputResultToStream(&stream, result, controls); @@ -522,7 +543,7 @@ class GlslangTest : public GT { GlslangResult result = compileAndLink(testName, input, entryPointName, controls, glslang::EShTargetVulkan_1_0, glslang::EShTargetSpv_1_0, true); - // Generate the hybrid output in the way of glslangValidator. + // Generate the hybrid output in the way of glslang. std::ostringstream stream; outputResultToStream(&stream, result, controls); @@ -559,7 +580,7 @@ class GlslangTest : public GT { autoMapBindings, flattenUniformArrays); - // Generate the hybrid output in the way of glslangValidator. + // Generate the hybrid output in the way of glslang. std::ostringstream stream; outputResultToStream(&stream, result, controls); @@ -586,7 +607,7 @@ class GlslangTest : public GT { const EShMessages controls = DeriveOptions(source, semantics, target); GlslangResult result = compileLinkRemap(testName, input, entryPointName, controls, remapOptions); - // Generate the hybrid output in the way of glslangValidator. + // Generate the hybrid output in the way of glslang. std::ostringstream stream; outputResultToStream(&stream, result, controls); @@ -613,7 +634,7 @@ class GlslangTest : public GT { const EShMessages controls = DeriveOptions(source, semantics, target); GlslangResult result = remap(testName, input, controls, remapOptions); - // Generate the hybrid output in the way of glslangValidator. + // Generate the hybrid output in the way of glslang. std::ostringstream stream; outputResultToStream(&stream, result, controls); @@ -635,7 +656,7 @@ class GlslangTest : public GT { std::string ppShader; glslang::TShader::ForbidIncluder includer; const bool success = shader.preprocess( - &glslang::DefaultTBuiltInResource, defaultVersion, defaultProfile, + GetDefaultResources(), defaultVersion, defaultProfile, forceVersionProfile, isForwardCompatible, (EShMessages)(EShMsgOnlyPreprocessor | EShMsgCascadingErrors), &ppShader, includer); @@ -693,7 +714,7 @@ class GlslangTest : public GT { glslang::EShTargetVulkan_1_0, glslang::EShTargetSpv_1_0, false, EShTexSampTransUpgradeTextureRemoveSampler); - // Generate the hybrid output in the way of glslangValidator. + // Generate the hybrid output in the way of glslang. std::ostringstream stream; outputResultToStream(&stream, result, controls); diff --git a/gtests/VkRelaxed.FromFile.cpp b/gtests/VkRelaxed.FromFile.cpp index 96cd3cf69a..67e5501714 100644 --- a/gtests/VkRelaxed.FromFile.cpp +++ b/gtests/VkRelaxed.FromFile.cpp @@ -42,7 +42,6 @@ #include "glslang/MachineIndependent/iomapper.h" #include "glslang/MachineIndependent/reflection.h" -#ifndef GLSLANG_WEB namespace glslangtest { namespace { @@ -303,4 +302,3 @@ INSTANTIATE_TEST_SUITE_P( } // anonymous namespace } // namespace glslangtest -#endif diff --git a/hlsl/CMakeLists.txt b/hlsl/CMakeLists.txt index 4616cfe01c..058a67b086 100644 --- a/hlsl/CMakeLists.txt +++ b/hlsl/CMakeLists.txt @@ -38,8 +38,11 @@ # projects that referenced this target. add_library(HLSL ${LIB_TYPE} "stub.cpp") -set_property(TARGET HLSL PROPERTY FOLDER hlsl) -set_property(TARGET HLSL PROPERTY POSITION_INDEPENDENT_CODE ON) +set_target_properties(HLSL PROPERTIES + FOLDER hlsl + POSITION_INDEPENDENT_CODE ON + VERSION "${GLSLANG_VERSION}" + SOVERSION "${GLSLANG_VERSION_MAJOR}") if(WIN32 AND BUILD_SHARED_LIBS) set_target_properties(HLSL PROPERTIES PREFIX "") @@ -52,7 +55,7 @@ if(ENABLE_GLSLANG_INSTALL) message(WARNING \"Using `HLSLTargets.cmake` is deprecated: use `find_package(glslang)` to find glslang CMake targets.\") if (NOT TARGET glslang::HLSL) - include(\"\${CMAKE_CURRENT_LIST_DIR}/../../${CMAKE_INSTALL_DATADIR}/${PROJECT_NAME}/glslang-targets.cmake\") + include(\"${CMAKE_INSTALL_FULL_LIBDIR}/cmake/${PROJECT_NAME}/glslang-targets.cmake\") endif() add_library(HLSL ALIAS glslang::HLSL) diff --git a/known_good.json b/known_good.json index 1a3202d035..1cbcb09646 100644 --- a/known_good.json +++ b/known_good.json @@ -5,14 +5,14 @@ "site" : "github", "subrepo" : "KhronosGroup/SPIRV-Tools", "subdir" : "External/spirv-tools", - "commit" : "5e61ea2098220059e89523f1f47b0bcd8c33b89a" + "commit" : "360d469b9eac54d6c6e20f609f9ec35e3a5380ad" }, { "name" : "spirv-tools/external/spirv-headers", "site" : "github", "subrepo" : "KhronosGroup/SPIRV-Headers", "subdir" : "External/spirv-tools/external/spirv-headers", - "commit" : "b2a156e1c0434bc8c99aaebba1c7be98be7ac580" + "commit" : "e867c06631767a2d96424cbec530f9ee5e78180f" } ] } diff --git a/kokoro/android-ndk-build/build-docker.sh b/kokoro/android-ndk-build/build-docker.sh index 2b23b27a75..94edcd3fc4 100755 --- a/kokoro/android-ndk-build/build-docker.sh +++ b/kokoro/android-ndk-build/build-docker.sh @@ -43,6 +43,7 @@ using ndk-r21d export NDK_PROJECT_PATH="${ROOT_DIR}/ndk_test" export APP_BUILD_SCRIPT="${ROOT_DIR}/ndk_test/Android.mk" +export APP_PLATFORM=android-24 # Vulkan introduced in API 24 echo "Building..." ndk-build -j diff --git a/kokoro/linux-clang-cmake/build-docker.sh b/kokoro/linux-clang-cmake/build-docker.sh index c5fdcd2356..6b1d3e1ae1 100755 --- a/kokoro/linux-clang-cmake/build-docker.sh +++ b/kokoro/linux-clang-cmake/build-docker.sh @@ -46,5 +46,5 @@ using ninja-1.10.0 echo "Building..." mkdir /build && cd /build -cmake "$ROOT_DIR" -GNinja -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX="$(pwd)/install" -DBUILD_SHARED_LIBS=$BUILD_SHARED_LIBS +cmake "$ROOT_DIR" -GNinja -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX="$(pwd)/install" -DBUILD_SHARED_LIBS=$BUILD_SHARED_LIBS -DENABLE_OPT=0 ninja install diff --git a/kokoro/linux-clang-gn/build-docker.sh b/kokoro/linux-clang-gn/build-docker.sh index 1035ab88ce..6540b1be0d 100755 --- a/kokoro/linux-clang-gn/build-docker.sh +++ b/kokoro/linux-clang-gn/build-docker.sh @@ -34,8 +34,17 @@ # POSSIBILITY OF SUCH DAMAGE. set -e # Fail on any error. + +. /bin/using.sh # Declare the bash `using` function for configuring toolchains. + set -x # Display commands being run. +using ninja-1.10.0 + +# Disable git's "detected dubious ownership" error - kokoro checks out the repo +# with a different user, and we don't care about this warning. +git config --global --add safe.directory '*' + echo "Fetching external projects..." ./update_glslang_sources.py diff --git a/kokoro/linux-clang-gn/build.sh b/kokoro/linux-clang-gn/build.sh index 563432a1ad..111f5294ee 100755 --- a/kokoro/linux-clang-gn/build.sh +++ b/kokoro/linux-clang-gn/build.sh @@ -38,6 +38,7 @@ set -e # Fail on any error. SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}")" >/dev/null 2>&1 && pwd )" ROOT_DIR="$( cd "${SCRIPT_DIR}/../.." >/dev/null 2>&1 && pwd )" +set +e # Allow build failure docker run --rm -i \ --volume "${ROOT_DIR}:${ROOT_DIR}" \ --workdir "${ROOT_DIR}" \ @@ -46,4 +47,9 @@ docker run --rm -i \ --entrypoint "${SCRIPT_DIR}/build-docker.sh" \ "gcr.io/shaderc-build/radial-build:latest" +# This is important. If the permissions are not fixed, kokoro will fail +# to pull build artifacts, and put the build in tool-failure state, which +# blocks the logs. +RESULT=$? sudo chown -R "$(id -u):$(id -g)" "${ROOT_DIR}" +exit $RESULT diff --git a/kokoro/linux-clang-release-bazel/build.sh b/kokoro/linux-clang-release-bazel/build.sh deleted file mode 100644 index 190e3d7024..0000000000 --- a/kokoro/linux-clang-release-bazel/build.sh +++ /dev/null @@ -1,60 +0,0 @@ -#!/bin/bash - -# Copyright (C) 2019 Google, Inc. -# -# All rights reserved. -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions -# are met: -# -# Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# -# Redistributions in binary form must reproduce the above -# copyright notice, this list of conditions and the following -# disclaimer in the documentation and/or other materials provided -# with the distribution. -# -# Neither the name of Google Inc. nor the names of its -# contributors may be used to endorse or promote products derived -# from this software without specific prior written permission. -# -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS -# FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE -# COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, -# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, -# BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -# LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER -# CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT -# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN -# ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE -# POSSIBILITY OF SUCH DAMAGE. - -# Linux Build Script. - -# Fail on any error. -set -e -# Display commands being run. -set -x - -CC=clang -CXX=clang++ -SRC=$PWD/github/glslang -cd $SRC - -# Bazel limitation: No 'External' directory is allowed!! -mv External third_party - -gsutil cp gs://bazel/0.29.1/release/bazel-0.29.1-linux-x86_64 . -chmod +x bazel-0.29.1-linux-x86_64 - -echo $(date): Build everything... -./bazel-0.29.1-linux-x86_64 build :all -echo $(date): Build completed. - -echo $(date): Starting bazel test... -./bazel-0.29.1-linux-x86_64 test :all --test_output=all -echo $(date): Bazel test completed. diff --git a/kokoro/linux-clang-release-bazel/continuous.cfg b/kokoro/linux-clang-release-bazel/continuous.cfg deleted file mode 100644 index 767556d0b4..0000000000 --- a/kokoro/linux-clang-release-bazel/continuous.cfg +++ /dev/null @@ -1,35 +0,0 @@ -# Copyright (C) 2019 Google, Inc. -# -# All rights reserved. -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions -# are met: -# -# Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# -# Redistributions in binary form must reproduce the above -# copyright notice, this list of conditions and the following -# disclaimer in the documentation and/or other materials provided -# with the distribution. -# -# Neither the name of Google Inc. nor the names of its -# contributors may be used to endorse or promote products derived -# from this software without specific prior written permission. -# -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS -# FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE -# COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, -# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, -# BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -# LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER -# CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT -# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN -# ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE -# POSSIBILITY OF SUCH DAMAGE. - -# Continuous build configuration. -build_file: "glslang/kokoro/linux-clang-release-bazel/build.sh" diff --git a/kokoro/linux-clang-release-bazel/presubmit.cfg b/kokoro/linux-clang-release-bazel/presubmit.cfg deleted file mode 100644 index 669491f829..0000000000 --- a/kokoro/linux-clang-release-bazel/presubmit.cfg +++ /dev/null @@ -1,35 +0,0 @@ -# Copyright (C) 2019 Google, Inc. -# -# All rights reserved. -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions -# are met: -# -# Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# -# Redistributions in binary form must reproduce the above -# copyright notice, this list of conditions and the following -# disclaimer in the documentation and/or other materials provided -# with the distribution. -# -# Neither the name of Google Inc. nor the names of its -# contributors may be used to endorse or promote products derived -# from this software without specific prior written permission. -# -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS -# FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE -# COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, -# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, -# BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -# LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER -# CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT -# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN -# ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE -# POSSIBILITY OF SUCH DAMAGE. - -# Presubmit build configuration. -build_file: "glslang/kokoro/linux-clang-release-bazel/build.sh" diff --git a/kokoro/linux-gcc-cmake/build-docker.sh b/kokoro/linux-gcc-cmake/build-docker.sh index 0edc05e24b..558695c8a7 100755 --- a/kokoro/linux-gcc-cmake/build-docker.sh +++ b/kokoro/linux-gcc-cmake/build-docker.sh @@ -46,5 +46,5 @@ using ninja-1.10.0 echo "Building..." mkdir /build && cd /build -cmake "$ROOT_DIR" -GNinja -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX="$(pwd)/install" -DBUILD_SHARED_LIBS=$BUILD_SHARED_LIBS +cmake "$ROOT_DIR" -GNinja -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX="$(pwd)/install" -DBUILD_SHARED_LIBS=$BUILD_SHARED_LIBS -DENABLE_OPT=0 ninja install diff --git a/kokoro/macos-clang-release-bazel/build.sh b/kokoro/macos-clang-release-bazel/build.sh deleted file mode 100644 index 8f1b2516b2..0000000000 --- a/kokoro/macos-clang-release-bazel/build.sh +++ /dev/null @@ -1,60 +0,0 @@ -#!/bin/bash - -# Copyright (C) 2019 Google, Inc. -# -# All rights reserved. -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions -# are met: -# -# Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# -# Redistributions in binary form must reproduce the above -# copyright notice, this list of conditions and the following -# disclaimer in the documentation and/or other materials provided -# with the distribution. -# -# Neither the name of Google Inc. nor the names of its -# contributors may be used to endorse or promote products derived -# from this software without specific prior written permission. -# -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS -# FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE -# COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, -# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, -# BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -# LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER -# CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT -# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN -# ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE -# POSSIBILITY OF SUCH DAMAGE. - -# macOS Build Script. - -# Fail on any error. -set -e -# Display commands being run. -set -x - -CC=clang -CXX=clang++ -SRC=$PWD/github/glslang -cd $SRC - -mv External third_party - -# Get bazel 0.29.1. -gsutil cp gs://bazel/0.29.1/release/bazel-0.29.1-darwin-x86_64 . -chmod +x bazel-0.29.1-darwin-x86_64 - -echo $(date): Build everything... -./bazel-0.29.1-darwin-x86_64 build :all -echo $(date): Build completed. - -echo $(date): Starting bazel test... -./bazel-0.29.1-darwin-x86_64 test :all --test_output=all -echo $(date): Bazel test completed. diff --git a/kokoro/macos-clang-release-bazel/continuous.cfg b/kokoro/macos-clang-release-bazel/continuous.cfg deleted file mode 100644 index f1980790e2..0000000000 --- a/kokoro/macos-clang-release-bazel/continuous.cfg +++ /dev/null @@ -1,35 +0,0 @@ -# Copyright (C) 2019 Google, Inc. -# -# All rights reserved. -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions -# are met: -# -# Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# -# Redistributions in binary form must reproduce the above -# copyright notice, this list of conditions and the following -# disclaimer in the documentation and/or other materials provided -# with the distribution. -# -# Neither the name of Google Inc. nor the names of its -# contributors may be used to endorse or promote products derived -# from this software without specific prior written permission. -# -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS -# FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE -# COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, -# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, -# BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -# LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER -# CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT -# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN -# ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE -# POSSIBILITY OF SUCH DAMAGE. - -# Continuous build configuration. -build_file: "glslang/kokoro/macos-clang-release-bazel/build.sh" diff --git a/kokoro/macos-clang-release-bazel/presubmit.cfg b/kokoro/macos-clang-release-bazel/presubmit.cfg deleted file mode 100644 index daa30be5cb..0000000000 --- a/kokoro/macos-clang-release-bazel/presubmit.cfg +++ /dev/null @@ -1,35 +0,0 @@ -# Copyright (C) 2019 Google, Inc. -# -# All rights reserved. -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions -# are met: -# -# Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# -# Redistributions in binary form must reproduce the above -# copyright notice, this list of conditions and the following -# disclaimer in the documentation and/or other materials provided -# with the distribution. -# -# Neither the name of Google Inc. nor the names of its -# contributors may be used to endorse or promote products derived -# from this software without specific prior written permission. -# -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS -# FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE -# COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, -# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, -# BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -# LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER -# CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT -# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN -# ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE -# POSSIBILITY OF SUCH DAMAGE. - -# Presubmit build configuration. -build_file: "glslang/kokoro/macos-clang-release-bazel/build.sh" diff --git a/kokoro/windows-msvc-2015-release-bazel/build.bat b/kokoro/windows-msvc-2015-release-bazel/build.bat deleted file mode 100644 index fb2009b187..0000000000 --- a/kokoro/windows-msvc-2015-release-bazel/build.bat +++ /dev/null @@ -1,75 +0,0 @@ -:: Copyright (C) 2019 Google, Inc. -:: -:: All rights reserved. -:: -:: Redistribution and use in source and binary forms, with or without -:: modification, are permitted provided that the following conditions -:: are met: -:: -:: Redistributions of source code must retain the above copyright -:: notice, this list of conditions and the following disclaimer. -:: -:: Redistributions in binary form must reproduce the above -:: copyright notice, this list of conditions and the following -:: disclaimer in the documentation and/or other materials provided -:: with the distribution. -:: -:: Neither the name of Google Inc. nor the names of its -:: contributors may be used to endorse or promote products derived -:: from this software without specific prior written permission. -:: -:: THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -:: "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -:: LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS -:: FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE -:: COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, -:: INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, -:: BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -:: LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER -:: CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT -:: LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN -:: ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE -:: POSSIBILITY OF SUCH DAMAGE. -:: Copyright (c) 2019 Google LLC. -:: -:: Windows Build Script. - -@echo on - -set SRC=%cd%\github\glslang - -:: Force usage of python 3.6 -set PATH=C:\python36;%PATH% -cd %SRC% - -mv External third_party - -:: REM Install Bazel. -wget -q https://github.com/bazelbuild/bazel/releases/download/0.29.1/bazel-0.29.1-windows-x86_64.zip -unzip -q bazel-0.29.1-windows-x86_64.zip - -:: Set up MSVC -call "C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\vcvarsall.bat" x64 -set BAZEL_VS=C:\Program Files (x86)\Microsoft Visual Studio 14.0 -set BAZEL_VC=C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC -set BAZEL_SH=c:\tools\msys64\usr\bin\bash.exe -set BAZEL_PYTHON=c:\tools\python2\python.exe - -:: ######################################### -:: Start building. -:: ######################################### -echo "Build everything... %DATE% %TIME%" -bazel.exe build :all -if %ERRORLEVEL% NEQ 0 exit /b %ERRORLEVEL% -echo "Build Completed %DATE% %TIME%" - -:: ############## -:: Run the tests -:: ############## -echo "Running Tests... %DATE% %TIME%" -bazel.exe test :all --test_output=all -if %ERRORLEVEL% NEQ 0 exit /b %ERRORLEVEL% -echo "Tests Completed %DATE% %TIME%" - -exit /b 0 - diff --git a/kokoro/windows-msvc-2015-release-bazel/continuous.cfg b/kokoro/windows-msvc-2015-release-bazel/continuous.cfg deleted file mode 100644 index 554d29de57..0000000000 --- a/kokoro/windows-msvc-2015-release-bazel/continuous.cfg +++ /dev/null @@ -1,35 +0,0 @@ -# Copyright (C) 2019 Google, Inc. -# -# All rights reserved. -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions -# are met: -# -# Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# -# Redistributions in binary form must reproduce the above -# copyright notice, this list of conditions and the following -# disclaimer in the documentation and/or other materials provided -# with the distribution. -# -# Neither the name of Google Inc. nor the names of its -# contributors may be used to endorse or promote products derived -# from this software without specific prior written permission. -# -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS -# FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE -# COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, -# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, -# BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -# LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER -# CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT -# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN -# ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE -# POSSIBILITY OF SUCH DAMAGE. - -# Continuous build configuration. -build_file: "glslang/kokoro/windows-msvc-2015-release-bazel/build.bat" diff --git a/kokoro/windows-msvc-2015-release-bazel/presubmit.cfg b/kokoro/windows-msvc-2015-release-bazel/presubmit.cfg deleted file mode 100644 index 4980bb6b58..0000000000 --- a/kokoro/windows-msvc-2015-release-bazel/presubmit.cfg +++ /dev/null @@ -1,35 +0,0 @@ -# Copyright (C) 2019 Google, Inc. -# -# All rights reserved. -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions -# are met: -# -# Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# -# Redistributions in binary form must reproduce the above -# copyright notice, this list of conditions and the following -# disclaimer in the documentation and/or other materials provided -# with the distribution. -# -# Neither the name of Google Inc. nor the names of its -# contributors may be used to endorse or promote products derived -# from this software without specific prior written permission. -# -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS -# FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE -# COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, -# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, -# BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -# LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER -# CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT -# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN -# ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE -# POSSIBILITY OF SUCH DAMAGE. - -# Presubmit build configuration. -build_file: "glslang/kokoro/windows-msvc-2015-release-bazel/build.bat" diff --git a/license-checker.cfg b/license-checker.cfg index 51ce2762c8..15b8f9729e 100644 --- a/license-checker.cfg +++ b/license-checker.cfg @@ -36,6 +36,7 @@ "SPIRV/GLSL.*.h", "SPIRV/NonSemanticDebugPrintf.h", + "SPIRV/NonSemanticShaderDebugInfo100.h", "SPIRV/spirv.hpp" ] } diff --git a/ndk_test/Android.mk b/ndk_test/Android.mk index b1b2207c44..d2e93da52c 100644 --- a/ndk_test/Android.mk +++ b/ndk_test/Android.mk @@ -38,7 +38,7 @@ LOCAL_CPP_EXTENSION := .cc .cpp .cxx LOCAL_SRC_FILES:=test.cpp LOCAL_MODULE:=glslang_ndk_test LOCAL_LDLIBS:=-landroid -LOCAL_CXXFLAGS:=-std=c++11 -fno-exceptions -fno-rtti -Werror +LOCAL_CXXFLAGS:=-std=c++17 -fno-exceptions -fno-rtti -Werror LOCAL_STATIC_LIBRARIES:=glslang SPIRV HLSL include $(BUILD_SHARED_LIBRARY) diff --git a/ndk_test/jni/Application.mk b/ndk_test/jni/Application.mk index 07b7615733..0eb8ffdf66 100644 --- a/ndk_test/jni/Application.mk +++ b/ndk_test/jni/Application.mk @@ -34,5 +34,5 @@ APP_ABI := all APP_BUILD_SCRIPT := Android.mk APP_STL := c++_static -APP_PLATFORM := android-9 +APP_PLATFORM := android-24 NDK_TOOLCHAIN_VERSION := 4.9