\r
switch( file ) {\r
case TGSI_FILE_INPUT:\r
- /*\r
- * The fragment/vertex program input indexes (FRAG/VERT_ATTRIB_x) get\r
- * mapped to a packed sequence of integers.\r
- * If a program uses one input attribute, the mapped index will be 1.\r
- * If a program uses two input attribs, the mapped indexes will be 1,2.\r
- * If a program uses 3 input attribs, the mapped indexes will be 1,2,3.\r
- * etc.\r
- */\r
+ /* inputs are mapped according to the user-defined map */\r
return inputMapping[index];\r
\r
case TGSI_FILE_OUTPUT:\r
- /*\r
- assert( usage_bitmask == 0x0 );\r
- */\r
if( processor == TGSI_PROCESSOR_FRAGMENT ) {\r
- /* depth result -> index 0\r
+ /* fragment program outputs are hard-coded:\r
+ * depth result -> index 0\r
* color results -> index 1, 2, ...\r
*/\r
if( index == FRAG_RESULT_DEPR ) {\r
}\r
}\r
else {\r
- /* vertex output slots are tightly packed, find mapped pos */\r
- /* mapped_index = VERT_RESULT_x */\r
+ /* vertex outputs are mapped according to the user-defined map */\r
mapped_index = outputMapping[index];\r
}\r
break;\r