Commit e49c19eb authored by Zebediah Figura's avatar Zebediah Figura Committed by Alexandre Julliard

d3d8: Pass NOOVERWRITE to redundantly discarded maps.

If DISCARD maps are accelerated, passing empty map flags won't return the same accelerated BO. Tested with Port Royale 2 and Rayman 3. Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=55770
parent 00e1eaff
......@@ -193,7 +193,10 @@ static HRESULT WINAPI d3d8_vertexbuffer_Lock(IDirect3DVertexBuffer8 *iface, UINT
iface, offset, size, data, flags);
if (buffer->discarded)
flags &= ~D3DLOCK_DISCARD;
{
WARN("Filtering out redundant discard of %p.\n", buffer);
flags = (flags & ~D3DLOCK_DISCARD) | D3DLOCK_NOOVERWRITE;
}
if (flags & D3DLOCK_DISCARD)
buffer->discarded = true;
......@@ -514,7 +517,10 @@ static HRESULT WINAPI d3d8_indexbuffer_Lock(IDirect3DIndexBuffer8 *iface, UINT o
iface, offset, size, data, flags);
if (buffer->discarded)
flags &= ~D3DLOCK_DISCARD;
{
WARN("Filtering out redundant discard of %p.\n", buffer);
flags = (flags & ~D3DLOCK_DISCARD) | D3DLOCK_NOOVERWRITE;
}
if (flags & D3DLOCK_DISCARD)
buffer->discarded = true;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment