Safe Haskell | None |
---|---|
Language | Haskell2010 |
Synopsis
- newtype VkQueryType = VkQueryType Int32
- pattern VK_QUERY_TYPE_OCCLUSION :: VkQueryType
- pattern VK_QUERY_TYPE_PIPELINE_STATISTICS :: VkQueryType
- pattern VK_QUERY_TYPE_TIMESTAMP :: VkQueryType
- newtype VkQueryPoolCreateFlags = VkQueryPoolCreateFlags VkFlags
- newtype VkQueryResultFlagBits = VkQueryResultFlagBits VkFlags
- pattern VK_QUERY_RESULT_64_BIT :: VkQueryResultFlagBits
- pattern VK_QUERY_RESULT_WAIT_BIT :: VkQueryResultFlagBits
- pattern VK_QUERY_RESULT_WITH_AVAILABILITY_BIT :: VkQueryResultFlagBits
- pattern VK_QUERY_RESULT_PARTIAL_BIT :: VkQueryResultFlagBits
- newtype VkQueryPipelineStatisticFlagBits = VkQueryPipelineStatisticFlagBits VkFlags
- pattern VK_QUERY_PIPELINE_STATISTIC_INPUT_ASSEMBLY_VERTICES_BIT :: VkQueryPipelineStatisticFlagBits
- pattern VK_QUERY_PIPELINE_STATISTIC_INPUT_ASSEMBLY_PRIMITIVES_BIT :: VkQueryPipelineStatisticFlagBits
- pattern VK_QUERY_PIPELINE_STATISTIC_VERTEX_SHADER_INVOCATIONS_BIT :: VkQueryPipelineStatisticFlagBits
- pattern VK_QUERY_PIPELINE_STATISTIC_GEOMETRY_SHADER_INVOCATIONS_BIT :: VkQueryPipelineStatisticFlagBits
- pattern VK_QUERY_PIPELINE_STATISTIC_GEOMETRY_SHADER_PRIMITIVES_BIT :: VkQueryPipelineStatisticFlagBits
- pattern VK_QUERY_PIPELINE_STATISTIC_CLIPPING_INVOCATIONS_BIT :: VkQueryPipelineStatisticFlagBits
- pattern VK_QUERY_PIPELINE_STATISTIC_CLIPPING_PRIMITIVES_BIT :: VkQueryPipelineStatisticFlagBits
- pattern VK_QUERY_PIPELINE_STATISTIC_FRAGMENT_SHADER_INVOCATIONS_BIT :: VkQueryPipelineStatisticFlagBits
- pattern VK_QUERY_PIPELINE_STATISTIC_TESSELLATION_CONTROL_SHADER_PATCHES_BIT :: VkQueryPipelineStatisticFlagBits
- pattern VK_QUERY_PIPELINE_STATISTIC_TESSELLATION_EVALUATION_SHADER_INVOCATIONS_BIT :: VkQueryPipelineStatisticFlagBits
- pattern VK_QUERY_PIPELINE_STATISTIC_COMPUTE_SHADER_INVOCATIONS_BIT :: VkQueryPipelineStatisticFlagBits
- type VkQueryPool = Ptr VkQueryPool_T
- vkCreateQueryPool :: ("device" ::: VkDevice) -> ("pCreateInfo" ::: Ptr VkQueryPoolCreateInfo) -> ("pAllocator" ::: Ptr VkAllocationCallbacks) -> ("pQueryPool" ::: Ptr VkQueryPool) -> IO VkResult
- vkDestroyQueryPool :: ("device" ::: VkDevice) -> ("queryPool" ::: VkQueryPool) -> ("pAllocator" ::: Ptr VkAllocationCallbacks) -> IO ()
- vkGetQueryPoolResults :: ("device" ::: VkDevice) -> ("queryPool" ::: VkQueryPool) -> ("firstQuery" ::: Word32) -> ("queryCount" ::: Word32) -> ("dataSize" ::: CSize) -> ("pData" ::: Ptr ()) -> ("stride" ::: VkDeviceSize) -> ("flags" ::: VkQueryResultFlags) -> IO VkResult
- data VkQueryPoolCreateInfo = VkQueryPoolCreateInfo {}
- type VkQueryResultFlags = VkQueryResultFlagBits
- type VkQueryPipelineStatisticFlags = VkQueryPipelineStatisticFlagBits
Documentation
newtype VkQueryType Source #
Instances
pattern VK_QUERY_TYPE_OCCLUSION :: VkQueryType Source #
VK_QUERY_TYPE_OCCLUSION
specifies an occlusion
query.
pattern VK_QUERY_TYPE_PIPELINE_STATISTICS :: VkQueryType Source #
VK_QUERY_TYPE_PIPELINE_STATISTICS
specifies a pipeline statistics
query.
pattern VK_QUERY_TYPE_TIMESTAMP :: VkQueryType Source #
VK_QUERY_TYPE_TIMESTAMP
specifies a timestamp
query.
newtype VkQueryPoolCreateFlags Source #
VkQueryPoolCreateFlags - Reserved for future use
Description
VkQueryPoolCreateFlags
is a bitmask type for setting a mask, but is
currently reserved for future use.
See Also
Instances
newtype VkQueryResultFlagBits Source #
VkQueryResultFlagBits - Bitmask specifying how and when query results are returned
See Also
Instances
pattern VK_QUERY_RESULT_64_BIT :: VkQueryResultFlagBits Source #
VK_QUERY_RESULT_64_BIT
specifies the results will be written as an
array of 64-bit unsigned integer values. If this bit is not set, the
results will be written as an array of 32-bit unsigned integer values.
pattern VK_QUERY_RESULT_WAIT_BIT :: VkQueryResultFlagBits Source #
VK_QUERY_RESULT_WAIT_BIT
specifies that Vulkan will wait for each
query’s status to become available before retrieving its results.
pattern VK_QUERY_RESULT_WITH_AVAILABILITY_BIT :: VkQueryResultFlagBits Source #
VK_QUERY_RESULT_WITH_AVAILABILITY_BIT
specifies that the availability
status accompanies the results.
pattern VK_QUERY_RESULT_PARTIAL_BIT :: VkQueryResultFlagBits Source #
VK_QUERY_RESULT_PARTIAL_BIT
specifies that returning partial results
is acceptable.
newtype VkQueryPipelineStatisticFlagBits Source #
VkQueryPipelineStatisticFlagBits - Bitmask specifying queried pipeline statistics
Description
VK_QUERY_PIPELINE_STATISTIC_INPUT_ASSEMBLY_VERTICES_BIT
specifies that queries managed by the pool will count the number of vertices processed by the input assembly stage. Vertices corresponding to incomplete primitives may contribute to the count.
VK_QUERY_PIPELINE_STATISTIC_INPUT_ASSEMBLY_PRIMITIVES_BIT
specifies that queries managed by the pool will count the number of primitives processed by the input assembly stage. If primitive restart is enabled, restarting the primitive topology has no effect on the count. Incomplete primitives may be counted.VK_QUERY_PIPELINE_STATISTIC_VERTEX_SHADER_INVOCATIONS_BIT
specifies that queries managed by the pool will count the number of vertex shader invocations. This counter’s value is incremented each time a vertex shader is invoked.VK_QUERY_PIPELINE_STATISTIC_GEOMETRY_SHADER_INVOCATIONS_BIT
specifies that queries managed by the pool will count the number of geometry shader invocations. This counter’s value is incremented each time a geometry shader is invoked. In the case of instanced geometry shaders, the geometry shader invocations count is incremented for each separate instanced invocation.VK_QUERY_PIPELINE_STATISTIC_GEOMETRY_SHADER_PRIMITIVES_BIT
specifies that queries managed by the pool will count the number of primitives generated by geometry shader invocations. The counter’s value is incremented each time the geometry shader emits a primitive. Restarting primitive topology using the SPIR-V instructionsOpEndPrimitive
orOpEndStreamPrimitive
has no effect on the geometry shader output primitives count.VK_QUERY_PIPELINE_STATISTIC_CLIPPING_INVOCATIONS_BIT
specifies that queries managed by the pool will count the number of primitives processed by the Primitive Clipping stage of the pipeline. The counter’s value is incremented each time a primitive reaches the primitive clipping stage.VK_QUERY_PIPELINE_STATISTIC_CLIPPING_PRIMITIVES_BIT
specifies that queries managed by the pool will count the number of primitives output by the Primitive Clipping stage of the pipeline. The counter’s value is incremented each time a primitive passes the primitive clipping stage. The actual number of primitives output by the primitive clipping stage for a particular input primitive is implementation-dependent but must satisfy the following conditions:- If at least one vertex of the input primitive lies inside the clipping volume, the counter is incremented by one or more.
- Otherwise, the counter is incremented by zero or more.
VK_QUERY_PIPELINE_STATISTIC_FRAGMENT_SHADER_INVOCATIONS_BIT
specifies that queries managed by the pool will count the number of fragment shader invocations. The counter’s value is incremented each time the fragment shader is invoked.VK_QUERY_PIPELINE_STATISTIC_TESSELLATION_CONTROL_SHADER_PATCHES_BIT
specifies that queries managed by the pool will count the number of patches processed by the tessellation control shader. The counter’s value is incremented once for each patch for which a tessellation control shader is invoked.VK_QUERY_PIPELINE_STATISTIC_TESSELLATION_EVALUATION_SHADER_INVOCATIONS_BIT
specifies that queries managed by the pool will count the number of invocations of the tessellation evaluation shader. The counter’s value is incremented each time the tessellation evaluation shader is invoked.VK_QUERY_PIPELINE_STATISTIC_COMPUTE_SHADER_INVOCATIONS_BIT
specifies that queries managed by the pool will count the number of compute shader invocations. The counter’s value is incremented every time the compute shader is invoked. Implementations may skip the execution of certain compute shader invocations or execute additional compute shader invocations for implementation-dependent reasons as long as the results of rendering otherwise remain unchanged.
These values are intended to measure relative statistics on one implementation. Various device architectures will count these values differently. Any or all counters may be affected by the issues described in Query Operation.
Note
For example, tile-based rendering devices may need to replay the scene multiple times, affecting some of the counts.
If a pipeline has rasterizerDiscardEnable
enabled, implementations
may discard primitives after the final vertex processing stage. As a
result, if rasterizerDiscardEnable
is enabled, the clipping input and
output primitives counters may not be incremented.
When a pipeline statistics query finishes, the result for that query is
marked as available. The application can copy the result to a buffer
(via vkCmdCopyQueryPoolResults
), or request it be put into host memory
(via vkGetQueryPoolResults
).
See Also
Instances
pattern VK_QUERY_PIPELINE_STATISTIC_INPUT_ASSEMBLY_VERTICES_BIT :: VkQueryPipelineStatisticFlagBits Source #
pattern VK_QUERY_PIPELINE_STATISTIC_INPUT_ASSEMBLY_PRIMITIVES_BIT :: VkQueryPipelineStatisticFlagBits Source #
pattern VK_QUERY_PIPELINE_STATISTIC_VERTEX_SHADER_INVOCATIONS_BIT :: VkQueryPipelineStatisticFlagBits Source #
pattern VK_QUERY_PIPELINE_STATISTIC_GEOMETRY_SHADER_INVOCATIONS_BIT :: VkQueryPipelineStatisticFlagBits Source #
pattern VK_QUERY_PIPELINE_STATISTIC_GEOMETRY_SHADER_PRIMITIVES_BIT :: VkQueryPipelineStatisticFlagBits Source #
pattern VK_QUERY_PIPELINE_STATISTIC_CLIPPING_INVOCATIONS_BIT :: VkQueryPipelineStatisticFlagBits Source #
pattern VK_QUERY_PIPELINE_STATISTIC_CLIPPING_PRIMITIVES_BIT :: VkQueryPipelineStatisticFlagBits Source #
pattern VK_QUERY_PIPELINE_STATISTIC_FRAGMENT_SHADER_INVOCATIONS_BIT :: VkQueryPipelineStatisticFlagBits Source #
pattern VK_QUERY_PIPELINE_STATISTIC_TESSELLATION_CONTROL_SHADER_PATCHES_BIT :: VkQueryPipelineStatisticFlagBits Source #
pattern VK_QUERY_PIPELINE_STATISTIC_TESSELLATION_EVALUATION_SHADER_INVOCATIONS_BIT :: VkQueryPipelineStatisticFlagBits Source #
pattern VK_QUERY_PIPELINE_STATISTIC_COMPUTE_SHADER_INVOCATIONS_BIT :: VkQueryPipelineStatisticFlagBits Source #
type VkQueryPool = Ptr VkQueryPool_T Source #
VkQueryPool - Opaque handle to a query pool object
See Also
vkCmdBeginQuery
,
vkCmdCopyQueryPoolResults
,
vkCmdEndQuery
,
vkCmdResetQueryPool
,
vkCmdWriteTimestamp
,
vkCreateQueryPool
, vkDestroyQueryPool
, vkGetQueryPoolResults
vkCreateQueryPool :: ("device" ::: VkDevice) -> ("pCreateInfo" ::: Ptr VkQueryPoolCreateInfo) -> ("pAllocator" ::: Ptr VkAllocationCallbacks) -> ("pQueryPool" ::: Ptr VkQueryPool) -> IO VkResult Source #
vkCreateQueryPool - Create a new query pool object
Parameters
device
is the logical device that creates the query pool.
pCreateInfo
is a pointer to an instance of theVkQueryPoolCreateInfo
structure containing the number and type of queries to be managed by the pool.pAllocator
controls host memory allocation as described in the Memory Allocation chapter.pQueryPool
is a pointer to aVkQueryPool
handle in which the resulting query pool object is returned.
Valid Usage (Implicit)
device
must be a validVkDevice
handle
pCreateInfo
must be a valid pointer to a validVkQueryPoolCreateInfo
structure- If
pAllocator
is notNULL
,pAllocator
must be a valid pointer to a validVkAllocationCallbacks
structure pQueryPool
must be a valid pointer to aVkQueryPool
handle
Return Codes
[Success]
- VK_SUCCESS
[Failure]
- VK_ERROR_OUT_OF_HOST_MEMORY
VK_ERROR_OUT_OF_DEVICE_MEMORY
See Also
VkAllocationCallbacks
,
VkDevice
, VkQueryPool
,
VkQueryPoolCreateInfo
vkDestroyQueryPool :: ("device" ::: VkDevice) -> ("queryPool" ::: VkQueryPool) -> ("pAllocator" ::: Ptr VkAllocationCallbacks) -> IO () Source #
vkDestroyQueryPool - Destroy a query pool object
Parameters
device
is the logical device that destroys the query pool.
queryPool
is the query pool to destroy.pAllocator
controls host memory allocation as described in the Memory Allocation chapter.
Valid Usage
- All submitted commands that refer to
queryPool
must have completed execution
- If
VkAllocationCallbacks
were provided whenqueryPool
was created, a compatible set of callbacks must be provided here - If no
VkAllocationCallbacks
were provided whenqueryPool
was created,pAllocator
must beNULL
Valid Usage (Implicit)
device
must be a validVkDevice
handle
- If
queryPool
is notVK_NULL_HANDLE
,queryPool
must be a validVkQueryPool
handle - If
pAllocator
is notNULL
,pAllocator
must be a valid pointer to a validVkAllocationCallbacks
structure - If
queryPool
is a valid handle, it must have been created, allocated, or retrieved fromdevice
Host Synchronization
- Host access to
queryPool
must be externally synchronized
See Also
vkGetQueryPoolResults :: ("device" ::: VkDevice) -> ("queryPool" ::: VkQueryPool) -> ("firstQuery" ::: Word32) -> ("queryCount" ::: Word32) -> ("dataSize" ::: CSize) -> ("pData" ::: Ptr ()) -> ("stride" ::: VkDeviceSize) -> ("flags" ::: VkQueryResultFlags) -> IO VkResult Source #
vkGetQueryPoolResults - Copy results of queries in a query pool to a host memory region
Parameters
device
is the logical device that owns the query pool.
queryPool
is the query pool managing the queries containing the desired results.firstQuery
is the initial query index.queryCount
is the number of queries.firstQuery
andqueryCount
together define a range of queries. For pipeline statistics queries, each query index in the pool contains one integer value for each bit that is enabled inVkQueryPoolCreateInfo
::pipelineStatistics
when the pool is created.dataSize
is the size in bytes of the buffer pointed to bypData
.pData
is a pointer to a user-allocated buffer where the results will be writtenstride
is the stride in bytes between results for individual queries withinpData
.flags
is a bitmask ofVkQueryResultFlagBits
specifying how and when results are returned.
Description
If no bits are set in flags
, and all requested queries are in the
available state, results are written as an array of 32-bit unsigned
integer values. The behavior when not all queries are available, is
described
below.
If VK_QUERY_RESULT_64_BIT
is not set and the result overflows a 32-bit
value, the value may either wrap or saturate. Similarly, if
VK_QUERY_RESULT_64_BIT
is set and the result overflows a 64-bit value,
the value may either wrap or saturate.
If VK_QUERY_RESULT_WAIT_BIT
is set, Vulkan will wait for each query to
be in the available state before retrieving the numerical results for
that query. In this case, vkGetQueryPoolResults
is guaranteed to
succeed and return VK_SUCCESS
if the queries become available in a
finite time (i.e. if they have been issued and not reset). If queries
will never finish (e.g. due to being reset but not issued), then
vkGetQueryPoolResults
may not return in finite time.
If VK_QUERY_RESULT_WAIT_BIT
and VK_QUERY_RESULT_PARTIAL_BIT
are both
not set then no result values are written to pData
for queries that
are in the unavailable state at the time of the call, and
vkGetQueryPoolResults
returns VK_NOT_READY
. However, availability
state is still written to pData
for those queries if
VK_QUERY_RESULT_WITH_AVAILABILITY_BIT
is set.
Note
Applications must take care to ensure that use of the
VK_QUERY_RESULT_WAIT_BIT
bit has the desired effect.
For example, if a query has been used previously and a command buffer
records the commands vkCmdResetQueryPool
, vkCmdBeginQuery
, and
vkCmdEndQuery
for that query, then the query will remain in the
available state until the vkCmdResetQueryPool
command executes on a
queue. Applications can use fences or events to ensure that a query
has already been reset before checking for its results or availability
status. Otherwise, a stale value could be returned from a previous use
of the query.
The above also applies when VK_QUERY_RESULT_WAIT_BIT
is used in
combination with VK_QUERY_RESULT_WITH_AVAILABILITY_BIT
. In this case,
the returned availability status may reflect the result of a previous
use of the query unless the vkCmdResetQueryPool
command has been
executed since the last use of the query.
Note
Applications can double-buffer query pool usage, with a pool per frame, and reset queries at the end of the frame in which they are read.
If VK_QUERY_RESULT_PARTIAL_BIT
is set, VK_QUERY_RESULT_WAIT_BIT
is
not set, and the query’s status is unavailable, an intermediate result
value between zero and the final result value is written to pData
for
that query.
VK_QUERY_RESULT_PARTIAL_BIT
must not be used if the pool’s
queryType
is VK_QUERY_TYPE_TIMESTAMP
.
If VK_QUERY_RESULT_WITH_AVAILABILITY_BIT
is set, the final integer
value written for each query is non-zero if the query’s status was
available or zero if the status was unavailable. When
VK_QUERY_RESULT_WITH_AVAILABILITY_BIT
is used, implementations must
guarantee that if they return a non-zero availability value then the
numerical results must be valid, assuming the results are not reset by
a subsequent command.
Note
Satisfying this guarantee may require careful ordering by the application, e.g. to read the availability status before reading the results.
Valid Usage
firstQuery
must be less than the number of queries inqueryPool
- If
VK_QUERY_RESULT_64_BIT
is not set inflags
thenpData
andstride
must be multiples of4
- If
VK_QUERY_RESULT_64_BIT
is set inflags
thenpData
andstride
must be multiples of8
- The sum of
firstQuery
andqueryCount
must be less than or equal to the number of queries inqueryPool
dataSize
must be large enough to contain the result of each query, as described here- If the
queryType
used to createqueryPool
wasVK_QUERY_TYPE_TIMESTAMP
,flags
must not containVK_QUERY_RESULT_PARTIAL_BIT
Valid Usage (Implicit)
device
must be a validVkDevice
handle
queryPool
must be a validVkQueryPool
handlepData
must be a valid pointer to an array ofdataSize
bytesflags
must be a valid combination ofVkQueryResultFlagBits
valuesdataSize
must be greater than0
queryPool
must have been created, allocated, or retrieved fromdevice
Return Codes
[Success]
- VK_SUCCESS
VK_NOT_READY
[Failure]
- VK_ERROR_OUT_OF_HOST_MEMORY
VK_ERROR_OUT_OF_DEVICE_MEMORY
VK_ERROR_DEVICE_LOST
See Also
VkDevice
, VkDeviceSize
,
VkQueryPool
, VkQueryResultFlags
data VkQueryPoolCreateInfo Source #
VkQueryPoolCreateInfo - Structure specifying parameters of a newly created query pool
Description
pipelineStatistics
is ignored if queryType
is not
VK_QUERY_TYPE_PIPELINE_STATISTICS
.
Valid Usage
- If the pipeline statistics
queries
feature is not enabled,
queryType
must not beVK_QUERY_TYPE_PIPELINE_STATISTICS
- If
queryType
isVK_QUERY_TYPE_PIPELINE_STATISTICS
,pipelineStatistics
must be a valid combination ofVkQueryPipelineStatisticFlagBits
values
Valid Usage (Implicit)
sType
must beVK_STRUCTURE_TYPE_QUERY_POOL_CREATE_INFO
pNext
must beNULL
flags
must be0
queryType
must be a validVkQueryType
value
See Also
VkQueryPipelineStatisticFlags
, VkQueryPoolCreateFlags
,
VkQueryType
, VkStructureType
,
vkCreateQueryPool
VkQueryPoolCreateInfo | |
|
Instances
Eq VkQueryPoolCreateInfo Source # | |
(==) :: VkQueryPoolCreateInfo -> VkQueryPoolCreateInfo -> Bool # (/=) :: VkQueryPoolCreateInfo -> VkQueryPoolCreateInfo -> Bool # | |
Show VkQueryPoolCreateInfo Source # | |
showsPrec :: Int -> VkQueryPoolCreateInfo -> ShowS # show :: VkQueryPoolCreateInfo -> String # showList :: [VkQueryPoolCreateInfo] -> ShowS # | |
Storable VkQueryPoolCreateInfo Source # | |
sizeOf :: VkQueryPoolCreateInfo -> Int # alignment :: VkQueryPoolCreateInfo -> Int # peekElemOff :: Ptr VkQueryPoolCreateInfo -> Int -> IO VkQueryPoolCreateInfo # pokeElemOff :: Ptr VkQueryPoolCreateInfo -> Int -> VkQueryPoolCreateInfo -> IO () # peekByteOff :: Ptr b -> Int -> IO VkQueryPoolCreateInfo # pokeByteOff :: Ptr b -> Int -> VkQueryPoolCreateInfo -> IO () # peek :: Ptr VkQueryPoolCreateInfo -> IO VkQueryPoolCreateInfo # poke :: Ptr VkQueryPoolCreateInfo -> VkQueryPoolCreateInfo -> IO () # |
type VkQueryResultFlags = VkQueryResultFlagBits Source #
VkQueryResultFlags - Bitmask of VkQueryResultFlagBits
Description
VkQueryResultFlags
is a bitmask type for setting a mask of zero or
more VkQueryResultFlagBits
.
See Also
VkQueryResultFlagBits
,
vkCmdCopyQueryPoolResults
,
vkGetQueryPoolResults
type VkQueryPipelineStatisticFlags = VkQueryPipelineStatisticFlagBits Source #
VkQueryPipelineStatisticFlags - Bitmask of VkQueryPipelineStatisticFlagBits
Description
VkQueryPipelineStatisticFlags
is a bitmask type for setting a mask of
zero or more VkQueryPipelineStatisticFlagBits
.
See Also
VkCommandBufferInheritanceInfo
,
VkQueryPipelineStatisticFlagBits
, VkQueryPoolCreateInfo