buffer: add abyss policy to cl iterator

parent 87f6b30f
......@@ -70,7 +70,8 @@ gegl_buffer_cl_iterator_add_2 (GeglBufferClIterator *iterator,
gint left,
gint right,
gint top,
gint bottom)
gint bottom,
GeglAbyssPolicy abyss_policy)
{
GeglBufferClIterators *i = (gpointer)iterator;
gint self = 0;
......@@ -170,9 +171,10 @@ gegl_buffer_cl_iterator_add (GeglBufferClIterator *iterator,
GeglBuffer *buffer,
const GeglRectangle *result,
const Babl *format,
guint flags)
guint flags,
GeglAbyssPolicy abyss_policy)
{
return gegl_buffer_cl_iterator_add_2 (iterator, buffer, result, format, flags, 0,0,0,0);
return gegl_buffer_cl_iterator_add_2 (iterator, buffer, result, format, flags, 0,0,0,0, abyss_policy);
}
#define OPENCL_USE_CACHE 1
......@@ -582,12 +584,13 @@ GeglBufferClIterator *
gegl_buffer_cl_iterator_new (GeglBuffer *buffer,
const GeglRectangle *roi,
const Babl *format,
guint flags)
guint flags,
GeglAbyssPolicy abyss_policy)
{
GeglBufferClIterator *i = (gpointer)g_slice_new0 (GeglBufferClIterators);
/* Because the iterator is nulled above, we can forgo explicitly setting
* i->is_finished to FALSE. */
gegl_buffer_cl_iterator_add (i, buffer, roi, format, flags);
gegl_buffer_cl_iterator_add (i, buffer, roi, format, flags, abyss_policy);
return i;
}
......
......@@ -26,7 +26,8 @@ gint gegl_buffer_cl_iterator_add (GeglBufferClIterator *iterator,
GeglBuffer *buffer,
const GeglRectangle *roi,
const Babl *format,
guint flags);
guint flags,
GeglAbyssPolicy abyss_policy);
gint gegl_buffer_cl_iterator_add_2 (GeglBufferClIterator *iterator,
GeglBuffer *buffer,
......@@ -36,12 +37,14 @@ gint gegl_buffer_cl_iterator_add_2 (GeglBufferClIterator *iterator,
gint left,
gint right,
gint top,
gint bottom);
gint bottom,
GeglAbyssPolicy abyss_policy);
gboolean gegl_buffer_cl_iterator_next (GeglBufferClIterator *iterator, gboolean *err);
GeglBufferClIterator *gegl_buffer_cl_iterator_new (GeglBuffer *buffer,
const GeglRectangle *roi,
const Babl *format,
guint flags);
guint flags,
GeglAbyssPolicy abyss_policy);
#endif
......@@ -167,11 +167,11 @@ gegl_operation_point_composer_cl_process (GeglOperation *operation,
/* Process */
{
GeglBufferClIterator *i = gegl_buffer_cl_iterator_new (output, result, out_format, GEGL_CL_BUFFER_WRITE);
gint read = gegl_buffer_cl_iterator_add (i, input, result, in_format, GEGL_CL_BUFFER_READ);
GeglBufferClIterator *i = gegl_buffer_cl_iterator_new (output, result, out_format, GEGL_CL_BUFFER_WRITE, GEGL_ABYSS_NONE);
gint read = gegl_buffer_cl_iterator_add (i, input, result, in_format, GEGL_CL_BUFFER_READ, GEGL_ABYSS_NONE);
if (aux)
{
gint foo = gegl_buffer_cl_iterator_add (i, aux, result, aux_format, GEGL_CL_BUFFER_READ);
gint foo = gegl_buffer_cl_iterator_add (i, aux, result, aux_format, GEGL_CL_BUFFER_READ, GEGL_ABYSS_NONE);
while (gegl_buffer_cl_iterator_next (i, &err))
{
......
......@@ -109,8 +109,8 @@ gegl_operation_point_filter_cl_process (GeglOperation *operation,
/* Process */
{
GeglBufferClIterator *i = gegl_buffer_cl_iterator_new (output, result, out_format, GEGL_CL_BUFFER_WRITE);
gint read = gegl_buffer_cl_iterator_add (i, input, result, in_format, GEGL_CL_BUFFER_READ);
GeglBufferClIterator *i = gegl_buffer_cl_iterator_new (output, result, out_format, GEGL_CL_BUFFER_WRITE, GEGL_ABYSS_NONE);
gint read = gegl_buffer_cl_iterator_add (i, input, result, in_format, GEGL_CL_BUFFER_READ, GEGL_ABYSS_NONE);
while (gegl_buffer_cl_iterator_next (i, &err))
{
if (err) return FALSE;
......
......@@ -341,9 +341,9 @@ cl_process (GeglOperation *operation,
GeglOperationAreaFilter *op_area = GEGL_OPERATION_AREA_FILTER (operation);
GeglChantO *o = GEGL_CHANT_PROPERTIES (operation);
GeglBufferClIterator *i = gegl_buffer_cl_iterator_new (output, result, out_format, GEGL_CL_BUFFER_WRITE);
gint read = gegl_buffer_cl_iterator_add_2 (i, input, result, in_format, GEGL_CL_BUFFER_READ, op_area->left, op_area->right, op_area->top, op_area->bottom);
gint aux = gegl_buffer_cl_iterator_add_2 (i, NULL, result, in_format, GEGL_CL_BUFFER_AUX, 0, 0, op_area->top, op_area->bottom);
GeglBufferClIterator *i = gegl_buffer_cl_iterator_new (output, result, out_format, GEGL_CL_BUFFER_WRITE, GEGL_ABYSS_NONE);
gint read = gegl_buffer_cl_iterator_add_2 (i, input, result, in_format, GEGL_CL_BUFFER_READ, op_area->left, op_area->right, op_area->top, op_area->bottom, GEGL_ABYSS_NONE);
gint aux = gegl_buffer_cl_iterator_add_2 (i, NULL, result, in_format, GEGL_CL_BUFFER_AUX, 0, 0, op_area->top, op_area->bottom, GEGL_ABYSS_NONE);
while (gegl_buffer_cl_iterator_next (i, &err))
{
if (err) return FALSE;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment