wined3d: Avoid crashing when ProcessVertices is called with
NULL vertex declaration
Stefan Dösinger
stefan at codeweavers.com
Mon Sep 4 12:11:30 CDT 2006
Hi,
> I don't understand what the code does but every part of it depends on
> having a non-NULL SrcImpl. I think screaming bloody murder but continuing
> is better than crashing.
>
> I agree that the code doesn't look good but at least testing can proceed
> past this point.
For some reason I didn't get that patch, but from consulting the msdn
documentation for IDirect3DDevice9::ProcessVertices it looks like
ProcessVertices is a bit wrong. It doesn't get a Vertex buffer as in
argument, instead it gets a vertex declaration. Furthermore our
processvertices implementation doesn't handle vertex shaders.
The msdn page doesn't state explicitly, but I think if the vertex declaration
is NULL either the current declaration in the device should be used, or
D3DERR_INVALIDCALL returned. This should preferably be tested with a unit
test.
I was the one who implemented ProcessVertices, but I only implemented it for
Direct3D7 applications, and it is only tested with Half-Life 1 and Anarchy
Online. It should work for d3d8 and d3d9 apps with the fixed function
pipeline, but not with shaders.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : http://www.winehq.org/pipermail/wine-devel/attachments/20060904/ea612c23/attachment.pgp
More information about the wine-devel
mailing list