Primitive restart fixed
Primitive restart fixed

SwiftShader wasn't correctly handling having no restart indices
in the index buffer while having primitive restart enabled. In
the WebGL 2 conformance tests, the reference image is also
computed while primitive restart is on, which means that
Context::drawElements() may modify the internal primitive type,
so indices must be adjusted to reflect that change, even if no
restart indices are present in the index buffer.

Fixes all WebGL 2 tests in:
all/deqp/functional/gles3/primitiverestart

Change-Id: I24f129e0f7bd42b5037b74617b48a32621440ddb
Reviewed-on: https://swiftshader-review.googlesource.com/16548
Tested-by: Alexis Hétu <1c7141772178a7e80858c3db5052b328076f08f4@google.com>
Reviewed-by: Nicolas Capens <51edc787c30f24c4904e8ffbb5523c3a9f7a451d@google.com>

google/swiftshader,bkaradzic/SwiftShader,bkaradzic/SwiftShader,bkaradzic/SwiftShader,bkaradzic/SwiftShader,bkaradzic/SwiftShader,google/swiftshader,google/swiftshader