mirror of
https://github.com/encounter/dawn-cmake.git
synced 2025-12-19 09:55:26 +00:00
Query API: Record used query index in command encoder
- There are some methods need to know which query indexes are used in encoders: endOcclusionQuery, endPipelineStatisticsQuery, resolveQuerySet. - On Vulkan, we also need to use the used query indexes to reset each queries between uses. And because the reset command must be called outside render pass, we need to check whether a query index is writen twice on command encoder and render/compute encoders. - Add validation on writeTimestamp for duplicate writes at same index. Bug: dawn:434 Change-Id: I6d00dd91e565d960246b6d01ad434d2d5c095deb Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/27561 Reviewed-by: Corentin Wallez <cwallez@chromium.org> Commit-Queue: Hao Li <hao.x.li@intel.com>
This commit is contained in:
committed by
Commit Bot service account
parent
3f6bb08d00
commit
e2cbcc9565
@@ -106,10 +106,13 @@ namespace dawn_native {
|
||||
mEncodingContext->TryEncode(this, [&](CommandAllocator* allocator) -> MaybeError {
|
||||
if (GetDevice()->IsValidationEnabled()) {
|
||||
DAWN_TRY(GetDevice()->ValidateObject(querySet));
|
||||
DAWN_TRY(ValidateTimestampQuery(querySet, queryIndex));
|
||||
DAWN_TRY(ValidateTimestampQuery(querySet, queryIndex,
|
||||
mCommandEncoder->GetUsedQueryIndices()));
|
||||
mCommandEncoder->TrackUsedQuerySet(querySet);
|
||||
}
|
||||
|
||||
mCommandEncoder->TrackUsedQueryIndex(querySet, queryIndex);
|
||||
|
||||
WriteTimestampCmd* cmd =
|
||||
allocator->Allocate<WriteTimestampCmd>(Command::WriteTimestamp);
|
||||
cmd->querySet = querySet;
|
||||
|
||||
Reference in New Issue
Block a user