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; ...@@ -34,16 +34,8 @@ using namespace std;
namespace egl 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) : mRenderTargetFormat(renderTargetFormat), mDepthStencilFormat(depthStencilFormat), mMultiSample(multiSample)
{ {
mBindToTextureRGB = EGL_FALSE; mBindToTextureRGB = EGL_FALSE;
...@@ -127,9 +119,9 @@ Config::Config(sw::Format displayFormat, EGLint minInterval, EGLint maxInterval, ...@@ -127,9 +119,9 @@ Config::Config(sw::Format displayFormat, EGLint minInterval, EGLint maxInterval,
mBufferSize = mRedSize + mGreenSize + mBlueSize + mLuminanceSize + mAlphaSize; mBufferSize = mRedSize + mGreenSize + mBlueSize + mLuminanceSize + mAlphaSize;
mAlphaMaskSize = 0; mAlphaMaskSize = 0;
mColorBufferType = EGL_RGB_BUFFER; mColorBufferType = EGL_RGB_BUFFER;
mConfigCaveat = (conformant || !strictConformance) ? EGL_NONE : EGL_NON_CONFORMANT_CONFIG; mConfigCaveat = EGL_NONE;
mConfigID = 0; 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) switch(depthStencilFormat)
{ {
...@@ -186,7 +178,7 @@ Config::Config(sw::Format displayFormat, EGLint minInterval, EGLint maxInterval, ...@@ -186,7 +178,7 @@ Config::Config(sw::Format displayFormat, EGLint minInterval, EGLint maxInterval,
mMinSwapInterval = minInterval; mMinSwapInterval = minInterval;
mNativeRenderable = EGL_FALSE; mNativeRenderable = EGL_FALSE;
mNativeVisualType = 0; 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; mSampleBuffers = (multiSample > 0) ? 1 : 0;
mSamples = multiSample; mSamples = multiSample;
mSurfaceType = EGL_PBUFFER_BIT | EGL_WINDOW_BIT | EGL_SWAP_BEHAVIOR_PRESERVED_BIT; mSurfaceType = EGL_PBUFFER_BIT | EGL_WINDOW_BIT | EGL_SWAP_BEHAVIOR_PRESERVED_BIT;
...@@ -338,14 +330,8 @@ ConfigSet::ConfigSet() ...@@ -338,14 +330,8 @@ ConfigSet::ConfigSet()
void ConfigSet::add(sw::Format displayFormat, EGLint minSwapInterval, EGLint maxSwapInterval, sw::Format renderTargetFormat, sw::Format depthStencilFormat, EGLint multiSample) 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); 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 size_t ConfigSet::size() const
......
...@@ -32,7 +32,7 @@ class Display; ...@@ -32,7 +32,7 @@ class Display;
class Config class Config
{ {
public: 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; 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