H. Verbeet : wined3d: Add a comment about D3D write masks and GLSL destination swizzles.

Alexandre Julliard julliard at wine.codeweavers.com
Tue Jan 16 10:07:29 CST 2007


Module: wine
Branch: master
Commit: aa4d88d6f8478aaf464ab8640b3f225aef118de2
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=aa4d88d6f8478aaf464ab8640b3f225aef118de2

Author: H. Verbeet <hverbeet at gmail.com>
Date:   Mon Jan 15 19:30:12 2007 +0100

wined3d: Add a comment about D3D write masks and GLSL destination swizzles.

---

 dlls/wined3d/glsl_shader.c |    8 ++++++++
 1 files changed, 8 insertions(+), 0 deletions(-)

diff --git a/dlls/wined3d/glsl_shader.c b/dlls/wined3d/glsl_shader.c
index fd44111..185d530 100644
--- a/dlls/wined3d/glsl_shader.c
+++ b/dlls/wined3d/glsl_shader.c
@@ -19,6 +19,14 @@
  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
  */
 
+/*
+ * D3D shader asm has swizzles on source parameters, and write masks for
+ * destination parameters. GLSL uses swizzles for both. The result of this is
+ * that for example "mov dst.xw, src.zyxw" becomes "dst.xw = src.zw" in GLSL.
+ * Ie, to generate a proper GLSL source swizzle, we need to take the D3D write
+ * mask for the destination parameter into account.
+ */
+
 #include "config.h"
 #include <stdio.h>
 #include "wined3d_private.h"




More information about the wine-cvs mailing list