This will be used in next commit.
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4355>
void *
util_live_shader_cache_get(struct pipe_context *ctx,
struct util_live_shader_cache *cache,
- const struct pipe_shader_state *state)
+ const struct pipe_shader_state *state,
+ bool* cache_hit)
{
struct blob blob = {0};
unsigned ir_size;
}
simple_mtx_unlock(&cache->lock);
+ if (cache_hit)
+ *cache_hit = (shader != NULL);
+
/* Return if the shader already exists. */
if (shader)
return shader;
void *
util_live_shader_cache_get(struct pipe_context *ctx,
struct util_live_shader_cache *cache,
- const struct pipe_shader_state *state);
+ const struct pipe_shader_state *state,
+ bool* cache_hit);
void
util_shader_reference(struct pipe_context *ctx,