Mesa (main): zink: simplify zink_program_has_descriptors()

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Wed Jun 16 04:48:43 UTC 2021


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

Author: Mike Blumenkrantz <michael.blumenkrantz at gmail.com>
Date:   Tue May 11 12:58:36 2021 -0400

zink: simplify zink_program_has_descriptors()

Reviewed-by: Dave Airlie <airlied at redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11407>

---

 src/gallium/drivers/zink/zink_program.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/gallium/drivers/zink/zink_program.h b/src/gallium/drivers/zink/zink_program.h
index 8d41498e038..7449926d14c 100644
--- a/src/gallium/drivers/zink/zink_program.h
+++ b/src/gallium/drivers/zink/zink_program.h
@@ -220,7 +220,7 @@ zink_get_compute_pipeline(struct zink_screen *screen,
 static inline bool
 zink_program_has_descriptors(const struct zink_program *pg)
 {
-   return pg->dsl[0] || pg->dsl[1] || pg->dsl[2] || pg->dsl[3];
+   return pg->num_dsl > 0;
 }
 
 #endif



More information about the mesa-commit mailing list