From 03c86416d5cac871938744b9bdd4ebd0fad3bdda Mon Sep 17 00:00:00 2001 From: Liran Date: Sun, 3 Apr 2011 15:12:31 +0300 Subject: [PATCH] fix handling pointers in emugen. Moved 'isPointer' attribute from variable to type field. The .types input file now includes new column specifying if a type is a pointer or not previously emugen declared as pointer only types which included '*' character but did not process well the case of 'char **' (pointer to pointer). Fixed the gl.types and ut_rendercontrol.types accordingly. Few other fixes to gl.attrib and gl.in. Change-Id: Ifd3591119dfa504703c68556802a40e38fe4940e --- .../opengl/host/tools/emugen/ApiGen.cpp | 13 +++-- .../opengl/host/tools/emugen/EntryPoint.cpp | 34 ++++--------- .../opengl/host/tools/emugen/TypeFactory.cpp | 37 ++++++++++---- tools/emulator/opengl/host/tools/emugen/Var.h | 12 ++--- .../opengl/host/tools/emugen/VarType.h | 8 +-- .../opengl/system/GLESv1_enc/gl.attrib | 31 ++++++------ tools/emulator/opengl/system/GLESv1_enc/gl.in | 22 ++++---- .../opengl/system/GLESv1_enc/gl.types | 50 ++++++++++++------- .../ut_rendercontrol.types | 2 +- 9 files changed, 115 insertions(+), 94 deletions(-) diff --git a/tools/emulator/opengl/host/tools/emugen/ApiGen.cpp b/tools/emulator/opengl/host/tools/emugen/ApiGen.cpp index 9b7949db3..dfba6a244 100644 --- a/tools/emulator/opengl/host/tools/emugen/ApiGen.cpp +++ b/tools/emulator/opengl/host/tools/emugen/ApiGen.cpp @@ -549,7 +549,6 @@ int ApiGen::genDecoderImpl(const std::string &filename) std::string retvalType; if (!e->retval().isVoid()) { retvalType = e->retval().type()->name(); - if (e->retval().isPointer()) retvalType += "*"; } for (int pass = PASS_TmpBuffAlloc; pass < PASS_LAST; pass++) { @@ -593,15 +592,15 @@ int ApiGen::genDecoderImpl(const std::string &filename) (uint) j, varoffset.c_str()); } if (pass == PASS_FunctionCall) { - fprintf(fp, "(%s *)(ptr + %s + 4)", + fprintf(fp, "(%s)(ptr + %s + 4)", v->type()->name().c_str(), varoffset.c_str()); } else if (pass == PASS_DebugPrint) { - fprintf(fp, "(%s *)(ptr + %s + 4), *(unsigned int *)(ptr + %s)", + fprintf(fp, "(%s)(ptr + %s + 4), *(unsigned int *)(ptr + %s)", v->type()->name().c_str(), varoffset.c_str(), varoffset.c_str()); } varoffset += " + 4 + *(size_t *)(ptr +" + varoffset + ")"; - } else { // in pointer; + } else { // out pointer; if (pass == PASS_TmpBuffAlloc) { fprintf(fp, "\t\t\tsize_t tmpPtr%uSize = (size_t)*(unsigned int *)(ptr + %s);\n", (uint) j, varoffset.c_str()); @@ -611,16 +610,16 @@ int ApiGen::genDecoderImpl(const std::string &filename) fprintf(fp, "\t\t\ttotalTmpSize += tmpPtr%uSize;\n", (uint)j); tmpBufOffset[j] = totalTmpBuffOffset; char tmpPtrName[16]; - sprintf(tmpPtrName,"tmpPtr%u", (uint)j); + sprintf(tmpPtrName," + tmpPtr%uSize", (uint)j); totalTmpBuffOffset += std::string(tmpPtrName); totalTmpBuffExist = true; } else if (pass == PASS_MemAlloc) { fprintf(fp, "\t\t\tunsigned char *tmpPtr%u = &tmpBuf[%s];\n", (uint)j, tmpBufOffset[j].c_str()); } else if (pass == PASS_FunctionCall) { - fprintf(fp, "(%s *)(tmpPtr%u)", v->type()->name().c_str(), (uint) j); + fprintf(fp, "(%s)(tmpPtr%u)", v->type()->name().c_str(), (uint) j); } else if (pass == PASS_DebugPrint) { - fprintf(fp, "(%s *)(tmpPtr%u), *(unsigned int *)(ptr + %s)", + fprintf(fp, "(%s)(tmpPtr%u), *(unsigned int *)(ptr + %s)", v->type()->name().c_str(), (uint) j, varoffset.c_str()); } diff --git a/tools/emulator/opengl/host/tools/emugen/EntryPoint.cpp b/tools/emulator/opengl/host/tools/emugen/EntryPoint.cpp index d9b549902..f766dd930 100644 --- a/tools/emulator/opengl/host/tools/emugen/EntryPoint.cpp +++ b/tools/emulator/opengl/host/tools/emugen/EntryPoint.cpp @@ -37,7 +37,7 @@ void EntryPoint::reset() m_vars.empty(); } -bool parseTypeField(const std::string & f, std::string *vartype, bool *pointer_type, std::string *varname) +bool parseTypeField(const std::string & f, std::string *vartype, std::string *varname) { size_t pos = 0, last; bool done = false; @@ -45,7 +45,6 @@ bool parseTypeField(const std::string & f, std::string *vartype, bool *pointer_t *vartype = ""; if (varname != NULL) *varname = ""; - *pointer_type = false; enum { ST_TYPE, ST_NAME, ST_END } state = ST_TYPE; @@ -61,13 +60,6 @@ bool parseTypeField(const std::string & f, std::string *vartype, bool *pointer_t } else { // must be a type name; *vartype = str; - // do we have an astriks at the end of the name? - if (vartype->at(vartype->size() - 1) == '*') { - *pointer_type = true; - // remove the astriks - (*vartype)[vartype->size() - 1] = ' '; - *vartype = trim(*vartype); - } state = ST_NAME; pos = last; } @@ -76,14 +68,13 @@ bool parseTypeField(const std::string & f, std::string *vartype, bool *pointer_t if (str.size() == 0) { done = true; } else if (str == "*") { - *pointer_type = true; - // remove the leading astriks; + (*vartype) += "*"; pos = last; } else if (varname == NULL) { done = true; } else { - if (str[0] == '*') { - *pointer_type = true; + while (str[0] == '*') { + (*vartype) += "*"; str[0] = ' '; str = trim(str); } @@ -116,8 +107,7 @@ bool EntryPoint::parse(unsigned int lc, const std::string & str) // return type field = getNextToken(linestr, pos, &last, ",)"); std::string retTypeName; - bool pointer_type; - if (!parseTypeField(field, &retTypeName, &pointer_type, NULL)) { + if (!parseTypeField(field, &retTypeName, NULL)) { fprintf(stderr, "line: %d: Parsing error in field <%s>\n", lc, field.c_str()); return false; } @@ -127,7 +117,7 @@ bool EntryPoint::parse(unsigned int lc, const std::string & str) fprintf(stderr, "UNKNOWN retval: %s\n", linestr.c_str()); } - m_retval.init(std::string(""), theType, pointer_type, std::string(""), Var::POINTER_OUT, std::string("")); + m_retval.init(std::string(""), theType, std::string(""), Var::POINTER_OUT, std::string("")); // function name m_name = getNextToken(linestr, pos, &last, ",)"); @@ -138,7 +128,7 @@ bool EntryPoint::parse(unsigned int lc, const std::string & str) while (pos < linestr.size() - 1) { field = getNextToken(linestr, pos, &last, ",)"); std::string vartype, varname; - if (!parseTypeField(field, &vartype, &pointer_type, &varname)) { + if (!parseTypeField(field, &vartype, &varname)) { fprintf(stderr, "line: %d: Parsing error in field <%s>\n", lc, field.c_str()); return false; } @@ -148,13 +138,13 @@ bool EntryPoint::parse(unsigned int lc, const std::string & str) fprintf(stderr, "%d: Unknown type: %s\n", lc, vartype.c_str()); } else { if (varname == "" && - !(v->name() == "void" && !pointer_type)) { + !(v->name() == "void" && !v->isPointer())) { std::ostringstream oss; oss << "var" << nvars; varname = oss.str(); } - m_vars.push_back(Var(varname, v, pointer_type, std::string(""), Var::POINTER_IN, "")); + m_vars.push_back(Var(varname, v, std::string(""), Var::POINTER_IN, "")); } pos = last + 1; } @@ -166,9 +156,8 @@ void EntryPoint::print(FILE *fp, bool newline, const std::string & name_prefix, const std::string & ctx_param ) const { - fprintf(fp, "%s%s %s%s%s(", + fprintf(fp, "%s %s%s%s(", m_retval.type()->name().c_str(), - m_retval.isPointer() ? "*" : "", name_prefix.c_str(), m_name.c_str(), name_suffix.c_str()); @@ -178,8 +167,7 @@ void EntryPoint::print(FILE *fp, bool newline, for (size_t i = 0; i < m_vars.size(); i++) { if (m_vars[i].isVoid()) continue; if (i != 0 || ctx_param != "") fprintf(fp, ", "); - fprintf(fp, "%s %s%s", m_vars[i].type()->name().c_str(), - m_vars[i].isPointer() ? "*" : "", + fprintf(fp, "%s %s", m_vars[i].type()->name().c_str(), m_vars[i].name().c_str()); } fprintf(fp, ")%s", newline? "\n" : ""); diff --git a/tools/emulator/opengl/host/tools/emugen/TypeFactory.cpp b/tools/emulator/opengl/host/tools/emugen/TypeFactory.cpp index 709807e8c..166b21aa9 100644 --- a/tools/emulator/opengl/host/tools/emugen/TypeFactory.cpp +++ b/tools/emulator/opengl/host/tools/emugen/TypeFactory.cpp @@ -48,18 +48,18 @@ static VarConverter * getVarConverter(int size) return v; } -#define ADD_TYPE(name, size, printformat) \ - g_varMap.insert(std::pair(name, VarType(g_typeId++, name, &g_var##size,printformat))); +#define ADD_TYPE(name, size, printformat,ispointer) \ + g_varMap.insert(std::pair(name, VarType(g_typeId++, name, &g_var##size , printformat , ispointer))); void TypeFactory::initBaseTypes() { g_initialized = true; - ADD_TYPE("UNKNOWN", 0, "0x%x"); - ADD_TYPE("void", 0, "0x%x"); - ADD_TYPE("char", 8, "%c"); - ADD_TYPE("int", 32, "%d"); - ADD_TYPE("float", 32, "%d"); - ADD_TYPE("short", 16, "%d"); + ADD_TYPE("UNKNOWN", 0, "0x%x", false); + ADD_TYPE("void", 0, "0x%x", false); + ADD_TYPE("char", 8, "%c", false); + ADD_TYPE("int", 32, "%d", false); + ADD_TYPE("float", 32, "%d", false); + ADD_TYPE("short", 16, "%d", false); } int TypeFactory::initFromFile(const std::string &filename) @@ -103,6 +103,25 @@ int TypeFactory::initFromFile(const std::string &filename) return -2; } + pos = last + 1; + std::string pointerDef; + pointerDef = getNextToken(str, pos, &last, WHITESPACE); + if (pointerDef.size() == 0) { + fprintf(stderr, "Error: %d : missing ispointer definition\n", lc); + return -2; + } + + bool isPointer=false; + if (std::string("true")==pointerDef) + isPointer = true; + else if (std::string("false")==pointerDef) + isPointer = false; + else + { + fprintf(stderr, "Error: %d : invalid isPointer definition, must be either \"true\" or \"false\"\n", lc); + return -2; + } + VarConverter *v = getVarConverter(atoi(size.c_str())); if (v == NULL) { fprintf(stderr, "Error: %d : unknown var width: %d\n", lc, atoi(size.c_str())); @@ -114,7 +133,7 @@ int TypeFactory::initFromFile(const std::string &filename) "Warining: %d : type %s is already known, definition in line %d is taken\n", lc, name.c_str(), lc); } - g_varMap.insert(std::pair(name, VarType(g_typeId++, name, v ,printString))); + g_varMap.insert(std::pair(name, VarType(g_typeId++, name, v ,printString,isPointer))); } g_initialized = true; return 0; diff --git a/tools/emulator/opengl/host/tools/emugen/Var.h b/tools/emulator/opengl/host/tools/emugen/Var.h index ef9f7c23a..ba74cea48 100644 --- a/tools/emulator/opengl/host/tools/emugen/Var.h +++ b/tools/emulator/opengl/host/tools/emugen/Var.h @@ -27,7 +27,6 @@ public: Var() : m_name(""), m_type(NULL), - m_pointer(false), m_lenExpression(""), m_pointerDir(POINTER_IN), m_nullAllowed(false), @@ -38,13 +37,11 @@ public: Var(const std::string & name, const VarType * vartype, - bool isPointer, const std::string & lenExpression, PointerDir dir, const std::string &packExpression) : m_name(name), m_type(const_cast(vartype)), - m_pointer(isPointer), m_lenExpression(lenExpression), m_pointerDir(dir), m_nullAllowed(false), @@ -53,11 +50,10 @@ public: } void init(const std::string name, const VarType * vartype, - bool isPointer, std::string lenExpression, + std::string lenExpression, PointerDir dir, std::string packExpression) { m_name = name; m_type = vartype; - m_pointer = isPointer; m_lenExpression = lenExpression; m_packExpression = packExpression; m_pointerDir = dir; @@ -67,8 +63,8 @@ public: const std::string & name() const { return m_name; } const VarType * type() const { return m_type; } - bool isPointer() const { return m_pointer; } - bool isVoid() const { return ((m_type->bytes() == 0) && (m_pointer == false)); } + bool isPointer() const { return m_type->isPointer(); } + bool isVoid() const { return ((m_type->bytes() == 0) && (!m_type->isPointer())); } const std::string & lenExpression() const { return m_lenExpression; } const std::string & packExpression() const { return(m_packExpression); } void setLenExpression(const std::string & lenExpression) { m_lenExpression = lenExpression; } @@ -77,7 +73,7 @@ public: PointerDir pointerDir() { return m_pointerDir; } void setNullAllowed(bool state) { m_nullAllowed = state; } bool nullAllowed() const { return m_nullAllowed; } - void printType(FILE *fp) { fprintf(fp, "%s%s", m_type->name().c_str(), m_pointer ? "*" : ""); } + void printType(FILE *fp) { fprintf(fp, "%s", m_type->name().c_str()); } void printTypeName(FILE *fp) { printType(fp); fprintf(fp, " %s", m_name.c_str()); } private: diff --git a/tools/emulator/opengl/host/tools/emugen/VarType.h b/tools/emulator/opengl/host/tools/emugen/VarType.h index a0718bb66..41bb64501 100644 --- a/tools/emulator/opengl/host/tools/emugen/VarType.h +++ b/tools/emulator/opengl/host/tools/emugen/VarType.h @@ -50,12 +50,12 @@ public: class VarType { public: VarType() : - m_id(0), m_name("default_constructed"), m_converter(NULL), m_printFomrat("0x%x") + m_id(0), m_name("default_constructed"), m_converter(NULL), m_printFomrat("0x%x"), m_isPointer(false) { } - VarType(size_t id, const std::string & name, const VarConverter * converter, const std::string & printFormat ) : - m_id(id), m_name(name), m_converter(const_cast(converter)), m_printFomrat(printFormat) + VarType(size_t id, const std::string & name, const VarConverter * converter, const std::string & printFormat , const bool isPointer) : + m_id(id), m_name(name), m_converter(const_cast(converter)), m_printFomrat(printFormat), m_isPointer(isPointer) { } @@ -65,12 +65,14 @@ public: const std::string & name() const { return m_name; } const std::string & printFormat() const { return m_printFomrat; } size_t bytes() const { return m_converter->bytes(); } + bool isPointer() const { return m_isPointer; } size_t id() const { return m_id; } private: size_t m_id; std::string m_name; VarConverter * m_converter; std::string m_printFomrat; + bool m_isPointer; }; #endif diff --git a/tools/emulator/opengl/system/GLESv1_enc/gl.attrib b/tools/emulator/opengl/system/GLESv1_enc/gl.attrib index 6245dc5a0..9f776a919 100644 --- a/tools/emulator/opengl/system/GLESv1_enc/gl.attrib +++ b/tools/emulator/opengl/system/GLESv1_enc/gl.attrib @@ -4,6 +4,7 @@ GLOBAL #void glClipPlanef(GLenum plane, GLfloat *equation) glClipPlanef + dir equation in len equation (4 * sizeof(float)) #void glFogfv(GLenum pname, GLfloat *params) @@ -73,11 +74,13 @@ glBufferData #void glBufferSubData(GLenum target, GLintptr offset, GLsizeiptr size, GLvoid *data) glBufferSubData + dir data in len data size -#void glClipPlanex(GLenum plane, GLfixed *equation) +#void glClipPlanex(GLenum plane, GLfixed *eqn) glClipPlanex - len equation (4 * sizeof(GLfixed)) + dir eqn in + len eqn (4 * sizeof(GLfixed)) #void glColorPointer(GLint size, GLenum type, GLsizei stride, GLvoid *pointer) #we treat the pointer as offset to a VBO @@ -120,6 +123,7 @@ glGetBooleanv #void glGetBufferParameteriv(GLenum target, GLenum pname, GLint *params) glGetBufferParameteriv len params (sizeof(GLint)) + dir params out #void glGenBuffers(GLsizei n, GLuint *buffers) glGenBuffers @@ -133,6 +137,7 @@ glGenTextures #void glGetFixedv(GLenum pname, GLfixed *params) glGetFixedv + dir params out len params (glUtilsParamSize(pname) * sizeof(GLfixed)) #void glGetIntegerv(GLenum pname, GLint *params) @@ -156,16 +161,17 @@ glGetPointerv #GLubyte* glGetString(GLenum name) glGetString + flag unsupported #void glGetTexEnviv(GLenum env, GLenum pname, GLint *params) glGetTexEnviv -#FIXME - len params (4) + dir params out + len params (glUtilsParamSize(pname) * sizeof(GLint)) #void glGetTexEnvxv(GLenum env, GLenum pname, GLfixed *params) glGetTexEnvxv -#FIXME - len params (4) + dir params out + len params (glUtilsParamSize(pname) * sizeof(GLfixed)) #void glGetTexParameteriv(GLenum target, GLenum pname, GLint *params) glGetTexParameteriv @@ -227,7 +233,8 @@ glTexEnvxv #void glTexImage2D(GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLint border, GLenum format, GLenum type, GLvoid *pixels) glTexImage2D - len pixels pixelDataSize(self, width, height, format, type, 1) + dir pixels in + len pixels (pixels == NULL ? 0 : pixelDataSize(self, width, height, format, type, 1)) #void glTexParameteriv(GLenum target, GLenum pname, GLint *params) glTexParameteriv @@ -239,13 +246,11 @@ glTexParameterxv #void glTexSubImage2D(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLenum type, GLvoid *pixels) glTexSubImage2D -#FIXME: this is bad len pixels pixelDataSize(self, width, height, format, type, 1) #void glVertexPointer(GLint size, GLenum type, GLsizei stride, GLvoid *pointer) # we treat the pointer as an offset to a VBO glVertexPointer - len pointer (sizeof(unsigned int)) flag unsupported #void glPointSizePointerOES(GLenum type, GLsizei stride, GLvoid *pointer) @@ -253,12 +258,10 @@ glPointSizePointerOES len pointer (sizeof(unsigned int)) flag unsupported -#void glGetClipPlanef(...) +#void glGetClipPlanef(GLenum pname, GLfloat * eqn) glGetClipPlanef - flag unsupported -#void glGetClipPlanex(...) -glGetClipPlanex - flag unsupported + dir eqn out + len eqn (4 * sizeof(GLfloat)) #void glVertexPointerData(GLint size, GLenum type, GLsizei stride, void *data, GLuint datalen) glVertexPointerData diff --git a/tools/emulator/opengl/system/GLESv1_enc/gl.in b/tools/emulator/opengl/system/GLESv1_enc/gl.in index 10187b024..a1186d425 100644 --- a/tools/emulator/opengl/system/GLESv1_enc/gl.in +++ b/tools/emulator/opengl/system/GLESv1_enc/gl.in @@ -7,7 +7,7 @@ GL_ENTRY(void, glDepthRangef, GLclampf zNear, GLclampf zFar) GL_ENTRY(void, glFogf, GLenum pname, GLfloat param) GL_ENTRY(void, glFogfv, GLenum pname, const GLfloat *params) GL_ENTRY(void, glFrustumf, GLfloat left, GLfloat right, GLfloat bottom, GLfloat top, GLfloat zNear, GLfloat zFar) -GL_ENTRY(void, glGetClipPlanef, GLenum pname, GLfloat eqn[4]) +GL_ENTRY(void, glGetClipPlanef, GLenum pname, GLfloat* eqn) GL_ENTRY(void, glGetFloatv, GLenum pname, GLfloat *params) GL_ENTRY(void, glGetLightfv, GLenum light, GLenum pname, GLfloat *params) GL_ENTRY(void, glGetMaterialfv, GLenum face, GLenum pname, GLfloat *params) @@ -48,7 +48,6 @@ GL_ENTRY(void, glClearColorx, GLclampx red, GLclampx green, GLclampx blue, GLcla GL_ENTRY(void, glClearDepthx, GLclampx depth) GL_ENTRY(void, glClearStencil, GLint s) GL_ENTRY(void, glClientActiveTexture, GLenum texture) -GL_ENTRY(void, glClipPlanex, GLenum plane, const GLfixed *equation) GL_ENTRY(void, glColor4ub, GLubyte red, GLubyte green, GLubyte blue, GLubyte alpha) GL_ENTRY(void, glColor4x, GLfixed red, GLfixed green, GLfixed blue, GLfixed alpha) GL_ENTRY(void, glColorMask, GLboolean red, GLboolean green, GLboolean blue, GLboolean alpha) @@ -77,7 +76,7 @@ GL_ENTRY(void, glFrontFace, GLenum mode) GL_ENTRY(void, glFrustumx, GLfixed left, GLfixed right, GLfixed bottom, GLfixed top, GLfixed zNear, GLfixed zFar) GL_ENTRY(void, glGetBooleanv, GLenum pname, GLboolean *params) GL_ENTRY(void, glGetBufferParameteriv, GLenum target, GLenum pname, GLint *params) -GL_ENTRY(void, glGetClipPlanex, GLenum pname, GLfixed eqn[4]) +GL_ENTRY(void, glClipPlanex, GLenum pname, GLfixed * eqn) GL_ENTRY(void, glGenBuffers, GLsizei n, GLuint *buffers) GL_ENTRY(void, glGenTextures, GLsizei n, GLuint *textures) GL_ENTRY(GLenum, glGetError, void) @@ -144,15 +143,6 @@ GL_ENTRY(void, glVertexPointer, GLint size, GLenum type, GLsizei stride, const G GL_ENTRY(void, glViewport, GLint x, GLint y, GLsizei width, GLsizei height) GL_ENTRY(void, glPointSizePointerOES, GLenum type, GLsizei stride, const GLvoid *pointer) -GL_ENTRY(void, glDrawTexsOES, GLshort x, GLshort y, GLshort z, GLshort width, GLshort height) -GL_ENTRY(void, glDrawTexiOES, GLint x, GLint y, GLint z, GLint width, GLint height) -GL_ENTRY(void, glDrawTexxOES, GLfixed x, GLfixed y, GLfixed z, GLfixed width, GLfixed height) -GL_ENTRY(void, glDrawTexsvOES, const GLshort *coords) -GL_ENTRY(void, glDrawTexivOES, const GLint *coords) -GL_ENTRY(void, glDrawTexxvOES, const GLfixed *coords) -GL_ENTRY(void, glDrawTexfOES, GLfloat x, GLfloat y, GLfloat z, GLfloat width, GLfloat height) -GL_ENTRY(void, glDrawTexfvOES, const GLfloat *coords) - GL_ENTRY(void, glVertexPointerOffset, GLint size, GLenum type, GLsizei stride, GLuint offset) GL_ENTRY(void, glColorPointerOffset, GLint size, GLenum type, GLsizei stride, GLuint offset) GL_ENTRY(void, glNormalPointerOffset, GLenum type, GLsizei stride, GLuint offset) @@ -168,3 +158,11 @@ GL_ENTRY(void, glPointSizePointerData, GLenum type, GLsizei stride, void * data GL_ENTRY(void, glDrawElementsOffset, GLenum mode, GLsizei count, GLenum type, GLuint offset) GL_ENTRY(void, glDrawElementsData, GLenum mode, GLsizei count, GLenum type, void *data, GLuint datalen) GL_ENTRY(void, glGetCompressedTextureFormats, int count, GLint *formats); +GL_ENTRY(void, glDrawTexsOES, GLshort x, GLshort y, GLshort z, GLshort width, GLshort height) +GL_ENTRY(void, glDrawTexiOES, GLint x, GLint y, GLint z, GLint width, GLint height) +GL_ENTRY(void, glDrawTexxOES, GLfixed x, GLfixed y, GLfixed z, GLfixed width, GLfixed height) +GL_ENTRY(void, glDrawTexsvOES, const GLshort *coords) +GL_ENTRY(void, glDrawTexivOES, const GLint *coords) +GL_ENTRY(void, glDrawTexxvOES, const GLfixed *coords) +GL_ENTRY(void, glDrawTexfOES, GLfloat x, GLfloat y, GLfloat z, GLfloat width, GLfloat height) +GL_ENTRY(void, glDrawTexfvOES, const GLfloat *coords) \ No newline at end of file diff --git a/tools/emulator/opengl/system/GLESv1_enc/gl.types b/tools/emulator/opengl/system/GLESv1_enc/gl.types index 89a95c14c..b269c0129 100644 --- a/tools/emulator/opengl/system/GLESv1_enc/gl.types +++ b/tools/emulator/opengl/system/GLESv1_enc/gl.types @@ -1,17 +1,33 @@ -GLbitfield 32 0x%08x -GLboolean 8 %d -GLclampf 32 %f -GLclampx 32 0x%08x -GLeglImageOES 32 0x%08x -GLenum 32 0x%08x -GLfixed 32 0x%08x -GLfloat 32 %f -GLint 32 %d -GLintptr 32 0x%08x -GLshort 16 %d -GLsizei 32 %d -GLsizeiptr 32 0x%08x -GLubyte 8 0x%02x -GLuint 32 %u -GLvoid 0 %x -GLchar 8 %d +GLbitfield 32 0x%08x false +GLboolean 8 %d false +GLclampf 32 %f false +GLclampx 32 0x%08x false +GLeglImageOES 32 %p false +GLenum 32 0x%08x false +GLfixed 32 0x%08x false +GLfloat 32 %f false +GLint 32 %d false +GLintptr 32 %p false +GLshort 16 %d false +GLsizei 32 %d false +GLsizeiptr 32 %p false +GLubyte 8 0x%02x false +GLuint 32 %u false +GLvoid 0 %x false +GLchar 8 %d false +GLenum* 32 0x%08x true +GLboolean* 32 0x%08x true +GLclampf* 32 0x%08x true +GLclampx* 32 0x%08x true +GLeglImageOES* 32 0x%08x true +GLfixed* 32 0x%08x true +GLfloat* 32 0x%08x true +GLint* 32 0x%08x true +GLshort* 32 0x%08x true +GLsizei* 32 0x%08x true +GLubyte* 32 0x%08x true +GLuint* 32 0x%08x true +GLvoid* 32 0x%08x true +GLchar* 32 0x%08x true +GLvoid** 32 0x%08x true +void* 32 0x%08x true diff --git a/tools/emulator/opengl/tests/ut_rendercontrol_enc/ut_rendercontrol.types b/tools/emulator/opengl/tests/ut_rendercontrol_enc/ut_rendercontrol.types index eb4dd1b05..9d945ab54 100644 --- a/tools/emulator/opengl/tests/ut_rendercontrol_enc/ut_rendercontrol.types +++ b/tools/emulator/opengl/tests/ut_rendercontrol_enc/ut_rendercontrol.types @@ -1,2 +1,2 @@ -uint32_t 32 0x%08x +uint32_t 32 0x%08x false