Mesa (master): Revert "zink: move shader key structs into their own header"

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Tue Nov 24 21:57:39 UTC 2020


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

Author: Erik Faye-Lund <erik.faye-lund at collabora.com>
Date:   Tue Nov 24 18:20:44 2020 +0100

Revert "zink: move shader key structs into their own header"

This reverts commit ed7a5a55689ddcf10aae3f671e390252aad2d62f.

Fixes: ed7a5a55689 ("zink: move shader key structs into their own header")
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz at gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7754>

---

 src/gallium/drivers/zink/zink_program.h     | 18 +++++++++-
 src/gallium/drivers/zink/zink_shader_keys.h | 53 -----------------------------
 2 files changed, 17 insertions(+), 54 deletions(-)

diff --git a/src/gallium/drivers/zink/zink_program.h b/src/gallium/drivers/zink/zink_program.h
index 760144787ef..6185e1b6225 100644
--- a/src/gallium/drivers/zink/zink_program.h
+++ b/src/gallium/drivers/zink/zink_program.h
@@ -31,7 +31,6 @@
 #include "util/u_inlines.h"
 
 #include "zink_context.h"
-#include "zink_shader_keys.h"
 
 struct zink_screen;
 struct zink_shader;
@@ -49,6 +48,23 @@ struct zink_shader_module {
    VkShaderModule shader;
 };
 
+struct zink_fs_key {
+   unsigned shader_id;
+   //bool flat_shade;
+};
+
+/* a shader key is used for swapping out shader modules based on pipeline states,
+ * e.g., if sampleCount changes, we must verify that the fs doesn't need a recompile
+ *       to account for GL ignoring gl_SampleMask in some cases when VK will not
+ * which allows us to avoid recompiling shaders when the pipeline state changes repeatedly
+ */
+struct zink_shader_key {
+   union {
+      struct zink_fs_key fs;
+   } key;
+   uint32_t size;
+};
+
 /* the shader cache stores a mapping of zink_shader_key::VkShaderModule */
 struct zink_shader_cache {
    struct pipe_reference reference;
diff --git a/src/gallium/drivers/zink/zink_shader_keys.h b/src/gallium/drivers/zink/zink_shader_keys.h
deleted file mode 100644
index 0556f61ecbf..00000000000
--- a/src/gallium/drivers/zink/zink_shader_keys.h
+++ /dev/null
@@ -1,53 +0,0 @@
-/*
- * Copyright 2020 Mike Blumenkrantz
- *
- * Permission is hereby granted, free of charge, to any person obtaining a
- * copy of this software and associated documentation files (the "Software"),
- * to deal in the Software without restriction, including without limitation
- * on the rights to use, copy, modify, merge, publish, distribute, sub
- * license, and/or sell copies of the Software, and to permit persons to whom
- * the Software is furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice (including the next
- * paragraph) shall be included in all copies or substantial portions of the
- * Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL
- * THE AUTHOR(S) AND/OR THEIR SUPPLIERS BE LIABLE FOR ANY CLAIM,
- * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
- * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
- * USE OR OTHER DEALINGS IN THE SOFTWARE.
- */
-
-
-/** this file exists for organization and to be included in nir_to_spirv/ without pulling in extra deps */
-#ifndef ZINK_SHADER_KEYS_H
-# define ZINK_SHADER_KEYS_H
-
-struct zink_fs_key {
-   unsigned shader_id;
-   //bool flat_shade;
-};
-
-/* a shader key is used for swapping out shader modules based on pipeline states,
- * e.g., if sampleCount changes, we must verify that the fs doesn't need a recompile
- *       to account for GL ignoring gl_SampleMask in some cases when VK will not
- * which allows us to avoid recompiling shaders when the pipeline state changes repeatedly
- */
-struct zink_shader_key {
-   union {
-      struct zink_fs_key fs;
-   } key;
-   uint32_t size;
-};
-
-static inline const struct zink_fs_key *zink_fs_key(const struct zink_shader_key *key)
-{
-   return &key->key.fs;
-}
-
-
-
-#endif



More information about the mesa-commit mailing list