mirror of
https://github.com/doitsujin/dxvk.git
synced 2025-01-31 14:52:11 +01:00
[d3d11] Store ID3D11Resource interface in D3D11CommonTexture
Going full circle here, but it's actually useful now.
This commit is contained in:
parent
9c32beccdc
commit
d870b6ff38
@ -5,12 +5,13 @@
|
||||
namespace dxvk {
|
||||
|
||||
D3D11CommonTexture::D3D11CommonTexture(
|
||||
ID3D11Resource* pInterface,
|
||||
D3D11Device* pDevice,
|
||||
const D3D11_COMMON_TEXTURE_DESC* pDesc,
|
||||
D3D11_RESOURCE_DIMENSION Dimension,
|
||||
DXGI_USAGE DxgiUsage,
|
||||
VkImage vkImage)
|
||||
: m_device(pDevice), m_dimension(Dimension), m_desc(*pDesc), m_dxgiUsage(DxgiUsage) {
|
||||
: m_interface(pInterface), m_device(pDevice), m_dimension(Dimension), m_desc(*pDesc), m_dxgiUsage(DxgiUsage) {
|
||||
DXGI_VK_FORMAT_MODE formatMode = GetFormatMode();
|
||||
DXGI_VK_FORMAT_INFO formatInfo = m_device->LookupFormat(m_desc.Format, formatMode);
|
||||
DXGI_VK_FORMAT_FAMILY formatFamily = m_device->LookupFamily(m_desc.Format, formatMode);
|
||||
@ -910,7 +911,7 @@ namespace dxvk {
|
||||
D3D11Device* pDevice,
|
||||
const D3D11_COMMON_TEXTURE_DESC* pDesc)
|
||||
: D3D11DeviceChild<ID3D11Texture1D>(pDevice),
|
||||
m_texture (pDevice, pDesc, D3D11_RESOURCE_DIMENSION_TEXTURE1D, 0, VK_NULL_HANDLE),
|
||||
m_texture (this, pDevice, pDesc, D3D11_RESOURCE_DIMENSION_TEXTURE1D, 0, VK_NULL_HANDLE),
|
||||
m_interop (this, &m_texture),
|
||||
m_surface (this, &m_texture),
|
||||
m_resource(this),
|
||||
@ -1008,7 +1009,7 @@ namespace dxvk {
|
||||
D3D11Device* pDevice,
|
||||
const D3D11_COMMON_TEXTURE_DESC* pDesc)
|
||||
: D3D11DeviceChild<ID3D11Texture2D1>(pDevice),
|
||||
m_texture (pDevice, pDesc, D3D11_RESOURCE_DIMENSION_TEXTURE2D, 0, VK_NULL_HANDLE),
|
||||
m_texture (this, pDevice, pDesc, D3D11_RESOURCE_DIMENSION_TEXTURE2D, 0, VK_NULL_HANDLE),
|
||||
m_interop (this, &m_texture),
|
||||
m_surface (this, &m_texture),
|
||||
m_resource(this),
|
||||
@ -1023,7 +1024,7 @@ namespace dxvk {
|
||||
DXGI_USAGE DxgiUsage,
|
||||
VkImage vkImage)
|
||||
: D3D11DeviceChild<ID3D11Texture2D1>(pDevice),
|
||||
m_texture (pDevice, pDesc, D3D11_RESOURCE_DIMENSION_TEXTURE2D, DxgiUsage, vkImage),
|
||||
m_texture (this, pDevice, pDesc, D3D11_RESOURCE_DIMENSION_TEXTURE2D, DxgiUsage, vkImage),
|
||||
m_interop (this, &m_texture),
|
||||
m_surface (this, &m_texture),
|
||||
m_resource(this),
|
||||
@ -1139,7 +1140,7 @@ namespace dxvk {
|
||||
D3D11Device* pDevice,
|
||||
const D3D11_COMMON_TEXTURE_DESC* pDesc)
|
||||
: D3D11DeviceChild<ID3D11Texture3D1>(pDevice),
|
||||
m_texture (pDevice, pDesc, D3D11_RESOURCE_DIMENSION_TEXTURE3D, 0, VK_NULL_HANDLE),
|
||||
m_texture (this, pDevice, pDesc, D3D11_RESOURCE_DIMENSION_TEXTURE3D, 0, VK_NULL_HANDLE),
|
||||
m_interop (this, &m_texture),
|
||||
m_resource(this),
|
||||
m_d3d10 (this) {
|
||||
|
@ -72,6 +72,7 @@ namespace dxvk {
|
||||
public:
|
||||
|
||||
D3D11CommonTexture(
|
||||
ID3D11Resource* pInterface,
|
||||
D3D11Device* pDevice,
|
||||
const D3D11_COMMON_TEXTURE_DESC* pDesc,
|
||||
D3D11_RESOURCE_DIMENSION Dimension,
|
||||
@ -80,6 +81,14 @@ namespace dxvk {
|
||||
|
||||
~D3D11CommonTexture();
|
||||
|
||||
/**
|
||||
* \brief Retrieves resource interface
|
||||
* \returns Resource interface
|
||||
*/
|
||||
ID3D11Resource* GetInterface() const {
|
||||
return m_interface;
|
||||
}
|
||||
|
||||
/**
|
||||
* \brief Texture properties
|
||||
*
|
||||
@ -310,7 +319,8 @@ namespace dxvk {
|
||||
DxvkBufferSliceHandle slice;
|
||||
};
|
||||
|
||||
D3D11Device* const m_device;
|
||||
ID3D11Resource* m_interface;
|
||||
D3D11Device* m_device;
|
||||
D3D11_RESOURCE_DIMENSION m_dimension;
|
||||
D3D11_COMMON_TEXTURE_DESC m_desc;
|
||||
D3D11_COMMON_TEXTURE_MAP_MODE m_mapMode;
|
||||
|
Loading…
x
Reference in New Issue
Block a user