[prev in list] [next in list] [prev in thread] [next in thread] 

List:       wine-devel
Subject:    Re: [PATCH 3/4] d3drm: Implement IDirect3DRM*_CreateTexture.
From:       Aaryaman Vasishta <jem456.vasishta () gmail ! com>
Date:       2016-04-29 9:37:39
Message-ID: CABVHfRt6TncDLzjaBr4rTs8543JQEafdKcXmC_tEvOJHxbJSoQ () mail ! gmail ! com
[Download RAW message or body]

[Attachment #2 (multipart/alternative)]


Not really, I thought that since InitFromImage doesn't exist for version 1,
I wasn't sure if it's a good idea to use it within CreateTexture for
version 1.
Is it fine, though?. I'll use InitFromImage if it's a better approach.
Besides, since they behave the same so far, there's no reason to not use it
anyways.

I agree with thunking version 2's CreateTexture to version 3, I'll resend
the patch for the same, after I get to know your opinion for the above
question.

Cheers,
Aaryaman

On Fri, Apr 29, 2016 at 1:06 PM, Stefan Dösinger <stefandoesinger@gmail.com>
wrote:

>
> > Am 28.04.2016 um 20:17 schrieb Aaryaman Vasishta <
> jem456.vasishta@gmail.com>:
> >
> > @@ -198,13 +198,24 @@ static HRESULT WINAPI
> d3drm1_CreateTexture(IDirect3DRM *iface,
> >     struct d3drm_texture *object;
> >     HRESULT hr;
> >
> > -    FIXME("iface %p, image %p, texture %p partial stub.\n", iface,
> image, texture);
> > +    TRACE("iface %p, image %p, texture %p.\n", iface, image, texture);
> > +
> > +    if (!d3drm_validate_image(image))
> > +        return D3DRMERR_BADVALUE;
> >
> >     if (FAILED(hr = d3drm_texture_create(&object)))
> > +    {
> > +        d3drm_texture_destroy(object);
> >         return hr;
> > +    }
> > +    object->d3drm = iface;
> > +    object->initialized = TRUE;
> > +    object->image = image;
> >
> >     *texture = &object->IDirect3DRMTexture_iface;
> >
> > +    IDirect3DRM_AddRef(iface);
> > +
> >     return D3DRM_OK;
> > }
> >
> Is there anything wrong with calling Texture3::InitFromImage here, or even
> calling IDirect3DRM3::CreateTexture? in D3DRM1::CreateTexture and
> D3DRM2::CreateTexture?
>

[Attachment #5 (text/html)]

<div dir="ltr">Not really, I thought that since InitFromImage doesn&#39;t exist for \
version 1, I wasn&#39;t sure if it&#39;s a good idea to use it within CreateTexture \
for version 1.<div>Is it fine, though?. I&#39;ll use InitFromImage if it&#39;s a \
better approach. Besides, since they behave the same so far, there&#39;s no reason to \
not use it anyways.<div><br><div>I agree with thunking version 2&#39;s CreateTexture \
to version 3, I&#39;ll resend the patch for the same, after I get to know your \
opinion for the above \
question.</div><div><br><div>Cheers,</div><div>Aaryaman</div></div></div></div></div><div \
class="gmail_extra"><br><div class="gmail_quote">On Fri, Apr 29, 2016 at 1:06 PM, \
Stefan Dösinger <span dir="ltr">&lt;<a href="mailto:stefandoesinger@gmail.com" \
target="_blank">stefandoesinger@gmail.com</a>&gt;</span> wrote:<br><blockquote \
class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc \
solid;padding-left:1ex"><span class=""><br> &gt; Am 28.04.2016 um 20:17 schrieb \
Aaryaman Vasishta &lt;<a \
href="mailto:jem456.vasishta@gmail.com">jem456.vasishta@gmail.com</a>&gt;:<br> \
&gt;<br> &gt; @@ -198,13 +198,24 @@ static HRESULT WINAPI \
d3drm1_CreateTexture(IDirect3DRM *iface,<br> &gt;        struct d3drm_texture \
*object;<br> &gt;        HRESULT hr;<br>
&gt;<br>
&gt; -      FIXME(&quot;iface %p, image %p, texture %p partial stub.\n&quot;, iface, \
image, texture);<br> &gt; +      TRACE(&quot;iface %p, image %p, texture %p.\n&quot;, \
iface, image, texture);<br> &gt; +<br>
&gt; +      if (!d3drm_validate_image(image))<br>
&gt; +            return D3DRMERR_BADVALUE;<br>
&gt;<br>
&gt;        if (FAILED(hr = d3drm_texture_create(&amp;object)))<br>
&gt; +      {<br>
&gt; +            d3drm_texture_destroy(object);<br>
&gt;              return hr;<br>
&gt; +      }<br>
&gt; +      object-&gt;d3drm = iface;<br>
&gt; +      object-&gt;initialized = TRUE;<br>
&gt; +      object-&gt;image = image;<br>
&gt;<br>
&gt;        *texture = &amp;object-&gt;IDirect3DRMTexture_iface;<br>
&gt;<br>
&gt; +      IDirect3DRM_AddRef(iface);<br>
&gt; +<br>
&gt;        return D3DRM_OK;<br>
&gt; }<br>
&gt;<br>
</span>Is there anything wrong with calling Texture3::InitFromImage here, or even \
calling IDirect3DRM3::CreateTexture? in D3DRM1::CreateTexture and \
D3DRM2::CreateTexture?<br> </blockquote></div><br></div>


[Attachment #6 (text/plain)]




[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic