Open johanhelsing opened 1 year ago
fwiw I was on @geieredgar 's bevy-track branch for a while without the feature and without issues. Can do a bisect if that's interesting, but thought I'd ask first
That's unfortunate. Definitely not intentional. I've seen this wgpu
error before. How big is your biggest tileset, in terms of tiles? You may want to try increasing some wgpu
limits to 4096, like max_texture_dimension_3d
or maybe max_texture_array_layers
: https://docs.rs/bevy/latest/bevy/render/settings/struct.WgpuLimits.html
You can do so by manually setting WgpuSettings::limits
on RenderPlugin
:
app.add_plugins(DefaultPlugins.set(RenderPlugin { wgpu_settings: WgpuSettings { ... }}))
It's 1024x1024 pixels with 16 pixels per tile, so 64x64=4096 tiles.
I tried:
.set(RenderPlugin {
wgpu_settings: WgpuSettings {
limits: {
let mut limits = WgpuSettings::default().limits;
limits.max_texture_dimension_3d = 4096;
limits
},
..default()
},
})
But didn't make a difference.
What about max_texture_array_layers
? Or both?
What about
max_texture_array_layers
? Or both?
Sorry, was a bit quick forgot about that one. Tried both now, still panics.
Interesting, does the error still say Dimension Z value 4096 exceeds the limit of 2048
? Or has 2048 increased to 4096?
According to https://github.com/bevyengine/bevy/issues/8248#issuecomment-1488780916 this is a hardware limit that you cannot increase (only decrease).
I'm seeing the same. Using v0.6.0 too.
The weird thing, is that I see the issue, when I just increase the canvas size of the level:
2023-04-17T19:01:55.996649Z ERROR wgpu::backend::direct: Handling wgpu errors as fatal by default
thread 'Compute Task Pool (7)' panicked at 'wgpu error: Validation Error
Caused by:
In Device::create_texture
note: label = `texture_array`
Dimension Z value 4680 exceeds the limit of 2048
', C:\Users\Administrador\.cargo\registry\src\index.crates.io-6f17d22bba15001f\wgpu-0.15.1\src\backend\direct.rs:3024:5
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
thread 'Compute Task Pool (7)' panicked at 'A system has panicked so the executor cannot continue.: RecvError', C:\Users\Administrador\.cargo\registry\src\index.crates.io-6f17d22bba15001f\bevy_ecs-0.10.1\src\schedule\executor\multi_threaded.rs:194:60
thread '<unnamed>' panicked at 'called `Option::unwrap()` on a `None` value', C:\Users\Administrador\.cargo\registry\src\index.crates.io-6f17d22bba15001f\bevy_tasks-0.10.1\src\task_pool.rs:376:49
thread 'Compute Task Pool (7)' panicked at 'called `Result::unwrap()` on an `Err` value: RecvError', C:\Users\Administrador\.cargo\registry\src\index.crates.io-6f17d22bba15001f\bevy_render-0.10.1\src\pipelined_rendering.rs:136:45
thread 'main' panicked at 'called `Option::unwrap()` on a `None` value', C:\Users\Administrador\.cargo\registry\src\index.crates.io-6f17d22bba15001f\bevy_tasks-0.10.1\src\task_pool.rs:376:49
error: process didn't exit successfully: `target\debug\gm.exe` (exit code: 101)
Hmm, it only happens when you increase the canvas size of the level? Do you have a tileset w/ 4680 tiles in it?
I have a few other non-ldtk bevy_ecs_tilemaps at least, though not sure how big they are. I can try disabling them and see if that makes a difference. Might have some time for this towards the end of the week.
I'm just starting a little project, only with two tilesets for now. One is 256x256, and the other is 512x512. My tiles are 16x16 I'm using one in an entitys layer, and the other one in an integer grid. Without enabling the atlas feature of bevy_ecs_tilemap, increasing the canvas size, to somewhat around 700x700 (I can disable the feature and check again if that's needed), results in the error mentioned earlier. Also, the z dimension value mentioned in the error, increases as I increase the canvas.
I added this to the Cargo.toml, and I no longer get the error increasing the canvas size:
bevy_ecs_tilemap = { version = "0.10", default-features = false, features = ["atlas"]}
Without enabling the atlas feature of bevy_ecs_tilemap, increasing the canvas size, to somewhat around 700x700 (I can disable the feature and check again if that's needed), results in the error mentioned earlier. Also, the z dimension value mentioned in the error, increases as I increase the canvas.
I'm able to reproduce this, and I know what the problem is. It has to do with how the plugin handles rendering intgrid colors for exposed intgrid layers w/o autotiles. Unfortunately, the way the plugin handles it at the moment there's not really a way to disable it. The true fix is #172. I'll prioritize this.
I'm doubtful that this is the same issue that @johanhelsing is running into.
@Mattincho could you try depending on the branch in #183?
Works like a charm 👍
@Mattincho Now you will need to depend on the main
branch - since that branch has been merged (and deleted).
[patch.crates-io]
bevy_ecs_ldtk = { git = "https://github.com/Trouv/bevy_ecs_ldtk", branch = "main" }
@Mattincho now this change is in 0.7
I'm not really sure if this is intentional or not, but I get a panic after upgrading from v0.5.0 to v0.6.0 (on native).
The panics go away if I enable the
atlas
feature.If intentional, maybe either provide a more helpful error/panic message, or put a note in the breaking changes section of the release notes: https://github.com/Trouv/bevy_ecs_ldtk/releases/tag/v0.6.0 ?