Update usage of deprecated Dawn typedefs

Bug: dawn:22
Change-Id: I7c0a4f77bc2c2df81ff4be091bf86569898a1ade
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/447216
Auto-Submit: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Stephen White <senorblanco@google.com>
Reviewed-by: Stephen White <senorblanco@google.com>
This commit is contained in:
Corentin Wallez 2021-09-09 17:04:00 +02:00 committed by SkCQ
parent 66ef11dceb
commit 2c704669fb
3 changed files with 7 additions and 7 deletions

View File

@ -768,12 +768,12 @@ bool GrDawnGpu::onRegenerateMipMapLevels(GrTexture* tex) {
bgDesc.entryCount = 2;
bgDesc.entries = bge;
wgpu::BindGroup bindGroup = fDevice.CreateBindGroup(&bgDesc);
wgpu::RenderPassColorAttachmentDescriptor colorAttachment;
wgpu::RenderPassColorAttachment colorAttachment;
colorAttachment.view = dstView;
colorAttachment.clearColor = { 0.0f, 0.0f, 0.0f, 0.0f };
colorAttachment.loadOp = wgpu::LoadOp::Load;
colorAttachment.storeOp = wgpu::StoreOp::Store;
wgpu::RenderPassColorAttachmentDescriptor* colorAttachments = { &colorAttachment };
wgpu::RenderPassColorAttachment* colorAttachments = { &colorAttachment };
wgpu::RenderPassDescriptor renderPassDesc;
renderPassDesc.colorAttachmentCount = 1;
renderPassDesc.colorAttachments = colorAttachments;

View File

@ -61,18 +61,18 @@ wgpu::RenderPassEncoder GrDawnOpsRenderPass::beginRenderPass(wgpu::LoadOp colorO
const float* c = fColorInfo.fClearColor.data();
wgpu::RenderPassColorAttachmentDescriptor colorAttachment;
wgpu::RenderPassColorAttachment colorAttachment;
colorAttachment.view = static_cast<GrDawnRenderTarget*>(fRenderTarget)->textureView();
colorAttachment.resolveTarget = nullptr;
colorAttachment.clearColor = { c[0], c[1], c[2], c[3] };
colorAttachment.loadOp = colorOp;
colorAttachment.storeOp = wgpu::StoreOp::Store;
wgpu::RenderPassColorAttachmentDescriptor* colorAttachments = { &colorAttachment };
wgpu::RenderPassColorAttachment* colorAttachments = { &colorAttachment };
wgpu::RenderPassDescriptor renderPassDescriptor;
renderPassDescriptor.colorAttachmentCount = 1;
renderPassDescriptor.colorAttachments = colorAttachments;
if (stencilAttachment) {
wgpu::RenderPassDepthStencilAttachmentDescriptor depthStencilAttachment;
wgpu::RenderPassDepthStencilAttachment depthStencilAttachment;
depthStencilAttachment.view = stencilAttachment->view();
depthStencilAttachment.depthLoadOp = stencilOp;
depthStencilAttachment.stencilLoadOp = stencilOp;

View File

@ -350,7 +350,7 @@ sk_sp<GrDawnProgram> GrDawnProgramBuilder::Build(GrDawnGpu* gpu,
}
wgpu::VertexBufferLayout input;
input.arrayStride = offset;
input.stepMode = wgpu::InputStepMode::Vertex;
input.stepMode = wgpu::VertexStepMode::Vertex;
input.attributeCount = vertexAttributes.size();
input.attributes = &vertexAttributes.front();
inputs.push_back(input);
@ -369,7 +369,7 @@ sk_sp<GrDawnProgram> GrDawnProgramBuilder::Build(GrDawnGpu* gpu,
}
wgpu::VertexBufferLayout input;
input.arrayStride = offset;
input.stepMode = wgpu::InputStepMode::Instance;
input.stepMode = wgpu::VertexStepMode::Instance;
input.attributeCount = instanceAttributes.size();
input.attributes = &instanceAttributes.front();
inputs.push_back(input);