[fuzz] Remove CMake fuzzing build infrastructure Fuzzing is now only supported for GN builds, so removing all CMake fuzzing targets, options, fuzzer-only third-party CMake rules, and associated tooling/docs: - Removes DAWN_BUILD_FUZZERS, TINT_BUILD_FUZZERS, TINT_BUILD_FUZZTEST, TINT_BUILD_FUZZER_VULKAN_SUPPORT, TINT_BUILD_MESA, TINT_LIB_FUZZING_ENGINE_LINK_OPTIONS, and fuzzer-only third-party directory variables (DAWN_LPM_DIR, DAWN_FUZZTEST_DIR, DAWN_RE2_DIR, DAWN_VULKAN_LOADER_DIR) from CMakeLists.txt and third_party/CMakeLists.txt. - Deletes src/dawn/fuzzers/CMakeLists.txt and custom third-party CMake rules for FuzzTest, libprotobuf-mutator, and Mesa. - Removes fuzzer target-kind handling, fuzzer-only external deps, and dual-pass TINT_TARGET_SUFFIX (_sanitize_fuzzer) inclusion from src/tint/CMakeLists.txt. - Updates tools/src/cmd/gen/build/BUILD.cmake.tmpl to stop emitting fuzz, fuzz_cmd, cmd/fuzz (including ir_fuzz_as/ir_fuzz_dis), and utils/protos/ir_fuzz targets or fuzzer-conditioned blocks, and regenerate src/tint/**/BUILD.cmake. - Removes libprotobuf-mutator and vulkan-loader from tools/fetch_dawn_dependencies.py. - Updates tools/setup-build to reject CMake + fuzzing with a clear error. - Updates docs/tint/fuzzers.md, docs/building.md, third_party/mesa/mesa_action.py, and agents/skills/roll-mesa/SKILL.md. Fixed: 590208406 Change-Id: I62d7a73d278e31b65caccb8344011ae3b2bc7245 Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/363076 Auto-Submit: Ryan Harrison <rharrison@chromium.org> Commit-Queue: Ryan Harrison <rharrison@chromium.org> Commit-Queue: James Price <jrprice@google.com> Commit-Queue: dan sinclair <dsinclair@chromium.org> Reviewed-by: James Price <jrprice@google.com> Reviewed-by: dan sinclair <dsinclair@chromium.org>
diff --git a/CMakeLists.txt b/CMakeLists.txt index a670b4b..1037d91 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt
@@ -172,10 +172,9 @@ option(DAWN_ENABLE_SWIFTSHADER "Enables building Swiftshader as part of the build and Vulkan adapter discovery" OFF) option(DAWN_BUILD_BENCHMARKS "Build Dawn benchmarks" OFF) option(DAWN_BUILD_PROTOBUF "Build the protobuf dependencies" ON) -option(DAWN_BUILD_FUZZERS "Build Dawn fuzzers" OFF) set(ENABLE_ERROR_INJECTION_DEFAULT OFF) -if (IS_DEBUG_BUILD OR DAWN_BUILD_FUZZERS) +if (IS_DEBUG_BUILD) set(ENABLE_ERROR_INJECTION_DEFAULT ON) endif() option(DAWN_ENABLE_ERROR_INJECTION "Enable error injection for faking failures to native API calls" ${ENABLE_ERROR_INJECTION_DEFAULT}) @@ -196,9 +195,6 @@ set_if_not_defined(DAWN_KHRONOS_DIR "${DAWN_THIRD_PARTY_DIR}/khronos" "Directory in which to find Khronos GL headers") set_if_not_defined(DAWN_SWIFTSHADER_DIR "${DAWN_THIRD_PARTY_DIR}/swiftshader" "Directory in which to find swiftshader") set_if_not_defined(DAWN_PROTOBUF_DIR "${DAWN_THIRD_PARTY_DIR}/protobuf" "Directory in which to find protobuf") -set_if_not_defined(DAWN_LPM_DIR "${DAWN_THIRD_PARTY_DIR}/libprotobuf-mutator/src" "Directory in which to find libprotobuf") -set_if_not_defined(DAWN_FUZZTEST_DIR "${DAWN_THIRD_PARTY_DIR}/fuzztest/src" "Directory in which to find fuzztest") -set_if_not_defined(DAWN_RE2_DIR "${DAWN_THIRD_PARTY_DIR}/re2/src" "Directory in which to find re2") set_if_not_defined(DAWN_EMDAWNWEBGPU_DIR "${DAWN_THIRD_PARTY_DIR}/emdawnwebgpu" "Directory in which to find Dawn specific Emscripten bindings") set_if_not_defined(DAWN_GOOGLETEST_DIR "${DAWN_THIRD_PARTY_DIR}/googletest/src" "Directory in which to find googletest") set_if_not_defined(DAWN_EGL_REGISTRY_DIR "${DAWN_THIRD_PARTY_DIR}/EGL-Registry/src" "Directory in which to find EGL-Registry") @@ -207,7 +203,6 @@ set_if_not_defined(DAWN_SPIRV_HEADERS_DIR "${DAWN_THIRD_PARTY_DIR}/spirv-headers/src" "Directory in which to find SPIRV-Headers") set_if_not_defined(DAWN_GLSLANG_DIR "${DAWN_THIRD_PARTY_DIR}/glslang/src" "Directory in which to find GLSLang") set_if_not_defined(DAWN_VULKAN_HEADERS_DIR "${DAWN_THIRD_PARTY_DIR}/vulkan-headers/src" "Directory in which to find Vulkan-Headers") -set_if_not_defined(DAWN_VULKAN_LOADER_DIR "${DAWN_THIRD_PARTY_DIR}/vulkan-loader/src" "Directory in which to find Vulkan-Loader") set_if_not_defined(DAWN_VULKAN_UTILITY_LIBRARIES_DIR "${DAWN_THIRD_PARTY_DIR}/vulkan-utility-libraries/src" "Directory in which to find Vulkan-Utility-Libraries") set_if_not_defined(DAWN_WEBGPU_HEADERS_DIR "${DAWN_THIRD_PARTY_DIR}/webgpu-headers/src" "Directory in which to find webgpu headers") set_if_not_defined(DAWN_AGILITY_SDK_DIR "${DAWN_THIRD_PARTY_DIR}/agility-sdk" "Directory in which to find the D3D12 Agility SDK") @@ -260,21 +255,9 @@ option(TINT_BUILD_NULL_WRITER "Build the NULL output writer" ${DAWN_ENABLE_NULL}) option(TINT_BUILD_IR_BINARY "Build IR binary format support" ${DAWN_BUILD_PROTOBUF}) -option(TINT_BUILD_FUZZERS "Build fuzzers" OFF) -option(TINT_BUILD_FUZZTEST "Build prototype FuzzTest fuzzers" OFF) -option(TINT_BUILD_FUZZER_VULKAN_SUPPORT "Build fuzzing Vulkan drivers" OFF) option(TINT_BUILD_BENCHMARKS "Build Tint benchmarks" OFF) option(TINT_BUILD_TESTS "Build tests" ON) option(TINT_BUILD_AS_OTHER_OS "Override OS detection to force building of *_other.cc files" OFF) -option(TINT_BUILD_MESA "Build Mesa" OFF) - -if (TINT_BUILD_MESA AND NOT CMAKE_SYSTEM_NAME STREQUAL "Linux") - message(FATAL_ERROR "Building Mesa is only supported on Linux") -endif() - -if (TINT_BUILD_MESA AND DAWN_ENABLE_MSAN) - message(FATAL_ERROR "Building Mesa with MSAN is not supported, due to pre-built dependencies not being instrumented for MSAN") -endif() if (EMSCRIPTEN) # Skip tint tests in emscripten build @@ -355,9 +338,6 @@ message(STATUS "Tint build command line executable tools: ${TINT_BUILD_CMD_TOOLS}") message(STATUS "Tint install: ${TINT_ENABLE_INSTALL}") message(STATUS "Tint build IR binary: ${TINT_BUILD_IR_BINARY}") -message(STATUS "Tint build fuzzers: ${TINT_BUILD_FUZZERS}") -message(STATUS "Tint build FuzzTest fuzzers: ${TINT_BUILD_FUZZTEST}") -message(STATUS "Tint build fuzzing vulkan drivers: ${TINT_BUILD_FUZZER_VULKAN_SUPPORT}") message(STATUS "Tint build benchmarks: ${TINT_BUILD_BENCHMARKS}") message(STATUS "Tint build tests: ${TINT_BUILD_TESTS}") message(STATUS "Tint enable IR dumping: ${TINT_ENABLE_IR_DUMPING}") @@ -365,7 +345,6 @@ message(STATUS "Tint enable break in debugger: ${TINT_ENABLE_BREAK_IN_DEBUGGER}") message(STATUS "Tint build checking [chromium-style]: ${TINT_CHECK_CHROMIUM_STYLE}") message(STATUS "Tint randomize hashes: ${TINT_RANDOMIZE_HASHES}") -message(STATUS "Tint build Mesa: ${TINT_BUILD_MESA}") message(STATUS "") message(STATUS "Dawn third_party dir: ${DAWN_THIRD_PARTY_DIR}") @@ -375,7 +354,6 @@ message(STATUS "Dawn Khronos dir: ${DAWN_KHRONOS_DIR}") message(STATUS "Dawn Swiftshader dir: ${DAWN_SWIFTSHADER_DIR}") message(STATUS "Dawn Protobuf dir: ${DAWN_PROTOBUF_DIR}") -message(STATUS "Dawn LPM dir: ${DAWN_LPM_DIR}") message(STATUS "Dawn Emdawnwebgpu dir: ${DAWN_EMDAWNWEBGPU_DIR}") message(STATUS "Dawn Spir-Tools dir: ${DAWN_SPIRV_TOOLS_DIR}") message(STATUS "Dawn Spirv-Headers dir: ${DAWN_SPIRV_HEADERS_DIR}") @@ -390,18 +368,6 @@ message(STATUS "Go exe: ${GO_EXECUTABLE}") message(STATUS "") -if (TINT_BUILD_FUZZER_VULKAN_SUPPORT AND NOT TINT_BUILD_FUZZERS) - message(FATAL_ERROR "Cannot enable TINT_BUILD_FUZZER_VULKAN_SUPPORT without enabling TINT_BUILD_FUZZERS") -endif() - -if (TINT_BUILD_FUZZTEST AND NOT TINT_BUILD_FUZZERS) - message(FATAL_ERROR "Cannot enable TINT_BUILD_FUZZTEST without enabling TINT_BUILD_FUZZERS") -endif() - -if (TINT_BUILD_FUZZTEST AND NOT DAWN_BUILD_PROTOBUF) - message(FATAL_ERROR "Cannot enable TINT_BUILD_FUZZTEST without enabling DAWN_BUILD_PROTOBUF") -endif() - # Much of the backend code is shared among desktop OpenGL and OpenGL ES if (${DAWN_ENABLE_DESKTOP_GL} OR ${DAWN_ENABLE_OPENGLES}) set(DAWN_ENABLE_OPENGL ON) @@ -441,10 +407,6 @@ include(DawnInitializeBuildType) include(DawnLibrary) -if (NOT ${TINT_LIB_FUZZING_ENGINE_LINK_OPTIONS} STREQUAL "") - message(STATUS "Using provided LIB_FUZZING_ENGINE options: ${TINT_LIB_FUZZING_ENGINE_LINK_OPTIONS}") -endif() - find_package(Python3 REQUIRED) message(STATUS "Dawn: using python at ${Python3_EXECUTABLE}") @@ -499,8 +461,6 @@ # Tint ################################################################################ -set(TINT_LIB_FUZZING_ENGINE_LINK_OPTIONS "" CACHE STRING "Used by OSS-Fuzz to control, via link options, which fuzzing engine should be used") - set(TINT_ROOT_SOURCE_DIR ${PROJECT_SOURCE_DIR}) set(TINT_SPIRV_HEADERS_DIR ${DAWN_SPIRV_HEADERS_DIR}) set(TINT_SPIRV_TOOLS_DIR ${DAWN_SPIRV_TOOLS_DIR}) @@ -527,7 +487,6 @@ # headers will be exported upwards. add_subdirectory(src/emdawnwebgpu) add_subdirectory(src/dawn) - add_subdirectory(src/dawn/fuzzers) endif() ################################################################################
diff --git a/agents/skills/roll-mesa/SKILL.md b/agents/skills/roll-mesa/SKILL.md index d827af8..3f13e96 100644 --- a/agents/skills/roll-mesa/SKILL.md +++ b/agents/skills/roll-mesa/SKILL.md
@@ -1,8 +1,8 @@ --- name: roll-mesa description: >- - Roll the third_party/mesa/src dependency in Dawn and update the custom GN and - CMake Mesa Lavapipe build rules in third_party/mesa/. Use this skill when + Roll the third_party/mesa/src dependency in Dawn and update the custom GN + Mesa Lavapipe build rules in third_party/mesa/. Use this skill when asked to roll, update, or bump the Mesa dependency or fix Mesa build issues after a roll. --- @@ -10,7 +10,7 @@ # Roll Mesa Dependency Use this skill to roll `third_party/mesa/src` in Dawn and update Dawn's custom -GN and CMake build rules in `third_party/mesa/`. +GN build rules in `third_party/mesa/`. ## Workflow @@ -106,36 +106,3 @@ ```bash ./<gn_build_dir>/tint_wgsl_mesa_fuzzer --vk-icd=./<gn_build_dir>/lvp_icd.json --verbose test/tint/out_of_order_decls/alias/struct.wgsl ``` - -### 6. Build and Fix the CMake Mesa Build - -1. **Sync any GN rule changes to CMake**: If you modified - `third_party/mesa/mesa_sources.gni` or `third_party/mesa/BUILD.gn` in Step 5, - apply the corresponding updates to `third_party/mesa/mesa_sources.cmake` and - `third_party/mesa/CMakeLists.txt`. -2. **Check the CMake build directory (`out/cmake` by default)**: - - Check `out/cmake/CMakeCache.txt` to verify that `TINT_BUILD_MESA:BOOL=ON` - and `TINT_BUILD_FUZZER_VULKAN_SUPPORT:BOOL=ON` (along with - `TINT_BUILD_FUZZERS:BOOL=ON`) are enabled. - - If `out/cmake` does not exist or those options are not enabled, **prompt - the user** to ask whether to enable them in `out/cmake` (via - `cmake -B out/cmake -DTINT_BUILD_MESA=ON -DTINT_BUILD_FUZZER_VULKAN_SUPPORT=ON -DTINT_BUILD_FUZZERS=ON`) - or use a different CMake build directory. -3. **Run the CMake build**: - ```bash - cmake --build <cmake_build_dir> --target mesa tint_wgsl_mesa_fuzzer tint_ir_mesa_fuzzer - ``` -4. **Analyze CMake build results**: - - If the CMake build fails, determine whether the failure can be mitigated - with changes to `third_party/mesa/mesa_sources.cmake` or - `third_party/mesa/CMakeLists.txt`. - - **STOP CONDITION**: Just as in the GN step, if the CMake build failure - indicates that another dependency (`llvm-dev`, `zstd`, etc.) requires an - update, **inform the user with the details and do not proceed**. - - Re-run `cmake --build` until `mesa`, `tint_wgsl_mesa_fuzzer`, and - `tint_ir_mesa_fuzzer` build cleanly with zero undefined symbols. -5. **Test the CMake build**: Run a smoke test with the CMake - `tint_wgsl_mesa_fuzzer` binary: - ```bash - ./<cmake_build_dir>/tint_wgsl_mesa_fuzzer --vk-icd=./<cmake_build_dir>/lvp_icd.json --verbose test/tint/out_of_order_decls/alias/struct.wgsl - ```
diff --git a/docs/building.md b/docs/building.md index e04121b..b47e36e 100644 --- a/docs/building.md +++ b/docs/building.md
@@ -321,10 +321,9 @@ The workaround for 16.X has been to install a fully featured version llvm onto your system, for example via Homebrew, `brew install llvm`, (you might have to -use `llvm@XX` where `XX` is the major version of llvm in the XCode SDK). And -then using environment variables, i.e. `CC=<path to Homebrew clang> cmake --GNinja ../..`, to set up the build including the full llvm toolchain to get the -missing libraries onto the search path. This will actually create a hybrid +use `llvm@XX` where `XX` is the major version of llvm in the XCode SDK), and +configure the build to use the Homebrew llvm toolchain to get the missing +libraries onto the search path. This will actually create a hybrid toolchain using some elements of the XCode SDK and the llvm SDK, because there is some Apple specific framework stuff that isn't in mainstream llvm.
diff --git a/docs/tint/fuzzers.md b/docs/tint/fuzzers.md index 09a33dd..d3cddee 100644 --- a/docs/tint/fuzzers.md +++ b/docs/tint/fuzzers.md
@@ -25,19 +25,16 @@ ## Building -The `tint_wgsl_fuzzer` target can be built with either CMake or GN: +Tint fuzzers are built with GN only (CMake and Bazel fuzzer builds are not +supported). -- CMake: Define `TINT_BUILD_FUZZERS=1` (pass `-DTINT_BUILD_FUZZERS=1` - to `cmake`) -- GN: Define `use_libfuzzer = true` (or `use_centipede = true` to use - the [Centipede](https://github.com/google/fuzztest/tree/main/centipede) - fuzzing engine) in `args.gn`. +To build `tint_wgsl_fuzzer`, define `use_libfuzzer = true` (or +`use_centipede = true` to use the +[Centipede](https://github.com/google/fuzztest/tree/main/centipede) fuzzing +engine) in `args.gn`. -Building `tint_ir_fuzzer` requires additional flags to be set: - -- CMake: Define `TINT_BUILD_IR_BINARY=1` (pass - `-DTINT_BUILD_IR_BINARY=1` to `cmake`) -- GN: Define `tint_build_ir_binary = true` in `args.gn`. +Building `tint_ir_fuzzer` additionally requires defining +`tint_build_ir_binary = true` in `args.gn`. ### Building Mesa fuzzers @@ -53,12 +50,12 @@ x64 (`linux-amd64`), because the custom Mesa build rules and prebuilt dependencies (`third_party/llvm-dev` and `third_party/zstd`) only target Linux x86-64. -- **Vulkan only:** Dawn's custom GN and CMake build rules only build +- **Vulkan only:** Dawn's custom GN build rules only build Mesa's software Vulkan driver (Lavapipe). OpenGL and other Mesa drivers or APIs are not supported. - **No MSan:** Building Mesa with MemorySanitizer (`is_msan = true` in - GN or `DAWN_ENABLE_MSAN=1` in CMake) is not supported, as the - prebuilt dependencies are not instrumented for MSan. + GN) is not supported, as the prebuilt dependencies are not instrumented + for MSan. 1. Add `"checkout_mesa": True` to `custom_vars` in your `.gclient` file (this is disabled by default, including in @@ -80,19 +77,14 @@ gclient sync ``` -2. Enable the Mesa and Vulkan fuzzer build flags in addition to the - base fuzzer flags above (plus the IR binary flag if building +2. Enable the Mesa and Vulkan fuzzer build flags in `args.gn` in addition to the + base fuzzer flags above (plus `tint_build_ir_binary = true` if building `tint_ir_mesa_fuzzer`): - - CMake: Define `TINT_BUILD_MESA=1` and - `TINT_BUILD_FUZZER_VULKAN_SUPPORT=1` (pass - `-DTINT_BUILD_MESA=1 -DTINT_BUILD_FUZZER_VULKAN_SUPPORT=1` to - `cmake`; requires the Clang toolchain). - - GN: Define `tint_build_mesa = true` and - `tint_build_fuzzer_vulkan_support = true` in `args.gn` (in GN, - `tint_build_fuzzer_vulkan_support` defaults to `tint_build_mesa`, - but setting both explicitly is required by tools such as - `tools/run fuzz experiment`). + Define `tint_build_mesa = true` and `tint_build_fuzzer_vulkan_support = true` + in `args.gn` (`tint_build_fuzzer_vulkan_support` defaults to + `tint_build_mesa`, but setting both explicitly is required by tools such as + `tools/run fuzz experiment`). ### Building FuzzTest prototype fuzzers @@ -103,14 +95,11 @@ 1. Ensure dependencies are synced (for example via `gclient sync`). -2. Enable the FuzzTest prototype build flag in addition to the base fuzzer - flags above: +2. Enable the FuzzTest prototype build flag in `args.gn` in addition to the base + fuzzer flags above: - - CMake: Define `TINT_BUILD_FUZZTEST=1` alongside `TINT_BUILD_FUZZERS=1` - (pass `-DTINT_BUILD_FUZZERS=1 -DTINT_BUILD_FUZZTEST=1` to `cmake`; - requires the Clang toolchain). - - GN: Define `tint_build_fuzztest = true` alongside `use_libfuzzer = true` or - `use_centipede = true` in `args.gn`. + Define `tint_build_fuzztest = true` alongside `use_libfuzzer = true` or + `use_centipede = true` in `args.gn`. 3. Build and verify the prototype FuzzTest binary (`tint_stub_fuzztest`): @@ -174,10 +163,7 @@ See below for how to generate the corpus locally -### Fuzzing with Centipede (GN only) - -> **Note:** Centipede support is currently GN-only; building or running Tint -> fuzzers with Centipede in CMake is not implemented. +### Fuzzing with Centipede In standalone GN builds, Tint fuzzers can be built and run with [Centipede](https://github.com/google/fuzztest/tree/main/centipede) instead of
diff --git a/src/dawn/fuzzers/CMakeLists.txt b/src/dawn/fuzzers/CMakeLists.txt deleted file mode 100644 index f38247f..0000000 --- a/src/dawn/fuzzers/CMakeLists.txt +++ /dev/null
@@ -1,105 +0,0 @@ -# Copyright 2026 The Dawn & Tint Authors -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions are met: -# -# 1. Redistributions of source code must retain the above copyright notice, this -# list of conditions and the following disclaimer. -# -# 2. 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. -# -# 3. Neither the name of the copyright holder 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 HOLDER 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. - -if (NOT DAWN_BUILD_FUZZERS) - return() -endif() - -function(set_rtti target) - if (NOT DAWN_ENABLE_RTTI) - target_compile_options(${target} PRIVATE -fno-rtti) - endif() -endfunction() - -add_library(dawn_wire_server_fuzzer_common STATIC - DawnWireServerFuzzer.cpp - DawnWireServerFuzzer.h -) - -target_link_libraries(dawn_wire_server_fuzzer_common PRIVATE - dawn_common - dawn_native - dawn_wire - dawn_proc - dawn_internal_config -) -set_rtti(dawn_wire_server_fuzzer_common) - -add_executable(dawn_wire_server_and_frontend_fuzzer - DawnWireServerAndFrontendFuzzer.cpp -) - -target_link_libraries(dawn_wire_server_and_frontend_fuzzer PRIVATE - dawn_wire_server_fuzzer_common - dawn_common - dawn_native - dawn_internal_config -) -set_rtti(dawn_wire_server_and_frontend_fuzzer) - -if (CMAKE_CXX_COMPILER_ID MATCHES "Clang") - target_compile_options(dawn_wire_server_and_frontend_fuzzer PRIVATE "-fsanitize=fuzzer") - target_link_options(dawn_wire_server_and_frontend_fuzzer PRIVATE "-fsanitize=fuzzer") -endif() - -if (DAWN_ENABLE_VULKAN) - add_executable(dawn_wire_server_and_vulkan_backend_fuzzer - DawnWireServerAndVulkanBackendFuzzer.cpp - ) - - target_link_libraries(dawn_wire_server_and_vulkan_backend_fuzzer PRIVATE - dawn_wire_server_fuzzer_common - dawn_common - dawn_native - dawn_internal_config - ) - set_rtti(dawn_wire_server_and_vulkan_backend_fuzzer) - - if (CMAKE_CXX_COMPILER_ID MATCHES "Clang") - target_compile_options(dawn_wire_server_and_vulkan_backend_fuzzer PRIVATE "-fsanitize=fuzzer") - target_link_options(dawn_wire_server_and_vulkan_backend_fuzzer PRIVATE "-fsanitize=fuzzer") - endif() -endif() - -if (DAWN_ENABLE_D3D12) - add_executable(dawn_wire_server_and_d3d12_backend_fuzzer - DawnWireServerAndD3D12BackendFuzzer.cpp - ) - - target_link_libraries(dawn_wire_server_and_d3d12_backend_fuzzer PRIVATE - dawn_wire_server_fuzzer_common - dawn_common - dawn_native - dawn_internal_config - ) - set_rtti(dawn_wire_server_and_d3d12_backend_fuzzer) - - if (CMAKE_CXX_COMPILER_ID MATCHES "Clang") - target_compile_options(dawn_wire_server_and_d3d12_backend_fuzzer PRIVATE "-fsanitize=fuzzer") - target_link_options(dawn_wire_server_and_d3d12_backend_fuzzer PRIVATE "-fsanitize=fuzzer") - endif() -endif()
diff --git a/src/tint/CMakeLists.txt b/src/tint/CMakeLists.txt index c0c153a..e44652b 100644 --- a/src/tint/CMakeLists.txt +++ b/src/tint/CMakeLists.txt
@@ -74,14 +74,9 @@ target_compile_definitions(${TARGET} PUBLIC -DTINT_BUILD_WGSL_READER=$<BOOL:${TINT_BUILD_WGSL_READER}>) target_compile_definitions(${TARGET} PUBLIC -DTINT_BUILD_WGSL_WRITER=$<BOOL:${TINT_BUILD_WGSL_WRITER}>) target_compile_definitions(${TARGET} PUBLIC -DTINT_BUILD_NULL_WRITER=$<BOOL:${TINT_BUILD_NULL_WRITER}>) - target_compile_definitions(${TARGET} PUBLIC -DTINT_ENABLE_IR_DUMPING=$<BOOL:${TINT_ENABLE_IR_DUMPING}>) + target_compile_definitions(${TARGET} PUBLIC -DTINT_ENABLE_IR_DUMPING=$<BOOL:${TINT_ENABLE_IR_DUMPING}>) target_compile_definitions(${TARGET} PUBLIC -DTINT_ENABLE_IR_VALIDATION_ASSERTS=$<BOOL:${TINT_ENABLE_IR_VALIDATION_ASSERTS}>) - if(TINT_BUILD_FUZZERS) - target_compile_options(${TARGET} PRIVATE "-fsanitize=fuzzer") - target_compile_definitions(${TARGET} PUBLIC -DTINT_BUILD_FUZZER_VULKAN_SUPPORT=$<BOOL:${TINT_BUILD_FUZZER_VULKAN_SUPPORT}>) - endif() - common_compile_options(${TARGET}) endfunction() @@ -274,11 +269,6 @@ set_target_properties(${TARGET} PROPERTIES FOLDER "Benchmarks") endfunction() -function(tint_fuzz_compile_options TARGET) - tint_core_compile_options(${TARGET}) - set_target_properties(${TARGET} PROPERTIES FOLDER "Fuzzers") -endfunction() - function(tint_cmd_compile_options TARGET) tint_default_compile_options(${TARGET}) @@ -306,30 +296,6 @@ target_link_libraries(${TARGET} PRIVATE benchmark::benchmark) endfunction() -function(tint_fuzz_cmd_compile_options TARGET) - tint_fuzz_compile_options(${TARGET}) - - if(NOT "${TINT_LIB_FUZZING_ENGINE_LINK_OPTIONS}" STREQUAL "") - # This is set when the fuzzers are being built by OSS-Fuzz. In this case the - # variable provides the necessary linker flags, and OSS-Fuzz will take care - # of passing suitable compiler flags. - target_link_options(${TARGET} PUBLIC ${TINT_LIB_FUZZING_ENGINE_LINK_OPTIONS}) - else() - # When the fuzzers are being built outside of OSS-Fuzz, specific libFuzzer - # arguments to enable fuzzing are used. - target_link_options(${TARGET} PUBLIC -fsanitize=fuzzer -fsanitize-coverage=trace-cmp) - endif() - - # Link the version of tint_api with -sanitize=fuzzer enabled - target_link_libraries(${TARGET} PRIVATE "tint_api_sanitize_fuzzer") -endfunction() - -# TODO(crbug.com/tint/2223): Remove this when fuzzers are fully migrated to gen build -function(tint_fuzzer_compile_options TARGET) - tint_fuzz_cmd_compile_options(${TARGET}) - target_link_libraries(${TARGET} PRIVATE "tint_api_sanitize_fuzzer") -endfunction() - if(TINT_ENABLE_BREAK_IN_DEBUGGER) set_source_files_properties(utils/ice/debugger.cc PROPERTIES COMPILE_DEFINITIONS "TINT_ENABLE_BREAK_IN_DEBUGGER=1") @@ -362,11 +328,8 @@ # linking against google-test. # 'bench' - Translates to a CMake object library, configured for compiling and # linking against google-benchmark. -# 'fuzz' - Translates to a CMake object library, configured for compiling and -# linking against libfuzzer. # 'test_cmd' - Translates to a CMake executable target linked against google-test. # 'bench_cmd' - Translates to a CMake executable target linked against google-benchmark. -# 'fuzz_cmd' - Translates to a CMake executable target linked against libfuzz. # See also: docs/tint/gen.md ################################################################################ @@ -394,10 +357,6 @@ if(TINT_BUILD_BENCHMARKS) set(IS_ENABLED TRUE PARENT_SCOPE) endif() - elseif((${KIND} STREQUAL fuzz) OR (${KIND} STREQUAL fuzz_cmd)) - if(TINT_BUILD_FUZZERS) - set(IS_ENABLED TRUE PARENT_SCOPE) - endif() else() message(FATAL_ERROR "unhandled target kind ${KIND}") endif() @@ -413,7 +372,6 @@ # KIND - The target kind # SOURCES - a list of source files, relative to this directory function(tint_add_target TARGET KIND) - set(TARGET "${TARGET}${TINT_TARGET_SUFFIX}") # Apply suffix set(SOURCES ${ARGN}) tint_check_target_is_enabled(IS_ENABLED ${KIND}) @@ -441,18 +399,12 @@ elseif(${KIND} STREQUAL bench_cmd) add_executable(${TARGET}) tint_bench_cmd_compile_options(${TARGET}) - elseif(${KIND} STREQUAL fuzz_cmd) - add_executable(${TARGET}) - tint_fuzz_cmd_compile_options(${TARGET}) elseif(${KIND} STREQUAL test) add_library(${TARGET} OBJECT EXCLUDE_FROM_ALL) tint_test_compile_options(${TARGET}) elseif(${KIND} STREQUAL bench) add_library(${TARGET} OBJECT EXCLUDE_FROM_ALL) tint_bench_compile_options(${TARGET}) - elseif(${KIND} STREQUAL fuzz) - add_library(${TARGET} OBJECT EXCLUDE_FROM_ALL) - tint_fuzz_compile_options(${TARGET}) else() message(FATAL_ERROR "unhandled target kind ${KIND}") endif() @@ -470,7 +422,6 @@ # KIND - The target kind # SOURCES - a list of source files, relative to this directory function(tint_target_add_sources TARGET KIND) - set(TARGET "${TARGET}${TINT_TARGET_SUFFIX}") # Apply suffix set(SOURCES ${ARGN}) tint_check_target_is_enabled(IS_ENABLED ${KIND}) @@ -490,7 +441,6 @@ # KIND - The target kind # DEPENDENCIES - a list of target names function(tint_target_add_dependencies TARGET KIND) - set(TARGET "${TARGET}${TINT_TARGET_SUFFIX}") # Apply suffix set(DEPENDENCIES ${ARGN}) tint_check_target_is_enabled(IS_ENABLED ${KIND}) @@ -498,14 +448,8 @@ return() # Target is disabled via build flags endif() - # Apply target suffix - set(SUFFIXED_DEPENDENCIES "") - foreach(DEPENDENCY ${DEPENDENCIES}) - list(APPEND SUFFIXED_DEPENDENCIES "${DEPENDENCY}${TINT_TARGET_SUFFIX}") - endforeach() - # Register the dependencies - target_link_libraries(${TARGET} PRIVATE ${SUFFIXED_DEPENDENCIES}) + target_link_libraries(${TARGET} PRIVATE ${DEPENDENCIES}) endfunction() # tint_target_add_external_dependencies(TARGET KIND DEPENDENCIES...) @@ -519,7 +463,6 @@ # # See src/tint/externals.json for the list of external dependencies. function(tint_target_add_external_dependencies TARGET KIND) - set(TARGET "${TARGET}${TINT_TARGET_SUFFIX}") # Apply suffix set(DEPENDENCIES ${ARGN}) tint_check_target_is_enabled(IS_ENABLED ${KIND}) @@ -546,43 +489,6 @@ target_link_libraries(${TARGET} PRIVATE ${CMAKE_DL_LIBS}) elseif(${DEPENDENCY} STREQUAL "dxc-include") target_include_directories(${TARGET} PRIVATE "${DAWN_THIRD_PARTY_DIR}/directx-shader-compiler/src/include") - elseif(${DEPENDENCY} STREQUAL "dxcompiler-for-fuzzer") - if(TINT_BUILD_FUZZERS AND DAWN_USE_BUILT_DXC) # TODO: and target arch is not x86 - target_link_libraries(${TARGET} PRIVATE dxcompiler) - endif() - elseif(${DEPENDENCY} STREQUAL "fuzztest") - if(NOT TINT_BUILD_FUZZTEST) - message(FATAL_ERROR "unexpected external dependency ${DEPENDENCY} w/o enabling TINT_BUILD_FUZZTEST") - endif() - target_link_libraries(${TARGET} PRIVATE fuzztest) - if(NOT MSVC) - target_compile_options(${TARGET} PRIVATE - -Wno-global-constructors - -Wno-exit-time-destructors - -Wno-weak-vtables - ) - endif() - if((${KIND} STREQUAL fuzz_cmd) AND ("${TINT_LIB_FUZZING_ENGINE_LINK_OPTIONS}" STREQUAL "")) - # FuzzTest executables define their own main() and link Clang's - # fuzzer_no_main runtime via the fuzztest target; replace -fsanitize=fuzzer - # from tint_fuzz_cmd_compile_options with -fsanitize=fuzzer-no-link so - # libFuzzer's FuzzerMain.cpp is not linked. - get_target_property(_link_opts ${TARGET} LINK_OPTIONS) - if(_link_opts) - list(TRANSFORM _link_opts REPLACE "^-fsanitize=fuzzer$" "-fsanitize=fuzzer-no-link") - set_target_properties(${TARGET} PROPERTIES LINK_OPTIONS "${_link_opts}") - endif() - get_target_property(_iface_link_opts ${TARGET} INTERFACE_LINK_OPTIONS) - if(_iface_link_opts) - list(TRANSFORM _iface_link_opts REPLACE "^-fsanitize=fuzzer$" "-fsanitize=fuzzer-no-link") - set_target_properties(${TARGET} PROPERTIES INTERFACE_LINK_OPTIONS "${_iface_link_opts}") - endif() - endif() - elseif(${DEPENDENCY} STREQUAL "fuzztest_wgsl_grammar") - if(NOT TINT_BUILD_FUZZTEST) - message(FATAL_ERROR "unexpected external dependency ${DEPENDENCY} w/o enabling TINT_BUILD_FUZZTEST") - endif() - target_link_libraries(${TARGET} PRIVATE fuzztest) elseif(${DEPENDENCY} STREQUAL "glslang") target_link_libraries(${TARGET} PRIVATE glslang) if(NOT MSVC) @@ -603,13 +509,6 @@ elseif(${DEPENDENCY} STREQUAL "gtest") target_include_directories(${TARGET} PRIVATE ${gmock_SOURCE_DIR}/include) target_link_libraries(${TARGET} PRIVATE gmock) - elseif(${DEPENDENCY} STREQUAL "libprotobuf-mutator") - target_link_libraries(${TARGET} PRIVATE libprotobuf-mutator) - elseif(${DEPENDENCY} STREQUAL "mesa") - if (NOT TINT_BUILD_MESA) - message(FATAL_ERROR "unexpected external dependency ${DEPENDENCY} w/o enabling TINT_BUILD_MESA") - endif() - add_dependencies(${TARGET} mesa) elseif(${DEPENDENCY} STREQUAL "metal") find_library(CoreGraphicsFramework CoreGraphics REQUIRED) find_library(FoundationFramework Foundation REQUIRED) @@ -638,11 +537,6 @@ target_link_libraries(${TARGET} PRIVATE Threads::Threads) elseif(${DEPENDENCY} STREQUAL "vulkan-headers") target_link_libraries(${TARGET} PRIVATE Vulkan::Headers) - elseif(${DEPENDENCY} STREQUAL "libvulkan") - if (NOT TINT_BUILD_FUZZER_VULKAN_SUPPORT) - message(FATAL_ERROR "unexpected external dependency ${DEPENDENCY} w/o enabling TINT_BUILD_FUZZER_VULKAN_SUPPORT") - endif() - target_link_libraries(${TARGET} PRIVATE Vulkan::Loader) elseif(${DEPENDENCY} STREQUAL "winsock") target_link_libraries(${TARGET} PRIVATE ws2_32) elseif(${DEPENDENCY} STREQUAL "src_utils") @@ -666,7 +560,6 @@ # KIND - The target kind # OUTPUT_NAME - the new name for the target output function(tint_target_set_output_name TARGET KIND OUTPUT_NAME) - set(TARGET "${TARGET}${TINT_TARGET_SUFFIX}") # Apply suffix tint_check_target_is_enabled(IS_ENABLED ${KIND}) if(NOT IS_ENABLED) return() # Target is disabled via build flags @@ -681,16 +574,12 @@ add_library(${OUTPUT_NAME} ALIAS ${TARGET}) elseif(${KIND} STREQUAL bench) add_library(${OUTPUT_NAME} ALIAS ${TARGET}) - elseif(${KIND} STREQUAL fuzz) - add_library(${OUTPUT_NAME} ALIAS ${TARGET}) elseif(${KIND} STREQUAL cmd) add_executable(${OUTPUT_NAME} ALIAS ${TARGET}) elseif(${KIND} STREQUAL test_cmd) add_executable(${OUTPUT_NAME} ALIAS ${TARGET}) elseif(${KIND} STREQUAL bench_cmd) add_executable(${OUTPUT_NAME} ALIAS ${TARGET}) - elseif(${KIND} STREQUAL fuzz_cmd) - add_executable(${OUTPUT_NAME} ALIAS ${TARGET}) else() message(FATAL_ERROR "unhandled target kind ${KIND}") endif() @@ -699,42 +588,7 @@ ################################################################################ # Include the generated build files ################################################################################ -if(TINT_BUILD_FUZZERS) - if(NOT COMPILER_IS_CLANG) - message(FATAL_ERROR "TINT_BUILD_FUZZERS can only be enabled with the Clang toolchain") - endif() - - # Save the current build flags - set(SAVE_TINT_BUILD_CMD_TOOLS ${TINT_BUILD_CMD_TOOLS}) - set(SAVE_TINT_BUILD_TESTS ${TINT_BUILD_TESTS}) - set(SAVE_TINT_BUILD_BENCHMARKS ${TINT_BUILD_BENCHMARKS}) - set(SAVE_TINT_BUILD_FUZZERS ${TINT_BUILD_FUZZERS}) - set(SAVE_TINT_TARGET_SUFFIX ${TINT_TARGET_SUFFIX}) - - # Declare the targets with fuzzers disabled - set(TINT_BUILD_FUZZERS FALSE) - include("BUILD.cmake") - - # Now redeclare the fuzzers targets with a '_sanitize_fuzzer' target suffix - # Enabling TINT_BUILD_FUZZERS will enable the -fsanitize=fuzzer compilation flag for these - # targets. - set(TINT_TARGET_SUFFIX "_sanitize_fuzzer") - set(TINT_BUILD_FUZZERS TRUE) - set(TINT_BUILD_CMD_TOOLS FALSE) - set(TINT_BUILD_TESTS FALSE) - set(TINT_BUILD_BENCHMARKS FALSE) - include("BUILD.cmake") - - # Restore the build flags - set(TINT_BUILD_CMD_TOOLS ${SAVE_TINT_BUILD_CMD_TOOLS}) - set(TINT_BUILD_TESTS ${SAVE_TINT_BUILD_TESTS}) - set(TINT_BUILD_BENCHMARKS ${SAVE_TINT_BUILD_BENCHMARKS}) - set(TINT_BUILD_FUZZERS ${SAVE_TINT_BUILD_FUZZERS}) - set(TINT_TARGET_SUFFIX ${SAVE_TINT_TARGET_SUFFIX}) -else() - # Fuzzers not enabled. Just include BUILD.cmake with the current flags. - include("BUILD.cmake") -endif(TINT_BUILD_FUZZERS) +include("BUILD.cmake") ################################################################################
diff --git a/src/tint/cmd/fuzz/common/BUILD.cmake b/src/tint/cmd/fuzz/common/BUILD.cmake index 5425636..052ddb5 100644 --- a/src/tint/cmd/fuzz/common/BUILD.cmake +++ b/src/tint/cmd/fuzz/common/BUILD.cmake
@@ -33,89 +33,3 @@ # # Do not modify this file directly ################################################################################ - -if(TINT_BUILD_FUZZERS) -################################################################################ -# Target: tint_cmd_fuzz_common -# Kind: lib -# Condition: TINT_BUILD_FUZZERS -################################################################################ -tint_add_target(tint_cmd_fuzz_common lib - cmd/fuzz/common/fuzzer_decoder.h - cmd/fuzz/common/fuzzer_encoder.h - cmd/fuzz/common/fuzzer_limits.h - cmd/fuzz/common/helper.cc - cmd/fuzz/common/helper.h - cmd/fuzz/common/init.cc - cmd/fuzz/common/init.h - cmd/fuzz/common/ir_fuzzer.cc - cmd/fuzz/common/ir_fuzzer.h - cmd/fuzz/common/options.h - cmd/fuzz/common/runner.h - cmd/fuzz/common/wgsl_fuzzer.cc - cmd/fuzz/common/wgsl_fuzzer.h -) - -tint_target_add_dependencies(tint_cmd_fuzz_common lib - tint_api_common - tint_lang_core - tint_lang_core_constant - tint_lang_core_ir - tint_lang_core_ir_validator - tint_lang_core_type - tint_utils - tint_utils_command - tint_utils_containers - tint_utils_diagnostic - tint_utils_ice - tint_utils_macros - tint_utils_math - tint_utils_memory - tint_utils_reflection - tint_utils_rtti - tint_utils_strconv - tint_utils_symbol - tint_utils_text -) - -tint_target_add_external_dependencies(tint_cmd_fuzz_common lib - "src_utils" - "thread" -) - -if(TINT_BUILD_HLSL_WRITER) - tint_target_add_dependencies(tint_cmd_fuzz_common lib - tint_lang_hlsl_validate - ) -endif(TINT_BUILD_HLSL_WRITER) - -endif(TINT_BUILD_FUZZERS) -if(TINT_BUILD_FUZZERS) -################################################################################ -# Target: tint_cmd_fuzz_common_test -# Kind: test -# Condition: TINT_BUILD_FUZZERS -################################################################################ -tint_add_target(tint_cmd_fuzz_common_test test - cmd/fuzz/common/fuzzer_decoder_test.cc - cmd/fuzz/common/init_test.cc -) - -tint_target_add_dependencies(tint_cmd_fuzz_common_test test - tint_cmd_fuzz_common - tint_utils - tint_utils_containers - tint_utils_ice - tint_utils_macros - tint_utils_math - tint_utils_memory - tint_utils_reflection - tint_utils_rtti -) - -tint_target_add_external_dependencies(tint_cmd_fuzz_common_test test - "gtest" - "src_utils" -) - -endif(TINT_BUILD_FUZZERS) \ No newline at end of file
diff --git a/src/tint/cmd/fuzz/ir/BUILD.cmake b/src/tint/cmd/fuzz/ir/BUILD.cmake index d215152..b4e1c42 100644 --- a/src/tint/cmd/fuzz/ir/BUILD.cmake +++ b/src/tint/cmd/fuzz/ir/BUILD.cmake
@@ -36,144 +36,3 @@ include(cmd/fuzz/ir/as/BUILD.cmake) include(cmd/fuzz/ir/dis/BUILD.cmake) - -if(TINT_BUILD_FUZZERS AND TINT_BUILD_IR_BINARY AND TINT_BUILD_WGSL_READER) -################################################################################ -# Target: tint_cmd_fuzz_ir_fuzz_cmd -# Kind: fuzz_cmd -# Condition: TINT_BUILD_FUZZERS AND TINT_BUILD_IR_BINARY AND TINT_BUILD_WGSL_READER -################################################################################ -tint_add_target(tint_cmd_fuzz_ir_fuzz_cmd fuzz_cmd - cmd/fuzz/ir/main_fuzz.cc -) - -tint_target_add_dependencies(tint_cmd_fuzz_ir_fuzz_cmd fuzz_cmd - tint_api_common - tint_cmd_fuzz_common - tint_cmd_fuzz_ir_fuzz - tint_cmd_fuzz_wgsl_fuzz - tint_lang_core - tint_lang_core_constant - tint_lang_core_ir - tint_lang_core_ir_binary - tint_lang_core_ir_binary_fuzz - tint_lang_core_ir_transform_fuzz - tint_lang_core_ir_validator - tint_lang_core_type - tint_utils - tint_utils_containers - tint_utils_diagnostic - tint_utils_ice - tint_utils_macros - tint_utils_math - tint_utils_memory - tint_utils_protos_ir_fuzz_proto - tint_utils_reflection - tint_utils_rtti - tint_utils_symbol - tint_utils_text -) - -tint_target_add_external_dependencies(tint_cmd_fuzz_ir_fuzz_cmd fuzz_cmd - "libprotobuf-mutator" - "src_utils" -) - -if(TINT_BUILD_GLSL_WRITER) - tint_target_add_dependencies(tint_cmd_fuzz_ir_fuzz_cmd fuzz_cmd - tint_lang_glsl_writer_fuzz - ) -endif(TINT_BUILD_GLSL_WRITER) - -if(TINT_BUILD_HLSL_WRITER) - tint_target_add_dependencies(tint_cmd_fuzz_ir_fuzz_cmd fuzz_cmd - tint_lang_hlsl_writer_raise_fuzz - tint_lang_hlsl_writer_fuzz - ) - tint_target_add_external_dependencies(tint_cmd_fuzz_ir_fuzz_cmd fuzz_cmd - "dxcompiler-for-fuzzer" - ) -endif(TINT_BUILD_HLSL_WRITER) - -if(TINT_BUILD_MSL_WRITER) - tint_target_add_dependencies(tint_cmd_fuzz_ir_fuzz_cmd fuzz_cmd - tint_lang_msl_writer_fuzz - ) -endif(TINT_BUILD_MSL_WRITER) - -if(TINT_BUILD_SPV_WRITER) - tint_target_add_dependencies(tint_cmd_fuzz_ir_fuzz_cmd fuzz_cmd - tint_lang_spirv_writer_fuzz - ) -endif(TINT_BUILD_SPV_WRITER) - -if(TINT_BUILD_WGSL_WRITER) - tint_target_add_dependencies(tint_cmd_fuzz_ir_fuzz_cmd fuzz_cmd - tint_lang_wgsl_writer_raise_fuzz - tint_lang_wgsl_writer_fuzz - ) -endif(TINT_BUILD_WGSL_WRITER) - -tint_target_set_output_name(tint_cmd_fuzz_ir_fuzz_cmd fuzz_cmd "tint_ir_fuzzer") - -endif(TINT_BUILD_FUZZERS AND TINT_BUILD_IR_BINARY AND TINT_BUILD_WGSL_READER) -if(TINT_BUILD_FUZZERS) -################################################################################ -# Target: tint_cmd_fuzz_ir_fuzz -# Kind: fuzz -# Condition: TINT_BUILD_FUZZERS -################################################################################ -tint_add_target(tint_cmd_fuzz_ir_fuzz fuzz - cmd/fuzz/ir/fuzz.cc - cmd/fuzz/ir/fuzz.h -) - -tint_target_add_dependencies(tint_cmd_fuzz_ir_fuzz fuzz - tint_api_common - tint_cmd_fuzz_common - tint_lang_core - tint_lang_core_constant - tint_lang_core_ir - tint_lang_core_ir_validator - tint_lang_core_type - tint_utils - tint_utils_containers - tint_utils_diagnostic - tint_utils_ice - tint_utils_macros - tint_utils_math - tint_utils_memory - tint_utils_reflection - tint_utils_rtti - tint_utils_symbol - tint_utils_text -) - -tint_target_add_external_dependencies(tint_cmd_fuzz_ir_fuzz fuzz - "src_utils" - "thread" -) - -if(TINT_BUILD_IR_BINARY) - tint_target_add_dependencies(tint_cmd_fuzz_ir_fuzz fuzz - tint_lang_core_ir_binary - ) -endif(TINT_BUILD_IR_BINARY) - -if(TINT_BUILD_WGSL_READER) - tint_target_add_dependencies(tint_cmd_fuzz_ir_fuzz fuzz - tint_cmd_fuzz_wgsl_fuzz - tint_lang_wgsl_reader - ) -endif(TINT_BUILD_WGSL_READER) - -if(TINT_BUILD_WGSL_READER OR TINT_BUILD_WGSL_WRITER) - tint_target_add_dependencies(tint_cmd_fuzz_ir_fuzz fuzz - tint_lang_wgsl - tint_lang_wgsl_ast - tint_lang_wgsl_program - tint_lang_wgsl_sem - ) -endif(TINT_BUILD_WGSL_READER OR TINT_BUILD_WGSL_WRITER) - -endif(TINT_BUILD_FUZZERS) \ No newline at end of file
diff --git a/src/tint/cmd/fuzz/ir/as/BUILD.cmake b/src/tint/cmd/fuzz/ir/as/BUILD.cmake index e762f63..3ae624a 100644 --- a/src/tint/cmd/fuzz/ir/as/BUILD.cmake +++ b/src/tint/cmd/fuzz/ir/as/BUILD.cmake
@@ -33,66 +33,3 @@ # # Do not modify this file directly ################################################################################ - -if(TINT_BUILD_IR_BINARY AND TINT_BUILD_WGSL_READER) -################################################################################ -# Target: tint_cmd_fuzz_ir_as_cmd -# Kind: cmd -# Condition: TINT_BUILD_IR_BINARY AND TINT_BUILD_WGSL_READER -################################################################################ -tint_add_target(tint_cmd_fuzz_ir_as_cmd cmd - cmd/fuzz/ir/as/main.cc -) - -tint_target_add_dependencies(tint_cmd_fuzz_ir_as_cmd cmd - tint_api - tint_api_common - tint_cmd_common - tint_lang_core - tint_lang_core_constant - tint_lang_core_intrinsic - tint_lang_core_ir - tint_lang_core_ir_binary - tint_lang_core_ir_validator - tint_lang_core_type - tint_lang_wgsl - tint_lang_wgsl_ast - tint_lang_wgsl_inspector - tint_lang_wgsl_program - tint_lang_wgsl_reader - tint_lang_wgsl_sem - tint_utils - tint_utils_command - tint_utils_containers - tint_utils_diagnostic - tint_utils_ice - tint_utils_macros - tint_utils_math - tint_utils_memory - tint_utils_protos_ir_fuzz_proto - tint_utils_reflection - tint_utils_rtti - tint_utils_strconv - tint_utils_symbol - tint_utils_text -) - -tint_target_add_external_dependencies(tint_cmd_fuzz_ir_as_cmd cmd - "src_utils" -) - -if(TINT_BUILD_SPV_READER) - tint_target_add_dependencies(tint_cmd_fuzz_ir_as_cmd cmd - tint_lang_spirv_reader_common - ) -endif(TINT_BUILD_SPV_READER) - -if(TINT_BUILD_WGSL_WRITER) - tint_target_add_dependencies(tint_cmd_fuzz_ir_as_cmd cmd - tint_lang_wgsl_writer_common - ) -endif(TINT_BUILD_WGSL_WRITER) - -tint_target_set_output_name(tint_cmd_fuzz_ir_as_cmd cmd "ir_fuzz_as") - -endif(TINT_BUILD_IR_BINARY AND TINT_BUILD_WGSL_READER) \ No newline at end of file
diff --git a/src/tint/cmd/fuzz/ir/dis/BUILD.cmake b/src/tint/cmd/fuzz/ir/dis/BUILD.cmake index da564d3..3ae624a 100644 --- a/src/tint/cmd/fuzz/ir/dis/BUILD.cmake +++ b/src/tint/cmd/fuzz/ir/dis/BUILD.cmake
@@ -33,64 +33,3 @@ # # Do not modify this file directly ################################################################################ - -if(TINT_BUILD_IR_BINARY AND TINT_BUILD_WGSL_WRITER AND TINT_BUILD_SPV_WRITER) -################################################################################ -# Target: tint_cmd_fuzz_ir_dis_cmd -# Kind: cmd -# Condition: TINT_BUILD_IR_BINARY AND TINT_BUILD_WGSL_WRITER AND TINT_BUILD_SPV_WRITER -################################################################################ -tint_add_target(tint_cmd_fuzz_ir_dis_cmd cmd - cmd/fuzz/ir/dis/main.cc -) - -tint_target_add_dependencies(tint_cmd_fuzz_ir_dis_cmd cmd - tint_api - tint_api_common - tint_cmd_common - tint_lang_core - tint_lang_core_constant - tint_lang_core_intrinsic - tint_lang_core_ir - tint_lang_core_ir_binary - tint_lang_core_ir_validator - tint_lang_core_type - tint_lang_spirv_writer - tint_lang_spirv_writer_common - tint_lang_wgsl - tint_lang_wgsl_ast - tint_lang_wgsl_inspector - tint_lang_wgsl_program - tint_lang_wgsl_sem - tint_lang_wgsl_writer - tint_lang_wgsl_writer_common - tint_utils - tint_utils_command - tint_utils_containers - tint_utils_diagnostic - tint_utils_ice - tint_utils_macros - tint_utils_math - tint_utils_memory - tint_utils_protos_ir_fuzz_proto - tint_utils_reflection - tint_utils_rtti - tint_utils_strconv - tint_utils_symbol - tint_utils_text -) - -tint_target_add_external_dependencies(tint_cmd_fuzz_ir_dis_cmd cmd - "spirv-tools" - "src_utils" -) - -if(TINT_BUILD_SPV_READER) - tint_target_add_dependencies(tint_cmd_fuzz_ir_dis_cmd cmd - tint_lang_spirv_reader_common - ) -endif(TINT_BUILD_SPV_READER) - -tint_target_set_output_name(tint_cmd_fuzz_ir_dis_cmd cmd "ir_fuzz_dis") - -endif(TINT_BUILD_IR_BINARY AND TINT_BUILD_WGSL_WRITER AND TINT_BUILD_SPV_WRITER) \ No newline at end of file
diff --git a/src/tint/cmd/fuzz/ir_mesa/BUILD.cmake b/src/tint/cmd/fuzz/ir_mesa/BUILD.cmake index 8b1dbe8..052ddb5 100644 --- a/src/tint/cmd/fuzz/ir_mesa/BUILD.cmake +++ b/src/tint/cmd/fuzz/ir_mesa/BUILD.cmake
@@ -33,54 +33,3 @@ # # Do not modify this file directly ################################################################################ - -if(TINT_BUILD_FUZZER_VULKAN_SUPPORT AND TINT_BUILD_FUZZERS AND TINT_BUILD_IR_BINARY AND TINT_BUILD_MESA AND TINT_BUILD_WGSL_READER) -################################################################################ -# Target: tint_cmd_fuzz_ir_mesa_fuzz_cmd -# Kind: fuzz_cmd -# Condition: TINT_BUILD_FUZZER_VULKAN_SUPPORT AND TINT_BUILD_FUZZERS AND TINT_BUILD_IR_BINARY AND TINT_BUILD_MESA AND TINT_BUILD_WGSL_READER -################################################################################ -tint_add_target(tint_cmd_fuzz_ir_mesa_fuzz_cmd fuzz_cmd - cmd/fuzz/ir_mesa/main_fuzz.cc -) - -tint_target_add_dependencies(tint_cmd_fuzz_ir_mesa_fuzz_cmd fuzz_cmd - tint_api_common - tint_cmd_fuzz_common - tint_cmd_fuzz_ir_fuzz - tint_cmd_fuzz_wgsl_fuzz - tint_lang_core - tint_lang_core_constant - tint_lang_core_ir - tint_lang_core_ir_binary - tint_lang_core_ir_validator - tint_lang_core_type - tint_utils - tint_utils_containers - tint_utils_diagnostic - tint_utils_ice - tint_utils_macros - tint_utils_math - tint_utils_memory - tint_utils_protos_ir_fuzz_proto - tint_utils_reflection - tint_utils_rtti - tint_utils_symbol - tint_utils_text -) - -tint_target_add_external_dependencies(tint_cmd_fuzz_ir_mesa_fuzz_cmd fuzz_cmd - "libprotobuf-mutator" - "mesa" - "src_utils" -) - -if(TINT_BUILD_SPV_WRITER) - tint_target_add_dependencies(tint_cmd_fuzz_ir_mesa_fuzz_cmd fuzz_cmd - tint_lang_spirv_writer_fuzz - ) -endif(TINT_BUILD_SPV_WRITER) - -tint_target_set_output_name(tint_cmd_fuzz_ir_mesa_fuzz_cmd fuzz_cmd "tint_ir_mesa_fuzzer") - -endif(TINT_BUILD_FUZZER_VULKAN_SUPPORT AND TINT_BUILD_FUZZERS AND TINT_BUILD_IR_BINARY AND TINT_BUILD_MESA AND TINT_BUILD_WGSL_READER) \ No newline at end of file
diff --git a/src/tint/cmd/fuzz/stub_fuzztest/BUILD.cmake b/src/tint/cmd/fuzz/stub_fuzztest/BUILD.cmake index 826da47..052ddb5 100644 --- a/src/tint/cmd/fuzz/stub_fuzztest/BUILD.cmake +++ b/src/tint/cmd/fuzz/stub_fuzztest/BUILD.cmake
@@ -33,28 +33,3 @@ # # Do not modify this file directly ################################################################################ - -if(TINT_BUILD_FUZZERS AND TINT_BUILD_FUZZTEST) -################################################################################ -# Target: tint_cmd_fuzz_stub_fuzztest_fuzz_cmd -# Kind: fuzz_cmd -# Condition: TINT_BUILD_FUZZERS AND TINT_BUILD_FUZZTEST -################################################################################ -tint_add_target(tint_cmd_fuzz_stub_fuzztest_fuzz_cmd fuzz_cmd - cmd/fuzz/stub_fuzztest/main_fuzz.cc -) - -tint_target_add_dependencies(tint_cmd_fuzz_stub_fuzztest_fuzz_cmd fuzz_cmd - tint_utils_macros -) - -tint_target_add_external_dependencies(tint_cmd_fuzz_stub_fuzztest_fuzz_cmd fuzz_cmd - "fuzztest" - "fuzztest_wgsl_grammar" - "gtest" - "src_utils" -) - -tint_target_set_output_name(tint_cmd_fuzz_stub_fuzztest_fuzz_cmd fuzz_cmd "tint_stub_fuzztest") - -endif(TINT_BUILD_FUZZERS AND TINT_BUILD_FUZZTEST) \ No newline at end of file
diff --git a/src/tint/cmd/fuzz/wgsl/BUILD.cmake b/src/tint/cmd/fuzz/wgsl/BUILD.cmake index 22ed1cb..533d37c 100644 --- a/src/tint/cmd/fuzz/wgsl/BUILD.cmake +++ b/src/tint/cmd/fuzz/wgsl/BUILD.cmake
@@ -33,133 +33,3 @@ # # Do not modify this file directly ################################################################################ - -if(TINT_BUILD_FUZZERS AND TINT_BUILD_WGSL_READER) -################################################################################ -# Target: tint_cmd_fuzz_wgsl_fuzz_cmd -# Kind: fuzz_cmd -# Condition: TINT_BUILD_FUZZERS AND TINT_BUILD_WGSL_READER -################################################################################ -tint_add_target(tint_cmd_fuzz_wgsl_fuzz_cmd fuzz_cmd - cmd/fuzz/wgsl/main_fuzz.cc -) - -tint_target_add_dependencies(tint_cmd_fuzz_wgsl_fuzz_cmd fuzz_cmd - tint_cmd_fuzz_common - tint_cmd_fuzz_ir_fuzz - tint_cmd_fuzz_wgsl_fuzz - tint_lang_core_ir_transform_fuzz - tint_utils - tint_utils_containers - tint_utils_ice - tint_utils_macros - tint_utils_math - tint_utils_memory - tint_utils_reflection - tint_utils_rtti - tint_utils_text -) - -tint_target_add_external_dependencies(tint_cmd_fuzz_wgsl_fuzz_cmd fuzz_cmd - "src_utils" -) - -if(TINT_BUILD_GLSL_WRITER) - tint_target_add_dependencies(tint_cmd_fuzz_wgsl_fuzz_cmd fuzz_cmd - tint_lang_glsl_writer_fuzz - ) -endif(TINT_BUILD_GLSL_WRITER) - -if(TINT_BUILD_HLSL_WRITER) - tint_target_add_dependencies(tint_cmd_fuzz_wgsl_fuzz_cmd fuzz_cmd - tint_lang_hlsl_writer_raise_fuzz - tint_lang_hlsl_writer_fuzz - ) - tint_target_add_external_dependencies(tint_cmd_fuzz_wgsl_fuzz_cmd fuzz_cmd - "dxcompiler-for-fuzzer" - ) -endif(TINT_BUILD_HLSL_WRITER) - -if(TINT_BUILD_IR_BINARY) - tint_target_add_dependencies(tint_cmd_fuzz_wgsl_fuzz_cmd fuzz_cmd - tint_lang_core_ir_binary_fuzz - ) -endif(TINT_BUILD_IR_BINARY) - -if(TINT_BUILD_MSL_WRITER) - tint_target_add_dependencies(tint_cmd_fuzz_wgsl_fuzz_cmd fuzz_cmd - tint_lang_msl_writer_fuzz - ) -endif(TINT_BUILD_MSL_WRITER) - -if(TINT_BUILD_SPV_WRITER) - tint_target_add_dependencies(tint_cmd_fuzz_wgsl_fuzz_cmd fuzz_cmd - tint_lang_spirv_writer_fuzz - ) -endif(TINT_BUILD_SPV_WRITER) - -if(TINT_BUILD_WGSL_WRITER) - tint_target_add_dependencies(tint_cmd_fuzz_wgsl_fuzz_cmd fuzz_cmd - tint_lang_wgsl_writer_raise_fuzz - tint_lang_wgsl_writer_fuzz - ) -endif(TINT_BUILD_WGSL_WRITER) - -tint_target_set_output_name(tint_cmd_fuzz_wgsl_fuzz_cmd fuzz_cmd "tint_wgsl_fuzzer") - -endif(TINT_BUILD_FUZZERS AND TINT_BUILD_WGSL_READER) -if(TINT_BUILD_FUZZERS AND TINT_BUILD_WGSL_READER) -################################################################################ -# Target: tint_cmd_fuzz_wgsl_fuzz -# Kind: fuzz -# Condition: TINT_BUILD_FUZZERS AND TINT_BUILD_WGSL_READER -################################################################################ -tint_add_target(tint_cmd_fuzz_wgsl_fuzz fuzz - cmd/fuzz/wgsl/fuzz.cc - cmd/fuzz/wgsl/fuzz.h -) - -tint_target_add_dependencies(tint_cmd_fuzz_wgsl_fuzz fuzz - tint_api_common - tint_cmd_fuzz_common - tint_lang_core - tint_lang_core_constant - tint_lang_core_ir - tint_lang_core_type - tint_lang_wgsl - tint_lang_wgsl_ast - tint_lang_wgsl_program - tint_lang_wgsl_reader - tint_lang_wgsl_sem - tint_utils - tint_utils_containers - tint_utils_diagnostic - tint_utils_ice - tint_utils_macros - tint_utils_math - tint_utils_memory - tint_utils_reflection - tint_utils_rtti - tint_utils_symbol - tint_utils_text -) - -tint_target_add_external_dependencies(tint_cmd_fuzz_wgsl_fuzz fuzz - "src_utils" - "thread" -) - -if(TINT_BUILD_IR_BINARY) - tint_target_add_dependencies(tint_cmd_fuzz_wgsl_fuzz fuzz - tint_lang_core_ir_binary - ) -endif(TINT_BUILD_IR_BINARY) - -if(TINT_BUILD_WGSL_WRITER) - tint_target_add_dependencies(tint_cmd_fuzz_wgsl_fuzz fuzz - tint_lang_wgsl_writer - tint_lang_wgsl_writer_common - ) -endif(TINT_BUILD_WGSL_WRITER) - -endif(TINT_BUILD_FUZZERS AND TINT_BUILD_WGSL_READER) \ No newline at end of file
diff --git a/src/tint/cmd/fuzz/wgsl_mesa/BUILD.cmake b/src/tint/cmd/fuzz/wgsl_mesa/BUILD.cmake index 67be43e..052ddb5 100644 --- a/src/tint/cmd/fuzz/wgsl_mesa/BUILD.cmake +++ b/src/tint/cmd/fuzz/wgsl_mesa/BUILD.cmake
@@ -33,43 +33,3 @@ # # Do not modify this file directly ################################################################################ - -if(TINT_BUILD_FUZZER_VULKAN_SUPPORT AND TINT_BUILD_FUZZERS AND TINT_BUILD_MESA AND TINT_BUILD_WGSL_READER) -################################################################################ -# Target: tint_cmd_fuzz_wgsl_mesa_fuzz_cmd -# Kind: fuzz_cmd -# Condition: TINT_BUILD_FUZZER_VULKAN_SUPPORT AND TINT_BUILD_FUZZERS AND TINT_BUILD_MESA AND TINT_BUILD_WGSL_READER -################################################################################ -tint_add_target(tint_cmd_fuzz_wgsl_mesa_fuzz_cmd fuzz_cmd - cmd/fuzz/wgsl_mesa/main_fuzz.cc -) - -tint_target_add_dependencies(tint_cmd_fuzz_wgsl_mesa_fuzz_cmd fuzz_cmd - tint_cmd_fuzz_common - tint_cmd_fuzz_ir_fuzz - tint_cmd_fuzz_wgsl_fuzz - tint_utils - tint_utils_containers - tint_utils_ice - tint_utils_macros - tint_utils_math - tint_utils_memory - tint_utils_reflection - tint_utils_rtti - tint_utils_text -) - -tint_target_add_external_dependencies(tint_cmd_fuzz_wgsl_mesa_fuzz_cmd fuzz_cmd - "mesa" - "src_utils" -) - -if(TINT_BUILD_SPV_WRITER) - tint_target_add_dependencies(tint_cmd_fuzz_wgsl_mesa_fuzz_cmd fuzz_cmd - tint_lang_spirv_writer_fuzz - ) -endif(TINT_BUILD_SPV_WRITER) - -tint_target_set_output_name(tint_cmd_fuzz_wgsl_mesa_fuzz_cmd fuzz_cmd "tint_wgsl_mesa_fuzzer") - -endif(TINT_BUILD_FUZZER_VULKAN_SUPPORT AND TINT_BUILD_FUZZERS AND TINT_BUILD_MESA AND TINT_BUILD_WGSL_READER) \ No newline at end of file
diff --git a/src/tint/cmd/test/BUILD.cmake b/src/tint/cmd/test/BUILD.cmake index 23f111e..8aeae45 100644 --- a/src/tint/cmd/test/BUILD.cmake +++ b/src/tint/cmd/test/BUILD.cmake
@@ -88,12 +88,6 @@ "src_utils_crash_handler" ) -if(TINT_BUILD_FUZZERS) - tint_target_add_dependencies(tint_cmd_test_test_cmd test_cmd - tint_cmd_fuzz_common_test - ) -endif(TINT_BUILD_FUZZERS) - if(TINT_BUILD_GLSL_VALIDATOR AND TINT_BUILD_GLSL_WRITER) tint_target_add_dependencies(tint_cmd_test_test_cmd test_cmd tint_lang_glsl_writer_test
diff --git a/src/tint/lang/core/ir/binary/BUILD.cmake b/src/tint/lang/core/ir/binary/BUILD.cmake index e3e8d27..6998671 100644 --- a/src/tint/lang/core/ir/binary/BUILD.cmake +++ b/src/tint/lang/core/ir/binary/BUILD.cmake
@@ -112,42 +112,4 @@ "src_utils" ) -endif(TINT_BUILD_IR_BINARY) -if(TINT_BUILD_FUZZERS AND TINT_BUILD_IR_BINARY) -################################################################################ -# Target: tint_lang_core_ir_binary_fuzz -# Kind: fuzz -# Condition: TINT_BUILD_FUZZERS AND TINT_BUILD_IR_BINARY -################################################################################ -tint_add_target(tint_lang_core_ir_binary_fuzz fuzz - lang/core/ir/binary/roundtrip_fuzz.cc -) - -tint_target_add_dependencies(tint_lang_core_ir_binary_fuzz fuzz - tint_api_common - tint_cmd_fuzz_common - tint_lang_core - tint_lang_core_constant - tint_lang_core_intrinsic - tint_lang_core_ir - tint_lang_core_ir_binary - tint_lang_core_ir_validator - tint_lang_core_type - tint_utils - tint_utils_containers - tint_utils_diagnostic - tint_utils_ice - tint_utils_macros - tint_utils_math - tint_utils_memory - tint_utils_reflection - tint_utils_rtti - tint_utils_symbol - tint_utils_text -) - -tint_target_add_external_dependencies(tint_lang_core_ir_binary_fuzz fuzz - "src_utils" -) - -endif(TINT_BUILD_FUZZERS AND TINT_BUILD_IR_BINARY) \ No newline at end of file +endif(TINT_BUILD_IR_BINARY) \ No newline at end of file
diff --git a/src/tint/lang/core/ir/transform/BUILD.cmake b/src/tint/lang/core/ir/transform/BUILD.cmake index 4265bb0..4ece224 100644 --- a/src/tint/lang/core/ir/transform/BUILD.cmake +++ b/src/tint/lang/core/ir/transform/BUILD.cmake
@@ -214,60 +214,3 @@ "gtest" "src_utils" ) - -if(TINT_BUILD_FUZZERS) -################################################################################ -# Target: tint_lang_core_ir_transform_fuzz -# Kind: fuzz -# Condition: TINT_BUILD_FUZZERS -################################################################################ -tint_add_target(tint_lang_core_ir_transform_fuzz fuzz - lang/core/ir/transform/bgra8unorm_polyfill_fuzz.cc - lang/core/ir/transform/binary_polyfill_fuzz.cc - lang/core/ir/transform/binding_remapper_fuzz.cc - lang/core/ir/transform/block_decorated_structs_fuzz.cc - lang/core/ir/transform/builtin_polyfill_fuzz.cc - lang/core/ir/transform/combine_access_instructions_fuzz.cc - lang/core/ir/transform/conversion_polyfill_fuzz.cc - lang/core/ir/transform/dead_code_elimination_fuzz.cc - lang/core/ir/transform/demote_to_helper_fuzz.cc - lang/core/ir/transform/direct_variable_access_fuzz.cc - lang/core/ir/transform/multiplanar_external_texture_fuzz.cc - lang/core/ir/transform/preserve_padding_fuzz.cc - lang/core/ir/transform/remove_terminator_args_fuzz.cc - lang/core/ir/transform/rename_conflicts_fuzz.cc - lang/core/ir/transform/robustness_fuzz.cc - lang/core/ir/transform/single_entry_point_fuzz.cc - lang/core/ir/transform/substitute_overrides_fuzz.cc - lang/core/ir/transform/value_to_let_fuzz.cc - lang/core/ir/transform/vectorize_scalar_matrix_constructors_fuzz.cc - lang/core/ir/transform/zero_init_workgroup_memory_fuzz.cc -) - -tint_target_add_dependencies(tint_lang_core_ir_transform_fuzz fuzz - tint_api_common - tint_cmd_fuzz_common - tint_lang_core - tint_lang_core_constant - tint_lang_core_ir - tint_lang_core_ir_transform - tint_lang_core_ir_validator - tint_lang_core_type - tint_utils - tint_utils_containers - tint_utils_diagnostic - tint_utils_ice - tint_utils_macros - tint_utils_math - tint_utils_memory - tint_utils_reflection - tint_utils_rtti - tint_utils_symbol - tint_utils_text -) - -tint_target_add_external_dependencies(tint_lang_core_ir_transform_fuzz fuzz - "src_utils" -) - -endif(TINT_BUILD_FUZZERS) \ No newline at end of file
diff --git a/src/tint/lang/glsl/writer/BUILD.cmake b/src/tint/lang/glsl/writer/BUILD.cmake index b9331ea..b6f95c4 100644 --- a/src/tint/lang/glsl/writer/BUILD.cmake +++ b/src/tint/lang/glsl/writer/BUILD.cmake
@@ -136,45 +136,4 @@ "src_utils" ) -endif(TINT_BUILD_GLSL_VALIDATOR AND TINT_BUILD_GLSL_WRITER) -if(TINT_BUILD_FUZZERS AND TINT_BUILD_GLSL_WRITER) -################################################################################ -# Target: tint_lang_glsl_writer_fuzz -# Kind: fuzz -# Condition: TINT_BUILD_FUZZERS AND TINT_BUILD_GLSL_WRITER -################################################################################ -tint_add_target(tint_lang_glsl_writer_fuzz fuzz - lang/glsl/writer/writer_fuzz.cc -) - -tint_target_add_dependencies(tint_lang_glsl_writer_fuzz fuzz - tint_api_common - tint_cmd_fuzz_common - tint_lang_core - tint_lang_core_constant - tint_lang_core_ir - tint_lang_core_ir_transform - tint_lang_core_ir_validator - tint_lang_core_type - tint_lang_glsl_writer - tint_lang_glsl_writer_common - tint_lang_glsl_writer_helpers - tint_lang_glsl_writer_printer - tint_utils - tint_utils_containers - tint_utils_diagnostic - tint_utils_ice - tint_utils_macros - tint_utils_math - tint_utils_memory - tint_utils_reflection - tint_utils_rtti - tint_utils_symbol - tint_utils_text -) - -tint_target_add_external_dependencies(tint_lang_glsl_writer_fuzz fuzz - "src_utils" -) - -endif(TINT_BUILD_FUZZERS AND TINT_BUILD_GLSL_WRITER) \ No newline at end of file +endif(TINT_BUILD_GLSL_VALIDATOR AND TINT_BUILD_GLSL_WRITER) \ No newline at end of file
diff --git a/src/tint/lang/hlsl/writer/BUILD.cmake b/src/tint/lang/hlsl/writer/BUILD.cmake index 7b084676..2fb03fe 100644 --- a/src/tint/lang/hlsl/writer/BUILD.cmake +++ b/src/tint/lang/hlsl/writer/BUILD.cmake
@@ -136,46 +136,4 @@ "src_utils" ) -endif(TINT_BUILD_HLSL_WRITER) -if(TINT_BUILD_FUZZERS AND TINT_BUILD_HLSL_WRITER) -################################################################################ -# Target: tint_lang_hlsl_writer_fuzz -# Kind: fuzz -# Condition: TINT_BUILD_FUZZERS AND TINT_BUILD_HLSL_WRITER -################################################################################ -tint_add_target(tint_lang_hlsl_writer_fuzz fuzz - lang/hlsl/writer/writer_fuzz.cc -) - -tint_target_add_dependencies(tint_lang_hlsl_writer_fuzz fuzz - tint_api_common - tint_api_helpers - tint_cmd_fuzz_common - tint_lang_core - tint_lang_core_constant - tint_lang_core_ir - tint_lang_core_ir_validator - tint_lang_core_type - tint_lang_hlsl_validate - tint_lang_hlsl_writer - tint_lang_hlsl_writer_common - tint_lang_hlsl_writer_printer - tint_utils - tint_utils_command - tint_utils_containers - tint_utils_diagnostic - tint_utils_ice - tint_utils_macros - tint_utils_math - tint_utils_memory - tint_utils_reflection - tint_utils_rtti - tint_utils_symbol - tint_utils_text -) - -tint_target_add_external_dependencies(tint_lang_hlsl_writer_fuzz fuzz - "src_utils" -) - -endif(TINT_BUILD_FUZZERS AND TINT_BUILD_HLSL_WRITER) \ No newline at end of file +endif(TINT_BUILD_HLSL_WRITER) \ No newline at end of file
diff --git a/src/tint/lang/hlsl/writer/raise/BUILD.cmake b/src/tint/lang/hlsl/writer/raise/BUILD.cmake index e40bcf6..d4eb37f 100644 --- a/src/tint/lang/hlsl/writer/raise/BUILD.cmake +++ b/src/tint/lang/hlsl/writer/raise/BUILD.cmake
@@ -167,41 +167,4 @@ "src_utils" ) -endif(TINT_BUILD_HLSL_WRITER) -if(TINT_BUILD_FUZZERS AND TINT_BUILD_HLSL_WRITER) -################################################################################ -# Target: tint_lang_hlsl_writer_raise_fuzz -# Kind: fuzz -# Condition: TINT_BUILD_FUZZERS AND TINT_BUILD_HLSL_WRITER -################################################################################ -tint_add_target(tint_lang_hlsl_writer_raise_fuzz fuzz - lang/hlsl/writer/raise/promote_initializers_fuzz.cc -) - -tint_target_add_dependencies(tint_lang_hlsl_writer_raise_fuzz fuzz - tint_api_common - tint_cmd_fuzz_common - tint_lang_core - tint_lang_core_constant - tint_lang_core_ir - tint_lang_core_ir_validator - tint_lang_core_type - tint_lang_hlsl_writer_raise - tint_utils - tint_utils_containers - tint_utils_diagnostic - tint_utils_ice - tint_utils_macros - tint_utils_math - tint_utils_memory - tint_utils_reflection - tint_utils_rtti - tint_utils_symbol - tint_utils_text -) - -tint_target_add_external_dependencies(tint_lang_hlsl_writer_raise_fuzz fuzz - "src_utils" -) - -endif(TINT_BUILD_FUZZERS AND TINT_BUILD_HLSL_WRITER) \ No newline at end of file +endif(TINT_BUILD_HLSL_WRITER) \ No newline at end of file
diff --git a/src/tint/lang/msl/writer/BUILD.cmake b/src/tint/lang/msl/writer/BUILD.cmake index 66424d2..c464ef3 100644 --- a/src/tint/lang/msl/writer/BUILD.cmake +++ b/src/tint/lang/msl/writer/BUILD.cmake
@@ -132,44 +132,4 @@ "src_utils" ) -endif(TINT_BUILD_MSL_WRITER) -if(TINT_BUILD_FUZZERS AND TINT_BUILD_MSL_WRITER) -################################################################################ -# Target: tint_lang_msl_writer_fuzz -# Kind: fuzz -# Condition: TINT_BUILD_FUZZERS AND TINT_BUILD_MSL_WRITER -################################################################################ -tint_add_target(tint_lang_msl_writer_fuzz fuzz - lang/msl/writer/writer_fuzz.cc -) - -tint_target_add_dependencies(tint_lang_msl_writer_fuzz fuzz - tint_api_common - tint_api_helpers - tint_cmd_fuzz_common - tint_lang_core - tint_lang_core_constant - tint_lang_core_ir - tint_lang_core_ir_validator - tint_lang_core_type - tint_lang_msl_writer - tint_lang_msl_writer_common - tint_lang_msl_writer_printer - tint_utils - tint_utils_containers - tint_utils_diagnostic - tint_utils_ice - tint_utils_macros - tint_utils_math - tint_utils_memory - tint_utils_reflection - tint_utils_rtti - tint_utils_symbol - tint_utils_text -) - -tint_target_add_external_dependencies(tint_lang_msl_writer_fuzz fuzz - "src_utils" -) - -endif(TINT_BUILD_FUZZERS AND TINT_BUILD_MSL_WRITER) \ No newline at end of file +endif(TINT_BUILD_MSL_WRITER) \ No newline at end of file
diff --git a/src/tint/lang/spirv/writer/BUILD.cmake b/src/tint/lang/spirv/writer/BUILD.cmake index 64ccc6e..5549218 100644 --- a/src/tint/lang/spirv/writer/BUILD.cmake +++ b/src/tint/lang/spirv/writer/BUILD.cmake
@@ -146,54 +146,4 @@ "src_utils" ) -endif(TINT_BUILD_SPV_WRITER) -if(TINT_BUILD_FUZZERS AND TINT_BUILD_SPV_WRITER) -################################################################################ -# Target: tint_lang_spirv_writer_fuzz -# Kind: fuzz -# Condition: TINT_BUILD_FUZZERS AND TINT_BUILD_SPV_WRITER -################################################################################ -tint_add_target(tint_lang_spirv_writer_fuzz fuzz - lang/spirv/writer/writer_fuzz.cc -) - -tint_target_add_dependencies(tint_lang_spirv_writer_fuzz fuzz - tint_api_common - tint_api_helpers - tint_cmd_fuzz_common - tint_lang_core - tint_lang_core_constant - tint_lang_core_intrinsic - tint_lang_core_ir - tint_lang_core_ir_validator - tint_lang_core_type - tint_lang_spirv_validate - tint_lang_spirv_writer - tint_lang_spirv_writer_common - tint_lang_spirv_writer_printer - tint_utils - tint_utils_containers - tint_utils_diagnostic - tint_utils_ice - tint_utils_macros - tint_utils_math - tint_utils_memory - tint_utils_reflection - tint_utils_rtti - tint_utils_symbol - tint_utils_text -) - -tint_target_add_external_dependencies(tint_lang_spirv_writer_fuzz fuzz - "spirv-tools" - "src_utils" -) - -if(TINT_BUILD_FUZZER_VULKAN_SUPPORT) - tint_target_add_external_dependencies(tint_lang_spirv_writer_fuzz fuzz - "libvulkan" - "vulkan-headers" - ) -endif(TINT_BUILD_FUZZER_VULKAN_SUPPORT) - -endif(TINT_BUILD_FUZZERS AND TINT_BUILD_SPV_WRITER) \ No newline at end of file +endif(TINT_BUILD_SPV_WRITER) \ No newline at end of file
diff --git a/src/tint/lang/wgsl/writer/BUILD.cmake b/src/tint/lang/wgsl/writer/BUILD.cmake index 2a1c515..a261545 100644 --- a/src/tint/lang/wgsl/writer/BUILD.cmake +++ b/src/tint/lang/wgsl/writer/BUILD.cmake
@@ -130,41 +130,4 @@ "src_utils" ) -endif(TINT_BUILD_WGSL_WRITER) -if(TINT_BUILD_FUZZERS AND TINT_BUILD_WGSL_WRITER) -################################################################################ -# Target: tint_lang_wgsl_writer_fuzz -# Kind: fuzz -# Condition: TINT_BUILD_FUZZERS AND TINT_BUILD_WGSL_WRITER -################################################################################ -tint_add_target(tint_lang_wgsl_writer_fuzz fuzz -) - -tint_target_add_dependencies(tint_lang_wgsl_writer_fuzz fuzz - tint_cmd_fuzz_common - tint_lang_wgsl - tint_lang_wgsl_writer - tint_lang_wgsl_writer_common - tint_utils - tint_utils_containers - tint_utils_diagnostic - tint_utils_ice - tint_utils_macros - tint_utils_math - tint_utils_memory - tint_utils_reflection - tint_utils_rtti - tint_utils_text -) - -tint_target_add_external_dependencies(tint_lang_wgsl_writer_fuzz fuzz - "src_utils" -) - -if(TINT_BUILD_WGSL_READER) - tint_target_add_sources(tint_lang_wgsl_writer_fuzz fuzz - "lang/wgsl/writer/writer_fuzz.cc" - ) -endif(TINT_BUILD_WGSL_READER) - -endif(TINT_BUILD_FUZZERS AND TINT_BUILD_WGSL_WRITER) \ No newline at end of file +endif(TINT_BUILD_WGSL_WRITER) \ No newline at end of file
diff --git a/src/tint/lang/wgsl/writer/raise/BUILD.cmake b/src/tint/lang/wgsl/writer/raise/BUILD.cmake index 039f835..b2429ec 100644 --- a/src/tint/lang/wgsl/writer/raise/BUILD.cmake +++ b/src/tint/lang/wgsl/writer/raise/BUILD.cmake
@@ -122,44 +122,4 @@ "src_utils" ) -endif(TINT_BUILD_WGSL_WRITER) -if(TINT_BUILD_FUZZERS AND TINT_BUILD_WGSL_WRITER) -################################################################################ -# Target: tint_lang_wgsl_writer_raise_fuzz -# Kind: fuzz -# Condition: TINT_BUILD_FUZZERS AND TINT_BUILD_WGSL_WRITER -################################################################################ -tint_add_target(tint_lang_wgsl_writer_raise_fuzz fuzz - lang/wgsl/writer/raise/ptr_to_ref_fuzz.cc - lang/wgsl/writer/raise/raise_fuzz.cc - lang/wgsl/writer/raise/value_to_let_fuzz.cc - lang/wgsl/writer/raise/workgroup_uniform_load_fuzz.cc -) - -tint_target_add_dependencies(tint_lang_wgsl_writer_raise_fuzz fuzz - tint_api_common - tint_cmd_fuzz_common - tint_lang_core - tint_lang_core_constant - tint_lang_core_ir - tint_lang_core_ir_validator - tint_lang_core_type - tint_lang_wgsl_writer_raise - tint_utils - tint_utils_containers - tint_utils_diagnostic - tint_utils_ice - tint_utils_macros - tint_utils_math - tint_utils_memory - tint_utils_reflection - tint_utils_rtti - tint_utils_symbol - tint_utils_text -) - -tint_target_add_external_dependencies(tint_lang_wgsl_writer_raise_fuzz fuzz - "src_utils" -) - -endif(TINT_BUILD_FUZZERS AND TINT_BUILD_WGSL_WRITER) \ No newline at end of file +endif(TINT_BUILD_WGSL_WRITER) \ No newline at end of file
diff --git a/src/tint/utils/protos/ir_fuzz/BUILD.cmake b/src/tint/utils/protos/ir_fuzz/BUILD.cmake index acbdb67..3ae624a 100644 --- a/src/tint/utils/protos/ir_fuzz/BUILD.cmake +++ b/src/tint/utils/protos/ir_fuzz/BUILD.cmake
@@ -33,19 +33,3 @@ # # Do not modify this file directly ################################################################################ - -if(TINT_BUILD_IR_BINARY) -################################################################################ -# Target: tint_utils_protos_ir_fuzz_proto -# Kind: proto -# Condition: TINT_BUILD_IR_BINARY -################################################################################ -tint_add_target(tint_utils_protos_ir_fuzz_proto proto - utils/protos/ir_fuzz/ir_fuzz.proto -) - -tint_target_add_dependencies(tint_utils_protos_ir_fuzz_proto proto - tint_utils_protos_ir_proto -) - -endif(TINT_BUILD_IR_BINARY) \ No newline at end of file
diff --git a/third_party/CMakeLists.txt b/third_party/CMakeLists.txt index 3c85f56..c58d71c 100644 --- a/third_party/CMakeLists.txt +++ b/third_party/CMakeLists.txt
@@ -95,7 +95,7 @@ # Emscripten to the minimal set, only subdirectories added within the Start # and End of the Emscripten block are enabled . ################################################################################ -if ((DAWN_BUILD_TESTS OR TINT_BUILD_TESTS OR TINT_BUILD_FUZZTEST) AND NOT TARGET gmock) +if ((DAWN_BUILD_TESTS OR TINT_BUILD_TESTS) AND NOT TARGET gmock) set(gtest_force_shared_crt ON CACHE BOOL "Controls whether a shared run-time library should be used even when Google Test is built as static library" FORCE) if (EMSCRIPTEN) # For Emscripten builds, we need to disable pthreads. @@ -159,7 +159,7 @@ add_subdirectory(${DAWN_SPIRV_TOOLS_DIR} "${CMAKE_CURRENT_BINARY_DIR}/spirv-tools" EXCLUDE_FROM_ALL) endif() -if(NOT TARGET glslang AND (((TINT_BUILD_GLSL_WRITER OR TINT_BUILD_GLSL_VALIDATOR) AND TINT_BUILD_CMD_TOOLS) OR TINT_BUILD_MESA)) +if(NOT TARGET glslang AND (TINT_BUILD_GLSL_WRITER OR TINT_BUILD_GLSL_VALIDATOR) AND TINT_BUILD_CMD_TOOLS) set(SKIP_GLSLANG_INSTALL ON CACHE BOOL "" FORCE) set(ENABLE_OPT OFF CACHE BOOL "" FORCE) message(STATUS "Dawn: using GLSLang at ${DAWN_GLSLANG_DIR}") @@ -183,30 +183,6 @@ add_subdirectory(${DAWN_GLFW_DIR} "${CMAKE_CURRENT_BINARY_DIR}/glfw3/src") endif() -if (DAWN_BUILD_PROTOBUF AND NOT TARGET libprotobuf-mutator) - message(STATUS "Dawn: using LPM at ${DAWN_LPM_DIR}") - include("libprotobuf-mutator/BUILD.cmake") -endif() - -if (TINT_BUILD_FUZZTEST) - if (NOT TARGET re2) - if (NOT EXISTS "${DAWN_RE2_DIR}/CMakeLists.txt") - message(FATAL_ERROR "TINT_BUILD_FUZZTEST is enabled, but re2 was not found at '${DAWN_RE2_DIR}'. Ensure 'gclient sync' has been run.") - endif() - set(RE2_BUILD_TESTING OFF CACHE BOOL "" FORCE) - set(RE2_INSTALL OFF CACHE BOOL "" FORCE) - message(STATUS "Dawn: using RE2 at ${DAWN_RE2_DIR}") - add_subdirectory("${DAWN_RE2_DIR}" "${CMAKE_CURRENT_BINARY_DIR}/re2" EXCLUDE_FROM_ALL) - endif() - if (NOT TARGET fuzztest) - if (NOT EXISTS "${DAWN_FUZZTEST_DIR}/fuzztest/fuzztest.h") - message(FATAL_ERROR "TINT_BUILD_FUZZTEST is enabled, but fuzztest was not found at '${DAWN_FUZZTEST_DIR}'. Ensure 'gclient sync' has been run.") - endif() - message(STATUS "Dawn: using FuzzTest at ${DAWN_FUZZTEST_DIR}") - include("fuzztest/BUILD.cmake") - endif() -endif() - if (NOT TARGET renderdoc-api) add_library(RenderDocApi INTERFACE) target_include_directories(RenderDocApi INTERFACE "renderdoc") @@ -227,11 +203,6 @@ add_subdirectory(${DAWN_VULKAN_HEADERS_DIR} "${CMAKE_CURRENT_BINARY_DIR}/vulkan-headers/src") endif() -if (NOT TARGET Vulkan::Loader AND DAWN_ENABLE_VULKAN AND TINT_BUILD_FUZZER_VULKAN_SUPPORT) - message(STATUS "Dawn: using Vulkan::Loader at ${DAWN_VULKAN_LOADER_DIR}") - add_subdirectory(${DAWN_VULKAN_LOADER_DIR} "${CMAKE_CURRENT_BINARY_DIR}/vulkan-loader/src") -endif() - if (NOT TARGET Vulkan::UtilityHeaders AND DAWN_ENABLE_VULKAN) message(STATUS "Dawn: using VulkanUtilityLibraries at ${DAWN_VULKAN_UTILITY_LIBRARIES_DIR}") add_subdirectory(${DAWN_VULKAN_UTILITY_LIBRARIES_DIR} "${CMAKE_CURRENT_BINARY_DIR}/vulkan-utility-libraries/src") @@ -389,10 +360,6 @@ AddSubdirectoryDXC() endif() -if (TINT_BUILD_MESA) - add_subdirectory("${CMAKE_CURRENT_SOURCE_DIR}/mesa" "${CMAKE_CURRENT_BINARY_DIR}/mesa") -endif() - if (DAWN_USE_AGILITY_SDK AND NOT TARGET agility-sdk) add_subdirectory(${DAWN_AGILITY_SDK_DIR} "${CMAKE_CURRENT_BINARY_DIR}/agility-sdk") endif()
diff --git a/third_party/fuzztest/BUILD.cmake b/third_party/fuzztest/BUILD.cmake deleted file mode 100644 index 8963cde..0000000 --- a/third_party/fuzztest/BUILD.cmake +++ /dev/null
@@ -1,195 +0,0 @@ -# Copyright 2026 The Dawn & Tint Authors -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions are met: -# -# 1. Redistributions of source code must retain the above copyright notice, this -# list of conditions and the following disclaimer. -# -# 2. 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. -# -# 3. Neither the name of the copyright holder 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 HOLDER 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. - -# A minimal library target for FuzzTest in libFuzzer compatibility mode. -add_library(fuzztest STATIC EXCLUDE_FROM_ALL - "${DAWN_FUZZTEST_DIR}/common/bazel.cc" - "${DAWN_FUZZTEST_DIR}/common/blob_file.cc" - "${DAWN_FUZZTEST_DIR}/common/crashing_input_filename.cc" - "${DAWN_FUZZTEST_DIR}/common/hash.cc" - "${DAWN_FUZZTEST_DIR}/common/remote_file.cc" - "${DAWN_FUZZTEST_DIR}/common/remote_file_oss.cc" - "${DAWN_FUZZTEST_DIR}/common/sha1.cc" - "${DAWN_FUZZTEST_DIR}/common/temp_dir.cc" - "${DAWN_FUZZTEST_DIR}/fuzztest/fuzzing_bit_gen.cc" - "${DAWN_FUZZTEST_DIR}/fuzztest/fuzztest_macros.cc" - "${DAWN_FUZZTEST_DIR}/fuzztest/init_fuzztest.cc" - "${DAWN_FUZZTEST_DIR}/fuzztest/internal/compatibility_mode.cc" - "${DAWN_FUZZTEST_DIR}/fuzztest/internal/configuration.cc" - "${DAWN_FUZZTEST_DIR}/fuzztest/internal/corpus_database.cc" - "${DAWN_FUZZTEST_DIR}/fuzztest/internal/coverage.cc" - "${DAWN_FUZZTEST_DIR}/fuzztest/internal/domains/in_grammar_impl.cc" - "${DAWN_FUZZTEST_DIR}/fuzztest/internal/domains/in_regexp_impl.cc" - "${DAWN_FUZZTEST_DIR}/fuzztest/internal/domains/regexp_dfa.cc" - "${DAWN_FUZZTEST_DIR}/fuzztest/internal/domains/rune.cc" - "${DAWN_FUZZTEST_DIR}/fuzztest/internal/domains/utf.cc" - "${DAWN_FUZZTEST_DIR}/fuzztest/internal/escaping.cc" - "${DAWN_FUZZTEST_DIR}/fuzztest/internal/fixture_driver.cc" - "${DAWN_FUZZTEST_DIR}/fuzztest/internal/googletest_adaptor.cc" - "${DAWN_FUZZTEST_DIR}/fuzztest/internal/io.cc" - "${DAWN_FUZZTEST_DIR}/fuzztest/internal/logging.cc" - "${DAWN_FUZZTEST_DIR}/fuzztest/internal/register_absl_fuzzing_mocks.cc" - "${DAWN_FUZZTEST_DIR}/fuzztest/internal/registry.cc" - "${DAWN_FUZZTEST_DIR}/fuzztest/internal/runtime.cc" - "${DAWN_FUZZTEST_DIR}/fuzztest/internal/sanitizer_interface.cc" - "${DAWN_FUZZTEST_DIR}/fuzztest/internal/seed_seq.cc" - "${DAWN_FUZZTEST_DIR}/fuzztest/internal/serialization.cc" - "${DAWN_FUZZTEST_DIR}/fuzztest/internal/status.cc" - "${DAWN_FUZZTEST_DIR}/fuzztest/internal/subprocess.cc" - "${DAWN_FUZZTEST_DIR}/fuzztest/internal/type_support.cc" -) - -target_include_directories(fuzztest SYSTEM PUBLIC "${DAWN_FUZZTEST_DIR}") - -target_compile_definitions(fuzztest PUBLIC - "CENTIPEDE_DISABLE_RIEGELI" - "FUZZTEST_NO_LEGACY_COVERAGE" - "FUZZTEST_COMPATIBILITY_MODE" -) - -if ((DAWN_ENABLE_ASAN OR DAWN_ENABLE_MSAN) AND NOT CMAKE_CXX_FLAGS MATCHES "-fsanitize=[^ ]*(address|memory)") - # Dawn's DAWN_ENABLE_ASAN/DAWN_ENABLE_MSAN only instruments Dawn/Tint targets - # (via common_compile_options), not third_party/abseil-cpp. Keep Abseil - # container layouts (SwissTable/B-tree generations) ABI-compatible across the - # boundary when FuzzTest headers are included by instrumented Tint targets. - target_compile_definitions(fuzztest INTERFACE "NDEBUG_SANITIZER") -endif() - -if (NOT MSVC) - target_compile_options(fuzztest INTERFACE - -Wno-sign-compare - ) -endif() - -target_link_libraries(fuzztest PUBLIC - absl::absl_check - absl::absl_log - absl::algorithm_container - absl::any_invocable - absl::bind_front - absl::bits - absl::cord - absl::core_headers - absl::failure_signal_handler - absl::fast_type_id - absl::flags - absl::flags_parse - absl::flags_reflection - absl::flat_hash_map - absl::flat_hash_set - absl::function_ref - absl::hash - absl::int128 - absl::no_destructor - absl::nullability - absl::random_bit_gen_ref - absl::random_distributions - absl::random_mocking_access - absl::random_random - absl::random_seed_sequences - absl::span - absl::status - absl::statusor - absl::str_format - absl::string_view - absl::strings - absl::symbolize - absl::synchronization - absl::time - gtest - libprotobuf - re2 -) - -if (TINT_LIB_FUZZING_ENGINE_LINK_OPTIONS STREQUAL "") - # Resolve Clang's libFuzzer runtime without main() so FuzzTest's own main() - # can invoke LLVMFuzzerRunDriver in compatibility mode. - set(_fuzztest_fuzzer_no_main "") - foreach(_candidate - "libclang_rt.fuzzer_no_main-${CMAKE_SYSTEM_PROCESSOR}.a" - "libclang_rt.fuzzer_no_main.a" - "libclang_rt.fuzzer_no_main_osx.a" - "clang_rt.fuzzer_no_main-${CMAKE_SYSTEM_PROCESSOR}.lib" - "clang_rt.fuzzer_no_main-x86_64.lib" - ) - execute_process( - COMMAND "${CMAKE_CXX_COMPILER}" "-print-file-name=${_candidate}" - OUTPUT_VARIABLE _candidate_path - OUTPUT_STRIP_TRAILING_WHITESPACE - ERROR_QUIET - ) - if (_candidate_path AND NOT _candidate_path STREQUAL "${_candidate}" AND EXISTS "${_candidate_path}") - set(_fuzztest_fuzzer_no_main "${_candidate_path}") - break() - endif() - endforeach() - - if (NOT _fuzztest_fuzzer_no_main) - message(FATAL_ERROR "Failed to locate Clang's fuzzer_no_main runtime library using '${CMAKE_CXX_COMPILER}'") - endif() - - target_link_libraries(fuzztest PUBLIC "${_fuzztest_fuzzer_no_main}") - - if (NOT DAWN_ENABLE_ASAN AND NOT DAWN_ENABLE_MSAN AND NOT DAWN_ENABLE_TSAN) - foreach(_interceptor_candidate - "libclang_rt.fuzzer_interceptors-${CMAKE_SYSTEM_PROCESSOR}.a" - "libclang_rt.fuzzer_interceptors.a" - "libclang_rt.fuzzer_interceptors_osx.a" - ) - execute_process( - COMMAND "${CMAKE_CXX_COMPILER}" "-print-file-name=${_interceptor_candidate}" - OUTPUT_VARIABLE _interceptor_path - OUTPUT_STRIP_TRAILING_WHITESPACE - ERROR_QUIET - ) - if (_interceptor_path AND NOT _interceptor_path STREQUAL "${_interceptor_candidate}" AND EXISTS "${_interceptor_path}") - target_link_libraries(fuzztest PUBLIC "${_interceptor_path}") - break() - endif() - endforeach() - endif() -endif() - -if (NOT MSVC) - target_compile_options(fuzztest PRIVATE - -Wno-error - -fsanitize-coverage=0 - -Wno-sign-compare - -Wno-extra-semi - -Wno-unused-result - -Wno-unused-private-field - -Wno-unreachable-code-aggressive - -Wno-unused-but-set-variable - -Wno-shadow - -Wno-unused-const-variable - -Wno-unused-function - -Wno-inconsistent-missing-override - -Wno-unused-lambda-capture - -Wno-c++98-compat-extra-semi - -Wno-deprecated-declarations - ) -endif()
diff --git a/third_party/libprotobuf-mutator/BUILD.cmake b/third_party/libprotobuf-mutator/BUILD.cmake deleted file mode 100644 index 844bef5..0000000 --- a/third_party/libprotobuf-mutator/BUILD.cmake +++ /dev/null
@@ -1,41 +0,0 @@ -# Copyright 2024 The Dawn & Tint Authors -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions are met: -# -# 1. Redistributions of source code must retain the above copyright notice, this -# list of conditions and the following disclaimer. -# -# 2. 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. -# -# 3. Neither the name of the copyright holder 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 HOLDER 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. - -# A minimal set of libraries for LPM -add_library(libprotobuf-mutator - "${DAWN_LPM_DIR}/src/libfuzzer/libfuzzer_mutator.cc" - "${DAWN_LPM_DIR}/src/libfuzzer/libfuzzer_macro.cc" - "${DAWN_LPM_DIR}/src/binary_format.cc" - "${DAWN_LPM_DIR}/src/mutator.cc" - "${DAWN_LPM_DIR}/src/text_format.cc" - "${DAWN_LPM_DIR}/src/utf8_fix.cc") -target_include_directories(libprotobuf-mutator PUBLIC "${DAWN_LPM_DIR}") -target_link_libraries(libprotobuf-mutator - libprotobuf) -set_target_properties(libprotobuf-mutator PROPERTIES - COMPILE_FLAGS "${NO_FUZZING_FLAGS}" - SOVERSION 0)
diff --git a/third_party/mesa/CMakeLists.txt b/third_party/mesa/CMakeLists.txt deleted file mode 100644 index dc090a9..0000000 --- a/third_party/mesa/CMakeLists.txt +++ /dev/null
@@ -1,1155 +0,0 @@ -# Copyright 2026 The Dawn & Tint Authors -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions are met: -# -# 1. Redistributions of source code must retain the above copyright notice, this -# list of conditions and the following disclaimer. -# -# 2. 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. -# -# 3. Neither the name of the copyright holder 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 HOLDER 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. - -if(NOT UNIX OR APPLE) - message(FATAL_ERROR "Mesa Lavapipe build is currently only supported on Linux") -endif() - -enable_language(ASM) - -# Do not inherit root directory compile/link options (such as -Wno-c++20-compat -# which breaks ASM compilation, or -stdlib=libc++ which conflicts with the -# prebuilt libstdc++-based third_party/llvm-dev archives). -set_directory_properties(PROPERTIES COMPILE_OPTIONS "" LINK_OPTIONS "") - -set(MESA_LLVM_DEV_DIR "${DAWN_THIRD_PARTY_DIR}/llvm-dev" CACHE PATH "Path to llvm-dev prebuilts for Mesa") -set(MESA_ZSTD_DIR "${DAWN_THIRD_PARTY_DIR}/zstd" CACHE PATH "Path to zstd prebuilts for Mesa") - -include("${CMAKE_CURRENT_SOURCE_DIR}/mesa_sources.cmake") - -find_package(Python3 REQUIRED) - -set(_mesa_src_dir "${CMAKE_CURRENT_SOURCE_DIR}") -set(_mesa_gen_dir "${CMAKE_CURRENT_BINARY_DIR}") -set(_vpython_spec "${PROJECT_SOURCE_DIR}/vpython.toml") -set(_mesa_action_script "${_mesa_src_dir}/mesa_action.py") -set(_mesa_icd_json "${CMAKE_BINARY_DIR}/lvp_icd.json") - -# Ensure all output directories for generated files exist prior to running -# Mesa's Python codegen scripts. -file(MAKE_DIRECTORY - "${_mesa_gen_dir}/src" - "${_mesa_gen_dir}/src/compiler" - "${_mesa_gen_dir}/src/compiler/nir" - "${_mesa_gen_dir}/src/compiler/spirv" - "${_mesa_gen_dir}/src/gallium/auxiliary" - "${_mesa_gen_dir}/src/gallium/frontends/lavapipe" - "${_mesa_gen_dir}/src/util" - "${_mesa_gen_dir}/src/util/format" - "${_mesa_gen_dir}/src/vulkan/runtime" - "${_mesa_gen_dir}/src/vulkan/runtime/bvh" - "${_mesa_gen_dir}/src/vulkan/util" - "${_mesa_gen_dir}/src/vulkan/wsi" -) - -add_custom_command( - OUTPUT "${CMAKE_BINARY_DIR}/libzstd.so.1" - COMMAND ${CMAKE_COMMAND} -E copy_if_different - "${MESA_ZSTD_DIR}/lib/libzstd.so.1" - "${CMAKE_BINARY_DIR}/libzstd.so.1" - DEPENDS "${MESA_ZSTD_DIR}/lib/libzstd.so.1" - VERBATIM -) -add_custom_command( - OUTPUT "${CMAKE_BINARY_DIR}/libzstd.so.1.5.7" - COMMAND ${CMAKE_COMMAND} -E copy_if_different - "${MESA_ZSTD_DIR}/lib/libzstd.so.1.5.7" - "${CMAKE_BINARY_DIR}/libzstd.so.1.5.7" - DEPENDS "${MESA_ZSTD_DIR}/lib/libzstd.so.1.5.7" - VERBATIM -) -add_custom_target(mesa_copy_zstd DEPENDS - "${CMAKE_BINARY_DIR}/libzstd.so.1" - "${CMAKE_BINARY_DIR}/libzstd.so.1.5.7" -) - -# --------------------------------------------------------------------------- -# Codegen Actions (49 targets total, mirroring third_party/mesa/BUILD.gn) -# --------------------------------------------------------------------------- - -set(_mesa_all_codegen_outputs "") - -function(_mesa_action target_name) - cmake_parse_arguments(PARSE_ARGV 1 ARG - "CAPTURE_STDOUT" - "PYTHON_SCRIPT" - "INPUTS;OUTPUTS;ARGS;DEPENDS" - ) - set(_cmd_args - "--vpython-spec" "${_vpython_spec}" - ) - if(ARG_CAPTURE_STDOUT) - list(GET ARG_OUTPUTS 0 _first_out) - list(APPEND _cmd_args "--capture-stdout" "${_first_out}") - endif() - list(APPEND _cmd_args "--" "${ARG_PYTHON_SCRIPT}" ${ARG_ARGS}) - - add_custom_command( - OUTPUT ${ARG_OUTPUTS} - COMMAND ${Python3_EXECUTABLE} "${_mesa_action_script}" ${_cmd_args} - DEPENDS - "${_mesa_action_script}" - "${_vpython_spec}" - "${ARG_PYTHON_SCRIPT}" - ${ARG_INPUTS} - ${ARG_DEPENDS} - COMMENT "Generating ${target_name}" - VERBATIM - ) - - set(_outputs "${_mesa_all_codegen_outputs}") - list(APPEND _outputs ${ARG_OUTPUTS}) - set(_mesa_all_codegen_outputs "${_outputs}" PARENT_SCOPE) -endfunction() - -_mesa_action(mesa_git_sha1 - PYTHON_SCRIPT "${_mesa_src_dir}/src/bin/git_sha1_gen.py" - OUTPUTS "${_mesa_gen_dir}/src/git_sha1.h" - ARGS - "--output" - "${_mesa_gen_dir}/src/git_sha1.h" -) - -_mesa_action(mesa_driconf_static_h - PYTHON_SCRIPT "${_mesa_src_dir}/src/src/util/driconf_static.py" - INPUTS "${_mesa_src_dir}/src/src/util/00-mesa-defaults.conf" - OUTPUTS "${_mesa_gen_dir}/src/util/driconf_static.h" - ARGS - "${_mesa_src_dir}/src/src/util/00-mesa-defaults.conf" - "${_mesa_gen_dir}/src/util/driconf_static.h" -) - -_mesa_action(mesa_format_srgb_c - PYTHON_SCRIPT "${_mesa_src_dir}/src/src/util/format_srgb.py" - OUTPUTS "${_mesa_gen_dir}/src/util/format_srgb.c" - CAPTURE_STDOUT -) - -_mesa_action(mesa_shader_stats_h - PYTHON_SCRIPT "${_mesa_src_dir}/src/src/util/process_shader_stats.py" - INPUTS - "${_mesa_src_dir}/src/src/util/shader_stats.rnc" - "${_mesa_src_dir}/src/src/util/shader_stats.xml" - OUTPUTS "${_mesa_gen_dir}/src/util/shader_stats.h" - CAPTURE_STDOUT - ARGS - "${_mesa_src_dir}/src/src/util/shader_stats.rnc" - "${_mesa_src_dir}/src/src/util/shader_stats.xml" -) - -set(_u_format_inputs - "${_mesa_src_dir}/src/src/util/format/u_format.yaml" - "${_mesa_src_dir}/src/src/util/format/u_format_pack.py" - "${_mesa_src_dir}/src/src/util/format/u_format_parse.py" -) - -_mesa_action(mesa_u_format_gen_h - PYTHON_SCRIPT "${_mesa_src_dir}/src/src/util/format/u_format_table.py" - INPUTS ${_u_format_inputs} - OUTPUTS "${_mesa_gen_dir}/src/util/format/u_format_gen.h" - CAPTURE_STDOUT - ARGS - "${_mesa_src_dir}/src/src/util/format/u_format.yaml" - "--enums" -) - -_mesa_action(mesa_u_format_pack_h - PYTHON_SCRIPT "${_mesa_src_dir}/src/src/util/format/u_format_table.py" - INPUTS ${_u_format_inputs} - OUTPUTS "${_mesa_gen_dir}/src/util/format/u_format_pack.h" - CAPTURE_STDOUT - ARGS - "${_mesa_src_dir}/src/src/util/format/u_format.yaml" - "--header" -) - -_mesa_action(mesa_u_format_table_c - PYTHON_SCRIPT "${_mesa_src_dir}/src/src/util/format/u_format_table.py" - INPUTS ${_u_format_inputs} - OUTPUTS "${_mesa_gen_dir}/src/util/format/u_format_table.c" - CAPTURE_STDOUT - ARGS "${_mesa_src_dir}/src/src/util/format/u_format.yaml" -) - -_mesa_action(mesa_builtin_types_h - PYTHON_SCRIPT "${_mesa_src_dir}/src/src/compiler/builtin_types_h.py" - INPUTS "${_mesa_src_dir}/src/src/compiler/builtin_types.py" - OUTPUTS "${_mesa_gen_dir}/src/compiler/builtin_types.h" - ARGS "${_mesa_gen_dir}/src/compiler/builtin_types.h" -) - -_mesa_action(mesa_builtin_types_c - PYTHON_SCRIPT "${_mesa_src_dir}/src/src/compiler/builtin_types_c.py" - INPUTS "${_mesa_src_dir}/src/src/compiler/builtin_types.py" - OUTPUTS "${_mesa_gen_dir}/src/compiler/builtin_types.c" - ARGS "${_mesa_gen_dir}/src/compiler/builtin_types.c" -) - -_mesa_action(mesa_ir_expression_operation_h - PYTHON_SCRIPT "${_mesa_src_dir}/src/src/compiler/glsl/ir_expression_operation.py" - OUTPUTS "${_mesa_gen_dir}/src/compiler/ir_expression_operation.h" - CAPTURE_STDOUT - ARGS "enum" -) - -set(_nir_py_inputs - "${_mesa_src_dir}/src/src/compiler/nir/nir_intrinsics.py" - "${_mesa_src_dir}/src/src/compiler/nir/nir_opcodes.py" -) - -_mesa_action(mesa_nir_builder_opcodes_h - PYTHON_SCRIPT "${_mesa_src_dir}/src/src/compiler/nir/nir_builder_opcodes_h.py" - INPUTS ${_nir_py_inputs} - OUTPUTS "${_mesa_gen_dir}/src/compiler/nir/nir_builder_opcodes.h" - CAPTURE_STDOUT -) - -_mesa_action(mesa_nir_constant_expressions_c - PYTHON_SCRIPT "${_mesa_src_dir}/src/src/compiler/nir/nir_constant_expressions.py" - INPUTS ${_nir_py_inputs} - OUTPUTS "${_mesa_gen_dir}/src/compiler/nir/nir_constant_expressions.c" - CAPTURE_STDOUT -) - -_mesa_action(mesa_nir_opcodes_h - PYTHON_SCRIPT "${_mesa_src_dir}/src/src/compiler/nir/nir_opcodes_h.py" - INPUTS ${_nir_py_inputs} - OUTPUTS "${_mesa_gen_dir}/src/compiler/nir/nir_opcodes.h" - CAPTURE_STDOUT -) - -_mesa_action(mesa_nir_opcodes_c - PYTHON_SCRIPT "${_mesa_src_dir}/src/src/compiler/nir/nir_opcodes_c.py" - INPUTS ${_nir_py_inputs} - OUTPUTS "${_mesa_gen_dir}/src/compiler/nir/nir_opcodes.c" - CAPTURE_STDOUT -) - -_mesa_action(mesa_nir_opt_algebraic_c - PYTHON_SCRIPT "${_mesa_src_dir}/src/src/compiler/nir/nir_opt_algebraic.py" - INPUTS - ${_nir_py_inputs} - "${_mesa_src_dir}/src/src/compiler/nir/nir_algebraic.py" - OUTPUTS "${_mesa_gen_dir}/src/compiler/nir/nir_opt_algebraic.c" - ARGS - "--out" - "${_mesa_gen_dir}/src/compiler/nir/nir_opt_algebraic.c" -) - -_mesa_action(mesa_nir_intrinsics_h - PYTHON_SCRIPT "${_mesa_src_dir}/src/src/compiler/nir/nir_intrinsics_h.py" - INPUTS "${_mesa_src_dir}/src/src/compiler/nir/nir_intrinsics.py" - OUTPUTS "${_mesa_gen_dir}/src/compiler/nir/nir_intrinsics.h" - ARGS - "--out" - "${_mesa_gen_dir}/src/compiler/nir/nir_intrinsics.h" -) - -_mesa_action(mesa_nir_intrinsics_indices_h - PYTHON_SCRIPT "${_mesa_src_dir}/src/src/compiler/nir/nir_intrinsics_indices_h.py" - INPUTS "${_mesa_src_dir}/src/src/compiler/nir/nir_intrinsics.py" - OUTPUTS "${_mesa_gen_dir}/src/compiler/nir/nir_intrinsics_indices.h" - ARGS - "--out" - "${_mesa_gen_dir}/src/compiler/nir/nir_intrinsics_indices.h" -) - -_mesa_action(mesa_nir_intrinsics_c - PYTHON_SCRIPT "${_mesa_src_dir}/src/src/compiler/nir/nir_intrinsics_c.py" - INPUTS "${_mesa_src_dir}/src/src/compiler/nir/nir_intrinsics.py" - OUTPUTS "${_mesa_gen_dir}/src/compiler/nir/nir_intrinsics.c" - ARGS - "--out" - "${_mesa_gen_dir}/src/compiler/nir/nir_intrinsics.c" -) - -_mesa_action(mesa_vtn_gather_types_c - PYTHON_SCRIPT "${_mesa_src_dir}/src/src/compiler/spirv/vtn_gather_types_c.py" - INPUTS "${_mesa_src_dir}/src/src/compiler/spirv/spirv.core.grammar.json" - OUTPUTS "${_mesa_gen_dir}/src/compiler/spirv/vtn_gather_types.c" - ARGS - "${_mesa_src_dir}/src/src/compiler/spirv/spirv.core.grammar.json" - "${_mesa_gen_dir}/src/compiler/spirv/vtn_gather_types.c" -) - -_mesa_action(mesa_spirv_info - PYTHON_SCRIPT "${_mesa_src_dir}/src/src/compiler/spirv/spirv_info_gen.py" - INPUTS "${_mesa_src_dir}/src/src/compiler/spirv/spirv.core.grammar.json" - OUTPUTS - "${_mesa_gen_dir}/src/compiler/spirv/spirv_info.h" - "${_mesa_gen_dir}/src/compiler/spirv/spirv_info.c" - ARGS - "--json" - "${_mesa_src_dir}/src/src/compiler/spirv/spirv.core.grammar.json" - "--out-h" - "${_mesa_gen_dir}/src/compiler/spirv/spirv_info.h" - "--out-c" - "${_mesa_gen_dir}/src/compiler/spirv/spirv_info.c" -) - -_mesa_action(mesa_vtn_generator_ids_h - PYTHON_SCRIPT "${_mesa_src_dir}/src/src/compiler/spirv/vtn_generator_ids_h.py" - INPUTS "${_mesa_src_dir}/src/src/compiler/spirv/spir-v.xml" - OUTPUTS "${_mesa_gen_dir}/src/compiler/spirv/vtn_generator_ids.h" - ARGS - "${_mesa_src_dir}/src/src/compiler/spirv/spir-v.xml" - "${_mesa_gen_dir}/src/compiler/spirv/vtn_generator_ids.h" -) - -set(_vk_xml "${_mesa_src_dir}/src/src/vulkan/registry/vk.xml") -set(_vk_py_inputs - "${_vk_xml}" - "${_mesa_src_dir}/src/src/vulkan/util/vk_entrypoints.py" - "${_mesa_src_dir}/src/src/vulkan/util/vk_extensions.py" -) - -_mesa_action(mesa_vk_dispatch_table - PYTHON_SCRIPT "${_mesa_src_dir}/src/src/vulkan/util/vk_dispatch_table_gen.py" - INPUTS ${_vk_py_inputs} - OUTPUTS - "${_mesa_gen_dir}/src/vulkan/util/vk_dispatch_table.c" - "${_mesa_gen_dir}/src/vulkan/util/vk_dispatch_table.h" - ARGS - "--xml" - "${_vk_xml}" - "--out-c" - "${_mesa_gen_dir}/src/vulkan/util/vk_dispatch_table.c" - "--out-h" - "${_mesa_gen_dir}/src/vulkan/util/vk_dispatch_table.h" -) - -_mesa_action(mesa_vk_enum_to_str - PYTHON_SCRIPT "${_mesa_src_dir}/src/src/vulkan/util/gen_enum_to_str.py" - INPUTS ${_vk_py_inputs} - OUTPUTS - "${_mesa_gen_dir}/src/vulkan/util/vk_enum_to_str.c" - "${_mesa_gen_dir}/src/vulkan/util/vk_enum_to_str.h" - "${_mesa_gen_dir}/src/vulkan/util/vk_enum_defines.h" - ARGS - "--xml" - "${_vk_xml}" - "--out-c" - "${_mesa_gen_dir}/src/vulkan/util/vk_enum_to_str.c" - "--out-h" - "${_mesa_gen_dir}/src/vulkan/util/vk_enum_to_str.h" - "--out-d" - "${_mesa_gen_dir}/src/vulkan/util/vk_enum_defines.h" -) - -_mesa_action(mesa_vk_struct_type_cast - PYTHON_SCRIPT "${_mesa_src_dir}/src/src/vulkan/util/vk_struct_type_cast_gen.py" - INPUTS ${_vk_py_inputs} - OUTPUTS "${_mesa_gen_dir}/src/vulkan/util/vk_struct_type_cast.h" - ARGS - "--xml" - "${_vk_xml}" - "--out" - "${_mesa_gen_dir}/src/vulkan/util/vk_struct_type_cast.h" -) - -_mesa_action(mesa_vk_extensions - PYTHON_SCRIPT "${_mesa_src_dir}/src/src/vulkan/util/vk_extensions_gen.py" - INPUTS ${_vk_py_inputs} - OUTPUTS - "${_mesa_gen_dir}/src/vulkan/util/vk_extensions.c" - "${_mesa_gen_dir}/src/vulkan/util/vk_extensions.h" - ARGS - "--xml" - "${_vk_xml}" - "--out-c" - "${_mesa_gen_dir}/src/vulkan/util/vk_extensions.c" - "--out-h" - "${_mesa_gen_dir}/src/vulkan/util/vk_extensions.h" -) - -_mesa_action(mesa_vk_common_entrypoints - PYTHON_SCRIPT "${_mesa_src_dir}/src/src/vulkan/util/vk_entrypoints_gen.py" - INPUTS ${_vk_py_inputs} - OUTPUTS - "${_mesa_gen_dir}/src/vulkan/runtime/vk_common_entrypoints.h" - "${_mesa_gen_dir}/src/vulkan/runtime/vk_common_entrypoints.c" - ARGS - "--xml" - "${_vk_xml}" - "--proto" - "--weak" - "--out-h" - "${_mesa_gen_dir}/src/vulkan/runtime/vk_common_entrypoints.h" - "--out-c" - "${_mesa_gen_dir}/src/vulkan/runtime/vk_common_entrypoints.c" - "--prefix" - "vk_common" -) - -_mesa_action(mesa_vk_cmd_queue - PYTHON_SCRIPT "${_mesa_src_dir}/src/src/vulkan/util/vk_cmd_queue_gen.py" - INPUTS ${_vk_py_inputs} - OUTPUTS - "${_mesa_gen_dir}/src/vulkan/runtime/vk_cmd_queue.c" - "${_mesa_gen_dir}/src/vulkan/runtime/vk_cmd_queue.h" - ARGS - "--xml" - "${_vk_xml}" - "--out-c" - "${_mesa_gen_dir}/src/vulkan/runtime/vk_cmd_queue.c" - "--out-h" - "${_mesa_gen_dir}/src/vulkan/runtime/vk_cmd_queue.h" -) - -_mesa_action(mesa_vk_cmd_enqueue_entrypoints - PYTHON_SCRIPT "${_mesa_src_dir}/src/src/vulkan/util/vk_entrypoints_gen.py" - INPUTS ${_vk_py_inputs} - OUTPUTS - "${_mesa_gen_dir}/src/vulkan/runtime/vk_cmd_enqueue_entrypoints.h" - "${_mesa_gen_dir}/src/vulkan/runtime/vk_cmd_enqueue_entrypoints.c" - ARGS - "--xml" - "${_vk_xml}" - "--proto" - "--weak" - "--out-h" - "${_mesa_gen_dir}/src/vulkan/runtime/vk_cmd_enqueue_entrypoints.h" - "--out-c" - "${_mesa_gen_dir}/src/vulkan/runtime/vk_cmd_enqueue_entrypoints.c" - "--prefix" - "vk_cmd_enqueue" - "--prefix" - "vk_cmd_enqueue_unless_primary" -) - -_mesa_action(mesa_vk_dispatch_trampolines - PYTHON_SCRIPT "${_mesa_src_dir}/src/src/vulkan/util/vk_dispatch_trampolines_gen.py" - INPUTS ${_vk_py_inputs} - OUTPUTS - "${_mesa_gen_dir}/src/vulkan/runtime/vk_dispatch_trampolines.c" - "${_mesa_gen_dir}/src/vulkan/runtime/vk_dispatch_trampolines.h" - ARGS - "--xml" - "${_vk_xml}" - "--out-c" - "${_mesa_gen_dir}/src/vulkan/runtime/vk_dispatch_trampolines.c" - "--out-h" - "${_mesa_gen_dir}/src/vulkan/runtime/vk_dispatch_trampolines.h" -) - -_mesa_action(mesa_vk_physical_device_features - PYTHON_SCRIPT "${_mesa_src_dir}/src/src/vulkan/util/vk_physical_device_features_gen.py" - INPUTS ${_vk_py_inputs} - OUTPUTS - "${_mesa_gen_dir}/src/vulkan/runtime/vk_physical_device_features.c" - "${_mesa_gen_dir}/src/vulkan/runtime/vk_physical_device_features.h" - ARGS - "--xml" - "${_vk_xml}" - "--out-c" - "${_mesa_gen_dir}/src/vulkan/runtime/vk_physical_device_features.c" - "--out-h" - "${_mesa_gen_dir}/src/vulkan/runtime/vk_physical_device_features.h" -) - -_mesa_action(mesa_vk_physical_device_properties - PYTHON_SCRIPT "${_mesa_src_dir}/src/src/vulkan/util/vk_physical_device_properties_gen.py" - INPUTS ${_vk_py_inputs} - OUTPUTS - "${_mesa_gen_dir}/src/vulkan/runtime/vk_physical_device_properties.c" - "${_mesa_gen_dir}/src/vulkan/runtime/vk_physical_device_properties.h" - ARGS - "--xml" - "${_vk_xml}" - "--out-c" - "${_mesa_gen_dir}/src/vulkan/runtime/vk_physical_device_properties.c" - "--out-h" - "${_mesa_gen_dir}/src/vulkan/runtime/vk_physical_device_properties.h" -) - -_mesa_action(mesa_vk_physical_device_spirv_caps - PYTHON_SCRIPT "${_mesa_src_dir}/src/src/vulkan/util/vk_physical_device_spirv_caps_gen.py" - INPUTS - ${_vk_py_inputs} - "${_mesa_src_dir}/src/src/vulkan/util/vk_physical_device_features_gen.py" - OUTPUTS "${_mesa_gen_dir}/src/vulkan/runtime/vk_physical_device_spirv_caps.c" - ARGS - "--xml" - "${_vk_xml}" - "--out-c" - "${_mesa_gen_dir}/src/vulkan/runtime/vk_physical_device_spirv_caps.c" -) - -_mesa_action(mesa_vk_synchronization_helpers - PYTHON_SCRIPT "${_mesa_src_dir}/src/src/vulkan/util/vk_synchronization_helpers_gen.py" - INPUTS ${_vk_py_inputs} - OUTPUTS "${_mesa_gen_dir}/src/vulkan/runtime/vk_synchronization_helpers.c" - ARGS - "--xml" - "${_vk_xml}" - "--out-c" - "${_mesa_gen_dir}/src/vulkan/runtime/vk_synchronization_helpers.c" -) - -_mesa_action(mesa_vk_format_info - PYTHON_SCRIPT "${_mesa_src_dir}/src/src/vulkan/runtime/vk_format_info_gen.py" - INPUTS ${_vk_py_inputs} - OUTPUTS - "${_mesa_gen_dir}/src/vulkan/runtime/vk_format_info.c" - "${_mesa_gen_dir}/src/vulkan/runtime/vk_format_info.h" - ARGS - "--xml" - "${_vk_xml}" - "--out-c" - "${_mesa_gen_dir}/src/vulkan/runtime/vk_format_info.c" - "--out-h" - "${_mesa_gen_dir}/src/vulkan/runtime/vk_format_info.h" -) - -# GLSL -> SPIR-V header codegen using glslang-standalone -set(_bvh_sources - "src/src/vulkan/runtime/bvh/hploc_internal.comp" - "src/src/vulkan/runtime/bvh/id_prefix_sum.comp" - "src/src/vulkan/runtime/bvh/lbvh_generate_ir.comp" - "src/src/vulkan/runtime/bvh/lbvh_main.comp" - "src/src/vulkan/runtime/bvh/leaf.comp" - "src/src/vulkan/runtime/bvh/pair_triangles.comp" - "src/src/vulkan/runtime/bvh/ploc_internal.comp" -) -set(_bvh_inputs - "${_mesa_src_dir}/src/src/compiler/spirv/spirv_internal_exts.h" - "${_mesa_src_dir}/src/src/vulkan/runtime/bvh/leaf.h" - "${_mesa_src_dir}/src/src/vulkan/runtime/bvh/pair_triangles.h" - "${_mesa_src_dir}/src/src/vulkan/runtime/bvh/vk_bvh_defines.h" - "${_mesa_src_dir}/src/src/vulkan/runtime/bvh/vk_bvh_helpers.h" - "${_mesa_src_dir}/src/src/vulkan/runtime/bvh/vk_debug.h" -) -set(_bvh_preamble_args - --quiet - "-P#extension GL_GOOGLE_include_directive : require" - "-P#extension GL_EXT_control_flow_attributes : require" - "-P#extension GL_EXT_shader_explicit_arithmetic_types_int8 : require" - "-P#extension GL_EXT_shader_explicit_arithmetic_types_int16 : require" - "-P#extension GL_EXT_shader_explicit_arithmetic_types_int32 : require" - "-P#extension GL_EXT_shader_explicit_arithmetic_types_int64 : require" - "-P#extension GL_EXT_shader_explicit_arithmetic_types_float16 : require" - "-P#extension GL_EXT_scalar_block_layout : require" - "-P#extension GL_EXT_buffer_reference : require" - "-P#extension GL_EXT_buffer_reference2 : require" - "-P#extension GL_KHR_memory_scope_semantics : require" - "-P#extension GL_KHR_shader_subgroup_arithmetic : require" - "-P#extension GL_KHR_shader_subgroup_basic : require" - "-P#extension GL_KHR_shader_subgroup_shuffle : require" - "-P#extension GL_KHR_shader_subgroup_ballot : require" - "-P#extension GL_KHR_shader_subgroup_clustered : require" - "-P#extension GL_KHR_shader_subgroup_vote : require" - "-P#extension GL_EXT_shader_atomic_int64 : require" - "-P#extension GL_EXT_spirv_intrinsics : require" - "-P#extension GL_EXT_shared_memory_block : require" -) -foreach(_shader IN LISTS _bvh_sources) - get_filename_component(_name_part "${_shader}" NAME_WE) - set(_out "${_mesa_gen_dir}/src/vulkan/runtime/bvh/${_name_part}.spv.h") - add_custom_command( - OUTPUT "${_out}" - COMMAND $<TARGET_FILE:glslang-standalone> - -V - "-I${_mesa_src_dir}/src/src/vulkan/runtime/bvh" - "-I${_mesa_src_dir}/src/src/compiler/spirv" - --target-env spirv1.5 - -x - -o "${_out}" - "${_mesa_src_dir}/${_shader}" - ${_bvh_preamble_args} - DEPENDS - glslang-standalone - "${_mesa_src_dir}/${_shader}" - ${_bvh_inputs} - VERBATIM - ) - list(APPEND _mesa_all_codegen_outputs "${_out}") -endforeach() - -set(_morton_sort_src "${_mesa_src_dir}/src/src/vulkan/runtime/bvh/morton_sort.comp") -set(_morton_sort_32_out "${_mesa_gen_dir}/src/vulkan/runtime/bvh/morton_sort_32.spv.h") -add_custom_command( - OUTPUT "${_morton_sort_32_out}" - COMMAND $<TARGET_FILE:glslang-standalone> - -V - "-I${_mesa_src_dir}/src/src/vulkan/runtime/bvh" - "-I${_mesa_src_dir}/src/src/compiler/spirv" - --target-env spirv1.5 - -x - -o "${_morton_sort_32_out}" - "${_morton_sort_src}" - ${_bvh_preamble_args} - DEPENDS - glslang-standalone - "${_morton_sort_src}" - ${_bvh_inputs} - VERBATIM -) -list(APPEND _mesa_all_codegen_outputs "${_morton_sort_32_out}") - -set(_morton_sort_64_out "${_mesa_gen_dir}/src/vulkan/runtime/bvh/morton_sort_64.spv.h") -add_custom_command( - OUTPUT "${_morton_sort_64_out}" - COMMAND $<TARGET_FILE:glslang-standalone> - -V - "-I${_mesa_src_dir}/src/src/vulkan/runtime/bvh" - "-I${_mesa_src_dir}/src/src/compiler/spirv" - --target-env spirv1.5 - -x - -o "${_morton_sort_64_out}" - "${_morton_sort_src}" - -DMORTON_SORT_KEY64=1 - ${_bvh_preamble_args} - DEPENDS - glslang-standalone - "${_morton_sort_src}" - ${_bvh_inputs} - VERBATIM -) -list(APPEND _mesa_all_codegen_outputs "${_morton_sort_64_out}") - -set(_astc_out "${_mesa_gen_dir}/src/vulkan/runtime/astc_spv.h") -add_custom_command( - OUTPUT "${_astc_out}" - COMMAND $<TARGET_FILE:glslang-standalone> - -V - --target-env spirv1.2 - -S comp - -x - -o "${_astc_out}" - "${_mesa_src_dir}/src/src/compiler/glsl/astc_decoder.glsl" - --quiet - DEPENDS - glslang-standalone - "${_mesa_src_dir}/src/src/compiler/glsl/astc_decoder.glsl" - VERBATIM -) -list(APPEND _mesa_all_codegen_outputs "${_astc_out}") - -_mesa_action(mesa_wsi_entrypoints - PYTHON_SCRIPT "${_mesa_src_dir}/src/src/vulkan/util/vk_entrypoints_gen.py" - INPUTS ${_vk_py_inputs} - OUTPUTS - "${_mesa_gen_dir}/src/vulkan/wsi/wsi_common_entrypoints.h" - "${_mesa_gen_dir}/src/vulkan/wsi/wsi_common_entrypoints.c" - ARGS - "--xml" - "${_vk_xml}" - "--proto" - "--weak" - "--out-h" - "${_mesa_gen_dir}/src/vulkan/wsi/wsi_common_entrypoints.h" - "--out-c" - "${_mesa_gen_dir}/src/vulkan/wsi/wsi_common_entrypoints.c" - "--prefix" - "wsi" -) - -_mesa_action(mesa_tr_util - PYTHON_SCRIPT "${_mesa_src_dir}/src/src/gallium/auxiliary/driver_trace/enums2names.py" - INPUTS - "${_mesa_src_dir}/src/src/gallium/include/pipe/p_defines.h" - "${_mesa_src_dir}/src/src/gallium/include/pipe/p_video_enums.h" - "${_mesa_src_dir}/src/src/util/blend.h" - OUTPUTS - "${_mesa_gen_dir}/src/gallium/auxiliary/tr_util.c" - "${_mesa_gen_dir}/src/gallium/auxiliary/tr_util.h" - ARGS - "${_mesa_src_dir}/src/src/gallium/include/pipe/p_defines.h" - "${_mesa_src_dir}/src/src/gallium/include/pipe/p_video_enums.h" - "${_mesa_src_dir}/src/src/util/blend.h" - "-C" - "${_mesa_gen_dir}/src/gallium/auxiliary/tr_util.c" - "-H" - "${_mesa_gen_dir}/src/gallium/auxiliary/tr_util.h" -) - -_mesa_action(mesa_u_tracepoints_c - PYTHON_SCRIPT "${_mesa_src_dir}/src/src/gallium/auxiliary/util/u_tracepoints.py" - INPUTS "${_mesa_src_dir}/src/src/util/perf/u_trace.py" - OUTPUTS "${_mesa_gen_dir}/src/gallium/auxiliary/u_tracepoints.c" - ARGS - "-p" - "${_mesa_src_dir}/src/src/util/perf" - "-C" - "${_mesa_gen_dir}/src/gallium/auxiliary/u_tracepoints.c" -) - -_mesa_action(mesa_u_tracepoints_h - PYTHON_SCRIPT "${_mesa_src_dir}/src/src/gallium/auxiliary/util/u_tracepoints.py" - INPUTS "${_mesa_src_dir}/src/src/util/perf/u_trace.py" - OUTPUTS "${_mesa_gen_dir}/src/gallium/auxiliary/u_tracepoints.h" - ARGS - "-p" - "${_mesa_src_dir}/src/src/util/perf" - "-H" - "${_mesa_gen_dir}/src/gallium/auxiliary/u_tracepoints.h" -) - -_mesa_action(mesa_u_indices_gen_c - PYTHON_SCRIPT "${_mesa_src_dir}/src/src/gallium/auxiliary/indices/u_indices_gen.py" - OUTPUTS "${_mesa_gen_dir}/src/gallium/auxiliary/u_indices_gen.c" - ARGS "${_mesa_gen_dir}/src/gallium/auxiliary/u_indices_gen.c" -) - -_mesa_action(mesa_u_unfilled_gen_c - PYTHON_SCRIPT "${_mesa_src_dir}/src/src/gallium/auxiliary/indices/u_unfilled_gen.py" - OUTPUTS "${_mesa_gen_dir}/src/gallium/auxiliary/u_unfilled_gen.c" - ARGS "${_mesa_gen_dir}/src/gallium/auxiliary/u_unfilled_gen.c" -) - -_mesa_action(mesa_draw_nir_lower_opcodes_c - PYTHON_SCRIPT "${_mesa_src_dir}/src/src/gallium/auxiliary/draw/draw_nir_lower_opcodes.py" - INPUTS - ${_nir_py_inputs} - "${_mesa_src_dir}/src/src/compiler/nir/nir_algebraic.py" - OUTPUTS "${_mesa_gen_dir}/src/gallium/auxiliary/draw_nir_lower_opcodes.c" - CAPTURE_STDOUT - ARGS - "-p" - "${_mesa_src_dir}/src/src/compiler/nir" -) - -_mesa_action(mesa_lp_bld_nir_no_integer_algebraic_c - PYTHON_SCRIPT "${_mesa_src_dir}/src/src/gallium/auxiliary/gallivm/lp_bld_nir_no_integer_algebraic.py" - INPUTS - ${_nir_py_inputs} - "${_mesa_src_dir}/src/src/compiler/nir/nir_algebraic.py" - OUTPUTS "${_mesa_gen_dir}/src/gallium/auxiliary/lp_bld_nir_no_integer_algebraic.c" - CAPTURE_STDOUT - ARGS - "-p" - "${_mesa_src_dir}/src/src/compiler/nir" -) - -_mesa_action(mesa_lvp_drirc - PYTHON_SCRIPT "${_mesa_src_dir}/src/src/gallium/frontends/lavapipe/lvp_drirc_gen.py" - INPUTS - "${_mesa_src_dir}/src/src/gallium/frontends/lavapipe/00-lavapipe-defaults.conf" - "${_mesa_src_dir}/src/src/util/drirc_gen.py" - OUTPUTS - "${_mesa_gen_dir}/src/gallium/frontends/lavapipe/lvp_drirc.c" - "${_mesa_gen_dir}/src/gallium/frontends/lavapipe/lvp_drirc.h" - ARGS - "--import-path" - "${_mesa_src_dir}/src/src/util" - "--drirc-src" - "${_mesa_gen_dir}/src/gallium/frontends/lavapipe/lvp_drirc.c" - "--drirc-hdr" - "${_mesa_gen_dir}/src/gallium/frontends/lavapipe/lvp_drirc.h" - "--validate" - "${_mesa_src_dir}/src/src/gallium/frontends/lavapipe/00-lavapipe-defaults.conf" -) - -_mesa_action(mesa_lvp_entrypoints - PYTHON_SCRIPT "${_mesa_src_dir}/src/src/vulkan/util/vk_entrypoints_gen.py" - INPUTS ${_vk_py_inputs} - OUTPUTS - "${_mesa_gen_dir}/src/gallium/frontends/lavapipe/lvp_entrypoints.h" - "${_mesa_gen_dir}/src/gallium/frontends/lavapipe/lvp_entrypoints.c" - ARGS - "--xml" - "${_vk_xml}" - "--proto" - "--weak" - "--out-h" - "${_mesa_gen_dir}/src/gallium/frontends/lavapipe/lvp_entrypoints.h" - "--out-c" - "${_mesa_gen_dir}/src/gallium/frontends/lavapipe/lvp_entrypoints.c" - "--prefix" - "lvp" -) - -_mesa_action(mesa_icd_json - PYTHON_SCRIPT "${_mesa_src_dir}/src/src/vulkan/util/vk_icd_gen.py" - INPUTS "${_vk_xml}" - OUTPUTS "${_mesa_icd_json}" - ARGS - "--api-version" - "1.4" - "--xml" - "${_vk_xml}" - "--sizeof-pointer" - "8" - "--icd-lib-path" - "." - "--icd-filename" - "./libvulkan_lvp.so" - "--out" - "${_mesa_icd_json}" -) - -add_custom_target(mesa_all_codegen DEPENDS ${_mesa_all_codegen_outputs}) - -# --------------------------------------------------------------------------- -# Compilation Config & Object Libraries -# --------------------------------------------------------------------------- - -set(_mesa_include_dirs - "${_mesa_gen_dir}/src" - "${_mesa_gen_dir}/src/compiler" - "${_mesa_gen_dir}/src/compiler/nir" - "${_mesa_gen_dir}/src/compiler/spirv" - "${_mesa_gen_dir}/src/gallium/auxiliary" - "${_mesa_gen_dir}/src/gallium/frontends/lavapipe" - "${_mesa_gen_dir}/src/util" - "${_mesa_gen_dir}/src/util/format" - "${_mesa_gen_dir}/src/vulkan/runtime" - "${_mesa_gen_dir}/src/vulkan/runtime/bvh" - "${_mesa_gen_dir}/src/vulkan/util" - "${_mesa_gen_dir}/src/vulkan/wsi" - "${_mesa_src_dir}/src/include" - "${_mesa_src_dir}/src/src" - "${_mesa_src_dir}/src/src/c11/impl" - "${_mesa_src_dir}/src/src/compiler" - "${_mesa_src_dir}/src/src/compiler/nir" - "${_mesa_src_dir}/src/src/compiler/spirv" - "${_mesa_src_dir}/src/src/gallium/auxiliary" - "${_mesa_src_dir}/src/src/gallium/auxiliary/pipe-loader" - "${_mesa_src_dir}/src/src/gallium/auxiliary/util" - "${_mesa_src_dir}/src/src/gallium/drivers" - "${_mesa_src_dir}/src/src/gallium/drivers/llvmpipe" - "${_mesa_src_dir}/src/src/gallium/frontends/lavapipe" - "${_mesa_src_dir}/src/src/gallium/include" - "${_mesa_src_dir}/src/src/gallium/targets/lavapipe" - "${_mesa_src_dir}/src/src/gallium/winsys" - "${_mesa_src_dir}/src/src/gallium/winsys/sw/null" - "${_mesa_src_dir}/src/src/gallium/winsys/sw/wrapper" - "${_mesa_src_dir}/src/src/util" - "${_mesa_src_dir}/src/src/util/blake3" - "${_mesa_src_dir}/src/src/util/format" - "${_mesa_src_dir}/src/src/vulkan/runtime" - "${_mesa_src_dir}/src/src/vulkan/runtime/bvh" - "${_mesa_src_dir}/src/src/vulkan/util" - "${_mesa_src_dir}/src/src/vulkan/wsi" - "${MESA_ZSTD_DIR}/include" -) - -function(_mesa_source_set target_name) - cmake_parse_arguments(PARSE_ARGV 1 ARG - "" - "" - "SOURCES;DEFINES;CFLAGS;DEPS" - ) - set(_resolved_sources "") - foreach(_src IN LISTS ARG_SOURCES) - if(IS_ABSOLUTE "${_src}") - list(APPEND _resolved_sources "${_src}") - else() - list(APPEND _resolved_sources "${_mesa_src_dir}/${_src}") - endif() - endforeach() - - add_library(${target_name} OBJECT ${_resolved_sources}) - set_target_properties(${target_name} PROPERTIES - POSITION_INDEPENDENT_CODE ON - ) - target_include_directories(${target_name} SYSTEM PRIVATE - "${MESA_LLVM_DEV_DIR}/include" - ) - target_include_directories(${target_name} PRIVATE - ${_mesa_include_dirs} - ) - target_compile_definitions(${target_name} PRIVATE - ${mesa_common_defines} - ${ARG_DEFINES} - ) - target_compile_options(${target_name} PRIVATE - "$<$<COMPILE_LANGUAGE:C,CXX>:${mesa_common_cflags}>" - "$<$<COMPILE_LANGUAGE:C>:${mesa_common_cflags_c}>" - "$<$<COMPILE_LANGUAGE:CXX>:${mesa_common_cflags_cc}>" - ) - if(ARG_CFLAGS) - target_compile_options(${target_name} PRIVATE - "$<$<COMPILE_LANGUAGE:C,CXX>:${ARG_CFLAGS}>" - ) - endif() - if(DAWN_EMIT_COVERAGE AND (COMPILER_IS_CLANG OR COMPILER_IS_CLANG_CL)) - target_compile_options(${target_name} PRIVATE - "$<$<COMPILE_LANGUAGE:C,CXX>:-fprofile-instr-generate;-fcoverage-mapping>" - ) - endif() - if(DAWN_ENABLE_ASAN) - target_compile_options(${target_name} PRIVATE - "$<$<COMPILE_LANGUAGE:C,CXX>:-fsanitize=address>" - ) - if(COMPILER_IS_CLANG) - target_compile_options(${target_name} PRIVATE - "$<$<COMPILE_LANGUAGE:C,CXX>:-fno-sanitize-address-globals-dead-stripping>" - ) - endif() - endif() - if(DAWN_ENABLE_UBSAN) - target_compile_options(${target_name} PRIVATE - "$<$<COMPILE_LANGUAGE:C,CXX>:-fsanitize=undefined;-fno-sanitize=vptr>" - ) - if(COMPILER_IS_CLANG) - target_compile_options(${target_name} PRIVATE - "$<$<COMPILE_LANGUAGE:C,CXX>:-fsanitize-ignorelist=${CMAKE_CURRENT_SOURCE_DIR}/ubsan_ignorelist.txt>" - ) - set_property(SOURCE ${_resolved_sources} APPEND PROPERTY - OBJECT_DEPENDS "${CMAKE_CURRENT_SOURCE_DIR}/ubsan_ignorelist.txt" - ) - endif() - endif() - if(TINT_BUILD_FUZZERS AND COMPILER_IS_CLANG) - target_compile_options(${target_name} PRIVATE - "$<$<COMPILE_LANGUAGE:C,CXX>:-fsanitize=fuzzer-no-link>" - ) - endif() - - add_dependencies(${target_name} mesa_all_codegen) - if(ARG_DEPS) - add_dependencies(${target_name} ${ARG_DEPS}) - endif() -endfunction() - -_mesa_source_set(mesa_util_c11 - SOURCES ${mesa_util_c11_sources} -) - -_mesa_source_set(mesa_blake3 - SOURCES ${mesa_blake3_sources} -) - -_mesa_source_set(mesa_util_clflush - SOURCES ${mesa_util_clflush_sources} -) - -_mesa_source_set(mesa_util_clflushopt - SOURCES ${mesa_util_clflushopt_sources} - CFLAGS "-mclflushopt" -) - -_mesa_source_set(mesa_util_simd - SOURCES ${mesa_util_simd_sources} - CFLAGS "-msse4.1" -) - -_mesa_source_set(mesa_xmlconfig - SOURCES ${mesa_xmlconfig_sources} - DEFINES "WITH_XMLCONFIG=0" -) - -_mesa_source_set(mesa_util - SOURCES - ${mesa_util_static_sources} - "${_mesa_gen_dir}/src/util/format/u_format_table.c" - "${_mesa_gen_dir}/src/util/format_srgb.c" - DEPS - mesa_blake3 - mesa_util_c11 - mesa_util_clflush - mesa_util_clflushopt - mesa_util_simd - mesa_xmlconfig -) - -_mesa_source_set(mesa_compiler - SOURCES - ${mesa_compiler_static_sources} - "${_mesa_gen_dir}/src/compiler/builtin_types.c" - DEPS - mesa_util -) - -_mesa_source_set(mesa_nir - SOURCES - ${mesa_nir_static_sources} - "${_mesa_gen_dir}/src/compiler/nir/nir_constant_expressions.c" - "${_mesa_gen_dir}/src/compiler/nir/nir_intrinsics.c" - "${_mesa_gen_dir}/src/compiler/nir/nir_opcodes.c" - "${_mesa_gen_dir}/src/compiler/nir/nir_opt_algebraic.c" - DEPS - mesa_compiler - mesa_util -) - -_mesa_source_set(mesa_vtn - SOURCES - ${mesa_vtn_static_sources} - "${_mesa_gen_dir}/src/compiler/spirv/spirv_info.c" - "${_mesa_gen_dir}/src/compiler/spirv/vtn_gather_types.c" - DEPS - mesa_nir - mesa_util -) - -_mesa_source_set(mesa_vulkan_util - SOURCES - ${mesa_vulkan_util_static_sources} - "${_mesa_gen_dir}/src/vulkan/util/vk_dispatch_table.c" - "${_mesa_gen_dir}/src/vulkan/util/vk_enum_to_str.c" - "${_mesa_gen_dir}/src/vulkan/util/vk_extensions.c" - DEPS - mesa_compiler - mesa_util -) - -_mesa_source_set(mesa_vulkan_runtime - SOURCES - ${mesa_vulkan_runtime_static_sources} - "${_mesa_gen_dir}/src/vulkan/runtime/vk_cmd_enqueue_entrypoints.c" - "${_mesa_gen_dir}/src/vulkan/runtime/vk_cmd_queue.c" - "${_mesa_gen_dir}/src/vulkan/runtime/vk_common_entrypoints.c" - "${_mesa_gen_dir}/src/vulkan/runtime/vk_dispatch_trampolines.c" - "${_mesa_gen_dir}/src/vulkan/runtime/vk_format_info.c" - "${_mesa_gen_dir}/src/vulkan/runtime/vk_physical_device_features.c" - "${_mesa_gen_dir}/src/vulkan/runtime/vk_physical_device_properties.c" - "${_mesa_gen_dir}/src/vulkan/runtime/vk_physical_device_spirv_caps.c" - "${_mesa_gen_dir}/src/vulkan/runtime/vk_synchronization_helpers.c" - "${_mesa_gen_dir}/src/vulkan/wsi/wsi_common_entrypoints.c" - DEFINES - "MESA_VK_LOG=0" - "VK_LITE_RUNTIME_INSTANCE=0" - DEPS - mesa_nir - mesa_util - mesa_vtn - mesa_vulkan_util -) - -_mesa_source_set(mesa_gallium_aux - SOURCES - ${mesa_gallium_aux_static_sources} - "${_mesa_gen_dir}/src/gallium/auxiliary/draw_nir_lower_opcodes.c" - "${_mesa_gen_dir}/src/gallium/auxiliary/lp_bld_nir_no_integer_algebraic.c" - "${_mesa_gen_dir}/src/gallium/auxiliary/tr_util.c" - "${_mesa_gen_dir}/src/gallium/auxiliary/u_indices_gen.c" - "${_mesa_gen_dir}/src/gallium/auxiliary/u_tracepoints.c" - "${_mesa_gen_dir}/src/gallium/auxiliary/u_unfilled_gen.c" - DEPS - mesa_nir - mesa_util -) - -_mesa_source_set(mesa_llvmpipe - SOURCES ${mesa_llvmpipe_sources} - DEPS - mesa_gallium_aux - mesa_nir - mesa_util -) - -_mesa_source_set(mesa_lavapipe - SOURCES - ${mesa_lavapipe_static_sources} - "${_mesa_gen_dir}/src/gallium/frontends/lavapipe/lvp_drirc.c" - "${_mesa_gen_dir}/src/gallium/frontends/lavapipe/lvp_entrypoints.c" - "mesa_llvm_sysroot_compat.cc" - DEFINES - "GALLIUM_LLVMPIPE" - # lvp_formats.c references DRM_FORMAT_MOD_LINEAR under #if DETECT_OS_LINUX - # even when HAVE_LIBDRM is not defined (which skips including - # drm-uapi/drm_fourcc.h in lvp_private.h). - "DRM_FORMAT_MOD_LINEAR=0" - DEPS - mesa_gallium_aux - mesa_llvmpipe - mesa_nir - mesa_util - mesa_vtn - mesa_vulkan_runtime - mesa_vulkan_util -) - -add_library(vulkan_lvp SHARED - $<TARGET_OBJECTS:mesa_util_c11> - $<TARGET_OBJECTS:mesa_blake3> - $<TARGET_OBJECTS:mesa_util_clflush> - $<TARGET_OBJECTS:mesa_util_clflushopt> - $<TARGET_OBJECTS:mesa_util_simd> - $<TARGET_OBJECTS:mesa_xmlconfig> - $<TARGET_OBJECTS:mesa_util> - $<TARGET_OBJECTS:mesa_compiler> - $<TARGET_OBJECTS:mesa_nir> - $<TARGET_OBJECTS:mesa_vtn> - $<TARGET_OBJECTS:mesa_vulkan_util> - $<TARGET_OBJECTS:mesa_vulkan_runtime> - $<TARGET_OBJECTS:mesa_gallium_aux> - $<TARGET_OBJECTS:mesa_llvmpipe> - $<TARGET_OBJECTS:mesa_lavapipe> -) - -set_target_properties(vulkan_lvp PROPERTIES - OUTPUT_NAME "vulkan_lvp" - LIBRARY_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}" - BUILD_WITH_INSTALL_RPATH TRUE - INSTALL_RPATH "\$ORIGIN" -) - -target_link_libraries(vulkan_lvp PRIVATE - "${MESA_ZSTD_DIR}/lib/libzstd.so" - -Wl,--start-group - ${mesa_llvm_libs} - -Wl,--end-group - dl - m - pthread - rt - z -) - -get_filename_component(_compiler_dir "${CMAKE_CXX_COMPILER}" DIRECTORY) -find_program(_mesa_lld NAMES ld.lld lld HINTS "${_compiler_dir}") -if(_mesa_lld) - target_link_options(vulkan_lvp PRIVATE "-fuse-ld=lld") -endif() - -if(NOT DAWN_ENABLE_ASAN AND NOT DAWN_ENABLE_UBSAN AND NOT (TINT_BUILD_FUZZERS AND COMPILER_IS_CLANG)) - target_link_options(vulkan_lvp PRIVATE "-Wl,--no-undefined") -endif() - -target_link_options(vulkan_lvp PRIVATE - "-Wl,-Bsymbolic" - "-Wl,-z,nodelete" - "-Wl,--gc-sections" - "-Wl,--exclude-libs,ALL" - "-Wl,-rpath,\$ORIGIN" -) - -if(DAWN_ENABLE_ASAN) - target_link_options(vulkan_lvp PRIVATE "-fsanitize=address") -endif() -if(DAWN_ENABLE_UBSAN) - target_link_options(vulkan_lvp PRIVATE "-fsanitize=undefined") -endif() -if(TINT_BUILD_FUZZERS AND COMPILER_IS_CLANG) - target_link_options(vulkan_lvp PRIVATE "-fsanitize=fuzzer-no-link") -endif() -if(DAWN_EMIT_COVERAGE AND (COMPILER_IS_CLANG OR COMPILER_IS_CLANG_CL)) - target_link_options(vulkan_lvp PRIVATE - "-fprofile-instr-generate" - "-fcoverage-mapping" - ) -endif() - -add_custom_target(mesa ALL - DEPENDS - vulkan_lvp - mesa_copy_zstd - "${_mesa_icd_json}" -)
diff --git a/third_party/mesa/mesa_action.py b/third_party/mesa/mesa_action.py index c013183..be158aa 100644 --- a/third_party/mesa/mesa_action.py +++ b/third_party/mesa/mesa_action.py
@@ -25,16 +25,15 @@ # 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. -"""Helper wrapper for Mesa GN and CMake codegen actions. +"""Helper wrapper for Mesa GN codegen actions. -This script serves three roles for the native GN and CMake Mesa builds: +This script serves three roles for the native GN Mesa build: 1. Bridging to vpython3 (--vpython-spec): Dawn's root .gn configures `script_executable` to use the bare hermetic CPython interpreter (//third_party/cpython3/host/bin/python3), which does not automatically load - Dawn's root `vpython.toml`. Similarly, CMake invokes `${Python3_EXECUTABLE}` - directly. Mesa's Python codegen scripts require third-party packages like - `mako` and `pyyaml` defined in `vpython.toml`, so this wrapper re-invokes - them under `vpython3 -vpython-spec`. + Dawn's root `vpython.toml`. Mesa's Python codegen scripts require third-party + packages like `mako` and `pyyaml` defined in `vpython.toml`, so this wrapper + re-invokes them under `vpython3 -vpython-spec`. 2. Running compiled build-time tools: GN `action()` targets can only execute a Python script directly, so this wrapper is also used to invoke compiled host binaries such as `glslang_validator`.
diff --git a/third_party/mesa/mesa_sources.cmake b/third_party/mesa/mesa_sources.cmake deleted file mode 100644 index 2c86be1..0000000 --- a/third_party/mesa/mesa_sources.cmake +++ /dev/null
@@ -1,965 +0,0 @@ -# Copyright 2026 The Dawn & Tint Authors -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions are met: -# -# 1. Redistributions of source code must retain the above copyright notice, this -# list of conditions and the following disclaimer. -# -# 2. 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. -# -# 3. Neither the name of the copyright holder 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 HOLDER 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. - -set(mesa_common_defines - "_FILE_OFFSET_BITS=64" - "_GNU_SOURCE" - "__STDC_CONSTANT_MACROS" - "__STDC_FORMAT_MACROS" - "__STDC_LIMIT_MACROS" - "PACKAGE_VERSION=\"26.0.0-devel\"" - "PACKAGE_BUGREPORT=\"https://gitlab.freedesktop.org/mesa/mesa/-/issues\"" - "HAVE_OPENGL=1" - "HAVE_OPENGL_ES_1=0" - "HAVE_OPENGL_ES_2=1" - "HAVE_LLVMPIPE" - "HAVE_SWRAST" - "HAVE_GFX_COMPUTE" - "MESA_SYSTEM_HAS_KMS_DRM=0" - "VIDEO_CODEC_VC1DEC=0" - "VIDEO_CODEC_H264DEC=0" - "VIDEO_CODEC_H264ENC=0" - "VIDEO_CODEC_H265DEC=0" - "VIDEO_CODEC_H265ENC=0" - "VIDEO_CODEC_AV1DEC=0" - "VIDEO_CODEC_AV1ENC=0" - "VIDEO_CODEC_VP9DEC=0" - "VIDEO_CODEC_MPEG12DEC=0" - "VIDEO_CODEC_JPEGDEC=0" - "HAVE_SURFACELESS_PLATFORM" - "USE_LIBGLVND=0" - "GLAPI_EXPORT_PROTO_ENTRY_POINTS=1" - "ALLOW_KCMP" - "MESA_DEBUG=0" - "ENABLE_SHADER_CACHE" - "HAVE___BUILTIN_BSWAP32" - "HAVE___BUILTIN_BSWAP64" - "HAVE___BUILTIN_CLZ" - "HAVE___BUILTIN_CLZLL" - "HAVE___BUILTIN_CTZ" - "HAVE___BUILTIN_EXPECT" - "HAVE___BUILTIN_FFS" - "HAVE___BUILTIN_FFSLL" - "HAVE___BUILTIN_POPCOUNT" - "HAVE___BUILTIN_POPCOUNTLL" - "HAVE___BUILTIN_UNREACHABLE" - "HAVE___BUILTIN_TYPES_COMPATIBLE_P" - "HAVE___BUILTIN_ADD_OVERFLOW" - "HAVE_FUNC_ATTRIBUTE_CONST" - "HAVE_FUNC_ATTRIBUTE_FLATTEN" - "HAVE_FUNC_ATTRIBUTE_MALLOC" - "HAVE_FUNC_ATTRIBUTE_PURE" - "HAVE_FUNC_ATTRIBUTE_UNUSED" - "HAVE_FUNC_ATTRIBUTE_WARN_UNUSED_RESULT" - "HAVE_FUNC_ATTRIBUTE_WEAK" - "HAVE_FUNC_ATTRIBUTE_FORMAT" - "HAVE_FUNC_ATTRIBUTE_PACKED" - "HAVE_FUNC_ATTRIBUTE_RETURNS_NONNULL" - "HAVE_FUNC_ATTRIBUTE_ALIAS" - "HAVE_FUNC_ATTRIBUTE_NORETURN" - "HAVE_FUNC_ATTRIBUTE_OPTIMIZE" - "HAVE_FUNC_ATTRIBUTE_COLD" - "HAVE_FUNC_ATTRIBUTE_VISIBILITY" - "HAVE_UINT128" - "HAVE_REALLOCARRAY" - "HAVE_FMEMOPEN" - "USE_SSE41" - "HAVE___BUILTIN_IA32_CLFLUSHOPT" - "USE_GCC_ATOMIC_BUILTINS" - "MAJOR_IN_SYSMACROS" - "HAS_SCHED_H" - "HAS_SCHED_GETAFFINITY" - "HAVE_LINUX_FUTEX_H" - "HAVE_ENDIAN_H" - "HAVE_DLFCN_H" - "HAVE_SYS_SHM_H" - "HAVE_CET_H" - "HAVE_POLL_H" - "HAVE_SYS_INOTIFY_H" - "HAVE_LINUX_UDMABUF_H" - "HAVE_STRTOF" - "HAVE_MKOSTEMP" - "HAVE_MEMFD_CREATE" - "HAVE_RANDOM_R" - "HAVE_FLOCK" - "HAVE_STRTOK_R" - "HAVE_GETRANDOM" - "HAVE_POSIX_FALLOCATE" - "HAVE_SECURE_GETENV" - "HAVE_SYSCONF" - "HAVE_SC_PHYS_PAGES" - "HAVE_GNU_QSORT_R" - "HAVE_STRUCT_TIMESPEC" - "HAVE_PROGRAM_INVOCATION_NAME" - "HAVE_ISSIGNALING" - "HAVE_POSIX_MEMALIGN" - "HAVE_DIRENT_D_TYPE" - "HAVE_STRTOD_L" - "HAVE_DLADDR" - "HAVE_DL_ITERATE_PHDR" - "HAVE_ZLIB" - "HAVE_ZSTD" - "HAVE_COMPRESSION" - "HAVE_PTHREAD" - "HAVE_PTHREAD_SETAFFINITY" - "MESA_LLVM_VERSION_STRING=\"22.1.0\"" - "LLVM_IS_SHARED=0" - "DRAW_LLVM_AVAILABLE=1" - "AMD_LLVM_AVAILABLE=1" - "GALLIVM_USE_ORCJIT=0" - "THREAD_SANITIZER=0" - "HAVE_RENDERDOC_INTEGRATION=1" - "_GLIBCXX_USE_CXX11_ABI=1" - "VK_USE_PLATFORM_SURFACELESS_MESA" - "XXH_FORCE_ALIGN_CHECK=0" - "XXH_FORCE_MEMORY_ACCESS=0" -) - -set(mesa_common_cflags - "-fvisibility=hidden" - "-fno-math-errno" - "-fno-trapping-math" - "-fno-common" - "-ffunction-sections" - "-fdata-sections" - "-mtls-dialect=gnu2" - "-pthread" - "-w" -) -if (CMAKE_CXX_COMPILER_ID MATCHES "Clang") - list(APPEND mesa_common_cflags "-Qunused-arguments") -endif() - -set(mesa_common_cflags_c "-std=c11") - -set(mesa_common_cflags_cc - "-std=gnu++17" - "-fno-exceptions" - "-fno-rtti" -) -if (CMAKE_CXX_COMPILER_ID MATCHES "Clang") - list(APPEND mesa_common_cflags_cc "-fno-complete-member-pointers") -endif() - -set(mesa_llvm_libs - "${MESA_LLVM_DEV_DIR}/lib/libLLVMAggressiveInstCombine.a" - "${MESA_LLVM_DEV_DIR}/lib/libLLVMAnalysis.a" - "${MESA_LLVM_DEV_DIR}/lib/libLLVMAsmParser.a" - "${MESA_LLVM_DEV_DIR}/lib/libLLVMAsmPrinter.a" - "${MESA_LLVM_DEV_DIR}/lib/libLLVMBinaryFormat.a" - "${MESA_LLVM_DEV_DIR}/lib/libLLVMBitReader.a" - "${MESA_LLVM_DEV_DIR}/lib/libLLVMBitWriter.a" - "${MESA_LLVM_DEV_DIR}/lib/libLLVMBitstreamReader.a" - "${MESA_LLVM_DEV_DIR}/lib/libLLVMCFGuard.a" - "${MESA_LLVM_DEV_DIR}/lib/libLLVMCGData.a" - "${MESA_LLVM_DEV_DIR}/lib/libLLVMCodeGen.a" - "${MESA_LLVM_DEV_DIR}/lib/libLLVMCodeGenTypes.a" - "${MESA_LLVM_DEV_DIR}/lib/libLLVMCore.a" - "${MESA_LLVM_DEV_DIR}/lib/libLLVMCoroutines.a" - "${MESA_LLVM_DEV_DIR}/lib/libLLVMDebugInfoBTF.a" - "${MESA_LLVM_DEV_DIR}/lib/libLLVMDebugInfoCodeView.a" - "${MESA_LLVM_DEV_DIR}/lib/libLLVMDebugInfoDWARF.a" - "${MESA_LLVM_DEV_DIR}/lib/libLLVMDebugInfoDWARFLowLevel.a" - "${MESA_LLVM_DEV_DIR}/lib/libLLVMDebugInfoGSYM.a" - "${MESA_LLVM_DEV_DIR}/lib/libLLVMDebugInfoMSF.a" - "${MESA_LLVM_DEV_DIR}/lib/libLLVMDebugInfoPDB.a" - "${MESA_LLVM_DEV_DIR}/lib/libLLVMDemangle.a" - "${MESA_LLVM_DEV_DIR}/lib/libLLVMExecutionEngine.a" - "${MESA_LLVM_DEV_DIR}/lib/libLLVMExtensions.a" - "${MESA_LLVM_DEV_DIR}/lib/libLLVMFrontendAtomic.a" - "${MESA_LLVM_DEV_DIR}/lib/libLLVMFrontendDirective.a" - "${MESA_LLVM_DEV_DIR}/lib/libLLVMFrontendHLSL.a" - "${MESA_LLVM_DEV_DIR}/lib/libLLVMFrontendOffloading.a" - "${MESA_LLVM_DEV_DIR}/lib/libLLVMFrontendOpenMP.a" - "${MESA_LLVM_DEV_DIR}/lib/libLLVMGlobalISel.a" - "${MESA_LLVM_DEV_DIR}/lib/libLLVMHipStdPar.a" - "${MESA_LLVM_DEV_DIR}/lib/libLLVMIRPrinter.a" - "${MESA_LLVM_DEV_DIR}/lib/libLLVMIRReader.a" - "${MESA_LLVM_DEV_DIR}/lib/libLLVMInstCombine.a" - "${MESA_LLVM_DEV_DIR}/lib/libLLVMInstrumentation.a" - "${MESA_LLVM_DEV_DIR}/lib/libLLVMInterpreter.a" - "${MESA_LLVM_DEV_DIR}/lib/libLLVMLTO.a" - "${MESA_LLVM_DEV_DIR}/lib/libLLVMLinker.a" - "${MESA_LLVM_DEV_DIR}/lib/libLLVMMC.a" - "${MESA_LLVM_DEV_DIR}/lib/libLLVMMCA.a" - "${MESA_LLVM_DEV_DIR}/lib/libLLVMMCDisassembler.a" - "${MESA_LLVM_DEV_DIR}/lib/libLLVMMCJIT.a" - "${MESA_LLVM_DEV_DIR}/lib/libLLVMMCParser.a" - "${MESA_LLVM_DEV_DIR}/lib/libLLVMObjCARCOpts.a" - "${MESA_LLVM_DEV_DIR}/lib/libLLVMObject.a" - "${MESA_LLVM_DEV_DIR}/lib/libLLVMObjectYAML.a" - "${MESA_LLVM_DEV_DIR}/lib/libLLVMOrcShared.a" - "${MESA_LLVM_DEV_DIR}/lib/libLLVMOrcTargetProcess.a" - "${MESA_LLVM_DEV_DIR}/lib/libLLVMPasses.a" - "${MESA_LLVM_DEV_DIR}/lib/libLLVMPlugins.a" - "${MESA_LLVM_DEV_DIR}/lib/libLLVMProfileData.a" - "${MESA_LLVM_DEV_DIR}/lib/libLLVMRemarks.a" - "${MESA_LLVM_DEV_DIR}/lib/libLLVMRuntimeDyld.a" - "${MESA_LLVM_DEV_DIR}/lib/libLLVMSandboxIR.a" - "${MESA_LLVM_DEV_DIR}/lib/libLLVMScalarOpts.a" - "${MESA_LLVM_DEV_DIR}/lib/libLLVMSelectionDAG.a" - "${MESA_LLVM_DEV_DIR}/lib/libLLVMSupport.a" - "${MESA_LLVM_DEV_DIR}/lib/libLLVMSymbolize.a" - "${MESA_LLVM_DEV_DIR}/lib/libLLVMTarget.a" - "${MESA_LLVM_DEV_DIR}/lib/libLLVMTargetParser.a" - "${MESA_LLVM_DEV_DIR}/lib/libLLVMTextAPI.a" - "${MESA_LLVM_DEV_DIR}/lib/libLLVMTransformUtils.a" - "${MESA_LLVM_DEV_DIR}/lib/libLLVMVectorize.a" - "${MESA_LLVM_DEV_DIR}/lib/libLLVMX86AsmParser.a" - "${MESA_LLVM_DEV_DIR}/lib/libLLVMX86CodeGen.a" - "${MESA_LLVM_DEV_DIR}/lib/libLLVMX86Desc.a" - "${MESA_LLVM_DEV_DIR}/lib/libLLVMX86Disassembler.a" - "${MESA_LLVM_DEV_DIR}/lib/libLLVMX86Info.a" - "${MESA_LLVM_DEV_DIR}/lib/libLLVMX86TargetMCA.a" - "${MESA_LLVM_DEV_DIR}/lib/libLLVMipo.a" - "${MESA_LLVM_DEV_DIR}/lib/libPolly.a" - "${MESA_LLVM_DEV_DIR}/lib/libPollyISL.a" -) - -set(mesa_util_c11_sources - "src/src/c11/impl/threads_posix.c" - "src/src/c11/impl/time.c" -) - -set(mesa_blake3_sources - "src/src/util/blake3/blake3.c" - "src/src/util/blake3/blake3_avx2_x86-64_unix.S" - "src/src/util/blake3/blake3_avx512_x86-64_unix.S" - "src/src/util/blake3/blake3_dispatch.c" - "src/src/util/blake3/blake3_portable.c" - "src/src/util/blake3/blake3_sse2_x86-64_unix.S" - "src/src/util/blake3/blake3_sse41_x86-64_unix.S" -) - -set(mesa_util_clflush_sources "src/src/util/cache_ops_x86.c") - -set(mesa_util_clflushopt_sources "src/src/util/cache_ops_x86_clflushopt.c") - -set(mesa_util_simd_sources "src/src/util/streaming-load-memcpy.c") - -set(mesa_xmlconfig_sources "src/src/util/xmlconfig.c") - -set(mesa_util_static_sources - "src/src/util/anon_file.c" - "src/src/util/bitscan.c" - "src/src/util/blob.c" - "src/src/util/build_id.c" - "src/src/util/cnd_monotonic.c" - "src/src/util/compress.c" - "src/src/util/crc32.c" - "src/src/util/dag.c" - "src/src/util/disk_cache.c" - "src/src/util/disk_cache_os.c" - "src/src/util/double.c" - "src/src/util/fast_idiv_by_const.c" - "src/src/util/float8.c" - "src/src/util/format/u_format.c" - "src/src/util/format/u_format_bptc.c" - "src/src/util/format/u_format_etc.c" - "src/src/util/format/u_format_fxt1.c" - "src/src/util/format/u_format_latc.c" - "src/src/util/format/u_format_other.c" - "src/src/util/format/u_format_rgtc.c" - "src/src/util/format/u_format_s3tc.c" - "src/src/util/format/u_format_tests.c" - "src/src/util/format/u_format_unpack_neon.c" - "src/src/util/format/u_format_yuv.c" - "src/src/util/format/u_format_zs.c" - "src/src/util/fossilize_db.c" - "src/src/util/futex.c" - "src/src/util/half_float.c" - "src/src/util/hash_table.c" - "src/src/util/helpers.c" - "src/src/util/log.c" - "src/src/util/lut.c" - "src/src/util/memstream.c" - "src/src/util/mesa-blake3.c" - "src/src/util/mesa_cache_db.c" - "src/src/util/mesa_cache_db_multipart.c" - "src/src/util/os_file.c" - "src/src/util/os_file_notify.c" - "src/src/util/os_memory_fd.c" - "src/src/util/os_misc.c" - "src/src/util/os_socket.c" - "src/src/util/os_time.c" - "src/src/util/pb_slab.c" - "src/src/util/perf/u_trace.c" - "src/src/util/ralloc.c" - "src/src/util/rand_xor.c" - "src/src/util/range_minimum_query.c" - "src/src/util/rb_tree.c" - "src/src/util/register_allocate.c" - "src/src/util/rgtc.c" - "src/src/util/rwlock.c" - "src/src/util/set.c" - "src/src/util/simple_mtx.c" - "src/src/util/slab.c" - "src/src/util/softfloat.c" - "src/src/util/sparse_array.c" - "src/src/util/string_buffer.c" - "src/src/util/strndup.c" - "src/src/util/strtod.c" - "src/src/util/texcompress_astc.cpp" - "src/src/util/texcompress_astc_luts.cpp" - "src/src/util/texcompress_astc_luts_wrap.cpp" - "src/src/util/texcompress_etc.c" - "src/src/util/thread_sched.c" - "src/src/util/u_atomic.c" - "src/src/util/u_call_once.c" - "src/src/util/u_cpu_detect.c" - "src/src/util/u_debug.c" - "src/src/util/u_debug_memory.c" - "src/src/util/u_debug_stack.c" - "src/src/util/u_debug_symbol.c" - "src/src/util/u_dl.c" - "src/src/util/u_dynarray.c" - "src/src/util/u_hash_table.c" - "src/src/util/u_idalloc.c" - "src/src/util/u_math.c" - "src/src/util/u_mm.c" - "src/src/util/u_printf.c" - "src/src/util/u_process.c" - "src/src/util/u_qsort.cpp" - "src/src/util/u_queue.c" - "src/src/util/u_range_remap.c" - "src/src/util/u_shader_variant_cache.c" - "src/src/util/u_string.c" - "src/src/util/u_thread.c" - "src/src/util/u_vector.c" - "src/src/util/u_worklist.c" - "src/src/util/vl_zscan_data.c" - "src/src/util/vma.c" -) - -set(mesa_compiler_static_sources - "src/src/compiler/glsl_types.c" - "src/src/compiler/shader_enums.c" -) - -set(mesa_nir_static_sources - "src/src/compiler/nir/nir.c" - "src/src/compiler/nir/nir_builder.c" - "src/src/compiler/nir/nir_builtin_builder.c" - "src/src/compiler/nir/nir_clip_cull_distance_io_utils.c" - "src/src/compiler/nir/nir_clone.c" - "src/src/compiler/nir/nir_control_flow.c" - "src/src/compiler/nir/nir_convert_address_format.c" - "src/src/compiler/nir/nir_deref.c" - "src/src/compiler/nir/nir_divergence_analysis.c" - "src/src/compiler/nir/nir_dominance.c" - "src/src/compiler/nir/nir_dominance_lca.c" - "src/src/compiler/nir/nir_fixup_is_exported.c" - "src/src/compiler/nir/nir_format_convert.c" - "src/src/compiler/nir/nir_from_ssa.c" - "src/src/compiler/nir/nir_functions.c" - "src/src/compiler/nir/nir_gather_info.c" - "src/src/compiler/nir/nir_gather_output_deps.c" - "src/src/compiler/nir/nir_gather_tcs_info.c" - "src/src/compiler/nir/nir_gather_types.c" - "src/src/compiler/nir/nir_gather_xfb_info.c" - "src/src/compiler/nir/nir_gs_count_vertices.c" - "src/src/compiler/nir/nir_inline_sysval.c" - "src/src/compiler/nir/nir_inline_uniforms.c" - "src/src/compiler/nir/nir_instr_set.c" - "src/src/compiler/nir/nir_io_add_xfb_info.c" - "src/src/compiler/nir/nir_legacy.c" - "src/src/compiler/nir/nir_linking_helpers.c" - "src/src/compiler/nir/nir_liveness.c" - "src/src/compiler/nir/nir_loop_analyze.c" - "src/src/compiler/nir/nir_lower_abort.c" - "src/src/compiler/nir/nir_lower_alpha.c" - "src/src/compiler/nir/nir_lower_alu.c" - "src/src/compiler/nir/nir_lower_alu_width.c" - "src/src/compiler/nir/nir_lower_amul.c" - "src/src/compiler/nir/nir_lower_array_deref_of_vec.c" - "src/src/compiler/nir/nir_lower_atomics.c" - "src/src/compiler/nir/nir_lower_atomics_to_ssbo.c" - "src/src/compiler/nir/nir_lower_bit_size.c" - "src/src/compiler/nir/nir_lower_bitmap.c" - "src/src/compiler/nir/nir_lower_blend.c" - "src/src/compiler/nir/nir_lower_bool_to_float.c" - "src/src/compiler/nir/nir_lower_bool_to_int32.c" - "src/src/compiler/nir/nir_lower_calls_to_builtins.c" - "src/src/compiler/nir/nir_lower_cl_images.c" - "src/src/compiler/nir/nir_lower_clamp_color_outputs.c" - "src/src/compiler/nir/nir_lower_clip.c" - "src/src/compiler/nir/nir_lower_clip_disable.c" - "src/src/compiler/nir/nir_lower_clip_halfz.c" - "src/src/compiler/nir/nir_lower_const_arrays_to_uniforms.c" - "src/src/compiler/nir/nir_lower_continue_constructs.c" - "src/src/compiler/nir/nir_lower_convert_alu_types.c" - "src/src/compiler/nir/nir_lower_cooperative_matrix.c" - "src/src/compiler/nir/nir_lower_discard_if.c" - "src/src/compiler/nir/nir_lower_double_ops.c" - "src/src/compiler/nir/nir_lower_explicit_io.c" - "src/src/compiler/nir/nir_lower_fb_read.c" - "src/src/compiler/nir/nir_lower_flatshade.c" - "src/src/compiler/nir/nir_lower_floats.c" - "src/src/compiler/nir/nir_lower_flrp.c" - "src/src/compiler/nir/nir_lower_fp16_conv.c" - "src/src/compiler/nir/nir_lower_frag_coord_to_pixel_coord.c" - "src/src/compiler/nir/nir_lower_fragcolor.c" - "src/src/compiler/nir/nir_lower_fragcoord_wtrans.c" - "src/src/compiler/nir/nir_lower_frexp.c" - "src/src/compiler/nir/nir_lower_global_vars_to_local.c" - "src/src/compiler/nir/nir_lower_goto_ifs.c" - "src/src/compiler/nir/nir_lower_gs_intrinsics.c" - "src/src/compiler/nir/nir_lower_halt_to_return.c" - "src/src/compiler/nir/nir_lower_helper_writes.c" - "src/src/compiler/nir/nir_lower_idiv.c" - "src/src/compiler/nir/nir_lower_image.c" - "src/src/compiler/nir/nir_lower_image_atomics_to_global.c" - "src/src/compiler/nir/nir_lower_indirect_derefs_to_if_else_trees.c" - "src/src/compiler/nir/nir_lower_input_attachments.c" - "src/src/compiler/nir/nir_lower_int64.c" - "src/src/compiler/nir/nir_lower_int_to_float.c" - "src/src/compiler/nir/nir_lower_interpolation.c" - "src/src/compiler/nir/nir_lower_io.c" - "src/src/compiler/nir/nir_lower_io_array_vars_to_elements.c" - "src/src/compiler/nir/nir_lower_io_indirect_loads.c" - "src/src/compiler/nir/nir_lower_io_to_scalar.c" - "src/src/compiler/nir/nir_lower_io_vars_to_scalar.c" - "src/src/compiler/nir/nir_lower_io_vars_to_temporaries.c" - "src/src/compiler/nir/nir_lower_is_helper_invocation.c" - "src/src/compiler/nir/nir_lower_load_const_to_scalar.c" - "src/src/compiler/nir/nir_lower_locals_to_regs.c" - "src/src/compiler/nir/nir_lower_mediump.c" - "src/src/compiler/nir/nir_lower_mem_access_bit_sizes.c" - "src/src/compiler/nir/nir_lower_memcpy.c" - "src/src/compiler/nir/nir_lower_memory_model.c" - "src/src/compiler/nir/nir_lower_multiview.c" - "src/src/compiler/nir/nir_lower_non_uniform_access.c" - "src/src/compiler/nir/nir_lower_packing.c" - "src/src/compiler/nir/nir_lower_passthrough_edgeflags.c" - "src/src/compiler/nir/nir_lower_patch_vertices.c" - "src/src/compiler/nir/nir_lower_phis_to_scalar.c" - "src/src/compiler/nir/nir_lower_pntc_ytransform.c" - "src/src/compiler/nir/nir_lower_point_size.c" - "src/src/compiler/nir/nir_lower_point_smooth.c" - "src/src/compiler/nir/nir_lower_poly_line_smooth.c" - "src/src/compiler/nir/nir_lower_printf.c" - "src/src/compiler/nir/nir_lower_readonly_images_to_tex.c" - "src/src/compiler/nir/nir_lower_reg_intrinsics_to_ssa.c" - "src/src/compiler/nir/nir_lower_returns.c" - "src/src/compiler/nir/nir_lower_robust_access.c" - "src/src/compiler/nir/nir_lower_sample_shading.c" - "src/src/compiler/nir/nir_lower_samplers.c" - "src/src/compiler/nir/nir_lower_scratch.c" - "src/src/compiler/nir/nir_lower_scratch_to_var.c" - "src/src/compiler/nir/nir_lower_shader_calls.c" - "src/src/compiler/nir/nir_lower_single_sampled.c" - "src/src/compiler/nir/nir_lower_ssbo.c" - "src/src/compiler/nir/nir_lower_subgroups.c" - "src/src/compiler/nir/nir_lower_system_values.c" - "src/src/compiler/nir/nir_lower_sysvals_to_varyings.c" - "src/src/compiler/nir/nir_lower_task_shader.c" - "src/src/compiler/nir/nir_lower_terminate_to_demote.c" - "src/src/compiler/nir/nir_lower_tess_coord_z.c" - "src/src/compiler/nir/nir_lower_tex.c" - "src/src/compiler/nir/nir_lower_tex_shadow.c" - "src/src/compiler/nir/nir_lower_texcoord_replace.c" - "src/src/compiler/nir/nir_lower_texcoord_replace_late.c" - "src/src/compiler/nir/nir_lower_two_sided_color.c" - "src/src/compiler/nir/nir_lower_ubo_vec4.c" - "src/src/compiler/nir/nir_lower_undef_to_zero.c" - "src/src/compiler/nir/nir_lower_uniforms_to_ubo.c" - "src/src/compiler/nir/nir_lower_var_copies.c" - "src/src/compiler/nir/nir_lower_variable_initializers.c" - "src/src/compiler/nir/nir_lower_vars_to_ssa.c" - "src/src/compiler/nir/nir_lower_vec3_to_vec4.c" - "src/src/compiler/nir/nir_lower_vec_to_regs.c" - "src/src/compiler/nir/nir_lower_view_index_to_device_index.c" - "src/src/compiler/nir/nir_lower_viewport_transform.c" - "src/src/compiler/nir/nir_lower_workgroup_size.c" - "src/src/compiler/nir/nir_lower_wpos_center.c" - "src/src/compiler/nir/nir_lower_wpos_ytransform.c" - "src/src/compiler/nir/nir_lower_wrmasks.c" - "src/src/compiler/nir/nir_lower_xfb_to_stores.c" - "src/src/compiler/nir/nir_metadata.c" - "src/src/compiler/nir/nir_mod_analysis.c" - "src/src/compiler/nir/nir_move_output_stores_to_end.c" - "src/src/compiler/nir/nir_move_vec_src_uses_to_dest.c" - "src/src/compiler/nir/nir_normalize_cubemap_coords.c" - "src/src/compiler/nir/nir_normalize_sin_cos.c" - "src/src/compiler/nir/nir_opt_access.c" - "src/src/compiler/nir/nir_opt_barriers.c" - "src/src/compiler/nir/nir_opt_barycentric.c" - "src/src/compiler/nir/nir_opt_call.c" - "src/src/compiler/nir/nir_opt_clip_cull_const.c" - "src/src/compiler/nir/nir_opt_combine_stores.c" - "src/src/compiler/nir/nir_opt_comparison_pre.c" - "src/src/compiler/nir/nir_opt_constant_folding.c" - "src/src/compiler/nir/nir_opt_copy_prop_vars.c" - "src/src/compiler/nir/nir_opt_copy_propagate.c" - "src/src/compiler/nir/nir_opt_cse.c" - "src/src/compiler/nir/nir_opt_dce.c" - "src/src/compiler/nir/nir_opt_dead_cf.c" - "src/src/compiler/nir/nir_opt_dead_write_vars.c" - "src/src/compiler/nir/nir_opt_find_array_copies.c" - "src/src/compiler/nir/nir_opt_fp_math_ctrl.c" - "src/src/compiler/nir/nir_opt_frag_coord_to_pixel_coord.c" - "src/src/compiler/nir/nir_opt_fragdepth.c" - "src/src/compiler/nir/nir_opt_gcm.c" - "src/src/compiler/nir/nir_opt_generate_bfi.c" - "src/src/compiler/nir/nir_opt_group_loads.c" - "src/src/compiler/nir/nir_opt_idiv_const.c" - "src/src/compiler/nir/nir_opt_if.c" - "src/src/compiler/nir/nir_opt_intrinsics.c" - "src/src/compiler/nir/nir_opt_large_constants.c" - "src/src/compiler/nir/nir_opt_licm.c" - "src/src/compiler/nir/nir_opt_load_skip_helpers.c" - "src/src/compiler/nir/nir_opt_load_store_vectorize.c" - "src/src/compiler/nir/nir_opt_loop.c" - "src/src/compiler/nir/nir_opt_loop_unroll.c" - "src/src/compiler/nir/nir_opt_memcpy.c" - "src/src/compiler/nir/nir_opt_move.c" - "src/src/compiler/nir/nir_opt_move_discards_to_top.c" - "src/src/compiler/nir/nir_opt_move_to_top.c" - "src/src/compiler/nir/nir_opt_mqsad.c" - "src/src/compiler/nir/nir_opt_non_uniform_access.c" - "src/src/compiler/nir/nir_opt_offsets.c" - "src/src/compiler/nir/nir_opt_peephole_select.c" - "src/src/compiler/nir/nir_opt_phi_precision.c" - "src/src/compiler/nir/nir_opt_phi_to_bool.c" - "src/src/compiler/nir/nir_opt_preamble.c" - "src/src/compiler/nir/nir_opt_ray_queries.c" - "src/src/compiler/nir/nir_opt_reassociate.c" - "src/src/compiler/nir/nir_opt_reassociate_bfi.c" - "src/src/compiler/nir/nir_opt_rematerialize_compares.c" - "src/src/compiler/nir/nir_opt_remove_phis.c" - "src/src/compiler/nir/nir_opt_scalar_array_vars_to_vec.c" - "src/src/compiler/nir/nir_opt_shared_vars_to_subgroup.c" - "src/src/compiler/nir/nir_opt_shrink_stores.c" - "src/src/compiler/nir/nir_opt_shrink_vectors.c" - "src/src/compiler/nir/nir_opt_sink.c" - "src/src/compiler/nir/nir_opt_uadd_carry.c" - "src/src/compiler/nir/nir_opt_undef.c" - "src/src/compiler/nir/nir_opt_uniform_atomics.c" - "src/src/compiler/nir/nir_opt_uniform_subgroup.c" - "src/src/compiler/nir/nir_opt_uub.c" - "src/src/compiler/nir/nir_opt_varyings.c" - "src/src/compiler/nir/nir_opt_vectorize.c" - "src/src/compiler/nir/nir_opt_vectorize_io.c" - "src/src/compiler/nir/nir_opt_vectorize_io_vars.c" - "src/src/compiler/nir/nir_passthrough_gs.c" - "src/src/compiler/nir/nir_passthrough_tcs.c" - "src/src/compiler/nir/nir_phi_builder.c" - "src/src/compiler/nir/nir_print.c" - "src/src/compiler/nir/nir_propagate_invariant.c" - "src/src/compiler/nir/nir_range_analysis.c" - "src/src/compiler/nir/nir_recompute_io_bases.c" - "src/src/compiler/nir/nir_remove_dead_variables.c" - "src/src/compiler/nir/nir_remove_outputs.c" - "src/src/compiler/nir/nir_remove_tex_shadow.c" - "src/src/compiler/nir/nir_repair_ssa.c" - "src/src/compiler/nir/nir_scale_fdiv.c" - "src/src/compiler/nir/nir_schedule.c" - "src/src/compiler/nir/nir_search.c" - "src/src/compiler/nir/nir_separate_merged_clip_cull_io.c" - "src/src/compiler/nir/nir_serialize.c" - "src/src/compiler/nir/nir_shader_bisect.c" - "src/src/compiler/nir/nir_split_64bit_vec3_and_vec4.c" - "src/src/compiler/nir/nir_split_conversions.c" - "src/src/compiler/nir/nir_split_per_member_structs.c" - "src/src/compiler/nir/nir_split_var_copies.c" - "src/src/compiler/nir/nir_split_vars.c" - "src/src/compiler/nir/nir_sweep.c" - "src/src/compiler/nir/nir_to_lcssa.c" - "src/src/compiler/nir/nir_trivialize_registers.c" - "src/src/compiler/nir/nir_unlower_io_to_vars.c" - "src/src/compiler/nir/nir_use_dominance.c" - "src/src/compiler/nir/nir_validate.c" - "src/src/compiler/nir/nir_worklist.c" -) - -set(mesa_vtn_static_sources - "src/src/compiler/spirv/gl_spirv.c" - "src/src/compiler/spirv/spirv_to_nir.c" - "src/src/compiler/spirv/vtn_alu.c" - "src/src/compiler/spirv/vtn_amd.c" - "src/src/compiler/spirv/vtn_cfg.c" - "src/src/compiler/spirv/vtn_cmat.c" - "src/src/compiler/spirv/vtn_constants.c" - "src/src/compiler/spirv/vtn_debug.c" - "src/src/compiler/spirv/vtn_glsl450.c" - "src/src/compiler/spirv/vtn_opencl.c" - "src/src/compiler/spirv/vtn_structured_cfg.c" - "src/src/compiler/spirv/vtn_subgroup.c" - "src/src/compiler/spirv/vtn_variables.c" -) - -set(mesa_vulkan_util_static_sources - "src/src/vulkan/util/vk_alloc.c" - "src/src/vulkan/util/vk_format.c" - "src/src/vulkan/util/vk_util.c" -) - -set(mesa_vulkan_runtime_static_sources - "src/src/vulkan/runtime/rmv/vk_rmv_common.c" - "src/src/vulkan/runtime/rmv/vk_rmv_exporter.c" - "src/src/vulkan/runtime/vk_acceleration_structure.c" - "src/src/vulkan/runtime/vk_blend.c" - "src/src/vulkan/runtime/vk_buffer.c" - "src/src/vulkan/runtime/vk_buffer_view.c" - "src/src/vulkan/runtime/vk_cmd_copy.c" - "src/src/vulkan/runtime/vk_cmd_enqueue.c" - "src/src/vulkan/runtime/vk_command_buffer.c" - "src/src/vulkan/runtime/vk_command_pool.c" - "src/src/vulkan/runtime/vk_debug_report.c" - "src/src/vulkan/runtime/vk_debug_utils.c" - "src/src/vulkan/runtime/vk_deferred_operation.c" - "src/src/vulkan/runtime/vk_descriptor_set_layout.c" - "src/src/vulkan/runtime/vk_descriptor_update_template.c" - "src/src/vulkan/runtime/vk_descriptors.c" - "src/src/vulkan/runtime/vk_device.c" - "src/src/vulkan/runtime/vk_device_generated_commands.c" - "src/src/vulkan/runtime/vk_device_memory.c" - "src/src/vulkan/runtime/vk_fence.c" - "src/src/vulkan/runtime/vk_frame_pacer.c" - "src/src/vulkan/runtime/vk_framebuffer.c" - "src/src/vulkan/runtime/vk_graphics_state.c" - "src/src/vulkan/runtime/vk_image.c" - "src/src/vulkan/runtime/vk_instance.c" - "src/src/vulkan/runtime/vk_log.c" - "src/src/vulkan/runtime/vk_meta.c" - "src/src/vulkan/runtime/vk_meta_blit_resolve.c" - "src/src/vulkan/runtime/vk_meta_clear.c" - "src/src/vulkan/runtime/vk_meta_copy_fill_update.c" - "src/src/vulkan/runtime/vk_meta_draw_rects.c" - "src/src/vulkan/runtime/vk_meta_object_list.c" - "src/src/vulkan/runtime/vk_nir.c" - "src/src/vulkan/runtime/vk_nir_convert_ycbcr.c" - "src/src/vulkan/runtime/vk_nir_lower_descriptor_heaps.c" - "src/src/vulkan/runtime/vk_object.c" - "src/src/vulkan/runtime/vk_physical_device.c" - "src/src/vulkan/runtime/vk_pipeline.c" - "src/src/vulkan/runtime/vk_pipeline_cache.c" - "src/src/vulkan/runtime/vk_pipeline_layout.c" - "src/src/vulkan/runtime/vk_query_pool.c" - "src/src/vulkan/runtime/vk_queue.c" - "src/src/vulkan/runtime/vk_render_pass.c" - "src/src/vulkan/runtime/vk_sampler.c" - "src/src/vulkan/runtime/vk_semaphore.c" - "src/src/vulkan/runtime/vk_shader.c" - "src/src/vulkan/runtime/vk_shader_module.c" - "src/src/vulkan/runtime/vk_standard_sample_locations.c" - "src/src/vulkan/runtime/vk_sync.c" - "src/src/vulkan/runtime/vk_sync_binary.c" - "src/src/vulkan/runtime/vk_sync_dummy.c" - "src/src/vulkan/runtime/vk_sync_timeline.c" - "src/src/vulkan/runtime/vk_synchronization.c" - "src/src/vulkan/runtime/vk_texcompress_astc.c" - "src/src/vulkan/runtime/vk_texcompress_etc2.c" - "src/src/vulkan/runtime/vk_video.c" - "src/src/vulkan/runtime/vk_ycbcr_conversion.c" - "src/src/vulkan/wsi/wsi_common.c" - "src/src/vulkan/wsi/wsi_common_headless.c" -) - -set(mesa_gallium_aux_static_sources - "src/src/gallium/auxiliary/cso_cache/cso_cache.c" - "src/src/gallium/auxiliary/cso_cache/cso_context.c" - "src/src/gallium/auxiliary/cso_cache/cso_hash.c" - "src/src/gallium/auxiliary/draw/draw_context.c" - "src/src/gallium/auxiliary/draw/draw_fs.c" - "src/src/gallium/auxiliary/draw/draw_gs.c" - "src/src/gallium/auxiliary/draw/draw_llvm.c" - "src/src/gallium/auxiliary/draw/draw_mesh.c" - "src/src/gallium/auxiliary/draw/draw_mesh_prim.c" - "src/src/gallium/auxiliary/draw/draw_pipe.c" - "src/src/gallium/auxiliary/draw/draw_pipe_aaline.c" - "src/src/gallium/auxiliary/draw/draw_pipe_aapoint.c" - "src/src/gallium/auxiliary/draw/draw_pipe_clip.c" - "src/src/gallium/auxiliary/draw/draw_pipe_cull.c" - "src/src/gallium/auxiliary/draw/draw_pipe_flatshade.c" - "src/src/gallium/auxiliary/draw/draw_pipe_offset.c" - "src/src/gallium/auxiliary/draw/draw_pipe_stipple.c" - "src/src/gallium/auxiliary/draw/draw_pipe_twoside.c" - "src/src/gallium/auxiliary/draw/draw_pipe_unfilled.c" - "src/src/gallium/auxiliary/draw/draw_pipe_user_cull.c" - "src/src/gallium/auxiliary/draw/draw_pipe_util.c" - "src/src/gallium/auxiliary/draw/draw_pipe_validate.c" - "src/src/gallium/auxiliary/draw/draw_pipe_vbuf.c" - "src/src/gallium/auxiliary/draw/draw_pipe_wide_line.c" - "src/src/gallium/auxiliary/draw/draw_pipe_wide_point.c" - "src/src/gallium/auxiliary/draw/draw_prim_assembler.c" - "src/src/gallium/auxiliary/draw/draw_pt.c" - "src/src/gallium/auxiliary/draw/draw_pt_emit.c" - "src/src/gallium/auxiliary/draw/draw_pt_fetch.c" - "src/src/gallium/auxiliary/draw/draw_pt_fetch_shade_emit.c" - "src/src/gallium/auxiliary/draw/draw_pt_fetch_shade_pipeline.c" - "src/src/gallium/auxiliary/draw/draw_pt_fetch_shade_pipeline_llvm.c" - "src/src/gallium/auxiliary/draw/draw_pt_mesh_pipeline.c" - "src/src/gallium/auxiliary/draw/draw_pt_post_vs.c" - "src/src/gallium/auxiliary/draw/draw_pt_so_emit.c" - "src/src/gallium/auxiliary/draw/draw_pt_util.c" - "src/src/gallium/auxiliary/draw/draw_pt_vsplit.c" - "src/src/gallium/auxiliary/draw/draw_tess.c" - "src/src/gallium/auxiliary/draw/draw_vertex.c" - "src/src/gallium/auxiliary/draw/draw_vs.c" - "src/src/gallium/auxiliary/draw/draw_vs_exec.c" - "src/src/gallium/auxiliary/draw/draw_vs_llvm.c" - "src/src/gallium/auxiliary/draw/draw_vs_variant.c" - "src/src/gallium/auxiliary/driver_ddebug/dd_context.c" - "src/src/gallium/auxiliary/driver_ddebug/dd_draw.c" - "src/src/gallium/auxiliary/driver_ddebug/dd_screen.c" - "src/src/gallium/auxiliary/driver_ddebug/dd_util.c" - "src/src/gallium/auxiliary/driver_noop/noop_pipe.c" - "src/src/gallium/auxiliary/driver_noop/noop_state.c" - "src/src/gallium/auxiliary/driver_trace/tr_context.c" - "src/src/gallium/auxiliary/driver_trace/tr_dump.c" - "src/src/gallium/auxiliary/driver_trace/tr_dump_state.c" - "src/src/gallium/auxiliary/driver_trace/tr_screen.c" - "src/src/gallium/auxiliary/driver_trace/tr_texture.c" - "src/src/gallium/auxiliary/driver_trace/tr_video.c" - "src/src/gallium/auxiliary/gallivm/lp_bld_arit.c" - "src/src/gallium/auxiliary/gallivm/lp_bld_arit_overflow.c" - "src/src/gallium/auxiliary/gallivm/lp_bld_assert.c" - "src/src/gallium/auxiliary/gallivm/lp_bld_bitarit.c" - "src/src/gallium/auxiliary/gallivm/lp_bld_const.c" - "src/src/gallium/auxiliary/gallivm/lp_bld_conv.c" - "src/src/gallium/auxiliary/gallivm/lp_bld_coro.c" - "src/src/gallium/auxiliary/gallivm/lp_bld_debug.cpp" - "src/src/gallium/auxiliary/gallivm/lp_bld_flow.c" - "src/src/gallium/auxiliary/gallivm/lp_bld_format.c" - "src/src/gallium/auxiliary/gallivm/lp_bld_format_aos.c" - "src/src/gallium/auxiliary/gallivm/lp_bld_format_aos_array.c" - "src/src/gallium/auxiliary/gallivm/lp_bld_format_float.c" - "src/src/gallium/auxiliary/gallivm/lp_bld_format_s3tc.c" - "src/src/gallium/auxiliary/gallivm/lp_bld_format_soa.c" - "src/src/gallium/auxiliary/gallivm/lp_bld_format_srgb.c" - "src/src/gallium/auxiliary/gallivm/lp_bld_format_yuv.c" - "src/src/gallium/auxiliary/gallivm/lp_bld_gather.c" - "src/src/gallium/auxiliary/gallivm/lp_bld_init.c" - "src/src/gallium/auxiliary/gallivm/lp_bld_init_common.c" - "src/src/gallium/auxiliary/gallivm/lp_bld_intr.c" - "src/src/gallium/auxiliary/gallivm/lp_bld_ir_common.c" - "src/src/gallium/auxiliary/gallivm/lp_bld_jit_sample.c" - "src/src/gallium/auxiliary/gallivm/lp_bld_jit_types.c" - "src/src/gallium/auxiliary/gallivm/lp_bld_logic.c" - "src/src/gallium/auxiliary/gallivm/lp_bld_misc.cpp" - "src/src/gallium/auxiliary/gallivm/lp_bld_nir.c" - "src/src/gallium/auxiliary/gallivm/lp_bld_nir_aos.c" - "src/src/gallium/auxiliary/gallivm/lp_bld_nir_lower.c" - "src/src/gallium/auxiliary/gallivm/lp_bld_nir_soa.c" - "src/src/gallium/auxiliary/gallivm/lp_bld_pack.c" - "src/src/gallium/auxiliary/gallivm/lp_bld_passmgr.c" - "src/src/gallium/auxiliary/gallivm/lp_bld_printf.c" - "src/src/gallium/auxiliary/gallivm/lp_bld_quad.c" - "src/src/gallium/auxiliary/gallivm/lp_bld_sample.c" - "src/src/gallium/auxiliary/gallivm/lp_bld_sample_aos.c" - "src/src/gallium/auxiliary/gallivm/lp_bld_sample_soa.c" - "src/src/gallium/auxiliary/gallivm/lp_bld_struct.c" - "src/src/gallium/auxiliary/gallivm/lp_bld_swizzle.c" - "src/src/gallium/auxiliary/gallivm/lp_bld_tgsi.c" - "src/src/gallium/auxiliary/gallivm/lp_bld_tgsi_action.c" - "src/src/gallium/auxiliary/gallivm/lp_bld_tgsi_info.c" - "src/src/gallium/auxiliary/gallivm/lp_bld_tgsi_soa.c" - "src/src/gallium/auxiliary/gallivm/lp_bld_type.c" - "src/src/gallium/auxiliary/hud/font.c" - "src/src/gallium/auxiliary/hud/hud_context.c" - "src/src/gallium/auxiliary/hud/hud_cpu.c" - "src/src/gallium/auxiliary/hud/hud_cpufreq.c" - "src/src/gallium/auxiliary/hud/hud_diskstat.c" - "src/src/gallium/auxiliary/hud/hud_driver_query.c" - "src/src/gallium/auxiliary/hud/hud_fps.c" - "src/src/gallium/auxiliary/hud/hud_nic.c" - "src/src/gallium/auxiliary/hud/hud_sensors_temp.c" - "src/src/gallium/auxiliary/indices/u_primconvert.c" - "src/src/gallium/auxiliary/nir/nir_draw_helpers.c" - "src/src/gallium/auxiliary/nir/nir_to_tgsi.c" - "src/src/gallium/auxiliary/nir/nir_to_tgsi_info.c" - "src/src/gallium/auxiliary/nir/tgsi_to_nir.c" - "src/src/gallium/auxiliary/pipe-loader/pipe_loader.c" - "src/src/gallium/auxiliary/pipe-loader/pipe_loader_sw.c" - "src/src/gallium/auxiliary/pipebuffer/pb_buffer_fenced.c" - "src/src/gallium/auxiliary/pipebuffer/pb_bufmgr_cache.c" - "src/src/gallium/auxiliary/pipebuffer/pb_bufmgr_debug.c" - "src/src/gallium/auxiliary/pipebuffer/pb_bufmgr_mm.c" - "src/src/gallium/auxiliary/pipebuffer/pb_bufmgr_slab.c" - "src/src/gallium/auxiliary/pipebuffer/pb_cache.c" - "src/src/gallium/auxiliary/pipebuffer/pb_validate.c" - "src/src/gallium/auxiliary/rtasm/rtasm_execmem.c" - "src/src/gallium/auxiliary/rtasm/rtasm_x86sse.c" - "src/src/gallium/auxiliary/tessellator/p_tessellator.cpp" - "src/src/gallium/auxiliary/tessellator/tessellator.cpp" - "src/src/gallium/auxiliary/tgsi/tgsi_aa_point.c" - "src/src/gallium/auxiliary/tgsi/tgsi_build.c" - "src/src/gallium/auxiliary/tgsi/tgsi_dump.c" - "src/src/gallium/auxiliary/tgsi/tgsi_dynamic_indexing.c" - "src/src/gallium/auxiliary/tgsi/tgsi_exec.c" - "src/src/gallium/auxiliary/tgsi/tgsi_from_mesa.c" - "src/src/gallium/auxiliary/tgsi/tgsi_info.c" - "src/src/gallium/auxiliary/tgsi/tgsi_iterate.c" - "src/src/gallium/auxiliary/tgsi/tgsi_parse.c" - "src/src/gallium/auxiliary/tgsi/tgsi_point_sprite.c" - "src/src/gallium/auxiliary/tgsi/tgsi_sanity.c" - "src/src/gallium/auxiliary/tgsi/tgsi_scan.c" - "src/src/gallium/auxiliary/tgsi/tgsi_strings.c" - "src/src/gallium/auxiliary/tgsi/tgsi_text.c" - "src/src/gallium/auxiliary/tgsi/tgsi_transform.c" - "src/src/gallium/auxiliary/tgsi/tgsi_two_side.c" - "src/src/gallium/auxiliary/tgsi/tgsi_ureg.c" - "src/src/gallium/auxiliary/tgsi/tgsi_util.c" - "src/src/gallium/auxiliary/tgsi/tgsi_vpos.c" - "src/src/gallium/auxiliary/translate/translate.c" - "src/src/gallium/auxiliary/translate/translate_cache.c" - "src/src/gallium/auxiliary/translate/translate_generic.c" - "src/src/gallium/auxiliary/translate/translate_sse.c" - "src/src/gallium/auxiliary/util/u_async_debug.c" - "src/src/gallium/auxiliary/util/u_bitmask.c" - "src/src/gallium/auxiliary/util/u_blitter.c" - "src/src/gallium/auxiliary/util/u_debug_describe.c" - "src/src/gallium/auxiliary/util/u_debug_flush.c" - "src/src/gallium/auxiliary/util/u_debug_image.c" - "src/src/gallium/auxiliary/util/u_debug_refcnt.c" - "src/src/gallium/auxiliary/util/u_draw.c" - "src/src/gallium/auxiliary/util/u_draw_quad.c" - "src/src/gallium/auxiliary/util/u_driconf.c" - "src/src/gallium/auxiliary/util/u_dump_defines.c" - "src/src/gallium/auxiliary/util/u_dump_state.c" - "src/src/gallium/auxiliary/util/u_framebuffer.c" - "src/src/gallium/auxiliary/util/u_gen_mipmap.c" - "src/src/gallium/auxiliary/util/u_handle_table.c" - "src/src/gallium/auxiliary/util/u_helpers.c" - "src/src/gallium/auxiliary/util/u_index_modify.c" - "src/src/gallium/auxiliary/util/u_live_shader_cache.c" - "src/src/gallium/auxiliary/util/u_log.c" - "src/src/gallium/auxiliary/util/u_prim.c" - "src/src/gallium/auxiliary/util/u_prim_restart.c" - "src/src/gallium/auxiliary/util/u_pstipple.c" - "src/src/gallium/auxiliary/util/u_resource.c" - "src/src/gallium/auxiliary/util/u_sample_positions.c" - "src/src/gallium/auxiliary/util/u_sampler.c" - "src/src/gallium/auxiliary/util/u_screen.c" - "src/src/gallium/auxiliary/util/u_simple_shaders.c" - "src/src/gallium/auxiliary/util/u_split_draw.c" - "src/src/gallium/auxiliary/util/u_suballoc.c" - "src/src/gallium/auxiliary/util/u_surface.c" - "src/src/gallium/auxiliary/util/u_tests.c" - "src/src/gallium/auxiliary/util/u_texture.c" - "src/src/gallium/auxiliary/util/u_threaded_context.c" - "src/src/gallium/auxiliary/util/u_tile.c" - "src/src/gallium/auxiliary/util/u_trace_gallium.c" - "src/src/gallium/auxiliary/util/u_transfer.c" - "src/src/gallium/auxiliary/util/u_transfer_helper.c" - "src/src/gallium/auxiliary/util/u_upload_mgr.c" - "src/src/gallium/auxiliary/util/u_vbuf.c" - "src/src/gallium/auxiliary/util/u_vertex_state_cache.c" - "src/src/gallium/winsys/sw/null/null_sw_winsys.c" - "src/src/gallium/winsys/sw/wrapper/wrapper_sw_winsys.c" -) - -set(mesa_llvmpipe_sources - "src/src/gallium/drivers/llvmpipe/lp_bld_alpha.c" - "src/src/gallium/drivers/llvmpipe/lp_bld_blend.c" - "src/src/gallium/drivers/llvmpipe/lp_bld_blend_aos.c" - "src/src/gallium/drivers/llvmpipe/lp_bld_blend_logicop.c" - "src/src/gallium/drivers/llvmpipe/lp_bld_depth.c" - "src/src/gallium/drivers/llvmpipe/lp_bld_interp.c" - "src/src/gallium/drivers/llvmpipe/lp_clear.c" - "src/src/gallium/drivers/llvmpipe/lp_context.c" - "src/src/gallium/drivers/llvmpipe/lp_cs_tpool.c" - "src/src/gallium/drivers/llvmpipe/lp_draw_arrays.c" - "src/src/gallium/drivers/llvmpipe/lp_fence.c" - "src/src/gallium/drivers/llvmpipe/lp_flush.c" - "src/src/gallium/drivers/llvmpipe/lp_jit.c" - "src/src/gallium/drivers/llvmpipe/lp_linear.c" - "src/src/gallium/drivers/llvmpipe/lp_linear_fastpath.c" - "src/src/gallium/drivers/llvmpipe/lp_linear_interp.c" - "src/src/gallium/drivers/llvmpipe/lp_linear_sampler.c" - "src/src/gallium/drivers/llvmpipe/lp_memory.c" - "src/src/gallium/drivers/llvmpipe/lp_perf.c" - "src/src/gallium/drivers/llvmpipe/lp_query.c" - "src/src/gallium/drivers/llvmpipe/lp_rast.c" - "src/src/gallium/drivers/llvmpipe/lp_rast_debug.c" - "src/src/gallium/drivers/llvmpipe/lp_rast_linear.c" - "src/src/gallium/drivers/llvmpipe/lp_rast_linear_fallback.c" - "src/src/gallium/drivers/llvmpipe/lp_rast_rect.c" - "src/src/gallium/drivers/llvmpipe/lp_rast_tri.c" - "src/src/gallium/drivers/llvmpipe/lp_scene.c" - "src/src/gallium/drivers/llvmpipe/lp_scene_queue.c" - "src/src/gallium/drivers/llvmpipe/lp_screen.c" - "src/src/gallium/drivers/llvmpipe/lp_setup.c" - "src/src/gallium/drivers/llvmpipe/lp_setup_analysis.c" - "src/src/gallium/drivers/llvmpipe/lp_setup_line.c" - "src/src/gallium/drivers/llvmpipe/lp_setup_point.c" - "src/src/gallium/drivers/llvmpipe/lp_setup_rect.c" - "src/src/gallium/drivers/llvmpipe/lp_setup_tri.c" - "src/src/gallium/drivers/llvmpipe/lp_setup_vbuf.c" - "src/src/gallium/drivers/llvmpipe/lp_state_blend.c" - "src/src/gallium/drivers/llvmpipe/lp_state_clip.c" - "src/src/gallium/drivers/llvmpipe/lp_state_cs.c" - "src/src/gallium/drivers/llvmpipe/lp_state_derived.c" - "src/src/gallium/drivers/llvmpipe/lp_state_fs.c" - "src/src/gallium/drivers/llvmpipe/lp_state_fs_analysis.c" - "src/src/gallium/drivers/llvmpipe/lp_state_fs_fastpath.c" - "src/src/gallium/drivers/llvmpipe/lp_state_fs_linear.c" - "src/src/gallium/drivers/llvmpipe/lp_state_fs_linear_llvm.c" - "src/src/gallium/drivers/llvmpipe/lp_state_gs.c" - "src/src/gallium/drivers/llvmpipe/lp_state_rasterizer.c" - "src/src/gallium/drivers/llvmpipe/lp_state_sampler.c" - "src/src/gallium/drivers/llvmpipe/lp_state_setup.c" - "src/src/gallium/drivers/llvmpipe/lp_state_so.c" - "src/src/gallium/drivers/llvmpipe/lp_state_surface.c" - "src/src/gallium/drivers/llvmpipe/lp_state_tess.c" - "src/src/gallium/drivers/llvmpipe/lp_state_vertex.c" - "src/src/gallium/drivers/llvmpipe/lp_state_vs.c" - "src/src/gallium/drivers/llvmpipe/lp_surface.c" - "src/src/gallium/drivers/llvmpipe/lp_tex_sample.c" - "src/src/gallium/drivers/llvmpipe/lp_texture.c" - "src/src/gallium/drivers/llvmpipe/lp_texture_handle.c" -) - -set(mesa_lavapipe_static_sources - "src/src/gallium/frontends/lavapipe/lvp_acceleration_structure.c" - "src/src/gallium/frontends/lavapipe/lvp_cmd_buffer.c" - "src/src/gallium/frontends/lavapipe/lvp_descriptor_set.c" - "src/src/gallium/frontends/lavapipe/lvp_device.c" - "src/src/gallium/frontends/lavapipe/lvp_device_generated_commands.c" - "src/src/gallium/frontends/lavapipe/lvp_execute.c" - "src/src/gallium/frontends/lavapipe/lvp_formats.c" - "src/src/gallium/frontends/lavapipe/lvp_image.c" - "src/src/gallium/frontends/lavapipe/lvp_pipe_sync.c" - "src/src/gallium/frontends/lavapipe/lvp_pipeline.c" - "src/src/gallium/frontends/lavapipe/lvp_pipeline_cache.c" - "src/src/gallium/frontends/lavapipe/lvp_query.c" - "src/src/gallium/frontends/lavapipe/lvp_ray_tracing_pipeline.c" - "src/src/gallium/frontends/lavapipe/lvp_util.c" - "src/src/gallium/frontends/lavapipe/lvp_wsi.c" - "src/src/gallium/frontends/lavapipe/nir/lvp_nir_lower_cooperative_matrix.c" - "src/src/gallium/frontends/lavapipe/nir/lvp_nir_lower_descriptor_heaps.c" - "src/src/gallium/frontends/lavapipe/nir/lvp_nir_lower_exec_graph.c" - "src/src/gallium/frontends/lavapipe/nir/lvp_nir_lower_input_attachments.c" - "src/src/gallium/frontends/lavapipe/nir/lvp_nir_lower_pipeline_layout.c" - "src/src/gallium/frontends/lavapipe/nir/lvp_nir_lower_push_constants.c" - "src/src/gallium/frontends/lavapipe/nir/lvp_nir_lower_ray_queries.c" - "src/src/gallium/frontends/lavapipe/nir/lvp_nir_lower_sparse_residency.c" - "src/src/gallium/frontends/lavapipe/nir/lvp_nir_opt_robustness.c" - "src/src/gallium/frontends/lavapipe/nir/lvp_nir_ray_tracing.c" - "src/src/gallium/targets/lavapipe/lavapipe_target.c" -)
diff --git a/tools/fetch_dawn_dependencies.py b/tools/fetch_dawn_dependencies.py index 2114ea1..9a9ae5a 100644 --- a/tools/fetch_dawn_dependencies.py +++ b/tools/fetch_dawn_dependencies.py
@@ -113,7 +113,6 @@ 'third_party/jinja2', 'third_party/EGL-Registry/src', 'third_party/OpenGL-Registry/src', - 'third_party/libprotobuf-mutator/src', 'third_party/protobuf', 'third_party/markupsafe', 'third_party/glslang/src', @@ -122,7 +121,6 @@ 'third_party/spirv-headers/src', 'third_party/spirv-tools/src', 'third_party/vulkan-headers/src', - 'third_party/vulkan-loader/src', 'third_party/vulkan-utility-libraries/src', 'third_party/webgpu-headers/src', ]
diff --git a/tools/setup-build b/tools/setup-build index 567337e..eced9e1 100755 --- a/tools/setup-build +++ b/tools/setup-build
@@ -67,8 +67,8 @@ echo " debug Make a debug build" echo " " echo " fuzz[=engine], fuzzer[=engine]" - echo " Build fuzzers. Forces Clang to be used. Optional engine" - echo " is 'libfuzzer' (default) or 'centipede' (gn only)" + echo " Build fuzzers (gn only). Optional engine is 'libfuzzer'" + echo " (default) or 'centipede'" echo " gccrt Use GCC 14 runtime with clang" echo " install Install to out/install (cmake only)" echo " native Target the machine you're running on" @@ -209,8 +209,8 @@ fi fi -if [[ "$FUZZER_ENGINE" == "centipede" && "$BUILD_SYSTEM" != "gn" ]]; then - show_usage "the centipede fuzzer engine is only supported with gn" +if [[ -n "$FUZZER_ENGINE" && "$BUILD_SYSTEM" != "gn" ]]; then + show_usage "fuzzing is only supported with gn (CMake fuzzer builds are not supported)" fi BUILD_DIR="$BUILD_SYSTEM-$BUILD_TYPE" @@ -313,12 +313,6 @@ fi CXX_FLAGS+=("--gcc-install-dir=$GCCRT_DIR") fi - if [[ -n "$FUZZER_ENGINE" ]]; then - CMAKE_FLAGS+=("-DTINT_BUILD_FUZZERS=ON") - CMAKE_FLAGS+=("-DDAWN_BUILD_PROTOBUF=ON") - CMAKE_FLAGS+=("-DTINT_BUILD_IR_BINARY=ON") - CMAKE_FLAGS+=("-DDAWN_USE_BUILT_DXC=ON") # TODO(b/348200364) - fi if [[ -x $(command -v ccache) ]]; then CMAKE_FLAGS+=("-DCMAKE_CXX_COMPILER_LAUNCHER=ccache") fi
diff --git a/tools/src/cmd/gen/build/BUILD.cmake.tmpl b/tools/src/cmd/gen/build/BUILD.cmake.tmpl index a8e810d..b855344 100644 --- a/tools/src/cmd/gen/build/BUILD.cmake.tmpl +++ b/tools/src/cmd/gen/build/BUILD.cmake.tmpl
@@ -4,10 +4,8 @@ {{- Eval "TargetIfNotEmpty" ($.Project.Target $ "cmd")}} {{- Eval "TargetIfNotEmpty" ($.Project.Target $ "test_cmd")}} {{- Eval "TargetIfNotEmpty" ($.Project.Target $ "bench_cmd")}} -{{- Eval "TargetIfNotEmpty" ($.Project.Target $ "fuzz_cmd")}} {{- Eval "TargetIfNotEmpty" ($.Project.Target $ "test")}} {{- Eval "TargetIfNotEmpty" ($.Project.Target $ "bench")}} -{{- Eval "TargetIfNotEmpty" ($.Project.Target $ "fuzz")}} {{- /* @@ -32,7 +30,9 @@ */ -}} {{- define "TargetIfNotEmpty"}} {{- if $}} -{{- if len $.SourceFiles}}{{Eval "Target" $}}{{end}} +{{- if or (HasPrefix $.Directory.Path "cmd/fuzz") (eq $.Directory.Path "utils/protos/ir_fuzz")}} +{{- else if and $.Condition (or (Contains $.Condition.String "tint_build_fuzzers") (Contains $.Condition.String "tint_build_fuzztest") (Contains $.Condition.String "tint_build_mesa") (Contains $.Condition.String "tint_build_fuzzer_vulkan_support"))}} +{{- else if len $.SourceFiles}}{{Eval "Target" $}}{{end}} {{- end}} {{- end}} @@ -89,6 +89,7 @@ {{- /* Emit conditional source files and dependencies */}} {{- range $Cond := $.Conditionals}} +{{- if not (or (Contains $Cond.Condition.String "tint_build_fuzzers") (Contains $Cond.Condition.String "tint_build_fuzztest") (Contains $Cond.Condition.String "tint_build_mesa") (Contains $Cond.Condition.String "tint_build_fuzzer_vulkan_support"))}} {{/* newline */}} if({{Eval "Expression" $Cond.Condition}}) {{- if $Cond.SourceFiles}} @@ -113,6 +114,7 @@ ) {{- end}} endif({{Eval "Expression" $Cond.Condition}}) +{{- end}} {{- end}} {{- if $.OutputName}}