[Mesa-dev] [PATCH 55/87] i965: get scratch on cache restore

Timothy Arceri timothy.arceri at collabora.com
Wed Jul 13 02:47:50 UTC 2016


---
 src/mesa/drivers/dri/i965/brw_shader_cache.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/src/mesa/drivers/dri/i965/brw_shader_cache.c b/src/mesa/drivers/dri/i965/brw_shader_cache.c
index 18b75fb..8334d69 100644
--- a/src/mesa/drivers/dri/i965/brw_shader_cache.c
+++ b/src/mesa/drivers/dri/i965/brw_shader_cache.c
@@ -259,6 +259,9 @@ upload_cached_vs(struct brw_context *brw, struct blob_reader *binary,
       (struct brw_vertex_program *)brw->vertex_program;
    vs_key->program_string_id = vp->id;
 
+   brw_alloc_stage_scratch(brw, &brw->vs.base, prog_data->total_scratch,
+                           brw->max_vs_threads);
+
    brw_upload_cache(&brw->cache, BRW_CACHE_VS_PROG,
                     vs_key, sizeof(struct brw_vs_prog_key),
                     vs_program, vs_program_size,
@@ -292,6 +295,9 @@ upload_cached_wm(struct brw_context *brw, struct blob_reader *binary,
       (struct brw_fragment_program *)brw->fragment_program;
    wm_key->program_string_id = wp->id;
 
+   brw_alloc_stage_scratch(brw, &brw->wm.base, prog_data->total_scratch,
+                           brw->max_wm_threads);
+
    brw_upload_cache(&brw->cache, BRW_CACHE_FS_PROG,
                     wm_key, sizeof(struct brw_wm_prog_key),
                     wm_program, wm_program_size,
-- 
2.7.4



More information about the mesa-dev mailing list