https://bugs.winehq.org/show_bug.cgi?id=52954
--- Comment #14 from Zeb Figura z.figura12@gmail.com --- This is a variation on bug 52684. In this case the application creates a managed texture, maps it with D3DLOCK_NO_DIRTY_UPDATE, and then draws from it. (Pro tip: read *all* the documentation before using flags.)
In theory this shouldn't work (since we're not actually flushing anything), but because it's the first upload to TEXTURE_RGB, it should be caught by 2ce72c6872. Unfortunately it's not, because we're not actually doing an UpdateTexture(); we're drawing directly from the managed texture. It's not caught by 27e84c2897 either, because the texture is CPU-accessible and thus still gets cleared on the CPU.
I'm not immediately sure what the correct way to fix this is. In bug 52684 I claim that we should always invalidate ~map_binding, but I'm not sure of that anymore. Location management makes perfect sense until you try to integrate managed textures into it, at which point you have two different locations which are both valid in a sense, and then it's not clear to me what the intended interpretation of "valid" locations is...