summaryrefslogtreecommitdiffstats
path: root/src/intel
diff options
context:
space:
mode:
authorKenneth Graunke <[email protected]>2016-02-22 17:26:15 -0800
committerKenneth Graunke <[email protected]>2016-02-24 11:13:08 -0800
commit3f115177302d1a969181649fde8c2332563aac73 (patch)
tree23330e63e24de512060aa29a2f43acabfcdb0e4e /src/intel
parent7f9b03cc8b44759895d5c4c42cfef8fa78269e7c (diff)
anv: Properly size the push constant L3 area.
We were assuming it was 32kB everywhere, reducing the available URB space. It's actually 16kB on Ivybridge, Baytrail, and Haswell GT1-2.
Diffstat (limited to 'src/intel')
-rw-r--r--src/intel/vulkan/anv_pipeline.c11
1 files changed, 8 insertions, 3 deletions
diff --git a/src/intel/vulkan/anv_pipeline.c b/src/intel/vulkan/anv_pipeline.c
index 672640ac24c..6c8d4add6e8 100644
--- a/src/intel/vulkan/anv_pipeline.c
+++ b/src/intel/vulkan/anv_pipeline.c
@@ -755,8 +755,6 @@ anv_pipeline_compile_cs(struct anv_pipeline *pipeline,
return VK_SUCCESS;
}
-static const int gen8_push_size = 32 * 1024;
-
static void
gen7_compute_urb_partition(struct anv_pipeline *pipeline)
{
@@ -785,7 +783,14 @@ gen7_compute_urb_partition(struct anv_pipeline *pipeline)
unsigned urb_chunks = devinfo->urb.size * 1024 / chunk_size_bytes;
/* Reserve space for push constants */
- unsigned push_constant_bytes = gen8_push_size;
+#if GEN_GEN >= 8
+ unsigned push_constant_kb = 32;
+#elif GEN_IS_HASWELL
+ unsigned push_constant_kb = pipeline->device->info.gt == 3 ? 32 : 16;
+#else
+ unsigned push_constant_kb = 16;
+#endif
+ unsigned push_constant_bytes = push_constant_kb * 1024;
unsigned push_constant_chunks =
push_constant_bytes / chunk_size_bytes;