-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA256 Am 2015-11-19 um 20:34 schrieb Riccardo Bortolato:
@@ -532,10 +529,9 @@ static void ddraw_surface_cleanup(struct ddraw_surface *surface) ... + wined3d_texture_decref(surface->wined3d_texture); + if (surface->sub_resource_idx == 0) wined3d_texture_decref(surface->wined3d_texture); If I follow this correctly the unconditionally released reference is the one added by ddraw_surface_init, and the one that's released if sub_resource_idx == 0 is the initial reference that the texture is returned with from wined3d_texture_create. In this case I think it would be better to release the idx == 0 reference after calling wined3d_surface_create and retrieving the ddraw parent. Please correct me if I am wrong...
(This would also remove a non-obvious non-problem in the flip code if one of the involved surfaces has a non-zero index and the other one has a zero index and holds an extra reference to its wined3d texture. In practice it's a non-issue because swapchains never have mipmaps and the code swaps both the wined3d texture and the sub resource index) -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQIcBAEBCAAGBQJWURGCAAoJEN0/YqbEcdMwXVQP/AqWEh17bjHO5KjWJ7eMdhvM xS0GCfUK4xcr9i5Xr0AHmOHzhd2NB3vkmYaqQyn6VTXzNbjoYf2uIlTlm9bkhLJi xfDYjedsx8lcwrCjPUEuwrmam7mKOMNsTq4NZ6IClGeVaQBEYgC/Q9vJ3HgwZYz+ EdW0UNbed0TJaxuaymWVK9SyOUQcMYA90vNvxJNWV/A78jxIktOEGqAEpmIRTEyi ZzS6iNVQCXc5c90X1ZFeh31g+yX+ZuHLOQ4mlL8dsu5B+dtnb9Mou2FBkcOW51u7 shHbkNGK49sgkmSLKbZaAYFO4+cMWbJpFAqMMbikBZT6+8ATHE+r72USBrc/myya nnaYlyJuVIZB022zzLxSMcNsyyxMVUZDF+//KfE/VdZ7NfIh8h0gnh/PW7y0i9H9 dYMU/l87+SlVVJCyX4BZYJr1/U3WT2GHJB0eyWHUikIF5hUL5PntbMUwNAVFEM6y B4QGSE5sfay6DQ6U+FNTfUN35A7KKn4RfFgs6M3wAIh6dXKAcivLbSaPNdRhBGoK xSR9wA2IN19mkAGdf5VqFOR33AG4VUaKy6q9+DViac7QgGB9eCS4VGBqtbof5/K4 elRJ+jzj4C+1GdQUOYpl77CaKxwRescNP7sOiRyJGxOHOOQ/oP0MhRYRG9deak+W BhwM31xUd2UpEzECH5EK =a+jA -----END PGP SIGNATURE-----