WineD3D State management - going live(TM)

Ivan Gyurdiev ivg231 at gmail.com
Sat Oct 21 23:26:16 CDT 2006


> and we loose the ability to 
> set up a constant table in the code.
The constant table is usually a bad idea, and this demonstrates why - 
the texture format table is another one where somehow we've been able to 
get away with staying constant, but I am sure issues will show up in the 
future involving extensions and conditional support for formats (or 
conflicting support from two extensions ?), which will prove that table 
to be insufficient as well. When I considered changing this table on 
AJ's request (before your patch), I started writing it as a big switch 
statement for that reason [ not to say I like big switch statements, but 
it seemed more flexible that way ].

Constant is convenient, but if it can't meet all necessary requirements, 
I wouldn't hesitate to drop the idea - never compromise on design in 
favor of C optimizations. Tomorrow's hardware will make any 
non-algorithmic optimizations irrelevant.




More information about the wine-devel mailing list