Remove dawn_wsi.h
Bug: dawn:269 Change-Id: Ie1fb1a8109ff646b880c3e27762300167776d050 Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/126424 Reviewed-by: Austin Eng <enga@chromium.org> Commit-Queue: Corentin Wallez <cwallez@chromium.org> Reviewed-by: Loko Kung <lokokung@google.com> Kokoro: Kokoro <noreply+kokoro@google.com>
This commit is contained in:
parent
1226684b09
commit
a48ba981ea
|
@ -34,7 +34,6 @@ source_set("headers") {
|
|||
public_deps = [ ":headers_gen" ]
|
||||
|
||||
sources = get_target_outputs(":headers_gen")
|
||||
sources += [ "${dawn_root}/include/dawn/dawn_wsi.h" ]
|
||||
}
|
||||
|
||||
###############################################################################
|
||||
|
|
|
@ -1,86 +0,0 @@
|
|||
// Copyright 2017 The Dawn Authors
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
#ifndef INCLUDE_DAWN_DAWN_WSI_H_
|
||||
#define INCLUDE_DAWN_DAWN_WSI_H_
|
||||
|
||||
#include "dawn/webgpu.h"
|
||||
|
||||
// Error message (or nullptr if there was no error)
|
||||
typedef const char* DawnSwapChainError;
|
||||
constexpr DawnSwapChainError DAWN_SWAP_CHAIN_NO_ERROR = nullptr;
|
||||
|
||||
typedef struct {
|
||||
/// Backend-specific texture id/name/pointer
|
||||
union {
|
||||
void* ptr;
|
||||
uint64_t u64;
|
||||
uint32_t u32;
|
||||
} texture;
|
||||
} DawnSwapChainNextTexture;
|
||||
|
||||
typedef struct {
|
||||
/// Initialize the swap chain implementation.
|
||||
/// (*wsiContext) is one of DawnWSIContext{D3D12,Metal,GL}
|
||||
void (*Init)(void* userData, void* wsiContext);
|
||||
|
||||
/// Destroy the swap chain implementation.
|
||||
void (*Destroy)(void* userData);
|
||||
|
||||
/// Configure/reconfigure the swap chain.
|
||||
DawnSwapChainError (*Configure)(void* userData,
|
||||
WGPUTextureFormat format,
|
||||
WGPUTextureUsage allowedUsage,
|
||||
uint32_t width,
|
||||
uint32_t height);
|
||||
|
||||
/// Acquire the next texture from the swap chain.
|
||||
DawnSwapChainError (*GetNextTexture)(void* userData, DawnSwapChainNextTexture* nextTexture);
|
||||
|
||||
/// Present the last acquired texture to the screen.
|
||||
DawnSwapChainError (*Present)(void* userData);
|
||||
|
||||
/// Each function is called with userData as its first argument.
|
||||
void* userData;
|
||||
|
||||
/// For use by the D3D12 and Vulkan backends: how the swapchain will use the texture.
|
||||
WGPUTextureUsage textureUsage;
|
||||
} DawnSwapChainImplementation;
|
||||
|
||||
#if defined(DAWN_ENABLE_BACKEND_D3D12) && defined(__cplusplus)
|
||||
struct DawnWSIContextD3D12 {
|
||||
WGPUDevice device = nullptr;
|
||||
};
|
||||
#endif
|
||||
|
||||
#if defined(DAWN_ENABLE_BACKEND_METAL) && defined(__OBJC__)
|
||||
#import <Metal/Metal.h>
|
||||
|
||||
struct DawnWSIContextMetal {
|
||||
id<MTLDevice> device = nil;
|
||||
id<MTLCommandQueue> queue = nil;
|
||||
};
|
||||
#endif
|
||||
|
||||
#ifdef DAWN_ENABLE_BACKEND_OPENGL
|
||||
typedef struct {
|
||||
} DawnWSIContextGL;
|
||||
#endif
|
||||
|
||||
#ifdef DAWN_ENABLE_BACKEND_VULKAN
|
||||
typedef struct {
|
||||
} DawnWSIContextVulkan;
|
||||
#endif
|
||||
|
||||
#endif // INCLUDE_DAWN_DAWN_WSI_H_
|
|
@ -72,10 +72,7 @@ DawnJSONGenerator(
|
|||
# because the file doesn't exist on disk.
|
||||
add_library(dawn_headers STATIC ${DAWN_PLACEHOLDER_FILE})
|
||||
common_compile_options(dawn_headers)
|
||||
target_sources(dawn_headers PRIVATE
|
||||
"${DAWN_INCLUDE_DIR}/dawn/dawn_wsi.h"
|
||||
${DAWN_HEADERS_GEN_SOURCES}
|
||||
)
|
||||
target_sources(dawn_headers PRIVATE ${DAWN_HEADERS_GEN_SOURCES})
|
||||
target_link_libraries(dawn_headers INTERFACE dawn_public_config)
|
||||
|
||||
###############################################################################
|
||||
|
|
|
@ -18,8 +18,6 @@
|
|||
#include "dawn/native/Error.h"
|
||||
#include "dawn/native/Forward.h"
|
||||
#include "dawn/native/ObjectBase.h"
|
||||
|
||||
#include "dawn/dawn_wsi.h"
|
||||
#include "dawn/native/dawn_platform.h"
|
||||
|
||||
namespace dawn::native {
|
||||
|
|
|
@ -21,7 +21,6 @@
|
|||
#include <vector>
|
||||
|
||||
#include "dawn/common/LinkedList.h"
|
||||
#include "dawn/dawn_wsi.h"
|
||||
#include "dawn/native/D3D12Backend.h"
|
||||
#include "dawn/native/Error.h"
|
||||
#include "dawn/native/Forward.h"
|
||||
|
|
|
@ -18,7 +18,6 @@
|
|||
|
||||
#include <utility>
|
||||
|
||||
#include "dawn/dawn_wsi.h"
|
||||
#include "dawn/native/Surface.h"
|
||||
#include "dawn/native/d3d/D3DError.h"
|
||||
#include "dawn/native/d3d/UtilsD3D.h"
|
||||
|
|
|
@ -18,8 +18,6 @@
|
|||
#include "dawn/native/metal/DeviceMTL.h"
|
||||
#include "dawn/native/metal/TextureMTL.h"
|
||||
|
||||
#include "dawn/dawn_wsi.h"
|
||||
|
||||
#import <QuartzCore/CAMetalLayer.h>
|
||||
|
||||
namespace dawn::native::metal {
|
||||
|
|
Loading…
Reference in New Issue