Add support for overlapping resources (resource aliasing).#193
Merged
Conversation
β¦ed to align it with the Vulkan behavior.
Owner
Author
|
Run: checks |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Describe the pull request
This PR implements support for resource aliasing, i.e., resources that overlap at a single allocation. In order to realize this, several improvements are available:
IGraphicsFactory, based on aResourceAllocationInfotype, that returnsResourceAllocationResults. Using this interface, it is possible to allocate all resources through a single, unifiedIGraphicsFactory::allocatemethod. An additional method that accepts multipleResourceAllocationInfos is available, which returns a generator for allocation results. This method also accepts an optional parametercanAliasthat, if set to true, allocates overlapping resources.IGraphicsFactory::canAliasmethod is available. It can be used in combination with theIGraphicsFactory::allocatemethod to fallback to non-overlapped resources, if required.IFrameBuffer::resizingevent that is called before a resize happens. The resource aliasing sample uses this event to re-allocate aliased render targets. Second, frame buffers can be created with an additional allocation callback, which, if provided, is called to request a resource. This callback enables more flexibility for working with frame buffers. In the resource aliasing sample, it returns the overlapping render targets. It can, however, also be used to create fixed-size or otherwise different-sized render target images. If it returnsnullptr, the default allocation behavior is used and a full-sized render target is created from the frame buffer.Related issues