Wayverb
program.h
1 #pragma once
2 
3 #include "raytracer/cl/structs.h"
4 
5 #include "core/program_wrapper.h"
6 #include "core/spatial_division/scene_buffers.h"
7 
8 namespace wayverb {
9 namespace raytracer {
10 
11 class program final {
12 public:
13  program(const core::compute_context& cc);
14 
15  auto get_kernel() const {
16  return program_wrapper_.get_kernel<cl::Buffer, // ray
17  cl_float3, // receiver
18  cl::Buffer, // voxel_index
19  core::aabb, // global_aabb
20  cl_uint, // side
21  cl::Buffer, // triangles
22  cl::Buffer, // vertices
23  cl::Buffer, // surfaces
24  cl::Buffer, // rng
25  cl::Buffer // reflection
26  >("reflections");
27  }
28 
29  auto get_init_reflections_kernel() const {
30  return program_wrapper_.get_kernel<cl::Buffer>("init_reflections");
31  }
32 
33  template <cl_program_info T>
34  auto get_info() const {
35  return program_wrapper_.template get_info<T>();
36  }
37 
38  cl::Device get_device() const { return program_wrapper_.get_device(); }
39 
40 private:
41  core::program_wrapper program_wrapper_;
42 };
43 
44 } // namespace raytracer
45 } // namespace wayverb
Definition: voxel_structs.h:9
Definition: program_wrapper.h:8
Definition: pressure.h:22
Definition: capsule_base.h:9
invariant: device is a valid device for the context
Definition: common.h:13
Definition: program.h:11