intel/elk: Fix assert with side effect

Fix defect reported by Coverity Scan.

Side effect in assertion (ASSERT_SIDE_EFFECT)
assert_side_effect: Argument ++eot_count of assert() has a side effect.
The containing function might work differently in a non-debug build.

Fixes: ebd6738260 ("intel/elk/chv: Implement WaClearArfDependenciesBeforeEot")
Signed-off-by: Vinson Lee <vlee@freedesktop.org>
Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32884>
This commit is contained in:
Vinson Lee
2025-01-04 22:25:19 -08:00
committed by Marge Bot
parent 9b0fc62221
commit 83809f06a7

View File

@@ -3387,7 +3387,8 @@ elk_fs_visitor::workaround_source_arf_before_eot()
/* Currently, we always emit only one EOT per program,
* this WA should be updated if it ever changes.
*/
assert(++eot_count == 1);
++eot_count;
assert(eot_count == 1);
const fs_builder ibld(this, block, inst);
const fs_builder ubld = ibld.exec_all().group(1, 0);