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

Issue 1205573003: WebGL 2: validate read buffer attachment when reading from FBO (Closed)

Created:
5 years, 6 months ago by yunchao
Modified:
5 years, 5 months ago
CC:
blink-reviews, dshwang, blink-reviews-html_chromium.org, dglazkov+blink, Rik, Justin Novosad
Base URL:
https://chromium.googlesource.com/chromium/blink.git@master
Target Ref:
refs/heads/master
Project:
blink
Visibility:
Public.

Description

WebGL 2: validate read buffer attachment when reading from FBO BUG=295792 Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=198484

Patch Set 1 #

Total comments: 2

Patch Set 2 : addressed kbr@'s feedback: translate GL_BACK to GL_COLOR_ATTACHMENT0 on default fb of WebGL #

Total comments: 8

Patch Set 3 : addressed zmo@'s feedback: translate GL_COLOR_ATTACHMENT0 to GL_BACK in getter for default fb #

Total comments: 4

Patch Set 4 : addressed zmo@'s feedback: readbuffer is per framebuffer, not per rendering context #

Total comments: 8

Patch Set 5 : addressed zmo@'s and kbr@'s feedback, and rebased the code #

Total comments: 4

Patch Set 6 : addressed kbr's feedback: reading from framebuffer with GL_NONE is invalid #

Unified diffs Side-by-side diffs Delta from patch set Stats (+85 lines, -1 line) Patch
M Source/modules/webgl/WebGL2RenderingContextBase.cpp View 1 2 3 4 5 2 chunks +43 lines, -1 line 0 comments Download
M Source/modules/webgl/WebGLFramebuffer.h View 1 2 3 4 2 chunks +6 lines, -0 lines 0 comments Download
M Source/modules/webgl/WebGLFramebuffer.cpp View 1 2 3 4 1 chunk +1 line, -0 lines 0 comments Download
M Source/modules/webgl/WebGLRenderingContextBase.h View 1 2 3 4 2 chunks +6 lines, -0 lines 0 comments Download
M Source/modules/webgl/WebGLRenderingContextBase.cpp View 1 2 3 4 5 5 chunks +29 lines, -0 lines 0 comments Download

Messages

