Skip to content

AlignUp SizeInBytes for buffer memory #46

@kruseborn

Description

@kruseborn

AlignUp<UINT64>(inOutResourceDesc.Width, D3D12_DEFAULT_RESOURCE_PLACEMENT_ALIGNMENT), // SizeInBytes

If you are using the same heap for buffers and textures, it would be possible for a "small" texture with 4kb alignment to be placed in that memory space after the buffer, if the size is not aligned up. Is there any other reason you align up the size when you allocate memory for a buffer?

Or is the intention to always use separate heaps for buffers and textures?

Metadata

Metadata

Assignees

No one assigned

    Labels

    investigatingStill to be determined whether we work on thisoptimizationImprovement in performance or memory usage

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions