diff --git a/Source/Core/VideoBackends/D3D/D3DTexture.cpp b/Source/Core/VideoBackends/D3D/D3DTexture.cpp index abafce3e90..6ca2247a47 100644 --- a/Source/Core/VideoBackends/D3D/D3DTexture.cpp +++ b/Source/Core/VideoBackends/D3D/D3DTexture.cpp @@ -74,7 +74,7 @@ ID3D11DepthStencilView*& D3DTexture2D::GetDSV() D3DTexture2D::D3DTexture2D(ID3D11Texture2D* texptr, D3D11_BIND_FLAG bind, DXGI_FORMAT srv_format, DXGI_FORMAT dsv_format, DXGI_FORMAT rtv_format, bool multisampled) - : ref(1), tex(texptr), srv(nullptr), rtv(nullptr), dsv(nullptr) + : tex{texptr} { D3D11_SRV_DIMENSION srv_dim = multisampled ? D3D11_SRV_DIMENSION_TEXTURE2DMSARRAY : D3D11_SRV_DIMENSION_TEXTURE2DARRAY; diff --git a/Source/Core/VideoBackends/D3D/D3DTexture.h b/Source/Core/VideoBackends/D3D/D3DTexture.h index 2908ccf6ce..1c2cecb2c3 100644 --- a/Source/Core/VideoBackends/D3D/D3DTexture.h +++ b/Source/Core/VideoBackends/D3D/D3DTexture.h @@ -39,11 +39,11 @@ private: ~D3DTexture2D(); ID3D11Texture2D* tex; - ID3D11ShaderResourceView* srv; - ID3D11RenderTargetView* rtv; - ID3D11DepthStencilView* dsv; + ID3D11ShaderResourceView* srv = nullptr; + ID3D11RenderTargetView* rtv = nullptr; + ID3D11DepthStencilView* dsv = nullptr; D3D11_BIND_FLAG bindflags; - UINT ref; + UINT ref = 1; }; } // namespace DX11