On Tue, Feb 26, 2019 at 6:07 PM Matteo Bruni matteo.mystral@gmail.com wrote:
On Tue, Feb 26, 2019 at 4:54 PM Henri Verbeet hverbeet@gmail.com wrote:
On Mon, 25 Feb 2019 at 21:31, Matteo Bruni mbruni@codeweavers.com wrote:
- /* Make sure to only upload buffers that are used by the current draw:
* released buffers might still be bound as stream sources. */
Thinking about it some more, does this really solve the issue? In particular, what about the case where the buffer is released, but also referenced by the vertex declaration? Shouldn't we just delay releasing the wined3d system memory buffer until wined3d_object_destroyed()?
I'll write a test for that case. I think something like this patch will be useful anyway to avoid spurious buffer uploads (not strictly for performance reasons, those extra uploads did look somewhat confusing in the log.)
Eh, the test isn't that convincing, somehow it doesn't crash for me on Wine (I'm sure it did crash previously and I can see we're using the destroyed buffer sysmem as expected). Anyway, I'll work on the proper fix.