Query API: Extensions

Add extensions of pipeline statistics and timestamp queries.

Bug: dawn:434
Change-Id: I1a472ee4819bd36ce629034cf5175430bab1febc
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/22100
Commit-Queue: Hao Li <hao.x.li@intel.com>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
This commit is contained in:
Hao Li
2020-05-27 05:15:18 +00:00
committed by Commit Bot service account
parent bdc05c3d5f
commit 55c85f66d2
7 changed files with 34 additions and 2 deletions

View File

@@ -23,6 +23,9 @@ class WireWGPUDevicePropertiesTests : public testing::Test {};
TEST_F(WireWGPUDevicePropertiesTests, SerializeWGPUDeviceProperties) {
WGPUDeviceProperties sentWGPUDeviceProperties;
sentWGPUDeviceProperties.textureCompressionBC = true;
// Set false to test that the serialization can handle both true and false correctly.
sentWGPUDeviceProperties.pipelineStatisticsQuery = false;
sentWGPUDeviceProperties.timestampQuery = true;
size_t sentWGPUDevicePropertiesSize =
dawn_wire::SerializedWGPUDevicePropertiesSize(&sentWGPUDeviceProperties);
@@ -33,4 +36,6 @@ TEST_F(WireWGPUDevicePropertiesTests, SerializeWGPUDeviceProperties) {
WGPUDeviceProperties receivedWGPUDeviceProperties;
dawn_wire::DeserializeWGPUDeviceProperties(&receivedWGPUDeviceProperties, buffer.data());
ASSERT_TRUE(receivedWGPUDeviceProperties.textureCompressionBC);
ASSERT_FALSE(receivedWGPUDeviceProperties.pipelineStatisticsQuery);
ASSERT_TRUE(receivedWGPUDeviceProperties.timestampQuery);
}