diff options
author | Eduardo Lima Mitev <[email protected]> | 2020-04-09 12:56:08 +0200 |
---|---|---|
committer | Marge Bot <[email protected]> | 2020-05-14 19:05:02 +0000 |
commit | 9623debf48ae7dbea120389eae40d784d22eee24 (patch) | |
tree | 60610c0cd1fb319bbeb3d3869cec7e8be529b069 /src/freedreno/vulkan | |
parent | cdfede7336b6ef99aa60d955f7a173ea945602d4 (diff) |
freedreno: Centralize UUID generation into new files freedreno_uuid.c/h
The new files are created under a 'common' folder under 'src/freedreno',
where shared functionality between GL and Vulkan drivers (that is not
registers, layout or compiler) will be placed.
Reviewed-by: Rob Clark <[email protected]>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4847>
Diffstat (limited to 'src/freedreno/vulkan')
-rw-r--r-- | src/freedreno/vulkan/meson.build | 1 | ||||
-rw-r--r-- | src/freedreno/vulkan/tu_device.c | 20 |
2 files changed, 6 insertions, 15 deletions
diff --git a/src/freedreno/vulkan/meson.build b/src/freedreno/vulkan/meson.build index 2510b161c65..bafce3d06d7 100644 --- a/src/freedreno/vulkan/meson.build +++ b/src/freedreno/vulkan/meson.build @@ -118,6 +118,7 @@ libvulkan_freedreno = shared_library( libfreedreno_layout, ], dependencies : [ + idep_libfreedreno_common, dep_dl, dep_elf, dep_libdrm, diff --git a/src/freedreno/vulkan/tu_device.c b/src/freedreno/vulkan/tu_device.c index 3e685e0518e..6d1a885bebc 100644 --- a/src/freedreno/vulkan/tu_device.c +++ b/src/freedreno/vulkan/tu_device.c @@ -45,6 +45,9 @@ #include "drm-uapi/msm_drm.h" +/* for fd_get_driver/device_uuid() */ +#include "freedreno/common/freedreno_uuid.h" + static int tu_device_get_cache_uuid(uint16_t family, void *uuid) { @@ -61,19 +64,6 @@ tu_device_get_cache_uuid(uint16_t family, void *uuid) return 0; } -static void -tu_get_driver_uuid(void *uuid) -{ - memset(uuid, 0, VK_UUID_SIZE); - snprintf(uuid, VK_UUID_SIZE, "freedreno"); -} - -static void -tu_get_device_uuid(void *uuid) -{ - memset(uuid, 0, VK_UUID_SIZE); -} - static VkResult tu_bo_init(struct tu_device *dev, struct tu_bo *bo, @@ -308,8 +298,8 @@ tu_physical_device_init(struct tu_physical_device *device, fprintf(stderr, "WARNING: tu is not a conformant vulkan implementation, " "testing use only.\n"); - tu_get_driver_uuid(&device->device_uuid); - tu_get_device_uuid(&device->device_uuid); + fd_get_driver_uuid(device->driver_uuid); + fd_get_device_uuid(device->device_uuid); tu_physical_device_get_supported_extensions(device, &device->supported_extensions); |