| Summary: | SDL_RenderSetClipRect occasionally breaks SDL_RenderClear even though clipping is unset | ||
|---|---|---|---|
| Product: | SDL | Reporter: | Ellie <etc0de> |
| Component: | render | Assignee: | Ryan C. Gordon <icculus> |
| Status: | ASSIGNED --- | QA Contact: | Sam Lantinga <slouken> |
| Severity: | normal | ||
| Priority: | P2 | CC: | amaranth72, kajema2739, sylvain.becker |
| Version: | 2.0.10 | Keywords: | target-2.0.12 |
| Hardware: | All | ||
| OS: | All | ||
|
Description
Ellie
2019-08-03 18:11:39 UTC
Ok I just verified that with the software renderer this WORKS (bug does NOT reproduce) so this seems to be an OpenGL/EGL backend issue. I went extensively through all scenarios where this breaks in my apps, and in software mode, apart from being super slow, there wasn't a single render error and all the render clear was unclipped as it is supposed to be. I also get way more of these render errors with Android/EGL, so Desktop OpenGL/Linux seems affected but for some reason less so. If someone provided me with a patch with more debug output via the usual logging mechanism that also ends up showing on Android's logcat (since it shows up most on that platform) then I could give it a run and return the output to you, if that helps with anything Try to disable batching to see what happen ? And I would try to reduce the issue to a c testcase. To make sure, on desktop it fails with both opengl, and opengles2 ? If you select opengles2, some place to put debug traces: https://hg.libsdl.org/SDL/file/8e299f937b6c/src/render/opengles2/SDL_render_gles2.c find: SDL_RENDERCMD_SETCLIPRECT, cliprect, cliprect_enabled_dirty ( maybe related to #4457, https://hg.libsdl.org/SDL/rev/32839175c0e4 ) Maybe a duplicate / fixed by bug 4766. Is this still happening ? This should be fixed by https://hg.libsdl.org/SDL/rev/d465f3a64af6 We're changing how we do SDL release versions; now releases will be even numbers (2.0.10, 2.0.12, etc), and as soon as we tag a release, we'll move the internal version number to an odd number (2.0.12 ships, we tag the latest in revision control as 2.0.13 immediately, which will become 2.0.14 on release, etc). As such, I'm moving the bugs tagged with target-2.0.11 to target 2.0.12. Sorry if you get a lot of email from this change! Thanks, --ryan. We're changing how we do SDL release versions; now releases will be even numbers (2.0.10, 2.0.12, etc), and as soon as we tag a release, we'll move the internal version number to an odd number (2.0.12 ships, we tag the latest in revision control as 2.0.13 immediately, which will become 2.0.14 on release, etc). As such, I'm moving the bugs tagged with target-2.0.11 to target 2.0.12. Sorry if you get a lot of email from this change! Thanks, --ryan. According to https://wiki.libsdl.org/SDL_RenderClear: > This function clears the entire rendering target, > ignoring the viewport and the clip rectangle. This was broken in (probably) all backends, because it (wrongfully) respected the clip-rectangle. As mentioned in this discussion, it was then fixed in OpenGL backends by https://hg.libsdl.org/SDL/rev/d465f3a64af6 . However, the same issue appears to remain in many other popular backends like D3D9 (and potentially others), affecting real applications: https://github.com/Tyyppi77/imgui_sdl/issues/6#issuecomment-631004831 - So this is *still* an unresolved issue, even for the latest SDL2, for other backends. Note: I'm not using any of the affected platforms, so I can only assume that this is a bug, based on reports by others, and code-review. A unit-test should be designed to catch this sort of problem. |