mirror of
https://github.com/encounter/dawn-cmake.git
synced 2025-08-23 04:02:01 +00:00
After discussion with driver team, there is no need to differentiate new driver and legacy driver for build number, so the last 2 fields are used consistently. Bug: None Change-Id: I43ac2b484f84ed209d46dd9283830930908b05ee Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/59121 Reviewed-by: Jiawei Shao <jiawei.shao@intel.com> Reviewed-by: Austin Eng <enga@chromium.org> Reviewed-by: Corentin Wallez <cwallez@chromium.org> Commit-Queue: Yang Gu <yang.gu@intel.com>
32 lines
1.3 KiB
C++
32 lines
1.3 KiB
C++
// Copyright 2021 The Dawn Authors
|
|
//
|
|
// Licensed under the Apache License, Version 2.0 (the "License");
|
|
// you may not use this file except in compliance with the License.
|
|
// You may obtain a copy of the License at
|
|
//
|
|
// http://www.apache.org/licenses/LICENSE-2.0
|
|
//
|
|
// Unless required by applicable law or agreed to in writing, software
|
|
// distributed under the License is distributed on an "AS IS" BASIS,
|
|
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
// See the License for the specific language governing permissions and
|
|
// limitations under the License.
|
|
|
|
#include <gtest/gtest.h>
|
|
|
|
#include "common/GPUInfo.h"
|
|
|
|
namespace {
|
|
const PCIVendorID vendorID = 0x8086;
|
|
const gpu_info::D3DDriverVersion version1 = {20, 19, 15, 5107};
|
|
const gpu_info::D3DDriverVersion version2 = {21, 20, 16, 5077};
|
|
const gpu_info::D3DDriverVersion version3 = {27, 20, 100, 9946};
|
|
const gpu_info::D3DDriverVersion version4 = {27, 20, 101, 2003};
|
|
} // anonymous namespace
|
|
|
|
TEST(GPUInfo, CompareD3DDriverVersion) {
|
|
EXPECT_EQ(gpu_info::CompareD3DDriverVersion(vendorID, version1, version2), -1);
|
|
EXPECT_EQ(gpu_info::CompareD3DDriverVersion(vendorID, version2, version3), -1);
|
|
EXPECT_EQ(gpu_info::CompareD3DDriverVersion(vendorID, version3, version4), -1);
|
|
}
|