Proof of concept: Compensate async decode() with busy wait in postSync()

This commit is contained in:
Erik Broberg
2016-09-04 03:53:21 -04:00
parent c837edae5b
commit 3cac5858be
2 changed files with 9 additions and 2 deletions
+7
View File
@@ -244,6 +244,10 @@ const std::string EXPECTED_SLAVE_LOG = (slavelog << PRE_SYNC << DECODE << POST_
#define LOG_BEGIN(x) minilog << (x).begin
#define LOG_END(x) minilog << (x).end
#define BUSY_WAIT_FOR(x) \
while (minilog.str().size() && minilog.str().back() != (x)) { \
std::this_thread::sleep_for(std::chrono::microseconds(10)); \
}\
void mainPreSyncFunc() {
LOG_BEGIN(PRE_SYNC);
@@ -253,6 +257,9 @@ void mainPreSyncFunc() {
}
void mainPostSyncPreDrawFunc() {
if (!sgct::Engine::instance()->isMaster()) {
BUSY_WAIT_FOR(DECODE.end);
}
LOG_BEGIN(POST_SYNC);
OsEng.postSynchronizationPreDraw();
LOG_END(POST_SYNC);
+2 -2
View File
@@ -9,11 +9,11 @@ return {
-- of all entities that will be visible during an instance of OpenSpace
--Scene = "${SCENE}/default.scene",
-- Scene = "${SCENE}/globebrowsing.scene",
Scene = "${SCENE}/globebrowsing.scene",
-- Scene = "${SCENE}/rosetta.scene",
-- Scene = "${SCENE}/dawn.scene",
-- Scene = "${SCENE}/newhorizons.scene",
Scene = "${SCENE}/osirisrex.scene",
--Scene = "${SCENE}/osirisrex.scene",
Paths = {
SGCT = "${BASE_PATH}/config/sgct",