P4 to Git Change 1094113 by gandryey@gera-dev-w7 on 2014/11/05 18:22:34
ECR #304775 - CL-GL depth buffer interop - Make the changes necessary for the depth buffer interop support. Currently the extension is disabled, because the conformance tests have multiple bugs. Affected files ... ... //depot/stg/opencl/drivers/opencl/api/opencl/amdocl/cl_gl.cpp#45 edit ... //depot/stg/opencl/drivers/opencl/api/opencl/amdocl/cl_memobj.cpp#71 edit ... //depot/stg/opencl/drivers/opencl/runtime/device/device.hpp#231 edit ... //depot/stg/opencl/drivers/opencl/runtime/device/gpu/gpuresource.cpp#197 edit ... //depot/stg/opencl/drivers/opencl/runtime/device/gpu/gpusettings.cpp#292 edit ... //depot/stg/opencl/drivers/opencl/runtime/device/gpu/gslbe/src/rt/GSLContext.cpp#66 edit ... //depot/stg/opencl/drivers/opencl/runtime/device/gpu/gslbe/src/rt/GSLDevice.cpp#101 edit ... //depot/stg/opencl/drivers/opencl/runtime/device/gpu/gslbe/src/rt/GSLDeviceGL.cpp#20 edit ... //depot/stg/opencl/drivers/opencl/runtime/platform/memory.cpp#113 edit ... //depot/stg/opencl/drivers/opencl/runtime/utils/flags.hpp#217 edit
Этот коммит содержится в:
@@ -1873,7 +1873,7 @@ clCreateFromGLTextureAMD(
|
||||
LogWarning("Cannot get numbers of samples of GL \"texture\" object");
|
||||
return static_cast<cl_mem>(0);
|
||||
}
|
||||
if (numSamples > 1 && ! (amdContext.devices()[0]->settings().depthMSAAInterop_) ) {
|
||||
if (numSamples > 1) {
|
||||
*not_null(errcode_ret) = CL_INVALID_IMAGE_FORMAT_DESCRIPTOR;
|
||||
LogWarning("MSAA \"texture\" object is not suppoerted for the device");
|
||||
return static_cast<cl_mem>(0);
|
||||
|
||||
@@ -2302,6 +2302,10 @@ RUNTIME_ENTRY(cl_int, clEnqueueReadImage, (
|
||||
return CL_INVALID_OPERATION;
|
||||
}
|
||||
|
||||
if (srcImage->getImageFormat().image_channel_order == CL_DEPTH_STENCIL) {
|
||||
return CL_INVALID_OPERATION;
|
||||
}
|
||||
|
||||
amd::HostQueue* queue = as_amd(command_queue)->asHostQueue();
|
||||
if (NULL == queue) {
|
||||
return CL_INVALID_COMMAND_QUEUE;
|
||||
@@ -2481,6 +2485,10 @@ RUNTIME_ENTRY(cl_int, clEnqueueWriteImage, (
|
||||
return CL_INVALID_OPERATION;
|
||||
}
|
||||
|
||||
if (dstImage->getImageFormat().image_channel_order == CL_DEPTH_STENCIL) {
|
||||
return CL_INVALID_OPERATION;
|
||||
}
|
||||
|
||||
amd::HostQueue* queue = as_amd(command_queue)->asHostQueue();
|
||||
if (NULL == queue) {
|
||||
return CL_INVALID_COMMAND_QUEUE;
|
||||
@@ -2646,10 +2654,14 @@ RUNTIME_ENTRY(cl_int, clEnqueueCopyImage, (
|
||||
return CL_INVALID_CONTEXT;
|
||||
}
|
||||
|
||||
if(srcImage->getImageFormat() != dstImage->getImageFormat()) {
|
||||
if (srcImage->getImageFormat() != dstImage->getImageFormat()) {
|
||||
return CL_IMAGE_FORMAT_MISMATCH;
|
||||
}
|
||||
|
||||
if (srcImage->getImageFormat().image_channel_order == CL_DEPTH_STENCIL) {
|
||||
return CL_INVALID_OPERATION;
|
||||
}
|
||||
|
||||
amd::Coord3D srcOrigin(src_origin[0], src_origin[1], src_origin[2]);
|
||||
amd::Coord3D dstOrigin(dst_origin[0], dst_origin[1], dst_origin[2]);
|
||||
amd::Coord3D copyRegion(region[0], region[1], region[2]);
|
||||
@@ -2824,6 +2836,10 @@ RUNTIME_ENTRY(cl_int, clEnqueueCopyImageToBuffer, (
|
||||
return CL_INVALID_CONTEXT;
|
||||
}
|
||||
|
||||
if (srcImage->getImageFormat().image_channel_order == CL_DEPTH_STENCIL) {
|
||||
return CL_INVALID_OPERATION;
|
||||
}
|
||||
|
||||
amd::Coord3D srcOrigin(src_origin[0], src_origin[1], src_origin[2]);
|
||||
amd::Coord3D dstOffset(dst_offset, 0, 0);
|
||||
amd::Coord3D srcRegion(region[0], region[1], region[2]);
|
||||
@@ -2971,6 +2987,10 @@ RUNTIME_ENTRY(cl_int, clEnqueueCopyBufferToImage, (
|
||||
return CL_INVALID_CONTEXT;
|
||||
}
|
||||
|
||||
if (dstImage->getImageFormat().image_channel_order == CL_DEPTH_STENCIL) {
|
||||
return CL_INVALID_OPERATION;
|
||||
}
|
||||
|
||||
amd::Coord3D dstOrigin(dst_origin[0], dst_origin[1], dst_origin[2]);
|
||||
amd::Coord3D srcOffset(src_offset, 0, 0);
|
||||
amd::Coord3D dstRegion(region[0], region[1], region[2]);
|
||||
@@ -3392,6 +3412,11 @@ RUNTIME_ENTRY_RET(void *, clEnqueueMapImage, (
|
||||
return NULL;
|
||||
}
|
||||
|
||||
if (srcImage->getImageFormat().image_channel_order == CL_DEPTH_STENCIL) {
|
||||
*not_null(errcode_ret) = CL_INVALID_OPERATION;
|
||||
return NULL;
|
||||
}
|
||||
|
||||
amd::HostQueue* queue = as_amd(command_queue)->asHostQueue();
|
||||
if (NULL == queue) {
|
||||
*not_null(errcode_ret) = CL_INVALID_COMMAND_QUEUE;
|
||||
@@ -4584,6 +4609,10 @@ RUNTIME_ENTRY(cl_int, clEnqueueFillImage, (
|
||||
return CL_INVALID_CONTEXT;
|
||||
}
|
||||
|
||||
if (fillImage->getImageFormat().image_channel_order == CL_DEPTH_STENCIL) {
|
||||
return CL_INVALID_OPERATION;
|
||||
}
|
||||
|
||||
amd::Coord3D fillOrigin(origin[0], origin[1], origin[2]);
|
||||
amd::Coord3D fillRegion(region[0], region[1], region[2]);
|
||||
if(!fillImage->validateRegion(fillOrigin, fillRegion)) {
|
||||
|
||||
Ссылка в новой задаче
Block a user