Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
const unsigned stages =
_mesa_bitcount(pipeline->active_stages & VK_SHADER_STAGE_ALL_GRAPHICS);
const unsigned size_per_stage = push_constant_kb / stages;
+ unsigned used_kb = 0;
for (int i = MESA_SHADER_VERTEX; i < MESA_SHADER_FRAGMENT; i++) {
pipeline->urb.push_size[i] =
(pipeline->active_stages & (1 << i)) ? size_per_stage : 0;
+ used_kb += pipeline->urb.push_size[i];
+ assert(used_kb <= push_constant_kb);
}
pipeline->urb.push_size[MESA_SHADER_FRAGMENT] =
- push_constant_kb - size_per_stage * (stages - 1);
+ push_constant_kb - used_kb;
}
static void