mojoshader.c
branchtrunk
changeset 177 ca94ec9366f7
parent 176 e0e7def8f876
child 178 b1d354511685
equal deleted inserted replaced
176:e0e7def8f876 177:ca94ec9366f7
  3719 {
  3719 {
  3720     if (ctx->dest_arg.regtype != REG_TYPE_ADDRESS)
  3720     if (ctx->dest_arg.regtype != REG_TYPE_ADDRESS)
  3721         fail(ctx, "MOVA argument isn't address register");
  3721         fail(ctx, "MOVA argument isn't address register");
  3722 } // state_MOVA
  3722 } // state_MOVA
  3723 
  3723 
       
  3724 static void state_RCP(Context *ctx)
       
  3725 {
       
  3726     if (!replicate_swizzle(ctx->source_args[0].swizzle))
       
  3727         fail(ctx, "RCP without replicate swizzzle");
       
  3728 } // state_RCP
       
  3729 
  3724 static void state_LOOP(Context *ctx)
  3730 static void state_LOOP(Context *ctx)
  3725 {
  3731 {
  3726     if (ctx->source_args[0].regtype != REG_TYPE_LOOP)
  3732     if (ctx->source_args[0].regtype != REG_TYPE_LOOP)
  3727         fail(ctx, "LOOP argument isn't loop register");
  3733         fail(ctx, "LOOP argument isn't loop register");
  3728     else if (ctx->source_args[1].regtype != REG_TYPE_CONSTINT)
  3734     else if (ctx->source_args[1].regtype != REG_TYPE_CONSTINT)
  3912     INSTRUCTION(MOV, DS, MOJOSHADER_TYPE_ANY),
  3918     INSTRUCTION(MOV, DS, MOJOSHADER_TYPE_ANY),
  3913     INSTRUCTION(ADD, DSS, MOJOSHADER_TYPE_ANY),
  3919     INSTRUCTION(ADD, DSS, MOJOSHADER_TYPE_ANY),
  3914     INSTRUCTION(SUB, DSS, MOJOSHADER_TYPE_ANY),
  3920     INSTRUCTION(SUB, DSS, MOJOSHADER_TYPE_ANY),
  3915     INSTRUCTION(MAD, DSSS, MOJOSHADER_TYPE_ANY),
  3921     INSTRUCTION(MAD, DSSS, MOJOSHADER_TYPE_ANY),
  3916     INSTRUCTION(MUL, DSS, MOJOSHADER_TYPE_ANY),
  3922     INSTRUCTION(MUL, DSS, MOJOSHADER_TYPE_ANY),
  3917     INSTRUCTION(RCP, DS, MOJOSHADER_TYPE_ANY),
  3923     INSTRUCTION_STATE(RCP, DS, MOJOSHADER_TYPE_ANY),
  3918     INSTRUCTION(RSQ, DS, MOJOSHADER_TYPE_ANY),
  3924     INSTRUCTION(RSQ, DS, MOJOSHADER_TYPE_ANY),
  3919     INSTRUCTION(DP3, DSS, MOJOSHADER_TYPE_ANY),
  3925     INSTRUCTION(DP3, DSS, MOJOSHADER_TYPE_ANY),
  3920     INSTRUCTION(DP4, DSS, MOJOSHADER_TYPE_ANY),
  3926     INSTRUCTION(DP4, DSS, MOJOSHADER_TYPE_ANY),
  3921     INSTRUCTION(MIN, DSS, MOJOSHADER_TYPE_ANY),
  3927     INSTRUCTION(MIN, DSS, MOJOSHADER_TYPE_ANY),
  3922     INSTRUCTION(MAX, DSS, MOJOSHADER_TYPE_ANY),
  3928     INSTRUCTION(MAX, DSS, MOJOSHADER_TYPE_ANY),