Skip to content

IUtilities to handle streaming buffer allocation failure #765

Open
@Erfan-Ahmadi

Description

@Erfan-Ahmadi

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

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions