Mesa (master): d3d12: also reject GDI-supporting pixel-formats

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Wed Nov 18 10:43:33 UTC 2020


Module: Mesa
Branch: master
Commit: 81adf127016a999dcd9b0344f53b74bdba4f09e4
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=81adf127016a999dcd9b0344f53b74bdba4f09e4

Author: Erik Faye-Lund <erik.faye-lund at collabora.com>
Date:   Tue Jun 16 11:39:07 2020 +0200

d3d12: also reject GDI-supporting pixel-formats

In theory, it's possible to request a GDI-supporting, double buffered
pixel-format, and we're not able to support this using the DXGI
swapchains. So let's return NULL here in that case as well.

Reviewed-by: Charmaine Lee <charmainel at vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7535>

---

 src/gallium/winsys/d3d12/wgl/d3d12_wgl_framebuffer.cpp | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/src/gallium/winsys/d3d12/wgl/d3d12_wgl_framebuffer.cpp b/src/gallium/winsys/d3d12/wgl/d3d12_wgl_framebuffer.cpp
index 1d283d536d0..68b5b7d2b80 100644
--- a/src/gallium/winsys/d3d12/wgl/d3d12_wgl_framebuffer.cpp
+++ b/src/gallium/winsys/d3d12/wgl/d3d12_wgl_framebuffer.cpp
@@ -195,7 +195,8 @@ d3d12_wgl_create_framebuffer(struct pipe_screen *screen,
 {
    const struct stw_pixelformat_info *pfi =
       stw_pixelformat_get_info(iPixelFormat);
-   if (!(pfi->pfd.dwFlags & PFD_DOUBLEBUFFER))
+   if (!(pfi->pfd.dwFlags & PFD_DOUBLEBUFFER) ||
+       (pfi->pfd.dwFlags & PFD_SUPPORT_GDI))
       return NULL;
 
    struct d3d12_wgl_framebuffer *fb = CALLOC_STRUCT(d3d12_wgl_framebuffer);



More information about the mesa-commit mailing list