Opening the `test-video` map with `r_materialSystem on` crashes the engine
Opening the test-video map crashes the engine.
Hard to debug because of:
- https://github.com/DaemonEngine/Daemon/issues/1800
Stack trace:
Thread 1 "daemon" received signal SIGSEGV, Segmentation fault.
0x00006432fed2e3ff in TextureData::operator== (this=0x6433250f8e78, other=...) at src/engine/renderer/Material.h:195
195 if ( bundle->numImages != otherBundle->numImages ) {
Thread 1 (Thread 0x708253a789c0 (LWP 1927315) "daemon"):
#0 0x00006432fed2e3ff in TextureData::operator== (this=0x6433250f8e78, other=...) at src/engine/renderer/Material.h:195
It only affects the material system.
Both bundle and otherBundle are nullptr.
If I tell the loop to continue on !bundle, it displays the default cinematic pixel color (currently blue because it reuses normal flat colors, something to be fixed in #1793) instead of the actual video frame.
Ah, yes the bundle is never set at https://github.com/DaemonEngine/Daemon/blob/01d7e720a83817c679ca3c95ace3f4e2af4b55d6/src/engine/renderer/Material.cpp#L1535
Video textures don't currently work with bindless textures anyway though.
So maybe we should render them with the core path?
So maybe we should render them with the core path?
Video textures never worked with bindless textures even with material system turned off. So I don't think there's an easy switch to do that.
They didn't use to crash though!
Well I guess bypassing material system could stop them from crashing, even if they don't actually work.
So I don't think there's an easy switch to do that.
Easiest would probably be to do it similarly to autosprite/skyboxes/portals: add a vector of those surfaces to render at all times, and skip them in the material system.
How would you make the textures not bindless though? You would need a special code path to use textures with bindings even though bindless textures are enabled. Autosprite/skyboxes/portals have special handling of vertexes but not of textures.
How would you make the textures not bindless though? You would need a special code path to use textures with bindings even though bindless textures are enabled. Autosprite/skyboxes/portals have special handling of vertexes but not of textures.
Same as I did in #1684 for the depth texture.