Git Product home page Git Product logo

Comments (5)

zeux avatar zeux commented on August 16, 2024

In C++ this can be namespaced away but in C it can't. I can probably change this to use namespace volk + using namespace volk for C++, but this will make compilation awkward.

OTOH I don't see why this would be a problem, unless you link to libvulkan.so - which defeats the purpose of this library. Is there a practical case where this would break something?

from volk.

HansKristian-Work avatar HansKristian-Work commented on August 16, 2024

I've had cases where the loader would find the symbols in the application rather than its own symbols creating infinite loops when calling certain things (something like LD_PRELOAD). It might be safe if dynamic visibility is forced to hidden or similar.

This happened even if you dlopen()-ed libvulkan.so and only used it for vkGetInstanceProcAddr.

from volk.

zeux avatar zeux commented on August 16, 2024

Yeah - that's a good point. I was thinking of symbol visibility but forgot to actually do something about it. Pushed a change to fix it. I'll keep this issue open for a bit since I'd like to actually test this library on Linux :) (it works on Windows and Android).

I'll also think about making this library C++ to avoid violating the spec; I don't see a good way to keep this C and stay compliant (although the change I submitted should hopefully make the non-compliance not a problem in practice)

from volk.

zeux avatar zeux commented on August 16, 2024

This seems to work for Linux; I'll assume for the time being the practical problem is solved and that "library symbols" might refer to exported/visible symbols only and close this :)

from volk.

zeux avatar zeux commented on August 16, 2024

FWIW one other issue I found when using volk is that the symbols defined by volk conflict with symbols defined by vulkan.h. This is not a problem if both are included in the same translation unit - volk.h will check that the usage is correct - but it is a problem if there's some translation unit that includes only vulkan.h, which is potentially problematic. Now, it does mean that even if this usage was safe, the application would have to link to vulkan.dll/so which is not a great idea, but still it can be an issue.

from volk.

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.