1
0
mirror of https://github.com/doitsujin/dxvk.git synced 2024-12-05 01:24:14 +01:00

[d3d11] Handle subresource field in copy/move operations

Derp.
This commit is contained in:
Philip Rebohle 2022-02-15 12:59:40 +01:00
parent e70f9f92a6
commit d45f5a8d79
No known key found for this signature in database
GPG Key ID: C8CC613427A31C99

View File

@ -188,13 +188,14 @@ namespace dxvk {
}
D3D11ResourceRef(D3D11ResourceRef&& other)
: m_type(other.m_type), m_resource(other.m_resource) {
: m_type(other.m_type), m_subresource(other.m_subresource), m_resource(other.m_resource) {
other.m_type = D3D11_RESOURCE_DIMENSION_UNKNOWN;
other.m_subresource = 0;
other.m_resource = nullptr;
}
D3D11ResourceRef(const D3D11ResourceRef& other)
: m_type(other.m_type), m_resource(other.m_resource) {
: m_type(other.m_type), m_subresource(other.m_subresource), m_resource(other.m_resource) {
if (m_resource)
ResourceAddRefPrivate(m_resource, m_type);
}
@ -209,9 +210,11 @@ namespace dxvk {
ResourceReleasePrivate(m_resource, m_type);
m_type = other.m_type;
m_subresource = other.m_subresource;
m_resource = other.m_resource;
other.m_type = D3D11_RESOURCE_DIMENSION_UNKNOWN;
other.m_subresource = 0;
other.m_resource = nullptr;
return *this;
}
@ -224,6 +227,7 @@ namespace dxvk {
ResourceReleasePrivate(m_resource, m_type);
m_type = other.m_type;
m_subresource = other.m_subresource;
m_resource = other.m_resource;
return *this;
}