• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1// Copyright 2020-2024 The Khronos Group Inc.
2//
3// SPDX-License-Identifier: CC-BY-4.0
4
5include::{generated}/meta/{refprefix}VK_KHR_shader_terminate_invocation.adoc[]
6
7=== Other Extension Metadata
8
9*Last Modified Date*::
10    2020-08-11
11*IP Status*::
12    No known IP claims.
13*Contributors*::
14  - Alan Baker, Google
15  - Jeff Bolz, NVIDIA
16  - Jesse Hall, Google
17  - Ralph Potter, Samsung
18  - Tom Olson, Arm
19
20=== Description
21
22This extension adds Vulkan support for the
23{spirv}/KHR/SPV_KHR_terminate_invocation.html[`SPV_KHR_terminate_invocation`]
24SPIR-V extension.
25That SPIR-V extension provides a new instruction,
26code:OpTerminateInvocation, which causes a shader invocation to immediately
27terminate and sets the coverage of shaded samples to `0`; only previously
28executed instructions will have observable effects.
29The code:OpTerminateInvocation instruction, along with the
30code:OpDemoteToHelperInvocation instruction from the
31`apiext:VK_EXT_shader_demote_to_helper_invocation` extension, together
32replace the code:OpKill instruction, which could behave like either of these
33instructions.
34code:OpTerminateInvocation provides the behavior required by the GLSL
35code:discard statement, and should be used when available by GLSL compilers
36and applications that need the GLSL code:discard behavior.
37
38include::{generated}/interfaces/VK_KHR_shader_terminate_invocation.adoc[]
39
40=== Promotion to Vulkan 1.3
41
42Functionality in this extension is included in core Vulkan 1.3, with the KHR
43suffix omitted.
44The original type, enum and command names are still available as aliases of
45the core functionality.
46
47=== Version History
48
49  * Revision 1, 2020-08-11 (Jesse Hall)
50