Rename CMakeLists variables NXT_* to DAWN_*

This commit is contained in:
Corentin Wallez
2018-07-18 13:52:46 +02:00
committed by Corentin Wallez
parent 4828d92df3
commit f1ded9bea2
16 changed files with 110 additions and 110 deletions

View File

@@ -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()

View File

@@ -74,7 +74,7 @@ namespace backend { namespace d3d12 {
ComPtr<IDXGIFactory4> 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<ID3D12Debug> 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;

View File

@@ -19,9 +19,9 @@
#include <dxgi1_4.h>
#include <wrl.h>
#if defined(NXT_ENABLE_ASSERTS)
#if defined(DAWN_ENABLE_ASSERTS)
# include <dxgidebug.h>
#endif // defined(NXT_ENABLE_ASSERTS)
#endif // defined(DAWN_ENABLE_ASSERTS)
using Microsoft::WRL::ComPtr;

View File

@@ -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;

View File

@@ -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

View File

@@ -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 <Metal/Metal.h>
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

View File

@@ -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
)

View File

@@ -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;

View File

@@ -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

View File

@@ -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
)