From 14a4600b62d33dc8fd8268678fe8c5b0daa04b69 Mon Sep 17 00:00:00 2001 From: Jianxun Zhang Date: Mon, 10 Jan 2022 14:11:40 -0800 Subject: [PATCH] intel: add swizzle flag into driver uuid Suggested by Lionel Landwerlin, we add has_bit6_swizzle as another input when computing driver uuid. Also fix miscalculation of the length of driver tag. Signed-off-by: Jianxun Zhang Reviewed-by: Lionel Landwerlin Reviewed-by: Rohan Garg Part-of: --- src/intel/common/intel_uuid.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/intel/common/intel_uuid.c b/src/intel/common/intel_uuid.c index df24715..14f62754 100644 --- a/src/intel/common/intel_uuid.c +++ b/src/intel/common/intel_uuid.c @@ -78,7 +78,9 @@ intel_uuid_compute_driver_id(uint8_t *uuid, * UUID. */ _mesa_sha1_init(&sha1_ctx); - _mesa_sha1_update(&sha1_ctx, intelDriver, strlen(intelDriver) * sizeof(char)); + _mesa_sha1_update(&sha1_ctx, intelDriver, strlen(intelDriver)); + _mesa_sha1_update(&sha1_ctx, &devinfo->has_bit6_swizzle, + sizeof(devinfo->has_bit6_swizzle)); _mesa_sha1_final(&sha1_ctx, sha1); memcpy(uuid, sha1, size); } -- 2.7.4