Commit 58c07c7b authored by Christopher Cameron's avatar Christopher Cameron Committed by Commit Bot

Initialize color_buffer_half_float_rgba in passthrough

If HDR is requested, DCHECK that RGBA_16F is supported.

R=geofflang
TBR=zmo

Bug: 784536
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: Ib775c15c8a0a0d4f89c33f408c3dede2907d49ce
Reviewed-on: https://chromium-review.googlesource.com/779865Reviewed-by: default avatarccameron <ccameron@chromium.org>
Reviewed-by: default avatarGeoff Lang <geofflang@chromium.org>
Commit-Queue: ccameron <ccameron@chromium.org>
Cr-Commit-Position: refs/heads/master@{#518407}
parent 75edba48
...@@ -447,8 +447,10 @@ bool GLRenderer::CanPartialSwap() { ...@@ -447,8 +447,10 @@ bool GLRenderer::CanPartialSwap() {
} }
ResourceFormat GLRenderer::BackbufferFormat() const { ResourceFormat GLRenderer::BackbufferFormat() const {
if (current_frame()->current_render_pass->color_space.IsHDR() && if (current_frame()->current_render_pass->color_space.IsHDR()) {
resource_provider_->IsRenderBufferFormatSupported(RGBA_F16)) { // If a platform does not support half-float renderbuffers then it should
// not should request HDR rendering.
DCHECK(resource_provider_->IsRenderBufferFormatSupported(RGBA_F16));
return RGBA_F16; return RGBA_F16;
} }
return resource_provider_->best_texture_format(); return resource_provider_->best_texture_format();
......
...@@ -1151,6 +1151,9 @@ gpu::Capabilities GLES2DecoderPassthroughImpl::GetCapabilities() { ...@@ -1151,6 +1151,9 @@ gpu::Capabilities GLES2DecoderPassthroughImpl::GetCapabilities() {
caps.texture_norm16 = feature_info_->feature_flags().ext_texture_norm16; caps.texture_norm16 = feature_info_->feature_flags().ext_texture_norm16;
caps.texture_half_float_linear = caps.texture_half_float_linear =
feature_info_->feature_flags().enable_texture_half_float_linear; feature_info_->feature_flags().enable_texture_half_float_linear;
caps.color_buffer_half_float_rgba =
feature_info_->ext_color_buffer_float_available() ||
feature_info_->ext_color_buffer_half_float_available();
caps.image_ycbcr_422 = caps.image_ycbcr_422 =
feature_info_->feature_flags().chromium_image_ycbcr_422; feature_info_->feature_flags().chromium_image_ycbcr_422;
caps.image_ycbcr_420v = caps.image_ycbcr_420v =
......
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