Commit 3911efd7 by Nicolas Capens Committed by Nicolas Capens

Default to libGLESv2 for EGL surface buffer creation.

If both libGLES_CM and libGLESv2 are available, we were using the former for creating the buffers of an EGL surface. The choice is arbitrary, but it causes confusing issues when an interface changes and one of the libraries wasn't rebuilt. This is less likely to occur for libGLESv2. Change-Id: If0c05d50a141c3782866892694d238332d8211db Reviewed-on: https://swiftshader-review.googlesource.com/13388Tested-by: 's avatarNicolas Capens <nicolascapens@google.com> Reviewed-by: 's avatarAlexis Hétu <sugoi@google.com>
parent 2a3932cb
...@@ -76,13 +76,13 @@ bool Surface::initialize() ...@@ -76,13 +76,13 @@ bool Surface::initialize()
{ {
ASSERT(!backBuffer && !depthStencil); ASSERT(!backBuffer && !depthStencil);
if(libGLES_CM) if(libGLESv2)
{ {
backBuffer = libGLES_CM->createBackBuffer(width, height, config->mRenderTargetFormat, config->mSamples); backBuffer = libGLESv2->createBackBuffer(width, height, config->mRenderTargetFormat, config->mSamples);
} }
else if(libGLESv2) else if(libGLES_CM)
{ {
backBuffer = libGLESv2->createBackBuffer(width, height, config->mRenderTargetFormat, config->mSamples); backBuffer = libGLES_CM->createBackBuffer(width, height, config->mRenderTargetFormat, config->mSamples);
} }
if(!backBuffer) if(!backBuffer)
...@@ -94,13 +94,13 @@ bool Surface::initialize() ...@@ -94,13 +94,13 @@ bool Surface::initialize()
if(config->mDepthStencilFormat != sw::FORMAT_NULL) if(config->mDepthStencilFormat != sw::FORMAT_NULL)
{ {
if(libGLES_CM) if(libGLESv2)
{ {
depthStencil = libGLES_CM->createDepthStencil(width, height, config->mDepthStencilFormat, config->mSamples); depthStencil = libGLESv2->createDepthStencil(width, height, config->mDepthStencilFormat, config->mSamples);
} }
else if(libGLESv2) else if(libGLES_CM)
{ {
depthStencil = libGLESv2->createDepthStencil(width, height, config->mDepthStencilFormat, config->mSamples); depthStencil = libGLES_CM->createDepthStencil(width, height, config->mDepthStencilFormat, config->mSamples);
} }
if(!depthStencil) if(!depthStencil)
...@@ -332,13 +332,13 @@ bool WindowSurface::reset(int backBufferWidth, int backBufferHeight) ...@@ -332,13 +332,13 @@ bool WindowSurface::reset(int backBufferWidth, int backBufferHeight)
if(window) if(window)
{ {
if(libGLES_CM) if(libGLESv2)
{ {
frameBuffer = libGLES_CM->createFrameBuffer(display->getNativeDisplay(), window, width, height); frameBuffer = libGLESv2->createFrameBuffer(display->getNativeDisplay(), window, width, height);
} }
else if(libGLESv2) else if(libGLES_CM)
{ {
frameBuffer = libGLESv2->createFrameBuffer(display->getNativeDisplay(), window, width, height); frameBuffer = libGLES_CM->createFrameBuffer(display->getNativeDisplay(), window, width, height);
} }
if(!frameBuffer) if(!frameBuffer)
......
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