#Binding storage class problems

8 messages · Page 1 of 1 (latest)

azure panther
#

Hey guys,

Running into an error message I can't seem to understand

Shader global ResourceBinding { group: 0, binding: 1 } is not available in the pipeline layout
Storage class Storage { access: StorageAccess(LOAD | STORE) } doesn't match the shader Storage { access: StorageAccess(LOAD) }

in my wgsl
@group(0) @binding(5) var<storage, read_write> hit_distances: array<f32>;
@group(1) @binding(0) var<uniform> trace_uniforms: TraceUniforms;

and in my setup binding
&[BindGroupLayoutEntry {
binding: 1,
visibility: ShaderStages::COMPUTE | ShaderStages::FRAGMENT,
ty: BindingType::Buffer {
ty: BufferBindingType::Storage { read_only: false },
has_dynamic_offset: false,
min_binding_size: BufferSize::new((1280 * 720 * 4) as u64),
},
count: None,
}],

        &[BindGroupEntry {
            binding: 1,
            resource: trace_pipeline_data.hit_distances_buffer.as_entire_binding(),
        }],
elfin tinsel
#

You have binding: 1 in your layout, but your shader is using binding(5)

#

Also min_binding_size is not meant to work like that. Lookup the min binding size rules in the wgsl spec, or just leave it as None and let wgpu figure it out.

azure panther
#

Appreciate it. Will give it a go

#

any idea what this issue is?

   │                       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ naga::GlobalVariable [5]
   │
   = Bindings for [5] conflict with other resource```

I seem to be fighting back and forward between these issues but can't find anything to describe what this means?
elfin tinsel
#

I've never seen that error. Did you try to use binding 1 twice or smth?

azure panther
#

I think it's becasue I've bound something across somehting I'm already importing

#

i.e. I've bound group 0 bidning 1 in another wgsl that I'm importing into this one