Fixed buffer offset when primitive restart is enabled

The data pointer 'buffer->data()' was being used without the
offset applied, which means we were using the wrong part of
the index buffer when primitive restart is enabled. 'indices'
should already contain the properly offset buffer pointer,
so using it directly should work.

Bug chromium:823096

Change-Id: If70634f63d40d8efde9b1336370c1a63b1faa19f
Reviewed-on: https://swiftshader-review.googlesource.com/18268
Reviewed-by: Nicolas Capens <nicolascapens@google.com>
Tested-by: Alexis Hétu <sugoi@google.com>
diff --git a/src/OpenGL/libGLESv2/IndexDataManager.cpp b/src/OpenGL/libGLESv2/IndexDataManager.cpp
index 55c15b2..0467d02 100644
--- a/src/OpenGL/libGLESv2/IndexDataManager.cpp
+++ b/src/OpenGL/libGLESv2/IndexDataManager.cpp
@@ -318,7 +318,7 @@
 			return GL_OUT_OF_MEMORY;
 		}
 
-		copyIndices(mode, type, *restartIndices, staticBuffer ? buffer->data() : indices, count, output);
+		copyIndices(mode, type, *restartIndices, indices, count, output);
 		streamingBuffer->unmap();
 
 		translated->indexBuffer = streamingBuffer->getResource();