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>
This commit is contained in:
Lionel Landwerlin 2023-01-12 19:56:43 +02:00 committed by Marge Bot
parent 4fd9bf6e7f
commit 5ff3d4a8a2

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;