Skip to content
This repository was archived by the owner on Aug 1, 2019. It is now read-only.
This repository was archived by the owner on Aug 1, 2019. It is now read-only.

Depth / stencil - how to communicate disabling depth checking? #101

@BenConMS

Description

@BenConMS

D3D12 has an explicit flag (DepthEnable) for disabling depth checking:

https://msdn.microsoft.com/en-us/library/windows/desktop/dn770356(v=vs.85).aspx

OpenGL has a similar thing with GL_DEPTH_TEST and glEnable:

https://www.khronos.org/opengl/wiki/Depth_Test

And Vulkan has a bit that it sets for this too:

https://www.khronos.org/registry/vulkan/specs/1.0/man/html/VkPipelineDepthStencilStateCreateInfo.html

Metal does not seem to have a bit for this, and it appears that the NXT API is using this approach that infers disabling depth testing through the compare function:

https://developer.apple.com/documentation/metal/mtldepthstencildescriptor

I think that we have this backwards right now. This is a low-level, explicit API and having enum values side-affect into multiple settings is undesirable.

This came up when wiring up depth / stencil to the D3D12 backend, filing an issue to discuss how to proceed.

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