[WINED3D] Shaders: share dump_param function, version functions

Ivan Gyurdiev ivg2 at cornell.edu
Sun May 14 08:43:31 CDT 2006


Share the dump_param function between pixel and vertex shaders.

- The pixel shader version was used, since it was more complete, and a 
superset of the other.
- The pixel shader RASTOUT case was not used, in favor of the vertex 
RASTOUT case - that's because RASTOUT is not valid on pixel shaders - 
instead COLOROUT and DEPTHOUT were added to handle pshaders.
- The only way to tell apart an address register (vshader) from a 
texture register (pshader) is to check what kind of shader this is. 
Therefore I moved the version checks into the shared header to do that 
(and fixed one of them to match baseshader). H. Verbeet was arguing 
against baseshader knowing about its subclasses, but I disagree with him 
here - 98% of this function is exactly the same, and adding any kind of 
complexity to hide this detail from baseshader is not justified. In 
fact, I think if we keep focusing on merging the two types of shaders, 
eventually there should be very little code left in the subclasses.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: shader.share_dump_param.diff
Type: text/x-patch
Size: 21503 bytes
Desc: not available
Url : http://www.winehq.org/pipermail/wine-patches/attachments/20060514/59d91f1d/shader.share_dump_param-0001.diff


More information about the wine-patches mailing list