mojoshader.c
branchtrunk
changeset 62 c504bde0e80c
parent 61 0a1de4d2ba04
child 63 97048a10fc97
equal deleted inserted replaced
61:0a1de4d2ba04 62:c504bde0e80c
  2643 {
  2643 {
  2644     if (ctx->loops <= 0)
  2644     if (ctx->loops <= 0)
  2645         fail(ctx, "ENDLOOP without LOOP");
  2645         fail(ctx, "ENDLOOP without LOOP");
  2646     ctx->loops--;
  2646     ctx->loops--;
  2647 } // state_ENDLOOP
  2647 } // state_ENDLOOP
       
  2648 
       
  2649 static void state_BREAKP(Context *ctx)
       
  2650 {
       
  2651     const RegisterType regtype = ctx->source_args[0].regtype;
       
  2652     if (regtype != REGISTER_TYPE_PREDICATE)
       
  2653         fail(ctx, "BREAKP argument isn't predicate register");
       
  2654 } // state_BREAKP
  2648 
  2655 
  2649 
  2656 
  2650 // Lookup table for instruction opcodes...
  2657 // Lookup table for instruction opcodes...
  2651 typedef struct
  2658 typedef struct
  2652 {
  2659 {
  2769     INSTRUCTION(DSX, 2, DS, MOJOSHADER_TYPE_ANY),
  2776     INSTRUCTION(DSX, 2, DS, MOJOSHADER_TYPE_ANY),
  2770     INSTRUCTION(DSY, 2, DS, MOJOSHADER_TYPE_ANY),
  2777     INSTRUCTION(DSY, 2, DS, MOJOSHADER_TYPE_ANY),
  2771     INSTRUCTION(TEXLDD, 5, DSSSS, MOJOSHADER_TYPE_ANY),
  2778     INSTRUCTION(TEXLDD, 5, DSSSS, MOJOSHADER_TYPE_ANY),
  2772     INSTRUCTION(SETP, 3, DSS, MOJOSHADER_TYPE_ANY),
  2779     INSTRUCTION(SETP, 3, DSS, MOJOSHADER_TYPE_ANY),
  2773     INSTRUCTION(TEXLDL, 3, DSS, MOJOSHADER_TYPE_ANY),
  2780     INSTRUCTION(TEXLDL, 3, DSS, MOJOSHADER_TYPE_ANY),
  2774     INSTRUCTION(BREAKP, 1, S, MOJOSHADER_TYPE_ANY),  // src
  2781     INSTRUCTION_STATE(BREAKP, 1, S, MOJOSHADER_TYPE_ANY),
  2775 
  2782 
  2776     #undef INSTRUCTION
  2783     #undef INSTRUCTION
  2777     #undef INSTRUCTION_STATE
  2784     #undef INSTRUCTION_STATE
  2778 };
  2785 };
  2779 
  2786