Opened 8 years ago
Last modified 8 years ago
#8761 assigned bug
Software renderer should gracefully handle unsupported color spaces.
| Reported by: | xray7224 | Owned by: | kallisti5 |
|---|---|---|---|
| Priority: | normal | Milestone: | R1 |
| Component: | Kits/OpenGL Kit | Version: | R1/Development |
| Keywords: | Cc: | ||
| Blocked By: | Blocking: | ||
| Platform: | All |
Description (last modified by )
Currently, if one attempts to instantiate the mesa software renderer (legacy or new) in an unsupported color space (i.e. if the desktop is set to 8-bit color), the app will crash into the debugger. This should be handled a bit more gracefully. Simply removing the debugger() call doesn't appear to suffice though, since the return from _SetupRenderBuffer() is ignored, causing issues elsewhere later.
Change History (5)
comment:1 by , 8 years ago
comment:2 by , 8 years ago
I was yes, sorry. I don't know why it defaults to that. It works fine now i've switched it to 32 bit mode.
comment:3 by , 8 years ago
| Description: | modified (diff) |
|---|---|
| Owner: | changed from to |
| Status: | new → assigned |
| Summary: | OpenGL Kits crashing. → Software renderer should gracefully handle unsupported color spaces. |
No problem, it should fail gracefully in that case instead of simply hitting the debugger though.
comment:4 by , 8 years ago
Yeah, I agree... I think it does try to return gracefully though on 8-bit color: http://cgit.haiku-os.org/haiku/tree/src/add-ons/opengl/swrast/MesaSoftwareRenderer.cpp#n608
We try to handle _SetupRenderBuffer failures gracefully here: http://cgit.haiku-os.org/haiku/tree/src/add-ons/opengl/swrast/MesaSoftwareRenderer.cpp#n599
However here, not so much... http://cgit.haiku-os.org/haiku/tree/src/add-ons/opengl/swrast/MesaSoftwareRenderer.cpp#n235
I probably should check color spaces much earlier on in the renderer. Any changes made to swrast need to made identically as possible in swrast_legacy.
I'll take a crack at it :)
comment:5 by , 8 years ago
hmm.. actually we do try to bail on incorrect colorspace here: http://cgit.haiku-os.org/haiku/tree/src/add-ons/opengl/swrast/MesaSoftwareRenderer.cpp#n151
either way, I'll fix it. Probably something getting dereferenced or something.



Are you running in 8-bit color mode? If so, that's not currently supported.