Commit Graph

39 Commits

Author SHA1 Message Date
Duane Sand
ecacc3f164 [MIPS] Fix mips32r1 build
Fix regression from 6701fbe5f0 .
The rdhwr instruction is unsupported by mips32r1 cpus, but is
supported via kernel emulation on those cpus.

Change-Id: Ieb3343fff0f0da54003044f451c90e1c761208eb
2015-02-02 16:54:15 -08:00
Nikola Veljkovic
5f5f65183c Use register numbers instead of register names
Avoid ambiguity by using register numbers. Register names are
interpreted depending on the ABI. Fixes the issue with mips64 gcc,
where registers t0-t4 are translated into $8-$11 (o32 ABI) instead
of $12-$15 (o64 ABI).

Also, use t9 ($25) for storing function address
(in getProcAddress.cpp).

Change-Id: I12ef5cd98bf14dab3c01f2756889cc02856c1cd8
2015-01-19 15:58:32 +01:00
Duane Sand
6701fbe5f0 [MIPS] Further opengl support for mips64 and mipsr6
Combines 4 patches by Dragoslav and Douglas:

Use t9 to hold the address of the called function.
Add support for gl binding.
Fix inline assembly code to be R6 compatible.
Fix some more inline assembly code to be R6 compatible.

Change-Id: I0b899813790b2ba4ca538bb21692014cc1933f66
2015-01-19 11:54:46 +01:00
Michal Wajdeczko
701048cbe8 EGL: make x86/64 wrappers resistant to -fno-omit-frame-pointer flag
Wrapper functions were broken on builds that forced -fno-omit-frame-pointer flag.

Change-Id: I5a80f9587fb3db821b4156af56acda59a0b4579b
Signed-off-by: Michal Wajdeczko <michal.wajdeczko@intel.com>
Signed-off-by: Yong Yao <yong.yao@intel.com>
2014-11-12 06:33:24 +00:00
Jesse Hall
83142a12fb am e2e17e5b: Merge "GlES2: Add NULL check"
* commit 'e2e17e5b238ccd214c72ec1a1864cf391425f09f':
  GlES2: Add NULL check
2014-08-06 17:22:52 +00:00
Anshuman Dani
0627071cc9 GlES2: Add NULL check
Check for NULL before calling thread specific glGetString.

CRs-fixed: 569609

Change-Id: Ifee8257152ba7ca7a05df5d7b113171b71d16c82
2014-08-06 21:53:35 +05:30
Jesse Hall
0d7271527f am 17cbadf0: am 6fa169fa: Merge "Add aarch64 EGL/GLES trampolines"
* commit '17cbadf0f598b0d02179262ad5b6b270850ccb94':
  Add aarch64 EGL/GLES trampolines
2014-06-07 00:19:53 +00:00
Jesse Hall
30a41aa1cc Add aarch64 EGL/GLES trampolines
Change-Id: Ia90e18d26ff3bdb7e643aff8d77cbaddd2ac2a03
2014-06-06 16:31:53 -07:00
Jesse Hall
c2774f9b73 am 92374318: am 618c78c0: am dc273621: Merge "EGL: add x86/64 assembly code for EGL/GLES wrappers"
* commit '92374318b82945f3d03461f3d0c659adb8409fc5':
  EGL: add x86/64 assembly code for EGL/GLES wrappers
2014-05-27 23:35:10 +00:00
mwajdecz
c80aafa61d EGL: add x86/64 assembly code for EGL/GLES wrappers
There was no explicit support for x86/64 architecture in EGL/GLES wrappers.
This resulted either in failures or sub-optimal implementation of the wrapper functions.

Change-Id: I20d99d7372fbf642ee4b94a05c8cb971cba29988
Signed-off-by: Wajdeczko, Michal <michal.wajdeczko@intel.com>
2014-05-27 09:26:21 -07:00
Jesse Hall
fca1b54031 opengl: Regenerate code with ES 3.1 and new extensions
Enable ES 3.1 generation in glgen.py, and regenerate everything to add
support for that as well as these new extensions in the registry:
- EXT_copy_image
- EXT_draw_buffers_indexed
- EXT_geometry_shader
- EXT_gpu_shader5
- EXT_primitive_bounding_box
- EXT_shader_implicit_conversions
- EXT_shader_io_blocks
- EXT_tessellation_shader
- EXT_texture_border_clamp
- EXT_texture_buffer
- EXT_texture_cube_map_array
- EXT_texture_view

Bug: 15028495
Change-Id: I3f45a7ef5367c70e54ce6b36a8c030ae11033434
2014-05-21 15:32:23 -07:00
Jesse Hall
fe3b15a5b0 Revert "opengl: Regenerate code with ES 3.1 and new extensions"
This reverts commit 6cb7d3dc9f.

