[D3D12] Refactor root signature creation

This commit is contained in:
Triang3l
2018-08-25 23:37:11 +03:00
parent 110d4724f9
commit ff014d47d4
7 changed files with 118 additions and 194 deletions

View File

@@ -0,0 +1,37 @@
/**
******************************************************************************
* Xenia : Xbox 360 Emulator Research Project *
******************************************************************************
* Copyright 2018 Ben Vanik. All rights reserved. *
* Released under the BSD license - see LICENSE in the root for more details. *
******************************************************************************
*/
#ifndef XENIA_UI_D3D12_D3D12_UTIL_H_
#define XENIA_UI_D3D12_D3D12_UTIL_H_
#include "xenia/ui/d3d12/d3d12_provider.h"
namespace xe {
namespace ui {
namespace d3d12 {
namespace util {
inline bool ReleaseAndNull(IUnknown*& object) {
if (object != nullptr) {
object->Release();
object = nullptr;
return true;
}
return false;
};
ID3D12RootSignature* CreateRootSignature(ID3D12Device* device,
const D3D12_ROOT_SIGNATURE_DESC& desc);
} // namespace util
} // namespace d3d12
} // namespace ui
} // namespace xe
#endif // XENIA_UI_D3D12_D3D12_UTIL_H_