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

Author: Mike Blumenkrantz <[email protected]>
Date:   Wed Apr 27 17:19:44 2022 -0400

zink/kopper: add a function for determining if running on software

Reviewed-by: Adam Jackson <[email protected]>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16190>

---

 src/gallium/drivers/zink/zink_kopper.c | 7 +++++++
 src/gallium/drivers/zink/zink_kopper.h | 2 ++
 2 files changed, 9 insertions(+)

diff --git a/src/gallium/drivers/zink/zink_kopper.c 
b/src/gallium/drivers/zink/zink_kopper.c
index 53431b3d4ae..9a71f5ba3ae 100644
--- a/src/gallium/drivers/zink/zink_kopper.c
+++ b/src/gallium/drivers/zink/zink_kopper.c
@@ -754,6 +754,13 @@ zink_kopper_update(struct pipe_screen *pscreen, struct 
pipe_resource *pres, int
    return true;
 }
 
+bool
+zink_kopper_is_cpu(const struct pipe_screen *pscreen)
+{
+   const struct zink_screen *screen = (const struct zink_screen*)pscreen;
+   return screen->is_cpu;
+}
+
 void
 zink_kopper_fixup_depth_buffer(struct zink_context *ctx)
 {
diff --git a/src/gallium/drivers/zink/zink_kopper.h 
b/src/gallium/drivers/zink/zink_kopper.h
index 6d5249ebb17..c427f2067c3 100644
--- a/src/gallium/drivers/zink/zink_kopper.h
+++ b/src/gallium/drivers/zink/zink_kopper.h
@@ -113,6 +113,8 @@ void
 zink_kopper_deinit_displaytarget(struct zink_screen *screen, struct 
kopper_displaytarget *cdt);
 bool
 zink_kopper_update(struct pipe_screen *pscreen, struct pipe_resource *pres, 
int *w, int *h);
+bool
+zink_kopper_is_cpu(const struct pipe_screen *pscreen);
 void
 zink_kopper_fixup_depth_buffer(struct zink_context *ctx);
 bool

Reply via email to