Roll third_party/glslang/ 9325cc013..e56beaee7 (19 commits)

https://github.com/KhronosGroup/glslang/compare/9325cc013e3d...e56beaee7368

$ git log 9325cc013..e56beaee7 --date=short --no-merges --format='%ad %ae %s'
2021-02-18 greg Update CHANGES for 11.1.0
2020-11-12 laddoc Fix issue for new unique id system. Add level bits to help verifying symbols and split symbol tables. For intermediates rebuilding, now need manually amending level bits for redeclaring built-ins.
2021-02-14 julius.ikkala Pass environment through PreprocessDeferred
2021-02-11 greg Update spirv-tools and spirv-header known good.
2021-02-07 e.proydakov Code review. Thx ben-clayton for comments.
2021-02-07 e.proydakov Fixed issues 2496. Used option 4: parse_version.cmake to avoid python3 usage.
2021-02-03 dneto Remove useless semicolon
2021-01-30 glex.spb callGraph.push_front -> emplace_front to fix UBSAN
2020-06-02 caio.oliveira Add support for GL_EXT_shared_memory_block
2020-05-12 caio.oliveira Update known_good.json to pick up SPV_KHR_workgroup_memory_explicit_layout
2021-01-27 caio.oliveira Consider GL_EXT_scalar_block_layout when validating SPIR-V
2021-01-27 jbolz Add missing capability when QueueFamily scope is used
2020-06-11 cepheus Implement GL_EXT_null_initializer
2021-01-21 sk Fix missing enum values in the C-interface #2507
2021-01-18 bclayton license-checker.cfg: Update rules
2021-01-15 cstout Add CMake support for Fuchsia
2021-01-05 jeremy Prevent HLSL input under OpenGL semantics
2021-01-05 greg Fix debugInfo test to target vulkan1.1 as intended
2021-01-05 denis.zalevskiy Fix option replacement when flags are empty

Created with:
  roll-dep third_party/glslang

Roll third_party/re2/ c33d1680c..7107ebc4f (6 commits)

https://github.com/google/re2/compare/c33d1680c7e9...7107ebc4fbf7