Total messages: 31 (6 generated)
yunchao
Discussed in https://codereview.chromium.org/1120953002/. PTAL when you have time. Thanks a lot!
5 years, 6 months ago (2015-06-23 08:57:02 UTC) #2
yunchao
On 2015/06/23 08:57:02, yunchao wrote: > Discussed in https://codereview.chromium.org/1120953002/. PTAL when you have > time. ...
5 years, 6 months ago (2015-06-23 08:59:57 UTC) #3
Ken Russell (switch to Gerrit)
Thanks for working on this. https://codereview.chromium.org/1205573003/diff/1/Source/core/html/canvas/WebGLRenderingContextBase.cpp File Source/core/html/canvas/WebGLRenderingContextBase.cpp (right): https://codereview.chromium.org/1205573003/diff/1/Source/core/html/canvas/WebGLRenderingContextBase.cpp#newcode1585 Source/core/html/canvas/WebGLRenderingContextBase.cpp:1585: if (!validateReadBufferAttachment("copyTexImage2D", readFramebufferBinding)) Has ...
5 years, 5 months ago (2015-06-24 00:24:39 UTC) #4
yunchao
Thanks for your reviewing, kbr@. Code has been updated to translate GL_BACK to GL_COLOR_ATTACHMENT0 for ...
5 years, 5 months ago (2015-06-24 08:50:51 UTC) #5
Zhenyao Mo
https://codereview.chromium.org/1205573003/diff/20001/Source/core/html/canvas/WebGL2RenderingContextBase.cpp File Source/core/html/canvas/WebGL2RenderingContextBase.cpp (right): https://codereview.chromium.org/1205573003/diff/20001/Source/core/html/canvas/WebGL2RenderingContextBase.cpp#newcode187 Source/core/html/canvas/WebGL2RenderingContextBase.cpp:187: if (mode != GL_BACK || mode != GL_NONE) { ...
5 years, 5 months ago (2015-06-25 22:42:23 UTC) #6
yunchao
Thanks for your reviewing, zmo@. The code has been updated accordingly. PTAL when you have ...
5 years, 5 months ago (2015-06-30 05:44:56 UTC) #8
Zhenyao Mo
LGTM
5 years, 5 months ago (2015-06-30 06:42:31 UTC) #9
Ken Russell (switch to Gerrit)
I think there are remaining problems here: for example, what happens in the following situation? ...
5 years, 5 months ago (2015-07-01 00:28:29 UTC) #10
Zhenyao Mo
On 2015/07/01 00:28:29, Ken Russell wrote: > I think there are remaining problems here: for ...
5 years, 5 months ago (2015-07-01 02:33:27 UTC) #11
yunchao
On 2015/07/01 02:33:27, Zhenyao Mo wrote: > On 2015/07/01 00:28:29, Ken Russell wrote: > > ...
5 years, 5 months ago (2015-07-01 15:11:52 UTC) #13
Zhenyao Mo
https://codereview.chromium.org/1205573003/diff/60001/Source/core/html/canvas/WebGLRenderingContextBase.h File Source/core/html/canvas/WebGLRenderingContextBase.h (right): https://codereview.chromium.org/1205573003/diff/60001/Source/core/html/canvas/WebGLRenderingContextBase.h#newcode572 Source/core/html/canvas/WebGLRenderingContextBase.h:572: GLenum m_readbufferOfFBO; Now from our discussion, this should be ...
5 years, 5 months ago (2015-07-01 15:21:27 UTC) #14
Ken Russell (switch to Gerrit)
On 2015/07/01 02:33:27, Zhenyao Mo wrote: > On 2015/07/01 00:28:29, Ken Russell wrote: > > ...
5 years, 5 months ago (2015-07-01 17:21:08 UTC) #15
Ken Russell (switch to Gerrit)
https://codereview.chromium.org/1205573003/diff/60001/Source/core/html/canvas/WebGLRenderingContextBase.h File Source/core/html/canvas/WebGLRenderingContextBase.h (right): https://codereview.chromium.org/1205573003/diff/60001/Source/core/html/canvas/WebGLRenderingContextBase.h#newcode572 Source/core/html/canvas/WebGLRenderingContextBase.h:572: GLenum m_readbufferOfFBO; On 2015/07/01 15:21:27, Zhenyao Mo wrote: > ...
5 years, 5 months ago (2015-07-01 17:24:07 UTC) #16
yunchao
On 2015/07/01 17:24:07, Ken Russell wrote: > https://codereview.chromium.org/1205573003/diff/60001/Source/core/html/canvas/WebGLRenderingContextBase.h > File Source/core/html/canvas/WebGLRenderingContextBase.h (right): > > https://codereview.chromium.org/1205573003/diff/60001/Source/core/html/canvas/WebGLRenderingContextBase.h#newcode572 ...
5 years, 5 months ago (2015-07-02 14:58:31 UTC) #18
yunchao
On 2015/07/02 14:58:31, yunchao wrote: > On 2015/07/01 17:24:07, Ken Russell wrote: > > > ...
5 years, 5 months ago (2015-07-02 15:16:37 UTC) #19
yunchao
Please see the comments inline. Thanks a lot! https://codereview.chromium.org/1205573003/diff/60001/Source/core/html/canvas/WebGLRenderingContextBase.h File Source/core/html/canvas/WebGLRenderingContextBase.h (right): https://codereview.chromium.org/1205573003/diff/60001/Source/core/html/canvas/WebGLRenderingContextBase.h#newcode572 Source/core/html/canvas/WebGLRenderingContextBase.h:572: GLenum ...
5 years, 5 months ago (2015-07-02 15:24:54 UTC) #20
Zhenyao Mo
https://codereview.chromium.org/1205573003/diff/120001/Source/core/html/canvas/WebGL2RenderingContextBase.cpp File Source/core/html/canvas/WebGL2RenderingContextBase.cpp (right): https://codereview.chromium.org/1205573003/diff/120001/Source/core/html/canvas/WebGL2RenderingContextBase.cpp#newcode204 Source/core/html/canvas/WebGL2RenderingContextBase.cpp:204: m_readBuffer = mode; I think it's better to cache ...
5 years, 5 months ago (2015-07-06 17:52:25 UTC) #21
Ken Russell (switch to Gerrit)
https://codereview.chromium.org/1205573003/diff/120001/Source/core/html/canvas/WebGL2RenderingContextBase.cpp File Source/core/html/canvas/WebGL2RenderingContextBase.cpp (right): https://codereview.chromium.org/1205573003/diff/120001/Source/core/html/canvas/WebGL2RenderingContextBase.cpp#newcode204 Source/core/html/canvas/WebGL2RenderingContextBase.cpp:204: m_readBuffer = mode; On 2015/07/06 17:52:25, Zhenyao Mo wrote: ...
5 years, 5 months ago (2015-07-06 21:19:14 UTC) #22
yunchao
Thanks for your reviewing, zmo@ and kbr@. Code has been updated, PTAL. https://codereview.chromium.org/1205573003/diff/120001/Source/core/html/canvas/WebGL2RenderingContextBase.cpp File Source/core/html/canvas/WebGL2RenderingContextBase.cpp ...
5 years, 5 months ago (2015-07-07 08:10:39 UTC) #23
Zhenyao Mo
LGTM https://codereview.chromium.org/1205573003/diff/140001/Source/modules/webgl/WebGL2RenderingContextBase.cpp File Source/modules/webgl/WebGL2RenderingContextBase.cpp (right): https://codereview.chromium.org/1205573003/diff/140001/Source/modules/webgl/WebGL2RenderingContextBase.cpp#newcode1813 Source/modules/webgl/WebGL2RenderingContextBase.cpp:1813: GLint value = 0; nit: this should be ...
5 years, 5 months ago (2015-07-07 17:20:31 UTC) #24
Ken Russell (switch to Gerrit)
https://codereview.chromium.org/1205573003/diff/140001/Source/modules/webgl/WebGLRenderingContextBase.cpp File Source/modules/webgl/WebGLRenderingContextBase.cpp (right): https://codereview.chromium.org/1205573003/diff/140001/Source/modules/webgl/WebGLRenderingContextBase.cpp#newcode1560 Source/modules/webgl/WebGLRenderingContextBase.cpp:1560: return false; This must synthesize an INVALID_OPERATION error per ...
5 years, 5 months ago (2015-07-07 18:21:26 UTC) #25
yunchao
PTAL. Ken, the test cases for GL_NONE is added too: https://github.com/KhronosGroup/WebGL/pull/1104 https://codereview.chromium.org/1205573003/diff/140001/Source/modules/webgl/WebGL2RenderingContextBase.cpp File Source/modules/webgl/WebGL2RenderingContextBase.cpp (right): ...
5 years, 5 months ago (2015-07-08 06:43:52 UTC) #26
Ken Russell (switch to Gerrit)
Thanks for following through on this. LGTM
5 years, 5 months ago (2015-07-08 07:19:36 UTC) #27
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1205573003/160001
5 years, 5 months ago (2015-07-08 08:20:57 UTC) #30
commit-bot: I haz the power
5 years, 5 months ago (2015-07-08 09:41:33 UTC) #31
Message was sent while issue was closed.
Committed patchset #6 (id:160001) as
https://src.chromium.org/viewvc/blink?view=rev&revision=198484

Powered by Google App Engine
This is Rietveld 408576698