}
/* Lay out the URB in pipeline order: push constants, VS, HS, DS, GS. */
- int next = push_constant_chunks;
+ int first_urb = push_constant_chunks;
+
+ /* From the BDW PRM: for 3DSTATE_URB_*: VS URB Starting Address
+ *
+ * "Value: [4,48] Device [SliceCount] GT 1"
+ *
+ * From the ICL PRMs and above :
+ *
+ * "If CTXT_SR_CTL::POSH_Enable is clear and Push Constants are required
+ * or Device[SliceCount] GT 1, the lower limit is 4."
+ *
+ * "If Push Constants are not required andDevice[SliceCount] == 1, the
+ * lower limit is 0."
+ */
+ if ((devinfo->ver == 8 && devinfo->num_slices == 1) ||
+ (devinfo->ver >= 11 && push_constant_chunks > 0 && devinfo->num_slices == 1))
+ first_urb = MAX2(first_urb, 4);
+
+ int next_urb = first_urb;
for (int i = MESA_SHADER_VERTEX; i <= MESA_SHADER_GEOMETRY; i++) {
if (entries[i]) {
- start[i] = next;
- next += chunks[i];
+ start[i] = next_urb;
+ next_urb += chunks[i];
} else {
- /* Just put disabled stages at the beginning. */
- start[i] = 0;
+ /* Put disabled stages at the beginning of the valid range */
+ start[i] = first_urb;
}
}
return r;
}
-