SNORM formats support

Change-Id: I4138a3e96788aab2a8f3af108dcbfa6f81006bf9
This commit is contained in:
Dunajski, Bartosz
2018-01-31 14:01:59 +01:00
parent e719ec4c47
commit 8974af4de8
11 changed files with 267 additions and 319 deletions

View File

@@ -966,9 +966,6 @@ const SurfaceFormatInfo *Image::getSurfaceFormatFromTable(cl_mem_flags flags, co
#else
return nullptr;
#endif
} else if (isSnormFormat(*imageFormat)) {
surfaceFormatTable = snormSurfaceFormats;
numSurfaceFormats = numSnormSurfaceFormats;
} else if ((flags & CL_MEM_READ_ONLY) == CL_MEM_READ_ONLY) {
surfaceFormatTable = isDepthFormat ? readOnlyDepthSurfaceFormats : readOnlySurfaceFormats;
numSurfaceFormats = isDepthFormat ? numReadOnlyDepthSurfaceFormats : numReadOnlySurfaceFormats;
@@ -1013,13 +1010,6 @@ bool Image::isDepthFormat(const cl_image_format &imageFormat) {
return false;
}
bool Image::isSnormFormat(const cl_image_format &imageFormat) {
if (imageFormat.image_channel_data_type == CL_SNORM_INT8 || imageFormat.image_channel_data_type == CL_SNORM_INT16) {
return true;
}
return false;
}
Image *Image::validateAndCreateImage(Context *context,
cl_mem_flags flags,
const cl_image_format *imageFormat,