}
/* Lay out the URB in pipeline order: push constants, VS, HS, DS, GS. */
- start[0] = push_constant_chunks;
- for (int i = MESA_SHADER_TESS_CTRL; i <= MESA_SHADER_GEOMETRY; i++) {
- start[i] = start[i - 1] + chunks[i - 1];
+ int next = push_constant_chunks;
+ for (int i = MESA_SHADER_VERTEX; i <= MESA_SHADER_GEOMETRY; i++) {
+ if (entries[i]) {
+ start[i] = next;
+ next += chunks[i];
+ } else {
+ /* Just put disabled stages at the beginning. */
+ start[i] = 0;
+ }
}
}