gpu: translate struct TODOs
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
This commit is contained in:
parent
7d2b54d881
commit
26c75d5687
1 changed files with 261 additions and 260 deletions
|
|
@ -1,406 +1,407 @@
|
||||||
typedef struct WGPUPrimitiveDepthClampingState {
|
|
||||||
WGPUChainedStruct chain;
|
pub const PrimitiveDepthClampingState = extern struct {
|
||||||
|
chain: ChainedStruct,
|
||||||
clamp_depth: bool,
|
clamp_depth: bool,
|
||||||
} WGPUPrimitiveDepthClampingState;
|
};
|
||||||
|
|
||||||
typedef struct WGPUPrimitiveDepthClipControl {
|
pub const PrimitiveDepthClipControl = extern struct {
|
||||||
WGPUChainedStruct chain;
|
chain: ChainedStruct,
|
||||||
unclipped_depth: bool,
|
unclipped_depth: bool,
|
||||||
} WGPUPrimitiveDepthClipControl;
|
};
|
||||||
|
|
||||||
typedef struct WGPUPrimitiveState {
|
pub const PrimitiveState = extern struct {
|
||||||
next_in_chain: *const ChainedStruct,
|
next_in_chain: *const ChainedStruct,
|
||||||
WGPUPrimitiveTopology topology;
|
topology: PrimitiveTopology,
|
||||||
WGPUIndexFormat stripIndexFormat;
|
strip_index_format: IndexFormat,
|
||||||
WGPUFrontFace frontFace;
|
front_face: FrontFace,
|
||||||
WGPUCullMode cullMode;
|
cull_mode: CullMode,
|
||||||
} WGPUPrimitiveState;
|
};
|
||||||
|
|
||||||
typedef struct WGPUQuerySetDescriptor {
|
pub const WGPUQuerySetDescriptor = extern struct {
|
||||||
next_in_chain: *const ChainedStruct,
|
next_in_chain: *const ChainedStruct,
|
||||||
label: ?[*:0]const u8 = null,
|
label: ?[*:0]const u8 = null,
|
||||||
WGPUQueryType type;
|
type: QueryType,
|
||||||
uint32_t count;
|
count: u32,
|
||||||
WGPUPipelineStatisticName const * pipelineStatistics;
|
pipeline_statistics: [*]const PipelineStatisticsName,
|
||||||
uint32_t pipelineStatisticsCount;
|
pipeline_statistics_count: u32,
|
||||||
} WGPUQuerySetDescriptor;
|
};
|
||||||
|
|
||||||
typedef struct WGPUQueueDescriptor {
|
pub const WGPUQueueDescriptor = extern struct {
|
||||||
next_in_chain: *const ChainedStruct,
|
next_in_chain: *const ChainedStruct,
|
||||||
label: ?[*:0]const u8 = null,
|
label: ?[*:0]const u8 = null,
|
||||||
} WGPUQueueDescriptor;
|
};
|
||||||
|
|
||||||
typedef struct WGPURenderBundleDescriptor {
|
pub const WGPURenderBundleDescriptor = extern struct {
|
||||||
next_in_chain: *const ChainedStruct,
|
next_in_chain: *const ChainedStruct,
|
||||||
label: ?[*:0]const u8 = null,
|
label: ?[*:0]const u8 = null,
|
||||||
} WGPURenderBundleDescriptor;
|
};
|
||||||
|
|
||||||
typedef struct WGPURenderBundleEncoderDescriptor {
|
pub const WGPURenderBundleEncoderDescriptor = extern struct {
|
||||||
next_in_chain: *const ChainedStruct,
|
next_in_chain: *const ChainedStruct,
|
||||||
label: ?[*:0]const u8 = null,
|
label: ?[*:0]const u8 = null,
|
||||||
uint32_t colorFormatsCount;
|
color_formats_count: u32,
|
||||||
WGPUTextureFormat const * colorFormats;
|
color_formats: [*]const TextureFormat,
|
||||||
WGPUTextureFormat depthStencilFormat;
|
depth_stencil_format: TextureFormat,
|
||||||
sample_count: u32,
|
sample_count: u32,
|
||||||
depth_read_only: bool,
|
depth_read_only: bool,
|
||||||
stencil_read_only: bool,
|
stencil_read_only: bool,
|
||||||
} WGPURenderBundleEncoderDescriptor;
|
};
|
||||||
|
|
||||||
typedef struct WGPURenderPassDepthStencilAttachment {
|
pub const WGPURenderPassDepthStencilAttachment = extern struct {
|
||||||
WGPUTextureView view;
|
view: TextureView,
|
||||||
WGPULoadOp depthLoadOp;
|
depth_load_op: LoadOp,
|
||||||
WGPUStoreOp depthStoreOp;
|
depth_store_op: StoreOp,
|
||||||
clear_depth: f32,
|
clear_depth: f32,
|
||||||
depth_clear_value: f32,
|
depth_clear_value: f32,
|
||||||
depth_read_only: bool,
|
depth_read_only: bool,
|
||||||
WGPULoadOp stencilLoadOp;
|
stencil_load_op: LoadOp,
|
||||||
WGPUStoreOp stencilStoreOp;
|
stencil_store_op: StoreOp,
|
||||||
clear_stencil: u32,
|
clear_stencil: u32,
|
||||||
stencil_clear_value: u32,
|
stencil_clear_value: u32,
|
||||||
stencil_read_only: bool,
|
stencil_read_only: bool,
|
||||||
} WGPURenderPassDepthStencilAttachment;
|
};
|
||||||
|
|
||||||
typedef struct WGPURenderPassDescriptorMaxDrawCount {
|
pub const WGPURenderPassDescriptorMaxDrawCount = extern struct {
|
||||||
WGPUChainedStruct chain;
|
chain: ChainedStruct,
|
||||||
max_draw_count: u64,
|
max_draw_count: u64,
|
||||||
} WGPURenderPassDescriptorMaxDrawCount;
|
};
|
||||||
|
|
||||||
typedef struct WGPURenderPassTimestampWrite {
|
pub const WGPURenderPassTimestampWrite = extern struct {
|
||||||
WGPUQuerySet querySet;
|
query_set: QuerySet,
|
||||||
query_index: u32,
|
query_index: u32,
|
||||||
WGPURenderPassTimestampLocation location;
|
location: RenderPassTimestampLocation,
|
||||||
} WGPURenderPassTimestampWrite;
|
};
|
||||||
|
|
||||||
typedef struct WGPURequestAdapterOptions {
|
pub const RequestAdapterOptions = extern struct {
|
||||||
next_in_chain: *const ChainedStruct,
|
next_in_chain: *const ChainedStruct,
|
||||||
WGPUSurface compatibleSurface; // nullable
|
compatible_surface: Surface = Surface.none, // nullable
|
||||||
WGPUPowerPreference powerPreference;
|
power_preference: PowerPreference,
|
||||||
force_fallback_adapter: bool,
|
force_fallback_adapter: bool,
|
||||||
} WGPURequestAdapterOptions;
|
};
|
||||||
|
|
||||||
typedef struct WGPUSamplerBindingLayout {
|
pub const SamplerBindingLayout = extern struct {
|
||||||
next_in_chain: *const ChainedStruct,
|
next_in_chain: *const ChainedStruct,
|
||||||
WGPUSamplerBindingType type;
|
type: SamplerBindingType,
|
||||||
} WGPUSamplerBindingLayout;
|
};
|
||||||
|
|
||||||
typedef struct WGPUSamplerDescriptor {
|
pub const WGPUSamplerDescriptor = extern struct {
|
||||||
next_in_chain: *const ChainedStruct,
|
next_in_chain: *const ChainedStruct,
|
||||||
label: ?[*:0]const u8 = null,
|
label: ?[*:0]const u8 = null,
|
||||||
WGPUAddressMode addressModeU;
|
address_mode_u: AddressMode,
|
||||||
WGPUAddressMode addressModeV;
|
address_mode_v: AddressMode,
|
||||||
WGPUAddressMode addressModeW;
|
address_mode_w: AddressMode,
|
||||||
WGPUFilterMode magFilter;
|
mag_filter: FilterMode,
|
||||||
WGPUFilterMode minFilter;
|
min_filter: FilterMode,
|
||||||
WGPUFilterMode mipmapFilter;
|
mipmap_filter: FilterMode,
|
||||||
lod_min_clamp: f32,
|
lod_min_clamp: f32,
|
||||||
lod_max_clamp: f32,
|
lod_max_clamp: f32,
|
||||||
WGPUCompareFunction compare;
|
compare: CompareFunction,
|
||||||
max_anisotropy: u16,
|
max_anisotropy: u16,
|
||||||
} WGPUSamplerDescriptor;
|
};
|
||||||
|
|
||||||
typedef struct WGPUShaderModuleDescriptor {
|
pub const WGPUShaderModuleDescriptor = extern struct {
|
||||||
next_in_chain: *const ChainedStruct,
|
next_in_chain: *const ChainedStruct,
|
||||||
label: ?[*:0]const u8 = null,
|
label: ?[*:0]const u8 = null,
|
||||||
} WGPUShaderModuleDescriptor;
|
};
|
||||||
|
|
||||||
typedef struct WGPUShaderModuleSPIRVDescriptor {
|
pub const WGPUShaderModuleSPIRVDescriptor = extern struct {
|
||||||
WGPUChainedStruct chain;
|
chain: ChainedStruct,
|
||||||
uint32_t codeSize;
|
code_size: u32,
|
||||||
uint32_t const * code;
|
code: [*]const u32,
|
||||||
} WGPUShaderModuleSPIRVDescriptor;
|
};
|
||||||
|
|
||||||
typedef struct WGPUShaderModuleWGSLDescriptor {
|
pub const WGPUShaderModuleWGSLDescriptor = extern struct {
|
||||||
WGPUChainedStruct chain;
|
chain: ChainedStruct,
|
||||||
char const * source;
|
source: [*:0]const u8,
|
||||||
} WGPUShaderModuleWGSLDescriptor;
|
};
|
||||||
|
|
||||||
typedef struct WGPUStencilFaceState {
|
pub const StencilFaceState = extern struct {
|
||||||
WGPUCompareFunction compare;
|
compare: CompareFunction,
|
||||||
WGPUStencilOperation failOp;
|
fail_op: StencilOperation,
|
||||||
WGPUStencilOperation depthFailOp;
|
depth_fail_op: StencilOperation,
|
||||||
WGPUStencilOperation passOp;
|
pass_op: StencilOperation,
|
||||||
} WGPUStencilFaceState;
|
};
|
||||||
|
|
||||||
typedef struct WGPUStorageTextureBindingLayout {
|
pub const StorageTextureBindingLayout = extern struct {
|
||||||
next_in_chain: *const ChainedStruct,
|
next_in_chain: *const ChainedStruct,
|
||||||
WGPUStorageTextureAccess access;
|
access: StorageTextureAccess,
|
||||||
WGPUTextureFormat format;
|
format: TextureFormat,
|
||||||
WGPUTextureViewDimension viewDimension;
|
view_dimension: TextureViewDimension,
|
||||||
} WGPUStorageTextureBindingLayout;
|
};
|
||||||
|
|
||||||
typedef struct WGPUSurfaceDescriptor {
|
pub const WGPUSurfaceDescriptor = extern struct {
|
||||||
next_in_chain: *const ChainedStruct,
|
next_in_chain: *const ChainedStruct,
|
||||||
label: ?[*:0]const u8 = null,
|
label: ?[*:0]const u8 = null,
|
||||||
} WGPUSurfaceDescriptor;
|
};
|
||||||
|
|
||||||
typedef struct WGPUSurfaceDescriptorFromAndroidNativeWindow {
|
pub const WGPUSurfaceDescriptorFromAndroidNativeWindow = extern struct {
|
||||||
WGPUChainedStruct chain;
|
chain: ChainedStruct,
|
||||||
void * window;
|
window: *anyopaque,
|
||||||
} WGPUSurfaceDescriptorFromAndroidNativeWindow;
|
};
|
||||||
|
|
||||||
typedef struct WGPUSurfaceDescriptorFromCanvasHTMLSelector {
|
pub const WGPUSurfaceDescriptorFromCanvasHTMLSelector = extern struct {
|
||||||
WGPUChainedStruct chain;
|
chain: ChainedStruct,
|
||||||
char const * selector;
|
selector: [*:0]const u8,
|
||||||
} WGPUSurfaceDescriptorFromCanvasHTMLSelector;
|
};
|
||||||
|
|
||||||
typedef struct WGPUSurfaceDescriptorFromMetalLayer {
|
pub const WGPUSurfaceDescriptorFromMetalLayer = extern struct {
|
||||||
WGPUChainedStruct chain;
|
chain: ChainedStruct,
|
||||||
void * layer;
|
layer: *anyopaque,
|
||||||
} WGPUSurfaceDescriptorFromMetalLayer;
|
};
|
||||||
|
|
||||||
typedef struct WGPUSurfaceDescriptorFromWaylandSurface {
|
pub const WGPUSurfaceDescriptorFromWaylandSurface = extern struct {
|
||||||
WGPUChainedStruct chain;
|
chain: ChainedStruct,
|
||||||
void * display;
|
display: *anyopaque,
|
||||||
void * surface;
|
surface: *anyopaque,
|
||||||
} WGPUSurfaceDescriptorFromWaylandSurface;
|
};
|
||||||
|
|
||||||
typedef struct WGPUSurfaceDescriptorFromWindowsCoreWindow {
|
pub const WGPUSurfaceDescriptorFromWindowsCoreWindow = extern struct {
|
||||||
WGPUChainedStruct chain;
|
chain: ChainedStruct,
|
||||||
void * coreWindow;
|
core_window: *anyopaque,
|
||||||
} WGPUSurfaceDescriptorFromWindowsCoreWindow;
|
};
|
||||||
|
|
||||||
typedef struct WGPUSurfaceDescriptorFromWindowsHWND {
|
pub const WGPUSurfaceDescriptorFromWindowsHWND = extern struct {
|
||||||
WGPUChainedStruct chain;
|
chain: ChainedStruct,
|
||||||
void * hinstance;
|
hinstance: *anyopaque,
|
||||||
void * hwnd;
|
hwnd: *anyopaque,
|
||||||
} WGPUSurfaceDescriptorFromWindowsHWND;
|
};
|
||||||
|
|
||||||
typedef struct WGPUSurfaceDescriptorFromWindowsSwapChainPanel {
|
pub const WGPUSurfaceDescriptorFromWindowsSwapChainPanel = extern struct {
|
||||||
WGPUChainedStruct chain;
|
chain: ChainedStruct,
|
||||||
void * swapChainPanel;
|
swap_chain_panel: *anyopaque,
|
||||||
} WGPUSurfaceDescriptorFromWindowsSwapChainPanel;
|
};
|
||||||
|
|
||||||
typedef struct WGPUSurfaceDescriptorFromXlibWindow {
|
pub const WGPUSurfaceDescriptorFromXlibWindow = extern struct {
|
||||||
WGPUChainedStruct chain;
|
chain: ChainedStruct,
|
||||||
void * display;
|
display: *anyopaque,
|
||||||
uint32_t window;
|
window: u32,
|
||||||
} WGPUSurfaceDescriptorFromXlibWindow;
|
};
|
||||||
|
|
||||||
typedef struct WGPUSwapChainDescriptor {
|
pub const WGPUSwapChainDescriptor = extern struct {
|
||||||
next_in_chain: *const ChainedStruct,
|
next_in_chain: *const ChainedStruct,
|
||||||
label: ?[*:0]const u8 = null,
|
label: ?[*:0]const u8 = null,
|
||||||
WGPUTextureUsageFlags usage;
|
usage: TextureUsageFlags,
|
||||||
WGPUTextureFormat format;
|
format: TextureFormat,
|
||||||
width: u32,
|
width: u32,
|
||||||
height: u32,
|
height: u32,
|
||||||
WGPUPresentMode presentMode;
|
present_mode: PresentMode,
|
||||||
implementation: u64,
|
implementation: u64,
|
||||||
} WGPUSwapChainDescriptor;
|
};
|
||||||
|
|
||||||
typedef struct WGPUTextureBindingLayout {
|
pub const WGPUTextureBindingLayout = extern struct {
|
||||||
next_in_chain: *const ChainedStruct,
|
next_in_chain: *const ChainedStruct,
|
||||||
WGPUTextureSampleType sampleType;
|
sample_type: TextureSampleType,
|
||||||
WGPUTextureViewDimension viewDimension;
|
view_dimension: TextureViewDimension,
|
||||||
multisampled: bool,
|
multisampled: bool,
|
||||||
} WGPUTextureBindingLayout;
|
};
|
||||||
|
|
||||||
typedef struct WGPUTextureDataLayout {
|
pub const WGPUTextureDataLayout = extern struct {
|
||||||
next_in_chain: *const ChainedStruct,
|
next_in_chain: *const ChainedStruct,
|
||||||
offset: u64,
|
offset: u64,
|
||||||
bytes_per_row: u32,
|
bytes_per_row: u32,
|
||||||
rows_per_image: u32,
|
rows_per_image: u32,
|
||||||
} WGPUTextureDataLayout;
|
};
|
||||||
|
|
||||||
typedef struct WGPUTextureViewDescriptor {
|
pub const WGPUTextureViewDescriptor = extern struct {
|
||||||
next_in_chain: *const ChainedStruct,
|
next_in_chain: *const ChainedStruct,
|
||||||
label: ?[*:0]const u8 = null,
|
label: ?[*:0]const u8 = null,
|
||||||
WGPUTextureFormat format;
|
format: TextureFormat,
|
||||||
WGPUTextureViewDimension dimension;
|
dimension: TextureViewDimension,
|
||||||
base_mip_level: u32,
|
base_mip_level: u32,
|
||||||
mip_level_count: u32,
|
mip_level_count: u32,
|
||||||
base_array_layer: u32,
|
base_array_layer: u32,
|
||||||
array_layer_count: u32,
|
array_layer_count: u32,
|
||||||
WGPUTextureAspect aspect;
|
aspect: TextureAspect,
|
||||||
} WGPUTextureViewDescriptor;
|
};
|
||||||
|
|
||||||
typedef struct WGPUVertexAttribute {
|
pub const VertexAttribute = extern struct {
|
||||||
WGPUVertexFormat format;
|
format: VertexFormat,
|
||||||
offset: u64,
|
offset: u64,
|
||||||
shader_location: u32,
|
shader_location: u32,
|
||||||
} WGPUVertexAttribute;
|
};
|
||||||
|
|
||||||
typedef struct WGPUBindGroupDescriptor {
|
pub const WGPUBindGroupDescriptor = extern struct {
|
||||||
next_in_chain: *const ChainedStruct,
|
next_in_chain: *const ChainedStruct,
|
||||||
label: ?[*:0]const u8 = null,
|
label: ?[*:0]const u8 = null,
|
||||||
WGPUBindGroupLayout layout;
|
layout: BindGroupLayout,
|
||||||
uint32_t entryCount;
|
entry_count: u32,
|
||||||
WGPUBindGroupEntry const * entries;
|
entries: [*]const BindGroupEntry,
|
||||||
} WGPUBindGroupDescriptor;
|
};
|
||||||
|
|
||||||
typedef struct WGPUBindGroupLayoutEntry {
|
pub const WGPUBindGroupLayoutEntry = extern struct {
|
||||||
next_in_chain: *const ChainedStruct,
|
next_in_chain: *const ChainedStruct,
|
||||||
binding: u32,
|
binding: u32,
|
||||||
WGPUShaderStageFlags visibility;
|
visibility: ShaderStageFlags,
|
||||||
WGPUBufferBindingLayout buffer;
|
buffer: BufferBindingLayout,
|
||||||
WGPUSamplerBindingLayout sampler;
|
sampler: SamplerBindingLayout,
|
||||||
WGPUTextureBindingLayout texture;
|
texture: TextureBindingLayout,
|
||||||
WGPUStorageTextureBindingLayout storageTexture;
|
storage_texture: StorageTextureBindingLayout,
|
||||||
} WGPUBindGroupLayoutEntry;
|
};
|
||||||
|
|
||||||
typedef struct WGPUBlendState {
|
pub const BlendState = extern struct {
|
||||||
WGPUBlendComponent color;
|
color: BlendComponent,
|
||||||
WGPUBlendComponent alpha;
|
alpha: BlendComponent,
|
||||||
} WGPUBlendState;
|
};
|
||||||
|
|
||||||
typedef struct WGPUCompilationInfo {
|
pub const CompilationInfo = extern struct {
|
||||||
next_in_chain: *const ChainedStruct,
|
next_in_chain: *const ChainedStruct,
|
||||||
uint32_t messageCount;
|
message_count: u32,
|
||||||
WGPUCompilationMessage const * messages;
|
messages: [*]const CompilationMessage,
|
||||||
} WGPUCompilationInfo;
|
};
|
||||||
|
|
||||||
typedef struct WGPUComputePassDescriptor {
|
pub const WGPUComputePassDescriptor = extern struct {
|
||||||
next_in_chain: *const ChainedStruct,
|
next_in_chain: *const ChainedStruct,
|
||||||
label: ?[*:0]const u8 = null,
|
label: ?[*:0]const u8 = null,
|
||||||
uint32_t timestampWriteCount;
|
timestamp_write_count: u32,
|
||||||
WGPUComputePassTimestampWrite const * timestampWrites;
|
timestamp_writes: [*]const ComputePassTimestampWrite,
|
||||||
} WGPUComputePassDescriptor;
|
};
|
||||||
|
|
||||||
typedef struct WGPUDepthStencilState {
|
pub const DepthStencilState = extern struct {
|
||||||
next_in_chain: *const ChainedStruct,
|
next_in_chain: *const ChainedStruct,
|
||||||
WGPUTextureFormat format;
|
format: TextureFormat,
|
||||||
depth_write_enabled: bool,
|
depth_write_enabled: bool,
|
||||||
WGPUCompareFunction depthCompare;
|
depth_compare: CompareFunction,
|
||||||
WGPUStencilFaceState stencilFront;
|
stencil_front: StencilFaceState,
|
||||||
WGPUStencilFaceState stencilBack;
|
stencil_back: StencilFaceState,
|
||||||
stencil_read_mask: u32,
|
stencil_read_mask: u32,
|
||||||
stencil_write_mask: u32,
|
stencil_write_mask: u32,
|
||||||
depth_bias: i32,
|
depth_bias: i32,
|
||||||
depth_bias_slope_scale: f32,
|
depth_bias_slope_scale: f32,
|
||||||
depth_bias_clamp: f32,
|
depth_bias_clamp: f32,
|
||||||
} WGPUDepthStencilState;
|
};
|
||||||
|
|
||||||
typedef struct WGPUImageCopyBuffer {
|
pub const ImageCopyBuffer = extern struct {
|
||||||
next_in_chain: *const ChainedStruct,
|
next_in_chain: *const ChainedStruct,
|
||||||
WGPUTextureDataLayout layout;
|
layout: TextureDataLayout,
|
||||||
WGPUBuffer buffer;
|
buffer: Buffer
|
||||||
} WGPUImageCopyBuffer;
|
};
|
||||||
|
|
||||||
typedef struct WGPUImageCopyTexture {
|
pub const ImageCopyTexture = extern struct {
|
||||||
next_in_chain: *const ChainedStruct,
|
next_in_chain: *const ChainedStruct,
|
||||||
WGPUTexture texture;
|
texture: Texture,
|
||||||
mip_level: u32,
|
mip_level: u32,
|
||||||
WGPUOrigin3D origin;
|
origin: Origin3D,
|
||||||
WGPUTextureAspect aspect;
|
aspect: TextureAspect,
|
||||||
} WGPUImageCopyTexture;
|
};
|
||||||
|
|
||||||
typedef struct WGPUProgrammableStageDescriptor {
|
pub const WGPUProgrammableStageDescriptor = extern struct {
|
||||||
next_in_chain: *const ChainedStruct,
|
next_in_chain: *const ChainedStruct,
|
||||||
WGPUShaderModule module;
|
module: ShaderModule,
|
||||||
char const * entryPoint;
|
entry_point: [*:0]const u8,
|
||||||
uint32_t constantCount;
|
constant_count: u32,
|
||||||
WGPUConstantEntry const * constants;
|
constants: [*]const ConstantEntry,
|
||||||
} WGPUProgrammableStageDescriptor;
|
};
|
||||||
|
|
||||||
typedef struct WGPURenderPassColorAttachment {
|
pub const WGPURenderPassColorAttachment = extern struct {
|
||||||
WGPUTextureView view; // nullable
|
view: TextureView = TextureView.none, // nullable
|
||||||
WGPUTextureView resolveTarget; // nullable
|
resolve_target: TextureView = TextureView.none, // nullable
|
||||||
WGPULoadOp loadOp;
|
load_op: LoadOp,
|
||||||
WGPUStoreOp storeOp;
|
store_op: StoreOp,
|
||||||
WGPUColor clearColor;
|
clear_color: Color,
|
||||||
WGPUColor clearValue;
|
clear_value: Color,
|
||||||
} WGPURenderPassColorAttachment;
|
};
|
||||||
|
|
||||||
typedef struct WGPURequiredLimits {
|
pub const RequiredLimits = extern struct {
|
||||||
next_in_chain: *const ChainedStruct,
|
next_in_chain: *const ChainedStruct,
|
||||||
WGPULimits limits;
|
limits: Limits,
|
||||||
} WGPURequiredLimits;
|
};
|
||||||
|
|
||||||
typedef struct WGPUSupportedLimits {
|
pub const SupportedLimits = extern struct {
|
||||||
WGPUChainedStructOut * nextInChain;
|
next_in_chain: *CHainedStructOut,
|
||||||
WGPULimits limits;
|
limits: Limits,
|
||||||
} WGPUSupportedLimits;
|
};
|
||||||
|
|
||||||
typedef struct WGPUTextureDescriptor {
|
pub const WGPUTextureDescriptor = extern struct {
|
||||||
next_in_chain: *const ChainedStruct,
|
next_in_chain: *const ChainedStruct,
|
||||||
label: ?[*:0]const u8 = null,
|
label: ?[*:0]const u8 = null,
|
||||||
WGPUTextureUsageFlags usage;
|
usage: TextureUsageFlags,
|
||||||
WGPUTextureDimension dimension;
|
dimension: TextureDimension,
|
||||||
WGPUExtent3D size;
|
size: Extent3D,
|
||||||
WGPUTextureFormat format;
|
format: TextureFormat,
|
||||||
mip_level_count: u32,
|
mip_level_count: u32,
|
||||||
sample_count: u32,
|
sample_count: u32,
|
||||||
uint32_t viewFormatCount;
|
view_format_count: u32,
|
||||||
WGPUTextureFormat const * viewFormats;
|
view_formats: [*]const TextureFormat,
|
||||||
} WGPUTextureDescriptor;
|
};
|
||||||
|
|
||||||
typedef struct WGPUVertexBufferLayout {
|
pub const VertexBufferLayout = extern struct {
|
||||||
uint64_t arrayStride;
|
array_stride: u64,
|
||||||
WGPUVertexStepMode stepMode;
|
step_mode: VertexStepMode,
|
||||||
uint32_t attributeCount;
|
attribute_count: u32,
|
||||||
WGPUVertexAttribute const * attributes;
|
attributes: [*]const VertexAttribute,
|
||||||
} WGPUVertexBufferLayout;
|
};
|
||||||
|
|
||||||
typedef struct WGPUBindGroupLayoutDescriptor {
|
pub const WGPUBindGroupLayoutDescriptor = extern struct {
|
||||||
next_in_chain: *const ChainedStruct,
|
next_in_chain: *const ChainedStruct,
|
||||||
label: ?[*:0]const u8 = null,
|
label: ?[*:0]const u8 = null,
|
||||||
uint32_t entryCount;
|
entry_count: u32,
|
||||||
WGPUBindGroupLayoutEntry const * entries;
|
entries: [*]const BindGroupLayoutEntry,
|
||||||
} WGPUBindGroupLayoutDescriptor;
|
};
|
||||||
|
|
||||||
typedef struct WGPUColorTargetState {
|
pub const ColorTargetState = extern struct {
|
||||||
next_in_chain: *const ChainedStruct,
|
next_in_chain: *const ChainedStruct,
|
||||||
WGPUTextureFormat format;
|
format: TextureFormat,
|
||||||
WGPUBlendState const * blend; // nullable
|
blend: ?*const BlendState = null,
|
||||||
WGPUColorWriteMaskFlags writeMask;
|
write_mask: ColorWriteMaskFlags,
|
||||||
} WGPUColorTargetState;
|
};
|
||||||
|
|
||||||
typedef struct WGPUComputePipelineDescriptor {
|
pub const WGPUComputePipelineDescriptor = extern struct {
|
||||||
next_in_chain: *const ChainedStruct,
|
next_in_chain: *const ChainedStruct,
|
||||||
label: ?[*:0]const u8 = null,
|
label: ?[*:0]const u8 = null,
|
||||||
WGPUPipelineLayout layout; // nullable
|
layout: PipelineLayout = PipelineLayout.none, // nullable
|
||||||
WGPUProgrammableStageDescriptor compute;
|
compute: ProgrammableStageDescriptor,
|
||||||
} WGPUComputePipelineDescriptor;
|
};
|
||||||
|
|
||||||
typedef struct WGPUDeviceDescriptor {
|
pub const WGPUDeviceDescriptor = extern struct {
|
||||||
next_in_chain: *const ChainedStruct,
|
next_in_chain: *const ChainedStruct,
|
||||||
label: ?[*:0]const u8 = null,
|
label: ?[*:0]const u8 = null,
|
||||||
uint32_t requiredFeaturesCount;
|
required_features_count: u32,
|
||||||
WGPUFeatureName const * requiredFeatures;
|
required_features: [*]const FeatureName,
|
||||||
WGPURequiredLimits const * requiredLimits; // nullable
|
required_limits: ?*const RequiredLimits = null, // nullable
|
||||||
WGPUQueueDescriptor defaultQueue;
|
default_queue: Queue.Descriptor,
|
||||||
} WGPUDeviceDescriptor;
|
};
|
||||||
|
|
||||||
typedef struct WGPURenderPassDescriptor {
|
pub const WGPURenderPassDescriptor = extern struct {
|
||||||
next_in_chain: *const ChainedStruct,
|
next_in_chain: *const ChainedStruct,
|
||||||
label: ?[*:0]const u8 = null,
|
label: ?[*:0]const u8 = null,
|
||||||
uint32_t colorAttachmentCount;
|
color_attachment_count: u32,
|
||||||
WGPURenderPassColorAttachment const * colorAttachments;
|
color_attachments: [*]const RenderPassColorAttachment,
|
||||||
WGPURenderPassDepthStencilAttachment const * depthStencilAttachment; // nullable
|
depth_stencil_attachment: ?[*]const RenderPassDepthStencilAttachment = null, // nullable
|
||||||
WGPUQuerySet occlusionQuerySet; // nullable
|
occlusion_query_set: QuerySet = QuerySet.none, // nullable
|
||||||
uint32_t timestampWriteCount;
|
timestamp_write_count: u32,
|
||||||
WGPURenderPassTimestampWrite const * timestampWrites;
|
timestamp_writes: [*]const RenderPassTimestampWrite,
|
||||||
} WGPURenderPassDescriptor;
|
};
|
||||||
|
|
||||||
typedef struct WGPUVertexState {
|
pub const VertexState = extern struct {
|
||||||
next_in_chain: *const ChainedStruct,
|
next_in_chain: *const ChainedStruct,
|
||||||
WGPUShaderModule module;
|
module: ShaderModule,
|
||||||
char const * entryPoint;
|
entry_point: [*:0]const u8,
|
||||||
uint32_t constantCount;
|
constant_count: u32,
|
||||||
WGPUConstantEntry const * constants;
|
constants: [*]const ConstantEntry,
|
||||||
uint32_t bufferCount;
|
buffer_count: u32,
|
||||||
WGPUVertexBufferLayout const * buffers;
|
buffers: [*]const VertexBufferLayout,
|
||||||
} WGPUVertexState;
|
};
|
||||||
|
|
||||||
typedef struct WGPUFragmentState {
|
pub const FragmentState = extern struct {
|
||||||
next_in_chain: *const ChainedStruct,
|
next_in_chain: *const ChainedStruct,
|
||||||
WGPUShaderModule module;
|
module: ShaderModule,
|
||||||
char const * entryPoint;
|
entry_point: [*:0]const u8,
|
||||||
uint32_t constantCount;
|
constant_count: u32,
|
||||||
WGPUConstantEntry const * constants;
|
constants: [*]const ConstantEntry,
|
||||||
uint32_t targetCount;
|
target_count: u32,
|
||||||
WGPUColorTargetState const * targets;
|
targets: [*]const ColorTargetState,
|
||||||
} WGPUFragmentState;
|
};
|
||||||
|
|
||||||
typedef struct WGPURenderPipelineDescriptor {
|
pub const WGPURenderPipelineDescriptor = extern struct {
|
||||||
next_in_chain: *const ChainedStruct,
|
next_in_chain: *const ChainedStruct,
|
||||||
label: ?[*:0]const u8 = null,
|
label: ?[*:0]const u8 = null,
|
||||||
WGPUPipelineLayout layout; // nullable
|
layout: PipelineLayout = PipelineLayout.none, // nullable
|
||||||
WGPUVertexState vertex;
|
vertex: VertexState,
|
||||||
WGPUPrimitiveState primitive;
|
primitive: PrimitiveState,
|
||||||
WGPUDepthStencilState const * depthStencil; // nullable
|
depth_stencil: ?*const DepthStencilState = null, // nullable
|
||||||
WGPUMultisampleState multisample;
|
multisample: MultisampleState,
|
||||||
WGPUFragmentState const * fragment; // nullable
|
fragment: ?*const FragmentState = null, // nullable
|
||||||
} WGPURenderPipelineDescriptor;
|
};
|
||||||
|
|
||||||
typedef void (*WGPUBufferMapCallback)(WGPUBufferMapAsyncStatus status, void * userdata);
|
typedef void (*WGPUBufferMapCallback)(WGPUBufferMapAsyncStatus status, void * userdata);
|
||||||
typedef void (*WGPUCompilationInfoCallback)(WGPUCompilationInfoRequestStatus status, WGPUCompilationInfo const * compilationInfo, void * userdata);
|
typedef void (*WGPUCompilationInfoCallback)(WGPUCompilationInfoRequestStatus status, WGPUCompilationInfo const * compilationInfo, void * userdata);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue