| Summary: | software renderer batch | ||
|---|---|---|---|
| Product: | SDL | Reporter: | Marcel Bakker <mna.bakker> |
| Component: | render | Assignee: | Ryan C. Gordon <icculus> |
| Status: | RESOLVED FIXED | QA Contact: | Sam Lantinga <slouken> |
| Severity: | blocker | ||
| Priority: | P2 | CC: | sylvain.becker |
| Version: | HG 2.0 | Keywords: | target-2.0.10 |
| Hardware: | x86 | ||
| OS: | Windows 7 | ||
| Attachments: | example | ||
Tagging a bunch of bugs with "target-2.0.10" so we have a clear list of things to address before a 2.0.10 release. Please note that "addressing" one of these bugs might mean deciding to defer on it until after 2.0.10, or resolving it as WONTFIX, etc. This is just here to tell us we should look at it carefully, and soon. If you have new information or feedback on this issue, this is a good time to add it to the conversation, as we're likely to be paying attention to this specific report in the next few days/weeks. Thanks! --ryan. Marking this a blocking bug for 2.0.10. https://hg.libsdl.org/SDL/annotate/4f015bc7cbb1/src/render/software/SDL_render_sw.c#l596 As the "assert" says, we may have no viewport there, but we can get it easily: viewport = &renderer->viewport; It seems a correct way to remove the assert. But there are another issue that is pointed by the test-case, the final clip_rect is wrong. When the viewport hasn't been specified, it's added afterward as fullscreen. https://hg.libsdl.org/SDL/annotate/4f015bc7cbb1/src/render/SDL_render.c#l488 So after the round 2, the user clip_rect gets ignored/overwritten because it's overwritten by the viewport ... (In reply to Sylvain from comment #3) > As the "assert" says, we may have no viewport there, but we can get it > easily: > > viewport = &renderer->viewport; > > It seems a correct way to remove the assert. renderer->viewport is what the viewport is currently set to by the app, but not necessarily what it was set to at that point in the command queue, fwiw. > But there are another issue that is pointed by the test-case, the final > clip_rect is wrong. Good catch! The assert and this problem are both fixed now, in https://hg.libsdl.org/SDL/rev/32839175c0e4 The software renderer now tracks this state like the other renderers were already doing. --ryan. |
Created attachment 3573 [details] example I get a SDL_assert(viewport != NULL) when SDL_RenderPresent is called a second time. example included