Hash :
118a6484
Author :
Date :
2022-05-19T15:11:31
Metal: Upstream buffer cache fix from WebKit Patch is from: https://bugs.webkit.org/show_bug.cgi?id=239015 BufferMtl::getRestartIndices() would recalculate restart indices on each draw because RestartRangeCache::operator bool() would return m_isDirty instead of the intended !m_isDirty. Use std::optional to hold the RestartRangeCache instead of maintaining m_isDirty. This allows the type system to contribute to the correctness of the code. Dirty restart range cache is not useful and takes up memory. Bug: angleproject:7340 Change-Id: I6e3ce527700780b5fea59af405bfe06d3714e79f Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3656450 Reviewed-by: Kenneth Russell <kbr@chromium.org> Commit-Queue: Gregg Tavares <gman@chromium.org>