[webkit-reviews] review granted: [Bug 214211] [WebGL2] vertexAttribI* and getFragDataLocation : [Attachment 404159] Patch

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Mon Jul 13 13:12:50 PDT 2020


Dean Jackson <dino at apple.com> has granted James Darpinian
<jdarpinian at chromium.org>'s request for review:
Bug 214211: [WebGL2] vertexAttribI* and getFragDataLocation
https://bugs.webkit.org/show_bug.cgi?id=214211

Attachment 404159: Patch

https://bugs.webkit.org/attachment.cgi?id=404159&action=review




--- Comment #3 from Dean Jackson <dino at apple.com> ---
Comment on attachment 404159
  --> https://bugs.webkit.org/attachment.cgi?id=404159
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=404159&action=review

> Source/WebCore/html/canvas/WebGL2RenderingContext.cpp:1355
> +    m_context->vertexAttribI4i(index, x, y, z, w);

Do we need to confirm index <= m_maxVertexAttribs?

> Source/WebCore/html/canvas/WebGL2RenderingContext.cpp:1382
> +    if (index >= m_maxVertexAttribs) {
> +	   synthesizeGLError(GraphicsContextGL::INVALID_VALUE,
"vertexAttribI4iv", "index out of range");
> +	   return;

... because you do here.

> Source/WebCore/html/canvas/WebGL2RenderingContext.cpp:1386
> +    memcpy(m_vertexAttribValue[index].iValue, data,
sizeof(m_vertexAttribValue[index].iValue));

Do we need to memset(0) the destination values before copying? What if the
destination value is larger than the incoming array?


More information about the webkit-reviews mailing list