[WINED3D] Improve pshader code structure (Try 2: rename variables)

Ivan Gyurdiev ivg2 at cornell.edu
Thu Apr 13 09:29:00 CDT 2006


Rename some variables.

Specifically:
- don't use names like buf, and tmp, use names that show what's in the 
variable

- append _mod as a convention after the parameters/output with modifiers 
applied

- treat "parameters" with respect to the source tokens, not with respect 
to the instruction
It seems to make the code more clear when you can tell the output 
register from the input ones.
The output register also has different modifiers applied to it, so it's 
useful to clearly identify it.

- merge regs and operands arrays for arithmetic instructions, they do 
the same thing - temporary storage to get the end result, which is the 
OpenGL register with applied modifiers

The loop counters might look ugly in this patch, but they'll be improved 
with the other patches.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: wine.pshader.centralize2_rename.diff
Type: text/x-patch
Size: 19341 bytes
Desc: not available
Url : http://www.winehq.org/pipermail/wine-patches/attachments/20060413/356a7bd8/wine.pshader.centralize2_rename-0001.diff


More information about the wine-patches mailing list