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

Issue 655171 link

Starred by 1 user

Issue metadata

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


Sign in to add a comment

Add GpuMemoryBuffer support for half-float formats

Project Member Reported by ccameron@chromium.org, Oct 12 2016

Issue description

Color correct GPU rasterization needs to be done to either sRGB or half-float textures.

(Almost) all resources on Mac are IOSurface GpuMemoryBuffers.

We need to add sRGB and half-float types.
 
Cc: hubbe@chromium.org
CCing hubbe@ that worked on half-float support in video frames.

Comment 2 by hubbe@chromium.org, Oct 12 2016

dshwang@chromium.org (works at Intel) is currently investigating if using RG_88 to represent 16 bits of precision, and using customized shaders to read out the values is reasonable. If RG_88 turns out to be efficient, then half-floats will not be needed. As a bonus, we already have RG_88 buffers, and they have much wider support than half-floats.

See here: https://codereview.chromium.org/2122573003/

I suspect that skia wants 4 high-accuracy channels per shader (RGBA), which is a little trickier to implement by using two 8-bit channels for each 16-bit value, but *could* be implemented by using MRT.

dshwang@chromium.org also claims that GpuMemoryBuffer cannot support LUMINANCE_F16, for some reason related to linux kernel support, not sure what he means by that exactly, I might be able to find his argument somewhere.


GL_LUMINANCE_F16 has been replaced by GL_R16F. Hardware also supports GL_R16 (as a unorm).

If this isn't supported in the kernel yet, the fix is to add support in the kernel.

Mac has support for these formats as IOSurfaces.
Blocking: 667433
Blocking: 687346
Blocking: 696747
Blocking: 696749
Project Member

Comment 8 by bugdroid1@chromium.org, Apr 12 2017

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

commit c1fcde58c22a5825c44cbad17eb3ed84b8c2bcce
Author: ccameron <ccameron@chromium.org>
Date: Wed Apr 12 19:47:00 2017

Add half-float IOSurface GpuMemoryBuffer support

Add support for gpu rasterization to half-float RGBA textures.

Do not add software rasterization support for half-float RGBA textures.
While this is possible, software rasterization to half-float is not a good
idea for performance reasons.

BUG= 655171 
CQ_INCLUDE_TRYBOTS=master.tryserver.blink:linux_trusty_blink_rel;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/2786103003
Cr-Commit-Position: refs/heads/master@{#464114}

[modify] https://crrev.com/c1fcde58c22a5825c44cbad17eb3ed84b8c2bcce/cc/raster/raster_buffer_provider.cc
[modify] https://crrev.com/c1fcde58c22a5825c44cbad17eb3ed84b8c2bcce/cc/resources/resource_format.cc
[modify] https://crrev.com/c1fcde58c22a5825c44cbad17eb3ed84b8c2bcce/cc/resources/resource_provider.cc
[modify] https://crrev.com/c1fcde58c22a5825c44cbad17eb3ed84b8c2bcce/components/exo/buffer.cc
[modify] https://crrev.com/c1fcde58c22a5825c44cbad17eb3ed84b8c2bcce/content/browser/gpu/gpu_internals_ui.cc
[modify] https://crrev.com/c1fcde58c22a5825c44cbad17eb3ed84b8c2bcce/gpu/command_buffer/common/gpu_memory_buffer_support.cc
[modify] https://crrev.com/c1fcde58c22a5825c44cbad17eb3ed84b8c2bcce/gpu/command_buffer/common/gpu_memory_buffer_support.h
[modify] https://crrev.com/c1fcde58c22a5825c44cbad17eb3ed84b8c2bcce/gpu/command_buffer/tests/gl_gpu_memory_buffer_unittest.cc
[modify] https://crrev.com/c1fcde58c22a5825c44cbad17eb3ed84b8c2bcce/gpu/ipc/client/command_buffer_proxy_impl.cc
[modify] https://crrev.com/c1fcde58c22a5825c44cbad17eb3ed84b8c2bcce/gpu/ipc/client/gpu_memory_buffer_impl_shared_memory.cc
[modify] https://crrev.com/c1fcde58c22a5825c44cbad17eb3ed84b8c2bcce/gpu/ipc/common/gpu_memory_buffer_support.cc
[modify] https://crrev.com/c1fcde58c22a5825c44cbad17eb3ed84b8c2bcce/gpu/ipc/host/gpu_memory_buffer_support.cc
[modify] https://crrev.com/c1fcde58c22a5825c44cbad17eb3ed84b8c2bcce/gpu/ipc/in_process_command_buffer.cc
[modify] https://crrev.com/c1fcde58c22a5825c44cbad17eb3ed84b8c2bcce/gpu/ipc/service/gpu_command_buffer_stub.cc
[modify] https://crrev.com/c1fcde58c22a5825c44cbad17eb3ed84b8c2bcce/ui/gfx/buffer_format_util.cc
[modify] https://crrev.com/c1fcde58c22a5825c44cbad17eb3ed84b8c2bcce/ui/gfx/buffer_types.h
[modify] https://crrev.com/c1fcde58c22a5825c44cbad17eb3ed84b8c2bcce/ui/gfx/mac/io_surface.cc
[modify] https://crrev.com/c1fcde58c22a5825c44cbad17eb3ed84b8c2bcce/ui/gfx/mojo/buffer_types.mojom
[modify] https://crrev.com/c1fcde58c22a5825c44cbad17eb3ed84b8c2bcce/ui/gfx/mojo/buffer_types_struct_traits.h
[modify] https://crrev.com/c1fcde58c22a5825c44cbad17eb3ed84b8c2bcce/ui/gl/gl_image_io_surface.mm
[modify] https://crrev.com/c1fcde58c22a5825c44cbad17eb3ed84b8c2bcce/ui/gl/gl_image_io_surface_unittest.cc
[modify] https://crrev.com/c1fcde58c22a5825c44cbad17eb3ed84b8c2bcce/ui/gl/gl_image_memory.cc
[modify] https://crrev.com/c1fcde58c22a5825c44cbad17eb3ed84b8c2bcce/ui/gl/gl_image_native_pixmap.cc
[modify] https://crrev.com/c1fcde58c22a5825c44cbad17eb3ed84b8c2bcce/ui/gl/test/gl_image_test_support.cc

Status: Fixed (was: Assigned)
Summary: Add GpuMemoryBuffer support for half-float formats (was: Add GpuMemoryBuffer support for sRGB and half-float formats)
Removing the sRGB part (new bug) and closing (half-float is in).

Sign in to add a comment