[PATCH 0/1] MR132: opengl32: Don't prioritize low bit depth formats with non-matching stencil.

Matteo Bruni (@Mystral) wine at gitlab.winehq.org
Fri Jun 17 14:11:38 CDT 2022


Matteo Bruni (@Mystral) commented about dlls/opengl32/wgl.c:
>      count = wglDescribePixelFormat( hdc, 0, 0, NULL );
>      if (!count) return 0;
>  
> +    cDepthBits = ppfd->cDepthBits;
> +    if (ppfd->dwFlags & PFD_DEPTH_DONTCARE) cDepthBits = 0;
> +    else if (ppfd->cStencilBits && cDepthBits <= 16)
> +    {
> +        /* Even if, e. g., depth 16, stencil 8 is available Window / AMD may return 24x8 (and not 16x0).
> +         * Adjust to 24 as 24x8 is universally available and we won't end up without stencil. */
> +        cDepthBits = 24;
> +    }
> +
So, as I mentioned to you privately before, this seems very ad-hoc i.e. I'd expect ChoosePixelFormat() generally, or at least usually, to return a pixel format with stencil bits when the PFD explicitly asks for it. I'd like to see more evidence that's not the case and an improved test (or comment, if it can't be properly shown in a Wine test) to back it up.

Also nitpick, typo "Window".

-- 
https://gitlab.winehq.org/wine/wine/-/merge_requests/132#note_2294



More information about the wine-devel mailing list