From aa4d88d6f8478aaf464ab8640b3f225aef118de2 Mon Sep 17 00:00:00 2001 From: "H. Verbeet" Date: Mon, 15 Jan 2007 19:30:12 +0100 Subject: [PATCH] wined3d: Add a comment about D3D write masks and GLSL destination swizzles. --- dlls/wined3d/glsl_shader.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/dlls/wined3d/glsl_shader.c b/dlls/wined3d/glsl_shader.c index fd441110d98..185d5308412 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 #include "wined3d_private.h"