From 5d5ec2aa775df12b7a151edc1ef0bcc2e255f33e Mon Sep 17 00:00:00 2001 From: Robin Kertels Date: Wed, 10 Jun 2020 22:48:49 +0200 Subject: [PATCH] [d3d9] Remove IsUploading from CommonTexture This was always true on subsequent Lock calls. The first lock was handled by the 'freshly allocated fast path' anyway. --- src/d3d9/d3d9_common_texture.h | 5 ----- src/d3d9/d3d9_device.cpp | 7 +------ 2 files changed, 1 insertion(+), 11 deletions(-) diff --git a/src/d3d9/d3d9_common_texture.h b/src/d3d9/d3d9_common_texture.h index 789ca66a9..8157b7a8c 100644 --- a/src/d3d9/d3d9_common_texture.h +++ b/src/d3d9/d3d9_common_texture.h @@ -350,10 +350,6 @@ namespace dxvk { bool Srgb); D3D9SubresourceBitset& GetUploadBitmask() { return m_needsUpload; } - void SetUploading(UINT Subresource, bool uploading) { m_uploading.set(Subresource, uploading); } - void ClearUploading() { m_uploading.clearAll(); } - bool GetUploading(UINT Subresource) const { return m_uploading.get(Subresource); } - void SetNeedsUpload(UINT Subresource, bool upload) { m_needsUpload.set(Subresource, upload); } bool GetNeedsUpload(UINT Subresource) const { return m_needsUpload.get(Subresource); } bool NeedsAnyUpload() { return m_needsUpload.any(); } @@ -404,7 +400,6 @@ namespace dxvk { D3D9SubresourceBitset m_dirty = { }; - D3D9SubresourceBitset m_uploading = { }; D3D9SubresourceBitset m_needsUpload = { }; DWORD m_exposedMipLevels = 0; diff --git a/src/d3d9/d3d9_device.cpp b/src/d3d9/d3d9_device.cpp index 4138e5b94..cd65f93bf 100644 --- a/src/d3d9/d3d9_device.cpp +++ b/src/d3d9/d3d9_device.cpp @@ -3988,16 +3988,13 @@ namespace dxvk { // calling app promises not to overwrite data that is in use // or is reading. Remember! This will only trigger for MANAGED resources // that cannot get affected by GPU, therefore readonly is A-OK for NOT waiting. - const bool uploading = pResource->GetUploading(Subresource); - const bool skipWait = (managed && !uploading) || (readOnly && managed) || scratch || (readOnly && systemmem && !dirty); + const bool skipWait = (readOnly && managed) || scratch || (readOnly && systemmem && !dirty); if (alloced) std::memset(physSlice.mapPtr, 0, physSlice.length); else if (!skipWait) { if (!WaitForResource(mappedBuffer, Flags)) return D3DERR_WASSTILLDRAWING; - - pResource->ClearUploading(); } } else { @@ -4189,8 +4186,6 @@ namespace dxvk { auto convertFormat = pResource->GetFormatMapping().ConversionFormatInfo; - pResource->SetUploading(Subresource, true); - if (likely(convertFormat.FormatType == D3D9ConversionFormat_None)) { EmitCs([ cSrcBuffer = copyBuffer,