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); HashMap::iterator it = m_hashMap.find(_hash);
if (it != m_hashMap.end() ) 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; return NULL;

View file

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

View file

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