mirror of
https://github.com/scratchfoundation/bgfx.git
synced 2024-12-02 20:36:50 -05:00
Check semaphore result after wait.
This commit is contained in:
parent
01f25d87af
commit
2d1725ca96
2 changed files with 6 additions and 2 deletions
|
@ -3091,7 +3091,8 @@ namespace bgfx
|
||||||
{
|
{
|
||||||
// BX_TRACE("game wait");
|
// BX_TRACE("game wait");
|
||||||
int64_t start = bx::getHPCounter();
|
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;
|
m_render->m_waitSubmit = bx::getHPCounter()-start;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -3105,7 +3106,8 @@ namespace bgfx
|
||||||
{
|
{
|
||||||
// BX_TRACE("render wait");
|
// BX_TRACE("render wait");
|
||||||
int64_t start = bx::getHPCounter();
|
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;
|
m_submit->m_waitRender = bx::getHPCounter() - start;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -443,6 +443,7 @@ namespace bgfx
|
||||||
|
|
||||||
void update(uint32_t _offset, uint32_t _size, void* _data)
|
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(glBindBuffer(GL_ELEMENT_ARRAY_BUFFER, m_id) );
|
||||||
GL_CHECK(glBufferSubData(GL_ELEMENT_ARRAY_BUFFER
|
GL_CHECK(glBufferSubData(GL_ELEMENT_ARRAY_BUFFER
|
||||||
, _offset
|
, _offset
|
||||||
|
@ -484,6 +485,7 @@ namespace bgfx
|
||||||
|
|
||||||
void update(uint32_t _offset, uint32_t _size, void* _data)
|
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(glBindBuffer(GL_ARRAY_BUFFER, m_id) );
|
||||||
GL_CHECK(glBufferSubData(GL_ARRAY_BUFFER
|
GL_CHECK(glBufferSubData(GL_ARRAY_BUFFER
|
||||||
, _offset
|
, _offset
|
||||||
|
|
Loading…
Reference in a new issue