GithubHelp home page GithubHelp logo

Comments (3)

robertosfield avatar robertosfield commented on September 27, 2024

from vsgexamples.

loopless avatar loopless commented on September 27, 2024

Then I am not clear on why the error handling lines below are present if the expected behaviour is to throw an exception? So the code should both catch the exception and check for the features being returned as true to decide if mesh rendering is supported.

`
std::cout<<"nv_features.meshShader = "<<mesh_features.meshShader<<std::endl;
std::cout<<"nv_features.taskShader = "<<mesh_features.taskShader<<std::endl;

    if (!mesh_features.meshShader || !mesh_features.taskShader)
    {
        std::cout<<"Mesh shaders not supported."<<std::endl;
        return 1;
    }

`

from vsgexamples.

robertosfield avatar robertosfield commented on September 27, 2024

In Vulkan you have physical (vkPhyscialDevice/vsg::PhyscialDevice) and logical devices (vkDevice/vsg::Device). You render using the logical device, but each logical device is created from a physical device.

First you attempt to crater the physical device that fits your feature requirements, if one isn't available then the create physical device will fail and throw an exception. If this succeeds then you can request a logical device with the specific feature you need enabled.

I forgot, Vulkan also has the vkInstance/vsg::Instance that you also need to create first to give you a connection with the driver in order to attempt to create the physical device. This also needs to be created with extensions you'll need.

This complexity the VSG attempts to hide for normal usage, but if you are using advanced extensions like mesh shaders then checking all the required facilities requires one to learn about all these elements.

from vsgexamples.

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.