You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When executing the following Rust code to create the shader module:
let shader = device.create_shader_module(wgpu::ShaderModuleDescriptor{label:Some("geoset"),source: wgpu::ShaderSource::Wgsl(include_str!("../geoset4_shader.wgsl").into()),});
I receive the following error:
Shader validation error: Type [2] '' is invalid
= Base type [1] for the array is invalid
The issue seems to be related to the wgpu::Features::TEXTURE_BINDING_ARRAY feature, which is required for texture arrays in WGSL. However, my attempts to enable this feature have not resolved the problem. I tried modifying the device features directly:
Despite these efforts, the shader validation error persists. Could you help me identify the root cause of this issue and suggest a solution to properly enable texture binding arrays in wgpu? Additionally, are there any specific configurations or steps I might be missing to make this work?
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
-
I'm encountering an issue with my WGSL code when creating a shader module in wgpu. My WGSL code is:
When executing the following Rust code to create the shader module:
I receive the following error:
The issue seems to be related to the
wgpu::Features::TEXTURE_BINDING_ARRAY
feature, which is required for texture arrays in WGSL. However, my attempts to enable this feature have not resolved the problem. I tried modifying the device features directly:I also tried configuring the
wgpu::Features::TEXTURE_BINDING_ARRAY
feature in theNativeOptions
for myeframe
application, but it still doesn't work:Despite these efforts, the shader validation error persists. Could you help me identify the root cause of this issue and suggest a solution to properly enable texture binding arrays in wgpu? Additionally, are there any specific configurations or steps I might be missing to make this work?
Beta Was this translation helpful? Give feedback.
All reactions