-
Notifications
You must be signed in to change notification settings - Fork 123
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
Add VulkanDirectAllocator #1850
Add VulkanDirectAllocator #1850
Conversation
CI gfxreconstruct build queued with queue ID 291193. |
CI gfxreconstruct build # 5241 running. |
e496b1d
to
3b8e798
Compare
CI gfxreconstruct build queued with queue ID 291226. |
CI gfxreconstruct build # 5242 running. |
CI gfxreconstruct build # 5242 failed. |
3b8e798
to
bb2a88c
Compare
CI gfxreconstruct build queued with queue ID 291798. |
CI gfxreconstruct build # 5247 running. |
CI gfxreconstruct build # 5247 failed. |
bb2a88c
to
924a885
Compare
CI gfxreconstruct build queued with queue ID 292040. |
CI gfxreconstruct build # 5251 running. |
CI gfxreconstruct build # 5251 failed. |
924a885
to
bc6644e
Compare
CI gfxreconstruct build queued with queue ID 292441. |
CI gfxreconstruct build # 5256 running. |
CI gfxreconstruct build # 5256 passed. |
To recap: I got no luck with the initial approach. I noticed I could not use the default allocator as a direct allocator, cause I saw in some cases ( For this reason, I opted for the "forwarding" approach, where the direct allocator calls functions of the current allocator, and I discovered there's not "perfect" forwarding, so I had to keep a bunch of direct functions in the resource allocator interface. |
bc6644e
to
d80eb28
Compare
CI gfxreconstruct build queued with queue ID 295347. |
d80eb28
to
ab91b54
Compare
CI gfxreconstruct build queued with queue ID 295350. |
I just pushed a new version which adds two new functions to the resource allocator for specifying which device memory properties to use when binding memory. In some ways I think it clarifies a bit the intent, especially for binding staging buffers created during replay (which expects replay device memory properties). Said that, there not much I can do to move |
CI gfxreconstruct build # 5293 running. |
CI gfxreconstruct build # 5293 passed. |
Add more info and rationale to the resource allocator direct method documentation, incorporating the description from the original commit.
ab91b54
to
4b8a510
Compare
CI gfxreconstruct build queued with queue ID 297380. |
CI gfxreconstruct build # 5318 running. |
CI gfxreconstruct build # 5318 passed. |
Here's my attempt at simplifying the
VulkanResourceAllocator
interface by extracting*Direct
functions into a separate classVulkanDirectAllocator
.This is one option:
VulkanResourceAllocator
subclasses, just need to implementGetDirectAllocator()
.Currently,
VulkanDirectAllocator
is just a copy ofVulkanDefaultAllocator
. If we want to keep it decoupled by the other allocators, it can evolve separately.Another option might be having
VulkanDirectAllocator
accept a pointer to the concrete allocator, and make all direct functions forward their arguments to the concrete allocator. E.g.:Closes #1824