Commit e4928121 authored by Zhenyao Mo's avatar Zhenyao Mo Committed by Commit Bot

Assume float and half float formats are renderable on Android

except for RGB32F.

This is true since ES3 and most of Android devcies are on ES3+,
and histogram data confirmed this: 100% renderable for all formats,
except RGB32F, which is 99.99%+ unrenderable.

Avoid runtime check - this is a minor optimization in validating
command buffer on Android.

BUG=1127837
TEST=bots
R=kbr@chromium.org

Change-Id: I9ac1c0c87ae197d6883e9167068bd81fc4e0d844
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2438313Reviewed-by: default avatarKenneth Russell <kbr@chromium.org>
Commit-Queue: Zhenyao Mo <zmo@chromium.org>
Cr-Commit-Position: refs/heads/master@{#812305}
parent ade910fd
......@@ -1823,7 +1823,8 @@ void FeatureInfo::InitializeFloatAndHalfFloatFeatures(
if (may_enable_chromium_color_buffer_float &&
!had_native_chromium_color_buffer_float_ext) {
if (workarounds_.force_enable_color_buffer_float) {
if (workarounds_.force_enable_color_buffer_float ||
workarounds_.force_enable_color_buffer_float_except_rgb32f) {
if (enable_es3)
enable_ext_color_buffer_float = true;
if (IsWebGL1OrES2Context() && !enable_ext_color_buffer_half_float &&
......@@ -1833,9 +1834,11 @@ void FeatureInfo::InitializeFloatAndHalfFloatFeatures(
feature_flags_.chromium_color_buffer_float_rgba = true;
if (!disallowed_features_.chromium_color_buffer_float_rgba)
EnableCHROMIUMColorBufferFloatRGBA();
feature_flags_.chromium_color_buffer_float_rgb = true;
if (!disallowed_features_.chromium_color_buffer_float_rgb)
EnableCHROMIUMColorBufferFloatRGB();
if (!workarounds_.force_enable_color_buffer_float_except_rgb32f) {
feature_flags_.chromium_color_buffer_float_rgb = true;
if (!disallowed_features_.chromium_color_buffer_float_rgb)
EnableCHROMIUMColorBufferFloatRGB();
}
} else {
static_assert(
GL_RGBA32F_ARB == GL_RGBA32F && GL_RGBA32F_EXT == GL_RGBA32F &&
......
......@@ -3628,6 +3628,17 @@
"features": [
"force_enable_color_buffer_float"
]
},
{
"id": 358,
"cr_bugs": [1127387],
"description": "Always assume float formats are renderable on Android except RGB32F",
"os": {
"type": "android"
},
"features": [
"force_enable_color_buffer_float_except_rgb32f"
]
}
]
}
......@@ -69,6 +69,7 @@ flush_on_framebuffer_change
force_cube_complete
force_cube_map_positive_x_allocation
force_enable_color_buffer_float
force_enable_color_buffer_float_except_rgb32f
force_gl_flush_on_swap_buffers
force_high_performance_gpu
force_int_or_srgb_cube_texture_complete
......
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