Comments (8)
I'm seeing the same error message using a PbrBundle
with and without the extra bevy_render
dependency.
Bevy 0.13.2
System info:
2024-05-04T18:11:11.728782Z INFO bevy_render::renderer: AdapterInfo { name: "NVIDIA GeForce RTX 2060", vendor: 4318, de
vice: 7944, device_type: DiscreteGpu, driver: "NVIDIA", driver_info: "552.12", backend: Vulkan }
2024-05-04T18:11:13.088476Z INFO bevy_diagnostic::system_information_diagnostics_plugin::internal: SystemInfo { os: "Wi
ndows 10 Home", kernel: "19045", cpu: "AMD Ryzen 7 1700 Eight-Core Processor", core_count: "8", memory: "15.9 GiB" }
from bevy.
I played around with this a bit more and got it to start up by explicitly setting my rendering backend to OpenGL - it renders fine but with a bunch of errors.
2024-05-05T09:40:20.754652Z ERROR log: wgpu-hal heuristics assumed that the view dimension will be equal to `D2` rather than `D2Array`.
`D2` textures with `depth_or_array_layers == 1` are assumed to have view dimension `D2`
`D2` textures with `depth_or_array_layers > 1` are assumed to have view dimension `D2Array`
`D2` textures with `depth_or_array_layers == 6` are assumed to have view dimension `Cube`
`D2` textures with `depth_or_array_layers > 6 && depth_or_array_layers % 6 == 0` are assumed to have view dimension `CubeArray`
Powershell:
$Env:WGPU_BACKEND="opengl"
It continues to fail as before if I explicitly set the backend to vulkan
and dx12
.
@jimvdl can you see if that makes any difference for you?
from bevy.
For me no rendering happens, I have roughly the same errors but my GPU doesn't have full OpenGL support (it seems)
from bevy.
I got to the bottom of the error on my end. I was working on migrating an old project over to bevy -- I hadn't realised it was on 2018 Rust edition.
Upgrading to 2021 fixed it for me.
from bevy.
I'm also having the same problem on my Apple machine, it panics as shared above. The issue does not occur if I spawn only the camera or the ground but occurs when I spawn both of them. I'm also new to Bevy and the game development so, got no clues here.
Rust version: 1.78.0
2024-05-09T09:59:35.817984Z INFO bevy_render::renderer: AdapterInfo { name: "Apple M2 Pro", vendor: 0, device: 0, device_type: IntegratedGpu, driver: "", driver_info: "", backend: Metal }
2024-05-09T09:59:36.299343Z INFO bevy_winit::system: Creating new window "App" (0v1)
2024-05-09T09:59:36.335828Z INFO bevy_diagnostic::system_information_diagnostics_plugin::internal: SystemInfo { os: "MacOS 14.4.1 ", kernel: "23.4.0", cpu: "Apple M2 Pro", core_count: "12", memory: "32.0 GiB" }
Cargo.toml
[package]
name = "agustos"
version = "0.1.0"
edition = "2021"
[dependencies]
bevy = { version = "0.13.2", features = ["default"] }
main.rs
fn main() {
App::new()
.add_plugins(DefaultPlugins)
.add_systems(Startup, (spawn_camera, create_ground))
.run();
}
pub fn spawn_camera(mut commands: Commands) {
commands.spawn((
Camera3dBundle {
transform: Transform::from_xyz(-2., 2.5, 5.0)
.looking_at(Vec3::ZERO, Vec3::Y),
..default()
}
));
}
pub fn create_ground(
mut commands: Commands,
mut meshes: ResMut<Assets<Mesh>>,
mut materials: ResMut<Assets<StandardMaterial>>,
) {
let floor = PbrBundle {
mesh: meshes.add(Plane3d::default().mesh().size(50.0, 50.0)),
material: materials.add(Color::DARK_GREEN),
..default()
};
commands.spawn(floor);
}
from bevy.
Some debugging info about reproducable example from issue description:
Just before first panic there are some unassigned bindings processed
DEBUG naga::back::glsl: unassigned binding for Some("viewX_naga_oil_mod_XMJSXM6K7OBRHEOR2NVSXG2C7OZUWK527MJUW4ZDJNZTXGX")
DEBUG naga::back::glsl: unassigned binding for Some("lightsX_naga_oil_mod_XMJSXM6K7OBRHEOR2NVSXG2C7OZUWK527MJUW4ZDJNZTXGX")
DEBUG naga::back::glsl: unassigned binding for Some("point_lightsX_naga_oil_mod_XMJSXM6K7OBRHEOR2NVSXG2C7OZUWK527MJUW4ZDJNZTXGX")
DEBUG naga::back::glsl: unassigned binding for Some("cluster_light_index_listsX_naga_oil_mod_XMJSXM6K7OBRHEOR2NVSXG2C7OZUWK527MJUW4ZDJNZTXGX")
DEBUG naga::back::glsl: unassigned binding for Some("cluster_offsets_and_countsX_naga_oil_mod_XMJSXM6K7OBRHEOR2NVSXG2C7OZUWK527MJUW4ZDJNZTXGX")
DEBUG naga::back::glsl: unassigned binding for Some("globalsX_naga_oil_mod_XMJSXM6K7OBRHEOR2NVSXG2C7OZUWK527MJUW4ZDJNZTXGX")
DEBUG naga::back::glsl: unassigned binding for Some("fogX_naga_oil_mod_XMJSXM6K7OBRHEOR2NVSXG2C7OZUWK527MJUW4ZDJNZTXGX")
DEBUG naga::back::glsl: unassigned binding for Some("light_probesX_naga_oil_mod_XMJSXM6K7OBRHEOR2NVSXG2C7OZUWK527MJUW4ZDJNZTXGX")
DEBUG naga::back::glsl: unassigned binding for Some("visibility_rangesX_naga_oil_mod_XMJSXM6K7OBRHEOR2NVSXG2C7OZUWK527MJUW4ZDJNZTXGX")
DEBUG naga::back::glsl: unassigned binding for Some("diffuse_environment_mapsX_naga_oil_mod_XMJSXM6K7OBRHEOR2NVSXG2C7OZUWK527MJUW4ZDJNZTXGX")
The last unassigned binding caused first panic. Looks like problem is deep in naga or naga_oil:
- 0: naga::back::glsl::Writer::write_global
at /wgpu/naga/src/back/glsl/mod.rs:1183:61
Comment here tells thatAddressSpace::Handle
arm supposed to be for texture or sample, which should be processed earlier - 1: naga::back::glsl::Writer::write
at /wgpu/naga/src/back/glsl/mod.rs:896:21
But default arm here is actualy TypeInner::BindingArray but not TypeInner::Image or TypeInner::Sampler which would be processed correctly - 2: naga_oil::compose::Composer::naga_to_string
at /naga_oil/src/compose/mod.rs:557:17 - 3: naga_oil::compose::Composer::create_composable_module
at /naga_oil/src/compose/mod.rs:1156:30 - 4: naga_oil::compose::Composer::ensure_import
at /naga_oil/src/compose/mod.rs:1310:9 - 5: naga_oil::compose::Composer::ensure_imports
at /naga_oil/src/compose/mod.rs:1338:19 - 6: naga_oil::compose::Composer::ensure_import
at /naga_oil/src/compose/mod.rs:1307:9 - 7: naga_oil::compose::Composer::ensure_imports
at /naga_oil/src/compose/mod.rs:1338:19 - 8: naga_oil::compose::Composer::ensure_import
at /naga_oil/src/compose/mod.rs:1307:9 - 9: naga_oil::compose::Composer::ensure_imports
at /naga_oil/src/compose/mod.rs:1338:19 - 10: naga_oil::compose::Composer::make_naga_module
at /naga_oil/src/compose/mod.rs:1620:9 - 11: bevy_render::render_resource::pipeline_cache::ShaderCache::get
at /bevy/crates/bevy_render/src/render_resource/pipeline_cache.rs:365:36 - 12: bevy_render::render_resource::pipeline_cache::PipelineCache::start_create_render_pipeline::{{closure}}
at /bevy/crates/bevy_render/src/render_resource/pipeline_cache.rs:737:43
I don't know how it should be, so I don't know who does something wrong and where to dig. Maybe @rparrett or @robtfm knows better. I hope it helps.
from bevy.
looks like this naga issue - binding arrays can't be used with emitted glsl. the binding arrays for the env maps are meant to be avoided by not adding them when the shader_format_glsl
feature is enabled, but that check is in bevy_pbr
, not in bevy_render
.
i suspect you just need to either add the feature for bevy
instead of bevy_render
, or add it for bevy_pbr
as well.
from bevy.
i checked and the feature wasn't being passed through properly (either on 0.13 or on main). you'll need to manually add the feature to bevy_pbr's cargo.toml in 0.13 if you need support there.
from bevy.
Related Issues (20)
- Image loading docs are not clear enough about required feature flags HOT 4
- Squircle / Superellipse for UI / Gizmos / Mesh HOT 7
- Parent device is lost HOT 1
- Add additional names to GLTF entities for easier querying
- Bevy_ui outlines should respect BorderRadius.
- Textures not displaying properly if normal/base texture transforms don't align
- `winit::TabLeft`/`Event::Suspended` doesn't function as intended on WASM HOT 4
- Panic if changing browser zoom in WASM with an overridden scale factor HOT 1
- ECS: Assets on web keep re-downloading (help: banging head against the wall) HOT 1
- Segfault `SIGSEGV (Address boundary error)` when running examples on main HOT 6
- Lack of Doc Comments in some Render Related Files
- Exit not correctly tearing down graphics stack?? HOT 1
- RenderAssetUsages::RENDER_WORLD assets are not cleaned when their handles are dropped HOT 1
- Ui border is 1 pixel too large, or is getting aliased. HOT 11
- Audio getting progressively worse. (By default) HOT 8
- Text styles should be inheritable HOT 1
- Support user interaction in `ci_testing` HOT 1
- UI Node's transform is sometimes incorrectly calculated HOT 15
- Setting 'Specular Transmission' to a value higher than 0.0 on a standard material (or ext material) -> it wont write to depth buffer HOT 1
- Adding VolumetricLight makes objects near the camera brighter HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from bevy.