Make D3D12RootSignature implement IRootSignature interface
This commit is contained in:
@@ -4,6 +4,7 @@
|
|||||||
#include <wrl/client.h>
|
#include <wrl/client.h>
|
||||||
|
|
||||||
#include "../Enums.h"
|
#include "../Enums.h"
|
||||||
|
#include "../DescriptorHeap.h"
|
||||||
#include "D3D12Enum.h"
|
#include "D3D12Enum.h"
|
||||||
|
|
||||||
using Microsoft::WRL::ComPtr;
|
using Microsoft::WRL::ComPtr;
|
||||||
@@ -11,7 +12,7 @@ using Microsoft::WRL::ComPtr;
|
|||||||
namespace XCEngine {
|
namespace XCEngine {
|
||||||
namespace RHI {
|
namespace RHI {
|
||||||
|
|
||||||
class D3D12RootSignature {
|
class D3D12RootSignature : public IRootSignature {
|
||||||
public:
|
public:
|
||||||
D3D12RootSignature();
|
D3D12RootSignature();
|
||||||
~D3D12RootSignature();
|
~D3D12RootSignature();
|
||||||
@@ -21,8 +22,12 @@ public:
|
|||||||
|
|
||||||
ID3D12RootSignature* GetRootSignature() const { return m_rootSignature.Get(); }
|
ID3D12RootSignature* GetRootSignature() const { return m_rootSignature.Get(); }
|
||||||
|
|
||||||
|
void* GetNativeHandle() const override { return m_rootSignature.Get(); }
|
||||||
|
uint32_t GetParameterCount() const override { return m_parameterCount; }
|
||||||
|
|
||||||
private:
|
private:
|
||||||
ComPtr<ID3D12RootSignature> m_rootSignature;
|
ComPtr<ID3D12RootSignature> m_rootSignature;
|
||||||
|
uint32_t m_parameterCount = 0;
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace RHI
|
} // namespace RHI
|
||||||
|
|||||||
@@ -30,6 +30,8 @@ bool D3D12RootSignature::Initialize(ID3D12Device* device, const D3D12_ROOT_SIGNA
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
m_parameterCount = desc.NumParameters;
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user