mojoshader_assembler.c
changeset 1132 b784577caefa
parent 1130 80fc68215dec
child 1156 6e760a19f456
equal deleted inserted replaced
1131:133cf29e30ed 1132:b784577caefa
   960     const int samplerreg = (ctx->dest_arg.regtype == REG_TYPE_SAMPLER);
   960     const int samplerreg = (ctx->dest_arg.regtype == REG_TYPE_SAMPLER);
   961     if (issampler != samplerreg)
   961     if (issampler != samplerreg)
   962         fail(ctx, "Invalid usage");
   962         fail(ctx, "Invalid usage");
   963     else if (samplerreg)
   963     else if (samplerreg)
   964         ctx->tokenbuf[0] = (usage << 27) | 0x80000000;
   964         ctx->tokenbuf[0] = (usage << 27) | 0x80000000;
       
   965     else if (shader_is_pixel(ctx))  // all other pixel shader types are zero'd.
       
   966         ctx->tokenbuf[0] = 0x80000000;
   965     else
   967     else
   966         ctx->tokenbuf[0] = usage | (index << 16) | 0x80000000;
   968         ctx->tokenbuf[0] = usage | (index << 16) | 0x80000000;
   967 
   969 
   968     return 3;
   970     return 3;
   969 } // parse_args_DCL
   971 } // parse_args_DCL