[prev in list] [next in list] [prev in thread] [next in thread]
List: wine-devel
Subject: Re: Profiing windows apps
From: Ralph Little <littlesincanada () yahoo ! co ! uk>
Date: 2012-01-31 21:51:01
Message-ID: 1328046661.23377.YahooMailNeo () web171620 ! mail ! ir2 ! yahoo ! com
[Download RAW message or body]
[Attachment #2 (multipart/alternative)]
Hi Stefan,
I did put together a test for this and DirectX does indeed return DDERR_INVALIDPARMS.
Here is a snippet that encapsulates what I tried:
========================
IDirectDraw * pDD = NULL;
IDirectDrawSurface * pDDSPrimary = NULL;
DDSURFACEDESC ddsd;
...<initialisation etc>...
memset(&ddsd, 0, sizeof(ddsd));
ddsd.dwSize = sizeof(ddsd);
ddsd.dwFlags = DDSD_CAPS | DDSD_PIXELFORMAT | DDSD_HEIGHT | DDSD_WIDTH;
ddsd.ddsCaps.dwCaps = DDSCAPS_SYSTEMMEMORY | DDSCAPS_ZBUFFER;
ddsd.dwHeight = 600;
ddsd.dwWidth = 800;
ddsd.ddpfPixelFormat.dwSize = sizeof(DDPIXELFORMAT);
hr = pDD->CreateSurface(&ddsd, &pDDSPrimary, NULL);
========================
DirectX returns DDERR_INVALIDPARAMS from CreateSurface. I have tried to recreate as \
much a possible the graphical situation as it would be in The Sims at this point. \
Fullscreen, with 800x600 video mode.
I assume that if the caller specifies DDSCAPS_ZBUFFER, the you must also specify some \
PIXEL format information. DDSD_PIXELFORMAT is present, but there are no format flags.
I have to admit that I am a bit of a novice when it comes to DirectX so any guidance \
here would be helpful. I see that the lpSurface is NULL, which I thought was an \
error. However, I see that this is optional if the caller wishes the system to manage \
the surface memory.
Any error returned by this function the Sims at this point to causes it to crash. \
Therefore, it seems to me that if it succeeds in Windows, it must have passed \
something different. If only we could see the source :D
Cheers,
Ralph
> ________________________________
> From: Stefan Dösinger <stefandoesinger@gmx.at>
> To: wine-devel@winehq.org; Ralph Little <littlesincanada@yahoo.co.uk>
> Sent: Tuesday, January 31, 2012 12:08:51 PM
> Subject: Re: Profiing windows apps
>
> Am Dienstag, 31. Januar 2012, 17:29:23 schrieb Ralph Little:
> > Hi,
> > I'm looking at bug #9672 again in the The Sims.
> > The app crashes early on during initialisation in DirectDraw. The problem
> > occurs after CreateSurface returns an error, since it would appear that the
> > DDSURFACEDESC passed into the call is foobar. This would lead me to
> > conclude that something on the lead up to that call is precipitating that
> > rogue call.
> From looking at the bug report(ddsurfacedesc.ddpfPixelFormat.dwFlags = 0) I
> think it's worth writing a test to see how Windows responds to the
> CreateSurface call before spending too much time debugging this. It is quite
> possible that Windows creates the surface just fine.
>
>
>
[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"><div><span>Hi \
Stefan,</span></div><div><span>I did put together a test for this and DirectX does \
indeed return DDERR_INVALIDPARMS.</span></div><div><br><span></span></div><div><span>Here \
is a snippet that encapsulates what I \
tried:</span></div><div><br></div><div>========================</div><div>IDirectDraw \
* pDD = NULL;<br>IDirectDrawSurface * pDDSPrimary = NULL;<br>DDSURFACEDESC \
ddsd;<br></div><div><br></div><div>...<initialisation \
etc>...</div><div><br></div><div>memset(&ddsd, 0, \
sizeof(ddsd));<br>ddsd.dwSize = sizeof(ddsd);<br>ddsd.dwFlags = DDSD_CAPS | \
DDSD_PIXELFORMAT | DDSD_HEIGHT | DDSD_WIDTH;<br>ddsd.ddsCaps.dwCaps = \
DDSCAPS_SYSTEMMEMORY | DDSCAPS_ZBUFFER;<br>ddsd.dwHeight = 600;<br>ddsd.dwWidth \
= 800;<br>ddsd.ddpfPixelFormat.dwSize = sizeof(DDPIXELFORMAT);</div><div><br>hr \
= pDD->CreateSurface(&ddsd, &pDDSPrimary, \
NULL);</div><div>========================<br><span></span></div><div>DirectX returns \
DDERR_INVALIDPARAMS from CreateSurface. I have tried to recreate as much a possible \
the graphical situation as it would be in The Sims at this \
point.</div><div>Fullscreen, with 800x600 video mode.<br></div><div><br></div><div>I \
assume that if the caller specifies DDSCAPS_ZBUFFER, the you must also specify some \
PIXEL format information. DDSD_PIXELFORMAT is present, but there are no format \
flags.</div><div><br></div><div>I have to admit that I am a bit of a novice when it \
comes to DirectX so any guidance here would be helpful.</div><div>I see that the \
lpSurface is NULL, which I thought was an error. However, I see that this is optional \
if the caller wishes the system to manage the surface \
memory.</div><div><br></div><div>Any error returned by this function the Sims at this \
point to causes it to crash. Therefore, it seems to me that if it succeeds in \
Windows, it must have passed something different.</div><div>If only we could see the \
source :D</div><div><br></div>Cheers,<br>Ralph<br><div><br><blockquote \
style="border-left: 2px solid rgb(16, 16, 255); margin-left: 5px; margin-top: 5px; \
padding-left: 5px;"> <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"> <font face="Arial" size="2"> <hr size="1"> \
<b><span style="font-weight:bold;">From:</span></b> Stefan Dösinger \
<stefandoesinger@gmx.at><br> <b><span style="font-weight: bold;">To:</span></b> \
wine-devel@winehq.org; Ralph Little <littlesincanada@yahoo.co.uk> <br> <b><span \
style="font-weight: bold;">Sent:</span></b> Tuesday, January 31, 2012 12:08:51 PM<br> \
<b><span style="font-weight: bold;">Subject:</span></b> Re: Profiing windows apps<br> \
</font> </div> <br>Am Dienstag, 31. Januar 2012, 17:29:23 schrieb Ralph \
Little:<br>> Hi,<br>> I'm looking at bug #9672 again in the The Sims.<br>> \
The app crashes early on during initialisation in DirectDraw. The problem<br>> \
occurs after CreateSurface returns an error, since it would appear that the<br>> \
DDSURFACEDESC passed into the call is foobar. This would lead me to<br>> conclude \
that something on the lead up to that call is precipitating that<br>> rogue \
call.<br>From looking at the bug report(ddsurfacedesc.ddpfPixelFormat.dwFlags = 0) I \
<br>think it's worth writing a test to see how Windows responds to the \
<br>CreateSurface call before spending too much time debugging this. It is quite \
<br>possible that Windows creates the surface just fine.<br><br><br> </div> </div> \
</blockquote></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