Comments (5)
This is not correct. offset
parameter is relative to the beginning of the allocation, so you should pass 0. I updated documentation to make it even more clear:
from vulkanmemoryallocator.
Fixed, I made a mistake in my code.
from vulkanmemoryallocator.
Fixed, I made a mistake in my code.
@Zino2201
What was the mistake and how did you fix it? I'm having the same issue.
from vulkanmemoryallocator.
Possibly you try to create an object of type VmaAllocation_T
by value, not by pointer like VmaAllocation_T*
, which is equivalent to VmaAllocation
. You should always use it by pointer and treat it like an opaque pointer. Do not try to peek inside for member variables or functions.
from vulkanmemoryallocator.
Do not try to peek inside for member variables or functions.
Yup, that's what I'm doing.
vmaInvalidateAllocation(*volume.allocator, volume.volumeAllocation, volume.volumeAllocation->GetOffset(), volume.volumeAllocation->GetSize());
Switched it over to VmaAllocationInfo
/vmaGetAllocationInfo
fixed it.
VmaAllocationInfo info;
vmaGetAllocationInfo(*volume.allocator, volume.volumeAllocation, &info);
vmaInvalidateAllocation(*volume.allocator, volume.volumeAllocation, info.offset, info.size);
Offtopic Query: Since I can't find any reference on how to properly call vmaInvalidateAllocation
, is that the correct usage? Should I be passing the offset and size from the allocation?
from vulkanmemoryallocator.
Related Issues (20)
- Race condition in repeated rapid buffer creation, access and destruction HOT 5
- Possible modification to vma_aligned_alloc for Linux C++14 builds. HOT 2
- Crash when using portability validation layer HOT 2
- A bunch of obsolete Doxyfile tags HOT 1
- [Feature request] Link into *.so instead of *.a HOT 3
- [Feature request] add a .pc file for better integration HOT 1
- Validation error in TestAllocationAliasing on AMD Ryzen™ 9 7950X HOT 1
- Problem with ProcessDefragmentationPass on AMD Ryzen™ 9 7950X
- Question about possible use of VMA for VkAllocationCallbacks HOT 2
- Performance issues in TLSF CreateAllocationRequest When Fragmented With No Available Space HOT 2
- "Could not implement aligned_alloc..." when linking VMA as a CMake target HOT 1
- CMake installation issue: Most users just want `vk_mem_alloc.h` HOT 6
- Relocate vk_mem_alloc.h under includes/vulkan to give the header file better scope HOT 1
- Dead code in `FindMemoryPreferences` HOT 1
- Overly agressive deallocation of free memory blocks HOT 3
- [Bug] fails to build with GCC13 HOT 5
- Feature request: add GetParentPool() to vmaGetAllocationInfo result? HOT 6
- vmaCreateBuffer() fails on Raspberry Pi with Mesa drivers when called with VMA_MEMORY_USAGE_AUTO and VMA_ALLOCATION_CREATE_HOST_ACCESS_RANDOM_BIT. HOT 4
- Can we use C++ classes instead of C Interface HOT 4
- [FR] Consider switching to unix LF HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from vulkanmemoryallocator.