Commit 22ee92c9 authored by geofflang's avatar geofflang Committed by Commit bot

Support checking for GL_CHROMIUM_color_buffer_float_rgb[a] for float renderability.

ANGLE now exposes this extension to indicate that floating point textures
are renderable so it is the preferred way to determine if these extensions
should be exposed.

BUG=angleproject:1958
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

Review-Url: https://codereview.chromium.org/2795123003
Cr-Commit-Position: refs/heads/master@{#469325}
parent 94669e18
...@@ -1414,7 +1414,7 @@ void FeatureInfo::InitializeFloatAndHalfFloatFeatures( ...@@ -1414,7 +1414,7 @@ void FeatureInfo::InitializeFloatAndHalfFloatFeatures(
enable_texture_float_linear = true; enable_texture_float_linear = true;
} }
if (enable_ext_color_buffer_float || gl_version_info_->is_angle) { if (enable_ext_color_buffer_float) {
may_enable_chromium_color_buffer_float = true; may_enable_chromium_color_buffer_float = true;
} }
} }
...@@ -1451,7 +1451,25 @@ void FeatureInfo::InitializeFloatAndHalfFloatFeatures( ...@@ -1451,7 +1451,25 @@ void FeatureInfo::InitializeFloatAndHalfFloatFeatures(
} }
} }
if (may_enable_chromium_color_buffer_float) { bool had_native_chromium_color_buffer_float_ext = false;
if (extensions.Contains("GL_CHROMIUM_color_buffer_float_rgb")) {
had_native_chromium_color_buffer_float_ext = true;
feature_flags_.chromium_color_buffer_float_rgb = true;
if (!disallowed_features_.chromium_color_buffer_float_rgb) {
EnableCHROMIUMColorBufferFloatRGB();
}
}
if (extensions.Contains("GL_CHROMIUM_color_buffer_float_rgba")) {
had_native_chromium_color_buffer_float_ext = true;
feature_flags_.chromium_color_buffer_float_rgba = true;
if (!disallowed_features_.chromium_color_buffer_float_rgba) {
EnableCHROMIUMColorBufferFloatRGBA();
}
}
if (may_enable_chromium_color_buffer_float &&
!had_native_chromium_color_buffer_float_ext) {
static_assert(GL_RGBA32F_ARB == GL_RGBA32F && static_assert(GL_RGBA32F_ARB == GL_RGBA32F &&
GL_RGBA32F_EXT == GL_RGBA32F && GL_RGBA32F_EXT == GL_RGBA32F &&
GL_RGB32F_ARB == GL_RGB32F && GL_RGB32F_EXT == GL_RGB32F, GL_RGB32F_ARB == GL_RGB32F && GL_RGB32F_EXT == GL_RGB32F,
......
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