Skip to content

GPUShaderStageBit.NONE seems useless #193

Closed

Description

@litherum
{binding: 0, visibility: GPUShaderStageBit.NONE, type: "uniform-buffer"}

GPUShaderStageBit is only used in one place. Using it in that place seems useless.

Or: Is there a difference between making a resource bound with GPUShaderStageBit.NONE and not having anything bound?

Activity

  1. kvark commented on Jan 29, 2019

    @kvark
    Contributor

    I agree that it isn't directly useful. I see this more of a question in general: do we provide NONE consistently for all the bitflag types, or do it on a case by case basis?

  2. kainino0x commented on Jan 29, 2019

    @kainino0x
    Contributor

    There might be validation here too; it could go either way, IMO: either allow-but-noop the NONE case, or disallow it.

    But even if it's invalid to put NONE there, you could imagine an application doing:

    let vis = GPUShaderStageBit.NONE;
    if (...) vis |= GPUShaderStageBit.VERTEX;
    if (...) vis |= GPUShaderStageBit.FRAGMENT;
    if (vis) addBinding(vis, ...);

    so it isn't necessarily good to remove it.

    (Tangentially, we could declare that all NONEs should be spelled as 0 by applications, and remove all of them.)

  3. beaufortfrancois commented on Oct 8, 2019

    @beaufortfrancois
    Contributor

    I think we can close this issue with #461 merged.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions