Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- __kernel
- void relauncher_generic(__global struct lightray* generic_rays_in, __global struct lightray* generic_rays_out,
- __global struct lightray* finished_rays,
- __global int* restrict generic_count_in, __global int* restrict generic_count_out,
- __global int* finished_count_out,
- int width, int height, int fallback)
- {
- ///failed to converge
- if(fallback > 125)
- return;
- if((*generic_count_in) == 0)
- return;
- if(fallback == 0)
- *finished_count_out = 0;
- *generic_count_out = 0;
- int generic_count = *generic_count_in;
- int loffset = 256;
- ///this all used to work fine
- /*clk_event_t f3;
- enqueue_kernel(get_default_queue(), CLK_ENQUEUE_FLAGS_NO_WAIT,
- ndrange_1D(0, generic_count, loffset),
- 0, NULL, &f3,
- ^{
- ///running this kernel directly from the host works fine
- do_generic_rays (generic_rays_in, generic_rays_out,
- finished_rays,
- generic_count_in, generic_count_out,
- finished_count_out);
- });
- enqueue_kernel(get_default_queue(), CLK_ENQUEUE_FLAGS_WAIT_KERNEL,
- ndrange_1D(0, 1, 1),
- 1, &f3, NULL,
- ^{
- relauncher_generic(generic_rays_out, generic_rays_in,
- finished_rays,
- generic_count_out, generic_count_in,
- finished_count_out, width, height, fallback + 1);
- });
- release_event(f3);*/
- ///this causes the clGetPipeInfo() crash
- enqueue_kernel(get_default_queue(), CLK_ENQUEUE_FLAGS_NO_WAIT,
- ndrange_1D(generic_count, loffset),
- ^{
- });
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement