summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJordan Justen <[email protected]>2016-02-28 10:47:35 -0800
committerJordan Justen <[email protected]>2016-02-28 10:51:38 -0800
commitef06ddb08a066a72b9a98cd2fbef8a74c99b8b32 (patch)
tree94cd5659651ecf16878dc961287bdccd8fb0aa65
parent45d8ce07a5838977bd875fdeb008ccecc6eb976e (diff)
anv/pipeline: Set FS URB space to zero if the FS is unused
Signed-off-by: Jordan Justen <[email protected]>
-rw-r--r--src/intel/vulkan/anv_pipeline.c5
1 files changed, 4 insertions, 1 deletions
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