| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
| |
Fixed a few error codes to be more accurate
Change-Id: Ifad6bf51c399215a9110bd40cfd380309ac6422c
|
| |
|
|
|
|
|
| |
The mask should only be a combination of GL_DEPTH_BUFFER_BIT,
GL_COLOR_BUFFER_BIT, and GL_STENCIL_BUFFER_BIT
Change-Id: Ic448bd33a9bf0dc50db4298a53e96dd128fd110c
|
| |
|
|
|
|
|
|
| |
check and return proper error codes when negative
width, height or size or wrong internal texture
format is passed in.
Change-Id: Ic4ddea55042d8e21f8729a7ca675a44a232b7c7c
|
| |
|
|
|
|
|
| |
Only GL_STREAM_DRAW, GL_STATIC_DRAW and GL_DYNAMIC_DRAW
usages are allowed.
Change-Id: I2d6a425363c32330d25272d26884d32610d8dd19
|
| |
|
|
|
|
|
| |
When a texture or renderbuffer is still attached to framebuffer but
is getting deleted, it should also be detached from framebuffer.
Change-Id: Ide2c2a0e36ca8bf58f9351a17b78b76ebd507c12
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
The glShaderSource() function really takes a 'const GLchar* const*' parameter,
not 'const GLchar**'. This creates issues when compiling the auto-generated
encoders created with the latest version of 'emugen' and the GL2 Khronos
headers.
This patch is used to fix the issue. Note that it requires defining a new type
in gl2.types, as well as fixing the signature of misc functions in the
translator.
Change-Id: I750f95f2e33d83b3b5563642ad7f87e4b8a37f35
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
This adds a new flag that can be applied to entry points for 'emugen',
named 'flushOnEncode'. When used, the generated encoder will call
stream->flush() just after adding bytes to the stream.
This is needed to match the manual change that was performed in
the renderControl encoder in the following patch:
https://android-review.googlesource.com/#/c/95864/
Change-Id: I8cc8fdb0d38ef27e8ba646c83d717166400babfd
|
| |
|
|
|
|
|
|
|
|
| |
This patch ensures that the auto-generated client_context.h
headers do not generate compiler warnings in the setError()
function.
+ Remove tiny warning for NativeLinuxSubWindow.cpp
Change-Id: Ibab92ab3332fd284589435732b52c011ae21c15f
|
| |
|
|
|
|
|
|
| |
This patch simplifies the generated encoders and decoders by
getting rid of the accessor functions (e.g. set_glDrawElementsData)
given that all fields are public and can be written to directly.
Change-Id: I15f4caac95e4d5f1e24a1a5838622600c6bc3207
|
| |
|
|
| |
Change-Id: I3b4b5510eb5d5cb379f7a498b58b4adb6417290b
|
| |
|
|
|
|
|
|
|
| |
When deleting a program that is still in use, its delete status
should set to true and the actual deletion should happen later
when the program is not in use.
Change-Id: I821312997d372ed4773033ba373a8c792f6d7ba9
(cherry picked from commit 9b3c3647baf41e15cf9564df4b974162a7135873)
|
| |
|
|
|
|
|
|
|
|
|
|
| |
When deleting a shader that is still attached to program,
it should not be deleted immediately. Instead, it should
be marked for deletion.
When a program is deleted, its shaders should be detached.
When a shader is detached, it should be deleted if it is
marked for deletion.
Change-Id: I481dbfe37e3ad4af454574b75d157bdfeb1c9cdd
(cherry picked from commit bc42a0598f6e5ffb0ebd646e0bad8d94c50ec193)
|
| |
|
|
|
|
|
|
|
| |
For GL_STENCIL_VALUE_MASK and the like, glGetFloatv returns -1
and this is incorrect, according to GLES 2 spec. This commit
does proper casts to get sensible value.
Change-Id: I9c07ddf812458bd2d374189c0c4263c44de0d6da
(cherry picked from commit 92ebbc674404fd90aba4df68216e1f103456c7fc)
|
| |
|
|
|
|
|
|
| |
This commit handles empty data parameter in decoder side to avoid
crashing emultor.
Change-Id: I1605c328506d1fa1506023ca7b261d210b944d12
(cherry picked from commit f68413b2dbf5a73643195589b3fb5c10886a150e)
|
| |
|
|
|
|
|
|
| |
OpenGL standard allows empty length parameter and we should
handle it properly to avoid crashing emulator.
Change-Id: I3bd5da19461da0c1f84138a197ae770091458b57
(cherry picked from commit f3e18524d036044e416647bb0a86ecaa270b3494)
|
| |
|
|
|
|
|
|
|
|
| |
This commit clears m_src of ShaderParser in setSrc()
method before reading new shader source code so that
any previous source code won't be prefixed to new
shader source code.
Change-Id: Iacc98b32aea380d1e4503c37b86f5db55263e667
(cherry picked from commit ba8d8fef8f76d86f90f5cc7774e1e0f4fb507b86)
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This patch cleans up the build files for the GPU emulation libraries
(i.e. there is no need to test for BUILD_EMULATOR_64BITS anymore,
filtering is now handled by the build system directly).
+ Remove a bunch obsolete tests, which were not unit tests, despite
their name beginning with ut_xxxx.
Which includes removing dependency on SDL too.
+ Remove -m64 and -fPIC flags from compilation. These are not
necessary anymore (again, the build system now takes charge of
placing them when necessary), and generated link-time warning
when building Windows executables.
+ Remove a few declarations related to the now-obsolete platform
build (these libraries are only built with the emulator's build
system now).
Change-Id: I27c28979c42cd51f2fe9e30edd4141136e80ee03
|
| |
|
|
|
|
|
|
|
|
|
| |
This removes the last pieces of shared/OpenglOsUtils
which were never used since the code in render_api.cpp always
used thread-based rendering, instead of process-based one.
This feature could be re-implemented in the future, if really
desirable.
Change-Id: I551e0f3d6d5a06ff66cb40b007e2b24c295f1dd8
|
| |
|
|
|
|
| |
+ Add unit test.
Change-Id: I26d84cf590f6bfff3304be3f42dc0196bcc7f6d2
|
| |
|
|
|
|
| |
+ Add a unit test.
Change-Id: I27c993d1dc819e5bd89fc1e9ae266e11e6ef9a76
|
| |
|
|
|
|
|
|
|
|
|
| |
This patch ensures that all render threads use the same global
lock to synchronize calls to the underlying GLES/EGL libraries.
Original patch from Thomas Knych (thomaswk@google.com)
BUG=9627179
Change-Id: I8ac9a43bc30bba8a9a06f832cf29e72263d946ce
|
| |
|
|
|
|
|
|
|
|
|
| |
This patch slightly modifies the build files for the GPU emulation
libraries to prepare for future changes in the emulator-specific
build system that will be necessary to support Win64 binaries.
The main difference is the introduction of 64-bit versions of the
emugl-begin-host-<type> macros, named emugl-begin-host64-<type>.
Change-Id: Ib40c030fa407b0ed951755dd9b007fda85778e03
|
| |
|
|
|
|
|
|
|
|
| |
When using the newest Mingw64 toolchain, both the forward declaration
and the definition of functions need to use GLAPI / GLAPIENTRY or the
compiler will complain.
BUG=15402623
Change-Id: Ida9e1cb9b177759e7d6688dc1d883dd856abda04
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The definitions of two EGL translator functions were missing
EGLAPI / EGLAPIENTRY macros. On Windows, these enforces the
__stdcall procedure call modifier, which changes the way the
stack pointer is modified on function exit.
Without this patch, a call to these function will result in
a corrupted stack pointer in the caller, quickly followed by
a random crash.
BUG=15402623
Change-Id: Ia0f7ebef29e1252086fb59ebf2e6f907c2a69487
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
The gralloc register_buffer() function, which calls rcOpenColorBuffer,
must actually increment the reference count before returning.
Otherwise the buffer allocator may release its reference before the
client has obtained one, and the buffer will be freed prematurely.
Since rcOpenColorBuffer was just sending a message to the host without
waiting for it to be received/processed, this guarantee was not met.
Adding a return value makes the call synchronous.
Bug: 12988668
Change-Id: I8b2399cfb0f600f99b3387f630343291b59bc9a6
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Zero output parameters so that errors don't return random
data (even if the target code was careful to zero its output
parameters.) Spec says that we will not modify values in case of
an error, which is not currently possible, but at least this
means we return deterministic values.
* Similarly, avoid passing uninitialized data if an error occurs
during getting the viewport.
* Fix a bug where glGetError may be called when NULL is decoded in
CHECK_GL_ERROR mode.
* Output more information about the stream in DEBUG_PRINTOUT mode to
help separate from multiple streams.
Change-Id: I31706b92642efe4c7ed38d178b49e72835a9c9a6
|
| |
|
|
|
|
|
|
| |
This fixes a few compiler warnings when building the GPU emulation
libraries with GCC 4.8. Note that GLbyte is defined as khronos_int8_t
which is signed!
Change-Id: I52027cd2eb20d6162983319f22d4da150ff514ed
|
| |
|
|
|
|
|
|
|
|
| |
This back-ports several fixes from aosp/master branch into idea133:
145e25 Fix the Google Maps crash issue
e33909 Support GL_MAX_TEXTURE_SIZE case to glGetIntegerv API
c6dd20 Fix Mac build.
Change-Id: I26a05956c3b926dddeb638c6cff979199075ecbb
|
| |
|
|
|
|
|
| |
These warnings appear when building the sources through the emulator's
standalone build system, not the platform one.
Change-Id: Ib5d51cf6211f32763be00c7436ae14c06f76b436
|
| |
|
|
|
|
|
|
|
|
| |
The function uses DescribePixelFormat() which doesn't return a
count, but a maximum index, in a base-1 list of possible formats,
so adjust the code accordingly.
See http://msdn.microsoft.com/en-us/library/windows/desktop/dd318302(v=vs.85).aspx
Change-Id: Id0cc92249348e6c845570adaaf4c280721a194bb
|
| |
|
|
|
|
|
|
|
|
|
| |
The eglWaitEGL implementation didn't restore the previous
bound API after calling eglWaitClient. This probably isn't
a big concern for emugl correctness, but fixing this removes
a compiler warning.
See http://www.khronos.org/registry/egl/sdk/docs/man/xhtml/eglWaitGL.html
Change-Id: I143ffeeefa01aff502d27d4e1d6f892f0d1efe5b
|
| |
|
|
|
|
|
|
| |
This patch improves the build files for the GPU emulation
libraries to allow them to be built directly with the emulator's
own standalone build system.
Change-Id: I205392bdfe4223a5c43fa67e24a2beffcbcbc07a
|
| |
|
|
|
|
|
|
| |
Final patch to completely remove dependencies on
libcutils/libutils/liblog from the host-side GPU
emulation libraries.
Change-Id: I84a058bbd0ca676b18c0b0a094ac8bae692f9c94
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This patch removes the use of the 'thread_store' class from
<utils/threads.h> by providing its own implementation instead
under shared/emugl/common/thread_store.h, plus appropriate
unit tests.
Note that unlike the Android version, this properly destroys
the thread-local values on thread exit (instead of leaking
them).
+ Provide a LazyInstance class used to perform thread-safe
lazy initialization of static variables without the use
of C++ constructors.
Change-Id: Iabe01fbd713c6872b5fe245d7255c3c03749a88a
|
| |
|
|
|
|
|
|
|
|
|
| |
This patch removes the dependency on android::Mutex from
<cutils/threads.h> by providing a custom implementation, which
is a simple wrapper around pthread_mutex_t / CriticalSection,
under shared/emugl/common/mutex.h
+ Provide unit tests.
Change-Id: I379ef0c480c478ab9ba5f2faaf8274267eff37ba
|
| |
|
|
|
|
|
| |
This patch removes a few minor compiler warnings related
to unused local variables.
Change-Id: Icd4b3b478dce0c38cc1dd04419db7350dcbdb8f6
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This gets rid of two copies of SmartPtr.h and replaces them with
a single implementation under shared/emugl/common/smart_ptr.*
Note that this uses a new include path rooted at the shared/
directory for classes that are likely to be built both for
the host and the device (in case we back-port this to
device/generic/goldfish/opengl/ in the future).
+ Add a gtest-based set of unittests, after building, just
call 'emugl_common_host_unittests' to run it.
Note that this probably needs a 64-bit version as well,
will come later once I find a way to build GTest for 64-bits
without breaking the platform build :-)
Also note that this moves the class to the 'emugl' namespace,
in order to make the code easier to build out of the platform
tree, and embed it in other projects. More classes will be
transitioned / refactored in future patches.
AOSP_BUG=64806
Change-Id: Ieb326c5f3f002a21537b8a391a82ce2ef9925073
|
| |
|
|
|
|
|
|
|
|
|
| |
A small patch to prepare for the out-of-platform-tree build.
This ones places SDL-related definitions in a new build file
(sdl.mk) and provide a way for the emulator's build system
to provide its own SDL compiler and linker flags.
+ Add missing KHR/khrplatform.h file.
Change-Id: I496f1a49730ffbfae80a074e09611bd07777cf1a
|
| |
|
|
|
|
|
|
|
|
|
| |
This patch gets rid of all compiler warnings for the
GPU emulation libraries when building on a Linux host.
Note that GLcommon/GLutils.h now provides two new functions
to perform 'safe' type casts between unsigned integers and
pointers: SafePointerFromUInt() and SafeUIntFromPointer().
Change-Id: I01c48bbd72f925d70eb9831f57e15815e687121f
|
| |\ |
|
| | |
| |
| |
| |
| |
| |
| |
| | |
bug: 10456411
Fix for internal bug
Change-Id: I85181d358f1844b25cc85fbaf5f64842d5ed6f22
|
| |\ \ |
|
| | |/
| |
| |
| |
| |
| |
| |
| |
| |
| | |
The pointer returned by glGetString is owned by the GL context, so
when the GL context is destroyed it may become invalid. This happens
on Mesa, for example. Make/manage our own copy of the extension string
to use after destroying the context.
Bug: 9627179
Change-Id: I605536151ee64f50403546d0d38c5b5f1f27dd73
|
| |\ \ |
|
| | |/
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
This is what the pixel format attribute lists in
MacPixelFormatsAttribs.m try to achieve, but despite this, alpha
is nonzero in every returned configuration on certain (all?)
machines (at least on 10.8.5 on a nvidia gpu). This means that
EGL won't return any configs at all with alpha == 0.
The default config chooser in GLSurfaceView requires a config with
alpha == 0. This means that previously, this view failed to start up
on the emulator on OS X, unless set up with a non-default config
chooser.
Change-Id: I2bf3e92a026c525a97d6746e491d920ce127787f
|
| |\ \
| |/
|/|
| |
| |
| | |
* changes:
Ignore empty ranges
Fix rangeUnion return value in the successful case
|
| | |
| |
| |
| | |
Change-Id: I0cccba6795e3b9709cc646f6fa55bb60e6446ea1
|
| | |
| |
| |
| |
| |
| |
| | |
Even if the ranges can be merge rangeUnion was returning false.
Most probably this was a typo.
Change-Id: I4cf8a19bd701a8501c2d49cf0bfa996f9e12c02f
|
| |\ \
| | |
| | |
| | |
| | |
| | | |
* changes:
ColorBuffer: Remove the y-invert Intel GPU bug workaround
EglMacApi: Use the right pbuffer texture target and format parameters
|
| | | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
The fix in 57501158 makes sure pbuffers get initialized
properly. The previously incorrect pbuffer texture parameters
had different effects on different GPUs/drivers. On a Nvidia
GT 650M, the buffers were rendered properly but glReadPixels calls
were inverted, while Intel HD 3000/4000 seemed to get the rendering
inverted as well.
By passing proper pbuffer texture parameters, the bug (which in
itself was no driver bug but inconsistent behaviour when given
invalid parameters) vanishes.
This reverts the bug workaround parts of 9322c5cb (from
development.git).
Change-Id: Ibc38147967361cba6ba85cdf3b4e9a2e2ee6d881
|