You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
IUtilities is a great tool heavily relied on in certain examples and extensions that require uploads and download of data through staging buffers.
The constructor currently proceeds as if the allocations for upstreaming and downstreaming buffers are going to succeed. although the 64MB defaults for download and upload seem reasonable. some applications might want to use multiple IUtilites and thus certainly possible for the allocations to fail.
There are 2 issues with this:
Constructors can't fail:
This means IUtilities needs to have a static create function and follow the pattern we use for failable constructions.
Assertion is wrong here because we can recover from device allocation failure.
Handling allocation failure
My suggestion is to return error codes to user clarifying the reason for failure so they can IUtilities::create again with better and more reasonable parameters. (maybe they want to reduce size by 10% until they succeed).
The text was updated successfully, but these errors were encountered:
IUtilities is a great tool heavily relied on in certain examples and extensions that require uploads and download of data through staging buffers.
The constructor currently proceeds as if the allocations for upstreaming and downstreaming buffers are going to succeed. although the 64MB defaults for download and upload seem reasonable. some applications might want to use multiple IUtilites and thus certainly possible for the allocations to fail.
There are 2 issues with this:
Constructors can't fail:
This means IUtilities needs to have a static
create
function and follow the pattern we use for failable constructions.Assertion is wrong here because we can recover from device allocation failure.
Handling allocation failure
My suggestion is to return error codes to user clarifying the reason for failure so they can
IUtilities::create
again with better and more reasonable parameters. (maybe they want to reduce size by 10% until they succeed).The text was updated successfully, but these errors were encountered: