mojoshader_common.c
changeset 1300 f1cdc5187d53
parent 1278 be0f548f321f
child 1301 79bbc92200dc
equal deleted inserted replaced
1299:02d36217591b 1300:f1cdc5187d53
  1071     const uint32 texcoord0Loc = pTable->attrib_offsets[MOJOSHADER_USAGE_TEXCOORD][0];
  1071     const uint32 texcoord0Loc = pTable->attrib_offsets[MOJOSHADER_USAGE_TEXCOORD][0];
  1072 
  1072 
  1073     for (i = 0; i < pixel->attribute_count; i++)
  1073     for (i = 0; i < pixel->attribute_count; i++)
  1074     {
  1074     {
  1075         const MOJOSHADER_attribute *pAttr = &pixel->attributes[i];
  1075         const MOJOSHADER_attribute *pAttr = &pixel->attributes[i];
       
  1076         if (pAttr->usage == MOJOSHADER_USAGE_UNKNOWN)
       
  1077             continue; // Probably something like VPOS, ignore!
  1076         if (pAttr->usage == MOJOSHADER_USAGE_COLOR && pAttr->index == 0)
  1078         if (pAttr->usage == MOJOSHADER_USAGE_COLOR && pAttr->index == 0)
  1077             continue;
  1079             continue;
  1078 
  1080 
  1079         // The input may not exist in the output list!
  1081         // The input may not exist in the output list!
  1080         pOffset = pTable->attrib_offsets[pAttr->usage][pAttr->index];
  1082         pOffset = pTable->attrib_offsets[pAttr->usage][pAttr->index];
  1087 
  1089 
  1088     // There may be outputs not present in the input list!
  1090     // There may be outputs not present in the input list!
  1089     for (i = 0; i < vertex->output_count; i++)
  1091     for (i = 0; i < vertex->output_count; i++)
  1090     {
  1092     {
  1091         const MOJOSHADER_attribute *vAttr = &vertex->outputs[i];
  1093         const MOJOSHADER_attribute *vAttr = &vertex->outputs[i];
       
  1094         assert(vAttr->usage != MOJOSHADER_USAGE_UNKNOWN);
  1092         if (vAttr->usage == MOJOSHADER_USAGE_POSITION && vAttr->index == 0)
  1095         if (vAttr->usage == MOJOSHADER_USAGE_POSITION && vAttr->index == 0)
  1093             continue;
  1096             continue;
  1094         if (vAttr->usage == MOJOSHADER_USAGE_POINTSIZE && vAttr->index == 0)
  1097         if (vAttr->usage == MOJOSHADER_USAGE_POINTSIZE && vAttr->index == 0)
  1095             continue;
  1098             continue;
  1096         if (vAttr->usage == MOJOSHADER_USAGE_COLOR && vAttr->index == 0)
  1099         if (vAttr->usage == MOJOSHADER_USAGE_COLOR && vAttr->index == 0)