node: Add support for GPURenderPassDescriptor.maxDrawCount

Bug: None
Change-Id: I5e2ff510ceaa09becf0f5f760d0d0f7bc1d0cb49
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/112423
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
Kokoro: Kokoro <noreply+kokoro@google.com>
This commit is contained in:
Corentin Wallez 2022-12-02 12:06:35 +00:00 committed by Dawn LUCI CQ
parent 15e7f94b76
commit 25c0bdf2a9
1 changed files with 5 additions and 1 deletions

View File

@ -39,11 +39,15 @@ interop::Interface<interop::GPURenderPassEncoder> GPUCommandEncoder::beginRender
Converter conv(env);
wgpu::RenderPassDescriptor desc{};
wgpu::RenderPassDescriptorMaxDrawCount maxDrawCountDesc{};
desc.nextInChain = &maxDrawCountDesc;
// TODO(dawn:1250) handle timestampWrites
if (!conv(desc.colorAttachments, desc.colorAttachmentCount, descriptor.colorAttachments) ||
!conv(desc.depthStencilAttachment, descriptor.depthStencilAttachment) ||
!conv(desc.label, descriptor.label) ||
!conv(desc.occlusionQuerySet, descriptor.occlusionQuerySet)) {
!conv(desc.occlusionQuerySet, descriptor.occlusionQuerySet) ||
!conv(maxDrawCountDesc.maxDrawCount, descriptor.maxDrawCount)) {
return {};
}