gpu: prepare to implement Surface

Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
This commit is contained in:
Stephen Gutekanst 2022-03-06 20:28:10 -07:00 committed by Stephen Gutekanst
parent 9888d8fe36
commit 64e023c992
4 changed files with 74 additions and 8 deletions

46
gpu/src/Surface.zig Normal file
View file

@ -0,0 +1,46 @@
//! A native WebGPU surface
// typedef enum WGPUSType {
// WGPUSType_Invalid = 0x00000000,
// WGPUSType_SurfaceDescriptorFromMetalLayer = 0x00000001,
// WGPUSType_SurfaceDescriptorFromWindowsHWND = 0x00000002,
// WGPUSType_SurfaceDescriptorFromXlibWindow = 0x00000003,
// WGPUSType_SurfaceDescriptorFromCanvasHTMLSelector = 0x00000004,
const Descriptor = struct {};
// typedef struct WGPUSurfaceDescriptor {
// WGPUChainedStruct const * nextInChain;
// char const * label;
// } WGPUSurfaceDescriptor;
// typedef struct WGPUSurfaceDescriptorFromCanvasHTMLSelector {
// WGPUChainedStruct chain;
// char const * selector;
// } WGPUSurfaceDescriptorFromCanvasHTMLSelector;
// typedef struct WGPUSurfaceDescriptorFromMetalLayer {
// WGPUChainedStruct chain;
// void * layer;
// } WGPUSurfaceDescriptorFromMetalLayer;
// typedef struct WGPUSurfaceDescriptorFromWindowsCoreWindow {
// WGPUChainedStruct chain;
// void * coreWindow;
// } WGPUSurfaceDescriptorFromWindowsCoreWindow;
// typedef struct WGPUSurfaceDescriptorFromWindowsHWND {
// WGPUChainedStruct chain;
// void * hinstance;
// void * hwnd;
// } WGPUSurfaceDescriptorFromWindowsHWND;
// typedef struct WGPUSurfaceDescriptorFromWindowsSwapChainPanel {
// WGPUChainedStruct chain;
// void * swapChainPanel;
// } WGPUSurfaceDescriptorFromWindowsSwapChainPanel;
// typedef struct WGPUSurfaceDescriptorFromXlibWindow {
// WGPUChainedStruct chain;
// void * display;
// uint32_t window;
// } WGPUSurfaceDescriptorFromXlibWindow;