From d45f5a8d794462bdc99a5dfddc82999999eb4bb6 Mon Sep 17 00:00:00 2001 From: Philip Rebohle Date: Tue, 15 Feb 2022 12:59:40 +0100 Subject: [PATCH] [d3d11] Handle subresource field in copy/move operations Derp. --- src/d3d11/d3d11_resource.h | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/d3d11/d3d11_resource.h b/src/d3d11/d3d11_resource.h index 8f0e4b6c..0fd29f48 100644 --- a/src/d3d11/d3d11_resource.h +++ b/src/d3d11/d3d11_resource.h @@ -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; }