gpu: begin Dawn gpu.Interface implementation

Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
This commit is contained in:
Stephen Gutekanst 2022-07-30 14:46:02 -07:00 committed by Stephen Gutekanst
parent 75a09c7828
commit e702ee4911
4 changed files with 1285 additions and 0 deletions

35
gpu/src/mach_dawn.h Normal file
View file

@ -0,0 +1,35 @@
#ifndef MACH_DAWN_C_H_
#define MACH_DAWN_C_H_
#ifdef __cplusplus
extern "C" {
#endif
#if defined(MACH_DAWN_C_SHARED_LIBRARY)
# if defined(_WIN32)
# if defined(MACH_DAWN_C_IMPLEMENTATION)
# define MACH_EXPORT __declspec(dllexport)
# else
# define MACH_EXPORT __declspec(dllimport)
# endif
# else // defined(_WIN32)
# if defined(MACH_DAWN_C_IMPLEMENTATION)
# define MACH_EXPORT __attribute__((visibility("default")))
# else
# define MACH_EXPORT
# endif
# endif // defined(_WIN32)
#else // defined(MACH_DAWN_C_SHARED_LIBRARY)
# define MACH_EXPORT
#endif // defined(MACH_DAWN_C_SHARED_LIBRARY)
#include <dawn/webgpu.h>
#include <dawn/dawn_proc_table.h>
MACH_EXPORT const DawnProcTable machDawnGetProcTable();
#ifdef __cplusplus
} // extern "C"
#endif
#endif // MACH_DAWN_C_H_