diff options
Diffstat (limited to 'chromium/gpu/config/gpu_info.h')
-rw-r--r-- | chromium/gpu/config/gpu_info.h | 46 |
1 files changed, 24 insertions, 22 deletions
diff --git a/chromium/gpu/config/gpu_info.h b/chromium/gpu/config/gpu_info.h index c8e756a6781..42bb614d83b 100644 --- a/chromium/gpu/config/gpu_info.h +++ b/chromium/gpu/config/gpu_info.h @@ -23,6 +23,10 @@ #include "gpu/vulkan/buildflags.h" #include "ui/gfx/geometry/size.h" +#if defined(OS_WIN) +#include <dxgi.h> +#endif + #if BUILDFLAG(ENABLE_VULKAN) #include "gpu/config/vulkan_info.h" #endif @@ -187,29 +191,15 @@ enum class OverlaySupport { GPU_EXPORT const char* OverlaySupportToString(OverlaySupport support); -struct GPU_EXPORT Dx12VulkanVersionInfo { - bool IsEmpty() const { return !d3d12_feature_level && !vulkan_version; } - - // True if the GPU driver supports DX12. - bool supports_dx12 = false; - - // True if the GPU driver supports Vulkan. - bool supports_vulkan = false; - - // The supported d3d feature level in the gpu driver; - uint32_t d3d12_feature_level = 0; - - // The support Vulkan API version in the gpu driver; - uint32_t vulkan_version = 0; -}; - struct GPU_EXPORT OverlayInfo { OverlayInfo& operator=(const OverlayInfo& other) = default; bool operator==(const OverlayInfo& other) const { return direct_composition == other.direct_composition && supports_overlays == other.supports_overlays && yuy2_overlay_support == other.yuy2_overlay_support && - nv12_overlay_support == other.nv12_overlay_support; + nv12_overlay_support == other.nv12_overlay_support && + bgra8_overlay_support == other.bgra8_overlay_support && + rgb10a2_overlay_support == other.rgb10a2_overlay_support; } bool operator!=(const OverlayInfo& other) const { return !(*this == other); } @@ -220,6 +210,8 @@ struct GPU_EXPORT OverlayInfo { bool supports_overlays = false; OverlaySupport yuy2_overlay_support = OverlaySupport::kNone; OverlaySupport nv12_overlay_support = OverlaySupport::kNone; + OverlaySupport bgra8_overlay_support = OverlaySupport::kNone; + OverlaySupport rgb10a2_overlay_support = OverlaySupport::kNone; }; #endif @@ -251,10 +243,19 @@ struct GPU_EXPORT GPUInfo { // The graphics card revision number. uint32_t revision = 0u; + + // The graphics card LUID. This is a unique identifier for the graphics card + // that is guaranteed to be unique until the computer is restarted. The LUID + // is used over the vendor id and device id because the device id is only + // unique relative its vendor, not to each other. If there are more than one + // of the same exact graphics card, they all have the same vendor id and + // device id but different LUIDs. + LUID luid; #endif // OS_WIN // Whether this GPU is the currently used one. - // Currently this field is only supported and meaningful on OS X. + // Currently this field is only supported and meaningful on OS X and on + // Windows using Angle with D3D11. bool active = false; // The strings that describe the GPU. @@ -378,7 +379,11 @@ struct GPU_EXPORT GPUInfo { // The information returned by the DirectX Diagnostics Tool. DxDiagNode dx_diagnostics; - Dx12VulkanVersionInfo dx12_vulkan_version_info; + // The supported d3d feature level in the gpu driver; + uint32_t d3d12_feature_level = 0; + + // The support Vulkan API version in the gpu driver; + uint32_t vulkan_version = 0; // The GPU hardware overlay info. OverlayInfo overlay_info; @@ -446,9 +451,6 @@ struct GPU_EXPORT GPUInfo { virtual void BeginAuxAttributes() = 0; virtual void EndAuxAttributes() = 0; - virtual void BeginDx12VulkanVersionInfo() = 0; - virtual void EndDx12VulkanVersionInfo() = 0; - virtual void BeginOverlayInfo() = 0; virtual void EndOverlayInfo() = 0; |