Skip to content

Commit

Permalink
remove console log
Browse files Browse the repository at this point in the history
  • Loading branch information
- committed Feb 16, 2023
1 parent 8f0aec0 commit e8b0655
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 21 deletions.
7 changes: 0 additions & 7 deletions .vscode/launch.json

This file was deleted.

Binary file removed a.out
Binary file not shown.
2 changes: 1 addition & 1 deletion frame_time_measurement.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ void GPU_timestamp_retrieve() {
//for (int i : zero_to(1000)) //this checks how expensive the query retrieval is, for the actual result. with 1000 times and Query deletion off, it starts to jitter. but at least it stays at 1 bar, so it's cheaper than the availability check
glGetQueryObjectui64v(query_circular_buffer[index_lagging_GPU_time_to_retrieve % frame_time_buffer_size], GL_QUERY_RESULT, &timestamp);
double new_time = (timestamp - frame_time_history[output_index % frame_time_buffer_size]) / pow(10, 9);
outc("new time", output_which, new_time, frame_time_single);
//outc("new time", output_which, new_time, frame_time_single);
switch (output_which) {
case 0:
render_time = new_time;
Expand Down
23 changes: 10 additions & 13 deletions render_vsync_demo.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -221,23 +221,20 @@ void main() {
triangles.move_and_render();

#if ANY_SYNC_SUPPORTED
if (busy_wait_for_exact_swap) {
uint64_t time_after_render = now();
if (time_after_render <= target_swap_time && wait_and_tear) {
//we have a wait operation. which means we must split the GPU measurement in two.
if (measure_GPU_time_spent)
GPU_timestamp_send(0);
if (busy_wait_for_exact_swap && wait_and_tear && now() <= target_swap_time) {
//we have a wait operation. which means we must split the GPU measurement in two.
if (measure_GPU_time_spent)
GPU_timestamp_send(0);

accurate_sleep_until(target_swap_time);
accurate_sleep_until(target_swap_time);

if (measure_GPU_time_spent)
GPU_timestamp_send();
if (measure_GPU_time_spent)
GPU_timestamp_send();

swap_now();
swap_now();

if (measure_GPU_time_spent) {
GPU_timestamp_send(1);
}
if (measure_GPU_time_spent) {
GPU_timestamp_send(1);
}
}
else
Expand Down

0 comments on commit e8b0655

Please sign in to comment.