OSDN Git Service

Primitive restart fixed
authorAlexis Hetu <sugoi@google.com>
Tue, 23 Jan 2018 19:37:38 +0000 (14:37 -0500)
committerAlexis Hétu <sugoi@google.com>
Thu, 1 Feb 2018 19:29:23 +0000 (19:29 +0000)
commit541d6a03ed21e23b0cf57e6c2aaf5058f0c43c64
treec57eb9e77cdc4e561a0d4c2cdf3e1c333e02d44e
parent61fe99f5ea3505213237c1737c7d8c2601f6b62a
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 <sugoi@google.com>
Reviewed-by: Nicolas Capens <nicolascapens@google.com>
src/OpenGL/libGLESv2/IndexDataManager.cpp