Fixed several issues with the patch from typos to actual coding errors. There are still compile warnings but at least it compiles.
OpenCL Patch for HYP primitive
ARBN patch with OpenCL changes
OpenCL code for HYP primitive
OpenCL code for ARBN primitive
OpenCL code for HYP primitive
OpenCL code for SUPERELL primitive
This patch does not allocate or pass the pipe data properly. Neither does the other PIPE patch. I will give you a clue. You can't pass pointers to OpenCL. This might work if you run on a CPU with shared memory. But on a GPU with a separate memory addressing space it will fail hard. You need to serialize the data structure and pass it to the OpenCL compute device.
This patch does not allocate or pass the pipe data properly. Neither does the other PIPE patch. I will give you a clue. You can't pass pointers to OpenCL. This might work if you run on a CPU with shared memory. But on a GPU with a separate memory addressing space it will fail hard. You need to serialize the data structure and pass it to the OpenCL compute device.
This patch does not allocate or pass the pipe data properly. Neither does the other PIPE patch. I will give you a clue. You can't pass pointers to OpenCL. This might work if you run on a CPU with shared memory. But on a GPU with a separate memory addressing space it will fail hard.
This patch does not allocate or pass the pipe data properly. Neither does the other PIPE patch.
I commited the patch I submitted above.
This patch has typos and uses an unsafe fixed array size.
This patch has a memory leak.
ARBN patch with OpenCL changes
OpenCL code for ARBN primitive
OpenCL code for ARBN primitive
This primitive doesn't render properly either with the C backend or with the OpenCL backend.
OpenCL Patch for HYP primitive
Resolved bug: Failed to set OpenCL arguments
OpenCL code for HYP primitive
OpenCL code for HYP primitive
OpenCL code for HYP primitive
OpenCL code for HYP primitive
This patch has some bugs in the changes to primitive_util.c and hyp.c. Merged with #489.
OpenCL code for SUPERELL primitive
Commited.
Resolved bug: Failed to set OpenCL arguments
If for whatever reason some other command other than rt requires the depth data, then please apply the patch by Rishabh Suthar instead of the patch I supplied above.
Fix bug introduced with r71189 which removed output of depth buffer. The changes modified the C code but did not change the relevant OpenCL code called in rt.cl. The size of the arguments list between the C and OpenCL side does not match and this results in a crash.
Revert CMakeFile changes.
Use trunk X11 detection routine so includes are detected on modern distros.
Rebased opencl branch to r70379 trunk.
Remove outdated opencl branch.
OpenCL librt compilation errors (patch included)
Change typedefs from BSD UNIX types to ANSI C types.
Reko should use debug symbols
Add back structure padding, otherwise the solid struct fields might not be properly aligned.
Hmmm, I don't think we actually need the padding at the end of the struct. Maybe.
Pack EBM data into bitmap. Fits same data into 1/8th the memory. e.g. a 512x512 bitmap uses 32KB instead of 256KB RAM.
Revert bogus commit.
Eliminate common subexpression.
Refactor shot function.
Manually inlined auxiliary functions into shot kernel. Removed redundant variables.
EBM (Extruded Bitmap) OpenCL librt primitive.
Use proper bounds and rename comment.
Render scenes with no primitives in the viewport (background) properly. Remove unnecessary temporary variable.
Use macro to declare hit functions.
Port 'Heart' primitive to OpenCL librt. Clear memory buffers with clEnqueueFillBuffer instead of doing memory copies from host to device.
CSG boolean evaluation with OpenCL
OpenCL code to weave segments into partitions
Boolean evaluation of CSG in OpenCL
Ok, I read the patch, and made these changes: - renamed structs from clt_ to cl_ to fit the style of the existing declarations. - changed things like sizeof(cl_int) to sizeof(*array) to reduce the chance for errors with future code changes. The patch has been commited to trunk/. Also, trunk/ doesn't compile with my version of GCC. I got a compile error because of some variable being used without initialized properly here: Index: ../src/librt/primitives/annot/annot.c --- ../src/librt/primitives/annot/annot.c...
Fix previous broken commit (file contents were repeated twice).
Forgot this file in my last commit.
Add CSG boolean render support to OpenCL librt. Patch (#474) by Marco Domingues.
Remove unused code.
Fix materials in 'a_no_booleans' OpenCL librt render mode.
Add option to disable boolean weaving in OpenCL librt.
On Sun, Jul 30, 2017 at 7:19 PM, Sean Morrison brlcad@users.sf.net wrote: This is applied on the opencl branch yes? I can put it through some validation testing, unless there's a reason to hold off on it. All for eliminating the gotos spaghetti. No, it hasn't been applied yet. this should be the basis for a new bool_eval() implementation for OpenCL assuming this change works without bugs and does not impact performance in a negative way. We also have to remove the dynamic stack growth and make the...
https://en.wikipedia.org/wiki/Jump_threading https://gcc.gnu.org/onlinedocs/gcc-3.4.5/gcc/Optimize-Options.html i.e. -fthread-jumps on -O1
Eliminate gotos from bool_eval()
Add note to code to split 'struct hit' to conserve memory.
Cleanups.
Optimize regiontable construction. Patch by Marco Domingues.
Fix bugs in log function.
Use proper materials from regions. This fixes the materials selection issues.
Remove unused variables.
Use bool type instead of int for flip flag.
Use ternary selection operator ?: as shorthand for select().
Fix normals in inner regions. Patch by Marco Domingues.
patch #472 by Marco Domingues: faster iteration over sparse bitarrays. fix memory pointer address bugs. fix render with 'e *' command. use one regiontable per ray instead of one per partition.
Forgot to add this file on my last commit.
This has some nasty bugs when run over a GPU. Look at this: http://imgur.com/a/bgLK2 I'll commit it to the BRL-CAD opencl SVN branch nonetheless (this rendering mode is optional) so we can better keep track of it. But we need to fix these bugs. Please update your sources and develop from the opencl branch now.
You aren't indenting the code properly. You have to use indent with 4 spaces, not 8 space tabs. See the HACKING document for more details.
Fix some indentation and coding style issues.
You aren't indenting the code properly. You have to use indent with 4 spaces, not 8 space tabs. See the HACKING document for more details. On Tue, Jul 18, 2017 at 1:19 PM, Vasco Alexandre da Silva Costa vasco.costa@gmail.com wrote: This has some nasty bugs when run over a GPU. Look at this: http://imgur.com/a/bgLK2 I'll commit it to the BRL-CAD opencl SVN branch nonetheless (this rendering mode is optional) so we can better keep track of it. But we need to fix these bugs. On Mon, Jul 17, 2017 at...
Add OpenCL CSG operator patch #472 from Marco Domingues.
Added #417 RPN booleval patch.
The new OpenCL CMake script uses different env variable names so we need to update that.
Use OpenCL CMake script from: https://github.com/Kitware/CMake/blob/master/Modules/FindOpenCL.cmake
Rebased opencl branch to r69920 trunk.
OpenCL shot code for the RHC and RPC primitives
Patch applied to SVN.
apply sf patch #455 from Marco Domingues which ...
Updated the patch against SVN trunk r69006. Sped up 'bool_max_raynum' and 'bool_test_tree'...
Fix compilation error due to uninitialized vari...
OpenCL acceleration for PART primitive
apply sf patch #446 from Param Hanji which impl...
I refactored the patch a bit so the control flow looks more similar to the ANSI C...
Check all the code paths on a piece of paper. The execution traces on those branches...
Some comments. Instead of: + magsq_ov = ov.xov.x + ov.yov.y + ov.z*ov.z; this is...
add necessary functions for single precision mo...
OpenCL acceleration for ETO
apply sf patch #444 from Param Hanji which impl...
use Apple specific OpenCL path in MacOSX platform.
add missing file with EPA CL shot code.
store and load opencl source files from share d...
I tested your code here and it works as expected. So I applied the patch to SVN....