Skip to content

Writing size bug #3

Description

@TheOlav0

uint32_t const size = (k * h * d * snl);

The k value is already the padded size from snl, so shouldn't the size be calculated as size = k * h * d?

For example, if I have a texture with image size of 1024x1024 and four components and a type size of one, then uint32_t const k = ((snl + 3u) & ~3u); will become 4096 and the size: size = 4096 * 1024 * 1 * 4096, which will exceeds the max uint32_t.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions