GithubHelp home page GithubHelp logo

Comments (5)

adam-sawicki-a avatar adam-sawicki-a commented on May 29, 2024 1

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:

https://gpuopen-librariesandsdks.github.io/VulkanMemoryAllocator/html/vk__mem__alloc_8h.html#a0d0eb0c1102268fa9a476d12ecbe4006

from vulkanmemoryallocator.

Zino2201 avatar Zino2201 commented on May 29, 2024

Fixed, I made a mistake in my code.

from vulkanmemoryallocator.

Markyparky56 avatar Markyparky56 commented on May 29, 2024

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.

adam-sawicki-a avatar adam-sawicki-a commented on May 29, 2024

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.

Markyparky56 avatar Markyparky56 commented on May 29, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.