Error occurred during runtime
Bevy: 0.12.1 OS: Windows 10
// cargo --version
cargo 1.74.1 (ecb9851af 2023-10-18)
// rustup --version
rustup 1.26.0 (5af9b9484 2023-04-05)
info: This is the version for the rustup toolchain manager, not the rustc compiler.
info: The currently active `rustc` version is `rustc 1.74.1 (a28077b28 2023-12-04)`
run log
2023-12-15T07:10:47.398862Z INFO bevy_winit::system: Creating new window "App" (0v0)
2023-12-15T07:10:48.872910Z INFO bevy_render::renderer: AdapterInfo { name: "NVIDIA GeForce GTX 1050 Ti", vendor: 4318, device: 7298, device_type: DiscreteGpu, driver: "NVIDIA", driver_info: "537.13", backend: Vulkan }
File size: 5529600
vec size: 227470
2023-12-15T07:10:49.880559Z ERROR log: VALIDATION [VUID-VkShaderModuleCreateInfo-pCode-08737 (0xa5625282)]
Validation Error: [ VUID-VkShaderModuleCreateInfo-pCode-08737 ] | MessageID = 0xa5625282 | vkCreateShaderModule(): pCreateInfo->pCode is not valid SPIR-V: [VUID-StandaloneSpirv-OpTypeRuntimeArray-04680] Vulkan, OpTypeStruct containing an OpTypeRuntimeArray must be decorated with Block or BufferBlock.
%PointLightsX_naga_oil_mod_XMJSXM6K7OBRHEOR2NVSXG2C7OZUWK527OR4XAZLTX = OpTypeStruct %_runtimearr_PointLightX_naga_oil_mod_XMJSXM6K7OBRHEOR2NVSXG2C7OZUWK527OR4XAZLTX
. 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://vulkan.lunarg.com/doc/view/1.3.268.0/windows/1.3-extensions/vkspec.html#VUID-VkShaderModuleCreateInfo-pCode-08737)
2023-12-15T07:10:50.546794Z INFO bevy diagnostic: frame_count : 25.000000
2023-12-15T07:10:50.546968Z INFO bevy diagnostic: fps : 59.035135 (avg 59.734757)
2023-12-15T07:10:50.547037Z INFO bevy diagnostic: frame_time : 20.644194ms (avg 17.427975ms)
2023-12-15T07:10:51.546678Z INFO bevy diagnostic: frame_count : 83.000000
2023-12-15T07:10:51.546844Z INFO bevy diagnostic: fps : 49.673600 (avg 59.918190)
2023-12-15T07:10:51.546924Z INFO bevy diagnostic: frame_time : 22.466085ms (avg 17.168120ms)
2023-12-15T07:10:52.547473Z INFO bevy diagnostic: frame_count : 144.000000
2023-12-15T07:10:52.547627Z INFO bevy diagnostic: fps : 60.096701 (avg 60.000839)
2023-12-15T07:10:52.547695Z INFO bevy diagnostic: frame_time : 16.647092ms (avg 16.667120ms)
2023-12-15T07:10:53.219765Z INFO bevy_window::system: No windows are open, exiting
2023-12-15T07:10:53.222834Z INFO bevy_winit::system: Closing window 0v0
CPU and memory usage
What happened ?
- Why would a Vulken error be reported ?
- Why is CPU usage so high ?
- Why is the memory usage so high ?
That Vulkan validation error appears in several other bugs we have logged, see "decorated with Block or BufferBlock" in search. I've also encountered it myself, and suspected for a time that this was maybe the reason why Hanabi doesn't work on WASM, although I have no concrete proof. I don't remember the details, I think this is maybe fixed in a later wgpu version and not an actual error though?
It's possibly a duplicate again of #8733 fixed in latest wgpu by https://github.com/gfx-rs/naga/pull/2455.
@djeedai thank u
Is it not planned to upgrade wgpu? I'm confused.
"not planned" is also duplicate, that's GitHub status
Ah sorry I didn't realize it was a status, thought it was a comment from the GitHub notification email. Makes sense. Thanks @mockersf!