-
Notifications
You must be signed in to change notification settings - Fork 401
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
BestPractices-SyncObjects-HighNumberOfFences : off by one error #8469
Comments
This check seems a bit hard to not trigger as fences are not used only for in flight frames... I allow only two in flight frames so have only 2 fences for that. But I also use fences for waiting for queued commands to finish executing. So currently I have 7 fences and trigger this warning. |
Made a PR to fix the error message, not fully sure if there is threading issues or what, but the |
My code is not multi threaded during the initialization phase.
EDIT: I also added debug printf when destroying fences. All seven fences are destroyed when exiting (i.e. there are no short lived fences in the initialization phase). |
My hunch is that the hook that checks the number of created fences is called before the hook that increments the count. |
And the test expects the warning on the 5th fence creation (and not the 4th as desired).. The loop creates 4 fences and then a fifth is created to trigger the warning:
|
Environment:
Describe the Issue
The BestPractices-SyncObjects-HighNumberOfFences warning triggers after creating the fifth fence and not after creating the fourth (the limit is defined as 3).
The check is done in a PreCallValidateCreateFence so maybe before the count is updated...
Side note: would be nice if the warning message included the limit and the current count.
PS: other such checks might have the same issue.
The text was updated successfully, but these errors were encountered: