Name Strings

SPV_EXT_shader_early_and_late_fragment_tests

Contact

To report problems with this extension, please open a new issue at:

Contributors

  • Pranjal Dubey, NVIDIA

Notice

Copyright (c) 2026 The Khronos Group Inc. Copyright terms at http://www.khronos.org/registry/speccopyright.html

Status

  • Approved by the SPIR-V Working Group: 2026-10-07

  • Approved by the Khronos Board of Promoters: 2026-11-20

Version

Last Modified Date

2026-08-05

Revision

1

Dependencies

This extension is written against the SPIR-V Specification, Version 1.6 Revision 7.

This extension requires SPIR-V 1.0.

Overview

This extension adds the EarlyAndLateFragmentTestsEXT Execution Mode and a corresponding ShaderEarlyAndLateFragmentTestsEXT Capability, which allow early and late fragment tests to be performed for a fragment shader even when that shader has side effects (writes to storage resources).

It is a multi-vendor variant of SPV_AMD_shader_early_and_late_fragment_tests. It adds only the EarlyAndLateFragmentTestsEXT execution mode; it does not add the stencil-reference comparison execution modes of that extension. The execution mode may still be used together with ExecutionModeStencilRefReplacingEXT, but does not require a stencil-reference comparison execution mode in that case. This lets implementations that support shader stencil-reference replacement retain that functionality, while implementations that do not are unaffected.

Extension Name

To use this extension within a SPIR-V module, the following OpExtension must be present in the module:

OpExtension "SPV_EXT_shader_early_and_late_fragment_tests"

Modifications to the SPIR-V Specification, Version 1.6

Execution Mode

Modify Section 3.2.5, "Execution Mode", adding the following row to the table:

Execution mode Extra Operands Enabling Capabilities

5452

EarlyAndLateFragmentTestsEXT
Requests that the per-fragment tests defined by the client API be applied both before and after fragment shader execution. The tests applied before execution may cull a fragment and skip its shader invocation, but are opportunistic and not guaranteed to be performed. The tests applied after execution are always performed, take into account any value written to FragDepth, and determine the final result.

If ExecutionModeDepthReplacing is not specified, functions identically to EarlyFragmentTests.

If this and ExecutionModeDepthReplacing are both specified, one of DepthGreater, DepthLess, or DepthUnchanged must also be specified.

Only valid with the Fragment Execution Model.
See client API for detail on fragment operations.

ShaderEarlyAndLateFragmentTestsEXT

Capability

Modify Section 3.2.30, "Capability", adding the following row to the Capability table:

Capability Implicitly Declares

5453

ShaderEarlyAndLateFragmentTestsEXT
Uses the EarlyAndLateFragmentTestsEXT Execution Mode.

Shader

Validation Rules

An OpExtension must be added to the SPIR-V for validation layers to check legal use of this extension:

OpExtension "SPV_EXT_shader_early_and_late_fragment_tests"

Non-Semantic Debug Information

This extension does not require changes to non-semantic debug information.

Issues

None

Revision History

Rev Date Author Changes

1

2026-08-05

Pranjal Dubey

Initial extension.