mojoshader_assembler.c
changeset 1291 db27fb09421a
parent 1290 2febe5ae83ad
child 1298 b70ccc2c7a51
--- a/mojoshader_assembler.c	Mon Jul 20 16:14:43 2020 -0400
+++ b/mojoshader_assembler.c	Mon Jul 20 18:53:54 2020 -0400
@@ -1254,7 +1254,8 @@
     ctx->tokenbufpos = 0;
     ctx->default_writemask = instruction->default_writemask;
 
-    if (opcode == OPCODE_RCP)  // RCP has an implicit swizzle of .xxxx if not specified.
+    // RCP and RSQ have an implicit swizzle of .xxxx if not specified.
+    if ((opcode == OPCODE_RCP) || (opcode == OPCODE_RSQ))
         ctx->default_swizzle = 0;  // .xxxx replicate swizzle.
 
     const int tokcount = instruction->parse_args(ctx);