anv: fix generated indirect draw shader stats checks

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Fixes: c950fe97a0 ("anv: implement generated (indexed) indirect draws")
Tested-by: Rohan Garg <rohan.garg@intel.com>
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20776>
(cherry picked from commit 5ff3d4a8a2)
This commit is contained in:
Lionel Landwerlin 2023-01-12 19:56:43 +02:00 committed by Dylan Baker
parent 4e341d22c2
commit 5c92a8394b
2 changed files with 14 additions and 10 deletions

View file

@ -400,7 +400,7 @@
"description": "anv: fix generated indirect draw shader stats checks",
"nominated": true,
"nomination_type": 1,
"resolution": 0,
"resolution": 1,
"main_sha": null,
"because_sha": "c950fe97a05ef54e8298544a4582d21e524ada08"
},

View file

@ -230,20 +230,24 @@ compile_upload_spirv(struct anv_device *device,
};
const unsigned *program = brw_compile_fs(compiler, nir, &params);
unsigned stat_idx = 0;
if (wm_prog_data.dispatch_8) {
assert(stats[0].spills == 0);
assert(stats[0].fills == 0);
assert(stats[0].sends == sends_count_expectation);
assert(stats[stat_idx].spills == 0);
assert(stats[stat_idx].fills == 0);
assert(stats[stat_idx].sends == sends_count_expectation);
stat_idx++;
}
if (wm_prog_data.dispatch_16) {
assert(stats[1].spills == 0);
assert(stats[1].fills == 0);
assert(stats[1].sends == sends_count_expectation);
assert(stats[stat_idx].spills == 0);
assert(stats[stat_idx].fills == 0);
assert(stats[stat_idx].sends == sends_count_expectation);
stat_idx++;
}
if (wm_prog_data.dispatch_32) {
assert(stats[2].spills == 0);
assert(stats[2].fills == 0);
assert(stats[2].sends == sends_count_expectation);
assert(stats[stat_idx].spills == 0);
assert(stats[stat_idx].fills == 0);
assert(stats[stat_idx].sends == sends_count_expectation);
stat_idx++;
}
struct anv_pipeline_bind_map bind_map;