New issue
Advanced search Search tips

Issue 882591 link

Starred by 1 user

Issue metadata

Status: Started
Owner:
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 2
Type: Bug

Blocked on: View detail
issue 911176
issue 914851
issue 914543
issue 914976
issue 916728

Blocking:
issue 924198


Participants' hotlists:
shared-image-client


Sign in to add a comment

Teach WebGL to use SharedImage

Project Member Reported by backer@chromium.org, Sep 10

Issue description

This task comes from piman@ shareable image design doc (https://docs.google.com/document/d/12qYPeN819JkdNGbPcKBA0rfPXSOIE3aIaQVrAZ4I1lM)

The WebGL uses blink::DrawingBuffer for output (third_party/blink/renderer/platform/graphics/gpu/drawing_buffer.h).  It's used as a backbuffer or a copy target.  Change to explicit image allocation + import. Scope can begin in CreateOrRecycleColorBuffer and end in FinishPrepareTransferableResourceGpu.

 
sunnyps@ pointed out the the same image may be bound to two texture (RGBA and RGB). The second bind (with internal format rgb) is in the "rgb emulation" for webgl blit framebuffer: https://cs.chromium.org/chromium/src/third_party/blink/renderer/platform/graphics/gpu/drawing_buffer.cc?rcl=0740ece4aad8c20ea91a9f13207c43af40c043eb&l=1504

piman@ suggested allowing importing the shared image twice using TexStorage2DSharedImageCHROMIUM and different internal storage (RGBA and RGB).
Cc: penghuang@chromium.org
Labels: Proj-Vulkanize
Owner: samans@chromium.org
Status: Assigned (was: Available)
Status: Started (was: Assigned)
Blockedon: 911176
Project Member

Comment 7 by bugdroid1@chromium.org, Dec 3

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

commit 5d046926ece8949797d4ef91327a1796a4f35f40
Author: Saman Sami <samans@chromium.org>
Date: Mon Dec 03 22:56:11 2018

Remove internal format from the parameters of glCreateAndTexStorage2DSharedImageCHROMIUM

This parameter is currently ignored. It was added with the intention of
importing a SharedImage multiple times with different internal formats
for RGB emulation, however an alternative solution that does not require
this parameter is creating two different SharedImages wrapping the same
GpuMemoryBuffer, with one SharedImage having a special usage flag that
indicates RGB emulation. See http://crrev.com/c/1348974

Bug: 882591
Change-Id: Ia48d3dd78321f1c3f20816e5c1856ef23c56cda1
Reviewed-on: https://chromium-review.googlesource.com/c/1359058
Reviewed-by: Antoine Labour <piman@chromium.org>
Commit-Queue: Saman Sami <samans@chromium.org>
Cr-Commit-Position: refs/heads/master@{#613302}
[modify] https://crrev.com/5d046926ece8949797d4ef91327a1796a4f35f40/gpu/command_buffer/client/gles2_c_lib_autogen.h
[modify] https://crrev.com/5d046926ece8949797d4ef91327a1796a4f35f40/gpu/command_buffer/client/gles2_cmd_helper_autogen.h
[modify] https://crrev.com/5d046926ece8949797d4ef91327a1796a4f35f40/gpu/command_buffer/client/gles2_implementation.cc
[modify] https://crrev.com/5d046926ece8949797d4ef91327a1796a4f35f40/gpu/command_buffer/client/gles2_implementation_autogen.h
[modify] https://crrev.com/5d046926ece8949797d4ef91327a1796a4f35f40/gpu/command_buffer/client/gles2_implementation_unittest.cc
[modify] https://crrev.com/5d046926ece8949797d4ef91327a1796a4f35f40/gpu/command_buffer/client/gles2_interface_autogen.h
[modify] https://crrev.com/5d046926ece8949797d4ef91327a1796a4f35f40/gpu/command_buffer/client/gles2_interface_stub_autogen.h
[modify] https://crrev.com/5d046926ece8949797d4ef91327a1796a4f35f40/gpu/command_buffer/client/gles2_interface_stub_impl_autogen.h
[modify] https://crrev.com/5d046926ece8949797d4ef91327a1796a4f35f40/gpu/command_buffer/client/gles2_trace_implementation_autogen.h
[modify] https://crrev.com/5d046926ece8949797d4ef91327a1796a4f35f40/gpu/command_buffer/client/gles2_trace_implementation_impl_autogen.h
[modify] https://crrev.com/5d046926ece8949797d4ef91327a1796a4f35f40/gpu/command_buffer/common/gles2_cmd_format_autogen.h
[modify] https://crrev.com/5d046926ece8949797d4ef91327a1796a4f35f40/gpu/command_buffer/common/gles2_cmd_format_test_autogen.h
[modify] https://crrev.com/5d046926ece8949797d4ef91327a1796a4f35f40/gpu/command_buffer/gles2_cmd_buffer_functions.txt
[modify] https://crrev.com/5d046926ece8949797d4ef91327a1796a4f35f40/gpu/command_buffer/service/gles2_cmd_decoder.cc
[modify] https://crrev.com/5d046926ece8949797d4ef91327a1796a4f35f40/gpu/command_buffer/service/gles2_cmd_decoder_autogen.h
[modify] https://crrev.com/5d046926ece8949797d4ef91327a1796a4f35f40/gpu/command_buffer/service/gles2_cmd_decoder_passthrough_doer_prototypes.h
[modify] https://crrev.com/5d046926ece8949797d4ef91327a1796a4f35f40/gpu/command_buffer/service/gles2_cmd_decoder_passthrough_doers.cc
[modify] https://crrev.com/5d046926ece8949797d4ef91327a1796a4f35f40/gpu/command_buffer/service/gles2_cmd_decoder_passthrough_handlers_autogen.cc
[modify] https://crrev.com/5d046926ece8949797d4ef91327a1796a4f35f40/gpu/command_buffer/service/gles2_cmd_decoder_passthrough_unittest_textures.cc
[modify] https://crrev.com/5d046926ece8949797d4ef91327a1796a4f35f40/gpu/command_buffer/service/gles2_cmd_decoder_unittest_textures.cc

Project Member

Comment 8 by bugdroid1@chromium.org, Dec 12

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

commit bce53252ce5ded76582c9a27a499bda2249052fc
Author: Saman Sami <samans@chromium.org>
Date: Wed Dec 12 01:33:57 2018

Use SharedImage in WebGL's DrawingBuffer

Migrate from mailboxes to SharedImage to enable importing WebGL's
buffer into vulkan.

Bug: 882591
Change-Id: Ic99a51c5e52da2b31ed55be746781e2b053fd5bf
Reviewed-on: https://chromium-review.googlesource.com/c/1348974
Commit-Queue: Saman Sami <samans@chromium.org>
Reviewed-by: Kenneth Russell <kbr@chromium.org>
Reviewed-by: Antoine Labour <piman@chromium.org>
Reviewed-by: Chris Harrelson <chrishtr@chromium.org>
Cr-Commit-Position: refs/heads/master@{#615747}
[modify] https://crrev.com/bce53252ce5ded76582c9a27a499bda2249052fc/components/viz/test/test_context_provider.cc
[modify] https://crrev.com/bce53252ce5ded76582c9a27a499bda2249052fc/components/viz/test/test_context_provider.h
[modify] https://crrev.com/bce53252ce5ded76582c9a27a499bda2249052fc/components/viz/test/test_gpu_memory_buffer_manager.cc
[modify] https://crrev.com/bce53252ce5ded76582c9a27a499bda2249052fc/components/viz/test/test_gpu_memory_buffer_manager.h
[modify] https://crrev.com/bce53252ce5ded76582c9a27a499bda2249052fc/content/renderer/webgraphicscontext3d_provider_impl.cc
[modify] https://crrev.com/bce53252ce5ded76582c9a27a499bda2249052fc/content/renderer/webgraphicscontext3d_provider_impl.h
[modify] https://crrev.com/bce53252ce5ded76582c9a27a499bda2249052fc/content/test/gpu/gpu_tests/webgl_conformance_expectations.py
[modify] https://crrev.com/bce53252ce5ded76582c9a27a499bda2249052fc/gpu/command_buffer/common/shared_image_usage.h
[modify] https://crrev.com/bce53252ce5ded76582c9a27a499bda2249052fc/gpu/command_buffer/service/shared_image_backing_factory_gl_texture.cc
[modify] https://crrev.com/bce53252ce5ded76582c9a27a499bda2249052fc/third_party/blink/public/platform/web_graphics_context_3d_provider.h
[modify] https://crrev.com/bce53252ce5ded76582c9a27a499bda2249052fc/third_party/blink/renderer/platform/graphics/accelerated_static_bitmap_image.cc
[modify] https://crrev.com/bce53252ce5ded76582c9a27a499bda2249052fc/third_party/blink/renderer/platform/graphics/accelerated_static_bitmap_image.h
[modify] https://crrev.com/bce53252ce5ded76582c9a27a499bda2249052fc/third_party/blink/renderer/platform/graphics/gpu/DEPS
[modify] https://crrev.com/bce53252ce5ded76582c9a27a499bda2249052fc/third_party/blink/renderer/platform/graphics/gpu/drawing_buffer.cc
[modify] https://crrev.com/bce53252ce5ded76582c9a27a499bda2249052fc/third_party/blink/renderer/platform/graphics/gpu/drawing_buffer.h
[modify] https://crrev.com/bce53252ce5ded76582c9a27a499bda2249052fc/third_party/blink/renderer/platform/graphics/gpu/drawing_buffer_test.cc
[modify] https://crrev.com/bce53252ce5ded76582c9a27a499bda2249052fc/third_party/blink/renderer/platform/graphics/gpu/drawing_buffer_test_helpers.h
[modify] https://crrev.com/bce53252ce5ded76582c9a27a499bda2249052fc/third_party/blink/renderer/platform/graphics/test/DEPS
[modify] https://crrev.com/bce53252ce5ded76582c9a27a499bda2249052fc/third_party/blink/renderer/platform/graphics/test/fake_web_graphics_context_3d_provider.h

Blockedon: 914976
Blockedon: 914851
Blockedon: 914543
Project Member

Comment 12 by bugdroid1@chromium.org, Dec 14

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

commit 6a2c0a87208cdc837f960c96a9c188dfdfa9ee34
Author: Sunny Sachanandani <sunnyps@chromium.org>
Date: Fri Dec 14 00:08:01 2018

Enqueue destroy shared image message under lock

Fix a potential bug where last_flush_id_ could be set out of order if
two threads call DestroySharedImage.

R=ericrk@chromium.org
TBR=piman@chromium.org

Bug: 870116,  914976 , 882591
Change-Id: I974bff506211cafdc49440306203d6523cf614e5
Reviewed-on: https://chromium-review.googlesource.com/c/1376852
Reviewed-by: Eric Karl <ericrk@chromium.org>
Commit-Queue: Sunny Sachanandani <sunnyps@chromium.org>
Cr-Commit-Position: refs/heads/master@{#616512}
[modify] https://crrev.com/6a2c0a87208cdc837f960c96a9c188dfdfa9ee34/gpu/ipc/client/shared_image_interface_proxy.cc

Blockedon: 916728
Project Member

Comment 14 by bugdroid1@chromium.org, Dec 20

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

commit 5f4c04750076a7f634f7232b4a5a842dfb9798bc
Author: Daniele Castagna <dcastagna@chromium.org>
Date: Thu Dec 20 01:09:39 2018

Revert "Use SharedImage in WebGL's DrawingBuffer"

This reverts commit bce53252ce5ded76582c9a27a499bda2249052fc.

Reason for revert: Unfortunately this CL broke webgl on ChromeOS:  crbug.com/916728 

Original change's description:
> Use SharedImage in WebGL's DrawingBuffer
> 
> Migrate from mailboxes to SharedImage to enable importing WebGL's
> buffer into vulkan.
> 
> Bug: 882591
> Change-Id: Ic99a51c5e52da2b31ed55be746781e2b053fd5bf
> Reviewed-on: https://chromium-review.googlesource.com/c/1348974
> Commit-Queue: Saman Sami <samans@chromium.org>
> Reviewed-by: Kenneth Russell <kbr@chromium.org>
> Reviewed-by: Antoine Labour <piman@chromium.org>
> Reviewed-by: Chris Harrelson <chrishtr@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#615747}

TBR=kbr@chromium.org,chrishtr@chromium.org,piman@chromium.org,samans@chromium.org

# Not skipping CQ checks because original CL landed > 1 day ago.

Bug: 882591
Change-Id: Ie3c829eb39dca5d7e338cdc36b368351da22a2d2
Reviewed-on: https://chromium-review.googlesource.com/c/1385346
Reviewed-by: Daniele Castagna <dcastagna@chromium.org>
Commit-Queue: Daniele Castagna <dcastagna@chromium.org>
Cr-Commit-Position: refs/heads/master@{#618053}
[modify] https://crrev.com/5f4c04750076a7f634f7232b4a5a842dfb9798bc/components/viz/test/test_context_provider.cc
[modify] https://crrev.com/5f4c04750076a7f634f7232b4a5a842dfb9798bc/components/viz/test/test_context_provider.h
[modify] https://crrev.com/5f4c04750076a7f634f7232b4a5a842dfb9798bc/components/viz/test/test_gpu_memory_buffer_manager.cc
[modify] https://crrev.com/5f4c04750076a7f634f7232b4a5a842dfb9798bc/components/viz/test/test_gpu_memory_buffer_manager.h
[modify] https://crrev.com/5f4c04750076a7f634f7232b4a5a842dfb9798bc/content/renderer/webgraphicscontext3d_provider_impl.cc
[modify] https://crrev.com/5f4c04750076a7f634f7232b4a5a842dfb9798bc/content/renderer/webgraphicscontext3d_provider_impl.h
[modify] https://crrev.com/5f4c04750076a7f634f7232b4a5a842dfb9798bc/content/test/gpu/gpu_tests/webgl_conformance_expectations.py
[modify] https://crrev.com/5f4c04750076a7f634f7232b4a5a842dfb9798bc/gpu/command_buffer/common/shared_image_usage.h
[modify] https://crrev.com/5f4c04750076a7f634f7232b4a5a842dfb9798bc/gpu/command_buffer/service/shared_image_backing_factory_gl_texture.cc
[modify] https://crrev.com/5f4c04750076a7f634f7232b4a5a842dfb9798bc/third_party/blink/public/platform/web_graphics_context_3d_provider.h
[modify] https://crrev.com/5f4c04750076a7f634f7232b4a5a842dfb9798bc/third_party/blink/renderer/platform/graphics/accelerated_static_bitmap_image.cc
[modify] https://crrev.com/5f4c04750076a7f634f7232b4a5a842dfb9798bc/third_party/blink/renderer/platform/graphics/accelerated_static_bitmap_image.h
[modify] https://crrev.com/5f4c04750076a7f634f7232b4a5a842dfb9798bc/third_party/blink/renderer/platform/graphics/gpu/DEPS
[modify] https://crrev.com/5f4c04750076a7f634f7232b4a5a842dfb9798bc/third_party/blink/renderer/platform/graphics/gpu/drawing_buffer.cc
[modify] https://crrev.com/5f4c04750076a7f634f7232b4a5a842dfb9798bc/third_party/blink/renderer/platform/graphics/gpu/drawing_buffer.h
[modify] https://crrev.com/5f4c04750076a7f634f7232b4a5a842dfb9798bc/third_party/blink/renderer/platform/graphics/gpu/drawing_buffer_test.cc
[modify] https://crrev.com/5f4c04750076a7f634f7232b4a5a842dfb9798bc/third_party/blink/renderer/platform/graphics/gpu/drawing_buffer_test_helpers.h
[modify] https://crrev.com/5f4c04750076a7f634f7232b4a5a842dfb9798bc/third_party/blink/renderer/platform/graphics/test/DEPS
[modify] https://crrev.com/5f4c04750076a7f634f7232b4a5a842dfb9798bc/third_party/blink/renderer/platform/graphics/test/fake_web_graphics_context_3d_provider.h

Comment 15 by sunn...@chromium.org, Today (12 hours ago)

Blocking: 924198

Sign in to add a comment