Mesa (master): zink: rework some includes

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Tue Mar 30 04:20:40 UTC 2021


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

Author: Mike Blumenkrantz <michael.blumenkrantz at gmail.com>
Date:   Tue Dec 15 12:48:22 2020 -0500

zink: rework some includes

descriptors.h requires stuff from context.h and vice versa, so there's
a little redefinition here to work around that

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

---

 src/gallium/drivers/zink/zink_context.h     |  7 -------
 src/gallium/drivers/zink/zink_descriptors.h | 17 ++++++++++++++++-
 2 files changed, 16 insertions(+), 8 deletions(-)

diff --git a/src/gallium/drivers/zink/zink_context.h b/src/gallium/drivers/zink/zink_context.h
index e2030a0aa33..02cfc44e57f 100644
--- a/src/gallium/drivers/zink/zink_context.h
+++ b/src/gallium/drivers/zink/zink_context.h
@@ -123,13 +123,6 @@ struct zink_viewport_state {
    uint8_t num_viewports;
 };
 
-
-/* hashes of all the named types in a given state */
-struct zink_descriptor_state {
-   bool valid[ZINK_DESCRIPTOR_TYPES];
-   uint32_t state[ZINK_DESCRIPTOR_TYPES];
-};
-
 struct zink_context {
    struct pipe_context base;
    struct slab_child_pool transfer_pool;
diff --git a/src/gallium/drivers/zink/zink_descriptors.h b/src/gallium/drivers/zink/zink_descriptors.h
index bfde80e44be..8a843d764ef 100644
--- a/src/gallium/drivers/zink/zink_descriptors.h
+++ b/src/gallium/drivers/zink/zink_descriptors.h
@@ -31,6 +31,12 @@
 #include "util/u_inlines.h"
 #include "util/u_dynarray.h"
 
+#include "zink_batch.h"
+
+#ifndef ZINK_SHADER_COUNT
+#define ZINK_SHADER_COUNT (PIPE_SHADER_TYPES - 1)
+#endif
+
 enum zink_descriptor_type {
    ZINK_DESCRIPTOR_TYPE_UBO,
    ZINK_DESCRIPTOR_TYPE_SAMPLER_VIEW,
@@ -45,13 +51,22 @@ struct zink_descriptor_refs {
 };
 
 
-#include "zink_context.h"
+/* hashes of all the named types in a given state */
+struct zink_descriptor_state {
+   bool valid[ZINK_DESCRIPTOR_TYPES];
+   uint32_t state[ZINK_DESCRIPTOR_TYPES];
+};
 
 struct hash_table;
 
+struct zink_context;
+struct zink_image_view;
 struct zink_program;
 struct zink_resource;
+struct zink_sampler;
+struct zink_sampler_view;
 struct zink_shader;
+struct zink_screen;
 
 
 struct zink_descriptor_state_key {



More information about the mesa-commit mailing list