New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 687439 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Closed: Mar 2017
Cc:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 3
Type: Bug

Blocking:
issue 687346
issue 705083



Sign in to add a comment

gpu: Add support for GL_EXT_color_buffer_half_float

Project Member Reported by ccameron@chromium.org, Feb 1 2017

Issue description

Skia checks for GL_EXT_color_buffer_half_float in order to determine if it can render to FP16 surfaces.

See: https://cs.chromium.org/chromium/src/third_party/skia/src/gpu/gl/GrGLCaps.cpp?rcl=99d4721171f9b8f23cd907ef3da938c4c5579ae9&l=1898

We currently never expose GL_EXT_color_buffer_half_float. We do expose GL_EXT_color_buffer_float, but only for ES3 contexts.

https://cs.chromium.org/chromium/src/gpu/command_buffer/service/feature_info.cc?rcl=5402cd7f4d105ca765798503fa0aecfe69035ca5&l=889

 
Also of note is that the capability bit for compositor support for FP textures is enable_texture_half_float

See: https://cs.chromium.org/chromium/src/gpu/command_buffer/service/feature_info.cc?rcl=5402cd7f4d105ca765798503fa0aecfe69035ca5&l=331

So, we should probably add a flag for floating point rendertarget support in the compositor.

Comment 2 by zmo@chromium.org, Feb 2 2017

Doesn't it exposed indirectly through OES_texture_half_float?

Comment 3 by zmo@chromium.org, Feb 6 2017

Checking it more carefully, yes, EXT_color_buffer_float requires ES3 but EXT_color_buffer_half_float requires ES2.  OES_texture_half_float doesn't add half floats as renderable, so you do need to expose EXT_color_buffer_half_float in ES2.
AFAICT desktop GL >= 3.0 gives us R16F, RG16F, and RGBA16F as renderable formats, but not RGB16F

The GLES spec requires that RGB16F be renderable
https://www.khronos.org/registry/OpenGL/extensions/EXT/EXT_color_buffer_half_float.txt

So that will be a less-than-fun complication to smooth over. It may be we can check empirically a-la "may_enable_chromium_color_buffer_float".

https://cs.chromium.org/chromium/src/gpu/command_buffer/service/feature_info.cc?rcl=222a3fe7a738486a887bb53cffb8e3b52376f609&l=850

Comment 5 by zmo@chromium.org, Feb 6 2017

Even though RGB16F is renderable, the framebuffer with a RGB16F image can still be incomplete due to "implementation-specific" limitation, which is allowed on desktop GL.

So some sanity check before enabling the extension is definitely necessary.

Also note that the type OES_texture_half_float exposes is HALF_FLOAT_OES, not HALF_FLOAT, so we should limit it to ES2 command buffer contexts only.
Project Member

Comment 6 by bugdroid1@chromium.org, Feb 24 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/8507215795207d4868c9ad379957819c2f15b881

commit 8507215795207d4868c9ad379957819c2f15b881
Author: ccameron <ccameron@chromium.org>
Date: Fri Feb 24 19:53:23 2017

Add GL_EXT_color_buffer_half_float support

Only expose for GLES2 contexts.

For desktop support, add simliar checks to GL_EXT_color_buffer_float.

Change a number of instances of accidentally referring to the extension
as "color_buffer_float" instead of "color_buffer_half_float".

BUG= 687439 
CQ_INCLUDE_TRYBOTS=master.tryserver.blink:linux_trusty_blink_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/2713553005
Cr-Commit-Position: refs/heads/master@{#452909}

[modify] https://crrev.com/8507215795207d4868c9ad379957819c2f15b881/cc/resources/resource_provider.cc
[modify] https://crrev.com/8507215795207d4868c9ad379957819c2f15b881/gpu/command_buffer/common/capabilities.h
[modify] https://crrev.com/8507215795207d4868c9ad379957819c2f15b881/gpu/command_buffer/service/context_group.cc
[modify] https://crrev.com/8507215795207d4868c9ad379957819c2f15b881/gpu/command_buffer/service/feature_info.cc
[modify] https://crrev.com/8507215795207d4868c9ad379957819c2f15b881/gpu/command_buffer/service/feature_info.h
[modify] https://crrev.com/8507215795207d4868c9ad379957819c2f15b881/gpu/command_buffer/service/framebuffer_manager.cc
[modify] https://crrev.com/8507215795207d4868c9ad379957819c2f15b881/gpu/command_buffer/service/gles2_cmd_decoder.cc
[modify] https://crrev.com/8507215795207d4868c9ad379957819c2f15b881/gpu/command_buffer/service/gles2_cmd_decoder.h
[modify] https://crrev.com/8507215795207d4868c9ad379957819c2f15b881/gpu/command_buffer/service/test_helper.cc
[modify] https://crrev.com/8507215795207d4868c9ad379957819c2f15b881/gpu/ipc/common/gpu_command_buffer_traits_multi.h

Blocking: 687346
Status: Fixed (was: Assigned)

Comment 9 by kbr@chromium.org, Mar 24 2017

Blocking: 705083

Sign in to add a comment