17 Dec
2006
17 Dec
'06
11:58 a.m.
Am Samstag 16 Dezember 2006 16:51 schrieben Sie:
Stefan Dösinger <stefan(a)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. That was my original idea, I think I'll go back to that :-)