Dawn: update to RenderPassEncoder::SetIndexBufferWithFormat().
RenderPassEncoder::SetIndexBuffer() is deprecated. Change-Id: Ie7b357df8bbee16fd08fa1bdf5e9cbedf11b259d Reviewed-on: https://skia-review.googlesource.com/c/skia/+/331495 Reviewed-by: Greg Daniel <egdaniel@google.com> Commit-Queue: Stephen White <senorblanco@google.com>
This commit is contained in:
parent
3744b2a366
commit
541f2acf98
@ -183,7 +183,7 @@ void GrDawnOpsRenderPass::onBindBuffers(sk_sp<const GrBuffer> indexBuffer,
|
||||
}
|
||||
if (indexBuffer) {
|
||||
wgpu::Buffer index = static_cast<const GrDawnBuffer*>(indexBuffer.get())->get();
|
||||
fPassEncoder.SetIndexBuffer(index);
|
||||
fPassEncoder.SetIndexBufferWithFormat(index, wgpu::IndexFormat::Uint16);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -373,7 +373,10 @@ sk_sp<GrDawnProgram> GrDawnProgramBuilder::Build(GrDawnGpu* gpu,
|
||||
inputs.push_back(input);
|
||||
}
|
||||
wgpu::VertexStateDescriptor vertexState;
|
||||
vertexState.indexFormat = wgpu::IndexFormat::Uint16;
|
||||
if (programInfo.primitiveType() == GrPrimitiveType::kTriangleStrip ||
|
||||
programInfo.primitiveType() == GrPrimitiveType::kLineStrip) {
|
||||
vertexState.indexFormat = wgpu::IndexFormat::Uint16;
|
||||
}
|
||||
vertexState.vertexBufferCount = inputs.size();
|
||||
vertexState.vertexBuffers = &inputs.front();
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user