Merge upstream & update dependencies
This commit is contained in:
commit
0bd776df12
|
@ -8,4 +8,5 @@
|
|||
*.spvasm eol=lf
|
||||
*.wgsl eol=lf
|
||||
*.h eol=lf
|
||||
*.cpp eol=lf
|
||||
*.cpp eol=lf
|
||||
*.bat eol=crlf
|
||||
|
|
|
@ -4,17 +4,20 @@
|
|||
/.cipd
|
||||
/.gclient
|
||||
/.gclient_entries
|
||||
/.gclient_previous_custom_vars
|
||||
/.gclient_previous_sync_commits
|
||||
/build
|
||||
/buildtools
|
||||
/testing
|
||||
/tools/bin
|
||||
/tools/clang
|
||||
/tools/cmake*
|
||||
/tools/golang
|
||||
/tools/memory
|
||||
/out
|
||||
|
||||
# Tint test validation cache file
|
||||
/test/tint/validation.cache
|
||||
|
||||
# Modified from https://www.gitignore.io/api/vim,macos,linux,emacs,windows,sublimetext,visualstudio,visualstudiocode,intellij
|
||||
|
||||
### Emacs ###
|
||||
|
@ -86,9 +89,6 @@ $RECYCLE.BIN/
|
|||
### Intellij ###
|
||||
.idea
|
||||
|
||||
### Dawn node tools binaries
|
||||
src/dawn/node/tools/bin/
|
||||
|
||||
### Cached node transpiled tools
|
||||
/.node_transpile_work_dir
|
||||
|
||||
|
@ -104,3 +104,4 @@ lcov.info
|
|||
### Clang-Tidy files
|
||||
all_findings.json
|
||||
|
||||
tint.dot
|
||||
|
|
|
@ -73,66 +73,14 @@
|
|||
// A symbolic link to this build directory is created at 'out/active'
|
||||
// which is used to track the active build directory.
|
||||
{
|
||||
"label": "gn gen",
|
||||
"label": "setup build",
|
||||
"type": "shell",
|
||||
"linux": {
|
||||
"command": "./tools/setup-build",
|
||||
"args": [
|
||||
"gn",
|
||||
"${input:buildType}",
|
||||
],
|
||||
},
|
||||
"osx": {
|
||||
"command": "./tools/setup-build",
|
||||
"args": [
|
||||
"gn",
|
||||
"${input:buildType}",
|
||||
],
|
||||
},
|
||||
"windows": {
|
||||
"command": "/C",
|
||||
"args": [
|
||||
"(IF \"${input:buildType}\" == \"Debug\" ( gn gen \"out\\${input:buildType}\" --args=is_debug=true ) ELSE ( gn gen \"out\\${input:buildType}\" --args=is_debug=false )) && (IF EXIST \"out\\active\" rmdir \"out\\active\" /q /s) && (mklink /j \"out\\active\" \"out\\${input:buildType}\")",
|
||||
],
|
||||
"options": {
|
||||
"shell": {
|
||||
"executable": "cmd"
|
||||
},
|
||||
}
|
||||
},
|
||||
"options": {
|
||||
"cwd": "${workspaceRoot}"
|
||||
},
|
||||
"problemMatcher": [],
|
||||
},
|
||||
{
|
||||
"label": "cmake gen",
|
||||
"type": "shell",
|
||||
"linux": {
|
||||
"command": "./tools/setup-build",
|
||||
"args": [
|
||||
"cmake",
|
||||
"${input:buildType}",
|
||||
],
|
||||
},
|
||||
"osx": {
|
||||
"command": "./tools/setup-build",
|
||||
"args": [
|
||||
"cmake",
|
||||
"${input:buildType}",
|
||||
],
|
||||
},
|
||||
"windows": {
|
||||
"command": "/C",
|
||||
"args": [
|
||||
"echo TODO",
|
||||
],
|
||||
"options": {
|
||||
"shell": {
|
||||
"executable": "cmd"
|
||||
},
|
||||
}
|
||||
},
|
||||
"command": "./tools/setup-build",
|
||||
"args": [
|
||||
"${input:buildSystem}",
|
||||
"${input:buildType}",
|
||||
"${input:buildArch}",
|
||||
],
|
||||
"options": {
|
||||
"cwd": "${workspaceRoot}"
|
||||
},
|
||||
|
@ -177,19 +125,24 @@
|
|||
{
|
||||
"label": "push",
|
||||
"type": "shell",
|
||||
"command": "git",
|
||||
"args": [
|
||||
"push",
|
||||
"origin",
|
||||
"HEAD:refs/for/main"
|
||||
],
|
||||
"command": "./tools/push-to-gerrit",
|
||||
"options": {
|
||||
"cwd": "${workspaceRoot}"
|
||||
},
|
||||
"problemMatcher": [],
|
||||
}
|
||||
},
|
||||
],
|
||||
"inputs": [
|
||||
{
|
||||
"id": "buildSystem",
|
||||
"type": "pickString",
|
||||
"options": [
|
||||
"cmake",
|
||||
"gn",
|
||||
],
|
||||
"default": "gn",
|
||||
"description": "The build system",
|
||||
},
|
||||
{
|
||||
"id": "buildType",
|
||||
"type": "pickString",
|
||||
|
@ -200,5 +153,15 @@
|
|||
"default": "Debug",
|
||||
"description": "The type of build",
|
||||
},
|
||||
{
|
||||
"id": "buildArch",
|
||||
"type": "pickString",
|
||||
"options": [
|
||||
"native",
|
||||
"x86",
|
||||
],
|
||||
"default": "native",
|
||||
"description": "The build architecture",
|
||||
},
|
||||
]
|
||||
}
|
||||
|
|
114
CMakeLists.txt
114
CMakeLists.txt
|
@ -77,6 +77,7 @@ function (set_if_not_defined name value description)
|
|||
endfunction()
|
||||
|
||||
# Default values for the backend-enabling options
|
||||
set(ENABLE_D3D11 OFF)
|
||||
set(ENABLE_D3D12 OFF)
|
||||
set(ENABLE_METAL OFF)
|
||||
set(ENABLE_OPENGLES OFF)
|
||||
|
@ -86,6 +87,7 @@ set(USE_WAYLAND OFF)
|
|||
set(USE_X11 OFF)
|
||||
set(BUILD_SAMPLES OFF)
|
||||
if (WIN32)
|
||||
set(ENABLE_D3D11 ON)
|
||||
set(ENABLE_D3D12 ON)
|
||||
if (NOT WINDOWS_STORE)
|
||||
# Enable Vulkan in win32 compilation only
|
||||
|
@ -119,6 +121,7 @@ option_if_not_defined(DAWN_ENABLE_TSAN "Enable thread sanitizer" OFF)
|
|||
option_if_not_defined(DAWN_ENABLE_MSAN "Enable memory sanitizer" OFF)
|
||||
option_if_not_defined(DAWN_ENABLE_UBSAN "Enable undefined behaviour sanitizer" OFF)
|
||||
|
||||
option_if_not_defined(DAWN_ENABLE_D3D11 "Enable compilation of the D3D11 backend" ${ENABLE_D3D11})
|
||||
option_if_not_defined(DAWN_ENABLE_D3D12 "Enable compilation of the D3D12 backend" ${ENABLE_D3D12})
|
||||
option_if_not_defined(DAWN_ENABLE_METAL "Enable compilation of the Metal backend" ${ENABLE_METAL})
|
||||
option_if_not_defined(DAWN_ENABLE_NULL "Enable compilation of the Null backend" ON)
|
||||
|
@ -133,9 +136,13 @@ option_if_not_defined(DAWN_USE_X11 "Enable support for X11 surface" ${USE_X11})
|
|||
option_if_not_defined(DAWN_BUILD_SAMPLES "Enables building Dawn's samples" ${BUILD_SAMPLES})
|
||||
option_if_not_defined(DAWN_BUILD_NODE_BINDINGS "Enables building Dawn's NodeJS bindings" OFF)
|
||||
option_if_not_defined(DAWN_ENABLE_SWIFTSHADER "Enables building Swiftshader as part of the build and Vulkan adapter discovery" OFF)
|
||||
option_if_not_defined(DAWN_BUILD_BENCHMARKS "Build Dawn benchmarks" OFF)
|
||||
|
||||
option_if_not_defined(DAWN_ENABLE_PIC "Build with Position-Independent-Code enabled" OFF)
|
||||
|
||||
option_if_not_defined(DAWN_EMIT_COVERAGE "Emit code coverage information" OFF)
|
||||
set_if_not_defined(LLVM_SOURCE_DIR "${Dawn_LLVM_SOURCE_DIR}" "Directory to an LLVM source checkout. Required to build turbo-cov")
|
||||
|
||||
if (DAWN_ENABLE_OPENGLES OR DAWN_ENABLE_DESKTOP_GL)
|
||||
set(TINT_DEFAULT_GLSL ON)
|
||||
else()
|
||||
|
@ -154,33 +161,39 @@ option_if_not_defined(TINT_BUILD_MSL_WRITER "Build the MSL output writer" ${DAWN
|
|||
option_if_not_defined(TINT_BUILD_SPV_WRITER "Build the SPIR-V output writer" ${DAWN_ENABLE_VULKAN})
|
||||
option_if_not_defined(TINT_BUILD_WGSL_WRITER "Build the WGSL output writer" ON)
|
||||
|
||||
option_if_not_defined(TINT_BUILD_SYNTAX_TREE_WRITER "Build the syntax tree writer" OFF)
|
||||
option_if_not_defined(TINT_BUILD_IR "Build the IR" ON)
|
||||
|
||||
option_if_not_defined(TINT_BUILD_FUZZERS "Build fuzzers" OFF)
|
||||
option_if_not_defined(TINT_BUILD_SPIRV_TOOLS_FUZZER "Build SPIRV-Tools fuzzer" OFF)
|
||||
option_if_not_defined(TINT_BUILD_AST_FUZZER "Build AST fuzzer" OFF)
|
||||
option_if_not_defined(TINT_BUILD_REGEX_FUZZER "Build regex fuzzer" OFF)
|
||||
option_if_not_defined(TINT_BUILD_BENCHMARKS "Build benchmarks" OFF)
|
||||
option_if_not_defined(TINT_BUILD_BENCHMARKS "Build Tint benchmarks" OFF)
|
||||
option_if_not_defined(TINT_BUILD_TESTS "Build tests" OFF)
|
||||
option_if_not_defined(TINT_BUILD_AS_OTHER_OS "Override OS detection to force building of *_other.cc files" OFF)
|
||||
option_if_not_defined(TINT_BUILD_REMOTE_COMPILE "Build the remote-compile tool for validating shaders on a remote machine" OFF)
|
||||
|
||||
set_if_not_defined(TINT_EXTERNAL_BENCHMARK_CORPUS_DIR "" "Directory that holds a corpus of external shaders to benchmark.")
|
||||
|
||||
option_if_not_defined(TINT_ENABLE_BREAK_IN_DEBUGGER "Enable tint::debugger::Break()" OFF)
|
||||
option_if_not_defined(TINT_EMIT_COVERAGE "Emit code coverage information" OFF)
|
||||
option_if_not_defined(TINT_CHECK_CHROMIUM_STYLE "Check for [chromium-style] issues during build" OFF)
|
||||
option_if_not_defined(TINT_SYMBOL_STORE_DEBUG_NAME "Enable storing of name in tint::ast::Symbol to help debugging the AST" OFF)
|
||||
option_if_not_defined(TINT_RANDOMIZE_HASHES "Randomize the hash seed value to detect non-deterministic output" OFF)
|
||||
|
||||
# Recommended setting for compability with future abseil releases.
|
||||
set(ABSL_PROPAGATE_CXX_STD ON)
|
||||
|
||||
set_if_not_defined(DAWN_THIRD_PARTY_DIR "${Dawn_SOURCE_DIR}/third_party" "Directory in which to find third-party dependencies.")
|
||||
set_if_not_defined(DAWN_VULKAN_DEPS_DIR "${DAWN_THIRD_PARTY_DIR}/vulkan-deps" "Directory in which to find vulkan-deps")
|
||||
|
||||
set_if_not_defined(DAWN_ABSEIL_DIR "${DAWN_THIRD_PARTY_DIR}/abseil-cpp" "Directory in which to find Abseil")
|
||||
set_if_not_defined(DAWN_GLFW_DIR "${DAWN_THIRD_PARTY_DIR}/glfw" "Directory in which to find GLFW")
|
||||
set_if_not_defined(DAWN_JINJA2_DIR "${DAWN_THIRD_PARTY_DIR}/jinja2" "Directory in which to find Jinja2")
|
||||
set_if_not_defined(DAWN_MARKUPSAFE_DIR "${DAWN_THIRD_PARTY_DIR}/markupsafe" "Directory in which to find MarkupSafe")
|
||||
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_SPIRV_HEADERS_DIR "${DAWN_THIRD_PARTY_DIR}/vulkan-deps/spirv-headers/src" "Directory in which to find SPIRV-Headers")
|
||||
set_if_not_defined(DAWN_SPIRV_TOOLS_DIR "${DAWN_THIRD_PARTY_DIR}/vulkan-deps/spirv-tools/src" "Directory in which to find SPIRV-Tools")
|
||||
set_if_not_defined(DAWN_SWIFTSHADER_DIR "${DAWN_THIRD_PARTY_DIR}/swiftshader" "Directory in which to find swiftshader")
|
||||
set_if_not_defined(DAWN_TINT_DIR "${Dawn_SOURCE_DIR}" "Directory in which to find Tint")
|
||||
set_if_not_defined(DAWN_VULKAN_DEPS_DIR "${DAWN_THIRD_PARTY_DIR}/vulkan-deps" "Directory in which to find vulkan-deps")
|
||||
|
||||
set_if_not_defined(DAWN_SPIRV_TOOLS_DIR "${DAWN_VULKAN_DEPS_DIR}/spirv-tools/src" "Directory in which to find SPIRV-Tools")
|
||||
set_if_not_defined(DAWN_SPIRV_HEADERS_DIR "${DAWN_VULKAN_DEPS_DIR}/spirv-headers/src" "Directory in which to find SPIRV-Headers")
|
||||
set_if_not_defined(DAWN_VULKAN_HEADERS_DIR "${DAWN_VULKAN_DEPS_DIR}/vulkan-headers/src" "Directory in which to find Vulkan-Headers")
|
||||
set_if_not_defined(DAWN_VULKAN_TOOLS_DIR "${DAWN_VULKAN_DEPS_DIR}/vulkan-tools/src" "Directory in which to find Vulkan-Tools")
|
||||
|
||||
|
@ -190,6 +203,8 @@ set_if_not_defined(NODE_API_HEADERS_DIR "${DAWN_THIRD_PARTY_DIR}/node-api-header
|
|||
set_if_not_defined(WEBGPU_IDL_PATH "${DAWN_THIRD_PARTY_DIR}/gpuweb/webgpu.idl" "Path to the webgpu.idl definition file")
|
||||
set_if_not_defined(GO_EXECUTABLE "go" "Golang executable for running the IDL generator")
|
||||
|
||||
option_if_not_defined(DAWN_FETCH_DEPENDENCIES "Use fetch_dawn_dependencies.py as an alternative to using depot_tools" OFF)
|
||||
|
||||
# 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)
|
||||
|
@ -255,6 +270,7 @@ if (${TINT_BUILD_REGEX_FUZZER})
|
|||
set(TINT_BUILD_HLSL_WRITER ON CACHE BOOL "Build HLSL writer" FORCE)
|
||||
endif()
|
||||
|
||||
message(STATUS "Dawn build D3D11 backend: ${DAWN_ENABLE_D3D11}")
|
||||
message(STATUS "Dawn build D3D12 backend: ${DAWN_ENABLE_D3D12}")
|
||||
message(STATUS "Dawn build Metal backend: ${DAWN_ENABLE_METAL}")
|
||||
message(STATUS "Dawn build Vulkan backend: ${DAWN_ENABLE_VULKAN}")
|
||||
|
@ -269,6 +285,7 @@ message(STATUS "Dawn build X11 support: ${DAWN_USE_X11}")
|
|||
message(STATUS "Dawn build samples: ${DAWN_BUILD_SAMPLES}")
|
||||
message(STATUS "Dawn build Node bindings: ${DAWN_BUILD_NODE_BINDINGS}")
|
||||
message(STATUS "Dawn build Swiftshader: ${DAWN_ENABLE_SWIFTSHADER}")
|
||||
message(STATUS "Dawn build benchmarks: ${DAWN_BUILD_BENCHMARKS}")
|
||||
|
||||
message(STATUS "Dawn build PIC: ${DAWN_ENABLE_PIC}")
|
||||
|
||||
|
@ -287,6 +304,8 @@ message(STATUS "Tint build HLSL writer: ${TINT_BUILD_HLSL_WRITER}")
|
|||
message(STATUS "Tint build MSL writer: ${TINT_BUILD_MSL_WRITER}")
|
||||
message(STATUS "Tint build SPIR-V writer: ${TINT_BUILD_SPV_WRITER}")
|
||||
message(STATUS "Tint build WGSL writer: ${TINT_BUILD_WGSL_WRITER}")
|
||||
message(STATUS "Tint build Syntax Tree writer: ${TINT_BUILD_SYNTAX_TREE_WRITER}")
|
||||
message(STATUS "Tint build IR: ${TINT_BUILD_IR}")
|
||||
message(STATUS "Tint build fuzzers: ${TINT_BUILD_FUZZERS}")
|
||||
message(STATUS "Tint build SPIRV-Tools fuzzer: ${TINT_BUILD_SPIRV_TOOLS_FUZZER}")
|
||||
message(STATUS "Tint build AST fuzzer: ${TINT_BUILD_AST_FUZZER}")
|
||||
|
@ -295,6 +314,8 @@ message(STATUS "Tint build benchmarks: ${TINT_BUILD_BENCHMARKS}")
|
|||
message(STATUS "Tint build tests: ${TINT_BUILD_TESTS}")
|
||||
message(STATUS "Tint build checking [chromium-style]: ${TINT_CHECK_CHROMIUM_STYLE}")
|
||||
message(STATUS "Tint build remote-compile tool: ${TINT_BUILD_REMOTE_COMPILE}")
|
||||
message(STATUS "Tint external benchmark corpus dir: ${TINT_EXTERNAL_BENCHMARK_CORPUS_DIR}")
|
||||
|
||||
|
||||
if (NOT ${TINT_LIB_FUZZING_ENGINE_LINK_OPTIONS} STREQUAL "")
|
||||
message(STATUS "Using provided LIB_FUZZING_ENGINE options: ${TINT_LIB_FUZZING_ENGINE_LINK_OPTIONS}")
|
||||
|
@ -303,7 +324,6 @@ endif()
|
|||
message(STATUS "Using python3")
|
||||
find_package(PythonInterp 3 REQUIRED)
|
||||
|
||||
|
||||
################################################################################
|
||||
# common_compile_options - sets compiler and linker options common for dawn and
|
||||
# tint on the given target
|
||||
|
@ -313,7 +333,9 @@ function(common_compile_options TARGET)
|
|||
target_compile_options(${TARGET} PRIVATE
|
||||
-fno-exceptions
|
||||
-fno-rtti
|
||||
-fvisibility-inlines-hidden
|
||||
|
||||
-Wno-deprecated-builtins
|
||||
-Wno-unknown-warning-option
|
||||
)
|
||||
|
||||
if (${DAWN_ENABLE_MSAN})
|
||||
|
@ -326,10 +348,27 @@ function(common_compile_options TARGET)
|
|||
target_compile_options(${TARGET} PUBLIC -fsanitize=thread)
|
||||
target_link_options(${TARGET} PUBLIC -fsanitize=thread)
|
||||
elseif (${DAWN_ENABLE_UBSAN})
|
||||
target_compile_options(${TARGET} PUBLIC -fsanitize=undefined)
|
||||
target_link_options(${TARGET} PUBLIC -fsanitize=undefined)
|
||||
target_compile_options(${TARGET} PUBLIC -fsanitize=undefined -fsanitize=float-divide-by-zero)
|
||||
target_link_options(${TARGET} PUBLIC -fsanitize=undefined -fsanitize=float-divide-by-zero)
|
||||
endif()
|
||||
endif(COMPILER_IS_LIKE_GNU)
|
||||
|
||||
if(MSVC)
|
||||
target_compile_options(${TARGET} PUBLIC /utf-8)
|
||||
endif()
|
||||
|
||||
if (DAWN_EMIT_COVERAGE)
|
||||
target_compile_definitions(${TARGET} PRIVATE "DAWN_EMIT_COVERAGE")
|
||||
if(CMAKE_CXX_COMPILER_ID MATCHES "GNU")
|
||||
target_compile_options(${TARGET} PRIVATE "--coverage")
|
||||
target_link_options(${TARGET} PRIVATE "gcov")
|
||||
elseif(COMPILER_IS_CLANG OR COMPILER_IS_CLANG_CL)
|
||||
target_compile_options(${TARGET} PRIVATE "-fprofile-instr-generate" "-fcoverage-mapping")
|
||||
target_link_options(${TARGET} PRIVATE "-fprofile-instr-generate" "-fcoverage-mapping")
|
||||
else()
|
||||
message(FATAL_ERROR "Coverage generation not supported for the ${CMAKE_CXX_COMPILER_ID} toolchain")
|
||||
endif()
|
||||
endif(DAWN_EMIT_COVERAGE)
|
||||
endfunction()
|
||||
|
||||
if (${DAWN_ENABLE_TSAN})
|
||||
|
@ -341,6 +380,12 @@ endif()
|
|||
# Dawn's public and internal "configs"
|
||||
################################################################################
|
||||
|
||||
set(IS_DEBUG_BUILD 0)
|
||||
string(TOUPPER "${CMAKE_BUILD_TYPE}" build_type)
|
||||
if ((NOT ${build_type} STREQUAL "RELEASE") AND (NOT ${build_type} STREQUAL "RELWITHDEBINFO"))
|
||||
set(IS_DEBUG_BUILD 1)
|
||||
endif()
|
||||
|
||||
# The public config contains only the include paths for the Dawn headers.
|
||||
add_library(dawn_public_config INTERFACE)
|
||||
target_include_directories(dawn_public_config INTERFACE
|
||||
|
@ -357,9 +402,12 @@ target_include_directories(dawn_internal_config INTERFACE
|
|||
target_link_libraries(dawn_internal_config INTERFACE dawn_public_config)
|
||||
|
||||
# Compile definitions for the internal config
|
||||
if (DAWN_ALWAYS_ASSERT OR CMAKE_BUILD_TYPE STREQUAL Debug)
|
||||
if (DAWN_ALWAYS_ASSERT OR IS_DEBUG_BUILD)
|
||||
target_compile_definitions(dawn_internal_config INTERFACE "DAWN_ENABLE_ASSERTS")
|
||||
endif()
|
||||
if (DAWN_ENABLE_D3D11)
|
||||
target_compile_definitions(dawn_internal_config INTERFACE "DAWN_ENABLE_BACKEND_D3D11")
|
||||
endif()
|
||||
if (DAWN_ENABLE_D3D12)
|
||||
target_compile_definitions(dawn_internal_config INTERFACE "DAWN_ENABLE_BACKEND_D3D12")
|
||||
endif()
|
||||
|
@ -421,10 +469,13 @@ if((CMAKE_CXX_COMPILER_ID STREQUAL "Clang") AND (CMAKE_CXX_SIMULATE_ID STREQUAL
|
|||
set(COMPILER_IS_CLANG_CL TRUE)
|
||||
endif()
|
||||
|
||||
if((CMAKE_CXX_COMPILER_ID STREQUAL "GNU") OR
|
||||
(CMAKE_CXX_COMPILER_ID STREQUAL "AppleClang") OR
|
||||
if((CMAKE_CXX_COMPILER_ID STREQUAL "AppleClang") OR
|
||||
((CMAKE_CXX_COMPILER_ID STREQUAL "Clang") AND
|
||||
(NOT COMPILER_IS_CLANG_CL)))
|
||||
set(COMPILER_IS_CLANG TRUE)
|
||||
endif()
|
||||
|
||||
if((CMAKE_CXX_COMPILER_ID STREQUAL "GNU") OR COMPILER_IS_CLANG)
|
||||
set(COMPILER_IS_LIKE_GNU TRUE)
|
||||
endif()
|
||||
|
||||
|
@ -488,20 +539,11 @@ function(tint_core_compile_options TARGET)
|
|||
target_compile_definitions(${TARGET} PUBLIC -DTINT_BUILD_MSL_WRITER=$<BOOL:${TINT_BUILD_MSL_WRITER}>)
|
||||
target_compile_definitions(${TARGET} PUBLIC -DTINT_BUILD_SPV_WRITER=$<BOOL:${TINT_BUILD_SPV_WRITER}>)
|
||||
target_compile_definitions(${TARGET} PUBLIC -DTINT_BUILD_WGSL_WRITER=$<BOOL:${TINT_BUILD_WGSL_WRITER}>)
|
||||
target_compile_definitions(${TARGET} PUBLIC
|
||||
-DTINT_BUILD_SYNTAX_TREE_WRITER=$<BOOL:${TINT_BUILD_SYNTAX_TREE_WRITER}>)
|
||||
target_compile_definitions(${TARGET} PUBLIC -DTINT_BUILD_IR=$<BOOL:${TINT_BUILD_IR}>)
|
||||
|
||||
common_compile_options(${TARGET})
|
||||
|
||||
if (TINT_EMIT_COVERAGE)
|
||||
if(CMAKE_CXX_COMPILER_ID MATCHES "GNU")
|
||||
target_compile_options(${TARGET} PRIVATE "--coverage")
|
||||
target_link_options(${TARGET} PRIVATE "gcov")
|
||||
elseif(CMAKE_CXX_COMPILER_ID MATCHES "Clang")
|
||||
target_compile_options(${TARGET} PRIVATE "-fprofile-instr-generate" "-fcoverage-mapping")
|
||||
target_link_options(${TARGET} PRIVATE "-fprofile-instr-generate" "-fcoverage-mapping")
|
||||
else()
|
||||
message(FATAL_ERROR "Coverage generation not supported for the ${CMAKE_CXX_COMPILER_ID} toolchain")
|
||||
endif()
|
||||
endif(TINT_EMIT_COVERAGE)
|
||||
endfunction()
|
||||
|
||||
function(tint_default_compile_options TARGET)
|
||||
|
@ -521,9 +563,11 @@ function(tint_default_compile_options TARGET)
|
|||
-Wno-c++98-compat
|
||||
-Wno-c++98-compat-pedantic
|
||||
-Wno-format-pedantic
|
||||
-Wno-poison-system-directories
|
||||
-Wno-return-std-move-in-c++11
|
||||
-Wno-unknown-warning-option
|
||||
-Wno-undefined-var-template
|
||||
-Wno-unsafe-buffer-usage
|
||||
-Wno-used-but-marked-unused
|
||||
-Weverything
|
||||
)
|
||||
|
@ -534,8 +578,7 @@ function(tint_default_compile_options TARGET)
|
|||
${COMMON_GNU_OPTIONS}
|
||||
)
|
||||
|
||||
if (("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang") OR
|
||||
("${CMAKE_CXX_COMPILER_ID}" STREQUAL "AppleClang"))
|
||||
if (COMPILER_IS_CLANG)
|
||||
target_compile_options(${TARGET} PRIVATE
|
||||
${COMMON_CLANG_OPTIONS}
|
||||
)
|
||||
|
@ -583,6 +626,15 @@ function(tint_default_compile_options TARGET)
|
|||
)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if (TINT_RANDOMIZE_HASHES)
|
||||
if(NOT DEFINED TINT_HASH_SEED)
|
||||
string(RANDOM LENGTH 16 ALPHABET "0123456789abcdef" seed)
|
||||
set(TINT_HASH_SEED "0x${seed}" CACHE STRING "Tint hash seed value")
|
||||
message("Using TINT_HASH_SEED: ${TINT_HASH_SEED}")
|
||||
endif()
|
||||
target_compile_definitions(${TARGET} PUBLIC "-DTINT_HASH_SEED=${TINT_HASH_SEED}")
|
||||
endif()
|
||||
endfunction()
|
||||
|
||||
################################################################################
|
||||
|
@ -625,9 +677,11 @@ add_custom_target(tint-format
|
|||
COMMENT "Running formatter"
|
||||
VERBATIM)
|
||||
|
||||
if (DAWN_EMIT_COVERAGE)
|
||||
add_subdirectory(tools/src/cmd/turbo-cov)
|
||||
|
||||
if (TINT_EMIT_COVERAGE AND CMAKE_CXX_COMPILER_ID MATCHES "Clang")
|
||||
# Generates a lcov.info file at the project root.
|
||||
# The tint-generate-coverage target generates a lcov.info file at the project
|
||||
# root, holding the code coverage for all the tint_unitests.
|
||||
# This can be used by tools such as VSCode's Coverage Gutters extension to
|
||||
# visualize code coverage in the editor.
|
||||
get_filename_component(CLANG_BIN_DIR ${CMAKE_C_COMPILER} DIRECTORY)
|
||||
|
|
73
DEPS
73
DEPS
|
@ -17,6 +17,9 @@ vars = {
|
|||
'dawn_cmake_version': 'version:2@3.23.3',
|
||||
'dawn_cmake_win32_sha1': 'b106d66bcdc8a71ea2cdf5446091327bfdb1bcd7',
|
||||
'dawn_gn_version': 'git_revision:bd99dbf98cbdefe18a4128189665c5761263bcfb',
|
||||
# ninja CIPD package version.
|
||||
# https://chrome-infra-packages.appspot.com/p/infra/3pp/tools/ninja
|
||||
'dawn_ninja_version': 'version:2@1.11.1.chromium.6',
|
||||
'dawn_go_version': 'version:2@1.18.4',
|
||||
|
||||
'node_darwin_arm64_sha': '31859fc1fa0994a95f44f09c367d6ff63607cfde',
|
||||
|
@ -34,14 +37,14 @@ vars = {
|
|||
deps = {
|
||||
# Dependencies required to use GN/Clang in standalone
|
||||
'build': {
|
||||
'url': '{chromium_git}/chromium/src/build@f14f6d206b9a0c81a0fefba487bcba0d90ddb5fe',
|
||||
'url': '{chromium_git}/chromium/src/build@1103ef535ca1e100db5d4e59781a4e59369a9818',
|
||||
'condition': 'dawn_standalone',
|
||||
},
|
||||
'buildtools': {
|
||||
'url': '{chromium_git}/chromium/src/buildtools@fe57e98eeb2172d7517f6dec1072ca641a019893',
|
||||
'url': '{chromium_git}/chromium/src/buildtools@2ff42d2008f09f65de12e70c6ff0ad58ddb090ad',
|
||||
'condition': 'dawn_standalone',
|
||||
},
|
||||
'buildtools/clang_format/script': {
|
||||
'third_party/clang-format/script': {
|
||||
'url': '{chromium_git}/external/github.com/llvm/llvm-project/clang/tools/clang-format.git@8b525d2747f2584fc35d8c7e612e66f377858df7',
|
||||
'condition': 'dawn_standalone',
|
||||
},
|
||||
|
@ -71,17 +74,17 @@ deps = {
|
|||
},
|
||||
|
||||
'buildtools/third_party/libc++/trunk': {
|
||||
'url': '{chromium_git}/external/github.com/llvm/llvm-project/libcxx.git@eb79671bfbedd77b747d01dee8c0479ff1693f88',
|
||||
'url': '{chromium_git}/external/github.com/llvm/llvm-project/libcxx.git@c1341b9a1a7de7c193a23bf003d5479c48957f7d',
|
||||
'condition': 'dawn_standalone',
|
||||
},
|
||||
|
||||
'buildtools/third_party/libc++abi/trunk': {
|
||||
'url': '{chromium_git}/external/github.com/llvm/llvm-project/libcxxabi.git@b954e3e65634a9e2f7b595598a30c455f5f2eb26',
|
||||
'url': '{chromium_git}/external/github.com/llvm/llvm-project/libcxxabi.git@f7460fc60ab56553f0b3b0853f1ea60aa51b9478',
|
||||
'condition': 'dawn_standalone',
|
||||
},
|
||||
|
||||
'tools/clang': {
|
||||
'url': '{chromium_git}/chromium/src/tools/clang@3d8d88e8bb600789ba3e798f38ff314521aac524',
|
||||
'url': '{chromium_git}/chromium/src/tools/clang@effd9257d456f2d42e9e22fa4f37a24d8cf0b5b5',
|
||||
'condition': 'dawn_standalone',
|
||||
},
|
||||
'tools/clang/dsymutil': {
|
||||
|
@ -95,16 +98,20 @@ deps = {
|
|||
|
||||
# Testing, GTest and GMock
|
||||
'testing': {
|
||||
'url': '{chromium_git}/chromium/src/testing@1f497ac0b0afc242222780a4789d13fbf00073eb',
|
||||
'url': '{chromium_git}/chromium/src/testing@166db27fd0d53afc0c716b1ae9c15725e380871f',
|
||||
'condition': 'dawn_standalone',
|
||||
},
|
||||
'third_party/googletest': {
|
||||
'url': '{chromium_git}/external/github.com/google/googletest@bda85449f48f2d80a494c8c07766b6aba3170f3b',
|
||||
'url': '{chromium_git}/external/github.com/google/googletest@7a7231c442484be389fdf01594310349ca0e42a8',
|
||||
'condition': 'dawn_standalone',
|
||||
},
|
||||
# This is a dependency of //testing
|
||||
'third_party/catapult': {
|
||||
'url': '{chromium_git}/catapult.git@fa35beefb3429605035f98211ddb8750dee6a13d',
|
||||
'url': '{chromium_git}/catapult.git@c1e70d412ce01fb194f73f7abfdac710aae87dae',
|
||||
'condition': 'dawn_standalone',
|
||||
},
|
||||
'third_party/google_benchmark/src': {
|
||||
'url': '{chromium_git}/external/github.com/google/benchmark.git' + '@' + 'efc89f0b524780b1994d5dddd83a92718e5be492',
|
||||
'condition': 'dawn_standalone',
|
||||
},
|
||||
|
||||
|
@ -129,17 +136,17 @@ deps = {
|
|||
},
|
||||
|
||||
'third_party/angle': {
|
||||
'url': '{chromium_git}/angle/angle@5ef3960bc1f10d180331a8134b0d11139fa1f913',
|
||||
'url': '{chromium_git}/angle/angle@ff110417bb04e9bc13079eeed99940009d9c3ce1',
|
||||
'condition': 'dawn_standalone',
|
||||
},
|
||||
|
||||
'third_party/swiftshader': {
|
||||
'url': '{swiftshader_git}/SwiftShader@476165cc7c0c7247869c13f7f80dd25ec1fd2b03',
|
||||
'url': '{swiftshader_git}/SwiftShader@f549d5e6c6635ec8b75fb544a6bdc9f48bfb1dd3',
|
||||
'condition': 'dawn_standalone',
|
||||
},
|
||||
|
||||
'third_party/vulkan-deps': {
|
||||
'url': '{chromium_git}/vulkan-deps@c5f01bfc31ec5b7165eebf9f241890744edc7789',
|
||||
'url': '{chromium_git}/vulkan-deps@25c584aa4cec2d79706854dafbd52392389d8004',
|
||||
'condition': 'dawn_standalone',
|
||||
},
|
||||
|
||||
|
@ -155,7 +162,7 @@ deps = {
|
|||
|
||||
# WebGPU CTS - not used directly by Dawn, only transitively by Chromium.
|
||||
'third_party/webgpu-cts': {
|
||||
'url': '{chromium_git}/external/github.com/gpuweb/cts@27dc745ca167d1e9eb956947f2109441dca0b4f7',
|
||||
'url': '{chromium_git}/external/github.com/gpuweb/cts@b033a4f1ae4a0e19ae4d5563fae023001bbf570f',
|
||||
'condition': 'build_with_chromium',
|
||||
},
|
||||
|
||||
|
@ -169,12 +176,11 @@ deps = {
|
|||
'condition': 'dawn_node',
|
||||
},
|
||||
'third_party/gpuweb': {
|
||||
'url': '{github_git}/gpuweb/gpuweb.git@3c4734b09c68eb800b15da5e9ecefeca735fa7df',
|
||||
'url': '{github_git}/gpuweb/gpuweb.git@2e75d5e68e80e4c28575c7836ee00ca22cf4ca63',
|
||||
'condition': 'dawn_node',
|
||||
},
|
||||
|
||||
'tools/golang': {
|
||||
'condition': 'dawn_node',
|
||||
'packages': [{
|
||||
'package': 'infra/3pp/tools/go/${{platform}}',
|
||||
'version': Var('dawn_go_version'),
|
||||
|
@ -191,11 +197,17 @@ deps = {
|
|||
'dep_type': 'cipd',
|
||||
},
|
||||
|
||||
# Misc dependencies inherited from Tint
|
||||
'third_party/benchmark': {
|
||||
'url': '{chromium_git}/external/github.com/google/benchmark.git@e991355c02b93fe17713efe04cbc2e278e00fdbd',
|
||||
'condition': 'dawn_standalone',
|
||||
'third_party/ninja': {
|
||||
'packages': [
|
||||
{
|
||||
'package': 'infra/3pp/tools/ninja/${{platform}}',
|
||||
'version': Var('dawn_ninja_version'),
|
||||
}
|
||||
],
|
||||
'dep_type': 'cipd',
|
||||
},
|
||||
|
||||
# Misc dependencies inherited from Tint
|
||||
'third_party/protobuf': {
|
||||
'url': '{chromium_git}/external/github.com/protocolbuffers/protobuf.git@fde7cf7358ec7cd69e8db9be4f1fa6a5c431386a',
|
||||
'condition': 'dawn_standalone',
|
||||
|
@ -226,6 +238,18 @@ hooks = [
|
|||
'condition': 'dawn_standalone and checkout_mac',
|
||||
'action': ['python3', 'build/mac_toolchain.py'],
|
||||
},
|
||||
{
|
||||
# Case-insensitivity for the Win SDK. Must run before win_toolchain below.
|
||||
'name': 'ciopfs_linux',
|
||||
'pattern': '.',
|
||||
'condition': 'dawn_standalone and checkout_win and host_os == "linux"',
|
||||
'action': [ 'download_from_google_storage',
|
||||
'--no_resume',
|
||||
'--no_auth',
|
||||
'--bucket', 'chromium-browser-clang/ciopfs',
|
||||
'-s', 'build/ciopfs.sha1',
|
||||
]
|
||||
},
|
||||
{
|
||||
# Update the Windows toolchain if necessary. Must run before 'clang' below.
|
||||
'name': 'win_toolchain',
|
||||
|
@ -261,6 +285,17 @@ hooks = [
|
|||
'-s', 'build/toolchain/win/rc/win/rc.exe.sha1',
|
||||
],
|
||||
},
|
||||
{
|
||||
'name': 'rc_linux',
|
||||
'pattern': '.',
|
||||
'condition': 'dawn_standalone and checkout_win and host_os == "linux"',
|
||||
'action': [ 'download_from_google_storage',
|
||||
'--no_resume',
|
||||
'--no_auth',
|
||||
'--bucket', 'chromium-browser-clang/rc',
|
||||
'-s', 'build/toolchain/win/rc/linux64/rc.sha1',
|
||||
]
|
||||
},
|
||||
# Pull clang-format binaries using checked-in hashes.
|
||||
{
|
||||
'name': 'clang_format_win',
|
||||
|
|
3
OWNERS
3
OWNERS
|
@ -7,7 +7,8 @@ dsinclair@chromium.org
|
|||
enga@chromium.org
|
||||
jiawei.shao@intel.com
|
||||
|
||||
# TODO(dawn:1337): Move this file in src/dawn.
|
||||
# TODO(crbug.com/dawn/1339): Move dawn.json into src/dawn.
|
||||
per-file dawn.json=file://src/dawn/OWNERS
|
||||
|
||||
per-file DEPS=*
|
||||
per-file README.md=file://docs/OWNERS
|
||||
|
|
36
PRESUBMIT.py
36
PRESUBMIT.py
|
@ -114,7 +114,7 @@ def _NonInclusiveFileFilter(file):
|
|||
"src/dawn/native/metal/BackendMTL.mm", # OSX Constant
|
||||
"src/dawn/native/vulkan/SamplerVk.cpp", # External URL
|
||||
"src/dawn/native/vulkan/TextureVk.cpp", # External URL
|
||||
"src/dawn/node/tools/src/cmd/run-cts/main.go", # Terminal type name
|
||||
"src/tools/src/cmd/run-cts/main.go", # Terminal type name
|
||||
"src/dawn/samples/ComputeBoids.cpp", # External URL
|
||||
"src/dawn/tests/end2end/DepthBiasTests.cpp", # External URL
|
||||
"src/tint/transform/canonicalize_entry_point_io.cc", # External URL
|
||||
|
@ -127,14 +127,42 @@ def _NonInclusiveFileFilter(file):
|
|||
return file.LocalPath() not in filter_list
|
||||
|
||||
|
||||
def _CheckNoStaleGen(input_api, output_api):
|
||||
results = []
|
||||
try:
|
||||
go = input_api.os_path.join(input_api.change.RepositoryRoot(), "tools",
|
||||
"golang", "bin", "go")
|
||||
if input_api.is_windows:
|
||||
go += '.exe'
|
||||
input_api.subprocess.check_call_out(
|
||||
[go, "run", "tools/src/cmd/gen/main.go", "--check-stale"],
|
||||
stdout=input_api.subprocess.PIPE,
|
||||
stderr=input_api.subprocess.PIPE,
|
||||
cwd=input_api.change.RepositoryRoot())
|
||||
except input_api.subprocess.CalledProcessError as e:
|
||||
if input_api.is_committing:
|
||||
results.append(output_api.PresubmitError('%s' % (e, )))
|
||||
else:
|
||||
results.append(output_api.PresubmitPromptWarning('%s' % (e, )))
|
||||
return results
|
||||
|
||||
|
||||
def _DoCommonChecks(input_api, output_api):
|
||||
results = []
|
||||
results.extend(_CheckNoStaleGen(input_api, output_api))
|
||||
results.extend(
|
||||
input_api.canned_checks.CheckChangedLUCIConfigs(input_api, output_api))
|
||||
|
||||
result_factory = output_api.PresubmitPromptWarning
|
||||
if input_api.is_committing:
|
||||
result_factory = output_api.PresubmitError
|
||||
|
||||
results.extend(
|
||||
input_api.canned_checks.CheckPatchFormatted(input_api,
|
||||
output_api,
|
||||
check_python=True))
|
||||
input_api.canned_checks.CheckPatchFormatted(
|
||||
input_api,
|
||||
output_api,
|
||||
check_python=True,
|
||||
result_factory=result_factory))
|
||||
results.extend(
|
||||
input_api.canned_checks.CheckChangeHasDescription(
|
||||
input_api, output_api))
|
||||
|
|
|
@ -17,6 +17,7 @@ import("//build_overrides/vulkan_common.gni")
|
|||
# These are variables that are overridable by projects that include Dawn.
|
||||
# The values in this file are the defaults for when we are building from
|
||||
# Dawn's repository.
|
||||
vvl_spirv_headers_dir = "//third_party/vulkan-deps/spirv-headers/src"
|
||||
vvl_spirv_tools_dir = "//third_party/vulkan-deps/spirv-tools/src"
|
||||
vvl_glslang_dir = "//third_party/vulkan-deps/glslang/src"
|
||||
|
||||
|
|
|
@ -15,5 +15,4 @@
|
|||
import("//build/config/ozone.gni")
|
||||
|
||||
# Dawn has no wayland third-party dir
|
||||
use_system_libwayland = true
|
||||
wayland_gn_dir = ""
|
||||
|
|
336
dawn.json
336
dawn.json
|
@ -53,7 +53,8 @@
|
|||
"members": [
|
||||
{"name": "compatible surface", "type": "surface", "optional": true},
|
||||
{"name": "power preference", "type": "power preference", "default": "undefined"},
|
||||
{"name": "force fallback adapter", "type": "bool", "default": "false"}
|
||||
{"name": "force fallback adapter", "type": "bool", "default": "false"},
|
||||
{"name": "compatibility mode", "type": "bool", "default": "false", "tags": ["dawn", "emscripten"]}
|
||||
]
|
||||
},
|
||||
"request adapter status": {
|
||||
|
@ -77,7 +78,13 @@
|
|||
},
|
||||
"adapter": {
|
||||
"category": "object",
|
||||
"no autolock": true,
|
||||
"methods": [
|
||||
{
|
||||
"name": "get instance",
|
||||
"tags": ["dawn"],
|
||||
"returns": "instance"
|
||||
},
|
||||
{
|
||||
"name": "get limits",
|
||||
"returns": "bool",
|
||||
|
@ -134,7 +141,8 @@
|
|||
{"name": "name", "type": "char", "annotation": "const*", "length": "strlen"},
|
||||
{"name": "driver description", "type": "char", "annotation": "const*", "length": "strlen"},
|
||||
{"name": "adapter type", "type": "adapter type"},
|
||||
{"name": "backend type", "type": "backend type"}
|
||||
{"name": "backend type", "type": "backend type"},
|
||||
{"name": "compatibility mode", "type": "bool", "default": "false", "tags": ["dawn", "emscripten"]}
|
||||
]
|
||||
},
|
||||
"adapter type": {
|
||||
|
@ -155,19 +163,21 @@
|
|||
{"name": "required features count", "type": "uint32_t", "default": 0},
|
||||
{"name": "required features", "type": "feature name", "annotation": "const*", "length": "required features count", "default": "nullptr"},
|
||||
{"name": "required limits", "type": "required limits", "annotation": "const*", "optional": true},
|
||||
{"name": "default queue", "type": "queue descriptor"}
|
||||
{"name": "default queue", "type": "queue descriptor"},
|
||||
{"name": "device lost callback", "type": "device lost callback", "default": "nullptr"},
|
||||
{"name": "device lost userdata", "type": "void *", "default": "nullptr"}
|
||||
]
|
||||
},
|
||||
"dawn toggles device descriptor": {
|
||||
"dawn toggles descriptor": {
|
||||
"tags": ["dawn", "native"],
|
||||
"category": "structure",
|
||||
"chained": "in",
|
||||
"chain roots": ["device descriptor"],
|
||||
"chain roots": ["instance descriptor", "device descriptor"],
|
||||
"members": [
|
||||
{"name": "force enabled toggles count", "type": "uint32_t", "default": 0},
|
||||
{"name": "force enabled toggles", "type": "char", "annotation": "const*const*", "length": "force enabled toggles count"},
|
||||
{"name": "force disabled toggles count", "type": "uint32_t", "default": 0},
|
||||
{"name": "force disabled toggles", "type": "char", "annotation": "const*const*", "length": "force disabled toggles count"}
|
||||
{"name": "enabled toggles count", "type": "uint32_t", "default": 0},
|
||||
{"name": "enabled toggles", "type": "char", "annotation": "const*const*", "length": "enabled toggles count"},
|
||||
{"name": "disabled toggles count", "type": "uint32_t", "default": 0},
|
||||
{"name": "disabled toggles", "type": "char", "annotation": "const*const*", "length": "disabled toggles count"}
|
||||
]
|
||||
},
|
||||
"dawn cache device descriptor" : {
|
||||
|
@ -220,7 +230,7 @@
|
|||
{"name": "binding", "type": "uint32_t"},
|
||||
{"name": "buffer", "type": "buffer", "optional": true},
|
||||
{"name": "offset", "type": "uint64_t", "default": "0"},
|
||||
{"name": "size", "type": "uint64_t"},
|
||||
{"name": "size", "type": "uint64_t", "default": "WGPU_WHOLE_SIZE"},
|
||||
{"name": "sampler", "type": "sampler", "optional": true},
|
||||
{"name": "texture view", "type": "texture view", "optional": true}
|
||||
]
|
||||
|
@ -445,6 +455,10 @@
|
|||
"name": "get size",
|
||||
"returns": "uint64_t"
|
||||
},
|
||||
{
|
||||
"name": "get map state",
|
||||
"returns": "buffer map state"
|
||||
},
|
||||
{
|
||||
"name": "unmap"
|
||||
},
|
||||
|
@ -475,11 +489,22 @@
|
|||
"emscripten_no_enum_table": true,
|
||||
"values": [
|
||||
{"value": 0, "name": "success"},
|
||||
{"value": 1, "name": "error"},
|
||||
{"value": 1, "name": "validation error"},
|
||||
{"value": 2, "name": "unknown"},
|
||||
{"value": 3, "name": "device lost"},
|
||||
{"value": 4, "name": "destroyed before callback"},
|
||||
{"value": 5, "name": "unmapped before callback"}
|
||||
{"value": 5, "name": "unmapped before callback"},
|
||||
{"value": 6, "name": "mapping already pending"},
|
||||
{"value": 7, "name": "offset out of range"},
|
||||
{"value": 8, "name": "size out of range"}
|
||||
]
|
||||
},
|
||||
"buffer map state": {
|
||||
"category": "enum",
|
||||
"values": [
|
||||
{"value": 0, "name": "unmapped"},
|
||||
{"value": 1, "name": "pending"},
|
||||
{"value": 2, "name": "mapped"}
|
||||
]
|
||||
},
|
||||
"buffer usage": {
|
||||
|
@ -550,6 +575,7 @@
|
|||
},
|
||||
"command encoder": {
|
||||
"category": "object",
|
||||
"no autolock": true,
|
||||
"methods": [
|
||||
{
|
||||
"name": "finish",
|
||||
|
@ -737,7 +763,10 @@
|
|||
{"name": "line num", "type": "uint64_t"},
|
||||
{"name": "line pos", "type": "uint64_t"},
|
||||
{"name": "offset", "type": "uint64_t"},
|
||||
{"name": "length", "type": "uint64_t"}
|
||||
{"name": "length", "type": "uint64_t"},
|
||||
{"name": "utf16 line pos", "type": "uint64_t"},
|
||||
{"name": "utf16 offset", "type": "uint64_t"},
|
||||
{"name": "utf16 length", "type": "uint64_t"}
|
||||
]
|
||||
},
|
||||
"compilation message type": {
|
||||
|
@ -760,6 +789,7 @@
|
|||
},
|
||||
"compute pass encoder": {
|
||||
"category": "object",
|
||||
"no autolock": true,
|
||||
"methods": [
|
||||
{
|
||||
"name": "insert debug marker",
|
||||
|
@ -808,15 +838,6 @@
|
|||
{"name": "query index", "type": "uint32_t"}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "dispatch",
|
||||
"tags": ["deprecated"],
|
||||
"args": [
|
||||
{"name": "workgroupCountX", "type": "uint32_t"},
|
||||
{"name": "workgroupCountY", "type": "uint32_t", "default": "1"},
|
||||
{"name": "workgroupCountZ", "type": "uint32_t", "default": "1"}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "dispatch workgroups",
|
||||
"args": [
|
||||
|
@ -825,14 +846,6 @@
|
|||
{"name": "workgroupCountZ", "type": "uint32_t", "default": "1"}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "dispatch indirect",
|
||||
"tags": ["deprecated"],
|
||||
"args": [
|
||||
{"name": "indirect buffer", "type": "buffer"},
|
||||
{"name": "indirect offset", "type": "uint64_t"}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "dispatch workgroups indirect",
|
||||
"args": [
|
||||
|
@ -843,10 +856,6 @@
|
|||
{
|
||||
"name": "end"
|
||||
},
|
||||
{
|
||||
"name": "end pass",
|
||||
"tags": ["deprecated"]
|
||||
},
|
||||
{
|
||||
"name": "end pipeline statistics query",
|
||||
"tags": ["upstream", "emscripten"]
|
||||
|
@ -916,7 +925,6 @@
|
|||
"category": "structure",
|
||||
"extensible": "in",
|
||||
"tags": ["dawn"],
|
||||
"_TODO": "support number as length input",
|
||||
"members": [
|
||||
{"name": "flip y", "type": "bool", "default": "false"},
|
||||
{"name": "needs color space conversion", "type": "bool", "default": "false"},
|
||||
|
@ -945,10 +953,11 @@
|
|||
"emscripten_no_enum_table": true,
|
||||
"values": [
|
||||
{"value": 0, "name": "success"},
|
||||
{"value": 1, "name": "error"},
|
||||
{"value": 2, "name": "device lost"},
|
||||
{"value": 3, "name": "device destroyed"},
|
||||
{"value": 4, "name": "unknown"}
|
||||
{"value": 1, "name": "validation error"},
|
||||
{"value": 2, "name": "internal error"},
|
||||
{"value": 3, "name": "device lost"},
|
||||
{"value": 4, "name": "device destroyed"},
|
||||
{"value": 5, "name": "unknown"}
|
||||
]
|
||||
},
|
||||
"create render pipeline async callback": {
|
||||
|
@ -995,7 +1004,10 @@
|
|||
{
|
||||
"name": "create error buffer",
|
||||
"returns": "buffer",
|
||||
"tags": ["dawn"]
|
||||
"tags": ["dawn"],
|
||||
"args": [
|
||||
{"name": "descriptor", "type": "buffer descriptor", "annotation": "const*"}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "create command encoder",
|
||||
|
@ -1085,17 +1097,15 @@
|
|||
]
|
||||
},
|
||||
{
|
||||
"name": "create swap chain",
|
||||
"tags": ["dawn"],
|
||||
"returns": "swap chain",
|
||||
"name": "create error shader module",
|
||||
"returns": "shader module",
|
||||
"args": [
|
||||
{"name": "surface", "type": "surface", "optional": true},
|
||||
{"name": "descriptor", "type": "swap chain descriptor", "annotation": "const*"}
|
||||
{"name": "descriptor", "type": "shader module descriptor", "annotation": "const*"},
|
||||
{"name": "error message", "type": "char", "annotation": "const*", "length": "strlen"}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "create swap chain",
|
||||
"tags": ["upstream", "emscripten"],
|
||||
"returns": "swap chain",
|
||||
"args": [
|
||||
{"name": "surface", "type": "surface"},
|
||||
|
@ -1159,15 +1169,21 @@
|
|||
"tags": ["dawn"]
|
||||
},
|
||||
{
|
||||
"name": "lose for testing",
|
||||
"name": "force loss",
|
||||
"args": [
|
||||
{"name": "type", "type": "device lost reason"},
|
||||
{"name": "message", "type": "char", "annotation": "const*", "length": "strlen"}
|
||||
],
|
||||
"tags": ["dawn"]
|
||||
},
|
||||
{
|
||||
"name": "tick",
|
||||
"no autolock": true,
|
||||
"tags": ["dawn"]
|
||||
},
|
||||
{
|
||||
"name": "set uncaptured error callback",
|
||||
"no autolock": true,
|
||||
"args": [
|
||||
{"name": "callback", "type": "error callback"},
|
||||
{"name": "userdata", "type": "void", "annotation": "*"}
|
||||
|
@ -1175,6 +1191,7 @@
|
|||
},
|
||||
{
|
||||
"name": "set logging callback",
|
||||
"no autolock": true,
|
||||
"tags": ["dawn"],
|
||||
"args": [
|
||||
{"name": "callback", "type": "logging callback"},
|
||||
|
@ -1183,6 +1200,8 @@
|
|||
},
|
||||
{
|
||||
"name": "set device lost callback",
|
||||
"no autolock": true,
|
||||
"tags": ["deprecated"],
|
||||
"args": [
|
||||
{"name": "callback", "type": "device lost callback"},
|
||||
{"name": "userdata", "type": "void", "annotation": "*"}
|
||||
|
@ -1196,7 +1215,6 @@
|
|||
},
|
||||
{
|
||||
"name": "pop error scope",
|
||||
"returns": "bool",
|
||||
"args": [
|
||||
{"name": "callback", "type": "error callback"},
|
||||
{"name": "userdata", "type": "void", "annotation": "*"}
|
||||
|
@ -1208,6 +1226,21 @@
|
|||
"args": [
|
||||
{"name": "label", "type": "char", "annotation": "const*", "length": "strlen"}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "validate texture descriptor",
|
||||
"tags": ["dawn"],
|
||||
"args": [
|
||||
{"name": "descriptor", "type": "texture descriptor", "annotation": "const*"}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "get supported surface usage",
|
||||
"tags": ["dawn"],
|
||||
"returns": "texture usage",
|
||||
"args": [
|
||||
{"name": "surface", "type": "surface"}
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
|
@ -1246,6 +1279,7 @@
|
|||
{"name": "max texture dimension 3D", "type": "uint32_t", "default": "WGPU_LIMIT_U32_UNDEFINED"},
|
||||
{"name": "max texture array layers", "type": "uint32_t", "default": "WGPU_LIMIT_U32_UNDEFINED"},
|
||||
{"name": "max bind groups", "type": "uint32_t", "default": "WGPU_LIMIT_U32_UNDEFINED"},
|
||||
{"name": "max bindings per bind group", "type": "uint32_t", "default": "WGPU_LIMIT_U32_UNDEFINED"},
|
||||
{"name": "max dynamic uniform buffers per pipeline layout", "type": "uint32_t", "default": "WGPU_LIMIT_U32_UNDEFINED"},
|
||||
{"name": "max dynamic storage buffers per pipeline layout", "type": "uint32_t", "default": "WGPU_LIMIT_U32_UNDEFINED"},
|
||||
{"name": "max sampled textures per shader stage", "type": "uint32_t", "default": "WGPU_LIMIT_U32_UNDEFINED"},
|
||||
|
@ -1258,11 +1292,13 @@
|
|||
{"name": "min uniform buffer offset alignment", "type": "uint32_t", "default": "WGPU_LIMIT_U32_UNDEFINED"},
|
||||
{"name": "min storage buffer offset alignment", "type": "uint32_t", "default": "WGPU_LIMIT_U32_UNDEFINED"},
|
||||
{"name": "max vertex buffers", "type": "uint32_t", "default": "WGPU_LIMIT_U32_UNDEFINED"},
|
||||
{"name": "max buffer size", "type": "uint64_t", "default": "WGPU_LIMIT_U64_UNDEFINED"},
|
||||
{"name": "max vertex attributes", "type": "uint32_t", "default": "WGPU_LIMIT_U32_UNDEFINED"},
|
||||
{"name": "max vertex buffer array stride", "type": "uint32_t", "default": "WGPU_LIMIT_U32_UNDEFINED"},
|
||||
{"name": "max inter stage shader components", "type": "uint32_t", "default": "WGPU_LIMIT_U32_UNDEFINED"},
|
||||
{"name": "max inter stage shader variables", "type": "uint32_t", "default": "WGPU_LIMIT_U32_UNDEFINED"},
|
||||
{"name": "max color attachments", "type": "uint32_t", "default": "WGPU_LIMIT_U32_UNDEFINED"},
|
||||
{"name": "max color attachment bytes per sample", "type": "uint32_t", "default": "WGPU_LIMIT_U32_UNDEFINED"},
|
||||
{"name": "max compute workgroup storage size", "type": "uint32_t", "default": "WGPU_LIMIT_U32_UNDEFINED"},
|
||||
{"name": "max compute invocations per workgroup", "type": "uint32_t", "default": "WGPU_LIMIT_U32_UNDEFINED"},
|
||||
{"name": "max compute workgroup size x", "type": "uint32_t", "default": "WGPU_LIMIT_U32_UNDEFINED"},
|
||||
|
@ -1298,7 +1334,8 @@
|
|||
"category": "enum",
|
||||
"values": [
|
||||
{"value": 0, "name": "validation"},
|
||||
{"value": 1, "name": "out of memory"}
|
||||
{"value": 1, "name": "out of memory"},
|
||||
{"value": 2, "name": "internal"}
|
||||
]
|
||||
},
|
||||
"error type": {
|
||||
|
@ -1308,8 +1345,9 @@
|
|||
{"value": 0, "name": "no error"},
|
||||
{"value": 1, "name": "validation"},
|
||||
{"value": 2, "name": "out of memory"},
|
||||
{"value": 3, "name": "unknown"},
|
||||
{"value": 4, "name": "device lost"}
|
||||
{"value": 3, "name": "internal"},
|
||||
{"value": 4, "name": "unknown"},
|
||||
{"value": 5, "name": "device lost"}
|
||||
]
|
||||
},
|
||||
"logging type": {
|
||||
|
@ -1322,6 +1360,15 @@
|
|||
{"value": 3, "name": "error"}
|
||||
]
|
||||
},
|
||||
"extent 2D": {
|
||||
"category": "structure",
|
||||
"tags": ["dawn"],
|
||||
"_TODO": "crbug.com/1316671: Remove default value of 'width' after chromium side chagnes landed",
|
||||
"members": [
|
||||
{"name": "width", "type": "uint32_t", "default": 0},
|
||||
{"name": "height", "type": "uint32_t", "default": 1}
|
||||
]
|
||||
},
|
||||
"extent 3D": {
|
||||
"category": "structure",
|
||||
"members": [
|
||||
|
@ -1344,9 +1391,27 @@
|
|||
{
|
||||
"name": "destroy",
|
||||
"returns": "void"
|
||||
},
|
||||
{
|
||||
"name": "expire",
|
||||
"returns": "void"
|
||||
},
|
||||
{
|
||||
"name": "refresh",
|
||||
"returns": "void"
|
||||
}
|
||||
]
|
||||
},
|
||||
"external texture rotation":{
|
||||
"category": "enum",
|
||||
"tags": ["dawn"],
|
||||
"values": [
|
||||
{"value": 0, "name": "rotate 0 degrees"},
|
||||
{"value": 1, "name": "rotate 90 degrees"},
|
||||
{"value": 2, "name": "rotate 180 degrees"},
|
||||
{"value": 3, "name": "rotate 270 degrees"}
|
||||
]
|
||||
},
|
||||
"external texture descriptor": {
|
||||
"category": "structure",
|
||||
"extensible": "in",
|
||||
|
@ -1355,6 +1420,8 @@
|
|||
{"name": "label", "type": "char", "annotation": "const*", "length": "strlen", "optional": true},
|
||||
{"name": "plane 0", "type": "texture view"},
|
||||
{"name": "plane 1", "type": "texture view", "optional": true},
|
||||
{"name": "visible origin", "type": "origin 2D"},
|
||||
{"name": "visible size", "type": "extent 2D"},
|
||||
{"name": "do yuv to rgb conversion only", "type": "bool", "default": "false"},
|
||||
{"name": "yuv to rgb conversion matrix", "type": "float", "annotation": "const*",
|
||||
"length": 12, "optional": true},
|
||||
|
@ -1363,7 +1430,9 @@
|
|||
{"name": "dst transfer function parameters", "type": "float", "annotation": "const*",
|
||||
"length": 7},
|
||||
{"name": "gamut conversion matrix", "type": "float", "annotation": "const*",
|
||||
"length": 9}
|
||||
"length": 9},
|
||||
{"name": "flip y", "type": "bool", "default": "false"},
|
||||
{"name": "rotation", "type": "external texture rotation", "default": "rotate 0 degrees"}
|
||||
]
|
||||
},
|
||||
"feature name": {
|
||||
|
@ -1378,11 +1447,19 @@
|
|||
{"value": 6, "name": "texture compression ETC2"},
|
||||
{"value": 7, "name": "texture compression ASTC"},
|
||||
{"value": 8, "name": "indirect first instance"},
|
||||
{"value": 9, "name": "shader f16"},
|
||||
{"value": 10, "name": "RG11B10 ufloat renderable"},
|
||||
{"value": 11, "name": "BGRA8 unorm storage"},
|
||||
{"value": 12, "name": "float32 filterable"},
|
||||
{"value": 1001, "name": "dawn shader float 16", "tags": ["dawn"]},
|
||||
{"value": 1002, "name": "dawn internal usages", "tags": ["dawn"]},
|
||||
{"value": 1003, "name": "dawn multi planar formats", "tags": ["dawn"]},
|
||||
{"value": 1004, "name": "dawn native", "tags": ["dawn", "native"]},
|
||||
{"value": 1005, "name": "chromium experimental dp4a", "tags": ["dawn"]}
|
||||
{"value": 1005, "name": "chromium experimental dp4a", "tags": ["dawn"]},
|
||||
{"value": 1006, "name": "timestamp query inside passes", "tags": ["dawn"]},
|
||||
{"value": 1007, "name": "implicit device synchronization", "tags": ["dawn", "native"]},
|
||||
{"value": 1008, "name": "surface capabilities", "tags": ["dawn"]},
|
||||
{"value": 1009, "name": "transient attachments", "tags": ["dawn"]}
|
||||
]
|
||||
},
|
||||
"filter mode": {
|
||||
|
@ -1420,6 +1497,16 @@
|
|||
{"name": "aspect", "type": "texture aspect", "default": "all"}
|
||||
]
|
||||
},
|
||||
"image copy external texture": {
|
||||
"category": "structure",
|
||||
"extensible": "in",
|
||||
"tags": ["dawn"],
|
||||
"members": [
|
||||
{"name": "external texture", "type": "external texture"},
|
||||
{"name": "origin", "type": "origin 3D"},
|
||||
{"name": "natural size", "type": "extent 2D"}
|
||||
]
|
||||
},
|
||||
"index format": {
|
||||
"category": "enum",
|
||||
"values": [
|
||||
|
@ -1430,6 +1517,7 @@
|
|||
},
|
||||
"instance": {
|
||||
"category": "object",
|
||||
"no autolock": true,
|
||||
"methods": [
|
||||
{
|
||||
"name": "create surface",
|
||||
|
@ -1439,8 +1527,7 @@
|
|||
]
|
||||
},
|
||||
{
|
||||
"name": "process events",
|
||||
"tags": ["upstream", "emscripten"]
|
||||
"name": "process events"
|
||||
},
|
||||
{
|
||||
"name": "request adapter",
|
||||
|
@ -1457,16 +1544,6 @@
|
|||
"extensible": "in",
|
||||
"members": []
|
||||
},
|
||||
"dawn instance descriptor": {
|
||||
"tags": ["dawn", "native"],
|
||||
"category": "structure",
|
||||
"chained": "in",
|
||||
"chain roots": ["instance descriptor"],
|
||||
"members": [
|
||||
{"name": "additional runtime search paths count", "type": "uint32_t", "default": 0},
|
||||
{"name": "additional runtime search paths", "type": "char", "annotation": "const*const*", "length": "additional runtime search paths count"}
|
||||
]
|
||||
},
|
||||
"vertex attribute": {
|
||||
"category": "structure",
|
||||
"extensible": false,
|
||||
|
@ -1512,7 +1589,6 @@
|
|||
},
|
||||
"mipmap filter mode": {
|
||||
"category": "enum",
|
||||
"tags": ["upstream"],
|
||||
"values": [
|
||||
{"value": 0, "name": "nearest"},
|
||||
{"value": 1, "name": "linear"}
|
||||
|
@ -1534,6 +1610,14 @@
|
|||
{"name": "z", "type": "uint32_t", "default": "0"}
|
||||
]
|
||||
},
|
||||
"origin 2D": {
|
||||
"category": "structure",
|
||||
"tags": ["dawn"],
|
||||
"members": [
|
||||
{"name": "x", "type": "uint32_t", "default": "0"},
|
||||
{"name": "y", "type": "uint32_t", "default": "0"}
|
||||