Always create an OpenGL ES 3.0 context.
The EGL spec allows that on context creation, a newer, compatible
version is returned. OpenGL ES 3.0 is stated to be backward compatible
with OpenGL ES 2.0, so we can stop creating a context that is limited to
OpenGL ES 2.0 features, and always return an OpenGL ES 3.0 context.
This simplifies our code and maintenance a bit and reduces the risk of
incorrect validation.
Note that Appendix F of the OpenGL ES 3.0 specification lists changes
in behavior that aren't entirely backward compatible with OpenGL ES 2.0:
* OpenGL ES 3.0 requires that all cube map filtering be seamless. OpenGL
ES 2.0 specified that a single cube map face be selected and used for
filtering. See section 3.8.9.1.
* OpenGL ES 3.0 specifies a zero-preserving mapping when converting back
and forth between signed normalized fixed-point values and floating-
point values. OpenGL ES 2.0 specified a mapping by which zeros are not
preserved. See section 2.1.6.
* OpenGL ES 3.0 requires that framebuffer objects not be shared between
contexts. OpenGL ES 2.0 left it undefined whether framebuffer objects
could be shared. See appendix D.
Additional differences can stem from new extensions being exposed (e.g.
GL_EXT_color_buffer_float), and framebuffer configurations that are
newly supported or no longer supported (in particular we allowed
separate depth and stencil attachments, which OpenGL ES 3.0 expressly
disallows).
See also https://gitlab.khronos.org/opengl/API/issues/82
Bug swiftshader:45
Change-Id: I90d72698d509b4f03263edcf7c67e44fcef0beb6
Reviewed-on: https://swiftshader-review.googlesource.com/19388Tested-by:
Nicolas Capens <nicolascapens@google.com>
Reviewed-by:
Alexis Hétu <sugoi@google.com>
Showing
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
Please
register
or
sign in
to comment