From: Jordan Justen Date: Sun, 28 Feb 2016 18:47:35 +0000 (-0800) Subject: anv/pipeline: Set FS URB space to zero if the FS is unused X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=ef06ddb08a066a72b9a98cd2fbef8a74c99b8b32;p=mesa.git anv/pipeline: Set FS URB space to zero if the FS is unused Signed-off-by: Jordan Justen --- diff --git a/src/intel/vulkan/anv_pipeline.c b/src/intel/vulkan/anv_pipeline.c index f6e3aedda40..81d0d9c9bd9 100644 --- a/src/intel/vulkan/anv_pipeline.c +++ b/src/intel/vulkan/anv_pipeline.c @@ -894,14 +894,17 @@ gen7_compute_urb_partition(struct anv_pipeline *pipeline) 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