-
Notifications
You must be signed in to change notification settings - Fork 2
/
clstate.cpp
89 lines (78 loc) · 2.26 KB
/
clstate.cpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
#include "clstate.h"
#include "logging.hpp"
///kernel information and opencl stuff
void* cl::map(compute::buffer& v, cl_map_flags flag, int size)
{
void* ptr = clEnqueueMapBuffer(cl::cqueue, v.get(), CL_TRUE, flag, 0, size, 0, NULL, NULL, NULL);
if(ptr == nullptr)
{
lg::log("error in cl::map");
}
return ptr;
}
void cl::unmap(compute::buffer& v, void* ptr)
{
clEnqueueUnmapMemObject(cl::cqueue, v.get(), ptr, 0, NULL, NULL);
}
compute::device cl::device;
compute::command_queue cl::cqueue;
compute::command_queue cl::cqueue2;
compute::command_queue cl::cqueue_ooo;
compute::context cl::context;
compute::program cl::program;
std::map<std::string, kernel> cl::kernels;
kernel cl::kernel1;
kernel cl::kernel2;
kernel cl::kernel3;
kernel cl::prearrange;
kernel cl::prearrange_light;
kernel cl::kernel1_light;
kernel cl::tile_clear;
kernel cl::clear_screen_buffer;
kernel cl::kernel1_oculus;
kernel cl::kernel2_oculus;
kernel cl::kernel3_oculus;
kernel cl::prearrange_oculus;
kernel cl::cloth_simulate;
kernel cl::point_cloud_depth;
kernel cl::point_cloud_recover;
kernel cl::space_dust;
kernel cl::space_dust_no_tile;
kernel cl::draw_ui;
kernel cl::draw_hologram;
kernel cl::blit_with_id;
kernel cl::blit_clear;
kernel cl::clear_id_buf;
kernel cl::clear_screen_dbuf;
kernel cl::draw_voxel_octree;
kernel cl::create_distortion_offset;
kernel cl::draw_fancy_projectile;
kernel cl::reproject_depth;
kernel cl::reproject_screen;
kernel cl::space_nebulae;
kernel cl::edge_smoothing;
kernel cl::shadowmap_smoothing_x;
kernel cl::shadowmap_smoothing_y;
kernel cl::raytrace;
kernel cl::render_voxels;
kernel cl::render_voxels_tex;
kernel cl::render_voxel_cube;
kernel cl::diffuse_unstable;
kernel cl::diffuse_unstable_tex;
kernel cl::advect;
kernel cl::advect_tex;
kernel cl::post_upscale;
kernel cl::warp_oculus;
kernel cl::goo_diffuse;
kernel cl::goo_advect;
kernel cl::fluid_amount;
kernel cl::update_boundary;
kernel cl::fluid_initialise_mem;
kernel cl::fluid_initialise_mem_3d;
kernel cl::fluid_timestep;
kernel cl::fluid_timestep_3d;
kernel cl::displace_fluid;
kernel cl::process_skins;
kernel cl::draw_hermite_skin;
bool cl::program_built = false;
bool cl::any_built_requested = false;