Assembler: Pixel shader DCL opcodes only specify usage for samplers.
authorRyan C. Gordon <icculus@icculus.org>
Fri, 17 May 2013 15:01:09 -0400
changeset 1132 b784577caefa
parent 1131 133cf29e30ed
child 1133 eb1eb43987b3
Assembler: Pixel shader DCL opcodes only specify usage for samplers.
mojoshader_assembler.c
--- a/mojoshader_assembler.c	Fri May 17 15:00:34 2013 -0400
+++ b/mojoshader_assembler.c	Fri May 17 15:01:09 2013 -0400
@@ -962,6 +962,8 @@
         fail(ctx, "Invalid usage");
     else if (samplerreg)
         ctx->tokenbuf[0] = (usage << 27) | 0x80000000;
+    else if (shader_is_pixel(ctx))  // all other pixel shader types are zero'd.
+        ctx->tokenbuf[0] = 0x80000000;
     else
         ctx->tokenbuf[0] = usage | (index << 16) | 0x80000000;