Change-Id: I2eb7fd721dda9c14a0bfcef1b1c9d9843bbec94b
2014-05-20 21:27:17 +00:00
Jesse Hall
6cb7d3dc9f opengl: Regenerate code with ES 3.1 and new extensions
Enable ES 3.1 generation in glgen.py, and regenerate everything to add
support for that as well as these new extensions in the registry:
- EXT_copy_image
- EXT_draw_buffers_indexed
- EXT_geometry_shader
- EXT_gpu_shader5
- EXT_primitive_bounding_box
- EXT_shader_implicit_conversions
- EXT_shader_io_blocks
- EXT_tessellation_shader
- EXT_texture_border_clamp
- EXT_texture_buffer
- EXT_texture_cube_map_array
- EXT_texture_view

Bug: 15028495
Change-Id: I35acb473cba2433b9aeb95d1b8bfbdcfadf22532
2014-05-19 12:54:05 -07:00
Jesse Hall
bbbddb83bb Disable warnings when generating GL wrappers
Bug: 15028495
Change-Id: Ic0c974e868d05632a06748c90cedbdd409ce2aa8
2014-05-17 19:32:10 -07:00
Jesse Hall
4c0596f4cc Rationalize GLES2/3 .in files.
We weren't using gl2_api.in, since gl3_api.in was a superset. And
gl3ext_api.in was empty, and Khronos has decided to keep it that way
(any GLES2/3/... extensions will be in gl2ext.h).

Since libGLES2.so will have all future backwards-compatible GLES APIs,
it makes sense to just use gl2_api.in and gl2ext_api.in to build its
contents. This changes renames gl3_api.in to gl2_api.in and updates
uses of it, and removes gl3ext_api.in and references.

Bug: 15028495
Change-Id: I0745eda27ec91ee625f03e957e4fdb22035dd781
2014-05-17 19:31:48 -07:00
Mathias Agopian
e0ea89ceef improve GLES jumptables
in the common case this saves one instructions per jump
(which will help with the i-cache).

this change also gets rid of the "use slow tls" option,
which was useless. So at least now architectures that don't have
assembly bindings will perform much better.

Change-Id: I31be6c06ad2136b50ef3a1ac14682d7812ad40d2
2013-07-01 15:52:47 -07:00
Mathias Agopian
39c24a20bb fix local include paths
Change-Id: Icb921fa796ec08612dbb2feb7e7161bcb0cf4a99
2013-04-04 23:30:18 -07:00
Jesse Hall
441f69463e Fix MIPS assembly variable names to not conflict with GL API parameter names
Change-Id: I8e93fb55018de53a596cb176d48dbfdf1fd396e4
2013-03-30 23:22:19 -07:00
Keun-young Park
ea116f1acb am 111d920b: am d3b2c029: Merge "[MIPS] Add MIPS architecture support to opengl framework"
* commit '111d920bb588669006bdd8699e786d6305f14c36':
  [MIPS] Add MIPS architecture support to opengl framework
2013-03-28 23:09:44 -07:00
Duane Sand
46b4253b76 [MIPS] Add MIPS architecture support to opengl framework
Change-Id: Id7704d35bed14d96a85dc1f29db0566cd03872b5
2013-03-28 12:09:36 -07:00
Jesse Hall
f5c7cb316c Merge changes Ic344ef63,If9bb02be,Ic8f94634
* changes:
  Symlink /system/lib/libGLESv3.so -> libGLESv2.so
  Add ES3 support to libGLESv2 and tracing tools
  Import OpenGL ES 3.0 headers from Khronos SVN
2013-02-24 00:18:56 +00:00
Elliott Hughes
288870ebc3 Simplify OpenGL TLS access on ARM.
bionic now assumes the TLS register is available, so OpenGL can too.

Change-Id: If2b56a4c08de9f887759b78f70022026a181dc47
2013-02-13 17:30:54 -08:00
Jesse Hall
4774338bd0 Add ES3 support to libGLESv2 and tracing tools
Since ES3 is backwards compatible with ES2, a new wrapper isn't
necessary, and the Khronos implementation guidelines recommend
supporting both versions with the same library.

Change-Id: If9bb02be60ce01cc5fe25d1f40c4e7f37244ebf6
2013-02-12 16:36:53 -08:00
Romain Guy
16928bfeca Add runtime debugging capabilities to OpenGL
The shell property debug.egl.trace can now be set to:

0
  disables tracing
1
  logs all GL calls
error
  checks glGetError after every GL call, logs a stack trace on error
systrace
  logs each GL call to systrace

Change-Id: I34a2a2d4e19c373fd9eaa1b0cd93e67c87378996
2012-10-18 16:16:10 -07:00
Chet Haase
8d5d201980 Revert "Add GL Error logs (temporary)"
This reverts commit 2da2c15068.
2012-10-10 13:10:40 -07:00
Chet Haase
2da2c15068 Add GL Error logs (temporary)
Adding logs to tell which specific methods throw OpenGL errors.

