From 0d6b1fc45f1648317854ef3212751ed6ecc9f2eb Mon Sep 17 00:00:00 2001 From: Corentin Wallez Date: Mon, 5 Dec 2022 12:04:16 +0000 Subject: [PATCH] node: Implement support for depth-clip-control Bug: None Change-Id: If62e2963917b1f2a94e415ce2c4c22b14317779a Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/112601 Reviewed-by: Ben Clayton Commit-Queue: Corentin Wallez Kokoro: Kokoro --- src/dawn/node/binding/Converter.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/dawn/node/binding/Converter.cpp b/src/dawn/node/binding/Converter.cpp index b4614bbd3c..95c49162a9 100644 --- a/src/dawn/node/binding/Converter.cpp +++ b/src/dawn/node/binding/Converter.cpp @@ -1042,6 +1042,13 @@ bool Converter::Convert(wgpu::BlendState& out, const interop::GPUBlendState& in) bool Converter::Convert(wgpu::PrimitiveState& out, const interop::GPUPrimitiveState& in) { out = {}; + + if (in.unclippedDepth) { + wgpu::PrimitiveDepthClipControl* depthClip = Allocate(); + depthClip->unclippedDepth = true; + out.nextInChain = depthClip; + } + return Convert(out.topology, in.topology) && Convert(out.stripIndexFormat, in.stripIndexFormat) && Convert(out.frontFace, in.frontFace) && Convert(out.cullMode, in.cullMode);