1
0
mirror of https://github.com/doitsujin/dxvk.git synced 2025-01-31 23:52:20 +01:00

[d3d9] Remove unused readonly bitfield

This commit is contained in:
Robin Kertels 2024-11-02 00:54:03 +01:00
parent c606ab03e8
commit 8d10bfecd4
2 changed files with 2 additions and 11 deletions

View File

@ -337,10 +337,6 @@ namespace dxvk {
void MarkAllNeedReadback() { m_needsReadback.setAll(); } void MarkAllNeedReadback() { m_needsReadback.setAll(); }
void SetReadOnlyLocked(UINT Subresource, bool readOnly) { return m_readOnly.set(Subresource, readOnly); }
bool GetReadOnlyLocked(UINT Subresource) const { return m_readOnly.get(Subresource); }
const Rc<DxvkImageView>& GetSampleView(bool srgb) const { const Rc<DxvkImageView>& GetSampleView(bool srgb) const {
return m_sampleView.Pick(srgb && IsSrgbCompatible()); return m_sampleView.Pick(srgb && IsSrgbCompatible());
} }
@ -522,8 +518,6 @@ namespace dxvk {
D3D9SubresourceBitset m_locked = { }; D3D9SubresourceBitset m_locked = { };
D3D9SubresourceBitset m_readOnly = { };
D3D9SubresourceBitset m_needsReadback = { }; D3D9SubresourceBitset m_needsReadback = { };
D3D9SubresourceBitset m_needsUpload = { }; D3D9SubresourceBitset m_needsUpload = { };

View File

@ -4714,15 +4714,11 @@ namespace dxvk {
if (desc.Usage & D3DUSAGE_WRITEONLY) if (desc.Usage & D3DUSAGE_WRITEONLY)
Flags &= ~D3DLOCK_READONLY; Flags &= ~D3DLOCK_READONLY;
const bool readOnly = Flags & D3DLOCK_READONLY;
pResource->SetReadOnlyLocked(Subresource, readOnly);
bool renderable = desc.Usage & (D3DUSAGE_RENDERTARGET | D3DUSAGE_DEPTHSTENCIL);
// If we recently wrote to the texture on the gpu, // If we recently wrote to the texture on the gpu,
// then we need to copy -> buffer // then we need to copy -> buffer
// We are also always dirty if we are a render target, // We are also always dirty if we are a render target,
// a depth stencil, or auto generate mipmaps. // a depth stencil, or auto generate mipmaps.
bool renderable = desc.Usage & (D3DUSAGE_RENDERTARGET | D3DUSAGE_DEPTHSTENCIL);
bool needsReadback = pResource->NeedsReadback(Subresource) || renderable; bool needsReadback = pResource->NeedsReadback(Subresource) || renderable;
// Skip readback if we discard is specified. We can only do this for textures that have an associated Vulkan image. // Skip readback if we discard is specified. We can only do this for textures that have an associated Vulkan image.
@ -4838,6 +4834,7 @@ namespace dxvk {
UnmapTextures(); UnmapTextures();
const bool readOnly = Flags & D3DLOCK_READONLY;
const bool noDirtyUpdate = Flags & D3DLOCK_NO_DIRTY_UPDATE; const bool noDirtyUpdate = Flags & D3DLOCK_NO_DIRTY_UPDATE;
if ((desc.Pool == D3DPOOL_DEFAULT || !noDirtyUpdate) && !readOnly) { if ((desc.Pool == D3DPOOL_DEFAULT || !noDirtyUpdate) && !readOnly) {
if (pBox && MipLevel != 0) { if (pBox && MipLevel != 0) {