[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. 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 :</span></b> Rico Schüller \
<kgbricola@web.de><br> <b><span style="font-weight: bold;">À :</span></b> \
Nozomi Kodama <nozomi.kodama@yahoo.com> <br><b><span style="font-weight: \
bold;">Cc :</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 :</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>> + if (adjacency)<br>> + \
{<br>> + DWORD *buffer, size;<br>> + \
ID3DXBuffer *temp;<br>> +<br>> + \
size = 3 * sphere->lpVtbl->GetNumFaces(sphere) * sizeof(DWORD);<br>> \
+ hr = D3DXCreateBuffer(size, &temp);<br>> + \
if (hr != D3D_OK)<br>> + \
return hr;<br>> +<br>> + buffer = (DWORD \
*)(ID3DXBuffer_GetBufferPointer(temp));<br>Are the outer parentheses needed? Is the \
cast needed?<br><br>> + hr = \
sphere->lpVtbl->GenerateAdjacency(sphere, -0.000001f, buffer);<br>> + \
if (hr != D3D_OK)<br>> + \
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