Check semaphore result after wait.

This commit is contained in:
bkaradzic 2013-09-01 14:02:12 -07:00
parent 01f25d87af
commit 2d1725ca96
2 changed files with 6 additions and 2 deletions

View file

@ -3091,7 +3091,8 @@ namespace bgfx
{
// BX_TRACE("game wait");
int64_t start = bx::getHPCounter();
m_gameSem.wait();
bool ok = m_gameSem.wait();
BX_CHECK(ok, "Semaphore wait failed."); BX_UNUSED(ok);
m_render->m_waitSubmit = bx::getHPCounter()-start;
}
@ -3105,7 +3106,8 @@ namespace bgfx
{
// BX_TRACE("render wait");
int64_t start = bx::getHPCounter();
m_renderSem.wait();
bool ok = m_renderSem.wait();
BX_CHECK(ok, "Semaphore wait failed."); BX_UNUSED(ok);
m_submit->m_waitRender = bx::getHPCounter() - start;
}

View file

@ -443,6 +443,7 @@ namespace bgfx
void update(uint32_t _offset, uint32_t _size, void* _data)
{
BX_CHECK(0 != m_id, "Updating invalid index buffer.");
GL_CHECK(glBindBuffer(GL_ELEMENT_ARRAY_BUFFER, m_id) );
GL_CHECK(glBufferSubData(GL_ELEMENT_ARRAY_BUFFER
, _offset
@ -484,6 +485,7 @@ namespace bgfx
void update(uint32_t _offset, uint32_t _size, void* _data)
{
BX_CHECK(0 != m_id, "Updating invalid vertex buffer.");
GL_CHECK(glBindBuffer(GL_ARRAY_BUFFER, m_id) );
GL_CHECK(glBufferSubData(GL_ARRAY_BUFFER
, _offset