GithubHelp home page GithubHelp logo

Is it "legal" to call vkCmdBindDescriptorSets() when none of the previously bound pipeline's shader stages access any descriptor sets? about vulkansamples HOT 3 CLOSED

lunarg avatar lunarg commented on September 17, 2024
Is it "legal" to call vkCmdBindDescriptorSets() when none of the previously bound pipeline's shader stages access any descriptor sets?

from vulkansamples.

Comments (3)

TonyBarbour avatar TonyBarbour commented on September 17, 2024

My quick read through of the relevant sections of the spec lead me to say "yes, it's legal". When referring to shaders accessing resources bound through descriptor sets, the word "can" is regularly used, in a document that is not at all uneasy about using the word "must". Do you see any language in the spec that implies it's illegal?

One reason I can see to call vkCmdBindDescriptorSets is that when the pipeline layout was created, it said that there was going to be one descriptor set, so the bind call is fulfilling that promise, even if the shader has no use for it. I suppose one could create a different pipeline layout with no descriptor sets for the second and third pipeline, but I'm at a loss to say if that's better or not.

from vulkansamples.

hiddenbitious avatar hiddenbitious commented on September 17, 2024

"legal" wasn't the best word I could have chosen. In the spec it is stated that:

A compatible descriptor set must be bound for all set numbers that any shaders in a pipeline access, at the time that a draw or dispatch command is recorded to execute using that pipeline. However, if none of the shaders in a pipeline statically use any bindings with a particular set number, then no descriptor set need be bound for that set number, even if the pipeline layout includes a non-trivial descriptor set layout for that set number.

So according to this, the call to vkCmdBindDescriptorSets() isn't illegal, but it is not needed. Likewise it wasn't called when the stencil_fullscreen_pipe, pipeline was bound (line 460).

So either way this is a minor issue

from vulkansamples.

TonyBarbour avatar TonyBarbour commented on September 17, 2024

I didn't realize that the call to vkCmdBindDescriptorSet was optional once the pipeline layout was specified with a descriptor set, but that's certainly what you quoted spec passage says. I'll drop the unneeded calls.

from vulkansamples.

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.