[PATCH] d3dx9: Move object initialization into a separate function.

Rico Schüller kgbricola at web.de
Tue Oct 8 14:37:07 CDT 2013


Hi,

this moves the object initialization into a separate function, so it 
could be used for strings and resources. It also removes the STATE_TYPE 
as we could distinguish the types at the object level.

1. When an object has a destination, it points to another shader 
variable. This was state ST_PARAMETER.

2. If a variable has something in data, it is fxlc, shader (preshader) 
or a string. This was state ST_CONSTANT and ST_FXLC.

3. If it has both (destination and data), it points to an array of 
shader variables. The name is in the destination, the index could be 
calculated with the data. This will be added in a later patch.

Also saving the destination parameter in the object gains some speed 
when we need to access the variable as we don't need to run 
get_parameter_by_name() each time we need the variable ...

Cheers
Rico

---
  dlls/d3dx9_36/effect.c | 98 
++++++++++++++++++--------------------------------
  1 Datei geändert, 34 Zeilen hinzugefügt(+), 64 Zeilen entfernt(-)


-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-d3dx9-Move-object-initialization-into-a-separate-funct.txt
Type: text/x-patch
Size: 5977 bytes
Desc: not available
URL: <http://www.winehq.org/pipermail/wine-patches/attachments/20131008/263ceeb6/attachment.bin>


More information about the wine-patches mailing list