[1] WineD3D: Add the state dirtification infrastructure

Alexandre Julliard julliard at winehq.org
Sat Dec 16 09:51:23 CST 2006

Stefan Dösinger <stefan at codeweavers.com> writes:

> The main arguments for a list were:
> * The shader constant code uses it too. It keeps the code somewhat simmilar
> * memory usage. An array has a fixed sizeof(DWORD) * STATE_HIGHEST mem usage, 
> while a list has sizeof(DWORD) + 2*sizeof(void *) * number of dirty states 
> memory usage. well, that was the idea

That list thing still looks very inefficient. If you don't want a full
array (though I note you have one anyway in your code) you can use a
growing DWORD array of dirty states id; then adding a state become
simply something like dirtyStates[count++] = state.

Alexandre Julliard
julliard at winehq.org

More information about the wine-devel mailing list