intel/fs: Allow compute dispatch without a pushed subgroup ID on Gen12-HP

Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8342>
This commit is contained in:
Jason Ekstrand
2020-06-16 23:06:25 -05:00
committed by Jordan Justen
parent 9294193098
commit b4ffbf1521

View File

@@ -2195,11 +2195,15 @@ fs_visitor::compact_virtual_grfs()
}
static int
get_subgroup_id_param_index(const brw_stage_prog_data *prog_data)
get_subgroup_id_param_index(const gen_device_info *devinfo,
const brw_stage_prog_data *prog_data)
{
if (prog_data->nr_params == 0)
return -1;
if (devinfo->gen > 12 || gen_device_info_is_12hp(devinfo))
return -1;
/* The local thread id is always the last parameter in the list */
uint32_t last_param = prog_data->param[prog_data->nr_params - 1];
if (last_param == BRW_PARAM_BUILTIN_SUBGROUP_ID)
@@ -2371,7 +2375,8 @@ fs_visitor::assign_constant_locations()
}
}
int subgroup_id_index = get_subgroup_id_param_index(stage_prog_data);
int subgroup_id_index = get_subgroup_id_param_index(devinfo,
stage_prog_data);
/* Only allow 16 registers (128 uniform components) as push constants.
*
@@ -9213,7 +9218,7 @@ cs_fill_push_const_info(const struct gen_device_info *devinfo,
struct brw_cs_prog_data *cs_prog_data)
{
const struct brw_stage_prog_data *prog_data = &cs_prog_data->base;
int subgroup_id_index = get_subgroup_id_param_index(prog_data);
int subgroup_id_index = get_subgroup_id_param_index(devinfo, prog_data);
bool cross_thread_supported = devinfo->gen > 7 || devinfo->is_haswell;
/* The thread ID should be stored in the last param dword */