1// Copyright 2019-2023 The Khronos Group Inc. 2// 3// SPDX-License-Identifier: CC-BY-4.0 4 5include::{generated}/meta/{refprefix}VK_EXT_provoking_vertex.adoc[] 6 7=== Other Extension Metadata 8 9*Last Modified Date*:: 10 2021-02-22 11*IP Status*:: 12 No known IP claims. 13*Contributors*:: 14 - Alexis Hétu, Google 15 - Bill Licea-Kane, Qualcomm 16 - Daniel Koch, Nvidia 17 - Jamie Madill, Google 18 - Jan-Harald Fredriksen, Arm 19 - Faith Ekstrand, Intel 20 - Jeff Bolz, Nvidia 21 - Jeff Leger, Qualcomm 22 - Jesse Hall, Google 23 - Jörg Wagner, Arm 24 - Matthew Netsch, Qualcomm 25 - Mike Blumenkrantz, Valve 26 - Piers Daniell, Nvidia 27 - Tobias Hector, AMD 28 29=== Description 30 31This extension allows changing the provoking vertex convention between 32Vulkan's default convention (first vertex) and OpenGL's convention (last 33vertex). 34 35This extension is intended for use by API-translation layers that implement 36APIs like OpenGL on top of Vulkan, and need to match the source API's 37provoking vertex convention. 38Applications using Vulkan directly should use Vulkan's default convention. 39 40include::{generated}/interfaces/VK_EXT_provoking_vertex.adoc[] 41 42=== Issues 43 441) At what granularity should this state be set? 45 46*RESOLVED*: At pipeline bind, with an optional per-render pass restriction. 47 48The most natural place to put this state is in the graphics pipeline object. 49Some implementations require it to be known when creating the pipeline, and 50pipeline state is convenient for implementing OpenGL 3.2's 51glProvokingVertex, which can change the state between draw calls. 52However, some implementations can only change it approximately render pass 53granularity. 54To accommodate both, provoking vertex will be pipeline state, but 55implementations can require that only one mode is used within a render pass 56instance; the render pass's mode is chosen implicitly when the first 57pipeline is bound. 58 592) Does the provoking vertex mode affect the order that vertices are written 60to transform feedback buffers? 61 62*RESOLVED*: Yes, to enable layered implementations of OpenGL and D3D. 63 64All of OpenGL, OpenGL ES, and Direct3D 11 require that vertices are written 65to transform feedback buffers such that flat-shaded attributes have the same 66value when drawing the contents of the transform feedback buffer as they did 67in the original drawing when the transform feedback buffer was written 68(assuming the provoking vertex mode has not changed, in APIs that support 69more than one mode). 70 71 72=== Version History 73 74 * Revision 1, (1c) 2021-02-22 (Jesse Hall) 75 ** Added 76 VkPhysicalDeviceProvokingVertexPropertiesEXT::transformFeedbackPreservesTriangleFanProvokingVertex 77 to accommodate implementations that cannot change the transform 78 feedback vertex order for triangle fans. 79 * Revision 1, (1b) 2020-06-14 (Jesse Hall) 80 ** Added 81 VkPhysicalDeviceProvokingVertexFeaturesEXT::transformFeedbackPreservesProvokingVertex 82 and required that transform feedback write vertices so as to preserve 83 the provoking vertex of each primitive. 84 * Revision 1, (1a) 2019-10-23 (Jesse Hall) 85 ** Initial draft, based on a proposal by Alexis Hétu 86