discard flags

This commit is contained in:
Cedric Guillemet
2020-01-20 19:03:12 +01:00
committed by Бранимир Караџић
parent 8ec25d96c7
commit 4b83e0f5bc
17 changed files with 230 additions and 131 deletions

View File

@@ -6482,12 +6482,12 @@ BX_TRACE("%d, %d, %d, %s", _array, _srgb, _mipAutogen, getName(_format) );
_render->sort();
RenderDraw currentState;
currentState.clear();
currentState.clear(BGFX_STATE_DISCARD_ALL);
currentState.m_stateFlags = BGFX_STATE_NONE;
currentState.m_stencil = packStencil(BGFX_STENCIL_NONE, BGFX_STENCIL_NONE);
RenderBind currentBind;
currentBind.clear();
currentBind.clear(BGFX_STATE_DISCARD_ALL);
static ViewState viewState;
viewState.reset(_render);
@@ -6769,9 +6769,9 @@ BX_TRACE("%d, %d, %d, %s", _array, _srgb, _mipAutogen, getName(_format) );
{
if (resetState)
{
currentState.clear();
currentState.clear(BGFX_STATE_DISCARD_ALL);
currentState.m_scissor = !draw.m_scissor;
currentBind.clear();
currentBind.clear(BGFX_STATE_DISCARD_ALL);
}
continue;
@@ -6788,14 +6788,14 @@ BX_TRACE("%d, %d, %d, %s", _array, _srgb, _mipAutogen, getName(_format) );
if (resetState)
{
currentState.clear();
currentState.clear(BGFX_STATE_DISCARD_ALL);
currentState.m_scissor = !draw.m_scissor;
changedFlags = BGFX_STATE_MASK;
changedStencil = packStencil(BGFX_STENCIL_MASK, BGFX_STENCIL_MASK);
currentState.m_stateFlags = newFlags;
currentState.m_stencil = newStencil;
currentBind.clear();
currentBind.clear(BGFX_STATE_DISCARD_ALL);
}
uint16_t scissor = draw.m_scissor;