Skip to content

Rename "depth-comparison" to "depth-stencil" #1230

@kainino0x

Description

@kainino0x

Talked about this with editors. Here is an expanded suggestion.
First, we modify this bit of the spec:

    // Texture is used with comparison sampling only.
    "depth-comparison"

It's already misleading for saying the textures can only be compare-sampled. I think we can instead do something like:

    // Textures of depth/stencil formats.
    "depth-stencil"

So this binding type would be the only binding you could have for a texture that has a depth/stencil format. The shader compiler would therefore know precisely when it's invalid to get the 2nd, 3rd, etc component from a texture.

For stencil, we could add a separate function like stencilLoad returning u32, that would be called on those depth/stencil textures only.

I believe these measures would fully address the problem @austinEng found.

Originally posted by @kvark in #1198 (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