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

wgpu allows multiple attachments that alias same memory #3126

Open
aleokdev opened this issue Oct 20, 2022 · 0 comments
Open

wgpu allows multiple attachments that alias same memory #3126

aleokdev opened this issue Oct 20, 2022 · 0 comments
Labels
area: correctness We're behaving incorrectly area: validation Issues related to validation, diagnostics, and error handling type: bug Something isn't working

Comments

@aleokdev
Copy link

Description
In Vulkan:

Multiple attachments that alias the same memory must not be used in a single subpass.

However, this is valid behavior in wgpu, even with the Vulkan backend.

Repro steps
Put this down on a renderpass of any simple example that clears the window:

color_attachments: &[
    Some(wgpu::RenderPassColorAttachment {
        view: &view,
        ops: wgpu::Operations {
            load: wgpu::LoadOp::Clear(wgpu::Color::BLACK),
            store: true,
        },
        resolve_target: None,
    }),
    Some(wgpu::RenderPassColorAttachment {
        view: &view,
        ops: wgpu::Operations {
            load: wgpu::LoadOp::Clear(wgpu::Color::WHITE),
            store: true,
        },
        resolve_target: None,
    }),
],

For me, the window clears as white consistently.

Expected vs observed behavior
This should not run.

Platform
Works on latest wgpu 0.14. Checked with both Manjaro X11 on a Nvidia card and Fedora Wayland on an integrated AMD processor.

@cwfitzgerald cwfitzgerald added type: bug Something isn't working area: validation Issues related to validation, diagnostics, and error handling area: correctness We're behaving incorrectly labels Oct 20, 2022
@teoxoy teoxoy added this to the WebGPU Specification V1 milestone Dec 5, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: correctness We're behaving incorrectly area: validation Issues related to validation, diagnostics, and error handling type: bug Something isn't working
Projects
Status: No status
Development

No branches or pull requests

3 participants