Skip to content

Commit

Permalink
[webgpu-headers] Add macro for DepthClipControl
Browse files Browse the repository at this point in the history
- No operational changes.

webgpu-native/webgpu-headers#311

Bug: 42241174
Change-Id: I8d8016eff16876d8ef13f4840578fec2049e906a
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5688517
Reviewed-by: Corentin Wallez <[email protected]>
Commit-Queue: Fr <[email protected]>
Cr-Commit-Position: refs/heads/main@{#1330988}
  • Loading branch information
beaufortfrancois authored and Chromium LUCI CQ committed Jul 22, 2024
1 parent 21258f8 commit 63ce1cb
Showing 1 changed file with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -146,11 +146,15 @@ void GPUPrimitiveStateAsWGPUPrimitiveState(
dawn_state->dawn_desc.frontFace = AsDawnEnum(webgpu_desc->frontFace());
dawn_state->dawn_desc.cullMode = AsDawnEnum(webgpu_desc->cullMode());

#ifdef WGPU_BREAKING_CHANGE_DEPTH_CLIP_CONTROL
dawn_state->dawn_desc.unclippedDepth = webgpu_desc->unclippedDepth();
#else
if (webgpu_desc->unclippedDepth()) {
auto* depth_clip_control = &dawn_state->depth_clip_control;
depth_clip_control->unclippedDepth = webgpu_desc->unclippedDepth();
dawn_state->dawn_desc.nextInChain = depth_clip_control;
}
#endif
}

void GPUDepthStencilStateAsWGPUDepthStencilState(
Expand Down

0 comments on commit 63ce1cb

Please sign in to comment.