diff options
author | Jordan Justen <[email protected]> | 2018-07-20 23:41:23 -0700 |
---|---|---|
committer | Jordan Justen <[email protected]> | 2018-07-24 16:17:25 -0700 |
commit | 69a686b0ae1916dbaf0d3e06c6eba2b2730ab180 (patch) | |
tree | f17335f3606206cfa4984db3c68c011ba027bd4c /src/intel/vulkan | |
parent | 7d2e6edd897ba9d2d26abe9bc57e72c314753ce4 (diff) |
i965, anv: Add extra unused character in disk_cache renderer temp string
This extra character should not be used by snprintf, but we make it
available to verify that we printed the exact number we wanted, and
didn't overflow.
v2:
* Also update Anvil
Signed-off-by: Jordan Justen <[email protected]>
Reviewed-by: Lionel Landwerlin <[email protected]>
Diffstat (limited to 'src/intel/vulkan')
-rw-r--r-- | src/intel/vulkan/anv_device.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/intel/vulkan/anv_device.c b/src/intel/vulkan/anv_device.c index 04fd6a829ed..247ba641336 100644 --- a/src/intel/vulkan/anv_device.c +++ b/src/intel/vulkan/anv_device.c @@ -278,10 +278,10 @@ static void anv_physical_device_init_disk_cache(struct anv_physical_device *device) { #ifdef ENABLE_SHADER_CACHE - char renderer[9]; + char renderer[10]; MAYBE_UNUSED int len = snprintf(renderer, sizeof(renderer), "anv_%04x", device->chipset_id); - assert(len == sizeof(renderer) - 1); + assert(len == sizeof(renderer) - 2); char timestamp[41]; _mesa_sha1_format(timestamp, device->driver_build_sha1); |