clray
diff src/rt.cc @ 29:353d80127627
doh ... it doesn't work
author | John Tsiombikas <nuclear@member.fsf.org> |
---|---|
date | Sat, 21 Aug 2010 20:51:57 +0100 |
parents | 97cfd9675310 |
children | 4cf4919c3812 |
line diff
1.1 --- a/src/rt.cc Sat Aug 21 03:42:49 2010 +0100 1.2 +++ b/src/rt.cc Sat Aug 21 20:51:57 2010 +0100 1.3 @@ -90,7 +90,6 @@ 1.4 fprintf(stderr, "failed to create kdtree buffer\n"); 1.5 return false; 1.6 } 1.7 - int num_kdnodes = scn->get_num_kdnodes(); 1.8 1.9 /* setup argument buffers */ 1.10 prog->set_arg_buffer(KARG_FRAMEBUFFER, ARG_WR, xsz * ysz * 4 * sizeof(float)); 1.11 @@ -101,7 +100,7 @@ 1.12 prog->set_arg_buffer(KARG_PRIM_RAYS, ARG_RD, xsz * ysz * sizeof *prim_rays, prim_rays); 1.13 prog->set_arg_buffer(KARG_XFORM, ARG_RD, 16 * sizeof(float)); 1.14 prog->set_arg_buffer(KARG_INVTRANS_XFORM, ARG_RD, 16 * sizeof(float)); 1.15 - prog->set_arg_buffer(KARG_KDTREE, ARG_RD, num_kdnodes * sizeof *kdbuf, kdbuf); 1.16 + prog->set_arg_buffer(KARG_KDTREE, ARG_RD, scn->get_kdtree_buffer_size(), kdbuf); 1.17 1.18 if(prog->get_num_args() < NUM_KERNEL_ARGS) { 1.19 return false;