P4 to Git Change 1138047 by gandryey@gera-w8 on 2015/04/07 11:38:28
ECR #304775 - Some code clean-up
- Remove amd::Context reference from the event object. Runtime can use queue to get the context for the limited number of use cases
- User/GL events will keep the context as a member
Affected files ...
... //depot/stg/opencl/drivers/opencl/api/opencl/amdocl/cl_event.cpp#8 edit
... //depot/stg/opencl/drivers/opencl/runtime/platform/command.cpp#69 edit
... //depot/stg/opencl/drivers/opencl/runtime/platform/command.hpp#75 edit
... //depot/stg/opencl/drivers/opencl/runtime/platform/memory.cpp#120 edit
... //depot/stg/opencl/drivers/opencl/runtime/platform/memory.hpp#91 edit
[ROCm/clr commit: 0fd491cbb4]
This commit is contained in:
@@ -81,7 +81,7 @@ RUNTIME_ENTRY(cl_int, clWaitForEvents, (
|
||||
}
|
||||
|
||||
// Make sure all the events are associated with the same context
|
||||
amd::Context* context = &as_amd(event)->context();
|
||||
const amd::Context* context = &as_amd(event)->context();
|
||||
if (prevContext != NULL && prevContext != context) {
|
||||
return CL_INVALID_CONTEXT;
|
||||
}
|
||||
@@ -147,7 +147,8 @@ RUNTIME_ENTRY(cl_int, clGetEventInfo, (
|
||||
|
||||
switch(param_name) {
|
||||
case CL_EVENT_CONTEXT: {
|
||||
cl_context context = as_cl(&as_amd(event)->context());
|
||||
amd::Context& amdCtx = const_cast<amd::Context&>(as_amd(event)->context());
|
||||
cl_context context = as_cl(&amdCtx);
|
||||
return amd::clGetInfo(
|
||||
context, param_value_size, param_value, param_value_size_ret);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user