aboutsummaryrefslogtreecommitdiffstats
path: root/src/mesa/state_tracker/st_program.h
diff options
context:
space:
mode:
authorTimothy Arceri <[email protected]>2017-02-22 11:33:44 +1100
committerTimothy Arceri <[email protected]>2017-02-23 09:20:22 +1100
commitb9de1c2e0241f2ded413ac115b83f0f06788206d (patch)
tree343a8cd4c81785bf14a1bc0e8a80b746db2a26c6 /src/mesa/state_tracker/st_program.h
parent0d5130bdd02f1bed405d13e95779d609a28289a2 (diff)
st/mesa: add sha1 field to st program structs
This will be used to share the sha1 computed by the tgsi load function with the tgsi write function. Reviewed-by: Nicolai Hähnle <[email protected]>
Diffstat (limited to 'src/mesa/state_tracker/st_program.h')
-rw-r--r--src/mesa/state_tracker/st_program.h18
1 files changed, 18 insertions, 0 deletions
diff --git a/src/mesa/state_tracker/st_program.h b/src/mesa/state_tracker/st_program.h
index 9f9777a7d55..70664d1d46a 100644
--- a/src/mesa/state_tracker/st_program.h
+++ b/src/mesa/state_tracker/st_program.h
@@ -150,6 +150,9 @@ struct st_fragment_program
struct gl_shader_program *shader_program;
struct st_fp_variant *variants;
+
+ /** SHA1 hash of linked tgsi shader program, used for on-disk cache */
+ unsigned char sha1[20];
};
@@ -220,6 +223,9 @@ struct st_vertex_program
/** List of translated variants of this vertex program.
*/
struct st_vp_variant *variants;
+
+ /** SHA1 hash of linked tgsi shader program, used for on-disk cache */
+ unsigned char sha1[20];
};
@@ -256,6 +262,9 @@ struct st_geometry_program
uint64_t affected_states; /**< ST_NEW_* flags to mark dirty when binding */
struct st_basic_variant *variants;
+
+ /** SHA1 hash of linked tgsi shader program, used for on-disk cache */
+ unsigned char sha1[20];
};
@@ -270,6 +279,9 @@ struct st_tessctrl_program
uint64_t affected_states; /**< ST_NEW_* flags to mark dirty when binding */
struct st_basic_variant *variants;
+
+ /** SHA1 hash of linked tgsi shader program, used for on-disk cache */
+ unsigned char sha1[20];
};
@@ -284,6 +296,9 @@ struct st_tesseval_program
uint64_t affected_states; /**< ST_NEW_* flags to mark dirty when binding */
struct st_basic_variant *variants;
+
+ /** SHA1 hash of linked tgsi shader program, used for on-disk cache */
+ unsigned char sha1[20];
};
@@ -298,6 +313,9 @@ struct st_compute_program
uint64_t affected_states; /**< ST_NEW_* flags to mark dirty when binding */
struct st_basic_variant *variants;
+
+ /** SHA1 hash of linked tgsi shader program, used for on-disk cache */
+ unsigned char sha1[20];
};