This commit is contained in:
Branimir Karadžić 2015-08-14 19:32:36 -07:00
parent 92f9f1e098
commit 5bca3eca85
3 changed files with 8 additions and 2 deletions

View File

@ -225,7 +225,9 @@ namespace bgfx
HashMap::iterator it = m_hashMap.find(_hash);
if (it != m_hashMap.end() )
{
return &m_data[it->second].m_value;
uint16_t handle = it->second;
m_alloc.touch(handle);
return &m_data[handle].m_value;
}
return NULL;

View File

@ -1467,6 +1467,8 @@ namespace bgfx { namespace d3d12
void postReset()
{
memset(m_backBufferColorFence, 0, sizeof(m_backBufferColorFence) );
uint32_t rtvDescriptorSize = m_device->GetDescriptorHandleIncrementSize(D3D12_DESCRIPTOR_HEAP_TYPE_RTV);
for (uint32_t ii = 0, num = m_scd.BufferCount; ii < num; ++ii)

View File

@ -296,6 +296,7 @@ namespace bgfx { namespace d3d12
{
CommandQueue()
: m_control(BX_COUNTOF(m_commandList) )
, m_completedFence(0)
{
BX_STATIC_ASSERT(BX_COUNTOF(m_commandList) == BX_COUNTOF(m_release) );
}
@ -312,7 +313,8 @@ namespace bgfx { namespace d3d12
, (void**)&m_commandQueue
) );
m_currentFence = 0;
m_completedFence = 0;
m_currentFence = 0;
DX_CHECK(_device->CreateFence(0
, D3D12_FENCE_FLAG_NONE
, __uuidof(ID3D12Fence)