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

@@ -3196,7 +3196,7 @@ namespace bgfx { namespace d3d9
DX_CHECK(device->SetRenderState(D3DRS_FILLMODE, _render->m_debug&BGFX_DEBUG_WIREFRAME ? D3DFILL_WIREFRAME : D3DFILL_SOLID) );
uint16_t programIdx = invalidHandle;
SortKey key;
uint8_t view = 0xff;
uint16_t view = UINT16_MAX;
FrameBufferHandle fbh = BGFX_INVALID_HANDLE;
uint32_t blendFactor = 0;
@@ -3542,15 +3542,15 @@ namespace bgfx { namespace d3d9
{
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)
{
m_textures[sampler.m_idx].commit(stage, sampler.m_un.m_draw.m_flags);
m_textures[bind.m_idx].commit(stage, bind.m_un.m_draw.m_flags);
}
else
{
@@ -3558,7 +3558,7 @@ namespace bgfx { namespace d3d9
}
}
current = sampler;
current = bind;
}
}