Fix QueryInternalShaderTests

1. The left cases will be not checked if the first value is 0 in Check
function.
2. All timestamps are the same value at initialization.
3. Update 83.33 to 83.333 which is closer to the actual period on Intel.

Bug: dawn:1250
Change-Id: I7378cf45453682a3d364b6930072ccc229085f0c
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/80901
Reviewed-by: Austin Eng <enga@chromium.org>
Commit-Queue: Austin Eng <enga@chromium.org>
This commit is contained in:
Li Hao 2022-02-17 16:12:41 +00:00 committed by Dawn LUCI CQ
parent 6481376db0
commit a73050795e
1 changed files with 3 additions and 3 deletions

View File

@ -58,7 +58,7 @@ namespace {
<< "Expected data[" << i << "] to be 0, actual " << actual[i]
<< std::endl;
}
return testing::AssertionSuccess();
continue;
}
float errorRate =
@ -143,7 +143,7 @@ class QueryInternalShaderTests : public DawnTest {
std::vector<uint64_t> timestampValues(size / sizeof(uint64_t), 1u);
uint32_t start = destinationOffset / sizeof(uint64_t);
for (uint32_t i = 0; i < queryCount; i++) {
timestampValues[start + i] = querySetValues[firstQuery + 1];
timestampValues[start + i] = querySetValues[firstQuery + i];
}
// Write sentinel values and orignal timestamps to timestamps buffer
queue.WriteBuffer(timestampsBuffer, 0, timestampValues.data(), size);
@ -196,7 +196,7 @@ TEST_P(QueryInternalShaderTests, TimestampComputeShader) {
1,
7,
// A gpu frequency on Intel D3D12 (ticks/second)
83.33,
83.333,
1042,
65535,
};