Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 7aa25e16d8f37efb8361fb142ff7446042e14883
      
https://github.com/WebKit/WebKit/commit/7aa25e16d8f37efb8361fb142ff7446042e14883
  Author: Kimmo Kinnunen <[email protected]>
  Date:   2026-04-20 (Mon, 20 Apr 2026)

  Changed paths:
    M Source/ThirdParty/ANGLE/src/libANGLE/renderer/metal/ContextMtl.mm
    M Source/ThirdParty/ANGLE/src/libANGLE/renderer/metal/ProgramExecutableMtl.h
    M 
Source/ThirdParty/ANGLE/src/libANGLE/renderer/metal/ProgramExecutableMtl.mm
    M 
Source/ThirdParty/ANGLE/src/libANGLE/renderer/metal/ProvokingVertexHelper.mm
    M Source/ThirdParty/ANGLE/src/libANGLE/renderer/metal/VertexArrayMtl.h
    M Source/ThirdParty/ANGLE/src/libANGLE/renderer/metal/VertexArrayMtl.mm
    M Source/ThirdParty/ANGLE/src/libANGLE/renderer/metal/mtl_buffer_pool.h
    M Source/ThirdParty/ANGLE/src/libANGLE/renderer/metal/mtl_buffer_pool.mm
    M Source/ThirdParty/ANGLE/src/libANGLE/renderer/metal/mtl_resources.h

  Log Message:
  -----------
  ANGLE: Metal: Add BufferSlice to associate BufferRef, offset pairs
https://bugs.webkit.org/show_bug.cgi?id=312561
rdar://174999473

Reviewed by Dan Glastonbury.

Many functions operate on BufferRef + offset pair, especially the
cases which allocate from BufferPool.
Add BufferSlice abstraction to manage these in buffer safe manner.
Choose "Slice" since a slice owns its data, as opposed to a "Span" or a
"View".

In later commits the data consumption points such as the encoders
might release assert that the buffer is large enough.

* Source/ThirdParty/ANGLE/src/libANGLE/renderer/metal/ContextMtl.mm:
(rx::ContextMtl::drawTriFanArraysLegacy):
(rx::ContextMtl::drawLineLoopArrays):
(rx::ContextMtl::drawTriFanElements):
(rx::ContextMtl::drawLineLoopElements):
(rx::ContextMtl::drawElementsImpl):
* Source/ThirdParty/ANGLE/src/libANGLE/renderer/metal/ProgramExecutableMtl.h:
* Source/ThirdParty/ANGLE/src/libANGLE/renderer/metal/ProgramExecutableMtl.mm:
(rx::ProgramExecutableMtl::commitUniforms):
(rx::ProgramExecutableMtl::updateUniformBuffers):
(rx::ProgramExecutableMtl::legalizeUniformBufferOffsets):
(rx::ProgramExecutableMtl::bindUniformBuffersToDiscreteSlots):
(rx::ProgramExecutableMtl::encodeUniformBuffersInfoArgumentBuffer):
* Source/ThirdParty/ANGLE/src/libANGLE/renderer/metal/ProvokingVertexHelper.mm:
(rx::ProvokingVertexHelper::preconditionIndexBuffer):
(rx::ProvokingVertexHelper::generateIndexBuffer):
* Source/ThirdParty/ANGLE/src/libANGLE/renderer/metal/VertexArrayMtl.h:
* Source/ThirdParty/ANGLE/src/libANGLE/renderer/metal/VertexArrayMtl.mm:
(rx::VertexArrayMtl::getIndexBuffer):
(rx::VertexArrayMtl::convertIndexBuffer):
(rx::VertexArrayMtl::convertIndexBufferGPU):
(rx::VertexArrayMtl::streamIndexBufferFromClient):
(rx::VertexArrayMtl::convertVertexBufferGPU):
* Source/ThirdParty/ANGLE/src/libANGLE/renderer/metal/mtl_buffer_pool.h:
* Source/ThirdParty/ANGLE/src/libANGLE/renderer/metal/mtl_buffer_pool.mm:
(rx::mtl::BufferPool::allocate):
* Source/ThirdParty/ANGLE/src/libANGLE/renderer/metal/mtl_resources.h:
(rx::mtl::BufferSlice::empty const):
(rx::mtl::BufferSlice::buffer const):
(rx::mtl::BufferSlice::size const):
(rx::mtl::BufferSlice::offset const):
(rx::mtl::Buffer::mapWithOpt):
(rx::mtl::BufferSlice::BufferSlice):
(rx::mtl::BufferSlice::subslice const):

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



To unsubscribe from these emails, change your notification settings at 
https://github.com/WebKit/WebKit/settings/notifications

Reply via email to