-
-
Notifications
You must be signed in to change notification settings - Fork 4.2k
Closed
Labels
A-RenderingDrawing game state to the screenDrawing game state to the screenC-BugAn unexpected or incorrect behaviorAn unexpected or incorrect behavior
Description
Bevy version
0.9
AdapterInfo { name: "NVIDIA GeForce MX150", vendor: 4318, device: 7442, device_type: DiscreteGpu, driver: "NVIDIA", driver_info: "470.161.03", backend: Vulkan }
What went wrong
When using non-uniform indexing (bindless) textures in debug mode, shader validation fails and output
2022-12-06T20:06:19.458496Z ERROR bevy_render::render_resource::pipeline_cache: failed to process shader:
error: Function [68] 'retreive_surface' is invalid
┌─ wgsl:1333:1
│
1333 │ ╭ fn retreive_surface(material_index: u32, uv: vec2<f32>) -> Surface {
1334 │ │ var surface: Surface;
1335 │ │ let material = material_buffer[material_index];
1336 │ │
· │
1340 │ │ surface.base_color *= textureSampleLevel(textures[id], samplers[id], uv, 0.0);
│ │ ^^^^^^^^^^^^ naga::Expression [74]
· │
1363 │ │
1364 │ │ return surface;
│ ╰───────────────────^ naga::Function [68]
│
= Expression [74] is invalid
= Shader requires capability SAMPLED_TEXTURE_AND_STORAGE_BUFFER_ARRAY_NON_UNIFORM_INDEXING
This error does not happen in release mode.
Additional information
According to this issue and code here, bevy seems to validate the shader with a limited set of constant capabilities. Maybe add the SAMPLED_TEXTURE_AND_STORAGE_BUFFER_ARRAY_NON_UNIFORM_INDEXING capability here could solve the problem?
Metadata
Metadata
Assignees
Labels
A-RenderingDrawing game state to the screenDrawing game state to the screenC-BugAn unexpected or incorrect behaviorAn unexpected or incorrect behavior