[D3D12] Load D3D dynamically
This commit is contained in:
@@ -41,8 +41,8 @@ X_STATUS D3D12GraphicsSystem::Setup(cpu::Processor* processor,
|
||||
kernel::KernelState* kernel_state,
|
||||
ui::Window* target_window) {
|
||||
provider_ = xe::ui::d3d12::D3D12Provider::Create(target_window);
|
||||
auto device =
|
||||
static_cast<xe::ui::d3d12::D3D12Provider*>(provider())->GetDevice();
|
||||
auto d3d12_provider = static_cast<xe::ui::d3d12::D3D12Provider*>(provider());
|
||||
auto device = d3d12_provider->GetDevice();
|
||||
|
||||
auto result = GraphicsSystem::Setup(processor, kernel_state, target_window);
|
||||
if (result != X_STATUS_SUCCESS) {
|
||||
@@ -93,7 +93,7 @@ X_STATUS D3D12GraphicsSystem::Setup(cpu::Processor* processor,
|
||||
stretch_root_desc.Flags =
|
||||
D3D12_ROOT_SIGNATURE_FLAG_DENY_VERTEX_SHADER_ROOT_ACCESS;
|
||||
stretch_root_signature_ =
|
||||
ui::d3d12::util::CreateRootSignature(device, stretch_root_desc);
|
||||
ui::d3d12::util::CreateRootSignature(d3d12_provider, stretch_root_desc);
|
||||
if (stretch_root_signature_ == nullptr) {
|
||||
XELOGE("Failed to create the front buffer stretch root signature");
|
||||
return X_STATUS_UNSUCCESSFUL;
|
||||
@@ -120,7 +120,7 @@ X_STATUS D3D12GraphicsSystem::Setup(cpu::Processor* processor,
|
||||
stretch_root_desc.NumParameters = 3;
|
||||
stretch_root_desc.pParameters = stretch_root_parameters;
|
||||
stretch_gamma_root_signature_ =
|
||||
ui::d3d12::util::CreateRootSignature(device, stretch_root_desc);
|
||||
ui::d3d12::util::CreateRootSignature(d3d12_provider, stretch_root_desc);
|
||||
if (stretch_gamma_root_signature_ == nullptr) {
|
||||
XELOGE(
|
||||
"Failed to create the gamma-correcting front buffer stretch root "
|
||||
|
||||
Reference in New Issue
Block a user