[Mesa-dev] [PATCH 51/87] i965: copy program id to key before upload

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


The  program may have already been assigned an id so make sure to
use it.
---
 src/mesa/drivers/dri/i965/brw_shader_cache.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/src/mesa/drivers/dri/i965/brw_shader_cache.c b/src/mesa/drivers/dri/i965/brw_shader_cache.c
index e78e5fe..cf248b4 100644
--- a/src/mesa/drivers/dri/i965/brw_shader_cache.c
+++ b/src/mesa/drivers/dri/i965/brw_shader_cache.c
@@ -250,6 +250,8 @@ upload_cached_vs(struct brw_context *brw, struct blob_reader *binary,
 
    struct brw_vertex_program *vp =
       (struct brw_vertex_program *)brw->vertex_program;
+   vs_key->program_string_id = vp->id;
+
    brw_upload_cache(&brw->cache, BRW_CACHE_VS_PROG,
                     vs_key, sizeof(struct brw_vs_prog_key),
                     vs_program, vs_program_size,
@@ -281,6 +283,8 @@ upload_cached_wm(struct brw_context *brw, struct blob_reader *binary,
 
    struct brw_fragment_program *wp =
       (struct brw_fragment_program *)brw->fragment_program;
+   wm_key->program_string_id = wp->id;
+
    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