Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DepthStencilState::depth_write_enabled == false && RenderPassDepthStencilAttachment::depth_ops.is_some() is not caught by validation #2944

Open
CurryPseudo opened this issue Aug 5, 2022 · 1 comment
Labels
area: validation Issues related to validation, diagnostics, and error handling

Comments

@CurryPseudo
Copy link
Contributor

CurryPseudo commented Aug 5, 2022

Description

let pipeline = device.create_render_pipeline(&wgpu::RenderPipelineDescriptor {
    depth_stencil: Some(wgpu::DepthStencilState {
        depth_write_enabled: false,
        ..
    }),
    ..
});
let mut pass = encoder.begin_render_pass(&wgpu::RenderPassDescriptor {
    depth_stencil_attachment: Some(wgpu::RenderPassDepthStencilAttachment {
        depth_ops: Some(&wgpu::Operations {
            load: wgpu::LoadOp::Load,
            store: false
        }),
        ..
    }),
    ..
});

Refer to https://gpuweb.github.io/gpuweb/#abstract-opdef-gpurenderpassdepthstencilattachment-gpurenderpassdepthstencilattachment-valid-usage:

I expect getting a error from validation, but the depth buffer is discarded instead.

Platform
Apple M1 Max (Metal)
Windows NVIDIA GeForce RTX 3080 (Vulkan)

Version
wgpu 0.13.1

@teoxoy teoxoy added this to the WebGPU Specification V1 milestone Dec 5, 2022
@teoxoy teoxoy added the area: validation Issues related to validation, diagnostics, and error handling label Dec 5, 2022
@ErichDonGubler
Copy link
Member

Related: #6026

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: validation Issues related to validation, diagnostics, and error handling
Projects
Status: Todo
Development

No branches or pull requests

3 participants