[3/3] wined3d: Remove isInDraw hack from context_setup_target.

Stefan Dösinger stefandoesinger at gmx.at
Mon Aug 16 07:26:00 CDT 2010


Am 16.08.2010 um 13:58 schrieb Henri Verbeet:

> On 16 August 2010 13:25, Matteo Bruni <matteo.mystral at gmail.com> wrote:
>> It is conceptually wrong and actually broken too (as the comment there
>> said). Just remove the hack now and properly fix any regression
>> that may come up later by explicitely acquiring the right context where
>> needed (so, in surface_internal_preload and its callees).
> Note that isInDraw is mildly awful in itself, and we should probably
> get rid of it eventually. In most places where it's used it's probably
> an artifact of the old context management, but that needs to be
> checked.
Vertex buffer preloads are a problem. Between two draw calls the stateblock may be in an invalid state(e.g. a stream referenced by the vdecl is still set to NULL), so it may be unsafe for VB_PreLoad to attempt to find out which vertex attrib types are in the buffer.

Now that mechanism has changed a while ago too. Nowadys the VBO code uses the cached strided data from the device, rather than parsing it on its own.

There are also some places where isInDraw is used to avoid redundant "give me a context, any render target, any state" context_acquire calls.




More information about the wine-devel mailing list