unsigned prev;
- for (prev = 0; prev < MESA_SHADER_STAGES; prev++) {
+ for (prev = 0; prev <= MESA_SHADER_FRAGMENT; prev++) {
if (prog->_LinkedShaders[prev] != NULL)
break;
}
/* Validate the inputs of each stage with the output of the preceding
* stage.
*/
- for (unsigned i = prev + 1; i < MESA_SHADER_STAGES; i++) {
+ for (unsigned i = prev + 1; i <= MESA_SHADER_FRAGMENT; i++) {
if (prog->_LinkedShaders[i] == NULL)
continue;
}
unsigned first;
- for (first = 0; first < MESA_SHADER_STAGES; first++) {
+ for (first = 0; first <= MESA_SHADER_FRAGMENT; first++) {
if (prog->_LinkedShaders[first] != NULL)
break;
}
* eliminated if they are (transitively) not used in a later stage.
*/
int last, next;
- for (last = MESA_SHADER_STAGES-1; last >= 0; last--) {
+ for (last = MESA_SHADER_FRAGMENT; last >= 0; last--) {
if (prog->_LinkedShaders[last] != NULL)
break;
}