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