brw: Return actual progress in brw_lower_scoreboard
This will be useful later for tests to be used in conjunction with the EXPECT_PROGRESS / EXPECT_NO_PROGRESS helpers. Reviewed-by: Ian Romanick <ian.d.romanick@intel.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34354>
This commit is contained in:
@@ -1287,11 +1287,12 @@ namespace {
|
||||
* inserting additional SYNC instructions for dependencies that can't be
|
||||
* represented directly by annotating existing instructions.
|
||||
*/
|
||||
void
|
||||
bool
|
||||
emit_inst_dependencies(brw_shader *shader,
|
||||
const ordered_address *jps,
|
||||
const dependency_list *deps)
|
||||
{
|
||||
bool progress = false;
|
||||
const struct intel_device_info *devinfo = shader->devinfo;
|
||||
unsigned ip = 0;
|
||||
|
||||
@@ -1304,6 +1305,9 @@ namespace {
|
||||
tgl_swsb swsb = !ordered_mode ? tgl_swsb() :
|
||||
ordered_dependency_swsb(deps[ip], jps[ip], exec_all);
|
||||
|
||||
if (deps[ip].size())
|
||||
progress = true;
|
||||
|
||||
for (unsigned i = 0; i < deps[ip].size(); i++) {
|
||||
const dependency &dep = deps[ip][i];
|
||||
|
||||
@@ -1357,21 +1361,25 @@ namespace {
|
||||
inst->no_dd_check = inst->no_dd_clear = false;
|
||||
ip++;
|
||||
}
|
||||
|
||||
return progress;
|
||||
}
|
||||
}
|
||||
|
||||
bool
|
||||
brw_lower_scoreboard(brw_shader &s)
|
||||
{
|
||||
bool progress = false;
|
||||
|
||||
if (s.devinfo->ver >= 12) {
|
||||
const ordered_address *jps = ordered_inst_addresses(&s);
|
||||
const dependency_list *deps0 = gather_inst_dependencies(&s, jps);
|
||||
const dependency_list *deps1 = allocate_inst_dependencies(&s, deps0);
|
||||
emit_inst_dependencies(&s, jps, deps1);
|
||||
progress = emit_inst_dependencies(&s, jps, deps1);
|
||||
delete[] deps1;
|
||||
delete[] deps0;
|
||||
delete[] jps;
|
||||
}
|
||||
|
||||
return true;
|
||||
return progress;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user