d3d8: Filter out redundant buffer discards.
commit379ae701c04046661a092cacd7263ca97101f51b
authorZebediah Figura <zfigura@codeweavers.com>
Thu, 22 Dec 2022 18:33:15 +0000 (22 12:33 -0600)
committerAlexandre Julliard <julliard@winehq.org>
Fri, 6 Jan 2023 12:39:45 +0000 (6 13:39 +0100)
tree6bb56f73430faa3d2c9a6d8222563f52240ba130
parentc96d34e86e624159287dea0f3db12e3175000b15
d3d8: Filter out redundant buffer discards.

I was unable to write tests for this; it seems it doesn't consistently work on
Windows. However, Rayman 3 seems to rely on it; it maps the same buffer twice
immediately after creation, with DISCARD flags on both maps, and expects the
same address to be returned.

Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=53752
dlls/d3d8/buffer.c
dlls/d3d8/d3d8_private.h
dlls/d3d8/device.c