Summary: | No stencil buffer allocated when requested by GLUT | ||
---|---|---|---|
Product: | Mesa | Reporter: | Olivier Lauffenburger <o.lauffenburger> |
Component: | Other | Assignee: | mesa-dev |
Status: | RESOLVED FIXED | QA Contact: | mesa-dev |
Severity: | normal | ||
Priority: | medium | ||
Version: | 17.0 | ||
Hardware: | All | ||
OS: | All | ||
Whiteboard: | |||
i915 platform: | i915 features: | ||
Attachments: |
Alternative implementation of stw_pixelformat_choose
0001-st-wgl.patch |
Created attachment 132475 [details] [review] 0001-st-wgl.patch Hi Olivier! Thanks for your code suggestion. I don't know anything about the code it touches, so I'll let others talk about that. The usual way of suggesting changes is to send a patch to the mailing-list. You can read how to do this on our website [1], but the gist is that you should clone the repo, make a commit with your change and send it for review. I've attached your change as a patch, all you need to do is fill in the commit title and body, explaining why this change is necessary (eg. "what's wrong", then "how this fixes it"), and you can send it using: $ git send-email --to mesa-dev@lists.freedesktop.org <patch-file> Cheers, Eric [1] https://mesa3d.org/submittingpatches.html Thanks, Olivier. I've pushed this patch and the wglUseFontBitmaps patch (commits 80c6598cdba36edb, 43dea65ad2e8259). Closing this bug. |
Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.
Created attachment 132472 [details] Alternative implementation of stw_pixelformat_choose I create an OpenGL context with Mesa 17.0 Gallium + software rasterizer with the following GLUT command: glutInitDisplayMode(GLUT_DOUBLE | GLUT_RGB | GLUT_DEPTH | GLUT_STENCIL) Then no stencil buffer is allocated. The problem is that the selection logic of ChoosePixelFormat() gives more importance to the 32-bit color than to the 8-bit stencil. I have changed the implementation of stw_pixelformat_choose() in \src\gallium\state_trackers\wgl\stw_pixelformat.c to give the highest priority to features requested but not available, then a lower priority to features with less precision allocated than requested, then the lowest priority to features with more precision allocated than requested. My implementation is in the attached file.