[PATCH 2/4] d3drm: Implement IDirect3DRMTexture{2-3}_InitFromImage.

Aaryaman Vasishta jem456.vasishta at gmail.com
Sat Apr 30 05:57:09 CDT 2016

> What will happen if you release IDirect3DRM before calling InitFrom*,
> and then call InitFrom* expecting already released IDirect3DRM to be valid?
As long as you haven't QI'd version 2 and/or version 3 from version 1, each
version having their own refcounts (see the refcount tests) it will crash
with a segfault. If in case you did QI any other version, the refcount will
go to zero but the object won't be destroyed until the other refcounts go
down to zero as well (see IDirect3DRM3_Release). I ran a quick test and can
confirm this. So overall I guess we can say that it's upto the
application's handling of the objects.

It's odd, but it seems that d3drm will only use version 1's refcount and
not touch version 2 and version 3's refcount for version 2 and version 3's
InitFromImage respectively.
I'll go ahead and resend the patch with the comment additions.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.winehq.org/pipermail/wine-devel/attachments/20160430/0e68fb8b/attachment.html>

More information about the wine-devel mailing list