$ git log c33d1680c..7107ebc4f --date=short --no-merges --format='%ad %ae %s'
2021-02-07 junyer Mention the WebAssembly wrapper.
2021-02-02 junyer Make *Cached* benchmarks actually use cached objects.
2021-02-01 junyer Undo SONAME bump. CharClass isn't exposed.
2021-01-28 junyer Use `static_cast<>` instead of a C-style cast.
2021-01-26 junyer Address `-Wnull-dereference' warnings from GCC 10.x.
2021-01-14 dirk.reinbach use target_include_directories() instead of include_directories().

Created with:
  roll-dep third_party/re2

Roll third_party/spirv-headers/ f027d53de..a3fdfe814 (25 commits)

https://github.com/KhronosGroup/SPIRV-Headers/compare/f027d53ded7e...a3fdfe81465d

$ git log f027d53de..a3fdfe814 --date=short --no-merges --format='%ad %ae %s'
2020-08-19 jason Add header changes for SPV_EXT_shader_atomic_float_min_max
2021-01-27 jason.ekstrand Re-run buildSpvHeaders to fix indentation
2021-01-19 dneto Header generator: Check enumerant ordering
2021-01-27 ben.ashbaugh add generated headers
2021-01-27 ben.ashbaugh add None as a possible value for DebugInfoFlags
2021-01-25 caio.oliveira Add SPV_KHR_workgroup_memory_explicit_layout
2021-01-20 dneto Push FPDenormMode, FPOperationMode to the end
2021-01-20 dmitry.sidorov Apply suggestions to Intel extensions PR
2020-12-16 dmitry.sidorov Update generated files
2020-12-16 dmitry.sidorov Add SPV_INTEL_long_constant_composite extension
2020-12-16 dmitry.sidorov Add SPV_INTEL_loop_fuse extension
2020-11-23 dmitry.sidorov Add SPV_INTEL_fpga_cluster_attributes and SPV_INTEL_fp_fast_math_mode
2020-11-23 dmitry.sidorov Update SPV_INTEL_fpga_loop_controls extension
2020-11-16 dmitry.sidorov Update SPV_INTEL_kernel_attributes extension
2020-11-09 dmitry.sidorov Update SPV_INTEL_function_pointers extension
2020-11-09 dmitry.sidorov Upstream SPV_INTEL_float_controls2 extension
2020-11-09 dmitry.sidorov Upstream SPV_INTEL_vector_compute extension
2020-11-06 dmitry.sidorov Upstream SPV_INTEL_fpga_memory_accesses extension
2020-11-06 dmitry.sidorov Upstream SPV_INTEL_io_pipes extension
2020-11-05 dmitry.sidorov Upstream SPV_INTEL_variable_length_array extension
2020-11-05 dmitry.sidorov Upstream SPV_INTEL_usm_storage_classes extension
2020-11-05 dmitry.sidorov Upstream SPV_INTEL_arbitrary_precision_integers extensions
2020-11-05 dmitry.sidorov Upstream SPV_INTEL_inline_assembly extension
2020-11-03 dmitry.sidorov Upstream SPV_INTEL_fpga_buffer_location extension
2021-01-05 ben.ashbaugh add function control bitfield reservation section reserve bit 16 for an upcoming Intel extension

Created with:
  roll-dep third_party/spirv-headers

Roll third_party/spirv-tools/ ee39b5db5..ef3290bbe (26 commits)

https://github.com/KhronosGroup/SPIRV-Tools/compare/ee39b5db5f1d...ef3290bbea35

$ git log ee39b5db5..ef3290bbe --date=short --no-merges --format='%ad %ae %s'
2021-02-19 atte.seppala spirv-opt: Don't call GenerateCopy for mismatched image types (#4126)
2021-02-18 jaebaek Start SPIRV-Tools v2021.0
2021-02-18 jaebaek Finalize SPIRV-Tools v2020.7
2021-02-16 jaebaek Update CHANGES
2021-02-11 greg Generate differentiated error codes for buffer oob checking (#4144)
2021-02-10 dj2 Update a few virtuals to overrides. (#4143)
2021-02-05 46493288+sfricke-samsung spriv-val: Vulkan image gather constant component (#4133)
2021-02-05 46493288+sfricke-samsung spirv-val: Fix/Label UniformConstant VUID (#4134)
2021-02-05 46493288+sfricke-samsung spirv-val: Add Vulkan Invariant Decoration VUID (#4132)
2021-02-02 46493288+sfricke-samsung spirv-val: label tests for VUID 04657 (#4119)
2021-02-01 46493288+sfricke-samsung spirv-val: Add Vulkan PSB64 convert VUID (#4122)
2021-01-28 stevenperron Mark module as modified if convert-to-half removes decorations. (#4127)
2021-01-28 jaebaek Set correct scope and line info for DebugValue (#4125)
2021-01-27 caio.oliveira Validate SPV_KHR_workgroup_memory_explicit_layout (#4128)
2021-01-27 alanbaker Validate VK_KHR_zero_initialize_workgroup_memory (#4124)
2021-01-27 46493288+sfricke-samsung spirv-val: Add Vulkan image gather offset VUID (#4118)
2021-01-27 alanbaker Add cmake to windows path for kokoro (#4129)
2021-01-25 46493288+sfricke-samsung spirv-val: Label Vulkan atomic semantics VUIDs (#4120)
2021-01-25 46493288+sfricke-samsung spirv-val: Label VUID 04662 (#4123)
2021-01-25 46493288+sfricke-samsung spirv-val: Label VUID 04683 (#4121)
2021-01-22 machenbach Remove obsolete GN config (#4110)
2021-01-20 46493288+sfricke-samsung spirv-val: Add Vulkan EXT builtins (#4115)
2021-01-20 dneto Support pending Intel extensions (#4116)
2021-01-19 dneto Validate Sampled=1 for Vulkan ImageQuerySizeLod, ImageQueryLevels, ImageQueryLod (#4103)
2021-01-19 46493288+sfricke-samsung spirv-val: Add Vulkan Memory Scope VUs (#4106)
2021-01-18 bclayton Migrate all Kokoro build scripts over to use the docker VM image (#4114)

Created with:
  roll-dep third_party/spirv-tools
1 file changed
tree: f22b725db17428301d7693305098ca0753615c17
  1. android_test/
  2. build_overrides/
  3. cmake/
  4. examples/
  5. glslc/
  6. kokoro/
  7. libshaderc/
  8. libshaderc_util/
  9. third_party/
  10. utils/
  11. .clang-format
  12. .gitignore
  13. Android.mk
  14. AUTHORS
  15. BUILD.gn
  16. CHANGES
  17. CMakeLists.txt
  18. CONTRIBUTING.md
  19. CONTRIBUTORS
  20. DEPS
  21. DEVELOPMENT.howto.md
  22. Dockerfile
  23. downloads.md
  24. LICENSE
  25. license-checker.cfg
  26. README.md
README.md

Shaderc

A collection of tools, libraries and tests for shader compilation. At the moment it includes:

  • glslc, a command line compiler for GLSL/HLSL to SPIR-V, and
  • libshaderc, a library API for accessing glslc functionality.

Note: The fact that that libshaderc is not named libshaderc_glslc is a quirk of history, and a known inconsistency. Changing it would require a significant amount of renaming and breaking of downstream projects, so it is being left as is.

glslc wraps around core functionality in glslang and SPIRV-Tools. glslc and its library aims to to provide:

  • a command line compiler with GCC- and Clang-like usage, for better integration with build systems
  • an API where functionality can be added without breaking existing clients
  • an API supporting standard concurrency patterns across multiple operating systems
  • increased functionality such as file #include support

Downloads

Note: These binaries are just the artifacts of the builders and have not undergone any QA, thus they should be considered unsupported.

Linux Build Status MacOS Build Status Windows Build Status

More downloads

Status

Shaderc has maintained backward compatibility for quite some time, and we don't anticipate any breaking changes. Ongoing enhancements are described in the CHANGES file.

Shaderc has been shipping in the Android NDK since version r12b. (The NDK build uses sources from https://android.googlesource.com/platform/external/shaderc/. Those repos are downstream from GitHub.) We currently require r18b.

For licensing terms, please see the LICENSE file. If interested in contributing to this project, please see CONTRIBUTING.md.

This is not an official Google product (experimental or otherwise), it is just code that happens to be owned by Google. That may change if Shaderc gains contributions from others. See the CONTRIBUTING.md file for more information. See also the AUTHORS and CONTRIBUTORS files.

File organization

  • android_test/ : a small Android application to verify compilation
  • cmake/: CMake utility functions and configuration for Shaderc
  • examples/: Example programs
  • glslc/: an executable to compile GLSL to SPIR-V
  • libshaderc/: a library for compiling shader strings into SPIR-V
  • libshaderc_util/: a utility library used by multiple shaderc components
  • third_party/: third party open source packages; see below
  • utils/: utility scripts for Shaderc

Shaderc depends on glslang, the Khronos reference compiler for GLSL.

Shaderc depends on SPIRV-Tools for assembling, disassembling, and transforming SPIR-V binaries.

Shaderc depends on the Google Test testing framework.

In the following sections, $SOURCE_DIR is the directory you intend to clone Shaderc into.

Getting and building Shaderc

If you only want prebuilt executables or libraries, see the Downloads section.

The rest of this section describes how to build Shaderc from sources.

Note: Shaderc assumes Glslang supports HLSL compilation. The instructions below assume you‘re building Glslang from sources, and in a subtree of shaderc/third_party. In that scenario, Glslang’s HLSL support is automatically enabled. Shaderc also can be built using a Glslang from outside the shaderc/third_party tree. In that case you must ensure that that external Glslang is built with HLSL functionality. See Glslang's ENABLE_HLSL CMake setting.)

  1. Check out the source code:
git clone https://github.com/google/shaderc $SOURCE_DIR
cd $SOURCE_DIR
./utils/git-sync-deps
cd $SOURCE_DIR/

Note: The known-good branch of the repository contains a known_good.json file describing a set of repo URLs and specific commits that have been tested together. This information is updated periodically, and typically matches the latest update of these sources in the development branch of the Android NDK. The known-good branch also contains a update_shaderc.py script that will read the JSON file and checkout those specific commits for you.

  1. Ensure you have the requisite tools -- see the tools subsection below.

  2. Decide where to place the build output. In the following steps, we'll call it $BUILD_DIR. Any new directory should work. We recommend building outside the source tree, but it is also common to build in a (new) subdirectory of $SOURCE_DIR, such as $SOURCE_DIR/build.

4a) Build (and test) with Ninja on Linux or Windows:

cd $BUILD_DIR
cmake -GNinja -DCMAKE_BUILD_TYPE={Debug|Release|RelWithDebInfo} $SOURCE_DIR
ninja
ctest # optional

4b) Or build (and test) with MSVC on Windows:

cd $BUILD_DIR
cmake $SOURCE_DIR
cmake --build . --config {Release|Debug|MinSizeRel|RelWithDebInfo}
ctest -C {Release|Debug|MinSizeRel|RelWithDebInfo}

4c) Or build with MinGW on Linux for Windows: (Skip building threaded unit tests due to Googletest bug 606)

cd $BUILD_DIR
cmake -GNinja -DCMAKE_BUILD_TYPE={Debug|Release|RelWithDebInfo} $SOURCE_DIR \
   -DCMAKE_TOOLCHAIN_FILE=$SOURCE_DIR/cmake/linux-mingw-toolchain.cmake \
   -Dgtest_disable_pthreads=ON
ninja

After a successful build, you should have a glslc executable somewhere under the $BUILD_DIR/glslc/ directory, as well as a libshaderc library somewhere under the $BUILD_DIR/libshaderc/ directory.

The default behavior on MSVC is to link with the static CRT. If you would like to change this behavior -DSHADERC_ENABLE_SHARED_CRT may be passed on the cmake configure line.

See the libshaderc README for more on using the library API in your project.

Tools you'll need

For building, testing, and profiling Shaderc, the following tools should be installed regardless of your OS:

  • CMake: for generating compilation targets.
  • Python 3: for utility scripts and running the test suite.

On Linux, the following tools should be installed:

  • gcov: for testing code coverage, provided by the gcc package on Ubuntu.
  • lcov: a graphical frontend for gcov, provided by the lcov package on Ubuntu.
  • genhtml: for creating reports in html format from lcov output, provided by the lcov package on Ubuntu.

On Linux, if cross compiling to Windows:

  • mingw: A GCC-based cross compiler targeting Windows so that generated executables use the Micrsoft C runtime libraries.

On Windows, the following tools should be installed and available on your path:

  • Visual Studio 2015 or later. Previous versions of Visual Studio may work but are untested and unsupported.
  • Git - including the associated tools, Bash, diff.

Optionally, the following tools may be installed on any OS:

Building and running Shaderc using Docker

Please make sure you have the Docker engine installed on your machine.

To create a Docker image containing Shaderc command line tools, issue the following command in ${SOURCE_DIR}: docker build -t <IMAGE-NAME> .. The created image will have all the command line tools installed at /usr/local internally, and a data volume mounted at /code.

Assume <IMAGE-NAME> is shaderc/shaderc from now on.

To invoke a tool from the above created image in a Docker container:

docker run shaderc/shaderc glslc --version

Alternatively, you can mount a host directory (e.g., example) containing the shaders you want to manipulate and run different kinds of tools via an interactive shell in the container:

$ docker run -i -t -v `pwd`/example:/code shaderc/shaderc
/code $ ls
test.vert
/code $ glslc -c -o - test.vert | spirv-dis

Bug tracking

We track bugs using GitHub -- click on the “Issues” button on the project's GitHub page.

Test coverage

On Linux, you can obtain test coverage as follows:

cd $BUILD_DIR
cmake -GNinja -DCMAKE_BUILD_TYPE=Debug -DENABLE_CODE_COVERAGE=ON $SOURCE_DIR
ninja
ninja report-coverage

Then the coverage report can be found under the $BUILD_DIR/coverage-report directory.

Bindings

Bindings are maintained by third parties, may contain content offered under a different license, and may reference or contain older versions of Shaderc and its dependencies.