intel: Add and use max_constant_urb_size_kb

This knowledge was repeated in multiple places so move the values to
intel_device_info struct.

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Acked-by: Jason Ekstrand <jason@jlekstrand.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13014>
This commit is contained in:
Caio Marcelo de Oliveira Filho
2021-09-23 22:59:40 -07:00
committed by Marge Bot
parent f349c8ab4b
commit 37f03e89f2
7 changed files with 17 additions and 18 deletions
+2 -7
View File
@@ -2501,13 +2501,8 @@ cmd_buffer_alloc_push_constants(struct anv_cmd_buffer *cmd_buffer)
if (stages == cmd_buffer->state.gfx.push_constant_stages)
return;
#if GFX_VER >= 8
const unsigned push_constant_kb = 32;
#elif GFX_VERx10 == 75
const unsigned push_constant_kb = cmd_buffer->device->info.gt == 3 ? 32 : 16;
#else
const unsigned push_constant_kb = 16;
#endif
const unsigned push_constant_kb =
cmd_buffer->device->info.max_constant_urb_size_kb;
const unsigned num_stages =
util_bitcount(stages & VK_SHADER_STAGE_ALL_GRAPHICS);