mirror of
https://github.com/doitsujin/dxvk.git
synced 2025-02-20 19:54:19 +01:00
[d3d11] Remove some unnecessary type casts in interop code
This commit is contained in:
parent
92f3648efa
commit
f638689b2a
@ -9,8 +9,8 @@
|
||||
namespace dxvk {
|
||||
|
||||
D3D11VkInterop::D3D11VkInterop(
|
||||
IDXGIObject* pContainer,
|
||||
ID3D11Device* pDevice)
|
||||
IDXGIObject* pContainer,
|
||||
D3D11Device* pDevice)
|
||||
: m_container (pContainer),
|
||||
m_device (pDevice) { }
|
||||
|
||||
@ -31,8 +31,8 @@ namespace dxvk {
|
||||
|
||||
|
||||
HRESULT STDMETHODCALLTYPE D3D11VkInterop::QueryInterface(
|
||||
REFIID riid,
|
||||
void** ppvObject) {
|
||||
REFIID riid,
|
||||
void** ppvObject) {
|
||||
return m_container->QueryInterface(riid, ppvObject);
|
||||
}
|
||||
|
||||
@ -41,7 +41,7 @@ namespace dxvk {
|
||||
VkInstance* pInstance,
|
||||
VkPhysicalDevice* pPhysDev,
|
||||
VkDevice* pDevice) {
|
||||
auto device = static_cast<D3D11Device*>(m_device)->GetDXVKDevice();
|
||||
auto device = m_device->GetDXVKDevice();
|
||||
auto adapter = device->adapter();
|
||||
auto instance = adapter->instance();
|
||||
|
||||
@ -96,12 +96,12 @@ namespace dxvk {
|
||||
|
||||
|
||||
void STDMETHODCALLTYPE D3D11VkInterop::LockSubmissionQueue() {
|
||||
static_cast<D3D11Device*>(m_device)->GetDXVKDevice()->lockSubmission();
|
||||
m_device->GetDXVKDevice()->lockSubmission();
|
||||
}
|
||||
|
||||
|
||||
void STDMETHODCALLTYPE D3D11VkInterop::ReleaseSubmissionQueue() {
|
||||
static_cast<D3D11Device*>(m_device)->GetDXVKDevice()->unlockSubmission();
|
||||
m_device->GetDXVKDevice()->unlockSubmission();
|
||||
}
|
||||
|
||||
}
|
@ -5,14 +5,17 @@
|
||||
#include "d3d11_include.h"
|
||||
|
||||
namespace dxvk {
|
||||
|
||||
class D3D11Device;
|
||||
|
||||
class D3D11VkInterop : public ComObject<IDXGIVkInteropDevice> {
|
||||
|
||||
public:
|
||||
|
||||
D3D11VkInterop(
|
||||
IDXGIObject* pContainer,
|
||||
ID3D11Device* pDevice);
|
||||
IDXGIObject* pContainer,
|
||||
D3D11Device* pDevice);
|
||||
|
||||
~D3D11VkInterop();
|
||||
|
||||
ULONG STDMETHODCALLTYPE AddRef();
|
||||
@ -20,8 +23,8 @@ namespace dxvk {
|
||||
ULONG STDMETHODCALLTYPE Release();
|
||||
|
||||
HRESULT STDMETHODCALLTYPE QueryInterface(
|
||||
REFIID riid,
|
||||
void** ppvObject);
|
||||
REFIID riid,
|
||||
void** ppvObject);
|
||||
|
||||
void STDMETHODCALLTYPE GetVulkanHandles(
|
||||
VkInstance* pInstance,
|
||||
@ -46,8 +49,8 @@ namespace dxvk {
|
||||
|
||||
private:
|
||||
|
||||
IDXGIObject* m_container;
|
||||
ID3D11Device* m_device;
|
||||
IDXGIObject* m_container;
|
||||
D3D11Device* m_device;
|
||||
|
||||
};
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user