[webkit-changes] [WebKit/WebKit] be0a40: WebGL buffers maintain shadow copy

Kimmo Kinnunen noreply at github.com
Fri Sep 16 00:28:36 PDT 2022


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: be0a403feb9da4434c92bdde78e7722997268dcf
      https://github.com/WebKit/WebKit/commit/be0a403feb9da4434c92bdde78e7722997268dcf
  Author: Kimmo Kinnunen <kkinnunen at apple.com>
  Date:   2022-09-16 (Fri, 16 Sep 2022)

  Changed paths:
    M LayoutTests/fast/canvas/webgl/largeBuffer-expected.txt
    M LayoutTests/fast/canvas/webgl/largeBuffer.html
    A LayoutTests/platform/gtk/fast/canvas/webgl/largeBuffer-expected.txt
    A LayoutTests/webgl/buffer-copysubdata-overlap-no-crash-expected.txt
    A LayoutTests/webgl/buffer-copysubdata-overlap-no-crash.html
    M LayoutTests/webgl/webgl-allow-shared-expected.txt
    M Source/WebCore/html/canvas/WebGL2RenderingContext.cpp
    M Source/WebCore/html/canvas/WebGL2RenderingContext.h
    M Source/WebCore/html/canvas/WebGLBuffer.cpp
    M Source/WebCore/html/canvas/WebGLBuffer.h
    M Source/WebCore/html/canvas/WebGLRenderingContext.cpp
    M Source/WebCore/html/canvas/WebGLRenderingContext.h
    M Source/WebCore/html/canvas/WebGLRenderingContextBase.cpp
    M Source/WebCore/html/canvas/WebGLRenderingContextBase.h

  Log Message:
  -----------
  WebGL buffers maintain shadow copy
https://bugs.webkit.org/show_bug.cgi?id=245137
rdar://97453557

Reviewed by Kenneth Russell.

Remove the code caching the WebGL buffer data and size.
The data was used to assert that indices drawn with DrawElements are
in range for other buffers.
Remove the data, it is verified by ANGLE.

The size was used to assert that updates to the buffer are in range.
Since we do not check the success of the updates, we cannot cache the
size. The size is checked by ANGLE.

* LayoutTests/webgl/buffer-copysubdata-overlap-no-crash.html: Added.
* Source/WebCore/html/canvas/WebGL2RenderingContext.cpp:
(WebCore::WebGL2RenderingContext::copyBufferSubData):
(WebCore::WebGL2RenderingContext::getBufferSubData):
(WebCore::WebGL2RenderingContext::validateIndexArrayConservative): Deleted.
* Source/WebCore/html/canvas/WebGL2RenderingContext.h:
* Source/WebCore/html/canvas/WebGLBuffer.cpp:
(WebCore::WebGLBuffer::WebGLBuffer):
(WebCore::WebGLBuffer::associateBufferDataImpl):
(WebCore::WebGLBuffer::associateBufferSubDataImpl):
(WebCore::WebGLBuffer::associateCopyBufferSubData):
* Source/WebCore/html/canvas/WebGLBuffer.h:
* Source/WebCore/html/canvas/WebGLRenderingContext.cpp:
* Source/WebCore/html/canvas/WebGLRenderingContext.h:
* Source/WebCore/html/canvas/WebGLRenderingContextBase.cpp:
(WebCore::WebGLRenderingContextBase::bufferData):
(WebCore::WebGLRenderingContextBase::bufferSubData):
(WebCore::WebGLRenderingContextBase::validateVertexAttributes):
(WebCore::WebGLRenderingContextBase::validateDrawArrays):
(WebCore::WebGLRenderingContextBase::validateDrawElements):
* Source/WebCore/html/canvas/WebGLRenderingContextBase.h:
(WebCore::WebGLRenderingContextBase::getMaxIndex):

Canonical link: https://commits.webkit.org/254544@main




More information about the webkit-changes mailing list