-
Notifications
You must be signed in to change notification settings - Fork 2.3k
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
[dx11] Add underlying DX11 device, memory allocation, and some tests #3971
Conversation
This change adds the actual D3D11 device class (ID3D11Device and ID3D11DeviceContext) from <d3d11.h>. Tested: Tested with unit test and saw the Dx11Device and the D3D11 device it creates can be successfully created. Enabled Graphics Debug and confirmed there are no remaining live objects when the test is finished.
This class fetches information from the D3D11 info queue. This enables us to count the number of live D3D11 objects. This is most meant for usage with unit tests and during development. Tested: Tested with unit tests
This change adds Dx11Device::allocate_memory and Dx11Device::dealloc_memory. Tested: Tested with unit tests. The D3D11 objects (Buffer and UAV) are created and released as expected.
✔️ Deploy Preview for jovial-fermat-aa59dc canceled. 🔨 Explore the source changes: faa5b47 🔍 Inspect the deploy log: https://app.netlify.com/sites/jovial-fermat-aa59dc/deploys/61d813fbca6b0600081fe473 |
I'm so sorry I didn't see this! Please for the future PRs directly request a review from me |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM other than the nitpick on the global states. Like the added test as well
/format |
This pull request is being automatically deployed with Vercel (learn more). 🔍 Inspect: https://vercel.com/taichi-api-docs-preview/taichi/9jeJdV4uPvhopUJFiJQvAmU6uEm2 [Deployment for 4de9795 canceled] |
✔️ Deploy Preview for docsite-preview ready! 🔨 Explore the source changes: 4de9795 🔍 Inspect the deploy log: https://app.netlify.com/sites/docsite-preview/deploys/61e92e17ebf1a80008099caf 😎 Browse the preview: https://deploy-preview-3971--docsite-preview.netlify.app |
/rerun |
/rerun |
This change makes kD3d11DebugEnabled a constant. Tested: rebuilt-and ran unit test with either kD3d11DebugEnabled set to ON or OFF.
5ef1664
to
c214735
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
I wonder if backend-specific tests are a good approach?
I think so :-)
Co-authored-by: Ye Kuang <k-ye@users.noreply.github.com>
/format |
Related issue = #992
This change adds an underlying DX11 device, memory allocation, and some tests.
The tests for the Device functionalities make it easier to confirm the functionalities are working without having to touch the rest of the code base (such as Program) or having to run a .py Taichi program.
I wonder if backend-specific tests are a good approach?