diff options
author | Jason Ekstrand <[email protected]> | 2016-02-26 22:47:59 -0800 |
---|---|---|
committer | Jason Ekstrand <[email protected]> | 2016-02-29 14:36:24 -0800 |
commit | 51b618285d846295ef90fa49364d39eea4843801 (patch) | |
tree | 3a206b38f9eac776c161db9ff0271e54ecadf716 /src/intel/vulkan/anv_pipeline.c | |
parent | 74b7b59db5d3ce986f92599b14feaaade63f7b12 (diff) |
anv/pipeline: Use dynamic checks for max push constants
The GEN_GEN macros aren't available in anv_pipeline since it only gets
compiled once for the whold driver.
Diffstat (limited to 'src/intel/vulkan/anv_pipeline.c')
-rw-r--r-- | src/intel/vulkan/anv_pipeline.c | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/src/intel/vulkan/anv_pipeline.c b/src/intel/vulkan/anv_pipeline.c index 81d0d9c9bd9..df265842ccc 100644 --- a/src/intel/vulkan/anv_pipeline.c +++ b/src/intel/vulkan/anv_pipeline.c @@ -783,13 +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 */ -#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_kb; + if (pipeline->device->info.gen >= 8) + push_constant_kb = 32; + else if (pipeline->device->info.is_haswell) + push_constant_kb = pipeline->device->info.gt == 3 ? 32 : 16; + else + push_constant_kb = 16; + unsigned push_constant_bytes = push_constant_kb * 1024; unsigned push_constant_chunks = push_constant_bytes / chunk_size_bytes; |