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])
inline void *getProcAddress(void *library, const char *name)
{
return dlsym(library, name);
return library ? dlsym(library, name) : 0;
}
#endif
#define MAJOR_VERSION 3
#define MINOR_VERSION 2
#define BUILD_VERSION 7
#define BUILD_REVISION 47655
#define BUILD_REVISION 47656
#define STRINGIFY(x) #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 @@
<Add directory="./../../" />
</Compiler>
<Linker>
<Add option="-Wl,--version-script=./exports.map" />
<Add library="pthread" />
</Linker>
<Unit filename="../../Common/SharedLibrary.hpp" />
......
......@@ -20,7 +20,6 @@
#include "ResourceManager.h"
#include "Buffer.h"
#include "Framebuffer.h"
#include "Query.h"
#include "Renderbuffer.h"
#include "Texture.h"
#include "VertexDataManager.h"
......@@ -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::Normal, 0.0f, 0.0f, 1.0f, 1.0f);
mHasBeenCurrent = false;
......@@ -186,7 +185,7 @@ Context::~Context()
{
deleteFramebuffer(mFramebufferMap.begin()->first);
}
for(int type = 0; type < TEXTURE_TYPE_COUNT; type++)
{
for(int sampler = 0; sampler < MAX_TEXTURE_UNITS; sampler++)
......@@ -199,7 +198,7 @@ Context::~Context()
{
mState.vertexAttribute[i].mBoundBuffer.set(NULL);
}
mState.arrayBuffer.set(NULL);
mState.elementArrayBuffer.set(NULL);
mState.renderbuffer.set(NULL);
......@@ -249,7 +248,7 @@ void Context::makeCurrent(egl::Surface *surface)
{
depthStencil->release();
}
markAllStateDirty();
}
......@@ -729,7 +728,7 @@ void Context::deleteBuffer(GLuint buffer)
{
detachBuffer(buffer);
}
mResourceManager->deleteBuffer(buffer);
}
......@@ -749,7 +748,7 @@ void Context::deleteRenderbuffer(GLuint renderbuffer)
{
detachRenderbuffer(renderbuffer);
}
mResourceManager->deleteRenderbuffer(renderbuffer);
}
......@@ -979,7 +978,7 @@ bool Context::getIntegerv(GLenum pname, GLint *params)
// 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
// 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.
switch (pname)
{
......@@ -1008,7 +1007,7 @@ bool Context::getIntegerv(GLenum pname, GLint *params)
case GL_STENCIL_CLEAR_VALUE: *params = mState.stencilClearValue; break;
case GL_SUBPIXEL_BITS: *params = 4; 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)
{
......@@ -1022,7 +1021,7 @@ bool Context::getIntegerv(GLenum pname, GLint *params)
}
}
break;
case GL_SAMPLE_BUFFERS:
case GL_SAMPLE_BUFFERS:
case GL_SAMPLES:
{
Framebuffer *framebuffer = getFramebuffer();
......@@ -1189,7 +1188,7 @@ int Context::getQueryParameterNum(GLenum pname)
// 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
// 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
// place DEPTH_CLEAR_VALUE with the floats. This should make no difference to the calling
// application.
......@@ -1290,7 +1289,7 @@ bool Context::isQueryParameterInt(GLenum pname)
// 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
// 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
// place DEPTH_CLEAR_VALUE with the floats. This should make no difference to the calling
// application.
......@@ -1360,7 +1359,7 @@ bool Context::isQueryParameterFloat(GLenum pname)
// 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
// 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
// place DEPTH_CLEAR_VALUE with the floats. This should make no difference to the calling
// application.
......@@ -1444,7 +1443,7 @@ bool Context::applyRenderTarget()
{
sw::Rect scissor = {mState.scissorX, mState.scissorY, mState.scissorX + mState.scissorWidth, mState.scissorY + mState.scissorHeight};
scissor.clip(0, 0, width, height);
device->setScissorRect(scissor);
device->setScissorEnable(true);
}
......@@ -1514,7 +1513,7 @@ void Context::applyState(GLenum drawMode)
{
device->setStencilEnable(true);
device->setTwoSidedStencil(true);
// get the maximum size of the stencil ref
Renderbuffer *stencilbuffer = framebuffer->getStencilbuffer();
GLuint maxStencil = (1 << stencilbuffer->getStencilSize()) - 1;
......@@ -1609,7 +1608,7 @@ void Context::applyState(GLenum drawMode)
}
}
}
if(mState.sampleCoverageInvert)
{
mask = ~mask;
......@@ -1680,14 +1679,14 @@ GLenum Context::applyVertexBuffer(GLint base, GLint first, GLsizei count)
{
return err;
}
device->resetInputStreams(false);
for(int i = 0; i < MAX_VERTEX_ATTRIBS; i++)
{
sw::Resource *resource = attributes[i].vertexBuffer;
const void *buffer = (char*)resource->getBuffer() + attributes[i].offset;
int stride = attributes[i].stride;
buffer = (char*)buffer + stride * base;
......@@ -1742,7 +1741,7 @@ void Context::applyTextures()
device->setTextureFilter(sw::SAMPLER_PIXEL, samplerIndex, minFilter);
// device->setTextureFilter(sw::SAMPLER_PIXEL, samplerIndex, es2sw::ConvertMagFilter(magFilter));
device->setMipmapFilter(sw::SAMPLER_PIXEL, samplerIndex, mipFilter);
device->setMaxAnisotropy(sw::SAMPLER_PIXEL, samplerIndex, maxAnisotropy);
device->setMaxAnisotropy(sw::SAMPLER_PIXEL, samplerIndex, maxAnisotropy);
applyTexture(samplerIndex, texture);
......@@ -1779,7 +1778,7 @@ void Context::applyTexture(int index, Texture *baseTexture)
}
device->setTextureResource(index, resource);
if(baseTexture)
{
int levelCount = baseTexture->getLevelCount();
......@@ -1830,7 +1829,7 @@ void Context::readPixels(GLint x, GLint y, GLsizei width, GLsizei height,
}
GLsizei outputPitch = ComputePitch(width, format, type, mState.packAlignment);
// Sized query sanity check
if(bufSize)
{
......@@ -2005,7 +2004,7 @@ void Context::readPixels(GLint x, GLint y, GLsizei width, GLsizei height,
switch(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)(63 * g + 0.5f) << 5) |
((unsigned short)(31 * r + 0.5f) << 11);
......@@ -2039,7 +2038,7 @@ void Context::clear(GLbitfield mask)
unsigned int color = (unorm<8>(mState.colorClearValue.alpha) << 24) |
(unorm<8>(mState.colorClearValue.red) << 16) |
(unorm<8>(mState.colorClearValue.green) << 8) |
(unorm<8>(mState.colorClearValue.green) << 8) |
(unorm<8>(mState.colorClearValue.blue) << 0);
float depth = clamp01(mState.depthClearValue);
int stencil = mState.stencilClearValue & 0x000000FF;
......@@ -2047,7 +2046,7 @@ void Context::clear(GLbitfield mask)
if(mask & GL_COLOR_BUFFER_BIT)
{
unsigned int rgbaMask = (mState.colorMaskRed ? 0x1 : 0) |
(mState.colorMaskGreen ? 0x2 : 0) |
(mState.colorMaskGreen ? 0x2 : 0) |
(mState.colorMaskBlue ? 0x4 : 0) |
(mState.colorMaskAlpha ? 0x8 : 0);
......@@ -2238,12 +2237,12 @@ int Context::getSupportedMultiSampleDepth(sw::Format format, int requested)
{
return 1;
}
if(requested == 2)
{
return 2;
}
return 4;
}
......@@ -2483,7 +2482,7 @@ sw::MatrixStack &Context::currentMatrixStack()
{
switch(matrixMode)
{
case GL_MODELVIEW:
case GL_MODELVIEW:
return modelViewStack;
case GL_PROJECTION:
return projectionStack;
......@@ -2493,7 +2492,7 @@ sw::MatrixStack &Context::currentMatrixStack()
case 0: return textureStack0;
case 1: return textureStack1;
}
break;
break;
}
UNREACHABLE();
......@@ -2533,7 +2532,7 @@ void Context::rotate(GLfloat angle, 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)
......
{
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;
glAttachShader;
glBindAttribLocation;
glAlphaFunc;
glAlphaFuncx;
glBindBuffer;
glBindFramebuffer;
glBindRenderbuffer;
glBindTexture;
glBlendColor;
glBlendEquation;
glBlendEquationSeparate;
glBlendFunc;
glBlendFuncSeparate;
glBufferData;
glBufferSubData;
glCheckFramebufferStatus;
glClear;
glClearColor;
glClearColorx;
glClearDepthf;
glClearDepthx;
glClearStencil;
glClientActiveTexture;
glClipPlanef;
glClipPlanex;
glColor4f;
glColor4ub;
glColor4x;
glColorMask;
glCompileShader;
glColorPointer;
glCompressedTexImage2D;
glCompressedTexSubImage2D;
glCopyTexImage2D;
glCopyTexSubImage2D;
glCreateProgram;
glCreateShader;
glCullFace;
glDeleteBuffers;
glDeleteFramebuffers;
glDeleteProgram;
glDeleteRenderbuffers;
glDeleteShader;
glDeleteTextures;
glDepthFunc;
glDepthMask;
glDepthRangef;
glDetachShader;
glDepthRangex;
glDisable;
glDisableVertexAttribArray;
glDisableClientState;
glDrawArrays;
glDrawElements;
glEnable;
glEnableVertexAttribArray;
glEnableClientState;
glFinish;
glFlush;
glFramebufferRenderbuffer;
glFramebufferTexture2D;
glFogf;
glFogfv;
glFogx;
glFogxv;
glFrontFace;
glFrustumf;
glFrustumx;
glGenBuffers;
glGenFramebuffers;
glGenRenderbuffers;
glGenTextures;
glGenerateMipmap;
glGetActiveAttrib;
glGetActiveUniform;
glGetAttachedShaders;
glGetAttribLocation;
glGetBooleanv;
glGetBufferParameteriv;
glGetClipPlanef;
glGetClipPlanex;
glGetError;
glGetFixedv;
glGetFloatv;
glGetFramebufferAttachmentParameteriv;
glGetIntegerv;
glGetProgramInfoLog;
glGetProgramiv;
glGetRenderbufferParameteriv;
glGetShaderInfoLog;
glGetShaderPrecisionFormat;
glGetShaderSource;
glGetShaderiv;
glGetLightfv;
glGetLightxv;
glGetMaterialfv;
glGetMaterialxv;
glGetPointerv;
glGetString;
glGetTexEnvfv;
glGetTexEnviv;
glGetTexEnvxv;
glGetTexParameterfv;
glGetTexParameteriv;
glGetUniformLocation;
glGetUniformfv;
glGetUniformiv;
glGetVertexAttribPointerv;
glGetVertexAttribfv;
glGetVertexAttribiv;
glGetTexParameterxv;
glHint;
glIsBuffer;
glIsEnabled;
glIsFramebuffer;
glIsProgram;
glIsRenderbuffer;
glIsShader;
glIsTexture;
glLightModelf;
glLightModelfv;
glLightModelx;
glLightModelxv;
glLightf;
glLightfv;
glLightx;
glLightxv;
glLineWidth;
glLinkProgram;
glLineWidthx;
glLoadIdentity;
glLoadMatrixf;
glLoadMatrixx;
glLogicOp;
glMaterialf;
glMaterialfv;
glMaterialx;
glMaterialxv;
glMatrixMode;
glMultMatrixf;
glMultMatrixx;
glMultiTexCoord4f;
glMultiTexCoord4x;
glNormal3f;
glNormal3x;
glNormalPointer;
glOrthof;
glOrthox;
glPixelStorei;
glPointParameterf;
glPointParameterfv;
glPointParameterx;
glPointParameterxv;
glPointSize;
glPointSizex;
glPolygonOffset;
glPolygonOffsetx;
glPopMatrix;
glPushMatrix;
glReadPixels;
glReleaseShaderCompiler;
glRenderbufferStorage;
glRotatef;
glRotatex;
glSampleCoverage;
glSampleCoveragex;
glScalef;
glScalex;
glScissor;
glShaderBinary;
glShaderSource;
glShadeModel;
glStencilFunc;
glStencilFuncSeparate;
glStencilMask;
glStencilMaskSeparate;
glStencilOp;
glStencilOpSeparate;
glTexCoordPointer;
glTexEnvf;
glTexEnvfv;
glTexEnvi;
glTexEnviv;
glTexEnvx;
glTexEnvxv;
glTexImage2D;
glTexParameterf;
glTexParameterfv;
glTexParameteri;
glTexParameteriv;
glTexParameterx;
glTexParameterxv;
glTexSubImage2D;
glUniform1f;
glUniform1fv;
glUniform1i;
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;
glTranslatef;
glTranslatex;
glVertexPointer;
glViewport;
# Extensions
glTexImage3DOES;
glBlitFramebufferANGLE;
glRenderbufferStorageMultisampleANGLE;
glDeleteFencesNV;
glFinishFenceNV;
glGenFencesNV;
glGetFenceivNV;
glIsFenceNV;
glSetFenceNV;
glTestFenceNV;
glGetGraphicsResetStatusEXT;
glReadnPixelsEXT;
glGetnUniformfvEXT;
glGetnUniformivEXT;
glGenQueriesEXT;
glDeleteQueriesEXT;
glIsQueryEXT;
glBeginQueryEXT;
glEndQueryEXT;
glGetQueryivEXT;
glGetQueryObjectuivEXT;
# Extensions
glPointSizePointerOES;
glEGLImageTargetTexture2DOES;
glEGLImageTargetRenderbufferStorageOES;
glIsRenderbufferOES;
glBindRenderbufferOES;
glDeleteRenderbuffersOES;
glGenRenderbuffersOES;
glRenderbufferStorageOES;
glGetRenderbufferParameterivOES;
glIsFramebufferOES;
glBindFramebufferOES;
glDeleteFramebuffersOES;
glGenFramebuffersOES;
glCheckFramebufferStatusOES;
glFramebufferRenderbufferOES;
glFramebufferTexture2DOES;
glGetFramebufferAttachmentParameterivOES;
glGenerateMipmapOES;
glBlendEquationOES;
glBlendEquationSeparateOES;
glBlendFuncSeparateOES;
glDrawTexsOES;
glDrawTexiOES;
glDrawTexxOES;
glDrawTexsvOES;
glDrawTexivOES;
glDrawTexxvOES;
glDrawTexfOES;
glDrawTexfvOES;
# EGL dependencies
glCreateContext;
glDestroyContext;
glMakeCurrent;
glGetCurrentContext;
glGetProcAddress;
glBindTexImage;
createFrameBuffer;
createBackBuffer;
createDevice;
createFrameBuffer;
createBackBuffer;
createDepthStencil;
Register;
Register;
local:
*;
......
......@@ -18,7 +18,6 @@
#include "Framebuffer.h"
#include "Renderbuffer.h"
#include "Texture.h"
#include "Query.h"
#include "common/debug.h"
#include "Common/SharedLibrary.hpp"
#include "Common/Version.h"
......@@ -65,7 +64,7 @@ static bool validateSubImageParams(bool compressed, GLsizei width, GLsizei heigh
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)))
{
return error(GL_INVALID_OPERATION, false);
......@@ -899,7 +898,7 @@ void GL_APIENTRY glClearStencil(GLint s)
void GL_APIENTRY glClientActiveTexture(GLenum texture)
{
TRACE("(GLenum texture = 0x%X)", texture);
try
{
switch(texture)
......@@ -1023,10 +1022,10 @@ void GL_APIENTRY glColorPointer(GLint size, GLenum type, GLsizei stride, const G
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)
{
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)",
target, level, internalformat, width, height, border, imageSize, data);
......@@ -1756,7 +1755,7 @@ void GL_APIENTRY glDrawElements(GLenum mode, GLsizei count, GLenum type, const G
default:
return error(GL_INVALID_ENUM);
}
context->drawElements(mode, count, type, indices);
}
}
......@@ -1825,7 +1824,7 @@ void GL_APIENTRY glEnable(GLenum cap)
void GL_APIENTRY glEnableClientState(GLenum array)
{
TRACE("(GLenum array = 0x%X)", array);
try
{
es1::Context *context = es1::getContext();
......@@ -1906,7 +1905,7 @@ void GL_APIENTRY glFramebufferRenderbufferOES(GLenum target, GLenum attachment,
{
es1::Framebuffer *framebuffer = context->getFramebuffer();
GLuint framebufferHandle = context->getFramebufferHandle();
if(!framebuffer || (framebufferHandle == 0 && renderbuffer != 0))
{
return error(GL_INVALID_OPERATION);
......@@ -2277,7 +2276,7 @@ void GL_APIENTRY glGetBooleanv(GLenum pname, GLboolean* params)
if(!(context->getBooleanv(pname, params)))
{
unsigned int numParams = context->getQueryParameterNum(pname);
if(numParams < 0)
{
return error(GL_INVALID_ENUM);
......@@ -2420,7 +2419,7 @@ void GL_APIENTRY glGetFloatv(GLenum pname, GLfloat* params)
if(!(context->getFloatv(pname, params)))
{
unsigned int numParams = context->getQueryParameterNum(pname);
if(numParams < 0)
{
return error(GL_INVALID_ENUM);
......@@ -2486,21 +2485,21 @@ void GL_APIENTRY glGetFramebufferAttachmentParameterivOES(GLenum target, GLenum
{
return error(GL_INVALID_ENUM);
}
if(context->getFramebufferHandle() == 0)
{
return error(GL_INVALID_OPERATION);
}
es1::Framebuffer *framebuffer = context->getFramebuffer();
GLenum attachmentType;
GLuint attachmentHandle;
switch(attachment)
{
case GL_COLOR_ATTACHMENT0_OES:
case GL_COLOR_ATTACHMENT0_OES:
attachmentType = framebuffer->getColorbufferType();
attachmentHandle = framebuffer->getColorbufferHandle();
attachmentHandle = framebuffer->getColorbufferHandle();
break;
case GL_DEPTH_ATTACHMENT_OES:
attachmentType = framebuffer->getDepthbufferType();
......@@ -2574,7 +2573,7 @@ void GL_APIENTRY glGetIntegerv(GLenum pname, GLint* params)
if(!(context->getIntegerv(pname, params)))
{
unsigned int numParams = context->getQueryParameterNum(pname);
if(numParams < 0)
{
return error(GL_INVALID_ENUM);
......@@ -2670,7 +2669,7 @@ const GLubyte* GL_APIENTRY glGetString(GLenum name)
case GL_RENDERER:
return (GLubyte*)"SwiftShader";
case GL_VERSION:
return (GLubyte*)"OpenGL ES 1.1 SwiftShader "VERSION_STRING;
return (GLubyte*)"OpenGL ES 1.1 SwiftShader " VERSION_STRING;
case GL_EXTENSIONS:
// Keep list sorted in following order:
// OES extensions
......@@ -2859,7 +2858,7 @@ void GL_APIENTRY glHint(GLenum target, GLenum mode)
case GL_DONT_CARE:
break;
default:
return error(GL_INVALID_ENUM);
return error(GL_INVALID_ENUM);
}
es1::Context *context = es1::getContext();
......@@ -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)
{
TRACE("(GLenum light = 0x%X, GLenum pname = 0x%X, const GLint *params)", light, pname);
try
{
es1::Context *context = es1::getContext();
......@@ -3385,7 +3384,7 @@ void GL_APIENTRY glPolygonOffsetx(GLfixed factor, GLfixed units)
void GL_APIENTRY glPopMatrix(void)
{
TRACE("()");
try
{
es1::Context *context = es1::getContext();
......@@ -3404,7 +3403,7 @@ void GL_APIENTRY glPopMatrix(void)
void GL_APIENTRY glPushMatrix(void)
{
TRACE("()");
try
{
es1::Context *context = es1::getContext();
......@@ -3480,7 +3479,7 @@ void GL_APIENTRY glRenderbufferStorageOES(GLenum target, GLenum internalformat,
if(context)
{
if(width > es1::IMPLEMENTATION_MAX_RENDERBUFFER_SIZE ||
if(width > es1::IMPLEMENTATION_MAX_RENDERBUFFER_SIZE ||
height > es1::IMPLEMENTATION_MAX_RENDERBUFFER_SIZE)
{
return error(GL_INVALID_VALUE);
......@@ -3524,7 +3523,7 @@ void GL_APIENTRY glRenderbufferStorageOES(GLenum target, GLenum internalformat,
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);
try
{
es1::Context *context = es1::getContext();
......@@ -3572,7 +3571,7 @@ void GL_APIENTRY glSampleCoveragex(GLclampx value, GLboolean invert)
void GL_APIENTRY glScalef(GLfloat x, GLfloat y, GLfloat z)
{
TRACE("(GLfloat x = %f, GLfloat y = %f, GLfloat z = %f)", x, y, z);
try
{
es1::Context *context = es1::getContext();
......@@ -3905,7 +3904,7 @@ void GL_APIENTRY glTexImage2D(GLenum target, GLint level, GLint internalformat,
return error(GL_INVALID_ENUM);
}
}
if(target == GL_TEXTURE_2D)
{
es1::Texture2D *texture = context->getTexture2D();
......@@ -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)
{
TRACE("(GLfloat x = %f, GLfloat y = %f, GLfloat z = %f)", x, y, z);
try
{
es1::Context *context = es1::getContext();
......@@ -4225,7 +4224,7 @@ void GL_APIENTRY glEGLImageTargetTexture2DOES(GLenum target, GLeglImageOES image
if(context)
{
es1::Texture2D *texture = 0;
switch(target)
{
case GL_TEXTURE_2D: texture = context->getTexture2D(); break;
......
......@@ -158,27 +158,25 @@ global:
glReadnPixelsEXT;
glGetnUniformfvEXT;
glGetnUniformivEXT;
glGenQueriesEXT;
glGenQueriesEXT;
glDeleteQueriesEXT;
glIsQueryEXT;
glBeginQueryEXT;
glEndQueryEXT;
glGetQueryivEXT;
glGetQueryObjectuivEXT;
glEGLImageTargetTexture2DOES;
glEGLImageTargetRenderbufferStorageOES;
# EGL dependencies
glCreateContext;
glDestroyContext;
glMakeCurrent;
glGetCurrentContext;
glGetProcAddress;
glBindTexImage;
createFrameBuffer;
createBackBuffer;
createDevice;
createFrameBuffer;
createBackBuffer;
createDepthStencil;
Register;
Register;
local:
*;
......
......@@ -82,11 +82,11 @@ namespace sw
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();
}
uint8_t *RoutineManager::getGOTBase() const
{
ASSERT(!HasGOT);
......@@ -113,7 +113,10 @@ namespace sw
void RoutineManager::deallocateExceptionTable(void *ET)
{
UNIMPLEMENTED();
if(ET)
{
UNIMPLEMENTED();
}
}
void RoutineManager::setMemoryWritable()
......
......@@ -5,6 +5,9 @@
<Project filename="OpenGL/libGLESv2/libGLESv2.cbp">
<Depends filename="LLVM/LLVM.cbp" />
</Project>
<Project filename="OpenGL/libGLES_CM/libGLES_CM.cbp">
<Depends filename="LLVM/LLVM.cbp" />
</Project>
<Project filename="LLVM/LLVM.cbp" />
<Project filename="../tests/third_party/PowerVR/Examples/Beginner/01_HelloAPI/OGLES2/Build/OGLES2HelloAPI.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