summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJason Ekstrand <jason@jlekstrand.net>2020-01-13 13:49:57 -0600
committerDylan Baker <dylan@pnwbakers.com>2020-01-14 13:29:07 -0800
commit0ca67b73b2dd112833dbe0670e0a971b2bc1e78d (patch)
treea194f4eb182e1d70b8ee83f1c7a5d50d2cc65d96
parent1ebe018e4415c6a7c74ec0839a906abaf7d4bf93 (diff)
anv: Memset array properties
This is probably better than possibly leaving those bytes uninitialized even if the app will theoretically not use them. Cc: mesa-stable@lists.freedesktop.org Reviewed-by: Caio Marcelo de Oliveira Filho <caio.oliveira@intel.com> Reviewed-by: Ivan Briano <ivan.briano@intel.com> Tested-by: Marge Bot <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3369> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3369> (cherry picked from commit 7978f2401bba7e60f255337a394fd132082be9aa)
-rw-r--r--src/intel/vulkan/anv_device.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/intel/vulkan/anv_device.c b/src/intel/vulkan/anv_device.c
index 6303fc5bffd..fcb4a7723ef 100644
--- a/src/intel/vulkan/anv_device.c
+++ b/src/intel/vulkan/anv_device.c
@@ -1553,9 +1553,13 @@ void anv_GetPhysicalDeviceProperties2(
(VkPhysicalDeviceDriverPropertiesKHR *) ext;
driver_props->driverID = VK_DRIVER_ID_INTEL_OPEN_SOURCE_MESA_KHR;
+ memset(driver_props->driverName, 0,
+ sizeof(driver_props->driverName));
snprintf(driver_props->driverName, VK_MAX_DRIVER_NAME_SIZE_KHR,
"Intel open-source Mesa driver");
+ memset(driver_props->driverInfo, 0,
+ sizeof(driver_props->driverInfo));
snprintf(driver_props->driverInfo, VK_MAX_DRIVER_INFO_SIZE_KHR,
"Mesa " PACKAGE_VERSION MESA_GIT_SHA1);
@@ -1582,6 +1586,7 @@ void anv_GetPhysicalDeviceProperties2(
memcpy(id_props->deviceUUID, pdevice->device_uuid, VK_UUID_SIZE);
memcpy(id_props->driverUUID, pdevice->driver_uuid, VK_UUID_SIZE);
/* The LUID is for Windows. */
+ memset(id_props->deviceLUID, 0, VK_UUID_SIZE);
id_props->deviceLUIDValid = false;
break;
}