diff --git a/src/d3d9/d3d9_common_texture.cpp b/src/d3d9/d3d9_common_texture.cpp index 4ab9537a..7ae1247b 100644 --- a/src/d3d9/d3d9_common_texture.cpp +++ b/src/d3d9/d3d9_common_texture.cpp @@ -99,7 +99,7 @@ namespace dxvk { m_device->RemoveMappedTexture(this); - if (m_desc.IsLosable) + if (m_desc.Pool == D3DPOOL_DEFAULT) m_device->DecrementLosableCounter(); } diff --git a/src/d3d9/d3d9_common_texture.h b/src/d3d9/d3d9_common_texture.h index 22b105fe..58cb854e 100644 --- a/src/d3d9/d3d9_common_texture.h +++ b/src/d3d9/d3d9_common_texture.h @@ -48,7 +48,6 @@ namespace dxvk { bool IsBackBuffer; bool IsAttachmentOnly; bool IsLockable; - bool IsLosable; }; struct D3D9ColorView { diff --git a/src/d3d9/d3d9_device.cpp b/src/d3d9/d3d9_device.cpp index 177230db..c37a192e 100644 --- a/src/d3d9/d3d9_device.cpp +++ b/src/d3d9/d3d9_device.cpp @@ -547,7 +547,6 @@ namespace dxvk { desc.MultisampleQuality = 0; desc.IsBackBuffer = FALSE; desc.IsAttachmentOnly = FALSE; - desc.IsLosable = Pool == D3DPOOL_DEFAULT; // Docs: // Textures placed in the D3DPOOL_DEFAULT pool cannot be locked // unless they are dynamic textures or they are private, FOURCC, driver formats. @@ -574,7 +573,7 @@ namespace dxvk { m_initializer->InitTexture(texture->GetCommonTexture(), initialData); *ppTexture = texture.ref(); - if (desc.IsLosable) + if (desc.Pool == D3DPOOL_DEFAULT) m_losableResourceCounter++; return D3D_OK; @@ -618,7 +617,6 @@ namespace dxvk { desc.MultisampleQuality = 0; desc.IsBackBuffer = FALSE; desc.IsAttachmentOnly = FALSE; - desc.IsLosable = Pool == D3DPOOL_DEFAULT; // Docs: // Textures placed in the D3DPOOL_DEFAULT pool cannot be locked // unless they are dynamic textures or they are private, FOURCC, driver formats. @@ -634,7 +632,7 @@ namespace dxvk { m_initializer->InitTexture(texture->GetCommonTexture()); *ppVolumeTexture = texture.ref(); - if (desc.IsLosable) + if (desc.Pool == D3DPOOL_DEFAULT) m_losableResourceCounter++; return D3D_OK; @@ -676,7 +674,6 @@ namespace dxvk { desc.MultisampleQuality = 0; desc.IsBackBuffer = FALSE; desc.IsAttachmentOnly = FALSE; - desc.IsLosable = Pool == D3DPOOL_DEFAULT; // Docs: // Textures placed in the D3DPOOL_DEFAULT pool cannot be locked // unless they are dynamic textures or they are private, FOURCC, driver formats. @@ -692,7 +689,7 @@ namespace dxvk { m_initializer->InitTexture(texture->GetCommonTexture()); *ppCubeTexture = texture.ref(); - if (desc.IsLosable) + if (desc.Pool == D3DPOOL_DEFAULT) m_losableResourceCounter++; return D3D_OK; @@ -3685,7 +3682,6 @@ namespace dxvk { desc.IsBackBuffer = FALSE; desc.IsAttachmentOnly = TRUE; desc.IsLockable = Lockable; - desc.IsLosable = TRUE; if (FAILED(D3D9CommonTexture::NormalizeTextureProperties(this, &desc))) return D3DERR_INVALIDCALL; @@ -3732,7 +3728,6 @@ namespace dxvk { desc.MultisampleQuality = 0; desc.IsBackBuffer = FALSE; desc.IsAttachmentOnly = Pool == D3DPOOL_DEFAULT; - desc.IsLosable = Pool == D3DPOOL_DEFAULT; // Docs: Off-screen plain surfaces are always lockable, regardless of their pool types. desc.IsLockable = TRUE; @@ -3747,7 +3742,7 @@ namespace dxvk { m_initializer->InitTexture(surface->GetCommonTexture()); *ppSurface = surface.ref(); - if (desc.IsLosable) + if (desc.Pool == D3DPOOL_DEFAULT) m_losableResourceCounter++; return D3D_OK; @@ -3788,7 +3783,6 @@ namespace dxvk { desc.MultisampleQuality = MultisampleQuality; desc.IsBackBuffer = FALSE; desc.IsAttachmentOnly = TRUE; - desc.IsLosable = TRUE; // Docs don't say anything, so just assume it's lockable. desc.IsLockable = TRUE; @@ -7549,7 +7543,6 @@ namespace dxvk { desc.MultisampleQuality = pPresentationParameters->MultiSampleQuality; desc.IsBackBuffer = FALSE; desc.IsAttachmentOnly = TRUE; - desc.IsLosable = TRUE; // Docs: Also note that - unlike textures - swap chain back buffers, render targets [..] can be locked desc.IsLockable = TRUE; diff --git a/src/d3d9/d3d9_swapchain.cpp b/src/d3d9/d3d9_swapchain.cpp index 6309c053..da440775 100644 --- a/src/d3d9/d3d9_swapchain.cpp +++ b/src/d3d9/d3d9_swapchain.cpp @@ -986,7 +986,6 @@ namespace dxvk { desc.Discard = FALSE; desc.IsBackBuffer = TRUE; desc.IsAttachmentOnly = FALSE; - desc.IsLosable = TRUE; // Docs: Also note that - unlike textures - swap chain back buffers, render targets [..] can be locked desc.IsLockable = TRUE;