gpu: translate ChainedStruct/ChainedStructOut

Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
This commit is contained in:
Stephen Gutekanst 2022-07-14 23:32:02 -07:00 committed by Stephen Gutekanst
parent 6d84e7d2a6
commit 14ff1f684b
2 changed files with 10 additions and 10 deletions

View file

@ -1,13 +1,3 @@
typedef struct WGPUChainedStruct {
struct WGPUChainedStruct const * next;
WGPUSType sType;
} WGPUChainedStruct;
typedef struct WGPUChainedStructOut {
struct WGPUChainedStructOut * next;
WGPUSType sType;
} WGPUChainedStructOut;
typedef struct WGPUAdapterProperties {
WGPUChainedStructOut * nextInChain;
uint32_t vendorID;

View file

@ -364,6 +364,16 @@ pub const ShaderStage = packed struct {
}
};
pub const ChainedStruct = extern struct {
next: *const ChainedStruct,
s_type: SType,
};
pub const ChainedStructOut = extern struct {
next: *ChainedStructOut,
s_type: SType,
};
test "BackendType name" {
try testing.expectEqualStrings("Vulkan", BackendType.vulkan.name());
}