result = VK_NOT_READY;
return result;
}
+
+int
+tu_signal_fences(struct tu_device *device, struct tu_syncobj *fence1, struct tu_syncobj *fence2)
+{
+ uint32_t handles[2], count = 0;
+ if (fence1)
+ handles[count++] = fence1->temporary ?: fence1->permanent;
+
+ if (fence2)
+ handles[count++] = fence2->temporary ?: fence2->permanent;
+
+ if (!count)
+ return 0;
+
+ return ioctl(device->fd, DRM_IOCTL_SYNCOBJ_SIGNAL, &(struct drm_syncobj_array) {
+ .handles = (uintptr_t) handles,
+ .count_handles = count
+ });
+}
tu_finishme("GetFenceStatus");
return VK_SUCCESS;
}
+
+int
+tu_signal_fences(struct tu_device *device, struct tu_syncobj *fence1, struct tu_syncobj *fence2)
+{
+ tu_finishme("tu_signal_fences");
+ return 0;
+}
void
tu_drm_submitqueue_close(const struct tu_device *dev, uint32_t queue_id);
+int
+tu_signal_fences(struct tu_device *device, struct tu_syncobj *fence1, struct tu_syncobj *fence2);
+
#define TU_DEFINE_HANDLE_CASTS(__tu_type, __VkType) \
\
static inline struct __tu_type *__tu_type##_from_handle(__VkType _handle) \
uint32_t *pImageIndex)
{
TU_FROM_HANDLE(tu_device, device, _device);
+ TU_FROM_HANDLE(tu_syncobj, fence, pAcquireInfo->fence);
+ TU_FROM_HANDLE(tu_syncobj, semaphore, pAcquireInfo->semaphore);
+
struct tu_physical_device *pdevice = device->physical_device;
VkResult result = wsi_common_acquire_next_image2(
&pdevice->wsi_device, _device, pAcquireInfo, pImageIndex);
- /* TODO signal fence and semaphore */
+ /* signal fence/semaphore - image is available immediately */
+ tu_signal_fences(device, fence, semaphore);
return result;
}