>
> Also the GPU side seg_sti doesn't have the same meaning at all. It's a
> unique solid id. In the soltabs list. So '0' would be the first valid solid
> in the soltabs list. So your code should work like this:
>
> unsigned int i=0;
>     RT_VISIT_ALL_SOLTABS_START(stp, a->a_rt_i) {
>         /* Ignore "dead" solids in the list.  (They failed prep) */
>         if (stp->st_aradius <= 0) continue;
>         /* Infinite solids make the BVH construction explode. */
>         if (stp->st_aradius >= INFINITY) continue;
>
>         if (i == gpu_seg->seg_sti) {
>             cpu_seg->seg_stp = stp;
>             break;
>         }
>         i++;
>     } RT_VISIT_ALL_SOLTABS_END
>
>
> Yup, this worked! Just one more thing, how do I perform the reverse of
this i.e. how do I set seg_sti of the GPU segment given the CPU storage's
stp pointer?

I believe this is the last missing piece. If even this doesn't work, I'll
have define and use partitions on the GPU, only segments just won't cut it.

>
> --
> Vasco Alexandre da Silva Costa
> PhD in Computer Engineering (Computer Graphics)
> Instituto Superior Técnico/University of Lisbon, Portugal
>
> ------------------------------------------------------------------------------
> Attend Shape: An AT&T Tech Expo July 15-16. Meet us at AT&T Park in San
> Francisco, CA to explore cutting-edge tech and listen to tech luminaries
> present their vision of the future. This family event has something for
> everyone, including kids. Get more information and register today.
> http://sdm.link/attshape_______________________________________________
> BRL-CAD Developer mailing list
> brlcad-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/brlcad-devel
>
------------------------------------------------------------------------------
Attend Shape: An AT&T Tech Expo July 15-16. Meet us at AT&T Park in San
Francisco, CA to explore cutting-edge tech and listen to tech luminaries
present their vision of the future. This family event has something for
everyone, including kids. Get more information and register today.
http://sdm.link/attshape
_______________________________________________
BRL-CAD Developer mailing list
brlcad-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/brlcad-devel

Reply via email to