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

Texture Binding Array not Validated Against Flag #5102

Open
Tracked by #3637
rubengrim opened this issue Jan 19, 2024 · 1 comment
Open
Tracked by #3637

Texture Binding Array not Validated Against Flag #5102

rubengrim opened this issue Jan 19, 2024 · 1 comment
Labels
area: validation Issues related to validation, diagnostics, and error handling feature: bindless Issues with Bindless Native Feature type: bug Something isn't working

Comments

@rubengrim
Copy link

BindGroupLayoutEntry {
    binding: 0,
    visibility: ShaderStages::COMPUTE,
    ty: BindingType::Texture {
        sample_type: TextureSampleType::Float { filterable: true },
        view_dimension: TextureViewDimension::D2,
        multisampled: false,
    },
    count: NonZeroU32::new(64),
@group(0) @binding(0) var textures: binding_array<texture_2d<f32>>;

produces
panicked at /home/ruben/.cargo/registry/src/index.crates.io-6f17d22bba15001f/naga-0.13.0/src/back/glsl/mod.rs:1007:44: internal error: entered unreachable code

This happens in compute only, things seem to work as they should in fragment.

Fixing the size of the binding array doesn't change anything.

Platform
Zorin OS 16.3 (Ubuntu 20.04 LTS), wgpu 0.17.1, naga 0.13.0

@cwfitzgerald cwfitzgerald changed the title Internal error: entered unreachable code: when using texture binding array in compute shader Texture Binding Array not Validated Against Flag Jan 21, 2024
@cwfitzgerald
Copy link
Member

I think this actually is a bug in wgpu where we aren't validating the count member against the presence of the bindless array feature. OpenGL shouldn't ever have access to bindless arrays, meaning naga shouldn't ever need to try to generate them.

Bindless is not well covered in our test suite as it was added before the test suite was added.

@teoxoy teoxoy added type: bug Something isn't working area: validation Issues related to validation, diagnostics, and error handling labels Jan 21, 2024
@cwfitzgerald cwfitzgerald added the feature: bindless Issues with Bindless Native Feature label Dec 14, 2024
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 feature: bindless Issues with Bindless Native Feature type: bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants