radv: Fix driverUUID
[mesa.git] / src / amd / vulkan / radv_device.c
index dc4346b749898f7aa137948ffb8b6fbb0450d185..bac5855bb964e0e224aac1d731f5895012e5f90e 100644 (file)
@@ -48,6 +48,7 @@
 #include "util/build_id.h"
 #include "util/debug.h"
 #include "util/mesa-sha1.h"
+#include "compiler/glsl_types.h"
 
 static int
 radv_device_get_cache_uuid(enum radeon_family family, void *uuid)
@@ -337,7 +338,7 @@ radv_physical_device_init(struct radv_physical_device *device,
            device->rad_info.chip_class > GFX9)
                fprintf(stderr, "WARNING: radv is not a conformant vulkan implementation, testing use only.\n");
 
-       radv_get_driver_uuid(&device->device_uuid);
+       radv_get_driver_uuid(&device->driver_uuid);
        radv_get_device_uuid(&device->rad_info, &device->device_uuid);
 
        if (device->rad_info.family == CHIP_STONEY ||
@@ -610,6 +611,7 @@ void radv_DestroyInstance(
 
        VG(VALGRIND_DESTROY_MEMPOOL(instance));
 
+       _mesa_glsl_release_types();
        _mesa_locale_fini();
 
        vk_debug_report_instance_destroy(&instance->debug_report_callbacks);
@@ -893,6 +895,15 @@ void radv_GetPhysicalDeviceFeatures2(
                        features->hostQueryReset = true;
                        break;
                }
+               case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_8BIT_STORAGE_FEATURES_KHR: {
+                       VkPhysicalDevice8BitStorageFeaturesKHR *features =
+                           (VkPhysicalDevice8BitStorageFeaturesKHR*)ext;
+                       bool enabled = pdevice->rad_info.chip_class >= VI;
+                       features->storageBuffer8BitAccess = enabled;
+                       features->uniformAndStorageBuffer8BitAccess = enabled;
+                       features->storagePushConstant8 = enabled;
+                       break;
+               }
                default:
                        break;
                }
@@ -3647,7 +3658,7 @@ void radv_DestroyFence(
 }
 
 
-static uint64_t radv_get_current_time()
+uint64_t radv_get_current_time(void)
 {
        struct timespec tv;
        clock_gettime(CLOCK_MONOTONIC, &tv);