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:
parent
0364a79eb0
commit
2dcdd20517
@ -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);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -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);
|
||||||
|
Loading…
Reference in New Issue
Block a user