Skip to content

Commit

Permalink
Assembler: Pixel shader DCL opcodes only specify usage for samplers.
Browse files Browse the repository at this point in the history
  • Loading branch information
icculus committed May 17, 2013
1 parent 10ee68d commit 4cf5176
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions mojoshader_assembler.c
Expand Up @@ -962,6 +962,8 @@ static int parse_args_DCL(Context *ctx)
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;

Expand Down

0 comments on commit 4cf5176

Please sign in to comment.