Title: [284125] trunk/Source/ThirdParty/ANGLE
- Revision
- 284125
- Author
- [email protected]
- Date
- 2021-10-13 14:33:00 -0700 (Wed, 13 Oct 2021)
Log Message
Upstream ANGLE: PrimitiveRestart tests fail due to incorrect draw commands
https://bugs.webkit.org/show_bug.cgi?id=231626
<rdar:/problem/84167241>
Primitive restart draw commands were being encoded
incorrectly. Single element ranges were being disregarded,
and a maximum draw size was not being enforced when the
index buffer was aliased / reused.
Cherry-pick from upstream anglebug.com/6535
Reviewed by Kenneth Russell.
* src/libANGLE/renderer/metal/VertexArrayMtl.mm:
(rx::VertexArrayMtl::getDrawIndices):
Modified Paths
Diff
Modified: trunk/Source/ThirdParty/ANGLE/ChangeLog (284124 => 284125)
--- trunk/Source/ThirdParty/ANGLE/ChangeLog 2021-10-13 20:46:48 UTC (rev 284124)
+++ trunk/Source/ThirdParty/ANGLE/ChangeLog 2021-10-13 21:33:00 UTC (rev 284125)
@@ -1,3 +1,21 @@
+2021-10-13 Kyle Piddington <[email protected]>
+
+ Upstream ANGLE: PrimitiveRestart tests fail due to incorrect draw commands
+ https://bugs.webkit.org/show_bug.cgi?id=231626
+ <rdar:/problem/84167241>
+
+ Primitive restart draw commands were being encoded
+ incorrectly. Single element ranges were being disregarded,
+ and a maximum draw size was not being enforced when the
+ index buffer was aliased / reused.
+
+ Cherry-pick from upstream anglebug.com/6535
+
+ Reviewed by Kenneth Russell.
+
+ * src/libANGLE/renderer/metal/VertexArrayMtl.mm:
+ (rx::VertexArrayMtl::getDrawIndices):
+
2021-10-12 Alexey Proskuryakov <[email protected]>
Invoke ThirdParty build scripts with python3 explicitly
Modified: trunk/Source/ThirdParty/ANGLE/src/libANGLE/renderer/metal/VertexArrayMtl.mm (284124 => 284125)
--- trunk/Source/ThirdParty/ANGLE/src/libANGLE/renderer/metal/VertexArrayMtl.mm 2021-10-13 20:46:48 UTC (rev 284124)
+++ trunk/Source/ThirdParty/ANGLE/src/libANGLE/renderer/metal/VertexArrayMtl.mm 2021-10-13 21:33:00 UTC (rev 284125)
@@ -787,10 +787,14 @@
{
if (range.restartBegin > currentIndexOffset)
{
- int64_t nIndicesInSlice = ((int64_t)range.restartBegin - currentIndexOffset) - ((int64_t) range.restartBegin - currentIndexOffset) % nIndicesPerPrimitive;
+ int64_t nIndicesInSlice = MIN(((int64_t)range.restartBegin - currentIndexOffset) -
+ ((int64_t)range.restartBegin - currentIndexOffset) % nIndicesPerPrimitive,
+ indicesLeft);
size_t restartSize = (range.restartEnd - range.restartBegin) + 1;
- if (nIndicesInSlice > nIndicesPerPrimitive)
+ if (nIndicesInSlice >= nIndicesPerPrimitive)
+ {
drawCommands.push_back({(uint32_t) nIndicesInSlice, currentIndexOffset * indexTypeBytes});
+ }
// Account for dropped indices due to incomplete primitives.
size_t indicesUsed = ( (range.restartBegin + restartSize) - currentIndexOffset);
if (indicesLeft <= indicesUsed)
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes