[WINED3D] Improve pshader code structure
Ivan Gyurdiev
ivg2 at cornell.edu
Wed Apr 12 17:02:58 CDT 2006
The point of this patch is to pull out things like modifier processing
(write masks, saturate, swizzle) from different case statements, and put
them in a more common path, which simplifies code, and makes sure we
don't miss cases. Also, reorder things as appropriate to get rid of the
crazy continue/switch flow control that's confusing me. Dead code paths
were also if0'ed.
Patch introduces undesired effect that now input and output modifiers
are allowed on all instructions, which is definitely not valid according
to MSDN. However, I don't think we should care at this point, since
processing of valid shaders, and simplifying the code path should take
precedence. We can add validation later in a more appropriate place [
the current "validation" is to completely disable or enable modifiers on
certain instructions, which is not correct either - and it should fail,
not just print a fixme on error ].
Patch will enable processing _bx2 modifier on certain texture
instructions, which is valid in shaders 1.2/1.3. Also, is negation and
swizzling valid on texture instructions in 3.0? If it is, this will
process it. Also will enable write mask processing in some texture
instructions where it previously wasn't, generating more correct shader.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: wine.pshader_centralize.diff
Type: text/x-patch
Size: 25308 bytes
Desc: not available
Url : http://www.winehq.org/pipermail/wine-patches/attachments/20060412/fd5cb54f/wine.pshader_centralize-0001.diff
More information about the wine-patches
mailing list