Commit c8fcfd82 by Nicolas Capens Committed by Nicolas Capens

Enable OpenGL ES 3.0 unconditionally.

We are now passing all of dEQP-GLES3 mustpass tests. Change-Id: I98a4e57c4cf90a3b193e220e75a97b9657c746e7 Reviewed-on: https://swiftshader-review.googlesource.com/16208Reviewed-by: 's avatarAlexis Hétu <sugoi@google.com> Tested-by: 's avatarNicolas Capens <nicolascapens@google.com>
parent 6896e35c
......@@ -34,16 +34,8 @@ using namespace std;
namespace egl
{
// OpenGL ES 3.0 support is not conformant yet, but can be used for testing purposes. Expose it as conformant configs
// if strict conformance advertisement isn't required. If strict conformance advertisement is required, expose them
// as non-conformant configs, but only when EGL_CONFIG_CAVEAT is EGL_NON_CONFORMANT_CONFIG or EGL_DONT_CARE.
#if defined(__ANDROID__) || defined(STRICT_CONFORMANCE)
const bool strictConformance = true;
#else
const bool strictConformance = false;
#endif
Config::Config(sw::Format displayFormat, EGLint minInterval, EGLint maxInterval, sw::Format renderTargetFormat, sw::Format depthStencilFormat, EGLint multiSample, bool conformant)
Config::Config(sw::Format displayFormat, EGLint minInterval, EGLint maxInterval, sw::Format renderTargetFormat, sw::Format depthStencilFormat, EGLint multiSample)
: mRenderTargetFormat(renderTargetFormat), mDepthStencilFormat(depthStencilFormat), mMultiSample(multiSample)
{
mBindToTextureRGB = EGL_FALSE;
......@@ -127,9 +119,9 @@ Config::Config(sw::Format displayFormat, EGLint minInterval, EGLint maxInterval,
mBufferSize = mRedSize + mGreenSize + mBlueSize + mLuminanceSize + mAlphaSize;
mAlphaMaskSize = 0;
mColorBufferType = EGL_RGB_BUFFER;
mConfigCaveat = (conformant || !strictConformance) ? EGL_NONE : EGL_NON_CONFORMANT_CONFIG;
mConfigCaveat = EGL_NONE;
mConfigID = 0;
mConformant = EGL_OPENGL_ES_BIT | EGL_OPENGL_ES2_BIT | (strictConformance ? 0 : EGL_OPENGL_ES3_BIT);
mConformant = EGL_OPENGL_ES_BIT | EGL_OPENGL_ES2_BIT | EGL_OPENGL_ES3_BIT;
switch(depthStencilFormat)
{
......@@ -186,7 +178,7 @@ Config::Config(sw::Format displayFormat, EGLint minInterval, EGLint maxInterval,
mMinSwapInterval = minInterval;
mNativeRenderable = EGL_FALSE;
mNativeVisualType = 0;
mRenderableType = EGL_OPENGL_ES_BIT | EGL_OPENGL_ES2_BIT | ((conformant && strictConformance) ? 0 : EGL_OPENGL_ES3_BIT);
mRenderableType = EGL_OPENGL_ES_BIT | EGL_OPENGL_ES2_BIT | EGL_OPENGL_ES3_BIT;
mSampleBuffers = (multiSample > 0) ? 1 : 0;
mSamples = multiSample;
mSurfaceType = EGL_PBUFFER_BIT | EGL_WINDOW_BIT | EGL_SWAP_BEHAVIOR_PRESERVED_BIT;
......@@ -338,14 +330,8 @@ ConfigSet::ConfigSet()
void ConfigSet::add(sw::Format displayFormat, EGLint minSwapInterval, EGLint maxSwapInterval, sw::Format renderTargetFormat, sw::Format depthStencilFormat, EGLint multiSample)
{
Config conformantConfig(displayFormat, minSwapInterval, maxSwapInterval, renderTargetFormat, depthStencilFormat, multiSample, true);
Config conformantConfig(displayFormat, minSwapInterval, maxSwapInterval, renderTargetFormat, depthStencilFormat, multiSample);
mSet.insert(conformantConfig);
if(strictConformance) // When strict conformance is required, add non-conformant configs explicitly as such.
{
Config nonConformantConfig(displayFormat, minSwapInterval, maxSwapInterval, renderTargetFormat, depthStencilFormat, multiSample, false);
mSet.insert(nonConformantConfig);
}
}
size_t ConfigSet::size() const
......
......@@ -32,7 +32,7 @@ class Display;
class Config
{
public:
Config(sw::Format displayFormat, EGLint minSwapInterval, EGLint maxSwapInterval, sw::Format renderTargetFormat, sw::Format depthStencilFormat, EGLint multiSample, bool conformant);
Config(sw::Format displayFormat, EGLint minSwapInterval, EGLint maxSwapInterval, sw::Format renderTargetFormat, sw::Format depthStencilFormat, EGLint multiSample);
EGLConfig getHandle() const;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment