I'm not really sure either, as I had followed the way other d3drm interfaces did it on wine. I'll re-send the patch with your suggestions.

Cheers,
Aaryaman

On Tue, Jan 19, 2016 at 3:09 AM, Henri Verbeet <hverbeet@gmail.com> wrote:
On 18 January 2016 at 19:57, Aaryaman Vasishta
<jem456.vasishta@gmail.com> wrote:
> -    if (IsEqualGUID(riid, &IID_IDirect3DRMTexture2)
> -            || IsEqualGUID(riid, &IID_IDirect3DRMTexture)
> +    if (IsEqualGUID(riid, &IID_IDirect3DRMTexture)
> +            || IsEqualGUID(riid, &IID_IDirect3DRMVisual)
> +            || IsEqualGUID(riid, &IID_IDirect3DRMObject)
>              || IsEqualGUID(riid, &IID_IUnknown))
>      {
> +        *out = &texture->IDirect3DRMTexture_iface;
This isn't necessarily wrong, but it does seem weird. You return
&texture->IDirect3DRMTexture_iface here for e.g. IUnknown, but the
implementation then forwards to &texture->IDirect3DRMTexture3_iface.
It seems more logical to return the IDirect3DRMTexture3 interface here
directly.

We also tend to check the "newest" IID first, in D3D code at least.
I.e., IID_IDirect3DRMTexture3 before IID_IDirect3DRMTexture.