Name Strings

SPV_EXT_shader_stencil_export

Contact

See Issues list in the Khronos SPIRV-Headers repository: https://github.com/KhronosGroup/SPIRV-Headers

Contributors

  • Dominik Witczak, AMD

  • Daniel Rakos, AMD

  • Rex Xu, AMD

  • Aaron Hagan, AMD

Notice

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

Status

Released.

Version

Modified Date: 08/10/2017

Revision: 3

Dependencies

This extension is written against Revision 1 of the version 1.10 of the SPIR-V Specification.

The extension is written against Revision 1 of the OpenGL extension ARB_shader_stencil_export.

Overview

This extension is written to provide the functionality of the ARB_shader_stencil_export, OpenGL Shading Language Specification extension, for SPIR-V.

This extension adds a new capability, as well as a new built-in. Both, when combined, let the application output a specific reference stencil value from within a fragment shader.

Extension Name

To enable SPV_EXT_shader_stencil_export extension in SPIR-V, use

OpExtension "SPV_EXT_shader_stencil_export"

New Execution Mode

This extension introduces a new execution mode:

ExecutionModeStencilRefReplacingEXT

New Builtins

This extension adds the following builtins:

FragStencilRefEXT = 5014

FragStencilRefEXT must only decorate output variable whose type is an arbitrary-sized integer type scalar.

Token Number Assignments

CapabilityStencilExportEXT

5013

BuiltInFragStencilRefEXT

5014

ExecutionModeStencilRefReplacingEXT

5027

Modifications to the SPIR-V Specification, Version 1.1

Modify Section 3.21, the BuiltIn list.

(Add to the list of builtins with a CapabilityStencilExportEXT capability)

FragStencilRefEXT = 5014

The FragStencilRefEXT builtin can be used to output reference stencil value.

Validation Rules

None.

Issues

None

Revision History

Rev Date Author Changes

3

08/10/2017

Aaron Hagan

Add ExecutionModeStencilRefReplacingEXT execution mode.

2

07/26/2017

Dominik Witczak

Language improvements.

1

07/19/2017

Dominik Witczak

Initial revision based on ARB_shader_stencil_export.