Skip to content

i965: Work around incorrect usage of glDrawRangeElements in UE4

Unreal Engine 4 has a bug in usage of glDrawRangeElements, causing it to be called with a number of vertices in place of "end" parameter (which specifies the maximum array index contained in indices). See UE4/SlateOpenGLRenderingPolicy.cpp#L323

Since there is unknown amount of games affected and we could not identify that a game is built with UE4 - we are forced to make a blanket workaround, disregarding max_index in range calculations.

This was uncovered after b684030c broke a bunch of UE4 games.

Cc: 20.1 mesa-stable@lists.freedesktop.org
Closes: #2917 (closed)

Merge request reports

Loading