From 14bfac3ebd67459f951c337c965d0d35308b8ad1 Mon Sep 17 00:00:00 2001 From: Triang3l Date: Thu, 19 Jul 2018 14:52:54 +0300 Subject: [PATCH] [D3D12] Rename D3D12Provider getters --- src/xenia/ui/d3d12/d3d12_context.cc | 8 ++++---- src/xenia/ui/d3d12/d3d12_provider.h | 16 +++++++--------- 2 files changed, 11 insertions(+), 13 deletions(-) diff --git a/src/xenia/ui/d3d12/d3d12_context.cc b/src/xenia/ui/d3d12/d3d12_context.cc index 4b79c635b..405c4b65d 100644 --- a/src/xenia/ui/d3d12/d3d12_context.cc +++ b/src/xenia/ui/d3d12/d3d12_context.cc @@ -25,9 +25,9 @@ D3D12Context::~D3D12Context() { Shutdown(); } bool D3D12Context::Initialize() { auto provider = static_cast(provider_); - auto dxgi_factory = provider->get_dxgi_factory(); - auto device = provider->get_device(); - auto direct_queue = provider->get_direct_queue(); + auto dxgi_factory = provider->GetDXGIFactory(); + auto device = provider->GetDevice(); + auto direct_queue = provider->GetDirectQueue(); context_lost_ = false; @@ -57,7 +57,7 @@ bool D3D12Context::Initialize() { swap_chain_desc.Flags = 0; IDXGISwapChain1* swap_chain_1; if (FAILED(dxgi_factory->CreateSwapChainForHwnd( - provider->get_direct_queue(), + provider->GetDirectQueue(), static_cast(target_window_->native_handle()), &swap_chain_desc, nullptr, nullptr, &swap_chain_1))) { XELOGE("Failed to create a DXGI swap chain"); diff --git a/src/xenia/ui/d3d12/d3d12_provider.h b/src/xenia/ui/d3d12/d3d12_provider.h index 38b5514e3..c98bb2d2a 100644 --- a/src/xenia/ui/d3d12/d3d12_provider.h +++ b/src/xenia/ui/d3d12/d3d12_provider.h @@ -29,16 +29,14 @@ class D3D12Provider : public GraphicsProvider { Window* target_window) override; std::unique_ptr CreateOffscreenContext() override; - IDXGIFactory2* get_dxgi_factory() const { return dxgi_factory_; } - ID3D12Device* get_device() const { return device_; } - ID3D12CommandQueue* get_direct_queue() const { return direct_queue_; } + IDXGIFactory2* GetDXGIFactory() const { return dxgi_factory_; } + ID3D12Device* GetDevice() const { return device_; } + ID3D12CommandQueue* GetDirectQueue() const { return direct_queue_; } - uint32_t get_descriptor_size_view() const { return descriptor_size_view_; } - uint32_t get_descriptor_size_sampler() const { - return descriptor_size_sampler_; - } - uint32_t get_descriptor_size_rtv() const { return descriptor_size_rtv_; } - uint32_t get_descriptor_size_dsv() const { return descriptor_size_dsv_; } + uint32_t GetDescriptorSizeView() const { return descriptor_size_view_; } + uint32_t GetDescriptorSizeSampler() const { return descriptor_size_sampler_; } + uint32_t GetDescriptorSizeRTV() const { return descriptor_size_rtv_; } + uint32_t GetDescriptorSizeDSV() const { return descriptor_size_dsv_; } private: explicit D3D12Provider(Window* main_window);