1
0
mirror of https://github.com/doitsujin/dxvk.git synced 2024-12-13 16:08:50 +01:00

[d3d11] Change D3D11ResourceRef constructor to be more useful

This commit is contained in:
Philip Rebohle 2022-02-10 14:23:24 +01:00
parent 0364a79eb0
commit 2dcdd20517
No known key found for this signature in database
GPG Key ID: C8CC613427A31C99
2 changed files with 6 additions and 6 deletions

View File

@ -88,7 +88,7 @@ namespace dxvk {
ID3D11Resource* pResource, ID3D11Resource* pResource,
D3D11_RESOURCE_DIMENSION ResourceType, D3D11_RESOURCE_DIMENSION ResourceType,
UINT Subresource) { UINT Subresource) {
m_resources.emplace_back(pResource, ResourceType, Subresource); m_resources.emplace_back(pResource, Subresource, ResourceType);
} }

View File

@ -170,18 +170,18 @@ namespace dxvk {
m_subresource(0), m_resource(nullptr) { } m_subresource(0), m_resource(nullptr) { }
D3D11ResourceRef(ID3D11Resource* pResource) D3D11ResourceRef(ID3D11Resource* pResource)
: D3D11ResourceRef(pResource, 0) { }
D3D11ResourceRef(ID3D11Resource* pResource, UINT Subresource)
: m_type(D3D11_RESOURCE_DIMENSION_UNKNOWN), : m_type(D3D11_RESOURCE_DIMENSION_UNKNOWN),
m_subresource(0), m_resource(pResource) { m_subresource(Subresource), m_resource(pResource) {
if (m_resource) { if (m_resource) {
m_resource->GetType(&m_type); m_resource->GetType(&m_type);
ResourceAddRefPrivate(m_resource, m_type); ResourceAddRefPrivate(m_resource, m_type);
} }
} }
D3D11ResourceRef(ID3D11Resource* pResource, D3D11_RESOURCE_DIMENSION Type) D3D11ResourceRef(ID3D11Resource* pResource, UINT Subresource, D3D11_RESOURCE_DIMENSION Type)
: D3D11ResourceRef(pResource, Type, 0) { }
D3D11ResourceRef(ID3D11Resource* pResource, D3D11_RESOURCE_DIMENSION Type, UINT Subresource)
: m_type(Type), m_subresource(Subresource), m_resource(pResource) { : m_type(Type), m_subresource(Subresource), m_resource(pResource) {
if (m_resource) if (m_resource)
ResourceAddRefPrivate(m_resource, m_type); ResourceAddRefPrivate(m_resource, m_type);