*extensions = (struct vk_device_extension_table){
.KHR_external_memory = true,
.KHR_external_memory_fd = true,
+ .KHR_timeline_semaphore = true,
#if defined(PVR_USE_WSI_PLATFORM)
.KHR_swapchain = true,
#endif
};
vk_foreach_struct (ext, pFeatures->pNext) {
- pvr_debug_ignored_stype(ext->sType);
+ switch (ext->sType) {
+ case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_TIMELINE_SEMAPHORE_FEATURES: {
+ VkPhysicalDeviceTimelineSemaphoreFeatures *pFeature =
+ (VkPhysicalDeviceTimelineSemaphoreFeatures *)ext;
+ pFeature->timelineSemaphore = VK_TRUE;
+ break;
+ }
+ default: {
+ pvr_debug_ignored_stype(ext->sType);
+ break;
+ }
+ }
}
}
VK_UUID_SIZE);
vk_foreach_struct (ext, pProperties->pNext) {
- pvr_debug_ignored_stype(ext->sType);
+ switch (ext->sType) {
+ case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_TIMELINE_SEMAPHORE_PROPERTIES: {
+ VkPhysicalDeviceTimelineSemaphoreProperties *pProperties =
+ (VkPhysicalDeviceTimelineSemaphoreProperties *)ext;
+ pProperties->maxTimelineSemaphoreValueDifference = UINT64_MAX;
+ break;
+ }
+ default: {
+ pvr_debug_ignored_stype(ext->sType);
+ break;
+ }
+ }
}
}
#include "util/macros.h"
#include "util/vma.h"
#include "vk_sync.h"
+#include "vk_sync_timeline.h"
struct pvr_device_info;
struct pvr_device_runtime_info;
uint64_t page_size;
uint32_t log2_page_size;
- const struct vk_sync_type *sync_types[2];
+ const struct vk_sync_type *sync_types[3];
struct vk_sync_type syncobj_type;
+ struct vk_sync_timeline_type timeline_syncobj_type;
const struct pvr_winsys_ops *ops;
};
#include "util/os_misc.h"
#include "vk_log.h"
#include "vk_sync.h"
+#include "vk_sync_timeline.h"
/* Amount of space used to hold sync prim values (in bytes). */
#define PVR_SRV_SYNC_PRIM_VALUE_SIZE 4U
srv_ws->base.syncobj_type = pvr_srv_sync_type;
srv_ws->base.sync_types[0] = &srv_ws->base.syncobj_type;
- srv_ws->base.sync_types[1] = NULL;
+
+ srv_ws->base.timeline_syncobj_type =
+ vk_sync_timeline_get_type(srv_ws->base.sync_types[0]);
+ srv_ws->base.sync_types[1] = &srv_ws->base.timeline_syncobj_type.sync;
+ srv_ws->base.sync_types[2] = NULL;
result = pvr_srv_memctx_init(srv_ws);
if (result != VK_SUCCESS)