summaryrefslogtreecommitdiffstats
path: root/src/intel/vulkan/anv_pipeline.c
diff options
context:
space:
mode:
authorJason Ekstrand <[email protected]>2016-03-08 18:10:22 -0800
committerJason Ekstrand <[email protected]>2016-05-27 15:17:43 -0700
commit54324877926caa28b8ebd89d95b4e7c2447d17b8 (patch)
tree663cbfa6f9c3ee2ae7ff1c8939489352245febd0 /src/intel/vulkan/anv_pipeline.c
parent2cee0d0f9c9e9e269885b1d943ff123e033d9b52 (diff)
anv: Move push constant allocation to the command buffer
Instead of blasting it out as part of the pipeline, we put it in the command buffer and only blast it out when it's really needed. Since the PUSH_CONSTANT_ALLOC commands aren't pipelined, they immediately cause a stall which we would like to avoid. Signed-off-by: Jason Ekstrand <[email protected]> Reviewed-by: Jordan Justen <[email protected]>
Diffstat (limited to 'src/intel/vulkan/anv_pipeline.c')
-rw-r--r--src/intel/vulkan/anv_pipeline.c22
1 files changed, 0 insertions, 22 deletions
diff --git a/src/intel/vulkan/anv_pipeline.c b/src/intel/vulkan/anv_pipeline.c
index d63e50e228b..789bc1a4f1e 100644
--- a/src/intel/vulkan/anv_pipeline.c
+++ b/src/intel/vulkan/anv_pipeline.c
@@ -940,28 +940,6 @@ anv_compute_urb_partition(struct anv_pipeline *pipeline)
pipeline->urb.start[MESA_SHADER_TESS_EVAL] = push_constant_chunks;
pipeline->urb.size[MESA_SHADER_TESS_EVAL] = 1;
pipeline->urb.entries[MESA_SHADER_TESS_EVAL] = 0;
-
- const unsigned stages =
- _mesa_bitcount(pipeline->active_stages & VK_SHADER_STAGE_ALL_GRAPHICS);
- unsigned size_per_stage = stages ? (push_constant_kb / stages) : 0;
- unsigned used_kb = 0;
-
- /* Broadwell+ and Haswell gt3 require that the push constant sizes be in
- * units of 2KB. Incidentally, these are the same platforms that have
- * 32KB worth of push constant space.
- */
- if (push_constant_kb == 32)
- size_per_stage &= ~1u;
-
- 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 - used_kb;
}
static void