Compare commits

..

1 Commits

Author SHA1 Message Date
Sebastian Dawid
a297c9b81c
Merge 44f8a80ade into 63a7e8b7f8 2025-08-20 21:11:23 +02:00
6 changed files with 14 additions and 28 deletions

View File

@ -2020,14 +2020,12 @@ VkResult _glfwCreateWindowSurfaceCocoa(VkInstance instance,
} // autoreleasepool
}
typedef struct WGPUSurfaceSourceMetalLayer
{
typedef struct WGPUSurfaceSourceMetalLayer {
WGPUChainedStruct chain;
void * layer;
} WGPUSurfaceSourceMetalLayer;
WGPUSurface _glfwCreateWindowWGPUSurfaceCocoa(WGPUInstance instance, _GLFWwindow* window)
{
WGPUSurface _glfwCreateWindowWGPUSurfaceCocoa(WGPUInstance instance, _GLFWwindow* window) {
[window->ns.view setLayer:window->ns.layer];
[window->ns.view setWantsLayer:YES];

View File

@ -335,14 +335,12 @@ typedef VkResult (APIENTRY * PFN_vkEnumerateInstanceExtensionProperties)(const c
typedef struct WGPUInstanceImpl* WGPUInstance;
typedef struct WGPUSurfaceImpl* WGPUSurface;
typedef struct WGPUStringView
{
typedef struct WGPUStringView {
char const * data;
size_t length;
} WGPUStringView;
typedef enum WGPUSType
{
typedef enum WGPUSType {
WGPUSType_ShaderSourceSPIRV = 0x00000001,
WGPUSType_ShaderSourceWGSL = 0x00000002,
WGPUSType_RenderPassMaxDrawCount = 0x00000003,
@ -355,14 +353,12 @@ typedef enum WGPUSType
WGPUSType_Force32 = 0x7FFFFFFF
} WGPUSType;
typedef struct WGPUChainedStruct
{
typedef struct WGPUChainedStruct {
struct WGPUChainedStruct const * next;
WGPUSType sType;
} WGPUChainedStruct;
typedef struct WGPUSurfaceDescriptor
{
typedef struct WGPUSurfaceDescriptor {
WGPUChainedStruct const * nextInChain;
WGPUStringView label;
} WGPUSurfaceDescriptor;

View File

@ -29,14 +29,12 @@
#include <assert.h>
#include <stdlib.h>
GLFWAPI void glfwSetWGPUInstanceCreateSurfaceAddr(WGPUSurface (*addr)(WGPUInstance, const WGPUSurfaceDescriptor*))
{
GLFWAPI void glfwSetWGPUInstanceCreateSurfaceAddr(WGPUSurface (*addr)(WGPUInstance, const WGPUSurfaceDescriptor*)) {
_GLFW_REQUIRE_INIT()
_glfw.wgpu.instanceCreateSurface = addr;
}
GLFWAPI WGPUSurface glfwCreateWindowWGPUSurface(WGPUInstance instance, GLFWwindow* handle)
{
GLFWAPI WGPUSurface glfwCreateWindowWGPUSurface(WGPUInstance instance, GLFWwindow* handle) {
_GLFW_REQUIRE_INIT_OR_RETURN(NULL)
_GLFWwindow* window = (_GLFWwindow*)handle;

View File

@ -2562,15 +2562,13 @@ VkResult _glfwCreateWindowSurfaceWin32(VkInstance instance,
return err;
}
typedef struct WGPUSurfaceSourceWindowsHWND
{
typedef struct WGPUSurfaceSourceWindowsHWND {
WGPUChainedStruct chain;
void * hinstance;
void * hwnd;
} WGPUSurfaceSourceWindowsHWND;
WGPUSurface _glfwCreateWindowWGPUSurfaceWin32(WGPUInstance instance, _GLFWwindow *window)
{
WGPUSurface _glfwCreateWindowWGPUSurfaceWin32(WGPUInstance instance, _GLFWwindow *window) {
WGPUSurfaceSourceWindowsHWND windowsSurface;
windowsSurface.chain.sType = WGPUSType_SurfaceSourceWindowsHWND;
windowsSurface.chain.next = NULL;

View File

@ -3324,15 +3324,13 @@ VkResult _glfwCreateWindowSurfaceWayland(VkInstance instance,
return err;
}
typedef struct WGPUSurfaceSourceWaylandSurface
{
typedef struct WGPUSurfaceSourceWaylandSurface {
WGPUChainedStruct chain;
void * display;
void * surface;
} WGPUSurfaceSourceWaylandSurface;
WGPUSurface _glfwCreateWindowWGPUSurfaceWayland(WGPUInstance instance, _GLFWwindow* window)
{
WGPUSurface _glfwCreateWindowWGPUSurfaceWayland(WGPUInstance instance, _GLFWwindow* window) {
WGPUSurfaceSourceWaylandSurface waylandSurface;
waylandSurface.chain.sType = WGPUSType_SurfaceSourceWaylandSurface;
waylandSurface.chain.next = NULL;

View File

@ -3282,15 +3282,13 @@ VkResult _glfwCreateWindowSurfaceX11(VkInstance instance,
}
}
typedef struct WGPUSurfaceSourceXCBWindow
{
typedef struct WGPUSurfaceSourceXCBWindow {
WGPUChainedStruct chain;
void * connection;
uint32_t window;
} WGPUSurfaceSourceXCBWindow;
typedef struct WGPUSurfaceSourceXlibWindow
{
typedef struct WGPUSurfaceSourceXlibWindow {
WGPUChainedStruct chain;
void * display;
uint64_t window;