This patch took me a bit longer to read and evaluate because I haven't been
so well lately (sick with the flu) but here it is:
Congratulations to Marco Domingues for competing this major GSoC milestone!
This code has enough performance that it can be used as an alternative to
the existing ANSI C code. Right now it has roughly the same order of
performance on scenes with small depth complexity. However the performance
improvement we expected with OpenCL hasn't materialized yet, the current
iteration of the OpenCL backend still lacks important optimizations which
are done in the ANSI C backend, like stopping ray traversal once the
boolean evaluation detects a solid hit. Currently we are processing all
hits. This is obviously more compute intensive.
So we have talked about how to improve the performance by refactoring this
code and came up with some ideas. Marco will be working on performance
improvements over the remaining time we have left for the GSoC.
What this patch does allow right now is to render CSG boolean operations,
like object intersections or subtractions, over either CPU or GPU
platforms, or even more exotic hardware like FPGAs which support OpenCL,
which is something that we couldn't do previously. The prior code only ran
over single-threaded CPUs with ANSI C. Another thing this work has allowed
was to clean up and understand better the behaviour of the current ANSI C
bool code which probably hadn't been touched in a really long time.
I still hope we'll eventually get like a 3-4x performance improvement with
this vector OpenCL librt backend over the scalar ANSI C version running
over a modern CPU.
The performance could be even better than that if we further reduce thread
divergence and modify the data structure but it seems this will take more
effort.
So we have achieved our initial goal with OpenCL boolean evaluation, but
there is still some more work to be done in this for sure, and hopefully
also in future GSoCs,
Regards,
--
Vasco Alexandre da Silva Costa
PhD in Computer Engineering (Computer Graphics)
Instituto Superior Técnico/University of Lisbon, Portugal
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
BRL-CAD Developer mailing list
brlcad-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/brlcad-devel