Commit ef9c096f authored by Rijubrata Bhaumik's avatar Rijubrata Bhaumik Committed by Commit Bot

Add histograms for LUMINANCE_F16 and R16_EXT.

Add and record UMA for R16_EXT and LUMINANCE_F16.
We add the UMA for both these formats as it would be nice to get
rid of one or the other eventually.

Bug: 759456
Cq-Include-Trybots: master.tryserver.chromium.android:android_optional_gpu_tests_rel;master.tryserver.chromium.linux:linux_optional_gpu_tests_rel;master.tryserver.chromium.mac:mac_optional_gpu_tests_rel;master.tryserver.chromium.win:win_optional_gpu_tests_rel
Change-Id: Iaee25dff684312229ceb408dbfde76985e566629
Reviewed-on: https://chromium-review.googlesource.com/635463
Commit-Queue: Rijubrata Bhaumik <rijubrata.bhaumik@intel.com>
Reviewed-by: default avatarFredrik Hubinette <hubbe@chromium.org>
Reviewed-by: default avatarAlexei Svitkine <asvitkine@chromium.org>
Reviewed-by: default avatarAntoine Labour <piman@chromium.org>
Cr-Commit-Position: refs/heads/master@{#502795}
parent 694968cb
......@@ -177,6 +177,35 @@ bool IsWebGLDrawBuffersSupported(bool webglCompatibilityContext,
} // anonymous namespace.
namespace {
enum GpuTextureResultR16_L16 {
// Values synced with 'GpuTextureResultR16_L16' in
// src/tools/metrics/histograms/histograms.xml
kHaveNone = 0,
kHaveR16 = 1,
kHaveL16 = 2,
kHaveR16AndL16 = 3,
kMax = kHaveR16AndL16
};
// TODO(riju): For UMA, remove after crbug.com/759456 is resolved.
bool g_r16_is_present;
bool g_l16_is_present;
GpuTextureResultR16_L16 GpuTextureUMAHelper() {
if (g_r16_is_present && g_l16_is_present) {
return GpuTextureResultR16_L16::kHaveR16AndL16;
} else if (g_r16_is_present) {
return GpuTextureResultR16_L16::kHaveR16;
} else if (g_l16_is_present) {
return GpuTextureResultR16_L16::kHaveL16;
}
return GpuTextureResultR16_L16::kHaveNone;
}
} // anonymous namespace.
FeatureInfo::FeatureFlags::FeatureFlags() {}
FeatureInfo::FeatureInfo() {
......@@ -1298,6 +1327,7 @@ void FeatureInfo::InitializeFeatures() {
if (gl_version_info_->is_desktop_core_profile ||
gl::HasExtension(extensions, "GL_EXT_texture_norm16")) {
feature_flags_.ext_texture_norm16 = true;
g_r16_is_present = true;
AddExtensionString("GL_EXT_texture_norm16");
// Note: EXT_texture_norm16 is not exposed through WebGL API so we validate
......@@ -1308,6 +1338,10 @@ void FeatureInfo::InitializeFeatures() {
validators_.texture_unsized_internal_format.AddValue(GL_RED_EXT);
}
UMA_HISTOGRAM_ENUMERATION(
"GPU.TextureR16Ext_LuminanceF16", GpuTextureUMAHelper(),
static_cast<int>(GpuTextureResultR16_L16::kMax) + 1);
bool has_opengl_dual_source_blending =
gl_version_info_->IsAtLeastGL(3, 3) ||
(gl_version_info_->IsAtLeastGL(3, 2) &&
......@@ -1618,6 +1652,9 @@ void FeatureInfo::InitializeFloatAndHalfFloatFeatures(
GL_LUMINANCE_ALPHA16F_EXT);
}
}
g_l16_is_present =
enable_texture_half_float && feature_flags_.ext_texture_storage;
}
bool FeatureInfo::IsES3Capable() const {
......
......@@ -19466,6 +19466,17 @@ uploading your change for review. These are checked by presubmit scripts.
<int value="3" label="active, was active"/>
</enum>
<enum name="GpuTextureResultR16_L16">
<summary>
Keeps track of how many users have R16_EXT or/and LUMINANCE_F16, and also
how many have none of the two.
</summary>
<int value="0" label="HAVE_NONE"/>
<int value="1" label="HAVE_R16"/>
<int value="2" label="HAVE_L16"/>
<int value="3" label="HAVE_R16_AND_L16"/>
</enum>
<enum name="GPUThreeDAPIInfoBarDismissal">
<summary>Results of user actions when a 3D API info bar is raised.</summary>
<int value="0" label="Ignored"/>
......@@ -25744,6 +25744,16 @@ http://cs/file:chrome/histograms.xml - but prefer this file for new entries.
</summary>
</histogram>
<histogram name="GPU.TextureR16Ext_LuminanceF16" enum="GpuTextureResultR16_L16">
<owner>hubbe@chromium.org</owner>
<owner>rijubrata.bhaumik@intel.com</owner>
<owner>media-dev@chromium.org</owner>
<summary>
Whether LUMINANCE_F16 and/or R16_EXT texture support is available. Recorded
each time a new context group is initialized and extensions are detected.
</summary>
</histogram>
<histogram name="GPU.TextureRG" enum="BooleanAvailable">
<owner>reveman@chromium.org</owner>
<summary>
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment