Support primitive restart in RendererGL.

Store index ranges in a new struct that tracks how many real indices were
seen.  Update index caching to key on primitive restart being enabled and
update index counting functions to skip primitive restart indicies when
needed.

Passes dEQP-GLES3.functional.primitive_restart.*

Change-Id: Id1e25a5adcdcd4e998836e8ff6679c64be4c3066
Reviewed-on: https://chromium-review.googlesource.com/297770
Tryjob-Request: Geoff Lang <geofflang@chromium.org>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Tested-by: Geoff Lang <geofflang@chromium.org>
diff --git a/src/libANGLE/Context.cpp b/src/libANGLE/Context.cpp
index 4337b83..27020eb 100644
--- a/src/libANGLE/Context.cpp
+++ b/src/libANGLE/Context.cpp
@@ -1301,7 +1301,7 @@
                             GLsizei count,
                             GLenum type,
                             const GLvoid *indices,
-                            const RangeUI &indexRange)
+                            const IndexRange &indexRange)
 {
     syncRendererState();
     return mRenderer->drawElements(getData(), mode, count, type, indices, indexRange);
@@ -1312,7 +1312,7 @@
                                      GLenum type,
                                      const GLvoid *indices,
                                      GLsizei instances,
-                                     const RangeUI &indexRange)
+                                     const IndexRange &indexRange)
 {
     syncRendererState();
     return mRenderer->drawElementsInstanced(getData(), mode, count, type, indices, instances,
@@ -1325,7 +1325,7 @@
                                  GLsizei count,
                                  GLenum type,
                                  const GLvoid *indices,
-                                 const RangeUI &indexRange)
+                                 const IndexRange &indexRange)
 {
     syncRendererState();
     return mRenderer->drawRangeElements(getData(), mode, start, end, count, type, indices,