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

List:       wine-devel
Subject:    Re: d3dx9: Implement adjacency in D3DXCreateSphere
From:       Nozomi Kodama <nozomi.kodama () yahoo ! com>
Date:       2013-06-24 23:41:16
Message-ID: 1372117276.29270.YahooMailNeo () web28804 ! mail ! ir2 ! yahoo ! com
[Download RAW message or body]

[Attachment #2 (multipart/alternative)]


Hello

Thank you for the feedback, Rico.

But, there is a problem with this patch.  Native d3dx9 does not call \
GenerateAdjacency. It hardcodes the adjacency. That is proved by the case \
D3DXCreateSpehere(device, 0.0f, 10,10,adjacency) where native gives different result \
using GenerateAdjacency or not. I need thinking more how to hardcode adjacency.


The side effect is to show there is a bug in our built-in GenerateAdjacency


Nozomi



________________________________
 De : Rico Schüller <kgbricola@web.de>
À : Nozomi Kodama <nozomi.kodama@yahoo.com> 
Cc : wine-devel@winehq.org 
Envoyé le : Vendredi 21 juin 2013 23h24
Objet : Re: d3dx9: Implement adjacency in D3DXCreateSphere
 

On 20.06.2013 21:25, Nozomi Kodama wrote:
> +    if (adjacency)
> +    {
> +        DWORD *buffer, size;
> +        ID3DXBuffer *temp;
> +
> +        size = 3 * sphere->lpVtbl->GetNumFaces(sphere) * sizeof(DWORD);
> +        hr = D3DXCreateBuffer(size, &temp);
> +        if (hr != D3D_OK)
> +            return hr;
> +
> +        buffer = (DWORD *)(ID3DXBuffer_GetBufferPointer(temp));
Are the outer parentheses needed? Is the cast needed?

> +        hr = sphere->lpVtbl->GenerateAdjacency(sphere, -0.000001f, buffer);
> +        if (hr != D3D_OK)
> +            return hr;
This may leak the temp ID3DXBuffer in the error case.

Cheers
Rico


[Attachment #5 (text/html)]

<html><body><div style="color:#000; background-color:#fff; font-family:times new \
roman, new york, times, serif;font-size:12pt">Hello<br><br>Thank you for the \
feedback, Rico.<br><br>But, there is a problem with this patch.&nbsp; Native d3dx9 \
does not call GenerateAdjacency. It hardcodes the adjacency. That is proved by the \
case D3DXCreateSpehere(device, 0.0f, 10,10,adjacency) where native gives different \
result using GenerateAdjacency or not. I need thinking more how to hardcode \
adjacency.<br><div><span><br></span></div><div>The side effect is to show there is a \
bug in our built-in GenerateAdjacency</div><div><br></div><div style="color: rgb(0, \
0, 0); font-size: 16px; font-family: times new roman,new york,times,serif; \
background-color: transparent; font-style: normal;"><br></div><div style="color: \
rgb(0, 0, 0); font-size: 16px; font-family: times new roman,new york,times,serif; \
background-color: transparent; font-style: normal;">Nozomi<br></div><div  \
style="color: rgb(0, 0, 0); font-size: 16px; font-family: times new roman,new \
york,times,serif; background-color: transparent; font-style: normal;"><br></div>  \
<div style="font-family: times new roman, new york, times, serif; font-size: 12pt;"> \
<div style="font-family: times new roman, new york, times, serif; font-size: 12pt;"> \
<div dir="ltr"> <hr size="1">  <font face="Arial" size="2"> <b><span \
style="font-weight:bold;">De&nbsp;:</span></b> Rico Schüller \
&lt;kgbricola@web.de&gt;<br> <b><span style="font-weight: bold;">À&nbsp;:</span></b> \
Nozomi Kodama &lt;nozomi.kodama@yahoo.com&gt; <br><b><span style="font-weight: \
bold;">Cc&nbsp;:</span></b> wine-devel@winehq.org <br> <b><span style="font-weight: \
bold;">Envoyé le :</span></b> Vendredi 21 juin 2013 23h24<br> <b><span \
style="font-weight: bold;">Objet&nbsp;:</span></b> Re: d3dx9: Implement adjacency in \
D3DXCreateSphere<br> </font> </div> <div class="y_msg_container"><br>On 20.06.2013 \
21:25, Nozomi  Kodama wrote:<br>&gt; +&nbsp; &nbsp; if (adjacency)<br>&gt; +&nbsp; \
&nbsp; {<br>&gt; +&nbsp; &nbsp; &nbsp; &nbsp; DWORD *buffer, size;<br>&gt; +&nbsp; \
&nbsp; &nbsp; &nbsp; ID3DXBuffer *temp;<br>&gt; +<br>&gt; +&nbsp; &nbsp; &nbsp; \
&nbsp; size = 3 * sphere-&gt;lpVtbl-&gt;GetNumFaces(sphere) * sizeof(DWORD);<br>&gt; \
+&nbsp; &nbsp; &nbsp; &nbsp; hr = D3DXCreateBuffer(size, &amp;temp);<br>&gt; +&nbsp; \
&nbsp; &nbsp; &nbsp; if (hr != D3D_OK)<br>&gt; +&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; \
&nbsp; return hr;<br>&gt; +<br>&gt; +&nbsp; &nbsp; &nbsp; &nbsp; buffer = (DWORD \
*)(ID3DXBuffer_GetBufferPointer(temp));<br>Are the outer parentheses needed? Is the \
cast needed?<br><br>&gt; +&nbsp; &nbsp; &nbsp; &nbsp; hr = \
sphere-&gt;lpVtbl-&gt;GenerateAdjacency(sphere, -0.000001f, buffer);<br>&gt; +&nbsp; \
&nbsp; &nbsp; &nbsp; if (hr != D3D_OK)<br>&gt; +&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; \
&nbsp; return hr;<br>This may leak the temp ID3DXBuffer in the error  \
case.<br><br>Cheers<br>Rico<br><br><br></div> </div> </div>  </div></body></html>





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

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