[Mesa-dev] Testing OpenCL with gegl

Jan Vesely jan.vesely at rutgers.edu
Fri Jun 20 06:31:29 PDT 2014


On Fri, 2014-06-20 at 10:27 +0200, Bruno Jimenez wrote:
> Hi,

Hi Bruno,
I have added mesa list to CC as others might be interested. Hope you
don't mind.

> 
> I have built babl and gegl but I don't know how to run the OpenCL tests.
> Inside the tests/opencl directory there's just .xml files and there
> doesn't seem to be any kind of executable.
> 
> Could you please explain me how should I build babl and gegl so I can
> use OpenCL tests?

both gegl and babel are built using standard autoconf-configure-make
combo

it's a good idea to build gegl with --enable-debug, the debug output can
be rather useful. You can then use GEGL_DEBUG=opencl env var to get some
info.


after building GEGL, you can just run 'make check' in top directory to
run the entire test suite. Also most test subdirectories have their own
Makefile with 'check' target.

Not all test phases touch OpenCL paths, the most important is probably
'compositions' so you can just do

cd tests/compositions
make check

The situation on my TURKS GPU is that all but 2 composition tests pass
(after applying the patches I sent yesterday)

It's also possible to run individual test manually. There is a a binary
in .libs, but it needs access to operation libs. You need to do:

GEGL_PATH="./operations" \
LD_LIBRARY_PATH="$LD_LIBRARY_PATH:./gegl/.libs/" ./bin/.libs/gegl 

and then provide path to a test .xml.
It displays the result on the screen, -o allows you to set output file
(png).

You can then compare the png file with reference in tests/*/reference
using graphicsmagick (or imagemagick):
gm compare
or
gm composite -compose Difference

if you have multiple opencl implementations available you can use
GEGL_USE_OPENCL env var to select device type. the accepted values are
'yes' (default), 'no'(hard-disable), 'cpu', 'gpu', 'accelerator'


HTH, let me know if you have further questions

Jan

> 
> Thanks in advance!
> Bruno
> 

-- 
Jan Vesely <jan.vesely at rutgers.edu>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: This is a digitally signed message part
URL: <http://lists.freedesktop.org/archives/mesa-dev/attachments/20140620/10d6747a/attachment.sig>


More information about the mesa-dev mailing list