Mesa (main): wgl: add a flag to determine if running on zink

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Fri Apr 22 01:56:37 UTC 2022


Module: Mesa
Branch: main
Commit: 863ce662b47b1e3a181845f537bc32802bf889a0
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=863ce662b47b1e3a181845f537bc32802bf889a0

Author: Sidney Just <justsid at x-plane.com>
Date:   Wed Apr 20 17:47:22 2022 -0400

wgl: add a flag to determine if running on zink

Reviewed-by: Jesse Natalie <jenatali at microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16068>

---

 src/gallium/frontends/wgl/stw_device.c | 1 +
 src/gallium/frontends/wgl/stw_device.h | 1 +
 2 files changed, 2 insertions(+)

diff --git a/src/gallium/frontends/wgl/stw_device.c b/src/gallium/frontends/wgl/stw_device.c
index 8d3b7951f3a..c0a6cb17cc7 100644
--- a/src/gallium/frontends/wgl/stw_device.c
+++ b/src/gallium/frontends/wgl/stw_device.c
@@ -95,6 +95,7 @@ init_screen(const struct stw_winsys *stw_winsys, HDC hdc)
 
    stw_dev->smapi->screen = screen;
    stw_dev->screen = screen;
+   stw_dev->zink = !memcmp(screen->get_name(screen), "zink", 4);
 
    stw_dev->max_2d_length = screen->get_param(screen,
                                               PIPE_CAP_MAX_TEXTURE_2D_SIZE);
diff --git a/src/gallium/frontends/wgl/stw_device.h b/src/gallium/frontends/wgl/stw_device.h
index 2ab994f2dc8..b251a17409d 100644
--- a/src/gallium/frontends/wgl/stw_device.h
+++ b/src/gallium/frontends/wgl/stw_device.h
@@ -91,6 +91,7 @@ struct stw_device
    struct st_config_options st_options;
 
    bool initialized;
+   bool zink;
 };
 
 



More information about the mesa-commit mailing list