Merge pull request #4899 from Valakor/wgpu

wgpu: Some small fixes after update to v24.0.0.2
This commit is contained in:
Laytan
2025-03-03 21:58:27 +01:00
committed by GitHub
2 changed files with 100 additions and 100 deletions
+96 -96
View File
@@ -301,7 +301,7 @@ FeatureName :: enum i32 {
// PolygonModePoint, // PolygonModePoint,
// ConservativeRasterization, // ConservativeRasterization,
// ClearTexture, // ClearTexture,
SprivShaderPassThrough = 0x00030017, SpirvShaderPassthrough = 0x00030017,
// MultiView, // MultiView,
VertexAttribute64bit = 0x00030019, VertexAttribute64bit = 0x00030019,
TextureFormatNv12, TextureFormatNv12,
@@ -762,100 +762,100 @@ BufferMapCallback :: #type proc "c" (status: MapAsyncStatus, message: StringView
CompilationInfoCallback :: #type proc "c" (status: CompilationInfoRequestStatus, compilationInfo: ^CompilationInfo, userdata1: rawptr, userdata2: rawptr) CompilationInfoCallback :: #type proc "c" (status: CompilationInfoRequestStatus, compilationInfo: ^CompilationInfo, userdata1: rawptr, userdata2: rawptr)
CreateComputePipelineAsyncCallback :: #type proc "c" (status: CreatePipelineAsyncStatus, pipeline: ComputePipeline, message: StringView, userdata1: rawptr, userdata2: rawptr) CreateComputePipelineAsyncCallback :: #type proc "c" (status: CreatePipelineAsyncStatus, pipeline: ComputePipeline, message: StringView, userdata1: rawptr, userdata2: rawptr)
CreateRenderPipelineAsyncCallback :: #type proc "c" (status: CreatePipelineAsyncStatus, pipeline: RenderPipeline, message: StringView, userdata1: rawptr, userdata2: rawptr) CreateRenderPipelineAsyncCallback :: #type proc "c" (status: CreatePipelineAsyncStatus, pipeline: RenderPipeline, message: StringView, userdata1: rawptr, userdata2: rawptr)
DeviceLostCallback :: #type proc "c" (device: Device, reason: DeviceLostReason, message: StringView, userdata1: rawptr, userdata2: rawptr) DeviceLostCallback :: #type proc "c" (device: ^Device, reason: DeviceLostReason, message: StringView, userdata1: rawptr, userdata2: rawptr)
PopErrorScopeCallback :: #type proc "c" (status: PopErrorScopeStatus, type: ErrorType, message: StringView, userdata1: rawptr, userdata2: rawptr) PopErrorScopeCallback :: #type proc "c" (status: PopErrorScopeStatus, type: ErrorType, message: StringView, userdata1: rawptr, userdata2: rawptr)
QueueWorkDoneCallback :: #type proc "c" (status: QueueWorkDoneStatus, userdata1: rawptr, userdata2: rawptr) QueueWorkDoneCallback :: #type proc "c" (status: QueueWorkDoneStatus, userdata1: rawptr, userdata2: rawptr)
RequestAdapterCallback :: #type proc "c" (status: RequestAdapterStatus, adapter: Adapter, message: StringView, userdata1: rawptr, userdata2: rawptr) RequestAdapterCallback :: #type proc "c" (status: RequestAdapterStatus, adapter: Adapter, message: StringView, userdata1: rawptr, userdata2: rawptr)
RequestDeviceCallback :: #type proc "c" (status: RequestDeviceStatus, adapter: Device, message: StringView, userdata1: rawptr, userdata2: rawptr) RequestDeviceCallback :: #type proc "c" (status: RequestDeviceStatus, adapter: Device, message: StringView, userdata1: rawptr, userdata2: rawptr)
UncapturedErrorCallback :: #type proc "c" (device: Device, type: ErrorType, message: StringView, userdata1: rawptr, userdata2: rawptr) UncapturedErrorCallback :: #type proc "c" (device: ^Device, type: ErrorType, message: StringView, userdata1: rawptr, userdata2: rawptr)
ChainedStruct :: struct { ChainedStruct :: struct {
next: ^ChainedStruct, next: ^ChainedStruct,
sType: SType, sType: SType,
} }
ChainedStructOut :: struct { ChainedStructOut :: struct {
next: ^ChainedStructOut, next: ^ChainedStructOut,
sType: SType, sType: SType,
} }
BufferMapCallbackInfo :: struct { BufferMapCallbackInfo :: struct {
nextInChain: ^ChainedStructOut, nextInChain: /* const */ ^ChainedStruct,
mode: CallbackMode, mode: CallbackMode,
callback: BufferMapCallback, callback: BufferMapCallback,
userdata1: rawptr, userdata1: /* NULLABLE */ rawptr,
userdata2: rawptr, userdata2: /* NULLABLE */ rawptr,
} }
CompilationInfoCallbackInfo :: struct { CompilationInfoCallbackInfo :: struct {
nextInChain: ^ChainedStructOut, nextInChain: /* const */ ^ChainedStruct,
mode: CallbackMode, mode: CallbackMode,
callback: CompilationInfoCallback, callback: CompilationInfoCallback,
userdata1: rawptr, userdata1: /* NULLABLE */ rawptr,
userdata2: rawptr, userdata2: /* NULLABLE */ rawptr,
} }
CreateComputePipelineAsyncCallbackInfo :: struct { CreateComputePipelineAsyncCallbackInfo :: struct {
nextInChain: ^ChainedStructOut, nextInChain: /* const */ ^ChainedStruct,
mode: CallbackMode, mode: CallbackMode,
callback: CreateComputePipelineAsyncCallback, callback: CreateComputePipelineAsyncCallback,
userdata1: rawptr, userdata1: /* NULLABLE */ rawptr,
userdata2: rawptr, userdata2: /* NULLABLE */ rawptr,
} }
CreateRenderPipelineAsyncCallbackInfo :: struct { CreateRenderPipelineAsyncCallbackInfo :: struct {
nextInChain: ^ChainedStructOut, nextInChain: /* const */ ^ChainedStruct,
mode: CallbackMode, mode: CallbackMode,
callback: CreateRenderPipelineAsyncCallback, callback: CreateRenderPipelineAsyncCallback,
userdata1: rawptr, userdata1: /* NULLABLE */ rawptr,
userdata2: rawptr, userdata2: /* NULLABLE */ rawptr,
} }
DeviceLostCallbackInfo :: struct { DeviceLostCallbackInfo :: struct {
nextInChain: ^ChainedStructOut, nextInChain: /* const */ ^ChainedStruct,
mode: CallbackMode, mode: CallbackMode,
callback: DeviceLostCallback, callback: DeviceLostCallback,
userdata1: rawptr, userdata1: /* NULLABLE */ rawptr,
userdata2: rawptr, userdata2: /* NULLABLE */ rawptr,
} }
PopErrorScopeCallbackInfo :: struct { PopErrorScopeCallbackInfo :: struct {
nextInChain: ^ChainedStructOut, nextInChain: /* const */ ^ChainedStruct,
mode: CallbackMode, mode: CallbackMode,
callback: PopErrorScopeCallback, callback: PopErrorScopeCallback,
userdata1: rawptr, userdata1: /* NULLABLE */ rawptr,
userdata2: rawptr, userdata2: /* NULLABLE */ rawptr,
} }
QueueWorkDoneCallbackInfo :: struct { QueueWorkDoneCallbackInfo :: struct {
nextInChain: ^ChainedStructOut, nextInChain: /* const */ ^ChainedStruct,
mode: CallbackMode, mode: CallbackMode,
callback: QueueWorkDoneCallback, callback: QueueWorkDoneCallback,
userdata1: rawptr, userdata1: /* NULLABLE */ rawptr,
userdata2: rawptr, userdata2: /* NULLABLE */ rawptr,
} }
RequestAdapterCallbackInfo :: struct { RequestAdapterCallbackInfo :: struct {
nextInChain: ^ChainedStructOut, nextInChain: /* const */ ^ChainedStruct,
mode: CallbackMode, mode: CallbackMode,
callback: RequestAdapterCallback, callback: RequestAdapterCallback,
userdata1: rawptr, userdata1: /* NULLABLE */ rawptr,
userdata2: rawptr, userdata2: /* NULLABLE */ rawptr,
} }
RequestDeviceCallbackInfo :: struct { RequestDeviceCallbackInfo :: struct {
nextInChain: ^ChainedStructOut, nextInChain: /* const */ ^ChainedStruct,
mode: CallbackMode, mode: CallbackMode,
callback: RequestDeviceCallback, callback: RequestDeviceCallback,
userdata1: rawptr, userdata1: /* NULLABLE */ rawptr,
userdata2: rawptr, userdata2: /* NULLABLE */ rawptr,
} }
UncapturedErrorCallbackInfo :: struct { UncapturedErrorCallbackInfo :: struct {
nextInChain: ^ChainedStructOut, nextInChain: /* const */ ^ChainedStruct,
callback: UncapturedErrorCallback, callback: UncapturedErrorCallback,
userdata1: rawptr, userdata1: /* NULLABLE */ rawptr,
userdata2: rawptr, userdata2: /* NULLABLE */ rawptr,
} }
AdapterInfo :: struct { AdapterInfo :: struct {
@@ -894,7 +894,7 @@ BufferBindingLayout :: struct {
} }
BufferDescriptor :: struct { BufferDescriptor :: struct {
nextInChain: ^ChainedStruct, nextInChain: /* const */ ^ChainedStruct,
label: StringView, label: StringView,
usage: BufferUsageFlags, usage: BufferUsageFlags,
size: u64, size: u64,
@@ -904,12 +904,12 @@ BufferDescriptor :: struct {
Color :: [4]f64 Color :: [4]f64
CommandBufferDescriptor :: struct { CommandBufferDescriptor :: struct {
nextInChain: ^ChainedStruct, nextInChain: /* const */ ^ChainedStruct,
label: StringView, label: StringView,
} }
CommandEncoderDescriptor :: struct { CommandEncoderDescriptor :: struct {
nextInChain: ^ChainedStruct, nextInChain: /* const */ ^ChainedStruct,
label: StringView, label: StringView,
} }
@@ -930,7 +930,7 @@ ComputePassTimestampWrites :: struct {
} }
ConstantEntry :: struct { ConstantEntry :: struct {
nextInChain: ^ChainedStruct, nextInChain: /* const */ ^ChainedStruct,
key: StringView, key: StringView,
value: f64, value: f64,
} }
@@ -987,7 +987,7 @@ Limits :: struct {
} }
MultisampleState :: struct { MultisampleState :: struct {
nextInChain: ^ChainedStruct, nextInChain: /* const */ ^ChainedStruct,
count: u32, count: u32,
mask: u32, mask: u32,
alphaToCoverageEnabled: b32, alphaToCoverageEnabled: b32,
@@ -1000,14 +1000,14 @@ Origin3D :: struct {
} }
PipelineLayoutDescriptor :: struct { PipelineLayoutDescriptor :: struct {
nextInChain: ^ChainedStruct, nextInChain: /* const */ ^ChainedStruct,
label: StringView, label: StringView,
bindGroupLayoutCount: uint, bindGroupLayoutCount: uint,
bindGroupLayouts: [^]BindGroupLayout `fmt:"v,bindGroupLayoutCount"`, bindGroupLayouts: [^]BindGroupLayout `fmt:"v,bindGroupLayoutCount"`,
} }
PrimitiveState :: struct { PrimitiveState :: struct {
nextInChain: ^ChainedStruct, nextInChain: /* const */ ^ChainedStruct,
topology: PrimitiveTopology, topology: PrimitiveTopology,
stripIndexFormat: IndexFormat, stripIndexFormat: IndexFormat,
frontFace: FrontFace, frontFace: FrontFace,
@@ -1016,27 +1016,27 @@ PrimitiveState :: struct {
} }
QuerySetDescriptor :: struct { QuerySetDescriptor :: struct {
nextInChain: ^ChainedStruct, nextInChain: /* const */ ^ChainedStruct,
label: StringView, label: StringView,
type: QueryType, type: QueryType,
count: u32, count: u32,
} }
QueueDescriptor :: struct { QueueDescriptor :: struct {
nextInChain: ^ChainedStruct, nextInChain: /* const */ ^ChainedStruct,
label: StringView, label: StringView,
} }
RenderBundleDescriptor :: struct { RenderBundleDescriptor :: struct {
nextInChain: ^ChainedStruct, nextInChain: /* const */ ^ChainedStruct,
label: StringView, label: StringView,
} }
RenderBundleEncoderDescriptor :: struct { RenderBundleEncoderDescriptor :: struct {
nextInChain: ^ChainedStruct, nextInChain: /* const */ ^ChainedStruct,
label: StringView, label: StringView,
colorFormatCount: uint, colorFormatCount: uint,
colorFormats: [^]TextureFormat `fmt:"v,colorFormatCount"`, colorFormats: /* const */ [^]TextureFormat `fmt:"v,colorFormatCount"`,
depthStencilFormat: TextureFormat, depthStencilFormat: TextureFormat,
sampleCount: u32, sampleCount: u32,
depthReadOnly: b32, depthReadOnly: b32,
@@ -1067,7 +1067,7 @@ RenderPassTimestampWrites :: struct {
} }
RequestAdapterOptions :: struct { RequestAdapterOptions :: struct {
nextInChain: ^ChainedStruct, nextInChain: /* const */ ^ChainedStruct,
featureLevel: FeatureLevel, featureLevel: FeatureLevel,
powerPreference: PowerPreference, powerPreference: PowerPreference,
forceFallbackAdapter: b32, forceFallbackAdapter: b32,
@@ -1076,12 +1076,12 @@ RequestAdapterOptions :: struct {
} }
SamplerBindingLayout :: struct { SamplerBindingLayout :: struct {
nextInChain: ^ChainedStruct, nextInChain: /* const */ ^ChainedStruct,
type: SamplerBindingType, type: SamplerBindingType,
} }
SamplerDescriptor :: struct { SamplerDescriptor :: struct {
nextInChain: ^ChainedStruct, nextInChain: /* const */ ^ChainedStruct,
label: StringView, label: StringView,
addressModeU: AddressMode, addressModeU: AddressMode,
addressModeV: AddressMode, addressModeV: AddressMode,
@@ -1096,7 +1096,7 @@ SamplerDescriptor :: struct {
} }
ShaderModuleDescriptor :: struct { ShaderModuleDescriptor :: struct {
nextInChain: ^ChainedStruct, nextInChain: /* const */ ^ChainedStruct,
label: StringView, label: StringView,
} }
@@ -1119,7 +1119,7 @@ StencilFaceState :: struct {
} }
StorageTextureBindingLayout :: struct { StorageTextureBindingLayout :: struct {
nextInChain: ^ChainedStruct, nextInChain: /* const */ ^ChainedStruct,
access: StorageTextureAccess, access: StorageTextureAccess,
format: TextureFormat, format: TextureFormat,
viewDimension: TextureViewDimension, viewDimension: TextureViewDimension,
@@ -1127,12 +1127,12 @@ StorageTextureBindingLayout :: struct {
SupportedFeatures :: struct { SupportedFeatures :: struct {
featureCount: uint, featureCount: uint,
features: [^]FeatureName `fmt:"v,featureCount"`, features: /* const */ [^]FeatureName `fmt:"v,featureCount"`,
} }
SupportedWGSLLanguageFeatures :: struct { SupportedWGSLLanguageFeatures :: struct {
featureCount: uint, featureCount: uint,
features: [^]WGSLLanguageFeatureName `fmt:"v,featureCount"`, features: /* const */ [^]WGSLLanguageFeatureName `fmt:"v,featureCount"`,
} }
SurfaceCapabilities :: struct { SurfaceCapabilities :: struct {
@@ -1147,20 +1147,20 @@ SurfaceCapabilities :: struct {
} }
SurfaceConfiguration :: struct { SurfaceConfiguration :: struct {
nextInChain: ^ChainedStruct, nextInChain: /* const */ ^ChainedStruct,
device: Device, device: Device,
format: TextureFormat, format: TextureFormat,
usage: TextureUsageFlags, usage: TextureUsageFlags,
width: u32, width: u32,
height: u32, height: u32,
viewFormatCount: uint, viewFormatCount: uint,
viewFormats: [^]TextureFormat `fmt:"v,viewFormatCount"`, viewFormats: /* const */ [^]TextureFormat `fmt:"v,viewFormatCount"`,
alphaMode: CompositeAlphaMode, alphaMode: CompositeAlphaMode,
presentMode: PresentMode, presentMode: PresentMode,
} }
SurfaceDescriptor :: struct { SurfaceDescriptor :: struct {
nextInChain: ^ChainedStruct, nextInChain: /* const */ ^ChainedStruct,
label: StringView, label: StringView,
} }
@@ -1204,7 +1204,7 @@ SurfaceSourceXlibWindow :: struct {
} }
SurfaceTexture :: struct { SurfaceTexture :: struct {
nextInChain: ^ChainedStruct, nextInChain: ^ChainedStructOut,
texture: Texture, texture: Texture,
status: SurfaceGetCurrentTextureStatus, status: SurfaceGetCurrentTextureStatus,
} }
@@ -1216,14 +1216,14 @@ TexelCopyBufferLayout :: struct {
} }
TextureBindingLayout :: struct { TextureBindingLayout :: struct {
nextInChain: ^ChainedStruct, nextInChain: /* const */ ^ChainedStruct,
sampleType: TextureSampleType, sampleType: TextureSampleType,
viewDimension: TextureViewDimension, viewDimension: TextureViewDimension,
multisampled: b32, multisampled: b32,
} }
TextureViewDescriptor :: struct { TextureViewDescriptor :: struct {
nextInChain: ^ChainedStruct, nextInChain: /* const */ ^ChainedStruct,
label: StringView, label: StringView,
format: TextureFormat, format: TextureFormat,
dimension: TextureViewDimension, dimension: TextureViewDimension,
@@ -1242,15 +1242,15 @@ VertexAttribute :: struct {
} }
BindGroupDescriptor :: struct { BindGroupDescriptor :: struct {
nextInChain: ^ChainedStruct, nextInChain: /* const */ ^ChainedStruct,
label: StringView, label: StringView,
layout: BindGroupLayout, layout: BindGroupLayout,
entryCount: uint, entryCount: uint,
entries: [^]BindGroupEntry `fmt:"v,entryCount"`, entries: /* const */ [^]BindGroupEntry `fmt:"v,entryCount"`,
} }
BindGroupLayoutEntry :: struct { BindGroupLayoutEntry :: struct {
nextInChain: ^ChainedStruct, nextInChain: /* const */ ^ChainedStruct,
binding: u32, binding: u32,
visibility: ShaderStageFlags, visibility: ShaderStageFlags,
buffer: BufferBindingLayout, buffer: BufferBindingLayout,
@@ -1265,19 +1265,19 @@ BlendState :: struct {
} }
CompilationInfo :: struct { CompilationInfo :: struct {
nextInChain: ^ChainedStruct, nextInChain: /* const */ ^ChainedStruct,
messageCount: uint, messageCount: uint,
messages: [^]CompilationMessage `fmt:"v,messageCount"`, messages: /* const */ [^]CompilationMessage `fmt:"v,messageCount"`,
} }
ComputePassDescriptor :: struct { ComputePassDescriptor :: struct {
nextInChain: ^ChainedStruct, nextInChain: /* const */ ^ChainedStruct,
label: StringView, label: StringView,
/* NULLABLE */ timestampWrites: /* const */ ^ComputePassTimestampWrites, /* NULLABLE */ timestampWrites: /* const */ ^ComputePassTimestampWrites,
} }
DepthStencilState :: struct { DepthStencilState :: struct {
nextInChain: ^ChainedStruct, nextInChain: /* const */ ^ChainedStruct,
format: TextureFormat, format: TextureFormat,
depthWriteEnabled: OptionalBool, depthWriteEnabled: OptionalBool,
depthCompare: CompareFunction, depthCompare: CompareFunction,
@@ -1291,10 +1291,10 @@ DepthStencilState :: struct {
} }
DeviceDescriptor :: struct { DeviceDescriptor :: struct {
nextInChain: ^ChainedStruct, nextInChain: /* const */ ^ChainedStruct,
label: StringView, label: StringView,
requiredFeatureCount: uint, requiredFeatureCount: uint,
requiredFeatures: [^]FeatureName `fmt:"v,requiredFeatureCount"`, requiredFeatures: /* const */ [^]FeatureName `fmt:"v,requiredFeatureCount"`,
/* NULLABLE */ requiredLimits: /* const */ ^Limits, /* NULLABLE */ requiredLimits: /* const */ ^Limits,
defaultQueue: QueueDescriptor, defaultQueue: QueueDescriptor,
deviceLostCallbackInfo: DeviceLostCallbackInfo, deviceLostCallbackInfo: DeviceLostCallbackInfo,
@@ -1307,12 +1307,12 @@ FutureWaitInfo :: struct {
} }
InstanceDescriptor :: struct { InstanceDescriptor :: struct {
nextInChain: ^ChainedStruct, nextInChain: /* const */ ^ChainedStruct,
features: InstanceCapabilities, features: InstanceCapabilities,
} }
ProgrammableStageDescriptor :: struct { ProgrammableStageDescriptor :: struct {
nextInChain: ^ChainedStruct, nextInChain: /* const */ ^ChainedStruct,
module: ShaderModule, module: ShaderModule,
entryPoint: StringView, entryPoint: StringView,
constantCount: uint, constantCount: uint,
@@ -1320,7 +1320,7 @@ ProgrammableStageDescriptor :: struct {
} }
RenderPassColorAttachment :: struct { RenderPassColorAttachment :: struct {
nextInChain: ^ChainedStruct, nextInChain: /* const */ ^ChainedStruct,
/* NULLABLE */ view: TextureView, /* NULLABLE */ view: TextureView,
depthSlice: u32, depthSlice: u32,
/* NULLABLE */ resolveTarget: TextureView, /* NULLABLE */ resolveTarget: TextureView,
@@ -1342,7 +1342,7 @@ TexelCopyTextureInfo :: struct {
} }
TextureDescriptor :: struct { TextureDescriptor :: struct {
nextInChain: ^ChainedStruct, nextInChain: /* const */ ^ChainedStruct,
label: StringView, label: StringView,
usage: TextureUsageFlags, usage: TextureUsageFlags,
dimension: TextureDimension, dimension: TextureDimension,
@@ -1351,21 +1351,21 @@ TextureDescriptor :: struct {
mipLevelCount: u32, mipLevelCount: u32,
sampleCount: u32, sampleCount: u32,
viewFormatCount: uint, viewFormatCount: uint,
viewFormats: [^]TextureFormat `fmt:"v,viewFormatCount"`, viewFormats: /* const */ [^]TextureFormat `fmt:"v,viewFormatCount"`,
} }
VertexBufferLayout :: struct { VertexBufferLayout :: struct {
stepMode: VertexStepMode, stepMode: VertexStepMode,
arrayStride: u64, arrayStride: u64,
attributeCount: uint, attributeCount: uint,
attributes: [^]VertexAttribute `fmt:"v,attributeCount"`, attributes: /* const */ [^]VertexAttribute `fmt:"v,attributeCount"`,
} }
BindGroupLayoutDescriptor :: struct { BindGroupLayoutDescriptor :: struct {
nextInChain: ^ChainedStruct, nextInChain: /* const */ ^ChainedStruct,
label: StringView, label: StringView,
entryCount: uint, entryCount: uint,
entries: [^]BindGroupLayoutEntry `fmt:"v,entryCount"`, entries: /* const */ [^]BindGroupLayoutEntry `fmt:"v,entryCount"`,
} }
ColorTargetState :: struct { ColorTargetState :: struct {
@@ -1376,44 +1376,44 @@ ColorTargetState :: struct {
} }
ComputePipelineDescriptor :: struct { ComputePipelineDescriptor :: struct {
nextInChain: ^ChainedStruct, nextInChain: /* const */ ^ChainedStruct,
label: StringView, label: StringView,
/* NULLABLE */ layout: PipelineLayout, /* NULLABLE */ layout: PipelineLayout,
compute: ProgrammableStageDescriptor, compute: ProgrammableStageDescriptor,
} }
RenderPassDescriptor :: struct { RenderPassDescriptor :: struct {
nextInChain: ^ChainedStruct, nextInChain: /* const */ ^ChainedStruct,
label: StringView, label: StringView,
colorAttachmentCount: uint, colorAttachmentCount: uint,
colorAttachments: [^]RenderPassColorAttachment `fmt:"v,colorAttachmentCount"`, colorAttachments: /* const */ [^]RenderPassColorAttachment `fmt:"v,colorAttachmentCount"`,
/* NULLABLE */ depthStencilAttachment: /* const */ ^RenderPassDepthStencilAttachment, /* NULLABLE */ depthStencilAttachment: /* const */ ^RenderPassDepthStencilAttachment,
/* NULLABLE */ occlusionQuerySet: QuerySet, /* NULLABLE */ occlusionQuerySet: QuerySet,
/* NULLABLE */ timestampWrites: /* const */ ^RenderPassTimestampWrites, /* NULLABLE */ timestampWrites: /* const */ ^RenderPassTimestampWrites,
} }
VertexState :: struct { VertexState :: struct {
nextInChain: ^ChainedStruct, nextInChain: /* const */ ^ChainedStruct,
module: ShaderModule, module: ShaderModule,
entryPoint: StringView, entryPoint: StringView,
constantCount: uint, constantCount: uint,
constants: [^]ConstantEntry `fmt:"v,constantCount"`, constants: /* const */ [^]ConstantEntry `fmt:"v,constantCount"`,
bufferCount: uint, bufferCount: uint,
buffers: [^]VertexBufferLayout `fmt:"v,bufferCount"`, buffers: /* const */ [^]VertexBufferLayout `fmt:"v,bufferCount"`,
} }
FragmentState :: struct { FragmentState :: struct {
nextInChain: ^ChainedStruct, nextInChain: /* const */ ^ChainedStruct,
module: ShaderModule, module: ShaderModule,
entryPoint: StringView, entryPoint: StringView,
constantCount: uint, constantCount: uint,
constants: [^]ConstantEntry `fmt:"v,constantCount"`, constants: /* const */ [^]ConstantEntry `fmt:"v,constantCount"`,
targetCount: uint, targetCount: uint,
targets: [^]ColorTargetState `fmt:"v,targetCount"`, targets: /* const */ [^]ColorTargetState `fmt:"v,targetCount"`,
} }
RenderPipelineDescriptor :: struct { RenderPipelineDescriptor :: struct {
nextInChain: ^ChainedStruct, nextInChain: /* const */ ^ChainedStruct,
label: StringView, label: StringView,
/* NULLABLE */ layout: PipelineLayout, /* NULLABLE */ layout: PipelineLayout,
vertex: VertexState, vertex: VertexState,
@@ -1453,7 +1453,7 @@ foreign libwgpu {
// Methods of BindGroupLayout // Methods of BindGroupLayout
BindGroupLayoutSetLabel :: proc(bindGroupLayout: BindGroupLayout, label: cstring) --- BindGroupLayoutSetLabel :: proc(bindGroupLayout: BindGroupLayout, label: cstring) ---
BindGroupLayoutReference :: proc(bindGroupLayout: BindGroupLayout) --- BindGroupLayoutAddRef :: proc(bindGroupLayout: BindGroupLayout) ---
BindGroupLayoutRelease :: proc(bindGroupLayout: BindGroupLayout) --- BindGroupLayoutRelease :: proc(bindGroupLayout: BindGroupLayout) ---
// Methods of Buffer // Methods of Buffer
@@ -1465,7 +1465,7 @@ foreign libwgpu {
RawBufferGetMappedRange :: proc(buffer: Buffer, offset: uint, size: uint) -> rawptr --- RawBufferGetMappedRange :: proc(buffer: Buffer, offset: uint, size: uint) -> rawptr ---
BufferGetSize :: proc(buffer: Buffer) -> u64 --- BufferGetSize :: proc(buffer: Buffer) -> u64 ---
BufferGetUsage :: proc(buffer: Buffer) -> BufferUsageFlags --- BufferGetUsage :: proc(buffer: Buffer) -> BufferUsageFlags ---
BufferMapAsync :: proc(buffer: Buffer, mode: MapModeFlags, offset: uint, size: uint, callback: BufferMapCallbackInfo) -> Future --- BufferMapAsync :: proc(buffer: Buffer, mode: MapModeFlags, offset: uint, size: uint, callbackInfo: BufferMapCallbackInfo) -> Future ---
BufferSetLabel :: proc(buffer: Buffer, label: StringView) --- BufferSetLabel :: proc(buffer: Buffer, label: StringView) ---
BufferUnmap :: proc(buffer: Buffer) --- BufferUnmap :: proc(buffer: Buffer) ---
BufferAddRef :: proc(buffer: Buffer) --- BufferAddRef :: proc(buffer: Buffer) ---
@@ -1502,7 +1502,7 @@ foreign libwgpu {
ComputePassEncoderPopDebugGroup :: proc(computePassEncoder: ComputePassEncoder) --- ComputePassEncoderPopDebugGroup :: proc(computePassEncoder: ComputePassEncoder) ---
ComputePassEncoderPushDebugGroup :: proc(computePassEncoder: ComputePassEncoder, groupLabel: StringView) --- ComputePassEncoderPushDebugGroup :: proc(computePassEncoder: ComputePassEncoder, groupLabel: StringView) ---
@(link_name="wgpuComputePassEncoderSetBindGroup") @(link_name="wgpuComputePassEncoderSetBindGroup")
RawComputePassEncoderSetBindGroup :: proc(computePassEncoder: ComputePassEncoder, groupIndex: u32, /* NULLABLE */ group: BindGroup, dynamicOffsetCount: uint, dynamicOffsets: [^]u32) --- RawComputePassEncoderSetBindGroup :: proc(computePassEncoder: ComputePassEncoder, groupIndex: u32, /* NULLABLE */ group: BindGroup, dynamicOffsetCount: uint, dynamicOffsets: /* const */ [^]u32) ---
ComputePassEncoderSetLabel :: proc(computePassEncoder: ComputePassEncoder, label: StringView) --- ComputePassEncoderSetLabel :: proc(computePassEncoder: ComputePassEncoder, label: StringView) ---
ComputePassEncoderSetPipeline :: proc(computePassEncoder: ComputePassEncoder, pipeline: ComputePipeline) --- ComputePassEncoderSetPipeline :: proc(computePassEncoder: ComputePassEncoder, pipeline: ComputePipeline) ---
ComputePassEncoderAddRef :: proc(computePassEncoder: ComputePassEncoder) --- ComputePassEncoderAddRef :: proc(computePassEncoder: ComputePassEncoder) ---
@@ -1573,7 +1573,7 @@ foreign libwgpu {
QueueOnSubmittedWorkDone :: proc(queue: Queue, callbackInfo: QueueWorkDoneCallbackInfo) -> Future --- QueueOnSubmittedWorkDone :: proc(queue: Queue, callbackInfo: QueueWorkDoneCallbackInfo) -> Future ---
QueueSetLabel :: proc(queue: Queue, label: StringView) --- QueueSetLabel :: proc(queue: Queue, label: StringView) ---
@(link_name="wgpuQueueSubmit") @(link_name="wgpuQueueSubmit")
RawQueueSubmit :: proc(queue: Queue, commandCount: uint, commands: [^]CommandBuffer) --- RawQueueSubmit :: proc(queue: Queue, commandCount: uint, commands: /* const */ [^]CommandBuffer) ---
QueueWriteBuffer :: proc(queue: Queue, buffer: Buffer, bufferOffset: u64, data: /* const */ rawptr, size: uint) --- QueueWriteBuffer :: proc(queue: Queue, buffer: Buffer, bufferOffset: u64, data: /* const */ rawptr, size: uint) ---
QueueWriteTexture :: proc(queue: Queue, destination: /* const */ ^TexelCopyTextureInfo, data: /* const */ rawptr, dataSize: uint, dataLayout: /* const */ ^TexelCopyBufferLayout, writeSize: /* const */ ^Extent3D) --- QueueWriteTexture :: proc(queue: Queue, destination: /* const */ ^TexelCopyTextureInfo, data: /* const */ rawptr, dataSize: uint, dataLayout: /* const */ ^TexelCopyBufferLayout, writeSize: /* const */ ^Extent3D) ---
QueueAddRef :: proc(queue: Queue) --- QueueAddRef :: proc(queue: Queue) ---
@@ -1594,7 +1594,7 @@ foreign libwgpu {
RenderBundleEncoderPopDebugGroup :: proc(renderBundleEncoder: RenderBundleEncoder) --- RenderBundleEncoderPopDebugGroup :: proc(renderBundleEncoder: RenderBundleEncoder) ---
RenderBundleEncoderPushDebugGroup :: proc(renderBundleEncoder: RenderBundleEncoder, groupLabel: StringView) --- RenderBundleEncoderPushDebugGroup :: proc(renderBundleEncoder: RenderBundleEncoder, groupLabel: StringView) ---
@(link_name="wgpuRenderBundleEncoderSetBindGroup") @(link_name="wgpuRenderBundleEncoderSetBindGroup")
RawRenderBundleEncoderSetBindGroup :: proc(renderBundleEncoder: RenderBundleEncoder, groupIndex: u32, /* NULLABLE */ group: BindGroup, dynamicOffsetCount: uint, dynamicOffsets: [^]u32) --- RawRenderBundleEncoderSetBindGroup :: proc(renderBundleEncoder: RenderBundleEncoder, groupIndex: u32, /* NULLABLE */ group: BindGroup, dynamicOffsetCount: uint, dynamicOffsets: /* const */ [^]u32) ---
RenderBundleEncoderSetIndexBuffer :: proc(renderBundleEncoder: RenderBundleEncoder, buffer: Buffer, format: IndexFormat, offset: u64, size: u64) --- RenderBundleEncoderSetIndexBuffer :: proc(renderBundleEncoder: RenderBundleEncoder, buffer: Buffer, format: IndexFormat, offset: u64, size: u64) ---
RenderBundleEncoderSetLabel :: proc(renderBundleEncoder: RenderBundleEncoder, label: StringView) --- RenderBundleEncoderSetLabel :: proc(renderBundleEncoder: RenderBundleEncoder, label: StringView) ---
RenderBundleEncoderSetPipeline :: proc(renderBundleEncoder: RenderBundleEncoder, pipeline: RenderPipeline) --- RenderBundleEncoderSetPipeline :: proc(renderBundleEncoder: RenderBundleEncoder, pipeline: RenderPipeline) ---
@@ -1611,12 +1611,12 @@ foreign libwgpu {
RenderPassEncoderEnd :: proc(renderPassEncoder: RenderPassEncoder) --- RenderPassEncoderEnd :: proc(renderPassEncoder: RenderPassEncoder) ---
RenderPassEncoderEndOcclusionQuery :: proc(renderPassEncoder: RenderPassEncoder) --- RenderPassEncoderEndOcclusionQuery :: proc(renderPassEncoder: RenderPassEncoder) ---
@(link_name="wgpuRenderPassEncoderExecuteBundles") @(link_name="wgpuRenderPassEncoderExecuteBundles")
RawRenderPassEncoderExecuteBundles :: proc(renderPassEncoder: RenderPassEncoder, bundleCount: uint, bundles: [^]RenderBundle) --- RawRenderPassEncoderExecuteBundles :: proc(renderPassEncoder: RenderPassEncoder, bundleCount: uint, bundles: /* const */ [^]RenderBundle) ---
RenderPassEncoderInsertDebugMarker :: proc(renderPassEncoder: RenderPassEncoder, markerLabel: StringView) --- RenderPassEncoderInsertDebugMarker :: proc(renderPassEncoder: RenderPassEncoder, markerLabel: StringView) ---
RenderPassEncoderPopDebugGroup :: proc(renderPassEncoder: RenderPassEncoder) --- RenderPassEncoderPopDebugGroup :: proc(renderPassEncoder: RenderPassEncoder) ---
RenderPassEncoderPushDebugGroup :: proc(renderPassEncoder: RenderPassEncoder, groupLabel: StringView) --- RenderPassEncoderPushDebugGroup :: proc(renderPassEncoder: RenderPassEncoder, groupLabel: StringView) ---
@(link_name="wgpuRenderPassEncoderSetBindGroup") @(link_name="wgpuRenderPassEncoderSetBindGroup")
RawRenderPassEncoderSetBindGroup :: proc(renderPassEncoder: RenderPassEncoder, groupIndex: u32, /* NULLABLE */ group: BindGroup, dynamicOffsetCount: uint, dynamicOffsets: [^]u32) --- RawRenderPassEncoderSetBindGroup :: proc(renderPassEncoder: RenderPassEncoder, groupIndex: u32, /* NULLABLE */ group: BindGroup, dynamicOffsetCount: uint, dynamicOffsets: /* const */ [^]u32) ---
RenderPassEncoderSetBlendConstant :: proc(renderPassEncoder: RenderPassEncoder, color: /* const */ ^Color) --- RenderPassEncoderSetBlendConstant :: proc(renderPassEncoder: RenderPassEncoder, color: /* const */ ^Color) ---
RenderPassEncoderSetIndexBuffer :: proc(renderPassEncoder: RenderPassEncoder, buffer: Buffer, format: IndexFormat, offset: u64, size: u64) --- RenderPassEncoderSetIndexBuffer :: proc(renderPassEncoder: RenderPassEncoder, buffer: Buffer, format: IndexFormat, offset: u64, size: u64) ---
RenderPassEncoderSetLabel :: proc(renderPassEncoder: RenderPassEncoder, label: StringView) --- RenderPassEncoderSetLabel :: proc(renderPassEncoder: RenderPassEncoder, label: StringView) ---
@@ -1853,8 +1853,8 @@ RenderPassEncoderSetBindGroup :: proc "c" (renderPassEncoder: RenderPassEncoder,
// Wrappers of Surface // Wrappers of Surface
SurfaceGetCapabilities :: proc "c" (surface: Surface, adapter: Adapter) -> (capabilities: SurfaceCapabilities) { SurfaceGetCapabilities :: proc "c" (surface: Surface, adapter: Adapter) -> (capabilities: SurfaceCapabilities, status: Status) {
RawSurfaceGetCapabilities(surface, adapter, &capabilities) status = RawSurfaceGetCapabilities(surface, adapter, &capabilities)
return return
} }
+4 -4
View File
@@ -72,7 +72,7 @@ DeviceExtras :: struct {
} }
NativeLimits :: struct { NativeLimits :: struct {
chain: ChainedStructOut, using chain: ChainedStructOut,
maxPushConstantSize: u32, maxPushConstantSize: u32,
maxNonSamplerBindings: u32, maxNonSamplerBindings: u32,
} }
@@ -101,13 +101,13 @@ ShaderModuleGLSLDescriptor :: struct {
stage: ShaderStage, stage: ShaderStage,
code: StringView, code: StringView,
defineCount: uint, defineCount: uint,
defines: [^]ShaderDefine `fmt:"v,defineCount"`, defines: /* const */ [^]ShaderDefine `fmt:"v,defineCount"`,
} }
ShaderModuleDescriptorSpirV :: struct { ShaderModuleDescriptorSpirV :: struct {
label: StringView, label: StringView,
sourceSize: u32, sourceSize: u32,
source: [^]u32 `fmt:"v,sourceSize"`, source: /* const */ [^]u32 `fmt:"v,sourceSize"`,
} }
RegistryReport :: struct { RegistryReport :: struct {
@@ -170,7 +170,7 @@ QuerySetDescriptorExtras :: struct {
SurfaceConfigurationExtras :: struct { SurfaceConfigurationExtras :: struct {
using chain: ChainedStruct, using chain: ChainedStruct,
desiredMaximumFrameLatency: i32, desiredMaximumFrameLatency: u32,
} }
LogCallback :: #type proc "c" (level: LogLevel, message: StringView, userdata: rawptr) LogCallback :: #type proc "c" (level: LogLevel, message: StringView, userdata: rawptr)