if (itemID < actualNumPixelInThisChunk)
{
- float density = densityCache[itemID];
- float gamma = gammaCache[itemID];
float4 filteredPixel = outputPixelCache[itemID];
+ float gamma = 0.0f;
+ if ((number_channels == 4) || (number_channels == 2))
+ gamma = gammaCache[itemID];
+
+ float density = densityCache[itemID];
if ((density != 0.0f) && (density != 1.0f))
{
density = PerceptibleReciprocal(density);
if (itemID < actualNumPixelInThisChunk)
{
- float density = densityCache[itemID];
- float gamma = gammaCache[itemID];
float4 filteredPixel = outputPixelCache[itemID];
+ float gamma = 0.0f;
+ if ((number_channels == 4) || (number_channels == 2))
+ gamma = gammaCache[itemID];
+
+ float density = densityCache[itemID];
if ((density != 0.0f) && (density != 1.0f))
{
density = PerceptibleReciprocal(density);
resizeWindowType;
MagickBooleanType
- status = MagickFalse;
+ status;
size_t
gammaAccumulatorLocalMemorySize,
local_work_size[0] = workgroupSize;
local_work_size[1] = 1;
clStatus = clEnv->library->clEnqueueNDRangeKernel(queue, horizontalKernel, 2, NULL, global_work_size, local_work_size, 0, NULL, &event);
- (void) local_work_size;
if (clStatus != CL_SUCCESS)
{
(void) OpenCLThrowMagickException(device,exception, GetMagickModule(), ResourceLimitWarning, "clEnv->library->clEnqueueNDRangeKernel failed.", "'%s'", ".");
resizeWindowType;
MagickBooleanType
- status = MagickFalse;
+ status;
size_t
gammaAccumulatorLocalMemorySize,
MagickTrue);
}
-static void LogOpenCLBuildFature(MagickCLDevice device,const char *kernel,
+static void LogOpenCLBuildFailure(MagickCLDevice device,const char *kernel,
ExceptionInfo *exception)
{
char
(void) FormatLocaleString(filename,MagickPathExtent,"%s%s%s",
GetOpenCLCacheDirectory(),DirectorySeparator,"magick_badcl.cl");
+ (void) remove_utf8(filename);
(void) BlobToFile(filename,kernel,strlen(kernel),exception);
openCL_library->clGetProgramBuildInfo(device->program,device->deviceID,
(void) FormatLocaleString(filename,MagickPathExtent,"%s%s%s",
GetOpenCLCacheDirectory(),DirectorySeparator,"magick_badcl.log");
+ (void) remove_utf8(filename);
(void) BlobToFile(filename,log,logSize,exception);
}
{
(void) ThrowMagickException(exception,GetMagickModule(),DelegateWarning,
"clBuildProgram failed.","(%d)",(int)status);
- LogOpenCLBuildFature(device,kernel,exception);
+ LogOpenCLBuildFailure(device,kernel,exception);
return(MagickFalse);
}