Code Monkey home page Code Monkey logo

Comments (5)

mellinoe avatar mellinoe commented on June 1, 2024 1

Sure thing! From what you've described, it's probably just defaulting to the OpenGL backend now, rather than trying to use Vulkan when it's not supported. You could possibly still get Vulkan to work, but it might involve fiddling with the packages on your system. Anyways, let me know if you have any more questions or concerns. Cheers!

from veldrid.

misnor avatar misnor commented on June 1, 2024

Switching

_graphicsDevice = VeldridStartup.CreateGraphicsDevice(window);
to
_graphicsDevice = VeldridStartup.CreateDefaultOpenGLGraphicsDevice(new GraphicsDeviceOptions(), window);

Makes it work, which seems to imply its a problem with Vulkan dependencies on my system?

from veldrid.

mellinoe avatar mellinoe commented on June 1, 2024

Right now, the Vulkan backend requires the Vulkan Xlib extension (VK_KHR_xlib_surface) to be available. The error message is wrong -- it should print out that extension's name, not "Veldrid.Vk.FixedUtf8String" 😅. I've fixed that with the latest commit (da6721d)

Makes it work, which seems to imply its a problem with Vulkan dependencies on my system?

Yes, that seems to be the most likely problem. On my Ubuntu machine, I have the following packages installed for Vulkan:

  • libvulkan-dev
  • libvulkan1
  • vulkan-utils

I don't think all of those are necessary, but adding those could be a good start.

If you have the "vulkaninfo" program installed (it's in the vulkan-utils package), then seeing the output from it would be helpful. It prints out all of the available extensions and some other diagnostic info.

from veldrid.

mellinoe avatar mellinoe commented on June 1, 2024

I made several changes to help detect when the system doesn't support Vulkan, and to avoid using it in those cases:

  • There is a new method GraphicsDevice.IsBackendSupported, which lets you ask up front whether a backend is supported.
  • The Vulkan backend checks two things to determine if it's supported:
    • Whether Vulkan functions were even successfully loaded
    • Whether the necessary extensions are available (VK_KHR_surface and the platform-specific surface extension).
  • VeldridStartup now checks if Vulkan is supported before using it as the default backend on Linux. For you, it should automatically select OpenGL, unless you are able to get Vulkan drivers working for your system. Then it should just work with Vulkan.
  • Mentioned above -- the Vulkan error message is correct now and actually prints out the missing extension's name.

from veldrid.

misnor avatar misnor commented on June 1, 2024

I just pulled latest from master and ran the same code I attached above, and the blank window appeared and stayed - no crash. (I didn't install the missing Vulkan dependencies either)

Thank you for the quick turn around on that fix!

from veldrid.

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.