Skip to content

Commit

Permalink
Fix OpenCL compilation error.
Browse files Browse the repository at this point in the history
The message was:

   BUILD LOG:
   <kernel>:1912:3: error: subscripted access is not allowed for OpenCL vectors
     pixel[c] = 0.0;
     ^     ~
  • Loading branch information
TurboGit committed Sep 26, 2016
1 parent a4d29b0 commit 46a8df5
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion data/kernels/basic.cl
Original file line number Diff line number Diff line change
Expand Up @@ -1907,9 +1907,10 @@ rawoverexposed_falsecolor (
if(raw_pixel < threshold[c]) return;

float4 pixel = read_imagef(in, sampleri, (int2)(x, y));
float4 *p = &pixel;

// falsecolor
pixel[c] = 0.0;
p[c] = 0.0;

write_imagef (out, (int2)(x, y), pixel);
}
Expand Down

0 comments on commit 46a8df5

Please sign in to comment.