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.
Created attachment 132475 [details] [review]
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 , 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 firstname.lastname@example.org <patch-file>
Thanks, Olivier. I've pushed this patch and the wglUseFontBitmaps patch
(commits 80c6598cdba36edb, 43dea65ad2e8259).
Closing this bug.