gpu-dawn: note legacy methods replaced by new Surface API
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
This commit is contained in:
parent
bb8a8c3631
commit
0925dc2e24
2 changed files with 10 additions and 1 deletions
|
|
@ -223,6 +223,9 @@ MACH_EXPORT const DawnProcTable* machDawnNativeGetProcs() {
|
||||||
|
|
||||||
|
|
||||||
// typedef struct MachUtilsBackendBindingImpl* MachUtilsBackendBinding;
|
// typedef struct MachUtilsBackendBindingImpl* MachUtilsBackendBinding;
|
||||||
|
//
|
||||||
|
// This is a legacy method. If using OpenGL, it must be used to create a backend binding
|
||||||
|
// as Dawn does not yet support the WGPUSurface API for OpenGL yet. https://bugs.chromium.org/p/dawn/issues/detail?id=269&q=surface&can=2
|
||||||
MACH_EXPORT MachUtilsBackendBinding machUtilsCreateBinding(WGPUBackendType backendType, GLFWwindow* window, WGPUDevice device) {
|
MACH_EXPORT MachUtilsBackendBinding machUtilsCreateBinding(WGPUBackendType backendType, GLFWwindow* window, WGPUDevice device) {
|
||||||
wgpu::BackendType cppBackendType;
|
wgpu::BackendType cppBackendType;
|
||||||
switch (backendType) {
|
switch (backendType) {
|
||||||
|
|
@ -259,10 +262,14 @@ MACH_EXPORT MachUtilsBackendBinding machUtilsCreateBinding(WGPUBackendType backe
|
||||||
return reinterpret_cast<MachUtilsBackendBinding>(utils::CreateBinding(cppBackendType, window, device));
|
return reinterpret_cast<MachUtilsBackendBinding>(utils::CreateBinding(cppBackendType, window, device));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// This is a legacy method. If using OpenGL, it must be used to create a backend binding
|
||||||
|
// as Dawn does not yet support the WGPUSurface API for OpenGL yet. https://bugs.chromium.org/p/dawn/issues/detail?id=269&q=surface&can=2
|
||||||
MACH_EXPORT uint64_t machUtilsBackendBinding_getSwapChainImplementation(MachUtilsBackendBinding binding) {
|
MACH_EXPORT uint64_t machUtilsBackendBinding_getSwapChainImplementation(MachUtilsBackendBinding binding) {
|
||||||
auto self = reinterpret_cast<utils::BackendBinding*>(binding);
|
auto self = reinterpret_cast<utils::BackendBinding*>(binding);
|
||||||
return self->GetSwapChainImplementation();
|
return self->GetSwapChainImplementation();
|
||||||
}
|
}
|
||||||
|
// This is a legacy method. If using OpenGL, it must be used to create a backend binding
|
||||||
|
// as Dawn does not yet support the WGPUSurface API for OpenGL yet. https://bugs.chromium.org/p/dawn/issues/detail?id=269&q=surface&can=2
|
||||||
MACH_EXPORT WGPUTextureFormat machUtilsBackendBinding_getPreferredSwapChainTextureFormat(MachUtilsBackendBinding binding) {
|
MACH_EXPORT WGPUTextureFormat machUtilsBackendBinding_getPreferredSwapChainTextureFormat(MachUtilsBackendBinding binding) {
|
||||||
auto self = reinterpret_cast<utils::BackendBinding*>(binding);
|
auto self = reinterpret_cast<utils::BackendBinding*>(binding);
|
||||||
return self->GetPreferredSwapChainTextureFormat();
|
return self->GetPreferredSwapChainTextureFormat();
|
||||||
|
|
|
||||||
|
|
@ -103,8 +103,10 @@ typedef struct MachDawnNativeAdapterDiscoveryOptions_OpenGLES {
|
||||||
} MachDawnNativeAdapterDiscoveryOptions_OpenGLES;
|
} MachDawnNativeAdapterDiscoveryOptions_OpenGLES;
|
||||||
|
|
||||||
// utils
|
// utils
|
||||||
|
//
|
||||||
|
// These are legacy methods. If using OpenGL, they must be used to create a backend binding
|
||||||
|
// as Dawn does not yet support the WGPUSurface API for OpenGL yet. https://bugs.chromium.org/p/dawn/issues/detail?id=269&q=surface&can=2
|
||||||
#include <GLFW/glfw3.h>
|
#include <GLFW/glfw3.h>
|
||||||
|
|
||||||
typedef struct MachUtilsBackendBindingImpl* MachUtilsBackendBinding;
|
typedef struct MachUtilsBackendBindingImpl* MachUtilsBackendBinding;
|
||||||
MACH_EXPORT MachUtilsBackendBinding machUtilsCreateBinding(WGPUBackendType backendType, GLFWwindow* window, WGPUDevice device);
|
MACH_EXPORT MachUtilsBackendBinding machUtilsCreateBinding(WGPUBackendType backendType, GLFWwindow* window, WGPUDevice device);
|
||||||
MACH_EXPORT uint64_t machUtilsBackendBinding_getSwapChainImplementation(MachUtilsBackendBinding binding);
|
MACH_EXPORT uint64_t machUtilsBackendBinding_getSwapChainImplementation(MachUtilsBackendBinding binding);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue