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

[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.
This commit is contained in:
Robin Kertels 2020-06-10 22:48:49 +02:00 committed by Joshie
parent e6ed8dab63
commit 5d5ec2aa77
2 changed files with 1 additions and 11 deletions

View File

@ -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;

View File

@ -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,