Collect GPU device information for end2end tests - Part I

This patch is the first one to support inspecting GPU information for
dawn_end2end_tests.

In this patch, we support collecting the device name, device id and
vendor id on D3D12 and Vulkan. We also support collecting the device
name on OpenGL. The collection on Metal will be supported in the next
patch. Using this information we implement a series of APIs to inspect
the information of both OS and GPU vendor.

We also skip two failed tests on Windows Intel Vulkan backends.

BUG=dawn:10

Change-Id: If52a960c0bae3922a0b5650500218eff1400d77a
Reviewed-on: https://dawn-review.googlesource.com/1460
Commit-Queue: Jiawei Shao <jiawei.shao@intel.com>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
This commit is contained in:
Jiawei Shao
2018-09-19 00:32:52 +00:00
committed by Commit Bot service account
parent cd5e5756fd
commit 58809d413b
17 changed files with 177 additions and 0 deletions

View File

@@ -18,11 +18,20 @@
#include <dawn/dawn.h>
#include <dawn_native/dawn_native_export.h>
#include <string>
namespace dawn_native {
struct PCIInfo {
uint32_t deviceId = 0;
uint32_t vendorId = 0;
std::string name;
};
// Backend-agnostic API for dawn_native
DAWN_NATIVE_EXPORT dawnProcTable GetProcs();
DAWN_NATIVE_EXPORT const PCIInfo& GetPCIInfo(dawnDevice device);
} // namespace dawn_native
#endif // DAWNNATIVE_DAWNNATIVE_H_