-
-
Notifications
You must be signed in to change notification settings - Fork 3.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
headless_defaults example panics #4392
Comments
Pinging @Shatur and @kirusfg who previously worked on headless-related stuff and @superdump . It looks like there's now some code in the image loaders that use the render device to determine which compressed textures are supported by the GPU. Does it make sense to use a theoretical Is there a simple example of compressed texture usage somewhere that I could test with? |
An example could be added but it would have to have feature dependencies and would probably have to either load a format that would only work on some GPUs or depend on basis-universal that currently will not work on wasm. I don’t think we can just claim support for all. I think if there is no render device we would have to claim support for none as there is no GPU to do any compression. But does headless have to be GPU-less? Isn’t it just windowless? |
Probably a simple scene with quads with textures with text labels as to the formats of the textures and all texture formats (well, not all variants of ASTC or anything, just JPEG/PNG/ASTC/ETC2/BCN/BasisU.) That would be a good test to have. I could put that together. |
I agree with this. This is how it done in Godot.
Then users have to handle all logic that contains images in a special way which is unusual.
Yes. The main purpose of it is to run it on server. |
So headless is GPU-less but for some reason, say software rendering, you may still want to load textures on a GPU-less server? They will not currently be able to decompress any of the compressed formats without further extension. Do they not need to for some reason? |
The use case is to execute systems that have images, but don't do anything with them. I assumed that |
Also, GPUs provide the support for decompression of the textures, built into the hardware. There are software decompressors. But what I would advise to do really depends on the use case. When shipping games, you would either ship a universal format (UASTC or the Basis format) and transcoder (to convert to ASTC/BCN/ETC2) or you would ship those compressed formats directly. ASTC is supported on most mobile, ETC2 on a bit older mobile, and BCN on desktop GPUs. Apple M1 is an exception and supports all of them. Intel iGPUs have supported ASTC I think. So compressed texture format wise, it’s just a complicated and fragmented world in terms of support. What are the use cases? |
Ok. I guess we could just load anything. |
# Objective Avoid crashing if `RenderDevice` doesn't exist (required for headless mode). Fixes bevyengine#4392. ## Solution Use `CompressedImageFormats::all()` if there is no `RenderDevice`.
# Objective Avoid crashing if `RenderDevice` doesn't exist (required for headless mode). Fixes bevyengine#4392. ## Solution Use `CompressedImageFormats::all()` if there is no `RenderDevice`.
Bevy version
main
bisected to #3884
Operating system & version
MacOS 12.2.1 (M1)
What you did
cargo run --example headless_defaults
What you expected to happen
I think that this example is meant to display a blank window? At least that's what it did prior to #3884
What actually happened
The text was updated successfully, but these errors were encountered: