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

AlignUp SizeInBytes for buffer memory #46

Open
kruseborn opened this issue Oct 28, 2022 · 0 comments
Open

AlignUp SizeInBytes for buffer memory #46

kruseborn opened this issue Oct 28, 2022 · 0 comments
Labels
investigating Still to be determined whether we work on this optimization Improvement in performance or memory usage

Comments

@kruseborn
Copy link

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?

@adam-sawicki-a adam-sawicki-a added investigating Still to be determined whether we work on this optimization Improvement in performance or memory usage labels Oct 28, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
investigating Still to be determined whether we work on this optimization Improvement in performance or memory usage
Projects
None yet
Development

No branches or pull requests

2 participants