mojoshader.c
changeset 1183 ec44ee868688
parent 1182 179ffe99c57f
child 1184 62922fc6abe9
equal deleted inserted replaced
1182:179ffe99c57f 1183:ec44ee868688
  9034             break;
  9034             break;
  9035 
  9035 
  9036         case SRCMOD_NOT:  // !!! FIXME: I _think_ this is right...
  9036         case SRCMOD_NOT:  // !!! FIXME: I _think_ this is right...
  9037             if (shader_version_atleast(ctx, 2, 0))
  9037             if (shader_version_atleast(ctx, 2, 0))
  9038             {
  9038             {
  9039                 if (info->regtype != REG_TYPE_PREDICATE)
  9039                 if (info->regtype != REG_TYPE_PREDICATE
  9040                     fail(ctx, "NOT only allowed on predicate register.");
  9040                  && info->regtype != REG_TYPE_CONSTBOOL)
       
  9041                     fail(ctx, "NOT only allowed on bool registers.");
  9041             } // if
  9042             } // if
  9042             break;
  9043             break;
  9043 
  9044 
  9044         default:
  9045         default:
  9045             fail(ctx, "Unknown source modifier");
  9046             fail(ctx, "Unknown source modifier");
 10720     {
 10721     {
 10721         uint32 subtokcount = 0;
 10722         uint32 subtokcount = 0;
 10722         if ( (!is_comment_token(ctx, *tokens, &subtokcount)) ||
 10723         if ( (!is_comment_token(ctx, *tokens, &subtokcount)) ||
 10723              (subtokcount > tokcount) )
 10724              (subtokcount > tokcount) )
 10724         {
 10725         {
       
 10726             // !!! FIXME: Standalone preshaders have this EOS-looking token,
       
 10727             // !!! FIXME:  sometimes followed by tokens that don't appear to
       
 10728             // !!! FIXME:  have anything to do with the rest of the blob.
       
 10729             // !!! FIXME: So for now, treat this as a special "EOS" comment.
       
 10730             if (SWAP32(*tokens) == 0xFFFF)
       
 10731                 break;
       
 10732 
 10725             fail(ctx, "Bogus preshader data.");
 10733             fail(ctx, "Bogus preshader data.");
 10726             return;
 10734             return;
 10727         } // if
 10735         } // if
 10728 
 10736 
 10729         tokens++;
 10737         tokens++;