Cleanup.
This commit is contained in:
Родитель
b9f9ec56f5
Коммит
e5a983d25a
|
@ -1894,6 +1894,7 @@ BX_PRAGMA_DIAGNOSTIC_POP();
|
|||
bx::dlclose(m_d3d11dll);
|
||||
m_d3d11dll = NULL;
|
||||
BX_FALLTHROUGH;
|
||||
|
||||
#endif // USE_D3D11_DYNAMIC_LIB
|
||||
|
||||
case ErrorState::Default:
|
||||
|
|
|
@ -1449,21 +1449,26 @@ namespace bgfx { namespace d3d12
|
|||
case ErrorState::CreatedCommandQueue:
|
||||
m_cmd.shutdown();
|
||||
BX_FALLTHROUGH;
|
||||
|
||||
case ErrorState::CreatedDXGIFactory:
|
||||
DX_RELEASE(m_device, 0);
|
||||
DX_RELEASE(m_adapter, 0);
|
||||
DX_RELEASE(m_factory, 0);
|
||||
BX_FALLTHROUGH;
|
||||
|
||||
#if USE_D3D12_DYNAMIC_LIB
|
||||
case ErrorState::LoadedDXGI:
|
||||
bx::dlclose(m_dxgidll);
|
||||
BX_FALLTHROUGH;
|
||||
|
||||
case ErrorState::LoadedD3D12:
|
||||
bx::dlclose(m_d3d12dll);
|
||||
BX_FALLTHROUGH;
|
||||
|
||||
case ErrorState::LoadedKernel32:
|
||||
bx::dlclose(m_kernel32dll);
|
||||
BX_FALLTHROUGH;
|
||||
|
||||
#endif // USE_D3D12_DYNAMIC_LIB
|
||||
case ErrorState::Default:
|
||||
default:
|
||||
|
|
|
@ -240,8 +240,7 @@ namespace bgfx { namespace d3d9
|
|||
|
||||
switch (m_type)
|
||||
{
|
||||
case 0: DX_RELEASE(m_vertexShader, 0);
|
||||
BX_FALLTHROUGH;
|
||||
case 0: DX_RELEASE(m_vertexShader, 0); BX_FALLTHROUGH;
|
||||
default: DX_RELEASE(m_pixelShader, 0);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1912,6 +1912,8 @@ namespace bgfx
|
|||
bx::MemoryBlock mb(g_allocator);
|
||||
bx::MemoryWriter writer(&mb);
|
||||
|
||||
int32_t total = 0;
|
||||
|
||||
for (uint32_t token = 0, numTokens = uint32_t(_src.byteCode.size() / sizeof(uint32_t) ); token < numTokens;)
|
||||
{
|
||||
DxbcInstruction instruction;
|
||||
|
@ -1920,15 +1922,14 @@ namespace bgfx
|
|||
|
||||
_fn(instruction, _userData);
|
||||
|
||||
write(&writer, instruction, _err);
|
||||
total += write(&writer, instruction, _err);
|
||||
|
||||
token += instruction.length;
|
||||
}
|
||||
|
||||
uint8_t* data = (uint8_t*)mb.more();
|
||||
uint32_t size = uint32_t(bx::getSize(&writer) );
|
||||
_dst.byteCode.reserve(size);
|
||||
bx::memCopy(_dst.byteCode.data(), data, size);
|
||||
_dst.byteCode.resize(total);
|
||||
bx::memCopy(_dst.byteCode.data(), data, total);
|
||||
}
|
||||
|
||||
} // namespace bgfx
|
||||
|
|
Загрузка…
Ссылка в новой задаче