Skip to content

Commit 01ebb3b

Browse files
Updated Animation Error to align with main. Updated ETL tests.
1 parent 9e76d65 commit 01ebb3b

File tree

8 files changed

+1513
-1506
lines changed

8 files changed

+1513
-1506
lines changed

IntelPresentMon/PresentMonMiddleware/FrameEventQuery.cpp

Lines changed: 13 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -477,6 +477,7 @@ namespace
477477
uint32_t outputOffset_;
478478
uint16_t outputPaddingSize_;
479479
};
480+
template<bool doDroppedCheck, bool doZeroCheck>
480481
class AnimationErrorGatherCommand_ : public pmon::mid::GatherCommand_
481482
{
482483
public:
@@ -487,15 +488,18 @@ namespace
487488
}
488489
void Gather(Context& ctx, uint8_t* pDestBlob) const override
489490
{
490-
if (ctx.dropped) {
491-
reinterpret_cast<double&>(pDestBlob[outputOffset_]) =
492-
std::numeric_limits<double>::quiet_NaN();
493-
return;
491+
if constexpr (doDroppedCheck) {
492+
if (ctx.dropped) {
493+
reinterpret_cast<double&>(pDestBlob[outputOffset_]) =
494+
std::numeric_limits<double>::quiet_NaN();
495+
return;
496+
}
494497
}
495-
if (ctx.previousDisplayedCpuStartQpc == 0) {
496-
reinterpret_cast<double&>(pDestBlob[outputOffset_]) =
497-
std::numeric_limits<double>::quiet_NaN();
498-
return;
498+
if constexpr (doZeroCheck) {
499+
if (ctx.previousDisplayedCpuStartQpc == 0) {
500+
reinterpret_cast<double&>(pDestBlob[outputOffset_]) = 0.0;
501+
return;
502+
}
499503
}
500504
if (ctx.sourceFrameDisplayIndex == ctx.appIndex && ctx.previousDisplayedCpuStartQpc != 0) {
501505
auto ScreenTime = ctx.pSourceFrameData->present_event.Displayed_ScreenTime[ctx.sourceFrameDisplayIndex];
@@ -832,7 +836,7 @@ std::unique_ptr<mid::GatherCommand_> PM_FRAME_QUERY::MapQueryElementToGatherComm
832836
case PM_METRIC_DISPLAYED_TIME:
833837
return std::make_unique<DisplayDifferenceGatherCommand_>(pos);
834838
case PM_METRIC_ANIMATION_ERROR:
835-
return std::make_unique<AnimationErrorGatherCommand_>(pos);
839+
return std::make_unique<AnimationErrorGatherCommand_<1,1>>(pos);
836840
case PM_METRIC_GPU_LATENCY:
837841
return std::make_unique<CpuFrameQpcDifferenceGatherCommand_<&Pre::GPUStartTime, 0>>(pos);
838842
case PM_METRIC_DISPLAY_LATENCY:

Tests/Gold/test_case_0.csv

Lines changed: 358 additions & 358 deletions
Large diffs are not rendered by default.

Tests/Gold/test_case_1.csv

Lines changed: 51 additions & 52 deletions
Large diffs are not rendered by default.

Tests/Gold/test_case_2.csv

Lines changed: 94 additions & 94 deletions
Large diffs are not rendered by default.

Tests/Gold/test_case_3.csv

Lines changed: 116 additions & 116 deletions
Large diffs are not rendered by default.

Tests/Gold/test_case_4.csv

Lines changed: 187 additions & 187 deletions
Large diffs are not rendered by default.

Tests/Gold/test_case_5.csv

Lines changed: 648 additions & 646 deletions
Large diffs are not rendered by default.

Tests/Gold/test_case_5_v1.csv

Lines changed: 46 additions & 44 deletions
Large diffs are not rendered by default.

0 commit comments

Comments
 (0)