Commit a53bf06c by Nicolas Capens Committed by Nicolas Capens

Add libGLES_CM to the Code::Blocks project.

Change-Id: Id69512842d9a863b110f8c8bf5244c117d96fae7 Reviewed-on: https://swiftshader-review.googlesource.com/1464Reviewed-by: 's avatarNicolas Capens <nicolascapens@google.com> Tested-by: 's avatarNicolas Capens <nicolascapens@google.com>
parent 08ccba0d
...@@ -94,6 +94,6 @@ void *loadLibrary(const char *(&names)[n]) ...@@ -94,6 +94,6 @@ void *loadLibrary(const char *(&names)[n])
inline void *getProcAddress(void *library, const char *name) inline void *getProcAddress(void *library, const char *name)
{ {
return dlsym(library, name); return library ? dlsym(library, name) : 0;
} }
#endif #endif
#define MAJOR_VERSION 3 #define MAJOR_VERSION 3
#define MINOR_VERSION 2 #define MINOR_VERSION 2
#define BUILD_VERSION 7 #define BUILD_VERSION 7
#define BUILD_REVISION 47655 #define BUILD_REVISION 47656
#define STRINGIFY(x) #x #define STRINGIFY(x) #x
#define MACRO_STRINGIFY(x) STRINGIFY(x) #define MACRO_STRINGIFY(x) STRINGIFY(x)
......
{
global:
eglBindAPI;
eglBindTexImage;
eglChooseConfig;
eglCopyBuffers;
eglCreateContext;
eglCreatePbufferFromClientBuffer;
eglCreatePbufferSurface;
eglCreatePixmapSurface;
eglCreateWindowSurface;
eglDestroyContext;
eglDestroySurface;
eglGetConfigAttrib;
eglGetConfigs;
eglGetCurrentContext;
eglGetCurrentDisplay;
eglGetCurrentSurface;
eglGetDisplay;
eglGetError;
eglGetProcAddress;
eglInitialize;
eglMakeCurrent;
eglQueryAPI;
eglQueryContext;
eglQueryString;
eglQuerySurface;
eglReleaseTexImage;
eglReleaseThread;
eglSurfaceAttrib;
eglSwapBuffers;
eglSwapInterval;
eglTerminate;
eglWaitClient;
eglWaitGL;
eglWaitNative;
# Extensions
eglCreateImageKHR;
eglDestroyImageKHR;
eglGetPlatformDisplayEXT;
eglCreatePlatformWindowSurfaceEXT;
eglCreatePlatformPixmapSurfaceEXT;
# Functions that don't change the error code, for use by client APIs
clientGetCurrentContext;
clientGetCurrentDisplay;
local:
*;
};
...@@ -97,6 +97,7 @@ ...@@ -97,6 +97,7 @@
<Add directory="./../../" /> <Add directory="./../../" />
</Compiler> </Compiler>
<Linker> <Linker>
<Add option="-Wl,--version-script=./exports.map" />
<Add library="pthread" /> <Add library="pthread" />
</Linker> </Linker>
<Unit filename="../../Common/SharedLibrary.hpp" /> <Unit filename="../../Common/SharedLibrary.hpp" />
......
...@@ -20,7 +20,6 @@ ...@@ -20,7 +20,6 @@
#include "ResourceManager.h" #include "ResourceManager.h"
#include "Buffer.h" #include "Buffer.h"
#include "Framebuffer.h" #include "Framebuffer.h"
#include "Query.h"
#include "Renderbuffer.h" #include "Renderbuffer.h"
#include "Texture.h" #include "Texture.h"
#include "VertexDataManager.h" #include "VertexDataManager.h"
...@@ -172,7 +171,7 @@ Context::Context(const egl::Config *config, const Context *shareContext) ...@@ -172,7 +171,7 @@ Context::Context(const egl::Config *config, const Context *shareContext)
{ {
setVertexAttrib(sw::TexCoord0 + i, 0.0f, 0.0f, 0.0f, 1.0f); setVertexAttrib(sw::TexCoord0 + i, 0.0f, 0.0f, 0.0f, 1.0f);
} }
setVertexAttrib(sw::Normal, 0.0f, 0.0f, 1.0f, 1.0f); setVertexAttrib(sw::Normal, 0.0f, 0.0f, 1.0f, 1.0f);
mHasBeenCurrent = false; mHasBeenCurrent = false;
...@@ -186,7 +185,7 @@ Context::~Context() ...@@ -186,7 +185,7 @@ Context::~Context()
{ {
deleteFramebuffer(mFramebufferMap.begin()->first); deleteFramebuffer(mFramebufferMap.begin()->first);
} }
for(int type = 0; type < TEXTURE_TYPE_COUNT; type++) for(int type = 0; type < TEXTURE_TYPE_COUNT; type++)
{ {
for(int sampler = 0; sampler < MAX_TEXTURE_UNITS; sampler++) for(int sampler = 0; sampler < MAX_TEXTURE_UNITS; sampler++)
...@@ -199,7 +198,7 @@ Context::~Context() ...@@ -199,7 +198,7 @@ Context::~Context()
{ {
mState.vertexAttribute[i].mBoundBuffer.set(NULL); mState.vertexAttribute[i].mBoundBuffer.set(NULL);
} }
mState.arrayBuffer.set(NULL); mState.arrayBuffer.set(NULL);
mState.elementArrayBuffer.set(NULL); mState.elementArrayBuffer.set(NULL);
mState.renderbuffer.set(NULL); mState.renderbuffer.set(NULL);
...@@ -249,7 +248,7 @@ void Context::makeCurrent(egl::Surface *surface) ...@@ -249,7 +248,7 @@ void Context::makeCurrent(egl::Surface *surface)
{ {
depthStencil->release(); depthStencil->release();
} }
markAllStateDirty(); markAllStateDirty();
} }
...@@ -729,7 +728,7 @@ void Context::deleteBuffer(GLuint buffer) ...@@ -729,7 +728,7 @@ void Context::deleteBuffer(GLuint buffer)
{ {
detachBuffer(buffer); detachBuffer(buffer);
} }
mResourceManager->deleteBuffer(buffer); mResourceManager->deleteBuffer(buffer);
} }
...@@ -749,7 +748,7 @@ void Context::deleteRenderbuffer(GLuint renderbuffer) ...@@ -749,7 +748,7 @@ void Context::deleteRenderbuffer(GLuint renderbuffer)
{ {
detachRenderbuffer(renderbuffer); detachRenderbuffer(renderbuffer);
} }
mResourceManager->deleteRenderbuffer(renderbuffer); mResourceManager->deleteRenderbuffer(renderbuffer);
} }
...@@ -979,7 +978,7 @@ bool Context::getIntegerv(GLenum pname, GLint *params) ...@@ -979,7 +978,7 @@ bool Context::getIntegerv(GLenum pname, GLint *params)
// Please note: DEPTH_CLEAR_VALUE is not included in our internal getIntegerv implementation // Please note: DEPTH_CLEAR_VALUE is not included in our internal getIntegerv implementation
// because it is stored as a float, despite the fact that the GL ES 2.0 spec names // because it is stored as a float, despite the fact that the GL ES 2.0 spec names
// GetIntegerv as its native query function. As it would require conversion in any // GetIntegerv as its native query function. As it would require conversion in any
// case, this should make no difference to the calling application. You may find it in // case, this should make no difference to the calling application. You may find it in
// Context::getFloatv. // Context::getFloatv.
switch (pname) switch (pname)
{ {
...@@ -1008,7 +1007,7 @@ bool Context::getIntegerv(GLenum pname, GLint *params) ...@@ -1008,7 +1007,7 @@ bool Context::getIntegerv(GLenum pname, GLint *params)
case GL_STENCIL_CLEAR_VALUE: *params = mState.stencilClearValue; break; case GL_STENCIL_CLEAR_VALUE: *params = mState.stencilClearValue; break;
case GL_SUBPIXEL_BITS: *params = 4; break; case GL_SUBPIXEL_BITS: *params = 4; break;
case GL_MAX_TEXTURE_SIZE: *params = IMPLEMENTATION_MAX_TEXTURE_SIZE; break; case GL_MAX_TEXTURE_SIZE: *params = IMPLEMENTATION_MAX_TEXTURE_SIZE; break;
case GL_NUM_COMPRESSED_TEXTURE_FORMATS: case GL_NUM_COMPRESSED_TEXTURE_FORMATS:
{ {
if(S3TC_SUPPORT) if(S3TC_SUPPORT)
{ {
...@@ -1022,7 +1021,7 @@ bool Context::getIntegerv(GLenum pname, GLint *params) ...@@ -1022,7 +1021,7 @@ bool Context::getIntegerv(GLenum pname, GLint *params)
} }
} }
break; break;
case GL_SAMPLE_BUFFERS: case GL_SAMPLE_BUFFERS:
case GL_SAMPLES: case GL_SAMPLES:
{ {
Framebuffer *framebuffer = getFramebuffer(); Framebuffer *framebuffer = getFramebuffer();
...@@ -1189,7 +1188,7 @@ int Context::getQueryParameterNum(GLenum pname) ...@@ -1189,7 +1188,7 @@ int Context::getQueryParameterNum(GLenum pname)
// Please note: the query type returned for DEPTH_CLEAR_VALUE in this implementation // Please note: the query type returned for DEPTH_CLEAR_VALUE in this implementation
// is FLOAT rather than INT, as would be suggested by the GL ES 2.0 spec. This is due // is FLOAT rather than INT, as would be suggested by the GL ES 2.0 spec. This is due
// to the fact that it is stored internally as a float, and so would require conversion // to the fact that it is stored internally as a float, and so would require conversion
// if returned from Context::getIntegerv. Since this conversion is already implemented // if returned from Context::getIntegerv. Since this conversion is already implemented
// in the case that one calls glGetIntegerv to retrieve a float-typed state variable, we // in the case that one calls glGetIntegerv to retrieve a float-typed state variable, we
// place DEPTH_CLEAR_VALUE with the floats. This should make no difference to the calling // place DEPTH_CLEAR_VALUE with the floats. This should make no difference to the calling
// application. // application.
...@@ -1290,7 +1289,7 @@ bool Context::isQueryParameterInt(GLenum pname) ...@@ -1290,7 +1289,7 @@ bool Context::isQueryParameterInt(GLenum pname)
// Please note: the query type returned for DEPTH_CLEAR_VALUE in this implementation // Please note: the query type returned for DEPTH_CLEAR_VALUE in this implementation
// is FLOAT rather than INT, as would be suggested by the GL ES 2.0 spec. This is due // is FLOAT rather than INT, as would be suggested by the GL ES 2.0 spec. This is due
// to the fact that it is stored internally as a float, and so would require conversion // to the fact that it is stored internally as a float, and so would require conversion
// if returned from Context::getIntegerv. Since this conversion is already implemented // if returned from Context::getIntegerv. Since this conversion is already implemented
// in the case that one calls glGetIntegerv to retrieve a float-typed state variable, we // in the case that one calls glGetIntegerv to retrieve a float-typed state variable, we
// place DEPTH_CLEAR_VALUE with the floats. This should make no difference to the calling // place DEPTH_CLEAR_VALUE with the floats. This should make no difference to the calling
// application. // application.
...@@ -1360,7 +1359,7 @@ bool Context::isQueryParameterFloat(GLenum pname) ...@@ -1360,7 +1359,7 @@ bool Context::isQueryParameterFloat(GLenum pname)
// Please note: the query type returned for DEPTH_CLEAR_VALUE in this implementation // Please note: the query type returned for DEPTH_CLEAR_VALUE in this implementation
// is FLOAT rather than INT, as would be suggested by the GL ES 2.0 spec. This is due // is FLOAT rather than INT, as would be suggested by the GL ES 2.0 spec. This is due
// to the fact that it is stored internally as a float, and so would require conversion // to the fact that it is stored internally as a float, and so would require conversion
// if returned from Context::getIntegerv. Since this conversion is already implemented // if returned from Context::getIntegerv. Since this conversion is already implemented
// in the case that one calls glGetIntegerv to retrieve a float-typed state variable, we // in the case that one calls glGetIntegerv to retrieve a float-typed state variable, we
// place DEPTH_CLEAR_VALUE with the floats. This should make no difference to the calling // place DEPTH_CLEAR_VALUE with the floats. This should make no difference to the calling
// application. // application.
...@@ -1444,7 +1443,7 @@ bool Context::applyRenderTarget() ...@@ -1444,7 +1443,7 @@ bool Context::applyRenderTarget()
{ {
sw::Rect scissor = {mState.scissorX, mState.scissorY, mState.scissorX + mState.scissorWidth, mState.scissorY + mState.scissorHeight}; sw::Rect scissor = {mState.scissorX, mState.scissorY, mState.scissorX + mState.scissorWidth, mState.scissorY + mState.scissorHeight};
scissor.clip(0, 0, width, height); scissor.clip(0, 0, width, height);
device->setScissorRect(scissor); device->setScissorRect(scissor);
device->setScissorEnable(true); device->setScissorEnable(true);
} }
...@@ -1514,7 +1513,7 @@ void Context::applyState(GLenum drawMode) ...@@ -1514,7 +1513,7 @@ void Context::applyState(GLenum drawMode)
{ {
device->setStencilEnable(true); device->setStencilEnable(true);
device->setTwoSidedStencil(true); device->setTwoSidedStencil(true);
// get the maximum size of the stencil ref // get the maximum size of the stencil ref
Renderbuffer *stencilbuffer = framebuffer->getStencilbuffer(); Renderbuffer *stencilbuffer = framebuffer->getStencilbuffer();
GLuint maxStencil = (1 << stencilbuffer->getStencilSize()) - 1; GLuint maxStencil = (1 << stencilbuffer->getStencilSize()) - 1;
...@@ -1609,7 +1608,7 @@ void Context::applyState(GLenum drawMode) ...@@ -1609,7 +1608,7 @@ void Context::applyState(GLenum drawMode)
} }
} }
} }
if(mState.sampleCoverageInvert) if(mState.sampleCoverageInvert)
{ {
mask = ~mask; mask = ~mask;
...@@ -1680,14 +1679,14 @@ GLenum Context::applyVertexBuffer(GLint base, GLint first, GLsizei count) ...@@ -1680,14 +1679,14 @@ GLenum Context::applyVertexBuffer(GLint base, GLint first, GLsizei count)
{ {
return err; return err;
} }
device->resetInputStreams(false); device->resetInputStreams(false);
for(int i = 0; i < MAX_VERTEX_ATTRIBS; i++) for(int i = 0; i < MAX_VERTEX_ATTRIBS; i++)
{ {
sw::Resource *resource = attributes[i].vertexBuffer; sw::Resource *resource = attributes[i].vertexBuffer;
const void *buffer = (char*)resource->getBuffer() + attributes[i].offset; const void *buffer = (char*)resource->getBuffer() + attributes[i].offset;
int stride = attributes[i].stride; int stride = attributes[i].stride;
buffer = (char*)buffer + stride * base; buffer = (char*)buffer + stride * base;
...@@ -1742,7 +1741,7 @@ void Context::applyTextures() ...@@ -1742,7 +1741,7 @@ void Context::applyTextures()
device->setTextureFilter(sw::SAMPLER_PIXEL, samplerIndex, minFilter); device->setTextureFilter(sw::SAMPLER_PIXEL, samplerIndex, minFilter);
// device->setTextureFilter(sw::SAMPLER_PIXEL, samplerIndex, es2sw::ConvertMagFilter(magFilter)); // device->setTextureFilter(sw::SAMPLER_PIXEL, samplerIndex, es2sw::ConvertMagFilter(magFilter));
device->setMipmapFilter(sw::SAMPLER_PIXEL, samplerIndex, mipFilter); device->setMipmapFilter(sw::SAMPLER_PIXEL, samplerIndex, mipFilter);
device->setMaxAnisotropy(sw::SAMPLER_PIXEL, samplerIndex, maxAnisotropy); device->setMaxAnisotropy(sw::SAMPLER_PIXEL, samplerIndex, maxAnisotropy);
applyTexture(samplerIndex, texture); applyTexture(samplerIndex, texture);
...@@ -1779,7 +1778,7 @@ void Context::applyTexture(int index, Texture *baseTexture) ...@@ -1779,7 +1778,7 @@ void Context::applyTexture(int index, Texture *baseTexture)
} }
device->setTextureResource(index, resource); device->setTextureResource(index, resource);
if(baseTexture) if(baseTexture)
{ {
int levelCount = baseTexture->getLevelCount(); int levelCount = baseTexture->getLevelCount();
...@@ -1830,7 +1829,7 @@ void Context::readPixels(GLint x, GLint y, GLsizei width, GLsizei height, ...@@ -1830,7 +1829,7 @@ void Context::readPixels(GLint x, GLint y, GLsizei width, GLsizei height,
} }
GLsizei outputPitch = ComputePitch(width, format, type, mState.packAlignment); GLsizei outputPitch = ComputePitch(width, format, type, mState.packAlignment);
// Sized query sanity check // Sized query sanity check
if(bufSize) if(bufSize)
{ {
...@@ -2005,7 +2004,7 @@ void Context::readPixels(GLint x, GLint y, GLsizei width, GLsizei height, ...@@ -2005,7 +2004,7 @@ void Context::readPixels(GLint x, GLint y, GLsizei width, GLsizei height,
switch(type) switch(type)
{ {
case GL_UNSIGNED_SHORT_5_6_5: // IMPLEMENTATION_COLOR_READ_TYPE case GL_UNSIGNED_SHORT_5_6_5: // IMPLEMENTATION_COLOR_READ_TYPE
dest16[i + j * outputPitch / sizeof(unsigned short)] = dest16[i + j * outputPitch / sizeof(unsigned short)] =
((unsigned short)(31 * b + 0.5f) << 0) | ((unsigned short)(31 * b + 0.5f) << 0) |
((unsigned short)(63 * g + 0.5f) << 5) | ((unsigned short)(63 * g + 0.5f) << 5) |
((unsigned short)(31 * r + 0.5f) << 11); ((unsigned short)(31 * r + 0.5f) << 11);
...@@ -2039,7 +2038,7 @@ void Context::clear(GLbitfield mask) ...@@ -2039,7 +2038,7 @@ void Context::clear(GLbitfield mask)
unsigned int color = (unorm<8>(mState.colorClearValue.alpha) << 24) | unsigned int color = (unorm<8>(mState.colorClearValue.alpha) << 24) |
(unorm<8>(mState.colorClearValue.red) << 16) | (unorm<8>(mState.colorClearValue.red) << 16) |
(unorm<8>(mState.colorClearValue.green) << 8) | (unorm<8>(mState.colorClearValue.green) << 8) |
(unorm<8>(mState.colorClearValue.blue) << 0); (unorm<8>(mState.colorClearValue.blue) << 0);
float depth = clamp01(mState.depthClearValue); float depth = clamp01(mState.depthClearValue);
int stencil = mState.stencilClearValue & 0x000000FF; int stencil = mState.stencilClearValue & 0x000000FF;
...@@ -2047,7 +2046,7 @@ void Context::clear(GLbitfield mask) ...@@ -2047,7 +2046,7 @@ void Context::clear(GLbitfield mask)
if(mask & GL_COLOR_BUFFER_BIT) if(mask & GL_COLOR_BUFFER_BIT)
{ {
unsigned int rgbaMask = (mState.colorMaskRed ? 0x1 : 0) | unsigned int rgbaMask = (mState.colorMaskRed ? 0x1 : 0) |
(mState.colorMaskGreen ? 0x2 : 0) | (mState.colorMaskGreen ? 0x2 : 0) |
(mState.colorMaskBlue ? 0x4 : 0) | (mState.colorMaskBlue ? 0x4 : 0) |
(mState.colorMaskAlpha ? 0x8 : 0); (mState.colorMaskAlpha ? 0x8 : 0);
...@@ -2238,12 +2237,12 @@ int Context::getSupportedMultiSampleDepth(sw::Format format, int requested) ...@@ -2238,12 +2237,12 @@ int Context::getSupportedMultiSampleDepth(sw::Format format, int requested)
{ {
return 1; return 1;
} }
if(requested == 2) if(requested == 2)
{ {
return 2; return 2;
} }
return 4; return 4;
} }
...@@ -2483,7 +2482,7 @@ sw::MatrixStack &Context::currentMatrixStack() ...@@ -2483,7 +2482,7 @@ sw::MatrixStack &Context::currentMatrixStack()
{ {
switch(matrixMode) switch(matrixMode)
{ {
case GL_MODELVIEW: case GL_MODELVIEW:
return modelViewStack; return modelViewStack;
case GL_PROJECTION: case GL_PROJECTION:
return projectionStack; return projectionStack;
...@@ -2493,7 +2492,7 @@ sw::MatrixStack &Context::currentMatrixStack() ...@@ -2493,7 +2492,7 @@ sw::MatrixStack &Context::currentMatrixStack()
case 0: return textureStack0; case 0: return textureStack0;
case 1: return textureStack1; case 1: return textureStack1;
} }
break; break;
} }
UNREACHABLE(); UNREACHABLE();
...@@ -2533,7 +2532,7 @@ void Context::rotate(GLfloat angle, GLfloat x, GLfloat y, GLfloat z) ...@@ -2533,7 +2532,7 @@ void Context::rotate(GLfloat angle, GLfloat x, GLfloat y, GLfloat z)
void Context::translate(GLfloat x, GLfloat y, GLfloat z) void Context::translate(GLfloat x, GLfloat y, GLfloat z)
{ {
currentMatrixStack().translate(x, y, z); currentMatrixStack().translate(x, y, z);
} }
void Context::scale(GLfloat x, GLfloat y, GLfloat z) void Context::scale(GLfloat x, GLfloat y, GLfloat z)
......
{ {
global: global:
eglBindTexImage;
eglChooseConfig;
eglCopyBuffers;
eglCreateContext;
eglCreatePbufferSurface;
eglCreatePixmapSurface;
eglCreateWindowSurface;
eglDestroyContext;
eglDestroySurface;
eglGetConfigAttrib;
eglGetConfigs;
eglGetCurrentContext;
eglGetCurrentDisplay;
eglGetCurrentSurface;
eglGetDisplay;
eglGetError;
eglGetProcAddress;
eglInitialize;
eglMakeCurrent;
eglQueryContext;
eglQueryString;
eglQuerySurface;
eglReleaseTexImage;
eglSurfaceAttrib;
eglSwapBuffers;
eglSwapInterval;
eglTerminate;
eglWaitGL;
eglWaitNative;
glActiveTexture; glActiveTexture;
glAttachShader; glAlphaFunc;
glBindAttribLocation; glAlphaFuncx;
glBindBuffer; glBindBuffer;
glBindFramebuffer;
glBindRenderbuffer;
glBindTexture; glBindTexture;
glBlendColor;
glBlendEquation;
glBlendEquationSeparate;
glBlendFunc; glBlendFunc;
glBlendFuncSeparate;
glBufferData; glBufferData;
glBufferSubData; glBufferSubData;
glCheckFramebufferStatus;
glClear; glClear;
glClearColor; glClearColor;
glClearColorx;
glClearDepthf; glClearDepthf;
glClearDepthx;
glClearStencil; glClearStencil;
glClientActiveTexture;
glClipPlanef;
glClipPlanex;
glColor4f;
glColor4ub;
glColor4x;
glColorMask; glColorMask;
glCompileShader; glColorPointer;
glCompressedTexImage2D; glCompressedTexImage2D;
glCompressedTexSubImage2D; glCompressedTexSubImage2D;
glCopyTexImage2D; glCopyTexImage2D;
glCopyTexSubImage2D; glCopyTexSubImage2D;
glCreateProgram;
glCreateShader;
glCullFace; glCullFace;
glDeleteBuffers; glDeleteBuffers;
glDeleteFramebuffers;
glDeleteProgram;
glDeleteRenderbuffers;
glDeleteShader;
glDeleteTextures; glDeleteTextures;
glDepthFunc; glDepthFunc;
glDepthMask; glDepthMask;
glDepthRangef; glDepthRangef;
glDetachShader; glDepthRangex;
glDisable; glDisable;
glDisableVertexAttribArray; glDisableClientState;
glDrawArrays; glDrawArrays;
glDrawElements; glDrawElements;
glEnable; glEnable;
glEnableVertexAttribArray; glEnableClientState;
glFinish; glFinish;
glFlush; glFlush;
glFramebufferRenderbuffer; glFogf;
glFramebufferTexture2D; glFogfv;
glFogx;
glFogxv;
glFrontFace; glFrontFace;
glFrustumf;
glFrustumx;
glGenBuffers; glGenBuffers;
glGenFramebuffers;
glGenRenderbuffers;
glGenTextures; glGenTextures;
glGenerateMipmap;
glGetActiveAttrib;
glGetActiveUniform;
glGetAttachedShaders;
glGetAttribLocation;
glGetBooleanv; glGetBooleanv;
glGetBufferParameteriv; glGetBufferParameteriv;
glGetClipPlanef;
glGetClipPlanex;
glGetError; glGetError;
glGetFixedv;
glGetFloatv; glGetFloatv;
glGetFramebufferAttachmentParameteriv;
glGetIntegerv; glGetIntegerv;
glGetProgramInfoLog; glGetLightfv;
glGetProgramiv; glGetLightxv;
glGetRenderbufferParameteriv; glGetMaterialfv;
glGetShaderInfoLog; glGetMaterialxv;
glGetShaderPrecisionFormat; glGetPointerv;
glGetShaderSource;
glGetShaderiv;
glGetString; glGetString;
glGetTexEnvfv;
glGetTexEnviv;
glGetTexEnvxv;
glGetTexParameterfv; glGetTexParameterfv;
glGetTexParameteriv; glGetTexParameteriv;
glGetUniformLocation; glGetTexParameterxv;
glGetUniformfv;
glGetUniformiv;
glGetVertexAttribPointerv;
glGetVertexAttribfv;
glGetVertexAttribiv;
glHint; glHint;
glIsBuffer; glIsBuffer;
glIsEnabled; glIsEnabled;
glIsFramebuffer;
glIsProgram;
glIsRenderbuffer;
glIsShader;
glIsTexture; glIsTexture;
glLightModelf;
glLightModelfv;
glLightModelx;
glLightModelxv;
glLightf;
glLightfv;
glLightx;
glLightxv;
glLineWidth; glLineWidth;
glLinkProgram; glLineWidthx;
glLoadIdentity;
glLoadMatrixf;
glLoadMatrixx;
glLogicOp;
glMaterialf;
glMaterialfv;
glMaterialx;
glMaterialxv;
glMatrixMode;
glMultMatrixf;
glMultMatrixx;
glMultiTexCoord4f;
glMultiTexCoord4x;
glNormal3f;
glNormal3x;
glNormalPointer;
glOrthof;
glOrthox;
glPixelStorei; glPixelStorei;
glPointParameterf;
glPointParameterfv;
glPointParameterx;
glPointParameterxv;
glPointSize;
glPointSizex;
glPolygonOffset; glPolygonOffset;
glPolygonOffsetx;
glPopMatrix;
glPushMatrix;
glReadPixels; glReadPixels;
glReleaseShaderCompiler; glRotatef;
glRenderbufferStorage; glRotatex;
glSampleCoverage; glSampleCoverage;
glSampleCoveragex;
glScalef;
glScalex;
glScissor; glScissor;
glShaderBinary; glShadeModel;
glShaderSource;
glStencilFunc; glStencilFunc;
glStencilFuncSeparate;
glStencilMask; glStencilMask;
glStencilMaskSeparate;
glStencilOp; glStencilOp;
glStencilOpSeparate; glTexCoordPointer;
glTexEnvf;
glTexEnvfv;
glTexEnvi;
glTexEnviv;
glTexEnvx;
glTexEnvxv;
glTexImage2D; glTexImage2D;
glTexParameterf; glTexParameterf;
glTexParameterfv; glTexParameterfv;
glTexParameteri; glTexParameteri;
glTexParameteriv; glTexParameteriv;
glTexParameterx;
glTexParameterxv;
glTexSubImage2D; glTexSubImage2D;
glUniform1f; glTranslatef;
glUniform1fv; glTranslatex;
glUniform1i; glVertexPointer;
glUniform1iv;
glUniform2f;
glUniform2fv;
glUniform2i;
glUniform2iv;
glUniform3f;
glUniform3fv;
glUniform3i;
glUniform3iv;
glUniform4f;
glUniform4fv;
glUniform4i;
glUniform4iv;
glUniformMatrix2fv;
glUniformMatrix3fv;
glUniformMatrix4fv;
glUseProgram;
glValidateProgram;
glVertexAttrib1f;
glVertexAttrib1fv;
glVertexAttrib2f;
glVertexAttrib2fv;
glVertexAttrib3f;
glVertexAttrib3fv;
glVertexAttrib4f;
glVertexAttrib4fv;
glVertexAttribPointer;
glViewport; glViewport;
# Extensions # Extensions
glTexImage3DOES; glPointSizePointerOES;
glBlitFramebufferANGLE; glEGLImageTargetTexture2DOES;
glRenderbufferStorageMultisampleANGLE; glEGLImageTargetRenderbufferStorageOES;
glDeleteFencesNV; glIsRenderbufferOES;
glFinishFenceNV; glBindRenderbufferOES;
glGenFencesNV; glDeleteRenderbuffersOES;
glGetFenceivNV; glGenRenderbuffersOES;
glIsFenceNV; glRenderbufferStorageOES;
glSetFenceNV; glGetRenderbufferParameterivOES;
glTestFenceNV; glIsFramebufferOES;
glGetGraphicsResetStatusEXT; glBindFramebufferOES;
glReadnPixelsEXT; glDeleteFramebuffersOES;
glGetnUniformfvEXT; glGenFramebuffersOES;
glGetnUniformivEXT; glCheckFramebufferStatusOES;
glGenQueriesEXT; glFramebufferRenderbufferOES;
glDeleteQueriesEXT; glFramebufferTexture2DOES;
glIsQueryEXT; glGetFramebufferAttachmentParameterivOES;
glBeginQueryEXT; glGenerateMipmapOES;
glEndQueryEXT; glBlendEquationOES;
glGetQueryivEXT; glBlendEquationSeparateOES;
glGetQueryObjectuivEXT; glBlendFuncSeparateOES;
glDrawTexsOES;
glDrawTexiOES;
glDrawTexxOES;
glDrawTexsvOES;
glDrawTexivOES;
glDrawTexxvOES;
glDrawTexfOES;
glDrawTexfvOES;
# EGL dependencies # EGL dependencies
glCreateContext; glCreateContext;
glDestroyContext;
glMakeCurrent;
glGetCurrentContext;
glGetProcAddress; glGetProcAddress;
glBindTexImage;
createFrameBuffer; createFrameBuffer;
createBackBuffer; createBackBuffer;
createDevice; createDepthStencil;
Register; Register;
local: local:
*; *;
......
...@@ -18,7 +18,6 @@ ...@@ -18,7 +18,6 @@
#include "Framebuffer.h" #include "Framebuffer.h"
#include "Renderbuffer.h" #include "Renderbuffer.h"
#include "Texture.h" #include "Texture.h"
#include "Query.h"
#include "common/debug.h" #include "common/debug.h"
#include "Common/SharedLibrary.hpp" #include "Common/SharedLibrary.hpp"
#include "Common/Version.h" #include "Common/Version.h"
...@@ -65,7 +64,7 @@ static bool validateSubImageParams(bool compressed, GLsizei width, GLsizei heigh ...@@ -65,7 +64,7 @@ static bool validateSubImageParams(bool compressed, GLsizei width, GLsizei heigh
if(compressed) if(compressed)
{ {
if((width % 4 != 0 && width != texture->getWidth(target, 0)) || if((width % 4 != 0 && width != texture->getWidth(target, 0)) ||
(height % 4 != 0 && height != texture->getHeight(target, 0))) (height % 4 != 0 && height != texture->getHeight(target, 0)))
{ {
return error(GL_INVALID_OPERATION, false); return error(GL_INVALID_OPERATION, false);
...@@ -899,7 +898,7 @@ void GL_APIENTRY glClearStencil(GLint s) ...@@ -899,7 +898,7 @@ void GL_APIENTRY glClearStencil(GLint s)
void GL_APIENTRY glClientActiveTexture(GLenum texture) void GL_APIENTRY glClientActiveTexture(GLenum texture)
{ {
TRACE("(GLenum texture = 0x%X)", texture); TRACE("(GLenum texture = 0x%X)", texture);
try try
{ {
switch(texture) switch(texture)
...@@ -1023,10 +1022,10 @@ void GL_APIENTRY glColorPointer(GLint size, GLenum type, GLsizei stride, const G ...@@ -1023,10 +1022,10 @@ void GL_APIENTRY glColorPointer(GLint size, GLenum type, GLsizei stride, const G
UNIMPLEMENTED(); UNIMPLEMENTED();
} }
void GL_APIENTRY glCompressedTexImage2D(GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, void GL_APIENTRY glCompressedTexImage2D(GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height,
GLint border, GLsizei imageSize, const GLvoid* data) GLint border, GLsizei imageSize, const GLvoid* data)
{ {
TRACE("(GLenum target = 0x%X, GLint level = %d, GLenum internalformat = 0x%X, GLsizei width = %d, " TRACE("(GLenum target = 0x%X, GLint level = %d, GLenum internalformat = 0x%X, GLsizei width = %d, "
"GLsizei height = %d, GLint border = %d, GLsizei imageSize = %d, const GLvoid* data = 0x%0.8p)", "GLsizei height = %d, GLint border = %d, GLsizei imageSize = %d, const GLvoid* data = 0x%0.8p)",
target, level, internalformat, width, height, border, imageSize, data); target, level, internalformat, width, height, border, imageSize, data);
...@@ -1756,7 +1755,7 @@ void GL_APIENTRY glDrawElements(GLenum mode, GLsizei count, GLenum type, const G ...@@ -1756,7 +1755,7 @@ void GL_APIENTRY glDrawElements(GLenum mode, GLsizei count, GLenum type, const G
default: default:
return error(GL_INVALID_ENUM); return error(GL_INVALID_ENUM);
} }
context->drawElements(mode, count, type, indices); context->drawElements(mode, count, type, indices);
} }
} }
...@@ -1825,7 +1824,7 @@ void GL_APIENTRY glEnable(GLenum cap) ...@@ -1825,7 +1824,7 @@ void GL_APIENTRY glEnable(GLenum cap)
void GL_APIENTRY glEnableClientState(GLenum array) void GL_APIENTRY glEnableClientState(GLenum array)
{ {
TRACE("(GLenum array = 0x%X)", array); TRACE("(GLenum array = 0x%X)", array);
try try
{ {
es1::Context *context = es1::getContext(); es1::Context *context = es1::getContext();
...@@ -1906,7 +1905,7 @@ void GL_APIENTRY glFramebufferRenderbufferOES(GLenum target, GLenum attachment, ...@@ -1906,7 +1905,7 @@ void GL_APIENTRY glFramebufferRenderbufferOES(GLenum target, GLenum attachment,
{ {
es1::Framebuffer *framebuffer = context->getFramebuffer(); es1::Framebuffer *framebuffer = context->getFramebuffer();
GLuint framebufferHandle = context->getFramebufferHandle(); GLuint framebufferHandle = context->getFramebufferHandle();
if(!framebuffer || (framebufferHandle == 0 && renderbuffer != 0)) if(!framebuffer || (framebufferHandle == 0 && renderbuffer != 0))
{ {
return error(GL_INVALID_OPERATION); return error(GL_INVALID_OPERATION);
...@@ -2277,7 +2276,7 @@ void GL_APIENTRY glGetBooleanv(GLenum pname, GLboolean* params) ...@@ -2277,7 +2276,7 @@ void GL_APIENTRY glGetBooleanv(GLenum pname, GLboolean* params)
if(!(context->getBooleanv(pname, params))) if(!(context->getBooleanv(pname, params)))
{ {
unsigned int numParams = context->getQueryParameterNum(pname); unsigned int numParams = context->getQueryParameterNum(pname);
if(numParams < 0) if(numParams < 0)
{ {
return error(GL_INVALID_ENUM); return error(GL_INVALID_ENUM);
...@@ -2420,7 +2419,7 @@ void GL_APIENTRY glGetFloatv(GLenum pname, GLfloat* params) ...@@ -2420,7 +2419,7 @@ void GL_APIENTRY glGetFloatv(GLenum pname, GLfloat* params)
if(!(context->getFloatv(pname, params))) if(!(context->getFloatv(pname, params)))
{ {
unsigned int numParams = context->getQueryParameterNum(pname); unsigned int numParams = context->getQueryParameterNum(pname);
if(numParams < 0) if(numParams < 0)
{ {
return error(GL_INVALID_ENUM); return error(GL_INVALID_ENUM);
...@@ -2486,21 +2485,21 @@ void GL_APIENTRY glGetFramebufferAttachmentParameterivOES(GLenum target, GLenum ...@@ -2486,21 +2485,21 @@ void GL_APIENTRY glGetFramebufferAttachmentParameterivOES(GLenum target, GLenum
{ {
return error(GL_INVALID_ENUM); return error(GL_INVALID_ENUM);
} }
if(context->getFramebufferHandle() == 0) if(context->getFramebufferHandle() == 0)
{ {
return error(GL_INVALID_OPERATION); return error(GL_INVALID_OPERATION);
} }
es1::Framebuffer *framebuffer = context->getFramebuffer(); es1::Framebuffer *framebuffer = context->getFramebuffer();
GLenum attachmentType; GLenum attachmentType;
GLuint attachmentHandle; GLuint attachmentHandle;
switch(attachment) switch(attachment)
{ {
case GL_COLOR_ATTACHMENT0_OES: case GL_COLOR_ATTACHMENT0_OES:
attachmentType = framebuffer->getColorbufferType(); attachmentType = framebuffer->getColorbufferType();
attachmentHandle = framebuffer->getColorbufferHandle(); attachmentHandle = framebuffer->getColorbufferHandle();
break; break;
case GL_DEPTH_ATTACHMENT_OES: case GL_DEPTH_ATTACHMENT_OES:
attachmentType = framebuffer->getDepthbufferType(); attachmentType = framebuffer->getDepthbufferType();
...@@ -2574,7 +2573,7 @@ void GL_APIENTRY glGetIntegerv(GLenum pname, GLint* params) ...@@ -2574,7 +2573,7 @@ void GL_APIENTRY glGetIntegerv(GLenum pname, GLint* params)
if(!(context->getIntegerv(pname, params))) if(!(context->getIntegerv(pname, params)))
{ {
unsigned int numParams = context->getQueryParameterNum(pname); unsigned int numParams = context->getQueryParameterNum(pname);
if(numParams < 0) if(numParams < 0)
{ {
return error(GL_INVALID_ENUM); return error(GL_INVALID_ENUM);
...@@ -2670,7 +2669,7 @@ const GLubyte* GL_APIENTRY glGetString(GLenum name) ...@@ -2670,7 +2669,7 @@ const GLubyte* GL_APIENTRY glGetString(GLenum name)
case GL_RENDERER: case GL_RENDERER:
return (GLubyte*)"SwiftShader"; return (GLubyte*)"SwiftShader";
case GL_VERSION: case GL_VERSION:
return (GLubyte*)"OpenGL ES 1.1 SwiftShader "VERSION_STRING; return (GLubyte*)"OpenGL ES 1.1 SwiftShader " VERSION_STRING;
case GL_EXTENSIONS: case GL_EXTENSIONS:
// Keep list sorted in following order: // Keep list sorted in following order:
// OES extensions // OES extensions
...@@ -2859,7 +2858,7 @@ void GL_APIENTRY glHint(GLenum target, GLenum mode) ...@@ -2859,7 +2858,7 @@ void GL_APIENTRY glHint(GLenum target, GLenum mode)
case GL_DONT_CARE: case GL_DONT_CARE:
break; break;
default: default:
return error(GL_INVALID_ENUM); return error(GL_INVALID_ENUM);
} }
es1::Context *context = es1::getContext(); es1::Context *context = es1::getContext();
...@@ -3044,7 +3043,7 @@ void GL_APIENTRY glLightf(GLenum light, GLenum pname, GLfloat param) ...@@ -3044,7 +3043,7 @@ void GL_APIENTRY glLightf(GLenum light, GLenum pname, GLfloat param)
void GL_APIENTRY glLightfv(GLenum light, GLenum pname, const GLfloat *params) void GL_APIENTRY glLightfv(GLenum light, GLenum pname, const GLfloat *params)
{ {
TRACE("(GLenum light = 0x%X, GLenum pname = 0x%X, const GLint *params)", light, pname); TRACE("(GLenum light = 0x%X, GLenum pname = 0x%X, const GLint *params)", light, pname);
try try
{ {
es1::Context *context = es1::getContext(); es1::Context *context = es1::getContext();
...@@ -3385,7 +3384,7 @@ void GL_APIENTRY glPolygonOffsetx(GLfixed factor, GLfixed units) ...@@ -3385,7 +3384,7 @@ void GL_APIENTRY glPolygonOffsetx(GLfixed factor, GLfixed units)
void GL_APIENTRY glPopMatrix(void) void GL_APIENTRY glPopMatrix(void)
{ {
TRACE("()"); TRACE("()");
try try
{ {
es1::Context *context = es1::getContext(); es1::Context *context = es1::getContext();
...@@ -3404,7 +3403,7 @@ void GL_APIENTRY glPopMatrix(void) ...@@ -3404,7 +3403,7 @@ void GL_APIENTRY glPopMatrix(void)
void GL_APIENTRY glPushMatrix(void) void GL_APIENTRY glPushMatrix(void)
{ {
TRACE("()"); TRACE("()");
try try
{ {
es1::Context *context = es1::getContext(); es1::Context *context = es1::getContext();
...@@ -3480,7 +3479,7 @@ void GL_APIENTRY glRenderbufferStorageOES(GLenum target, GLenum internalformat, ...@@ -3480,7 +3479,7 @@ void GL_APIENTRY glRenderbufferStorageOES(GLenum target, GLenum internalformat,
if(context) if(context)
{ {
if(width > es1::IMPLEMENTATION_MAX_RENDERBUFFER_SIZE || if(width > es1::IMPLEMENTATION_MAX_RENDERBUFFER_SIZE ||
height > es1::IMPLEMENTATION_MAX_RENDERBUFFER_SIZE) height > es1::IMPLEMENTATION_MAX_RENDERBUFFER_SIZE)
{ {
return error(GL_INVALID_VALUE); return error(GL_INVALID_VALUE);
...@@ -3524,7 +3523,7 @@ void GL_APIENTRY glRenderbufferStorageOES(GLenum target, GLenum internalformat, ...@@ -3524,7 +3523,7 @@ void GL_APIENTRY glRenderbufferStorageOES(GLenum target, GLenum internalformat,
void GL_APIENTRY glRotatef(GLfloat angle, GLfloat x, GLfloat y, GLfloat z) void GL_APIENTRY glRotatef(GLfloat angle, GLfloat x, GLfloat y, GLfloat z)
{ {
TRACE("(GLfloat angle = %f, GLfloat x = %f, GLfloat y = %f, GLfloat z = %f)", angle, x, y, z); TRACE("(GLfloat angle = %f, GLfloat x = %f, GLfloat y = %f, GLfloat z = %f)", angle, x, y, z);
try try
{ {
es1::Context *context = es1::getContext(); es1::Context *context = es1::getContext();
...@@ -3572,7 +3571,7 @@ void GL_APIENTRY glSampleCoveragex(GLclampx value, GLboolean invert) ...@@ -3572,7 +3571,7 @@ void GL_APIENTRY glSampleCoveragex(GLclampx value, GLboolean invert)
void GL_APIENTRY glScalef(GLfloat x, GLfloat y, GLfloat z) void GL_APIENTRY glScalef(GLfloat x, GLfloat y, GLfloat z)
{ {
TRACE("(GLfloat x = %f, GLfloat y = %f, GLfloat z = %f)", x, y, z); TRACE("(GLfloat x = %f, GLfloat y = %f, GLfloat z = %f)", x, y, z);
try try
{ {
es1::Context *context = es1::getContext(); es1::Context *context = es1::getContext();
...@@ -3905,7 +3904,7 @@ void GL_APIENTRY glTexImage2D(GLenum target, GLint level, GLint internalformat, ...@@ -3905,7 +3904,7 @@ void GL_APIENTRY glTexImage2D(GLenum target, GLint level, GLint internalformat,
return error(GL_INVALID_ENUM); return error(GL_INVALID_ENUM);
} }
} }
if(target == GL_TEXTURE_2D) if(target == GL_TEXTURE_2D)
{ {
es1::Texture2D *texture = context->getTexture2D(); es1::Texture2D *texture = context->getTexture2D();
...@@ -4148,7 +4147,7 @@ void GL_APIENTRY glTexSubImage2D(GLenum target, GLint level, GLint xoffset, GLin ...@@ -4148,7 +4147,7 @@ void GL_APIENTRY glTexSubImage2D(GLenum target, GLint level, GLint xoffset, GLin
void GL_APIENTRY glTranslatef(GLfloat x, GLfloat y, GLfloat z) void GL_APIENTRY glTranslatef(GLfloat x, GLfloat y, GLfloat z)
{ {
TRACE("(GLfloat x = %f, GLfloat y = %f, GLfloat z = %f)", x, y, z); TRACE("(GLfloat x = %f, GLfloat y = %f, GLfloat z = %f)", x, y, z);
try try
{ {
es1::Context *context = es1::getContext(); es1::Context *context = es1::getContext();
...@@ -4225,7 +4224,7 @@ void GL_APIENTRY glEGLImageTargetTexture2DOES(GLenum target, GLeglImageOES image ...@@ -4225,7 +4224,7 @@ void GL_APIENTRY glEGLImageTargetTexture2DOES(GLenum target, GLeglImageOES image
if(context) if(context)
{ {
es1::Texture2D *texture = 0; es1::Texture2D *texture = 0;
switch(target) switch(target)
{ {
case GL_TEXTURE_2D: texture = context->getTexture2D(); break; case GL_TEXTURE_2D: texture = context->getTexture2D(); break;
......
...@@ -158,27 +158,25 @@ global: ...@@ -158,27 +158,25 @@ global:
glReadnPixelsEXT; glReadnPixelsEXT;
glGetnUniformfvEXT; glGetnUniformfvEXT;
glGetnUniformivEXT; glGetnUniformivEXT;
glGenQueriesEXT; glGenQueriesEXT;
glDeleteQueriesEXT; glDeleteQueriesEXT;
glIsQueryEXT; glIsQueryEXT;
glBeginQueryEXT; glBeginQueryEXT;
glEndQueryEXT; glEndQueryEXT;
glGetQueryivEXT; glGetQueryivEXT;
glGetQueryObjectuivEXT; glGetQueryObjectuivEXT;
glEGLImageTargetTexture2DOES;
glEGLImageTargetRenderbufferStorageOES;
# EGL dependencies # EGL dependencies
glCreateContext; glCreateContext;
glDestroyContext;
glMakeCurrent;
glGetCurrentContext;
glGetProcAddress; glGetProcAddress;
glBindTexImage;
createFrameBuffer; createFrameBuffer;
createBackBuffer; createBackBuffer;
createDevice; createDepthStencil;
Register; Register;
local: local:
*; *;
......
...@@ -82,11 +82,11 @@ namespace sw ...@@ -82,11 +82,11 @@ namespace sw
return 0; return 0;
} }
void RoutineManager::endExceptionTable(const llvm::Function *F, uint8_t *TableStart, uint8_t *TableEnd, uint8_t* FrameRegister) void RoutineManager::endExceptionTable(const llvm::Function *F, uint8_t *TableStart, uint8_t *TableEnd, uint8_t* FrameRegister)
{ {
UNIMPLEMENTED(); UNIMPLEMENTED();
} }
uint8_t *RoutineManager::getGOTBase() const uint8_t *RoutineManager::getGOTBase() const
{ {
ASSERT(!HasGOT); ASSERT(!HasGOT);
...@@ -113,7 +113,10 @@ namespace sw ...@@ -113,7 +113,10 @@ namespace sw
void RoutineManager::deallocateExceptionTable(void *ET) void RoutineManager::deallocateExceptionTable(void *ET)
{ {
UNIMPLEMENTED(); if(ET)
{
UNIMPLEMENTED();
}
} }
void RoutineManager::setMemoryWritable() void RoutineManager::setMemoryWritable()
......
...@@ -5,6 +5,9 @@ ...@@ -5,6 +5,9 @@
<Project filename="OpenGL/libGLESv2/libGLESv2.cbp"> <Project filename="OpenGL/libGLESv2/libGLESv2.cbp">
<Depends filename="LLVM/LLVM.cbp" /> <Depends filename="LLVM/LLVM.cbp" />
</Project> </Project>
<Project filename="OpenGL/libGLES_CM/libGLES_CM.cbp">
<Depends filename="LLVM/LLVM.cbp" />
</Project>
<Project filename="LLVM/LLVM.cbp" /> <Project filename="LLVM/LLVM.cbp" />
<Project filename="../tests/third_party/PowerVR/Examples/Beginner/01_HelloAPI/OGLES2/Build/OGLES2HelloAPI.cbp"> <Project filename="../tests/third_party/PowerVR/Examples/Beginner/01_HelloAPI/OGLES2/Build/OGLES2HelloAPI.cbp">
<Depends filename="OpenGL/libEGL/libEGL.cbp" /> <Depends filename="OpenGL/libEGL/libEGL.cbp" />
......
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