mirror of
https://github.com/encounter/dawn-cmake.git
synced 2025-12-10 05:57:51 +00:00
Capitalize C types dawn -> Dawn
This is to match Chromium style. Change-Id: Ic97cc03e2291c653ade9662ba3d5e629872b10ad Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/5482 Reviewed-by: Kai Ninomiya <kainino@chromium.org> Reviewed-by: Corentin Wallez <cwallez@chromium.org> Commit-Queue: Austin Eng <enga@chromium.org>
This commit is contained in:
committed by
Commit Bot service account
parent
97ffc1a8aa
commit
45f9730855
@@ -18,8 +18,8 @@
|
||||
#include <dawn/dawn.h>
|
||||
|
||||
// Error message (or nullptr if there was no error)
|
||||
typedef const char* dawnSwapChainError;
|
||||
constexpr dawnSwapChainError DAWN_SWAP_CHAIN_NO_ERROR = nullptr;
|
||||
typedef const char* DawnSwapChainError;
|
||||
constexpr DawnSwapChainError DAWN_SWAP_CHAIN_NO_ERROR = nullptr;
|
||||
|
||||
typedef struct {
|
||||
/// Backend-specific texture id/name/pointer
|
||||
@@ -28,40 +28,40 @@ typedef struct {
|
||||
uint64_t u64;
|
||||
uint32_t u32;
|
||||
} texture;
|
||||
} dawnSwapChainNextTexture;
|
||||
} DawnSwapChainNextTexture;
|
||||
|
||||
typedef struct {
|
||||
/// Initialize the swap chain implementation.
|
||||
/// (*wsiContext) is one of dawnWSIContext{D3D12,Metal,GL}
|
||||
/// (*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,
|
||||
dawnTextureFormat format,
|
||||
dawnTextureUsageBit allowedUsage,
|
||||
DawnSwapChainError (*Configure)(void* userData,
|
||||
DawnTextureFormat format,
|
||||
DawnTextureUsageBit allowedUsage,
|
||||
uint32_t width,
|
||||
uint32_t height);
|
||||
|
||||
/// Acquire the next texture from the swap chain.
|
||||
dawnSwapChainError (*GetNextTexture)(void* userData, dawnSwapChainNextTexture* nextTexture);
|
||||
DawnSwapChainError (*GetNextTexture)(void* userData, DawnSwapChainNextTexture* nextTexture);
|
||||
|
||||
/// Present the last acquired texture to the screen.
|
||||
dawnSwapChainError (*Present)(void* userData);
|
||||
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.
|
||||
dawnTextureUsageBit textureUsage;
|
||||
} dawnSwapChainImplementation;
|
||||
DawnTextureUsageBit textureUsage;
|
||||
} DawnSwapChainImplementation;
|
||||
|
||||
#if defined(DAWN_ENABLE_BACKEND_D3D12) && defined(__cplusplus)
|
||||
typedef struct {
|
||||
dawnDevice device = nullptr;
|
||||
} dawnWSIContextD3D12;
|
||||
DawnDevice device = nullptr;
|
||||
} DawnWSIContextD3D12;
|
||||
#endif
|
||||
|
||||
#if defined(DAWN_ENABLE_BACKEND_METAL) && defined(__OBJC__)
|
||||
@@ -69,17 +69,17 @@ typedef struct {
|
||||
|
||||
typedef struct {
|
||||
id<MTLDevice> device = nil;
|
||||
} dawnWSIContextMetal;
|
||||
} DawnWSIContextMetal;
|
||||
#endif
|
||||
|
||||
#ifdef DAWN_ENABLE_BACKEND_OPENGL
|
||||
typedef struct {
|
||||
} dawnWSIContextGL;
|
||||
} DawnWSIContextGL;
|
||||
#endif
|
||||
|
||||
#ifdef DAWN_ENABLE_BACKEND_VULKAN
|
||||
typedef struct {
|
||||
} dawnWSIContextVulkan;
|
||||
} DawnWSIContextVulkan;
|
||||
#endif
|
||||
|
||||
#endif // DAWN_DAWN_WSI_H
|
||||
|
||||
@@ -21,10 +21,10 @@
|
||||
#include <windows.h>
|
||||
|
||||
namespace dawn_native { namespace d3d12 {
|
||||
DAWN_NATIVE_EXPORT dawnSwapChainImplementation CreateNativeSwapChainImpl(dawnDevice device,
|
||||
DAWN_NATIVE_EXPORT DawnSwapChainImplementation CreateNativeSwapChainImpl(DawnDevice device,
|
||||
HWND window);
|
||||
DAWN_NATIVE_EXPORT dawnTextureFormat
|
||||
GetNativeSwapChainPreferredFormat(const dawnSwapChainImplementation* swapChain);
|
||||
DAWN_NATIVE_EXPORT DawnTextureFormat
|
||||
GetNativeSwapChainPreferredFormat(const DawnSwapChainImplementation* swapChain);
|
||||
}} // namespace dawn_native::d3d12
|
||||
|
||||
#endif // DAWNNATIVE_D3D12BACKEND_H_
|
||||
|
||||
@@ -60,7 +60,7 @@ namespace dawn_native {
|
||||
// Create a device on this adapter, note that the interface will change to include at least
|
||||
// a device descriptor and a pointer to backend specific options.
|
||||
// On an error, nullptr is returned.
|
||||
dawnDevice CreateDevice();
|
||||
DawnDevice CreateDevice();
|
||||
|
||||
private:
|
||||
AdapterBase* mImpl = nullptr;
|
||||
@@ -104,7 +104,7 @@ namespace dawn_native {
|
||||
};
|
||||
|
||||
// Backend-agnostic API for dawn_native
|
||||
DAWN_NATIVE_EXPORT dawnProcTable GetProcs();
|
||||
DAWN_NATIVE_EXPORT DawnProcTable GetProcs();
|
||||
|
||||
} // namespace dawn_native
|
||||
|
||||
|
||||
@@ -33,15 +33,15 @@ typedef __IOSurface* IOSurfaceRef;
|
||||
#endif //__OBJC__
|
||||
|
||||
namespace dawn_native { namespace metal {
|
||||
DAWN_NATIVE_EXPORT dawnTexture WrapIOSurface(dawnDevice device,
|
||||
const dawnTextureDescriptor* descriptor,
|
||||
DAWN_NATIVE_EXPORT DawnTexture WrapIOSurface(DawnDevice device,
|
||||
const DawnTextureDescriptor* descriptor,
|
||||
IOSurfaceRef ioSurface,
|
||||
uint32_t plane);
|
||||
}} // namespace dawn_native::metal
|
||||
|
||||
#ifdef __OBJC__
|
||||
namespace dawn_native { namespace metal {
|
||||
DAWN_NATIVE_EXPORT id<MTLDevice> GetMetalDevice(dawnDevice device);
|
||||
DAWN_NATIVE_EXPORT id<MTLDevice> GetMetalDevice(DawnDevice device);
|
||||
}} // namespace dawn_native::metal
|
||||
#endif // __OBJC__
|
||||
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
#include <dawn_native/DawnNative.h>
|
||||
|
||||
namespace dawn_native { namespace null {
|
||||
DAWN_NATIVE_EXPORT dawnSwapChainImplementation CreateNativeSwapChainImpl();
|
||||
DAWN_NATIVE_EXPORT DawnSwapChainImplementation CreateNativeSwapChainImpl();
|
||||
}} // namespace dawn_native::null
|
||||
|
||||
#endif // DAWNNATIVE_NULLBACKEND_H_
|
||||
|
||||
@@ -23,12 +23,12 @@
|
||||
#include <vector>
|
||||
|
||||
namespace dawn_native { namespace vulkan {
|
||||
DAWN_NATIVE_EXPORT VkInstance GetInstance(dawnDevice device);
|
||||
DAWN_NATIVE_EXPORT VkInstance GetInstance(DawnDevice device);
|
||||
|
||||
DAWN_NATIVE_EXPORT dawnSwapChainImplementation CreateNativeSwapChainImpl(dawnDevice device,
|
||||
DAWN_NATIVE_EXPORT DawnSwapChainImplementation CreateNativeSwapChainImpl(DawnDevice device,
|
||||
VkSurfaceKHR surface);
|
||||
DAWN_NATIVE_EXPORT dawnTextureFormat
|
||||
GetNativeSwapChainPreferredFormat(const dawnSwapChainImplementation* swapChain);
|
||||
DAWN_NATIVE_EXPORT DawnTextureFormat
|
||||
GetNativeSwapChainPreferredFormat(const DawnSwapChainImplementation* swapChain);
|
||||
}} // namespace dawn_native::vulkan
|
||||
|
||||
#endif // DAWNNATIVE_VULKANBACKEND_H_
|
||||
|
||||
@@ -30,8 +30,8 @@ namespace dawn_wire {
|
||||
WireClient(CommandSerializer* serializer);
|
||||
~WireClient();
|
||||
|
||||
dawnDevice GetDevice() const;
|
||||
dawnProcTable GetProcs() const;
|
||||
DawnDevice GetDevice() const;
|
||||
DawnProcTable GetProcs() const;
|
||||
const char* HandleCommands(const char* commands, size_t size) override final;
|
||||
|
||||
private:
|
||||
|
||||
@@ -27,7 +27,7 @@ namespace dawn_wire {
|
||||
|
||||
class DAWN_WIRE_EXPORT WireServer : public CommandHandler {
|
||||
public:
|
||||
WireServer(dawnDevice device, const dawnProcTable& procs, CommandSerializer* serializer);
|
||||
WireServer(DawnDevice device, const DawnProcTable& procs, CommandSerializer* serializer);
|
||||
~WireServer();
|
||||
|
||||
const char* HandleCommands(const char* commands, size_t size) override final;
|
||||
|
||||
Reference in New Issue
Block a user