1
0
mirror of https://github.com/doitsujin/dxvk.git synced 2025-03-01 10:54:14 +01:00

[d3d11] Wire up D3D11VkInteropSurface to D3D11Texture*D classes

This commit is contained in:
Philip Rebohle 2018-04-20 11:12:54 +02:00
parent 81a0fa4805
commit 1ed1c43431
No known key found for this signature in database
GPG Key ID: C8CC613427A31C99
2 changed files with 30 additions and 9 deletions

View File

@ -285,7 +285,7 @@ namespace dxvk {
D3D11VkInteropSurface::D3D11VkInteropSurface( D3D11VkInteropSurface::D3D11VkInteropSurface(
IDXGIObject* pContainer, ID3D11DeviceChild* pContainer,
D3D11CommonTexture* pTexture) D3D11CommonTexture* pTexture)
: m_container (pContainer), : m_container (pContainer),
m_texture (pTexture) { m_texture (pTexture) {
@ -357,7 +357,8 @@ namespace dxvk {
D3D11Texture1D::D3D11Texture1D( D3D11Texture1D::D3D11Texture1D(
D3D11Device* pDevice, D3D11Device* pDevice,
const D3D11_COMMON_TEXTURE_DESC* pDesc) const D3D11_COMMON_TEXTURE_DESC* pDesc)
: m_texture(pDevice, pDesc, D3D11_RESOURCE_DIMENSION_TEXTURE1D) { : m_texture(pDevice, pDesc, D3D11_RESOURCE_DIMENSION_TEXTURE1D),
m_interop(this, &m_texture) {
} }
@ -378,6 +379,11 @@ namespace dxvk {
return S_OK; return S_OK;
} }
if (riid == __uuidof(IDXGIVkInteropSurface)) {
*ppvObject = ref(&m_interop);
return S_OK;
}
Logger::warn("D3D11Texture1D::QueryInterface: Unknown interface query"); Logger::warn("D3D11Texture1D::QueryInterface: Unknown interface query");
Logger::warn(str::format(riid)); Logger::warn(str::format(riid));
return E_NOINTERFACE; return E_NOINTERFACE;
@ -422,7 +428,8 @@ namespace dxvk {
D3D11Texture2D::D3D11Texture2D( D3D11Texture2D::D3D11Texture2D(
D3D11Device* pDevice, D3D11Device* pDevice,
const D3D11_COMMON_TEXTURE_DESC* pDesc) const D3D11_COMMON_TEXTURE_DESC* pDesc)
: m_texture(pDevice, pDesc, D3D11_RESOURCE_DIMENSION_TEXTURE2D) { : m_texture(pDevice, pDesc, D3D11_RESOURCE_DIMENSION_TEXTURE2D),
m_interop(this, &m_texture) {
} }
@ -443,6 +450,11 @@ namespace dxvk {
return S_OK; return S_OK;
} }
if (riid == __uuidof(IDXGIVkInteropSurface)) {
*ppvObject = ref(&m_interop);
return S_OK;
}
Logger::warn("D3D11Texture2D::QueryInterface: Unknown interface query"); Logger::warn("D3D11Texture2D::QueryInterface: Unknown interface query");
Logger::warn(str::format(riid)); Logger::warn(str::format(riid));
return E_NOINTERFACE; return E_NOINTERFACE;
@ -489,7 +501,8 @@ namespace dxvk {
D3D11Texture3D::D3D11Texture3D( D3D11Texture3D::D3D11Texture3D(
D3D11Device* pDevice, D3D11Device* pDevice,
const D3D11_COMMON_TEXTURE_DESC* pDesc) const D3D11_COMMON_TEXTURE_DESC* pDesc)
: m_texture(pDevice, pDesc, D3D11_RESOURCE_DIMENSION_TEXTURE3D) { : m_texture(pDevice, pDesc, D3D11_RESOURCE_DIMENSION_TEXTURE3D),
m_interop(this, &m_texture) {
} }
@ -510,6 +523,11 @@ namespace dxvk {
return S_OK; return S_OK;
} }
if (riid == __uuidof(IDXGIVkInteropSurface)) {
*ppvObject = ref(&m_interop);
return S_OK;
}
Logger::warn("D3D11Texture3D::QueryInterface: Unknown interface query"); Logger::warn("D3D11Texture3D::QueryInterface: Unknown interface query");
Logger::warn(str::format(riid)); Logger::warn(str::format(riid));
return E_NOINTERFACE; return E_NOINTERFACE;

View File

@ -201,7 +201,7 @@ namespace dxvk {
public: public:
D3D11VkInteropSurface( D3D11VkInteropSurface(
IDXGIObject* pContainer, ID3D11DeviceChild* pContainer,
D3D11CommonTexture* pTexture); D3D11CommonTexture* pTexture);
~D3D11VkInteropSurface(); ~D3D11VkInteropSurface();
@ -221,7 +221,7 @@ namespace dxvk {
private: private:
IDXGIObject* m_container; ID3D11DeviceChild* m_container;
D3D11CommonTexture* m_texture; D3D11CommonTexture* m_texture;
}; };
@ -263,6 +263,7 @@ namespace dxvk {
private: private:
D3D11CommonTexture m_texture; D3D11CommonTexture m_texture;
D3D11VkInteropSurface m_interop;
}; };
@ -303,6 +304,7 @@ namespace dxvk {
private: private:
D3D11CommonTexture m_texture; D3D11CommonTexture m_texture;
D3D11VkInteropSurface m_interop;
}; };
@ -343,6 +345,7 @@ namespace dxvk {
private: private:
D3D11CommonTexture m_texture; D3D11CommonTexture m_texture;
D3D11VkInteropSurface m_interop;
}; };