SWDEV-245532 - HIP - Vulkan interop semaphores

Change-Id: Ib79328ce4ec2f8ac3aade59fde4fd30e2d6e5cba
Cette révision appartient à :
pghafari
2021-04-22 19:24:30 -04:00
révisé par Payam Ghafari
Parent 4656d2d1e1
révision 582d12b32f
8 fichiers modifiés avec 91 ajouts et 0 suppressions
+25
Voir le fichier
@@ -956,6 +956,31 @@ class NativeFnCommand : public Command {
int32_t invoke();
};
class ExternalSemaphoreCmd : public Command {
public:
enum ExternalSemaphoreCmdType { COMMAND_WAIT_EXTSEMAPHORE, COMMAND_SIGNAL_EXTSEMAPHORE };
private:
const void* sem_ptr_; //!< Pointer to external semaphore
int fence_; //!< semaphore value to be set
ExternalSemaphoreCmdType cmd_type_; //!< Signal or Wait semaphore command
public:
ExternalSemaphoreCmd(HostQueue& queue, const void* sem_ptr, int fence,
ExternalSemaphoreCmdType cmd_type)
: Command::Command(queue, CL_COMMAND_USER), sem_ptr_(sem_ptr), fence_(fence), cmd_type_(cmd_type) {}
virtual void submit(device::VirtualDevice& device) {
device.submitExternalSemaphoreCmd(*this);
}
const void* sem_ptr() const { return sem_ptr_; }
const int fence() { return fence_; }
const ExternalSemaphoreCmdType semaphoreCmd() { return cmd_type_; }
};
class Marker : public Command {
public:
//! Create a new Marker