diff --git a/.appveyor.yml b/.appveyor.yml index c2b1ffec3d..e516403e2f 100644 --- a/.appveyor.yml +++ b/.appveyor.yml @@ -13,7 +13,7 @@ install: build_script: - mkdir build - cd build - - cmake -DNXT_USE_WERROR=1 -DNXT_ENABLE_VULKAN=1 .. + - cmake -DDAWN_USE_WERROR=1 -DDAWN_ENABLE_VULKAN=1 .. - cmake --build . -- /verbosity:minimal # TODO(cwallez@chromium.org) test on more than Debug. diff --git a/.travis.yml b/.travis.yml index 7d96afb4b5..f5061a0ac1 100644 --- a/.travis.yml +++ b/.travis.yml @@ -65,7 +65,7 @@ script: - mkdir -p build - cd build - cmake --version - - cmake -G "Ninja" -DCMAKE_BUILD_TYPE=$BUILD_TYPE -DNXT_USE_WERROR=1 -DNXT_ENABLE_VULKAN=$BUILD_VULKAN .. + - cmake -G "Ninja" -DCMAKE_BUILD_TYPE=$BUILD_TYPE -DDAWN_USE_WERROR=1 -DDAWN_ENABLE_VULKAN=$BUILD_VULKAN .. - cmake --build . # Test diff --git a/CMakeLists.txt b/CMakeLists.txt index b478deb4c7..61c4b81c80 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -32,7 +32,7 @@ endif() # Configuration options ################################################################################ -option(NXT_USE_WERROR "Treat warnings as error (useful for CI)" 0) +option(DAWN_USE_WERROR "Treat warnings as error (useful for CI)" 0) # Default values for the backend-enabling options set(ENABLE_D3D12 OFF) @@ -43,114 +43,114 @@ elseif(APPLE) set(ENABLE_METAL ON) endif() -option(NXT_ENABLE_D3D12 "Enable compilation of the D3D12 backend" ${ENABLE_D3D12}) -option(NXT_ENABLE_METAL "Enable compilation of the Metal backend" ${ENABLE_METAL}) -option(NXT_ENABLE_NULL "Enable compilation of the Null backend" ON) -option(NXT_ENABLE_OPENGL "Enable compilation of the OpenGL backend" ON) -option(NXT_ENABLE_VULKAN "Enable compilation of the Vulkan backend" OFF) -option(NXT_ALWAYS_ASSERT "Enable assertions on all build types" OFF) -option(NXT_USE_CPP17 "Use some optional C++17 features for compile-time checks" OFF) +option(DAWN_ENABLE_D3D12 "Enable compilation of the D3D12 backend" ${ENABLE_D3D12}) +option(DAWN_ENABLE_METAL "Enable compilation of the Metal backend" ${ENABLE_METAL}) +option(DAWN_ENABLE_NULL "Enable compilation of the Null backend" ON) +option(DAWN_ENABLE_OPENGL "Enable compilation of the OpenGL backend" ON) +option(DAWN_ENABLE_VULKAN "Enable compilation of the Vulkan backend" OFF) +option(DAWN_ALWAYS_ASSERT "Enable assertions on all build types" OFF) +option(DAWN_USE_CPP17 "Use some optional C++17 features for compile-time checks" OFF) ################################################################################ # Precompute compile flags and defines, functions to set them ################################################################################ -set(NXT_FLAGS "") -set(NXT_DEFS "") -set(NXT_INTERNAL_FLAGS "") -set(NXT_INTERNAL_DEFS "") -set(NXT_GENERATED_FLAGS "") +set(DAWN_FLAGS "") +set(DAWN_DEFS "") +set(DAWN_INTERNAL_FLAGS "") +set(DAWN_INTERNAL_DEFS "") +set(DAWN_GENERATED_FLAGS "") -set(NXT_ENABLE_ASSERTS $,$>) +set(DAWN_ENABLE_ASSERTS $,$>) -list(APPEND NXT_DEFS $<${NXT_ENABLE_ASSERTS}:NXT_ENABLE_ASSERTS>) +list(APPEND DAWN_DEFS $<${DAWN_ENABLE_ASSERTS}:DAWN_ENABLE_ASSERTS>) -if (NXT_USE_CPP17) - list(APPEND NXT_INTERNAL_DEFS "NXT_CPP_VERSION=17") +if (DAWN_USE_CPP17) + list(APPEND DAWN_INTERNAL_DEFS "DAWN_CPP_VERSION=17") else() - list(APPEND NXT_INTERNAL_DEFS "NXT_CPP_VERSION=14") + list(APPEND DAWN_INTERNAL_DEFS "DAWN_CPP_VERSION=14") endif() -if (NXT_ENABLE_D3D12) - list(APPEND NXT_INTERNAL_DEFS "NXT_ENABLE_BACKEND_D3D12") +if (DAWN_ENABLE_D3D12) + list(APPEND DAWN_INTERNAL_DEFS "DAWN_ENABLE_BACKEND_D3D12") endif() -if (NXT_ENABLE_METAL) - list(APPEND NXT_INTERNAL_DEFS "NXT_ENABLE_BACKEND_METAL") +if (DAWN_ENABLE_METAL) + list(APPEND DAWN_INTERNAL_DEFS "DAWN_ENABLE_BACKEND_METAL") endif() -if (NXT_ENABLE_NULL) - list(APPEND NXT_INTERNAL_DEFS "NXT_ENABLE_BACKEND_NULL") +if (DAWN_ENABLE_NULL) + list(APPEND DAWN_INTERNAL_DEFS "DAWN_ENABLE_BACKEND_NULL") endif() -if (NXT_ENABLE_OPENGL) - list(APPEND NXT_INTERNAL_DEFS "NXT_ENABLE_BACKEND_OPENGL") +if (DAWN_ENABLE_OPENGL) + list(APPEND DAWN_INTERNAL_DEFS "DAWN_ENABLE_BACKEND_OPENGL") endif() -if (NXT_ENABLE_VULKAN) - list(APPEND NXT_INTERNAL_DEFS "NXT_ENABLE_BACKEND_VULKAN") +if (DAWN_ENABLE_VULKAN) + list(APPEND DAWN_INTERNAL_DEFS "DAWN_ENABLE_BACKEND_VULKAN") endif() if (WIN32) # Define NOMINMAX to prevent conflicts between std::min/max and the min/max macros in WinDef.h - list(APPEND NXT_DEFS "NOMINMAX") + list(APPEND DAWN_DEFS "NOMINMAX") # Avoid Windows.h including a lot of headers - list(APPEND NXT_DEFS "WIN32_LEAN_AND_MEAN") + list(APPEND DAWN_DEFS "WIN32_LEAN_AND_MEAN") # Remove compile error where the mock NXT creates too many sections for the old obj format. - list(APPEND NXT_FLAGS "/bigobj") + list(APPEND DAWN_FLAGS "/bigobj") endif() if (MSVC) - list(APPEND NXT_FLAGS "/std:c++14") - list(APPEND NXT_FLAGS "/EHsc") - list(APPEND NXT_INTERNAL_FLAGS "/W4") + list(APPEND DAWN_FLAGS "/std:c++14") + list(APPEND DAWN_FLAGS "/EHsc") + list(APPEND DAWN_INTERNAL_FLAGS "/W4") # Allow declarations hiding members as it is used all over NXT - list(APPEND NXT_INTERNAL_FLAGS "/wd4458") - list(APPEND NXT_INTERNAL_FLAGS "/wd4996") # Allow deprecated functions like strncpy + list(APPEND DAWN_INTERNAL_FLAGS "/wd4458") + list(APPEND DAWN_INTERNAL_FLAGS "/wd4996") # Allow deprecated functions like strncpy - list(APPEND NXT_GENERATED_FLAGS "/wd4702") # Allow unreachable code - list(APPEND NXT_GENERATED_FLAGS "/wd4189") # Allow unused variable + list(APPEND DAWN_GENERATED_FLAGS "/wd4702") # Allow unreachable code + list(APPEND DAWN_GENERATED_FLAGS "/wd4189") # Allow unused variable - if(NXT_USE_WERROR) - list(APPEND NXT_INTERNAL_FLAGS "/WX") + if(DAWN_USE_WERROR) + list(APPEND DAWN_INTERNAL_FLAGS "/WX") endif() else() # Activate C++14 only on C++ files, not C files. - list(APPEND NXT_FLAGS "$<$,CXX>:-std=c++14>") + list(APPEND DAWN_FLAGS "$<$,CXX>:-std=c++14>") # enable -Wold-style-cast on C++ - list(APPEND NXT_FLAGS "$<$,CXX>:-Wold-style-cast>") - list(APPEND NXT_FLAGS "-fPIC") + list(APPEND DAWN_FLAGS "$<$,CXX>:-Wold-style-cast>") + list(APPEND DAWN_FLAGS "-fPIC") - list(APPEND NXT_INTERNAL_FLAGS "-Wall" "-Wextra") - list(APPEND NXT_INTERNAL_FLAGS "-pedantic") - list(APPEND NXT_GENERATED_FLAGS "-Wno-unused-variable" "-Wno-unused-function") + list(APPEND DAWN_INTERNAL_FLAGS "-Wall" "-Wextra") + list(APPEND DAWN_INTERNAL_FLAGS "-pedantic") + list(APPEND DAWN_GENERATED_FLAGS "-Wno-unused-variable" "-Wno-unused-function") if("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang") # don't break the build on older clang versions - list(APPEND NXT_INTERNAL_FLAGS "-Wno-error=unknown-warning-option") + list(APPEND DAWN_INTERNAL_FLAGS "-Wno-error=unknown-warning-option") # GCC's conversion warnings are less useful than clang's - list(APPEND NXT_INTERNAL_FLAGS "-Wconversion" "-Wno-sign-conversion") + list(APPEND DAWN_INTERNAL_FLAGS "-Wconversion" "-Wno-sign-conversion") # disable a clang-only -pedantic warning - list(APPEND NXT_INTERNAL_FLAGS "-Wno-gnu-zero-variadic-macro-arguments") + list(APPEND DAWN_INTERNAL_FLAGS "-Wno-gnu-zero-variadic-macro-arguments") # additional potentially useful warnings (feel free to remove if they prove un-useful) - list(APPEND NXT_INTERNAL_FLAGS "-Wextra-semi") - list(APPEND NXT_INTERNAL_FLAGS "-Wstrict-aliasing") - list(APPEND NXT_INTERNAL_FLAGS "-Wunreachable-code") - list(APPEND NXT_GENERATED_FLAGS "-Wno-unreachable-code") + list(APPEND DAWN_INTERNAL_FLAGS "-Wextra-semi") + list(APPEND DAWN_INTERNAL_FLAGS "-Wstrict-aliasing") + list(APPEND DAWN_INTERNAL_FLAGS "-Wunreachable-code") + list(APPEND DAWN_GENERATED_FLAGS "-Wno-unreachable-code") # Probably okay to enable if we establish a field naming convention: - #list(APPEND NXT_INTERNAL_FLAGS "-Wshadow") + #list(APPEND DAWN_INTERNAL_FLAGS "-Wshadow") endif() - if(NXT_USE_WERROR) - list(APPEND NXT_INTERNAL_FLAGS "-Werror") + if(DAWN_USE_WERROR) + list(APPEND DAWN_INTERNAL_FLAGS "-Werror") endif() endif() function(NXTExternalTarget folder target) - set_property(TARGET ${target} APPEND PROPERTY COMPILE_OPTIONS ${NXT_FLAGS}) - set_property(TARGET ${target} APPEND PROPERTY COMPILE_DEFINITIONS ${NXT_DEFS}) + set_property(TARGET ${target} APPEND PROPERTY COMPILE_OPTIONS ${DAWN_FLAGS}) + set_property(TARGET ${target} APPEND PROPERTY COMPILE_DEFINITIONS ${DAWN_DEFS}) set_property(TARGET ${target} PROPERTY FOLDER "nxt/${folder}") endfunction() function(NXTInternalTarget folder target) NXTExternalTarget("${folder}" ${target}) - set_property(TARGET ${target} APPEND PROPERTY COMPILE_OPTIONS ${NXT_INTERNAL_FLAGS}) - set_property(TARGET ${target} APPEND PROPERTY COMPILE_DEFINITIONS ${NXT_INTERNAL_DEFS}) + set_property(TARGET ${target} APPEND PROPERTY COMPILE_OPTIONS ${DAWN_INTERNAL_FLAGS}) + set_property(TARGET ${target} APPEND PROPERTY COMPILE_DEFINITIONS ${DAWN_INTERNAL_DEFS}) # Group the target sources by folder to have folders show in Visual Studio if (MSVC) diff --git a/examples/SampleUtils.cpp b/examples/SampleUtils.cpp index fe3e94926d..23b0d8fa01 100644 --- a/examples/SampleUtils.cpp +++ b/examples/SampleUtils.cpp @@ -43,13 +43,13 @@ enum class CmdBufType { // Default to D3D12, Metal, Vulkan, OpenGL in that order as D3D12 and Metal are the preferred on // their respective platforms, and Vulkan is preferred to OpenGL -#if defined(NXT_ENABLE_BACKEND_D3D12) +#if defined(DAWN_ENABLE_BACKEND_D3D12) static utils::BackendType backendType = utils::BackendType::D3D12; -#elif defined(NXT_ENABLE_BACKEND_METAL) +#elif defined(DAWN_ENABLE_BACKEND_METAL) static utils::BackendType backendType = utils::BackendType::Metal; -#elif defined(NXT_ENABLE_BACKEND_OPENGL) +#elif defined(DAWN_ENABLE_BACKEND_OPENGL) static utils::BackendType backendType = utils::BackendType::OpenGL; -#elif defined(NXT_ENABLE_BACKEND_VULKAN) +#elif defined(DAWN_ENABLE_BACKEND_VULKAN) static utils::BackendType backendType = utils::BackendType::Vulkan; #else #error diff --git a/generator/CMakeLists.txt b/generator/CMakeLists.txt index d33f6e9ad5..75d172c71d 100644 --- a/generator/CMakeLists.txt +++ b/generator/CMakeLists.txt @@ -62,7 +62,7 @@ function(Generate) ) NXTInternalTarget("${G_FOLDER}" ${G_LIB_NAME}) - set_property(TARGET ${G_LIB_NAME} APPEND PROPERTY COMPILE_OPTIONS ${NXT_GENERATED_FLAGS}) + set_property(TARGET ${G_LIB_NAME} APPEND PROPERTY COMPILE_OPTIONS ${DAWN_GENERATED_FLAGS}) endfunction() set(GENERATED_DIR ${CMAKE_CURRENT_BINARY_DIR} PARENT_SCOPE) diff --git a/src/backend/CMakeLists.txt b/src/backend/CMakeLists.txt index 0ef364670e..cab783eaf5 100644 --- a/src/backend/CMakeLists.txt +++ b/src/backend/CMakeLists.txt @@ -51,7 +51,7 @@ endfunction() # OpenGL Backend ################################################################################ -if (NXT_ENABLE_OPENGL) +if (DAWN_ENABLE_OPENGL) GenerateProcTable(opengl) target_link_libraries(opengl_autogen glfw glad) @@ -96,7 +96,7 @@ endif() # Null Backend ################################################################################ -if (NXT_ENABLE_NULL) +if (DAWN_ENABLE_NULL) GenerateProcTable(null) list(APPEND BACKEND_SOURCES @@ -109,7 +109,7 @@ endif() # Metal Backend ################################################################################ -if (NXT_ENABLE_METAL) +if (DAWN_ENABLE_METAL) GenerateProcTable(metal) target_link_libraries(metal_autogen "-framework QuartzCore" "-framework Metal") @@ -152,7 +152,7 @@ endif() # D3D12 Backend ################################################################################ -if (NXT_ENABLE_D3D12) +if (DAWN_ENABLE_D3D12) GenerateProcTable(d3d12) # WIN10_SDK_PATH will be something like C:\Program Files (x86)\Windows Kits\10 @@ -269,7 +269,7 @@ endif() # Vulkan Backend ################################################################################ -if (NXT_ENABLE_VULKAN) +if (DAWN_ENABLE_VULKAN) GenerateProcTable(vulkan) target_include_directories(vulkan_autogen PUBLIC ${VULKAN_HEADERS_INCLUDE_DIR}) @@ -392,18 +392,18 @@ add_library(nxt_backend STATIC ${BACKEND_SOURCES}) NXTInternalTarget("backend" nxt_backend) target_link_libraries(nxt_backend nxt_common glfw glad spirv_cross) -if (NXT_ENABLE_D3D12) +if (DAWN_ENABLE_D3D12) target_link_libraries(nxt_backend d3d12_autogen) endif() -if (NXT_ENABLE_METAL) +if (DAWN_ENABLE_METAL) target_link_libraries(nxt_backend metal_autogen) endif() -if (NXT_ENABLE_NULL) +if (DAWN_ENABLE_NULL) target_link_libraries(nxt_backend null_autogen) endif() -if (NXT_ENABLE_OPENGL) +if (DAWN_ENABLE_OPENGL) target_link_libraries(nxt_backend opengl_autogen) endif() -if (NXT_ENABLE_VULKAN) +if (DAWN_ENABLE_VULKAN) target_link_libraries(nxt_backend vulkan_autogen) endif() diff --git a/src/backend/d3d12/DeviceD3D12.cpp b/src/backend/d3d12/DeviceD3D12.cpp index f997405db1..eeb386e888 100644 --- a/src/backend/d3d12/DeviceD3D12.cpp +++ b/src/backend/d3d12/DeviceD3D12.cpp @@ -74,7 +74,7 @@ namespace backend { namespace d3d12 { ComPtr factory; uint32_t dxgiFactoryFlags = 0; -#if defined(NXT_ENABLE_ASSERTS) +#if defined(DAWN_ENABLE_ASSERTS) // Enable the debug layer (requires the Graphics Tools "optional feature"). { ComPtr debugController; @@ -91,7 +91,7 @@ namespace backend { namespace d3d12 { DXGI_DEBUG_RLO_FLAGS(DXGI_DEBUG_RLO_ALL)); } } -#endif // defined(NXT_ENABLE_ASSERTS) +#endif // defined(DAWN_ENABLE_ASSERTS) ASSERT_SUCCESS(CreateDXGIFactory2(dxgiFactoryFlags, IID_PPV_ARGS(&factory))); return factory; diff --git a/src/backend/d3d12/d3d12_platform.h b/src/backend/d3d12/d3d12_platform.h index bfe66b4838..fa76a75351 100644 --- a/src/backend/d3d12/d3d12_platform.h +++ b/src/backend/d3d12/d3d12_platform.h @@ -19,9 +19,9 @@ #include #include -#if defined(NXT_ENABLE_ASSERTS) +#if defined(DAWN_ENABLE_ASSERTS) # include -#endif // defined(NXT_ENABLE_ASSERTS) +#endif // defined(DAWN_ENABLE_ASSERTS) using Microsoft::WRL::ComPtr; diff --git a/src/backend/vulkan/DeviceVk.cpp b/src/backend/vulkan/DeviceVk.cpp index 1dbe3c32ec..d02e04d556 100644 --- a/src/backend/vulkan/DeviceVk.cpp +++ b/src/backend/vulkan/DeviceVk.cpp @@ -439,7 +439,7 @@ namespace backend { namespace vulkan { usedKnobs->renderDocCapture = true; } #endif -#if defined(NXT_ENABLE_ASSERTS) +#if defined(DAWN_ENABLE_ASSERTS) if (mGlobalInfo.standardValidation) { layersToRequest.push_back(kLayerNameLunargStandardValidation); usedKnobs->standardValidation = true; diff --git a/src/common/vulkan_platform.h b/src/common/vulkan_platform.h index 6381e4f7fa..742c805b75 100644 --- a/src/common/vulkan_platform.h +++ b/src/common/vulkan_platform.h @@ -15,7 +15,7 @@ #ifndef COMMON_VULKANPLATFORM_H_ #define COMMON_VULKANPLATFORM_H_ -#if !defined(NXT_ENABLE_BACKEND_VULKAN) +#if !defined(DAWN_ENABLE_BACKEND_VULKAN) # error "vulkan_platform.h included without the Vulkan backend enabled" #endif diff --git a/src/include/nxt/nxt_wsi.h b/src/include/nxt/nxt_wsi.h index bd39b13c93..5dc861a7b5 100644 --- a/src/include/nxt/nxt_wsi.h +++ b/src/include/nxt/nxt_wsi.h @@ -54,13 +54,13 @@ typedef struct { nxtTextureUsageBit textureUsage; } nxtSwapChainImplementation; -#if defined(NXT_ENABLE_BACKEND_D3D12) && defined(__cplusplus) +#if defined(DAWN_ENABLE_BACKEND_D3D12) && defined(__cplusplus) typedef struct { nxtDevice device = nullptr; } nxtWSIContextD3D12; #endif -#if defined(NXT_ENABLE_BACKEND_METAL) && defined(__OBJC__) +#if defined(DAWN_ENABLE_BACKEND_METAL) && defined(__OBJC__) #import typedef struct { @@ -68,12 +68,12 @@ typedef struct { } nxtWSIContextMetal; #endif -#ifdef NXT_ENABLE_BACKEND_OPENGL +#ifdef DAWN_ENABLE_BACKEND_OPENGL typedef struct { } nxtWSIContextGL; #endif -#ifdef NXT_ENABLE_BACKEND_VULKAN +#ifdef DAWN_ENABLE_BACKEND_VULKAN typedef struct { } nxtWSIContextVulkan; #endif diff --git a/src/tests/CMakeLists.txt b/src/tests/CMakeLists.txt index ba6f809d29..95574f1d86 100644 --- a/src/tests/CMakeLists.txt +++ b/src/tests/CMakeLists.txt @@ -60,7 +60,7 @@ list(APPEND UNITTEST_SOURCES ${TESTS_DIR}/UnittestsMain.cpp ) -if (NXT_ENABLE_D3D12) +if (DAWN_ENABLE_D3D12) list(APPEND UNITTEST_SOURCES ${UNITTESTS_DIR}/d3d12/CopySplitTests.cpp ) diff --git a/src/tests/NXTTest.cpp b/src/tests/NXTTest.cpp index 567a8eb2a1..af37e0c8ba 100644 --- a/src/tests/NXTTest.cpp +++ b/src/tests/NXTTest.cpp @@ -392,16 +392,16 @@ std::ostream &operator<<(std::ostream& stream, BackendType backend) { namespace detail { bool IsBackendAvailable(BackendType type) { switch (type) { - #if defined(NXT_ENABLE_BACKEND_D3D12) + #if defined(DAWN_ENABLE_BACKEND_D3D12) case D3D12Backend: #endif - #if defined(NXT_ENABLE_BACKEND_METAL) + #if defined(DAWN_ENABLE_BACKEND_METAL) case MetalBackend: #endif - #if defined(NXT_ENABLE_BACKEND_OPENGL) + #if defined(DAWN_ENABLE_BACKEND_OPENGL) case OpenGLBackend: #endif - #if defined(NXT_ENABLE_BACKEND_VULKAN) + #if defined(DAWN_ENABLE_BACKEND_VULKAN) case VulkanBackend: #endif return true; diff --git a/src/utils/BackendBinding.cpp b/src/utils/BackendBinding.cpp index 9392015957..a3fcf25542 100644 --- a/src/utils/BackendBinding.cpp +++ b/src/utils/BackendBinding.cpp @@ -18,19 +18,19 @@ namespace utils { -#if defined(NXT_ENABLE_BACKEND_D3D12) +#if defined(DAWN_ENABLE_BACKEND_D3D12) BackendBinding* CreateD3D12Binding(); #endif -#if defined(NXT_ENABLE_BACKEND_METAL) +#if defined(DAWN_ENABLE_BACKEND_METAL) BackendBinding* CreateMetalBinding(); #endif -#if defined(NXT_ENABLE_BACKEND_NULL) +#if defined(DAWN_ENABLE_BACKEND_NULL) BackendBinding* CreateNullBinding(); #endif -#if defined(NXT_ENABLE_BACKEND_OPENGL) +#if defined(DAWN_ENABLE_BACKEND_OPENGL) BackendBinding* CreateOpenGLBinding(); #endif -#if defined(NXT_ENABLE_BACKEND_VULKAN) +#if defined(DAWN_ENABLE_BACKEND_VULKAN) BackendBinding* CreateVulkanBinding(); #endif @@ -40,27 +40,27 @@ namespace utils { BackendBinding* CreateBinding(BackendType type) { switch (type) { -#if defined(NXT_ENABLE_BACKEND_D3D12) +#if defined(DAWN_ENABLE_BACKEND_D3D12) case BackendType::D3D12: return CreateD3D12Binding(); #endif -#if defined(NXT_ENABLE_BACKEND_METAL) +#if defined(DAWN_ENABLE_BACKEND_METAL) case BackendType::Metal: return CreateMetalBinding(); #endif -#if defined(NXT_ENABLE_BACKEND_NULL) +#if defined(DAWN_ENABLE_BACKEND_NULL) case BackendType::Null: return CreateNullBinding(); #endif -#if defined(NXT_ENABLE_BACKEND_OPENGL) +#if defined(DAWN_ENABLE_BACKEND_OPENGL) case BackendType::OpenGL: return CreateOpenGLBinding(); #endif -#if defined(NXT_ENABLE_BACKEND_VULKAN) +#if defined(DAWN_ENABLE_BACKEND_VULKAN) case BackendType::Vulkan: return CreateVulkanBinding(); #endif diff --git a/src/utils/CMakeLists.txt b/src/utils/CMakeLists.txt index 9cd7d2cd22..c6a6b03d1a 100644 --- a/src/utils/CMakeLists.txt +++ b/src/utils/CMakeLists.txt @@ -23,31 +23,31 @@ list(APPEND UTILS_SOURCES ${UTILS_DIR}/SystemUtils.h ) -if (NXT_ENABLE_D3D12) +if (DAWN_ENABLE_D3D12) list(APPEND UTILS_SOURCES ${UTILS_DIR}/D3D12Binding.cpp ) endif() -if (NXT_ENABLE_METAL) +if (DAWN_ENABLE_METAL) list(APPEND UTILS_SOURCES ${UTILS_DIR}/MetalBinding.mm ) endif() -if (NXT_ENABLE_NULL) +if (DAWN_ENABLE_NULL) list(APPEND UTILS_SOURCES ${UTILS_DIR}/NullBinding.cpp ) endif() -if (NXT_ENABLE_OPENGL) +if (DAWN_ENABLE_OPENGL) list(APPEND UTILS_SOURCES ${UTILS_DIR}/OpenGLBinding.cpp ) endif() -if (NXT_ENABLE_VULKAN) +if (DAWN_ENABLE_VULKAN) list(APPEND UTILS_SOURCES ${UTILS_DIR}/VulkanBinding.cpp ) diff --git a/third_party/CMakeLists.txt b/third_party/CMakeLists.txt index 53b172b5fe..0afa739df2 100644 --- a/third_party/CMakeLists.txt +++ b/third_party/CMakeLists.txt @@ -105,7 +105,7 @@ set(SPIRV_CROSS_SOURCES ) set(NEED_SPIRV_CROSS_GLSL OFF) -if (NXT_ENABLE_D3D12) +if (DAWN_ENABLE_D3D12) list(APPEND SPIRV_CROSS_SOURCES ${CMAKE_CURRENT_SOURCE_DIR}/spirv-cross/spirv_hlsl.cpp ${CMAKE_CURRENT_SOURCE_DIR}/spirv-cross/spirv_hlsl.hpp @@ -113,7 +113,7 @@ if (NXT_ENABLE_D3D12) set(NEED_SPIRV_CROSS_GLSL ON) endif() -if (NXT_ENABLE_METAL) +if (DAWN_ENABLE_METAL) list(APPEND SPIRV_CROSS_SOURCES ${CMAKE_CURRENT_SOURCE_DIR}/spirv-cross/spirv_msl.cpp ${CMAKE_CURRENT_SOURCE_DIR}/spirv-cross/spirv_msl.hpp @@ -121,7 +121,7 @@ if (NXT_ENABLE_METAL) set(NEED_SPIRV_CROSS_GLSL ON) endif() -if (NXT_ENABLE_OPENGL OR NEED_SPIRV_CROSS_GLSL) +if (DAWN_ENABLE_OPENGL OR NEED_SPIRV_CROSS_GLSL) list(APPEND SPIRV_CROSS_SOURCES ${CMAKE_CURRENT_SOURCE_DIR}/spirv-cross/spirv_glsl.cpp ${CMAKE_CURRENT_SOURCE_DIR}/spirv-cross/spirv_glsl.hpp