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 e4b764f..daaf3ff 100644 --- a/src/mesa/drivers/dri/i965/brw_shader_cache.c +++ b/src/mesa/drivers/dri/i965/brw_shader_cache.c @@ -69,7 +69,7 @@ gen_shader_sha1(struct brw_context *brw, struct gl_shader_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->sha1)); _mesa_sha1_compute(key, key_size(stage), sha1); -- 2.7.4 _______________________________________________ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev