Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(530)

Issue 2125023002: Reland "webgl: use immutable texture for the default FBO." (Closed)

Created:
4 years, 5 months ago by dshwang
Modified:
4 years, 5 months ago
CC:
chromium-reviews, krit, pdr+graphicswatchlist_chromium.org, drott+blinkwatch_chromium.org, blink-reviews-platform-graphics_chromium.org, dshwang, jbroman, Justin Novosad, Rik, f(malita), blink-reviews, piman+watch_chromium.org, Stephen Chennney, ajuma+watch_chromium.org, danakj+watch_chromium.org, rwlbuis, ynovikov
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Reland "webgl: use immutable texture for the default FBO." Original CL: https://codereview.chromium.org/1449043005 Use immutable texture for the default FBO like chromium compositor. In theory, it speeds up drawing speed, because immutable texture skips texture validation on drawing call. In addition, immutable texture allows GL_INTEL_framebuffer_CMAA more optimization. BUG=557848, 535198 TEST=gl_tests GLCopyTextureCHROMIUMTest.ImmutableTexture https://www.khronos.org/registry/webgl/sdk/tests/conformance/renderbuffers/framebuffer-state-restoration.html https://www.khronos.org/registry/webgl/sdk/tests/conformance/textures/misc/texture-size-cube-maps.html https://www.khronos.org/registry/webgl/sdk/tests/conformance/textures/webgl_canvas/tex-2d-rgba-rgba-unsigned_byte.html https://www.khronos.org/registry/webgl/sdk/tests/conformance/textures/webgl_canvas/tex-2d-rgb-rgb-unsigned_short_5_6_5.html https://www.khronos.org/registry/webgl/sdk/tests/conformance/textures/webgl_canvas/tex-2d-rgba-rgba-unsigned_short_4_4_4_4.html https://www.khronos.org/registry/webgl/sdk/tests/conformance/textures/webgl_canvas/tex-2d-rgba-rgba-unsigned_short_5_5_5_1.html https://www.khronos.org/registry/webgl/sdk/tests/conformance/textures/webgl_canvas/tex-2d-rgb-rgb-unsigned_byte.html https://www.khronos.org/registry/webgl/sdk/tests/conformance/textures/video/tex-2d-rgba-rgba-unsigned_byte.html https://www.khronos.org/registry/webgl/sdk/tests/conformance/textures/video/tex-2d-rgb-rgb-unsigned_short_5_6_5.html https://www.khronos.org/registry/webgl/sdk/tests/conformance/textures/video/tex-2d-rgba-rgba-unsigned_short_4_4_4_4.html https://www.khronos.org/registry/webgl/sdk/tests/conformance/textures/video/tex-2d-rgba-rgba-unsigned_short_5_5_5_1.html https://www.khronos.org/registry/webgl/sdk/tests/conformance/textures/video/tex-2d-rgb-rgb-unsigned_byte.html https://www.khronos.org/registry/webgl/sdk/tests/conformance2/textures/video/tex-2d-rgb8-rgb-unsigned_byte.html https://www.khronos.org/registry/webgl/sdk/tests/conformance2/textures/video/tex-2d-rg32f-rg-float.html https://www.khronos.org/registry/webgl/sdk/tests/conformance2/textures/video/tex-2d-rgb5_a1-rgba-unsigned_short_5_5_5_1.html https://www.khronos.org/registry/webgl/sdk/tests/conformance2/textures/video/tex-2d-rg8-rg-unsigned_byte.html https://www.khronos.org/registry/webgl/sdk/tests/conformance2/textures/video/tex-2d-rgb5_a1-rgba-unsigned_byte.html https://www.khronos.org/registry/webgl/sdk/tests/conformance2/textures/video/tex-2d-rgb9_e5-rgb-float.html https://www.khronos.org/registry/webgl/sdk/tests/conformance2/textures/video/tex-2d-r11f_g11f_b10f-rgb-half_float.html https://www.khronos.org/registry/webgl/sdk/tests/conformance2/textures/video/tex-2d-rgba32f-rgba-float.html https://www.khronos.org/registry/webgl/sdk/tests/conformance2/textures/video/tex-2d-rgb32f-rgb-float.html https://www.khronos.org/registry/webgl/sdk/tests/conformance2/textures/video/tex-2d-rgb9_e5-rgb-half_float.html https://www.khronos.org/registry/webgl/sdk/tests/conformance2/textures/video/tex-2d-rgba16f-rgba-float.html https://www.khronos.org/registry/webgl/sdk/tests/conformance2/textures/video/tex-2d-rgba8-rgba-unsigned_byte.html https://www.khronos.org/registry/webgl/sdk/tests/conformance2/textures/video/tex-2d-r8ui-red_integer-unsigned_byte.html https://www.khronos.org/registry/webgl/sdk/tests/conformance2/textures/video/tex-2d-r16f-red-half_float.html https://www.khronos.org/registry/webgl/sdk/tests/conformance2/textures/video/tex-2d-rg16f-rg-float.html https://www.khronos.org/registry/webgl/sdk/tests/conformance2/textures/video/tex-2d-r8-red-unsigned_byte.html https://www.khronos.org/registry/webgl/sdk/tests/conformance2/textures/video/tex-2d-rg8ui-rg_integer-unsigned_byte.html https://www.khronos.org/registry/webgl/sdk/tests/conformance2/textures/video/tex-2d-r11f_g11f_b10f-rgb-float.html https://www.khronos.org/registry/webgl/sdk/tests/conformance2/textures/video/tex-2d-rg16f-rg-half_float.html https://www.khronos.org/registry/webgl/sdk/tests/conformance2/textures/video/tex-2d-r16f-red-float.html https://www.khronos.org/registry/webgl/sdk/tests/conformance2/textures/video/tex-2d-rgb8ui-rgb_integer-unsigned_byte.html https://www.khronos.org/registry/webgl/sdk/tests/conformance2/textures/video/tex-2d-rgb16f-rgb-float.html https://www.khronos.org/registry/webgl/sdk/tests/conformance2/textures/video/tex-2d-srgb8_alpha8-rgba-unsigned_byte.html https://www.khronos.org/registry/webgl/sdk/tests/conformance2/textures/video/tex-2d-rgb565-rgb-unsigned_byte.html https://www.khronos.org/registry/webgl/sdk/tests/conformance2/textures/video/tex-2d-r11f_g11f_b10f-rgb-unsigned_int_10f_11f_11f_rev.html https://www.khronos.org/registry/webgl/sdk/tests/conformance2/textures/video/tex-2d-r32f-red-float.html https://www.khronos.org/registry/webgl/sdk/tests/conformance2/textures/video/tex-2d-rgba4-rgba-unsigned_byte.html https://www.khronos.org/registry/webgl/sdk/tests/conformance2/textures/video/tex-2d-rgba16f-rgba-half_float.html https://www.khronos.org/registry/webgl/sdk/tests/conformance2/textures/video/tex-2d-rgba4-rgba-unsigned_short_4_4_4_4.html https://www.khronos.org/registry/webgl/sdk/tests/conformance2/textures/video/tex-2d-rgb565-rgb-unsigned_short_5_6_5.html https://www.khronos.org/registry/webgl/sdk/tests/conformance2/textures/video/tex-2d-rgba8ui-rgba_integer-unsigned_byte.html https://www.khronos.org/registry/webgl/sdk/tests/conformance2/textures/video/tex-2d-rgb16f-rgb-half_float.html https://www.khronos.org/registry/webgl/sdk/tests/conformance2/textures/video/tex-2d-srgb8-rgb-unsigned_byte.html https://www.khronos.org/registry/webgl/sdk/tests/deqp/functional/gles3/readpixel.html CQ_INCLUDE_TRYBOTS=tryserver.chromium.linux:linux_optional_gpu_tests_rel;tryserver.chromium.mac:mac_optional_gpu_tests_rel;tryserver.chromium.win:win_optional_gpu_tests_rel Committed: https://crrev.com/ae22291b584735f8458ce123ceac88d8567f53cd Cr-Commit-Position: refs/heads/master@{#404260}

Patch Set 1 #

Patch Set 2 : add GL_BGRA8_EXT #

Total comments: 5

Patch Set 3 : create immutable texture on WebGL2 #

Total comments: 3

Patch Set 4 : m_webGLVersion > WebGL1 (for future versions) #

Unified diffs Side-by-side diffs Delta from patch set Stats (+150 lines, -64 lines) Patch
M gpu/command_buffer/service/gles2_cmd_decoder.cc View 1 2 1 chunk +7 lines, -3 lines 0 comments Download
M gpu/command_buffer/tests/gl_copy_texture_CHROMIUM_unittest.cc View 1 2 chunks +54 lines, -28 lines 0 comments Download
M third_party/WebKit/Source/modules/webgl/WebGL2RenderingContext.h View 1 2 1 chunk +0 lines, -1 line 0 comments Download
M third_party/WebKit/Source/modules/webgl/WebGL2RenderingContextBase.cpp View 1 2 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/Source/modules/webgl/WebGLRenderingContext.h View 1 2 1 chunk +0 lines, -1 line 0 comments Download
M third_party/WebKit/Source/modules/webgl/WebGLRenderingContext.cpp View 1 2 1 chunk +2 lines, -2 lines 0 comments Download
M third_party/WebKit/Source/modules/webgl/WebGLRenderingContextBase.h View 1 2 4 chunks +7 lines, -4 lines 0 comments Download
M third_party/WebKit/Source/modules/webgl/WebGLRenderingContextBase.cpp View 1 2 4 chunks +22 lines, -6 lines 0 comments Download
M third_party/WebKit/Source/platform/graphics/gpu/DrawingBuffer.h View 1 2 7 chunks +12 lines, -4 lines 0 comments Download
M third_party/WebKit/Source/platform/graphics/gpu/DrawingBuffer.cpp View 1 2 3 8 chunks +40 lines, -12 lines 0 comments Download
M third_party/WebKit/Source/platform/graphics/gpu/DrawingBufferTest.cpp View 1 2 2 chunks +5 lines, -2 lines 0 comments Download

Messages

Total messages: 16 (5 generated)
dshwang
kbr, zmo, could you review? It was reverted long time ago because webgl conformance2 test ...
4 years, 5 months ago (2016-07-06 13:24:33 UTC) #3
Zhenyao Mo
https://codereview.chromium.org/2125023002/diff/20001/third_party/WebKit/Source/platform/graphics/gpu/DrawingBuffer.cpp File third_party/WebKit/Source/platform/graphics/gpu/DrawingBuffer.cpp (right): https://codereview.chromium.org/2125023002/diff/20001/third_party/WebKit/Source/platform/graphics/gpu/DrawingBuffer.cpp#newcode481 third_party/WebKit/Source/platform/graphics/gpu/DrawingBuffer.cpp:481: m_storageTextureSupported = m_extensionsUtil->supportsExtension("GL_EXT_texture_storage"); What about WebGL 2 / ES3 ...
4 years, 5 months ago (2016-07-06 18:12:06 UTC) #4
Ken Russell (switch to Gerrit)
Hopefully the test coverage has been increased so that the earlier regressions won't be re-introduced. ...
4 years, 5 months ago (2016-07-06 23:53:49 UTC) #5
Ken Russell (switch to Gerrit)
lgtm with zmo@'s comments addressed
4 years, 5 months ago (2016-07-06 23:54:00 UTC) #6
dshwang
Hi, I resolved all Zhenyao's concern. It requires some boilerplate plumbing code to make DrawingBuffer ...
4 years, 5 months ago (2016-07-07 12:33:26 UTC) #7
Zhenyao Mo
lgtm https://codereview.chromium.org/2125023002/diff/40001/third_party/WebKit/Source/platform/graphics/gpu/DrawingBuffer.cpp File third_party/WebKit/Source/platform/graphics/gpu/DrawingBuffer.cpp (right): https://codereview.chromium.org/2125023002/diff/40001/third_party/WebKit/Source/platform/graphics/gpu/DrawingBuffer.cpp#newcode488 third_party/WebKit/Source/platform/graphics/gpu/DrawingBuffer.cpp:488: m_storageTextureSupported = m_webGLVersion == WebGL2 || m_extensionsUtil->supportsExtension("GL_EXT_texture_storage"); nit: ...
4 years, 5 months ago (2016-07-07 16:33:38 UTC) #8
dshwang
thank you for reviewing! https://codereview.chromium.org/2125023002/diff/40001/third_party/WebKit/Source/platform/graphics/gpu/DrawingBuffer.cpp File third_party/WebKit/Source/platform/graphics/gpu/DrawingBuffer.cpp (right): https://codereview.chromium.org/2125023002/diff/40001/third_party/WebKit/Source/platform/graphics/gpu/DrawingBuffer.cpp#newcode488 third_party/WebKit/Source/platform/graphics/gpu/DrawingBuffer.cpp:488: m_storageTextureSupported = m_webGLVersion == WebGL2 ...
4 years, 5 months ago (2016-07-07 16:47:37 UTC) #9
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2125023002/60001
4 years, 5 months ago (2016-07-07 16:48:50 UTC) #12
commit-bot: I haz the power
Committed patchset #4 (id:60001)
4 years, 5 months ago (2016-07-07 22:23:48 UTC) #13
commit-bot: I haz the power
CQ bit was unchecked.
4 years, 5 months ago (2016-07-07 22:24:05 UTC) #14
commit-bot: I haz the power
4 years, 5 months ago (2016-07-07 22:25:38 UTC) #16
Message was sent while issue was closed.
Patchset 4 (id:??) landed as
https://crrev.com/ae22291b584735f8458ce123ceac88d8567f53cd
Cr-Commit-Position: refs/heads/master@{#404260}

Powered by Google App Engine
This is Rietveld 408576698