Update WebGPU to the latest changes (#13941)
* WebGPU: Update to latest PSA * WebGPU: Fix BindGroupEntry binding offset * WebGPU: Remove CompilationInfo * WebGPU: Update reference_struct_info.json * switch to .view * Remove everything deprecated (and some dawn stuff) * Remove more deprecated render pipeline stuff * missed somehow * Rename SetBlendColor -> SetBlendConstant * WebGPU: Remove SetBlendColor Co-authored-by: Kai Ninomiya <kainino@chromium.org>
This commit is contained in:
Родитель
fcb9ca1150
Коммит
ea3927560a
|
@ -89,7 +89,11 @@
|
|||
None: 0,
|
||||
Read: 1,
|
||||
Write: 2
|
||||
}
|
||||
},
|
||||
QueueWorkDoneStatus: {
|
||||
Success: 0,
|
||||
Error: 1,
|
||||
},
|
||||
};
|
||||
return null;
|
||||
})(); }}}
|
||||
|
@ -141,7 +145,6 @@ var LibraryWebGPU = {
|
|||
|
||||
this["mgrDevice"] = this["mgrDevice"] || makeManager();
|
||||
{{{ gpu.makeInitManager('Queue') }}}
|
||||
{{{ gpu.makeInitManager('Fence') }}}
|
||||
|
||||
{{{ gpu.makeInitManager('CommandBuffer') }}}
|
||||
{{{ gpu.makeInitManager('CommandEncoder') }}}
|
||||
|
@ -178,7 +181,7 @@ var LibraryWebGPU = {
|
|||
return {
|
||||
"width": {{{ gpu.makeGetU32('ptr', C_STRUCTS.WGPUExtent3D.width) }}},
|
||||
"height": {{{ gpu.makeGetU32('ptr', C_STRUCTS.WGPUExtent3D.height) }}},
|
||||
"depth": {{{ gpu.makeGetU32('ptr', C_STRUCTS.WGPUExtent3D.depth) }}},
|
||||
"depthOrArrayLayers": {{{ gpu.makeGetU32('ptr', C_STRUCTS.WGPUExtent3D.depthOrArrayLayers) }}},
|
||||
};
|
||||
},
|
||||
|
||||
|
@ -230,8 +233,8 @@ var LibraryWebGPU = {
|
|||
};
|
||||
},
|
||||
|
||||
// maps deviceId to the queueId of the device's defaultQueue
|
||||
defaultQueues: {
|
||||
// maps deviceId to the queueId of the device's queue
|
||||
deviceQueues: {
|
||||
0: 0
|
||||
},
|
||||
|
||||
|
@ -242,32 +245,20 @@ var LibraryWebGPU = {
|
|||
'mirror-repeat',
|
||||
'clamp-to-edge',
|
||||
],
|
||||
BindingType: [
|
||||
undefined,
|
||||
'uniform-buffer',
|
||||
'storage-buffer',
|
||||
'readonly-storage-buffer',
|
||||
'sampler',
|
||||
'comparison-sampler',
|
||||
'sampled-texture',
|
||||
'multisampled-texture',
|
||||
'readonly-storage-texture',
|
||||
'writeonly-storage-texture',
|
||||
],
|
||||
BlendFactor: [
|
||||
'zero',
|
||||
'one',
|
||||
'src-color',
|
||||
'one-minus-src-color',
|
||||
'src',
|
||||
'one-minus-src',
|
||||
'src-alpha',
|
||||
'one-minus-src-alpha',
|
||||
'dst-color',
|
||||
'one-minus-dst-color',
|
||||
'dst',
|
||||
'one-minus-dst',
|
||||
'dst-alpha',
|
||||
'one-minus-dst-alpha',
|
||||
'src-alpha-saturated',
|
||||
'blend-color',
|
||||
'one-minus-blend-color',
|
||||
'constant',
|
||||
'one-minus-constant',
|
||||
],
|
||||
BlendOperation: [
|
||||
'add',
|
||||
|
@ -288,7 +279,7 @@ var LibraryWebGPU = {
|
|||
'unknown',
|
||||
'device-lost',
|
||||
'destroyed-before-callback',
|
||||
'unmapped-before-callback'
|
||||
'unmapped-before-callback',
|
||||
],
|
||||
CompareFunction: [
|
||||
undefined,
|
||||
|
@ -318,12 +309,6 @@ var LibraryWebGPU = {
|
|||
'unknown',
|
||||
'device-lost',
|
||||
],
|
||||
FenceCompletionStatus: [
|
||||
'success',
|
||||
'error',
|
||||
'unknown',
|
||||
'device-lost',
|
||||
],
|
||||
FilterMode: [
|
||||
'nearest',
|
||||
'linear',
|
||||
|
@ -364,6 +349,12 @@ var LibraryWebGPU = {
|
|||
'pipeline-statistics',
|
||||
'timestamp',
|
||||
],
|
||||
SamplerBindingType: [
|
||||
undefined,
|
||||
'filtering',
|
||||
'non-filtering',
|
||||
'comparison',
|
||||
],
|
||||
StencilOperation: [
|
||||
'keep',
|
||||
'zero',
|
||||
|
@ -374,6 +365,11 @@ var LibraryWebGPU = {
|
|||
'increment-wrap',
|
||||
'decrement-wrap',
|
||||
],
|
||||
StorageTextureAccess: [
|
||||
undefined,
|
||||
'readonly',
|
||||
'writeonly',
|
||||
],
|
||||
StoreOp: [
|
||||
'store',
|
||||
'clear',
|
||||
|
@ -383,12 +379,6 @@ var LibraryWebGPU = {
|
|||
'stencil-only',
|
||||
'depth-only',
|
||||
],
|
||||
TextureComponentType: [
|
||||
'float',
|
||||
'sint',
|
||||
'uint',
|
||||
'depth-comparison',
|
||||
],
|
||||
TextureDimension: [
|
||||
'1d',
|
||||
'2d',
|
||||
|
@ -434,21 +424,22 @@ var LibraryWebGPU = {
|
|||
'rgba32sint',
|
||||
'depth32float',
|
||||
'depth24plus',
|
||||
'stencil8',
|
||||
'depth24plus-stencil8',
|
||||
'bc1-rgba-unorm',
|
||||
'bc1-rgba-unorm-srgb',
|
||||
'bc2-rgba-unorm',
|
||||
'bc2-rgba-unorm-srgb',
|
||||
'bc3-rgba-unorm',
|
||||
'bc3-rgba-unorm-srgb',
|
||||
'bc4-r-unorm',
|
||||
'bc4-r-snorm',
|
||||
'bc5-rg-unorm',
|
||||
'bc5-rg-snorm',
|
||||
'bc1rgba-unorm',
|
||||
'bc1rgba-unorm-srgb',
|
||||
'bc2rgba-unorm',
|
||||
'bc2rgba-unorm-srgb',
|
||||
'bc3rgba-unorm',
|
||||
'bc3rgba-unorm-srgb',
|
||||
'bc4r-unorm',
|
||||
'bc4r-snorm',
|
||||
'bc5rg-unorm',
|
||||
'bc5rg-snorm',
|
||||
'bc6h-rgb-ufloat',
|
||||
'bc6h-rgb-float',
|
||||
'bc7-rgba-unorm',
|
||||
'bc7-rgba-unorm-srgb',
|
||||
'bc7rgba-unorm',
|
||||
'bc7rgba-unorm-srgb',
|
||||
],
|
||||
TextureSampleType: [
|
||||
undefined,
|
||||
|
@ -467,48 +458,38 @@ var LibraryWebGPU = {
|
|||
'cube-array',
|
||||
'3d',
|
||||
],
|
||||
SamplerBindingType: [
|
||||
undefined,
|
||||
'filtering',
|
||||
'non-filtering',
|
||||
'comparison',
|
||||
],
|
||||
StorageTextureAccess: [
|
||||
undefined,
|
||||
'read-only',
|
||||
'write-only',
|
||||
],
|
||||
VertexFormat: [
|
||||
'uchar2',
|
||||
'uchar4',
|
||||
'char2',
|
||||
'char4',
|
||||
'uchar2norm',
|
||||
'uchar4norm',
|
||||
'char2norm',
|
||||
'char4norm',
|
||||
'ushort2',
|
||||
'ushort4',
|
||||
'short2',
|
||||
'short4',
|
||||
'ushort2norm',
|
||||
'ushort4norm',
|
||||
'short2norm',
|
||||
'short4norm',
|
||||
'half2',
|
||||
'half4',
|
||||
'float',
|
||||
'float2',
|
||||
'float3',
|
||||
'float4',
|
||||
'uint',
|
||||
'uint2',
|
||||
'uint3',
|
||||
'uint4',
|
||||
'int',
|
||||
'int2',
|
||||
'int3',
|
||||
'int4',
|
||||
undefined,
|
||||
'uint8x2',
|
||||
'uint8x4',
|
||||
'sint8x2',
|
||||
'sint8x4',
|
||||
'unorm8x2',
|
||||
'unorm8x4',
|
||||
'snorm8x2',
|
||||
'snorm8x4',
|
||||
'uint16x2',
|
||||
'uint16x4',
|
||||
'sint16x2',
|
||||
'sint16x4',
|
||||
'unorm16x2',
|
||||
'unorm16x4',
|
||||
'snorm16x2',
|
||||
'snorm16x4',
|
||||
'float16x2',
|
||||
'float16x4',
|
||||
'float32',
|
||||
'float32x2',
|
||||
'float32x3',
|
||||
'float32x4',
|
||||
'uint32',
|
||||
'uint32x2',
|
||||
'uint32x3',
|
||||
'uint32x4',
|
||||
'sint32',
|
||||
'sint32x2',
|
||||
'sint32x3',
|
||||
'sint32x4',
|
||||
],
|
||||
},
|
||||
|
||||
|
@ -519,7 +500,6 @@ var LibraryWebGPU = {
|
|||
|
||||
{{{ gpu.makeReferenceRelease('Device') }}}
|
||||
{{{ gpu.makeReferenceRelease('Queue') }}}
|
||||
{{{ gpu.makeReferenceRelease('Fence') }}}
|
||||
|
||||
{{{ gpu.makeReferenceRelease('CommandBuffer') }}}
|
||||
{{{ gpu.makeReferenceRelease('CommandEncoder') }}}
|
||||
|
@ -550,15 +530,15 @@ var LibraryWebGPU = {
|
|||
|
||||
// wgpuDevice
|
||||
|
||||
wgpuDeviceGetDefaultQueue: function(deviceId) {
|
||||
var queueId = WebGPU.defaultQueues[deviceId];
|
||||
wgpuDeviceGetQueue: function(deviceId) {
|
||||
var queueId = WebGPU.deviceQueues[deviceId];
|
||||
#if ASSERTIONS
|
||||
assert(queueId != 0, 'got invalid queue');
|
||||
#endif
|
||||
if (queueId === undefined) {
|
||||
var device = WebGPU["mgrDevice"].get(deviceId);
|
||||
WebGPU.defaultQueues[deviceId] = WebGPU.mgrQueue.create(device["defaultQueue"]);
|
||||
queueId = WebGPU.defaultQueues[deviceId];
|
||||
WebGPU.deviceQueues[deviceId] = WebGPU.mgrQueue.create(device["queue"]);
|
||||
queueId = WebGPU.deviceQueues[deviceId];
|
||||
} else {
|
||||
WebGPU.mgrQueue.reference(queueId);
|
||||
}
|
||||
|
@ -718,36 +698,9 @@ var LibraryWebGPU = {
|
|||
};
|
||||
}
|
||||
|
||||
function makeDeprecatedEntry(entryPtr) {
|
||||
return {
|
||||
"binding":
|
||||
{{{ gpu.makeGetU32('entryPtr', C_STRUCTS.WGPUBindGroupLayoutEntry.binding) }}},
|
||||
"visibility":
|
||||
{{{ gpu.makeGetU32('entryPtr', C_STRUCTS.WGPUBindGroupLayoutEntry.visibility) }}},
|
||||
"type": WebGPU.BindingType[
|
||||
{{{ gpu.makeGetU32('entryPtr', C_STRUCTS.WGPUBindGroupLayoutEntry.type) }}}],
|
||||
"viewDimension": WebGPU.TextureViewDimension[
|
||||
{{{ gpu.makeGetU32('entryPtr', C_STRUCTS.WGPUBindGroupLayoutEntry.viewDimension) }}}],
|
||||
"textureComponentType": WebGPU.TextureComponentType[
|
||||
{{{ gpu.makeGetU32('entryPtr', C_STRUCTS.WGPUBindGroupLayoutEntry.textureComponentType) }}}],
|
||||
"storageTextureFormat": WebGPU.TextureFormat[
|
||||
{{{ gpu.makeGetU32('entryPtr', C_STRUCTS.WGPUBindGroupLayoutEntry.storageTextureFormat) }}}],
|
||||
"hasDynamicOffset":
|
||||
{{{ gpu.makeGetBool('entryPtr', C_STRUCTS.WGPUBindGroupLayoutEntry.hasDynamicOffset) }}},
|
||||
"minBufferBindingSize":
|
||||
{{{ gpu.makeGetU64('entryPtr', C_STRUCTS.WGPUBindGroupLayoutEntry.minBufferBindingSize) }}},
|
||||
};
|
||||
}
|
||||
|
||||
function makeEntry(entryPtr) {
|
||||
{{{ gpu.makeCheck('entryPtr') }}}
|
||||
|
||||
var typeInt =
|
||||
{{{ gpu.makeGetU32('entryPtr', C_STRUCTS.WGPUBindGroupLayoutEntry.type) }}};
|
||||
|
||||
if (typeInt !== 0)
|
||||
return makeDeprecatedEntry(entryPtr);
|
||||
|
||||
return {
|
||||
"binding":
|
||||
{{{ gpu.makeGetU32('entryPtr', C_STRUCTS.WGPUBindGroupLayoutEntry.binding) }}},
|
||||
|
@ -795,7 +748,7 @@ var LibraryWebGPU = {
|
|||
assert((bufferId != 0) + (samplerId != 0) + (textureViewId != 0) == 1);
|
||||
#endif
|
||||
|
||||
var binding = {{{ gpu.makeGetU32('entryPtr', C_STRUCTS.WGPUBindGroupLayoutEntry.binding) }}};
|
||||
var binding = {{{ gpu.makeGetU32('entryPtr', C_STRUCTS.WGPUBindGroupEntry.binding) }}};
|
||||
|
||||
if (bufferId != 0) {
|
||||
var size = undefined;
|
||||
|
@ -917,29 +870,42 @@ var LibraryWebGPU = {
|
|||
return WebGPU.mgrComputePipeline.create(device["createComputePipeline"](desc));
|
||||
},
|
||||
|
||||
wgpuDeviceCreateRenderPipeline: function(deviceId, descriptor) {
|
||||
wgpuDeviceCreateRenderPipeline2: function(deviceId, descriptor) {
|
||||
{{{ gpu.makeCheckDescriptor('descriptor') }}}
|
||||
|
||||
function makeRasterizationState(rsPtr) {
|
||||
function makePrimitiveState(rsPtr) {
|
||||
if (rsPtr === 0) return undefined;
|
||||
{{{ gpu.makeCheckDescriptor('rsPtr') }}}
|
||||
return {
|
||||
"topology": WebGPU.PrimitiveTopology[
|
||||
{{{ gpu.makeGetU32('rsPtr', C_STRUCTS.WGPUPrimitiveState.topology) }}}],
|
||||
"stripIndexFormat": WebGPU.IndexFormat[
|
||||
{{{ gpu.makeGetU32('rsPtr', C_STRUCTS.WGPUPrimitiveState.stripIndexFormat) }}}],
|
||||
"frontFace": WebGPU.FrontFace[
|
||||
{{{ gpu.makeGetU32('rsPtr', C_STRUCTS.WGPURasterizationStateDescriptor.frontFace) }}}],
|
||||
{{{ gpu.makeGetU32('rsPtr', C_STRUCTS.WGPUPrimitiveState.frontFace) }}}],
|
||||
"cullMode": WebGPU.CullMode[
|
||||
{{{ gpu.makeGetU32('rsPtr', C_STRUCTS.WGPURasterizationStateDescriptor.cullMode) }}}],
|
||||
{{{ gpu.makeGetU32('rsPtr', C_STRUCTS.WGPUPrimitiveState.cullMode) }}}],
|
||||
};
|
||||
}
|
||||
|
||||
function makeBlendDescriptor(bdPtr) {
|
||||
function makeBlendComponent(bdPtr) {
|
||||
if (bdPtr === 0) return undefined;
|
||||
return {
|
||||
"operation": WebGPU.BlendOperation[
|
||||
{{{ gpu.makeGetU32('bdPtr', C_STRUCTS.WGPUBlendDescriptor.operation) }}}],
|
||||
{{{ gpu.makeGetU32('bdPtr', C_STRUCTS.WGPUBlendComponent.operation) }}}],
|
||||
"srcFactor": WebGPU.BlendFactor[
|
||||
{{{ gpu.makeGetU32('bdPtr', C_STRUCTS.WGPUBlendDescriptor.srcFactor) }}}],
|
||||
{{{ gpu.makeGetU32('bdPtr', C_STRUCTS.WGPUBlendComponent.srcFactor) }}}],
|
||||
"dstFactor": WebGPU.BlendFactor[
|
||||
{{{ gpu.makeGetU32('bdPtr', C_STRUCTS.WGPUBlendDescriptor.dstFactor) }}}],
|
||||
{{{ gpu.makeGetU32('bdPtr', C_STRUCTS.WGPUBlendComponent.dstFactor) }}}],
|
||||
};
|
||||
}
|
||||
|
||||
function makeBlendState(bsPtr) {
|
||||
if (bsPtr === 0) return undefined;
|
||||
{{{ gpu.makeCheckDescriptor('bsPtr') }}}
|
||||
return {
|
||||
"alpha": makeBlendComponent(bsPtr + {{{ C_STRUCTS.WGPUBlendState.alpha }}}),
|
||||
"color": makeBlendComponent(bsPtr + {{{ C_STRUCTS.WGPUBlendState.color }}}),
|
||||
};
|
||||
}
|
||||
|
||||
|
@ -947,19 +913,18 @@ var LibraryWebGPU = {
|
|||
{{{ gpu.makeCheckDescriptor('csPtr') }}}
|
||||
return {
|
||||
"format": WebGPU.TextureFormat[
|
||||
{{{ gpu.makeGetU32('csPtr', C_STRUCTS.WGPUColorStateDescriptor.format) }}}],
|
||||
"alphaBlend": makeBlendDescriptor(csPtr + {{{ C_STRUCTS.WGPUColorStateDescriptor.alphaBlend }}}),
|
||||
"colorBlend": makeBlendDescriptor(csPtr + {{{ C_STRUCTS.WGPUColorStateDescriptor.colorBlend }}}),
|
||||
"writeMask": {{{ gpu.makeGetU32('csPtr', C_STRUCTS.WGPUColorStateDescriptor.writeMask) }}},
|
||||
{{{ gpu.makeGetU32('csPtr', C_STRUCTS.WGPUColorTargetState.format) }}}],
|
||||
"blend": makeBlendState({{{ makeGetValue('csPtr', C_STRUCTS.WGPUColorTargetState.blend, '*') }}}),
|
||||
"writeMask": {{{ gpu.makeGetU32('csPtr', C_STRUCTS.WGPUColorTargetState.writeMask) }}},
|
||||
};
|
||||
}
|
||||
|
||||
function makeColorStates(count, csPtr) {
|
||||
function makeColorStates(count, csArrayPtr) {
|
||||
if (count === 0) return undefined;
|
||||
|
||||
var states = [];
|
||||
for (var i = 0; i < count; ++i) {
|
||||
states.push(makeColorState(csPtr + {{{ C_STRUCTS.WGPUColorStateDescriptor.__size__ }}} * i));
|
||||
states.push(makeColorState(csArrayPtr + {{{ C_STRUCTS.WGPUColorTargetState.__size__ }}} * i));
|
||||
}
|
||||
return states;
|
||||
}
|
||||
|
@ -968,13 +933,13 @@ var LibraryWebGPU = {
|
|||
{{{ gpu.makeCheck('ssfPtr') }}}
|
||||
return {
|
||||
"compare": WebGPU.CompareFunction[
|
||||
{{{ gpu.makeGetU32('ssfPtr', C_STRUCTS.WGPUStencilStateFaceDescriptor.compare) }}}],
|
||||
{{{ gpu.makeGetU32('ssfPtr', C_STRUCTS.WGPUStencilFaceState.compare) }}}],
|
||||
"failOp": WebGPU.StencilOperation[
|
||||
{{{ gpu.makeGetU32('ssfPtr', C_STRUCTS.WGPUStencilStateFaceDescriptor.failOp) }}}],
|
||||
{{{ gpu.makeGetU32('ssfPtr', C_STRUCTS.WGPUStencilFaceState.failOp) }}}],
|
||||
"depthFailOp": WebGPU.StencilOperation[
|
||||
{{{ gpu.makeGetU32('ssfPtr', C_STRUCTS.WGPUStencilStateFaceDescriptor.depthFailOp) }}}],
|
||||
{{{ gpu.makeGetU32('ssfPtr', C_STRUCTS.WGPUStencilFaceState.depthFailOp) }}}],
|
||||
"passOp": WebGPU.StencilOperation[
|
||||
{{{ gpu.makeGetU32('ssfPtr', C_STRUCTS.WGPUStencilStateFaceDescriptor.passOp) }}}],
|
||||
{{{ gpu.makeGetU32('ssfPtr', C_STRUCTS.WGPUStencilFaceState.passOp) }}}],
|
||||
};
|
||||
}
|
||||
|
||||
|
@ -984,14 +949,14 @@ var LibraryWebGPU = {
|
|||
{{{ gpu.makeCheck('dssPtr') }}}
|
||||
return {
|
||||
"format": WebGPU.TextureFormat[
|
||||
{{{ gpu.makeGetU32('dssPtr', C_STRUCTS.WGPUDepthStencilStateDescriptor.format) }}}],
|
||||
"depthWriteEnabled": {{{ gpu.makeGetBool('dssPtr', C_STRUCTS.WGPUDepthStencilStateDescriptor.depthWriteEnabled) }}},
|
||||
{{{ gpu.makeGetU32('dssPtr', C_STRUCTS.WGPUDepthStencilState.format) }}}],
|
||||
"depthWriteEnabled": {{{ gpu.makeGetBool('dssPtr', C_STRUCTS.WGPUDepthStencilState.depthWriteEnabled) }}},
|
||||
"depthCompare": WebGPU.CompareFunction[
|
||||
{{{ gpu.makeGetU32('dssPtr', C_STRUCTS.WGPUDepthStencilStateDescriptor.depthCompare) }}}],
|
||||
"stencilFront": makeStencilStateFace(dssPtr + {{{ C_STRUCTS.WGPUDepthStencilStateDescriptor.stencilFront }}}),
|
||||
"stencilBack": makeStencilStateFace(dssPtr + {{{ C_STRUCTS.WGPUDepthStencilStateDescriptor.stencilBack }}}),
|
||||
"stencilReadMask": {{{ gpu.makeGetU32('dssPtr', C_STRUCTS.WGPUDepthStencilStateDescriptor.stencilReadMask) }}},
|
||||
"stencilWriteMask": {{{ gpu.makeGetU32('dssPtr', C_STRUCTS.WGPUDepthStencilStateDescriptor.stencilWriteMask) }}},
|
||||
{{{ gpu.makeGetU32('dssPtr', C_STRUCTS.WGPUDepthStencilState.depthCompare) }}}],
|
||||
"stencilFront": makeStencilStateFace(dssPtr + {{{ C_STRUCTS.WGPUDepthStencilState.stencilFront }}}),
|
||||
"stencilBack": makeStencilStateFace(dssPtr + {{{ C_STRUCTS.WGPUDepthStencilState.stencilBack }}}),
|
||||
"stencilReadMask": {{{ gpu.makeGetU32('dssPtr', C_STRUCTS.WGPUDepthStencilState.stencilReadMask) }}},
|
||||
"stencilWriteMask": {{{ gpu.makeGetU32('dssPtr', C_STRUCTS.WGPUDepthStencilState.stencilWriteMask) }}},
|
||||
};
|
||||
}
|
||||
|
||||
|
@ -999,16 +964,16 @@ var LibraryWebGPU = {
|
|||
{{{ gpu.makeCheck('vaPtr') }}}
|
||||
return {
|
||||
"format": WebGPU.VertexFormat[
|
||||
{{{ gpu.makeGetU32('vaPtr', C_STRUCTS.WGPUVertexAttributeDescriptor.format) }}}],
|
||||
"offset": {{{ gpu.makeGetU64('vaPtr', C_STRUCTS.WGPUVertexAttributeDescriptor.offset) }}},
|
||||
"shaderLocation": {{{ gpu.makeGetU32('vaPtr', C_STRUCTS.WGPUVertexAttributeDescriptor.shaderLocation) }}},
|
||||
{{{ gpu.makeGetU32('vaPtr', C_STRUCTS.WGPUVertexAttribute.format) }}}],
|
||||
"offset": {{{ gpu.makeGetU64('vaPtr', C_STRUCTS.WGPUVertexAttribute.offset) }}},
|
||||
"shaderLocation": {{{ gpu.makeGetU32('vaPtr', C_STRUCTS.WGPUVertexAttribute.shaderLocation) }}},
|
||||
};
|
||||
}
|
||||
|
||||
function makeVertexAttributes(count, vaArrayPtr) {
|
||||
var vas = [];
|
||||
for (var i = 0; i < count; ++i) {
|
||||
vas.push(makeVertexAttribute(vaArrayPtr + i * {{{ C_STRUCTS.WGPUVertexAttributeDescriptor.__size__ }}}));
|
||||
vas.push(makeVertexAttribute(vaArrayPtr + i * {{{ C_STRUCTS.WGPUVertexAttribute.__size__ }}}));
|
||||
}
|
||||
return vas;
|
||||
}
|
||||
|
@ -1017,12 +982,12 @@ var LibraryWebGPU = {
|
|||
if (vbPtr === 0) return undefined;
|
||||
|
||||
return {
|
||||
"arrayStride": {{{ gpu.makeGetU64('vbPtr', C_STRUCTS.WGPUVertexBufferLayoutDescriptor.arrayStride) }}},
|
||||
"arrayStride": {{{ gpu.makeGetU64('vbPtr', C_STRUCTS.WGPUVertexBufferLayout.arrayStride) }}},
|
||||
"stepMode": WebGPU.InputStepMode[
|
||||
{{{ gpu.makeGetU32('vbPtr', C_STRUCTS.WGPUVertexBufferLayoutDescriptor.stepMode) }}}],
|
||||
{{{ gpu.makeGetU32('vbPtr', C_STRUCTS.WGPUVertexBufferLayout.stepMode) }}}],
|
||||
"attributes": makeVertexAttributes(
|
||||
{{{ gpu.makeGetU32('vbPtr', C_STRUCTS.WGPUVertexBufferLayoutDescriptor.attributeCount) }}},
|
||||
{{{ makeGetValue('vbPtr', C_STRUCTS.WGPUVertexBufferLayoutDescriptor.attributes, '*') }}}),
|
||||
{{{ gpu.makeGetU32('vbPtr', C_STRUCTS.WGPUVertexBufferLayout.attributeCount) }}},
|
||||
{{{ makeGetValue('vbPtr', C_STRUCTS.WGPUVertexBufferLayout.attributes, '*') }}}),
|
||||
};
|
||||
}
|
||||
|
||||
|
@ -1031,7 +996,7 @@ var LibraryWebGPU = {
|
|||
|
||||
var vbs = [];
|
||||
for (var i = 0; i < count; ++i) {
|
||||
vbs.push(makeVertexBuffer(vbArrayPtr + i * {{{ C_STRUCTS.WGPUVertexBufferLayoutDescriptor.__size__ }}}));
|
||||
vbs.push(makeVertexBuffer(vbArrayPtr + i * {{{ C_STRUCTS.WGPUVertexBufferLayout.__size__ }}}));
|
||||
}
|
||||
return vbs;
|
||||
}
|
||||
|
@ -1040,38 +1005,56 @@ var LibraryWebGPU = {
|
|||
if (viPtr === 0) return undefined;
|
||||
{{{ gpu.makeCheckDescriptor('viPtr') }}}
|
||||
return {
|
||||
"indexFormat": WebGPU.IndexFormat[
|
||||
{{{ gpu.makeGetU32('viPtr', C_STRUCTS.WGPUVertexStateDescriptor.indexFormat) }}}],
|
||||
"vertexBuffers": makeVertexBuffers(
|
||||
{{{ gpu.makeGetU32('viPtr', C_STRUCTS.WGPUVertexStateDescriptor.vertexBufferCount) }}},
|
||||
{{{ makeGetValue('viPtr', C_STRUCTS.WGPUVertexStateDescriptor.vertexBuffers, '*') }}}),
|
||||
"module": WebGPU.mgrShaderModule.get(
|
||||
{{{ makeGetValue('viPtr', C_STRUCTS.WGPUVertexState.module, '*') }}}),
|
||||
"entryPoint": UTF8ToString(
|
||||
{{{ makeGetValue('viPtr', C_STRUCTS.WGPUVertexState.entryPoint, '*') }}}),
|
||||
"buffers": makeVertexBuffers(
|
||||
{{{ gpu.makeGetU32('viPtr', C_STRUCTS.WGPUVertexState.bufferCount) }}},
|
||||
{{{ makeGetValue('viPtr', C_STRUCTS.WGPUVertexState.buffers, '*') }}}),
|
||||
};
|
||||
}
|
||||
|
||||
function makeMultisampleState(msPtr) {
|
||||
if (msPtr === 0) return undefined;
|
||||
{{{ gpu.makeCheckDescriptor('msPtr') }}}
|
||||
return {
|
||||
"count": {{{ gpu.makeGetU32('msPtr', C_STRUCTS.WGPUMultisampleState.count) }}},
|
||||
"mask": {{{ gpu.makeGetU32('msPtr', C_STRUCTS.WGPUMultisampleState.mask) }}},
|
||||
"alphaToCoverageEnabled": {{{ gpu.makeGetBool('msPtr', C_STRUCTS.WGPUMultisampleState.alphaToCoverageEnabled) }}},
|
||||
};
|
||||
}
|
||||
|
||||
function makeFragmentState(fsPtr) {
|
||||
if (fsPtr === 0) return undefined;
|
||||
{{{ gpu.makeCheckDescriptor('fsPtr') }}}
|
||||
return {
|
||||
"module": WebGPU.mgrShaderModule.get(
|
||||
{{{ makeGetValue('fsPtr', C_STRUCTS.WGPUFragmentState.module, '*') }}}),
|
||||
"entryPoint": UTF8ToString(
|
||||
{{{ makeGetValue('fsPtr', C_STRUCTS.WGPUFragmentState.entryPoint, '*') }}}),
|
||||
"targets": makeColorStates(
|
||||
{{{ gpu.makeGetU32('fsPtr', C_STRUCTS.WGPUFragmentState.targetCount) }}},
|
||||
{{{ makeGetValue('fsPtr', C_STRUCTS.WGPUFragmentState.targets, '*') }}}),
|
||||
};
|
||||
}
|
||||
|
||||
var desc = {
|
||||
"label": undefined,
|
||||
"layout": WebGPU.mgrPipelineLayout.get(
|
||||
{{{ makeGetValue('descriptor', C_STRUCTS.WGPURenderPipelineDescriptor.layout, '*') }}}),
|
||||
"vertexStage": WebGPU.makeProgrammableStageDescriptor(
|
||||
descriptor + {{{ C_STRUCTS.WGPURenderPipelineDescriptor.vertexStage }}}),
|
||||
"fragmentStage": WebGPU.makeProgrammableStageDescriptor(
|
||||
{{{ makeGetValue('descriptor', C_STRUCTS.WGPURenderPipelineDescriptor.fragmentStage, '*') }}}),
|
||||
"primitiveTopology": WebGPU.PrimitiveTopology[
|
||||
{{{ gpu.makeGetU32('descriptor', C_STRUCTS.WGPURenderPipelineDescriptor.primitiveTopology) }}}],
|
||||
"rasterizationState": makeRasterizationState(
|
||||
{{{ makeGetValue('descriptor', C_STRUCTS.WGPURenderPipelineDescriptor.rasterizationState, '*') }}}),
|
||||
"colorStates": makeColorStates(
|
||||
{{{ gpu.makeGetU32('descriptor', C_STRUCTS.WGPURenderPipelineDescriptor.colorStateCount) }}},
|
||||
{{{ makeGetValue('descriptor', C_STRUCTS.WGPURenderPipelineDescriptor.colorStates, '*') }}}),
|
||||
"depthStencilState": makeDepthStencilState(
|
||||
{{{ makeGetValue('descriptor', C_STRUCTS.WGPURenderPipelineDescriptor.depthStencilState, '*') }}}),
|
||||
"vertexState": makeVertexState(
|
||||
{{{ makeGetValue('descriptor', C_STRUCTS.WGPURenderPipelineDescriptor.vertexState, '*') }}}),
|
||||
"sampleCount": {{{ gpu.makeGetU32('descriptor', C_STRUCTS.WGPURenderPipelineDescriptor.sampleCount) }}},
|
||||
"sampleMask": {{{ gpu.makeGetU32('descriptor', C_STRUCTS.WGPURenderPipelineDescriptor.sampleMask) }}},
|
||||
"alphaToCoverageEnabled": {{{ gpu.makeGetBool('descriptor', C_STRUCTS.WGPURenderPipelineDescriptor.alphaToCoverageEnabled) }}},
|
||||
{{{ makeGetValue('descriptor', C_STRUCTS.WGPURenderPipelineDescriptor2.layout, '*') }}}),
|
||||
"vertex": makeVertexState(
|
||||
descriptor + {{{ C_STRUCTS.WGPURenderPipelineDescriptor2.vertex }}}),
|
||||
"primitive": makePrimitiveState(
|
||||
descriptor + {{{ C_STRUCTS.WGPURenderPipelineDescriptor2.primitive }}}),
|
||||
"depthStencil": makeDepthStencilState(
|
||||
{{{ makeGetValue('descriptor', C_STRUCTS.WGPURenderPipelineDescriptor2.depthStencil, '*') }}}),
|
||||
"multisample": makeMultisampleState(
|
||||
descriptor + {{{ C_STRUCTS.WGPURenderPipelineDescriptor2.multisample }}}),
|
||||
"fragment": makeFragmentState(
|
||||
{{{ makeGetValue('descriptor', C_STRUCTS.WGPURenderPipelineDescriptor2.fragment, '*') }}}),
|
||||
};
|
||||
var labelPtr = {{{ makeGetValue('descriptor', C_STRUCTS.WGPURenderPipelineDescriptor.label, '*') }}};
|
||||
var labelPtr = {{{ makeGetValue('descriptor', C_STRUCTS.WGPURenderPipelineDescriptor2.label, '*') }}};
|
||||
if (labelPtr) desc["label"] = UTF8ToString(labelPtr);
|
||||
|
||||
var device = WebGPU["mgrDevice"].get(deviceId);
|
||||
|
@ -1138,46 +1121,8 @@ var LibraryWebGPU = {
|
|||
};
|
||||
},
|
||||
|
||||
// wgpuFence
|
||||
|
||||
wgpuFenceOnCompletion: function(fenceId, {{{ defineI64Param('completionValue') }}}, callback, userdata) {
|
||||
{{{ receiveI64ParamAsI32s('completionValue') }}}
|
||||
var fence = WebGPU.mgrFence.get(fenceId);
|
||||
var completionValue = {{{ gpu.makeU64ToNumber('completionValue_low', 'completionValue_high') }}};
|
||||
|
||||
fence.onCompletion(completionValue).then(function() {
|
||||
{{{ makeDynCall('vii', 'callback') }}}(0 /* WEBGPU_FENCE_COMPLETION_STATUS_SUCCESS */, userdata);
|
||||
}, function() {
|
||||
{{{ makeDynCall('vii', 'callback') }}}(1 /* WEBGPU_FENCE_COMPLETION_STATUS_ERROR */, userdata);
|
||||
});
|
||||
},
|
||||
|
||||
// wgpuQueue
|
||||
|
||||
wgpuQueueCreateFence: function(queueId, descriptor) {
|
||||
var queue = WebGPU.mgrQueue.get(queueId);
|
||||
|
||||
var desc;
|
||||
if (descriptor) {
|
||||
{{{ gpu.makeCheckDescriptor('descriptor') }}}
|
||||
desc = {
|
||||
"label": UTF8ToString(
|
||||
{{{ makeGetValue('descriptor', C_STRUCTS.WGPUFenceDescriptor.label, '*') }}}),
|
||||
"initialValue": {{{ gpu.makeGetU64('descriptor', C_STRUCTS.WGPUFenceDescriptor.initialValue) }}},
|
||||
};
|
||||
}
|
||||
|
||||
return WebGPU.mgrFence.create(queue.createFence(desc));
|
||||
},
|
||||
|
||||
wgpuQueueSignal: function(queueId, fenceId, {{{ defineI64Param('signalValue') }}}) {
|
||||
{{{ receiveI64ParamAsI32s('signalValue') }}}
|
||||
var queue = WebGPU.mgrQueue.get(queueId);
|
||||
var fence = WebGPU.mgrFence.get(fenceId);
|
||||
var signalValue = {{{ gpu.makeU64ToNumber('signalValue_low', 'signalValue_high') }}};
|
||||
queue["signal"](fence, signalValue);
|
||||
},
|
||||
|
||||
wgpuQueueSubmit: function(queueId, commandCount, commands) {
|
||||
#if ASSERTIONS
|
||||
assert(commands % 4 === 0);
|
||||
|
@ -1188,6 +1133,16 @@ var LibraryWebGPU = {
|
|||
queue["submit"](cmds);
|
||||
},
|
||||
|
||||
wgpuQueueOnSubmittedWorkDone: function(queueId, callback, userdata) {
|
||||
var queue = WebGPU.mgrQueue.get(queueId);
|
||||
return queue["onSubmittedWorkDone"]();
|
||||
queue.onSubmittedWorkDone().then(function() {
|
||||
{{{ makeDynCall('vii', 'callback') }}}({{{ gpu.QueueWorkDoneStatus.Success }}}, userdata);
|
||||
}, function() {
|
||||
{{{ makeDynCall('vii', 'callback') }}}({{{ gpu.QueueWorkDoneStatus.Error }}}, userdata);
|
||||
});
|
||||
},
|
||||
|
||||
wgpuQueueWriteBuffer: function(queueId,
|
||||
bufferId, {{{ defineI64Param('bufferOffset') }}}, data, size) {
|
||||
{{{ receiveI64ParamAsI32s('bufferOffset') }}}
|
||||
|
@ -1260,18 +1215,18 @@ var LibraryWebGPU = {
|
|||
|
||||
function makeColorAttachment(caPtr) {
|
||||
var loadValue = WebGPU.LoadOp[
|
||||
{{{ gpu.makeGetU32('caPtr', C_STRUCTS.WGPURenderPassColorAttachmentDescriptor.loadOp) }}}];
|
||||
{{{ gpu.makeGetU32('caPtr', C_STRUCTS.WGPURenderPassColorAttachment.loadOp) }}}];
|
||||
if (loadValue === 'clear') {
|
||||
loadValue = WebGPU.makeColor(caPtr + {{{ C_STRUCTS.WGPURenderPassColorAttachmentDescriptor.clearColor }}});
|
||||
loadValue = WebGPU.makeColor(caPtr + {{{ C_STRUCTS.WGPURenderPassColorAttachment.clearColor }}});
|
||||
}
|
||||
|
||||
return {
|
||||
"attachment": WebGPU.mgrTextureView.get(
|
||||
{{{ gpu.makeGetU32('caPtr', C_STRUCTS.WGPURenderPassColorAttachmentDescriptor.attachment) }}}),
|
||||
"view": WebGPU.mgrTextureView.get(
|
||||
{{{ gpu.makeGetU32('caPtr', C_STRUCTS.WGPURenderPassColorAttachment.view) }}}),
|
||||
"resolveTarget": WebGPU.mgrTextureView.get(
|
||||
{{{ gpu.makeGetU32('caPtr', C_STRUCTS.WGPURenderPassColorAttachmentDescriptor.resolveTarget) }}}),
|
||||
{{{ gpu.makeGetU32('caPtr', C_STRUCTS.WGPURenderPassColorAttachment.resolveTarget) }}}),
|
||||
"storeOp": WebGPU.StoreOp[
|
||||
{{{ gpu.makeGetU32('caPtr', C_STRUCTS.WGPURenderPassColorAttachmentDescriptor.storeOp) }}}],
|
||||
{{{ gpu.makeGetU32('caPtr', C_STRUCTS.WGPURenderPassColorAttachment.storeOp) }}}],
|
||||
"loadValue": loadValue,
|
||||
};
|
||||
}
|
||||
|
@ -1279,7 +1234,7 @@ var LibraryWebGPU = {
|
|||
function makeColorAttachments(count, caPtr) {
|
||||
var attachments = [];
|
||||
for (var i = 0; i < count; ++i) {
|
||||
attachments.push(makeColorAttachment(caPtr + {{{ C_STRUCTS.WGPURenderPassColorAttachmentDescriptor.__size__ }}} * i));
|
||||
attachments.push(makeColorAttachment(caPtr + {{{ C_STRUCTS.WGPURenderPassColorAttachment.__size__ }}} * i));
|
||||
}
|
||||
return attachments;
|
||||
}
|
||||
|
@ -1288,28 +1243,28 @@ var LibraryWebGPU = {
|
|||
if (dsaPtr === 0) return undefined;
|
||||
|
||||
var depthLoadValue = WebGPU.LoadOp[
|
||||
{{{ gpu.makeGetU32('dsaPtr', C_STRUCTS.WGPURenderPassDepthStencilAttachmentDescriptor.depthLoadOp) }}}];
|
||||
{{{ gpu.makeGetU32('dsaPtr', C_STRUCTS.WGPURenderPassDepthStencilAttachment.depthLoadOp) }}}];
|
||||
if (depthLoadValue === 'clear') {
|
||||
depthLoadValue = {{{ makeGetValue('dsaPtr', C_STRUCTS.WGPURenderPassDepthStencilAttachmentDescriptor.clearDepth, 'float') }}};
|
||||
depthLoadValue = {{{ makeGetValue('dsaPtr', C_STRUCTS.WGPURenderPassDepthStencilAttachment.clearDepth, 'float') }}};
|
||||
}
|
||||
|
||||
var stencilLoadValue = WebGPU.LoadOp[
|
||||
{{{ gpu.makeGetU32('dsaPtr', C_STRUCTS.WGPURenderPassDepthStencilAttachmentDescriptor.stencilLoadOp) }}}];
|
||||
{{{ gpu.makeGetU32('dsaPtr', C_STRUCTS.WGPURenderPassDepthStencilAttachment.stencilLoadOp) }}}];
|
||||
if (stencilLoadValue === 'clear') {
|
||||
stencilLoadValue = {{{ gpu.makeGetU32('dsaPtr', C_STRUCTS.WGPURenderPassDepthStencilAttachmentDescriptor.clearStencil) }}};
|
||||
stencilLoadValue = {{{ gpu.makeGetU32('dsaPtr', C_STRUCTS.WGPURenderPassDepthStencilAttachment.clearStencil) }}};
|
||||
}
|
||||
|
||||
return {
|
||||
"attachment": WebGPU.mgrTextureView.get(
|
||||
{{{ gpu.makeGetU32('dsaPtr', C_STRUCTS.WGPURenderPassDepthStencilAttachmentDescriptor.attachment) }}}),
|
||||
"view": WebGPU.mgrTextureView.get(
|
||||
{{{ gpu.makeGetU32('dsaPtr', C_STRUCTS.WGPURenderPassDepthStencilAttachment.view) }}}),
|
||||
"depthStoreOp": WebGPU.StoreOp[
|
||||
{{{ gpu.makeGetU32('dsaPtr', C_STRUCTS.WGPURenderPassDepthStencilAttachmentDescriptor.depthStoreOp) }}}],
|
||||
{{{ gpu.makeGetU32('dsaPtr', C_STRUCTS.WGPURenderPassDepthStencilAttachment.depthStoreOp) }}}],
|
||||
"depthLoadValue": depthLoadValue,
|
||||
"depthReadOnly": {{{ gpu.makeGetBool('dsaPtr', C_STRUCTS.WGPURenderPassDepthStencilAttachmentDescriptor.depthReadOnly) }}},
|
||||
"depthReadOnly": {{{ gpu.makeGetBool('dsaPtr', C_STRUCTS.WGPURenderPassDepthStencilAttachment.depthReadOnly) }}},
|
||||
"stencilStoreOp": WebGPU.StoreOp[
|
||||
{{{ gpu.makeGetU32('dsaPtr', C_STRUCTS.WGPURenderPassDepthStencilAttachmentDescriptor.stencilStoreOp) }}}],
|
||||
{{{ gpu.makeGetU32('dsaPtr', C_STRUCTS.WGPURenderPassDepthStencilAttachment.stencilStoreOp) }}}],
|
||||
"stencilLoadValue": stencilLoadValue,
|
||||
"stencilReadOnly": {{{ gpu.makeGetBool('dsaPtr', C_STRUCTS.WGPURenderPassDepthStencilAttachmentDescriptor.stencilReadOnly) }}},
|
||||
"stencilReadOnly": {{{ gpu.makeGetBool('dsaPtr', C_STRUCTS.WGPURenderPassDepthStencilAttachment.stencilReadOnly) }}},
|
||||
};
|
||||
}
|
||||
|
||||
|
@ -1620,10 +1575,10 @@ var LibraryWebGPU = {
|
|||
pass["setBindGroup"](groupIndex, group, offsets);
|
||||
}
|
||||
},
|
||||
wgpuRenderPassEncoderSetBlendColor: function(passId, colorPtr) {
|
||||
wgpuRenderPassEncoderSetBlendConstant: function(passId, colorPtr) {
|
||||
var pass = WebGPU.mgrRenderPassEncoder.get(passId);
|
||||
var color = WebGPU.makeColor(colorPtr);
|
||||
pass["setBlendColor"](color);
|
||||
pass["setBlendConstant"](color);
|
||||
},
|
||||
wgpuRenderPassEncoderSetIndexBuffer: function(passId, bufferId, format, {{{ defineI64Param('offset') }}}, size) {
|
||||
{{{ receiveI64ParamAsI32s('offset') }}}
|
||||
|
|
|
@ -1379,6 +1379,7 @@
|
|||
// ===========================================
|
||||
{
|
||||
"file": "webgpu/webgpu.h",
|
||||
"defines": [],
|
||||
"structs": {
|
||||
"WGPUChainedStruct": [
|
||||
"next",
|
||||
|
@ -1389,6 +1390,7 @@
|
|||
"deviceID",
|
||||
"vendorID",
|
||||
"name",
|
||||
"driverDescription",
|
||||
"adapterType",
|
||||
"backendType"
|
||||
],
|
||||
|
@ -1400,47 +1402,17 @@
|
|||
"sampler",
|
||||
"textureView"
|
||||
],
|
||||
"WGPUBlendComponent": [
|
||||
"operation",
|
||||
"srcFactor",
|
||||
"dstFactor"
|
||||
],
|
||||
"WGPUBufferBindingLayout": [
|
||||
"nextInChain",
|
||||
"type",
|
||||
"hasDynamicOffset",
|
||||
"minBindingSize"
|
||||
],
|
||||
"WGPUSamplerBindingLayout": [
|
||||
"nextInChain",
|
||||
"type"
|
||||
],
|
||||
"WGPUTextureBindingLayout": [
|
||||
"nextInChain",
|
||||
"sampleType",
|
||||
"viewDimension",
|
||||
"multisampled"
|
||||
],
|
||||
"WGPUStorageTextureBindingLayout": [
|
||||
"nextInChain",
|
||||
"access",
|
||||
"format",
|
||||
"viewDimension"
|
||||
],
|
||||
"WGPUBindGroupLayoutEntry": [
|
||||
"binding",
|
||||
"visibility",
|
||||
"type",
|
||||
"hasDynamicOffset",
|
||||
"minBufferBindingSize",
|
||||
"viewDimension",
|
||||
"textureComponentType",
|
||||
"storageTextureFormat",
|
||||
"buffer",
|
||||
"sampler",
|
||||
"texture",
|
||||
"storageTexture"
|
||||
],
|
||||
"WGPUBlendDescriptor": [
|
||||
"operation",
|
||||
"srcFactor",
|
||||
"dstFactor"
|
||||
],
|
||||
"WGPUBufferDescriptor": [
|
||||
"nextInChain",
|
||||
"label",
|
||||
|
@ -1469,16 +1441,17 @@
|
|||
"WGPUExtent3D": [
|
||||
"width",
|
||||
"height",
|
||||
"depth"
|
||||
],
|
||||
"WGPUFenceDescriptor": [
|
||||
"nextInChain",
|
||||
"label",
|
||||
"initialValue"
|
||||
"depthOrArrayLayers"
|
||||
],
|
||||
"WGPUInstanceDescriptor": [
|
||||
"nextInChain"
|
||||
],
|
||||
"WGPUMultisampleState": [
|
||||
"nextInChain",
|
||||
"count",
|
||||
"mask",
|
||||
"alphaToCoverageEnabled"
|
||||
],
|
||||
"WGPUOrigin3D": [
|
||||
"x",
|
||||
"y",
|
||||
|
@ -1490,6 +1463,17 @@
|
|||
"bindGroupLayoutCount",
|
||||
"bindGroupLayouts"
|
||||
],
|
||||
"WGPUPrimitiveDepthClampingState": [
|
||||
"chain",
|
||||
"clampDepth"
|
||||
],
|
||||
"WGPUPrimitiveState": [
|
||||
"nextInChain",
|
||||
"topology",
|
||||
"stripIndexFormat",
|
||||
"frontFace",
|
||||
"cullMode"
|
||||
],
|
||||
"WGPUProgrammableStageDescriptor": [
|
||||
"nextInChain",
|
||||
"module",
|
||||
|
@ -1503,14 +1487,6 @@
|
|||
"pipelineStatistics",
|
||||
"pipelineStatisticsCount"
|
||||
],
|
||||
"WGPURasterizationStateDescriptor": [
|
||||
"nextInChain",
|
||||
"frontFace",
|
||||
"cullMode",
|
||||
"depthBias",
|
||||
"depthBiasSlopeScale",
|
||||
"depthBiasClamp"
|
||||
],
|
||||
"WGPURenderBundleDescriptor": [
|
||||
"nextInChain",
|
||||
"label"
|
||||
|
@ -1523,8 +1499,8 @@
|
|||
"depthStencilFormat",
|
||||
"sampleCount"
|
||||
],
|
||||
"WGPURenderPassDepthStencilAttachmentDescriptor": [
|
||||
"attachment",
|
||||
"WGPURenderPassDepthStencilAttachment": [
|
||||
"view",
|
||||
"depthLoadOp",
|
||||
"depthStoreOp",
|
||||
"clearDepth",
|
||||
|
@ -1534,6 +1510,10 @@
|
|||
"clearStencil",
|
||||
"stencilReadOnly"
|
||||
],
|
||||
"WGPUSamplerBindingLayout": [
|
||||
"nextInChain",
|
||||
"type"
|
||||
],
|
||||
"WGPUSamplerDescriptor": [
|
||||
"nextInChain",
|
||||
"label",
|
||||
|
@ -1545,7 +1525,8 @@
|
|||
"mipmapFilter",
|
||||
"lodMinClamp",
|
||||
"lodMaxClamp",
|
||||
"compare"
|
||||
"compare",
|
||||
"maxAnisotropy"
|
||||
],
|
||||
"WGPUShaderModuleDescriptor": [
|
||||
"nextInChain",
|
||||
|
@ -1560,12 +1541,18 @@
|
|||
"chain",
|
||||
"source"
|
||||
],
|
||||
"WGPUStencilStateFaceDescriptor": [
|
||||
"WGPUStencilFaceState": [
|
||||
"compare",
|
||||
"failOp",
|
||||
"depthFailOp",
|
||||
"passOp"
|
||||
],
|
||||
"WGPUStorageTextureBindingLayout": [
|
||||
"nextInChain",
|
||||
"access",
|
||||
"format",
|
||||
"viewDimension"
|
||||
],
|
||||
"WGPUSurfaceDescriptor": [
|
||||
"nextInChain",
|
||||
"label"
|
||||
|
@ -1583,6 +1570,12 @@
|
|||
"height",
|
||||
"presentMode"
|
||||
],
|
||||
"WGPUTextureBindingLayout": [
|
||||
"nextInChain",
|
||||
"sampleType",
|
||||
"viewDimension",
|
||||
"multisampled"
|
||||
],
|
||||
"WGPUTextureDataLayout": [
|
||||
"nextInChain",
|
||||
"offset",
|
||||
|
@ -1600,7 +1593,7 @@
|
|||
"arrayLayerCount",
|
||||
"aspect"
|
||||
],
|
||||
"WGPUVertexAttributeDescriptor": [
|
||||
"WGPUVertexAttribute": [
|
||||
"format",
|
||||
"offset",
|
||||
"shaderLocation"
|
||||
|
@ -1612,23 +1605,18 @@
|
|||
"entryCount",
|
||||
"entries"
|
||||
],
|
||||
"WGPUBindGroupLayoutDescriptor": [
|
||||
"WGPUBindGroupLayoutEntry": [
|
||||
"nextInChain",
|
||||
"label",
|
||||
"entryCount",
|
||||
"entries"
|
||||
"binding",
|
||||
"visibility",
|
||||
"buffer",
|
||||
"sampler",
|
||||
"texture",
|
||||
"storageTexture"
|
||||
],
|
||||
"WGPUImageCopyBuffer": [
|
||||
"nextInChain",
|
||||
"layout",
|
||||
"buffer"
|
||||
],
|
||||
"WGPUColorStateDescriptor": [
|
||||
"nextInChain",
|
||||
"format",
|
||||
"alphaBlend",
|
||||
"colorBlend",
|
||||
"writeMask"
|
||||
"WGPUBlendState": [
|
||||
"color",
|
||||
"alpha"
|
||||
],
|
||||
"WGPUComputePipelineDescriptor": [
|
||||
"nextInChain",
|
||||
|
@ -1636,7 +1624,7 @@
|
|||
"layout",
|
||||
"computeStage"
|
||||
],
|
||||
"WGPUDepthStencilStateDescriptor": [
|
||||
"WGPUDepthStencilState": [
|
||||
"nextInChain",
|
||||
"format",
|
||||
"depthWriteEnabled",
|
||||
|
@ -1644,14 +1632,15 @@
|
|||
"stencilFront",
|
||||
"stencilBack",
|
||||
"stencilReadMask",
|
||||
"stencilWriteMask"
|
||||
"stencilWriteMask",
|
||||
"depthBias",
|
||||
"depthBiasSlopeScale",
|
||||
"depthBiasClamp"
|
||||
],
|
||||
"WGPURenderPassColorAttachmentDescriptor": [
|
||||
"attachment",
|
||||
"resolveTarget",
|
||||
"loadOp",
|
||||
"storeOp",
|
||||
"clearColor"
|
||||
"WGPUImageCopyBuffer": [
|
||||
"nextInChain",
|
||||
"layout",
|
||||
"buffer"
|
||||
],
|
||||
"WGPUImageCopyTexture": [
|
||||
"nextInChain",
|
||||
|
@ -1660,6 +1649,13 @@
|
|||
"origin",
|
||||
"aspect"
|
||||
],
|
||||
"WGPURenderPassColorAttachment": [
|
||||
"view",
|
||||
"resolveTarget",
|
||||
"loadOp",
|
||||
"storeOp",
|
||||
"clearColor"
|
||||
],
|
||||
"WGPUTextureDescriptor": [
|
||||
"nextInChain",
|
||||
"label",
|
||||
|
@ -1670,12 +1666,24 @@
|
|||
"mipLevelCount",
|
||||
"sampleCount"
|
||||
],
|
||||
"WGPUVertexBufferLayoutDescriptor": [
|
||||
"WGPUVertexBufferLayout": [
|
||||
"arrayStride",
|
||||
"stepMode",
|
||||
"attributeCount",
|
||||
"attributes"
|
||||
],
|
||||
"WGPUBindGroupLayoutDescriptor": [
|
||||
"nextInChain",
|
||||
"label",
|
||||
"entryCount",
|
||||
"entries"
|
||||
],
|
||||
"WGPUColorTargetState": [
|
||||
"nextInChain",
|
||||
"format",
|
||||
"blend",
|
||||
"writeMask"
|
||||
],
|
||||
"WGPURenderPassDescriptor": [
|
||||
"nextInChain",
|
||||
"label",
|
||||
|
@ -1684,27 +1692,29 @@
|
|||
"depthStencilAttachment",
|
||||
"occlusionQuerySet"
|
||||
],
|
||||
"WGPUVertexStateDescriptor": [
|
||||
"WGPUVertexState": [
|
||||
"nextInChain",
|
||||
"indexFormat",
|
||||
"vertexBufferCount",
|
||||
"vertexBuffers"
|
||||
"module",
|
||||
"entryPoint",
|
||||
"bufferCount",
|
||||
"buffers"
|
||||
],
|
||||
"WGPURenderPipelineDescriptor": [
|
||||
"WGPUFragmentState": [
|
||||
"nextInChain",
|
||||
"module",
|
||||
"entryPoint",
|
||||
"targetCount",
|
||||
"targets"
|
||||
],
|
||||
"WGPURenderPipelineDescriptor2": [
|
||||
"nextInChain",
|
||||
"label",
|
||||
"layout",
|
||||
"vertexStage",
|
||||
"fragmentStage",
|
||||
"vertexState",
|
||||
"primitiveTopology",
|
||||
"rasterizationState",
|
||||
"sampleCount",
|
||||
"depthStencilState",
|
||||
"colorStateCount",
|
||||
"colorStates",
|
||||
"sampleMask",
|
||||
"alphaToCoverageEnabled"
|
||||
"vertex",
|
||||
"primitive",
|
||||
"depthStencil",
|
||||
"multisample",
|
||||
"fragment"
|
||||
]
|
||||
}
|
||||
}
|
||||
|
|
|
@ -68,7 +68,6 @@ typedef struct WGPUCommandEncoderImpl* WGPUCommandEncoder;
|
|||
typedef struct WGPUComputePassEncoderImpl* WGPUComputePassEncoder;
|
||||
typedef struct WGPUComputePipelineImpl* WGPUComputePipeline;
|
||||
typedef struct WGPUDeviceImpl* WGPUDevice;
|
||||
typedef struct WGPUFenceImpl* WGPUFence;
|
||||
typedef struct WGPUInstanceImpl* WGPUInstance;
|
||||
typedef struct WGPUPipelineLayoutImpl* WGPUPipelineLayout;
|
||||
typedef struct WGPUQuerySetImpl* WGPUQuerySet;
|
||||
|
@ -127,17 +126,17 @@ typedef enum WGPUBindingType {
|
|||
typedef enum WGPUBlendFactor {
|
||||
WGPUBlendFactor_Zero = 0x00000000,
|
||||
WGPUBlendFactor_One = 0x00000001,
|
||||
WGPUBlendFactor_SrcColor = 0x00000002,
|
||||
WGPUBlendFactor_OneMinusSrcColor = 0x00000003,
|
||||
WGPUBlendFactor_Src = 0x00000002,
|
||||
WGPUBlendFactor_OneMinusSrc = 0x00000003,
|
||||
WGPUBlendFactor_SrcAlpha = 0x00000004,
|
||||
WGPUBlendFactor_OneMinusSrcAlpha = 0x00000005,
|
||||
WGPUBlendFactor_DstColor = 0x00000006,
|
||||
WGPUBlendFactor_OneMinusDstColor = 0x00000007,
|
||||
WGPUBlendFactor_Dst = 0x00000006,
|
||||
WGPUBlendFactor_OneMinusDst = 0x00000007,
|
||||
WGPUBlendFactor_DstAlpha = 0x00000008,
|
||||
WGPUBlendFactor_OneMinusDstAlpha = 0x00000009,
|
||||
WGPUBlendFactor_SrcAlphaSaturated = 0x0000000A,
|
||||
WGPUBlendFactor_BlendColor = 0x0000000B,
|
||||
WGPUBlendFactor_OneMinusBlendColor = 0x0000000C,
|
||||
WGPUBlendFactor_Constant = 0x0000000B,
|
||||
WGPUBlendFactor_OneMinusConstant = 0x0000000C,
|
||||
WGPUBlendFactor_Force32 = 0x7FFFFFFF
|
||||
} WGPUBlendFactor;
|
||||
|
||||
|
@ -181,14 +180,14 @@ typedef enum WGPUCompareFunction {
|
|||
WGPUCompareFunction_Force32 = 0x7FFFFFFF
|
||||
} WGPUCompareFunction;
|
||||
|
||||
typedef enum WGPUCreateReadyPipelineStatus {
|
||||
WGPUCreateReadyPipelineStatus_Success = 0x00000000,
|
||||
WGPUCreateReadyPipelineStatus_Error = 0x00000001,
|
||||
WGPUCreateReadyPipelineStatus_DeviceLost = 0x00000002,
|
||||
WGPUCreateReadyPipelineStatus_DeviceDestroyed = 0x00000003,
|
||||
WGPUCreateReadyPipelineStatus_Unknown = 0x00000004,
|
||||
WGPUCreateReadyPipelineStatus_Force32 = 0x7FFFFFFF
|
||||
} WGPUCreateReadyPipelineStatus;
|
||||
typedef enum WGPUCreatePipelineAsyncStatus {
|
||||
WGPUCreatePipelineAsyncStatus_Success = 0x00000000,
|
||||
WGPUCreatePipelineAsyncStatus_Error = 0x00000001,
|
||||
WGPUCreatePipelineAsyncStatus_DeviceLost = 0x00000002,
|
||||
WGPUCreatePipelineAsyncStatus_DeviceDestroyed = 0x00000003,
|
||||
WGPUCreatePipelineAsyncStatus_Unknown = 0x00000004,
|
||||
WGPUCreatePipelineAsyncStatus_Force32 = 0x7FFFFFFF
|
||||
} WGPUCreatePipelineAsyncStatus;
|
||||
|
||||
typedef enum WGPUCullMode {
|
||||
WGPUCullMode_None = 0x00000000,
|
||||
|
@ -213,14 +212,6 @@ typedef enum WGPUErrorType {
|
|||
WGPUErrorType_Force32 = 0x7FFFFFFF
|
||||
} WGPUErrorType;
|
||||
|
||||
typedef enum WGPUFenceCompletionStatus {
|
||||
WGPUFenceCompletionStatus_Success = 0x00000000,
|
||||
WGPUFenceCompletionStatus_Error = 0x00000001,
|
||||
WGPUFenceCompletionStatus_Unknown = 0x00000002,
|
||||
WGPUFenceCompletionStatus_DeviceLost = 0x00000003,
|
||||
WGPUFenceCompletionStatus_Force32 = 0x7FFFFFFF
|
||||
} WGPUFenceCompletionStatus;
|
||||
|
||||
typedef enum WGPUFilterMode {
|
||||
WGPUFilterMode_Nearest = 0x00000000,
|
||||
WGPUFilterMode_Linear = 0x00000001,
|
||||
|
@ -284,6 +275,14 @@ typedef enum WGPUQueryType {
|
|||
WGPUQueryType_Force32 = 0x7FFFFFFF
|
||||
} WGPUQueryType;
|
||||
|
||||
typedef enum WGPUQueueWorkDoneStatus {
|
||||
WGPUQueueWorkDoneStatus_Success = 0x00000000,
|
||||
WGPUQueueWorkDoneStatus_Error = 0x00000001,
|
||||
WGPUQueueWorkDoneStatus_Unknown = 0x00000002,
|
||||
WGPUQueueWorkDoneStatus_DeviceLost = 0x00000003,
|
||||
WGPUQueueWorkDoneStatus_Force32 = 0x7FFFFFFF
|
||||
} WGPUQueueWorkDoneStatus;
|
||||
|
||||
typedef enum WGPUSType {
|
||||
WGPUSType_Invalid = 0x00000000,
|
||||
WGPUSType_SurfaceDescriptorFromMetalLayer = 0x00000001,
|
||||
|
@ -292,6 +291,7 @@ typedef enum WGPUSType {
|
|||
WGPUSType_SurfaceDescriptorFromCanvasHTMLSelector = 0x00000004,
|
||||
WGPUSType_ShaderModuleSPIRVDescriptor = 0x00000005,
|
||||
WGPUSType_ShaderModuleWGSLDescriptor = 0x00000006,
|
||||
WGPUSType_PrimitiveDepthClampingState = 0x00000007,
|
||||
WGPUSType_Force32 = 0x7FFFFFFF
|
||||
} WGPUSType;
|
||||
|
||||
|
@ -390,21 +390,22 @@ typedef enum WGPUTextureFormat {
|
|||
WGPUTextureFormat_RGBA32Sint = 0x00000024,
|
||||
WGPUTextureFormat_Depth32Float = 0x00000025,
|
||||
WGPUTextureFormat_Depth24Plus = 0x00000026,
|
||||
WGPUTextureFormat_Depth24PlusStencil8 = 0x00000027,
|
||||
WGPUTextureFormat_BC1RGBAUnorm = 0x00000028,
|
||||
WGPUTextureFormat_BC1RGBAUnormSrgb = 0x00000029,
|
||||
WGPUTextureFormat_BC2RGBAUnorm = 0x0000002A,
|
||||
WGPUTextureFormat_BC2RGBAUnormSrgb = 0x0000002B,
|
||||
WGPUTextureFormat_BC3RGBAUnorm = 0x0000002C,
|
||||
WGPUTextureFormat_BC3RGBAUnormSrgb = 0x0000002D,
|
||||
WGPUTextureFormat_BC4RUnorm = 0x0000002E,
|
||||
WGPUTextureFormat_BC4RSnorm = 0x0000002F,
|
||||
WGPUTextureFormat_BC5RGUnorm = 0x00000030,
|
||||
WGPUTextureFormat_BC5RGSnorm = 0x00000031,
|
||||
WGPUTextureFormat_BC6HRGBUfloat = 0x00000032,
|
||||
WGPUTextureFormat_BC6HRGBFloat = 0x00000033,
|
||||
WGPUTextureFormat_BC7RGBAUnorm = 0x00000034,
|
||||
WGPUTextureFormat_BC7RGBAUnormSrgb = 0x00000035,
|
||||
WGPUTextureFormat_Stencil8 = 0x00000027,
|
||||
WGPUTextureFormat_Depth24PlusStencil8 = 0x00000028,
|
||||
WGPUTextureFormat_BC1RGBAUnorm = 0x00000029,
|
||||
WGPUTextureFormat_BC1RGBAUnormSrgb = 0x0000002A,
|
||||
WGPUTextureFormat_BC2RGBAUnorm = 0x0000002B,
|
||||
WGPUTextureFormat_BC2RGBAUnormSrgb = 0x0000002C,
|
||||
WGPUTextureFormat_BC3RGBAUnorm = 0x0000002D,
|
||||
WGPUTextureFormat_BC3RGBAUnormSrgb = 0x0000002E,
|
||||
WGPUTextureFormat_BC4RUnorm = 0x0000002F,
|
||||
WGPUTextureFormat_BC4RSnorm = 0x00000030,
|
||||
WGPUTextureFormat_BC5RGUnorm = 0x00000031,
|
||||
WGPUTextureFormat_BC5RGSnorm = 0x00000032,
|
||||
WGPUTextureFormat_BC6HRGBUfloat = 0x00000033,
|
||||
WGPUTextureFormat_BC6HRGBFloat = 0x00000034,
|
||||
WGPUTextureFormat_BC7RGBAUnorm = 0x00000035,
|
||||
WGPUTextureFormat_BC7RGBAUnormSrgb = 0x00000036,
|
||||
WGPUTextureFormat_Force32 = 0x7FFFFFFF
|
||||
} WGPUTextureFormat;
|
||||
|
||||
|
@ -430,36 +431,37 @@ typedef enum WGPUTextureViewDimension {
|
|||
} WGPUTextureViewDimension;
|
||||
|
||||
typedef enum WGPUVertexFormat {
|
||||
WGPUVertexFormat_UChar2 = 0x00000000,
|
||||
WGPUVertexFormat_UChar4 = 0x00000001,
|
||||
WGPUVertexFormat_Char2 = 0x00000002,
|
||||
WGPUVertexFormat_Char4 = 0x00000003,
|
||||
WGPUVertexFormat_UChar2Norm = 0x00000004,
|
||||
WGPUVertexFormat_UChar4Norm = 0x00000005,
|
||||
WGPUVertexFormat_Char2Norm = 0x00000006,
|
||||
WGPUVertexFormat_Char4Norm = 0x00000007,
|
||||
WGPUVertexFormat_UShort2 = 0x00000008,
|
||||
WGPUVertexFormat_UShort4 = 0x00000009,
|
||||
WGPUVertexFormat_Short2 = 0x0000000A,
|
||||
WGPUVertexFormat_Short4 = 0x0000000B,
|
||||
WGPUVertexFormat_UShort2Norm = 0x0000000C,
|
||||
WGPUVertexFormat_UShort4Norm = 0x0000000D,
|
||||
WGPUVertexFormat_Short2Norm = 0x0000000E,
|
||||
WGPUVertexFormat_Short4Norm = 0x0000000F,
|
||||
WGPUVertexFormat_Half2 = 0x00000010,
|
||||
WGPUVertexFormat_Half4 = 0x00000011,
|
||||
WGPUVertexFormat_Float = 0x00000012,
|
||||
WGPUVertexFormat_Float2 = 0x00000013,
|
||||
WGPUVertexFormat_Float3 = 0x00000014,
|
||||
WGPUVertexFormat_Float4 = 0x00000015,
|
||||
WGPUVertexFormat_UInt = 0x00000016,
|
||||
WGPUVertexFormat_UInt2 = 0x00000017,
|
||||
WGPUVertexFormat_UInt3 = 0x00000018,
|
||||
WGPUVertexFormat_UInt4 = 0x00000019,
|
||||
WGPUVertexFormat_Int = 0x0000001A,
|
||||
WGPUVertexFormat_Int2 = 0x0000001B,
|
||||
WGPUVertexFormat_Int3 = 0x0000001C,
|
||||
WGPUVertexFormat_Int4 = 0x0000001D,
|
||||
WGPUVertexFormat_Undefined = 0x00000000,
|
||||
WGPUVertexFormat_Uint8x2 = 0x00000001,
|
||||
WGPUVertexFormat_Uint8x4 = 0x00000002,
|
||||
WGPUVertexFormat_Sint8x2 = 0x00000003,
|
||||
WGPUVertexFormat_Sint8x4 = 0x00000004,
|
||||
WGPUVertexFormat_Unorm8x2 = 0x00000005,
|
||||
WGPUVertexFormat_Unorm8x4 = 0x00000006,
|
||||
WGPUVertexFormat_Snorm8x2 = 0x00000007,
|
||||
WGPUVertexFormat_Snorm8x4 = 0x00000008,
|
||||
WGPUVertexFormat_Uint16x2 = 0x00000009,
|
||||
WGPUVertexFormat_Uint16x4 = 0x0000000A,
|
||||
WGPUVertexFormat_Sint16x2 = 0x0000000B,
|
||||
WGPUVertexFormat_Sint16x4 = 0x0000000C,
|
||||
WGPUVertexFormat_Unorm16x2 = 0x0000000D,
|
||||
WGPUVertexFormat_Unorm16x4 = 0x0000000E,
|
||||
WGPUVertexFormat_Snorm16x2 = 0x0000000F,
|
||||
WGPUVertexFormat_Snorm16x4 = 0x00000010,
|
||||
WGPUVertexFormat_Float16x2 = 0x00000011,
|
||||
WGPUVertexFormat_Float16x4 = 0x00000012,
|
||||
WGPUVertexFormat_Float32 = 0x00000013,
|
||||
WGPUVertexFormat_Float32x2 = 0x00000014,
|
||||
WGPUVertexFormat_Float32x3 = 0x00000015,
|
||||
WGPUVertexFormat_Float32x4 = 0x00000016,
|
||||
WGPUVertexFormat_Uint32 = 0x00000017,
|
||||
WGPUVertexFormat_Uint32x2 = 0x00000018,
|
||||
WGPUVertexFormat_Uint32x3 = 0x00000019,
|
||||
WGPUVertexFormat_Uint32x4 = 0x0000001A,
|
||||
WGPUVertexFormat_Sint32 = 0x0000001B,
|
||||
WGPUVertexFormat_Sint32x2 = 0x0000001C,
|
||||
WGPUVertexFormat_Sint32x3 = 0x0000001D,
|
||||
WGPUVertexFormat_Sint32x4 = 0x0000001E,
|
||||
WGPUVertexFormat_Force32 = 0x7FFFFFFF
|
||||
} WGPUVertexFormat;
|
||||
|
||||
|
@ -544,11 +546,11 @@ typedef struct WGPUBindGroupEntry {
|
|||
WGPUTextureView textureView;
|
||||
} WGPUBindGroupEntry;
|
||||
|
||||
typedef struct WGPUBlendDescriptor {
|
||||
typedef struct WGPUBlendComponent {
|
||||
WGPUBlendOperation operation;
|
||||
WGPUBlendFactor srcFactor;
|
||||
WGPUBlendFactor dstFactor;
|
||||
} WGPUBlendDescriptor;
|
||||
} WGPUBlendComponent;
|
||||
|
||||
typedef struct WGPUBufferBindingLayout {
|
||||
WGPUChainedStruct const * nextInChain;
|
||||
|
@ -594,19 +596,20 @@ typedef struct WGPUDeviceDescriptor {
|
|||
typedef struct WGPUExtent3D {
|
||||
uint32_t width;
|
||||
uint32_t height;
|
||||
uint32_t depth;
|
||||
uint32_t depthOrArrayLayers;
|
||||
} WGPUExtent3D;
|
||||
|
||||
typedef struct WGPUFenceDescriptor {
|
||||
WGPUChainedStruct const * nextInChain;
|
||||
char const * label;
|
||||
uint64_t initialValue;
|
||||
} WGPUFenceDescriptor;
|
||||
|
||||
typedef struct WGPUInstanceDescriptor {
|
||||
WGPUChainedStruct const * nextInChain;
|
||||
} WGPUInstanceDescriptor;
|
||||
|
||||
typedef struct WGPUMultisampleState {
|
||||
WGPUChainedStruct const * nextInChain;
|
||||
uint32_t count;
|
||||
uint32_t mask;
|
||||
bool alphaToCoverageEnabled;
|
||||
} WGPUMultisampleState;
|
||||
|
||||
typedef struct WGPUOrigin3D {
|
||||
uint32_t x;
|
||||
uint32_t y;
|
||||
|
@ -620,6 +623,19 @@ typedef struct WGPUPipelineLayoutDescriptor {
|
|||
WGPUBindGroupLayout const * bindGroupLayouts;
|
||||
} WGPUPipelineLayoutDescriptor;
|
||||
|
||||
typedef struct WGPUPrimitiveDepthClampingState {
|
||||
WGPUChainedStruct chain;
|
||||
bool clampDepth;
|
||||
} WGPUPrimitiveDepthClampingState;
|
||||
|
||||
typedef struct WGPUPrimitiveState {
|
||||
WGPUChainedStruct const * nextInChain;
|
||||
WGPUPrimitiveTopology topology;
|
||||
WGPUIndexFormat stripIndexFormat;
|
||||
WGPUFrontFace frontFace;
|
||||
WGPUCullMode cullMode;
|
||||
} WGPUPrimitiveState;
|
||||
|
||||
typedef struct WGPUProgrammableStageDescriptor {
|
||||
WGPUChainedStruct const * nextInChain;
|
||||
WGPUShaderModule module;
|
||||
|
@ -635,15 +651,6 @@ typedef struct WGPUQuerySetDescriptor {
|
|||
uint32_t pipelineStatisticsCount;
|
||||
} WGPUQuerySetDescriptor;
|
||||
|
||||
typedef struct WGPURasterizationStateDescriptor {
|
||||
WGPUChainedStruct const * nextInChain;
|
||||
WGPUFrontFace frontFace;
|
||||
WGPUCullMode cullMode;
|
||||
int32_t depthBias;
|
||||
float depthBiasSlopeScale;
|
||||
float depthBiasClamp;
|
||||
} WGPURasterizationStateDescriptor;
|
||||
|
||||
typedef struct WGPURenderBundleDescriptor {
|
||||
WGPUChainedStruct const * nextInChain;
|
||||
char const * label;
|
||||
|
@ -658,8 +665,8 @@ typedef struct WGPURenderBundleEncoderDescriptor {
|
|||
uint32_t sampleCount;
|
||||
} WGPURenderBundleEncoderDescriptor;
|
||||
|
||||
typedef struct WGPURenderPassDepthStencilAttachmentDescriptor {
|
||||
WGPUTextureView attachment;
|
||||
typedef struct WGPURenderPassDepthStencilAttachment {
|
||||
WGPUTextureView view;
|
||||
WGPULoadOp depthLoadOp;
|
||||
WGPUStoreOp depthStoreOp;
|
||||
float clearDepth;
|
||||
|
@ -668,7 +675,7 @@ typedef struct WGPURenderPassDepthStencilAttachmentDescriptor {
|
|||
WGPUStoreOp stencilStoreOp;
|
||||
uint32_t clearStencil;
|
||||
bool stencilReadOnly;
|
||||
} WGPURenderPassDepthStencilAttachmentDescriptor;
|
||||
} WGPURenderPassDepthStencilAttachment;
|
||||
|
||||
typedef struct WGPURequestAdapterOptions {
|
||||
WGPUChainedStruct const * nextInChain;
|
||||
|
@ -711,12 +718,12 @@ typedef struct WGPUShaderModuleWGSLDescriptor {
|
|||
char const * source;
|
||||
} WGPUShaderModuleWGSLDescriptor;
|
||||
|
||||
typedef struct WGPUStencilStateFaceDescriptor {
|
||||
typedef struct WGPUStencilFaceState {
|
||||
WGPUCompareFunction compare;
|
||||
WGPUStencilOperation failOp;
|
||||
WGPUStencilOperation depthFailOp;
|
||||
WGPUStencilOperation passOp;
|
||||
} WGPUStencilStateFaceDescriptor;
|
||||
} WGPUStencilFaceState;
|
||||
|
||||
typedef struct WGPUStorageTextureBindingLayout {
|
||||
WGPUChainedStruct const * nextInChain;
|
||||
|
@ -788,11 +795,11 @@ typedef struct WGPUTextureViewDescriptor {
|
|||
WGPUTextureAspect aspect;
|
||||
} WGPUTextureViewDescriptor;
|
||||
|
||||
typedef struct WGPUVertexAttributeDescriptor {
|
||||
typedef struct WGPUVertexAttribute {
|
||||
WGPUVertexFormat format;
|
||||
uint64_t offset;
|
||||
uint32_t shaderLocation;
|
||||
} WGPUVertexAttributeDescriptor;
|
||||
} WGPUVertexAttribute;
|
||||
|
||||
typedef struct WGPUBindGroupDescriptor {
|
||||
WGPUChainedStruct const * nextInChain;
|
||||
|
@ -803,33 +810,19 @@ typedef struct WGPUBindGroupDescriptor {
|
|||
} WGPUBindGroupDescriptor;
|
||||
|
||||
typedef struct WGPUBindGroupLayoutEntry {
|
||||
WGPUChainedStruct const * nextInChain;
|
||||
uint32_t binding;
|
||||
WGPUShaderStageFlags visibility;
|
||||
WGPUBindingType type;
|
||||
bool hasDynamicOffset;
|
||||
uint64_t minBufferBindingSize;
|
||||
WGPUTextureViewDimension viewDimension;
|
||||
WGPUTextureComponentType textureComponentType;
|
||||
WGPUTextureFormat storageTextureFormat;
|
||||
WGPUBufferBindingLayout buffer;
|
||||
WGPUSamplerBindingLayout sampler;
|
||||
WGPUTextureBindingLayout texture;
|
||||
WGPUStorageTextureBindingLayout storageTexture;
|
||||
} WGPUBindGroupLayoutEntry;
|
||||
|
||||
typedef struct WGPUImageCopyBuffer {
|
||||
WGPUChainedStruct const * nextInChain;
|
||||
WGPUTextureDataLayout layout;
|
||||
WGPUBuffer buffer;
|
||||
} WGPUImageCopyBuffer;
|
||||
|
||||
typedef struct WGPUColorStateDescriptor {
|
||||
WGPUChainedStruct const * nextInChain;
|
||||
WGPUTextureFormat format;
|
||||
WGPUBlendDescriptor alphaBlend;
|
||||
WGPUBlendDescriptor colorBlend;
|
||||
WGPUColorWriteMaskFlags writeMask;
|
||||
} WGPUColorStateDescriptor;
|
||||
typedef struct WGPUBlendState {
|
||||
WGPUBlendComponent color;
|
||||
WGPUBlendComponent alpha;
|
||||
} WGPUBlendState;
|
||||
|
||||
typedef struct WGPUComputePipelineDescriptor {
|
||||
WGPUChainedStruct const * nextInChain;
|
||||
|
@ -838,24 +831,25 @@ typedef struct WGPUComputePipelineDescriptor {
|
|||
WGPUProgrammableStageDescriptor computeStage;
|
||||
} WGPUComputePipelineDescriptor;
|
||||
|
||||
typedef struct WGPUDepthStencilStateDescriptor {
|
||||
typedef struct WGPUDepthStencilState {
|
||||
WGPUChainedStruct const * nextInChain;
|
||||
WGPUTextureFormat format;
|
||||
bool depthWriteEnabled;
|
||||
WGPUCompareFunction depthCompare;
|
||||
WGPUStencilStateFaceDescriptor stencilFront;
|
||||
WGPUStencilStateFaceDescriptor stencilBack;
|
||||
WGPUStencilFaceState stencilFront;
|
||||
WGPUStencilFaceState stencilBack;
|
||||
uint32_t stencilReadMask;
|
||||
uint32_t stencilWriteMask;
|
||||
} WGPUDepthStencilStateDescriptor;
|
||||
int32_t depthBias;
|
||||
float depthBiasSlopeScale;
|
||||
float depthBiasClamp;
|
||||
} WGPUDepthStencilState;
|
||||
|
||||
typedef struct WGPURenderPassColorAttachmentDescriptor {
|
||||
WGPUTextureView attachment;
|
||||
WGPUTextureView resolveTarget;
|
||||
WGPULoadOp loadOp;
|
||||
WGPUStoreOp storeOp;
|
||||
WGPUColor clearColor;
|
||||
} WGPURenderPassColorAttachmentDescriptor;
|
||||
typedef struct WGPUImageCopyBuffer {
|
||||
WGPUChainedStruct const * nextInChain;
|
||||
WGPUTextureDataLayout layout;
|
||||
WGPUBuffer buffer;
|
||||
} WGPUImageCopyBuffer;
|
||||
|
||||
typedef struct WGPUImageCopyTexture {
|
||||
WGPUChainedStruct const * nextInChain;
|
||||
|
@ -865,6 +859,14 @@ typedef struct WGPUImageCopyTexture {
|
|||
WGPUTextureAspect aspect;
|
||||
} WGPUImageCopyTexture;
|
||||
|
||||
typedef struct WGPURenderPassColorAttachment {
|
||||
WGPUTextureView view;
|
||||
WGPUTextureView resolveTarget;
|
||||
WGPULoadOp loadOp;
|
||||
WGPUStoreOp storeOp;
|
||||
WGPUColor clearColor;
|
||||
} WGPURenderPassColorAttachment;
|
||||
|
||||
typedef struct WGPUTextureDescriptor {
|
||||
WGPUChainedStruct const * nextInChain;
|
||||
char const * label;
|
||||
|
@ -876,12 +878,12 @@ typedef struct WGPUTextureDescriptor {
|
|||
uint32_t sampleCount;
|
||||
} WGPUTextureDescriptor;
|
||||
|
||||
typedef struct WGPUVertexBufferLayoutDescriptor {
|
||||
typedef struct WGPUVertexBufferLayout {
|
||||
uint64_t arrayStride;
|
||||
WGPUInputStepMode stepMode;
|
||||
uint32_t attributeCount;
|
||||
WGPUVertexAttributeDescriptor const * attributes;
|
||||
} WGPUVertexBufferLayoutDescriptor;
|
||||
WGPUVertexAttribute const * attributes;
|
||||
} WGPUVertexBufferLayout;
|
||||
|
||||
typedef struct WGPUBindGroupLayoutDescriptor {
|
||||
WGPUChainedStruct const * nextInChain;
|
||||
|
@ -890,60 +892,61 @@ typedef struct WGPUBindGroupLayoutDescriptor {
|
|||
WGPUBindGroupLayoutEntry const * entries;
|
||||
} WGPUBindGroupLayoutDescriptor;
|
||||
|
||||
typedef struct WGPUColorTargetState {
|
||||
WGPUChainedStruct const * nextInChain;
|
||||
WGPUTextureFormat format;
|
||||
WGPUBlendState const * blend;
|
||||
WGPUColorWriteMaskFlags writeMask;
|
||||
} WGPUColorTargetState;
|
||||
|
||||
typedef struct WGPURenderPassDescriptor {
|
||||
WGPUChainedStruct const * nextInChain;
|
||||
char const * label;
|
||||
uint32_t colorAttachmentCount;
|
||||
WGPURenderPassColorAttachmentDescriptor const * colorAttachments;
|
||||
WGPURenderPassDepthStencilAttachmentDescriptor const * depthStencilAttachment;
|
||||
WGPURenderPassColorAttachment const * colorAttachments;
|
||||
WGPURenderPassDepthStencilAttachment const * depthStencilAttachment;
|
||||
WGPUQuerySet occlusionQuerySet;
|
||||
} WGPURenderPassDescriptor;
|
||||
|
||||
typedef struct WGPUVertexStateDescriptor {
|
||||
typedef struct WGPUVertexState {
|
||||
WGPUChainedStruct const * nextInChain;
|
||||
WGPUIndexFormat indexFormat;
|
||||
uint32_t vertexBufferCount;
|
||||
WGPUVertexBufferLayoutDescriptor const * vertexBuffers;
|
||||
} WGPUVertexStateDescriptor;
|
||||
WGPUShaderModule module;
|
||||
char const * entryPoint;
|
||||
uint32_t bufferCount;
|
||||
WGPUVertexBufferLayout const * buffers;
|
||||
} WGPUVertexState;
|
||||
|
||||
typedef struct WGPURenderPipelineDescriptor {
|
||||
typedef struct WGPUFragmentState {
|
||||
WGPUChainedStruct const * nextInChain;
|
||||
WGPUShaderModule module;
|
||||
char const * entryPoint;
|
||||
uint32_t targetCount;
|
||||
WGPUColorTargetState const * targets;
|
||||
} WGPUFragmentState;
|
||||
|
||||
typedef struct WGPURenderPipelineDescriptor2 {
|
||||
WGPUChainedStruct const * nextInChain;
|
||||
char const * label;
|
||||
WGPUPipelineLayout layout;
|
||||
WGPUProgrammableStageDescriptor vertexStage;
|
||||
WGPUProgrammableStageDescriptor const * fragmentStage;
|
||||
WGPUVertexStateDescriptor const * vertexState;
|
||||
WGPUPrimitiveTopology primitiveTopology;
|
||||
WGPURasterizationStateDescriptor const * rasterizationState;
|
||||
uint32_t sampleCount;
|
||||
WGPUDepthStencilStateDescriptor const * depthStencilState;
|
||||
uint32_t colorStateCount;
|
||||
WGPUColorStateDescriptor const * colorStates;
|
||||
uint32_t sampleMask;
|
||||
bool alphaToCoverageEnabled;
|
||||
} WGPURenderPipelineDescriptor;
|
||||
|
||||
// WGPUBufferCopyView is deprecated.
|
||||
// Use WGPUImageCopyBuffer instead.
|
||||
typedef WGPUImageCopyBuffer WGPUBufferCopyView;
|
||||
|
||||
// WGPUTextureCopyView is deprecated.
|
||||
// Use WGPUImageCopyTexture instead.
|
||||
typedef WGPUImageCopyTexture WGPUTextureCopyView;
|
||||
WGPUVertexState vertex;
|
||||
WGPUPrimitiveState primitive;
|
||||
WGPUDepthStencilState const * depthStencil;
|
||||
WGPUMultisampleState multisample;
|
||||
WGPUFragmentState const * fragment;
|
||||
} WGPURenderPipelineDescriptor2;
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
typedef void (*WGPUBufferMapCallback)(WGPUBufferMapAsyncStatus status, void * userdata);
|
||||
typedef void (*WGPUCreateReadyComputePipelineCallback)(WGPUCreateReadyPipelineStatus status, WGPUComputePipeline pipeline, char const * message, void * userdata);
|
||||
typedef void (*WGPUCreateReadyRenderPipelineCallback)(WGPUCreateReadyPipelineStatus status, WGPURenderPipeline pipeline, char const * message, void * userdata);
|
||||
typedef void (*WGPUCreateComputePipelineAsyncCallback)(WGPUCreatePipelineAsyncStatus status, WGPUComputePipeline pipeline, char const * message, void * userdata);
|
||||
typedef void (*WGPUCreateRenderPipelineAsyncCallback)(WGPUCreatePipelineAsyncStatus status, WGPURenderPipeline pipeline, char const * message, void * userdata);
|
||||
typedef void (*WGPUDeviceLostCallback)(char const * message, void * userdata);
|
||||
typedef void (*WGPUErrorCallback)(WGPUErrorType type, char const * message, void * userdata);
|
||||
typedef void (*WGPUFenceOnCompletionCallback)(WGPUFenceCompletionStatus status, void * userdata);
|
||||
typedef void (*WGPURequestAdapterCallback)(WGPUAdapter result, void * userdata);
|
||||
typedef void (*WGPURequestDeviceCallback)(WGPUDevice result, void * userdata);
|
||||
typedef void (*WGPUSurfaceGetPreferredFormatCallback)(WGPUTextureFormat format, void * userdata);
|
||||
typedef void (*WGPUQueueWorkDoneCallback)(WGPUQueueWorkDoneStatus status, void * userdata);
|
||||
|
||||
typedef void (*WGPUProc)(void);
|
||||
|
||||
|
@ -1017,17 +1020,17 @@ typedef WGPUBindGroupLayout (*WGPUProcDeviceCreateBindGroupLayout)(WGPUDevice de
|
|||
typedef WGPUBuffer (*WGPUProcDeviceCreateBuffer)(WGPUDevice device, WGPUBufferDescriptor const * descriptor);
|
||||
typedef WGPUCommandEncoder (*WGPUProcDeviceCreateCommandEncoder)(WGPUDevice device, WGPUCommandEncoderDescriptor const * descriptor);
|
||||
typedef WGPUComputePipeline (*WGPUProcDeviceCreateComputePipeline)(WGPUDevice device, WGPUComputePipelineDescriptor const * descriptor);
|
||||
typedef void (*WGPUProcDeviceCreateComputePipelineAsync)(WGPUDevice device, WGPUComputePipelineDescriptor const * descriptor, WGPUCreateComputePipelineAsyncCallback callback, void * userdata);
|
||||
typedef WGPUPipelineLayout (*WGPUProcDeviceCreatePipelineLayout)(WGPUDevice device, WGPUPipelineLayoutDescriptor const * descriptor);
|
||||
typedef WGPUQuerySet (*WGPUProcDeviceCreateQuerySet)(WGPUDevice device, WGPUQuerySetDescriptor const * descriptor);
|
||||
typedef void (*WGPUProcDeviceCreateReadyComputePipeline)(WGPUDevice device, WGPUComputePipelineDescriptor const * descriptor, WGPUCreateReadyComputePipelineCallback callback, void * userdata);
|
||||
typedef void (*WGPUProcDeviceCreateReadyRenderPipeline)(WGPUDevice device, WGPURenderPipelineDescriptor const * descriptor, WGPUCreateReadyRenderPipelineCallback callback, void * userdata);
|
||||
typedef WGPURenderBundleEncoder (*WGPUProcDeviceCreateRenderBundleEncoder)(WGPUDevice device, WGPURenderBundleEncoderDescriptor const * descriptor);
|
||||
typedef WGPURenderPipeline (*WGPUProcDeviceCreateRenderPipeline)(WGPUDevice device, WGPURenderPipelineDescriptor const * descriptor);
|
||||
typedef WGPURenderPipeline (*WGPUProcDeviceCreateRenderPipeline2)(WGPUDevice device, WGPURenderPipelineDescriptor2 const * descriptor);
|
||||
typedef void (*WGPUProcDeviceCreateRenderPipelineAsync)(WGPUDevice device, WGPURenderPipelineDescriptor2 const * descriptor, WGPUCreateRenderPipelineAsyncCallback callback, void * userdata);
|
||||
typedef WGPUSampler (*WGPUProcDeviceCreateSampler)(WGPUDevice device, WGPUSamplerDescriptor const * descriptor);
|
||||
typedef WGPUShaderModule (*WGPUProcDeviceCreateShaderModule)(WGPUDevice device, WGPUShaderModuleDescriptor const * descriptor);
|
||||
typedef WGPUSwapChain (*WGPUProcDeviceCreateSwapChain)(WGPUDevice device, WGPUSurface surface, WGPUSwapChainDescriptor const * descriptor);
|
||||
typedef WGPUTexture (*WGPUProcDeviceCreateTexture)(WGPUDevice device, WGPUTextureDescriptor const * descriptor);
|
||||
typedef WGPUQueue (*WGPUProcDeviceGetDefaultQueue)(WGPUDevice device);
|
||||
typedef WGPUQueue (*WGPUProcDeviceGetQueue)(WGPUDevice device);
|
||||
typedef bool (*WGPUProcDevicePopErrorScope)(WGPUDevice device, WGPUErrorCallback callback, void * userdata);
|
||||
typedef void (*WGPUProcDevicePushErrorScope)(WGPUDevice device, WGPUErrorFilter filter);
|
||||
typedef void (*WGPUProcDeviceSetDeviceLostCallback)(WGPUDevice device, WGPUDeviceLostCallback callback, void * userdata);
|
||||
|
@ -1035,12 +1038,6 @@ typedef void (*WGPUProcDeviceSetUncapturedErrorCallback)(WGPUDevice device, WGPU
|
|||
typedef void (*WGPUProcDeviceReference)(WGPUDevice device);
|
||||
typedef void (*WGPUProcDeviceRelease)(WGPUDevice device);
|
||||
|
||||
// Procs of Fence
|
||||
typedef uint64_t (*WGPUProcFenceGetCompletedValue)(WGPUFence fence);
|
||||
typedef void (*WGPUProcFenceOnCompletion)(WGPUFence fence, uint64_t value, WGPUFenceOnCompletionCallback callback, void * userdata);
|
||||
typedef void (*WGPUProcFenceReference)(WGPUFence fence);
|
||||
typedef void (*WGPUProcFenceRelease)(WGPUFence fence);
|
||||
|
||||
// Procs of Instance
|
||||
typedef WGPUSurface (*WGPUProcInstanceCreateSurface)(WGPUInstance instance, WGPUSurfaceDescriptor const * descriptor);
|
||||
typedef void (*WGPUProcInstanceProcessEvents)(WGPUInstance instance);
|
||||
|
@ -1058,8 +1055,7 @@ typedef void (*WGPUProcQuerySetReference)(WGPUQuerySet querySet);
|
|||
typedef void (*WGPUProcQuerySetRelease)(WGPUQuerySet querySet);
|
||||
|
||||
// Procs of Queue
|
||||
typedef WGPUFence (*WGPUProcQueueCreateFence)(WGPUQueue queue, WGPUFenceDescriptor const * descriptor);
|
||||
typedef void (*WGPUProcQueueSignal)(WGPUQueue queue, WGPUFence fence, uint64_t signalValue);
|
||||
typedef void (*WGPUProcQueueOnSubmittedWorkDone)(WGPUQueue queue, uint64_t signalValue, WGPUQueueWorkDoneCallback callback, void * userdata);
|
||||
typedef void (*WGPUProcQueueSubmit)(WGPUQueue queue, uint32_t commandCount, WGPUCommandBuffer const * commands);
|
||||
typedef void (*WGPUProcQueueWriteBuffer)(WGPUQueue queue, WGPUBuffer buffer, uint64_t bufferOffset, void const * data, size_t size);
|
||||
typedef void (*WGPUProcQueueWriteTexture)(WGPUQueue queue, WGPUImageCopyTexture const * destination, void const * data, size_t dataSize, WGPUTextureDataLayout const * dataLayout, WGPUExtent3D const * writeSize);
|
||||
|
@ -1100,7 +1096,7 @@ typedef void (*WGPUProcRenderPassEncoderInsertDebugMarker)(WGPURenderPassEncoder
|
|||
typedef void (*WGPUProcRenderPassEncoderPopDebugGroup)(WGPURenderPassEncoder renderPassEncoder);
|
||||
typedef void (*WGPUProcRenderPassEncoderPushDebugGroup)(WGPURenderPassEncoder renderPassEncoder, char const * groupLabel);
|
||||
typedef void (*WGPUProcRenderPassEncoderSetBindGroup)(WGPURenderPassEncoder renderPassEncoder, uint32_t groupIndex, WGPUBindGroup group, uint32_t dynamicOffsetCount, uint32_t const * dynamicOffsets);
|
||||
typedef void (*WGPUProcRenderPassEncoderSetBlendColor)(WGPURenderPassEncoder renderPassEncoder, WGPUColor const * color);
|
||||
typedef void (*WGPUProcRenderPassEncoderSetBlendConstant)(WGPURenderPassEncoder renderPassEncoder, WGPUColor const * color);
|
||||
typedef void (*WGPUProcRenderPassEncoderSetIndexBuffer)(WGPURenderPassEncoder renderPassEncoder, WGPUBuffer buffer, WGPUIndexFormat format, uint64_t offset, uint64_t size);
|
||||
typedef void (*WGPUProcRenderPassEncoderSetIndexBufferWithFormat)(WGPURenderPassEncoder renderPassEncoder, WGPUBuffer buffer, WGPUIndexFormat format, uint64_t offset, uint64_t size);
|
||||
typedef void (*WGPUProcRenderPassEncoderSetPipeline)(WGPURenderPassEncoder renderPassEncoder, WGPURenderPipeline pipeline);
|
||||
|
@ -1126,11 +1122,11 @@ typedef void (*WGPUProcShaderModuleReference)(WGPUShaderModule shaderModule);
|
|||
typedef void (*WGPUProcShaderModuleRelease)(WGPUShaderModule shaderModule);
|
||||
|
||||
// Procs of Surface
|
||||
typedef void (*WGPUProcSurfaceGetPreferredFormat)(WGPUSurface surface, WGPUAdapter adapter, WGPUSurfaceGetPreferredFormatCallback callback, void * userdata);
|
||||
typedef void (*WGPUProcSurfaceReference)(WGPUSurface surface);
|
||||
typedef void (*WGPUProcSurfaceRelease)(WGPUSurface surface);
|
||||
|
||||
// Procs of SwapChain
|
||||
typedef void (*WGPUProcSwapChainConfigure)(WGPUSwapChain swapChain, WGPUTextureFormat format, WGPUTextureUsageFlags allowedUsage, uint32_t width, uint32_t height);
|
||||
typedef WGPUTextureView (*WGPUProcSwapChainGetCurrentTextureView)(WGPUSwapChain swapChain);
|
||||
typedef void (*WGPUProcSwapChainPresent)(WGPUSwapChain swapChain);
|
||||
typedef void (*WGPUProcSwapChainReference)(WGPUSwapChain swapChain);
|
||||
|
@ -1218,17 +1214,17 @@ WGPU_EXPORT WGPUBindGroupLayout wgpuDeviceCreateBindGroupLayout(WGPUDevice devic
|
|||
WGPU_EXPORT WGPUBuffer wgpuDeviceCreateBuffer(WGPUDevice device, WGPUBufferDescriptor const * descriptor);
|
||||
WGPU_EXPORT WGPUCommandEncoder wgpuDeviceCreateCommandEncoder(WGPUDevice device, WGPUCommandEncoderDescriptor const * descriptor);
|
||||
WGPU_EXPORT WGPUComputePipeline wgpuDeviceCreateComputePipeline(WGPUDevice device, WGPUComputePipelineDescriptor const * descriptor);
|
||||
WGPU_EXPORT void wgpuDeviceCreateComputePipelineAsync(WGPUDevice device, WGPUComputePipelineDescriptor const * descriptor, WGPUCreateComputePipelineAsyncCallback callback, void * userdata);
|
||||
WGPU_EXPORT WGPUPipelineLayout wgpuDeviceCreatePipelineLayout(WGPUDevice device, WGPUPipelineLayoutDescriptor const * descriptor);
|
||||
WGPU_EXPORT WGPUQuerySet wgpuDeviceCreateQuerySet(WGPUDevice device, WGPUQuerySetDescriptor const * descriptor);
|
||||
WGPU_EXPORT void wgpuDeviceCreateReadyComputePipeline(WGPUDevice device, WGPUComputePipelineDescriptor const * descriptor, WGPUCreateReadyComputePipelineCallback callback, void * userdata);
|
||||
WGPU_EXPORT void wgpuDeviceCreateReadyRenderPipeline(WGPUDevice device, WGPURenderPipelineDescriptor const * descriptor, WGPUCreateReadyRenderPipelineCallback callback, void * userdata);
|
||||
WGPU_EXPORT WGPURenderBundleEncoder wgpuDeviceCreateRenderBundleEncoder(WGPUDevice device, WGPURenderBundleEncoderDescriptor const * descriptor);
|
||||
WGPU_EXPORT WGPURenderPipeline wgpuDeviceCreateRenderPipeline(WGPUDevice device, WGPURenderPipelineDescriptor const * descriptor);
|
||||
WGPU_EXPORT WGPURenderPipeline wgpuDeviceCreateRenderPipeline2(WGPUDevice device, WGPURenderPipelineDescriptor2 const * descriptor);
|
||||
WGPU_EXPORT void wgpuDeviceCreateRenderPipelineAsync(WGPUDevice device, WGPURenderPipelineDescriptor2 const * descriptor, WGPUCreateRenderPipelineAsyncCallback callback, void * userdata);
|
||||
WGPU_EXPORT WGPUSampler wgpuDeviceCreateSampler(WGPUDevice device, WGPUSamplerDescriptor const * descriptor);
|
||||
WGPU_EXPORT WGPUShaderModule wgpuDeviceCreateShaderModule(WGPUDevice device, WGPUShaderModuleDescriptor const * descriptor);
|
||||
WGPU_EXPORT WGPUSwapChain wgpuDeviceCreateSwapChain(WGPUDevice device, WGPUSurface surface, WGPUSwapChainDescriptor const * descriptor);
|
||||
WGPU_EXPORT WGPUTexture wgpuDeviceCreateTexture(WGPUDevice device, WGPUTextureDescriptor const * descriptor);
|
||||
WGPU_EXPORT WGPUQueue wgpuDeviceGetDefaultQueue(WGPUDevice device);
|
||||
WGPU_EXPORT WGPUQueue wgpuDeviceGetQueue(WGPUDevice device);
|
||||
WGPU_EXPORT bool wgpuDevicePopErrorScope(WGPUDevice device, WGPUErrorCallback callback, void * userdata);
|
||||
WGPU_EXPORT void wgpuDevicePushErrorScope(WGPUDevice device, WGPUErrorFilter filter);
|
||||
WGPU_EXPORT void wgpuDeviceSetDeviceLostCallback(WGPUDevice device, WGPUDeviceLostCallback callback, void * userdata);
|
||||
|
@ -1236,12 +1232,6 @@ WGPU_EXPORT void wgpuDeviceSetUncapturedErrorCallback(WGPUDevice device, WGPUErr
|
|||
WGPU_EXPORT void wgpuDeviceReference(WGPUDevice device);
|
||||
WGPU_EXPORT void wgpuDeviceRelease(WGPUDevice device);
|
||||
|
||||
// Methods of Fence
|
||||
WGPU_EXPORT uint64_t wgpuFenceGetCompletedValue(WGPUFence fence);
|
||||
WGPU_EXPORT void wgpuFenceOnCompletion(WGPUFence fence, uint64_t value, WGPUFenceOnCompletionCallback callback, void * userdata);
|
||||
WGPU_EXPORT void wgpuFenceReference(WGPUFence fence);
|
||||
WGPU_EXPORT void wgpuFenceRelease(WGPUFence fence);
|
||||
|
||||
// Methods of Instance
|
||||
WGPU_EXPORT WGPUSurface wgpuInstanceCreateSurface(WGPUInstance instance, WGPUSurfaceDescriptor const * descriptor);
|
||||
WGPU_EXPORT void wgpuInstanceProcessEvents(WGPUInstance instance);
|
||||
|
@ -1259,8 +1249,7 @@ WGPU_EXPORT void wgpuQuerySetReference(WGPUQuerySet querySet);
|
|||
WGPU_EXPORT void wgpuQuerySetRelease(WGPUQuerySet querySet);
|
||||
|
||||
// Methods of Queue
|
||||
WGPU_EXPORT WGPUFence wgpuQueueCreateFence(WGPUQueue queue, WGPUFenceDescriptor const * descriptor);
|
||||
WGPU_EXPORT void wgpuQueueSignal(WGPUQueue queue, WGPUFence fence, uint64_t signalValue);
|
||||
WGPU_EXPORT void wgpuQueueOnSubmittedWorkDone(WGPUQueue queue, uint64_t signalValue, WGPUQueueWorkDoneCallback callback, void * userdata);
|
||||
WGPU_EXPORT void wgpuQueueSubmit(WGPUQueue queue, uint32_t commandCount, WGPUCommandBuffer const * commands);
|
||||
WGPU_EXPORT void wgpuQueueWriteBuffer(WGPUQueue queue, WGPUBuffer buffer, uint64_t bufferOffset, void const * data, size_t size);
|
||||
WGPU_EXPORT void wgpuQueueWriteTexture(WGPUQueue queue, WGPUImageCopyTexture const * destination, void const * data, size_t dataSize, WGPUTextureDataLayout const * dataLayout, WGPUExtent3D const * writeSize);
|
||||
|
@ -1301,7 +1290,7 @@ WGPU_EXPORT void wgpuRenderPassEncoderInsertDebugMarker(WGPURenderPassEncoder re
|
|||
WGPU_EXPORT void wgpuRenderPassEncoderPopDebugGroup(WGPURenderPassEncoder renderPassEncoder);
|
||||
WGPU_EXPORT void wgpuRenderPassEncoderPushDebugGroup(WGPURenderPassEncoder renderPassEncoder, char const * groupLabel);
|
||||
WGPU_EXPORT void wgpuRenderPassEncoderSetBindGroup(WGPURenderPassEncoder renderPassEncoder, uint32_t groupIndex, WGPUBindGroup group, uint32_t dynamicOffsetCount, uint32_t const * dynamicOffsets);
|
||||
WGPU_EXPORT void wgpuRenderPassEncoderSetBlendColor(WGPURenderPassEncoder renderPassEncoder, WGPUColor const * color);
|
||||
WGPU_EXPORT void wgpuRenderPassEncoderSetBlendConstant(WGPURenderPassEncoder renderPassEncoder, WGPUColor const * color);
|
||||
WGPU_EXPORT void wgpuRenderPassEncoderSetIndexBuffer(WGPURenderPassEncoder renderPassEncoder, WGPUBuffer buffer, WGPUIndexFormat format, uint64_t offset, uint64_t size);
|
||||
WGPU_EXPORT void wgpuRenderPassEncoderSetIndexBufferWithFormat(WGPURenderPassEncoder renderPassEncoder, WGPUBuffer buffer, WGPUIndexFormat format, uint64_t offset, uint64_t size);
|
||||
WGPU_EXPORT void wgpuRenderPassEncoderSetPipeline(WGPURenderPassEncoder renderPassEncoder, WGPURenderPipeline pipeline);
|
||||
|
@ -1327,11 +1316,11 @@ WGPU_EXPORT void wgpuShaderModuleReference(WGPUShaderModule shaderModule);
|
|||
WGPU_EXPORT void wgpuShaderModuleRelease(WGPUShaderModule shaderModule);
|
||||
|
||||
// Methods of Surface
|
||||
WGPU_EXPORT void wgpuSurfaceGetPreferredFormat(WGPUSurface surface, WGPUAdapter adapter, WGPUSurfaceGetPreferredFormatCallback callback, void * userdata);
|
||||
WGPU_EXPORT void wgpuSurfaceReference(WGPUSurface surface);
|
||||
WGPU_EXPORT void wgpuSurfaceRelease(WGPUSurface surface);
|
||||
|
||||
// Methods of SwapChain
|
||||
WGPU_EXPORT void wgpuSwapChainConfigure(WGPUSwapChain swapChain, WGPUTextureFormat format, WGPUTextureUsageFlags allowedUsage, uint32_t width, uint32_t height);
|
||||
WGPU_EXPORT WGPUTextureView wgpuSwapChainGetCurrentTextureView(WGPUSwapChain swapChain);
|
||||
WGPU_EXPORT void wgpuSwapChainPresent(WGPUSwapChain swapChain);
|
||||
WGPU_EXPORT void wgpuSwapChainReference(WGPUSwapChain swapChain);
|
||||
|
|
|
@ -155,33 +155,20 @@ namespace wgpu {
|
|||
OpenGLES = 0x00000006,
|
||||
};
|
||||
|
||||
enum class BindingType : uint32_t {
|
||||
Undefined = 0x00000000,
|
||||
UniformBuffer = 0x00000001,
|
||||
StorageBuffer = 0x00000002,
|
||||
ReadonlyStorageBuffer = 0x00000003,
|
||||
Sampler = 0x00000004,
|
||||
ComparisonSampler = 0x00000005,
|
||||
SampledTexture = 0x00000006,
|
||||
MultisampledTexture = 0x00000007,
|
||||
ReadonlyStorageTexture = 0x00000008,
|
||||
WriteonlyStorageTexture = 0x00000009,
|
||||
};
|
||||
|
||||
enum class BlendFactor : uint32_t {
|
||||
Zero = 0x00000000,
|
||||
One = 0x00000001,
|
||||
SrcColor = 0x00000002,
|
||||
OneMinusSrcColor = 0x00000003,
|
||||
Src = 0x00000002,
|
||||
OneMinusSrc = 0x00000003,
|
||||
SrcAlpha = 0x00000004,
|
||||
OneMinusSrcAlpha = 0x00000005,
|
||||
DstColor = 0x00000006,
|
||||
OneMinusDstColor = 0x00000007,
|
||||
Dst = 0x00000006,
|
||||
OneMinusDst = 0x00000007,
|
||||
DstAlpha = 0x00000008,
|
||||
OneMinusDstAlpha = 0x00000009,
|
||||
SrcAlphaSaturated = 0x0000000A,
|
||||
BlendColor = 0x0000000B,
|
||||
OneMinusBlendColor = 0x0000000C,
|
||||
Constant = 0x0000000B,
|
||||
OneMinusConstant = 0x0000000C,
|
||||
};
|
||||
|
||||
enum class BlendOperation : uint32_t {
|
||||
|
@ -220,7 +207,7 @@ namespace wgpu {
|
|||
Always = 0x00000008,
|
||||
};
|
||||
|
||||
enum class CreateReadyPipelineStatus : uint32_t {
|
||||
enum class CreatePipelineAsyncStatus : uint32_t {
|
||||
Success = 0x00000000,
|
||||
Error = 0x00000001,
|
||||
DeviceLost = 0x00000002,
|
||||
|
@ -248,13 +235,6 @@ namespace wgpu {
|
|||
DeviceLost = 0x00000004,
|
||||
};
|
||||
|
||||
enum class FenceCompletionStatus : uint32_t {
|
||||
Success = 0x00000000,
|
||||
Error = 0x00000001,
|
||||
Unknown = 0x00000002,
|
||||
DeviceLost = 0x00000003,
|
||||
};
|
||||
|
||||
enum class FilterMode : uint32_t {
|
||||
Nearest = 0x00000000,
|
||||
Linear = 0x00000001,
|
||||
|
@ -309,6 +289,13 @@ namespace wgpu {
|
|||
Timestamp = 0x00000002,
|
||||
};
|
||||
|
||||
enum class QueueWorkDoneStatus : uint32_t {
|
||||
Success = 0x00000000,
|
||||
Error = 0x00000001,
|
||||
Unknown = 0x00000002,
|
||||
DeviceLost = 0x00000003,
|
||||
};
|
||||
|
||||
enum class SType : uint32_t {
|
||||
Invalid = 0x00000000,
|
||||
SurfaceDescriptorFromMetalLayer = 0x00000001,
|
||||
|
@ -317,6 +304,7 @@ namespace wgpu {
|
|||
SurfaceDescriptorFromCanvasHTMLSelector = 0x00000004,
|
||||
ShaderModuleSPIRVDescriptor = 0x00000005,
|
||||
ShaderModuleWGSLDescriptor = 0x00000006,
|
||||
PrimitiveDepthClampingState = 0x00000007,
|
||||
};
|
||||
|
||||
enum class SamplerBindingType : uint32_t {
|
||||
|
@ -407,21 +395,22 @@ namespace wgpu {
|
|||
RGBA32Sint = 0x00000024,
|
||||
Depth32Float = 0x00000025,
|
||||
Depth24Plus = 0x00000026,
|
||||
Depth24PlusStencil8 = 0x00000027,
|
||||
BC1RGBAUnorm = 0x00000028,
|
||||
BC1RGBAUnormSrgb = 0x00000029,
|
||||
BC2RGBAUnorm = 0x0000002A,
|
||||
BC2RGBAUnormSrgb = 0x0000002B,
|
||||
BC3RGBAUnorm = 0x0000002C,
|
||||
BC3RGBAUnormSrgb = 0x0000002D,
|
||||
BC4RUnorm = 0x0000002E,
|
||||
BC4RSnorm = 0x0000002F,
|
||||
BC5RGUnorm = 0x00000030,
|
||||
BC5RGSnorm = 0x00000031,
|
||||
BC6HRGBUfloat = 0x00000032,
|
||||
BC6HRGBFloat = 0x00000033,
|
||||
BC7RGBAUnorm = 0x00000034,
|
||||
BC7RGBAUnormSrgb = 0x00000035,
|
||||
Stencil8 = 0x00000027,
|
||||
Depth24PlusStencil8 = 0x00000028,
|
||||
BC1RGBAUnorm = 0x00000029,
|
||||
BC1RGBAUnormSrgb = 0x0000002A,
|
||||
BC2RGBAUnorm = 0x0000002B,
|
||||
BC2RGBAUnormSrgb = 0x0000002C,
|
||||
BC3RGBAUnorm = 0x0000002D,
|
||||
BC3RGBAUnormSrgb = 0x0000002E,
|
||||
BC4RUnorm = 0x0000002F,
|
||||
BC4RSnorm = 0x00000030,
|
||||
BC5RGUnorm = 0x00000031,
|
||||
BC5RGSnorm = 0x00000032,
|
||||
BC6HRGBUfloat = 0x00000033,
|
||||
BC6HRGBFloat = 0x00000034,
|
||||
BC7RGBAUnorm = 0x00000035,
|
||||
BC7RGBAUnormSrgb = 0x00000036,
|
||||
};
|
||||
|
||||
enum class TextureSampleType : uint32_t {
|
||||
|
@ -444,36 +433,37 @@ namespace wgpu {
|
|||
};
|
||||
|
||||
enum class VertexFormat : uint32_t {
|
||||
UChar2 = 0x00000000,
|
||||
UChar4 = 0x00000001,
|
||||
Char2 = 0x00000002,
|
||||
Char4 = 0x00000003,
|
||||
UChar2Norm = 0x00000004,
|
||||
UChar4Norm = 0x00000005,
|
||||
Char2Norm = 0x00000006,
|
||||
Char4Norm = 0x00000007,
|
||||
UShort2 = 0x00000008,
|
||||
UShort4 = 0x00000009,
|
||||
Short2 = 0x0000000A,
|
||||
Short4 = 0x0000000B,
|
||||
UShort2Norm = 0x0000000C,
|
||||
UShort4Norm = 0x0000000D,
|
||||
Short2Norm = 0x0000000E,
|
||||
Short4Norm = 0x0000000F,
|
||||
Half2 = 0x00000010,
|
||||
Half4 = 0x00000011,
|
||||
Float = 0x00000012,
|
||||
Float2 = 0x00000013,
|
||||
Float3 = 0x00000014,
|
||||
Float4 = 0x00000015,
|
||||
UInt = 0x00000016,
|
||||
UInt2 = 0x00000017,
|
||||
UInt3 = 0x00000018,
|
||||
UInt4 = 0x00000019,
|
||||
Int = 0x0000001A,
|
||||
Int2 = 0x0000001B,
|
||||
Int3 = 0x0000001C,
|
||||
Int4 = 0x0000001D,
|
||||
Undefined = 0x00000000,
|
||||
Uint8x2 = 0x00000001,
|
||||
Uint8x4 = 0x00000002,
|
||||
Sint8x2 = 0x00000003,
|
||||
Sint8x4 = 0x00000004,
|
||||
Unorm8x2 = 0x00000005,
|
||||
Unorm8x4 = 0x00000006,
|
||||
Snorm8x2 = 0x00000007,
|
||||
Snorm8x4 = 0x00000008,
|
||||
Uint16x2 = 0x00000009,
|
||||
Uint16x4 = 0x0000000A,
|
||||
Sint16x2 = 0x0000000B,
|
||||
Sint16x4 = 0x0000000C,
|
||||
Unorm16x2 = 0x0000000D,
|
||||
Unorm16x4 = 0x0000000E,
|
||||
Snorm16x2 = 0x0000000F,
|
||||
Snorm16x4 = 0x00000010,
|
||||
Float16x2 = 0x00000011,
|
||||
Float16x4 = 0x00000012,
|
||||
Float32 = 0x00000013,
|
||||
Float32x2 = 0x00000014,
|
||||
Float32x3 = 0x00000015,
|
||||
Float32x4 = 0x00000016,
|
||||
Uint32 = 0x00000017,
|
||||
Uint32x2 = 0x00000018,
|
||||
Uint32x3 = 0x00000019,
|
||||
Uint32x4 = 0x0000001A,
|
||||
Sint32 = 0x0000001B,
|
||||
Sint32x2 = 0x0000001C,
|
||||
Sint32x3 = 0x0000001D,
|
||||
Sint32x4 = 0x0000001E,
|
||||
};
|
||||
|
||||
|
||||
|
@ -552,11 +542,11 @@ namespace wgpu {
|
|||
|
||||
using Proc = WGPUProc;
|
||||
using BufferMapCallback = WGPUBufferMapCallback;
|
||||
using CreateReadyComputePipelineCallback = WGPUCreateReadyComputePipelineCallback;
|
||||
using CreateReadyRenderPipelineCallback = WGPUCreateReadyRenderPipelineCallback;
|
||||
using CreateComputePipelineAsyncCallback = WGPUCreateComputePipelineAsyncCallback;
|
||||
using CreateRenderPipelineAsyncCallback = WGPUCreateRenderPipelineAsyncCallback;
|
||||
using DeviceLostCallback = WGPUDeviceLostCallback;
|
||||
using ErrorCallback = WGPUErrorCallback;
|
||||
using FenceOnCompletionCallback = WGPUFenceOnCompletionCallback;
|
||||
using QueueWorkDoneCallback = WGPUQueueWorkDoneCallback;
|
||||
|
||||
class BindGroup;
|
||||
class BindGroupLayout;
|
||||
|
@ -566,7 +556,6 @@ namespace wgpu {
|
|||
class ComputePassEncoder;
|
||||
class ComputePipeline;
|
||||
class Device;
|
||||
class Fence;
|
||||
class Instance;
|
||||
class PipelineLayout;
|
||||
class QuerySet;
|
||||
|
@ -584,7 +573,7 @@ namespace wgpu {
|
|||
|
||||
struct AdapterProperties;
|
||||
struct BindGroupEntry;
|
||||
struct BlendDescriptor;
|
||||
struct BlendComponent;
|
||||
struct BufferBindingLayout;
|
||||
struct BufferDescriptor;
|
||||
struct Color;
|
||||
|
@ -592,22 +581,23 @@ namespace wgpu {
|
|||
struct CommandEncoderDescriptor;
|
||||
struct ComputePassDescriptor;
|
||||
struct Extent3D;
|
||||
struct FenceDescriptor;
|
||||
struct InstanceDescriptor;
|
||||
struct MultisampleState;
|
||||
struct Origin3D;
|
||||
struct PipelineLayoutDescriptor;
|
||||
struct PrimitiveDepthClampingState;
|
||||
struct PrimitiveState;
|
||||
struct ProgrammableStageDescriptor;
|
||||
struct QuerySetDescriptor;
|
||||
struct RasterizationStateDescriptor;
|
||||
struct RenderBundleDescriptor;
|
||||
struct RenderBundleEncoderDescriptor;
|
||||
struct RenderPassDepthStencilAttachmentDescriptor;
|
||||
struct RenderPassDepthStencilAttachment;
|
||||
struct SamplerBindingLayout;
|
||||
struct SamplerDescriptor;
|
||||
struct ShaderModuleDescriptor;
|
||||
struct ShaderModuleSPIRVDescriptor;
|
||||
struct ShaderModuleWGSLDescriptor;
|
||||
struct StencilStateFaceDescriptor;
|
||||
struct StencilFaceState;
|
||||
struct StorageTextureBindingLayout;
|
||||
struct SurfaceDescriptor;
|
||||
struct SurfaceDescriptorFromCanvasHTMLSelector;
|
||||
|
@ -618,29 +608,23 @@ namespace wgpu {
|
|||
struct TextureBindingLayout;
|
||||
struct TextureDataLayout;
|
||||
struct TextureViewDescriptor;
|
||||
struct VertexAttributeDescriptor;
|
||||
struct VertexAttribute;
|
||||
struct BindGroupDescriptor;
|
||||
struct BindGroupLayoutEntry;
|
||||
struct ImageCopyBuffer;
|
||||
struct ColorStateDescriptor;
|
||||
struct BlendState;
|
||||
struct ComputePipelineDescriptor;
|
||||
struct DepthStencilStateDescriptor;
|
||||
struct RenderPassColorAttachmentDescriptor;
|
||||
struct DepthStencilState;
|
||||
struct ImageCopyBuffer;
|
||||
struct ImageCopyTexture;
|
||||
struct RenderPassColorAttachment;
|
||||
struct TextureDescriptor;
|
||||
struct VertexBufferLayoutDescriptor;
|
||||
struct VertexBufferLayout;
|
||||
struct BindGroupLayoutDescriptor;
|
||||
struct ColorTargetState;
|
||||
struct RenderPassDescriptor;
|
||||
struct VertexStateDescriptor;
|
||||
struct RenderPipelineDescriptor;
|
||||
|
||||
// BufferCopyView is deprecated.
|
||||
// Use ImageCopyBuffer instead.
|
||||
using BufferCopyView = ImageCopyBuffer;
|
||||
|
||||
// TextureCopyView is deprecated.
|
||||
// Use ImageCopyTexture instead.
|
||||
using TextureCopyView = ImageCopyTexture;
|
||||
struct VertexState;
|
||||
struct FragmentState;
|
||||
struct RenderPipelineDescriptor2;
|
||||
|
||||
template<typename Derived, typename CType>
|
||||
class ObjectBase {
|
||||
|
@ -840,17 +824,17 @@ namespace wgpu {
|
|||
Buffer CreateBuffer(BufferDescriptor const * descriptor) const;
|
||||
CommandEncoder CreateCommandEncoder(CommandEncoderDescriptor const * descriptor = nullptr) const;
|
||||
ComputePipeline CreateComputePipeline(ComputePipelineDescriptor const * descriptor) const;
|
||||
void CreateComputePipelineAsync(ComputePipelineDescriptor const * descriptor, CreateComputePipelineAsyncCallback callback, void * userdata) const;
|
||||
PipelineLayout CreatePipelineLayout(PipelineLayoutDescriptor const * descriptor) const;
|
||||
QuerySet CreateQuerySet(QuerySetDescriptor const * descriptor) const;
|
||||
void CreateReadyComputePipeline(ComputePipelineDescriptor const * descriptor, CreateReadyComputePipelineCallback callback, void * userdata) const;
|
||||
void CreateReadyRenderPipeline(RenderPipelineDescriptor const * descriptor, CreateReadyRenderPipelineCallback callback, void * userdata) const;
|
||||
RenderBundleEncoder CreateRenderBundleEncoder(RenderBundleEncoderDescriptor const * descriptor) const;
|
||||
RenderPipeline CreateRenderPipeline(RenderPipelineDescriptor const * descriptor) const;
|
||||
Sampler CreateSampler(SamplerDescriptor const * descriptor) const;
|
||||
RenderPipeline CreateRenderPipeline2(RenderPipelineDescriptor2 const * descriptor) const;
|
||||
void CreateRenderPipelineAsync(RenderPipelineDescriptor2 const * descriptor, CreateRenderPipelineAsyncCallback callback, void * userdata) const;
|
||||
Sampler CreateSampler(SamplerDescriptor const * descriptor = nullptr) const;
|
||||
ShaderModule CreateShaderModule(ShaderModuleDescriptor const * descriptor) const;
|
||||
SwapChain CreateSwapChain(Surface const& surface, SwapChainDescriptor const * descriptor) const;
|
||||
Texture CreateTexture(TextureDescriptor const * descriptor) const;
|
||||
Queue GetDefaultQueue() const;
|
||||
Queue GetQueue() const;
|
||||
bool PopErrorScope(ErrorCallback callback, void * userdata) const;
|
||||
void PushErrorScope(ErrorFilter filter) const;
|
||||
void SetDeviceLostCallback(DeviceLostCallback callback, void * userdata) const;
|
||||
|
@ -862,20 +846,6 @@ namespace wgpu {
|
|||
static void WGPURelease(WGPUDevice handle);
|
||||
};
|
||||
|
||||
class Fence : public ObjectBase<Fence, WGPUFence> {
|
||||
public:
|
||||
using ObjectBase::ObjectBase;
|
||||
using ObjectBase::operator=;
|
||||
|
||||
uint64_t GetCompletedValue() const;
|
||||
void OnCompletion(uint64_t value, FenceOnCompletionCallback callback, void * userdata) const;
|
||||
|
||||
private:
|
||||
friend ObjectBase<Fence, WGPUFence>;
|
||||
static void WGPUReference(WGPUFence handle);
|
||||
static void WGPURelease(WGPUFence handle);
|
||||
};
|
||||
|
||||
class Instance : public ObjectBase<Instance, WGPUInstance> {
|
||||
public:
|
||||
using ObjectBase::ObjectBase;
|
||||
|
@ -919,8 +889,7 @@ namespace wgpu {
|
|||
using ObjectBase::ObjectBase;
|
||||
using ObjectBase::operator=;
|
||||
|
||||
Fence CreateFence(FenceDescriptor const * descriptor = nullptr) const;
|
||||
void Signal(Fence const& fence, uint64_t signalValue) const;
|
||||
void OnSubmittedWorkDone(uint64_t signalValue, QueueWorkDoneCallback callback, void * userdata) const;
|
||||
void Submit(uint32_t commandCount, CommandBuffer const * commands) const;
|
||||
void WriteBuffer(Buffer const& buffer, uint64_t bufferOffset, void const * data, size_t size) const;
|
||||
void WriteTexture(ImageCopyTexture const * destination, void const * data, size_t dataSize, TextureDataLayout const * dataLayout, Extent3D const * writeSize) const;
|
||||
|
@ -985,7 +954,7 @@ namespace wgpu {
|
|||
void PopDebugGroup() const;
|
||||
void PushDebugGroup(char const * groupLabel) const;
|
||||
void SetBindGroup(uint32_t groupIndex, BindGroup const& group, uint32_t dynamicOffsetCount = 0, uint32_t const * dynamicOffsets = nullptr) const;
|
||||
void SetBlendColor(Color const * color) const;
|
||||
void SetBlendConstant(Color const * color) const;
|
||||
void SetIndexBuffer(Buffer const& buffer, IndexFormat format, uint64_t offset = 0, uint64_t size = 0) const;
|
||||
void SetIndexBufferWithFormat(Buffer const& buffer, IndexFormat format, uint64_t offset = 0, uint64_t size = 0) const;
|
||||
void SetPipeline(RenderPipeline const& pipeline) const;
|
||||
|
@ -1055,6 +1024,7 @@ namespace wgpu {
|
|||
using ObjectBase::ObjectBase;
|
||||
using ObjectBase::operator=;
|
||||
|
||||
void Configure(TextureFormat format, TextureUsage allowedUsage, uint32_t width, uint32_t height) const;
|
||||
TextureView GetCurrentTextureView() const;
|
||||
void Present() const;
|
||||
|
||||
|
@ -1118,7 +1088,7 @@ namespace wgpu {
|
|||
TextureView textureView = nullptr;
|
||||
};
|
||||
|
||||
struct BlendDescriptor {
|
||||
struct BlendComponent {
|
||||
BlendOperation operation = BlendOperation::Add;
|
||||
BlendFactor srcFactor = BlendFactor::One;
|
||||
BlendFactor dstFactor = BlendFactor::Zero;
|
||||
|
@ -1161,27 +1131,23 @@ namespace wgpu {
|
|||
char const * label = nullptr;
|
||||
};
|
||||
|
||||
struct CopyTextureForBrowserOptions {
|
||||
ChainedStruct const * nextInChain = nullptr;
|
||||
bool flipY = false;
|
||||
};
|
||||
|
||||
struct Extent3D {
|
||||
uint32_t width = 1;
|
||||
uint32_t width;
|
||||
uint32_t height = 1;
|
||||
uint32_t depth = 1;
|
||||
};
|
||||
|
||||
struct FenceDescriptor {
|
||||
ChainedStruct const * nextInChain = nullptr;
|
||||
char const * label = nullptr;
|
||||
uint64_t initialValue = 0;
|
||||
uint32_t depthOrArrayLayers = 1;
|
||||
};
|
||||
|
||||
struct InstanceDescriptor {
|
||||
ChainedStruct const * nextInChain = nullptr;
|
||||
};
|
||||
|
||||
struct MultisampleState {
|
||||
ChainedStruct const * nextInChain = nullptr;
|
||||
uint32_t count = 1;
|
||||
uint32_t mask = 0xFFFFFFFF;
|
||||
bool alphaToCoverageEnabled = false;
|
||||
};
|
||||
|
||||
struct Origin3D {
|
||||
uint32_t x = 0;
|
||||
uint32_t y = 0;
|
||||
|
@ -1195,6 +1161,21 @@ namespace wgpu {
|
|||
BindGroupLayout const * bindGroupLayouts;
|
||||
};
|
||||
|
||||
struct PrimitiveDepthClampingState : ChainedStruct {
|
||||
PrimitiveDepthClampingState() {
|
||||
sType = SType::PrimitiveDepthClampingState;
|
||||
}
|
||||
alignas(ChainedStruct) bool clampDepth = false;
|
||||
};
|
||||
|
||||
struct PrimitiveState {
|
||||
ChainedStruct const * nextInChain = nullptr;
|
||||
PrimitiveTopology topology = PrimitiveTopology::TriangleList;
|
||||
IndexFormat stripIndexFormat = IndexFormat::Undefined;
|
||||
FrontFace frontFace = FrontFace::CCW;
|
||||
CullMode cullMode = CullMode::None;
|
||||
};
|
||||
|
||||
struct ProgrammableStageDescriptor {
|
||||
ChainedStruct const * nextInChain = nullptr;
|
||||
ShaderModule module;
|
||||
|
@ -1210,15 +1191,6 @@ namespace wgpu {
|
|||
uint32_t pipelineStatisticsCount = 0;
|
||||
};
|
||||
|
||||
struct RasterizationStateDescriptor {
|
||||
ChainedStruct const * nextInChain = nullptr;
|
||||
FrontFace frontFace = FrontFace::CCW;
|
||||
CullMode cullMode = CullMode::None;
|
||||
int32_t depthBias = 0;
|
||||
float depthBiasSlopeScale = 0.0f;
|
||||
float depthBiasClamp = 0.0f;
|
||||
};
|
||||
|
||||
struct RenderBundleDescriptor {
|
||||
ChainedStruct const * nextInChain = nullptr;
|
||||
char const * label = nullptr;
|
||||
|
@ -1233,8 +1205,8 @@ namespace wgpu {
|
|||
uint32_t sampleCount = 1;
|
||||
};
|
||||
|
||||
struct RenderPassDepthStencilAttachmentDescriptor {
|
||||
TextureView attachment;
|
||||
struct RenderPassDepthStencilAttachment {
|
||||
TextureView view = nullptr;
|
||||
LoadOp depthLoadOp;
|
||||
StoreOp depthStoreOp;
|
||||
float clearDepth;
|
||||
|
@ -1285,7 +1257,7 @@ namespace wgpu {
|
|||
alignas(ChainedStruct) char const * source;
|
||||
};
|
||||
|
||||
struct StencilStateFaceDescriptor {
|
||||
struct StencilFaceState {
|
||||
CompareFunction compare = CompareFunction::Always;
|
||||
StencilOperation failOp = StencilOperation::Keep;
|
||||
StencilOperation depthFailOp = StencilOperation::Keep;
|
||||
|
@ -1370,7 +1342,7 @@ namespace wgpu {
|
|||
TextureAspect aspect = TextureAspect::All;
|
||||
};
|
||||
|
||||
struct VertexAttributeDescriptor {
|
||||
struct VertexAttribute {
|
||||
VertexFormat format;
|
||||
uint64_t offset;
|
||||
uint32_t shaderLocation;
|
||||
|
@ -1385,32 +1357,18 @@ namespace wgpu {
|
|||
};
|
||||
|
||||
struct BindGroupLayoutEntry {
|
||||
ChainedStruct const * nextInChain = nullptr;
|
||||
uint32_t binding;
|
||||
ShaderStage visibility;
|
||||
BindingType type = BindingType::Undefined;
|
||||
bool hasDynamicOffset = false;
|
||||
uint64_t minBufferBindingSize = 0;
|
||||
TextureViewDimension viewDimension = TextureViewDimension::Undefined;
|
||||
TextureComponentType textureComponentType = TextureComponentType::Float;
|
||||
TextureFormat storageTextureFormat = TextureFormat::Undefined;
|
||||
BufferBindingLayout buffer;
|
||||
SamplerBindingLayout sampler;
|
||||
TextureBindingLayout texture;
|
||||
StorageTextureBindingLayout storageTexture;
|
||||
};
|
||||
|
||||
struct ImageCopyBuffer {
|
||||
ChainedStruct const * nextInChain = nullptr;
|
||||
TextureDataLayout layout;
|
||||
Buffer buffer;
|
||||
};
|
||||
|
||||
struct ColorStateDescriptor {
|
||||
ChainedStruct const * nextInChain = nullptr;
|
||||
TextureFormat format;
|
||||
BlendDescriptor alphaBlend;
|
||||
BlendDescriptor colorBlend;
|
||||
ColorWriteMask writeMask = ColorWriteMask::All;
|
||||
struct BlendState {
|
||||
BlendComponent color;
|
||||
BlendComponent alpha;
|
||||
};
|
||||
|
||||
struct ComputePipelineDescriptor {
|
||||
|
@ -1420,23 +1378,24 @@ namespace wgpu {
|
|||
ProgrammableStageDescriptor computeStage;
|
||||
};
|
||||
|
||||
struct DepthStencilStateDescriptor {
|
||||
struct DepthStencilState {
|
||||
ChainedStruct const * nextInChain = nullptr;
|
||||
TextureFormat format;
|
||||
bool depthWriteEnabled = false;
|
||||
CompareFunction depthCompare = CompareFunction::Always;
|
||||
StencilStateFaceDescriptor stencilFront;
|
||||
StencilStateFaceDescriptor stencilBack;
|
||||
StencilFaceState stencilFront;
|
||||
StencilFaceState stencilBack;
|
||||
uint32_t stencilReadMask = 0xFFFFFFFF;
|
||||
uint32_t stencilWriteMask = 0xFFFFFFFF;
|
||||
int32_t depthBias = 0;
|
||||
float depthBiasSlopeScale = 0.0f;
|
||||
float depthBiasClamp = 0.0f;
|
||||
};
|
||||
|
||||
struct RenderPassColorAttachmentDescriptor {
|
||||
TextureView attachment;
|
||||
TextureView resolveTarget = nullptr;
|
||||
LoadOp loadOp;
|
||||
StoreOp storeOp;
|
||||
Color clearColor;
|
||||
struct ImageCopyBuffer {
|
||||
ChainedStruct const * nextInChain = nullptr;
|
||||
TextureDataLayout layout;
|
||||
Buffer buffer;
|
||||
};
|
||||
|
||||
struct ImageCopyTexture {
|
||||
|
@ -1447,6 +1406,14 @@ namespace wgpu {
|
|||
TextureAspect aspect = TextureAspect::All;
|
||||
};
|
||||
|
||||
struct RenderPassColorAttachment {
|
||||
TextureView view = nullptr;
|
||||
TextureView resolveTarget = nullptr;
|
||||
LoadOp loadOp;
|
||||
StoreOp storeOp;
|
||||
Color clearColor;
|
||||
};
|
||||
|
||||
struct TextureDescriptor {
|
||||
ChainedStruct const * nextInChain = nullptr;
|
||||
char const * label = nullptr;
|
||||
|
@ -1458,11 +1425,11 @@ namespace wgpu {
|
|||
uint32_t sampleCount = 1;
|
||||
};
|
||||
|
||||
struct VertexBufferLayoutDescriptor {
|
||||
struct VertexBufferLayout {
|
||||
uint64_t arrayStride;
|
||||
InputStepMode stepMode = InputStepMode::Vertex;
|
||||
uint32_t attributeCount;
|
||||
VertexAttributeDescriptor const * attributes;
|
||||
VertexAttribute const * attributes;
|
||||
};
|
||||
|
||||
struct BindGroupLayoutDescriptor {
|
||||
|
@ -1472,37 +1439,47 @@ namespace wgpu {
|
|||
BindGroupLayoutEntry const * entries;
|
||||
};
|
||||
|
||||
struct ColorTargetState {
|
||||
ChainedStruct const * nextInChain = nullptr;
|
||||
TextureFormat format;
|
||||
BlendState const * blend = nullptr;
|
||||
ColorWriteMask writeMask = ColorWriteMask::All;
|
||||
};
|
||||
|
||||
struct RenderPassDescriptor {
|
||||
ChainedStruct const * nextInChain = nullptr;
|
||||
char const * label = nullptr;
|
||||
uint32_t colorAttachmentCount;
|
||||
RenderPassColorAttachmentDescriptor const * colorAttachments;
|
||||
RenderPassDepthStencilAttachmentDescriptor const * depthStencilAttachment = nullptr;
|
||||
RenderPassColorAttachment const * colorAttachments;
|
||||
RenderPassDepthStencilAttachment const * depthStencilAttachment = nullptr;
|
||||
QuerySet occlusionQuerySet = nullptr;
|
||||
};
|
||||
|
||||
struct VertexStateDescriptor {
|
||||
struct VertexState {
|
||||
ChainedStruct const * nextInChain = nullptr;
|
||||
IndexFormat indexFormat = IndexFormat::Undefined;
|
||||
uint32_t vertexBufferCount = 0;
|
||||
VertexBufferLayoutDescriptor const * vertexBuffers;
|
||||
ShaderModule module;
|
||||
char const * entryPoint;
|
||||
uint32_t bufferCount = 0;
|
||||
VertexBufferLayout const * buffers;
|
||||
};
|
||||
|
||||
struct RenderPipelineDescriptor {
|
||||
struct FragmentState {
|
||||
ChainedStruct const * nextInChain = nullptr;
|
||||
ShaderModule module;
|
||||
char const * entryPoint;
|
||||
uint32_t targetCount;
|
||||
ColorTargetState const * targets;
|
||||
};
|
||||
|
||||
struct RenderPipelineDescriptor2 {
|
||||
ChainedStruct const * nextInChain = nullptr;
|
||||
char const * label = nullptr;
|
||||
PipelineLayout layout = nullptr;
|
||||
ProgrammableStageDescriptor vertexStage;
|
||||
ProgrammableStageDescriptor const * fragmentStage = nullptr;
|
||||
VertexStateDescriptor const * vertexState = nullptr;
|
||||
PrimitiveTopology primitiveTopology;
|
||||
RasterizationStateDescriptor const * rasterizationState = nullptr;
|
||||
uint32_t sampleCount = 1;
|
||||
DepthStencilStateDescriptor const * depthStencilState = nullptr;
|
||||
uint32_t colorStateCount;
|
||||
ColorStateDescriptor const * colorStates;
|
||||
uint32_t sampleMask = 0xFFFFFFFF;
|
||||
bool alphaToCoverageEnabled = false;
|
||||
VertexState vertex;
|
||||
PrimitiveState primitive;
|
||||
DepthStencilState const * depthStencil = nullptr;
|
||||
MultisampleState multisample;
|
||||
FragmentState const * fragment = nullptr;
|
||||
};
|
||||
|
||||
|
||||
|
|
|
@ -34,22 +34,6 @@ namespace wgpu {
|
|||
static_assert(static_cast<uint32_t>(BackendType::OpenGL) == WGPUBackendType_OpenGL, "value mismatch for BackendType::OpenGL");
|
||||
static_assert(static_cast<uint32_t>(BackendType::OpenGLES) == WGPUBackendType_OpenGLES, "value mismatch for BackendType::OpenGLES");
|
||||
|
||||
// BindingType
|
||||
|
||||
static_assert(sizeof(BindingType) == sizeof(WGPUBindingType), "sizeof mismatch for BindingType");
|
||||
static_assert(alignof(BindingType) == alignof(WGPUBindingType), "alignof mismatch for BindingType");
|
||||
|
||||
static_assert(static_cast<uint32_t>(BindingType::Undefined) == WGPUBindingType_Undefined, "value mismatch for BindingType::Undefined");
|
||||
static_assert(static_cast<uint32_t>(BindingType::UniformBuffer) == WGPUBindingType_UniformBuffer, "value mismatch for BindingType::UniformBuffer");
|
||||
static_assert(static_cast<uint32_t>(BindingType::StorageBuffer) == WGPUBindingType_StorageBuffer, "value mismatch for BindingType::StorageBuffer");
|
||||
static_assert(static_cast<uint32_t>(BindingType::ReadonlyStorageBuffer) == WGPUBindingType_ReadonlyStorageBuffer, "value mismatch for BindingType::ReadonlyStorageBuffer");
|
||||
static_assert(static_cast<uint32_t>(BindingType::Sampler) == WGPUBindingType_Sampler, "value mismatch for BindingType::Sampler");
|
||||
static_assert(static_cast<uint32_t>(BindingType::ComparisonSampler) == WGPUBindingType_ComparisonSampler, "value mismatch for BindingType::ComparisonSampler");
|
||||
static_assert(static_cast<uint32_t>(BindingType::SampledTexture) == WGPUBindingType_SampledTexture, "value mismatch for BindingType::SampledTexture");
|
||||
static_assert(static_cast<uint32_t>(BindingType::MultisampledTexture) == WGPUBindingType_MultisampledTexture, "value mismatch for BindingType::MultisampledTexture");
|
||||
static_assert(static_cast<uint32_t>(BindingType::ReadonlyStorageTexture) == WGPUBindingType_ReadonlyStorageTexture, "value mismatch for BindingType::ReadonlyStorageTexture");
|
||||
static_assert(static_cast<uint32_t>(BindingType::WriteonlyStorageTexture) == WGPUBindingType_WriteonlyStorageTexture, "value mismatch for BindingType::WriteonlyStorageTexture");
|
||||
|
||||
// BlendFactor
|
||||
|
||||
static_assert(sizeof(BlendFactor) == sizeof(WGPUBlendFactor), "sizeof mismatch for BlendFactor");
|
||||
|
@ -57,17 +41,17 @@ namespace wgpu {
|
|||
|
||||
static_assert(static_cast<uint32_t>(BlendFactor::Zero) == WGPUBlendFactor_Zero, "value mismatch for BlendFactor::Zero");
|
||||
static_assert(static_cast<uint32_t>(BlendFactor::One) == WGPUBlendFactor_One, "value mismatch for BlendFactor::One");
|
||||
static_assert(static_cast<uint32_t>(BlendFactor::SrcColor) == WGPUBlendFactor_SrcColor, "value mismatch for BlendFactor::SrcColor");
|
||||
static_assert(static_cast<uint32_t>(BlendFactor::OneMinusSrcColor) == WGPUBlendFactor_OneMinusSrcColor, "value mismatch for BlendFactor::OneMinusSrcColor");
|
||||
static_assert(static_cast<uint32_t>(BlendFactor::Src) == WGPUBlendFactor_Src, "value mismatch for BlendFactor::Src");
|
||||
static_assert(static_cast<uint32_t>(BlendFactor::OneMinusSrc) == WGPUBlendFactor_OneMinusSrc, "value mismatch for BlendFactor::OneMinusSrc");
|
||||
static_assert(static_cast<uint32_t>(BlendFactor::SrcAlpha) == WGPUBlendFactor_SrcAlpha, "value mismatch for BlendFactor::SrcAlpha");
|
||||
static_assert(static_cast<uint32_t>(BlendFactor::OneMinusSrcAlpha) == WGPUBlendFactor_OneMinusSrcAlpha, "value mismatch for BlendFactor::OneMinusSrcAlpha");
|
||||
static_assert(static_cast<uint32_t>(BlendFactor::DstColor) == WGPUBlendFactor_DstColor, "value mismatch for BlendFactor::DstColor");
|
||||
static_assert(static_cast<uint32_t>(BlendFactor::OneMinusDstColor) == WGPUBlendFactor_OneMinusDstColor, "value mismatch for BlendFactor::OneMinusDstColor");
|
||||
static_assert(static_cast<uint32_t>(BlendFactor::Dst) == WGPUBlendFactor_Dst, "value mismatch for BlendFactor::Dst");
|
||||
static_assert(static_cast<uint32_t>(BlendFactor::OneMinusDst) == WGPUBlendFactor_OneMinusDst, "value mismatch for BlendFactor::OneMinusDst");
|
||||
static_assert(static_cast<uint32_t>(BlendFactor::DstAlpha) == WGPUBlendFactor_DstAlpha, "value mismatch for BlendFactor::DstAlpha");
|
||||
static_assert(static_cast<uint32_t>(BlendFactor::OneMinusDstAlpha) == WGPUBlendFactor_OneMinusDstAlpha, "value mismatch for BlendFactor::OneMinusDstAlpha");
|
||||
static_assert(static_cast<uint32_t>(BlendFactor::SrcAlphaSaturated) == WGPUBlendFactor_SrcAlphaSaturated, "value mismatch for BlendFactor::SrcAlphaSaturated");
|
||||
static_assert(static_cast<uint32_t>(BlendFactor::BlendColor) == WGPUBlendFactor_BlendColor, "value mismatch for BlendFactor::BlendColor");
|
||||
static_assert(static_cast<uint32_t>(BlendFactor::OneMinusBlendColor) == WGPUBlendFactor_OneMinusBlendColor, "value mismatch for BlendFactor::OneMinusBlendColor");
|
||||
static_assert(static_cast<uint32_t>(BlendFactor::Constant) == WGPUBlendFactor_Constant, "value mismatch for BlendFactor::Constant");
|
||||
static_assert(static_cast<uint32_t>(BlendFactor::OneMinusConstant) == WGPUBlendFactor_OneMinusConstant, "value mismatch for BlendFactor::OneMinusConstant");
|
||||
|
||||
// BlendOperation
|
||||
|
||||
|
@ -117,16 +101,16 @@ namespace wgpu {
|
|||
static_assert(static_cast<uint32_t>(CompareFunction::NotEqual) == WGPUCompareFunction_NotEqual, "value mismatch for CompareFunction::NotEqual");
|
||||
static_assert(static_cast<uint32_t>(CompareFunction::Always) == WGPUCompareFunction_Always, "value mismatch for CompareFunction::Always");
|
||||
|
||||
// CreateReadyPipelineStatus
|
||||
// CreatePipelineAsyncStatus
|
||||
|
||||
static_assert(sizeof(CreateReadyPipelineStatus) == sizeof(WGPUCreateReadyPipelineStatus), "sizeof mismatch for CreateReadyPipelineStatus");
|
||||
static_assert(alignof(CreateReadyPipelineStatus) == alignof(WGPUCreateReadyPipelineStatus), "alignof mismatch for CreateReadyPipelineStatus");
|
||||
static_assert(sizeof(CreatePipelineAsyncStatus) == sizeof(WGPUCreatePipelineAsyncStatus), "sizeof mismatch for CreatePipelineAsyncStatus");
|
||||
static_assert(alignof(CreatePipelineAsyncStatus) == alignof(WGPUCreatePipelineAsyncStatus), "alignof mismatch for CreatePipelineAsyncStatus");
|
||||
|
||||
static_assert(static_cast<uint32_t>(CreateReadyPipelineStatus::Success) == WGPUCreateReadyPipelineStatus_Success, "value mismatch for CreateReadyPipelineStatus::Success");
|
||||
static_assert(static_cast<uint32_t>(CreateReadyPipelineStatus::Error) == WGPUCreateReadyPipelineStatus_Error, "value mismatch for CreateReadyPipelineStatus::Error");
|
||||
static_assert(static_cast<uint32_t>(CreateReadyPipelineStatus::DeviceLost) == WGPUCreateReadyPipelineStatus_DeviceLost, "value mismatch for CreateReadyPipelineStatus::DeviceLost");
|
||||
static_assert(static_cast<uint32_t>(CreateReadyPipelineStatus::DeviceDestroyed) == WGPUCreateReadyPipelineStatus_DeviceDestroyed, "value mismatch for CreateReadyPipelineStatus::DeviceDestroyed");
|
||||
static_assert(static_cast<uint32_t>(CreateReadyPipelineStatus::Unknown) == WGPUCreateReadyPipelineStatus_Unknown, "value mismatch for CreateReadyPipelineStatus::Unknown");
|
||||
static_assert(static_cast<uint32_t>(CreatePipelineAsyncStatus::Success) == WGPUCreatePipelineAsyncStatus_Success, "value mismatch for CreatePipelineAsyncStatus::Success");
|
||||
static_assert(static_cast<uint32_t>(CreatePipelineAsyncStatus::Error) == WGPUCreatePipelineAsyncStatus_Error, "value mismatch for CreatePipelineAsyncStatus::Error");
|
||||
static_assert(static_cast<uint32_t>(CreatePipelineAsyncStatus::DeviceLost) == WGPUCreatePipelineAsyncStatus_DeviceLost, "value mismatch for CreatePipelineAsyncStatus::DeviceLost");
|
||||
static_assert(static_cast<uint32_t>(CreatePipelineAsyncStatus::DeviceDestroyed) == WGPUCreatePipelineAsyncStatus_DeviceDestroyed, "value mismatch for CreatePipelineAsyncStatus::DeviceDestroyed");
|
||||
static_assert(static_cast<uint32_t>(CreatePipelineAsyncStatus::Unknown) == WGPUCreatePipelineAsyncStatus_Unknown, "value mismatch for CreatePipelineAsyncStatus::Unknown");
|
||||
|
||||
// CullMode
|
||||
|
||||
|
@ -157,16 +141,6 @@ namespace wgpu {
|
|||
static_assert(static_cast<uint32_t>(ErrorType::Unknown) == WGPUErrorType_Unknown, "value mismatch for ErrorType::Unknown");
|
||||
static_assert(static_cast<uint32_t>(ErrorType::DeviceLost) == WGPUErrorType_DeviceLost, "value mismatch for ErrorType::DeviceLost");
|
||||
|
||||
// FenceCompletionStatus
|
||||
|
||||
static_assert(sizeof(FenceCompletionStatus) == sizeof(WGPUFenceCompletionStatus), "sizeof mismatch for FenceCompletionStatus");
|
||||
static_assert(alignof(FenceCompletionStatus) == alignof(WGPUFenceCompletionStatus), "alignof mismatch for FenceCompletionStatus");
|
||||
|
||||
static_assert(static_cast<uint32_t>(FenceCompletionStatus::Success) == WGPUFenceCompletionStatus_Success, "value mismatch for FenceCompletionStatus::Success");
|
||||
static_assert(static_cast<uint32_t>(FenceCompletionStatus::Error) == WGPUFenceCompletionStatus_Error, "value mismatch for FenceCompletionStatus::Error");
|
||||
static_assert(static_cast<uint32_t>(FenceCompletionStatus::Unknown) == WGPUFenceCompletionStatus_Unknown, "value mismatch for FenceCompletionStatus::Unknown");
|
||||
static_assert(static_cast<uint32_t>(FenceCompletionStatus::DeviceLost) == WGPUFenceCompletionStatus_DeviceLost, "value mismatch for FenceCompletionStatus::DeviceLost");
|
||||
|
||||
// FilterMode
|
||||
|
||||
static_assert(sizeof(FilterMode) == sizeof(WGPUFilterMode), "sizeof mismatch for FilterMode");
|
||||
|
@ -248,6 +222,16 @@ namespace wgpu {
|
|||
static_assert(static_cast<uint32_t>(QueryType::PipelineStatistics) == WGPUQueryType_PipelineStatistics, "value mismatch for QueryType::PipelineStatistics");
|
||||
static_assert(static_cast<uint32_t>(QueryType::Timestamp) == WGPUQueryType_Timestamp, "value mismatch for QueryType::Timestamp");
|
||||
|
||||
// QueueWorkDoneStatus
|
||||
|
||||
static_assert(sizeof(QueueWorkDoneStatus) == sizeof(WGPUQueueWorkDoneStatus), "sizeof mismatch for QueueWorkDoneStatus");
|
||||
static_assert(alignof(QueueWorkDoneStatus) == alignof(WGPUQueueWorkDoneStatus), "alignof mismatch for QueueWorkDoneStatus");
|
||||
|
||||
static_assert(static_cast<uint32_t>(QueueWorkDoneStatus::Success) == WGPUQueueWorkDoneStatus_Success, "value mismatch for QueueWorkDoneStatus::Success");
|
||||
static_assert(static_cast<uint32_t>(QueueWorkDoneStatus::Error) == WGPUQueueWorkDoneStatus_Error, "value mismatch for QueueWorkDoneStatus::Error");
|
||||
static_assert(static_cast<uint32_t>(QueueWorkDoneStatus::Unknown) == WGPUQueueWorkDoneStatus_Unknown, "value mismatch for QueueWorkDoneStatus::Unknown");
|
||||
static_assert(static_cast<uint32_t>(QueueWorkDoneStatus::DeviceLost) == WGPUQueueWorkDoneStatus_DeviceLost, "value mismatch for QueueWorkDoneStatus::DeviceLost");
|
||||
|
||||
// SType
|
||||
|
||||
static_assert(sizeof(SType) == sizeof(WGPUSType), "sizeof mismatch for SType");
|
||||
|
@ -260,6 +244,7 @@ namespace wgpu {
|
|||
static_assert(static_cast<uint32_t>(SType::SurfaceDescriptorFromCanvasHTMLSelector) == WGPUSType_SurfaceDescriptorFromCanvasHTMLSelector, "value mismatch for SType::SurfaceDescriptorFromCanvasHTMLSelector");
|
||||
static_assert(static_cast<uint32_t>(SType::ShaderModuleSPIRVDescriptor) == WGPUSType_ShaderModuleSPIRVDescriptor, "value mismatch for SType::ShaderModuleSPIRVDescriptor");
|
||||
static_assert(static_cast<uint32_t>(SType::ShaderModuleWGSLDescriptor) == WGPUSType_ShaderModuleWGSLDescriptor, "value mismatch for SType::ShaderModuleWGSLDescriptor");
|
||||
static_assert(static_cast<uint32_t>(SType::PrimitiveDepthClampingState) == WGPUSType_PrimitiveDepthClampingState, "value mismatch for SType::PrimitiveDepthClampingState");
|
||||
|
||||
// SamplerBindingType
|
||||
|
||||
|
@ -374,6 +359,7 @@ namespace wgpu {
|
|||
static_assert(static_cast<uint32_t>(TextureFormat::RGBA32Sint) == WGPUTextureFormat_RGBA32Sint, "value mismatch for TextureFormat::RGBA32Sint");
|
||||
static_assert(static_cast<uint32_t>(TextureFormat::Depth32Float) == WGPUTextureFormat_Depth32Float, "value mismatch for TextureFormat::Depth32Float");
|
||||
static_assert(static_cast<uint32_t>(TextureFormat::Depth24Plus) == WGPUTextureFormat_Depth24Plus, "value mismatch for TextureFormat::Depth24Plus");
|
||||
static_assert(static_cast<uint32_t>(TextureFormat::Stencil8) == WGPUTextureFormat_Stencil8, "value mismatch for TextureFormat::Stencil8");
|
||||
static_assert(static_cast<uint32_t>(TextureFormat::Depth24PlusStencil8) == WGPUTextureFormat_Depth24PlusStencil8, "value mismatch for TextureFormat::Depth24PlusStencil8");
|
||||
static_assert(static_cast<uint32_t>(TextureFormat::BC1RGBAUnorm) == WGPUTextureFormat_BC1RGBAUnorm, "value mismatch for TextureFormat::BC1RGBAUnorm");
|
||||
static_assert(static_cast<uint32_t>(TextureFormat::BC1RGBAUnormSrgb) == WGPUTextureFormat_BC1RGBAUnormSrgb, "value mismatch for TextureFormat::BC1RGBAUnormSrgb");
|
||||
|
@ -420,36 +406,37 @@ namespace wgpu {
|
|||
static_assert(sizeof(VertexFormat) == sizeof(WGPUVertexFormat), "sizeof mismatch for VertexFormat");
|
||||
static_assert(alignof(VertexFormat) == alignof(WGPUVertexFormat), "alignof mismatch for VertexFormat");
|
||||
|
||||
static_assert(static_cast<uint32_t>(VertexFormat::UChar2) == WGPUVertexFormat_UChar2, "value mismatch for VertexFormat::UChar2");
|
||||
static_assert(static_cast<uint32_t>(VertexFormat::UChar4) == WGPUVertexFormat_UChar4, "value mismatch for VertexFormat::UChar4");
|
||||
static_assert(static_cast<uint32_t>(VertexFormat::Char2) == WGPUVertexFormat_Char2, "value mismatch for VertexFormat::Char2");
|
||||
static_assert(static_cast<uint32_t>(VertexFormat::Char4) == WGPUVertexFormat_Char4, "value mismatch for VertexFormat::Char4");
|
||||
static_assert(static_cast<uint32_t>(VertexFormat::UChar2Norm) == WGPUVertexFormat_UChar2Norm, "value mismatch for VertexFormat::UChar2Norm");
|
||||
static_assert(static_cast<uint32_t>(VertexFormat::UChar4Norm) == WGPUVertexFormat_UChar4Norm, "value mismatch for VertexFormat::UChar4Norm");
|
||||
static_assert(static_cast<uint32_t>(VertexFormat::Char2Norm) == WGPUVertexFormat_Char2Norm, "value mismatch for VertexFormat::Char2Norm");
|
||||
static_assert(static_cast<uint32_t>(VertexFormat::Char4Norm) == WGPUVertexFormat_Char4Norm, "value mismatch for VertexFormat::Char4Norm");
|
||||
static_assert(static_cast<uint32_t>(VertexFormat::UShort2) == WGPUVertexFormat_UShort2, "value mismatch for VertexFormat::UShort2");
|
||||
static_assert(static_cast<uint32_t>(VertexFormat::UShort4) == WGPUVertexFormat_UShort4, "value mismatch for VertexFormat::UShort4");
|
||||
static_assert(static_cast<uint32_t>(VertexFormat::Short2) == WGPUVertexFormat_Short2, "value mismatch for VertexFormat::Short2");
|
||||
static_assert(static_cast<uint32_t>(VertexFormat::Short4) == WGPUVertexFormat_Short4, "value mismatch for VertexFormat::Short4");
|
||||
static_assert(static_cast<uint32_t>(VertexFormat::UShort2Norm) == WGPUVertexFormat_UShort2Norm, "value mismatch for VertexFormat::UShort2Norm");
|
||||
static_assert(static_cast<uint32_t>(VertexFormat::UShort4Norm) == WGPUVertexFormat_UShort4Norm, "value mismatch for VertexFormat::UShort4Norm");
|
||||
static_assert(static_cast<uint32_t>(VertexFormat::Short2Norm) == WGPUVertexFormat_Short2Norm, "value mismatch for VertexFormat::Short2Norm");
|
||||
static_assert(static_cast<uint32_t>(VertexFormat::Short4Norm) == WGPUVertexFormat_Short4Norm, "value mismatch for VertexFormat::Short4Norm");
|
||||
static_assert(static_cast<uint32_t>(VertexFormat::Half2) == WGPUVertexFormat_Half2, "value mismatch for VertexFormat::Half2");
|
||||
static_assert(static_cast<uint32_t>(VertexFormat::Half4) == WGPUVertexFormat_Half4, "value mismatch for VertexFormat::Half4");
|
||||
static_assert(static_cast<uint32_t>(VertexFormat::Float) == WGPUVertexFormat_Float, "value mismatch for VertexFormat::Float");
|
||||
static_assert(static_cast<uint32_t>(VertexFormat::Float2) == WGPUVertexFormat_Float2, "value mismatch for VertexFormat::Float2");
|
||||
static_assert(static_cast<uint32_t>(VertexFormat::Float3) == WGPUVertexFormat_Float3, "value mismatch for VertexFormat::Float3");
|
||||
static_assert(static_cast<uint32_t>(VertexFormat::Float4) == WGPUVertexFormat_Float4, "value mismatch for VertexFormat::Float4");
|
||||
static_assert(static_cast<uint32_t>(VertexFormat::UInt) == WGPUVertexFormat_UInt, "value mismatch for VertexFormat::UInt");
|
||||
static_assert(static_cast<uint32_t>(VertexFormat::UInt2) == WGPUVertexFormat_UInt2, "value mismatch for VertexFormat::UInt2");
|
||||
static_assert(static_cast<uint32_t>(VertexFormat::UInt3) == WGPUVertexFormat_UInt3, "value mismatch for VertexFormat::UInt3");
|
||||
static_assert(static_cast<uint32_t>(VertexFormat::UInt4) == WGPUVertexFormat_UInt4, "value mismatch for VertexFormat::UInt4");
|
||||
static_assert(static_cast<uint32_t>(VertexFormat::Int) == WGPUVertexFormat_Int, "value mismatch for VertexFormat::Int");
|
||||
static_assert(static_cast<uint32_t>(VertexFormat::Int2) == WGPUVertexFormat_Int2, "value mismatch for VertexFormat::Int2");
|
||||
static_assert(static_cast<uint32_t>(VertexFormat::Int3) == WGPUVertexFormat_Int3, "value mismatch for VertexFormat::Int3");
|
||||
static_assert(static_cast<uint32_t>(VertexFormat::Int4) == WGPUVertexFormat_Int4, "value mismatch for VertexFormat::Int4");
|
||||
static_assert(static_cast<uint32_t>(VertexFormat::Undefined) == WGPUVertexFormat_Undefined, "value mismatch for VertexFormat::Undefined");
|
||||
static_assert(static_cast<uint32_t>(VertexFormat::Uint8x2) == WGPUVertexFormat_Uint8x2, "value mismatch for VertexFormat::Uint8x2");
|
||||
static_assert(static_cast<uint32_t>(VertexFormat::Uint8x4) == WGPUVertexFormat_Uint8x4, "value mismatch for VertexFormat::Uint8x4");
|
||||
static_assert(static_cast<uint32_t>(VertexFormat::Sint8x2) == WGPUVertexFormat_Sint8x2, "value mismatch for VertexFormat::Sint8x2");
|
||||
static_assert(static_cast<uint32_t>(VertexFormat::Sint8x4) == WGPUVertexFormat_Sint8x4, "value mismatch for VertexFormat::Sint8x4");
|
||||
static_assert(static_cast<uint32_t>(VertexFormat::Unorm8x2) == WGPUVertexFormat_Unorm8x2, "value mismatch for VertexFormat::Unorm8x2");
|
||||
static_assert(static_cast<uint32_t>(VertexFormat::Unorm8x4) == WGPUVertexFormat_Unorm8x4, "value mismatch for VertexFormat::Unorm8x4");
|
||||
static_assert(static_cast<uint32_t>(VertexFormat::Snorm8x2) == WGPUVertexFormat_Snorm8x2, "value mismatch for VertexFormat::Snorm8x2");
|
||||
static_assert(static_cast<uint32_t>(VertexFormat::Snorm8x4) == WGPUVertexFormat_Snorm8x4, "value mismatch for VertexFormat::Snorm8x4");
|
||||
static_assert(static_cast<uint32_t>(VertexFormat::Uint16x2) == WGPUVertexFormat_Uint16x2, "value mismatch for VertexFormat::Uint16x2");
|
||||
static_assert(static_cast<uint32_t>(VertexFormat::Uint16x4) == WGPUVertexFormat_Uint16x4, "value mismatch for VertexFormat::Uint16x4");
|
||||
static_assert(static_cast<uint32_t>(VertexFormat::Sint16x2) == WGPUVertexFormat_Sint16x2, "value mismatch for VertexFormat::Sint16x2");
|
||||
static_assert(static_cast<uint32_t>(VertexFormat::Sint16x4) == WGPUVertexFormat_Sint16x4, "value mismatch for VertexFormat::Sint16x4");
|
||||
static_assert(static_cast<uint32_t>(VertexFormat::Unorm16x2) == WGPUVertexFormat_Unorm16x2, "value mismatch for VertexFormat::Unorm16x2");
|
||||
static_assert(static_cast<uint32_t>(VertexFormat::Unorm16x4) == WGPUVertexFormat_Unorm16x4, "value mismatch for VertexFormat::Unorm16x4");
|
||||
static_assert(static_cast<uint32_t>(VertexFormat::Snorm16x2) == WGPUVertexFormat_Snorm16x2, "value mismatch for VertexFormat::Snorm16x2");
|
||||
static_assert(static_cast<uint32_t>(VertexFormat::Snorm16x4) == WGPUVertexFormat_Snorm16x4, "value mismatch for VertexFormat::Snorm16x4");
|
||||
static_assert(static_cast<uint32_t>(VertexFormat::Float16x2) == WGPUVertexFormat_Float16x2, "value mismatch for VertexFormat::Float16x2");
|
||||
static_assert(static_cast<uint32_t>(VertexFormat::Float16x4) == WGPUVertexFormat_Float16x4, "value mismatch for VertexFormat::Float16x4");
|
||||
static_assert(static_cast<uint32_t>(VertexFormat::Float32) == WGPUVertexFormat_Float32, "value mismatch for VertexFormat::Float32");
|
||||
static_assert(static_cast<uint32_t>(VertexFormat::Float32x2) == WGPUVertexFormat_Float32x2, "value mismatch for VertexFormat::Float32x2");
|
||||
static_assert(static_cast<uint32_t>(VertexFormat::Float32x3) == WGPUVertexFormat_Float32x3, "value mismatch for VertexFormat::Float32x3");
|
||||
static_assert(static_cast<uint32_t>(VertexFormat::Float32x4) == WGPUVertexFormat_Float32x4, "value mismatch for VertexFormat::Float32x4");
|
||||
static_assert(static_cast<uint32_t>(VertexFormat::Uint32) == WGPUVertexFormat_Uint32, "value mismatch for VertexFormat::Uint32");
|
||||
static_assert(static_cast<uint32_t>(VertexFormat::Uint32x2) == WGPUVertexFormat_Uint32x2, "value mismatch for VertexFormat::Uint32x2");
|
||||
static_assert(static_cast<uint32_t>(VertexFormat::Uint32x3) == WGPUVertexFormat_Uint32x3, "value mismatch for VertexFormat::Uint32x3");
|
||||
static_assert(static_cast<uint32_t>(VertexFormat::Uint32x4) == WGPUVertexFormat_Uint32x4, "value mismatch for VertexFormat::Uint32x4");
|
||||
static_assert(static_cast<uint32_t>(VertexFormat::Sint32) == WGPUVertexFormat_Sint32, "value mismatch for VertexFormat::Sint32");
|
||||
static_assert(static_cast<uint32_t>(VertexFormat::Sint32x2) == WGPUVertexFormat_Sint32x2, "value mismatch for VertexFormat::Sint32x2");
|
||||
static_assert(static_cast<uint32_t>(VertexFormat::Sint32x3) == WGPUVertexFormat_Sint32x3, "value mismatch for VertexFormat::Sint32x3");
|
||||
static_assert(static_cast<uint32_t>(VertexFormat::Sint32x4) == WGPUVertexFormat_Sint32x4, "value mismatch for VertexFormat::Sint32x4");
|
||||
|
||||
// BufferUsage
|
||||
|
||||
|
@ -561,17 +548,17 @@ namespace wgpu {
|
|||
static_assert(offsetof(BindGroupEntry, textureView) == offsetof(WGPUBindGroupEntry, textureView),
|
||||
"offsetof mismatch for BindGroupEntry::textureView");
|
||||
|
||||
// BlendDescriptor
|
||||
// BlendComponent
|
||||
|
||||
static_assert(sizeof(BlendDescriptor) == sizeof(WGPUBlendDescriptor), "sizeof mismatch for BlendDescriptor");
|
||||
static_assert(alignof(BlendDescriptor) == alignof(WGPUBlendDescriptor), "alignof mismatch for BlendDescriptor");
|
||||
static_assert(sizeof(BlendComponent) == sizeof(WGPUBlendComponent), "sizeof mismatch for BlendComponent");
|
||||
static_assert(alignof(BlendComponent) == alignof(WGPUBlendComponent), "alignof mismatch for BlendComponent");
|
||||
|
||||
static_assert(offsetof(BlendDescriptor, operation) == offsetof(WGPUBlendDescriptor, operation),
|
||||
"offsetof mismatch for BlendDescriptor::operation");
|
||||
static_assert(offsetof(BlendDescriptor, srcFactor) == offsetof(WGPUBlendDescriptor, srcFactor),
|
||||
"offsetof mismatch for BlendDescriptor::srcFactor");
|
||||
static_assert(offsetof(BlendDescriptor, dstFactor) == offsetof(WGPUBlendDescriptor, dstFactor),
|
||||
"offsetof mismatch for BlendDescriptor::dstFactor");
|
||||
static_assert(offsetof(BlendComponent, operation) == offsetof(WGPUBlendComponent, operation),
|
||||
"offsetof mismatch for BlendComponent::operation");
|
||||
static_assert(offsetof(BlendComponent, srcFactor) == offsetof(WGPUBlendComponent, srcFactor),
|
||||
"offsetof mismatch for BlendComponent::srcFactor");
|
||||
static_assert(offsetof(BlendComponent, dstFactor) == offsetof(WGPUBlendComponent, dstFactor),
|
||||
"offsetof mismatch for BlendComponent::dstFactor");
|
||||
|
||||
// BufferBindingLayout
|
||||
|
||||
|
@ -656,20 +643,8 @@ namespace wgpu {
|
|||
"offsetof mismatch for Extent3D::width");
|
||||
static_assert(offsetof(Extent3D, height) == offsetof(WGPUExtent3D, height),
|
||||
"offsetof mismatch for Extent3D::height");
|
||||
static_assert(offsetof(Extent3D, depth) == offsetof(WGPUExtent3D, depth),
|
||||
"offsetof mismatch for Extent3D::depth");
|
||||
|
||||
// FenceDescriptor
|
||||
|
||||
static_assert(sizeof(FenceDescriptor) == sizeof(WGPUFenceDescriptor), "sizeof mismatch for FenceDescriptor");
|
||||
static_assert(alignof(FenceDescriptor) == alignof(WGPUFenceDescriptor), "alignof mismatch for FenceDescriptor");
|
||||
|
||||
static_assert(offsetof(FenceDescriptor, nextInChain) == offsetof(WGPUFenceDescriptor, nextInChain),
|
||||
"offsetof mismatch for FenceDescriptor::nextInChain");
|
||||
static_assert(offsetof(FenceDescriptor, label) == offsetof(WGPUFenceDescriptor, label),
|
||||
"offsetof mismatch for FenceDescriptor::label");
|
||||
static_assert(offsetof(FenceDescriptor, initialValue) == offsetof(WGPUFenceDescriptor, initialValue),
|
||||
"offsetof mismatch for FenceDescriptor::initialValue");
|
||||
static_assert(offsetof(Extent3D, depthOrArrayLayers) == offsetof(WGPUExtent3D, depthOrArrayLayers),
|
||||
"offsetof mismatch for Extent3D::depthOrArrayLayers");
|
||||
|
||||
// InstanceDescriptor
|
||||
|
||||
|
@ -679,6 +654,20 @@ namespace wgpu {
|
|||
static_assert(offsetof(InstanceDescriptor, nextInChain) == offsetof(WGPUInstanceDescriptor, nextInChain),
|
||||
"offsetof mismatch for InstanceDescriptor::nextInChain");
|
||||
|
||||
// MultisampleState
|
||||
|
||||
static_assert(sizeof(MultisampleState) == sizeof(WGPUMultisampleState), "sizeof mismatch for MultisampleState");
|
||||
static_assert(alignof(MultisampleState) == alignof(WGPUMultisampleState), "alignof mismatch for MultisampleState");
|
||||
|
||||
static_assert(offsetof(MultisampleState, nextInChain) == offsetof(WGPUMultisampleState, nextInChain),
|
||||
"offsetof mismatch for MultisampleState::nextInChain");
|
||||
static_assert(offsetof(MultisampleState, count) == offsetof(WGPUMultisampleState, count),
|
||||
"offsetof mismatch for MultisampleState::count");
|
||||
static_assert(offsetof(MultisampleState, mask) == offsetof(WGPUMultisampleState, mask),
|
||||
"offsetof mismatch for MultisampleState::mask");
|
||||
static_assert(offsetof(MultisampleState, alphaToCoverageEnabled) == offsetof(WGPUMultisampleState, alphaToCoverageEnabled),
|
||||
"offsetof mismatch for MultisampleState::alphaToCoverageEnabled");
|
||||
|
||||
// Origin3D
|
||||
|
||||
static_assert(sizeof(Origin3D) == sizeof(WGPUOrigin3D), "sizeof mismatch for Origin3D");
|
||||
|
@ -705,6 +694,30 @@ namespace wgpu {
|
|||
static_assert(offsetof(PipelineLayoutDescriptor, bindGroupLayouts) == offsetof(WGPUPipelineLayoutDescriptor, bindGroupLayouts),
|
||||
"offsetof mismatch for PipelineLayoutDescriptor::bindGroupLayouts");
|
||||
|
||||
// PrimitiveDepthClampingState
|
||||
|
||||
static_assert(sizeof(PrimitiveDepthClampingState) == sizeof(WGPUPrimitiveDepthClampingState), "sizeof mismatch for PrimitiveDepthClampingState");
|
||||
static_assert(alignof(PrimitiveDepthClampingState) == alignof(WGPUPrimitiveDepthClampingState), "alignof mismatch for PrimitiveDepthClampingState");
|
||||
|
||||
static_assert(offsetof(PrimitiveDepthClampingState, clampDepth) == offsetof(WGPUPrimitiveDepthClampingState, clampDepth),
|
||||
"offsetof mismatch for PrimitiveDepthClampingState::clampDepth");
|
||||
|
||||
// PrimitiveState
|
||||
|
||||
static_assert(sizeof(PrimitiveState) == sizeof(WGPUPrimitiveState), "sizeof mismatch for PrimitiveState");
|
||||
static_assert(alignof(PrimitiveState) == alignof(WGPUPrimitiveState), "alignof mismatch for PrimitiveState");
|
||||
|
||||
static_assert(offsetof(PrimitiveState, nextInChain) == offsetof(WGPUPrimitiveState, nextInChain),
|
||||
"offsetof mismatch for PrimitiveState::nextInChain");
|
||||
static_assert(offsetof(PrimitiveState, topology) == offsetof(WGPUPrimitiveState, topology),
|
||||
"offsetof mismatch for PrimitiveState::topology");
|
||||
static_assert(offsetof(PrimitiveState, stripIndexFormat) == offsetof(WGPUPrimitiveState, stripIndexFormat),
|
||||
"offsetof mismatch for PrimitiveState::stripIndexFormat");
|
||||
static_assert(offsetof(PrimitiveState, frontFace) == offsetof(WGPUPrimitiveState, frontFace),
|
||||
"offsetof mismatch for PrimitiveState::frontFace");
|
||||
static_assert(offsetof(PrimitiveState, cullMode) == offsetof(WGPUPrimitiveState, cullMode),
|
||||
"offsetof mismatch for PrimitiveState::cullMode");
|
||||
|
||||
// ProgrammableStageDescriptor
|
||||
|
||||
static_assert(sizeof(ProgrammableStageDescriptor) == sizeof(WGPUProgrammableStageDescriptor), "sizeof mismatch for ProgrammableStageDescriptor");
|
||||
|
@ -735,24 +748,6 @@ namespace wgpu {
|
|||
static_assert(offsetof(QuerySetDescriptor, pipelineStatisticsCount) == offsetof(WGPUQuerySetDescriptor, pipelineStatisticsCount),
|
||||
"offsetof mismatch for QuerySetDescriptor::pipelineStatisticsCount");
|
||||
|
||||
// RasterizationStateDescriptor
|
||||
|
||||
static_assert(sizeof(RasterizationStateDescriptor) == sizeof(WGPURasterizationStateDescriptor), "sizeof mismatch for RasterizationStateDescriptor");
|
||||
static_assert(alignof(RasterizationStateDescriptor) == alignof(WGPURasterizationStateDescriptor), "alignof mismatch for RasterizationStateDescriptor");
|
||||
|
||||
static_assert(offsetof(RasterizationStateDescriptor, nextInChain) == offsetof(WGPURasterizationStateDescriptor, nextInChain),
|
||||
"offsetof mismatch for RasterizationStateDescriptor::nextInChain");
|
||||
static_assert(offsetof(RasterizationStateDescriptor, frontFace) == offsetof(WGPURasterizationStateDescriptor, frontFace),
|
||||
"offsetof mismatch for RasterizationStateDescriptor::frontFace");
|
||||
static_assert(offsetof(RasterizationStateDescriptor, cullMode) == offsetof(WGPURasterizationStateDescriptor, cullMode),
|
||||
"offsetof mismatch for RasterizationStateDescriptor::cullMode");
|
||||
static_assert(offsetof(RasterizationStateDescriptor, depthBias) == offsetof(WGPURasterizationStateDescriptor, depthBias),
|
||||
"offsetof mismatch for RasterizationStateDescriptor::depthBias");
|
||||
static_assert(offsetof(RasterizationStateDescriptor, depthBiasSlopeScale) == offsetof(WGPURasterizationStateDescriptor, depthBiasSlopeScale),
|
||||
"offsetof mismatch for RasterizationStateDescriptor::depthBiasSlopeScale");
|
||||
static_assert(offsetof(RasterizationStateDescriptor, depthBiasClamp) == offsetof(WGPURasterizationStateDescriptor, depthBiasClamp),
|
||||
"offsetof mismatch for RasterizationStateDescriptor::depthBiasClamp");
|
||||
|
||||
// RenderBundleDescriptor
|
||||
|
||||
static_assert(sizeof(RenderBundleDescriptor) == sizeof(WGPURenderBundleDescriptor), "sizeof mismatch for RenderBundleDescriptor");
|
||||
|
@ -781,29 +776,29 @@ namespace wgpu {
|
|||
static_assert(offsetof(RenderBundleEncoderDescriptor, sampleCount) == offsetof(WGPURenderBundleEncoderDescriptor, sampleCount),
|
||||
"offsetof mismatch for RenderBundleEncoderDescriptor::sampleCount");
|
||||
|
||||
// RenderPassDepthStencilAttachmentDescriptor
|
||||
// RenderPassDepthStencilAttachment
|
||||
|
||||
static_assert(sizeof(RenderPassDepthStencilAttachmentDescriptor) == sizeof(WGPURenderPassDepthStencilAttachmentDescriptor), "sizeof mismatch for RenderPassDepthStencilAttachmentDescriptor");
|
||||
static_assert(alignof(RenderPassDepthStencilAttachmentDescriptor) == alignof(WGPURenderPassDepthStencilAttachmentDescriptor), "alignof mismatch for RenderPassDepthStencilAttachmentDescriptor");
|
||||
static_assert(sizeof(RenderPassDepthStencilAttachment) == sizeof(WGPURenderPassDepthStencilAttachment), "sizeof mismatch for RenderPassDepthStencilAttachment");
|
||||
static_assert(alignof(RenderPassDepthStencilAttachment) == alignof(WGPURenderPassDepthStencilAttachment), "alignof mismatch for RenderPassDepthStencilAttachment");
|
||||
|
||||
static_assert(offsetof(RenderPassDepthStencilAttachmentDescriptor, attachment) == offsetof(WGPURenderPassDepthStencilAttachmentDescriptor, attachment),
|
||||
"offsetof mismatch for RenderPassDepthStencilAttachmentDescriptor::attachment");
|
||||
static_assert(offsetof(RenderPassDepthStencilAttachmentDescriptor, depthLoadOp) == offsetof(WGPURenderPassDepthStencilAttachmentDescriptor, depthLoadOp),
|
||||
"offsetof mismatch for RenderPassDepthStencilAttachmentDescriptor::depthLoadOp");
|
||||
static_assert(offsetof(RenderPassDepthStencilAttachmentDescriptor, depthStoreOp) == offsetof(WGPURenderPassDepthStencilAttachmentDescriptor, depthStoreOp),
|
||||
"offsetof mismatch for RenderPassDepthStencilAttachmentDescriptor::depthStoreOp");
|
||||
static_assert(offsetof(RenderPassDepthStencilAttachmentDescriptor, clearDepth) == offsetof(WGPURenderPassDepthStencilAttachmentDescriptor, clearDepth),
|
||||
"offsetof mismatch for RenderPassDepthStencilAttachmentDescriptor::clearDepth");
|
||||
static_assert(offsetof(RenderPassDepthStencilAttachmentDescriptor, depthReadOnly) == offsetof(WGPURenderPassDepthStencilAttachmentDescriptor, depthReadOnly),
|
||||
"offsetof mismatch for RenderPassDepthStencilAttachmentDescriptor::depthReadOnly");
|
||||
static_assert(offsetof(RenderPassDepthStencilAttachmentDescriptor, stencilLoadOp) == offsetof(WGPURenderPassDepthStencilAttachmentDescriptor, stencilLoadOp),
|
||||
"offsetof mismatch for RenderPassDepthStencilAttachmentDescriptor::stencilLoadOp");
|
||||
static_assert(offsetof(RenderPassDepthStencilAttachmentDescriptor, stencilStoreOp) == offsetof(WGPURenderPassDepthStencilAttachmentDescriptor, stencilStoreOp),
|
||||
"offsetof mismatch for RenderPassDepthStencilAttachmentDescriptor::stencilStoreOp");
|
||||
static_assert(offsetof(RenderPassDepthStencilAttachmentDescriptor, clearStencil) == offsetof(WGPURenderPassDepthStencilAttachmentDescriptor, clearStencil),
|
||||
"offsetof mismatch for RenderPassDepthStencilAttachmentDescriptor::clearStencil");
|
||||
static_assert(offsetof(RenderPassDepthStencilAttachmentDescriptor, stencilReadOnly) == offsetof(WGPURenderPassDepthStencilAttachmentDescriptor, stencilReadOnly),
|
||||
"offsetof mismatch for RenderPassDepthStencilAttachmentDescriptor::stencilReadOnly");
|
||||
static_assert(offsetof(RenderPassDepthStencilAttachment, view) == offsetof(WGPURenderPassDepthStencilAttachment, view),
|
||||
"offsetof mismatch for RenderPassDepthStencilAttachment::view");
|
||||
static_assert(offsetof(RenderPassDepthStencilAttachment, depthLoadOp) == offsetof(WGPURenderPassDepthStencilAttachment, depthLoadOp),
|
||||
"offsetof mismatch for RenderPassDepthStencilAttachment::depthLoadOp");
|
||||
static_assert(offsetof(RenderPassDepthStencilAttachment, depthStoreOp) == offsetof(WGPURenderPassDepthStencilAttachment, depthStoreOp),
|
||||
"offsetof mismatch for RenderPassDepthStencilAttachment::depthStoreOp");
|
||||
static_assert(offsetof(RenderPassDepthStencilAttachment, clearDepth) == offsetof(WGPURenderPassDepthStencilAttachment, clearDepth),
|
||||
"offsetof mismatch for RenderPassDepthStencilAttachment::clearDepth");
|
||||
static_assert(offsetof(RenderPassDepthStencilAttachment, depthReadOnly) == offsetof(WGPURenderPassDepthStencilAttachment, depthReadOnly),
|
||||
"offsetof mismatch for RenderPassDepthStencilAttachment::depthReadOnly");
|
||||
static_assert(offsetof(RenderPassDepthStencilAttachment, stencilLoadOp) == offsetof(WGPURenderPassDepthStencilAttachment, stencilLoadOp),
|
||||
"offsetof mismatch for RenderPassDepthStencilAttachment::stencilLoadOp");
|
||||
static_assert(offsetof(RenderPassDepthStencilAttachment, stencilStoreOp) == offsetof(WGPURenderPassDepthStencilAttachment, stencilStoreOp),
|
||||
"offsetof mismatch for RenderPassDepthStencilAttachment::stencilStoreOp");
|
||||
static_assert(offsetof(RenderPassDepthStencilAttachment, clearStencil) == offsetof(WGPURenderPassDepthStencilAttachment, clearStencil),
|
||||
"offsetof mismatch for RenderPassDepthStencilAttachment::clearStencil");
|
||||
static_assert(offsetof(RenderPassDepthStencilAttachment, stencilReadOnly) == offsetof(WGPURenderPassDepthStencilAttachment, stencilReadOnly),
|
||||
"offsetof mismatch for RenderPassDepthStencilAttachment::stencilReadOnly");
|
||||
|
||||
// SamplerBindingLayout
|
||||
|
||||
|
@ -873,19 +868,19 @@ namespace wgpu {
|
|||
static_assert(offsetof(ShaderModuleWGSLDescriptor, source) == offsetof(WGPUShaderModuleWGSLDescriptor, source),
|
||||
"offsetof mismatch for ShaderModuleWGSLDescriptor::source");
|
||||
|
||||
// StencilStateFaceDescriptor
|
||||
// StencilFaceState
|
||||
|
||||
static_assert(sizeof(StencilStateFaceDescriptor) == sizeof(WGPUStencilStateFaceDescriptor), "sizeof mismatch for StencilStateFaceDescriptor");
|
||||
static_assert(alignof(StencilStateFaceDescriptor) == alignof(WGPUStencilStateFaceDescriptor), "alignof mismatch for StencilStateFaceDescriptor");
|
||||
static_assert(sizeof(StencilFaceState) == sizeof(WGPUStencilFaceState), "sizeof mismatch for StencilFaceState");
|
||||
static_assert(alignof(StencilFaceState) == alignof(WGPUStencilFaceState), "alignof mismatch for StencilFaceState");
|
||||
|
||||
static_assert(offsetof(StencilStateFaceDescriptor, compare) == offsetof(WGPUStencilStateFaceDescriptor, compare),
|
||||
"offsetof mismatch for StencilStateFaceDescriptor::compare");
|
||||
static_assert(offsetof(StencilStateFaceDescriptor, failOp) == offsetof(WGPUStencilStateFaceDescriptor, failOp),
|
||||
"offsetof mismatch for StencilStateFaceDescriptor::failOp");
|
||||
static_assert(offsetof(StencilStateFaceDescriptor, depthFailOp) == offsetof(WGPUStencilStateFaceDescriptor, depthFailOp),
|
||||
"offsetof mismatch for StencilStateFaceDescriptor::depthFailOp");
|
||||
static_assert(offsetof(StencilStateFaceDescriptor, passOp) == offsetof(WGPUStencilStateFaceDescriptor, passOp),
|
||||
"offsetof mismatch for StencilStateFaceDescriptor::passOp");
|
||||
static_assert(offsetof(StencilFaceState, compare) == offsetof(WGPUStencilFaceState, compare),
|
||||
"offsetof mismatch for StencilFaceState::compare");
|
||||
static_assert(offsetof(StencilFaceState, failOp) == offsetof(WGPUStencilFaceState, failOp),
|
||||
"offsetof mismatch for StencilFaceState::failOp");
|
||||
static_assert(offsetof(StencilFaceState, depthFailOp) == offsetof(WGPUStencilFaceState, depthFailOp),
|
||||
"offsetof mismatch for StencilFaceState::depthFailOp");
|
||||
static_assert(offsetof(StencilFaceState, passOp) == offsetof(WGPUStencilFaceState, passOp),
|
||||
"offsetof mismatch for StencilFaceState::passOp");
|
||||
|
||||
// StorageTextureBindingLayout
|
||||
|
||||
|
@ -1019,17 +1014,17 @@ namespace wgpu {
|
|||
static_assert(offsetof(TextureViewDescriptor, aspect) == offsetof(WGPUTextureViewDescriptor, aspect),
|
||||
"offsetof mismatch for TextureViewDescriptor::aspect");
|
||||
|
||||
// VertexAttributeDescriptor
|
||||
// VertexAttribute
|
||||
|
||||
static_assert(sizeof(VertexAttributeDescriptor) == sizeof(WGPUVertexAttributeDescriptor), "sizeof mismatch for VertexAttributeDescriptor");
|
||||
static_assert(alignof(VertexAttributeDescriptor) == alignof(WGPUVertexAttributeDescriptor), "alignof mismatch for VertexAttributeDescriptor");
|
||||
static_assert(sizeof(VertexAttribute) == sizeof(WGPUVertexAttribute), "sizeof mismatch for VertexAttribute");
|
||||
static_assert(alignof(VertexAttribute) == alignof(WGPUVertexAttribute), "alignof mismatch for VertexAttribute");
|
||||
|
||||
static_assert(offsetof(VertexAttributeDescriptor, format) == offsetof(WGPUVertexAttributeDescriptor, format),
|
||||
"offsetof mismatch for VertexAttributeDescriptor::format");
|
||||
static_assert(offsetof(VertexAttributeDescriptor, offset) == offsetof(WGPUVertexAttributeDescriptor, offset),
|
||||
"offsetof mismatch for VertexAttributeDescriptor::offset");
|
||||
static_assert(offsetof(VertexAttributeDescriptor, shaderLocation) == offsetof(WGPUVertexAttributeDescriptor, shaderLocation),
|
||||
"offsetof mismatch for VertexAttributeDescriptor::shaderLocation");
|
||||
static_assert(offsetof(VertexAttribute, format) == offsetof(WGPUVertexAttribute, format),
|
||||
"offsetof mismatch for VertexAttribute::format");
|
||||
static_assert(offsetof(VertexAttribute, offset) == offsetof(WGPUVertexAttribute, offset),
|
||||
"offsetof mismatch for VertexAttribute::offset");
|
||||
static_assert(offsetof(VertexAttribute, shaderLocation) == offsetof(WGPUVertexAttribute, shaderLocation),
|
||||
"offsetof mismatch for VertexAttribute::shaderLocation");
|
||||
|
||||
// BindGroupDescriptor
|
||||
|
||||
|
@ -1052,22 +1047,12 @@ namespace wgpu {
|
|||
static_assert(sizeof(BindGroupLayoutEntry) == sizeof(WGPUBindGroupLayoutEntry), "sizeof mismatch for BindGroupLayoutEntry");
|
||||
static_assert(alignof(BindGroupLayoutEntry) == alignof(WGPUBindGroupLayoutEntry), "alignof mismatch for BindGroupLayoutEntry");
|
||||
|
||||
static_assert(offsetof(BindGroupLayoutEntry, nextInChain) == offsetof(WGPUBindGroupLayoutEntry, nextInChain),
|
||||
"offsetof mismatch for BindGroupLayoutEntry::nextInChain");
|
||||
static_assert(offsetof(BindGroupLayoutEntry, binding) == offsetof(WGPUBindGroupLayoutEntry, binding),
|
||||
"offsetof mismatch for BindGroupLayoutEntry::binding");
|
||||
static_assert(offsetof(BindGroupLayoutEntry, visibility) == offsetof(WGPUBindGroupLayoutEntry, visibility),
|
||||
"offsetof mismatch for BindGroupLayoutEntry::visibility");
|
||||
static_assert(offsetof(BindGroupLayoutEntry, type) == offsetof(WGPUBindGroupLayoutEntry, type),
|
||||
"offsetof mismatch for BindGroupLayoutEntry::type");
|
||||
static_assert(offsetof(BindGroupLayoutEntry, hasDynamicOffset) == offsetof(WGPUBindGroupLayoutEntry, hasDynamicOffset),
|
||||
"offsetof mismatch for BindGroupLayoutEntry::hasDynamicOffset");
|
||||
static_assert(offsetof(BindGroupLayoutEntry, minBufferBindingSize) == offsetof(WGPUBindGroupLayoutEntry, minBufferBindingSize),
|
||||
"offsetof mismatch for BindGroupLayoutEntry::minBufferBindingSize");
|
||||
static_assert(offsetof(BindGroupLayoutEntry, viewDimension) == offsetof(WGPUBindGroupLayoutEntry, viewDimension),
|
||||
"offsetof mismatch for BindGroupLayoutEntry::viewDimension");
|
||||
static_assert(offsetof(BindGroupLayoutEntry, textureComponentType) == offsetof(WGPUBindGroupLayoutEntry, textureComponentType),
|
||||
"offsetof mismatch for BindGroupLayoutEntry::textureComponentType");
|
||||
static_assert(offsetof(BindGroupLayoutEntry, storageTextureFormat) == offsetof(WGPUBindGroupLayoutEntry, storageTextureFormat),
|
||||
"offsetof mismatch for BindGroupLayoutEntry::storageTextureFormat");
|
||||
static_assert(offsetof(BindGroupLayoutEntry, buffer) == offsetof(WGPUBindGroupLayoutEntry, buffer),
|
||||
"offsetof mismatch for BindGroupLayoutEntry::buffer");
|
||||
static_assert(offsetof(BindGroupLayoutEntry, sampler) == offsetof(WGPUBindGroupLayoutEntry, sampler),
|
||||
|
@ -1077,33 +1062,15 @@ namespace wgpu {
|
|||
static_assert(offsetof(BindGroupLayoutEntry, storageTexture) == offsetof(WGPUBindGroupLayoutEntry, storageTexture),
|
||||
"offsetof mismatch for BindGroupLayoutEntry::storageTexture");
|
||||
|
||||
// ImageCopyBuffer
|
||||
// BlendState
|
||||
|
||||
static_assert(sizeof(ImageCopyBuffer) == sizeof(WGPUImageCopyBuffer), "sizeof mismatch for ImageCopyBuffer");
|
||||
static_assert(alignof(ImageCopyBuffer) == alignof(WGPUImageCopyBuffer), "alignof mismatch for ImageCopyBuffer");
|
||||
static_assert(sizeof(BlendState) == sizeof(WGPUBlendState), "sizeof mismatch for BlendState");
|
||||
static_assert(alignof(BlendState) == alignof(WGPUBlendState), "alignof mismatch for BlendState");
|
||||
|
||||
static_assert(offsetof(ImageCopyBuffer, nextInChain) == offsetof(WGPUImageCopyBuffer, nextInChain),
|
||||
"offsetof mismatch for ImageCopyBuffer::nextInChain");
|
||||
static_assert(offsetof(ImageCopyBuffer, layout) == offsetof(WGPUImageCopyBuffer, layout),
|
||||
"offsetof mismatch for ImageCopyBuffer::layout");
|
||||
static_assert(offsetof(ImageCopyBuffer, buffer) == offsetof(WGPUImageCopyBuffer, buffer),
|
||||
"offsetof mismatch for ImageCopyBuffer::buffer");
|
||||
|
||||
// ColorStateDescriptor
|
||||
|
||||
static_assert(sizeof(ColorStateDescriptor) == sizeof(WGPUColorStateDescriptor), "sizeof mismatch for ColorStateDescriptor");
|
||||
static_assert(alignof(ColorStateDescriptor) == alignof(WGPUColorStateDescriptor), "alignof mismatch for ColorStateDescriptor");
|
||||
|
||||
static_assert(offsetof(ColorStateDescriptor, nextInChain) == offsetof(WGPUColorStateDescriptor, nextInChain),
|
||||
"offsetof mismatch for ColorStateDescriptor::nextInChain");
|
||||
static_assert(offsetof(ColorStateDescriptor, format) == offsetof(WGPUColorStateDescriptor, format),
|
||||
"offsetof mismatch for ColorStateDescriptor::format");
|
||||
static_assert(offsetof(ColorStateDescriptor, alphaBlend) == offsetof(WGPUColorStateDescriptor, alphaBlend),
|
||||
"offsetof mismatch for ColorStateDescriptor::alphaBlend");
|
||||
static_assert(offsetof(ColorStateDescriptor, colorBlend) == offsetof(WGPUColorStateDescriptor, colorBlend),
|
||||
"offsetof mismatch for ColorStateDescriptor::colorBlend");
|
||||
static_assert(offsetof(ColorStateDescriptor, writeMask) == offsetof(WGPUColorStateDescriptor, writeMask),
|
||||
"offsetof mismatch for ColorStateDescriptor::writeMask");
|
||||
static_assert(offsetof(BlendState, color) == offsetof(WGPUBlendState, color),
|
||||
"offsetof mismatch for BlendState::color");
|
||||
static_assert(offsetof(BlendState, alpha) == offsetof(WGPUBlendState, alpha),
|
||||
"offsetof mismatch for BlendState::alpha");
|
||||
|
||||
// ComputePipelineDescriptor
|
||||
|
||||
|
@ -1119,43 +1086,45 @@ namespace wgpu {
|
|||
static_assert(offsetof(ComputePipelineDescriptor, computeStage) == offsetof(WGPUComputePipelineDescriptor, computeStage),
|
||||
"offsetof mismatch for ComputePipelineDescriptor::computeStage");
|
||||
|
||||
// DepthStencilStateDescriptor
|
||||
// DepthStencilState
|
||||
|
||||
static_assert(sizeof(DepthStencilStateDescriptor) == sizeof(WGPUDepthStencilStateDescriptor), "sizeof mismatch for DepthStencilStateDescriptor");
|
||||
static_assert(alignof(DepthStencilStateDescriptor) == alignof(WGPUDepthStencilStateDescriptor), "alignof mismatch for DepthStencilStateDescriptor");
|
||||
static_assert(sizeof(DepthStencilState) == sizeof(WGPUDepthStencilState), "sizeof mismatch for DepthStencilState");
|
||||
static_assert(alignof(DepthStencilState) == alignof(WGPUDepthStencilState), "alignof mismatch for DepthStencilState");
|
||||
|
||||
static_assert(offsetof(DepthStencilStateDescriptor, nextInChain) == offsetof(WGPUDepthStencilStateDescriptor, nextInChain),
|
||||
"offsetof mismatch for DepthStencilStateDescriptor::nextInChain");
|
||||
static_assert(offsetof(DepthStencilStateDescriptor, format) == offsetof(WGPUDepthStencilStateDescriptor, format),
|
||||
"offsetof mismatch for DepthStencilStateDescriptor::format");
|
||||
static_assert(offsetof(DepthStencilStateDescriptor, depthWriteEnabled) == offsetof(WGPUDepthStencilStateDescriptor, depthWriteEnabled),
|
||||
"offsetof mismatch for DepthStencilStateDescriptor::depthWriteEnabled");
|
||||
static_assert(offsetof(DepthStencilStateDescriptor, depthCompare) == offsetof(WGPUDepthStencilStateDescriptor, depthCompare),
|
||||
"offsetof mismatch for DepthStencilStateDescriptor::depthCompare");
|
||||
static_assert(offsetof(DepthStencilStateDescriptor, stencilFront) == offsetof(WGPUDepthStencilStateDescriptor, stencilFront),
|
||||
"offsetof mismatch for DepthStencilStateDescriptor::stencilFront");
|
||||
static_assert(offsetof(DepthStencilStateDescriptor, stencilBack) == offsetof(WGPUDepthStencilStateDescriptor, stencilBack),
|
||||
"offsetof mismatch for DepthStencilStateDescriptor::stencilBack");
|
||||
static_assert(offsetof(DepthStencilStateDescriptor, stencilReadMask) == offsetof(WGPUDepthStencilStateDescriptor, stencilReadMask),
|
||||
"offsetof mismatch for DepthStencilStateDescriptor::stencilReadMask");
|
||||
static_assert(offsetof(DepthStencilStateDescriptor, stencilWriteMask) == offsetof(WGPUDepthStencilStateDescriptor, stencilWriteMask),
|
||||
"offsetof mismatch for DepthStencilStateDescriptor::stencilWriteMask");
|
||||
static_assert(offsetof(DepthStencilState, nextInChain) == offsetof(WGPUDepthStencilState, nextInChain),
|
||||
"offsetof mismatch for DepthStencilState::nextInChain");
|
||||
static_assert(offsetof(DepthStencilState, format) == offsetof(WGPUDepthStencilState, format),
|
||||
"offsetof mismatch for DepthStencilState::format");
|
||||
static_assert(offsetof(DepthStencilState, depthWriteEnabled) == offsetof(WGPUDepthStencilState, depthWriteEnabled),
|
||||
"offsetof mismatch for DepthStencilState::depthWriteEnabled");
|
||||
static_assert(offsetof(DepthStencilState, depthCompare) == offsetof(WGPUDepthStencilState, depthCompare),
|
||||
"offsetof mismatch for DepthStencilState::depthCompare");
|
||||
static_assert(offsetof(DepthStencilState, stencilFront) == offsetof(WGPUDepthStencilState, stencilFront),
|
||||
"offsetof mismatch for DepthStencilState::stencilFront");
|
||||
static_assert(offsetof(DepthStencilState, stencilBack) == offsetof(WGPUDepthStencilState, stencilBack),
|
||||
"offsetof mismatch for DepthStencilState::stencilBack");
|
||||
static_assert(offsetof(DepthStencilState, stencilReadMask) == offsetof(WGPUDepthStencilState, stencilReadMask),
|
||||
"offsetof mismatch for DepthStencilState::stencilReadMask");
|
||||
static_assert(offsetof(DepthStencilState, stencilWriteMask) == offsetof(WGPUDepthStencilState, stencilWriteMask),
|
||||
"offsetof mismatch for DepthStencilState::stencilWriteMask");
|
||||
static_assert(offsetof(DepthStencilState, depthBias) == offsetof(WGPUDepthStencilState, depthBias),
|
||||
"offsetof mismatch for DepthStencilState::depthBias");
|
||||
static_assert(offsetof(DepthStencilState, depthBiasSlopeScale) == offsetof(WGPUDepthStencilState, depthBiasSlopeScale),
|
||||
"offsetof mismatch for DepthStencilState::depthBiasSlopeScale");
|
||||
static_assert(offsetof(DepthStencilState, depthBiasClamp) == offsetof(WGPUDepthStencilState, depthBiasClamp),
|
||||
"offsetof mismatch for DepthStencilState::depthBiasClamp");
|
||||
|
||||
// RenderPassColorAttachmentDescriptor
|
||||
// ImageCopyBuffer
|
||||
|
||||
static_assert(sizeof(RenderPassColorAttachmentDescriptor) == sizeof(WGPURenderPassColorAttachmentDescriptor), "sizeof mismatch for RenderPassColorAttachmentDescriptor");
|
||||
static_assert(alignof(RenderPassColorAttachmentDescriptor) == alignof(WGPURenderPassColorAttachmentDescriptor), "alignof mismatch for RenderPassColorAttachmentDescriptor");
|
||||
static_assert(sizeof(ImageCopyBuffer) == sizeof(WGPUImageCopyBuffer), "sizeof mismatch for ImageCopyBuffer");
|
||||
static_assert(alignof(ImageCopyBuffer) == alignof(WGPUImageCopyBuffer), "alignof mismatch for ImageCopyBuffer");
|
||||
|
||||
static_assert(offsetof(RenderPassColorAttachmentDescriptor, attachment) == offsetof(WGPURenderPassColorAttachmentDescriptor, attachment),
|
||||
"offsetof mismatch for RenderPassColorAttachmentDescriptor::attachment");
|
||||
static_assert(offsetof(RenderPassColorAttachmentDescriptor, resolveTarget) == offsetof(WGPURenderPassColorAttachmentDescriptor, resolveTarget),
|
||||
"offsetof mismatch for RenderPassColorAttachmentDescriptor::resolveTarget");
|
||||
static_assert(offsetof(RenderPassColorAttachmentDescriptor, loadOp) == offsetof(WGPURenderPassColorAttachmentDescriptor, loadOp),
|
||||
"offsetof mismatch for RenderPassColorAttachmentDescriptor::loadOp");
|
||||
static_assert(offsetof(RenderPassColorAttachmentDescriptor, storeOp) == offsetof(WGPURenderPassColorAttachmentDescriptor, storeOp),
|
||||
"offsetof mismatch for RenderPassColorAttachmentDescriptor::storeOp");
|
||||
static_assert(offsetof(RenderPassColorAttachmentDescriptor, clearColor) == offsetof(WGPURenderPassColorAttachmentDescriptor, clearColor),
|
||||
"offsetof mismatch for RenderPassColorAttachmentDescriptor::clearColor");
|
||||
static_assert(offsetof(ImageCopyBuffer, nextInChain) == offsetof(WGPUImageCopyBuffer, nextInChain),
|
||||
"offsetof mismatch for ImageCopyBuffer::nextInChain");
|
||||
static_assert(offsetof(ImageCopyBuffer, layout) == offsetof(WGPUImageCopyBuffer, layout),
|
||||
"offsetof mismatch for ImageCopyBuffer::layout");
|
||||
static_assert(offsetof(ImageCopyBuffer, buffer) == offsetof(WGPUImageCopyBuffer, buffer),
|
||||
"offsetof mismatch for ImageCopyBuffer::buffer");
|
||||
|
||||
// ImageCopyTexture
|
||||
|
||||
|
@ -1173,6 +1142,22 @@ namespace wgpu {
|
|||
static_assert(offsetof(ImageCopyTexture, aspect) == offsetof(WGPUImageCopyTexture, aspect),
|
||||
"offsetof mismatch for ImageCopyTexture::aspect");
|
||||
|
||||
// RenderPassColorAttachment
|
||||
|
||||
static_assert(sizeof(RenderPassColorAttachment) == sizeof(WGPURenderPassColorAttachment), "sizeof mismatch for RenderPassColorAttachment");
|
||||
static_assert(alignof(RenderPassColorAttachment) == alignof(WGPURenderPassColorAttachment), "alignof mismatch for RenderPassColorAttachment");
|
||||
|
||||
static_assert(offsetof(RenderPassColorAttachment, view) == offsetof(WGPURenderPassColorAttachment, view),
|
||||
"offsetof mismatch for RenderPassColorAttachment::view");
|
||||
static_assert(offsetof(RenderPassColorAttachment, resolveTarget) == offsetof(WGPURenderPassColorAttachment, resolveTarget),
|
||||
"offsetof mismatch for RenderPassColorAttachment::resolveTarget");
|
||||
static_assert(offsetof(RenderPassColorAttachment, loadOp) == offsetof(WGPURenderPassColorAttachment, loadOp),
|
||||
"offsetof mismatch for RenderPassColorAttachment::loadOp");
|
||||
static_assert(offsetof(RenderPassColorAttachment, storeOp) == offsetof(WGPURenderPassColorAttachment, storeOp),
|
||||
"offsetof mismatch for RenderPassColorAttachment::storeOp");
|
||||
static_assert(offsetof(RenderPassColorAttachment, clearColor) == offsetof(WGPURenderPassColorAttachment, clearColor),
|
||||
"offsetof mismatch for RenderPassColorAttachment::clearColor");
|
||||
|
||||
// TextureDescriptor
|
||||
|
||||
static_assert(sizeof(TextureDescriptor) == sizeof(WGPUTextureDescriptor), "sizeof mismatch for TextureDescriptor");
|
||||
|
@ -1195,19 +1180,19 @@ namespace wgpu {
|
|||
static_assert(offsetof(TextureDescriptor, sampleCount) == offsetof(WGPUTextureDescriptor, sampleCount),
|
||||
"offsetof mismatch for TextureDescriptor::sampleCount");
|
||||
|
||||
// VertexBufferLayoutDescriptor
|
||||
// VertexBufferLayout
|
||||
|
||||
static_assert(sizeof(VertexBufferLayoutDescriptor) == sizeof(WGPUVertexBufferLayoutDescriptor), "sizeof mismatch for VertexBufferLayoutDescriptor");
|
||||
static_assert(alignof(VertexBufferLayoutDescriptor) == alignof(WGPUVertexBufferLayoutDescriptor), "alignof mismatch for VertexBufferLayoutDescriptor");
|
||||
static_assert(sizeof(VertexBufferLayout) == sizeof(WGPUVertexBufferLayout), "sizeof mismatch for VertexBufferLayout");
|
||||
static_assert(alignof(VertexBufferLayout) == alignof(WGPUVertexBufferLayout), "alignof mismatch for VertexBufferLayout");
|
||||
|
||||
static_assert(offsetof(VertexBufferLayoutDescriptor, arrayStride) == offsetof(WGPUVertexBufferLayoutDescriptor, arrayStride),
|
||||
"offsetof mismatch for VertexBufferLayoutDescriptor::arrayStride");
|
||||
static_assert(offsetof(VertexBufferLayoutDescriptor, stepMode) == offsetof(WGPUVertexBufferLayoutDescriptor, stepMode),
|
||||
"offsetof mismatch for VertexBufferLayoutDescriptor::stepMode");
|
||||
static_assert(offsetof(VertexBufferLayoutDescriptor, attributeCount) == offsetof(WGPUVertexBufferLayoutDescriptor, attributeCount),
|
||||
"offsetof mismatch for VertexBufferLayoutDescriptor::attributeCount");
|
||||
static_assert(offsetof(VertexBufferLayoutDescriptor, attributes) == offsetof(WGPUVertexBufferLayoutDescriptor, attributes),
|
||||
"offsetof mismatch for VertexBufferLayoutDescriptor::attributes");
|
||||
static_assert(offsetof(VertexBufferLayout, arrayStride) == offsetof(WGPUVertexBufferLayout, arrayStride),
|
||||
"offsetof mismatch for VertexBufferLayout::arrayStride");
|
||||
static_assert(offsetof(VertexBufferLayout, stepMode) == offsetof(WGPUVertexBufferLayout, stepMode),
|
||||
"offsetof mismatch for VertexBufferLayout::stepMode");
|
||||
static_assert(offsetof(VertexBufferLayout, attributeCount) == offsetof(WGPUVertexBufferLayout, attributeCount),
|
||||
"offsetof mismatch for VertexBufferLayout::attributeCount");
|
||||
static_assert(offsetof(VertexBufferLayout, attributes) == offsetof(WGPUVertexBufferLayout, attributes),
|
||||
"offsetof mismatch for VertexBufferLayout::attributes");
|
||||
|
||||
// BindGroupLayoutDescriptor
|
||||
|
||||
|
@ -1223,6 +1208,20 @@ namespace wgpu {
|
|||
static_assert(offsetof(BindGroupLayoutDescriptor, entries) == offsetof(WGPUBindGroupLayoutDescriptor, entries),
|
||||
"offsetof mismatch for BindGroupLayoutDescriptor::entries");
|
||||
|
||||
// ColorTargetState
|
||||
|
||||
static_assert(sizeof(ColorTargetState) == sizeof(WGPUColorTargetState), "sizeof mismatch for ColorTargetState");
|
||||
static_assert(alignof(ColorTargetState) == alignof(WGPUColorTargetState), "alignof mismatch for ColorTargetState");
|
||||
|
||||
static_assert(offsetof(ColorTargetState, nextInChain) == offsetof(WGPUColorTargetState, nextInChain),
|
||||
"offsetof mismatch for ColorTargetState::nextInChain");
|
||||
static_assert(offsetof(ColorTargetState, format) == offsetof(WGPUColorTargetState, format),
|
||||
"offsetof mismatch for ColorTargetState::format");
|
||||
static_assert(offsetof(ColorTargetState, blend) == offsetof(WGPUColorTargetState, blend),
|
||||
"offsetof mismatch for ColorTargetState::blend");
|
||||
static_assert(offsetof(ColorTargetState, writeMask) == offsetof(WGPUColorTargetState, writeMask),
|
||||
"offsetof mismatch for ColorTargetState::writeMask");
|
||||
|
||||
// RenderPassDescriptor
|
||||
|
||||
static_assert(sizeof(RenderPassDescriptor) == sizeof(WGPURenderPassDescriptor), "sizeof mismatch for RenderPassDescriptor");
|
||||
|
@ -1241,53 +1240,59 @@ namespace wgpu {
|
|||
static_assert(offsetof(RenderPassDescriptor, occlusionQuerySet) == offsetof(WGPURenderPassDescriptor, occlusionQuerySet),
|
||||
"offsetof mismatch for RenderPassDescriptor::occlusionQuerySet");
|
||||
|
||||
// VertexStateDescriptor
|
||||
// VertexState
|
||||
|
||||
static_assert(sizeof(VertexStateDescriptor) == sizeof(WGPUVertexStateDescriptor), "sizeof mismatch for VertexStateDescriptor");
|
||||
static_assert(alignof(VertexStateDescriptor) == alignof(WGPUVertexStateDescriptor), "alignof mismatch for VertexStateDescriptor");
|
||||
static_assert(sizeof(VertexState) == sizeof(WGPUVertexState), "sizeof mismatch for VertexState");
|
||||
static_assert(alignof(VertexState) == alignof(WGPUVertexState), "alignof mismatch for VertexState");
|
||||
|
||||
static_assert(offsetof(VertexStateDescriptor, nextInChain) == offsetof(WGPUVertexStateDescriptor, nextInChain),
|
||||
"offsetof mismatch for VertexStateDescriptor::nextInChain");
|
||||
static_assert(offsetof(VertexStateDescriptor, indexFormat) == offsetof(WGPUVertexStateDescriptor, indexFormat),
|
||||
"offsetof mismatch for VertexStateDescriptor::indexFormat");
|
||||
static_assert(offsetof(VertexStateDescriptor, vertexBufferCount) == offsetof(WGPUVertexStateDescriptor, vertexBufferCount),
|
||||
"offsetof mismatch for VertexStateDescriptor::vertexBufferCount");
|
||||
static_assert(offsetof(VertexStateDescriptor, vertexBuffers) == offsetof(WGPUVertexStateDescriptor, vertexBuffers),
|
||||
"offsetof mismatch for VertexStateDescriptor::vertexBuffers");
|
||||
static_assert(offsetof(VertexState, nextInChain) == offsetof(WGPUVertexState, nextInChain),
|
||||
"offsetof mismatch for VertexState::nextInChain");
|
||||
static_assert(offsetof(VertexState, module) == offsetof(WGPUVertexState, module),
|
||||
"offsetof mismatch for VertexState::module");
|
||||
static_assert(offsetof(VertexState, entryPoint) == offsetof(WGPUVertexState, entryPoint),
|
||||
"offsetof mismatch for VertexState::entryPoint");
|
||||
static_assert(offsetof(VertexState, bufferCount) == offsetof(WGPUVertexState, bufferCount),
|
||||
"offsetof mismatch for VertexState::bufferCount");
|
||||
static_assert(offsetof(VertexState, buffers) == offsetof(WGPUVertexState, buffers),
|
||||
"offsetof mismatch for VertexState::buffers");
|
||||
|
||||
// RenderPipelineDescriptor
|
||||
// FragmentState
|
||||
|
||||
static_assert(sizeof(RenderPipelineDescriptor) == sizeof(WGPURenderPipelineDescriptor), "sizeof mismatch for RenderPipelineDescriptor");
|
||||
static_assert(alignof(RenderPipelineDescriptor) == alignof(WGPURenderPipelineDescriptor), "alignof mismatch for RenderPipelineDescriptor");
|
||||
static_assert(sizeof(FragmentState) == sizeof(WGPUFragmentState), "sizeof mismatch for FragmentState");
|
||||
static_assert(alignof(FragmentState) == alignof(WGPUFragmentState), "alignof mismatch for FragmentState");
|
||||
|
||||
static_assert(offsetof(RenderPipelineDescriptor, nextInChain) == offsetof(WGPURenderPipelineDescriptor, nextInChain),
|
||||
"offsetof mismatch for RenderPipelineDescriptor::nextInChain");
|
||||
static_assert(offsetof(RenderPipelineDescriptor, label) == offsetof(WGPURenderPipelineDescriptor, label),
|
||||
"offsetof mismatch for RenderPipelineDescriptor::label");
|
||||
static_assert(offsetof(RenderPipelineDescriptor, layout) == offsetof(WGPURenderPipelineDescriptor, layout),
|
||||
"offsetof mismatch for RenderPipelineDescriptor::layout");
|
||||
static_assert(offsetof(RenderPipelineDescriptor, vertexStage) == offsetof(WGPURenderPipelineDescriptor, vertexStage),
|
||||
"offsetof mismatch for RenderPipelineDescriptor::vertexStage");
|
||||
static_assert(offsetof(RenderPipelineDescriptor, fragmentStage) == offsetof(WGPURenderPipelineDescriptor, fragmentStage),
|
||||
"offsetof mismatch for RenderPipelineDescriptor::fragmentStage");
|
||||
static_assert(offsetof(RenderPipelineDescriptor, vertexState) == offsetof(WGPURenderPipelineDescriptor, vertexState),
|
||||
"offsetof mismatch for RenderPipelineDescriptor::vertexState");
|
||||
static_assert(offsetof(RenderPipelineDescriptor, primitiveTopology) == offsetof(WGPURenderPipelineDescriptor, primitiveTopology),
|
||||
"offsetof mismatch for RenderPipelineDescriptor::primitiveTopology");
|
||||
static_assert(offsetof(RenderPipelineDescriptor, rasterizationState) == offsetof(WGPURenderPipelineDescriptor, rasterizationState),
|
||||
"offsetof mismatch for RenderPipelineDescriptor::rasterizationState");
|
||||
static_assert(offsetof(RenderPipelineDescriptor, sampleCount) == offsetof(WGPURenderPipelineDescriptor, sampleCount),
|
||||
"offsetof mismatch for RenderPipelineDescriptor::sampleCount");
|
||||
static_assert(offsetof(RenderPipelineDescriptor, depthStencilState) == offsetof(WGPURenderPipelineDescriptor, depthStencilState),
|
||||
"offsetof mismatch for RenderPipelineDescriptor::depthStencilState");
|
||||
static_assert(offsetof(RenderPipelineDescriptor, colorStateCount) == offsetof(WGPURenderPipelineDescriptor, colorStateCount),
|
||||
"offsetof mismatch for RenderPipelineDescriptor::colorStateCount");
|
||||
static_assert(offsetof(RenderPipelineDescriptor, colorStates) == offsetof(WGPURenderPipelineDescriptor, colorStates),
|
||||
"offsetof mismatch for RenderPipelineDescriptor::colorStates");
|
||||
static_assert(offsetof(RenderPipelineDescriptor, sampleMask) == offsetof(WGPURenderPipelineDescriptor, sampleMask),
|
||||
"offsetof mismatch for RenderPipelineDescriptor::sampleMask");
|
||||
static_assert(offsetof(RenderPipelineDescriptor, alphaToCoverageEnabled) == offsetof(WGPURenderPipelineDescriptor, alphaToCoverageEnabled),
|
||||
"offsetof mismatch for RenderPipelineDescriptor::alphaToCoverageEnabled");
|
||||
static_assert(offsetof(FragmentState, nextInChain) == offsetof(WGPUFragmentState, nextInChain),
|
||||
"offsetof mismatch for FragmentState::nextInChain");
|
||||
static_assert(offsetof(FragmentState, module) == offsetof(WGPUFragmentState, module),
|
||||
"offsetof mismatch for FragmentState::module");
|
||||
static_assert(offsetof(FragmentState, entryPoint) == offsetof(WGPUFragmentState, entryPoint),
|
||||
"offsetof mismatch for FragmentState::entryPoint");
|
||||
static_assert(offsetof(FragmentState, targetCount) == offsetof(WGPUFragmentState, targetCount),
|
||||
"offsetof mismatch for FragmentState::targetCount");
|
||||
static_assert(offsetof(FragmentState, targets) == offsetof(WGPUFragmentState, targets),
|
||||
"offsetof mismatch for FragmentState::targets");
|
||||
|
||||
// RenderPipelineDescriptor2
|
||||
|
||||
static_assert(sizeof(RenderPipelineDescriptor2) == sizeof(WGPURenderPipelineDescriptor2), "sizeof mismatch for RenderPipelineDescriptor2");
|
||||
static_assert(alignof(RenderPipelineDescriptor2) == alignof(WGPURenderPipelineDescriptor2), "alignof mismatch for RenderPipelineDescriptor2");
|
||||
|
||||
static_assert(offsetof(RenderPipelineDescriptor2, nextInChain) == offsetof(WGPURenderPipelineDescriptor2, nextInChain),
|
||||
"offsetof mismatch for RenderPipelineDescriptor2::nextInChain");
|
||||
static_assert(offsetof(RenderPipelineDescriptor2, label) == offsetof(WGPURenderPipelineDescriptor2, label),
|
||||
"offsetof mismatch for RenderPipelineDescriptor2::label");
|
||||
static_assert(offsetof(RenderPipelineDescriptor2, layout) == offsetof(WGPURenderPipelineDescriptor2, layout),
|
||||
"offsetof mismatch for RenderPipelineDescriptor2::layout");
|
||||
static_assert(offsetof(RenderPipelineDescriptor2, vertex) == offsetof(WGPURenderPipelineDescriptor2, vertex),
|
||||
"offsetof mismatch for RenderPipelineDescriptor2::vertex");
|
||||
static_assert(offsetof(RenderPipelineDescriptor2, primitive) == offsetof(WGPURenderPipelineDescriptor2, primitive),
|
||||
"offsetof mismatch for RenderPipelineDescriptor2::primitive");
|
||||
static_assert(offsetof(RenderPipelineDescriptor2, depthStencil) == offsetof(WGPURenderPipelineDescriptor2, depthStencil),
|
||||
"offsetof mismatch for RenderPipelineDescriptor2::depthStencil");
|
||||
static_assert(offsetof(RenderPipelineDescriptor2, multisample) == offsetof(WGPURenderPipelineDescriptor2, multisample),
|
||||
"offsetof mismatch for RenderPipelineDescriptor2::multisample");
|
||||
static_assert(offsetof(RenderPipelineDescriptor2, fragment) == offsetof(WGPURenderPipelineDescriptor2, fragment),
|
||||
"offsetof mismatch for RenderPipelineDescriptor2::fragment");
|
||||
|
||||
// BindGroup
|
||||
|
||||
|
@ -1513,6 +1518,9 @@ namespace wgpu {
|
|||
auto result = wgpuDeviceCreateComputePipeline(Get(), reinterpret_cast<WGPUComputePipelineDescriptor const * >(descriptor));
|
||||
return ComputePipeline::Acquire(result);
|
||||
}
|
||||
void Device::CreateComputePipelineAsync(ComputePipelineDescriptor const * descriptor, CreateComputePipelineAsyncCallback callback, void * userdata) const {
|
||||
wgpuDeviceCreateComputePipelineAsync(Get(), reinterpret_cast<WGPUComputePipelineDescriptor const * >(descriptor), callback, reinterpret_cast<void * >(userdata));
|
||||
}
|
||||
PipelineLayout Device::CreatePipelineLayout(PipelineLayoutDescriptor const * descriptor) const {
|
||||
auto result = wgpuDeviceCreatePipelineLayout(Get(), reinterpret_cast<WGPUPipelineLayoutDescriptor const * >(descriptor));
|
||||
return PipelineLayout::Acquire(result);
|
||||
|
@ -1521,20 +1529,17 @@ namespace wgpu {
|
|||
auto result = wgpuDeviceCreateQuerySet(Get(), reinterpret_cast<WGPUQuerySetDescriptor const * >(descriptor));
|
||||
return QuerySet::Acquire(result);
|
||||
}
|
||||
void Device::CreateReadyComputePipeline(ComputePipelineDescriptor const * descriptor, CreateReadyComputePipelineCallback callback, void * userdata) const {
|
||||
wgpuDeviceCreateReadyComputePipeline(Get(), reinterpret_cast<WGPUComputePipelineDescriptor const * >(descriptor), callback, reinterpret_cast<void * >(userdata));
|
||||
}
|
||||
void Device::CreateReadyRenderPipeline(RenderPipelineDescriptor const * descriptor, CreateReadyRenderPipelineCallback callback, void * userdata) const {
|
||||
wgpuDeviceCreateReadyRenderPipeline(Get(), reinterpret_cast<WGPURenderPipelineDescriptor const * >(descriptor), callback, reinterpret_cast<void * >(userdata));
|
||||
}
|
||||
RenderBundleEncoder Device::CreateRenderBundleEncoder(RenderBundleEncoderDescriptor const * descriptor) const {
|
||||
auto result = wgpuDeviceCreateRenderBundleEncoder(Get(), reinterpret_cast<WGPURenderBundleEncoderDescriptor const * >(descriptor));
|
||||
return RenderBundleEncoder::Acquire(result);
|
||||
}
|
||||
RenderPipeline Device::CreateRenderPipeline(RenderPipelineDescriptor const * descriptor) const {
|
||||
auto result = wgpuDeviceCreateRenderPipeline(Get(), reinterpret_cast<WGPURenderPipelineDescriptor const * >(descriptor));
|
||||
RenderPipeline Device::CreateRenderPipeline2(RenderPipelineDescriptor2 const * descriptor) const {
|
||||
auto result = wgpuDeviceCreateRenderPipeline2(Get(), reinterpret_cast<WGPURenderPipelineDescriptor2 const * >(descriptor));
|
||||
return RenderPipeline::Acquire(result);
|
||||
}
|
||||
void Device::CreateRenderPipelineAsync(RenderPipelineDescriptor2 const * descriptor, CreateRenderPipelineAsyncCallback callback, void * userdata) const {
|
||||
wgpuDeviceCreateRenderPipelineAsync(Get(), reinterpret_cast<WGPURenderPipelineDescriptor2 const * >(descriptor), callback, reinterpret_cast<void * >(userdata));
|
||||
}
|
||||
Sampler Device::CreateSampler(SamplerDescriptor const * descriptor) const {
|
||||
auto result = wgpuDeviceCreateSampler(Get(), reinterpret_cast<WGPUSamplerDescriptor const * >(descriptor));
|
||||
return Sampler::Acquire(result);
|
||||
|
@ -1551,8 +1556,8 @@ namespace wgpu {
|
|||
auto result = wgpuDeviceCreateTexture(Get(), reinterpret_cast<WGPUTextureDescriptor const * >(descriptor));
|
||||
return Texture::Acquire(result);
|
||||
}
|
||||
Queue Device::GetDefaultQueue() const {
|
||||
auto result = wgpuDeviceGetDefaultQueue(Get());
|
||||
Queue Device::GetQueue() const {
|
||||
auto result = wgpuDeviceGetQueue(Get());
|
||||
return Queue::Acquire(result);
|
||||
}
|
||||
bool Device::PopErrorScope(ErrorCallback callback, void * userdata) const {
|
||||
|
@ -1579,29 +1584,6 @@ namespace wgpu {
|
|||
}
|
||||
}
|
||||
|
||||
// Fence
|
||||
|
||||
static_assert(sizeof(Fence) == sizeof(WGPUFence), "sizeof mismatch for Fence");
|
||||
static_assert(alignof(Fence) == alignof(WGPUFence), "alignof mismatch for Fence");
|
||||
|
||||
uint64_t Fence::GetCompletedValue() const {
|
||||
auto result = wgpuFenceGetCompletedValue(Get());
|
||||
return result;
|
||||
}
|
||||
void Fence::OnCompletion(uint64_t value, FenceOnCompletionCallback callback, void * userdata) const {
|
||||
wgpuFenceOnCompletion(Get(), value, callback, reinterpret_cast<void * >(userdata));
|
||||
}
|
||||
void Fence::WGPUReference(WGPUFence handle) {
|
||||
if (handle != nullptr) {
|
||||
wgpuFenceReference(handle);
|
||||
}
|
||||
}
|
||||
void Fence::WGPURelease(WGPUFence handle) {
|
||||
if (handle != nullptr) {
|
||||
wgpuFenceRelease(handle);
|
||||
}
|
||||
}
|
||||
|
||||
// Instance
|
||||
|
||||
static_assert(sizeof(Instance) == sizeof(WGPUInstance), "sizeof mismatch for Instance");
|
||||
|
@ -1662,12 +1644,8 @@ namespace wgpu {
|
|||
static_assert(sizeof(Queue) == sizeof(WGPUQueue), "sizeof mismatch for Queue");
|
||||
static_assert(alignof(Queue) == alignof(WGPUQueue), "alignof mismatch for Queue");
|
||||
|
||||
Fence Queue::CreateFence(FenceDescriptor const * descriptor) const {
|
||||
auto result = wgpuQueueCreateFence(Get(), reinterpret_cast<WGPUFenceDescriptor const * >(descriptor));
|
||||
return Fence::Acquire(result);
|
||||
}
|
||||
void Queue::Signal(Fence const& fence, uint64_t signalValue) const {
|
||||
wgpuQueueSignal(Get(), fence.Get(), signalValue);
|
||||
void Queue::OnSubmittedWorkDone(uint64_t signalValue, QueueWorkDoneCallback callback, void * userdata) const {
|
||||
wgpuQueueOnSubmittedWorkDone(Get(), signalValue, callback, reinterpret_cast<void * >(userdata));
|
||||
}
|
||||
void Queue::Submit(uint32_t commandCount, CommandBuffer const * commands) const {
|
||||
wgpuQueueSubmit(Get(), commandCount, reinterpret_cast<WGPUCommandBuffer const * >(commands));
|
||||
|
@ -1802,8 +1780,8 @@ namespace wgpu {
|
|||
void RenderPassEncoder::SetBindGroup(uint32_t groupIndex, BindGroup const& group, uint32_t dynamicOffsetCount, uint32_t const * dynamicOffsets) const {
|
||||
wgpuRenderPassEncoderSetBindGroup(Get(), groupIndex, group.Get(), dynamicOffsetCount, reinterpret_cast<uint32_t const * >(dynamicOffsets));
|
||||
}
|
||||
void RenderPassEncoder::SetBlendColor(Color const * color) const {
|
||||
wgpuRenderPassEncoderSetBlendColor(Get(), reinterpret_cast<WGPUColor const * >(color));
|
||||
void RenderPassEncoder::SetBlendConstant(Color const * color) const {
|
||||
wgpuRenderPassEncoderSetBlendConstant(Get(), reinterpret_cast<WGPUColor const * >(color));
|
||||
}
|
||||
void RenderPassEncoder::SetIndexBuffer(Buffer const& buffer, IndexFormat format, uint64_t offset, uint64_t size) const {
|
||||
wgpuRenderPassEncoderSetIndexBuffer(Get(), buffer.Get(), static_cast<WGPUIndexFormat>(format), offset, size);
|
||||
|
@ -1913,6 +1891,9 @@ namespace wgpu {
|
|||
static_assert(sizeof(SwapChain) == sizeof(WGPUSwapChain), "sizeof mismatch for SwapChain");
|
||||
static_assert(alignof(SwapChain) == alignof(WGPUSwapChain), "alignof mismatch for SwapChain");
|
||||
|
||||
void SwapChain::Configure(TextureFormat format, TextureUsage allowedUsage, uint32_t width, uint32_t height) const {
|
||||
wgpuSwapChainConfigure(Get(), static_cast<WGPUTextureFormat>(format), static_cast<WGPUTextureUsage>(allowedUsage), width, height);
|
||||
}
|
||||
TextureView SwapChain::GetCurrentTextureView() const {
|
||||
auto result = wgpuSwapChainGetCurrentTextureView(Get());
|
||||
return TextureView::Acquire(result);
|
||||
|
|
|
@ -840,6 +840,7 @@
|
|||
"adapterType": 20,
|
||||
"backendType": 24,
|
||||
"deviceID": 4,
|
||||
"driverDescription": 16,
|
||||
"name": 12,
|
||||
"nextInChain": 0,
|
||||
"vendorID": 8
|
||||
|
@ -869,26 +870,26 @@
|
|||
"nextInChain": 0
|
||||
},
|
||||
"WGPUBindGroupLayoutEntry": {
|
||||
"__size__": 104,
|
||||
"binding": 0,
|
||||
"buffer": 40,
|
||||
"hasDynamicOffset": 12,
|
||||
"minBufferBindingSize": 16,
|
||||
"sampler": 64,
|
||||
"storageTexture": 88,
|
||||
"storageTextureFormat": 32,
|
||||
"texture": 72,
|
||||
"textureComponentType": 28,
|
||||
"type": 8,
|
||||
"viewDimension": 24,
|
||||
"visibility": 4
|
||||
"__size__": 80,
|
||||
"binding": 4,
|
||||
"buffer": 16,
|
||||
"nextInChain": 0,
|
||||
"sampler": 40,
|
||||
"storageTexture": 64,
|
||||
"texture": 48,
|
||||
"visibility": 8
|
||||
},
|
||||
"WGPUBlendDescriptor": {
|
||||
"WGPUBlendComponent": {
|
||||
"__size__": 12,
|
||||
"dstFactor": 8,
|
||||
"operation": 0,
|
||||
"srcFactor": 4
|
||||
},
|
||||
"WGPUBlendState": {
|
||||
"__size__": 24,
|
||||
"alpha": 12,
|
||||
"color": 0
|
||||
},
|
||||
"WGPUBufferBindingLayout": {
|
||||
"__size__": 24,
|
||||
"hasDynamicOffset": 8,
|
||||
|
@ -916,13 +917,12 @@
|
|||
"g": 8,
|
||||
"r": 0
|
||||
},
|
||||
"WGPUColorStateDescriptor": {
|
||||
"__size__": 36,
|
||||
"alphaBlend": 8,
|
||||
"colorBlend": 20,
|
||||
"WGPUColorTargetState": {
|
||||
"__size__": 16,
|
||||
"blend": 8,
|
||||
"format": 4,
|
||||
"nextInChain": 0,
|
||||
"writeMask": 32
|
||||
"writeMask": 12
|
||||
},
|
||||
"WGPUCommandBufferDescriptor": {
|
||||
"__size__": 8,
|
||||
|
@ -946,8 +946,11 @@
|
|||
"layout": 8,
|
||||
"nextInChain": 0
|
||||
},
|
||||
"WGPUDepthStencilStateDescriptor": {
|
||||
"__size__": 56,
|
||||
"WGPUDepthStencilState": {
|
||||
"__size__": 68,
|
||||
"depthBias": 56,
|
||||
"depthBiasClamp": 64,
|
||||
"depthBiasSlopeScale": 60,
|
||||
"depthCompare": 12,
|
||||
"depthWriteEnabled": 8,
|
||||
"format": 4,
|
||||
|
@ -959,15 +962,17 @@
|
|||
},
|
||||
"WGPUExtent3D": {
|
||||
"__size__": 12,
|
||||
"depth": 8,
|
||||
"depthOrArrayLayers": 8,
|
||||
"height": 4,
|
||||
"width": 0
|
||||
},
|
||||
"WGPUFenceDescriptor": {
|
||||
"__size__": 16,
|
||||
"initialValue": 8,
|
||||
"label": 4,
|
||||
"nextInChain": 0
|
||||
"WGPUFragmentState": {
|
||||
"__size__": 20,
|
||||
"entryPoint": 8,
|
||||
"module": 4,
|
||||
"nextInChain": 0,
|
||||
"targetCount": 12,
|
||||
"targets": 16
|
||||
},
|
||||
"WGPUImageCopyBuffer": {
|
||||
"__size__": 40,
|
||||
|
@ -987,6 +992,13 @@
|
|||
"__size__": 4,
|
||||
"nextInChain": 0
|
||||
},
|
||||
"WGPUMultisampleState": {
|
||||
"__size__": 16,
|
||||
"alphaToCoverageEnabled": 12,
|
||||
"count": 4,
|
||||
"mask": 8,
|
||||
"nextInChain": 0
|
||||
},
|
||||
"WGPUOrigin3D": {
|
||||
"__size__": 12,
|
||||
"x": 0,
|
||||
|
@ -1000,6 +1012,19 @@
|
|||
"label": 4,
|
||||
"nextInChain": 0
|
||||
},
|
||||
"WGPUPrimitiveDepthClampingState": {
|
||||
"__size__": 12,
|
||||
"chain": 0,
|
||||
"clampDepth": 8
|
||||
},
|
||||
"WGPUPrimitiveState": {
|
||||
"__size__": 20,
|
||||
"cullMode": 16,
|
||||
"frontFace": 12,
|
||||
"nextInChain": 0,
|
||||
"stripIndexFormat": 8,
|
||||
"topology": 4
|
||||
},
|
||||
"WGPUProgrammableStageDescriptor": {
|
||||
"__size__": 12,
|
||||
"entryPoint": 8,
|
||||
|
@ -1015,15 +1040,6 @@
|
|||
"pipelineStatisticsCount": 20,
|
||||
"type": 8
|
||||
},
|
||||
"WGPURasterizationStateDescriptor": {
|
||||
"__size__": 24,
|
||||
"cullMode": 8,
|
||||
"depthBias": 12,
|
||||
"depthBiasClamp": 20,
|
||||
"depthBiasSlopeScale": 16,
|
||||
"frontFace": 4,
|
||||
"nextInChain": 0
|
||||
},
|
||||
"WGPURenderBundleDescriptor": {
|
||||
"__size__": 8,
|
||||
"label": 4,
|
||||
|
@ -1038,17 +1054,16 @@
|
|||
"nextInChain": 0,
|
||||
"sampleCount": 20
|
||||
},
|
||||
"WGPURenderPassColorAttachmentDescriptor": {
|
||||
"WGPURenderPassColorAttachment": {
|
||||
"__size__": 48,
|
||||
"attachment": 0,
|
||||
"clearColor": 16,
|
||||
"loadOp": 8,
|
||||
"resolveTarget": 4,
|
||||
"storeOp": 12
|
||||
"storeOp": 12,
|
||||
"view": 0
|
||||
},
|
||||
"WGPURenderPassDepthStencilAttachmentDescriptor": {
|
||||
"WGPURenderPassDepthStencilAttachment": {
|
||||
"__size__": 36,
|
||||
"attachment": 0,
|
||||
"clearDepth": 12,
|
||||
"clearStencil": 28,
|
||||
"depthLoadOp": 4,
|
||||
|
@ -1056,7 +1071,8 @@
|
|||
"depthStoreOp": 8,
|
||||
"stencilLoadOp": 20,
|
||||
"stencilReadOnly": 32,
|
||||
"stencilStoreOp": 24
|
||||
"stencilStoreOp": 24,
|
||||
"view": 0
|
||||
},
|
||||
"WGPURenderPassDescriptor": {
|
||||
"__size__": 24,
|
||||
|
@ -1067,22 +1083,16 @@
|
|||
"nextInChain": 0,
|
||||
"occlusionQuerySet": 20
|
||||
},
|
||||
"WGPURenderPipelineDescriptor": {
|
||||
"__size__": 64,
|
||||
"alphaToCoverageEnabled": 60,
|
||||
"colorStateCount": 48,
|
||||
"colorStates": 52,
|
||||
"depthStencilState": 44,
|
||||
"fragmentStage": 24,
|
||||
"WGPURenderPipelineDescriptor2": {
|
||||
"__size__": 76,
|
||||
"depthStencil": 52,
|
||||
"fragment": 72,
|
||||
"label": 4,
|
||||
"layout": 8,
|
||||
"multisample": 56,
|
||||
"nextInChain": 0,
|
||||
"primitiveTopology": 32,
|
||||
"rasterizationState": 36,
|
||||
"sampleCount": 40,
|
||||
"sampleMask": 56,
|
||||
"vertexStage": 12,
|
||||
"vertexState": 28
|
||||
"primitive": 32,
|
||||
"vertex": 12
|
||||
},
|
||||
"WGPUSamplerBindingLayout": {
|
||||
"__size__": 8,
|
||||
|
@ -1099,6 +1109,7 @@
|
|||
"lodMaxClamp": 36,
|
||||
"lodMinClamp": 32,
|
||||
"magFilter": 20,
|
||||
"maxAnisotropy": 44,
|
||||
"minFilter": 24,
|
||||
"mipmapFilter": 28,
|
||||
"nextInChain": 0
|
||||
|
@ -1119,7 +1130,7 @@
|
|||
"chain": 0,
|
||||
"source": 8
|
||||
},
|
||||
"WGPUStencilStateFaceDescriptor": {
|
||||
"WGPUStencilFaceState": {
|
||||
"__size__": 16,
|
||||
"compare": 0,
|
||||
"depthFailOp": 8,
|
||||
|
@ -1190,25 +1201,26 @@
|
|||
"mipLevelCount": 20,
|
||||
"nextInChain": 0
|
||||
},
|
||||
"WGPUVertexAttributeDescriptor": {
|
||||
"WGPUVertexAttribute": {
|
||||
"__size__": 24,
|
||||
"format": 0,
|
||||
"offset": 8,
|
||||
"shaderLocation": 16
|
||||
},
|
||||
"WGPUVertexBufferLayoutDescriptor": {
|
||||
"WGPUVertexBufferLayout": {
|
||||
"__size__": 24,
|
||||
"arrayStride": 0,
|
||||
"attributeCount": 12,
|
||||
"attributes": 16,
|
||||
"stepMode": 8
|
||||
},
|
||||
"WGPUVertexStateDescriptor": {
|
||||
"__size__": 16,
|
||||
"indexFormat": 4,
|
||||
"nextInChain": 0,
|
||||
"vertexBufferCount": 8,
|
||||
"vertexBuffers": 12
|
||||
"WGPUVertexState": {
|
||||
"__size__": 20,
|
||||
"bufferCount": 12,
|
||||
"buffers": 16,
|
||||
"entryPoint": 8,
|
||||
"module": 4,
|
||||
"nextInChain": 0
|
||||
},
|
||||
"__wasi_fdstat_t": {
|
||||
"__size__": 24,
|
||||
|
|
Загрузка…
Ссылка в новой задаче