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

IUtilities to handle streaming buffer allocation failure #765

Open
Erfan-Ahmadi opened this issue Oct 31, 2024 · 0 comments
Open

IUtilities to handle streaming buffer allocation failure #765

Erfan-Ahmadi opened this issue Oct 31, 2024 · 0 comments
Assignees
Labels
enhancement New feature or request

Comments

@Erfan-Ahmadi
Copy link
Contributor

Erfan-Ahmadi commented Oct 31, 2024

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:

  1. 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.

  2. 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).

@Erfan-Ahmadi Erfan-Ahmadi added the enhancement New feature or request label Oct 31, 2024
@Erfan-Ahmadi Erfan-Ahmadi self-assigned this Oct 31, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant