P4 to Git Change 1064550 by rili@rili_opencl_stg on 2014/08/08 15:16:52

EPR #403687 - [CQE OCL][2.0][NI][QR] WF 1.2 Conf: Failures observed in Images/ClFillImage test in Linux & Windows; Faulty CL#1057445

	                         Issue: This issue happens because the image setting for NI is different from SI and above. It may take some time to fix NI issue for image RGB_101010.
	                                    Current user(MM team) is NOT asking RBG_101010 support for NI and previous asics.

	                         Solution: Support image format (CL_RGB, CL_UNORM_INT_101010) on gpu only from OCL 2.0.

	                        Code Review Request: 5494

Affected files ...

... //depot/stg/opencl/drivers/opencl/runtime/platform/memory.cpp#107 edit
Этот коммит содержится в:
foreman
2014-08-08 16:09:29 -04:00
родитель b758009d47
Коммит 8483ca5040
+12 -6
Просмотреть файл
@@ -918,9 +918,6 @@ Image::supportedFormats[] = {
{CL_RG, CL_HALF_FLOAT}, {CL_RG, CL_FLOAT},
// RGB
{CL_RGB, CL_UNORM_INT_101010},
// RGBA
{CL_RGBA, CL_SNORM_INT8}, {CL_RGBA, CL_SNORM_INT16},
{CL_RGBA, CL_UNORM_INT8}, {CL_RGBA, CL_UNORM_INT16},
@@ -949,10 +946,17 @@ Image::supportedFormats[] = {
{CL_INTENSITY, CL_UNORM_INT8}, {CL_INTENSITY, CL_UNORM_INT16},
{CL_INTENSITY, CL_HALF_FLOAT}, {CL_INTENSITY, CL_FLOAT},
// RGB
{CL_RGB, CL_UNORM_INT_101010},
// sRGB
{CL_sRGBA, CL_UNORM_INT8},
// DEPTH
{CL_DEPTH, CL_UNORM_INT16}, {CL_DEPTH, CL_FLOAT},
};
const cl_uint NUM_CHANNEL_ORDER_OF_RGB = 1; // The number of channel orders of RGB at the end of the table supportedFormats above and before sRGB and depth.
const cl_uint NUM_CHANNEL_ORDER_OF_sRGB = 1; // The number of channel orders of sRGB at the end of the table supportedFormats above and before depth.
const cl_uint NUM_CHANNEL_ORDER_OF_DEPTH = 2; // The number of channel orders of DEPTH at the end of the table supportedFormats above.
@@ -1005,7 +1009,8 @@ Image::numSupportedFormats(const Context& context, cl_mem_object_type image_type
}
}
else {
numFormats -= NUM_CHANNEL_ORDER_OF_sRGB; // substract channel order of DEPTH type.
numFormats -= NUM_CHANNEL_ORDER_OF_RGB; // substract channel order of RGB type.
numFormats -= NUM_CHANNEL_ORDER_OF_sRGB; // substract channel order of sRGB type.
numFormats -= NUM_CHANNEL_ORDER_OF_DEPTH; // substract channel order of DEPTH type.
}
@@ -1057,8 +1062,9 @@ Image::getSupportedFormats(
}
}
else {
numSupportedFormats -= NUM_CHANNEL_ORDER_OF_sRGB;
numSupportedFormats -= NUM_CHANNEL_ORDER_OF_DEPTH;
numSupportedFormats -= NUM_CHANNEL_ORDER_OF_RGB; // substract channel order of RGB type.
numSupportedFormats -= NUM_CHANNEL_ORDER_OF_sRGB; // substract channel order of sRGB type.
numSupportedFormats -= NUM_CHANNEL_ORDER_OF_DEPTH; // substract channel order of DEPTH type.
}
for (size_t i = 0; i < numSupportedFormats; i++) {