From 25c0bdf2a9dd803a0bfe57480e1e56ce99e5e2e7 Mon Sep 17 00:00:00 2001 From: Corentin Wallez Date: Fri, 2 Dec 2022 12:06:35 +0000 Subject: [PATCH] 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 Reviewed-by: Austin Eng Kokoro: Kokoro --- src/dawn/node/binding/GPUCommandEncoder.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/dawn/node/binding/GPUCommandEncoder.cpp b/src/dawn/node/binding/GPUCommandEncoder.cpp index 99ea8e07d7..fcc9dce77d 100644 --- a/src/dawn/node/binding/GPUCommandEncoder.cpp +++ b/src/dawn/node/binding/GPUCommandEncoder.cpp @@ -39,11 +39,15 @@ interop::Interface 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 {}; }