1// Copyright 2021-2024 The Khronos Group Inc. 2// 3// SPDX-License-Identifier: CC-BY-4.0 4 5include::{generated}/meta/{refprefix}VK_EXT_primitives_generated_query.adoc[] 6 7=== Other Extension Metadata 8 9*Last Modified Date*:: 10 2022-01-24 11*Contributors*:: 12 - Shahbaz Youssefi, Google 13 - Piers Daniell, NVIDIA 14 - Faith Ekstrand, Collabora 15 - Jan-Harald Fredriksen, Arm 16 17=== Description 18 19This extension adds support for a new query type to match OpenGL's 20`GL_PRIMITIVES_GENERATED` to support layering. 21 22include::{generated}/interfaces/VK_EXT_primitives_generated_query.adoc[] 23 24=== Issues 25 261) Can the query from `VK_EXT_transform_feedback` be used instead? 27 28*RESOLVED*: No. 29While the query from VK_EXT_transform_feedback can produce the same results 30as in this extension, it is only available while transform feedback is 31active. 32The OpenGL `GL_PRIMITIVES_GENERATED` query is independent from transform 33feedback. 34Emulation through artificial transform feedback is unnecessarily 35inefficient. 36 372) Can `VK_QUERY_PIPELINE_STATISTIC_CLIPPING_INVOCATIONS_BIT` be used 38instead? 39 40*RESOLVED*: It could, but we prefer the extension for simplicity. 41Vulkan requires that only one query be active at a time. 42If both the `GL_PRIMITIVES_GENERATED` and the 43`GL_CLIPPING_INPUT_PRIMITIVES_ARB` queries need to be simultaneously 44enabled, emulation of both through 45`VK_QUERY_PIPELINE_STATISTIC_CLIPPING_INVOCATIONS_BIT` is inconvenient. 46 473) On some hardware, this query cannot be implemented if 48sname:VkPipelineRasterizationStateCreateInfo::pname:rasterizerDiscardEnable 49is enabled. 50How will this be handled? 51 52*RESOLVED*: A feature flag is exposed by this extension for this. 53On said hardware, the GL implementation disables rasterizer-discard and 54achieves the same effect through other means. 55It will not be able to do the same in Vulkan due to lack of state 56information. 57A feature flag is exposed by this extension so the OpenGL implementation on 58top of Vulkan would be able to implement a similar workaround. 59 604) On some hardware, this query cannot be implemented for non-zero query 61indices. 62How will this be handled? 63 64*RESOLVED*: A feature flag is exposed by this extension for this. 65If this feature is not present, the query from `VK_EXT_transform_feedback` 66can be used to the same effect. 67 685) How is the interaction of this extension with 69`transformFeedbackRasterizationStreamSelect` handled? 70 71*RESOLVED*: Disallowed for non-zero streams. 72In OpenGL, the rasterization stream is always stream zero. 73 74=== Version History 75 76 * Revision 1, 2021-06-23 (Shahbaz Youssefi) 77 ** Internal revisions 78 79