On Thu, Jun 16, 2016 at 12:31 PM, Param Hanji <param.catchch...@gmail.com>
wrote:
> Hi,
>
> I tried to call boolweave and boolfinal methods using segments generated
> on the GPU. I'm pretty sure the weaving process works fine, but boolfinal()
> not so much. It returns an empty partition for every pixel, which I
> confirmed using bu_log() statements.
>
> I'll attach some code. It'd be great if someone could figure out where I'm
> going wrong.
>
Well, looking at the code a couple of things stand out:
- you shouldn't use the CL_MEM_HOST_NO_ACCESS flag on the clCreateBuffer
for psegs now that you need to copy segment data back to the CPU (host).
- in copy_to_cpu if gpu_seg->seg_sti is zero the cpu_seg->seg_stp->st_id
will be uninitialized. worse. you are writing to an uninitialized pointer.
what I think you want to do is lookup the seg_stp pointer based on the
seg_sti id and use that to initialize the cpu->seg_stp pointer field.
- in copy_to_gpu you do not initialize gpu_seg->seg_sti.
You need to initialize the seg_sti (primitive id) field properly before
shade ops because this is used to compute normals, determine the shade
material, shade function, etc.
Regards,
--
Vasco Alexandre da Silva Costa
PhD in Computer Engineering (Computer Graphics)
Instituto Superior Técnico/University of Lisbon, Portugal
------------------------------------------------------------------------------
What NetFlow Analyzer can do for you? Monitors network bandwidth and traffic
patterns at an interface-level. Reveals which users, apps, and protocols are
consuming the most bandwidth. Provides multi-vendor support for NetFlow,
J-Flow, sFlow and other flows. Make informed decisions using capacity planning
reports. http://sdm.link/zohomanageengine
_______________________________________________
BRL-CAD Developer mailing list
brlcad-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/brlcad-devel