intel/compiler: Add support for variable workgroup size

Add new builtin parameters that are used to keep track of the group
size.  This will be used to implement ARB_compute_variable_group_size.

The compiler will use the maximum group size supported to pick a
suitable SIMD variant.  A later improvement will be to keep all SIMD
variants (like FS) so the driver can select the best one at dispatch
time.

When variable workgroup size is used, the small workgroup optimization
is disabled as it we can't prove at compile time that the barriers
won't be needed.

Extracted from original i965 patch with additional changes by
Caio Marcelo de Oliveira Filho.

Reviewed-by: Caio Marcelo de Oliveira Filho <caio.oliveira@intel.com>
Reviewed-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4504>
This commit is contained in:
Plamena Manolova
2018-11-12 06:29:51 -08:00
committed by Caio Marcelo de Oliveira Filho
parent c54fc0d07b
commit c77dc51203
6 changed files with 101 additions and 29 deletions

View File

@@ -298,6 +298,7 @@ typedef struct shader_info {
struct {
uint16_t local_size[3];
uint16_t max_variable_local_size;
bool local_size_variable:1;
uint8_t user_data_components_amd:3;