This commit is contained in:
Branimir Karadžić
2015-08-28 20:34:14 -07:00
parent 444384469d
commit bb89e6291c
7 changed files with 41 additions and 39 deletions

View File

@@ -4217,7 +4217,7 @@ BX_PRAGMA_DIAGNOSTIC_POP();
uint16_t programIdx = invalidHandle;
SortKey key;
uint8_t view = 0xff;
uint16_t view = UINT16_MAX;
FrameBufferHandle fbh = BGFX_INVALID_HANDLE;
const uint64_t primType = _render->m_debug&BGFX_DEBUG_WIREFRAME ? BGFX_STATE_PT_LINES : 0;
@@ -4269,7 +4269,7 @@ BX_PRAGMA_DIAGNOSTIC_POP();
restartState = 2;
item = restartItem;
restartItem = numItems;
view = 0xff;
view = UINT16_MAX;
continue;
}
@@ -4708,16 +4708,16 @@ BX_PRAGMA_DIAGNOSTIC_POP();
uint32_t changes = 0;
for (uint8_t stage = 0; stage < BGFX_CONFIG_MAX_TEXTURE_SAMPLERS; ++stage)
{
const Binding& sampler = draw.m_bind[stage];
const Binding& bind = draw.m_bind[stage];
Binding& current = currentState.m_bind[stage];
if (current.m_idx != sampler.m_idx
|| current.m_un.m_draw.m_flags != sampler.m_un.m_draw.m_flags
if (current.m_idx != bind.m_idx
|| current.m_un.m_draw.m_flags != bind.m_un.m_draw.m_flags
|| programChanged)
{
if (invalidHandle != sampler.m_idx)
if (invalidHandle != bind.m_idx)
{
TextureD3D11& texture = m_textures[sampler.m_idx];
texture.commit(stage, sampler.m_un.m_draw.m_flags);
TextureD3D11& texture = m_textures[bind.m_idx];
texture.commit(stage, bind.m_un.m_draw.m_flags);
}
else
{
@@ -4728,7 +4728,7 @@ BX_PRAGMA_DIAGNOSTIC_POP();
++changes;
}
current = sampler;
current = bind;
}
if (0 < changes)