Skip to content

Can value of visibility attribute in GPUBindGroupLayoutBinding be NONE ? #405

Closed

Description

@shaoboyan

In current spec, value of visibility attribute in GPUBindGroupLayoutBinding could be ShaderStage NONE, which means that the resource cannot be access by any shader stage.

Is there any use cases cover this usage?

If not, shall we request that value of visibility attribute cannot be NONE in GPUBindGroupLayoutBinding if it is used to create a GPUBindGroupLayout?

Activity

  1. kvark commented on Aug 12, 2019

    @kvark
    Contributor

    I don't see a use case that would involve NONE there, so I agree that we should require it to have some bits.

  2. litherum commented on Aug 16, 2019

    @litherum
    Contributor

    See also: #193

  3. kainino0x commented on Aug 16, 2019

    @kainino0x
    Contributor

    Thanks for remembering that. We should be consistent between the two. Also, I think that the argument I made there in favor of keeping NONE (or at least allowing 0) applies here too.

  4. beaufortfrancois commented on Oct 8, 2019

    @beaufortfrancois
    Contributor

    I think we can close this issue now since #461 has been merged

  5. kvark commented on Oct 8, 2019

    @kvark
    Contributor

    @beaufortfrancois NONE is gone but 0 can still be passed in, which is what this issue is about.

  6. beaufortfrancois commented on Oct 8, 2019

    @beaufortfrancois
    Contributor

    Thank you @kvark.
    I've updated CTS with this information: gpuweb/cts#58

  7. added this to the V1.0 milestone on Sep 2, 2021
  8. Kangz commented on Oct 18, 2021

    @Kangz
    Contributor

    Consensus: Allow NONE

  9. kvark commented on Nov 24, 2021

    @kvark
    Contributor

    Do native APIs allow this? Specifically, Vulkan and D3D12?
    If we have to work around this, I'd rather just forbid it instead.

  10. Kangz commented on Dec 7, 2021

    @Kangz
    Contributor

    I'm not sure for D3D12, but at least Vulkan should support it. And even calls it out in the spec:

    VUID-VkDescriptorSetLayoutBinding-descriptorType-01510
    If descriptorType is VK_DESCRIPTOR_TYPE_INPUT_ATTACHMENT and descriptorCount is not 0, then stageFlags must be 0 or VK_SHADER_STAGE_FRAGMENT_BIT

  11. kainino0x commented on Dec 8, 2021

    @kainino0x
    Contributor

    Isn't the workaround trivial anyway? Just add an arbitrary bit if it's 0.

  12. Kangz commented on Dec 14, 2021

    @Kangz
    Contributor

    Unless someone objects, I think we can close and keep the spec as is: keep allowing NONE.

  13. kvark commented on Dec 14, 2021

    @kvark
    Contributor

    Confirmed it's fine for Vulkan. And I believe it's fine for Metal argbuf and non-argbuf paths as well.

    Isn't the workaround trivial anyway? Just add an arbitrary bit if it's 0.

    It's not that simple. Adding a bit there would make it count towards the per-stage limits.

  14. kvark commented on Dec 14, 2021

    @kvark
    Contributor

    Confirmed it's fine on DX12 as well. So we can have NONE for free on all backends.

  15. Kangz commented on Dec 14, 2021

    @Kangz
    Contributor

    Great!

  16. added a commit that references this issue on Sep 6, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions