summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKenneth Graunke <kenneth@whitecape.org>2016-11-11 14:52:36 -0800
committerKenneth Graunke <kenneth@whitecape.org>2017-01-18 10:53:14 -0800
commit5b4a5312078436479b6d6d3d8c6b6e7c0e10bbe1 (patch)
tree1676b61ec12c08ecc8450c568c8bc8be37a613fb
parentc67a2793b369637c2b65263415a856c41f5e099e (diff)
i965: Make brw_cache_item structure private to brw_program_cache.c.
struct brw_cache_item is an implementation detail of the program cache. We don't need to make those internals available to the entire driver. Signed-off-by: Kenneth Graunke <kenneth@whitecape.org> Reviewed-by: Eduardo Lima Mitev <elima@igalia.com>
-rw-r--r--src/mesa/drivers/dri/i965/brw_context.h19
-rw-r--r--src/mesa/drivers/dri/i965/brw_program_cache.c21
2 files changed, 21 insertions, 19 deletions
diff --git a/src/mesa/drivers/dri/i965/brw_context.h b/src/mesa/drivers/dri/i965/brw_context.h
index d5e4251630..aa1499a1fe 100644
--- a/src/mesa/drivers/dri/i965/brw_context.h
+++ b/src/mesa/drivers/dri/i965/brw_context.h
@@ -453,25 +453,6 @@ struct brw_ff_gs_prog_data {
*/
#define SHADER_TIME_STRIDE 64
-struct brw_cache_item {
- /**
- * Effectively part of the key, cache_id identifies what kind of state
- * buffer is involved, and also which dirty flag should set.
- */
- enum brw_cache_id cache_id;
- /** 32-bit hash of the key data */
- GLuint hash;
- GLuint key_size; /* for variable-sized keys */
- GLuint aux_size;
- const void *key;
-
- uint32_t offset;
- uint32_t size;
-
- struct brw_cache_item *next;
-};
-
-
struct brw_cache {
struct brw_context *brw;
diff --git a/src/mesa/drivers/dri/i965/brw_program_cache.c b/src/mesa/drivers/dri/i965/brw_program_cache.c
index 44d9994de0..a9a4c92620 100644
--- a/src/mesa/drivers/dri/i965/brw_program_cache.c
+++ b/src/mesa/drivers/dri/i965/brw_program_cache.c
@@ -55,6 +55,27 @@
#define FILE_DEBUG_FLAG DEBUG_STATE
+struct brw_cache_item {
+ /**
+ * Effectively part of the key, cache_id identifies what kind of state
+ * buffer is involved, and also which dirty flag should set.
+ */
+ enum brw_cache_id cache_id;
+
+ /** 32-bit hash of the key data */
+ GLuint hash;
+
+ /** for variable-sized keys */
+ GLuint key_size;
+ GLuint aux_size;
+ const void *key;
+
+ uint32_t offset;
+ uint32_t size;
+
+ struct brw_cache_item *next;
+};
+
static unsigned
get_program_string_id(enum brw_cache_id cache_id, const void *key)
{