summaryrefslogtreecommitdiffstats
path: root/opengl/tools/glgen
Commit message (Collapse)AuthorAgeFilesLines
* Replace JNI primitive array critical calls with non-critical ones.Hiroshi Yamauchi2015-05-1215-161/+395
| | | | | | | The glgen part. Bug: 19235243 Change-Id: I69dfa84f15366808b964517c1ba270ddeb3c5940
* Fix pointer-to-int and int-to-pointer warnings.Dan Albert2015-02-233-3/+8
| | | | Change-Id: If534cbcf2c3e644270572cbf829ba9b5acab29e6
* Merge "Avoid overwriting EGL14.EGL_NO_SURFACE"Jesse Hall2014-12-021-10/+6
|\
| * Avoid overwriting EGL14.EGL_NO_SURFACESangkyu Lee2014-11-251-10/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Both EGL14 and EGLExt have the same initialization codes for EGL14.EGL_NO_SURFACE, EGL14.EGL_NO_CONTEXT and EGL14.EGL_NO_DISPLAY. Since EGLExt is initialized later, they are overwritten by EGLExt's initialization codes. Therefore, EGL_NO_SURFACE returned by methods in EGL14 is not actually EGL14.EGL_NO_SURFACE object and it makes several problems in handling error cases. For instance, "Let's fish" game application cannot be run on L. To solve the problem, this patch makes EGL14.EGL_NO_SURFACE, EGL14.EGL_NO_CONTEXT and EGL14.EGL_NO_DISPLAY initialized just once. Change-Id: Icce878164ff0b715ad2b5a2cd038a9616c7cf1e9
* | Frameworks/native: Add pragmas to glgen headersAndreas Gampe2014-11-1213-2/+46
|/ | | | | | | | | | | | The code currently being generated by glgen is not the cleanest, but we would like to get core/jni onto -Werror. Thus add pragmas turning off warnings locally to the C headers. Also fix signed-comparison in two functions. Longer term TODO: Emit clean code. Change-Id: Iee8582f8c0c1de076d64851d3b6ca467afd5bc43
* opengl: Fix include style in generated JNI codeJesse Hall2014-05-201-2/+2
| | | | | Bug: 15028495 Change-Id: Ie38d398751a374f11bef8944a2aa0f8311934911
* opengl: Un-hide GLES31 and GLES31Ext classesJesse Hall2014-05-202-2/+0
| | | | | Bug: 15028495 Change-Id: Iaac1e8d2ad5ea840d728a78804e2566be18a4340
* opengl: Add GLES31 and GLES31Ext class templatesJesse Hall2014-05-2050-3/+942
| | | | | Bug: 15028495 Change-Id: I276d04f029d441e092428fad72f09ca15e1d233a
* opengl: Fix whitespace in Java templatesJesse Hall2014-05-187-11/+11
| | | | | | | | Someone fixed these in the generated code, so re-generating even with no other changes caused diffs. Better to just fix it at the source. Bug: 15028495 Change-Id: I248f9796d4e3d904c4c0dc15be5f8de231df7285
* Fix bad link tag in javadoc.Narayan Kamath2014-02-281-1/+1
| | | | | | | Java7 javadoc tools seem to accept this without complaint but not all targets use java7 yet. Change-Id: Ib08be8ad0f7db2e89f38b764cce858d0e7eecd2e
* API changes for 64 bit platforms.Narayan Kamath2014-02-271-15/+14
| | | | | | | | | EGLObjectHandle.<init>(int) and int EGLObjectHandle.getHandle() have now been deprecated and replaced with variants that take and return java longs. bug: 13181704 Change-Id: Ie88e591c288d6de5655364b4cd673f61cce68d7d
* am 3e599252: am 93e6a48b: Merge "AArch64: Make eglGetDisplay(int) work for ↵Narayan Kamath2014-02-272-3/+2
|\ | | | | | | | | | | | | EGL_DEFAULT_DISPLAY" * commit '3e599252c0f5a8e70f4b8d4ab5baffb7e5b0b0e1': AArch64: Make eglGetDisplay(int) work for EGL_DEFAULT_DISPLAY
| * AArch64: Make eglGetDisplay(int) work for EGL_DEFAULT_DISPLAYAshok Bhat2014-02-262-3/+2
| | | | | | | | | | | | | | | | | | This will allow eglGetDisplay(int) to work on both 32-bit and 64-bit systems when EGL_DEFAULT_DISPLAY is passed as a parameter. Change-Id: I0d7e9ca5410b0dd893eacc02aac40956908e4f25 Signed-off-by: Ashok Bhat <ashok.bhat@arm.com>
* | am aa01ad91: am aaa27fd5: Merge "Use reinterpret_cast when an integer is ↵Narayan Kamath2014-02-256-6/+8
|\ \ | |/ | | | | | | | | | | cast to a pointer" * commit 'aa01ad91cd22304fd15810f241c67ebb59e90c04': Use reinterpret_cast when an integer is cast to a pointer
| * Merge "Use reinterpret_cast when an integer is cast to a pointer"Narayan Kamath2014-02-256-6/+8
| |\
| | * Use reinterpret_cast when an integer is cast to a pointerAshok Bhat2014-02-246-6/+8
| | | | | | | | | | | | | | | Change-Id: I5adcd59f58c029f7b2b596f4826d8ea69fb9bba6 Signed-off-by: Ashok Bhat <ashok.bhat@arm.com>
* | | am 097b5991: am e5c99bf3: Merge "Use long for pointers in opengl/EGL classes"Narayan Kamath2014-02-2514-40/+203
|\ \ \ | |/ / | | | | | | | | | * commit '097b59919f01d7b057d252d23cb96ce5fcdd9469': Use long for pointers in opengl/EGL classes
| * | Use long for pointers in opengl/EGL classesAshok Bhat2014-02-2414-40/+203
| |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | EGL classes in frameworks/base have to be updated to support 64-bit platforms. Key changes in the EGL classes include [x] EGLObjectHandle class - EGLObjectHandle class has two public methods (constructor and getHandle) that assume handles are 32-bit. They have not been changed. Instead, two new hidden methods (EGLObjectHandle(long) and getNativeHandle) have been added. [x] EG14 class - Two public methods eglGetDisplay and eglCreatePbufferFromClientBuffer assume that handles are 32-bit. They have been changed to throw unsupported operation exception on non 32-bit machines. Two new methods eglGetDisplay(long) and eglCreatePbufferFromClientBuffer(...long buffer..) have been added to support 64-bit handles. To allow the above changes in frameworks/base EGL classes, corresponding code generation mechanism in frameworks/native has been updated. Change-Id: I5d0a62e10c20ccf05f610d6608b8dfb6414b5116 Signed-off-by: Ashok Bhat <ashok.bhat@arm.com>
| * Merge "Update EGL codegen to be in sync with frameworks/base"Narayan Kamath2014-02-211-1/+1
| |\
| | * Update EGL codegen to be in sync with frameworks/baseAshok Bhat2014-02-201-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Patch from Takeshi Aimi with commit-id f9337377 changed core/jni/android_opengl_EGL14.cpp in the frameworks/base. However the corresponding code snippet in frameworks/ native was not updated. This patch addresses the issue. Change-Id: I40bcc43d36d7ab4e0db4a73556a4f7480c7431c1 Signed-off-by: Ashok Bhat <ashok.bhat@arm.com>
| * | Update GLES codegen to be in sync with frameworks/baseAshok Bhat2014-02-201-1/+1
| |/ | | | | | | | | | | | | | | | | | | | | Patch from synergydev with commit-id 01994c79 changed core/jni/com_google_android_gles_jni_GLImpl.cpp in the frameworks/base. However the corresponding code snippet in frameworks/native was not updated. This patch addresses the issue. Change-Id: I89c3d88de832efc8cbbe682c8a7ff7dfbef99db3 Signed-off-by: Ashok Bhat <ashok.bhat@arm.com>
* | Hide three malformed GL bindingsAndy McFadden2014-02-195-2/+5
|/ | | | | | | | | | | | They were replaced with correct bindings a while back, but the broken methods weren't hidden. Also, pick up two changes that were made to the generated code rather than the source. Bug 6006380 Change-Id: Ibfe9a5f2e13e745f8d82116d1b4d8c2d025ac830
* am d9be16f9: Merge "Fix OpenGL stub exception handling."Elliott Hughes2013-09-271-0/+1
|\ | | | | | | | | * commit 'd9be16f920f7c2581fda3ca495c1e6fc88857a6c': Fix OpenGL stub exception handling.
| * Fix OpenGL stub exception handling.Elliott Hughes2013-09-241-0/+1
| | | | | | | | | | Bug: https://code.google.com/p/android/issues/detail?id=60390 Change-Id: I2bdc22c5fe75f5e41ffb9dd9259ae92cf8a12917
* | All consumers now take an IGraphicBufferConsumer instead of a BufferQueueMathias Agopian2013-08-061-4/+4
| | | | | | | | | | | | | | | | | | | | this means they only have access to the consumer end of the interface. we had a lot of code that assumed consumers where holding a BufferQueue (i.e.: both ends), so most of this change is untangling in fix that Bug: 9265647 Change-Id: Ic2e2596ee14c7535f51bf26d9a897a0fc036d22c
* | Fix wrapper equals()Andy McFadden2013-06-215-10/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | Make it faster and correcter. Also, fixed the "gen" script to update the static/egl/*.java files as part of doing an update. Altered the "git" lines to change directories before invoking git -- necessary because we're now split between frameworks/base and frameworks/native. Bug 9204146 Change-Id: Ie60504b1932349e6f2c9d3868dee6a645ef2b36e
* | am 958ef3d7: am c8639351: Generate new EGLExt classJesse Hall2013-05-028-24/+195
|\ \ | |/ | | | | | | * commit '958ef3d79c48ddef3afa5327f7ed15a5ecfd2d1d': Generate new EGLExt class
| * Generate new EGLExt classJesse Hall2013-05-028-24/+195
| | | | | | | | | | | | | | | | Initially populated with EGL_ANDROID_presentation_time (moved from the EGL14 class) and the ES-relevant parts of EGL_KHR_create_context. Bug: 8678160 Change-Id: Ifed2ee3da264ca701ae1f4b309a0758f7fcc3acc
* | am 34c0fb18: am cc8f8ad3: Merge "Fix glGetUniformIndices JNI prototype" into ↵Jesse Hall2013-04-301-1/+1
|\ \ | |/ | | | | | | | | | | jb-mr2-dev * commit '34c0fb183767b80e93a7cd77233ead5fe50bd822': Fix glGetUniformIndices JNI prototype
| * Fix glGetUniformIndices JNI prototypeJesse Hall2013-04-291-1/+1
| | | | | | | | | | Bug: 8657863 Change-Id: I130d1b54d0cbd1f8613d3108482526d05d73d9e4
* | Fix range checkAndy McFadden2013-04-251-0/+1
|/ | | | | | | | | | | The getarray() function checks to see if there's enough room in the buffer, but it's using a byte count for the available size and a possibly non-byte count for the space required. Dividing down by the unit size corrects the problem. Bug 8713753 Change-Id: Id42c0df65c3233dcc5f76d05e229f7d40d4c1f99
* Subclass GLES30 from GLES20, @Deprecate GL_STENCIL_INDEXJesse Hall2013-04-155-466/+9
| | | | | Bug: 8566953 Change-Id: I66085c300a8658a4018796645257edb73be94719
* Special-case glGetActiveUniformBlockNameJesse Hall2013-04-104-1/+159
| | | | | Bug: 8566953 Change-Id: Ic9b3be9fa0136495633ee3b1c38583cfa315942a
* Special-case glGetStringiJesse Hall2013-04-104-1/+17
| | | | | | | Modeled on the existing glGetString special-case. Bug: 8566953 Change-Id: Icc6b23ab53b00510368900ad99c92028253dc797
* Special-case glMapBufferRangeJesse Hall2013-04-104-1/+24
| | | | | | | | | Updating the generator to handle GLvoid*/java.nio.Buffer return values probably wouldn't be too hard, but this is the only function that needs it currently. Bug: 8566953 Change-Id: I359a951136ab479ab576ce2e5a2881b937b7e8c9
* Special-case glGetBufferPointervJesse Hall2013-04-104-1/+20
| | | | | Bug: 8566953 Change-Id: I11a7394eb46f229fd3ae716e77487a45bac6ed53
* Special-case glGetUniformIndicesJesse Hall2013-04-104-1/+174
| | | | | Bug: 8566953 Change-Id: Ic8bcd03e8d41a81f48d603f67ce2046a4afa1561
* Special-case glGetTransformFeedbackVaryingJesse Hall2013-04-104-1/+381
| | | | | | | | Just a search-and-replace on the glGetActiveAttrib special-case, since they have the same signature and parameter handling. Bug: 8566953 Change-Id: I40834d6f32bf9ecb39718df29036aa2d1bbfa07a
* Special-case glTransformFeedbackVaryingsJesse Hall2013-04-104-1/+59
| | | | | Bug: 8566953 Change-Id: I02a1548aebc12bd3599903029bfd2e4ccea53211
* Add buffer object versions of several functionsJesse Hall2013-04-106-7/+95
| | | | | | | | | | | Some of these are new ES3 functions, some are existing ES2 functions that can now use the new pixel pack/unpack buffer bindings. glDrawElementsInstanced needs a special case since the pointer/offset arg isn't the last one like the generator assumes. Bug: 8566953 Change-Id: I638a36b0a31aefcb5bfee6f4d049348223045103
* Add *int64 and GLsync types and related functionsJesse Hall2013-04-103-10/+16
| | | | | | | | | | Return values are declared with the C return type, but the JNI function returns the JNI return type. In the case of GLsync/jlong as in glFenceSync(), this causes a compile error. So the generator now explicitly casts the return value to the JNI return type. Bug: 8566953 Change-Id: I814befe2e4cce745434cbc4e1c8639fc3ce8aeae
* Add ES3 functions and constants, difficult ones commented outJesse Hall2013-04-103-31/+453
| | | | | | | | | | | | | | | This change adds ES3 functions to GLES30.spec, disabling any that require non-trivial changes for the generator to handle. Steps taken to add these: - Copy ES3 function declarations from gl3.h - Remove GL_APICALL, GL_APIENTRY, and semicolon from each declaration - Add whitespace around parens and *s as required by the parser - Comment out functions that the generator doesn't understand or that it generates bad Java interfaces for (by inspection). Bug: 8566953 Change-Id: Iaaef7d53e24f9a576759dbba72cd206bae1c1276
* Support "const GLChar*" and "const GLenum*" typesJesse Hall2013-04-102-1/+6
| | | | | Bug: 8566953 Change-Id: I349575e592e8b0d93d14237230b69bec4e04cf3e
* Minor changes to ES3 functions inherited from ES2Jesse Hall2013-04-101-5/+5
| | | | | | | | | With the addition of float framebuffer support in ES3, some parameters to ES2 functions are now GLfloat instead of GLclampf. Both are typedefs for 'float', so this is a source and binary compatible change. Bug: 8566953 Change-Id: I0b5acc78da7799a04053fdb568205f793792cad9
* Generate GLES30 class, just a clone of GLES20 for nowJesse Hall2013-04-105-3/+501
| | | | | Bug: 8566953 Change-Id: I6fad880344b9c247de4018711ea7cb6eb1a609d6
* Make gen more readable, use UNIX-style line endingsJesse Hall2013-04-102-146/+162
| | | | Change-Id: I6f4a1afa19f84d89278e9447f14a124476106fef
* Add eglPresentationTimeANDROIDAndy McFadden2013-03-053-1/+3
| | | | | | | | | | Added EGL extension to set a timestamp on a surface. Also, fix JNI encoding of "long" in glgen. Bug 8191230 Change-Id: I38b7334bade3f8ff02bffe600bb74469ef22c164
* add some missing parameter validation in GLES java bindingsMathias Agopian2013-02-2529-595/+508
| | | | | | | | | | | | | | | | | - added support for comments in checks.spec - added most missing checks - added and commented with // special-cased functions - added and commented with # functions that are still missing validation checks - moved glGet* to a special case and updated all the "pnames" from the khronos spec - changed ifcheck to default to 1 value. this allows us to simplify the checks.spec file and handle unknown pnames automatically (they'll be validated against 1 value, if it happens to need more, the call will go through but the validation will not happen). - refactored the cpp headers in to a common header + GLES version specific header Bug: 7402895 Change-Id: Ib5c68ca0ca416407b4cfa36e3a21901b2d6263ab
* sort the check file in alphabetical orderMathias Agopian2013-02-221-20/+19
| | | | | | this simplifies a lot comparing it to the spec files. Change-Id: I4b9b5e7469338a626100472d360ea26a902017bc
* update glgen to take into account recent changesMathias Agopian2013-02-224-6/+9
| | | | | | | | | | | - it looks like UserId has been renamed to UserHandle in the framework. - also for some reason I don't understand glgen didn't seem to be up to date with respect to the generated bindings in the tree. It's like the bindings were generated with a more recent version of glgen (maybe it was never checked in). So we fix that here. Change-Id: Ie49522ebf67fcab9213246b4d93500e37a3cbc05