case TGSI_SEMANTIC_GENERIC:
if (index <= 63-4)
return 4 + index;
- else
- /* same explanation as in the default statement,
- * the only user hitting this is st/nine.
- */
- return 0;
+
+ assert(!"invalid generic index");
+ return 0;
/* patch indices are completely separate and thus start from 0 */
case TGSI_SEMANTIC_TESSOUTER:
return 2 + index;
default:
- /* Don't fail here. The result of this function is only used
- * for LS, TCS, TES, and GS, where legacy GL semantics can't
- * occur, but this function is called for all vertex shaders
- * before it's known whether LS will be compiled or not.
- */
+ assert(!"invalid semantic name");
return 0;
}
}
sel->patch_outputs_written |=
1llu << si_shader_io_get_unique_index(name, index);
break;
- default:
+
+ case TGSI_SEMANTIC_GENERIC:
+ /* don't process indices the function can't handle */
+ if (index >= 60)
+ break;
+ /* fall through */
+ case TGSI_SEMANTIC_POSITION:
+ case TGSI_SEMANTIC_PSIZE:
+ case TGSI_SEMANTIC_CLIPDIST:
sel->outputs_written |=
1llu << si_shader_io_get_unique_index(name, index);
+ break;
}
}
sel->esgs_itemsize = util_last_bit64(sel->outputs_written) * 16;