Index: experimental/skpdiff/diff_pixels.cl |
diff --git a/experimental/skpdiff/diff_pixels.cl b/experimental/skpdiff/diff_pixels.cl |
index c1ecb523561c7e052f55007057efe969de972d8a..1eed2a4216a0bfc8dc67dd2907c456bfa827aaba 100644 |
--- a/experimental/skpdiff/diff_pixels.cl |
+++ b/experimental/skpdiff/diff_pixels.cl |
@@ -11,7 +11,8 @@ const sampler_t gInSampler = CLK_NORMALIZED_COORDS_FALSE | |
CLK_ADDRESS_CLAMP_TO_EDGE | |
CLK_FILTER_NEAREST; |
-__kernel void diff(read_only image2d_t baseline, read_only image2d_t test, __global int* result) { |
+__kernel void diff(read_only image2d_t baseline, read_only image2d_t test, |
+ __global int* result, __global int2* poi) { |
int2 coord = (int2)(get_global_id(0), get_global_id(1)); |
uint4 baselinePixel = read_imageui(baseline, gInSampler, coord); |
uint4 testPixel = read_imageui(test, gInSampler, coord); |
@@ -21,6 +22,7 @@ __kernel void diff(read_only image2d_t baseline, read_only image2d_t test, __glo |
baselinePixel.z != testPixel.z || |
baselinePixel.w != testPixel.w) { |
- atom_inc(result); |
+ int poiIndex = atomic_inc(result); |
+ poi[poiIndex] = coord; |
} |
} |