Change-Id: I1d73c7566ed1ea6610392020411762c6255a0ede
2012-10-04 17:15:59 -07:00
Chet Haase
e8b0fac720 Re-enable FAST_TLS in gl2 code
Temporarily changed USE_FAST_TLS_KEY ifdef during debugging. Changing it
back now.

Change-Id: I7c2fcf7265b3d545e31ff7683bd7614100fad3e5
2012-09-28 11:56:48 -07:00
Romain Guy
f12fe43e8c New compile-time flags to make debugging easier for us poor souls
Bug #7195815

Change-Id: I23e7ac991891b9586cb8ed20b1305c8b1b3e2b43
2012-09-27 15:47:10 -07:00
Jesse Hall
7e5099a9ec Add compile-time option to systrace GL-ES calls
Change-Id: Ibec103bbf159626ad9745d0e071192ad424bc0e9
2012-08-13 12:13:05 -07:00
Mathias Agopian
7c0441ac27 Don't wrap EGLImageKHR and EGLSyncKHR anymore
this simplify our EGL wrapper implementation a lot.
This wrapping is no longer needed now that we can only
support a single underlaying EGL implementation.

Change-Id: I8213df7ac69daac447f1fe6e37044b78aac4e9a9
2012-02-14 17:14:36 -08:00
Mathias Agopian
48d438d05f add support for GL_EXT_debug_marker
This extension is always added to the GL_EXTENSIONS
extension string for the current GL context, regardless
of if it's supported by the h/w driver.

The extension itself will be handled by GLES_trace (eventually),
when GLES_trace is not enabled, it'll result to a no-op.

If the h/w implementation has this extension, we'll call that version
instead of our dummy version.

Change-Id: Ie5dd3387c4d45cd5ed5f03b73bda6045620a96bc
2012-01-29 22:22:09 -08:00
Steve Block
9d45368352 Rename (IF_)LOGD(_IF) to (IF_)ALOGD(_IF) DO NOT MERGE
See https://android-git.corp.google.com/g/156016

Bug: 5449033
Change-Id: I4c4e33bb9df3e39e11cd985e193e6fbab4635298
2012-01-03 22:38:27 +00:00
Mathias Agopian
30faafb7d3 am 4eb1ad5e: am 524a6d8e: Merge "better fix for [3028370] GL get error should return a valid error if no context is bound." into gingerbread
Merge commit '4eb1ad5e98c7b36f7ac4ec8c3270f9763afd107e'

* commit '4eb1ad5e98c7b36f7ac4ec8c3270f9763afd107e':
  better fix for [3028370] GL get error should return a valid error if no context is bound.
2010-09-23 21:41:30 -07:00
Mathias Agopian
6f0871222f better fix for [3028370] GL get error should return a valid error if no context is bound.
it turns out that we cannot return INVALID_OPERATION from glGetError() because the
GL spec says that it must be called in a loop until it returns GL_NO_ERROR.

now, we always return 0 from GL functions called from a thread with no
context bound. This means that glGetError() will return NO_ERROR in this case,
which is better than returning a random value (which could trap the app in a loop).

if this happens in the main thread of a process, we LOG an error message once.

Change-Id: Id59620e675a890286ef62a257c02b06e0fdcaf69
2010-09-23 16:44:48 -07:00
Romain Guy
761eaed2ff Fix tons of bugs and add new text rendering support.
Change-Id: I326c66b10784006f6df2f12d38e120cef94cd0d7
2010-08-10 12:22:01 -07:00
Mathias Agopian
8fb47ec10e Fix Android's glEGLImageTargetRenderbufferOES() wrapper
glEGLImageTargetRenderbufferOES() pass the wrapped EGLImage
to the implementation, rather than the unwrapped one.

Change-Id: I149f9ed73e6ab9089110600e1db4311ba7a8c83a
2010-03-29 15:12:19 -07:00
Mathias Agopian
673d2dbaae Use the TLS register if HAVE_ARM_TLS_REGISTER is defined
this will be needed for SMP, but would improve dispatching GL calls a bit
on armv6 and above.
2009-10-19 16:13:46 -07:00
Mathias Agopian
618fa10949 fix [2187212] add support for GLESv2 dispatch based on TLS
Instead of using a different function pointer table for ES 1.x and ES 2.x,
we use a single one that is the union (sort|uniq) of both tables. Two
instances of this table are initialized with pointers to GL ES 1.x and GL ES 2.x
entry-points.
When a context is created, we store its version number and when it is bound to a
thread we set the approruiate table based on the stored version.

This introduce no penalty while dispatching gl calls to the right API version.

[Pending Dr No approval for MR1]
2009-10-14 02:06:37 -07:00
Mathias Agopian
b1a39d67be Added most of the support needed for GLES 2.x 2009-05-27 20:38:06 -07:00