Not performing the following:
if (NULL != pDecl) { IWineD3DVertexDeclaration_AddRef(pDecl); }
in IWineD3DDeviceImpl_SetVertexDeclaration(...) when state is being recorded (note the return that was added), seems to cause a page fault, at least in NFS: Most Wanted. Is it possible that not adding a reference here causes the declaration object to be deallocated to early, when it is still used by the application ?
On 04/01/07, Christoph Bumiller e0425955@stud3.tuwien.ac.at wrote:
Not performing the following:
if (NULL != pDecl) { IWineD3DVertexDeclaration_AddRef(pDecl); }
in IWineD3DDeviceImpl_SetVertexDeclaration(...) when state is being recorded (note the return that was added), seems to cause a page fault, at least in NFS: Most Wanted. Is it possible that not adding a reference here causes the declaration object to be deallocated to early, when it is still used by the application ?
Yeah, that'll break refcounts.
Am 04.01.2007 um 19:33 schrieb H. Verbeet:
On 04/01/07, Christoph Bumiller e0425955@stud3.tuwien.ac.at wrote:
Not performing the following:
if (NULL != pDecl) { IWineD3DVertexDeclaration_AddRef(pDecl); }
in IWineD3DDeviceImpl_SetVertexDeclaration(...) when state is being recorded (note the return that was added), seems to cause a page fault, at least in NFS: Most Wanted. Is it possible that not adding a reference here causes the declaration object to be deallocated to early, when it is still used by the application ?
Yeah, that'll break refcounts.
Those addrefs and releases should be removed. Native d3d9 does not addref set objects, and our d3d9 doesn't do that either.
All other functions return from the setter before updating the refcount if the recording flag is set.