Permalink
Browse files

moved rendering back to the main thread, avoiding excessive context s…

…witching

removed offscreen fbo used for rendering the current frame
  • Loading branch information...
inolen committed Jul 15, 2017
1 parent f0e44a2 commit 37bb1137b6a0a845165715d42c4a4358815c618f
Showing with 274 additions and 506 deletions.
  1. +5 −9 src/core/profiler.cc
  2. +1 −5 src/core/profiler.h
  3. +259 −324 src/emulator.c
  4. +1 −1 src/emulator.h
  5. +0 −5 src/host/host.h
  6. +1 −13 src/host/retro_host.c
  7. +2 −21 src/host/sdl_host.c
  8. +0 −110 src/render/gl_backend.c
  9. +1 −1 src/render/imgui.cc
  10. +1 −1 src/render/imgui.h
  11. +0 −13 src/render/render_backend.h
  12. +2 −2 src/tracer.c
  13. +1 −1 src/tracer.h
View
@@ -111,16 +111,9 @@ prof_token_t prof_get_aggregate_token(const char *name) {
#endif
}
void prof_flip() {
/* flip frame-based profile zones at the end of every frame */
#if ENABLE_MICROPROFILE
MicroProfileFlip();
#endif
}
void prof_update(int64_t now) {
/* update time-based aggregate counters every second */
void prof_flip(int64_t now) {
#if ENABLE_MICROPROFILE
/* update time-based aggregate counters every second */
int64_t next_aggregation = prof.last_aggregation + NS_PER_SEC;
if (now > next_aggregation) {
@@ -135,6 +128,9 @@ void prof_update(int64_t now) {
prof.last_aggregation = now;
}
/* flip frame-based profile zones at the end of every frame */
MicroProfileFlip();
#endif
}
View
@@ -47,10 +47,6 @@ int64_t prof_counter_load(prof_token_t tok);
void prof_counter_add(prof_token_t tok, int64_t count);
void prof_counter_set(prof_token_t tok, int64_t count);
/* called periodically to aggregate time-based aggregate counters */
void prof_update(int64_t now);
/* called at the end of every frame to aggregate frame-based profile zones */
void prof_flip();
void prof_flip(int64_t now);
#endif
Oops, something went wrong.

0 comments on commit 37bb113

Please sign in to comment.