start to redo physical device model

This commit is contained in:
Gregory Wells
2025-09-04 14:52:37 -04:00
parent a709ff8808
commit c5297cb17b
9 changed files with 43 additions and 111 deletions

View File

@@ -10,9 +10,15 @@ typedef struct type##_t* type##Handle; \
typedef struct type##_t* type
// The value of this handle is defined by the implementation
#ifndef GN_IMPLEMENTATION
#define GN_IMPLEMENTATION_HANDLE(type) \
typedef uint64_t type##Handle; \
typedef uint64_t type
#else
#define GN_IMPLEMENTATION_HANDLE(type) \
typedef uint64_t type##Handle; \
typedef uint64_t type
#endif
// can be used to alias a normal handle or an implementation handle
#define GN_HANDLE_ALIAS(handle, alias) \
@@ -20,7 +26,7 @@ typedef struct handle##_t* alias##Handle; \
typedef struct handle##_t* alias
GN_HANDLE(gnInstance);
GN_HANDLE(gnPhysicalDevice); // NOTE: needs to become a impl handle
GN_IMPLEMENTATION_HANDLE(gnPhysicalDevice); // NOTE: needs to become a impl handle
GN_HANDLE(gnWindowSurface);
GN_HANDLE(gnPresentationQueue);