| Safe Haskell | None |
|---|---|
| Language | Haskell2010 |
Vulkan.Core10.Query
Synopsis
- createQueryPool :: forall a io. (Extendss QueryPoolCreateInfo a, PokeChain a, MonadIO io) => Device -> QueryPoolCreateInfo a -> ("allocator" ::: Maybe AllocationCallbacks) -> io QueryPool
- withQueryPool :: forall a io r. (Extendss QueryPoolCreateInfo a, PokeChain a, MonadIO io) => Device -> QueryPoolCreateInfo a -> Maybe AllocationCallbacks -> (io QueryPool -> (QueryPool -> io ()) -> r) -> r
- destroyQueryPool :: forall io. MonadIO io => Device -> QueryPool -> ("allocator" ::: Maybe AllocationCallbacks) -> io ()
- getQueryPoolResults :: forall io. MonadIO io => Device -> QueryPool -> ("firstQuery" ::: Word32) -> ("queryCount" ::: Word32) -> ("dataSize" ::: Word64) -> ("data" ::: Ptr ()) -> ("stride" ::: DeviceSize) -> QueryResultFlags -> io Result
- data QueryPoolCreateInfo (es :: [Type]) = QueryPoolCreateInfo {}
- newtype QueryPool = QueryPool Word64
- newtype QueryPoolCreateFlags = QueryPoolCreateFlags Flags
- newtype QueryType where
- QueryType Int32
- pattern QUERY_TYPE_OCCLUSION :: QueryType
- pattern QUERY_TYPE_PIPELINE_STATISTICS :: QueryType
- pattern QUERY_TYPE_TIMESTAMP :: QueryType
- pattern QUERY_TYPE_PERFORMANCE_QUERY_INTEL :: QueryType
- pattern QUERY_TYPE_ACCELERATION_STRUCTURE_SERIALIZATION_SIZE_KHR :: QueryType
- pattern QUERY_TYPE_ACCELERATION_STRUCTURE_COMPACTED_SIZE_KHR :: QueryType
- pattern QUERY_TYPE_PERFORMANCE_QUERY_KHR :: QueryType
- pattern QUERY_TYPE_TRANSFORM_FEEDBACK_STREAM_EXT :: QueryType
- newtype QueryResultFlagBits where
- type QueryResultFlags = QueryResultFlagBits
- newtype QueryPipelineStatisticFlagBits where
- QueryPipelineStatisticFlagBits Flags
- pattern QUERY_PIPELINE_STATISTIC_INPUT_ASSEMBLY_VERTICES_BIT :: QueryPipelineStatisticFlagBits
- pattern QUERY_PIPELINE_STATISTIC_INPUT_ASSEMBLY_PRIMITIVES_BIT :: QueryPipelineStatisticFlagBits
- pattern QUERY_PIPELINE_STATISTIC_VERTEX_SHADER_INVOCATIONS_BIT :: QueryPipelineStatisticFlagBits
- pattern QUERY_PIPELINE_STATISTIC_GEOMETRY_SHADER_INVOCATIONS_BIT :: QueryPipelineStatisticFlagBits
- pattern QUERY_PIPELINE_STATISTIC_GEOMETRY_SHADER_PRIMITIVES_BIT :: QueryPipelineStatisticFlagBits
- pattern QUERY_PIPELINE_STATISTIC_CLIPPING_INVOCATIONS_BIT :: QueryPipelineStatisticFlagBits
- pattern QUERY_PIPELINE_STATISTIC_CLIPPING_PRIMITIVES_BIT :: QueryPipelineStatisticFlagBits
- pattern QUERY_PIPELINE_STATISTIC_FRAGMENT_SHADER_INVOCATIONS_BIT :: QueryPipelineStatisticFlagBits
- pattern QUERY_PIPELINE_STATISTIC_TESSELLATION_CONTROL_SHADER_PATCHES_BIT :: QueryPipelineStatisticFlagBits
- pattern QUERY_PIPELINE_STATISTIC_TESSELLATION_EVALUATION_SHADER_INVOCATIONS_BIT :: QueryPipelineStatisticFlagBits
- pattern QUERY_PIPELINE_STATISTIC_COMPUTE_SHADER_INVOCATIONS_BIT :: QueryPipelineStatisticFlagBits
- type QueryPipelineStatisticFlags = QueryPipelineStatisticFlagBits
Documentation
Arguments
| :: forall a io. (Extendss QueryPoolCreateInfo a, PokeChain a, MonadIO io) | |
| => Device |
|
| -> QueryPoolCreateInfo a |
|
| -> ("allocator" ::: Maybe AllocationCallbacks) |
|
| -> io QueryPool |
vkCreateQueryPool - Create a new query pool object
Valid Usage (Implicit)
devicemust be a validDevicehandle
pCreateInfomust be a valid pointer to a validQueryPoolCreateInfostructure- If
pAllocatoris notNULL,pAllocatormust be a valid pointer to a validAllocationCallbacksstructure pQueryPoolmust be a valid pointer to aQueryPoolhandle
Return Codes
See Also
withQueryPool :: forall a io r. (Extendss QueryPoolCreateInfo a, PokeChain a, MonadIO io) => Device -> QueryPoolCreateInfo a -> Maybe AllocationCallbacks -> (io QueryPool -> (QueryPool -> io ()) -> r) -> r Source #
A convenience wrapper to make a compatible pair of calls to
createQueryPool and destroyQueryPool
To ensure that destroyQueryPool is always called: pass
bracket (or the allocate function from your
favourite resource management library) as the first argument.
To just extract the pair pass (,) as the first argument.
Arguments
| :: forall io. MonadIO io | |
| => Device |
|
| -> QueryPool |
|
| -> ("allocator" ::: Maybe AllocationCallbacks) |
|
| -> io () |
vkDestroyQueryPool - Destroy a query pool object
Valid Usage
- All submitted commands that refer to
queryPoolmust have completed execution
- If
AllocationCallbackswere provided whenqueryPoolwas created, a compatible set of callbacks must be provided here - If no
AllocationCallbackswere provided whenqueryPoolwas created,pAllocatormust beNULL
Valid Usage (Implicit)
devicemust be a validDevicehandle
- If
queryPoolis notNULL_HANDLE,queryPoolmust be a validQueryPoolhandle - If
pAllocatoris notNULL,pAllocatormust be a valid pointer to a validAllocationCallbacksstructure - If
queryPoolis a valid handle, it must have been created, allocated, or retrieved fromdevice
Host Synchronization
- Host access to
queryPoolmust be externally synchronized
See Also
Arguments
| :: forall io. MonadIO io | |
| => Device |
|
| -> QueryPool |
|
| -> ("firstQuery" ::: Word32) |
|
| -> ("queryCount" ::: Word32) |
|
| -> ("dataSize" ::: Word64) |
|
| -> ("data" ::: Ptr ()) |
|
| -> ("stride" ::: DeviceSize) |
|
| -> QueryResultFlags |
|
| -> io Result |
vkGetQueryPoolResults - Copy results of queries in a query pool to a host memory region
Description
The range of queries read is defined by [firstQuery, firstQuery +
queryCount - 1]. For pipeline statistics queries, each query index in
the pool contains one integer value for each bit that is enabled in
QueryPoolCreateInfo::pipelineStatistics when the pool is created.
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 QUERY_RESULT_64_BIT is not
set and the result overflows a 32-bit value, the value may either wrap
or saturate. Similarly, if
QUERY_RESULT_64_BIT is set and
the result overflows a 64-bit value, the value may either wrap or
saturate.
If 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,
getQueryPoolResults is guaranteed to succeed and return
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
getQueryPoolResults may not return in finite time.
If QUERY_RESULT_WAIT_BIT and
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
getQueryPoolResults returns NOT_READY.
However, availability state is still written to pData for those
queries if
QUERY_RESULT_WITH_AVAILABILITY_BIT
is set.
Note
Applications must take care to ensure that use of the
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
cmdResetQueryPool,
cmdBeginQuery, and
cmdEndQuery for that query, then
the query will remain in the available state until
resetQueryPool is
called or the cmdResetQueryPool
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
QUERY_RESULT_WAIT_BIT is used
in combination with
QUERY_RESULT_WITH_AVAILABILITY_BIT.
In this case, the returned availability status may reflect the result
of a previous use of the query unless
resetQueryPool is
called or the cmdResetQueryPool
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 QUERY_RESULT_PARTIAL_BIT is
set, 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.
If
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
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
firstQuerymust be less than the number of queries inqueryPool
- If
QUERY_RESULT_64_BITis not set inflags, thenpDataandstridemust be multiples of4 - If
QUERY_RESULT_64_BITis not set inflagsand thequeryTypeused to createqueryPoolwas notQUERY_TYPE_PERFORMANCE_QUERY_KHR, thenpDataandstridemust be multiples of4 - If
QUERY_RESULT_64_BITis set inflagsthenpDataandstridemust be multiples of8 - If the
queryTypeused to createqueryPoolwasQUERY_TYPE_PERFORMANCE_QUERY_KHR, thenpDataandstridemust be multiples of the size ofPerformanceCounterResultKHR - The sum of
firstQueryandqueryCountmust be less than or equal to the number of queries inqueryPool dataSizemust be large enough to contain the result of each query, as described here- If the
queryTypeused to createqueryPoolwasQUERY_TYPE_TIMESTAMP,flagsmust not containQUERY_RESULT_PARTIAL_BIT - If the
queryTypeused to createqueryPoolwasQUERY_TYPE_PERFORMANCE_QUERY_KHR,flagsmust not containQUERY_RESULT_WITH_AVAILABILITY_BIT,QUERY_RESULT_PARTIAL_BITorQUERY_RESULT_64_BIT - If the
queryTypeused to createqueryPoolwasQUERY_TYPE_PERFORMANCE_QUERY_KHR, thequeryPoolmust have been recorded once for each pass as retrieved via a call togetPhysicalDeviceQueueFamilyPerformanceQueryPassesKHR
Valid Usage (Implicit)
devicemust be a validDevicehandle
queryPoolmust be a validQueryPoolhandlepDatamust be a valid pointer to an array ofdataSizebytesflagsmust be a valid combination ofQueryResultFlagBitsvaluesdataSizemust be greater than0queryPoolmust have been created, allocated, or retrieved fromdevice
Return Codes
See Also
data QueryPoolCreateInfo (es :: [Type]) Source #
VkQueryPoolCreateInfo - Structure specifying parameters of a newly created query pool
Description
pipelineStatistics is ignored if queryType is not
QUERY_TYPE_PIPELINE_STATISTICS.
Valid Usage
- If the
pipeline statistics queries
feature is not enabled,
queryTypemust not beQUERY_TYPE_PIPELINE_STATISTICS
- If
queryTypeisQUERY_TYPE_PIPELINE_STATISTICS,pipelineStatisticsmust be a valid combination ofQueryPipelineStatisticFlagBitsvalues - If
queryTypeisQUERY_TYPE_PERFORMANCE_QUERY_KHR, thepNextchain must include a structure of typeQueryPoolPerformanceCreateInfoKHR queryCountmust be greater than 0
Valid Usage (Implicit)
sTypemust beSTRUCTURE_TYPE_QUERY_POOL_CREATE_INFO
- Each
pNextmember of any structure (including this one) in thepNextchain must be eitherNULLor a pointer to a valid instance ofQueryPoolPerformanceCreateInfoKHRorQueryPoolPerformanceQueryCreateInfoINTEL - The
sTypevalue of each struct in thepNextchain must be unique flagsmust be0queryTypemust be a validQueryTypevalue
See Also
QueryPipelineStatisticFlags,
QueryPoolCreateFlags,
QueryType,
StructureType, createQueryPool
Constructors
| QueryPoolCreateInfo | |
Fields
| |
Instances
VkQueryPool - Opaque handle to a query pool object
See Also
cmdBeginQuery,
cmdBeginQueryIndexedEXT,
cmdCopyQueryPoolResults,
cmdEndQuery,
cmdEndQueryIndexedEXT,
cmdResetQueryPool,
cmdWriteAccelerationStructuresPropertiesKHR,
cmdWriteAccelerationStructuresPropertiesNV,
cmdWriteTimestamp,
createQueryPool,
destroyQueryPool,
getQueryPoolResults,
resetQueryPool,
resetQueryPoolEXT
Instances
| Eq QueryPool Source # | |
| Ord QueryPool Source # | |
| Show QueryPool Source # | |
| Storable QueryPool Source # | |
Defined in Vulkan.Core10.Handles | |
| Zero QueryPool Source # | |
Defined in Vulkan.Core10.Handles | |
| HasObjectType QueryPool Source # | |
Defined in Vulkan.Core10.Handles Methods objectTypeAndHandle :: QueryPool -> (ObjectType, Word64) Source # | |
| IsHandle QueryPool Source # | |
Defined in Vulkan.Core10.Handles | |
newtype QueryPoolCreateFlags Source #
VkQueryPoolCreateFlags - Reserved for future use
Description
QueryPoolCreateFlags is a bitmask type for setting a mask, but is
currently reserved for future use.
See Also
Constructors
| QueryPoolCreateFlags Flags |
Instances
VkQueryType - Specify the type of queries managed by a query pool
See Also
QueryPoolCreateInfo,
cmdWriteAccelerationStructuresPropertiesKHR,
cmdWriteAccelerationStructuresPropertiesNV,
writeAccelerationStructuresPropertiesKHR
Bundled Patterns
Instances
| Eq QueryType Source # | |
| Ord QueryType Source # | |
| Read QueryType Source # | |
| Show QueryType Source # | |
| Storable QueryType Source # | |
Defined in Vulkan.Core10.Enums.QueryType | |
| Zero QueryType Source # | |
Defined in Vulkan.Core10.Enums.QueryType | |
newtype QueryResultFlagBits Source #
VkQueryResultFlagBits - Bitmask specifying how and when query results are returned
See Also
Constructors
| QueryResultFlagBits Flags |
Bundled Patterns
| pattern QUERY_RESULT_64_BIT :: QueryResultFlagBits |
|
| pattern QUERY_RESULT_WAIT_BIT :: QueryResultFlagBits |
|
| pattern QUERY_RESULT_WITH_AVAILABILITY_BIT :: QueryResultFlagBits |
|
| pattern QUERY_RESULT_PARTIAL_BIT :: QueryResultFlagBits |
|
Instances
newtype QueryPipelineStatisticFlagBits Source #
VkQueryPipelineStatisticFlagBits - Bitmask specifying queried pipeline statistics
Description
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 cmdCopyQueryPoolResults), or
request it be put into host memory (via
getQueryPoolResults).
See Also
Constructors
| QueryPipelineStatisticFlagBits Flags |
Bundled Patterns
| pattern QUERY_PIPELINE_STATISTIC_INPUT_ASSEMBLY_VERTICES_BIT :: QueryPipelineStatisticFlagBits |
|
| pattern QUERY_PIPELINE_STATISTIC_INPUT_ASSEMBLY_PRIMITIVES_BIT :: QueryPipelineStatisticFlagBits |
|
| pattern QUERY_PIPELINE_STATISTIC_VERTEX_SHADER_INVOCATIONS_BIT :: QueryPipelineStatisticFlagBits |
|
| pattern QUERY_PIPELINE_STATISTIC_GEOMETRY_SHADER_INVOCATIONS_BIT :: QueryPipelineStatisticFlagBits |
|
| pattern QUERY_PIPELINE_STATISTIC_GEOMETRY_SHADER_PRIMITIVES_BIT :: QueryPipelineStatisticFlagBits |
|
| pattern QUERY_PIPELINE_STATISTIC_CLIPPING_INVOCATIONS_BIT :: QueryPipelineStatisticFlagBits |
|
| pattern QUERY_PIPELINE_STATISTIC_CLIPPING_PRIMITIVES_BIT :: QueryPipelineStatisticFlagBits |
|
| pattern QUERY_PIPELINE_STATISTIC_FRAGMENT_SHADER_INVOCATIONS_BIT :: QueryPipelineStatisticFlagBits |
|
| pattern QUERY_PIPELINE_STATISTIC_TESSELLATION_CONTROL_SHADER_PATCHES_BIT :: QueryPipelineStatisticFlagBits |
|
| pattern QUERY_PIPELINE_STATISTIC_TESSELLATION_EVALUATION_SHADER_INVOCATIONS_BIT :: QueryPipelineStatisticFlagBits |
|
| pattern QUERY_PIPELINE_STATISTIC_COMPUTE_SHADER_INVOCATIONS_BIT :: QueryPipelineStatisticFlagBits |
|