aboutsummaryrefslogtreecommitdiffstats
path: root/emulator
diff options
context:
space:
mode:
authorDavid 'Digit' Turner <digit@google.com>2014-09-13 03:18:26 +0200
committerDavid 'Digit' Turner <digit@google.com>2014-09-13 03:18:26 +0200
commita9937510fd549108ef9533b61533b540c9274052 (patch)
tree2f063e624598bf6adaf6c8ba36484931e2e4dfcf /emulator
parent60f24c2c943cdcbc12f20c4019650536991a8f04 (diff)
downloadsdk-a9937510fd549108ef9533b61533b540c9274052.zip
sdk-a9937510fd549108ef9533b61533b540c9274052.tar.gz
sdk-a9937510fd549108ef9533b61533b540c9274052.tar.bz2
emulator/opengl/emugl: Remove ispointer field from types definitions.
Change-Id: If8f42a739dce6d1ac4d737ee50c7d2d569004153
Diffstat (limited to 'emulator')
-rw-r--r--emulator/opengl/host/libs/GLESv1_dec/gl.types66
-rw-r--r--emulator/opengl/host/libs/GLESv2_dec/gl2.types73
-rw-r--r--emulator/opengl/host/libs/renderControl_dec/renderControl.types22
-rw-r--r--emulator/opengl/host/tools/emugen/TypeFactory.cpp35
4 files changed, 101 insertions, 95 deletions
diff --git a/emulator/opengl/host/libs/GLESv1_dec/gl.types b/emulator/opengl/host/libs/GLESv1_dec/gl.types
index b269c01..2bc2a9e 100644
--- a/emulator/opengl/host/libs/GLESv1_dec/gl.types
+++ b/emulator/opengl/host/libs/GLESv1_dec/gl.types
@@ -1,33 +1,33 @@
-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
+GLbitfield 32 0x%08x
+GLboolean 8 %d
+GLclampf 32 %f
+GLclampx 32 0x%08x
+GLeglImageOES 32 %p
+GLenum 32 0x%08x
+GLfixed 32 0x%08x
+GLfloat 32 %f
+GLint 32 %d
+GLintptr 32 %p
+GLshort 16 %d
+GLsizei 32 %d
+GLsizeiptr 32 %p
+GLubyte 8 0x%02x
+GLuint 32 %u
+GLvoid 0 %x
+GLchar 8 %d
+GLenum* 32 0x%08x
+GLboolean* 32 0x%08x
+GLclampf* 32 0x%08x
+GLclampx* 32 0x%08x
+GLeglImageOES* 32 0x%08x
+GLfixed* 32 0x%08x
+GLfloat* 32 0x%08x
+GLint* 32 0x%08x
+GLshort* 32 0x%08x
+GLsizei* 32 0x%08x
+GLubyte* 32 0x%08x
+GLuint* 32 0x%08x
+GLvoid* 32 0x%08x
+GLchar* 32 0x%08x
+GLvoid** 32 0x%08x
+void* 32 0x%08x
diff --git a/emulator/opengl/host/libs/GLESv2_dec/gl2.types b/emulator/opengl/host/libs/GLESv2_dec/gl2.types
index 4cee99e..ab4eae3 100644
--- a/emulator/opengl/host/libs/GLESv2_dec/gl2.types
+++ b/emulator/opengl/host/libs/GLESv2_dec/gl2.types
@@ -1,37 +1,36 @@
-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
-GLchar** 32 0x%08x true
-GLvoid** 32 0x%08x true
-void* 32 0x%08x true
-GLstr 32 %s true
-GLstr* 32 0x%08x true
-GLvoidptr* 32 0x%08x true \ No newline at end of file
+GLbitfield 32 0x%08x
+GLboolean 8 %d
+GLclampf 32 %f
+GLclampx 32 0x%08x
+GLeglImageOES 32 %p
+GLenum 32 0x%08x
+GLfixed 32 0x%08x
+GLfloat 32 %f
+GLint 32 %d
+GLintptr 32 %p
+GLshort 16 %d
+GLsizei 32 %d
+GLsizeiptr 32 %p
+GLubyte 8 0x%02x
+GLuint 32 %u
+GLvoid 0 %x
+GLchar 8 %d
+GLenum* 32 0x%08x
+GLboolean* 32 0x%08x
+GLclampf* 32 0x%08x
+GLclampx* 32 0x%08x
+GLeglImageOES* 32 0x%08x
+GLfixed* 32 0x%08x
+GLfloat* 32 0x%08x
+GLint* 32 0x%08x
+GLshort* 32 0x%08x
+GLsizei* 32 0x%08x
+GLubyte* 32 0x%08x
+GLuint* 32 0x%08x
+GLvoid* 32 0x%08x
+GLchar* 32 0x%08x
+GLchar** 32 0x%08x
+GLvoid** 32 0x%08x
+void* 32 0x%08x
+GLstr* 32 0x%08x
+GLvoidptr* 32 0x%08x
diff --git a/emulator/opengl/host/libs/renderControl_dec/renderControl.types b/emulator/opengl/host/libs/renderControl_dec/renderControl.types
index a7d96ab..2b38470 100644
--- a/emulator/opengl/host/libs/renderControl_dec/renderControl.types
+++ b/emulator/opengl/host/libs/renderControl_dec/renderControl.types
@@ -1,11 +1,11 @@
-uint32_t 32 0x%08x false
-EGLint 32 0x%08x false
-GLint 32 0x%08x false
-GLuint 32 0x%08x false
-GLenum 32 0x%08x false
-EGLenum 32 0x%08x false
-uint32_t* 32 0x%08x true
-EGLint* 32 0x%08x true
-GLint* 32 0x%08x true
-GLuint* 32 0x%08x true
-void* 32 0x%08x true
+uint32_t 32 0x%08x
+EGLint 32 0x%08x
+GLint 32 0x%08x
+GLuint 32 0x%08x
+GLenum 32 0x%08x
+EGLenum 32 0x%08x
+uint32_t* 32 0x%08x
+EGLint* 32 0x%08x
+GLint* 32 0x%08x
+GLuint* 32 0x%08x
+void* 32 0x%08x
diff --git a/emulator/opengl/host/tools/emugen/TypeFactory.cpp b/emulator/opengl/host/tools/emugen/TypeFactory.cpp
index 357d6b3..7f495ca 100644
--- a/emulator/opengl/host/tools/emugen/TypeFactory.cpp
+++ b/emulator/opengl/host/tools/emugen/TypeFactory.cpp
@@ -85,23 +85,30 @@ int TypeFactory::initFromFile(const std::string &filename)
return -2;
}
+ // The ispointer definition is optional since we can just
+ // look at the type name, and determine it is a pointer if
+ // it ends with '*'.
+ bool isPointer = (name[name.size() - 1U] == '*');
+
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;
+ if (pointerDef.size() != 0) {
+ // Just a little sanity check.
+ if (std::string("true")==pointerDef) {
+ if (!isPointer) {
+ fprintf(stderr, "Error: %d: invalid isPointer definition: 'true' but name does not end with '*'!\n", lc);
+ return -2;
+ }
+ } else if (std::string("false")==pointerDef) {
+ if (isPointer) {
+ fprintf(stderr, "Error: %d: invalid isPointer definition: 'false' but name does end with '*'!\n", lc);
+ return -2;
+ }
+ } else {
+ fprintf(stderr, "Error: %d : invalid isPointer definition, must be either \"true\" or \"false\"\n", lc);
+ return -2;
+ }
}
size_t bitSize = atoi(size.c_str());