-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256
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. Doing it here avoids special treatment of subresource 0 in other places.
Though I guess a comment explaining this might be a reasonable thing to do.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2
iQIcBAEBCAAGBQJWiWv3AAoJEN0/YqbEcdMwOMQP/i+pgpQqJZN8RjL+v3Per0Zp
cIQ2yDPuuqSi+eVnNuRcHGyIG8CMbAcH1qZSupTPnMSuySrxQlClpKJbkwmhHLdU
ePnXT2JVOw78Mt6DAohsQ8D4E4FjwG4Zun6bOe7ErSvmzWiizxyw1gHg3Jw/ptbp
/EROaT0LONV1Hl6iSF9taWCh2+DMPCXnEx9KIGJnxo75HWGn564BYJfdJH3hZgMC
25utaHwTsgHhIIael0CWDEh80wkKVU/xoBP6QKuGhzVlZpO6p2NgiE6+zueOjqyu
spf8QwdQlPAZ3uB6m2Vl1lDuhH23asTHSULunY83nIpQqLmUY2r3stifHZurpWFE
9acwfrM1AVAKIi0zR+gfU8xqphkzF2awF365h50FcyLxK2q0AHfiiTcnDRoktYlI
hixV20cuY8vVY6Jt0RSqNdQrk5RyOUo0FtslKX3pc/sGLZTGeUM/WVTcTVqGDjYk
yE8b5YHmQzuIBx7kgfkzdsgvBWQJ3LJMPfhxKMk5eoBFP0HpuqKJuSsTF6nEcaF1
7bYm9YNhHkUMvsaG3HllpAhzG5huI/rahco8qTQPISFV+NG3/hfpgQvMn6msHl0x
XGGUHfKYYG+Sr9dd00Ik3em6do1LzV5er8EjNGE5kL5bhgphmYr20pgpcfStNlWt
bb0MFiVf3PGIhNlPchH+
=ul3N
-----END PGP SIGNATURE-----