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

[vulkan] Improve Vulkan RHI impl with lower overhead internal implementations #6912

Merged
merged 14 commits into from
Dec 18, 2022

Conversation

bobcao3
Copy link
Collaborator

@bobcao3 bobcao3 commented Dec 16, 2022

Also added partial RHI support for Vulkan Dynamic Rendering, but there are some interactions and bugs to figure out between this and ImGUI, so the device creator will not actively enable this feature for now.

@netlify
Copy link

netlify bot commented Dec 16, 2022

Deploy Preview for docsite-preview ready!

Name Link
🔨 Latest commit 9ff758b
🔍 Latest deploy log https://app.netlify.com/sites/docsite-preview/deploys/639e5f7480da9700080b5cab
😎 Deploy Preview https://deploy-preview-6912--docsite-preview.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site settings.

taichi/rhi/impl_support.h Outdated Show resolved Hide resolved
@bobcao3 bobcao3 requested a review from k-ye December 16, 2022 23:42
Copy link
Member

@PENGUINLIONG PENGUINLIONG left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm! thank you

taichi/rhi/device.h Show resolved Hide resolved
taichi/rhi/vulkan/vulkan_device.cpp Show resolved Hide resolved
// It does not mark objects as used, and it does not free objects (destructor is
// not called)
template <class T>
class SyncedPtrStableObjectList {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

so to my understanding the the contained objects should be explicitly constructed/destructed?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's a good point. It seems like we should add a check that T is a POD-ish type, which doesn't have fancy ctor/dtor. (Dtor is especially important here, IMO. Right now the implementation would require the caller to call ~T())

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed it now, the the object list now handles ctor/dtor & uses RAII.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: I suggest that we add some unit test on this (https://github.com/taichi-dev/taichi/tree/master/tests/cpp), given that this is a very low-level infra, and has certain behaviors that is not trivial (manually calling ~T(), placement new, ...)

taichi/rhi/vulkan/vulkan_device.cpp Show resolved Hide resolved
@bobcao3 bobcao3 merged commit 072b518 into taichi-dev:master Dec 18, 2022
quadpixels pushed a commit to quadpixels/taichi that referenced this pull request May 13, 2023
…ntations (taichi-dev#6912)

Also added partial RHI support for Vulkan Dynamic Rendering, but there
are some interactions and bugs to figure out between this and ImGUI, so
the device creator will not actively enable this feature for now.

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
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

Successfully merging this pull request may close these issues.

3 participants