Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(437)

Unified Diff: gpu/config/gpu_info_collector_win.cc

Issue 723343002: Update from https://crrev.com/304121 (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 6 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « gpu/command_buffer_service.gypi ('k') | gpu/gpu.gyp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gpu/config/gpu_info_collector_win.cc
diff --git a/gpu/config/gpu_info_collector_win.cc b/gpu/config/gpu_info_collector_win.cc
index 53343f6563ad429d3981c9872be336f7b7a7de58..eabf9b22681556c02a41cd33159c4119f28b0771 100644
--- a/gpu/config/gpu_info_collector_win.cc
+++ b/gpu/config/gpu_info_collector_win.cc
@@ -665,6 +665,45 @@ void MergeGPUInfo(GPUInfo* basic_gpu_info,
return;
}
+ // Track D3D Shader Model (if available)
+ const std::string& shader_version =
+ context_gpu_info.vertex_shader_version;
+
+ // Only gather if this is the first time we're seeing
+ // a non-empty shader version string.
+ if (!shader_version.empty() &&
+ basic_gpu_info->vertex_shader_version.empty()) {
+
+ // Note: do not reorder, used by UMA_HISTOGRAM below
+ enum ShaderModel {
+ SHADER_MODEL_UNKNOWN,
+ SHADER_MODEL_2_0,
+ SHADER_MODEL_3_0,
+ SHADER_MODEL_4_0,
+ SHADER_MODEL_4_1,
+ SHADER_MODEL_5_0,
+ NUM_SHADER_MODELS
+ };
+
+ ShaderModel shader_model = SHADER_MODEL_UNKNOWN;
+
+ if (shader_version == "5.0") {
+ shader_model = SHADER_MODEL_5_0;
+ } else if (shader_version == "4.1") {
+ shader_model = SHADER_MODEL_4_1;
+ } else if (shader_version == "4.0") {
+ shader_model = SHADER_MODEL_4_0;
+ } else if (shader_version == "3.0") {
+ shader_model = SHADER_MODEL_3_0;
+ } else if (shader_version == "2.0") {
+ shader_model = SHADER_MODEL_2_0;
+ }
+
+ UMA_HISTOGRAM_ENUMERATION("GPU.D3DShaderModel",
+ shader_model,
+ NUM_SHADER_MODELS);
+ }
+
MergeGPUInfoGL(basic_gpu_info, context_gpu_info);
basic_gpu_info->dx_diagnostics = context_gpu_info.dx_diagnostics;
« no previous file with comments | « gpu/command_buffer_service.gypi ('k') | gpu/gpu.gyp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698