Update SPIR-V Tools to dd4b663e1

    dd4b663e1 Prepare release v2024.2 (#5651)
    be6fb2a54 build(deps): bump the github-actions group across 1 directory with 4 updates (#5650)
    dadb3012d Add SPIRV_TOOLS_EXPORT to public C++ API (#5591)
    53c073606 A fix to support of SPV_QCOM_image_processing2 (#5646)
    67a3ed670 opt: add GroupNonUniformPartitionedNV capability to trim pass (#5648)
    2904985ae spirv-val: Add Vulkan check for Rect Dim in OpTypeImage (#5644)
    02470f606 Validate duplicate decorations and execution modes (#5641)
    6761288d3 Validator: Support SPV_NV_raw_access_chains (#5568)
    3983d15a1 Fix rebuilding types with circular references (#5623). (#5637)
    ade1f7cfd Add AliasedPointer decoration (#5635)
    24f2cdad8 build(deps): bump the github-actions group with 1 update (#5634)
    58ab8baf7 docs: explain LunarG is the source of truth for releases (#5627)
    7fe5f75e5 Roll external/re2/ 6598a8ecd..917047f36 (3 commits) (#5626)
    87721a100 Roll external/spirv-headers/ 7d500c4d7..4f7b471f1 (1 commit) (#5625)
    fe7bae090 Minor fix to cmakelists to avoid rerunning command each build (#5620)
    fc4286556 build(deps): bump the github-actions group with 2 updates (#5621)
    67451ebf6 Roll external/spirv-headers/ 04db24d69..7d500c4d7 (1 commit) (#5619)
    dda7731e9 build(deps): bump the github-actions group with 2 updates (#5618)
    3fafcc20e Roll external/spirv-headers/ 8b246ff75..04db24d69 (1 commit) (#5617)
    3a0471c3b build(deps): bump the github-actions group with 1 update (#5615)
    6c3f632a2 roll deps (#5614)
    c6615779e Roll external/googletest/ b479e7a3c..c231e6f5b (1 commit) (#5613)
    f20663ca7 add support for vulkan-shader-profiler external passes (#5512)
    f74f4e74c Roll external/re2/ ed9fc269e..d00d1e937 (2 commits) (#5589)
    e39cabca2 build(deps): bump the github-actions group with 2 updates (#5610)
    efb0fce2d Use bazel 7 and bzlmod (#5601)
    02c79e908 kokoro: Update bazel to 7.0.2 for Linux builds (#5609)
    f869d391a [OPT] Fix handling of analyses rebuild (#5608)
    d15a7aa25 kokoro: Update bazel to 7.0.2 for Mac builds (#5606)
    04896c462 Prepare release v2024.1 (#5605)
    7c363050d Add operand types for SPV_NV_raw_access_chains (#5602)
    5bc7c2876 build(deps): bump the github-actions group with 2 updates (#5598)
    75ad1345d Remove redundant function declarations from source/operand.h (#5584)
    9bd44d028 Suppot for SPV_QCOM_image_processing2 (#5582)
    0b027bafa Support operand kind for SPV_INTEL_maximum_registers (#5580)
    fbc7a14b3 Fix access chain struct checks (#5592)
    99a3ad32f build(deps): bump the github-actions group with 1 update (#5594)
    c3a9ffd74 build(deps): bump the github-actions group with 1 update (#5593)
    1b643eac5 spirv-val: Make Constant evaluation consistent (#5587)
    dc6676445 Roll external/googletest/ 6eb225cb8..5df0241ea (2 commits) (#5583)
    7da2c941f Update WORKSPACE (#5588)
    16af142c1 build(deps): bump the github-actions group with 1 update (#5586)
    b0a5c4ac1 SPV_NV_shader_atomic_fp16_vector (#5581)
    55cb3989e build(deps): bump the github-actions group with 1 update (#5578)
    11afeb4bb roll deps (#5576)
    7604147c2 [OPT] Add removed unused interface var pass to legalization passes (#5579)
    f9184c650 spirv-val: Revert Validate PhysicalStorageBuffer Stage Interface (#5575)
    20ad38c18 spirv-val: Multiple interface var with same SC (#5528)
    e08c012b1 [OPT] Identify arrays with unknown length in copy prop arrays (#5570)
    56a51dd94 Roll external/spirv-headers/ e77d03080..d3c2a6fa9 (1 commit) (#5574)
    0c986f596 update image enum tests to remove Kernel capability (#5562)
    b7413609c [OPT] Use new instruction folder for for all opcodes in spec consti folding (#5569)
    784b064f9 spirv-val: Validate PhysicalStorageBuffer Stage Interface (#5539)
    a8959dc65 Fold 64-bit int operations (#5561)
    80926d97a roll deps (#5566)
    9a7b1af90 build(deps): bump the github-actions group with 1 update (#5564)
    1a2cbabd8 Roll external/googletest/ 48729681a..64be1c79f (1 commit) (#5563)
    7657cb1c6 build(deps): bump the github-actions group with 3 updates (#5560)
    032c15aaf [NFC] Refactor code to fold instruction in fold tests. (#5558)
    9938f5bc2 Roll external/googletest/ 456574145..48729681a (1 commit) (#5559)
    ab59dc608 opt: prevent meld to merge block with MaximalReconvergence (#5557)
    6c11c2bd4 Roll external/re2/ 283636ffb..ab7c5918b (2 commits) (#5555)
    a8afbe941 roll deps (#5550)
    8d3ee2e8f spirv-opt: Fix OpCompositeExtract relaxation with struct operands (#5536)
    61c51d4ba spirv-val: Add Mesh Primitive Built-In validaiton (#5529)
    5d3c8b73f opt: Add OpEntryPoint to DescriptorScalarReplacement pass (#5553)
    de65e8174 [NFC] Remove unused code (#5554)
    ad11927e6 opt: add SPV_EXT_mesh_shader to opt allowlist (#5551)
    27ffe976e build(deps): bump the github-actions group with 2 updates (#5549)
    e5fcb7fac Roll external/re2/ 264e71e88..826ad10e5 (1 commit) (#5538)
    80bc99c3d Skip entire test/ folder if SPIRV_SKIP_TESTS is set. (#5548)
    0a6f0d189 opt: Add TrimCapabilities pass to spirv-opt tool (#5545)
    b951948ea SPV_KHR_quad_control (#5547)
    69197ba90 Add modify-maximal-reconvergence to spirv-opt help (#5546)
    0045b01ff opt: Add VulkanMemoryModelDeviceScope to trim (#5544)
    ef2f43236 Add support for SPV_KHR_float_controls2 (#5543)
    de3d5acc0 Add tooling support for SPV_KHR_maximal_reconvergence (#5542)
    14000ad47 Use python3 explicitly. (#5540)
    359012927 workflow: add vulkan-sdk tags as release tags (#5518)
    3e6bdd0f9 build(deps): bump the github-actions group with 3 updates (#5537)
    ed6835aff Roll external/re2/ c042630ed..32c181e0a (1 commit) (#5532)
    c96fe8b94 spirv-val: Re-enable OpControlBarrier VU (#5527)
    5dbdc7b60 build(deps): bump the github-actions group with 4 updates (#5531)
    155728b2e Add preserver-interface option to spirv-opt (#5524)
    01ee1bf31 Roll external/googletest/ b10fad38c..76bb2afb8 (1 commit) (#5485)
    36be541ee Remove unnecessary debug code (#5523)
    c7affa170 opt: add Int16 and Float16 to capability trim pass (#5519)
    0a9f3d1f2 Revert "Fix(cmake): CMake doesn't find system installed SPIRV-Headers (#5422)" (#5517)
    7d2429594 Fix(cmake): CMake doesn't find system installed SPIRV-Headers (#5422)
    f0cc85efd Prepare release v2023.6 (#5510)
    e03c8f5c8 Fix broken build (#5505)
    d75b3cfbb Zero initialize local variables (#5501)
    6b4f0c9d0 instrument: Fix handling of gl_InvocationID (#5493)
    b5d60826e printf: Remove stage specific info (#5495)
    e7a52b70f build(deps): bump the github-actions group with 1 update (#5498)
    2da75e152 Do not crash when tryingto fold unsupported spec constant (#5496)
    0d8784553 Remove uses of std::system(nullptr) (#5494)
    f4a73dd7a std::system requires include of <cstdlib> (#5486)
    ffe645023 Add iOS build to CI (#5490)
    afaf8fda2 Fix iOS / Android CMake builds (#5482)
    7d2a618bf build(deps): bump the github-actions group with 1 update (#5484)
    2a238ed24 Roll external/spirv-headers/ 38f39dae5..cca08c63c (2 commits) (#5480)
    246e6d4c6 spirv-val: Loosen restriction on base type of DebugTypePointer and DebugTypeQualifier (#5479)
    0df791f97 Fix nullptr argument in MarkInsertChain (#5465)
    fb91e6f0e Flush stdout before changing mode back to text (#5477)
    560eea6d7 build(deps): bump the github-actions group with 1 update (#5478)
    c8510a5e8 Fix python warning seen on Fedora 39 (#5474)
    8ee3ae524 Add comment to --inst-debug-printf option (#5466)
    f43c464d5 opt: add PhysicalStorageBufferAddresses to trim (#5476)
    c91e9d09b opt: add StorageImageReadWithoutFormat to cap trim (#5475)
    d88742fbd fix(build): git describe all tagged versions (#5447)
    6b1e609ef Support missing git in update_build_version.py (#5473)
    fbf047cc8 Roll external/re2/ 24d460a9d..974f44c8d (4 commits) (#5470)
    9e7a1f2dd Fix array size calculation (#5463)
    eacc969b7 build(deps): bump the github-actions group with 2 updates (#5457)
    7210d247c Roll external/googletest/ 518387203..5b7fd63d6 (1 commit) (#5454)
    a08f648c8 Remove references to __FILE__ (#5462)
    c87755bb9 spirv-val: Add WorkgroupMemoryExplicitLayoutKHR check for Block (#5461)
    4f014aff9 Roll external/re2/ 601d9ea3e..a0b3bc60c (1 commit) (#5453)
    33bac5144 Roll external/googletest/ 116b7e552..518387203 (1 commit) (#5450)
    01e851be9 Roll external/re2/ 928a015e6..601d9ea3e (1 commit) (#5448)
    1928c76cd Roll external/googletest/ 2dd1c1319..829c19901 (1 commit) (#5444)
    73876defc opt: support 64-bit OpAccessChain index in FixStorageClass (#5446)
    5084f58e5 build(deps): bump the github-actions group with 4 updates (#5445)
    a9c61d137 update_build_version.py produce deterministic header. (#5426)
    5bb595091 Add ComputeDerivativeGroup*NV capabilities to trim capabilities pass. (#5430)
    3985f0da0 Roll external/spirv-headers/ e867c0663..4183b260f (1 commit) (#5439)
    661f429b1 Roll external/re2/ b673de358..ece4cecab (2 commits) (#5437)
    360d469b9 Prepare release v2023.5.rc1 (#5423)
    74005dfa6 Roll external/re2/ 35bb195de..b673de358 (2 commits) (#5433)
    933db564c roll deps (#5432)
    ce995b319 Hash pin workflows and config dependabot (#5412)
    df2f2a031 build(deps): bump get-func-name from 2.0.0 to 2.0.2 in /tools/sva (#5418)
    866e60def Roll external/spirv-headers/ 79743b899..e867c0663 (2 commits) (#5427)
    023a8c79e opt: add Float64 capability to trim pass (#5428)
    4fab7435b Roll external/googletest/ e47544ad3..beb552fb4 (2 commits) (#5424)
    847715d6c instrument: Ensure linking works even of nothing is changed (#5419)
    dc9900967 Update BUILD.gn to include header for new pass (#5421)
    1bc0e6f59 Add a new legalization pass to dedupe invocation interlock instructions (#5409)
    48c97c131 roll deps (#5415)
    27673a054 Remove reviewer from autoroller (#5414)
    ee7598d49 instrument: Use Import linkage for instrumentation functions (#5355)
    a40483d31 roll deps (#5408)
    a996591b1 Update SPIRV-Headers, add cache control operand kinds (#5406)
    fc54e178e Change autoroll pr review id (#5404)
    2d6996f73 Check for git repository before git commands (#5403)
    361638cfd Make sure that fragment shader interlock instructions are not removed by DCE (#5400)
    5e6054c1c Roll external/re2/ e0077036c..a807e8a3a (6 commits) (#5401)
    47b63a4d7 val: re-add ImageMSArray validation (#5394)
    d660bb55b Add SPV_KHR_physical_storage_buffer to allowlists (#5402)
    440f018cc Fix `AddMemberDecoration` variable names. (#5399)
    4e0b94ed7 opt: add ImageMSArray capability to trim pass. (#5395)
    d474a0708 Add SPV_EXT_fragment_shader_interlock to allow lists (#5393)
    1f07f483e opt: add raytracing/rayquery to trim pass (#5397)
    158bc7bd6 Roll external/re2/ 523f9b097..e0077036c (2 commits) (#5391)
    1121c2319 opt: add Int64 capability to trim pass (#5398)
    3cc7e1c4c NFC: rename tests using capability as prefix (#5396)
    4c16c35b1 opt: add FragmentShader*InterlockEXT to capability trim pass (#5390)
    9b923f7cc QNX has support for ANSI ESC codes, default terminal is QANSI. (#5387)
    51367c40f Enable OpenSSF Scorecard and Badge (#5377)
    d09c753a4 Roll external/re2/ 73031bbc0..523f9b097 (1 commit) (#5389)
    b6893ccdf Roll external/googletest/ 460ae9826..8a6feabf0 (1 commit) (#5388)
    1b3c4cb68 roll deps (#5386)
    abd548b81 roll deps (#5384)
    2601f644e Roll external/googletest/ 9fce54804..61332bd7e (2 commits) (#5383)
    714966003 opt: Add SwitchDescriptorSetPass (#5375)
    6520d83ef linker: Add --use-highest-version option (#5376)
    bfc94f63a roll deps (#5382)
    b12fc2904 Roll external/googletest/ 7e33b6a1c..987e22561 (5 commits) (#5381)
    89ca3aa57 SPV_QCOM_image_processing support (#5223)
    c55888661 Fix failing action when PR is already open. (#5380)
    0f17d05c4 opt: add bitmask support for capability trimming (#5372)
    fddcc8ced Roll external/re2/ 9dc7ae7b5..6148386f0 (3 commits) (#5379)
    7ddc65c72 Support 2 Intel extensions (#5357)
    43b888649 roll deps (#5374)
    d6300ee92 Fix -Wunreachable-code-loop-increment warning (#5373)
    8714d7fad enable StorageUniform16 (#5371)
    8e3da01b4 Move token version/cap/ext checks from parsing to validation (#5370)
    4788ff157 opt: add StorageUniformBufferBlock16 to trim pass (#5367)
    ebda56e35 opt: add StoragePushConstant16 to trim pass (#5366)
    3af4244ae Roll external/googletest/ 46db91ef6..89b25572d (1 commit) (#5365)
    60e684fe7 opt: fix StorageInputOutput16 trimming. (#5359)
    13892fe86 Roll external/googletest/ 6f6ab4212..e7fd109b5 (2 commits) (#5356)
    727f4346d docs: update references to `main` branch (#5363)
    e553b884c Prepare release for v2023.4.rc2 (#5362)
    4a9881fe9 Use absolute path to depot_tools (#5360)
    09b76c23e Update SPIRV-Headers; test some coop matrix enums (#5361)
    1d14d84f2 opt: fix missing CreateTrimCapabilitiesPass definition (#5353)
    47fff21d5 instrument: Reduce number of inst_bindless_stream_write_6 calls (#5327)
    02cd71d41 roll deps (#5352)
    e68fe9be4 Add SPV_EXT_shader_atomic_float_add to allow lists (#5348)
    c6d0b0480 build: fix missing files in BUILD.gn (#5351)
    b5f600c08 Roll external/googletest/ 01e18376e..40412d851 (1 commit) (#5347)
    a0f1c8727 opt: Fix incorrect half float conversion (#5349)
    35d8b05de opt: add capability trimming pass (not default). (#5278)
    ec90d2872 roll deps (#5345)
    d52c39c37 Do not crash when folding 16-bit OpFDiv (#5338)
    17d9669d5 enumset: add iterator based constructor/insert (#5344)
    daad2295c Roll external/googletest/ cc366710b..d66ce5851 (2 commits) (#5337)
    45f7e55af Bump word-wrap from 1.2.3 to 1.2.4 in /tools/sva (#5343)
    bf03d4092 opt: change Get* functions to return const& (#5331)
    876ccc6cd Add /bigobj to test_opt for VS 2017 (#5336)
    c50bc49f5 Fix link flags for Clang-based MinGW cross compile (#5342)
    2813da268 kokoro: rename glslang (#5339)
    883417544 Set cmake_policy CMP0128 (#5341)
    6c7e1acc5 NFC: fix missing algorithm include in enumset file (#5334)
    61221e7d6 Add python3 requirement for the script (#5326)
    4b6bd5a66 Prepare release v2023.4 (#5330)
    9e0b780ff Create SECURITY.md (#5325)
    7dd5f95d2 [spirv-opt] Handle OpFunction in GetPtr (#5316)
    6add9ccf0 Add support for LiteralFloat type (#5323)
    85a448213 NFC: makes the FeatureManager immutable for users (#5329)
    29431859f NFC: replace EnumSet::ForEach with range-based-for (#5322)
    d6b9389f6 Roll external/spirv-headers/ d0006a393..f1ba373ef (2 commits) (#5320)
    5b4fb072e enumset: fix bug in the new iterator class (#5321)
    9ab811a12 NFC: fix missing comments on functions (#5318)
    9266197c3 instrument: Cast gl_VertexIndex and InstanceIndex to uint (#5319)
    ee50fa7d8 Roll external/googletest/ 4a1a299b2..cc366710b (1 commit) (#5317)
    3424b16c1 enumset: STL-ize container (#5311)
    7ff331af6 source: Give better message if using new Source Language (#5314)
    abcd228d9 Update README to say Android NDK r25c is required (#5312)
    0530a532f Validate GroupNonUniform instructions (#5296)
    4594ffce9 Roll external/re2/ a57a1d646..e66463312 (1 commit) (#5313)
    4be7d0e3c Use android ndk r25 (#5309)
    e751c7e7d Treat spir-v.xml as utf-8 (#5306)
    0f3bea06e NFC: rewrite EnumSet to handle larger enums. (#5289)
    870fd1e17 spirv-val: Label SPV_KHR_cooperative_matrix VUID (#5301)
    a1e8fff14 Roll external/re2/ 2d39b703d..1c1ffbe3c (1 commit) (#5304)
    58459c2b1 roll deps (#5300)
    d3b0a522c Roll external/googletest/ 687c58994..251e72039 (1 commit) (#5299)
    ea5af2fb5 roll deps (#5297)
    f83f50d23 Roll external/googletest/ ec4fed932..8e32de89c (2 commits) (#5294)
    7520bfa6b build: remove last references of c++11 (#5295)
    e090ce9c4 Update CMakeLists.txt (#5293)
    bfb40a240 fix ndk build standard to c++17 (#5290)
    310a67020 Validate layouts for PhysicalStorageBuffer pointers (#5291)
    c640b1934 Update CMakeLists.txt (#5288)
    cfb99efd7 Roll external/googletest/ af39146b4..ec4fed932 (1 commit) (#5287)
    04cdb2d34 SPV_KHR_cooperative_matrix (#5286)
    16098b3c1 Have effcee add abseil subdirectory (#5281)
    daee1e7d3 instrument: Combine descriptor length and init state checking (#5274)
    a68ef7b2c cmake: Remove unused SPIRV-Headers variables (#5284)
    b12c0fe6f Roll external/googletest/ fb11778f4..af39146b4 (1 commit) (#5285)
    54691dcd7 Migrate `exec_tools` back to `tools`. (#5280)
    a6b57f2f0 Roll external/googletest/ 9b12f749f..fb11778f4 (4 commits) (#5279)
    a63ac9f73 cmake: Use modern Python3 CMake support (#5277)
    951980e5a Enable vector constant folding (#4913) (#5272)
    a720a6926 Roll external/googletest/ 18fa6a4db..9b12f749f (1 commit) (#5276)
    6b9fc7933 Fold negation of integer vectors (#5269)
    285f6cefa roll deps (#5273)
    d33bea584 instrument: Fix buffer address length calculations (#5257)
    b4f352e54 Expose preserve_interface in Optimizer::Register*Passes. (#5268)
    40dde04ca Roll external/googletest/ 65cfeca1a..e9078161e (1 commit) (#5267)
    6d0e3cf6a Roll external/googletest/ 334704df2..65cfeca1a (1 commit) (#5265)
    9c66587d1 spirv-diff: Update test expectations (#5264)
    ae1843b67 spirv-diff: Leave undefined ids unpaired. (#5262)
    93c13345e spirv-diff: Properly match SPV_KHR_ray_query types. (#5259)
    9da026922 roll deps (#5263)
    1d7dec3c5 Use windows 2019 to workaround bazel issue (#5261)
    59b4febd8 Allow OpTypeBool in UniformConstant (#5237)
    5ed21eb1e Add folding rule for OpTranspose (#5241)
    ec244c859 Increase tested Android API level (#5253)
    c7e436921 roll deps (#5243)
    182fd9ebc Allow physical storage buffer pointer in IO (#5251)
    226c3bbe6 Fix broken link in README (#5250)
    9ed2ac257 Fix pairing of function parameters. (#5225)
    8841d560c Add c++ version to .bazelrc (#5247)
    cf62673e4 Error for invalid location type (#5249)
    673d8bfcb Checkout abseil in the smoketest (#5248)
    06bbd7f53 Update deps in sva (#5246)
    23cb9b96c spirv-val: Remove VUID from 1.3.251 spec (#5244)
    1021ec302 Add Abseil dep to the README (#5242)
    3e82fa067 Revert "Disable RE2 autoroll (#5234)" (#5239)
    e0936b646 Roll external/spirv-headers/ bdbfd019b..69155b22b (1 commit) (#5238)
    af27ece75 Check if const is zero before getting components. (#5217)
    235800182 Add Abseil as a dep and update RE2 (#5236)
    f29e11dcb diff: Don't give up entry point matching too early. (#5224)
    82b1a87b2 Add SPV_NV_bindless_texture to spirv optimizations (#5231)
    60c546f3f Roll external/googletest/ bc860af08..bb2941fcc (1 commit) (#5220)
    dcfea36ab Have the macos bazel build us git-sync-deps (#5235)
    44c9da6fe Remove const zero image operands (#5232)
    e357a36cc Disable RE2 autoroll (#5234)
    e7c6084fd Prepare release 2023.3 (#5222)
    17a26b45f Improve an error message in the assembler (#5219)
    7c39951f6 spirv-val: Label Interface Location/Component VUIDs (#5221)


Bug: b/123642959
Change-Id: I4e497c6d70e17beb10e859266dbfa905d1f99136
Reviewed-on: https://swiftshader-review.googlesource.com/c/SwiftShader/+/73373
Reviewed-by: Ben Clayton <bclayton@google.com>
Reviewed-by: Antonio Maiorano <amaiorano@google.com>
Tested-by: Romaric Jodin <rjodin@chromium.org>
Presubmit-Ready: Romaric Jodin <rjodin@chromium.org>
Tested-by: Ben Clayton <bclayton@google.com>
tree: 2adc60f4dfc0f2d7186d2dd84c849225e59ad5b9
  1. .vscode/
  2. build/
  3. build_overrides/
  4. docs/
  5. include/
  6. infra/
  7. src/
  8. tests/
  9. third_party/
  10. tools/
  11. .clang-format
  12. .dir-locals.el
  13. .gitignore
  14. .gitmodules
  15. Android.bp
  16. AUTHORS.txt
  17. BUILD.gn
  18. CMakeLists.txt
  19. CMakeSettings.json
  20. codereview.settings
  24. LICENSE.txt
  25. OWNERS
  26. README.md




SwiftShader[^1] is a high-performance CPU-based implementation[^2] of the Vulkan[^3] 1.3 graphics API. Its goal is to provide hardware independence for advanced 3D graphics.

NOTE: The ANGLE project can be used to achieve a layered implementation[^4] of OpenGL ES 3.1 (aka. “SwANGLE”).


SwiftShader libraries can be built for Windows, Linux, and macOS.
Android and Chrome (OS) build environments are also supported.

  • CMake
    Install CMake for Linux, macOS, or Windows and use either the GUI or run the following terminal commands:

    cd build
    cmake ..
    cmake --build . --parallel

    Tip: Set the CMAKE_BUILD_PARALLEL_LEVEL environment variable to control the level of parallelism.

  • Visual Studio
    To build the Vulkan ICD library, use Visual Studio 2019 to open the project folder and wait for it to run CMake. Open the CMake Targets View in the Solution Explorer and select the vk_swiftshader project to build it.


The SwiftShader libraries act as drop-in replacements for graphics drivers.

On Windows, most applications can be made to use SwiftShader's DLLs by placing them in the same folder as the executable. On Linux, the LD_LIBRARY_PATH environment variable or -rpath linker option can be used to direct applications to search for shared libraries in the indicated directory first.

In general, Vulkan applications look for a shared library named vulkan-1.dll on Windows (vulkan-1.so on Linux). This ‘loader’ library then redirects API calls to the actual Installable Client Driver (ICD). SwiftShader's ICD is named libvk_swiftshader.dll, but it can be renamed to vulkan-1.dll to be loaded directly by the application. Alternatively, you can set the VK_ICD_FILENAMES environment variable to the path to vk_swiftshader_icd.json file that is generated under the build directory (e.g. .\SwiftShader\build\Windows\vk_swiftshader_icd.json). To learn more about how Vulkan loading works, read the official documentation here.


See CONTRIBUTING.txt for important contributing requirements.

The canonical repository for SwiftShader is hosted at: https://swiftshader.googlesource.com/SwiftShader.

All changes must be reviewed and approved in the Gerrit review tool at: https://swiftshader-review.googlesource.com. You must sign in to this site with a Google Account before changes can be uploaded.

Next, authenticate your account here: https://swiftshader.googlesource.com/new-password (use the same e-mail address as the one configured as the Git commit author).

All changes require a Change-ID tag in the commit message. A commit hook may be used to add this tag automatically, and can be found at: https://gerrit-review.googlesource.com/tools/hooks/commit-msg. You can execute git clone https://swiftshader.googlesource.com/SwiftShader and manually place the commit hook in SwiftShader/.git/hooks/, or to clone the repository and install the commit hook in one go:

git clone https://swiftshader.googlesource.com/SwiftShader && (cd SwiftShader && git submodule update --init --recursive third_party/git-hooks && ./third_party/git-hooks/install_hooks.sh)

On Windows, this command line requires using the Git Bash Shell.

Changes are uploaded to Gerrit by executing:

git push origin HEAD:refs/for/master

When ready, add a project owner as a reviewer on your change.

Some tests will automatically be run against the change. Notably, presubmit.sh verifies the change has been formatted using clang-format 11.0.1. Most IDEs come with clang-format support, but may require upgrading/downgrading to the clang-format version 11.0.0 release version (notably Chromium's buildtools has a clang-format binary which can be an in-between revision which produces different formatting results).


SwiftShader's Vulkan implementation can be tested using the dEQP test suite.

See docs/dEQP.md for details.

Third-Party Dependencies

The third_party directory contains projects which originated outside of SwiftShader:

subzero contains a fork of the Subzero project. It originates from Google Chrome‘s (Portable) Native Client project. The fork was made using git-subtree to include all of Subzero’s history.

llvm-subzero contains a minimized set of LLVM dependencies of the Subzero project.

PowerVR_SDK contains a subset of the PowerVR Graphics Native SDK for running several sample applications.

googletest contains the Google Test project, as a Git submodule. It is used for running unit tests for Chromium, and Reactor unit tests. Run git submodule update --init to obtain/update the code. Any contributions should be made upstream.


See docs/Index.md.


Public mailing list: swiftshader@googlegroups.com

General bug tracker: https://g.co/swiftshaderbugs
Chrome specific bugs: https://bugs.chromium.org/p/swiftshader


The SwiftShader project is licensed under the Apache License Version 2.0. You can find a copy of it in LICENSE.txt.

Files in the third_party folder are subject to their respective license.

Authors and Contributors

The legal authors for copyright purposes are listed in AUTHORS.txt.

CONTRIBUTORS.txt contains a list of names of individuals who have contributed to SwiftShader. If you‘re not on the list, but you’ve signed the Google CLA and have contributed more than a formatting change, feel free to request to be added.

Notes and Disclaimers

[^1]: This is not an official Google product.
[^2]: Vulkan 1.3 conformance: https://www.khronos.org/conformance/adopters/conformant-products#submission_717
[^3]: Trademarks are the property of their respective owners.
[^4]: OpenGL ES 3.1 conformance: https://www.khronos.org/conformance/adopters/conformant-products/opengles#submission_906