Skip to content
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

There is no need to call UnbindAllValid(); function in dynamicdescriptorheap.cpp #851

Open
OneSilverBullet opened this issue Jan 4, 2024 · 1 comment
Assignees
Labels
miniengine Issues related to MiniEngine

Comments

@OneSilverBullet
Copy link

In the DynamicDescriptorHeap.cpp file, the function CopyAndBindStagedTables is used for committing the descriptors table. However, the mini-engine calls the unbindAllValid function before committing the descriptors table, which is meaningless.

The UnbindAllValid function is used to update the m_StaleRootParamsBitMap according to the assignment of the descriptor tables. You don't need to call this function in the statement of committing the descriptors table. When I delete the code about the UnbindAllValid, the engine is still running well.

For better readability, I think we should delete the code about the UnbindAllValid.

@walbourn walbourn added the miniengine Issues related to MiniEngine label Mar 6, 2024
@stanard
Copy link
Member

stanard commented Mar 22, 2024

I wrote this code a hundred years ago, so I've been trying to understand if what you're saying is right. My theory is that deleting the function call works for you because you aren't running out of descriptor space and needing to migrate descriptors to a new heap. The UnbindAllValid() call is conditionally invoked when there isn't the necessary space for the staged descriptors. It unbinds the already-committed descriptors to mark them as "stale". And when the new heap is allocated, all of the stale descriptors will be committed to it instead.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
miniengine Issues related to MiniEngine
Projects
None yet
Development

No branches or pull requests

3 participants