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
I'm getting this validation error when running simple bevy apps:
2024-02-25T02:50:06.644539Z ERROR wgpu_hal::vulkan::instance: VALIDATION [VUID-VkShaderModuleCreateInfo-pCode-08737 (0xa5625282)]
Validation Error: [ VUID-VkShaderModuleCreateInfo-pCode-08737 ] | MessageID = 0xa5625282 | vkCreateShaderModule(): pCreateInfo->pCode (spirv-val produced an error):
Structure id 11 decorated as Block for variable in Uniform storage class must follow relaxed uniform buffer layout rules: member 3 is a matrix with stride 8 not satisfying alignment to 16
%StandardMaterialX_naga_oil_mod_XMJSXM6K7OBRHEOR2OBRHEX3UPFYGK4YX = OpTypeStruct %v4float %v4float %v4float %mat3v2float %float %float %float %float %float %float %float %float %uint %float %float %float %float %uint %uint
. The Vulkan spec states: If pCode is a pointer to SPIR-V code, pCode must adhere to the validation rules described by the Validation Rules within a Module section of the SPIR-V Environment appendix (https://www.khronos.org/registry/vulkan/specs/1.3-extensions/html/vkspec.html#VUID-VkShaderModuleCreateInfo-pCode-08737)
Bevy's StandardMaterial uniform is triggering the issue:
structStandardMaterial {
base_color: vec4<f32>,
emissive: vec4<f32>,
attenuation_color: vec4<f32>,
uv_transform: mat3x2<f32>,
perceptual_roughness: f32,
metallic: f32,
reflectance: f32,
diffuse_transmission: f32,
specular_transmission: f32,
thickness: f32,
ior: f32,
attenuation_distance: f32,
// 'flags' is a bit field indicating various options. u32 is 32 bits so we have up to 32 options.flags: u32,
alpha_cutoff: f32,
parallax_depth_scale: f32,
max_parallax_layer_count: f32,
lightmap_exposure: f32,
max_relief_mapping_search_steps: u32,
/// ID for specifying which deferred lighting pass should be used for rendering this material, if any.deferred_lighting_pass_id: u32,
};
Repro steps
I've encountered this with bevy's render-to-texture example (cargo r --example render_to_texture).
A uniform struct type containing a mat3x2<f32> should reproduce the issue as long the validation layers at version 1.3.275 are installed.
It's possible that this is a false positive, I'm not well-versed enough in Vulkan to know.
Expected vs observed behavior
If my reading of the WGSL spec is right, this is valid in WebGPU, so wgpu should accept it without validation errors.
Platform
Linux 6.7.6, Mesa 24, Vulkan validation layers 1.3.275.
The text was updated successfully, but these errors were encountered:
Description
I'm getting this validation error when running simple bevy apps:
Bevy's
StandardMaterial
uniform is triggering the issue:Repro steps
I've encountered this with bevy's render-to-texture example (
cargo r --example render_to_texture
).A
uniform
struct type containing amat3x2<f32>
should reproduce the issue as long the validation layers at version 1.3.275 are installed.It's possible that this is a false positive, I'm not well-versed enough in Vulkan to know.
Expected vs observed behavior
If my reading of the WGSL spec is right, this is valid in WebGPU, so wgpu should accept it without validation errors.
Platform
Linux 6.7.6, Mesa 24, Vulkan validation layers 1.3.275.
The text was updated successfully, but these errors were encountered: