@@ -399,6 +399,13 @@ const WGPUFilterMode WGPU_FILTER_MODE_to_Dawn[] = {
399399 WGPUFilterMode_Linear
400400};
401401#define wgpu_filter_mode_to_dawn (mode ) WGPU_FILTER_MODE_to_Dawn[mode]
402+
403+ const WGPUMipmapFilterMode WGPU_MIPMAP_FILTER_MODE_to_Dawn[] = {
404+ WGPUMipmapFilterMode_Force32,
405+ WGPUMipmapFilterMode_Nearest,
406+ WGPUMipmapFilterMode_Linear
407+ };
408+ #define wgpu_mipmap_filter_mode_to_dawn (mode ) WGPU_MIPMAP_FILTER_MODE_to_Dawn[mode]
402409
403410const WGPUCompareFunction WGPU_COMPARE_FUNCTION_to_Dawn[] = {
404411 WGPUCompareFunction_Undefined,
@@ -1131,7 +1138,6 @@ WGpuBuffer wgpu_device_create_buffer(WGpuDevice device, const WGpuBufferDescript
11311138 _desc.nextInChain = nullptr ;
11321139
11331140 WGPUBuffer buffer = wgpuDeviceCreateBuffer (_wgpu_get_dawn<WGPUDevice>(device), &_desc);
1134- buffer->state = bufferDesc->mappedAtCreation ? kWebGPUBufferMapStateMappedForWriting : kWebGPUBufferMapStateUnmapped ;
11351141 return _wgpu_store_and_set_parent (kWebGPUBuffer , buffer, device);
11361142}
11371143
@@ -1172,7 +1178,7 @@ WGpuSampler wgpu_device_create_sampler(WGpuDevice device, const WGpuSamplerDescr
11721178 _desc.addressModeW = wgpu_address_mode_to_dawn (samplerDesc->addressModeW );
11731179 _desc.magFilter = wgpu_filter_mode_to_dawn (samplerDesc->magFilter );
11741180 _desc.minFilter = wgpu_filter_mode_to_dawn (samplerDesc->minFilter );
1175- _desc.mipmapFilter = wgpu_filter_mode_to_dawn (samplerDesc->mipmapFilter );
1181+ _desc.mipmapFilter = wgpu_mipmap_filter_mode_to_dawn (samplerDesc->mipmapFilter );
11761182 _desc.lodMinClamp = samplerDesc->lodMinClamp ;
11771183 _desc.lodMaxClamp = samplerDesc->lodMaxClamp ;
11781184 _desc.compare = wgpu_compare_function_to_dawn (samplerDesc->compare );
@@ -1970,7 +1976,6 @@ static WGPURenderPassColorAttachment getColorAttachInfo(const WGpuRenderPassColo
19701976 _attachment.resolveTarget = _wgpu_get_dawn<WGPUTextureView>(colorAttachment.resolveTarget );
19711977 _attachment.loadOp = wgpu_load_op_to_dawn (colorAttachment.loadOp );
19721978 _attachment.storeOp = wgpu_store_op_to_dawn (colorAttachment.storeOp );
1973- _attachment.clearColor = WGPUColor{ colorAttachment.clearValue .r , colorAttachment.clearValue .g , colorAttachment.clearValue .b , colorAttachment.clearValue .a };
19741979 _attachment.clearValue = WGPUColor{ colorAttachment.clearValue .r , colorAttachment.clearValue .g , colorAttachment.clearValue .b , colorAttachment.clearValue .a };
19751980 return _attachment;
19761981}
@@ -1997,11 +2002,10 @@ WGpuRenderPassEncoder wgpu_command_encoder_begin_render_pass(WGpuCommandEncoder
19972002 depthStencil.depthLoadOp = wgpu_load_op_to_dawn (_depthStencil.depthLoadOp );
19982003 depthStencil.depthStoreOp = wgpu_store_op_to_dawn (_depthStencil.depthStoreOp );
19992004 depthStencil.depthReadOnly = _depthStencil.depthReadOnly ;
2000- depthStencil.clearDepth = _depthStencil.depthClearValue ;
20012005 depthStencil.depthClearValue = _depthStencil.depthClearValue ;
20022006 depthStencil.stencilLoadOp = wgpu_load_op_to_dawn (_depthStencil.stencilLoadOp );
20032007 depthStencil.stencilStoreOp = wgpu_store_op_to_dawn (_depthStencil.stencilStoreOp );
2004- depthStencil.clearStencil = _depthStencil.stencilClearValue ;
2008+ depthStencil.stencilClearValue = _depthStencil.stencilClearValue ;
20052009 depthStencil.stencilReadOnly = _depthStencil.stencilReadOnly ;
20062010 _desc.depthStencilAttachment = &depthStencil;
20072011 }
@@ -2534,7 +2538,6 @@ void wgpu_canvas_context_configure(WGpuCanvasContext canvasContext, const WGpuCa
25342538 swapDesc.usage = (WGPUTextureUsageFlags)config->usage ;
25352539 swapDesc.nextInChain = nullptr ;
25362540 swapDesc.label = nullptr ;
2537- swapDesc.implementation = 0 ;
25382541 context->swapChain = wgpuDeviceCreateSwapChain (_wgpu_get_dawn<WGPUDevice>(config->device ), context->surface , &swapDesc);
25392542}
25402543
0 commit comments