From f9edc550b2bb76f77e33b6cb122a91f266bc5958 Mon Sep 17 00:00:00 2001 From: Kenneth Graunke Date: Fri, 11 Nov 2016 13:31:06 -0800 Subject: i965: Make a helper for finding an existing shader variant. We had five copies of the same "walk the cache and look for an existing shader variant for this program" code. Now we have one helper function that returns the key. Signed-off-by: Kenneth Graunke Reviewed-by: Eduardo Lima Mitev --- src/mesa/drivers/dri/i965/brw_state.h | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src/mesa/drivers/dri/i965/brw_state.h') diff --git a/src/mesa/drivers/dri/i965/brw_state.h b/src/mesa/drivers/dri/i965/brw_state.h index 176557b7c45..bd82212be4d 100644 --- a/src/mesa/drivers/dri/i965/brw_state.h +++ b/src/mesa/drivers/dri/i965/brw_state.h @@ -235,6 +235,11 @@ bool brw_search_cache(struct brw_cache *cache, const void *key, GLuint key_size, uint32_t *inout_offset, void *inout_aux); + +const void *brw_find_previous_compile(struct brw_cache *cache, + enum brw_cache_id cache_id, + unsigned program_string_id); + void brw_program_cache_check_size(struct brw_context *brw); void brw_init_caches( struct brw_context *brw ); -- cgit v1.2.3