utils/testparse.c
changeset 1152 8f7653f0dc37
parent 1150 02c0f0afb39a
child 1156 6e760a19f456
equal deleted inserted replaced
1151:5e0ebc5366f3 1152:8f7653f0dc37
   452         "PIXELSHADER",
   452         "PIXELSHADER",
   453         "VERTEXSHADER",
   453         "VERTEXSHADER",
   454         "UNSUPPORTED"
   454         "UNSUPPORTED"
   455     };
   455     };
   456     do_indent(indent + 1);
   456     do_indent(indent + 1);
   457     printf("CLASS: %s\n", classes[value->value_class]);
   457     printf("CLASS: %s\n", classes[value->type.parameter_class]);
   458     do_indent(indent + 1);
   458     do_indent(indent + 1);
   459     printf("TYPE: %s\n", types[value->value_type]);
   459     printf("TYPE: %s\n", types[value->type.parameter_type]);
   460 
   460 
   461     do_indent(indent + 1);
   461     do_indent(indent + 1);
   462     printf("ROWS/COLUMNS/ELEMENTS: %d, %d, %d\n",
   462     printf("ROWS/COLUMNS/ELEMENTS: %d, %d, %d\n",
   463            value->row_count, value->column_count, value->element_count);
   463            value->type.rows, value->type.columns, value->type.elements);
   464     do_indent(indent + 1);
   464     do_indent(indent + 1);
   465     printf("TOTAL VALUES: %d\n", value->value_count);
   465     printf("TOTAL VALUES: %d\n", value->value_count);
   466 
   466 
   467     if (value->value_type == MOJOSHADER_SYMTYPE_SAMPLER
   467     if (value->type.parameter_type == MOJOSHADER_SYMTYPE_SAMPLER
   468      || value->value_type == MOJOSHADER_SYMTYPE_SAMPLER1D
   468      || value->type.parameter_type == MOJOSHADER_SYMTYPE_SAMPLER1D
   469      || value->value_type == MOJOSHADER_SYMTYPE_SAMPLER2D
   469      || value->type.parameter_type == MOJOSHADER_SYMTYPE_SAMPLER2D
   470      || value->value_type == MOJOSHADER_SYMTYPE_SAMPLER3D
   470      || value->type.parameter_type == MOJOSHADER_SYMTYPE_SAMPLER3D
   471      || value->value_type == MOJOSHADER_SYMTYPE_SAMPLERCUBE)
   471      || value->type.parameter_type == MOJOSHADER_SYMTYPE_SAMPLERCUBE)
   472     {
   472     {
   473         do_indent(indent + 1);
   473         do_indent(indent + 1);
   474         printf("SAMPLER VALUES:\n");
   474         printf("SAMPLER VALUES:\n");
   475         for (i = 0; i < value->value_count; i++)
   475         for (i = 0; i < value->value_count; i++)
   476         {
   476         {
   514         } // for
   514         } // for
   515     } // if
   515     } // if
   516     else
   516     else
   517     {
   517     {
   518         do_indent(indent + 1);
   518         do_indent(indent + 1);
   519         printf("%s VALUES:\n", types[value->value_type]);
   519         printf("%s VALUES:\n", types[value->type.parameter_type]);
   520         for (i = 0; i < value->value_count; i++)
   520         for (i = 0; i < value->value_count; i++)
   521         {
   521         {
   522             do_indent(indent + 2);
   522             do_indent(indent + 2);
   523             static const char *prints[] =
   523             static const char *prints[] =
   524             {
   524             {
   539                 "SAMPLER?!\n",
   539                 "SAMPLER?!\n",
   540                 "%d\n",
   540                 "%d\n",
   541                 "%d\n",
   541                 "%d\n",
   542                 "%X\n"
   542                 "%X\n"
   543             };
   543             };
   544             if (value->value_type == MOJOSHADER_SYMTYPE_FLOAT)
   544             if (value->type.parameter_type == MOJOSHADER_SYMTYPE_FLOAT)
   545                 printf(prints[value->value_type], value->valuesF[i]);
   545                 printf(prints[value->type.parameter_type], value->valuesF[i]);
   546             else
   546             else
   547                 printf(prints[value->value_type], value->valuesI[i]);
   547                 printf(prints[value->type.parameter_type], value->valuesI[i]);
   548         } // for
   548         } // for
   549     } // else
   549     } // else
   550 } // print_value
   550 } // print_value
   551 
   551 
   552 
   552