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
이 커밋은 다음에 포함됨:
foreman
2014-11-05 18:30:40 -05:00
부모 dd6074f047
커밋 b7ee1dd66b
8개의 변경된 파일25개의 추가작업 그리고 17개의 파일을 삭제
+13 -3
파일 보기
@@ -243,8 +243,12 @@ static uint32_t GetHSAILImageFormatType(cmSurfFmt format)
case CM_SURF_FMT_RG32F:
case CM_SURF_FMT_RGBA32F:
case CM_SURF_FMT_DEPTH32F:
case CM_SURF_FMT_DEPTH32F_X24_STEN8:
formatType = HSA_EXT_IMAGE_CHANNEL_TYPE_FLOAT;
break;
case CM_SURF_FMT_DEPTH24_STEN8:
formatType = HSA_EXT_IMAGE_CHANNEL_TYPE_UNORM_INT24;
break;
default:
assert(false);
}
@@ -252,7 +256,7 @@ static uint32_t GetHSAILImageFormatType(cmSurfFmt format)
return formatType;
}
static uint32_t GetHSAILImageOrderType(gslChannelOrder chOrder)
static uint32_t GetHSAILImageOrderType(gslChannelOrder chOrder, cmSurfFmt format)
{
uint32_t orderType = HSA_EXT_IMAGE_CHANNEL_ORDER_A;
@@ -301,7 +305,13 @@ static uint32_t GetHSAILImageOrderType(gslChannelOrder chOrder)
orderType = HSA_EXT_IMAGE_CHANNEL_ORDER_LUMINANCE;
break;
case GSL_CHANNEL_ORDER_REPLICATE_R:
orderType = HSA_EXT_IMAGE_CHANNEL_ORDER_DEPTH;
if ((format == CM_SURF_FMT_DEPTH32F_X24_STEN8) ||
(format == CM_SURF_FMT_DEPTH24_STEN8)) {
orderType = HSA_EXT_IMAGE_CHANNEL_ORDER_DEPTH_STENCIL;
}
else {
orderType = HSA_EXT_IMAGE_CHANNEL_ORDER_DEPTH;
}
break;
default:
assert(false);
@@ -976,7 +986,7 @@ Resource::create(MemoryType memType, CreateParams* params, bool heap)
}
dev().fillImageHwState(gslResource, hwState_, 8 * sizeof(uint32_t));
hwState_[8] = GetHSAILImageFormatType(cal()->format_);
hwState_[9] = GetHSAILImageOrderType(cal()->channelOrder_);
hwState_[9] = GetHSAILImageOrderType(cal()->channelOrder_, cal()->format_);
hwState_[10] = static_cast<uint32_t>(cal()->width_);
// Workaround for depth view, change tileIndex to 0 for depth view
if ((memoryType() == ImageView) &&