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

[Question]The second parameter in function "ExecuteCommandList" #17

Closed
jacksparowtxz opened this issue Sep 20, 2018 · 2 comments
Closed

Comments

@jacksparowtxz
Copy link

jacksparowtxz commented Sep 20, 2018

deviceContexts[GRAPHICTHREAD_IMMERIATE]->ExecuteCommandList(commandlists[i], true); commandlists[i]->Release(); commandlists[i] = nullptr; deviceContexts[i]->ClearState();
I found that in the function void ExecuteCommandList( ID3D11CommandList *pCommandList, BOOL RestoreContextState );,you pass true to the RestoreContextState. After that you use the clearstate()to set all state .That means we do not need to save and restore the state after 'excutecommandlist'.So,I don't think this step is necessary.Besides,according to the API document ,"When applications use FALSE, they can avoid unnecessary and inefficient state transitions.".I think pass "false" to the 'RestoreContextState 'is better.What do you think?

@turanszkij
Copy link
Owner

Thanks for the heads up. That is a dead code path which is not used for very long now. I will rewrite when I bring back multithreaded rendering. 👍

@turanszkij
Copy link
Owner

This is fixed now

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

No branches or pull requests

2 participants