[PATCH 2/2] d3drm: Partially Implement IDirect3DRM*::LoadTexture(v2).

Aaryaman Vasishta jem456.vasishta at gmail.com
Fri Mar 25 16:20:25 CDT 2016


On Fri, Mar 25, 2016 at 1:12 AM, Henri Verbeet <hverbeet at gmail.com> wrote:

> Sure, but it's useful to have some idea what those functions are
> supposed to do. Right now, I think it looks like you should be able to
> implement LoadTexture() by creating a texture and then calling
> InitFromFile() on it. And related to above, InitFromFile() should then
> probably check that the texture hasn't been initialised before.
>
I wrote a quick test, and it seems that InitFromFile always returns
D3DRMERR_BADOBJECT, even after passing it an IDirect3DRMTexture created via
CreateTexture. It even fails on version 3 (my suspicion was that maybe
version 1 and 2 were deprecated and version 3 works, but that doesn't seem
the case). I ran them on my windows machine, but I can send a diff to the
testbot if you want.

CreateTexture will also only work when it's fed with a complete and valid
image struct. Passing NULL to buffer1 made it fail again. I can confirm
that CreateTexture only keeps a pointer copy to the application-created
image struct, instead of deep copying the contents of it in seperate memory.

The docs have also been pretty vague about the type of file that
InitFromFile wants, describing the filename parameter as "A string that
specifies the file from which the texture initialization information is
drawn". I suspect that it might be some proprietary format specifying the
contents of an image struct, along with the buffer arrays. But I could be
wrong. For now I'll include all your other suggestions and leave this for
further discussion, while I submit the improved patch.

Thanks for the review and clarifications!

Cheers,
Aaryaman
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.winehq.org/pipermail/wine-devel/attachments/20160326/a1235bd3/attachment.html>


More information about the wine-devel mailing list