Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 20 additions & 0 deletions layers/10_cmdbufemu/emulate.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1503,6 +1503,14 @@ typedef struct _cl_command_buffer_khr
&cmdbuf_context,
nullptr);

cl_device_id cmdbuf_device = nullptr;
g_pNextDispatch->clGetCommandQueueInfo(
getQueue(),
CL_QUEUE_DEVICE,
sizeof(cmdbuf_device),
&cmdbuf_device,
nullptr);
Comment thread
bashbaug marked this conversation as resolved.

for( cl_uint q = 0; q < num_queues && queues; q++ )
{
if( queues[q] == nullptr )
Expand All @@ -1521,6 +1529,18 @@ typedef struct _cl_command_buffer_khr
{
return CL_INVALID_CONTEXT;
}

cl_device_id queue_device = nullptr;
g_pNextDispatch->clGetCommandQueueInfo(
queues[q],
CL_QUEUE_DEVICE,
sizeof(queue_device),
&queue_device,
nullptr);
if( queue_device != cmdbuf_device )
{
return CL_INVALID_DEVICE;
}
}

// CL_INCOMPATIBLE_COMMAND_QUEUE_KHR if any element of queues is not compatible with the command-queue set on command_buffer creation at the same list index.
Expand Down