This commit is contained in:
Branimir Karadžić 2015-08-14 19:32:36 -07:00
parent 92f9f1e098
commit 06d7f17aee
3 changed files with 9 additions and 3 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)
@ -2847,7 +2849,7 @@ data.NumQualityLevels = 0;
{
ID3D12Resource* staging = createCommittedResource(s_renderD3D12->m_device, HeapProperty::Upload, _size);
uint8_t* data;
DX_CHECK(staging->Map(0, nullptr, (void**)&data) );
DX_CHECK(staging->Map(0, NULL, (void**)&data) );
memcpy(data, _data, _size);
staging->Unmap(0, NULL);

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)