P4 to Git Change 2016282 by gandryey@gera-win10 on 2019/10/18 17:41:12

SWDEV-79445 - OCL generic changes and code clean-up
	- Remove cl_amd_command_intercept extension

Affected files ...

... //depot/stg/opencl/drivers/opencl/api/opencl/khronos/headers/opencl1.2/CL/cl_ext.h#21 edit
... //depot/stg/opencl/drivers/opencl/api/opencl/khronos/headers/opencl2.0/CL/cl_ext.h#38 edit
... //depot/stg/opencl/drivers/opencl/api/opencl/khronos/headers/opencl2.1/CL/cl_ext.h#15 edit
... //depot/stg/opencl/drivers/opencl/api/opencl/khronos/headers/opencl2.2/CL/cl_ext.h#9 edit
... //depot/stg/opencl/drivers/opencl/runtime/platform/commandqueue.cpp#31 edit
... //depot/stg/opencl/drivers/opencl/runtime/platform/context.cpp#53 edit
... //depot/stg/opencl/drivers/opencl/runtime/platform/context.hpp#30 edit


[ROCm/clr commit: 902353adc6]
This commit is contained in:
foreman
2019-10-18 17:47:30 -04:00
szülő b540d82392
commit 1ffcdefc22
3 fájl változott, egészen pontosan 4 új sor hozzáadva és 25 régi sor törölve
@@ -19,8 +19,7 @@ namespace amd {
HostQueue::HostQueue(Context& context, Device& device, cl_command_queue_properties properties,
uint queueRTCUs, Priority priority)
: CommandQueue(context, device, properties,
device.info().queueProperties_ | CL_QUEUE_COMMAND_INTERCEPT_ENABLE_AMD,
: CommandQueue(context, device, properties, device.info().queueProperties_,
queueRTCUs, priority),
lastEnqueueCommand_(nullptr) {
if (thread_.state() >= Thread::INITIALIZED) {
@@ -83,10 +82,6 @@ void HostQueue::finish() {
}
void HostQueue::loop(device::VirtualDevice* virtualDevice) {
cl_int(CL_CALLBACK * commandIntercept)(cl_event, cl_int*) =
properties().test(CL_QUEUE_COMMAND_INTERCEPT_ENABLE_AMD) ? context().info().commandIntercept_
: NULL;
// Notify the caller that the queue is ready to accept commands.
{
ScopedLock sl(queueLock_);
@@ -138,20 +133,11 @@ void HostQueue::loop(device::VirtualDevice* virtualDevice) {
}
command->setStatus(CL_SUBMITTED);
cl_int result;
if ((commandIntercept != NULL) && commandIntercept(as_cl<Event>(command), &result)) {
// The command was handled by the callback.
command->setStatus(CL_RUNNING, command->profilingInfo().submitted_);
command->setStatus(result);
continue;
}
// Submit to the device queue.
command->submit(*virtualDevice);
// if we are in intercept mode or this is a user invisible marker command
if ((0 == command->type()) || (commandIntercept != NULL)) {
// if this is a user invisible marker command, then flush
if (0 == command->type()) {
virtualDevice->flush(head);
tail = head = NULL;
}
@@ -184,11 +184,6 @@ int Context::checkProperties(const cl_context_properties* properties, Context::I
// Set the offline device flag
info->flags_ |= OfflineDevices;
break;
case CL_CONTEXT_COMMAND_INTERCEPT_CALLBACK_AMD:
// Set the command intercept flag
info->commandIntercept_ = (cl_int(CL_CALLBACK*)(cl_event, cl_int*))p->ptr;
info->flags_ |= CommandIntercept;
break;
default:
return CL_INVALID_VALUE;
}
@@ -33,7 +33,7 @@ class Context : public RuntimeObject {
GLDeviceKhrIdx = 0, //!< GL
D3D10DeviceKhrIdx, //!< D3D10
OfflineDevicesIdx, //!< Offline devices
CommandInterceptIdx, //!< Command intercept
CommandInterceptIdx, //!< (Deprecated) Command intercept
D3D11DeviceKhrIdx, //!< D3D11
InteropUserSyncIdx, //!< Interop user sync enabled
D3D9DeviceKhrIdx, //!< d3d9 device
@@ -47,7 +47,6 @@ class Context : public RuntimeObject {
GLDeviceKhr = 1 << GLDeviceKhrIdx, //!< GL
D3D10DeviceKhr = 1 << D3D10DeviceKhrIdx, //!< D3D10
OfflineDevices = 1 << OfflineDevicesIdx, //!< Offline devices
CommandIntercept = 1 << CommandInterceptIdx, //!< Command intercept
D3D11DeviceKhr = 1 << D3D11DeviceKhrIdx, //!< D3D11
InteropUserSync = 1 << InteropUserSyncIdx, //!< Interop user sync enabled
D3D9DeviceKhr = 1 << D3D9DeviceKhrIdx, //!< d3d9 device
@@ -62,7 +61,6 @@ class Context : public RuntimeObject {
void* hDev_[LastDeviceFlagIdx]; //!< Device object reference
void* hCtx_; //!< Context object reference
size_t propertiesSize_; //!< Size of the original properties in bytes
cl_int(CL_CALLBACK* commandIntercept_)(cl_event, cl_int*);
};
struct DeviceQueueInfo {