Skip to content

Commit

Permalink
added data retrievals wait
Browse files Browse the repository at this point in the history
  • Loading branch information
101001000 committed Sep 13, 2023
1 parent 5039122 commit fd6e137
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/Managers.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -215,6 +215,7 @@ RenderingManager::RenderInfo RenderingManager::get_render_info() {
unsigned int sample_count = 0;

d_q.memcpy(&sample_count, dev_scene->dev_samples, 1 * sizeof(unsigned int));
d_q.wait();

RenderInfo render_info;
render_info.samples = sample_count;
Expand Down Expand Up @@ -285,6 +286,7 @@ float* RenderingManager::get_pass(std::string pass) {
float* pass_result = new float[rd.pars.width * rd.pars.height * 4];

d_q.memcpy(pass_result, dev_scene->dev_passes + n, rd.pars.width * rd.pars.height * 4 * sizeof(float));
d_q.wait();

LOG(debug) << "Pass retrieved!";

Expand Down

0 comments on commit fd6e137

Please sign in to comment.