[Mesa-dev] [PATCH 56/56] i965: create separate 32bit and 64bit versions of shader cache objects
Timothy Arceri
timothy.arceri at collabora.com
Tue Nov 29 03:58:55 UTC 2016
Pointers will have different lengths so we simply create a different
sha1 for each platform.
In theory we should be able to share cached shaders as we cache all
pointer as uint64_t however if a pointer is ever added to one of the
structs we write to file with blob_write_bytes() we run the risk of
introducing a bug that would be difficult to reproduce or report from
a user point of veiw. It's also very unlikely that Mesa developers will
regularly regression test the interaction of cache sharing between
platforms.
---
src/mesa/drivers/dri/i965/brw_shader_cache.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/mesa/drivers/dri/i965/brw_shader_cache.c b/src/mesa/drivers/dri/i965/brw_shader_cache.c
index 79f4717..94f039c 100644
--- a/src/mesa/drivers/dri/i965/brw_shader_cache.c
+++ b/src/mesa/drivers/dri/i965/brw_shader_cache.c
@@ -70,7 +70,7 @@ gen_shader_sha1(struct brw_context *brw, struct gl_program *prog,
char manifest[256];
int offset = 0;
- offset += snprintf(manifest, sizeof(manifest), "program: %s\n",
+ offset += snprintf(manifest, sizeof(manifest), CACHED_PROGRAM" %s\n",
_mesa_sha1_format(sha1_buf, prog->sh.data->sha1));
_mesa_sha1_compute(key, key_size(stage), sha1);
--
2.7.4
More information about the mesa-dev
mailing list