On 3 January 2016 at 19:44, Stefan Dösinger stefandoesinger@gmail.com wrote:
Am 2016-01-03 um 18:06 schrieb Henri Verbeet:
- wined3d_surface_incref(wined3d_surface);
- wined3d_texture_incref(wined3d_texture); surface->wined3d_surface = wined3d_surface;
- surface->wined3d_texture = wined3d_texture;
The reference counting here is odd. You'd normally increment the reference count right before or after storing the pointer.
This goes back to one of my suggestions: The individual subresources already hold a reference to the texture. This decref removes the initial ref from the texture_create call.
Are you perhaps thinking about the wined3d_texture_decref() call in ddraw_surface_create()? That one makes sense, but it's not what I commented on.