summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--include/gui/DisplayEventReceiver.h4
-rw-r--r--include/utils/ResourceTypes.h605
-rw-r--r--libs/gui/Android.mk7
-rw-r--r--libs/utils/ResourceTypes.cpp1145
-rw-r--r--opengl/include/GLES/glext.h197
-rw-r--r--opengl/include/GLES2/gl2ext.h682
-rw-r--r--opengl/libs/EGL/Loader.cpp13
-rw-r--r--opengl/libs/EGL/egl.cpp23
-rw-r--r--opengl/libs/EGL/eglApi.cpp64
-rw-r--r--opengl/libs/EGL/egl_display.cpp41
-rw-r--r--opengl/libs/EGL/egl_display.h7
-rw-r--r--opengl/libs/EGL/egl_object.cpp36
-rw-r--r--opengl/libs/EGL/egl_object.h12
-rw-r--r--opengl/libs/EGL/egldefs.h1
-rw-r--r--opengl/libs/EGL/getProcAddress.cpp50
-rw-r--r--opengl/libs/GLES2/gl2.cpp14
-rw-r--r--opengl/libs/GLES2/gl2_api.in2
-rw-r--r--opengl/libs/GLES2/gl2ext_api.in191
-rwxr-xr-xopengl/libs/GLES2_dbg/generate_api_cpp.py219
-rwxr-xr-xopengl/libs/GLES2_dbg/generate_caller_cpp.py199
-rwxr-xr-xopengl/libs/GLES2_dbg/generate_debug_in.py80
-rwxr-xr-xopengl/libs/GLES2_dbg/generate_debugger_message_proto.py155
-rw-r--r--opengl/libs/GLES2_dbg/gl2_api_annotated.in426
-rw-r--r--opengl/libs/GLES2_dbg/src/api.cpp3540
-rw-r--r--opengl/libs/GLES2_dbg/src/api.h58
-rw-r--r--opengl/libs/GLES2_dbg/src/caller.cpp778
-rw-r--r--opengl/libs/GLES2_dbg/src/caller.h330
-rw-r--r--opengl/libs/GLES2_dbg/src/dbgcontext.cpp427
-rw-r--r--opengl/libs/GLES2_dbg/src/debugger_message.pb.cpp1455
-rw-r--r--opengl/libs/GLES2_dbg/src/debugger_message.pb.h1187
-rw-r--r--opengl/libs/GLES2_dbg/src/egl.cpp54
-rw-r--r--opengl/libs/GLES2_dbg/src/header.h178
-rw-r--r--opengl/libs/GLES2_dbg/src/server.cpp312
-rw-r--r--opengl/libs/GLES2_dbg/src/vertex.cpp214
-rw-r--r--opengl/libs/GLES2_dbg/test/Android.mk37
-rw-r--r--opengl/libs/GLES2_dbg/test/test_main.cpp234
-rw-r--r--opengl/libs/GLES2_dbg/test/test_server.cpp245
-rw-r--r--opengl/libs/GLES2_dbg/test/test_socket.cpp468
-rw-r--r--opengl/libs/GLES_CM/gl.cpp14
-rw-r--r--opengl/libs/GLES_CM/gl_api.in2
-rw-r--r--opengl/libs/GLES_CM/glext_api.in42
-rw-r--r--opengl/libs/GLES_trace/gltrace.proto62
-rw-r--r--opengl/libs/GLES_trace/src/gltrace.pb.cpp121
-rw-r--r--opengl/libs/GLES_trace/src/gltrace.pb.h122
-rw-r--r--opengl/libs/GLES_trace/src/gltrace_api.cpp2299
-rw-r--r--opengl/libs/GLES_trace/src/gltrace_api.h65
-rw-r--r--opengl/libs/GLES_trace/src/gltrace_eglapi.cpp8
-rw-r--r--opengl/libs/GLES_trace/src/gltrace_fixup.cpp95
-rw-r--r--opengl/libs/GLES_trace/src/gltrace_transport.cpp25
-rw-r--r--opengl/libs/GLES_trace/src/gltrace_transport.h7
-rwxr-xr-xopengl/libs/GLES_trace/tools/genapi.py4
-rw-r--r--opengl/libs/GLES_trace/tools/testgenapi.py6
-rw-r--r--opengl/libs/egl_impl.h1
-rw-r--r--opengl/libs/entries.in61
-rw-r--r--opengl/libs/enums.in114
-rw-r--r--opengl/libs/hooks.h7
-rwxr-xr-xopengl/libs/tools/glapigen3
-rw-r--r--opengl/libs/trace.in61
-rw-r--r--services/surfaceflinger/Android.mk7
-rw-r--r--services/surfaceflinger/DisplayHardware/DisplayHardware.cpp15
-rw-r--r--services/surfaceflinger/DisplayHardware/DisplayHardware.h5
-rw-r--r--services/surfaceflinger/EventThread.cpp41
-rw-r--r--services/surfaceflinger/EventThread.h8
-rw-r--r--services/surfaceflinger/Layer.cpp46
-rw-r--r--services/surfaceflinger/Layer.h18
-rw-r--r--services/surfaceflinger/LayerBase.cpp11
-rw-r--r--services/surfaceflinger/LayerBase.h6
-rw-r--r--services/surfaceflinger/MessageQueue.cpp61
-rw-r--r--services/surfaceflinger/MessageQueue.h16
-rw-r--r--services/surfaceflinger/SurfaceFlinger.cpp314
-rw-r--r--services/surfaceflinger/SurfaceFlinger.h8
-rw-r--r--services/surfaceflinger/SurfaceTextureLayer.cpp4
-rw-r--r--services/surfaceflinger/tests/vsync/vsync.cpp2
73 files changed, 5621 insertions, 11750 deletions
diff --git a/include/gui/DisplayEventReceiver.h b/include/gui/DisplayEventReceiver.h
index dccc164..a281377 100644
--- a/include/gui/DisplayEventReceiver.h
+++ b/include/gui/DisplayEventReceiver.h
@@ -63,7 +63,9 @@ public:
public:
/*
* DisplayEventReceiver creates and registers an event connection with
- * SurfaceFlinger. Events start being delivered immediately.
+ * SurfaceFlinger. VSync events are disabled by default. Call setVSyncRate
+ * or requestNextVsync to receive them.
+ * Other events start being delivered immediately.
*/
DisplayEventReceiver();
diff --git a/include/utils/ResourceTypes.h b/include/utils/ResourceTypes.h
index 46420c1..c496da6 100644
--- a/include/utils/ResourceTypes.h
+++ b/include/utils/ResourceTypes.h
@@ -444,23 +444,31 @@ public:
void uninit();
+ // Return string entry as UTF16; if the pool is UTF8, the string will
+ // be converted before returning.
inline const char16_t* stringAt(const ResStringPool_ref& ref, size_t* outLen) const {
return stringAt(ref.index, outLen);
}
const char16_t* stringAt(size_t idx, size_t* outLen) const;
+ // Note: returns null if the string pool is not UTF8.
const char* string8At(size_t idx, size_t* outLen) const;
+ // Return string whether the pool is UTF8 or UTF16. Does not allow you
+ // to distinguish null.
+ const String8 string8ObjectAt(size_t idx) const;
+
const ResStringPool_span* styleAt(const ResStringPool_ref& ref) const;
const ResStringPool_span* styleAt(size_t idx) const;
ssize_t indexOfString(const char16_t* str, size_t strLen) const;
size_t size() const;
+ size_t styleCount() const;
+ size_t bytes() const;
-#ifndef HAVE_ANDROID_OS
+ bool isSorted() const;
bool isUTF8() const;
-#endif
private:
status_t mError;
@@ -746,7 +754,9 @@ private:
/**
* Header for a resource table. Its data contains a series of
* additional chunks:
- * * A ResStringPool_header containing all table values.
+ * * A ResStringPool_header containing all table values. This string pool
+ * contains all of the string values in the entire resource table (not
+ * the names of entries or type identifiers however).
* * One or more ResTable_package chunks.
*
* Specific entries within a resource table can be uniquely identified
@@ -843,6 +853,8 @@ struct ResTable_config
DENSITY_MEDIUM = ACONFIGURATION_DENSITY_MEDIUM,
DENSITY_TV = ACONFIGURATION_DENSITY_TV,
DENSITY_HIGH = ACONFIGURATION_DENSITY_HIGH,
+ DENSITY_XHIGH = ACONFIGURATION_DENSITY_XHIGH,
+ DENSITY_XXHIGH = ACONFIGURATION_DENSITY_XXHIGH,
DENSITY_NONE = ACONFIGURATION_DENSITY_NONE
};
@@ -982,68 +994,15 @@ struct ResTable_config
uint32_t screenSizeDp;
};
- inline void copyFromDeviceNoSwap(const ResTable_config& o) {
- const size_t size = dtohl(o.size);
- if (size >= sizeof(ResTable_config)) {
- *this = o;
- } else {
- memcpy(this, &o, size);
- memset(((uint8_t*)this)+size, 0, sizeof(ResTable_config)-size);
- }
- }
+ void copyFromDeviceNoSwap(const ResTable_config& o);
- inline void copyFromDtoH(const ResTable_config& o) {
- copyFromDeviceNoSwap(o);
- size = sizeof(ResTable_config);
- mcc = dtohs(mcc);
- mnc = dtohs(mnc);
- density = dtohs(density);
- screenWidth = dtohs(screenWidth);
- screenHeight = dtohs(screenHeight);
- sdkVersion = dtohs(sdkVersion);
- minorVersion = dtohs(minorVersion);
- smallestScreenWidthDp = dtohs(smallestScreenWidthDp);
- screenWidthDp = dtohs(screenWidthDp);
- screenHeightDp = dtohs(screenHeightDp);
- }
-
- inline void swapHtoD() {
- size = htodl(size);
- mcc = htods(mcc);
- mnc = htods(mnc);
- density = htods(density);
- screenWidth = htods(screenWidth);
- screenHeight = htods(screenHeight);
- sdkVersion = htods(sdkVersion);
- minorVersion = htods(minorVersion);
- smallestScreenWidthDp = htods(smallestScreenWidthDp);
- screenWidthDp = htods(screenWidthDp);
- screenHeightDp = htods(screenHeightDp);
- }
-
- inline int compare(const ResTable_config& o) const {
- int32_t diff = (int32_t)(imsi - o.imsi);
- if (diff != 0) return diff;
- diff = (int32_t)(locale - o.locale);
- if (diff != 0) return diff;
- diff = (int32_t)(screenType - o.screenType);
- if (diff != 0) return diff;
- diff = (int32_t)(input - o.input);
- if (diff != 0) return diff;
- diff = (int32_t)(screenSize - o.screenSize);
- if (diff != 0) return diff;
- diff = (int32_t)(version - o.version);
- if (diff != 0) return diff;
- diff = (int32_t)(screenLayout - o.screenLayout);
- if (diff != 0) return diff;
- diff = (int32_t)(uiMode - o.uiMode);
- if (diff != 0) return diff;
- diff = (int32_t)(smallestScreenWidthDp - o.smallestScreenWidthDp);
- if (diff != 0) return diff;
- diff = (int32_t)(screenSizeDp - o.screenSizeDp);
- return (int)diff;
- }
+ void copyFromDtoH(const ResTable_config& o);
+ void swapHtoD();
+
+ int compare(const ResTable_config& o) const;
+ int compareLogical(const ResTable_config& o) const;
+
// Flags indicating a set of config values. These flag constants must
// match the corresponding ones in android.content.pm.ActivityInfo and
// attrs_manifest.xml.
@@ -1066,158 +1025,10 @@ struct ResTable_config
// Compare two configuration, returning CONFIG_* flags set for each value
// that is different.
- inline int diff(const ResTable_config& o) const {
- int diffs = 0;
- if (mcc != o.mcc) diffs |= CONFIG_MCC;
- if (mnc != o.mnc) diffs |= CONFIG_MNC;
- if (locale != o.locale) diffs |= CONFIG_LOCALE;
- if (orientation != o.orientation) diffs |= CONFIG_ORIENTATION;
- if (density != o.density) diffs |= CONFIG_DENSITY;
- if (touchscreen != o.touchscreen) diffs |= CONFIG_TOUCHSCREEN;
- if (((inputFlags^o.inputFlags)&(MASK_KEYSHIDDEN|MASK_NAVHIDDEN)) != 0)
- diffs |= CONFIG_KEYBOARD_HIDDEN;
- if (keyboard != o.keyboard) diffs |= CONFIG_KEYBOARD;
- if (navigation != o.navigation) diffs |= CONFIG_NAVIGATION;
- if (screenSize != o.screenSize) diffs |= CONFIG_SCREEN_SIZE;
- if (version != o.version) diffs |= CONFIG_VERSION;
- if (screenLayout != o.screenLayout) diffs |= CONFIG_SCREEN_LAYOUT;
- if (uiMode != o.uiMode) diffs |= CONFIG_UI_MODE;
- if (smallestScreenWidthDp != o.smallestScreenWidthDp) diffs |= CONFIG_SMALLEST_SCREEN_SIZE;
- if (screenSizeDp != o.screenSizeDp) diffs |= CONFIG_SCREEN_SIZE;
- return diffs;
- }
+ int diff(const ResTable_config& o) const;
// Return true if 'this' is more specific than 'o'.
- inline bool
- isMoreSpecificThan(const ResTable_config& o) const {
- // The order of the following tests defines the importance of one
- // configuration parameter over another. Those tests first are more
- // important, trumping any values in those following them.
- if (imsi || o.imsi) {
- if (mcc != o.mcc) {
- if (!mcc) return false;
- if (!o.mcc) return true;
- }
-
- if (mnc != o.mnc) {
- if (!mnc) return false;
- if (!o.mnc) return true;
- }
- }
-
- if (locale || o.locale) {
- if (language[0] != o.language[0]) {
- if (!language[0]) return false;
- if (!o.language[0]) return true;
- }
-
- if (country[0] != o.country[0]) {
- if (!country[0]) return false;
- if (!o.country[0]) return true;
- }
- }
-
- if (smallestScreenWidthDp || o.smallestScreenWidthDp) {
- if (smallestScreenWidthDp != o.smallestScreenWidthDp) {
- if (!smallestScreenWidthDp) return false;
- if (!o.smallestScreenWidthDp) return true;
- }
- }
-
- if (screenSizeDp || o.screenSizeDp) {
- if (screenWidthDp != o.screenWidthDp) {
- if (!screenWidthDp) return false;
- if (!o.screenWidthDp) return true;
- }
-
- if (screenHeightDp != o.screenHeightDp) {
- if (!screenHeightDp) return false;
- if (!o.screenHeightDp) return true;
- }
- }
-
- if (screenLayout || o.screenLayout) {
- if (((screenLayout^o.screenLayout) & MASK_SCREENSIZE) != 0) {
- if (!(screenLayout & MASK_SCREENSIZE)) return false;
- if (!(o.screenLayout & MASK_SCREENSIZE)) return true;
- }
- if (((screenLayout^o.screenLayout) & MASK_SCREENLONG) != 0) {
- if (!(screenLayout & MASK_SCREENLONG)) return false;
- if (!(o.screenLayout & MASK_SCREENLONG)) return true;
- }
- }
-
- if (orientation != o.orientation) {
- if (!orientation) return false;
- if (!o.orientation) return true;
- }
-
- if (uiMode || o.uiMode) {
- if (((uiMode^o.uiMode) & MASK_UI_MODE_TYPE) != 0) {
- if (!(uiMode & MASK_UI_MODE_TYPE)) return false;
- if (!(o.uiMode & MASK_UI_MODE_TYPE)) return true;
- }
- if (((uiMode^o.uiMode) & MASK_UI_MODE_NIGHT) != 0) {
- if (!(uiMode & MASK_UI_MODE_NIGHT)) return false;
- if (!(o.uiMode & MASK_UI_MODE_NIGHT)) return true;
- }
- }
-
- // density is never 'more specific'
- // as the default just equals 160
-
- if (touchscreen != o.touchscreen) {
- if (!touchscreen) return false;
- if (!o.touchscreen) return true;
- }
-
- if (input || o.input) {
- if (((inputFlags^o.inputFlags) & MASK_KEYSHIDDEN) != 0) {
- if (!(inputFlags & MASK_KEYSHIDDEN)) return false;
- if (!(o.inputFlags & MASK_KEYSHIDDEN)) return true;
- }
-
- if (((inputFlags^o.inputFlags) & MASK_NAVHIDDEN) != 0) {
- if (!(inputFlags & MASK_NAVHIDDEN)) return false;
- if (!(o.inputFlags & MASK_NAVHIDDEN)) return true;
- }
-
- if (keyboard != o.keyboard) {
- if (!keyboard) return false;
- if (!o.keyboard) return true;
- }
-
- if (navigation != o.navigation) {
- if (!navigation) return false;
- if (!o.navigation) return true;
- }
- }
-
- if (screenSize || o.screenSize) {
- if (screenWidth != o.screenWidth) {
- if (!screenWidth) return false;
- if (!o.screenWidth) return true;
- }
-
- if (screenHeight != o.screenHeight) {
- if (!screenHeight) return false;
- if (!o.screenHeight) return true;
- }
- }
-
- if (version || o.version) {
- if (sdkVersion != o.sdkVersion) {
- if (!sdkVersion) return false;
- if (!o.sdkVersion) return true;
- }
-
- if (minorVersion != o.minorVersion) {
- if (!minorVersion) return false;
- if (!o.minorVersion) return true;
- }
- }
- return false;
- }
+ bool isMoreSpecificThan(const ResTable_config& o) const;
// Return true if 'this' is a better match than 'o' for the 'requested'
// configuration. This assumes that match() has already been used to
@@ -1229,222 +1040,7 @@ struct ResTable_config
// they are not equal then one must be generic because only generic and
// '==requested' will pass the match() call. So if this is not generic,
// it wins. If this IS generic, o wins (return false).
- inline bool
- isBetterThan(const ResTable_config& o,
- const ResTable_config* requested) const {
- if (requested) {
- if (imsi || o.imsi) {
- if ((mcc != o.mcc) && requested->mcc) {
- return (mcc);
- }
-
- if ((mnc != o.mnc) && requested->mnc) {
- return (mnc);
- }
- }
-
- if (locale || o.locale) {
- if ((language[0] != o.language[0]) && requested->language[0]) {
- return (language[0]);
- }
-
- if ((country[0] != o.country[0]) && requested->country[0]) {
- return (country[0]);
- }
- }
-
- if (smallestScreenWidthDp || o.smallestScreenWidthDp) {
- // The configuration closest to the actual size is best.
- // We assume that larger configs have already been filtered
- // out at this point. That means we just want the largest one.
- return smallestScreenWidthDp >= o.smallestScreenWidthDp;
- }
-
- if (screenSizeDp || o.screenSizeDp) {
- // "Better" is based on the sum of the difference between both
- // width and height from the requested dimensions. We are
- // assuming the invalid configs (with smaller dimens) have
- // already been filtered. Note that if a particular dimension
- // is unspecified, we will end up with a large value (the
- // difference between 0 and the requested dimension), which is
- // good since we will prefer a config that has specified a
- // dimension value.
- int myDelta = 0, otherDelta = 0;
- if (requested->screenWidthDp) {
- myDelta += requested->screenWidthDp - screenWidthDp;
- otherDelta += requested->screenWidthDp - o.screenWidthDp;
- }
- if (requested->screenHeightDp) {
- myDelta += requested->screenHeightDp - screenHeightDp;
- otherDelta += requested->screenHeightDp - o.screenHeightDp;
- }
- //ALOGI("Comparing this %dx%d to other %dx%d in %dx%d: myDelta=%d otherDelta=%d",
- // screenWidthDp, screenHeightDp, o.screenWidthDp, o.screenHeightDp,
- // requested->screenWidthDp, requested->screenHeightDp, myDelta, otherDelta);
- return (myDelta <= otherDelta);
- }
-
- if (screenLayout || o.screenLayout) {
- if (((screenLayout^o.screenLayout) & MASK_SCREENSIZE) != 0
- && (requested->screenLayout & MASK_SCREENSIZE)) {
- // A little backwards compatibility here: undefined is
- // considered equivalent to normal. But only if the
- // requested size is at least normal; otherwise, small
- // is better than the default.
- int mySL = (screenLayout & MASK_SCREENSIZE);
- int oSL = (o.screenLayout & MASK_SCREENSIZE);
- int fixedMySL = mySL;
- int fixedOSL = oSL;
- if ((requested->screenLayout & MASK_SCREENSIZE) >= SCREENSIZE_NORMAL) {
- if (fixedMySL == 0) fixedMySL = SCREENSIZE_NORMAL;
- if (fixedOSL == 0) fixedOSL = SCREENSIZE_NORMAL;
- }
- // For screen size, the best match is the one that is
- // closest to the requested screen size, but not over
- // (the not over part is dealt with in match() below).
- if (fixedMySL == fixedOSL) {
- // If the two are the same, but 'this' is actually
- // undefined, then the other is really a better match.
- if (mySL == 0) return false;
- return true;
- }
- return fixedMySL >= fixedOSL;
- }
- if (((screenLayout^o.screenLayout) & MASK_SCREENLONG) != 0
- && (requested->screenLayout & MASK_SCREENLONG)) {
- return (screenLayout & MASK_SCREENLONG);
- }
- }
-
- if ((orientation != o.orientation) && requested->orientation) {
- return (orientation);
- }
-
- if (uiMode || o.uiMode) {
- if (((uiMode^o.uiMode) & MASK_UI_MODE_TYPE) != 0
- && (requested->uiMode & MASK_UI_MODE_TYPE)) {
- return (uiMode & MASK_UI_MODE_TYPE);
- }
- if (((uiMode^o.uiMode) & MASK_UI_MODE_NIGHT) != 0
- && (requested->uiMode & MASK_UI_MODE_NIGHT)) {
- return (uiMode & MASK_UI_MODE_NIGHT);
- }
- }
-
- if (screenType || o.screenType) {
- if (density != o.density) {
- // density is tough. Any density is potentially useful
- // because the system will scale it. Scaling down
- // is generally better than scaling up.
- // Default density counts as 160dpi (the system default)
- // TODO - remove 160 constants
- int h = (density?density:160);
- int l = (o.density?o.density:160);
- bool bImBigger = true;
- if (l > h) {
- int t = h;
- h = l;
- l = t;
- bImBigger = false;
- }
-
- int reqValue = (requested->density?requested->density:160);
- if (reqValue >= h) {
- // requested value higher than both l and h, give h
- return bImBigger;
- }
- if (l >= reqValue) {
- // requested value lower than both l and h, give l
- return !bImBigger;
- }
- // saying that scaling down is 2x better than up
- if (((2 * l) - reqValue) * h > reqValue * reqValue) {
- return !bImBigger;
- } else {
- return bImBigger;
- }
- }
-
- if ((touchscreen != o.touchscreen) && requested->touchscreen) {
- return (touchscreen);
- }
- }
-
- if (input || o.input) {
- const int keysHidden = inputFlags & MASK_KEYSHIDDEN;
- const int oKeysHidden = o.inputFlags & MASK_KEYSHIDDEN;
- if (keysHidden != oKeysHidden) {
- const int reqKeysHidden =
- requested->inputFlags & MASK_KEYSHIDDEN;
- if (reqKeysHidden) {
-
- if (!keysHidden) return false;
- if (!oKeysHidden) return true;
- // For compatibility, we count KEYSHIDDEN_NO as being
- // the same as KEYSHIDDEN_SOFT. Here we disambiguate
- // these by making an exact match more specific.
- if (reqKeysHidden == keysHidden) return true;
- if (reqKeysHidden == oKeysHidden) return false;
- }
- }
-
- const int navHidden = inputFlags & MASK_NAVHIDDEN;
- const int oNavHidden = o.inputFlags & MASK_NAVHIDDEN;
- if (navHidden != oNavHidden) {
- const int reqNavHidden =
- requested->inputFlags & MASK_NAVHIDDEN;
- if (reqNavHidden) {
-
- if (!navHidden) return false;
- if (!oNavHidden) return true;
- }
- }
-
- if ((keyboard != o.keyboard) && requested->keyboard) {
- return (keyboard);
- }
-
- if ((navigation != o.navigation) && requested->navigation) {
- return (navigation);
- }
- }
-
- if (screenSize || o.screenSize) {
- // "Better" is based on the sum of the difference between both
- // width and height from the requested dimensions. We are
- // assuming the invalid configs (with smaller sizes) have
- // already been filtered. Note that if a particular dimension
- // is unspecified, we will end up with a large value (the
- // difference between 0 and the requested dimension), which is
- // good since we will prefer a config that has specified a
- // size value.
- int myDelta = 0, otherDelta = 0;
- if (requested->screenWidth) {
- myDelta += requested->screenWidth - screenWidth;
- otherDelta += requested->screenWidth - o.screenWidth;
- }
- if (requested->screenHeight) {
- myDelta += requested->screenHeight - screenHeight;
- otherDelta += requested->screenHeight - o.screenHeight;
- }
- return (myDelta <= otherDelta);
- }
-
- if (version || o.version) {
- if ((sdkVersion != o.sdkVersion) && requested->sdkVersion) {
- return (sdkVersion > o.sdkVersion);
- }
-
- if ((minorVersion != o.minorVersion) &&
- requested->minorVersion) {
- return (minorVersion);
- }
- }
-
- return false;
- }
- return isMoreSpecificThan(o);
- }
+ bool isBetterThan(const ResTable_config& o, const ResTable_config* requested) const;
// Return true if 'this' can be considered a match for the parameters in
// 'settings'.
@@ -1452,150 +1048,11 @@ struct ResTable_config
// but a request for the default should not match odd specifics
// (ie, request with no mcc should not match a particular mcc's data)
// settings is the requested settings
- inline bool match(const ResTable_config& settings) const {
- if (imsi != 0) {
- if (mcc != 0 && mcc != settings.mcc) {
- return false;
- }
- if (mnc != 0 && mnc != settings.mnc) {
- return false;
- }
- }
- if (locale != 0) {
- if (language[0] != 0
- && (language[0] != settings.language[0]
- || language[1] != settings.language[1])) {
- return false;
- }
- if (country[0] != 0
- && (country[0] != settings.country[0]
- || country[1] != settings.country[1])) {
- return false;
- }
- }
- if (screenConfig != 0) {
- const int screenSize = screenLayout&MASK_SCREENSIZE;
- const int setScreenSize = settings.screenLayout&MASK_SCREENSIZE;
- // Any screen sizes for larger screens than the setting do not
- // match.
- if (screenSize != 0 && screenSize > setScreenSize) {
- return false;
- }
-
- const int screenLong = screenLayout&MASK_SCREENLONG;
- const int setScreenLong = settings.screenLayout&MASK_SCREENLONG;
- if (screenLong != 0 && screenLong != setScreenLong) {
- return false;
- }
-
- const int uiModeType = uiMode&MASK_UI_MODE_TYPE;
- const int setUiModeType = settings.uiMode&MASK_UI_MODE_TYPE;
- if (uiModeType != 0 && uiModeType != setUiModeType) {
- return false;
- }
-
- const int uiModeNight = uiMode&MASK_UI_MODE_NIGHT;
- const int setUiModeNight = settings.uiMode&MASK_UI_MODE_NIGHT;
- if (uiModeNight != 0 && uiModeNight != setUiModeNight) {
- return false;
- }
-
- if (smallestScreenWidthDp != 0
- && smallestScreenWidthDp > settings.smallestScreenWidthDp) {
- return false;
- }
- }
- if (screenSizeDp != 0) {
- if (screenWidthDp != 0 && screenWidthDp > settings.screenWidthDp) {
- //ALOGI("Filtering out width %d in requested %d", screenWidthDp, settings.screenWidthDp);
- return false;
- }
- if (screenHeightDp != 0 && screenHeightDp > settings.screenHeightDp) {
- //ALOGI("Filtering out height %d in requested %d", screenHeightDp, settings.screenHeightDp);
- return false;
- }
- }
- if (screenType != 0) {
- if (orientation != 0 && orientation != settings.orientation) {
- return false;
- }
- // density always matches - we can scale it. See isBetterThan
- if (touchscreen != 0 && touchscreen != settings.touchscreen) {
- return false;
- }
- }
- if (input != 0) {
- const int keysHidden = inputFlags&MASK_KEYSHIDDEN;
- const int setKeysHidden = settings.inputFlags&MASK_KEYSHIDDEN;
- if (keysHidden != 0 && keysHidden != setKeysHidden) {
- // For compatibility, we count a request for KEYSHIDDEN_NO as also
- // matching the more recent KEYSHIDDEN_SOFT. Basically
- // KEYSHIDDEN_NO means there is some kind of keyboard available.
- //ALOGI("Matching keysHidden: have=%d, config=%d\n", keysHidden, setKeysHidden);
- if (keysHidden != KEYSHIDDEN_NO || setKeysHidden != KEYSHIDDEN_SOFT) {
- //ALOGI("No match!");
- return false;
- }
- }
- const int navHidden = inputFlags&MASK_NAVHIDDEN;
- const int setNavHidden = settings.inputFlags&MASK_NAVHIDDEN;
- if (navHidden != 0 && navHidden != setNavHidden) {
- return false;
- }
- if (keyboard != 0 && keyboard != settings.keyboard) {
- return false;
- }
- if (navigation != 0 && navigation != settings.navigation) {
- return false;
- }
- }
- if (screenSize != 0) {
- if (screenWidth != 0 && screenWidth > settings.screenWidth) {
- return false;
- }
- if (screenHeight != 0 && screenHeight > settings.screenHeight) {
- return false;
- }
- }
- if (version != 0) {
- if (sdkVersion != 0 && sdkVersion > settings.sdkVersion) {
- return false;
- }
- if (minorVersion != 0 && minorVersion != settings.minorVersion) {
- return false;
- }
- }
- return true;
- }
+ bool match(const ResTable_config& settings) const;
- void getLocale(char str[6]) const {
- memset(str, 0, 6);
- if (language[0]) {
- str[0] = language[0];
- str[1] = language[1];
- if (country[0]) {
- str[2] = '_';
- str[3] = country[0];
- str[4] = country[1];
- }
- }
- }
+ void getLocale(char str[6]) const;
- String8 toString() const {
- char buf[200];
- sprintf(buf, "imsi=%d/%d lang=%c%c reg=%c%c orient=%d touch=%d dens=%d "
- "kbd=%d nav=%d input=%d ssz=%dx%d sw%ddp w%ddp h%ddp sz=%d long=%d "
- "ui=%d night=%d vers=%d.%d",
- mcc, mnc,
- language[0] ? language[0] : '-', language[1] ? language[1] : '-',
- country[0] ? country[0] : '-', country[1] ? country[1] : '-',
- orientation, touchscreen, density, keyboard, navigation, inputFlags,
- screenWidth, screenHeight, smallestScreenWidthDp, screenWidthDp, screenHeightDp,
- screenLayout&MASK_SCREENSIZE, screenLayout&MASK_SCREENLONG,
- uiMode&MASK_UI_MODE_TYPE, uiMode&MASK_UI_MODE_NIGHT,
- sdkVersion, minorVersion);
- return String8(buf);
- }
+ String8 toString() const;
};
/**
@@ -2054,8 +1511,14 @@ public:
const char16_t* getBasePackageName(size_t idx) const;
uint32_t getBasePackageId(size_t idx) const;
+ // Return the number of resource tables that the object contains.
size_t getTableCount() const;
+ // Return the values string pool for the resource table at the given
+ // index. This string pool contains all of the strings for values
+ // contained in the resource table -- that is the item values themselves,
+ // but not the names their entries or types.
const ResStringPool* getTableStringBlock(size_t index) const;
+ // Return unique cookie identifier for the given resource table.
void* getTableCookie(size_t index) const;
// Return the configurations (ResTable_config) that we know about
diff --git a/libs/gui/Android.mk b/libs/gui/Android.mk
index b8be67d..b6f5b9e 100644
--- a/libs/gui/Android.mk
+++ b/libs/gui/Android.mk
@@ -34,6 +34,13 @@ LOCAL_SHARED_LIBRARIES := \
LOCAL_MODULE:= libgui
+ifeq ($(TARGET_BOARD_PLATFORM), omap4)
+ LOCAL_CFLAGS += -DUSE_FENCE_SYNC
+endif
+ifeq ($(TARGET_BOARD_PLATFORM), s5pc110)
+ LOCAL_CFLAGS += -DUSE_FENCE_SYNC
+endif
+
ifeq ($(TARGET_BOARD_PLATFORM), tegra)
LOCAL_CFLAGS += -DALLOW_DEQUEUE_CURRENT_BUFFER
endif
diff --git a/libs/utils/ResourceTypes.cpp b/libs/utils/ResourceTypes.cpp
index 15b83bb..3fa562e 100644
--- a/libs/utils/ResourceTypes.cpp
+++ b/libs/utils/ResourceTypes.cpp
@@ -221,7 +221,7 @@ static void deserializeInternal(const void* inData, Res_png_9patch* outData) {
static bool assertIdmapHeader(const uint32_t* map, size_t sizeBytes)
{
if (sizeBytes < ResTable::IDMAP_HEADER_SIZE_BYTES) {
- ALOGW("idmap assertion failed: size=%d bytes\n", sizeBytes);
+ ALOGW("idmap assertion failed: size=%d bytes\n", (int)sizeBytes);
return false;
}
if (*map != htodl(IDMAP_MAGIC)) { // htodl: map data expected to be in correct endianess
@@ -250,7 +250,7 @@ static status_t idmapLookup(const uint32_t* map, size_t sizeBytes, uint32_t key,
return UNKNOWN_ERROR;
}
if (typeCount > size) {
- ALOGW("Resource ID map: number of types=%d exceeds size of map=%d\n", typeCount, size);
+ ALOGW("Resource ID map: number of types=%d exceeds size of map=%d\n", typeCount, (int)size);
return UNKNOWN_ERROR;
}
const uint32_t typeOffset = map[type];
@@ -260,7 +260,7 @@ static status_t idmapLookup(const uint32_t* map, size_t sizeBytes, uint32_t key,
}
if (typeOffset + 1 > size) {
ALOGW("Resource ID map: type offset=%d exceeds reasonable value, size of map=%d\n",
- typeOffset, size);
+ typeOffset, (int)size);
return UNKNOWN_ERROR;
}
const uint32_t entryCount = map[typeOffset];
@@ -271,7 +271,7 @@ static status_t idmapLookup(const uint32_t* map, size_t sizeBytes, uint32_t key,
}
const uint32_t index = typeOffset + 2 + entry - entryOffset;
if (index > size) {
- ALOGW("Resource ID map: entry index=%d exceeds size of map=%d\n", index, size);
+ ALOGW("Resource ID map: entry index=%d exceeds size of map=%d\n", index, (int)size);
*outValue = 0;
return NO_ERROR;
}
@@ -659,6 +659,16 @@ const char* ResStringPool::string8At(size_t idx, size_t* outLen) const
return NULL;
}
+const String8 ResStringPool::string8ObjectAt(size_t idx) const
+{
+ size_t len;
+ const char *str = (const char*)string8At(idx, &len);
+ if (str != NULL) {
+ return String8(str);
+ }
+ return String8(stringAt(idx, &len));
+}
+
const ResStringPool_span* ResStringPool::styleAt(const ResStringPool_ref& ref) const
{
return styleAt(ref.index);
@@ -738,12 +748,25 @@ size_t ResStringPool::size() const
return (mError == NO_ERROR) ? mHeader->stringCount : 0;
}
-#ifndef HAVE_ANDROID_OS
+size_t ResStringPool::styleCount() const
+{
+ return (mError == NO_ERROR) ? mHeader->styleCount : 0;
+}
+
+size_t ResStringPool::bytes() const
+{
+ return (mError == NO_ERROR) ? mHeader->header.size : 0;
+}
+
+bool ResStringPool::isSorted() const
+{
+ return (mHeader->flags&ResStringPool_header::SORTED_FLAG)!=0;
+}
+
bool ResStringPool::isUTF8() const
{
return (mHeader->flags&ResStringPool_header::UTF8_FLAG)!=0;
}
-#endif
// --------------------------------------------------------------------
// --------------------------------------------------------------------
@@ -1367,6 +1390,873 @@ status_t ResXMLTree::validateNode(const ResXMLTree_node* node) const
// --------------------------------------------------------------------
// --------------------------------------------------------------------
+void ResTable_config::copyFromDeviceNoSwap(const ResTable_config& o) {
+ const size_t size = dtohl(o.size);
+ if (size >= sizeof(ResTable_config)) {
+ *this = o;
+ } else {
+ memcpy(this, &o, size);
+ memset(((uint8_t*)this)+size, 0, sizeof(ResTable_config)-size);
+ }
+}
+
+void ResTable_config::copyFromDtoH(const ResTable_config& o) {
+ copyFromDeviceNoSwap(o);
+ size = sizeof(ResTable_config);
+ mcc = dtohs(mcc);
+ mnc = dtohs(mnc);
+ density = dtohs(density);
+ screenWidth = dtohs(screenWidth);
+ screenHeight = dtohs(screenHeight);
+ sdkVersion = dtohs(sdkVersion);
+ minorVersion = dtohs(minorVersion);
+ smallestScreenWidthDp = dtohs(smallestScreenWidthDp);
+ screenWidthDp = dtohs(screenWidthDp);
+ screenHeightDp = dtohs(screenHeightDp);
+}
+
+void ResTable_config::swapHtoD() {
+ size = htodl(size);
+ mcc = htods(mcc);
+ mnc = htods(mnc);
+ density = htods(density);
+ screenWidth = htods(screenWidth);
+ screenHeight = htods(screenHeight);
+ sdkVersion = htods(sdkVersion);
+ minorVersion = htods(minorVersion);
+ smallestScreenWidthDp = htods(smallestScreenWidthDp);
+ screenWidthDp = htods(screenWidthDp);
+ screenHeightDp = htods(screenHeightDp);
+}
+
+int ResTable_config::compare(const ResTable_config& o) const {
+ int32_t diff = (int32_t)(imsi - o.imsi);
+ if (diff != 0) return diff;
+ diff = (int32_t)(locale - o.locale);
+ if (diff != 0) return diff;
+ diff = (int32_t)(screenType - o.screenType);
+ if (diff != 0) return diff;
+ diff = (int32_t)(input - o.input);
+ if (diff != 0) return diff;
+ diff = (int32_t)(screenSize - o.screenSize);
+ if (diff != 0) return diff;
+ diff = (int32_t)(version - o.version);
+ if (diff != 0) return diff;
+ diff = (int32_t)(screenLayout - o.screenLayout);
+ if (diff != 0) return diff;
+ diff = (int32_t)(uiMode - o.uiMode);
+ if (diff != 0) return diff;
+ diff = (int32_t)(smallestScreenWidthDp - o.smallestScreenWidthDp);
+ if (diff != 0) return diff;
+ diff = (int32_t)(screenSizeDp - o.screenSizeDp);
+ return (int)diff;
+}
+
+int ResTable_config::compareLogical(const ResTable_config& o) const {
+ if (mcc != o.mcc) {
+ return mcc < o.mcc ? -1 : 1;
+ }
+ if (mnc != o.mnc) {
+ return mnc < o.mnc ? -1 : 1;
+ }
+ if (language[0] != o.language[0]) {
+ return language[0] < o.language[0] ? -1 : 1;
+ }
+ if (language[1] != o.language[1]) {
+ return language[1] < o.language[1] ? -1 : 1;
+ }
+ if (country[0] != o.country[0]) {
+ return country[0] < o.country[0] ? -1 : 1;
+ }
+ if (country[1] != o.country[1]) {
+ return country[1] < o.country[1] ? -1 : 1;
+ }
+ if (smallestScreenWidthDp != o.smallestScreenWidthDp) {
+ return smallestScreenWidthDp < o.smallestScreenWidthDp ? -1 : 1;
+ }
+ if (screenWidthDp != o.screenWidthDp) {
+ return screenWidthDp < o.screenWidthDp ? -1 : 1;
+ }
+ if (screenHeightDp != o.screenHeightDp) {
+ return screenHeightDp < o.screenHeightDp ? -1 : 1;
+ }
+ if (screenWidth != o.screenWidth) {
+ return screenWidth < o.screenWidth ? -1 : 1;
+ }
+ if (screenHeight != o.screenHeight) {
+ return screenHeight < o.screenHeight ? -1 : 1;
+ }
+ if (density != o.density) {
+ return density < o.density ? -1 : 1;
+ }
+ if (orientation != o.orientation) {
+ return orientation < o.orientation ? -1 : 1;
+ }
+ if (touchscreen != o.touchscreen) {
+ return touchscreen < o.touchscreen ? -1 : 1;
+ }
+ if (input != o.input) {
+ return input < o.input ? -1 : 1;
+ }
+ if (screenLayout != o.screenLayout) {
+ return screenLayout < o.screenLayout ? -1 : 1;
+ }
+ if (uiMode != o.uiMode) {
+ return uiMode < o.uiMode ? -1 : 1;
+ }
+ if (version != o.version) {
+ return version < o.version ? -1 : 1;
+ }
+ return 0;
+}
+
+int ResTable_config::diff(const ResTable_config& o) const {
+ int diffs = 0;
+ if (mcc != o.mcc) diffs |= CONFIG_MCC;
+ if (mnc != o.mnc) diffs |= CONFIG_MNC;
+ if (locale != o.locale) diffs |= CONFIG_LOCALE;
+ if (orientation != o.orientation) diffs |= CONFIG_ORIENTATION;
+ if (density != o.density) diffs |= CONFIG_DENSITY;
+ if (touchscreen != o.touchscreen) diffs |= CONFIG_TOUCHSCREEN;
+ if (((inputFlags^o.inputFlags)&(MASK_KEYSHIDDEN|MASK_NAVHIDDEN)) != 0)
+ diffs |= CONFIG_KEYBOARD_HIDDEN;
+ if (keyboard != o.keyboard) diffs |= CONFIG_KEYBOARD;
+ if (navigation != o.navigation) diffs |= CONFIG_NAVIGATION;
+ if (screenSize != o.screenSize) diffs |= CONFIG_SCREEN_SIZE;
+ if (version != o.version) diffs |= CONFIG_VERSION;
+ if (screenLayout != o.screenLayout) diffs |= CONFIG_SCREEN_LAYOUT;
+ if (uiMode != o.uiMode) diffs |= CONFIG_UI_MODE;
+ if (smallestScreenWidthDp != o.smallestScreenWidthDp) diffs |= CONFIG_SMALLEST_SCREEN_SIZE;
+ if (screenSizeDp != o.screenSizeDp) diffs |= CONFIG_SCREEN_SIZE;
+ return diffs;
+}
+
+bool ResTable_config::isMoreSpecificThan(const ResTable_config& o) const {
+ // The order of the following tests defines the importance of one
+ // configuration parameter over another. Those tests first are more
+ // important, trumping any values in those following them.
+ if (imsi || o.imsi) {
+ if (mcc != o.mcc) {
+ if (!mcc) return false;
+ if (!o.mcc) return true;
+ }
+
+ if (mnc != o.mnc) {
+ if (!mnc) return false;
+ if (!o.mnc) return true;
+ }
+ }
+
+ if (locale || o.locale) {
+ if (language[0] != o.language[0]) {
+ if (!language[0]) return false;
+ if (!o.language[0]) return true;
+ }
+
+ if (country[0] != o.country[0]) {
+ if (!country[0]) return false;
+ if (!o.country[0]) return true;
+ }
+ }
+
+ if (smallestScreenWidthDp || o.smallestScreenWidthDp) {
+ if (smallestScreenWidthDp != o.smallestScreenWidthDp) {
+ if (!smallestScreenWidthDp) return false;
+ if (!o.smallestScreenWidthDp) return true;
+ }
+ }
+
+ if (screenSizeDp || o.screenSizeDp) {
+ if (screenWidthDp != o.screenWidthDp) {
+ if (!screenWidthDp) return false;
+ if (!o.screenWidthDp) return true;
+ }
+
+ if (screenHeightDp != o.screenHeightDp) {
+ if (!screenHeightDp) return false;
+ if (!o.screenHeightDp) return true;
+ }
+ }
+
+ if (screenLayout || o.screenLayout) {
+ if (((screenLayout^o.screenLayout) & MASK_SCREENSIZE) != 0) {
+ if (!(screenLayout & MASK_SCREENSIZE)) return false;
+ if (!(o.screenLayout & MASK_SCREENSIZE)) return true;
+ }
+ if (((screenLayout^o.screenLayout) & MASK_SCREENLONG) != 0) {
+ if (!(screenLayout & MASK_SCREENLONG)) return false;
+ if (!(o.screenLayout & MASK_SCREENLONG)) return true;
+ }
+ }
+
+ if (orientation != o.orientation) {
+ if (!orientation) return false;
+ if (!o.orientation) return true;
+ }
+
+ if (uiMode || o.uiMode) {
+ if (((uiMode^o.uiMode) & MASK_UI_MODE_TYPE) != 0) {
+ if (!(uiMode & MASK_UI_MODE_TYPE)) return false;
+ if (!(o.uiMode & MASK_UI_MODE_TYPE)) return true;
+ }
+ if (((uiMode^o.uiMode) & MASK_UI_MODE_NIGHT) != 0) {
+ if (!(uiMode & MASK_UI_MODE_NIGHT)) return false;
+ if (!(o.uiMode & MASK_UI_MODE_NIGHT)) return true;
+ }
+ }
+
+ // density is never 'more specific'
+ // as the default just equals 160
+
+ if (touchscreen != o.touchscreen) {
+ if (!touchscreen) return false;
+ if (!o.touchscreen) return true;
+ }
+
+ if (input || o.input) {
+ if (((inputFlags^o.inputFlags) & MASK_KEYSHIDDEN) != 0) {
+ if (!(inputFlags & MASK_KEYSHIDDEN)) return false;
+ if (!(o.inputFlags & MASK_KEYSHIDDEN)) return true;
+ }
+
+ if (((inputFlags^o.inputFlags) & MASK_NAVHIDDEN) != 0) {
+ if (!(inputFlags & MASK_NAVHIDDEN)) return false;
+ if (!(o.inputFlags & MASK_NAVHIDDEN)) return true;
+ }
+
+ if (keyboard != o.keyboard) {
+ if (!keyboard) return false;
+ if (!o.keyboard) return true;
+ }
+
+ if (navigation != o.navigation) {
+ if (!navigation) return false;
+ if (!o.navigation) return true;
+ }
+ }
+
+ if (screenSize || o.screenSize) {
+ if (screenWidth != o.screenWidth) {
+ if (!screenWidth) return false;
+ if (!o.screenWidth) return true;
+ }
+
+ if (screenHeight != o.screenHeight) {
+ if (!screenHeight) return false;
+ if (!o.screenHeight) return true;
+ }
+ }
+
+ if (version || o.version) {
+ if (sdkVersion != o.sdkVersion) {
+ if (!sdkVersion) return false;
+ if (!o.sdkVersion) return true;
+ }
+
+ if (minorVersion != o.minorVersion) {
+ if (!minorVersion) return false;
+ if (!o.minorVersion) return true;
+ }
+ }
+ return false;
+}
+
+bool ResTable_config::isBetterThan(const ResTable_config& o,
+ const ResTable_config* requested) const {
+ if (requested) {
+ if (imsi || o.imsi) {
+ if ((mcc != o.mcc) && requested->mcc) {
+ return (mcc);
+ }
+
+ if ((mnc != o.mnc) && requested->mnc) {
+ return (mnc);
+ }
+ }
+
+ if (locale || o.locale) {
+ if ((language[0] != o.language[0]) && requested->language[0]) {
+ return (language[0]);
+ }
+
+ if ((country[0] != o.country[0]) && requested->country[0]) {
+ return (country[0]);
+ }
+ }
+
+ if (smallestScreenWidthDp || o.smallestScreenWidthDp) {
+ // The configuration closest to the actual size is best.
+ // We assume that larger configs have already been filtered
+ // out at this point. That means we just want the largest one.
+ return smallestScreenWidthDp >= o.smallestScreenWidthDp;
+ }
+
+ if (screenSizeDp || o.screenSizeDp) {
+ // "Better" is based on the sum of the difference between both
+ // width and height from the requested dimensions. We are
+ // assuming the invalid configs (with smaller dimens) have
+ // already been filtered. Note that if a particular dimension
+ // is unspecified, we will end up with a large value (the
+ // difference between 0 and the requested dimension), which is
+ // good since we will prefer a config that has specified a
+ // dimension value.
+ int myDelta = 0, otherDelta = 0;
+ if (requested->screenWidthDp) {
+ myDelta += requested->screenWidthDp - screenWidthDp;
+ otherDelta += requested->screenWidthDp - o.screenWidthDp;
+ }
+ if (requested->screenHeightDp) {
+ myDelta += requested->screenHeightDp - screenHeightDp;
+ otherDelta += requested->screenHeightDp - o.screenHeightDp;
+ }
+ //ALOGI("Comparing this %dx%d to other %dx%d in %dx%d: myDelta=%d otherDelta=%d",
+ // screenWidthDp, screenHeightDp, o.screenWidthDp, o.screenHeightDp,
+ // requested->screenWidthDp, requested->screenHeightDp, myDelta, otherDelta);
+ return (myDelta <= otherDelta);
+ }
+
+ if (screenLayout || o.screenLayout) {
+ if (((screenLayout^o.screenLayout) & MASK_SCREENSIZE) != 0
+ && (requested->screenLayout & MASK_SCREENSIZE)) {
+ // A little backwards compatibility here: undefined is
+ // considered equivalent to normal. But only if the
+ // requested size is at least normal; otherwise, small
+ // is better than the default.
+ int mySL = (screenLayout & MASK_SCREENSIZE);
+ int oSL = (o.screenLayout & MASK_SCREENSIZE);
+ int fixedMySL = mySL;
+ int fixedOSL = oSL;
+ if ((requested->screenLayout & MASK_SCREENSIZE) >= SCREENSIZE_NORMAL) {
+ if (fixedMySL == 0) fixedMySL = SCREENSIZE_NORMAL;
+ if (fixedOSL == 0) fixedOSL = SCREENSIZE_NORMAL;
+ }
+ // For screen size, the best match is the one that is
+ // closest to the requested screen size, but not over
+ // (the not over part is dealt with in match() below).
+ if (fixedMySL == fixedOSL) {
+ // If the two are the same, but 'this' is actually
+ // undefined, then the other is really a better match.
+ if (mySL == 0) return false;
+ return true;
+ }
+ return fixedMySL >= fixedOSL;
+ }
+ if (((screenLayout^o.screenLayout) & MASK_SCREENLONG) != 0
+ && (requested->screenLayout & MASK_SCREENLONG)) {
+ return (screenLayout & MASK_SCREENLONG);
+ }
+ }
+
+ if ((orientation != o.orientation) && requested->orientation) {
+ return (orientation);
+ }
+
+ if (uiMode || o.uiMode) {
+ if (((uiMode^o.uiMode) & MASK_UI_MODE_TYPE) != 0
+ && (requested->uiMode & MASK_UI_MODE_TYPE)) {
+ return (uiMode & MASK_UI_MODE_TYPE);
+ }
+ if (((uiMode^o.uiMode) & MASK_UI_MODE_NIGHT) != 0
+ && (requested->uiMode & MASK_UI_MODE_NIGHT)) {
+ return (uiMode & MASK_UI_MODE_NIGHT);
+ }
+ }
+
+ if (screenType || o.screenType) {
+ if (density != o.density) {
+ // density is tough. Any density is potentially useful
+ // because the system will scale it. Scaling down
+ // is generally better than scaling up.
+ // Default density counts as 160dpi (the system default)
+ // TODO - remove 160 constants
+ int h = (density?density:160);
+ int l = (o.density?o.density:160);
+ bool bImBigger = true;
+ if (l > h) {
+ int t = h;
+ h = l;
+ l = t;
+ bImBigger = false;
+ }
+
+ int reqValue = (requested->density?requested->density:160);
+ if (reqValue >= h) {
+ // requested value higher than both l and h, give h
+ return bImBigger;
+ }
+ if (l >= reqValue) {
+ // requested value lower than both l and h, give l
+ return !bImBigger;
+ }
+ // saying that scaling down is 2x better than up
+ if (((2 * l) - reqValue) * h > reqValue * reqValue) {
+ return !bImBigger;
+ } else {
+ return bImBigger;
+ }
+ }
+
+ if ((touchscreen != o.touchscreen) && requested->touchscreen) {
+ return (touchscreen);
+ }
+ }
+
+ if (input || o.input) {
+ const int keysHidden = inputFlags & MASK_KEYSHIDDEN;
+ const int oKeysHidden = o.inputFlags & MASK_KEYSHIDDEN;
+ if (keysHidden != oKeysHidden) {
+ const int reqKeysHidden =
+ requested->inputFlags & MASK_KEYSHIDDEN;
+ if (reqKeysHidden) {
+
+ if (!keysHidden) return false;
+ if (!oKeysHidden) return true;
+ // For compatibility, we count KEYSHIDDEN_NO as being
+ // the same as KEYSHIDDEN_SOFT. Here we disambiguate
+ // these by making an exact match more specific.
+ if (reqKeysHidden == keysHidden) return true;
+ if (reqKeysHidden == oKeysHidden) return false;
+ }
+ }
+
+ const int navHidden = inputFlags & MASK_NAVHIDDEN;
+ const int oNavHidden = o.inputFlags & MASK_NAVHIDDEN;
+ if (navHidden != oNavHidden) {
+ const int reqNavHidden =
+ requested->inputFlags & MASK_NAVHIDDEN;
+ if (reqNavHidden) {
+
+ if (!navHidden) return false;
+ if (!oNavHidden) return true;
+ }
+ }
+
+ if ((keyboard != o.keyboard) && requested->keyboard) {
+ return (keyboard);
+ }
+
+ if ((navigation != o.navigation) && requested->navigation) {
+ return (navigation);
+ }
+ }
+
+ if (screenSize || o.screenSize) {
+ // "Better" is based on the sum of the difference between both
+ // width and height from the requested dimensions. We are
+ // assuming the invalid configs (with smaller sizes) have
+ // already been filtered. Note that if a particular dimension
+ // is unspecified, we will end up with a large value (the
+ // difference between 0 and the requested dimension), which is
+ // good since we will prefer a config that has specified a
+ // size value.
+ int myDelta = 0, otherDelta = 0;
+ if (requested->screenWidth) {
+ myDelta += requested->screenWidth - screenWidth;
+ otherDelta += requested->screenWidth - o.screenWidth;
+ }
+ if (requested->screenHeight) {
+ myDelta += requested->screenHeight - screenHeight;
+ otherDelta += requested->screenHeight - o.screenHeight;
+ }
+ return (myDelta <= otherDelta);
+ }
+
+ if (version || o.version) {
+ if ((sdkVersion != o.sdkVersion) && requested->sdkVersion) {
+ return (sdkVersion > o.sdkVersion);
+ }
+
+ if ((minorVersion != o.minorVersion) &&
+ requested->minorVersion) {
+ return (minorVersion);
+ }
+ }
+
+ return false;
+ }
+ return isMoreSpecificThan(o);
+}
+
+bool ResTable_config::match(const ResTable_config& settings) const {
+ if (imsi != 0) {
+ if (mcc != 0 && mcc != settings.mcc) {
+ return false;
+ }
+ if (mnc != 0 && mnc != settings.mnc) {
+ return false;
+ }
+ }
+ if (locale != 0) {
+ if (language[0] != 0
+ && (language[0] != settings.language[0]
+ || language[1] != settings.language[1])) {
+ return false;
+ }
+ if (country[0] != 0
+ && (country[0] != settings.country[0]
+ || country[1] != settings.country[1])) {
+ return false;
+ }
+ }
+ if (screenConfig != 0) {
+ const int screenSize = screenLayout&MASK_SCREENSIZE;
+ const int setScreenSize = settings.screenLayout&MASK_SCREENSIZE;
+ // Any screen sizes for larger screens than the setting do not
+ // match.
+ if (screenSize != 0 && screenSize > setScreenSize) {
+ return false;
+ }
+
+ const int screenLong = screenLayout&MASK_SCREENLONG;
+ const int setScreenLong = settings.screenLayout&MASK_SCREENLONG;
+ if (screenLong != 0 && screenLong != setScreenLong) {
+ return false;
+ }
+
+ const int uiModeType = uiMode&MASK_UI_MODE_TYPE;
+ const int setUiModeType = settings.uiMode&MASK_UI_MODE_TYPE;
+ if (uiModeType != 0 && uiModeType != setUiModeType) {
+ return false;
+ }
+
+ const int uiModeNight = uiMode&MASK_UI_MODE_NIGHT;
+ const int setUiModeNight = settings.uiMode&MASK_UI_MODE_NIGHT;
+ if (uiModeNight != 0 && uiModeNight != setUiModeNight) {
+ return false;
+ }
+
+ if (smallestScreenWidthDp != 0
+ && smallestScreenWidthDp > settings.smallestScreenWidthDp) {
+ return false;
+ }
+ }
+ if (screenSizeDp != 0) {
+ if (screenWidthDp != 0 && screenWidthDp > settings.screenWidthDp) {
+ //ALOGI("Filtering out width %d in requested %d", screenWidthDp, settings.screenWidthDp);
+ return false;
+ }
+ if (screenHeightDp != 0 && screenHeightDp > settings.screenHeightDp) {
+ //ALOGI("Filtering out height %d in requested %d", screenHeightDp, settings.screenHeightDp);
+ return false;
+ }
+ }
+ if (screenType != 0) {
+ if (orientation != 0 && orientation != settings.orientation) {
+ return false;
+ }
+ // density always matches - we can scale it. See isBetterThan
+ if (touchscreen != 0 && touchscreen != settings.touchscreen) {
+ return false;
+ }
+ }
+ if (input != 0) {
+ const int keysHidden = inputFlags&MASK_KEYSHIDDEN;
+ const int setKeysHidden = settings.inputFlags&MASK_KEYSHIDDEN;
+ if (keysHidden != 0 && keysHidden != setKeysHidden) {
+ // For compatibility, we count a request for KEYSHIDDEN_NO as also
+ // matching the more recent KEYSHIDDEN_SOFT. Basically
+ // KEYSHIDDEN_NO means there is some kind of keyboard available.
+ //ALOGI("Matching keysHidden: have=%d, config=%d\n", keysHidden, setKeysHidden);
+ if (keysHidden != KEYSHIDDEN_NO || setKeysHidden != KEYSHIDDEN_SOFT) {
+ //ALOGI("No match!");
+ return false;
+ }
+ }
+ const int navHidden = inputFlags&MASK_NAVHIDDEN;
+ const int setNavHidden = settings.inputFlags&MASK_NAVHIDDEN;
+ if (navHidden != 0 && navHidden != setNavHidden) {
+ return false;
+ }
+ if (keyboard != 0 && keyboard != settings.keyboard) {
+ return false;
+ }
+ if (navigation != 0 && navigation != settings.navigation) {
+ return false;
+ }
+ }
+ if (screenSize != 0) {
+ if (screenWidth != 0 && screenWidth > settings.screenWidth) {
+ return false;
+ }
+ if (screenHeight != 0 && screenHeight > settings.screenHeight) {
+ return false;
+ }
+ }
+ if (version != 0) {
+ if (sdkVersion != 0 && sdkVersion > settings.sdkVersion) {
+ return false;
+ }
+ if (minorVersion != 0 && minorVersion != settings.minorVersion) {
+ return false;
+ }
+ }
+ return true;
+}
+
+void ResTable_config::getLocale(char str[6]) const {
+ memset(str, 0, 6);
+ if (language[0]) {
+ str[0] = language[0];
+ str[1] = language[1];
+ if (country[0]) {
+ str[2] = '_';
+ str[3] = country[0];
+ str[4] = country[1];
+ }
+ }
+}
+
+String8 ResTable_config::toString() const {
+ String8 res;
+
+ if (mcc != 0) {
+ if (res.size() > 0) res.append("-");
+ res.appendFormat("%dmcc", dtohs(mcc));
+ }
+ if (mnc != 0) {
+ if (res.size() > 0) res.append("-");
+ res.appendFormat("%dmnc", dtohs(mnc));
+ }
+ if (language[0] != 0) {
+ if (res.size() > 0) res.append("-");
+ res.append(language, 2);
+ }
+ if (country[0] != 0) {
+ if (res.size() > 0) res.append("-");
+ res.append(country, 2);
+ }
+ if (smallestScreenWidthDp != 0) {
+ if (res.size() > 0) res.append("-");
+ res.appendFormat("sw%ddp", dtohs(smallestScreenWidthDp));
+ }
+ if (screenWidthDp != 0) {
+ if (res.size() > 0) res.append("-");
+ res.appendFormat("w%ddp", dtohs(screenWidthDp));
+ }
+ if (screenHeightDp != 0) {
+ if (res.size() > 0) res.append("-");
+ res.appendFormat("h%ddp", dtohs(screenHeightDp));
+ }
+ if ((screenLayout&MASK_SCREENSIZE) != SCREENSIZE_ANY) {
+ if (res.size() > 0) res.append("-");
+ switch (screenLayout&ResTable_config::MASK_SCREENSIZE) {
+ case ResTable_config::SCREENSIZE_SMALL:
+ res.append("small");
+ break;
+ case ResTable_config::SCREENSIZE_NORMAL:
+ res.append("normal");
+ break;
+ case ResTable_config::SCREENSIZE_LARGE:
+ res.append("large");
+ break;
+ case ResTable_config::SCREENSIZE_XLARGE:
+ res.append("xlarge");
+ break;
+ default:
+ res.appendFormat("screenLayoutSize=%d",
+ dtohs(screenLayout&ResTable_config::MASK_SCREENSIZE));
+ break;
+ }
+ }
+ if ((screenLayout&MASK_SCREENLONG) != 0) {
+ if (res.size() > 0) res.append("-");
+ switch (screenLayout&ResTable_config::MASK_SCREENLONG) {
+ case ResTable_config::SCREENLONG_NO:
+ res.append("notlong");
+ break;
+ case ResTable_config::SCREENLONG_YES:
+ res.append("long");
+ break;
+ default:
+ res.appendFormat("screenLayoutLong=%d",
+ dtohs(screenLayout&ResTable_config::MASK_SCREENLONG));
+ break;
+ }
+ }
+ if (orientation != ORIENTATION_ANY) {
+ if (res.size() > 0) res.append("-");
+ switch (orientation) {
+ case ResTable_config::ORIENTATION_PORT:
+ res.append("port");
+ break;
+ case ResTable_config::ORIENTATION_LAND:
+ res.append("land");
+ break;
+ case ResTable_config::ORIENTATION_SQUARE:
+ res.append("square");
+ break;
+ default:
+ res.appendFormat("orientation=%d", dtohs(orientation));
+ break;
+ }
+ }
+ if ((uiMode&MASK_UI_MODE_TYPE) != UI_MODE_TYPE_ANY) {
+ if (res.size() > 0) res.append("-");
+ switch (uiMode&ResTable_config::MASK_UI_MODE_TYPE) {
+ case ResTable_config::UI_MODE_TYPE_DESK:
+ res.append("desk");
+ break;
+ case ResTable_config::UI_MODE_TYPE_CAR:
+ res.append("car");
+ break;
+ case ResTable_config::UI_MODE_TYPE_TELEVISION:
+ res.append("television");
+ break;
+ case ResTable_config::UI_MODE_TYPE_APPLIANCE:
+ res.append("appliance");
+ break;
+ default:
+ res.appendFormat("uiModeType=%d",
+ dtohs(screenLayout&ResTable_config::MASK_UI_MODE_TYPE));
+ break;
+ }
+ }
+ if ((uiMode&MASK_UI_MODE_NIGHT) != 0) {
+ if (res.size() > 0) res.append("-");
+ switch (uiMode&ResTable_config::MASK_UI_MODE_NIGHT) {
+ case ResTable_config::UI_MODE_NIGHT_NO:
+ res.append("notnight");
+ break;
+ case ResTable_config::UI_MODE_NIGHT_YES:
+ res.append("night");
+ break;
+ default:
+ res.appendFormat("uiModeNight=%d",
+ dtohs(uiMode&MASK_UI_MODE_NIGHT));
+ break;
+ }
+ }
+ if (density != DENSITY_DEFAULT) {
+ if (res.size() > 0) res.append("-");
+ switch (density) {
+ case ResTable_config::DENSITY_LOW:
+ res.append("ldpi");
+ break;
+ case ResTable_config::DENSITY_MEDIUM:
+ res.append("mdpi");
+ break;
+ case ResTable_config::DENSITY_TV:
+ res.append("tvdpi");
+ break;
+ case ResTable_config::DENSITY_HIGH:
+ res.append("hdpi");
+ break;
+ case ResTable_config::DENSITY_XHIGH:
+ res.append("xhdpi");
+ break;
+ case ResTable_config::DENSITY_XXHIGH:
+ res.append("xxhdpi");
+ break;
+ case ResTable_config::DENSITY_NONE:
+ res.append("nodpi");
+ break;
+ default:
+ res.appendFormat("density=%d", dtohs(density));
+ break;
+ }
+ }
+ if (touchscreen != TOUCHSCREEN_ANY) {
+ if (res.size() > 0) res.append("-");
+ switch (touchscreen) {
+ case ResTable_config::TOUCHSCREEN_NOTOUCH:
+ res.append("notouch");
+ break;
+ case ResTable_config::TOUCHSCREEN_FINGER:
+ res.append("finger");
+ break;
+ case ResTable_config::TOUCHSCREEN_STYLUS:
+ res.append("stylus");
+ break;
+ default:
+ res.appendFormat("touchscreen=%d", dtohs(touchscreen));
+ break;
+ }
+ }
+ if (keyboard != KEYBOARD_ANY) {
+ if (res.size() > 0) res.append("-");
+ switch (keyboard) {
+ case ResTable_config::KEYBOARD_NOKEYS:
+ res.append("nokeys");
+ break;
+ case ResTable_config::KEYBOARD_QWERTY:
+ res.append("qwerty");
+ break;
+ case ResTable_config::KEYBOARD_12KEY:
+ res.append("12key");
+ break;
+ default:
+ res.appendFormat("keyboard=%d", dtohs(keyboard));
+ break;
+ }
+ }
+ if ((inputFlags&MASK_KEYSHIDDEN) != 0) {
+ if (res.size() > 0) res.append("-");
+ switch (inputFlags&MASK_KEYSHIDDEN) {
+ case ResTable_config::KEYSHIDDEN_NO:
+ res.append("keysexposed");
+ break;
+ case ResTable_config::KEYSHIDDEN_YES:
+ res.append("keyshidden");
+ break;
+ case ResTable_config::KEYSHIDDEN_SOFT:
+ res.append("keyssoft");
+ break;
+ }
+ }
+ if (navigation != NAVIGATION_ANY) {
+ if (res.size() > 0) res.append("-");
+ switch (navigation) {
+ case ResTable_config::NAVIGATION_NONAV:
+ res.append("nonav");
+ break;
+ case ResTable_config::NAVIGATION_DPAD:
+ res.append("dpad");
+ break;
+ case ResTable_config::NAVIGATION_TRACKBALL:
+ res.append("trackball");
+ break;
+ case ResTable_config::NAVIGATION_WHEEL:
+ res.append("wheel");
+ break;
+ default:
+ res.appendFormat("navigation=%d", dtohs(navigation));
+ break;
+ }
+ }
+ if ((inputFlags&MASK_NAVHIDDEN) != 0) {
+ if (res.size() > 0) res.append("-");
+ switch (inputFlags&MASK_NAVHIDDEN) {
+ case ResTable_config::NAVHIDDEN_NO:
+ res.append("navsexposed");
+ break;
+ case ResTable_config::NAVHIDDEN_YES:
+ res.append("navhidden");
+ break;
+ default:
+ res.appendFormat("inputFlagsNavHidden=%d",
+ dtohs(inputFlags&MASK_NAVHIDDEN));
+ break;
+ }
+ }
+ if (screenSize != 0) {
+ if (res.size() > 0) res.append("-");
+ res.appendFormat("%dx%d", dtohs(screenWidth), dtohs(screenHeight));
+ }
+ if (version != 0) {
+ if (res.size() > 0) res.append("-");
+ res.appendFormat("v%d", dtohs(sdkVersion));
+ if (minorVersion != 0) {
+ res.appendFormat(".%d", dtohs(minorVersion));
+ }
+ }
+
+ return res;
+}
+
+// --------------------------------------------------------------------
+// --------------------------------------------------------------------
+// --------------------------------------------------------------------
+
struct ResTable::Header
{
Header(ResTable* _owner) : owner(_owner), ownedData(NULL), header(NULL),
@@ -3953,43 +4843,9 @@ ssize_t ResTable::getEntry(
ResTable_config thisConfig;
thisConfig.copyFromDtoH(thisType->config);
- TABLE_GETENTRY(LOGI("Match entry 0x%x in type 0x%x (sz 0x%x): imsi:%d/%d=%d/%d "
- "lang:%c%c=%c%c cnt:%c%c=%c%c orien:%d=%d touch:%d=%d "
- "density:%d=%d key:%d=%d inp:%d=%d nav:%d=%d w:%d=%d h:%d=%d "
- "swdp:%d=%d wdp:%d=%d hdp:%d=%d\n",
+ TABLE_GETENTRY(LOGI("Match entry 0x%x in type 0x%x (sz 0x%x): %s\n",
entryIndex, typeIndex+1, dtohl(thisType->config.size),
- thisConfig.mcc, thisConfig.mnc,
- config ? config->mcc : 0, config ? config->mnc : 0,
- thisConfig.language[0] ? thisConfig.language[0] : '-',
- thisConfig.language[1] ? thisConfig.language[1] : '-',
- config && config->language[0] ? config->language[0] : '-',
- config && config->language[1] ? config->language[1] : '-',
- thisConfig.country[0] ? thisConfig.country[0] : '-',
- thisConfig.country[1] ? thisConfig.country[1] : '-',
- config && config->country[0] ? config->country[0] : '-',
- config && config->country[1] ? config->country[1] : '-',
- thisConfig.orientation,
- config ? config->orientation : 0,
- thisConfig.touchscreen,
- config ? config->touchscreen : 0,
- thisConfig.density,
- config ? config->density : 0,
- thisConfig.keyboard,
- config ? config->keyboard : 0,
- thisConfig.inputFlags,
- config ? config->inputFlags : 0,
- thisConfig.navigation,
- config ? config->navigation : 0,
- thisConfig.screenWidth,
- config ? config->screenWidth : 0,
- thisConfig.screenHeight,
- config ? config->screenHeight : 0,
- thisConfig.smallestScreenWidthDp,
- config ? config->smallestScreenWidthDp : 0,
- thisConfig.screenWidthDp,
- config ? config->screenWidthDp : 0,
- thisConfig.screenHeightDp,
- config ? config->screenHeightDp : 0));
+ thisConfig.toString().string()));
// Check to make sure this one is valid for the current parameters.
if (config && !thisConfig.match(*config)) {
@@ -4273,26 +5129,8 @@ status_t ResTable::parsePackage(const ResTable_package* const pkg,
TABLE_GETENTRY(
ResTable_config thisConfig;
thisConfig.copyFromDtoH(type->config);
- ALOGI("Adding config to type %d: imsi:%d/%d lang:%c%c cnt:%c%c "
- "orien:%d touch:%d density:%d key:%d inp:%d nav:%d w:%d h:%d "
- "swdp:%d wdp:%d hdp:%d\n",
- type->id,
- thisConfig.mcc, thisConfig.mnc,
- thisConfig.language[0] ? thisConfig.language[0] : '-',
- thisConfig.language[1] ? thisConfig.language[1] : '-',
- thisConfig.country[0] ? thisConfig.country[0] : '-',
- thisConfig.country[1] ? thisConfig.country[1] : '-',
- thisConfig.orientation,
- thisConfig.touchscreen,
- thisConfig.density,
- thisConfig.keyboard,
- thisConfig.inputFlags,
- thisConfig.navigation,
- thisConfig.screenWidth,
- thisConfig.screenHeight,
- thisConfig.smallestScreenWidthDp,
- thisConfig.screenWidthDp,
- thisConfig.screenHeightDp));
+ ALOGI("Adding config to type %d: %s\n",
+ type->id, thisConfig.toString().string()));
t->configs.add(type);
} else {
status_t err = validate_chunk(chunk, sizeof(ResChunk_header),
@@ -4622,186 +5460,9 @@ void ResTable::print(bool inclValues) const
printf(" NON-INTEGER ResTable_type ADDRESS: %p\n", type);
continue;
}
- char density[16];
- uint16_t dval = dtohs(type->config.density);
- if (dval == ResTable_config::DENSITY_DEFAULT) {
- strcpy(density, "def");
- } else if (dval == ResTable_config::DENSITY_NONE) {
- strcpy(density, "no");
- } else {
- sprintf(density, "%d", (int)dval);
- }
- printf(" config %d", (int)configIndex);
- if (type->config.mcc != 0) {
- printf(" mcc=%d", dtohs(type->config.mcc));
- }
- if (type->config.mnc != 0) {
- printf(" mnc=%d", dtohs(type->config.mnc));
- }
- if (type->config.locale != 0) {
- printf(" lang=%c%c cnt=%c%c",
- type->config.language[0] ? type->config.language[0] : '-',
- type->config.language[1] ? type->config.language[1] : '-',
- type->config.country[0] ? type->config.country[0] : '-',
- type->config.country[1] ? type->config.country[1] : '-');
- }
- if (type->config.screenLayout != 0) {
- printf(" sz=%d",
- type->config.screenLayout&ResTable_config::MASK_SCREENSIZE);
- switch (type->config.screenLayout&ResTable_config::MASK_SCREENSIZE) {
- case ResTable_config::SCREENSIZE_SMALL:
- printf(" (small)");
- break;
- case ResTable_config::SCREENSIZE_NORMAL:
- printf(" (normal)");
- break;
- case ResTable_config::SCREENSIZE_LARGE:
- printf(" (large)");
- break;
- case ResTable_config::SCREENSIZE_XLARGE:
- printf(" (xlarge)");
- break;
- }
- printf(" lng=%d",
- type->config.screenLayout&ResTable_config::MASK_SCREENLONG);
- switch (type->config.screenLayout&ResTable_config::MASK_SCREENLONG) {
- case ResTable_config::SCREENLONG_NO:
- printf(" (notlong)");
- break;
- case ResTable_config::SCREENLONG_YES:
- printf(" (long)");
- break;
- }
- }
- if (type->config.orientation != 0) {
- printf(" orient=%d", type->config.orientation);
- switch (type->config.orientation) {
- case ResTable_config::ORIENTATION_PORT:
- printf(" (port)");
- break;
- case ResTable_config::ORIENTATION_LAND:
- printf(" (land)");
- break;
- case ResTable_config::ORIENTATION_SQUARE:
- printf(" (square)");
- break;
- }
- }
- if (type->config.uiMode != 0) {
- printf(" type=%d",
- type->config.uiMode&ResTable_config::MASK_UI_MODE_TYPE);
- switch (type->config.uiMode&ResTable_config::MASK_UI_MODE_TYPE) {
- case ResTable_config::UI_MODE_TYPE_NORMAL:
- printf(" (normal)");
- break;
- case ResTable_config::UI_MODE_TYPE_CAR:
- printf(" (car)");
- break;
- }
- printf(" night=%d",
- type->config.uiMode&ResTable_config::MASK_UI_MODE_NIGHT);
- switch (type->config.uiMode&ResTable_config::MASK_UI_MODE_NIGHT) {
- case ResTable_config::UI_MODE_NIGHT_NO:
- printf(" (no)");
- break;
- case ResTable_config::UI_MODE_NIGHT_YES:
- printf(" (yes)");
- break;
- }
- }
- if (dval != 0) {
- printf(" density=%s", density);
- }
- if (type->config.touchscreen != 0) {
- printf(" touch=%d", type->config.touchscreen);
- switch (type->config.touchscreen) {
- case ResTable_config::TOUCHSCREEN_NOTOUCH:
- printf(" (notouch)");
- break;
- case ResTable_config::TOUCHSCREEN_STYLUS:
- printf(" (stylus)");
- break;
- case ResTable_config::TOUCHSCREEN_FINGER:
- printf(" (finger)");
- break;
- }
- }
- if (type->config.inputFlags != 0) {
- printf(" keyhid=%d", type->config.inputFlags&ResTable_config::MASK_KEYSHIDDEN);
- switch (type->config.inputFlags&ResTable_config::MASK_KEYSHIDDEN) {
- case ResTable_config::KEYSHIDDEN_NO:
- printf(" (no)");
- break;
- case ResTable_config::KEYSHIDDEN_YES:
- printf(" (yes)");
- break;
- case ResTable_config::KEYSHIDDEN_SOFT:
- printf(" (soft)");
- break;
- }
- printf(" navhid=%d", type->config.inputFlags&ResTable_config::MASK_NAVHIDDEN);
- switch (type->config.inputFlags&ResTable_config::MASK_NAVHIDDEN) {
- case ResTable_config::NAVHIDDEN_NO:
- printf(" (no)");
- break;
- case ResTable_config::NAVHIDDEN_YES:
- printf(" (yes)");
- break;
- }
- }
- if (type->config.keyboard != 0) {
- printf(" kbd=%d", type->config.keyboard);
- switch (type->config.keyboard) {
- case ResTable_config::KEYBOARD_NOKEYS:
- printf(" (nokeys)");
- break;
- case ResTable_config::KEYBOARD_QWERTY:
- printf(" (qwerty)");
- break;
- case ResTable_config::KEYBOARD_12KEY:
- printf(" (12key)");
- break;
- }
- }
- if (type->config.navigation != 0) {
- printf(" nav=%d", type->config.navigation);
- switch (type->config.navigation) {
- case ResTable_config::NAVIGATION_NONAV:
- printf(" (nonav)");
- break;
- case ResTable_config::NAVIGATION_DPAD:
- printf(" (dpad)");
- break;
- case ResTable_config::NAVIGATION_TRACKBALL:
- printf(" (trackball)");
- break;
- case ResTable_config::NAVIGATION_WHEEL:
- printf(" (wheel)");
- break;
- }
- }
- if (type->config.screenWidth != 0) {
- printf(" w=%d", dtohs(type->config.screenWidth));
- }
- if (type->config.screenHeight != 0) {
- printf(" h=%d", dtohs(type->config.screenHeight));
- }
- if (type->config.smallestScreenWidthDp != 0) {
- printf(" swdp=%d", dtohs(type->config.smallestScreenWidthDp));
- }
- if (type->config.screenWidthDp != 0) {
- printf(" wdp=%d", dtohs(type->config.screenWidthDp));
- }
- if (type->config.screenHeightDp != 0) {
- printf(" hdp=%d", dtohs(type->config.screenHeightDp));
- }
- if (type->config.sdkVersion != 0) {
- printf(" sdk=%d", dtohs(type->config.sdkVersion));
- }
- if (type->config.minorVersion != 0) {
- printf(" mver=%d", dtohs(type->config.minorVersion));
- }
- printf("\n");
+ String8 configStr = type->config.toString();
+ printf(" config %s:\n", configStr.size() > 0
+ ? configStr.string() : "(default)");
size_t entryCount = dtohl(type->entryCount);
uint32_t entriesStart = dtohl(type->entriesStart);
if ((entriesStart&0x3) != 0) {
diff --git a/opengl/include/GLES/glext.h b/opengl/include/GLES/glext.h
index 65ab5e4..54afaab 100644
--- a/opengl/include/GLES/glext.h
+++ b/opengl/include/GLES/glext.h
@@ -1,7 +1,7 @@
#ifndef __glext_h_
#define __glext_h_
-/* $Revision: 10965 $ on $Date:: 2010-04-09 02:11:29 -0700 #$ */
+/* $Revision: 16481 $ on $Date:: 2012-01-04 10:43:56 -0800 #$ */
#ifdef __cplusplus
extern "C" {
@@ -68,6 +68,14 @@ extern "C" {
typedef void* GLeglImageOES;
#endif
+/* GL_OES_EGL_image_external */
+#ifndef GL_OES_EGL_image_external
+/* GLeglImageOES defined in GL_OES_EGL_image already. */
+#define GL_TEXTURE_EXTERNAL_OES 0x8D65
+#define GL_TEXTURE_BINDING_EXTERNAL_OES 0x8D67
+#define GL_REQUIRED_TEXTURE_IMAGE_UNITS_OES 0x8D68
+#endif
+
/* GL_OES_element_index_uint */
#ifndef GL_OES_element_index_uint
#define GL_UNSIGNED_INT 0x1405
@@ -211,14 +219,6 @@ typedef void* GLeglImageOES;
#define GL_VERTEX_ARRAY_BINDING_OES 0x85B5
#endif
-/* GL_OES_EGL_image_external */
-#ifndef GL_OES_EGL_image_external
-#define GL_TEXTURE_EXTERNAL_OES 0x8D65
-#define GL_SAMPLER_EXTERNAL_OES 0x8D66
-#define GL_TEXTURE_BINDING_EXTERNAL_OES 0x8D67
-#define GL_REQUIRED_TEXTURE_IMAGE_UNITS_OES 0x8D68
-#endif
-
/*------------------------------------------------------------------------*
* AMD extension tokens
*------------------------------------------------------------------------*/
@@ -243,6 +243,34 @@ typedef void* GLeglImageOES;
/* GL_APPLE_texture_2D_limited_npot */
/* No new tokens introduced by this extension. */
+/* GL_APPLE_framebuffer_multisample */
+#ifndef GL_APPLE_framebuffer_multisample
+#define GL_RENDERBUFFER_SAMPLES_APPLE 0x8CAB
+#define GL_FRAMEBUFFER_INCOMPLETE_MULTISAMPLE_APPLE 0x8D56
+#define GL_MAX_SAMPLES_APPLE 0x8D57
+#define GL_READ_FRAMEBUFFER_APPLE 0x8CA8
+#define GL_DRAW_FRAMEBUFFER_APPLE 0x8CA9
+#define GL_DRAW_FRAMEBUFFER_BINDING_APPLE 0x8CA6
+#define GL_READ_FRAMEBUFFER_BINDING_APPLE 0x8CAA
+#endif
+
+/* GL_APPLE_texture_format_BGRA8888 */
+#ifndef GL_APPLE_texture_format_BGRA8888
+#define GL_BGRA_EXT 0x80E1
+#endif
+
+/* GL_APPLE_texture_max_level */
+#ifndef GL_APPLE_texture_max_level
+#define GL_TEXTURE_MAX_LEVEL_APPLE 0x813D
+#endif
+
+/*------------------------------------------------------------------------*
+ * ARM extension tokens
+ *------------------------------------------------------------------------*/
+
+/* GL_ARM_rgba8 */
+/* No new tokens introduced by this extension. */
+
/*------------------------------------------------------------------------*
* EXT extension tokens
*------------------------------------------------------------------------*/
@@ -260,6 +288,14 @@ typedef void* GLeglImageOES;
#define GL_STENCIL_EXT 0x1802
#endif
+/* GL_EXT_multisampled_render_to_texture */
+#ifndef GL_EXT_multisampled_render_to_texture
+#define GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_SAMPLES_EXT 0x8D6C
+#define GL_RENDERBUFFER_SAMPLES_EXT 0x9133
+#define GL_FRAMEBUFFER_INCOMPLETE_MULTISAMPLE_EXT 0x9134
+#define GL_MAX_SAMPLES_EXT 0x9135
+#endif
+
/* GL_EXT_multi_draw_arrays */
/* No new tokens introduced by this extension. */
@@ -270,6 +306,32 @@ typedef void* GLeglImageOES;
#define GL_UNSIGNED_SHORT_1_5_5_5_REV_EXT 0x8366
#endif
+/* GL_EXT_robustness */
+#ifndef GL_EXT_robustness
+/* reuse GL_NO_ERROR */
+#define GL_GUILTY_CONTEXT_RESET_EXT 0x8253
+#define GL_INNOCENT_CONTEXT_RESET_EXT 0x8254
+#define GL_UNKNOWN_CONTEXT_RESET_EXT 0x8255
+#define GL_CONTEXT_ROBUST_ACCESS_EXT 0x90F3
+#define GL_RESET_NOTIFICATION_STRATEGY_EXT 0x8256
+#define GL_LOSE_CONTEXT_ON_RESET_EXT 0x8252
+#define GL_NO_RESET_NOTIFICATION_EXT 0x8261
+#endif
+
+/* GL_EXT_sRGB */
+#ifndef GL_EXT_sRGB
+#define GL_SRGB_EXT 0x8C40
+#define GL_SRGB_ALPHA_EXT 0x8C42
+#define GL_SRGB8_ALPHA8_EXT 0x8C43
+#define GL_FRAMEBUFFER_ATTACHMENT_COLOR_ENCODING_EXT 0x8210
+#endif
+
+/* GL_EXT_texture_compression_dxt1 */
+#ifndef GL_EXT_texture_compression_dxt1
+#define GL_COMPRESSED_RGB_S3TC_DXT1_EXT 0x83F0
+#define GL_COMPRESSED_RGBA_S3TC_DXT1_EXT 0x83F1
+#endif
+
/* GL_EXT_texture_filter_anisotropic */
#ifndef GL_EXT_texture_filter_anisotropic
#define GL_TEXTURE_MAX_ANISOTROPY_EXT 0x84FE
@@ -288,6 +350,27 @@ typedef void* GLeglImageOES;
#define GL_TEXTURE_LOD_BIAS_EXT 0x8501
#endif
+/* GL_EXT_texture_storage */
+#ifndef GL_EXT_texture_storage
+#define GL_TEXTURE_IMMUTABLE_FORMAT_EXT 0x912F
+#define GL_ALPHA8_EXT 0x803C
+#define GL_LUMINANCE8_EXT 0x8040
+#define GL_LUMINANCE8_ALPHA8_EXT 0x8045
+#define GL_RGBA32F_EXT 0x8814
+#define GL_RGB32F_EXT 0x8815
+#define GL_ALPHA32F_EXT 0x8816
+#define GL_LUMINANCE32F_EXT 0x8818
+#define GL_LUMINANCE_ALPHA32F_EXT 0x8819
+/* reuse GL_RGBA16F_EXT */
+#define GL_RGB16F_EXT 0x881B
+#define GL_ALPHA16F_EXT 0x881C
+#define GL_LUMINANCE16F_EXT 0x881E
+#define GL_LUMINANCE_ALPHA16F_EXT 0x881F
+#define GL_RGB10_A2_EXT 0x8059
+#define GL_RGB10_EXT 0x8052
+#define GL_BGRA8_EXT 0x93A1
+#endif
+
/*------------------------------------------------------------------------*
* IMG extension tokens
*------------------------------------------------------------------------*/
@@ -507,6 +590,12 @@ typedef void (GL_APIENTRYP PFNGLEGLIMAGETARGETTEXTURE2DOESPROC) (GLenum target,
typedef void (GL_APIENTRYP PFNGLEGLIMAGETARGETRENDERBUFFERSTORAGEOESPROC) (GLenum target, GLeglImageOES image);
#endif
+/* GL_OES_EGL_image_external */
+#ifndef GL_OES_EGL_image_external
+#define GL_OES_EGL_image_external 1
+/* glEGLImageTargetTexture2DOES defined in GL_OES_EGL_image already. */
+#endif
+
/* GL_OES_element_index_uint */
#ifndef GL_OES_element_index_uint
#define GL_OES_element_index_uint 1
@@ -785,11 +874,6 @@ typedef void (GL_APIENTRYP PFNGLGENVERTEXARRAYSOESPROC) (GLsizei n, GLuint *arra
typedef GLboolean (GL_APIENTRYP PFNGLISVERTEXARRAYOESPROC) (GLuint array);
#endif
-/* GL_OES_EGL_image_external */
-#ifndef GL_OES_EGL_image_external
-#define GL_OES_EGL_image_external 1
-#endif
-
/*------------------------------------------------------------------------*
* AMD extension functions
*------------------------------------------------------------------------*/
@@ -813,6 +897,36 @@ typedef GLboolean (GL_APIENTRYP PFNGLISVERTEXARRAYOESPROC) (GLuint array);
#define GL_APPLE_texture_2D_limited_npot 1
#endif
+/* GL_APPLE_framebuffer_multisample */
+#ifndef GL_APPLE_framebuffer_multisample
+#define GL_APPLE_framebuffer_multisample 1
+#ifdef GL_GLEXT_PROTOTYPES
+GL_API void GL_APIENTRY glRenderbufferStorageMultisampleAPPLE (GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height);
+GL_API void GL_APIENTRY glResolveMultisampleFramebufferAPPLE (void);
+#endif /* GL_GLEXT_PROTOTYPES */
+typedef void (GL_APIENTRYP PFNGLRENDERBUFFERSTORAGEMULTISAMPLEAPPLEPROC) (GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height);
+typedef void (GL_APIENTRYP PFNGLRESOLVEMULTISAMPLEFRAMEBUFFERAPPLEPROC) (void);
+#endif
+
+/* GL_APPLE_texture_format_BGRA8888 */
+#ifndef GL_APPLE_texture_format_BGRA8888
+#define GL_APPLE_texture_format_BGRA8888 1
+#endif
+
+/* GL_APPLE_texture_max_level */
+#ifndef GL_APPLE_texture_max_level
+#define GL_APPLE_texture_max_level 1
+#endif
+
+/*------------------------------------------------------------------------*
+ * ARM extension functions
+ *------------------------------------------------------------------------*/
+
+/* GL_ARM_rgba8 */
+#ifndef GL_ARM_rgba8
+#define GL_ARM_rgba8 1
+#endif
+
/*------------------------------------------------------------------------*
* EXT extension functions
*------------------------------------------------------------------------*/
@@ -831,6 +945,17 @@ GL_API void GL_APIENTRY glDiscardFramebufferEXT (GLenum target, GLsizei numAttac
typedef void (GL_APIENTRYP PFNGLDISCARDFRAMEBUFFEREXTPROC) (GLenum target, GLsizei numAttachments, const GLenum *attachments);
#endif
+/* GL_EXT_multisampled_render_to_texture */
+#ifndef GL_EXT_multisampled_render_to_texture
+#define GL_EXT_multisampled_render_to_texture 1
+#ifdef GL_GLEXT_PROTOTYPES
+GL_API void GL_APIENTRY glRenderbufferStorageMultisampleEXT (GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height);
+GL_API void GL_APIENTRY glFramebufferTexture2DMultisampleEXT (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level, GLsizei samples);
+#endif
+typedef void (GL_APIENTRYP PFNGLRENDERBUFFERSTORAGEMULTISAMPLEEXTPROC) (GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height);
+typedef void (GL_APIENTRYP PFNGLFRAMEBUFFERTEXTURE2DMULTISAMPLEEXTPROC) (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level, GLsizei samples);
+#endif
+
/* GL_EXT_multi_draw_arrays */
#ifndef GL_EXT_multi_draw_arrays
#define GL_EXT_multi_draw_arrays 1
@@ -847,6 +972,31 @@ typedef void (GL_APIENTRYP PFNGLMULTIDRAWELEMENTSEXTPROC) (GLenum mode, const GL
#define GL_EXT_read_format_bgra 1
#endif
+/* GL_EXT_robustness */
+#ifndef GL_EXT_robustness
+#define GL_EXT_robustness 1
+#ifdef GL_GLEXT_PROTOTYPES
+GL_API GLenum GL_APIENTRY glGetGraphicsResetStatusEXT (void);
+GL_API void GL_APIENTRY glReadnPixelsEXT (GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, GLsizei bufSize, void *data);
+GL_API void GL_APIENTRY glGetnUniformfvEXT (GLuint program, GLint location, GLsizei bufSize, float *params);
+GL_API void GL_APIENTRY glGetnUniformivEXT (GLuint program, GLint location, GLsizei bufSize, GLint *params);
+#endif
+typedef GLenum (GL_APIENTRYP PFNGLGETGRAPHICSRESETSTATUSEXTPROC) (void);
+typedef void (GL_APIENTRYP PFNGLREADNPIXELSEXTPROC) (GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, GLsizei bufSize, void *data);
+typedef void (GL_APIENTRYP PFNGLGETNUNIFORMFVEXTPROC) (GLuint program, GLint location, GLsizei bufSize, float *params);
+typedef void (GL_APIENTRYP PFNGLGETNUNIFORMIVEXTPROC) (GLuint program, GLint location, GLsizei bufSize, GLint *params);
+#endif
+
+/* GL_EXT_sRGB */
+#ifndef GL_EXT_sRGB
+#define GL_EXT_sRGB 1
+#endif
+
+/* GL_EXT_texture_compression_dxt1 */
+#ifndef GL_EXT_texture_compression_dxt1
+#define GL_EXT_texture_compression_dxt1 1
+#endif
+
/* GL_EXT_texture_filter_anisotropic */
#ifndef GL_EXT_texture_filter_anisotropic
#define GL_EXT_texture_filter_anisotropic 1
@@ -862,6 +1012,25 @@ typedef void (GL_APIENTRYP PFNGLMULTIDRAWELEMENTSEXTPROC) (GLenum mode, const GL
#define GL_EXT_texture_lod_bias 1
#endif
+/* GL_EXT_texture_storage */
+#ifndef GL_EXT_texture_storage
+#define GL_EXT_texture_storage 1
+#ifdef GL_GLEXT_PROTOTYPES
+GL_API void GL_APIENTRY glTexStorage1DEXT (GLenum target, GLsizei levels, GLenum internalformat, GLsizei width);
+GL_API void GL_APIENTRY glTexStorage2DEXT (GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height);
+GL_API void GL_APIENTRY glTexStorage3DEXT (GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth);
+GL_API void GL_APIENTRY glTextureStorage1DEXT (GLuint texture, GLenum target, GLsizei levels, GLenum internalformat, GLsizei width);
+GL_API void GL_APIENTRY glTextureStorage2DEXT (GLuint texture, GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height);
+GL_API void GL_APIENTRY glTextureStorage3DEXT (GLuint texture, GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth);
+#endif
+typedef void (GL_APIENTRYP PFNGLTEXSTORAGE1DEXTPROC) (GLenum target, GLsizei levels, GLenum internalformat, GLsizei width);
+typedef void (GL_APIENTRYP PFNGLTEXSTORAGE2DEXTPROC) (GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height);
+typedef void (GL_APIENTRYP PFNGLTEXSTORAGE3DEXTPROC) (GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth);
+typedef void (GL_APIENTRYP PFNGLTEXTURESTORAGE1DEXTPROC) (GLuint texture, GLenum target, GLsizei levels, GLenum internalformat, GLsizei width);
+typedef void (GL_APIENTRYP PFNGLTEXTURESTORAGE2DEXTPROC) (GLuint texture, GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height);
+typedef void (GL_APIENTRYP PFNGLTEXTURESTORAGE3DEXTPROC) (GLuint texture, GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth);
+#endif
+
/*------------------------------------------------------------------------*
* IMG extension functions
*------------------------------------------------------------------------*/
diff --git a/opengl/include/GLES2/gl2ext.h b/opengl/include/GLES2/gl2ext.h
index 9db4e25..8f8d80a 100644
--- a/opengl/include/GLES2/gl2ext.h
+++ b/opengl/include/GLES2/gl2ext.h
@@ -1,7 +1,7 @@
#ifndef __gl2ext_h_
#define __gl2ext_h_
-/* $Revision: 10969 $ on $Date:: 2010-04-09 02:27:15 -0700 #$ */
+/* $Revision: 16619 $ on $Date:: 2012-01-18 10:00:14 -0800 #$ */
#ifdef __cplusplus
extern "C" {
@@ -57,6 +57,15 @@ extern "C" {
typedef void* GLeglImageOES;
#endif
+/* GL_OES_EGL_image_external */
+#ifndef GL_OES_EGL_image_external
+/* GLeglImageOES defined in GL_OES_EGL_image already. */
+#define GL_TEXTURE_EXTERNAL_OES 0x8D65
+#define GL_SAMPLER_EXTERNAL_OES 0x8D66
+#define GL_TEXTURE_BINDING_EXTERNAL_OES 0x8D67
+#define GL_REQUIRED_TEXTURE_IMAGE_UNITS_OES 0x8D68
+#endif
+
/* GL_OES_element_index_uint */
#ifndef GL_OES_element_index_uint
#define GL_UNSIGNED_INT 0x1405
@@ -146,14 +155,6 @@ typedef void* GLeglImageOES;
#define GL_INT_10_10_10_2_OES 0x8DF7
#endif
-/* GL_OES_EGL_image_external */
-#ifndef GL_OES_EGL_image_external
-#define GL_TEXTURE_EXTERNAL_OES 0x8D65
-#define GL_SAMPLER_EXTERNAL_OES 0x8D66
-#define GL_TEXTURE_BINDING_EXTERNAL_OES 0x8D67
-#define GL_REQUIRED_TEXTURE_IMAGE_UNITS_OES 0x8D68
-#endif
-
/*------------------------------------------------------------------------*
* AMD extension tokens
*------------------------------------------------------------------------*/
@@ -188,6 +189,69 @@ typedef void* GLeglImageOES;
#endif
/*------------------------------------------------------------------------*
+ * ANGLE extension tokens
+ *------------------------------------------------------------------------*/
+
+/* GL_ANGLE_framebuffer_blit */
+#ifndef GL_ANGLE_framebuffer_blit
+#define GL_READ_FRAMEBUFFER_ANGLE 0x8CA8
+#define GL_DRAW_FRAMEBUFFER_ANGLE 0x8CA9
+#define GL_DRAW_FRAMEBUFFER_BINDING_ANGLE 0x8CA6
+#define GL_READ_FRAMEBUFFER_BINDING_ANGLE 0x8CAA
+#endif
+
+/* GL_ANGLE_framebuffer_multisample */
+#ifndef GL_ANGLE_framebuffer_multisample
+#define GL_RENDERBUFFER_SAMPLES_ANGLE 0x8CAB
+#define GL_FRAMEBUFFER_INCOMPLETE_MULTISAMPLE_ANGLE 0x8D56
+#define GL_MAX_SAMPLES_ANGLE 0x8D57
+#endif
+
+/*------------------------------------------------------------------------*
+ * APPLE extension tokens
+ *------------------------------------------------------------------------*/
+
+/* GL_APPLE_rgb_422 */
+#ifndef GL_APPLE_rgb_422
+#define GL_RGB_422_APPLE 0x8A1F
+#define GL_UNSIGNED_SHORT_8_8_APPLE 0x85BA
+#define GL_UNSIGNED_SHORT_8_8_REV_APPLE 0x85BB
+#endif
+
+/* GL_APPLE_framebuffer_multisample */
+#ifndef GL_APPLE_framebuffer_multisample
+#define GL_RENDERBUFFER_SAMPLES_APPLE 0x8CAB
+#define GL_FRAMEBUFFER_INCOMPLETE_MULTISAMPLE_APPLE 0x8D56
+#define GL_MAX_SAMPLES_APPLE 0x8D57
+#define GL_READ_FRAMEBUFFER_APPLE 0x8CA8
+#define GL_DRAW_FRAMEBUFFER_APPLE 0x8CA9
+#define GL_DRAW_FRAMEBUFFER_BINDING_APPLE 0x8CA6
+#define GL_READ_FRAMEBUFFER_BINDING_APPLE 0x8CAA
+#endif
+
+/* GL_APPLE_texture_format_BGRA8888 */
+#ifndef GL_APPLE_texture_format_BGRA8888
+#define GL_BGRA_EXT 0x80E1
+#endif
+
+/* GL_APPLE_texture_max_level */
+#ifndef GL_APPLE_texture_max_level
+#define GL_TEXTURE_MAX_LEVEL_APPLE 0x813D
+#endif
+
+/*------------------------------------------------------------------------*
+ * ARM extension tokens
+ *------------------------------------------------------------------------*/
+
+/* GL_ARM_mali_shader_binary */
+#ifndef GL_ARM_mali_shader_binary
+#define GL_MALI_SHADER_BINARY_ARM 0x8F60
+#endif
+
+/* GL_ARM_rgba8 */
+/* No new tokens introduced by this extension. */
+
+/*------------------------------------------------------------------------*
* EXT extension tokens
*------------------------------------------------------------------------*/
@@ -197,6 +261,29 @@ typedef void* GLeglImageOES;
#define GL_MAX_EXT 0x8008
#endif
+/* GL_EXT_color_buffer_half_float */
+#ifndef GL_EXT_color_buffer_half_float
+#define GL_RGBA16F_EXT 0x881A
+#define GL_RGB16F_EXT 0x881B
+#define GL_RG16F_EXT 0x822F
+#define GL_R16F_EXT 0x822D
+#define GL_FRAMEBUFFER_ATTACHMENT_COMPONENT_TYPE_EXT 0x8211
+#define GL_UNSIGNED_NORMALIZED_EXT 0x8C17
+#endif
+
+/* GL_EXT_debug_label */
+#ifndef GL_EXT_debug_label
+#define GL_PROGRAM_PIPELINE_OBJECT_EXT 0x8A4F
+#define GL_PROGRAM_OBJECT_EXT 0x8B40
+#define GL_SHADER_OBJECT_EXT 0x8B48
+#define GL_BUFFER_OBJECT_EXT 0x9151
+#define GL_QUERY_OBJECT_EXT 0x9153
+#define GL_VERTEX_ARRAY_OBJECT_EXT 0x9154
+#endif
+
+/* GL_EXT_debug_marker */
+/* No new tokens introduced by this extension. */
+
/* GL_EXT_discard_framebuffer */
#ifndef GL_EXT_discard_framebuffer
#define GL_COLOR_EXT 0x1800
@@ -204,9 +291,26 @@ typedef void* GLeglImageOES;
#define GL_STENCIL_EXT 0x1802
#endif
+/* GL_EXT_multisampled_render_to_texture */
+#ifndef GL_EXT_multisampled_render_to_texture
+#define GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_SAMPLES_EXT 0x8D6C
+#define GL_RENDERBUFFER_SAMPLES_EXT 0x9133
+#define GL_FRAMEBUFFER_INCOMPLETE_MULTISAMPLE_EXT 0x9134
+#define GL_MAX_SAMPLES_EXT 0x9135
+#endif
+
/* GL_EXT_multi_draw_arrays */
/* No new tokens introduced by this extension. */
+/* GL_EXT_occlusion_query_boolean */
+#ifndef GL_EXT_occlusion_query_boolean
+#define GL_ANY_SAMPLES_PASSED_EXT 0x8C2F
+#define GL_ANY_SAMPLES_PASSED_CONSERVATIVE_EXT 0x8D6A
+#define GL_CURRENT_QUERY_EXT 0x8865
+#define GL_QUERY_RESULT_EXT 0x8866
+#define GL_QUERY_RESULT_AVAILABLE_EXT 0x8867
+#endif
+
/* GL_EXT_read_format_bgra */
#ifndef GL_EXT_read_format_bgra
#define GL_BGRA_EXT 0x80E1
@@ -214,6 +318,53 @@ typedef void* GLeglImageOES;
#define GL_UNSIGNED_SHORT_1_5_5_5_REV_EXT 0x8366
#endif
+/* GL_EXT_robustness */
+#ifndef GL_EXT_robustness
+/* reuse GL_NO_ERROR */
+#define GL_GUILTY_CONTEXT_RESET_EXT 0x8253
+#define GL_INNOCENT_CONTEXT_RESET_EXT 0x8254
+#define GL_UNKNOWN_CONTEXT_RESET_EXT 0x8255
+#define GL_CONTEXT_ROBUST_ACCESS_EXT 0x90F3
+#define GL_RESET_NOTIFICATION_STRATEGY_EXT 0x8256
+#define GL_LOSE_CONTEXT_ON_RESET_EXT 0x8252
+#define GL_NO_RESET_NOTIFICATION_EXT 0x8261
+#endif
+
+/* GL_EXT_separate_shader_objects */
+#ifndef GL_EXT_separate_shader_objects
+#define GL_VERTEX_SHADER_BIT_EXT 0x00000001
+#define GL_FRAGMENT_SHADER_BIT_EXT 0x00000002
+#define GL_ALL_SHADER_BITS_EXT 0xFFFFFFFF
+#define GL_PROGRAM_SEPARABLE_EXT 0x8258
+#define GL_ACTIVE_PROGRAM_EXT 0x8259
+#define GL_PROGRAM_PIPELINE_BINDING_EXT 0x825A
+#endif
+
+/* GL_EXT_shader_texture_lod */
+/* No new tokens introduced by this extension. */
+
+/* GL_EXT_shadow_samplers */
+#ifndef GL_EXT_shadow_samplers
+#define GL_TEXTURE_COMPARE_MODE_EXT 0x884C
+#define GL_TEXTURE_COMPARE_FUNC_EXT 0x884D
+#define GL_COMPARE_REF_TO_TEXTURE_EXT 0x884E
+#define GL_SAMPLER_2D_SHADOW_EXT 0x8B62
+#endif
+
+/* GL_EXT_sRGB */
+#ifndef GL_EXT_sRGB
+#define GL_SRGB_EXT 0x8C40
+#define GL_SRGB_ALPHA_EXT 0x8C42
+#define GL_SRGB8_ALPHA8_EXT 0x8C43
+#define GL_FRAMEBUFFER_ATTACHMENT_COLOR_ENCODING_EXT 0x8210
+#endif
+
+/* GL_EXT_texture_compression_dxt1 */
+#ifndef GL_EXT_texture_compression_dxt1
+#define GL_COMPRESSED_RGB_S3TC_DXT1_EXT 0x83F0
+#define GL_COMPRESSED_RGBA_S3TC_DXT1_EXT 0x83F1
+#endif
+
/* GL_EXT_texture_filter_anisotropic */
#ifndef GL_EXT_texture_filter_anisotropic
#define GL_TEXTURE_MAX_ANISOTROPY_EXT 0x84FE
@@ -225,15 +376,54 @@ typedef void* GLeglImageOES;
#define GL_BGRA_EXT 0x80E1
#endif
+/* GL_EXT_texture_rg */
+#ifndef GL_EXT_texture_rg
+#define GL_RED_EXT 0x1903
+#define GL_RG_EXT 0x8227
+#define GL_R8_EXT 0x8229
+#define GL_RG8_EXT 0x822B
+#endif
+
+/* GL_EXT_texture_storage */
+#ifndef GL_EXT_texture_storage
+#define GL_TEXTURE_IMMUTABLE_FORMAT_EXT 0x912F
+#define GL_ALPHA8_EXT 0x803C
+#define GL_LUMINANCE8_EXT 0x8040
+#define GL_LUMINANCE8_ALPHA8_EXT 0x8045
+#define GL_RGBA32F_EXT 0x8814
+#define GL_RGB32F_EXT 0x8815
+#define GL_ALPHA32F_EXT 0x8816
+#define GL_LUMINANCE32F_EXT 0x8818
+#define GL_LUMINANCE_ALPHA32F_EXT 0x8819
+/* reuse GL_RGBA16F_EXT */
+#define GL_RGB16F_EXT 0x881B
+#define GL_ALPHA16F_EXT 0x881C
+#define GL_LUMINANCE16F_EXT 0x881E
+#define GL_LUMINANCE_ALPHA16F_EXT 0x881F
+#define GL_RGB10_A2_EXT 0x8059
+#define GL_RGB10_EXT 0x8052
+#define GL_BGRA8_EXT 0x93A1
+#endif
+
/* GL_EXT_texture_type_2_10_10_10_REV */
#ifndef GL_EXT_texture_type_2_10_10_10_REV
#define GL_UNSIGNED_INT_2_10_10_10_REV_EXT 0x8368
#endif
-/* GL_EXT_texture_compression_dxt1 */
-#ifndef GL_EXT_texture_compression_dxt1
-#define GL_COMPRESSED_RGB_S3TC_DXT1_EXT 0x83F0
-#define GL_COMPRESSED_RGBA_S3TC_DXT1_EXT 0x83F1
+/* GL_EXT_unpack_subimage */
+#ifndef GL_EXT_unpack_subimage
+#define GL_UNPACK_ROW_LENGTH 0x0CF2
+#define GL_UNPACK_SKIP_ROWS 0x0CF3
+#define GL_UNPACK_SKIP_PIXELS 0x0CF4
+#endif
+
+/*------------------------------------------------------------------------*
+ * DMP extension tokens
+ *------------------------------------------------------------------------*/
+
+/* GL_DMP_shader_binary */
+#ifndef GL_DMP_shader_binary
+#define GL_SHADER_BINARY_DMP 0x9250
#endif
/*------------------------------------------------------------------------*
@@ -276,13 +466,6 @@ typedef void* GLeglImageOES;
* NV extension tokens
*------------------------------------------------------------------------*/
-/* GL_NV_fence */
-#ifndef GL_NV_fence
-#define GL_ALL_COMPLETED_NV 0x84F2
-#define GL_FENCE_STATUS_NV 0x84F3
-#define GL_FENCE_CONDITION_NV 0x84F4
-#endif
-
/* GL_NV_coverage_sample */
#ifndef GL_NV_coverage_sample
#define GL_COVERAGE_COMPONENT_NV 0x8ED0
@@ -301,10 +484,90 @@ typedef void* GLeglImageOES;
#define GL_DEPTH_COMPONENT16_NONLINEAR_NV 0x8E2C
#endif
+/* GL_NV_draw_buffers */
+#ifndef GL_NV_draw_buffers
+#define GL_MAX_DRAW_BUFFERS_NV 0x8824
+#define GL_DRAW_BUFFER0_NV 0x8825
+#define GL_DRAW_BUFFER1_NV 0x8826
+#define GL_DRAW_BUFFER2_NV 0x8827
+#define GL_DRAW_BUFFER3_NV 0x8828
+#define GL_DRAW_BUFFER4_NV 0x8829
+#define GL_DRAW_BUFFER5_NV 0x882A
+#define GL_DRAW_BUFFER6_NV 0x882B
+#define GL_DRAW_BUFFER7_NV 0x882C
+#define GL_DRAW_BUFFER8_NV 0x882D
+#define GL_DRAW_BUFFER9_NV 0x882E
+#define GL_DRAW_BUFFER10_NV 0x882F
+#define GL_DRAW_BUFFER11_NV 0x8830
+#define GL_DRAW_BUFFER12_NV 0x8831
+#define GL_DRAW_BUFFER13_NV 0x8832
+#define GL_DRAW_BUFFER14_NV 0x8833
+#define GL_DRAW_BUFFER15_NV 0x8834
+#define GL_COLOR_ATTACHMENT0_NV 0x8CE0
+#define GL_COLOR_ATTACHMENT1_NV 0x8CE1
+#define GL_COLOR_ATTACHMENT2_NV 0x8CE2
+#define GL_COLOR_ATTACHMENT3_NV 0x8CE3
+#define GL_COLOR_ATTACHMENT4_NV 0x8CE4
+#define GL_COLOR_ATTACHMENT5_NV 0x8CE5
+#define GL_COLOR_ATTACHMENT6_NV 0x8CE6
+#define GL_COLOR_ATTACHMENT7_NV 0x8CE7
+#define GL_COLOR_ATTACHMENT8_NV 0x8CE8
+#define GL_COLOR_ATTACHMENT9_NV 0x8CE9
+#define GL_COLOR_ATTACHMENT10_NV 0x8CEA
+#define GL_COLOR_ATTACHMENT11_NV 0x8CEB
+#define GL_COLOR_ATTACHMENT12_NV 0x8CEC
+#define GL_COLOR_ATTACHMENT13_NV 0x8CED
+#define GL_COLOR_ATTACHMENT14_NV 0x8CEE
+#define GL_COLOR_ATTACHMENT15_NV 0x8CEF
+#endif
+
+/* GL_NV_fbo_color_attachments */
+#ifndef GL_NV_fbo_color_attachments
+#define GL_MAX_COLOR_ATTACHMENTS_NV 0x8CDF
+/* GL_COLOR_ATTACHMENT{0-15}_NV defined in GL_NV_draw_buffers already. */
+#endif
+
+/* GL_NV_fence */
+#ifndef GL_NV_fence
+#define GL_ALL_COMPLETED_NV 0x84F2
+#define GL_FENCE_STATUS_NV 0x84F3
+#define GL_FENCE_CONDITION_NV 0x84F4
+#endif
+
+/* GL_NV_read_buffer */
+#ifndef GL_NV_read_buffer
+#define GL_READ_BUFFER_NV 0x0C02
+#endif
+
+/* GL_NV_read_buffer_front */
+/* No new tokens introduced by this extension. */
+
+/* GL_NV_read_depth */
+/* No new tokens introduced by this extension. */
+
+/* GL_NV_read_depth_stencil */
+/* No new tokens introduced by this extension. */
+
+/* GL_NV_read_stencil */
+/* No new tokens introduced by this extension. */
+
+/* GL_NV_texture_compression_s3tc_update */
+/* No new tokens introduced by this extension. */
+
+/* GL_NV_texture_npot_2D_mipmap */
+/* No new tokens introduced by this extension. */
+
/*------------------------------------------------------------------------*
* QCOM extension tokens
*------------------------------------------------------------------------*/
+/* GL_QCOM_alpha_test */
+#ifndef GL_QCOM_alpha_test
+#define GL_ALPHA_TEST_QCOM 0x0BC0
+#define GL_ALPHA_TEST_FUNC_QCOM 0x0BC1
+#define GL_ALPHA_TEST_REF_QCOM 0x0BC2
+#endif
+
/* GL_QCOM_driver_control */
/* No new tokens introduced by this extension. */
@@ -373,6 +636,15 @@ typedef void* GLeglImageOES;
#endif
/*------------------------------------------------------------------------*
+ * VIV extension tokens
+ *------------------------------------------------------------------------*/
+
+/* GL_VIV_shader_binary */
+#ifndef GL_VIV_shader_binary
+#define GL_SHADER_BINARY_VIV 0x8FC4
+#endif
+
+/*------------------------------------------------------------------------*
* End of extension tokens, start of corresponding extension functions
*------------------------------------------------------------------------*/
@@ -416,6 +688,12 @@ typedef void (GL_APIENTRYP PFNGLEGLIMAGETARGETTEXTURE2DOESPROC) (GLenum target,
typedef void (GL_APIENTRYP PFNGLEGLIMAGETARGETRENDERBUFFERSTORAGEOESPROC) (GLenum target, GLeglImageOES image);
#endif
+/* GL_OES_EGL_image_external */
+#ifndef GL_OES_EGL_image_external
+#define GL_OES_EGL_image_external 1
+/* glEGLImageTargetTexture2DOES defined in GL_OES_EGL_image already. */
+#endif
+
/* GL_OES_element_index_uint */
#ifndef GL_OES_element_index_uint
#define GL_OES_element_index_uint 1
@@ -549,11 +827,6 @@ typedef GLboolean (GL_APIENTRYP PFNGLISVERTEXARRAYOESPROC) (GLuint array);
#define GL_OES_vertex_type_10_10_10_2 1
#endif
-/* GL_OES_EGL_image_external */
-#ifndef GL_OES_EGL_image_external
-#define GL_OES_EGL_image_external 1
-#endif
-
/*------------------------------------------------------------------------*
* AMD extension functions
*------------------------------------------------------------------------*/
@@ -603,6 +876,72 @@ typedef void (GL_APIENTRYP PFNGLGETPERFMONITORCOUNTERDATAAMDPROC) (GLuint monito
#endif
/*------------------------------------------------------------------------*
+ * ANGLE extension functions
+ *------------------------------------------------------------------------*/
+
+/* GL_ANGLE_framebuffer_blit */
+#ifndef GL_ANGLE_framebuffer_blit
+#define GL_ANGLE_framebuffer_blit 1
+#ifdef GL_GLEXT_PROTOTYPES
+GL_APICALL void GL_APIENTRY glBlitFramebufferANGLE (GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1, GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1, GLbitfield mask, GLenum filter);
+#endif
+typedef void (GL_APIENTRYP PFNGLBLITFRAMEBUFFERANGLEPROC) (GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1, GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1, GLbitfield mask, GLenum filter);
+#endif
+
+/* GL_ANGLE_framebuffer_multisample */
+#ifndef GL_ANGLE_framebuffer_multisample
+#define GL_ANGLE_framebuffer_multisample 1
+#ifdef GL_GLEXT_PROTOTYPES
+GL_APICALL void GL_APIENTRY glRenderbufferStorageMultisampleANGLE (GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height);
+#endif
+typedef void (GL_APIENTRYP PFNGLRENDERBUFFERSTORAGEMULTISAMPLEANGLEPROC) (GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height);
+#endif
+
+/*------------------------------------------------------------------------*
+ * APPLE extension functions
+ *------------------------------------------------------------------------*/
+
+/* GL_APPLE_rgb_422 */
+#ifndef GL_APPLE_rgb_422
+#define GL_APPLE_rgb_422 1
+#endif
+
+/* GL_APPLE_framebuffer_multisample */
+#ifndef GL_APPLE_framebuffer_multisample
+#define GL_APPLE_framebuffer_multisample 1
+#ifdef GL_GLEXT_PROTOTYPES
+GL_APICALL void GL_APIENTRY glRenderbufferStorageMultisampleAPPLE (GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height);
+GL_APICALL void GL_APIENTRY glResolveMultisampleFramebufferAPPLE (void);
+#endif /* GL_GLEXT_PROTOTYPES */
+typedef void (GL_APIENTRYP PFNGLRENDERBUFFERSTORAGEMULTISAMPLEAPPLEPROC) (GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height);
+typedef void (GL_APIENTRYP PFNGLRESOLVEMULTISAMPLEFRAMEBUFFERAPPLEPROC) (void);
+#endif
+
+/* GL_APPLE_texture_format_BGRA8888 */
+#ifndef GL_APPLE_texture_format_BGRA8888
+#define GL_APPLE_texture_format_BGRA8888 1
+#endif
+
+/* GL_APPLE_texture_max_level */
+#ifndef GL_APPLE_texture_max_level
+#define GL_APPLE_texture_max_level 1
+#endif
+
+/*------------------------------------------------------------------------*
+ * ARM extension functions
+ *------------------------------------------------------------------------*/
+
+/* GL_ARM_mali_shader_binary */
+#ifndef GL_ARM_mali_shader_binary
+#define GL_ARM_mali_shader_binary 1
+#endif
+
+/* GL_ARM_rgba8 */
+#ifndef GL_ARM_rgba8
+#define GL_ARM_rgba8 1
+#endif
+
+/*------------------------------------------------------------------------*
* EXT extension functions
*------------------------------------------------------------------------*/
@@ -611,6 +950,35 @@ typedef void (GL_APIENTRYP PFNGLGETPERFMONITORCOUNTERDATAAMDPROC) (GLuint monito
#define GL_EXT_blend_minmax 1
#endif
+/* GL_EXT_color_buffer_half_float */
+#ifndef GL_EXT_color_buffer_half_float
+#define GL_EXT_color_buffer_half_float 1
+#endif
+
+/* GL_EXT_debug_label */
+#ifndef GL_EXT_debug_label
+#define GL_EXT_debug_label 1
+#ifdef GL_GLEXT_PROTOTYPES
+GL_APICALL void GL_APIENTRY glLabelObjectEXT (GLenum type, GLuint object, GLsizei length, const GLchar *label);
+GL_APICALL void GL_APIENTRY glGetObjectLabelEXT (GLenum type, GLuint object, GLsizei bufSize, GLsizei *length, GLchar *label);
+#endif
+typedef void (GL_APIENTRYP PFNGLLABELOBJECTEXTPROC) (GLenum type, GLuint object, GLsizei length, const GLchar *label);
+typedef void (GL_APIENTRYP PFNGLGETOBJECTLABELEXTPROC) (GLenum type, GLuint object, GLsizei bufSize, GLsizei *length, GLchar *label);
+#endif
+
+/* GL_EXT_debug_marker */
+#ifndef GL_EXT_debug_marker
+#define GL_EXT_debug_marker 1
+#ifdef GL_GLEXT_PROTOTYPES
+GL_APICALL void GL_APIENTRY glInsertEventMarkerEXT (GLsizei length, const GLchar *marker);
+GL_APICALL void GL_APIENTRY glPushGroupMarkerEXT (GLsizei length, const GLchar *marker);
+GL_APICALL void GL_APIENTRY glPopGroupMarkerEXT (void);
+#endif
+typedef void (GL_APIENTRYP PFNGLINSERTEVENTMARKEREXTPROC) (GLsizei length, const GLchar *marker);
+typedef void (GL_APIENTRYP PFNGLPUSHGROUPMARKEREXTPROC) (GLsizei length, const GLchar *marker);
+typedef void (GL_APIENTRYP PFNGLPOPGROUPMARKEREXTPROC) (void);
+#endif
+
/* GL_EXT_discard_framebuffer */
#ifndef GL_EXT_discard_framebuffer
#define GL_EXT_discard_framebuffer 1
@@ -620,6 +988,17 @@ GL_APICALL void GL_APIENTRY glDiscardFramebufferEXT (GLenum target, GLsizei numA
typedef void (GL_APIENTRYP PFNGLDISCARDFRAMEBUFFEREXTPROC) (GLenum target, GLsizei numAttachments, const GLenum *attachments);
#endif
+/* GL_EXT_multisampled_render_to_texture */
+#ifndef GL_EXT_multisampled_render_to_texture
+#define GL_EXT_multisampled_render_to_texture 1
+#ifdef GL_GLEXT_PROTOTYPES
+GL_APICALL void GL_APIENTRY glRenderbufferStorageMultisampleEXT (GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height);
+GL_APICALL void GL_APIENTRY glFramebufferTexture2DMultisampleEXT (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level, GLsizei samples);
+#endif
+typedef void (GL_APIENTRYP PFNGLRENDERBUFFERSTORAGEMULTISAMPLEEXTPROC) (GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height);
+typedef void (GL_APIENTRYP PFNGLFRAMEBUFFERTEXTURE2DMULTISAMPLEEXTPROC) (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level, GLsizei samples);
+#endif
+
#ifndef GL_EXT_multi_draw_arrays
#define GL_EXT_multi_draw_arrays 1
#ifdef GL_GLEXT_PROTOTYPES
@@ -630,11 +1009,134 @@ typedef void (GL_APIENTRYP PFNGLMULTIDRAWARRAYSEXTPROC) (GLenum mode, GLint *fir
typedef void (GL_APIENTRYP PFNGLMULTIDRAWELEMENTSEXTPROC) (GLenum mode, const GLsizei *count, GLenum type, const GLvoid* *indices, GLsizei primcount);
#endif
+/* GL_EXT_occlusion_query_boolean */
+#ifndef GL_EXT_occlusion_query_boolean
+#define GL_EXT_occlusion_query_boolean 1
+#ifdef GL_GLEXT_PROTOTYPES
+GL_APICALL void GL_APIENTRY glGenQueriesEXT (GLsizei n, GLuint *ids);
+GL_APICALL void GL_APIENTRY glDeleteQueriesEXT (GLsizei n, const GLuint *ids);
+GL_APICALL GLboolean GL_APIENTRY glIsQueryEXT (GLuint id);
+GL_APICALL void GL_APIENTRY glBeginQueryEXT (GLenum target, GLuint id);
+GL_APICALL void GL_APIENTRY glEndQueryEXT (GLenum target);
+GL_APICALL void GL_APIENTRY glGetQueryivEXT (GLenum target, GLenum pname, GLint *params);
+GL_APICALL void GL_APIENTRY glGetQueryObjectuivEXT (GLuint id, GLenum pname, GLuint *params);
+#endif
+typedef void (GL_APIENTRYP PFNGLGENQUERIESEXTPROC) (GLsizei n, GLuint *ids);
+typedef void (GL_APIENTRYP PFNGLDELETEQUERIESEXTPROC) (GLsizei n, const GLuint *ids);
+typedef GLboolean (GL_APIENTRYP PFNGLISQUERYEXTPROC) (GLuint id);
+typedef void (GL_APIENTRYP PFNGLBEGINQUERYEXTPROC) (GLenum target, GLuint id);
+typedef void (GL_APIENTRYP PFNGLENDQUERYEXTPROC) (GLenum target);
+typedef void (GL_APIENTRYP PFNGLGETQUERYIVEXTPROC) (GLenum target, GLenum pname, GLint *params);
+typedef void (GL_APIENTRYP PFNGLGETQUERYOBJECTUIVEXTPROC) (GLuint id, GLenum pname, GLuint *params);
+#endif
+
/* GL_EXT_read_format_bgra */
#ifndef GL_EXT_read_format_bgra
#define GL_EXT_read_format_bgra 1
#endif
+/* GL_EXT_robustness */
+#ifndef GL_EXT_robustness
+#define GL_EXT_robustness 1
+#ifdef GL_GLEXT_PROTOTYPES
+GL_APICALL GLenum GL_APIENTRY glGetGraphicsResetStatusEXT (void);
+GL_APICALL void GL_APIENTRY glReadnPixelsEXT (GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, GLsizei bufSize, void *data);
+GL_APICALL void GL_APIENTRY glGetnUniformfvEXT (GLuint program, GLint location, GLsizei bufSize, float *params);
+GL_APICALL void GL_APIENTRY glGetnUniformivEXT (GLuint program, GLint location, GLsizei bufSize, GLint *params);
+#endif
+typedef GLenum (GL_APIENTRYP PFNGLGETGRAPHICSRESETSTATUSEXTPROC) (void);
+typedef void (GL_APIENTRYP PFNGLREADNPIXELSEXTPROC) (GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, GLsizei bufSize, void *data);
+typedef void (GL_APIENTRYP PFNGLGETNUNIFORMFVEXTPROC) (GLuint program, GLint location, GLsizei bufSize, float *params);
+typedef void (GL_APIENTRYP PFNGLGETNUNIFORMIVEXTPROC) (GLuint program, GLint location, GLsizei bufSize, GLint *params);
+#endif
+
+/* GL_EXT_separate_shader_objects */
+#ifndef GL_EXT_separate_shader_objects
+#define GL_EXT_separate_shader_objects 1
+#ifdef GL_GLEXT_PROTOTYPES
+GL_APICALL void GL_APIENTRY glUseProgramStagesEXT (GLuint pipeline, GLbitfield stages, GLuint program);
+GL_APICALL void GL_APIENTRY glActiveShaderProgramEXT (GLuint pipeline, GLuint program);
+GL_APICALL GLuint GL_APIENTRY glCreateShaderProgramvEXT (GLenum type, GLsizei count, const GLchar **strings);
+GL_APICALL void GL_APIENTRY glBindProgramPipelineEXT (GLuint pipeline);
+GL_APICALL void GL_APIENTRY glDeleteProgramPipelinesEXT (GLsizei n, const GLuint *pipelines);
+GL_APICALL void GL_APIENTRY glGenProgramPipelinesEXT (GLsizei n, GLuint *pipelines);
+GL_APICALL GLboolean GL_APIENTRY glIsProgramPipelineEXT (GLuint pipeline);
+GL_APICALL void GL_APIENTRY glProgramParameteriEXT (GLuint program, GLenum pname, GLint value);
+GL_APICALL void GL_APIENTRY glGetProgramPipelineivEXT (GLuint pipeline, GLenum pname, GLint *params);
+GL_APICALL void GL_APIENTRY glProgramUniform1iEXT (GLuint program, GLint location, GLint x);
+GL_APICALL void GL_APIENTRY glProgramUniform2iEXT (GLuint program, GLint location, GLint x, GLint y);
+GL_APICALL void GL_APIENTRY glProgramUniform3iEXT (GLuint program, GLint location, GLint x, GLint y, GLint z);
+GL_APICALL void GL_APIENTRY glProgramUniform4iEXT (GLuint program, GLint location, GLint x, GLint y, GLint z, GLint w);
+GL_APICALL void GL_APIENTRY glProgramUniform1fEXT (GLuint program, GLint location, GLfloat x);
+GL_APICALL void GL_APIENTRY glProgramUniform2fEXT (GLuint program, GLint location, GLfloat x, GLfloat y);
+GL_APICALL void GL_APIENTRY glProgramUniform3fEXT (GLuint program, GLint location, GLfloat x, GLfloat y, GLfloat z);
+GL_APICALL void GL_APIENTRY glProgramUniform4fEXT (GLuint program, GLint location, GLfloat x, GLfloat y, GLfloat z, GLfloat w);
+GL_APICALL void GL_APIENTRY glProgramUniform1ivEXT (GLuint program, GLint location, GLsizei count, const GLint *value);
+GL_APICALL void GL_APIENTRY glProgramUniform2ivEXT (GLuint program, GLint location, GLsizei count, const GLint *value);
+GL_APICALL void GL_APIENTRY glProgramUniform3ivEXT (GLuint program, GLint location, GLsizei count, const GLint *value);
+GL_APICALL void GL_APIENTRY glProgramUniform4ivEXT (GLuint program, GLint location, GLsizei count, const GLint *value);
+GL_APICALL void GL_APIENTRY glProgramUniform1fvEXT (GLuint program, GLint location, GLsizei count, const GLfloat *value);
+GL_APICALL void GL_APIENTRY glProgramUniform2fvEXT (GLuint program, GLint location, GLsizei count, const GLfloat *value);
+GL_APICALL void GL_APIENTRY glProgramUniform3fvEXT (GLuint program, GLint location, GLsizei count, const GLfloat *value);
+GL_APICALL void GL_APIENTRY glProgramUniform4fvEXT (GLuint program, GLint location, GLsizei count, const GLfloat *value);
+GL_APICALL void GL_APIENTRY glProgramUniformMatrix2fvEXT (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
+GL_APICALL void GL_APIENTRY glProgramUniformMatrix3fvEXT (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
+GL_APICALL void GL_APIENTRY glProgramUniformMatrix4fvEXT (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
+GL_APICALL void GL_APIENTRY glValidateProgramPipelineEXT (GLuint pipeline);
+GL_APICALL void GL_APIENTRY glGetProgramPipelineInfoLogEXT (GLuint pipeline, GLsizei bufSize, GLsizei *length, GLchar *infoLog);
+#endif
+typedef void (GL_APIENTRYP PFNGLUSEPROGRAMSTAGESEXTPROC) (GLuint pipeline, GLbitfield stages, GLuint program);
+typedef void (GL_APIENTRYP PFNGLACTIVESHADERPROGRAMEXTPROC) (GLuint pipeline, GLuint program);
+typedef GLuint (GL_APIENTRYP PFNGLCREATESHADERPROGRAMVEXTPROC) (GLenum type, GLsizei count, const GLchar **strings);
+typedef void (GL_APIENTRYP PFNGLBINDPROGRAMPIPELINEEXTPROC) (GLuint pipeline);
+typedef void (GL_APIENTRYP PFNGLDELETEPROGRAMPIPELINESEXTPROC) (GLsizei n, const GLuint *pipelines);
+typedef void (GL_APIENTRYP PFNGLGENPROGRAMPIPELINESEXTPROC) (GLsizei n, GLuint *pipelines);
+typedef GLboolean (GL_APIENTRYP PFNGLISPROGRAMPIPELINEEXTPROC) (GLuint pipeline);
+typedef void (GL_APIENTRYP PFNGLPROGRAMPARAMETERIEXTPROC) (GLuint program, GLenum pname, GLint value);
+typedef void (GL_APIENTRYP PFNGLGETPROGRAMPIPELINEIVEXTPROC) (GLuint pipeline, GLenum pname, GLint *params);
+typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORM1IEXTPROC) (GLuint program, GLint location, GLint x);
+typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORM2IEXTPROC) (GLuint program, GLint location, GLint x, GLint y);
+typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORM3IEXTPROC) (GLuint program, GLint location, GLint x, GLint y, GLint z);
+typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORM4IEXTPROC) (GLuint program, GLint location, GLint x, GLint y, GLint z, GLint w);
+typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORM1FEXTPROC) (GLuint program, GLint location, GLfloat x);
+typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORM2FEXTPROC) (GLuint program, GLint location, GLfloat x, GLfloat y);
+typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORM3FEXTPROC) (GLuint program, GLint location, GLfloat x, GLfloat y, GLfloat z);
+typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORM4FEXTPROC) (GLuint program, GLint location, GLfloat x, GLfloat y, GLfloat z, GLfloat w);
+typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORM1IVEXTPROC) (GLuint program, GLint location, GLsizei count, const GLint *value);
+typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORM2IVEXTPROC) (GLuint program, GLint location, GLsizei count, const GLint *value);
+typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORM3IVEXTPROC) (GLuint program, GLint location, GLsizei count, const GLint *value);
+typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORM4IVEXTPROC) (GLuint program, GLint location, GLsizei count, const GLint *value);
+typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORM1FVEXTPROC) (GLuint program, GLint location, GLsizei count, const GLfloat *value);
+typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORM2FVEXTPROC) (GLuint program, GLint location, GLsizei count, const GLfloat *value);
+typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORM3FVEXTPROC) (GLuint program, GLint location, GLsizei count, const GLfloat *value);
+typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORM4FVEXTPROC) (GLuint program, GLint location, GLsizei count, const GLfloat *value);
+typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORMMATRIX2FVEXTPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
+typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORMMATRIX3FVEXTPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
+typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORMMATRIX4FVEXTPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
+typedef void (GL_APIENTRYP PFNGLVALIDATEPROGRAMPIPELINEEXTPROC) (GLuint pipeline);
+typedef void (GL_APIENTRYP PFNGLGETPROGRAMPIPELINEINFOLOGEXTPROC) (GLuint pipeline, GLsizei bufSize, GLsizei *length, GLchar *infoLog);
+#endif
+
+/* GL_EXT_shader_texture_lod */
+#ifndef GL_EXT_shader_texture_lod
+#define GL_EXT_shader_texture_lod 1
+#endif
+
+/* GL_EXT_shadow_samplers */
+#ifndef GL_EXT_shadow_samplers
+#define GL_EXT_shadow_samplers 1
+#endif
+
+/* GL_EXT_sRGB */
+#ifndef GL_EXT_sRGB
+#define GL_EXT_sRGB 1
+#endif
+
+/* GL_EXT_texture_compression_dxt1 */
+#ifndef GL_EXT_texture_compression_dxt1
+#define GL_EXT_texture_compression_dxt1 1
+#endif
+
/* GL_EXT_texture_filter_anisotropic */
#ifndef GL_EXT_texture_filter_anisotropic
#define GL_EXT_texture_filter_anisotropic 1
@@ -645,14 +1147,47 @@ typedef void (GL_APIENTRYP PFNGLMULTIDRAWELEMENTSEXTPROC) (GLenum mode, const GL
#define GL_EXT_texture_format_BGRA8888 1
#endif
+/* GL_EXT_texture_rg */
+#ifndef GL_EXT_texture_rg
+#define GL_EXT_texture_rg 1
+#endif
+
+/* GL_EXT_texture_storage */
+#ifndef GL_EXT_texture_storage
+#define GL_EXT_texture_storage 1
+#ifdef GL_GLEXT_PROTOTYPES
+GL_APICALL void GL_APIENTRY glTexStorage1DEXT (GLenum target, GLsizei levels, GLenum internalformat, GLsizei width);
+GL_APICALL void GL_APIENTRY glTexStorage2DEXT (GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height);
+GL_APICALL void GL_APIENTRY glTexStorage3DEXT (GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth);
+GL_APICALL void GL_APIENTRY glTextureStorage1DEXT (GLuint texture, GLenum target, GLsizei levels, GLenum internalformat, GLsizei width);
+GL_APICALL void GL_APIENTRY glTextureStorage2DEXT (GLuint texture, GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height);
+GL_APICALL void GL_APIENTRY glTextureStorage3DEXT (GLuint texture, GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth);
+#endif
+typedef void (GL_APIENTRYP PFNGLTEXSTORAGE1DEXTPROC) (GLenum target, GLsizei levels, GLenum internalformat, GLsizei width);
+typedef void (GL_APIENTRYP PFNGLTEXSTORAGE2DEXTPROC) (GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height);
+typedef void (GL_APIENTRYP PFNGLTEXSTORAGE3DEXTPROC) (GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth);
+typedef void (GL_APIENTRYP PFNGLTEXTURESTORAGE1DEXTPROC) (GLuint texture, GLenum target, GLsizei levels, GLenum internalformat, GLsizei width);
+typedef void (GL_APIENTRYP PFNGLTEXTURESTORAGE2DEXTPROC) (GLuint texture, GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height);
+typedef void (GL_APIENTRYP PFNGLTEXTURESTORAGE3DEXTPROC) (GLuint texture, GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth);
+#endif
+
/* GL_EXT_texture_type_2_10_10_10_REV */
#ifndef GL_EXT_texture_type_2_10_10_10_REV
#define GL_EXT_texture_type_2_10_10_10_REV 1
#endif
-/* GL_EXT_texture_compression_dxt1 */
-#ifndef GL_EXT_texture_compression_dxt1
-#define GL_EXT_texture_compression_dxt1 1
+/* GL_EXT_unpack_subimage */
+#ifndef GL_EXT_unpack_subimage
+#define GL_EXT_unpack_subimage 1
+#endif
+
+/*------------------------------------------------------------------------*
+ * DMP extension functions
+ *------------------------------------------------------------------------*/
+
+/* GL_DMP_shader_binary */
+#ifndef GL_DMP_shader_binary
+#define GL_DMP_shader_binary 1
#endif
/*------------------------------------------------------------------------*
@@ -694,6 +1229,36 @@ typedef void (GL_APIENTRYP PFNGLFRAMEBUFFERTEXTURE2DMULTISAMPLEIMG) (GLenum targ
* NV extension functions
*------------------------------------------------------------------------*/
+/* GL_NV_coverage_sample */
+#ifndef GL_NV_coverage_sample
+#define GL_NV_coverage_sample 1
+#ifdef GL_GLEXT_PROTOTYPES
+GL_APICALL void GL_APIENTRY glCoverageMaskNV (GLboolean mask);
+GL_APICALL void GL_APIENTRY glCoverageOperationNV (GLenum operation);
+#endif
+typedef void (GL_APIENTRYP PFNGLCOVERAGEMASKNVPROC) (GLboolean mask);
+typedef void (GL_APIENTRYP PFNGLCOVERAGEOPERATIONNVPROC) (GLenum operation);
+#endif
+
+/* GL_NV_depth_nonlinear */
+#ifndef GL_NV_depth_nonlinear
+#define GL_NV_depth_nonlinear 1
+#endif
+
+/* GL_NV_draw_buffers */
+#ifndef GL_NV_draw_buffers
+#define GL_NV_draw_buffers 1
+#ifdef GL_GLEXT_PROTOTYPES
+GL_APICALL void GL_APIENTRY glDrawBuffersNV (GLsizei n, const GLenum *bufs);
+#endif
+typedef void (GL_APIENTRYP PFNGLDRAWBUFFERSNVPROC) (GLsizei n, const GLenum *bufs);
+#endif
+
+/* GL_NV_fbo_color_attachments */
+#ifndef GL_NV_fbo_color_attachments
+#define GL_NV_fbo_color_attachments 1
+#endif
+
/* GL_NV_fence */
#ifndef GL_NV_fence
#define GL_NV_fence 1
@@ -715,26 +1280,58 @@ typedef void (GL_APIENTRYP PFNGLFINISHFENCENVPROC) (GLuint fence);
typedef void (GL_APIENTRYP PFNGLSETFENCENVPROC) (GLuint fence, GLenum condition);
#endif
-/* GL_NV_coverage_sample */
-#ifndef GL_NV_coverage_sample
-#define GL_NV_coverage_sample 1
+/* GL_NV_read_buffer */
+#ifndef GL_NV_read_buffer
+#define GL_NV_read_buffer 1
#ifdef GL_GLEXT_PROTOTYPES
-GL_APICALL void GL_APIENTRY glCoverageMaskNV (GLboolean mask);
-GL_APICALL void GL_APIENTRY glCoverageOperationNV (GLenum operation);
+GL_APICALL void GL_APIENTRY glReadBufferNV (GLenum mode);
#endif
-typedef void (GL_APIENTRYP PFNGLCOVERAGEMASKNVPROC) (GLboolean mask);
-typedef void (GL_APIENTRYP PFNGLCOVERAGEOPERATIONNVPROC) (GLenum operation);
+typedef void (GL_APIENTRYP PFNGLREADBUFFERNVPROC) (GLenum mode);
#endif
-/* GL_NV_depth_nonlinear */
-#ifndef GL_NV_depth_nonlinear
-#define GL_NV_depth_nonlinear 1
+/* GL_NV_read_buffer_front */
+#ifndef GL_NV_read_buffer_front
+#define GL_NV_read_buffer_front 1
+#endif
+
+/* GL_NV_read_depth */
+#ifndef GL_NV_read_depth
+#define GL_NV_read_depth 1
+#endif
+
+/* GL_NV_read_depth_stencil */
+#ifndef GL_NV_read_depth_stencil
+#define GL_NV_read_depth_stencil 1
+#endif
+
+/* GL_NV_read_stencil */
+#ifndef GL_NV_read_stencil
+#define GL_NV_read_stencil 1
+#endif
+
+/* GL_NV_texture_compression_s3tc_update */
+#ifndef GL_NV_texture_compression_s3tc_update
+#define GL_NV_texture_compression_s3tc_update 1
+#endif
+
+/* GL_NV_texture_npot_2D_mipmap */
+#ifndef GL_NV_texture_npot_2D_mipmap
+#define GL_NV_texture_npot_2D_mipmap 1
#endif
/*------------------------------------------------------------------------*
* QCOM extension functions
*------------------------------------------------------------------------*/
+/* GL_QCOM_alpha_test */
+#ifndef GL_QCOM_alpha_test
+#define GL_QCOM_alpha_test 1
+#ifdef GL_GLEXT_PROTOTYPES
+GL_APICALL void GL_APIENTRY glAlphaFuncQCOM (GLenum func, GLclampf ref);
+#endif
+typedef void (GL_APIENTRYP PFNGLALPHAFUNCQCOMPROC) (GLenum func, GLclampf ref);
+#endif
+
/* GL_QCOM_driver_control */
#ifndef GL_QCOM_driver_control
#define GL_QCOM_driver_control 1
@@ -809,6 +1406,15 @@ typedef void (GL_APIENTRYP PFNGLSTARTTILINGQCOMPROC) (GLuint x, GLuint y, GLuint
typedef void (GL_APIENTRYP PFNGLENDTILINGQCOMPROC) (GLbitfield preserveMask);
#endif
+/*------------------------------------------------------------------------*
+ * VIV extension tokens
+ *------------------------------------------------------------------------*/
+
+/* GL_VIV_shader_binary */
+#ifndef GL_VIV_shader_binary
+#define GL_VIV_shader_binary 1
+#endif
+
#ifdef __cplusplus
}
#endif
diff --git a/opengl/libs/EGL/Loader.cpp b/opengl/libs/EGL/Loader.cpp
index 2fc6125..06be2ef 100644
--- a/opengl/libs/EGL/Loader.cpp
+++ b/opengl/libs/EGL/Loader.cpp
@@ -253,6 +253,19 @@ void Loader::init_api(void* dso,
if (f == NULL) {
//ALOGD("%s", name);
f = (__eglMustCastToProperFunctionPointerType)gl_unimplemented;
+
+ /*
+ * GL_EXT_debug_label is special, we always report it as
+ * supported, it's handled by GLES_trace. If GLES_trace is not
+ * enabled, then these are no-ops.
+ */
+ if (!strcmp(name, "glInsertEventMarkerEXT")) {
+ f = (__eglMustCastToProperFunctionPointerType)gl_noop;
+ } else if (!strcmp(name, "glPushGroupMarkerEXT")) {
+ f = (__eglMustCastToProperFunctionPointerType)gl_noop;
+ } else if (!strcmp(name, "glPopGroupMarkerEXT")) {
+ f = (__eglMustCastToProperFunctionPointerType)gl_noop;
+ }
}
*curr++ = f;
api++;
diff --git a/opengl/libs/EGL/egl.cpp b/opengl/libs/EGL/egl.cpp
index e053589..83933e5 100644
--- a/opengl/libs/EGL/egl.cpp
+++ b/opengl/libs/EGL/egl.cpp
@@ -233,6 +233,26 @@ EGLImageKHR egl_get_image_for_current_context(EGLImageKHR image)
// ----------------------------------------------------------------------------
+const GLubyte * egl_get_string_for_current_context(GLenum name) {
+ // NOTE: returning NULL here will fall-back to the default
+ // implementation.
+
+ EGLContext context = egl_tls_t::getContext();
+ if (context == EGL_NO_CONTEXT)
+ return NULL;
+
+ egl_context_t const * const c = get_context(context);
+ if (c == NULL) // this should never happen, by construction
+ return NULL;
+
+ if (name != GL_EXTENSIONS)
+ return NULL;
+
+ return (const GLubyte *)c->gl_extensions.string();
+}
+
+// ----------------------------------------------------------------------------
+
// this mutex protects:
// d->disp[]
// egl_init_drivers_locked()
@@ -290,6 +310,9 @@ void gl_unimplemented() {
ALOGE("called unimplemented OpenGL ES API");
}
+void gl_noop() {
+}
+
// ----------------------------------------------------------------------------
#if USE_FAST_TLS_KEY
diff --git a/opengl/libs/EGL/eglApi.cpp b/opengl/libs/EGL/eglApi.cpp
index 664f258..73aab26 100644
--- a/opengl/libs/EGL/eglApi.cpp
+++ b/opengl/libs/EGL/eglApi.cpp
@@ -477,6 +477,26 @@ EGLBoolean eglQuerySurface( EGLDisplay dpy, EGLSurface surface,
return result;
}
+void EGLAPI eglBeginFrame(EGLDisplay dpy, EGLSurface surface) {
+ clearError();
+
+ egl_display_t const * const dp = validate_display(dpy);
+ if (!dp) {
+ return;
+ }
+
+ SurfaceRef _s(dp, surface);
+ if (!_s.get()) {
+ setError(EGL_BAD_SURFACE, EGL_FALSE);
+ return;
+ }
+
+ int64_t timestamp = systemTime(SYSTEM_TIME_MONOTONIC);
+
+ egl_surface_t const * const s = get_surface(surface);
+ native_window_set_buffers_timestamp(s->win.get(), timestamp);
+}
+
// ----------------------------------------------------------------------------
// Contexts
// ----------------------------------------------------------------------------
@@ -546,27 +566,6 @@ EGLBoolean eglDestroyContext(EGLDisplay dpy, EGLContext ctx)
return result;
}
-static void loseCurrent(egl_context_t * cur_c)
-{
- if (cur_c) {
- egl_surface_t * cur_r = get_surface(cur_c->read);
- egl_surface_t * cur_d = get_surface(cur_c->draw);
-
- // by construction, these are either 0 or valid (possibly terminated)
- // it should be impossible for these to be invalid
- ContextRef _cur_c(cur_c);
- SurfaceRef _cur_r(cur_r);
- SurfaceRef _cur_d(cur_d);
-
- cur_c->read = NULL;
- cur_c->draw = NULL;
-
- _cur_c.release();
- _cur_r.release();
- _cur_d.release();
- }
-}
-
EGLBoolean eglMakeCurrent( EGLDisplay dpy, EGLSurface draw,
EGLSurface read, EGLContext ctx)
{
@@ -643,21 +642,13 @@ EGLBoolean eglMakeCurrent( EGLDisplay dpy, EGLSurface draw,
impl_read = r->surface;
}
- EGLBoolean result;
- if (c) {
- result = c->cnx->egl.eglMakeCurrent(
- dp->disp[c->impl].dpy, impl_draw, impl_read, impl_ctx);
- } else {
- result = cur_c->cnx->egl.eglMakeCurrent(
- dp->disp[cur_c->impl].dpy, impl_draw, impl_read, impl_ctx);
- }
+ EGLBoolean result = const_cast<egl_display_t*>(dp)->makeCurrent(c, cur_c,
+ draw, read, ctx,
+ impl_draw, impl_read, impl_ctx);
if (result == EGL_TRUE) {
-
- loseCurrent(cur_c);
-
- if (ctx != EGL_NO_CONTEXT) {
+ if (c) {
setGLHooksThreadSpecific(c->cnx->hooks[c->version]);
egl_tls_t::setContext(ctx);
#if EGL_TRACE
@@ -667,8 +658,6 @@ EGLBoolean eglMakeCurrent( EGLDisplay dpy, EGLSurface draw,
_c.acquire();
_r.acquire();
_d.acquire();
- c->read = read;
- c->draw = draw;
} else {
setGLHooksThreadSpecific(&gHooksNoContext);
egl_tls_t::setContext(EGL_NO_CONTEXT);
@@ -904,7 +893,8 @@ __eglMustCastToProperFunctionPointerType eglGetProcAddress(const char *procname)
cnx->hooks[GLESv1_INDEX]->ext.extensions[slot] =
cnx->hooks[GLESv2_INDEX]->ext.extensions[slot] =
#if EGL_TRACE
- debugHooks->ext.extensions[slot] = gHooksTrace.ext.extensions[slot] =
+ debugHooks->ext.extensions[slot] =
+ gHooksTrace.ext.extensions[slot] =
#endif
cnx->egl.eglGetProcAddress(procname);
}
@@ -1160,7 +1150,7 @@ EGLBoolean eglReleaseThread(void)
clearError();
// If there is context bound to the thread, release it
- loseCurrent(get_context(getContext()));
+ egl_display_t::loseCurrent(get_context(getContext()));
for (int i=0 ; i<IMPL_NUM_IMPLEMENTATIONS ; i++) {
egl_connection_t* const cnx = &gEGLImpl[i];
diff --git a/opengl/libs/EGL/egl_display.cpp b/opengl/libs/EGL/egl_display.cpp
index 53eaf9a..5cf5236 100644
--- a/opengl/libs/EGL/egl_display.cpp
+++ b/opengl/libs/EGL/egl_display.cpp
@@ -342,6 +342,47 @@ EGLBoolean egl_display_t::terminate() {
return res;
}
+void egl_display_t::loseCurrent(egl_context_t * cur_c)
+{
+ if (cur_c) {
+ egl_surface_t * cur_r = get_surface(cur_c->read);
+ egl_surface_t * cur_d = get_surface(cur_c->draw);
+
+ // by construction, these are either 0 or valid (possibly terminated)
+ // it should be impossible for these to be invalid
+ ContextRef _cur_c(cur_c);
+ SurfaceRef _cur_r(cur_r);
+ SurfaceRef _cur_d(cur_d);
+
+ cur_c->onLooseCurrent();
+
+ _cur_c.release();
+ _cur_r.release();
+ _cur_d.release();
+ }
+}
+
+EGLBoolean egl_display_t::makeCurrent(egl_context_t* c, egl_context_t* cur_c,
+ EGLSurface draw, EGLSurface read, EGLContext ctx,
+ EGLSurface impl_draw, EGLSurface impl_read, EGLContext impl_ctx)
+{
+ Mutex::Autolock _l(lock);
+ EGLBoolean result;
+ if (c) {
+ result = c->cnx->egl.eglMakeCurrent(
+ disp[c->impl].dpy, impl_draw, impl_read, impl_ctx);
+ } else {
+ result = cur_c->cnx->egl.eglMakeCurrent(
+ disp[cur_c->impl].dpy, impl_draw, impl_read, impl_ctx);
+ }
+ if (result == EGL_TRUE) {
+ loseCurrent(cur_c);
+ if (c) {
+ c->onMakeCurrent(draw, read);
+ }
+ }
+ return result;
+}
// ----------------------------------------------------------------------------
}; // namespace android
diff --git a/opengl/libs/EGL/egl_display.h b/opengl/libs/EGL/egl_display.h
index 042ae07..4479e00 100644
--- a/opengl/libs/EGL/egl_display.h
+++ b/opengl/libs/EGL/egl_display.h
@@ -39,6 +39,7 @@ namespace android {
// ----------------------------------------------------------------------------
class egl_object_t;
+class egl_context_t;
class egl_connection_t;
// ----------------------------------------------------------------------------
@@ -84,10 +85,14 @@ public:
// add reference to this object. returns true if this is a valid object.
bool getObject(egl_object_t* object) const;
-
static egl_display_t* get(EGLDisplay dpy);
static EGLDisplay getFromNativeDisplay(EGLNativeDisplayType disp);
+ EGLBoolean makeCurrent(egl_context_t* c, egl_context_t* cur_c,
+ EGLSurface draw, EGLSurface read, EGLContext ctx,
+ EGLSurface impl_draw, EGLSurface impl_read, EGLContext impl_ctx);
+ static void loseCurrent(egl_context_t * cur_c);
+
inline bool isReady() const { return (refs > 0); }
inline bool isValid() const { return magic == '_dpy'; }
inline bool isAlive() const { return isValid(); }
diff --git a/opengl/libs/EGL/egl_object.cpp b/opengl/libs/EGL/egl_object.cpp
index 26e8c3e..b660c53 100644
--- a/opengl/libs/EGL/egl_object.cpp
+++ b/opengl/libs/EGL/egl_object.cpp
@@ -62,5 +62,41 @@ bool egl_object_t::get(egl_display_t const* display, egl_object_t* object) {
}
// ----------------------------------------------------------------------------
+
+egl_context_t::egl_context_t(EGLDisplay dpy, EGLContext context, EGLConfig config,
+ int impl, egl_connection_t const* cnx, int version) :
+ egl_object_t(get_display(dpy)), dpy(dpy), context(context),
+ config(config), read(0), draw(0), impl(impl), cnx(cnx),
+ version(version)
+{
+}
+
+void egl_context_t::onLooseCurrent() {
+ read = NULL;
+ draw = NULL;
+}
+
+void egl_context_t::onMakeCurrent(EGLSurface draw, EGLSurface read) {
+ this->read = read;
+ this->draw = draw;
+
+ /*
+ * Here we cache the GL_EXTENSIONS string for this context and we
+ * add the extensions always handled by the wrapper
+ */
+
+ if (gl_extensions.isEmpty()) {
+ // call the implementation's glGetString(GL_EXTENSIONS)
+ const char* exts = (const char *)gEGLImpl[impl].hooks[version]->gl.glGetString(GL_EXTENSIONS);
+ gl_extensions.setTo(exts);
+ if (gl_extensions.find("GL_EXT_debug_marker") < 0) {
+ String8 temp("GL_EXT_debug_marker ");
+ temp.append(gl_extensions);
+ gl_extensions.setTo(temp);
+ }
+ }
+}
+
+// ----------------------------------------------------------------------------
}; // namespace android
// ----------------------------------------------------------------------------
diff --git a/opengl/libs/EGL/egl_object.h b/opengl/libs/EGL/egl_object.h
index 7106fa5..abd4cbb 100644
--- a/opengl/libs/EGL/egl_object.h
+++ b/opengl/libs/EGL/egl_object.h
@@ -28,6 +28,7 @@
#include <GLES/glext.h>
#include <utils/threads.h>
+#include <utils/String8.h>
#include <system/window.h>
@@ -158,11 +159,11 @@ public:
typedef egl_object_t::LocalRef<egl_context_t, EGLContext> Ref;
egl_context_t(EGLDisplay dpy, EGLContext context, EGLConfig config,
- int impl, egl_connection_t const* cnx, int version) :
- egl_object_t(get_display(dpy)), dpy(dpy), context(context),
- config(config), read(0), draw(0), impl(impl), cnx(cnx),
- version(version) {
- }
+ int impl, egl_connection_t const* cnx, int version);
+
+ void onLooseCurrent();
+ void onMakeCurrent(EGLSurface draw, EGLSurface read);
+
EGLDisplay dpy;
EGLContext context;
EGLConfig config;
@@ -171,6 +172,7 @@ public:
int impl;
egl_connection_t const* cnx;
int version;
+ String8 gl_extensions;
};
class egl_image_t: public egl_object_t {
diff --git a/opengl/libs/EGL/egldefs.h b/opengl/libs/EGL/egldefs.h
index 107acd9..ff20957 100644
--- a/opengl/libs/EGL/egldefs.h
+++ b/opengl/libs/EGL/egldefs.h
@@ -58,6 +58,7 @@ extern gl_hooks_t gHooks[2][IMPL_NUM_IMPLEMENTATIONS];
extern gl_hooks_t gHooksNoContext;
extern pthread_key_t gGLWrapperKey;
extern "C" void gl_unimplemented();
+extern "C" void gl_noop();
extern char const * const gl_names[];
extern char const * const egl_names[];
diff --git a/opengl/libs/EGL/getProcAddress.cpp b/opengl/libs/EGL/getProcAddress.cpp
index f89c865..8dcf38d 100644
--- a/opengl/libs/EGL/getProcAddress.cpp
+++ b/opengl/libs/EGL/getProcAddress.cpp
@@ -82,23 +82,41 @@ namespace android {
#endif
+
#define GL_EXTENSION_LIST(name) \
- name(0) name(1) name(2) name(3) \
- name(4) name(5) name(6) name(7) \
- name(8) name(9) name(10) name(11) \
- name(12) name(13) name(14) name(15) \
- name(16) name(17) name(18) name(19) \
- name(20) name(21) name(22) name(23) \
- name(24) name(25) name(26) name(27) \
- name(28) name(29) name(30) name(31) \
- name(32) name(33) name(34) name(35) \
- name(36) name(37) name(38) name(39) \
- name(40) name(41) name(42) name(43) \
- name(44) name(45) name(46) name(47) \
- name(48) name(49) name(50) name(51) \
- name(52) name(53) name(54) name(55) \
- name(56) name(57) name(58) name(59) \
- name(60) name(61) name(62) name(63)
+ name(0) name(1) name(2) name(3) name(4) name(5) name(6) name(7) \
+ name(8) name(9) name(10) name(11) name(12) name(13) name(14) name(15) \
+ name(16) name(17) name(18) name(19) name(20) name(21) name(22) name(23) \
+ name(24) name(25) name(26) name(27) name(28) name(29) name(30) name(31) \
+ name(32) name(33) name(34) name(35) name(36) name(37) name(38) name(39) \
+ name(40) name(41) name(42) name(43) name(44) name(45) name(46) name(47) \
+ name(48) name(49) name(50) name(51) name(52) name(53) name(54) name(55) \
+ name(56) name(57) name(58) name(59) name(60) name(61) name(62) name(63) \
+ name(64) name(65) name(66) name(67) name(68) name(69) name(70) name(71) \
+ name(72) name(73) name(74) name(75) name(76) name(77) name(78) name(79) \
+ name(80) name(81) name(82) name(83) name(84) name(85) name(86) name(87) \
+ name(88) name(89) name(90) name(91) name(92) name(93) name(94) name(95) \
+ name(96) name(97) name(98) name(99) \
+ name(100) name(101) name(102) name(103) name(104) name(105) name(106) name(107) \
+ name(108) name(109) name(110) name(111) name(112) name(113) name(114) name(115) \
+ name(116) name(117) name(118) name(119) name(120) name(121) name(122) name(123) \
+ name(124) name(125) name(126) name(127) name(128) name(129) name(130) name(131) \
+ name(132) name(133) name(134) name(135) name(136) name(137) name(138) name(139) \
+ name(140) name(141) name(142) name(143) name(144) name(145) name(146) name(147) \
+ name(148) name(149) name(150) name(151) name(152) name(153) name(154) name(155) \
+ name(156) name(157) name(158) name(159) name(160) name(161) name(162) name(163) \
+ name(164) name(165) name(166) name(167) name(168) name(169) name(170) name(171) \
+ name(172) name(173) name(174) name(175) name(176) name(177) name(178) name(179) \
+ name(180) name(181) name(182) name(183) name(184) name(185) name(186) name(187) \
+ name(188) name(189) name(190) name(191) name(192) name(193) name(194) name(195) \
+ name(196) name(197) name(198) name(199) \
+ name(200) name(201) name(202) name(203) name(204) name(205) name(206) name(207) \
+ name(208) name(209) name(210) name(211) name(212) name(213) name(214) name(215) \
+ name(216) name(217) name(218) name(219) name(220) name(221) name(222) name(223) \
+ name(224) name(225) name(226) name(227) name(228) name(229) name(230) name(231) \
+ name(232) name(233) name(234) name(235) name(236) name(237) name(238) name(239) \
+ name(240) name(241) name(242) name(243) name(244) name(245) name(246) name(247) \
+ name(248) name(249) name(250) name(251) name(252) name(253) name(254) name(255)
GL_EXTENSION_LIST( GL_EXTENSION )
diff --git a/opengl/libs/GLES2/gl2.cpp b/opengl/libs/GLES2/gl2.cpp
index df22b96..79aa3cd 100644
--- a/opengl/libs/GLES2/gl2.cpp
+++ b/opengl/libs/GLES2/gl2.cpp
@@ -110,6 +110,20 @@ extern "C" {
#undef CALL_GL_API
#undef CALL_GL_API_RETURN
+/*
+ * glGetString() is special because we expose some extensions in the wrapper
+ */
+
+extern "C" const GLubyte * __glGetString(GLenum name);
+
+const GLubyte * glGetString(GLenum name)
+{
+ const GLubyte * ret = egl_get_string_for_current_context(name);
+ if (ret == NULL) {
+ ret = __glGetString(name);
+ }
+ return ret;
+}
/*
* These GL calls are special because they need to EGL to retrieve some
diff --git a/opengl/libs/GLES2/gl2_api.in b/opengl/libs/GLES2/gl2_api.in
index 5164450..9a89a52 100644
--- a/opengl/libs/GLES2/gl2_api.in
+++ b/opengl/libs/GLES2/gl2_api.in
@@ -211,7 +211,7 @@ void API_ENTRY(glGetShaderPrecisionFormat)(GLenum shadertype, GLenum precisionty
void API_ENTRY(glGetShaderSource)(GLuint shader, GLsizei bufsize, GLsizei* length, GLchar* source) {
CALL_GL_API(glGetShaderSource, shader, bufsize, length, source);
}
-const GLubyte* API_ENTRY(glGetString)(GLenum name) {
+const GLubyte* API_ENTRY(__glGetString)(GLenum name) {
CALL_GL_API_RETURN(glGetString, name);
}
void API_ENTRY(glGetTexParameterfv)(GLenum target, GLenum pname, GLfloat* params) {
diff --git a/opengl/libs/GLES2/gl2ext_api.in b/opengl/libs/GLES2/gl2ext_api.in
index e965625..a8907fd 100644
--- a/opengl/libs/GLES2/gl2ext_api.in
+++ b/opengl/libs/GLES2/gl2ext_api.in
@@ -82,21 +82,204 @@ void API_ENTRY(glEndPerfMonitorAMD)(GLuint monitor) {
void API_ENTRY(glGetPerfMonitorCounterDataAMD)(GLuint monitor, GLenum pname, GLsizei dataSize, GLuint *data, GLint *bytesWritten) {
CALL_GL_API(glGetPerfMonitorCounterDataAMD, monitor, pname, dataSize, data, bytesWritten);
}
+void API_ENTRY(glBlitFramebufferANGLE)(GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1, GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1, GLbitfield mask, GLenum filter) {
+ CALL_GL_API(glBlitFramebufferANGLE, srcX0, srcY0, srcX1, srcY1, dstX0, dstY0, dstX1, dstY1, mask, filter);
+}
+void API_ENTRY(glRenderbufferStorageMultisampleANGLE)(GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height) {
+ CALL_GL_API(glRenderbufferStorageMultisampleANGLE, target, samples, internalformat, width, height);
+}
+void API_ENTRY(glRenderbufferStorageMultisampleAPPLE)(GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height) {
+ CALL_GL_API(glRenderbufferStorageMultisampleAPPLE, target, samples, internalformat, width, height);
+}
+void API_ENTRY(glResolveMultisampleFramebufferAPPLE)(void) {
+ CALL_GL_API(glResolveMultisampleFramebufferAPPLE);
+}
+void API_ENTRY(glLabelObjectEXT)(GLenum type, GLuint object, GLsizei length, const GLchar *label) {
+ CALL_GL_API(glLabelObjectEXT, type, object, length, label);
+}
+void API_ENTRY(glGetObjectLabelEXT)(GLenum type, GLuint object, GLsizei bufSize, GLsizei *length, GLchar *label) {
+ CALL_GL_API(glGetObjectLabelEXT, type, object, bufSize, length, label);
+}
+void API_ENTRY(glInsertEventMarkerEXT)(GLsizei length, const GLchar *marker) {
+ CALL_GL_API(glInsertEventMarkerEXT, length, marker);
+}
+void API_ENTRY(glPushGroupMarkerEXT)(GLsizei length, const GLchar *marker) {
+ CALL_GL_API(glPushGroupMarkerEXT, length, marker);
+}
+void API_ENTRY(glPopGroupMarkerEXT)(void) {
+ CALL_GL_API(glPopGroupMarkerEXT);
+}
void API_ENTRY(glDiscardFramebufferEXT)(GLenum target, GLsizei numAttachments, const GLenum *attachments) {
CALL_GL_API(glDiscardFramebufferEXT, target, numAttachments, attachments);
}
+void API_ENTRY(glRenderbufferStorageMultisampleEXT)(GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height) {
+ CALL_GL_API(glRenderbufferStorageMultisampleEXT, target, samples, internalformat, width, height);
+}
+void API_ENTRY(glFramebufferTexture2DMultisampleEXT)(GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level, GLsizei samples) {
+ CALL_GL_API(glFramebufferTexture2DMultisampleEXT, target, attachment, textarget, texture, level, samples);
+}
void API_ENTRY(glMultiDrawArraysEXT)(GLenum mode, GLint *first, GLsizei *count, GLsizei primcount) {
CALL_GL_API(glMultiDrawArraysEXT, mode, first, count, primcount);
}
void API_ENTRY(glMultiDrawElementsEXT)(GLenum mode, const GLsizei *count, GLenum type, const GLvoid* *indices, GLsizei primcount) {
CALL_GL_API(glMultiDrawElementsEXT, mode, count, type, indices, primcount);
}
+void API_ENTRY(glGenQueriesEXT)(GLsizei n, GLuint *ids) {
+ CALL_GL_API(glGenQueriesEXT, n, ids);
+}
+void API_ENTRY(glDeleteQueriesEXT)(GLsizei n, const GLuint *ids) {
+ CALL_GL_API(glDeleteQueriesEXT, n, ids);
+}
+GLboolean API_ENTRY(glIsQueryEXT)(GLuint id) {
+ CALL_GL_API_RETURN(glIsQueryEXT, id);
+}
+void API_ENTRY(glBeginQueryEXT)(GLenum target, GLuint id) {
+ CALL_GL_API(glBeginQueryEXT, target, id);
+}
+void API_ENTRY(glEndQueryEXT)(GLenum target) {
+ CALL_GL_API(glEndQueryEXT, target);
+}
+void API_ENTRY(glGetQueryivEXT)(GLenum target, GLenum pname, GLint *params) {
+ CALL_GL_API(glGetQueryivEXT, target, pname, params);
+}
+void API_ENTRY(glGetQueryObjectuivEXT)(GLuint id, GLenum pname, GLuint *params) {
+ CALL_GL_API(glGetQueryObjectuivEXT, id, pname, params);
+}
+GLenum API_ENTRY(glGetGraphicsResetStatusEXT)(void) {
+ CALL_GL_API_RETURN(glGetGraphicsResetStatusEXT);
+}
+void API_ENTRY(glReadnPixelsEXT)(GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, GLsizei bufSize, void *data) {
+ CALL_GL_API(glReadnPixelsEXT, x, y, width, height, format, type, bufSize, data);
+}
+void API_ENTRY(glGetnUniformfvEXT)(GLuint program, GLint location, GLsizei bufSize, float *params) {
+ CALL_GL_API(glGetnUniformfvEXT, program, location, bufSize, params);
+}
+void API_ENTRY(glGetnUniformivEXT)(GLuint program, GLint location, GLsizei bufSize, GLint *params) {
+ CALL_GL_API(glGetnUniformivEXT, program, location, bufSize, params);
+}
+void API_ENTRY(glUseProgramStagesEXT)(GLuint pipeline, GLbitfield stages, GLuint program) {
+ CALL_GL_API(glUseProgramStagesEXT, pipeline, stages, program);
+}
+void API_ENTRY(glActiveShaderProgramEXT)(GLuint pipeline, GLuint program) {
+ CALL_GL_API(glActiveShaderProgramEXT, pipeline, program);
+}
+GLuint API_ENTRY(glCreateShaderProgramvEXT)(GLenum type, GLsizei count, const GLchar **strings) {
+ CALL_GL_API_RETURN(glCreateShaderProgramvEXT, type, count, strings);
+}
+void API_ENTRY(glBindProgramPipelineEXT)(GLuint pipeline) {
+ CALL_GL_API(glBindProgramPipelineEXT, pipeline);
+}
+void API_ENTRY(glDeleteProgramPipelinesEXT)(GLsizei n, const GLuint *pipelines) {
+ CALL_GL_API(glDeleteProgramPipelinesEXT, n, pipelines);
+}
+void API_ENTRY(glGenProgramPipelinesEXT)(GLsizei n, GLuint *pipelines) {
+ CALL_GL_API(glGenProgramPipelinesEXT, n, pipelines);
+}
+GLboolean API_ENTRY(glIsProgramPipelineEXT)(GLuint pipeline) {
+ CALL_GL_API_RETURN(glIsProgramPipelineEXT, pipeline);
+}
+void API_ENTRY(glProgramParameteriEXT)(GLuint program, GLenum pname, GLint value) {
+ CALL_GL_API(glProgramParameteriEXT, program, pname, value);
+}
+void API_ENTRY(glGetProgramPipelineivEXT)(GLuint pipeline, GLenum pname, GLint *params) {
+ CALL_GL_API(glGetProgramPipelineivEXT, pipeline, pname, params);
+}
+void API_ENTRY(glProgramUniform1iEXT)(GLuint program, GLint location, GLint x) {
+ CALL_GL_API(glProgramUniform1iEXT, program, location, x);
+}
+void API_ENTRY(glProgramUniform2iEXT)(GLuint program, GLint location, GLint x, GLint y) {
+ CALL_GL_API(glProgramUniform2iEXT, program, location, x, y);
+}
+void API_ENTRY(glProgramUniform3iEXT)(GLuint program, GLint location, GLint x, GLint y, GLint z) {
+ CALL_GL_API(glProgramUniform3iEXT, program, location, x, y, z);
+}
+void API_ENTRY(glProgramUniform4iEXT)(GLuint program, GLint location, GLint x, GLint y, GLint z, GLint w) {
+ CALL_GL_API(glProgramUniform4iEXT, program, location, x, y, z, w);
+}
+void API_ENTRY(glProgramUniform1fEXT)(GLuint program, GLint location, GLfloat x) {
+ CALL_GL_API(glProgramUniform1fEXT, program, location, x);
+}
+void API_ENTRY(glProgramUniform2fEXT)(GLuint program, GLint location, GLfloat x, GLfloat y) {
+ CALL_GL_API(glProgramUniform2fEXT, program, location, x, y);
+}
+void API_ENTRY(glProgramUniform3fEXT)(GLuint program, GLint location, GLfloat x, GLfloat y, GLfloat z) {
+ CALL_GL_API(glProgramUniform3fEXT, program, location, x, y, z);
+}
+void API_ENTRY(glProgramUniform4fEXT)(GLuint program, GLint location, GLfloat x, GLfloat y, GLfloat z, GLfloat w) {
+ CALL_GL_API(glProgramUniform4fEXT, program, location, x, y, z, w);
+}
+void API_ENTRY(glProgramUniform1ivEXT)(GLuint program, GLint location, GLsizei count, const GLint *value) {
+ CALL_GL_API(glProgramUniform1ivEXT, program, location, count, value);
+}
+void API_ENTRY(glProgramUniform2ivEXT)(GLuint program, GLint location, GLsizei count, const GLint *value) {
+ CALL_GL_API(glProgramUniform2ivEXT, program, location, count, value);
+}
+void API_ENTRY(glProgramUniform3ivEXT)(GLuint program, GLint location, GLsizei count, const GLint *value) {
+ CALL_GL_API(glProgramUniform3ivEXT, program, location, count, value);
+}
+void API_ENTRY(glProgramUniform4ivEXT)(GLuint program, GLint location, GLsizei count, const GLint *value) {
+ CALL_GL_API(glProgramUniform4ivEXT, program, location, count, value);
+}
+void API_ENTRY(glProgramUniform1fvEXT)(GLuint program, GLint location, GLsizei count, const GLfloat *value) {
+ CALL_GL_API(glProgramUniform1fvEXT, program, location, count, value);
+}
+void API_ENTRY(glProgramUniform2fvEXT)(GLuint program, GLint location, GLsizei count, const GLfloat *value) {
+ CALL_GL_API(glProgramUniform2fvEXT, program, location, count, value);
+}
+void API_ENTRY(glProgramUniform3fvEXT)(GLuint program, GLint location, GLsizei count, const GLfloat *value) {
+ CALL_GL_API(glProgramUniform3fvEXT, program, location, count, value);
+}
+void API_ENTRY(glProgramUniform4fvEXT)(GLuint program, GLint location, GLsizei count, const GLfloat *value) {
+ CALL_GL_API(glProgramUniform4fvEXT, program, location, count, value);
+}
+void API_ENTRY(glProgramUniformMatrix2fvEXT)(GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value) {
+ CALL_GL_API(glProgramUniformMatrix2fvEXT, program, location, count, transpose, value);
+}
+void API_ENTRY(glProgramUniformMatrix3fvEXT)(GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value) {
+ CALL_GL_API(glProgramUniformMatrix3fvEXT, program, location, count, transpose, value);
+}
+void API_ENTRY(glProgramUniformMatrix4fvEXT)(GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value) {
+ CALL_GL_API(glProgramUniformMatrix4fvEXT, program, location, count, transpose, value);
+}
+void API_ENTRY(glValidateProgramPipelineEXT)(GLuint pipeline) {
+ CALL_GL_API(glValidateProgramPipelineEXT, pipeline);
+}
+void API_ENTRY(glGetProgramPipelineInfoLogEXT)(GLuint pipeline, GLsizei bufSize, GLsizei *length, GLchar *infoLog) {
+ CALL_GL_API(glGetProgramPipelineInfoLogEXT, pipeline, bufSize, length, infoLog);
+}
+void API_ENTRY(glTexStorage1DEXT)(GLenum target, GLsizei levels, GLenum internalformat, GLsizei width) {
+ CALL_GL_API(glTexStorage1DEXT, target, levels, internalformat, width);
+}
+void API_ENTRY(glTexStorage2DEXT)(GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height) {
+ CALL_GL_API(glTexStorage2DEXT, target, levels, internalformat, width, height);
+}
+void API_ENTRY(glTexStorage3DEXT)(GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth) {
+ CALL_GL_API(glTexStorage3DEXT, target, levels, internalformat, width, height, depth);
+}
+void API_ENTRY(glTextureStorage1DEXT)(GLuint texture, GLenum target, GLsizei levels, GLenum internalformat, GLsizei width) {
+ CALL_GL_API(glTextureStorage1DEXT, texture, target, levels, internalformat, width);
+}
+void API_ENTRY(glTextureStorage2DEXT)(GLuint texture, GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height) {
+ CALL_GL_API(glTextureStorage2DEXT, texture, target, levels, internalformat, width, height);
+}
+void API_ENTRY(glTextureStorage3DEXT)(GLuint texture, GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth) {
+ CALL_GL_API(glTextureStorage3DEXT, texture, target, levels, internalformat, width, height, depth);
+}
void API_ENTRY(glRenderbufferStorageMultisampleIMG)(GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height) {
CALL_GL_API(glRenderbufferStorageMultisampleIMG, target, samples, internalformat, width, height);
}
void API_ENTRY(glFramebufferTexture2DMultisampleIMG)(GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level, GLsizei samples) {
CALL_GL_API(glFramebufferTexture2DMultisampleIMG, target, attachment, textarget, texture, level, samples);
}
+void API_ENTRY(glCoverageMaskNV)(GLboolean mask) {
+ CALL_GL_API(glCoverageMaskNV, mask);
+}
+void API_ENTRY(glCoverageOperationNV)(GLenum operation) {
+ CALL_GL_API(glCoverageOperationNV, operation);
+}
+void API_ENTRY(glDrawBuffersNV)(GLsizei n, const GLenum *bufs) {
+ CALL_GL_API(glDrawBuffersNV, n, bufs);
+}
void API_ENTRY(glDeleteFencesNV)(GLsizei n, const GLuint *fences) {
CALL_GL_API(glDeleteFencesNV, n, fences);
}
@@ -118,11 +301,11 @@ void API_ENTRY(glFinishFenceNV)(GLuint fence) {
void API_ENTRY(glSetFenceNV)(GLuint fence, GLenum condition) {
CALL_GL_API(glSetFenceNV, fence, condition);
}
-void API_ENTRY(glCoverageMaskNV)(GLboolean mask) {
- CALL_GL_API(glCoverageMaskNV, mask);
+void API_ENTRY(glReadBufferNV)(GLenum mode) {
+ CALL_GL_API(glReadBufferNV, mode);
}
-void API_ENTRY(glCoverageOperationNV)(GLenum operation) {
- CALL_GL_API(glCoverageOperationNV, operation);
+void API_ENTRY(glAlphaFuncQCOM)(GLenum func, GLclampf ref) {
+ CALL_GL_API(glAlphaFuncQCOM, func, ref);
}
void API_ENTRY(glGetDriverControlsQCOM)(GLint *num, GLsizei size, GLuint *driverControls) {
CALL_GL_API(glGetDriverControlsQCOM, num, size, driverControls);
diff --git a/opengl/libs/GLES2_dbg/generate_api_cpp.py b/opengl/libs/GLES2_dbg/generate_api_cpp.py
deleted file mode 100755
index 96cde57..0000000
--- a/opengl/libs/GLES2_dbg/generate_api_cpp.py
+++ /dev/null
@@ -1,219 +0,0 @@
-#!/usr/bin/python
-# -*- coding: utf-8 -*-
-
-#
-# Copyright 2011, The Android Open Source Project
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-#
-
-import os
-import sys
-
-def RemoveAnnotation(line):
- if line.find(":") >= 0:
- annotation = line[line.find(":"): line.find(" ", line.find(":"))]
- return line.replace(annotation, "*")
- else:
- return line
-
-def generate_api(lines):
- externs = []
- i = 0
- # these have been hand written
- skipFunctions = ["glDrawArrays", "glDrawElements"]
-
- # these have an EXTEND_Debug_* macro for getting data
- extendFunctions = ["glCopyTexImage2D", "glCopyTexSubImage2D", "glReadPixels",
-"glShaderSource", "glTexImage2D", "glTexSubImage2D"]
-
- # these also needs to be forwarded to DbgContext
- contextFunctions = ["glUseProgram", "glEnableVertexAttribArray", "glDisableVertexAttribArray",
-"glVertexAttribPointer", "glBindBuffer", "glBufferData", "glBufferSubData", "glDeleteBuffers",]
-
- for line in lines:
- if line.find("API_ENTRY(") >= 0: # a function prototype
- returnType = line[0: line.find(" API_ENTRY(")]
- functionName = line[line.find("(") + 1: line.find(")")] #extract GL function name
- parameterList = line[line.find(")(") + 2: line.find(") {")]
-
- #if line.find("*") >= 0:
- # extern = "%s Debug_%s(%s);" % (returnType, functionName, parameterList)
- # externs.append(extern)
- # continue
-
- if functionName in skipFunctions:
- sys.stderr.write("!\n! skipping function '%s'\n!\n" % (functionName))
- continue
-
- parameters = parameterList.split(',')
- paramIndex = 0
- if line.find("*") >= 0 and (line.find("*") < line.find(":") or line.find("*") > line.rfind(":")): # unannotated pointer
- if not functionName in extendFunctions:
- # add function to list of functions that should be hand written, but generate code anyways
- extern = "%s Debug_%s(%s);" % (returnType, functionName, RemoveAnnotation(parameterList))
- sys.stderr.write("%s should be hand written\n" % (extern))
- print "// FIXME: this function has pointers, it should be hand written"
- externs.append(extern)
-
- print "%s Debug_%s(%s)\n{" % (returnType, functionName, RemoveAnnotation(parameterList))
- print " glesv2debugger::Message msg;"
-
- if parameterList == "void":
- parameters = []
- arguments = ""
- paramNames = []
- inout = ""
- getData = ""
-
- callerMembers = ""
- setCallerMembers = ""
- setMsgParameters = ""
-
- for parameter in parameters:
- const = parameter.find("const")
- parameter = parameter.replace("const", "")
- parameter = parameter.strip()
- paramType = parameter.split(' ')[0]
- paramName = parameter.split(' ')[1]
- annotation = ""
- arguments += paramName
- if parameter.find(":") >= 0: # has annotation
- assert inout == "" # only one parameter should be annotated
- sys.stderr.write("%s is annotated: %s \n" % (functionName, paramType))
- inout = paramType.split(":")[2]
- annotation = paramType.split(":")[1]
- paramType = paramType.split(":")[0]
- count = 1
- countArg = ""
- if annotation.find("*") >= 0: # [1,n] * param
- count = int(annotation.split("*")[0])
- countArg = annotation.split("*")[1]
- assert countArg in paramNames
- elif annotation in paramNames:
- count = 1
- countArg = annotation
- elif annotation == "GLstring":
- annotation = "strlen(%s)" % (paramName)
- else:
- count = int(annotation)
-
- setMsgParameters += " msg.set_arg%d(ToInt(%s));\n" % (paramIndex, paramName)
- if paramType.find("void") >= 0:
- getData += " msg.mutable_data()->assign(reinterpret_cast<const char *>(%s), %s * sizeof(char));" % (paramName, annotation)
- else:
- getData += " msg.mutable_data()->assign(reinterpret_cast<const char *>(%s), %s * sizeof(%s));" % (paramName, annotation, paramType)
- paramType += "*"
- else:
- if paramType == "GLfloat" or paramType == "GLclampf" or paramType.find("*") >= 0:
- setMsgParameters += " msg.set_arg%d(ToInt(%s));\n" % (paramIndex, paramName)
- else:
- setMsgParameters += " msg.set_arg%d(%s);\n" % (paramIndex, paramName)
- if paramIndex < len(parameters) - 1:
- arguments += ', '
- if const >= 0:
- paramType = "const " + paramType
- paramNames.append(paramName)
- paramIndex += 1
- callerMembers += " %s %s;\n" % (paramType, paramName)
- setCallerMembers += " caller.%s = %s;\n" % (paramName, paramName)
-
- print " struct : public FunctionCall {"
- print callerMembers
- print " const int * operator()(gl_hooks_t::gl_t const * const _c, glesv2debugger::Message & msg) {"
- if inout in ["out", "inout"]: # get timing excluding output data copy
- print " nsecs_t c0 = systemTime(timeMode);"
- if returnType == "void":
- print " _c->%s(%s);" % (functionName, arguments)
- else:
- print " const int * ret = reinterpret_cast<const int *>(_c->%s(%s));" % (functionName, arguments)
- print " msg.set_ret(ToInt(ret));"
- if inout in ["out", "inout"]:
- print " msg.set_time((systemTime(timeMode) - c0) * 1e-6f);"
- print " " + getData
- if functionName in extendFunctions:
- print "\
-#ifdef EXTEND_AFTER_CALL_Debug_%s\n\
- EXTEND_AFTER_CALL_Debug_%s;\n\
-#endif" % (functionName, functionName)
- if functionName in contextFunctions:
- print " getDbgContextThreadSpecific()->%s(%s);" % (functionName, arguments)
- if returnType == "void":
- print " return 0;"
- else:
- print " return ret;"
- print """ }
- } caller;"""
- print setCallerMembers
- print setMsgParameters
-
- if line.find("*") >= 0 or line.find(":") >= 0:
- print " // FIXME: check for pointer usage"
- if inout in ["in", "inout"]:
- print getData
- if functionName in extendFunctions:
- print "\
-#ifdef EXTEND_Debug_%s\n\
- EXTEND_Debug_%s;\n\
-#endif" % (functionName, functionName)
- print " int * ret = MessageLoop(caller, msg, glesv2debugger::Message_Function_%s);"\
- % (functionName)
- if returnType != "void":
- if returnType == "GLboolean":
- print " return static_cast<GLboolean>(reinterpret_cast<int>(ret));"
- else:
- print " return reinterpret_cast<%s>(ret);" % (returnType)
- print "}\n"
-
-
- print "// FIXME: the following functions should be written by hand"
- for extern in externs:
- print extern
-
-if __name__ == "__main__":
- print """\
-/*
- ** Copyright 2011, The Android Open Source Project
- **
- ** Licensed under the Apache License, Version 2.0 (the "License");
- ** you may not use this file except in compliance with the License.
- ** You may obtain a copy of the License at
- **
- ** http://www.apache.org/licenses/LICENSE-2.0
- **
- ** Unless required by applicable law or agreed to in writing, software
- ** distributed under the License is distributed on an "AS IS" BASIS,
- ** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- ** See the License for the specific language governing permissions and
- ** limitations under the License.
- */
-
-// auto generated by generate_api_cpp.py
-
-#include <utils/Debug.h>
-
-#include "src/header.h"
-#include "src/api.h"
-
-template<typename T> static int ToInt(const T & t)
-{
- COMPILE_TIME_ASSERT_FUNCTION_SCOPE(sizeof(T) == sizeof(int));
- return (int &)t;
-}
-"""
- lines = open("gl2_api_annotated.in").readlines()
- generate_api(lines)
- #lines = open("gl2ext_api.in").readlines()
- #generate_api(lines)
-
-
diff --git a/opengl/libs/GLES2_dbg/generate_caller_cpp.py b/opengl/libs/GLES2_dbg/generate_caller_cpp.py
deleted file mode 100755
index ee4208d..0000000
--- a/opengl/libs/GLES2_dbg/generate_caller_cpp.py
+++ /dev/null
@@ -1,199 +0,0 @@
-#!/usr/bin/python
-# -*- coding: utf-8 -*-
-
-#
-# Copyright 2011, The Android Open Source Project
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-#
-
-import os
-import sys
-
-externs = []
-
-def generate_caller(lines):
- i = 0
- output = ""
- skipFunctions = []
-
- for line in lines:
- if line.find("API_ENTRY(") >= 0: # a function prototype
- returnType = line[0: line.find(" API_ENTRY(")]
- functionName = line[line.find("(") + 1: line.find(")")] #extract GL function name
- parameterList = line[line.find(")(") + 2: line.find(") {")]
-
- #if line.find("*") >= 0:
- # extern = "%s Debug_%s(%s);" % (returnType, functionName, parameterList)
- # externs.append(extern)
- # continue
-
- if functionName in skipFunctions:
- sys.stderr.write("!\n! skipping function '%s'\n!\n" % functionName)
- continue
- output += "\
- case glesv2debugger::Message_Function_%s:\n" % functionName
- parameters = parameterList.split(',')
- paramIndex = 0
- if line.find("*") >= 0 and (line.find("*") < line.find(":") or line.find("*") > line.rfind(":")): # unannotated pointer
- # add function to list of functions that should be hand written, but generate code anyways
- externs.append(functionName)
- output += "\
- ret = GenerateCall_%s(dbg, cmd, msg, prevRet);\n\
- break;\n" % (functionName)
- continue
- elif line.find(":out") >= 0 or line.find(":inout") >= 0:
- externs.append(functionName)
- output += "\
- ret = GenerateCall_%s(dbg, cmd, msg, prevRet);\n\
- break; // annotated output pointers\n" % (functionName)
- continue
-
- if parameterList == "void":
- parameters = []
- arguments = ""
- paramNames = []
- inout = ""
- getData = ""
-
- callerMembers = ""
-
- for parameter in parameters:
- const = parameter.find("const")
- parameter = parameter.replace("const", "")
- parameter = parameter.strip()
- paramType = parameter.split(' ')[0]
- paramName = parameter.split(' ')[1]
- annotation = ""
- if parameter.find(":") >= 0: # has annotation
- assert inout == "" # only one parameter should be annotated
- sys.stderr.write("%s is annotated: %s \n" % (functionName, paramType))
- inout = paramType.split(":")[2]
- annotation = paramType.split(":")[1]
- paramType = paramType.split(":")[0]
- count = 1
- countArg = ""
- if annotation.find("*") >= 0: # [1,n] * param
- count = int(annotation.split("*")[0])
- countArg = annotation.split("*")[1]
- assert countArg in paramNames
- elif annotation in paramNames:
- count = 1
- countArg = annotation
- elif annotation == "GLstring":
- annotation = "strlen(%s)" % (paramName)
- else:
- count = int(annotation)
-
- paramType += "*"
- arguments += "reinterpret_cast<%s>(const_cast<char *>(cmd.data().data()))" % (paramType)
- elif paramType == "GLboolean":
- arguments += "GLboolean(cmd.arg%d())" % (paramIndex)
- else:
- arguments += "static_cast<%s>(cmd.arg%d())" % (paramType, paramIndex)
-
- if paramIndex < len(parameters) - 1:
- arguments += ", "
- if len(arguments) - arguments.rfind("\n") > 60 :
- arguments += "\n\
- "
- if const >= 0:
- paramType = "const " + paramType
- paramNames.append(paramName)
- paramIndex += 1
-
- if returnType == "void":
- output += "\
- dbg->hooks->gl.%s(\n\
- %s);\n\
- break;\n" % (functionName, arguments)
- else:
- output += "\
- msg.set_ret(static_cast<int>(dbg->hooks->gl.%s(\n\
- %s)));\n\
- if (cmd.has_ret())\n\
- ret = reinterpret_cast<int *>(msg.ret());\n\
- break;\n" % (functionName, arguments)
- return output
-
-if __name__ == "__main__":
-
- lines = open("gl2_api_annotated.in").readlines()
- output = generate_caller(lines)
-
- out = open("src/caller.cpp", "w")
- out.write("""\
-/*
- ** Copyright 2011, The Android Open Source Project
- **
- ** Licensed under the Apache License, Version 2.0 (the "License");
- ** you may not use this file except in compliance with the License.
- ** You may obtain a copy of the License at
- **
- ** http://www.apache.org/licenses/LICENSE-2.0
- **
- ** Unless required by applicable law or agreed to in writing, software
- ** distributed under the License is distributed on an "AS IS" BASIS,
- ** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- ** See the License for the specific language governing permissions and
- ** limitations under the License.
- */
-
-// auto generated by generate_caller_cpp.py
-// implement declarations in caller.h
-
-#include "header.h"
-
-namespace android {
-
-""")
-
- for extern in externs:
- out.write("\
-static const int * GenerateCall_%s(DbgContext * const dbg,\n\
- const glesv2debugger::Message & cmd, glesv2debugger::Message & msg, const int * const prevRet);\n" % (extern))
- print("\
-static const int * GenerateCall_%s(DbgContext * const dbg,\n\
- const glesv2debugger::Message & cmd,\n\
- glesv2debugger::Message & msg, const int * const prevRet)\n\
-{ assert(0); return prevRet; }\n" % (extern))
-
- out.write(
-"""
-#include "caller.h"
-
-const int * GenerateCall(DbgContext * const dbg, const glesv2debugger::Message & cmd,
- glesv2debugger::Message & msg, const int * const prevRet)
-{
- LOGD("GenerateCall function=%u", cmd.function());
- const int * ret = prevRet; // only some functions have return value
- nsecs_t c0 = systemTime(timeMode);
- switch (cmd.function()) {""")
-
- out.write(output)
-
- out.write("""\
- default:
- assert(0);
- }
- msg.set_time((systemTime(timeMode) - c0) * 1e-6f);
- msg.set_context_id(reinterpret_cast<int>(dbg));
- msg.set_function(cmd.function());
- msg.set_type(glesv2debugger::Message_Type_AfterCall);
- return ret;
-}
-
-}; // name space android {
-""")
-
-
diff --git a/opengl/libs/GLES2_dbg/generate_debug_in.py b/opengl/libs/GLES2_dbg/generate_debug_in.py
deleted file mode 100755
index 1280c6f..0000000
--- a/opengl/libs/GLES2_dbg/generate_debug_in.py
+++ /dev/null
@@ -1,80 +0,0 @@
-#!/usr/bin/python
-# -*- coding: utf-8 -*-
-
-#
-# Copyright 2011, The Android Open Source Project
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-#
-
-import os
-import sys
-
-def append_functions(functions, lines):
- i = 0
- for line in lines:
- if line.find("API_ENTRY(") >= 0: # a function prototype
- returnType = line[0: line.find(" API_ENTRY(")]
- functionName = line[line.find("(") + 1: line.find(")")] #extract GL function name
- parameterList = line[line.find(")(") + 2: line.find(") {")]
-
- functions.append(functionName)
- #print functionName
- continue
-
- parameters = parameterList.split(',')
- paramIndex = 0
- if line.find("*") >= 0:
- print "// FIXME: this function has pointers, it should be hand written"
- externs.append("%s Tracing_%s(%s);" % (returnType, functionName, parameterList))
- print "%s Tracing_%s(%s)\n{" % (returnType, functionName, parameterList)
-
- if parameterList == "void":
- parameters = []
-
- arguments = ""
-
- for parameter in parameters:
- parameter = parameter.replace("const", "")
- parameter = parameter.strip()
- paramType = parameter.split(' ')[0]
- paramName = parameter.split(' ')[1]
-
- paramIndex += 1
-
- return functions
-
-
-
-if __name__ == "__main__":
- definedFunctions = []
- lines = open("gl2_api_annotated.in").readlines()
- definedFunctions = append_functions(definedFunctions, lines)
-
- output = open("../debug.in", "w")
- lines = open("../trace.in").readlines()
- output.write("// the following functions are not defined in GLESv2_dbg\n")
- for line in lines:
- functionName = ""
- if line.find("TRACE_GL(") >= 0: # a function prototype
- functionName = line.split(',')[1].strip()
- elif line.find("TRACE_GL_VOID(") >= 0: # a function prototype
- functionName = line[line.find("(") + 1: line.find(",")] #extract GL function name
- else:
- continue
- if functionName in definedFunctions:
- #print functionName
- continue
- else:
- output.write(line)
-
diff --git a/opengl/libs/GLES2_dbg/generate_debugger_message_proto.py b/opengl/libs/GLES2_dbg/generate_debugger_message_proto.py
deleted file mode 100755
index 535b13e..0000000
--- a/opengl/libs/GLES2_dbg/generate_debugger_message_proto.py
+++ /dev/null
@@ -1,155 +0,0 @@
-#!/usr/bin/python
-# -*- coding: utf-8 -*-
-
-#
-# Copyright 2011, The Android Open Source Project
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-#
-
-import os
-
-def generate_egl_entries(output, lines, i):
- for line in lines:
- if line.find("EGL_ENTRY(") >= 0:
- line = line.split(",")[1].strip() #extract EGL function name
- output.write(" %s = %d;\n" % (line, i))
- i += 1
- return i
-
-
-def generate_gl_entries(output,lines,i):
- for line in lines:
- if line.find("API_ENTRY(") >= 0:
- line = line[line.find("(") + 1: line.find(")")] #extract GL function name
- output.write(" %s = %d;\n" % (line, i))
- i += 1
- return i
-
-
-if __name__ == "__main__":
- output = open("debugger_message.proto",'w')
- output.write("""\
-/*
- * Copyright (C) 2011 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-// do not edit; auto generated by generate_debugger_message_proto.py
-
-package com.android.glesv2debugger;
-
-option optimize_for = LITE_RUNTIME;
-
-message Message
-{
- required int32 context_id = 1; // GL context id
- enum Function
- {
-""")
-
- i = 0;
-
- lines = open("gl2_api_annotated.in").readlines()
- i = generate_gl_entries(output, lines, i)
- output.write(" // end of GL functions\n")
-
- #lines = open("gl2ext_api.in").readlines()
- #i = generate_gl_entries(output, lines, i)
- #output.write(" // end of GL EXT functions\n")
-
- lines = open("../EGL/egl_entries.in").readlines()
- i = generate_egl_entries(output, lines, i)
- output.write(" // end of GL EXT functions\n")
-
- output.write(" ACK = %d;\n" % (i))
- i += 1
-
- output.write(" NEG = %d;\n" % (i))
- i += 1
-
- output.write(" CONTINUE = %d;\n" % (i))
- i += 1
-
- output.write(" SKIP = %d;\n" % (i))
- i += 1
-
- output.write(" SETPROP = %d;\n" % (i))
- i += 1
-
- output.write(""" }
- required Function function = 2 [default = NEG]; // type/function of message
- enum Type
- {
- BeforeCall = 0;
- AfterCall = 1;
- AfterGeneratedCall = 2;
- Response = 3; // currently used for misc messages
- CompleteCall = 4; // BeforeCall and AfterCall merged
- }
- required Type type = 3;
- required bool expect_response = 4;
- optional int32 ret = 5; // return value from previous GL call
- optional int32 arg0 = 6; // args to GL call
- optional int32 arg1 = 7;
- optional int32 arg2 = 8;
- optional int32 arg3 = 9;
- optional int32 arg4 = 16;
- optional int32 arg5 = 17;
- optional int32 arg6 = 18;
- optional int32 arg7 = 19; // glDrawArrays/Elements sets this to active number of attributes
- optional int32 arg8 = 20;
-
- optional bytes data = 10; // variable length data used for GL call
- enum DataType
- {
- ReferencedImage = 0; // for image sourced from ReadPixels
- NonreferencedImage = 1; // for image sourced from ReadPixels
- };
- // most data types can be inferred from function
- optional DataType data_type = 23;
- // these are used for image data when they cannot be determined from args
- optional int32 pixel_format = 24;
- optional int32 pixel_type = 25;
- optional int32 image_width = 26;
- optional int32 image_height = 27;
-
- optional float time = 11; // duration of previous GL call (ms)
- enum Prop
- {
- CaptureDraw = 0; // arg0 = number of glDrawArrays/Elements to glReadPixels
- TimeMode = 1; // arg0 = SYSTEM_TIME_* in utils/Timers.h
- ExpectResponse = 2; // arg0 = enum Function, arg1 = true/false
- CaptureSwap = 3; // arg0 = number of eglSwapBuffers to glReadPixels
- GLConstant = 4; // arg0 = GLenum, arg1 = constant; send GL impl. constants
- };
- optional Prop prop = 21; // used with SETPROP, value in arg0
- optional float clock = 22; // wall clock in seconds
-}
-""")
-
- output.close()
-
- os.system("aprotoc --cpp_out=src --java_out=../../../../../development/tools/glesv2debugger/src debugger_message.proto")
- os.system('mv -f "src/debugger_message.pb.cc" "src/debugger_message.pb.cpp"')
diff --git a/opengl/libs/GLES2_dbg/gl2_api_annotated.in b/opengl/libs/GLES2_dbg/gl2_api_annotated.in
deleted file mode 100644
index 227e2eb..0000000
--- a/opengl/libs/GLES2_dbg/gl2_api_annotated.in
+++ /dev/null
@@ -1,426 +0,0 @@
-void API_ENTRY(glActiveTexture)(GLenum texture) {
- CALL_GL_API(glActiveTexture, texture);
-}
-void API_ENTRY(glAttachShader)(GLuint program, GLuint shader) {
- CALL_GL_API(glAttachShader, program, shader);
-}
-void API_ENTRY(glBindAttribLocation)(GLuint program, GLuint index, const GLchar:GLstring:in name) {
- CALL_GL_API(glBindAttribLocation, program, index, name);
-}
-void API_ENTRY(glBindBuffer)(GLenum target, GLuint buffer) {
- CALL_GL_API(glBindBuffer, target, buffer);
-}
-void API_ENTRY(glBindFramebuffer)(GLenum target, GLuint framebuffer) {
- CALL_GL_API(glBindFramebuffer, target, framebuffer);
-}
-void API_ENTRY(glBindRenderbuffer)(GLenum target, GLuint renderbuffer) {
- CALL_GL_API(glBindRenderbuffer, target, renderbuffer);
-}
-void API_ENTRY(glBindTexture)(GLenum target, GLuint texture) {
- CALL_GL_API(glBindTexture, target, texture);
-}
-void API_ENTRY(glBlendColor)(GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha) {
- CALL_GL_API(glBlendColor, red, green, blue, alpha);
-}
-void API_ENTRY(glBlendEquation)( GLenum mode ) {
- CALL_GL_API(glBlendEquation, mode);
-}
-void API_ENTRY(glBlendEquationSeparate)(GLenum modeRGB, GLenum modeAlpha) {
- CALL_GL_API(glBlendEquationSeparate, modeRGB, modeAlpha);
-}
-void API_ENTRY(glBlendFunc)(GLenum sfactor, GLenum dfactor) {
- CALL_GL_API(glBlendFunc, sfactor, dfactor);
-}
-void API_ENTRY(glBlendFuncSeparate)(GLenum srcRGB, GLenum dstRGB, GLenum srcAlpha, GLenum dstAlpha) {
- CALL_GL_API(glBlendFuncSeparate, srcRGB, dstRGB, srcAlpha, dstAlpha);
-}
-void API_ENTRY(glBufferData)(GLenum target, GLsizeiptr size, const GLvoid:size:in data, GLenum usage) {
- CALL_GL_API(glBufferData, target, size, data, usage);
-}
-void API_ENTRY(glBufferSubData)(GLenum target, GLintptr offset, GLsizeiptr size, const GLvoid:size:in data) {
- CALL_GL_API(glBufferSubData, target, offset, size, data);
-}
-GLenum API_ENTRY(glCheckFramebufferStatus)(GLenum target) {
- CALL_GL_API_RETURN(glCheckFramebufferStatus, target);
-}
-void API_ENTRY(glClear)(GLbitfield mask) {
- CALL_GL_API(glClear, mask);
-}
-void API_ENTRY(glClearColor)(GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha) {
- CALL_GL_API(glClearColor, red, green, blue, alpha);
-}
-void API_ENTRY(glClearDepthf)(GLclampf depth) {
- CALL_GL_API(glClearDepthf, depth);
-}
-void API_ENTRY(glClearStencil)(GLint s) {
- CALL_GL_API(glClearStencil, s);
-}
-void API_ENTRY(glColorMask)(GLboolean red, GLboolean green, GLboolean blue, GLboolean alpha) {
- CALL_GL_API(glColorMask, red, green, blue, alpha);
-}
-void API_ENTRY(glCompileShader)(GLuint shader) {
- CALL_GL_API(glCompileShader, shader);
-}
-void API_ENTRY(glCompressedTexImage2D)(GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLsizei imageSize, const GLvoid* data) {
- CALL_GL_API(glCompressedTexImage2D, target, level, internalformat, width, height, border, imageSize, data);
-}
-void API_ENTRY(glCompressedTexSubImage2D)(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, const GLvoid* data) {
- CALL_GL_API(glCompressedTexSubImage2D, target, level, xoffset, yoffset, width, height, format, imageSize, data);
-}
-void API_ENTRY(glCopyTexImage2D)(GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height, GLint border) {
- CALL_GL_API(glCopyTexImage2D, target, level, internalformat, x, y, width, height, border);
-}
-void API_ENTRY(glCopyTexSubImage2D)(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint x, GLint y, GLsizei width, GLsizei height) {
- CALL_GL_API(glCopyTexSubImage2D, target, level, xoffset, yoffset, x, y, width, height);
-}
-GLuint API_ENTRY(glCreateProgram)(void) {
- CALL_GL_API_RETURN(glCreateProgram);
-}
-GLuint API_ENTRY(glCreateShader)(GLenum type) {
- CALL_GL_API_RETURN(glCreateShader, type);
-}
-void API_ENTRY(glCullFace)(GLenum mode) {
- CALL_GL_API(glCullFace, mode);
-}
-void API_ENTRY(glDeleteBuffers)(GLsizei n, const GLuint:n:in buffers) {
- CALL_GL_API(glDeleteBuffers, n, buffers);
-}
-void API_ENTRY(glDeleteFramebuffers)(GLsizei n, const GLuint:n:in framebuffers) {
- CALL_GL_API(glDeleteFramebuffers, n, framebuffers);
-}
-void API_ENTRY(glDeleteProgram)(GLuint program) {
- CALL_GL_API(glDeleteProgram, program);
-}
-void API_ENTRY(glDeleteRenderbuffers)(GLsizei n, const GLuint:n:in renderbuffers) {
- CALL_GL_API(glDeleteRenderbuffers, n, renderbuffers);
-}
-void API_ENTRY(glDeleteShader)(GLuint shader) {
- CALL_GL_API(glDeleteShader, shader);
-}
-void API_ENTRY(glDeleteTextures)(GLsizei n, const GLuint:n:in textures) {
- CALL_GL_API(glDeleteTextures, n, textures);
-}
-void API_ENTRY(glDepthFunc)(GLenum func) {
- CALL_GL_API(glDepthFunc, func);
-}
-void API_ENTRY(glDepthMask)(GLboolean flag) {
- CALL_GL_API(glDepthMask, flag);
-}
-void API_ENTRY(glDepthRangef)(GLclampf zNear, GLclampf zFar) {
- CALL_GL_API(glDepthRangef, zNear, zFar);
-}
-void API_ENTRY(glDetachShader)(GLuint program, GLuint shader) {
- CALL_GL_API(glDetachShader, program, shader);
-}
-void API_ENTRY(glDisable)(GLenum cap) {
- CALL_GL_API(glDisable, cap);
-}
-void API_ENTRY(glDisableVertexAttribArray)(GLuint index) {
- CALL_GL_API(glDisableVertexAttribArray, index);
-}
-void API_ENTRY(glDrawArrays)(GLenum mode, GLint first, GLsizei count) {
- CALL_GL_API(glDrawArrays, mode, first, count);
-}
-void API_ENTRY(glDrawElements)(GLenum mode, GLsizei count, GLenum type, const GLvoid* indices) {
- CALL_GL_API(glDrawElements, mode, count, type, indices);
-}
-void API_ENTRY(glEnable)(GLenum cap) {
- CALL_GL_API(glEnable, cap);
-}
-void API_ENTRY(glEnableVertexAttribArray)(GLuint index) {
- CALL_GL_API(glEnableVertexAttribArray, index);
-}
-void API_ENTRY(glFinish)(void) {
- CALL_GL_API(glFinish);
-}
-void API_ENTRY(glFlush)(void) {
- CALL_GL_API(glFlush);
-}
-void API_ENTRY(glFramebufferRenderbuffer)(GLenum target, GLenum attachment, GLenum renderbuffertarget, GLuint renderbuffer) {
- CALL_GL_API(glFramebufferRenderbuffer, target, attachment, renderbuffertarget, renderbuffer);
-}
-void API_ENTRY(glFramebufferTexture2D)(GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level) {
- CALL_GL_API(glFramebufferTexture2D, target, attachment, textarget, texture, level);
-}
-void API_ENTRY(glFrontFace)(GLenum mode) {
- CALL_GL_API(glFrontFace, mode);
-}
-void API_ENTRY(glGenBuffers)(GLsizei n, GLuint:n:out buffers) {
- CALL_GL_API(glGenBuffers, n, buffers);
-}
-void API_ENTRY(glGenerateMipmap)(GLenum target) {
- CALL_GL_API(glGenerateMipmap, target);
-}
-void API_ENTRY(glGenFramebuffers)(GLsizei n, GLuint:n:out framebuffers) {
- CALL_GL_API(glGenFramebuffers, n, framebuffers);
-}
-void API_ENTRY(glGenRenderbuffers)(GLsizei n, GLuint:n:out renderbuffers) {
- CALL_GL_API(glGenRenderbuffers, n, renderbuffers);
-}
-void API_ENTRY(glGenTextures)(GLsizei n, GLuint:n:out textures) {
- CALL_GL_API(glGenTextures, n, textures);
-}
-void API_ENTRY(glGetActiveAttrib)(GLuint program, GLuint index, GLsizei bufsize, GLsizei* length, GLint* size, GLenum* type, GLchar:GLstring:in name) {
- CALL_GL_API(glGetActiveAttrib, program, index, bufsize, length, size, type, name);
-}
-void API_ENTRY(glGetActiveUniform)(GLuint program, GLuint index, GLsizei bufsize, GLsizei* length, GLint* size, GLenum* type, GLchar:GLstring:in name) {
- CALL_GL_API(glGetActiveUniform, program, index, bufsize, length, size, type, name);
-}
-void API_ENTRY(glGetAttachedShaders)(GLuint program, GLsizei maxcount, GLsizei* count, GLuint* shaders) {
- CALL_GL_API(glGetAttachedShaders, program, maxcount, count, shaders);
-}
-int API_ENTRY(glGetAttribLocation)(GLuint program, const GLchar:GLstring:in name) {
- CALL_GL_API_RETURN(glGetAttribLocation, program, name);
-}
-void API_ENTRY(glGetBooleanv)(GLenum pname, GLboolean* params) {
- CALL_GL_API(glGetBooleanv, pname, params);
-}
-void API_ENTRY(glGetBufferParameteriv)(GLenum target, GLenum pname, GLint* params) {
- CALL_GL_API(glGetBufferParameteriv, target, pname, params);
-}
-GLenum API_ENTRY(glGetError)(void) {
- CALL_GL_API_RETURN(glGetError);
-}
-void API_ENTRY(glGetFloatv)(GLenum pname, GLfloat* params) {
- CALL_GL_API(glGetFloatv, pname, params);
-}
-void API_ENTRY(glGetFramebufferAttachmentParameteriv)(GLenum target, GLenum attachment, GLenum pname, GLint* params) {
- CALL_GL_API(glGetFramebufferAttachmentParameteriv, target, attachment, pname, params);
-}
-void API_ENTRY(glGetIntegerv)(GLenum pname, GLint* params) {
- CALL_GL_API(glGetIntegerv, pname, params);
-}
-void API_ENTRY(glGetProgramiv)(GLuint program, GLenum pname, GLint:1:out params) {
- CALL_GL_API(glGetProgramiv, program, pname, params);
-}
-void API_ENTRY(glGetProgramInfoLog)(GLuint program, GLsizei bufsize, GLsizei* length, GLchar:GLstring:out infolog) {
- CALL_GL_API(glGetProgramInfoLog, program, bufsize, length, infolog);
-}
-void API_ENTRY(glGetRenderbufferParameteriv)(GLenum target, GLenum pname, GLint* params) {
- CALL_GL_API(glGetRenderbufferParameteriv, target, pname, params);
-}
-void API_ENTRY(glGetShaderiv)(GLuint shader, GLenum pname, GLint:1:out params) {
- CALL_GL_API(glGetShaderiv, shader, pname, params);
-}
-void API_ENTRY(glGetShaderInfoLog)(GLuint shader, GLsizei bufsize, GLsizei* length, GLchar:GLstring:out infolog) {
- CALL_GL_API(glGetShaderInfoLog, shader, bufsize, length, infolog);
-}
-void API_ENTRY(glGetShaderPrecisionFormat)(GLenum shadertype, GLenum precisiontype, GLint* range, GLint* precision) {
- CALL_GL_API(glGetShaderPrecisionFormat, shadertype, precisiontype, range, precision);
-}
-void API_ENTRY(glGetShaderSource)(GLuint shader, GLsizei bufsize, GLsizei* length, GLchar:GLstring:out source) {
- CALL_GL_API(glGetShaderSource, shader, bufsize, length, source);
-}
-const GLubyte* API_ENTRY(glGetString)(GLenum name) {
- CALL_GL_API_RETURN(glGetString, name);
-}
-void API_ENTRY(glGetTexParameterfv)(GLenum target, GLenum pname, GLfloat* params) {
- CALL_GL_API(glGetTexParameterfv, target, pname, params);
-}
-void API_ENTRY(glGetTexParameteriv)(GLenum target, GLenum pname, GLint* params) {
- CALL_GL_API(glGetTexParameteriv, target, pname, params);
-}
-void API_ENTRY(glGetUniformfv)(GLuint program, GLint location, GLfloat* params) {
- CALL_GL_API(glGetUniformfv, program, location, params);
-}
-void API_ENTRY(glGetUniformiv)(GLuint program, GLint location, GLint* params) {
- CALL_GL_API(glGetUniformiv, program, location, params);
-}
-int API_ENTRY(glGetUniformLocation)(GLuint program, const GLchar:GLstring:in name) {
- CALL_GL_API_RETURN(glGetUniformLocation, program, name);
-}
-void API_ENTRY(glGetVertexAttribfv)(GLuint index, GLenum pname, GLfloat* params) {
- CALL_GL_API(glGetVertexAttribfv, index, pname, params);
-}
-void API_ENTRY(glGetVertexAttribiv)(GLuint index, GLenum pname, GLint* params) {
- CALL_GL_API(glGetVertexAttribiv, index, pname, params);
-}
-void API_ENTRY(glGetVertexAttribPointerv)(GLuint index, GLenum pname, GLvoid** pointer) {
- CALL_GL_API(glGetVertexAttribPointerv, index, pname, pointer);
-}
-void API_ENTRY(glHint)(GLenum target, GLenum mode) {
- CALL_GL_API(glHint, target, mode);
-}
-GLboolean API_ENTRY(glIsBuffer)(GLuint buffer) {
- CALL_GL_API_RETURN(glIsBuffer, buffer);
-}
-GLboolean API_ENTRY(glIsEnabled)(GLenum cap) {
- CALL_GL_API_RETURN(glIsEnabled, cap);
-}
-GLboolean API_ENTRY(glIsFramebuffer)(GLuint framebuffer) {
- CALL_GL_API_RETURN(glIsFramebuffer, framebuffer);
-}
-GLboolean API_ENTRY(glIsProgram)(GLuint program) {
- CALL_GL_API_RETURN(glIsProgram, program);
-}
-GLboolean API_ENTRY(glIsRenderbuffer)(GLuint renderbuffer) {
- CALL_GL_API_RETURN(glIsRenderbuffer, renderbuffer);
-}
-GLboolean API_ENTRY(glIsShader)(GLuint shader) {
- CALL_GL_API_RETURN(glIsShader, shader);
-}
-GLboolean API_ENTRY(glIsTexture)(GLuint texture) {
- CALL_GL_API_RETURN(glIsTexture, texture);
-}
-void API_ENTRY(glLineWidth)(GLfloat width) {
- CALL_GL_API(glLineWidth, width);
-}
-void API_ENTRY(glLinkProgram)(GLuint program) {
- CALL_GL_API(glLinkProgram, program);
-}
-void API_ENTRY(glPixelStorei)(GLenum pname, GLint param) {
- CALL_GL_API(glPixelStorei, pname, param);
-}
-void API_ENTRY(glPolygonOffset)(GLfloat factor, GLfloat units) {
- CALL_GL_API(glPolygonOffset, factor, units);
-}
-void API_ENTRY(glReadPixels)(GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, GLvoid* pixels) {
- CALL_GL_API(glReadPixels, x, y, width, height, format, type, pixels);
-}
-void API_ENTRY(glReleaseShaderCompiler)(void) {
- CALL_GL_API(glReleaseShaderCompiler);
-}
-void API_ENTRY(glRenderbufferStorage)(GLenum target, GLenum internalformat, GLsizei width, GLsizei height) {
- CALL_GL_API(glRenderbufferStorage, target, internalformat, width, height);
-}
-void API_ENTRY(glSampleCoverage)(GLclampf value, GLboolean invert) {
- CALL_GL_API(glSampleCoverage, value, invert);
-}
-void API_ENTRY(glScissor)(GLint x, GLint y, GLsizei width, GLsizei height) {
- CALL_GL_API(glScissor, x, y, width, height);
-}
-void API_ENTRY(glShaderBinary)(GLsizei n, const GLuint* shaders, GLenum binaryformat, const GLvoid* binary, GLsizei length) {
- CALL_GL_API(glShaderBinary, n, shaders, binaryformat, binary, length);
-}
-void API_ENTRY(glShaderSource)(GLuint shader, GLsizei count, const GLchar** string, const GLint* length) {
- CALL_GL_API(glShaderSource, shader, count, string, length);
-}
-void API_ENTRY(glStencilFunc)(GLenum func, GLint ref, GLuint mask) {
- CALL_GL_API(glStencilFunc, func, ref, mask);
-}
-void API_ENTRY(glStencilFuncSeparate)(GLenum face, GLenum func, GLint ref, GLuint mask) {
- CALL_GL_API(glStencilFuncSeparate, face, func, ref, mask);
-}
-void API_ENTRY(glStencilMask)(GLuint mask) {
- CALL_GL_API(glStencilMask, mask);
-}
-void API_ENTRY(glStencilMaskSeparate)(GLenum face, GLuint mask) {
- CALL_GL_API(glStencilMaskSeparate, face, mask);
-}
-void API_ENTRY(glStencilOp)(GLenum fail, GLenum zfail, GLenum zpass) {
- CALL_GL_API(glStencilOp, fail, zfail, zpass);
-}
-void API_ENTRY(glStencilOpSeparate)(GLenum face, GLenum fail, GLenum zfail, GLenum zpass) {
- CALL_GL_API(glStencilOpSeparate, face, fail, zfail, zpass);
-}
-void API_ENTRY(glTexImage2D)(GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLint border, GLenum format, GLenum type, const GLvoid* pixels) {
- CALL_GL_API(glTexImage2D, target, level, internalformat, width, height, border, format, type, pixels);
-}
-void API_ENTRY(glTexParameterf)(GLenum target, GLenum pname, GLfloat param) {
- CALL_GL_API(glTexParameterf, target, pname, param);
-}
-void API_ENTRY(glTexParameterfv)(GLenum target, GLenum pname, const GLfloat* params) {
- CALL_GL_API(glTexParameterfv, target, pname, params);
-}
-void API_ENTRY(glTexParameteri)(GLenum target, GLenum pname, GLint param) {
- CALL_GL_API(glTexParameteri, target, pname, param);
-}
-void API_ENTRY(glTexParameteriv)(GLenum target, GLenum pname, const GLint* params) {
- CALL_GL_API(glTexParameteriv, target, pname, params);
-}
-void API_ENTRY(glTexSubImage2D)(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid* pixels) {
- CALL_GL_API(glTexSubImage2D, target, level, xoffset, yoffset, width, height, format, type, pixels);
-}
-void API_ENTRY(glUniform1f)(GLint location, GLfloat x) {
- CALL_GL_API(glUniform1f, location, x);
-}
-void API_ENTRY(glUniform1fv)(GLint location, GLsizei count, const GLfloat:1*count:in v) {
- CALL_GL_API(glUniform1fv, location, count, v);
-}
-void API_ENTRY(glUniform1i)(GLint location, GLint x) {
- CALL_GL_API(glUniform1i, location, x);
-}
-void API_ENTRY(glUniform1iv)(GLint location, GLsizei count, const GLint:1*count:in v) {
- CALL_GL_API(glUniform1iv, location, count, v);
-}
-void API_ENTRY(glUniform2f)(GLint location, GLfloat x, GLfloat y) {
- CALL_GL_API(glUniform2f, location, x, y);
-}
-void API_ENTRY(glUniform2fv)(GLint location, GLsizei count, const GLfloat:2*count:in v) {
- CALL_GL_API(glUniform2fv, location, count, v);
-}
-void API_ENTRY(glUniform2i)(GLint location, GLint x, GLint y) {
- CALL_GL_API(glUniform2i, location, x, y);
-}
-void API_ENTRY(glUniform2iv)(GLint location, GLsizei count, const GLint:2*count:in v) {
- CALL_GL_API(glUniform2iv, location, count, v);
-}
-void API_ENTRY(glUniform3f)(GLint location, GLfloat x, GLfloat y, GLfloat z) {
- CALL_GL_API(glUniform3f, location, x, y, z);
-}
-void API_ENTRY(glUniform3fv)(GLint location, GLsizei count, const GLfloat:3*count:in v) {
- CALL_GL_API(glUniform3fv, location, count, v);
-}
-void API_ENTRY(glUniform3i)(GLint location, GLint x, GLint y, GLint z) {
- CALL_GL_API(glUniform3i, location, x, y, z);
-}
-void API_ENTRY(glUniform3iv)(GLint location, GLsizei count, const GLint:3*count:in v) {
- CALL_GL_API(glUniform3iv, location, count, v);
-}
-void API_ENTRY(glUniform4f)(GLint location, GLfloat x, GLfloat y, GLfloat z, GLfloat w) {
- CALL_GL_API(glUniform4f, location, x, y, z, w);
-}
-void API_ENTRY(glUniform4fv)(GLint location, GLsizei count, const GLfloat:4*count:in v) {
- CALL_GL_API(glUniform4fv, location, count, v);
-}
-void API_ENTRY(glUniform4i)(GLint location, GLint x, GLint y, GLint z, GLint w) {
- CALL_GL_API(glUniform4i, location, x, y, z, w);
-}
-void API_ENTRY(glUniform4iv)(GLint location, GLsizei count, const GLint:4*count:in v) {
- CALL_GL_API(glUniform4iv, location, count, v);
-}
-void API_ENTRY(glUniformMatrix2fv)(GLint location, GLsizei count, GLboolean transpose, const GLfloat:4*count:in value) {
- CALL_GL_API(glUniformMatrix2fv, location, count, transpose, value);
-}
-void API_ENTRY(glUniformMatrix3fv)(GLint location, GLsizei count, GLboolean transpose, const GLfloat:9*count:in value) {
- CALL_GL_API(glUniformMatrix3fv, location, count, transpose, value);
-}
-void API_ENTRY(glUniformMatrix4fv)(GLint location, GLsizei count, GLboolean transpose, const GLfloat:16*count:in value) {
- CALL_GL_API(glUniformMatrix4fv, location, count, transpose, value);
-}
-void API_ENTRY(glUseProgram)(GLuint program) {
- CALL_GL_API(glUseProgram, program);
-}
-void API_ENTRY(glValidateProgram)(GLuint program) {
- CALL_GL_API(glValidateProgram, program);
-}
-void API_ENTRY(glVertexAttrib1f)(GLuint indx, GLfloat x) {
- CALL_GL_API(glVertexAttrib1f, indx, x);
-}
-void API_ENTRY(glVertexAttrib1fv)(GLuint indx, const GLfloat:1:in values) {
- CALL_GL_API(glVertexAttrib1fv, indx, values);
-}
-void API_ENTRY(glVertexAttrib2f)(GLuint indx, GLfloat x, GLfloat y) {
- CALL_GL_API(glVertexAttrib2f, indx, x, y);
-}
-void API_ENTRY(glVertexAttrib2fv)(GLuint indx, const GLfloat:2:in values) {
- CALL_GL_API(glVertexAttrib2fv, indx, values);
-}
-void API_ENTRY(glVertexAttrib3f)(GLuint indx, GLfloat x, GLfloat y, GLfloat z) {
- CALL_GL_API(glVertexAttrib3f, indx, x, y, z);
-}
-void API_ENTRY(glVertexAttrib3fv)(GLuint indx, const GLfloat:3:in values) {
- CALL_GL_API(glVertexAttrib3fv, indx, values);
-}
-void API_ENTRY(glVertexAttrib4f)(GLuint indx, GLfloat x, GLfloat y, GLfloat z, GLfloat w) {
- CALL_GL_API(glVertexAttrib4f, indx, x, y, z, w);
-}
-void API_ENTRY(glVertexAttrib4fv)(GLuint indx, const GLfloat:4:in values) {
- CALL_GL_API(glVertexAttrib4fv, indx, values);
-}
-void API_ENTRY(glVertexAttribPointer)(GLuint indx, GLint size, GLenum type, GLboolean normalized, GLsizei stride, const GLvoid* ptr) {
- CALL_GL_API(glVertexAttribPointer, indx, size, type, normalized, stride, ptr);
-}
-void API_ENTRY(glViewport)(GLint x, GLint y, GLsizei width, GLsizei height) {
- CALL_GL_API(glViewport, x, y, width, height);
-}
diff --git a/opengl/libs/GLES2_dbg/src/api.cpp b/opengl/libs/GLES2_dbg/src/api.cpp
deleted file mode 100644
index c483547..0000000
--- a/opengl/libs/GLES2_dbg/src/api.cpp
+++ /dev/null
@@ -1,3540 +0,0 @@
-/*
- ** Copyright 2011, The Android Open Source Project
- **
- ** Licensed under the Apache License, Version 2.0 (the "License");
- ** you may not use this file except in compliance with the License.
- ** You may obtain a copy of the License at
- **
- ** http://www.apache.org/licenses/LICENSE-2.0
- **
- ** Unless required by applicable law or agreed to in writing, software
- ** distributed under the License is distributed on an "AS IS" BASIS,
- ** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- ** See the License for the specific language governing permissions and
- ** limitations under the License.
- */
-
-// auto generated by generate_api_cpp.py
-
-#include <utils/Debug.h>
-
-#include "src/header.h"
-#include "src/api.h"
-
-template<typename T> static int ToInt(const T & t)
-{
- COMPILE_TIME_ASSERT_FUNCTION_SCOPE(sizeof(T) == sizeof(int));
- return (int &)t;
-}
-
-void Debug_glActiveTexture(GLenum texture)
-{
- glesv2debugger::Message msg;
- struct : public FunctionCall {
- GLenum texture;
-
- const int * operator()(gl_hooks_t::gl_t const * const _c, glesv2debugger::Message & msg) {
- _c->glActiveTexture(texture);
- return 0;
- }
- } caller;
- caller.texture = texture;
-
- msg.set_arg0(texture);
-
- int * ret = MessageLoop(caller, msg, glesv2debugger::Message_Function_glActiveTexture);
-}
-
-void Debug_glAttachShader(GLuint program, GLuint shader)
-{
- glesv2debugger::Message msg;
- struct : public FunctionCall {
- GLuint program;
- GLuint shader;
-
- const int * operator()(gl_hooks_t::gl_t const * const _c, glesv2debugger::Message & msg) {
- _c->glAttachShader(program, shader);
- return 0;
- }
- } caller;
- caller.program = program;
- caller.shader = shader;
-
- msg.set_arg0(program);
- msg.set_arg1(shader);
-
- int * ret = MessageLoop(caller, msg, glesv2debugger::Message_Function_glAttachShader);
-}
-
-void Debug_glBindAttribLocation(GLuint program, GLuint index, const GLchar* name)
-{
- glesv2debugger::Message msg;
- struct : public FunctionCall {
- GLuint program;
- GLuint index;
- const GLchar* name;
-
- const int * operator()(gl_hooks_t::gl_t const * const _c, glesv2debugger::Message & msg) {
- _c->glBindAttribLocation(program, index, name);
- return 0;
- }
- } caller;
- caller.program = program;
- caller.index = index;
- caller.name = name;
-
- msg.set_arg0(program);
- msg.set_arg1(index);
- msg.set_arg2(ToInt(name));
-
- // FIXME: check for pointer usage
- msg.mutable_data()->assign(reinterpret_cast<const char *>(name), strlen(name) * sizeof(GLchar));
- int * ret = MessageLoop(caller, msg, glesv2debugger::Message_Function_glBindAttribLocation);
-}
-
-void Debug_glBindBuffer(GLenum target, GLuint buffer)
-{
- glesv2debugger::Message msg;
- struct : public FunctionCall {
- GLenum target;
- GLuint buffer;
-
- const int * operator()(gl_hooks_t::gl_t const * const _c, glesv2debugger::Message & msg) {
- _c->glBindBuffer(target, buffer);
- getDbgContextThreadSpecific()->glBindBuffer(target, buffer);
- return 0;
- }
- } caller;
- caller.target = target;
- caller.buffer = buffer;
-
- msg.set_arg0(target);
- msg.set_arg1(buffer);
-
- int * ret = MessageLoop(caller, msg, glesv2debugger::Message_Function_glBindBuffer);
-}
-
-void Debug_glBindFramebuffer(GLenum target, GLuint framebuffer)
-{
- glesv2debugger::Message msg;
- struct : public FunctionCall {
- GLenum target;
- GLuint framebuffer;
-
- const int * operator()(gl_hooks_t::gl_t const * const _c, glesv2debugger::Message & msg) {
- _c->glBindFramebuffer(target, framebuffer);
- return 0;
- }
- } caller;
- caller.target = target;
- caller.framebuffer = framebuffer;
-
- msg.set_arg0(target);
- msg.set_arg1(framebuffer);
-
- int * ret = MessageLoop(caller, msg, glesv2debugger::Message_Function_glBindFramebuffer);
-}
-
-void Debug_glBindRenderbuffer(GLenum target, GLuint renderbuffer)
-{
- glesv2debugger::Message msg;
- struct : public FunctionCall {
- GLenum target;
- GLuint renderbuffer;
-
- const int * operator()(gl_hooks_t::gl_t const * const _c, glesv2debugger::Message & msg) {
- _c->glBindRenderbuffer(target, renderbuffer);
- return 0;
- }
- } caller;
- caller.target = target;
- caller.renderbuffer = renderbuffer;
-
- msg.set_arg0(target);
- msg.set_arg1(renderbuffer);
-
- int * ret = MessageLoop(caller, msg, glesv2debugger::Message_Function_glBindRenderbuffer);
-}
-
-void Debug_glBindTexture(GLenum target, GLuint texture)
-{
- glesv2debugger::Message msg;
- struct : public FunctionCall {
- GLenum target;
- GLuint texture;
-
- const int * operator()(gl_hooks_t::gl_t const * const _c, glesv2debugger::Message & msg) {
- _c->glBindTexture(target, texture);
- return 0;
- }
- } caller;
- caller.target = target;
- caller.texture = texture;
-
- msg.set_arg0(target);
- msg.set_arg1(texture);
-
- int * ret = MessageLoop(caller, msg, glesv2debugger::Message_Function_glBindTexture);
-}
-
-void Debug_glBlendColor(GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha)
-{
- glesv2debugger::Message msg;
- struct : public FunctionCall {
- GLclampf red;
- GLclampf green;
- GLclampf blue;
- GLclampf alpha;
-
- const int * operator()(gl_hooks_t::gl_t const * const _c, glesv2debugger::Message & msg) {
- _c->glBlendColor(red, green, blue, alpha);
- return 0;
- }
- } caller;
- caller.red = red;
- caller.green = green;
- caller.blue = blue;
- caller.alpha = alpha;
-
- msg.set_arg0(ToInt(red));
- msg.set_arg1(ToInt(green));
- msg.set_arg2(ToInt(blue));
- msg.set_arg3(ToInt(alpha));
-
- int * ret = MessageLoop(caller, msg, glesv2debugger::Message_Function_glBlendColor);
-}
-
-void Debug_glBlendEquation( GLenum mode )
-{
- glesv2debugger::Message msg;
- struct : public FunctionCall {
- GLenum mode;
-
- const int * operator()(gl_hooks_t::gl_t const * const _c, glesv2debugger::Message & msg) {
- _c->glBlendEquation(mode);
- return 0;
- }
- } caller;
- caller.mode = mode;
-
- msg.set_arg0(mode);
-
- int * ret = MessageLoop(caller, msg, glesv2debugger::Message_Function_glBlendEquation);
-}
-
-void Debug_glBlendEquationSeparate(GLenum modeRGB, GLenum modeAlpha)
-{
- glesv2debugger::Message msg;
- struct : public FunctionCall {
- GLenum modeRGB;
- GLenum modeAlpha;
-
- const int * operator()(gl_hooks_t::gl_t const * const _c, glesv2debugger::Message & msg) {
- _c->glBlendEquationSeparate(modeRGB, modeAlpha);
- return 0;
- }
- } caller;
- caller.modeRGB = modeRGB;
- caller.modeAlpha = modeAlpha;
-
- msg.set_arg0(modeRGB);
- msg.set_arg1(modeAlpha);
-
- int * ret = MessageLoop(caller, msg, glesv2debugger::Message_Function_glBlendEquationSeparate);
-}
-
-void Debug_glBlendFunc(GLenum sfactor, GLenum dfactor)
-{
- glesv2debugger::Message msg;
- struct : public FunctionCall {
- GLenum sfactor;
- GLenum dfactor;
-
- const int * operator()(gl_hooks_t::gl_t const * const _c, glesv2debugger::Message & msg) {
- _c->glBlendFunc(sfactor, dfactor);
- return 0;
- }
- } caller;
- caller.sfactor = sfactor;
- caller.dfactor = dfactor;
-
- msg.set_arg0(sfactor);
- msg.set_arg1(dfactor);
-
- int * ret = MessageLoop(caller, msg, glesv2debugger::Message_Function_glBlendFunc);
-}
-
-void Debug_glBlendFuncSeparate(GLenum srcRGB, GLenum dstRGB, GLenum srcAlpha, GLenum dstAlpha)
-{
- glesv2debugger::Message msg;
- struct : public FunctionCall {
- GLenum srcRGB;
- GLenum dstRGB;
- GLenum srcAlpha;
- GLenum dstAlpha;
-
- const int * operator()(gl_hooks_t::gl_t const * const _c, glesv2debugger::Message & msg) {
- _c->glBlendFuncSeparate(srcRGB, dstRGB, srcAlpha, dstAlpha);
- return 0;
- }
- } caller;
- caller.srcRGB = srcRGB;
- caller.dstRGB = dstRGB;
- caller.srcAlpha = srcAlpha;
- caller.dstAlpha = dstAlpha;
-
- msg.set_arg0(srcRGB);
- msg.set_arg1(dstRGB);
- msg.set_arg2(srcAlpha);
- msg.set_arg3(dstAlpha);
-
- int * ret = MessageLoop(caller, msg, glesv2debugger::Message_Function_glBlendFuncSeparate);
-}
-
-void Debug_glBufferData(GLenum target, GLsizeiptr size, const GLvoid* data, GLenum usage)
-{
- glesv2debugger::Message msg;
- struct : public FunctionCall {
- GLenum target;
- GLsizeiptr size;
- const GLvoid* data;
- GLenum usage;
-
- const int * operator()(gl_hooks_t::gl_t const * const _c, glesv2debugger::Message & msg) {
- _c->glBufferData(target, size, data, usage);
- getDbgContextThreadSpecific()->glBufferData(target, size, data, usage);
- return 0;
- }
- } caller;
- caller.target = target;
- caller.size = size;
- caller.data = data;
- caller.usage = usage;
-
- msg.set_arg0(target);
- msg.set_arg1(size);
- msg.set_arg2(ToInt(data));
- msg.set_arg3(usage);
-
- // FIXME: check for pointer usage
- msg.mutable_data()->assign(reinterpret_cast<const char *>(data), size * sizeof(char));
- int * ret = MessageLoop(caller, msg, glesv2debugger::Message_Function_glBufferData);
-}
-
-void Debug_glBufferSubData(GLenum target, GLintptr offset, GLsizeiptr size, const GLvoid* data)
-{
- glesv2debugger::Message msg;
- struct : public FunctionCall {
- GLenum target;
- GLintptr offset;
- GLsizeiptr size;
- const GLvoid* data;
-
- const int * operator()(gl_hooks_t::gl_t const * const _c, glesv2debugger::Message & msg) {
- _c->glBufferSubData(target, offset, size, data);
- getDbgContextThreadSpecific()->glBufferSubData(target, offset, size, data);
- return 0;
- }
- } caller;
- caller.target = target;
- caller.offset = offset;
- caller.size = size;
- caller.data = data;
-
- msg.set_arg0(target);
- msg.set_arg1(offset);
- msg.set_arg2(size);
- msg.set_arg3(ToInt(data));
-
- // FIXME: check for pointer usage
- msg.mutable_data()->assign(reinterpret_cast<const char *>(data), size * sizeof(char));
- int * ret = MessageLoop(caller, msg, glesv2debugger::Message_Function_glBufferSubData);
-}
-
-GLenum Debug_glCheckFramebufferStatus(GLenum target)
-{
- glesv2debugger::Message msg;
- struct : public FunctionCall {
- GLenum target;
-
- const int * operator()(gl_hooks_t::gl_t const * const _c, glesv2debugger::Message & msg) {
- const int * ret = reinterpret_cast<const int *>(_c->glCheckFramebufferStatus(target));
- msg.set_ret(ToInt(ret));
- return ret;
- }
- } caller;
- caller.target = target;
-
- msg.set_arg0(target);
-
- int * ret = MessageLoop(caller, msg, glesv2debugger::Message_Function_glCheckFramebufferStatus);
- return reinterpret_cast<GLenum>(ret);
-}
-
-void Debug_glClear(GLbitfield mask)
-{
- glesv2debugger::Message msg;
- struct : public FunctionCall {
- GLbitfield mask;
-
- const int * operator()(gl_hooks_t::gl_t const * const _c, glesv2debugger::Message & msg) {
- _c->glClear(mask);
- return 0;
- }
- } caller;
- caller.mask = mask;
-
- msg.set_arg0(mask);
-
- int * ret = MessageLoop(caller, msg, glesv2debugger::Message_Function_glClear);
-}
-
-void Debug_glClearColor(GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha)
-{
- glesv2debugger::Message msg;
- struct : public FunctionCall {
- GLclampf red;
- GLclampf green;
- GLclampf blue;
- GLclampf alpha;
-
- const int * operator()(gl_hooks_t::gl_t const * const _c, glesv2debugger::Message & msg) {
- _c->glClearColor(red, green, blue, alpha);
- return 0;
- }
- } caller;
- caller.red = red;
- caller.green = green;
- caller.blue = blue;
- caller.alpha = alpha;
-
- msg.set_arg0(ToInt(red));
- msg.set_arg1(ToInt(green));
- msg.set_arg2(ToInt(blue));
- msg.set_arg3(ToInt(alpha));
-
- int * ret = MessageLoop(caller, msg, glesv2debugger::Message_Function_glClearColor);
-}
-
-void Debug_glClearDepthf(GLclampf depth)
-{
- glesv2debugger::Message msg;
- struct : public FunctionCall {
- GLclampf depth;
-
- const int * operator()(gl_hooks_t::gl_t const * const _c, glesv2debugger::Message & msg) {
- _c->glClearDepthf(depth);
- return 0;
- }
- } caller;
- caller.depth = depth;
-
- msg.set_arg0(ToInt(depth));
-
- int * ret = MessageLoop(caller, msg, glesv2debugger::Message_Function_glClearDepthf);
-}
-
-void Debug_glClearStencil(GLint s)
-{
- glesv2debugger::Message msg;
- struct : public FunctionCall {
- GLint s;
-
- const int * operator()(gl_hooks_t::gl_t const * const _c, glesv2debugger::Message & msg) {
- _c->glClearStencil(s);
- return 0;
- }
- } caller;
- caller.s = s;
-
- msg.set_arg0(s);
-
- int * ret = MessageLoop(caller, msg, glesv2debugger::Message_Function_glClearStencil);
-}
-
-void Debug_glColorMask(GLboolean red, GLboolean green, GLboolean blue, GLboolean alpha)
-{
- glesv2debugger::Message msg;
- struct : public FunctionCall {
- GLboolean red;
- GLboolean green;
- GLboolean blue;
- GLboolean alpha;
-
- const int * operator()(gl_hooks_t::gl_t const * const _c, glesv2debugger::Message & msg) {
- _c->glColorMask(red, green, blue, alpha);
- return 0;
- }
- } caller;
- caller.red = red;
- caller.green = green;
- caller.blue = blue;
- caller.alpha = alpha;
-
- msg.set_arg0(red);
- msg.set_arg1(green);
- msg.set_arg2(blue);
- msg.set_arg3(alpha);
-
- int * ret = MessageLoop(caller, msg, glesv2debugger::Message_Function_glColorMask);
-}
-
-void Debug_glCompileShader(GLuint shader)
-{
- glesv2debugger::Message msg;
- struct : public FunctionCall {
- GLuint shader;
-
- const int * operator()(gl_hooks_t::gl_t const * const _c, glesv2debugger::Message & msg) {
- _c->glCompileShader(shader);
- return 0;
- }
- } caller;
- caller.shader = shader;
-
- msg.set_arg0(shader);
-
- int * ret = MessageLoop(caller, msg, glesv2debugger::Message_Function_glCompileShader);
-}
-
-// FIXME: this function has pointers, it should be hand written
-void Debug_glCompressedTexImage2D(GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLsizei imageSize, const GLvoid* data)
-{
- glesv2debugger::Message msg;
- struct : public FunctionCall {
- GLenum target;
- GLint level;
- GLenum internalformat;
- GLsizei width;
- GLsizei height;
- GLint border;
- GLsizei imageSize;
- const GLvoid* data;
-
- const int * operator()(gl_hooks_t::gl_t const * const _c, glesv2debugger::Message & msg) {
- _c->glCompressedTexImage2D(target, level, internalformat, width, height, border, imageSize, data);
- return 0;
- }
- } caller;
- caller.target = target;
- caller.level = level;
- caller.internalformat = internalformat;
- caller.width = width;
- caller.height = height;
- caller.border = border;
- caller.imageSize = imageSize;
- caller.data = data;
-
- msg.set_arg0(target);
- msg.set_arg1(level);
- msg.set_arg2(internalformat);
- msg.set_arg3(width);
- msg.set_arg4(height);
- msg.set_arg5(border);
- msg.set_arg6(imageSize);
- msg.set_arg7(ToInt(data));
-
- // FIXME: check for pointer usage
- int * ret = MessageLoop(caller, msg, glesv2debugger::Message_Function_glCompressedTexImage2D);
-}
-
-// FIXME: this function has pointers, it should be hand written
-void Debug_glCompressedTexSubImage2D(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, const GLvoid* data)
-{
- glesv2debugger::Message msg;
- struct : public FunctionCall {
- GLenum target;
- GLint level;
- GLint xoffset;
- GLint yoffset;
- GLsizei width;
- GLsizei height;
- GLenum format;
- GLsizei imageSize;
- const GLvoid* data;
-
- const int * operator()(gl_hooks_t::gl_t const * const _c, glesv2debugger::Message & msg) {
- _c->glCompressedTexSubImage2D(target, level, xoffset, yoffset, width, height, format, imageSize, data);
- return 0;
- }
- } caller;
- caller.target = target;
- caller.level = level;
- caller.xoffset = xoffset;
- caller.yoffset = yoffset;
- caller.width = width;
- caller.height = height;
- caller.format = format;
- caller.imageSize = imageSize;
- caller.data = data;
-
- msg.set_arg0(target);
- msg.set_arg1(level);
- msg.set_arg2(xoffset);
- msg.set_arg3(yoffset);
- msg.set_arg4(width);
- msg.set_arg5(height);
- msg.set_arg6(format);
- msg.set_arg7(imageSize);
- msg.set_arg8(ToInt(data));
-
- // FIXME: check for pointer usage
- int * ret = MessageLoop(caller, msg, glesv2debugger::Message_Function_glCompressedTexSubImage2D);
-}
-
-void Debug_glCopyTexImage2D(GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height, GLint border)
-{
- glesv2debugger::Message msg;
- struct : public FunctionCall {
- GLenum target;
- GLint level;
- GLenum internalformat;
- GLint x;
- GLint y;
- GLsizei width;
- GLsizei height;
- GLint border;
-
- const int * operator()(gl_hooks_t::gl_t const * const _c, glesv2debugger::Message & msg) {
- _c->glCopyTexImage2D(target, level, internalformat, x, y, width, height, border);
-#ifdef EXTEND_AFTER_CALL_Debug_glCopyTexImage2D
- EXTEND_AFTER_CALL_Debug_glCopyTexImage2D;
-#endif
- return 0;
- }
- } caller;
- caller.target = target;
- caller.level = level;
- caller.internalformat = internalformat;
- caller.x = x;
- caller.y = y;
- caller.width = width;
- caller.height = height;
- caller.border = border;
-
- msg.set_arg0(target);
- msg.set_arg1(level);
- msg.set_arg2(internalformat);
- msg.set_arg3(x);
- msg.set_arg4(y);
- msg.set_arg5(width);
- msg.set_arg6(height);
- msg.set_arg7(border);
-
-#ifdef EXTEND_Debug_glCopyTexImage2D
- EXTEND_Debug_glCopyTexImage2D;
-#endif
- int * ret = MessageLoop(caller, msg, glesv2debugger::Message_Function_glCopyTexImage2D);
-}
-
-void Debug_glCopyTexSubImage2D(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint x, GLint y, GLsizei width, GLsizei height)
-{
- glesv2debugger::Message msg;
- struct : public FunctionCall {
- GLenum target;
- GLint level;
- GLint xoffset;
- GLint yoffset;
- GLint x;
- GLint y;
- GLsizei width;
- GLsizei height;
-
- const int * operator()(gl_hooks_t::gl_t const * const _c, glesv2debugger::Message & msg) {
- _c->glCopyTexSubImage2D(target, level, xoffset, yoffset, x, y, width, height);
-#ifdef EXTEND_AFTER_CALL_Debug_glCopyTexSubImage2D
- EXTEND_AFTER_CALL_Debug_glCopyTexSubImage2D;
-#endif
- return 0;
- }
- } caller;
- caller.target = target;
- caller.level = level;
- caller.xoffset = xoffset;
- caller.yoffset = yoffset;
- caller.x = x;
- caller.y = y;
- caller.width = width;
- caller.height = height;
-
- msg.set_arg0(target);
- msg.set_arg1(level);
- msg.set_arg2(xoffset);
- msg.set_arg3(yoffset);
- msg.set_arg4(x);
- msg.set_arg5(y);
- msg.set_arg6(width);
- msg.set_arg7(height);
-
-#ifdef EXTEND_Debug_glCopyTexSubImage2D
- EXTEND_Debug_glCopyTexSubImage2D;
-#endif
- int * ret = MessageLoop(caller, msg, glesv2debugger::Message_Function_glCopyTexSubImage2D);
-}
-
-GLuint Debug_glCreateProgram(void)
-{
- glesv2debugger::Message msg;
- struct : public FunctionCall {
-
- const int * operator()(gl_hooks_t::gl_t const * const _c, glesv2debugger::Message & msg) {
- const int * ret = reinterpret_cast<const int *>(_c->glCreateProgram());
- msg.set_ret(ToInt(ret));
- return ret;
- }
- } caller;
-
-
- int * ret = MessageLoop(caller, msg, glesv2debugger::Message_Function_glCreateProgram);
- return reinterpret_cast<GLuint>(ret);
-}
-
-GLuint Debug_glCreateShader(GLenum type)
-{
- glesv2debugger::Message msg;
- struct : public FunctionCall {
- GLenum type;
-
- const int * operator()(gl_hooks_t::gl_t const * const _c, glesv2debugger::Message & msg) {
- const int * ret = reinterpret_cast<const int *>(_c->glCreateShader(type));
- msg.set_ret(ToInt(ret));
- return ret;
- }
- } caller;
- caller.type = type;
-
- msg.set_arg0(type);
-
- int * ret = MessageLoop(caller, msg, glesv2debugger::Message_Function_glCreateShader);
- return reinterpret_cast<GLuint>(ret);
-}
-
-void Debug_glCullFace(GLenum mode)
-{
- glesv2debugger::Message msg;
- struct : public FunctionCall {
- GLenum mode;
-
- const int * operator()(gl_hooks_t::gl_t const * const _c, glesv2debugger::Message & msg) {
- _c->glCullFace(mode);
- return 0;
- }
- } caller;
- caller.mode = mode;
-
- msg.set_arg0(mode);
-
- int * ret = MessageLoop(caller, msg, glesv2debugger::Message_Function_glCullFace);
-}
-
-void Debug_glDeleteBuffers(GLsizei n, const GLuint* buffers)
-{
- glesv2debugger::Message msg;
- struct : public FunctionCall {
- GLsizei n;
- const GLuint* buffers;
-
- const int * operator()(gl_hooks_t::gl_t const * const _c, glesv2debugger::Message & msg) {
- _c->glDeleteBuffers(n, buffers);
- getDbgContextThreadSpecific()->glDeleteBuffers(n, buffers);
- return 0;
- }
- } caller;
- caller.n = n;
- caller.buffers = buffers;
-
- msg.set_arg0(n);
- msg.set_arg1(ToInt(buffers));
-
- // FIXME: check for pointer usage
- msg.mutable_data()->assign(reinterpret_cast<const char *>(buffers), n * sizeof(GLuint));
- int * ret = MessageLoop(caller, msg, glesv2debugger::Message_Function_glDeleteBuffers);
-}
-
-void Debug_glDeleteFramebuffers(GLsizei n, const GLuint* framebuffers)
-{
- glesv2debugger::Message msg;
- struct : public FunctionCall {
- GLsizei n;
- const GLuint* framebuffers;
-
- const int * operator()(gl_hooks_t::gl_t const * const _c, glesv2debugger::Message & msg) {
- _c->glDeleteFramebuffers(n, framebuffers);
- return 0;
- }
- } caller;
- caller.n = n;
- caller.framebuffers = framebuffers;
-
- msg.set_arg0(n);
- msg.set_arg1(ToInt(framebuffers));
-
- // FIXME: check for pointer usage
- msg.mutable_data()->assign(reinterpret_cast<const char *>(framebuffers), n * sizeof(GLuint));
- int * ret = MessageLoop(caller, msg, glesv2debugger::Message_Function_glDeleteFramebuffers);
-}
-
-void Debug_glDeleteProgram(GLuint program)
-{
- glesv2debugger::Message msg;
- struct : public FunctionCall {
- GLuint program;
-
- const int * operator()(gl_hooks_t::gl_t const * const _c, glesv2debugger::Message & msg) {
- _c->glDeleteProgram(program);
- return 0;
- }
- } caller;
- caller.program = program;
-
- msg.set_arg0(program);
-
- int * ret = MessageLoop(caller, msg, glesv2debugger::Message_Function_glDeleteProgram);
-}
-
-void Debug_glDeleteRenderbuffers(GLsizei n, const GLuint* renderbuffers)
-{
- glesv2debugger::Message msg;
- struct : public FunctionCall {
- GLsizei n;
- const GLuint* renderbuffers;
-
- const int * operator()(gl_hooks_t::gl_t const * const _c, glesv2debugger::Message & msg) {
- _c->glDeleteRenderbuffers(n, renderbuffers);
- return 0;
- }
- } caller;
- caller.n = n;
- caller.renderbuffers = renderbuffers;
-
- msg.set_arg0(n);
- msg.set_arg1(ToInt(renderbuffers));
-
- // FIXME: check for pointer usage
- msg.mutable_data()->assign(reinterpret_cast<const char *>(renderbuffers), n * sizeof(GLuint));
- int * ret = MessageLoop(caller, msg, glesv2debugger::Message_Function_glDeleteRenderbuffers);
-}
-
-void Debug_glDeleteShader(GLuint shader)
-{
- glesv2debugger::Message msg;
- struct : public FunctionCall {
- GLuint shader;
-
- const int * operator()(gl_hooks_t::gl_t const * const _c, glesv2debugger::Message & msg) {
- _c->glDeleteShader(shader);
- return 0;
- }
- } caller;
- caller.shader = shader;
-
- msg.set_arg0(shader);
-
- int * ret = MessageLoop(caller, msg, glesv2debugger::Message_Function_glDeleteShader);
-}
-
-void Debug_glDeleteTextures(GLsizei n, const GLuint* textures)
-{
- glesv2debugger::Message msg;
- struct : public FunctionCall {
- GLsizei n;
- const GLuint* textures;
-
- const int * operator()(gl_hooks_t::gl_t const * const _c, glesv2debugger::Message & msg) {
- _c->glDeleteTextures(n, textures);
- return 0;
- }
- } caller;
- caller.n = n;
- caller.textures = textures;
-
- msg.set_arg0(n);
- msg.set_arg1(ToInt(textures));
-
- // FIXME: check for pointer usage
- msg.mutable_data()->assign(reinterpret_cast<const char *>(textures), n * sizeof(GLuint));
- int * ret = MessageLoop(caller, msg, glesv2debugger::Message_Function_glDeleteTextures);
-}
-
-void Debug_glDepthFunc(GLenum func)
-{
- glesv2debugger::Message msg;
- struct : public FunctionCall {
- GLenum func;
-
- const int * operator()(gl_hooks_t::gl_t const * const _c, glesv2debugger::Message & msg) {
- _c->glDepthFunc(func);
- return 0;
- }
- } caller;
- caller.func = func;
-
- msg.set_arg0(func);
-
- int * ret = MessageLoop(caller, msg, glesv2debugger::Message_Function_glDepthFunc);
-}
-
-void Debug_glDepthMask(GLboolean flag)
-{
- glesv2debugger::Message msg;
- struct : public FunctionCall {
- GLboolean flag;
-
- const int * operator()(gl_hooks_t::gl_t const * const _c, glesv2debugger::Message & msg) {
- _c->glDepthMask(flag);
- return 0;
- }
- } caller;
- caller.flag = flag;
-
- msg.set_arg0(flag);
-
- int * ret = MessageLoop(caller, msg, glesv2debugger::Message_Function_glDepthMask);
-}
-
-void Debug_glDepthRangef(GLclampf zNear, GLclampf zFar)
-{
- glesv2debugger::Message msg;
- struct : public FunctionCall {
- GLclampf zNear;
- GLclampf zFar;
-
- const int * operator()(gl_hooks_t::gl_t const * const _c, glesv2debugger::Message & msg) {
- _c->glDepthRangef(zNear, zFar);
- return 0;
- }
- } caller;
- caller.zNear = zNear;
- caller.zFar = zFar;
-
- msg.set_arg0(ToInt(zNear));
- msg.set_arg1(ToInt(zFar));
-
- int * ret = MessageLoop(caller, msg, glesv2debugger::Message_Function_glDepthRangef);
-}
-
-void Debug_glDetachShader(GLuint program, GLuint shader)
-{
- glesv2debugger::Message msg;
- struct : public FunctionCall {
- GLuint program;
- GLuint shader;
-
- const int * operator()(gl_hooks_t::gl_t const * const _c, glesv2debugger::Message & msg) {
- _c->glDetachShader(program, shader);
- return 0;
- }
- } caller;
- caller.program = program;
- caller.shader = shader;
-
- msg.set_arg0(program);
- msg.set_arg1(shader);
-
- int * ret = MessageLoop(caller, msg, glesv2debugger::Message_Function_glDetachShader);
-}
-
-void Debug_glDisable(GLenum cap)
-{
- glesv2debugger::Message msg;
- struct : public FunctionCall {
- GLenum cap;
-
- const int * operator()(gl_hooks_t::gl_t const * const _c, glesv2debugger::Message & msg) {
- _c->glDisable(cap);
- return 0;
- }
- } caller;
- caller.cap = cap;
-
- msg.set_arg0(cap);
-
- int * ret = MessageLoop(caller, msg, glesv2debugger::Message_Function_glDisable);
-}
-
-void Debug_glDisableVertexAttribArray(GLuint index)
-{
- glesv2debugger::Message msg;
- struct : public FunctionCall {
- GLuint index;
-
- const int * operator()(gl_hooks_t::gl_t const * const _c, glesv2debugger::Message & msg) {
- _c->glDisableVertexAttribArray(index);
- getDbgContextThreadSpecific()->glDisableVertexAttribArray(index);
- return 0;
- }
- } caller;
- caller.index = index;
-
- msg.set_arg0(index);
-
- int * ret = MessageLoop(caller, msg, glesv2debugger::Message_Function_glDisableVertexAttribArray);
-}
-
-void Debug_glEnable(GLenum cap)
-{
- glesv2debugger::Message msg;
- struct : public FunctionCall {
- GLenum cap;
-
- const int * operator()(gl_hooks_t::gl_t const * const _c, glesv2debugger::Message & msg) {
- _c->glEnable(cap);
- return 0;
- }
- } caller;
- caller.cap = cap;
-
- msg.set_arg0(cap);
-
- int * ret = MessageLoop(caller, msg, glesv2debugger::Message_Function_glEnable);
-}
-
-void Debug_glEnableVertexAttribArray(GLuint index)
-{
- glesv2debugger::Message msg;
- struct : public FunctionCall {
- GLuint index;
-
- const int * operator()(gl_hooks_t::gl_t const * const _c, glesv2debugger::Message & msg) {
- _c->glEnableVertexAttribArray(index);
- getDbgContextThreadSpecific()->glEnableVertexAttribArray(index);
- return 0;
- }
- } caller;
- caller.index = index;
-
- msg.set_arg0(index);
-
- int * ret = MessageLoop(caller, msg, glesv2debugger::Message_Function_glEnableVertexAttribArray);
-}
-
-void Debug_glFinish(void)
-{
- glesv2debugger::Message msg;
- struct : public FunctionCall {
-
- const int * operator()(gl_hooks_t::gl_t const * const _c, glesv2debugger::Message & msg) {
- _c->glFinish();
- return 0;
- }
- } caller;
-
-
- int * ret = MessageLoop(caller, msg, glesv2debugger::Message_Function_glFinish);
-}
-
-void Debug_glFlush(void)
-{
- glesv2debugger::Message msg;
- struct : public FunctionCall {
-
- const int * operator()(gl_hooks_t::gl_t const * const _c, glesv2debugger::Message & msg) {
- _c->glFlush();
- return 0;
- }
- } caller;
-
-
- int * ret = MessageLoop(caller, msg, glesv2debugger::Message_Function_glFlush);
-}
-
-void Debug_glFramebufferRenderbuffer(GLenum target, GLenum attachment, GLenum renderbuffertarget, GLuint renderbuffer)
-{
- glesv2debugger::Message msg;
- struct : public FunctionCall {
- GLenum target;
- GLenum attachment;
- GLenum renderbuffertarget;
- GLuint renderbuffer;
-
- const int * operator()(gl_hooks_t::gl_t const * const _c, glesv2debugger::Message & msg) {
- _c->glFramebufferRenderbuffer(target, attachment, renderbuffertarget, renderbuffer);
- return 0;
- }
- } caller;
- caller.target = target;
- caller.attachment = attachment;
- caller.renderbuffertarget = renderbuffertarget;
- caller.renderbuffer = renderbuffer;
-
- msg.set_arg0(target);
- msg.set_arg1(attachment);
- msg.set_arg2(renderbuffertarget);
- msg.set_arg3(renderbuffer);
-
- int * ret = MessageLoop(caller, msg, glesv2debugger::Message_Function_glFramebufferRenderbuffer);
-}
-
-void Debug_glFramebufferTexture2D(GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level)
-{
- glesv2debugger::Message msg;
- struct : public FunctionCall {
- GLenum target;
- GLenum attachment;
- GLenum textarget;
- GLuint texture;
- GLint level;
-
- const int * operator()(gl_hooks_t::gl_t const * const _c, glesv2debugger::Message & msg) {
- _c->glFramebufferTexture2D(target, attachment, textarget, texture, level);
- return 0;
- }
- } caller;
- caller.target = target;
- caller.attachment = attachment;
- caller.textarget = textarget;
- caller.texture = texture;
- caller.level = level;
-
- msg.set_arg0(target);
- msg.set_arg1(attachment);
- msg.set_arg2(textarget);
- msg.set_arg3(texture);
- msg.set_arg4(level);
-
- int * ret = MessageLoop(caller, msg, glesv2debugger::Message_Function_glFramebufferTexture2D);
-}
-
-void Debug_glFrontFace(GLenum mode)
-{
- glesv2debugger::Message msg;
- struct : public FunctionCall {
- GLenum mode;
-
- const int * operator()(gl_hooks_t::gl_t const * const _c, glesv2debugger::Message & msg) {
- _c->glFrontFace(mode);
- return 0;
- }
- } caller;
- caller.mode = mode;
-
- msg.set_arg0(mode);
-
- int * ret = MessageLoop(caller, msg, glesv2debugger::Message_Function_glFrontFace);
-}
-
-void Debug_glGenBuffers(GLsizei n, GLuint* buffers)
-{
- glesv2debugger::Message msg;
- struct : public FunctionCall {
- GLsizei n;
- GLuint* buffers;
-
- const int * operator()(gl_hooks_t::gl_t const * const _c, glesv2debugger::Message & msg) {
- nsecs_t c0 = systemTime(timeMode);
- _c->glGenBuffers(n, buffers);
- msg.set_time((systemTime(timeMode) - c0) * 1e-6f);
- msg.mutable_data()->assign(reinterpret_cast<const char *>(buffers), n * sizeof(GLuint));
- return 0;
- }
- } caller;
- caller.n = n;
- caller.buffers = buffers;
-
- msg.set_arg0(n);
- msg.set_arg1(ToInt(buffers));
-
- // FIXME: check for pointer usage
- int * ret = MessageLoop(caller, msg, glesv2debugger::Message_Function_glGenBuffers);
-}
-
-void Debug_glGenerateMipmap(GLenum target)
-{
- glesv2debugger::Message msg;
- struct : public FunctionCall {
- GLenum target;
-
- const int * operator()(gl_hooks_t::gl_t const * const _c, glesv2debugger::Message & msg) {
- _c->glGenerateMipmap(target);
- return 0;
- }
- } caller;
- caller.target = target;
-
- msg.set_arg0(target);
-
- int * ret = MessageLoop(caller, msg, glesv2debugger::Message_Function_glGenerateMipmap);
-}
-
-void Debug_glGenFramebuffers(GLsizei n, GLuint* framebuffers)
-{
- glesv2debugger::Message msg;
- struct : public FunctionCall {
- GLsizei n;
- GLuint* framebuffers;
-
- const int * operator()(gl_hooks_t::gl_t const * const _c, glesv2debugger::Message & msg) {
- nsecs_t c0 = systemTime(timeMode);
- _c->glGenFramebuffers(n, framebuffers);
- msg.set_time((systemTime(timeMode) - c0) * 1e-6f);
- msg.mutable_data()->assign(reinterpret_cast<const char *>(framebuffers), n * sizeof(GLuint));
- return 0;
- }
- } caller;
- caller.n = n;
- caller.framebuffers = framebuffers;
-
- msg.set_arg0(n);
- msg.set_arg1(ToInt(framebuffers));
-
- // FIXME: check for pointer usage
- int * ret = MessageLoop(caller, msg, glesv2debugger::Message_Function_glGenFramebuffers);
-}
-
-void Debug_glGenRenderbuffers(GLsizei n, GLuint* renderbuffers)
-{
- glesv2debugger::Message msg;
- struct : public FunctionCall {
- GLsizei n;
- GLuint* renderbuffers;
-
- const int * operator()(gl_hooks_t::gl_t const * const _c, glesv2debugger::Message & msg) {
- nsecs_t c0 = systemTime(timeMode);
- _c->glGenRenderbuffers(n, renderbuffers);
- msg.set_time((systemTime(timeMode) - c0) * 1e-6f);
- msg.mutable_data()->assign(reinterpret_cast<const char *>(renderbuffers), n * sizeof(GLuint));
- return 0;
- }
- } caller;
- caller.n = n;
- caller.renderbuffers = renderbuffers;
-
- msg.set_arg0(n);
- msg.set_arg1(ToInt(renderbuffers));
-
- // FIXME: check for pointer usage
- int * ret = MessageLoop(caller, msg, glesv2debugger::Message_Function_glGenRenderbuffers);
-}
-
-void Debug_glGenTextures(GLsizei n, GLuint* textures)
-{
- glesv2debugger::Message msg;
- struct : public FunctionCall {
- GLsizei n;
- GLuint* textures;
-
- const int * operator()(gl_hooks_t::gl_t const * const _c, glesv2debugger::Message & msg) {
- nsecs_t c0 = systemTime(timeMode);
- _c->glGenTextures(n, textures);
- msg.set_time((systemTime(timeMode) - c0) * 1e-6f);
- msg.mutable_data()->assign(reinterpret_cast<const char *>(textures), n * sizeof(GLuint));
- return 0;
- }
- } caller;
- caller.n = n;
- caller.textures = textures;
-
- msg.set_arg0(n);
- msg.set_arg1(ToInt(textures));
-
- // FIXME: check for pointer usage
- int * ret = MessageLoop(caller, msg, glesv2debugger::Message_Function_glGenTextures);
-}
-
-// FIXME: this function has pointers, it should be hand written
-void Debug_glGetActiveAttrib(GLuint program, GLuint index, GLsizei bufsize, GLsizei* length, GLint* size, GLenum* type, GLchar* name)
-{
- glesv2debugger::Message msg;
- struct : public FunctionCall {
- GLuint program;
- GLuint index;
- GLsizei bufsize;
- GLsizei* length;
- GLint* size;
- GLenum* type;
- GLchar* name;
-
- const int * operator()(gl_hooks_t::gl_t const * const _c, glesv2debugger::Message & msg) {
- _c->glGetActiveAttrib(program, index, bufsize, length, size, type, name);
- return 0;
- }
- } caller;
- caller.program = program;
- caller.index = index;
- caller.bufsize = bufsize;
- caller.length = length;
- caller.size = size;
- caller.type = type;
- caller.name = name;
-
- msg.set_arg0(program);
- msg.set_arg1(index);
- msg.set_arg2(bufsize);
- msg.set_arg3(ToInt(length));
- msg.set_arg4(ToInt(size));
- msg.set_arg5(ToInt(type));
- msg.set_arg6(ToInt(name));
-
- // FIXME: check for pointer usage
- msg.mutable_data()->assign(reinterpret_cast<const char *>(name), strlen(name) * sizeof(GLchar));
- int * ret = MessageLoop(caller, msg, glesv2debugger::Message_Function_glGetActiveAttrib);
-}
-
-// FIXME: this function has pointers, it should be hand written
-void Debug_glGetActiveUniform(GLuint program, GLuint index, GLsizei bufsize, GLsizei* length, GLint* size, GLenum* type, GLchar* name)
-{
- glesv2debugger::Message msg;
- struct : public FunctionCall {
- GLuint program;
- GLuint index;
- GLsizei bufsize;
- GLsizei* length;
- GLint* size;
- GLenum* type;
- GLchar* name;
-
- const int * operator()(gl_hooks_t::gl_t const * const _c, glesv2debugger::Message & msg) {
- _c->glGetActiveUniform(program, index, bufsize, length, size, type, name);
- return 0;
- }
- } caller;
- caller.program = program;
- caller.index = index;
- caller.bufsize = bufsize;
- caller.length = length;
- caller.size = size;
- caller.type = type;
- caller.name = name;
-
- msg.set_arg0(program);
- msg.set_arg1(index);
- msg.set_arg2(bufsize);
- msg.set_arg3(ToInt(length));
- msg.set_arg4(ToInt(size));
- msg.set_arg5(ToInt(type));
- msg.set_arg6(ToInt(name));
-
- // FIXME: check for pointer usage
- msg.mutable_data()->assign(reinterpret_cast<const char *>(name), strlen(name) * sizeof(GLchar));
- int * ret = MessageLoop(caller, msg, glesv2debugger::Message_Function_glGetActiveUniform);
-}
-
-// FIXME: this function has pointers, it should be hand written
-void Debug_glGetAttachedShaders(GLuint program, GLsizei maxcount, GLsizei* count, GLuint* shaders)
-{
- glesv2debugger::Message msg;
- struct : public FunctionCall {
- GLuint program;
- GLsizei maxcount;
- GLsizei* count;
- GLuint* shaders;
-
- const int * operator()(gl_hooks_t::gl_t const * const _c, glesv2debugger::Message & msg) {
- _c->glGetAttachedShaders(program, maxcount, count, shaders);
- return 0;
- }
- } caller;
- caller.program = program;
- caller.maxcount = maxcount;
- caller.count = count;
- caller.shaders = shaders;
-
- msg.set_arg0(program);
- msg.set_arg1(maxcount);
- msg.set_arg2(ToInt(count));
- msg.set_arg3(ToInt(shaders));
-
- // FIXME: check for pointer usage
- int * ret = MessageLoop(caller, msg, glesv2debugger::Message_Function_glGetAttachedShaders);
-}
-
-int Debug_glGetAttribLocation(GLuint program, const GLchar* name)
-{
- glesv2debugger::Message msg;
- struct : public FunctionCall {
- GLuint program;
- const GLchar* name;
-
- const int * operator()(gl_hooks_t::gl_t const * const _c, glesv2debugger::Message & msg) {
- const int * ret = reinterpret_cast<const int *>(_c->glGetAttribLocation(program, name));
- msg.set_ret(ToInt(ret));
- return ret;
- }
- } caller;
- caller.program = program;
- caller.name = name;
-
- msg.set_arg0(program);
- msg.set_arg1(ToInt(name));
-
- // FIXME: check for pointer usage
- msg.mutable_data()->assign(reinterpret_cast<const char *>(name), strlen(name) * sizeof(GLchar));
- int * ret = MessageLoop(caller, msg, glesv2debugger::Message_Function_glGetAttribLocation);
- return reinterpret_cast<int>(ret);
-}
-
-// FIXME: this function has pointers, it should be hand written
-void Debug_glGetBooleanv(GLenum pname, GLboolean* params)
-{
- glesv2debugger::Message msg;
- struct : public FunctionCall {
- GLenum pname;
- GLboolean* params;
-
- const int * operator()(gl_hooks_t::gl_t const * const _c, glesv2debugger::Message & msg) {
- _c->glGetBooleanv(pname, params);
- return 0;
- }
- } caller;
- caller.pname = pname;
- caller.params = params;
-
- msg.set_arg0(pname);
- msg.set_arg1(ToInt(params));
-
- // FIXME: check for pointer usage
- int * ret = MessageLoop(caller, msg, glesv2debugger::Message_Function_glGetBooleanv);
-}
-
-// FIXME: this function has pointers, it should be hand written
-void Debug_glGetBufferParameteriv(GLenum target, GLenum pname, GLint* params)
-{
- glesv2debugger::Message msg;
- struct : public FunctionCall {
- GLenum target;
- GLenum pname;
- GLint* params;
-
- const int * operator()(gl_hooks_t::gl_t const * const _c, glesv2debugger::Message & msg) {
- _c->glGetBufferParameteriv(target, pname, params);
- return 0;
- }
- } caller;
- caller.target = target;
- caller.pname = pname;
- caller.params = params;
-
- msg.set_arg0(target);
- msg.set_arg1(pname);
- msg.set_arg2(ToInt(params));
-
- // FIXME: check for pointer usage
- int * ret = MessageLoop(caller, msg, glesv2debugger::Message_Function_glGetBufferParameteriv);
-}
-
-GLenum Debug_glGetError(void)
-{
- glesv2debugger::Message msg;
- struct : public FunctionCall {
-
- const int * operator()(gl_hooks_t::gl_t const * const _c, glesv2debugger::Message & msg) {
- const int * ret = reinterpret_cast<const int *>(_c->glGetError());
- msg.set_ret(ToInt(ret));
- return ret;
- }
- } caller;
-
-
- int * ret = MessageLoop(caller, msg, glesv2debugger::Message_Function_glGetError);
- return reinterpret_cast<GLenum>(ret);
-}
-
-// FIXME: this function has pointers, it should be hand written
-void Debug_glGetFloatv(GLenum pname, GLfloat* params)
-{
- glesv2debugger::Message msg;
- struct : public FunctionCall {
- GLenum pname;
- GLfloat* params;
-
- const int * operator()(gl_hooks_t::gl_t const * const _c, glesv2debugger::Message & msg) {
- _c->glGetFloatv(pname, params);
- return 0;
- }
- } caller;
- caller.pname = pname;
- caller.params = params;
-
- msg.set_arg0(pname);
- msg.set_arg1(ToInt(params));
-
- // FIXME: check for pointer usage
- int * ret = MessageLoop(caller, msg, glesv2debugger::Message_Function_glGetFloatv);
-}
-
-// FIXME: this function has pointers, it should be hand written
-void Debug_glGetFramebufferAttachmentParameteriv(GLenum target, GLenum attachment, GLenum pname, GLint* params)
-{
- glesv2debugger::Message msg;
- struct : public FunctionCall {
- GLenum target;
- GLenum attachment;
- GLenum pname;
- GLint* params;
-
- const int * operator()(gl_hooks_t::gl_t const * const _c, glesv2debugger::Message & msg) {
- _c->glGetFramebufferAttachmentParameteriv(target, attachment, pname, params);
- return 0;
- }
- } caller;
- caller.target = target;
- caller.attachment = attachment;
- caller.pname = pname;
- caller.params = params;
-
- msg.set_arg0(target);
- msg.set_arg1(attachment);
- msg.set_arg2(pname);
- msg.set_arg3(ToInt(params));
-
- // FIXME: check for pointer usage
- int * ret = MessageLoop(caller, msg, glesv2debugger::Message_Function_glGetFramebufferAttachmentParameteriv);
-}
-
-// FIXME: this function has pointers, it should be hand written
-void Debug_glGetIntegerv(GLenum pname, GLint* params)
-{
- glesv2debugger::Message msg;
- struct : public FunctionCall {
- GLenum pname;
- GLint* params;
-
- const int * operator()(gl_hooks_t::gl_t const * const _c, glesv2debugger::Message & msg) {
- _c->glGetIntegerv(pname, params);
- return 0;
- }
- } caller;
- caller.pname = pname;
- caller.params = params;
-
- msg.set_arg0(pname);
- msg.set_arg1(ToInt(params));
-
- // FIXME: check for pointer usage
- int * ret = MessageLoop(caller, msg, glesv2debugger::Message_Function_glGetIntegerv);
-}
-
-void Debug_glGetProgramiv(GLuint program, GLenum pname, GLint* params)
-{
- glesv2debugger::Message msg;
- struct : public FunctionCall {
- GLuint program;
- GLenum pname;
- GLint* params;
-
- const int * operator()(gl_hooks_t::gl_t const * const _c, glesv2debugger::Message & msg) {
- nsecs_t c0 = systemTime(timeMode);
- _c->glGetProgramiv(program, pname, params);
- msg.set_time((systemTime(timeMode) - c0) * 1e-6f);
- msg.mutable_data()->assign(reinterpret_cast<const char *>(params), 1 * sizeof(GLint));
- return 0;
- }
- } caller;
- caller.program = program;
- caller.pname = pname;
- caller.params = params;
-
- msg.set_arg0(program);
- msg.set_arg1(pname);
- msg.set_arg2(ToInt(params));
-
- // FIXME: check for pointer usage
- int * ret = MessageLoop(caller, msg, glesv2debugger::Message_Function_glGetProgramiv);
-}
-
-// FIXME: this function has pointers, it should be hand written
-void Debug_glGetProgramInfoLog(GLuint program, GLsizei bufsize, GLsizei* length, GLchar* infolog)
-{
- glesv2debugger::Message msg;
- struct : public FunctionCall {
- GLuint program;
- GLsizei bufsize;
- GLsizei* length;
- GLchar* infolog;
-
- const int * operator()(gl_hooks_t::gl_t const * const _c, glesv2debugger::Message & msg) {
- nsecs_t c0 = systemTime(timeMode);
- _c->glGetProgramInfoLog(program, bufsize, length, infolog);
- msg.set_time((systemTime(timeMode) - c0) * 1e-6f);
- msg.mutable_data()->assign(reinterpret_cast<const char *>(infolog), strlen(infolog) * sizeof(GLchar));
- return 0;
- }
- } caller;
- caller.program = program;
- caller.bufsize = bufsize;
- caller.length = length;
- caller.infolog = infolog;
-
- msg.set_arg0(program);
- msg.set_arg1(bufsize);
- msg.set_arg2(ToInt(length));
- msg.set_arg3(ToInt(infolog));
-
- // FIXME: check for pointer usage
- int * ret = MessageLoop(caller, msg, glesv2debugger::Message_Function_glGetProgramInfoLog);
-}
-
-// FIXME: this function has pointers, it should be hand written
-void Debug_glGetRenderbufferParameteriv(GLenum target, GLenum pname, GLint* params)
-{
- glesv2debugger::Message msg;
- struct : public FunctionCall {
- GLenum target;
- GLenum pname;
- GLint* params;
-
- const int * operator()(gl_hooks_t::gl_t const * const _c, glesv2debugger::Message & msg) {
- _c->glGetRenderbufferParameteriv(target, pname, params);
- return 0;
- }
- } caller;
- caller.target = target;
- caller.pname = pname;
- caller.params = params;
-
- msg.set_arg0(target);
- msg.set_arg1(pname);
- msg.set_arg2(ToInt(params));
-
- // FIXME: check for pointer usage
- int * ret = MessageLoop(caller, msg, glesv2debugger::Message_Function_glGetRenderbufferParameteriv);
-}
-
-void Debug_glGetShaderiv(GLuint shader, GLenum pname, GLint* params)
-{
- glesv2debugger::Message msg;
- struct : public FunctionCall {
- GLuint shader;
- GLenum pname;
- GLint* params;
-
- const int * operator()(gl_hooks_t::gl_t const * const _c, glesv2debugger::Message & msg) {
- nsecs_t c0 = systemTime(timeMode);
- _c->glGetShaderiv(shader, pname, params);
- msg.set_time((systemTime(timeMode) - c0) * 1e-6f);
- msg.mutable_data()->assign(reinterpret_cast<const char *>(params), 1 * sizeof(GLint));
- return 0;
- }
- } caller;
- caller.shader = shader;
- caller.pname = pname;
- caller.params = params;
-
- msg.set_arg0(shader);
- msg.set_arg1(pname);
- msg.set_arg2(ToInt(params));
-
- // FIXME: check for pointer usage
- int * ret = MessageLoop(caller, msg, glesv2debugger::Message_Function_glGetShaderiv);
-}
-
-// FIXME: this function has pointers, it should be hand written
-void Debug_glGetShaderInfoLog(GLuint shader, GLsizei bufsize, GLsizei* length, GLchar* infolog)
-{
- glesv2debugger::Message msg;
- struct : public FunctionCall {
- GLuint shader;
- GLsizei bufsize;
- GLsizei* length;
- GLchar* infolog;
-
- const int * operator()(gl_hooks_t::gl_t const * const _c, glesv2debugger::Message & msg) {
- nsecs_t c0 = systemTime(timeMode);
- _c->glGetShaderInfoLog(shader, bufsize, length, infolog);
- msg.set_time((systemTime(timeMode) - c0) * 1e-6f);
- msg.mutable_data()->assign(reinterpret_cast<const char *>(infolog), strlen(infolog) * sizeof(GLchar));
- return 0;
- }
- } caller;
- caller.shader = shader;
- caller.bufsize = bufsize;
- caller.length = length;
- caller.infolog = infolog;
-
- msg.set_arg0(shader);
- msg.set_arg1(bufsize);
- msg.set_arg2(ToInt(length));
- msg.set_arg3(ToInt(infolog));
-
- // FIXME: check for pointer usage
- int * ret = MessageLoop(caller, msg, glesv2debugger::Message_Function_glGetShaderInfoLog);
-}
-
-// FIXME: this function has pointers, it should be hand written
-void Debug_glGetShaderPrecisionFormat(GLenum shadertype, GLenum precisiontype, GLint* range, GLint* precision)
-{
- glesv2debugger::Message msg;
- struct : public FunctionCall {
- GLenum shadertype;
- GLenum precisiontype;
- GLint* range;
- GLint* precision;
-
- const int * operator()(gl_hooks_t::gl_t const * const _c, glesv2debugger::Message & msg) {
- _c->glGetShaderPrecisionFormat(shadertype, precisiontype, range, precision);
- return 0;
- }
- } caller;
- caller.shadertype = shadertype;
- caller.precisiontype = precisiontype;
- caller.range = range;
- caller.precision = precision;
-
- msg.set_arg0(shadertype);
- msg.set_arg1(precisiontype);
- msg.set_arg2(ToInt(range));
- msg.set_arg3(ToInt(precision));
-
- // FIXME: check for pointer usage
- int * ret = MessageLoop(caller, msg, glesv2debugger::Message_Function_glGetShaderPrecisionFormat);
-}
-
-// FIXME: this function has pointers, it should be hand written
-void Debug_glGetShaderSource(GLuint shader, GLsizei bufsize, GLsizei* length, GLchar* source)
-{
- glesv2debugger::Message msg;
- struct : public FunctionCall {
- GLuint shader;
- GLsizei bufsize;
- GLsizei* length;
- GLchar* source;
-
- const int * operator()(gl_hooks_t::gl_t const * const _c, glesv2debugger::Message & msg) {
- nsecs_t c0 = systemTime(timeMode);
- _c->glGetShaderSource(shader, bufsize, length, source);
- msg.set_time((systemTime(timeMode) - c0) * 1e-6f);
- msg.mutable_data()->assign(reinterpret_cast<const char *>(source), strlen(source) * sizeof(GLchar));
- return 0;
- }
- } caller;
- caller.shader = shader;
- caller.bufsize = bufsize;
- caller.length = length;
- caller.source = source;
-
- msg.set_arg0(shader);
- msg.set_arg1(bufsize);
- msg.set_arg2(ToInt(length));
- msg.set_arg3(ToInt(source));
-
- // FIXME: check for pointer usage
- int * ret = MessageLoop(caller, msg, glesv2debugger::Message_Function_glGetShaderSource);
-}
-
-// FIXME: this function has pointers, it should be hand written
-const GLubyte* Debug_glGetString(GLenum name)
-{
- glesv2debugger::Message msg;
- struct : public FunctionCall {
- GLenum name;
-
- const int * operator()(gl_hooks_t::gl_t const * const _c, glesv2debugger::Message & msg) {
- const int * ret = reinterpret_cast<const int *>(_c->glGetString(name));
- msg.set_ret(ToInt(ret));
- return ret;
- }
- } caller;
- caller.name = name;
-
- msg.set_arg0(name);
-
- // FIXME: check for pointer usage
- int * ret = MessageLoop(caller, msg, glesv2debugger::Message_Function_glGetString);
- return reinterpret_cast<const GLubyte*>(ret);
-}
-
-// FIXME: this function has pointers, it should be hand written
-void Debug_glGetTexParameterfv(GLenum target, GLenum pname, GLfloat* params)
-{
- glesv2debugger::Message msg;
- struct : public FunctionCall {
- GLenum target;
- GLenum pname;
- GLfloat* params;
-
- const int * operator()(gl_hooks_t::gl_t const * const _c, glesv2debugger::Message & msg) {
- _c->glGetTexParameterfv(target, pname, params);
- return 0;
- }
- } caller;
- caller.target = target;
- caller.pname = pname;
- caller.params = params;
-
- msg.set_arg0(target);
- msg.set_arg1(pname);
- msg.set_arg2(ToInt(params));
-
- // FIXME: check for pointer usage
- int * ret = MessageLoop(caller, msg, glesv2debugger::Message_Function_glGetTexParameterfv);
-}
-
-// FIXME: this function has pointers, it should be hand written
-void Debug_glGetTexParameteriv(GLenum target, GLenum pname, GLint* params)
-{
- glesv2debugger::Message msg;
- struct : public FunctionCall {
- GLenum target;
- GLenum pname;
- GLint* params;
-
- const int * operator()(gl_hooks_t::gl_t const * const _c, glesv2debugger::Message & msg) {
- _c->glGetTexParameteriv(target, pname, params);
- return 0;
- }
- } caller;
- caller.target = target;
- caller.pname = pname;
- caller.params = params;
-
- msg.set_arg0(target);
- msg.set_arg1(pname);
- msg.set_arg2(ToInt(params));
-
- // FIXME: check for pointer usage
- int * ret = MessageLoop(caller, msg, glesv2debugger::Message_Function_glGetTexParameteriv);
-}
-
-// FIXME: this function has pointers, it should be hand written
-void Debug_glGetUniformfv(GLuint program, GLint location, GLfloat* params)
-{
- glesv2debugger::Message msg;
- struct : public FunctionCall {
- GLuint program;
- GLint location;
- GLfloat* params;
-
- const int * operator()(gl_hooks_t::gl_t const * const _c, glesv2debugger::Message & msg) {
- _c->glGetUniformfv(program, location, params);
- return 0;
- }
- } caller;
- caller.program = program;
- caller.location = location;
- caller.params = params;
-
- msg.set_arg0(program);
- msg.set_arg1(location);
- msg.set_arg2(ToInt(params));
-
- // FIXME: check for pointer usage
- int * ret = MessageLoop(caller, msg, glesv2debugger::Message_Function_glGetUniformfv);
-}
-
-// FIXME: this function has pointers, it should be hand written
-void Debug_glGetUniformiv(GLuint program, GLint location, GLint* params)
-{
- glesv2debugger::Message msg;
- struct : public FunctionCall {
- GLuint program;
- GLint location;
- GLint* params;
-
- const int * operator()(gl_hooks_t::gl_t const * const _c, glesv2debugger::Message & msg) {
- _c->glGetUniformiv(program, location, params);
- return 0;
- }
- } caller;
- caller.program = program;
- caller.location = location;
- caller.params = params;
-
- msg.set_arg0(program);
- msg.set_arg1(location);
- msg.set_arg2(ToInt(params));
-
- // FIXME: check for pointer usage
- int * ret = MessageLoop(caller, msg, glesv2debugger::Message_Function_glGetUniformiv);
-}
-
-int Debug_glGetUniformLocation(GLuint program, const GLchar* name)
-{
- glesv2debugger::Message msg;
- struct : public FunctionCall {
- GLuint program;
- const GLchar* name;
-
- const int * operator()(gl_hooks_t::gl_t const * const _c, glesv2debugger::Message & msg) {
- const int * ret = reinterpret_cast<const int *>(_c->glGetUniformLocation(program, name));
- msg.set_ret(ToInt(ret));
- return ret;
- }
- } caller;
- caller.program = program;
- caller.name = name;
-
- msg.set_arg0(program);
- msg.set_arg1(ToInt(name));
-
- // FIXME: check for pointer usage
- msg.mutable_data()->assign(reinterpret_cast<const char *>(name), strlen(name) * sizeof(GLchar));
- int * ret = MessageLoop(caller, msg, glesv2debugger::Message_Function_glGetUniformLocation);
- return reinterpret_cast<int>(ret);
-}
-
-// FIXME: this function has pointers, it should be hand written
-void Debug_glGetVertexAttribfv(GLuint index, GLenum pname, GLfloat* params)
-{
- glesv2debugger::Message msg;
- struct : public FunctionCall {
- GLuint index;
- GLenum pname;
- GLfloat* params;
-
- const int * operator()(gl_hooks_t::gl_t const * const _c, glesv2debugger::Message & msg) {
- _c->glGetVertexAttribfv(index, pname, params);
- return 0;
- }
- } caller;
- caller.index = index;
- caller.pname = pname;
- caller.params = params;
-
- msg.set_arg0(index);
- msg.set_arg1(pname);
- msg.set_arg2(ToInt(params));
-
- // FIXME: check for pointer usage
- int * ret = MessageLoop(caller, msg, glesv2debugger::Message_Function_glGetVertexAttribfv);
-}
-
-// FIXME: this function has pointers, it should be hand written
-void Debug_glGetVertexAttribiv(GLuint index, GLenum pname, GLint* params)
-{
- glesv2debugger::Message msg;
- struct : public FunctionCall {
- GLuint index;
- GLenum pname;
- GLint* params;
-
- const int * operator()(gl_hooks_t::gl_t const * const _c, glesv2debugger::Message & msg) {
- _c->glGetVertexAttribiv(index, pname, params);
- return 0;
- }
- } caller;
- caller.index = index;
- caller.pname = pname;
- caller.params = params;
-
- msg.set_arg0(index);
- msg.set_arg1(pname);
- msg.set_arg2(ToInt(params));
-
- // FIXME: check for pointer usage
- int * ret = MessageLoop(caller, msg, glesv2debugger::Message_Function_glGetVertexAttribiv);
-}
-
-// FIXME: this function has pointers, it should be hand written
-void Debug_glGetVertexAttribPointerv(GLuint index, GLenum pname, GLvoid** pointer)
-{
- glesv2debugger::Message msg;
- struct : public FunctionCall {
- GLuint index;
- GLenum pname;
- GLvoid** pointer;
-
- const int * operator()(gl_hooks_t::gl_t const * const _c, glesv2debugger::Message & msg) {
- _c->glGetVertexAttribPointerv(index, pname, pointer);
- return 0;
- }
- } caller;
- caller.index = index;
- caller.pname = pname;
- caller.pointer = pointer;
-
- msg.set_arg0(index);
- msg.set_arg1(pname);
- msg.set_arg2(ToInt(pointer));
-
- // FIXME: check for pointer usage
- int * ret = MessageLoop(caller, msg, glesv2debugger::Message_Function_glGetVertexAttribPointerv);
-}
-
-void Debug_glHint(GLenum target, GLenum mode)
-{
- glesv2debugger::Message msg;
- struct : public FunctionCall {
- GLenum target;
- GLenum mode;
-
- const int * operator()(gl_hooks_t::gl_t const * const _c, glesv2debugger::Message & msg) {
- _c->glHint(target, mode);
- return 0;
- }
- } caller;
- caller.target = target;
- caller.mode = mode;
-
- msg.set_arg0(target);
- msg.set_arg1(mode);
-
- int * ret = MessageLoop(caller, msg, glesv2debugger::Message_Function_glHint);
-}
-
-GLboolean Debug_glIsBuffer(GLuint buffer)
-{
- glesv2debugger::Message msg;
- struct : public FunctionCall {
- GLuint buffer;
-
- const int * operator()(gl_hooks_t::gl_t const * const _c, glesv2debugger::Message & msg) {
- const int * ret = reinterpret_cast<const int *>(_c->glIsBuffer(buffer));
- msg.set_ret(ToInt(ret));
- return ret;
- }
- } caller;
- caller.buffer = buffer;
-
- msg.set_arg0(buffer);
-
- int * ret = MessageLoop(caller, msg, glesv2debugger::Message_Function_glIsBuffer);
- return static_cast<GLboolean>(reinterpret_cast<int>(ret));
-}
-
-GLboolean Debug_glIsEnabled(GLenum cap)
-{
- glesv2debugger::Message msg;
- struct : public FunctionCall {
- GLenum cap;
-
- const int * operator()(gl_hooks_t::gl_t const * const _c, glesv2debugger::Message & msg) {
- const int * ret = reinterpret_cast<const int *>(_c->glIsEnabled(cap));
- msg.set_ret(ToInt(ret));
- return ret;
- }
- } caller;
- caller.cap = cap;
-
- msg.set_arg0(cap);
-
- int * ret = MessageLoop(caller, msg, glesv2debugger::Message_Function_glIsEnabled);
- return static_cast<GLboolean>(reinterpret_cast<int>(ret));
-}
-
-GLboolean Debug_glIsFramebuffer(GLuint framebuffer)
-{
- glesv2debugger::Message msg;
- struct : public FunctionCall {
- GLuint framebuffer;
-
- const int * operator()(gl_hooks_t::gl_t const * const _c, glesv2debugger::Message & msg) {
- const int * ret = reinterpret_cast<const int *>(_c->glIsFramebuffer(framebuffer));
- msg.set_ret(ToInt(ret));
- return ret;
- }
- } caller;
- caller.framebuffer = framebuffer;
-
- msg.set_arg0(framebuffer);
-
- int * ret = MessageLoop(caller, msg, glesv2debugger::Message_Function_glIsFramebuffer);
- return static_cast<GLboolean>(reinterpret_cast<int>(ret));
-}
-
-GLboolean Debug_glIsProgram(GLuint program)
-{
- glesv2debugger::Message msg;
- struct : public FunctionCall {
- GLuint program;
-
- const int * operator()(gl_hooks_t::gl_t const * const _c, glesv2debugger::Message & msg) {
- const int * ret = reinterpret_cast<const int *>(_c->glIsProgram(program));
- msg.set_ret(ToInt(ret));
- return ret;
- }
- } caller;
- caller.program = program;
-
- msg.set_arg0(program);
-
- int * ret = MessageLoop(caller, msg, glesv2debugger::Message_Function_glIsProgram);
- return static_cast<GLboolean>(reinterpret_cast<int>(ret));
-}
-
-GLboolean Debug_glIsRenderbuffer(GLuint renderbuffer)
-{
- glesv2debugger::Message msg;
- struct : public FunctionCall {
- GLuint renderbuffer;
-
- const int * operator()(gl_hooks_t::gl_t const * const _c, glesv2debugger::Message & msg) {
- const int * ret = reinterpret_cast<const int *>(_c->glIsRenderbuffer(renderbuffer));
- msg.set_ret(ToInt(ret));
- return ret;
- }
- } caller;
- caller.renderbuffer = renderbuffer;
-
- msg.set_arg0(renderbuffer);
-
- int * ret = MessageLoop(caller, msg, glesv2debugger::Message_Function_glIsRenderbuffer);
- return static_cast<GLboolean>(reinterpret_cast<int>(ret));
-}
-
-GLboolean Debug_glIsShader(GLuint shader)
-{
- glesv2debugger::Message msg;
- struct : public FunctionCall {
- GLuint shader;
-
- const int * operator()(gl_hooks_t::gl_t const * const _c, glesv2debugger::Message & msg) {
- const int * ret = reinterpret_cast<const int *>(_c->glIsShader(shader));
- msg.set_ret(ToInt(ret));
- return ret;
- }
- } caller;
- caller.shader = shader;
-
- msg.set_arg0(shader);
-
- int * ret = MessageLoop(caller, msg, glesv2debugger::Message_Function_glIsShader);
- return static_cast<GLboolean>(reinterpret_cast<int>(ret));
-}
-
-GLboolean Debug_glIsTexture(GLuint texture)
-{
- glesv2debugger::Message msg;
- struct : public FunctionCall {
- GLuint texture;
-
- const int * operator()(gl_hooks_t::gl_t const * const _c, glesv2debugger::Message & msg) {
- const int * ret = reinterpret_cast<const int *>(_c->glIsTexture(texture));
- msg.set_ret(ToInt(ret));
- return ret;
- }
- } caller;
- caller.texture = texture;
-
- msg.set_arg0(texture);
-
- int * ret = MessageLoop(caller, msg, glesv2debugger::Message_Function_glIsTexture);
- return static_cast<GLboolean>(reinterpret_cast<int>(ret));
-}
-
-void Debug_glLineWidth(GLfloat width)
-{
- glesv2debugger::Message msg;
- struct : public FunctionCall {
- GLfloat width;
-
- const int * operator()(gl_hooks_t::gl_t const * const _c, glesv2debugger::Message & msg) {
- _c->glLineWidth(width);
- return 0;
- }
- } caller;
- caller.width = width;
-
- msg.set_arg0(ToInt(width));
-
- int * ret = MessageLoop(caller, msg, glesv2debugger::Message_Function_glLineWidth);
-}
-
-void Debug_glLinkProgram(GLuint program)
-{
- glesv2debugger::Message msg;
- struct : public FunctionCall {
- GLuint program;
-
- const int * operator()(gl_hooks_t::gl_t const * const _c, glesv2debugger::Message & msg) {
- _c->glLinkProgram(program);
- return 0;
- }
- } caller;
- caller.program = program;
-
- msg.set_arg0(program);
-
- int * ret = MessageLoop(caller, msg, glesv2debugger::Message_Function_glLinkProgram);
-}
-
-void Debug_glPixelStorei(GLenum pname, GLint param)
-{
- glesv2debugger::Message msg;
- struct : public FunctionCall {
- GLenum pname;
- GLint param;
-
- const int * operator()(gl_hooks_t::gl_t const * const _c, glesv2debugger::Message & msg) {
- _c->glPixelStorei(pname, param);
- return 0;
- }
- } caller;
- caller.pname = pname;
- caller.param = param;
-
- msg.set_arg0(pname);
- msg.set_arg1(param);
-
- int * ret = MessageLoop(caller, msg, glesv2debugger::Message_Function_glPixelStorei);
-}
-
-void Debug_glPolygonOffset(GLfloat factor, GLfloat units)
-{
- glesv2debugger::Message msg;
- struct : public FunctionCall {
- GLfloat factor;
- GLfloat units;
-
- const int * operator()(gl_hooks_t::gl_t const * const _c, glesv2debugger::Message & msg) {
- _c->glPolygonOffset(factor, units);
- return 0;
- }
- } caller;
- caller.factor = factor;
- caller.units = units;
-
- msg.set_arg0(ToInt(factor));
- msg.set_arg1(ToInt(units));
-
- int * ret = MessageLoop(caller, msg, glesv2debugger::Message_Function_glPolygonOffset);
-}
-
-void Debug_glReadPixels(GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, GLvoid* pixels)
-{
- glesv2debugger::Message msg;
- struct : public FunctionCall {
- GLint x;
- GLint y;
- GLsizei width;
- GLsizei height;
- GLenum format;
- GLenum type;
- GLvoid* pixels;
-
- const int * operator()(gl_hooks_t::gl_t const * const _c, glesv2debugger::Message & msg) {
- _c->glReadPixels(x, y, width, height, format, type, pixels);
-#ifdef EXTEND_AFTER_CALL_Debug_glReadPixels
- EXTEND_AFTER_CALL_Debug_glReadPixels;
-#endif
- return 0;
- }
- } caller;
- caller.x = x;
- caller.y = y;
- caller.width = width;
- caller.height = height;
- caller.format = format;
- caller.type = type;
- caller.pixels = pixels;
-
- msg.set_arg0(x);
- msg.set_arg1(y);
- msg.set_arg2(width);
- msg.set_arg3(height);
- msg.set_arg4(format);
- msg.set_arg5(type);
- msg.set_arg6(ToInt(pixels));
-
- // FIXME: check for pointer usage
-#ifdef EXTEND_Debug_glReadPixels
- EXTEND_Debug_glReadPixels;
-#endif
- int * ret = MessageLoop(caller, msg, glesv2debugger::Message_Function_glReadPixels);
-}
-
-void Debug_glReleaseShaderCompiler(void)
-{
- glesv2debugger::Message msg;
- struct : public FunctionCall {
-
- const int * operator()(gl_hooks_t::gl_t const * const _c, glesv2debugger::Message & msg) {
- _c->glReleaseShaderCompiler();
- return 0;
- }
- } caller;
-
-
- int * ret = MessageLoop(caller, msg, glesv2debugger::Message_Function_glReleaseShaderCompiler);
-}
-
-void Debug_glRenderbufferStorage(GLenum target, GLenum internalformat, GLsizei width, GLsizei height)
-{
- glesv2debugger::Message msg;
- struct : public FunctionCall {
- GLenum target;
- GLenum internalformat;
- GLsizei width;
- GLsizei height;
-
- const int * operator()(gl_hooks_t::gl_t const * const _c, glesv2debugger::Message & msg) {
- _c->glRenderbufferStorage(target, internalformat, width, height);
- return 0;
- }
- } caller;
- caller.target = target;
- caller.internalformat = internalformat;
- caller.width = width;
- caller.height = height;
-
- msg.set_arg0(target);
- msg.set_arg1(internalformat);
- msg.set_arg2(width);
- msg.set_arg3(height);
-
- int * ret = MessageLoop(caller, msg, glesv2debugger::Message_Function_glRenderbufferStorage);
-}
-
-void Debug_glSampleCoverage(GLclampf value, GLboolean invert)
-{
- glesv2debugger::Message msg;
- struct : public FunctionCall {
- GLclampf value;
- GLboolean invert;
-
- const int * operator()(gl_hooks_t::gl_t const * const _c, glesv2debugger::Message & msg) {
- _c->glSampleCoverage(value, invert);
- return 0;
- }
- } caller;
- caller.value = value;
- caller.invert = invert;
-
- msg.set_arg0(ToInt(value));
- msg.set_arg1(invert);
-
- int * ret = MessageLoop(caller, msg, glesv2debugger::Message_Function_glSampleCoverage);
-}
-
-void Debug_glScissor(GLint x, GLint y, GLsizei width, GLsizei height)
-{
- glesv2debugger::Message msg;
- struct : public FunctionCall {
- GLint x;
- GLint y;
- GLsizei width;
- GLsizei height;
-
- const int * operator()(gl_hooks_t::gl_t const * const _c, glesv2debugger::Message & msg) {
- _c->glScissor(x, y, width, height);
- return 0;
- }
- } caller;
- caller.x = x;
- caller.y = y;
- caller.width = width;
- caller.height = height;
-
- msg.set_arg0(x);
- msg.set_arg1(y);
- msg.set_arg2(width);
- msg.set_arg3(height);
-
- int * ret = MessageLoop(caller, msg, glesv2debugger::Message_Function_glScissor);
-}
-
-// FIXME: this function has pointers, it should be hand written
-void Debug_glShaderBinary(GLsizei n, const GLuint* shaders, GLenum binaryformat, const GLvoid* binary, GLsizei length)
-{
- glesv2debugger::Message msg;
- struct : public FunctionCall {
- GLsizei n;
- const GLuint* shaders;
- GLenum binaryformat;
- const GLvoid* binary;
- GLsizei length;
-
- const int * operator()(gl_hooks_t::gl_t const * const _c, glesv2debugger::Message & msg) {
- _c->glShaderBinary(n, shaders, binaryformat, binary, length);
- return 0;
- }
- } caller;
- caller.n = n;
- caller.shaders = shaders;
- caller.binaryformat = binaryformat;
- caller.binary = binary;
- caller.length = length;
-
- msg.set_arg0(n);
- msg.set_arg1(ToInt(shaders));
- msg.set_arg2(binaryformat);
- msg.set_arg3(ToInt(binary));
- msg.set_arg4(length);
-
- // FIXME: check for pointer usage
- int * ret = MessageLoop(caller, msg, glesv2debugger::Message_Function_glShaderBinary);
-}
-
-void Debug_glShaderSource(GLuint shader, GLsizei count, const GLchar** string, const GLint* length)
-{
- glesv2debugger::Message msg;
- struct : public FunctionCall {
- GLuint shader;
- GLsizei count;
- const GLchar** string;
- const GLint* length;
-
- const int * operator()(gl_hooks_t::gl_t const * const _c, glesv2debugger::Message & msg) {
- _c->glShaderSource(shader, count, string, length);
-#ifdef EXTEND_AFTER_CALL_Debug_glShaderSource
- EXTEND_AFTER_CALL_Debug_glShaderSource;
-#endif
- return 0;
- }
- } caller;
- caller.shader = shader;
- caller.count = count;
- caller.string = string;
- caller.length = length;
-
- msg.set_arg0(shader);
- msg.set_arg1(count);
- msg.set_arg2(ToInt(string));
- msg.set_arg3(ToInt(length));
-
- // FIXME: check for pointer usage
-#ifdef EXTEND_Debug_glShaderSource
- EXTEND_Debug_glShaderSource;
-#endif
- int * ret = MessageLoop(caller, msg, glesv2debugger::Message_Function_glShaderSource);
-}
-
-void Debug_glStencilFunc(GLenum func, GLint ref, GLuint mask)
-{
- glesv2debugger::Message msg;
- struct : public FunctionCall {
- GLenum func;
- GLint ref;
- GLuint mask;
-
- const int * operator()(gl_hooks_t::gl_t const * const _c, glesv2debugger::Message & msg) {
- _c->glStencilFunc(func, ref, mask);
- return 0;
- }
- } caller;
- caller.func = func;
- caller.ref = ref;
- caller.mask = mask;
-
- msg.set_arg0(func);
- msg.set_arg1(ref);
- msg.set_arg2(mask);
-
- int * ret = MessageLoop(caller, msg, glesv2debugger::Message_Function_glStencilFunc);
-}
-
-void Debug_glStencilFuncSeparate(GLenum face, GLenum func, GLint ref, GLuint mask)
-{
- glesv2debugger::Message msg;
- struct : public FunctionCall {
- GLenum face;
- GLenum func;
- GLint ref;
- GLuint mask;
-
- const int * operator()(gl_hooks_t::gl_t const * const _c, glesv2debugger::Message & msg) {
- _c->glStencilFuncSeparate(face, func, ref, mask);
- return 0;
- }
- } caller;
- caller.face = face;
- caller.func = func;
- caller.ref = ref;
- caller.mask = mask;
-
- msg.set_arg0(face);
- msg.set_arg1(func);
- msg.set_arg2(ref);
- msg.set_arg3(mask);
-
- int * ret = MessageLoop(caller, msg, glesv2debugger::Message_Function_glStencilFuncSeparate);
-}
-
-void Debug_glStencilMask(GLuint mask)
-{
- glesv2debugger::Message msg;
- struct : public FunctionCall {
- GLuint mask;
-
- const int * operator()(gl_hooks_t::gl_t const * const _c, glesv2debugger::Message & msg) {
- _c->glStencilMask(mask);
- return 0;
- }
- } caller;
- caller.mask = mask;
-
- msg.set_arg0(mask);
-
- int * ret = MessageLoop(caller, msg, glesv2debugger::Message_Function_glStencilMask);
-}
-
-void Debug_glStencilMaskSeparate(GLenum face, GLuint mask)
-{
- glesv2debugger::Message msg;
- struct : public FunctionCall {
- GLenum face;
- GLuint mask;
-
- const int * operator()(gl_hooks_t::gl_t const * const _c, glesv2debugger::Message & msg) {
- _c->glStencilMaskSeparate(face, mask);
- return 0;
- }
- } caller;
- caller.face = face;
- caller.mask = mask;
-
- msg.set_arg0(face);
- msg.set_arg1(mask);
-
- int * ret = MessageLoop(caller, msg, glesv2debugger::Message_Function_glStencilMaskSeparate);
-}
-
-void Debug_glStencilOp(GLenum fail, GLenum zfail, GLenum zpass)
-{
- glesv2debugger::Message msg;
- struct : public FunctionCall {
- GLenum fail;
- GLenum zfail;
- GLenum zpass;
-
- const int * operator()(gl_hooks_t::gl_t const * const _c, glesv2debugger::Message & msg) {
- _c->glStencilOp(fail, zfail, zpass);
- return 0;
- }
- } caller;
- caller.fail = fail;
- caller.zfail = zfail;
- caller.zpass = zpass;
-
- msg.set_arg0(fail);
- msg.set_arg1(zfail);
- msg.set_arg2(zpass);
-
- int * ret = MessageLoop(caller, msg, glesv2debugger::Message_Function_glStencilOp);
-}
-
-void Debug_glStencilOpSeparate(GLenum face, GLenum fail, GLenum zfail, GLenum zpass)
-{
- glesv2debugger::Message msg;
- struct : public FunctionCall {
- GLenum face;
- GLenum fail;
- GLenum zfail;
- GLenum zpass;
-
- const int * operator()(gl_hooks_t::gl_t const * const _c, glesv2debugger::Message & msg) {
- _c->glStencilOpSeparate(face, fail, zfail, zpass);
- return 0;
- }
- } caller;
- caller.face = face;
- caller.fail = fail;
- caller.zfail = zfail;
- caller.zpass = zpass;
-
- msg.set_arg0(face);
- msg.set_arg1(fail);
- msg.set_arg2(zfail);
- msg.set_arg3(zpass);
-
- int * ret = MessageLoop(caller, msg, glesv2debugger::Message_Function_glStencilOpSeparate);
-}
-
-void Debug_glTexImage2D(GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLint border, GLenum format, GLenum type, const GLvoid* pixels)
-{
- glesv2debugger::Message msg;
- struct : public FunctionCall {
- GLenum target;
- GLint level;
- GLint internalformat;
- GLsizei width;
- GLsizei height;
- GLint border;
- GLenum format;
- GLenum type;
- const GLvoid* pixels;
-
- const int * operator()(gl_hooks_t::gl_t const * const _c, glesv2debugger::Message & msg) {
- _c->glTexImage2D(target, level, internalformat, width, height, border, format, type, pixels);
-#ifdef EXTEND_AFTER_CALL_Debug_glTexImage2D
- EXTEND_AFTER_CALL_Debug_glTexImage2D;
-#endif
- return 0;
- }
- } caller;
- caller.target = target;
- caller.level = level;
- caller.internalformat = internalformat;
- caller.width = width;
- caller.height = height;
- caller.border = border;
- caller.format = format;
- caller.type = type;
- caller.pixels = pixels;
-
- msg.set_arg0(target);
- msg.set_arg1(level);
- msg.set_arg2(internalformat);
- msg.set_arg3(width);
- msg.set_arg4(height);
- msg.set_arg5(border);
- msg.set_arg6(format);
- msg.set_arg7(type);
- msg.set_arg8(ToInt(pixels));
-
- // FIXME: check for pointer usage
-#ifdef EXTEND_Debug_glTexImage2D
- EXTEND_Debug_glTexImage2D;
-#endif
- int * ret = MessageLoop(caller, msg, glesv2debugger::Message_Function_glTexImage2D);
-}
-
-void Debug_glTexParameterf(GLenum target, GLenum pname, GLfloat param)
-{
- glesv2debugger::Message msg;
- struct : public FunctionCall {
- GLenum target;
- GLenum pname;
- GLfloat param;
-
- const int * operator()(gl_hooks_t::gl_t const * const _c, glesv2debugger::Message & msg) {
- _c->glTexParameterf(target, pname, param);
- return 0;
- }
- } caller;
- caller.target = target;
- caller.pname = pname;
- caller.param = param;
-
- msg.set_arg0(target);
- msg.set_arg1(pname);
- msg.set_arg2(ToInt(param));
-
- int * ret = MessageLoop(caller, msg, glesv2debugger::Message_Function_glTexParameterf);
-}
-
-// FIXME: this function has pointers, it should be hand written
-void Debug_glTexParameterfv(GLenum target, GLenum pname, const GLfloat* params)
-{
- glesv2debugger::Message msg;
- struct : public FunctionCall {
- GLenum target;
- GLenum pname;
- const GLfloat* params;
-
- const int * operator()(gl_hooks_t::gl_t const * const _c, glesv2debugger::Message & msg) {
- _c->glTexParameterfv(target, pname, params);
- return 0;
- }
- } caller;
- caller.target = target;
- caller.pname = pname;
- caller.params = params;
-
- msg.set_arg0(target);
- msg.set_arg1(pname);
- msg.set_arg2(ToInt(params));
-
- // FIXME: check for pointer usage
- int * ret = MessageLoop(caller, msg, glesv2debugger::Message_Function_glTexParameterfv);
-}
-
-void Debug_glTexParameteri(GLenum target, GLenum pname, GLint param)
-{
- glesv2debugger::Message msg;
- struct : public FunctionCall {
- GLenum target;
- GLenum pname;
- GLint param;
-
- const int * operator()(gl_hooks_t::gl_t const * const _c, glesv2debugger::Message & msg) {
- _c->glTexParameteri(target, pname, param);
- return 0;
- }
- } caller;
- caller.target = target;
- caller.pname = pname;
- caller.param = param;
-
- msg.set_arg0(target);
- msg.set_arg1(pname);
- msg.set_arg2(param);
-
- int * ret = MessageLoop(caller, msg, glesv2debugger::Message_Function_glTexParameteri);
-}
-
-// FIXME: this function has pointers, it should be hand written
-void Debug_glTexParameteriv(GLenum target, GLenum pname, const GLint* params)
-{
- glesv2debugger::Message msg;
- struct : public FunctionCall {
- GLenum target;
- GLenum pname;
- const GLint* params;
-
- const int * operator()(gl_hooks_t::gl_t const * const _c, glesv2debugger::Message & msg) {
- _c->glTexParameteriv(target, pname, params);
- return 0;
- }
- } caller;
- caller.target = target;
- caller.pname = pname;
- caller.params = params;
-
- msg.set_arg0(target);
- msg.set_arg1(pname);
- msg.set_arg2(ToInt(params));
-
- // FIXME: check for pointer usage
- int * ret = MessageLoop(caller, msg, glesv2debugger::Message_Function_glTexParameteriv);
-}
-
-void Debug_glTexSubImage2D(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid* pixels)
-{
- glesv2debugger::Message msg;
- struct : public FunctionCall {
- GLenum target;
- GLint level;
- GLint xoffset;
- GLint yoffset;
- GLsizei width;
- GLsizei height;
- GLenum format;
- GLenum type;
- const GLvoid* pixels;
-
- const int * operator()(gl_hooks_t::gl_t const * const _c, glesv2debugger::Message & msg) {
- _c->glTexSubImage2D(target, level, xoffset, yoffset, width, height, format, type, pixels);
-#ifdef EXTEND_AFTER_CALL_Debug_glTexSubImage2D
- EXTEND_AFTER_CALL_Debug_glTexSubImage2D;
-#endif
- return 0;
- }
- } caller;
- caller.target = target;
- caller.level = level;
- caller.xoffset = xoffset;
- caller.yoffset = yoffset;
- caller.width = width;
- caller.height = height;
- caller.format = format;
- caller.type = type;
- caller.pixels = pixels;
-
- msg.set_arg0(target);
- msg.set_arg1(level);
- msg.set_arg2(xoffset);
- msg.set_arg3(yoffset);
- msg.set_arg4(width);
- msg.set_arg5(height);
- msg.set_arg6(format);
- msg.set_arg7(type);
- msg.set_arg8(ToInt(pixels));
-
- // FIXME: check for pointer usage
-#ifdef EXTEND_Debug_glTexSubImage2D
- EXTEND_Debug_glTexSubImage2D;
-#endif
- int * ret = MessageLoop(caller, msg, glesv2debugger::Message_Function_glTexSubImage2D);
-}
-
-void Debug_glUniform1f(GLint location, GLfloat x)
-{
- glesv2debugger::Message msg;
- struct : public FunctionCall {
- GLint location;
- GLfloat x;
-
- const int * operator()(gl_hooks_t::gl_t const * const _c, glesv2debugger::Message & msg) {
- _c->glUniform1f(location, x);
- return 0;
- }
- } caller;
- caller.location = location;
- caller.x = x;
-
- msg.set_arg0(location);
- msg.set_arg1(ToInt(x));
-
- int * ret = MessageLoop(caller, msg, glesv2debugger::Message_Function_glUniform1f);
-}
-
-void Debug_glUniform1fv(GLint location, GLsizei count, const GLfloat* v)
-{
- glesv2debugger::Message msg;
- struct : public FunctionCall {
- GLint location;
- GLsizei count;
- const GLfloat* v;
-
- const int * operator()(gl_hooks_t::gl_t const * const _c, glesv2debugger::Message & msg) {
- _c->glUniform1fv(location, count, v);
- return 0;
- }
- } caller;
- caller.location = location;
- caller.count = count;
- caller.v = v;
-
- msg.set_arg0(location);
- msg.set_arg1(count);
- msg.set_arg2(ToInt(v));
-
- // FIXME: check for pointer usage
- msg.mutable_data()->assign(reinterpret_cast<const char *>(v), 1*count * sizeof(GLfloat));
- int * ret = MessageLoop(caller, msg, glesv2debugger::Message_Function_glUniform1fv);
-}
-
-void Debug_glUniform1i(GLint location, GLint x)
-{
- glesv2debugger::Message msg;
- struct : public FunctionCall {
- GLint location;
- GLint x;
-
- const int * operator()(gl_hooks_t::gl_t const * const _c, glesv2debugger::Message & msg) {
- _c->glUniform1i(location, x);
- return 0;
- }
- } caller;
- caller.location = location;
- caller.x = x;
-
- msg.set_arg0(location);
- msg.set_arg1(x);
-
- int * ret = MessageLoop(caller, msg, glesv2debugger::Message_Function_glUniform1i);
-}
-
-void Debug_glUniform1iv(GLint location, GLsizei count, const GLint* v)
-{
- glesv2debugger::Message msg;
- struct : public FunctionCall {
- GLint location;
- GLsizei count;
- const GLint* v;
-
- const int * operator()(gl_hooks_t::gl_t const * const _c, glesv2debugger::Message & msg) {
- _c->glUniform1iv(location, count, v);
- return 0;
- }
- } caller;
- caller.location = location;
- caller.count = count;
- caller.v = v;
-
- msg.set_arg0(location);
- msg.set_arg1(count);
- msg.set_arg2(ToInt(v));
-
- // FIXME: check for pointer usage
- msg.mutable_data()->assign(reinterpret_cast<const char *>(v), 1*count * sizeof(GLint));
- int * ret = MessageLoop(caller, msg, glesv2debugger::Message_Function_glUniform1iv);
-}
-
-void Debug_glUniform2f(GLint location, GLfloat x, GLfloat y)
-{
- glesv2debugger::Message msg;
- struct : public FunctionCall {
- GLint location;
- GLfloat x;
- GLfloat y;
-
- const int * operator()(gl_hooks_t::gl_t const * const _c, glesv2debugger::Message & msg) {
- _c->glUniform2f(location, x, y);
- return 0;
- }
- } caller;
- caller.location = location;
- caller.x = x;
- caller.y = y;
-
- msg.set_arg0(location);
- msg.set_arg1(ToInt(x));
- msg.set_arg2(ToInt(y));
-
- int * ret = MessageLoop(caller, msg, glesv2debugger::Message_Function_glUniform2f);
-}
-
-void Debug_glUniform2fv(GLint location, GLsizei count, const GLfloat* v)
-{
- glesv2debugger::Message msg;
- struct : public FunctionCall {
- GLint location;
- GLsizei count;
- const GLfloat* v;
-
- const int * operator()(gl_hooks_t::gl_t const * const _c, glesv2debugger::Message & msg) {
- _c->glUniform2fv(location, count, v);
- return 0;
- }
- } caller;
- caller.location = location;
- caller.count = count;
- caller.v = v;
-
- msg.set_arg0(location);
- msg.set_arg1(count);
- msg.set_arg2(ToInt(v));
-
- // FIXME: check for pointer usage
- msg.mutable_data()->assign(reinterpret_cast<const char *>(v), 2*count * sizeof(GLfloat));
- int * ret = MessageLoop(caller, msg, glesv2debugger::Message_Function_glUniform2fv);
-}
-
-void Debug_glUniform2i(GLint location, GLint x, GLint y)
-{
- glesv2debugger::Message msg;
- struct : public FunctionCall {
- GLint location;
- GLint x;
- GLint y;
-
- const int * operator()(gl_hooks_t::gl_t const * const _c, glesv2debugger::Message & msg) {
- _c->glUniform2i(location, x, y);
- return 0;
- }
- } caller;
- caller.location = location;
- caller.x = x;
- caller.y = y;
-
- msg.set_arg0(location);
- msg.set_arg1(x);
- msg.set_arg2(y);
-
- int * ret = MessageLoop(caller, msg, glesv2debugger::Message_Function_glUniform2i);
-}
-
-void Debug_glUniform2iv(GLint location, GLsizei count, const GLint* v)
-{
- glesv2debugger::Message msg;
- struct : public FunctionCall {
- GLint location;
- GLsizei count;
- const GLint* v;
-
- const int * operator()(gl_hooks_t::gl_t const * const _c, glesv2debugger::Message & msg) {
- _c->glUniform2iv(location, count, v);
- return 0;
- }
- } caller;
- caller.location = location;
- caller.count = count;
- caller.v = v;
-
- msg.set_arg0(location);
- msg.set_arg1(count);
- msg.set_arg2(ToInt(v));
-
- // FIXME: check for pointer usage
- msg.mutable_data()->assign(reinterpret_cast<const char *>(v), 2*count * sizeof(GLint));
- int * ret = MessageLoop(caller, msg, glesv2debugger::Message_Function_glUniform2iv);
-}
-
-void Debug_glUniform3f(GLint location, GLfloat x, GLfloat y, GLfloat z)
-{
- glesv2debugger::Message msg;
- struct : public FunctionCall {
- GLint location;
- GLfloat x;
- GLfloat y;
- GLfloat z;
-
- const int * operator()(gl_hooks_t::gl_t const * const _c, glesv2debugger::Message & msg) {
- _c->glUniform3f(location, x, y, z);
- return 0;
- }
- } caller;
- caller.location = location;
- caller.x = x;
- caller.y = y;
- caller.z = z;
-
- msg.set_arg0(location);
- msg.set_arg1(ToInt(x));
- msg.set_arg2(ToInt(y));
- msg.set_arg3(ToInt(z));
-
- int * ret = MessageLoop(caller, msg, glesv2debugger::Message_Function_glUniform3f);
-}
-
-void Debug_glUniform3fv(GLint location, GLsizei count, const GLfloat* v)
-{
- glesv2debugger::Message msg;
- struct : public FunctionCall {
- GLint location;
- GLsizei count;
- const GLfloat* v;
-
- const int * operator()(gl_hooks_t::gl_t const * const _c, glesv2debugger::Message & msg) {
- _c->glUniform3fv(location, count, v);
- return 0;
- }
- } caller;
- caller.location = location;
- caller.count = count;
- caller.v = v;
-
- msg.set_arg0(location);
- msg.set_arg1(count);
- msg.set_arg2(ToInt(v));
-
- // FIXME: check for pointer usage
- msg.mutable_data()->assign(reinterpret_cast<const char *>(v), 3*count * sizeof(GLfloat));
- int * ret = MessageLoop(caller, msg, glesv2debugger::Message_Function_glUniform3fv);
-}
-
-void Debug_glUniform3i(GLint location, GLint x, GLint y, GLint z)
-{
- glesv2debugger::Message msg;
- struct : public FunctionCall {
- GLint location;
- GLint x;
- GLint y;
- GLint z;
-
- const int * operator()(gl_hooks_t::gl_t const * const _c, glesv2debugger::Message & msg) {
- _c->glUniform3i(location, x, y, z);
- return 0;
- }
- } caller;
- caller.location = location;
- caller.x = x;
- caller.y = y;
- caller.z = z;
-
- msg.set_arg0(location);
- msg.set_arg1(x);
- msg.set_arg2(y);
- msg.set_arg3(z);
-
- int * ret = MessageLoop(caller, msg, glesv2debugger::Message_Function_glUniform3i);
-}
-
-void Debug_glUniform3iv(GLint location, GLsizei count, const GLint* v)
-{
- glesv2debugger::Message msg;
- struct : public FunctionCall {
- GLint location;
- GLsizei count;
- const GLint* v;
-
- const int * operator()(gl_hooks_t::gl_t const * const _c, glesv2debugger::Message & msg) {
- _c->glUniform3iv(location, count, v);
- return 0;
- }
- } caller;
- caller.location = location;
- caller.count = count;
- caller.v = v;
-
- msg.set_arg0(location);
- msg.set_arg1(count);
- msg.set_arg2(ToInt(v));
-
- // FIXME: check for pointer usage
- msg.mutable_data()->assign(reinterpret_cast<const char *>(v), 3*count * sizeof(GLint));
- int * ret = MessageLoop(caller, msg, glesv2debugger::Message_Function_glUniform3iv);
-}
-
-void Debug_glUniform4f(GLint location, GLfloat x, GLfloat y, GLfloat z, GLfloat w)
-{
- glesv2debugger::Message msg;
- struct : public FunctionCall {
- GLint location;
- GLfloat x;
- GLfloat y;
- GLfloat z;
- GLfloat w;
-
- const int * operator()(gl_hooks_t::gl_t const * const _c, glesv2debugger::Message & msg) {
- _c->glUniform4f(location, x, y, z, w);
- return 0;
- }
- } caller;
- caller.location = location;
- caller.x = x;
- caller.y = y;
- caller.z = z;
- caller.w = w;
-
- msg.set_arg0(location);
- msg.set_arg1(ToInt(x));
- msg.set_arg2(ToInt(y));
- msg.set_arg3(ToInt(z));
- msg.set_arg4(ToInt(w));
-
- int * ret = MessageLoop(caller, msg, glesv2debugger::Message_Function_glUniform4f);
-}
-
-void Debug_glUniform4fv(GLint location, GLsizei count, const GLfloat* v)
-{
- glesv2debugger::Message msg;
- struct : public FunctionCall {
- GLint location;
- GLsizei count;
- const GLfloat* v;
-
- const int * operator()(gl_hooks_t::gl_t const * const _c, glesv2debugger::Message & msg) {
- _c->glUniform4fv(location, count, v);
- return 0;
- }
- } caller;
- caller.location = location;
- caller.count = count;
- caller.v = v;
-
- msg.set_arg0(location);
- msg.set_arg1(count);
- msg.set_arg2(ToInt(v));
-
- // FIXME: check for pointer usage
- msg.mutable_data()->assign(reinterpret_cast<const char *>(v), 4*count * sizeof(GLfloat));
- int * ret = MessageLoop(caller, msg, glesv2debugger::Message_Function_glUniform4fv);
-}
-
-void Debug_glUniform4i(GLint location, GLint x, GLint y, GLint z, GLint w)
-{
- glesv2debugger::Message msg;
- struct : public FunctionCall {
- GLint location;
- GLint x;
- GLint y;
- GLint z;
- GLint w;
-
- const int * operator()(gl_hooks_t::gl_t const * const _c, glesv2debugger::Message & msg) {
- _c->glUniform4i(location, x, y, z, w);
- return 0;
- }
- } caller;
- caller.location = location;
- caller.x = x;
- caller.y = y;
- caller.z = z;
- caller.w = w;
-
- msg.set_arg0(location);
- msg.set_arg1(x);
- msg.set_arg2(y);
- msg.set_arg3(z);
- msg.set_arg4(w);
-
- int * ret = MessageLoop(caller, msg, glesv2debugger::Message_Function_glUniform4i);
-}
-
-void Debug_glUniform4iv(GLint location, GLsizei count, const GLint* v)
-{
- glesv2debugger::Message msg;
- struct : public FunctionCall {
- GLint location;
- GLsizei count;
- const GLint* v;
-
- const int * operator()(gl_hooks_t::gl_t const * const _c, glesv2debugger::Message & msg) {
- _c->glUniform4iv(location, count, v);
- return 0;
- }
- } caller;
- caller.location = location;
- caller.count = count;
- caller.v = v;
-
- msg.set_arg0(location);
- msg.set_arg1(count);
- msg.set_arg2(ToInt(v));
-
- // FIXME: check for pointer usage
- msg.mutable_data()->assign(reinterpret_cast<const char *>(v), 4*count * sizeof(GLint));
- int * ret = MessageLoop(caller, msg, glesv2debugger::Message_Function_glUniform4iv);
-}
-
-void Debug_glUniformMatrix2fv(GLint location, GLsizei count, GLboolean transpose, const GLfloat* value)
-{
- glesv2debugger::Message msg;
- struct : public FunctionCall {
- GLint location;
- GLsizei count;
- GLboolean transpose;
- const GLfloat* value;
-
- const int * operator()(gl_hooks_t::gl_t const * const _c, glesv2debugger::Message & msg) {
- _c->glUniformMatrix2fv(location, count, transpose, value);
- return 0;
- }
- } caller;
- caller.location = location;
- caller.count = count;
- caller.transpose = transpose;
- caller.value = value;
-
- msg.set_arg0(location);
- msg.set_arg1(count);
- msg.set_arg2(transpose);
- msg.set_arg3(ToInt(value));
-
- // FIXME: check for pointer usage
- msg.mutable_data()->assign(reinterpret_cast<const char *>(value), 4*count * sizeof(GLfloat));
- int * ret = MessageLoop(caller, msg, glesv2debugger::Message_Function_glUniformMatrix2fv);
-}
-
-void Debug_glUniformMatrix3fv(GLint location, GLsizei count, GLboolean transpose, const GLfloat* value)
-{
- glesv2debugger::Message msg;
- struct : public FunctionCall {
- GLint location;
- GLsizei count;
- GLboolean transpose;
- const GLfloat* value;
-
- const int * operator()(gl_hooks_t::gl_t const * const _c, glesv2debugger::Message & msg) {
- _c->glUniformMatrix3fv(location, count, transpose, value);
- return 0;
- }
- } caller;
- caller.location = location;
- caller.count = count;
- caller.transpose = transpose;
- caller.value = value;
-
- msg.set_arg0(location);
- msg.set_arg1(count);
- msg.set_arg2(transpose);
- msg.set_arg3(ToInt(value));
-
- // FIXME: check for pointer usage
- msg.mutable_data()->assign(reinterpret_cast<const char *>(value), 9*count * sizeof(GLfloat));
- int * ret = MessageLoop(caller, msg, glesv2debugger::Message_Function_glUniformMatrix3fv);
-}
-
-void Debug_glUniformMatrix4fv(GLint location, GLsizei count, GLboolean transpose, const GLfloat* value)
-{
- glesv2debugger::Message msg;
- struct : public FunctionCall {
- GLint location;
- GLsizei count;
- GLboolean transpose;
- const GLfloat* value;
-
- const int * operator()(gl_hooks_t::gl_t const * const _c, glesv2debugger::Message & msg) {
- _c->glUniformMatrix4fv(location, count, transpose, value);
- return 0;
- }
- } caller;
- caller.location = location;
- caller.count = count;
- caller.transpose = transpose;
- caller.value = value;
-
- msg.set_arg0(location);
- msg.set_arg1(count);
- msg.set_arg2(transpose);
- msg.set_arg3(ToInt(value));
-
- // FIXME: check for pointer usage
- msg.mutable_data()->assign(reinterpret_cast<const char *>(value), 16*count * sizeof(GLfloat));
- int * ret = MessageLoop(caller, msg, glesv2debugger::Message_Function_glUniformMatrix4fv);
-}
-
-void Debug_glUseProgram(GLuint program)
-{
- glesv2debugger::Message msg;
- struct : public FunctionCall {
- GLuint program;
-
- const int * operator()(gl_hooks_t::gl_t const * const _c, glesv2debugger::Message & msg) {
- _c->glUseProgram(program);
- getDbgContextThreadSpecific()->glUseProgram(program);
- return 0;
- }
- } caller;
- caller.program = program;
-
- msg.set_arg0(program);
-
- int * ret = MessageLoop(caller, msg, glesv2debugger::Message_Function_glUseProgram);
-}
-
-void Debug_glValidateProgram(GLuint program)
-{
- glesv2debugger::Message msg;
- struct : public FunctionCall {
- GLuint program;
-
- const int * operator()(gl_hooks_t::gl_t const * const _c, glesv2debugger::Message & msg) {
- _c->glValidateProgram(program);
- return 0;
- }
- } caller;
- caller.program = program;
-
- msg.set_arg0(program);
-
- int * ret = MessageLoop(caller, msg, glesv2debugger::Message_Function_glValidateProgram);
-}
-
-void Debug_glVertexAttrib1f(GLuint indx, GLfloat x)
-{
- glesv2debugger::Message msg;
- struct : public FunctionCall {
- GLuint indx;
- GLfloat x;
-
- const int * operator()(gl_hooks_t::gl_t const * const _c, glesv2debugger::Message & msg) {
- _c->glVertexAttrib1f(indx, x);
- return 0;
- }
- } caller;
- caller.indx = indx;
- caller.x = x;
-
- msg.set_arg0(indx);
- msg.set_arg1(ToInt(x));
-
- int * ret = MessageLoop(caller, msg, glesv2debugger::Message_Function_glVertexAttrib1f);
-}
-
-void Debug_glVertexAttrib1fv(GLuint indx, const GLfloat* values)
-{
- glesv2debugger::Message msg;
- struct : public FunctionCall {
- GLuint indx;
- const GLfloat* values;
-
- const int * operator()(gl_hooks_t::gl_t const * const _c, glesv2debugger::Message & msg) {
- _c->glVertexAttrib1fv(indx, values);
- return 0;
- }
- } caller;
- caller.indx = indx;
- caller.values = values;
-
- msg.set_arg0(indx);
- msg.set_arg1(ToInt(values));
-
- // FIXME: check for pointer usage
- msg.mutable_data()->assign(reinterpret_cast<const char *>(values), 1 * sizeof(GLfloat));
- int * ret = MessageLoop(caller, msg, glesv2debugger::Message_Function_glVertexAttrib1fv);
-}
-
-void Debug_glVertexAttrib2f(GLuint indx, GLfloat x, GLfloat y)
-{
- glesv2debugger::Message msg;
- struct : public FunctionCall {
- GLuint indx;
- GLfloat x;
- GLfloat y;
-
- const int * operator()(gl_hooks_t::gl_t const * const _c, glesv2debugger::Message & msg) {
- _c->glVertexAttrib2f(indx, x, y);
- return 0;
- }
- } caller;
- caller.indx = indx;
- caller.x = x;
- caller.y = y;
-
- msg.set_arg0(indx);
- msg.set_arg1(ToInt(x));
- msg.set_arg2(ToInt(y));
-
- int * ret = MessageLoop(caller, msg, glesv2debugger::Message_Function_glVertexAttrib2f);
-}
-
-void Debug_glVertexAttrib2fv(GLuint indx, const GLfloat* values)
-{
- glesv2debugger::Message msg;
- struct : public FunctionCall {
- GLuint indx;
- const GLfloat* values;
-
- const int * operator()(gl_hooks_t::gl_t const * const _c, glesv2debugger::Message & msg) {
- _c->glVertexAttrib2fv(indx, values);
- return 0;
- }
- } caller;
- caller.indx = indx;
- caller.values = values;
-
- msg.set_arg0(indx);
- msg.set_arg1(ToInt(values));
-
- // FIXME: check for pointer usage
- msg.mutable_data()->assign(reinterpret_cast<const char *>(values), 2 * sizeof(GLfloat));
- int * ret = MessageLoop(caller, msg, glesv2debugger::Message_Function_glVertexAttrib2fv);
-}
-
-void Debug_glVertexAttrib3f(GLuint indx, GLfloat x, GLfloat y, GLfloat z)
-{
- glesv2debugger::Message msg;
- struct : public FunctionCall {
- GLuint indx;
- GLfloat x;
- GLfloat y;
- GLfloat z;
-
- const int * operator()(gl_hooks_t::gl_t const * const _c, glesv2debugger::Message & msg) {
- _c->glVertexAttrib3f(indx, x, y, z);
- return 0;
- }
- } caller;
- caller.indx = indx;
- caller.x = x;
- caller.y = y;
- caller.z = z;
-
- msg.set_arg0(indx);
- msg.set_arg1(ToInt(x));
- msg.set_arg2(ToInt(y));
- msg.set_arg3(ToInt(z));
-
- int * ret = MessageLoop(caller, msg, glesv2debugger::Message_Function_glVertexAttrib3f);
-}
-
-void Debug_glVertexAttrib3fv(GLuint indx, const GLfloat* values)
-{
- glesv2debugger::Message msg;
- struct : public FunctionCall {
- GLuint indx;
- const GLfloat* values;
-
- const int * operator()(gl_hooks_t::gl_t const * const _c, glesv2debugger::Message & msg) {
- _c->glVertexAttrib3fv(indx, values);
- return 0;
- }
- } caller;
- caller.indx = indx;
- caller.values = values;
-
- msg.set_arg0(indx);
- msg.set_arg1(ToInt(values));
-
- // FIXME: check for pointer usage
- msg.mutable_data()->assign(reinterpret_cast<const char *>(values), 3 * sizeof(GLfloat));
- int * ret = MessageLoop(caller, msg, glesv2debugger::Message_Function_glVertexAttrib3fv);
-}
-
-void Debug_glVertexAttrib4f(GLuint indx, GLfloat x, GLfloat y, GLfloat z, GLfloat w)
-{
- glesv2debugger::Message msg;
- struct : public FunctionCall {
- GLuint indx;
- GLfloat x;
- GLfloat y;
- GLfloat z;
- GLfloat w;
-
- const int * operator()(gl_hooks_t::gl_t const * const _c, glesv2debugger::Message & msg) {
- _c->glVertexAttrib4f(indx, x, y, z, w);
- return 0;
- }
- } caller;
- caller.indx = indx;
- caller.x = x;
- caller.y = y;
- caller.z = z;
- caller.w = w;
-
- msg.set_arg0(indx);
- msg.set_arg1(ToInt(x));
- msg.set_arg2(ToInt(y));
- msg.set_arg3(ToInt(z));
- msg.set_arg4(ToInt(w));
-
- int * ret = MessageLoop(caller, msg, glesv2debugger::Message_Function_glVertexAttrib4f);
-}
-
-void Debug_glVertexAttrib4fv(GLuint indx, const GLfloat* values)
-{
- glesv2debugger::Message msg;
- struct : public FunctionCall {
- GLuint indx;
- const GLfloat* values;
-
- const int * operator()(gl_hooks_t::gl_t const * const _c, glesv2debugger::Message & msg) {
- _c->glVertexAttrib4fv(indx, values);
- return 0;
- }
- } caller;
- caller.indx = indx;
- caller.values = values;
-
- msg.set_arg0(indx);
- msg.set_arg1(ToInt(values));
-
- // FIXME: check for pointer usage
- msg.mutable_data()->assign(reinterpret_cast<const char *>(values), 4 * sizeof(GLfloat));
- int * ret = MessageLoop(caller, msg, glesv2debugger::Message_Function_glVertexAttrib4fv);
-}
-
-// FIXME: this function has pointers, it should be hand written
-void Debug_glVertexAttribPointer(GLuint indx, GLint size, GLenum type, GLboolean normalized, GLsizei stride, const GLvoid* ptr)
-{
- glesv2debugger::Message msg;
- struct : public FunctionCall {
- GLuint indx;
- GLint size;
- GLenum type;
- GLboolean normalized;
- GLsizei stride;
- const GLvoid* ptr;
-
- const int * operator()(gl_hooks_t::gl_t const * const _c, glesv2debugger::Message & msg) {
- _c->glVertexAttribPointer(indx, size, type, normalized, stride, ptr);
- getDbgContextThreadSpecific()->glVertexAttribPointer(indx, size, type, normalized, stride, ptr);
- return 0;
- }
- } caller;
- caller.indx = indx;
- caller.size = size;
- caller.type = type;
- caller.normalized = normalized;
- caller.stride = stride;
- caller.ptr = ptr;
-
- msg.set_arg0(indx);
- msg.set_arg1(size);
- msg.set_arg2(type);
- msg.set_arg3(normalized);
- msg.set_arg4(stride);
- msg.set_arg5(ToInt(ptr));
-
- // FIXME: check for pointer usage
- int * ret = MessageLoop(caller, msg, glesv2debugger::Message_Function_glVertexAttribPointer);
-}
-
-void Debug_glViewport(GLint x, GLint y, GLsizei width, GLsizei height)
-{
- glesv2debugger::Message msg;
- struct : public FunctionCall {
- GLint x;
- GLint y;
- GLsizei width;
- GLsizei height;
-
- const int * operator()(gl_hooks_t::gl_t const * const _c, glesv2debugger::Message & msg) {
- _c->glViewport(x, y, width, height);
- return 0;
- }
- } caller;
- caller.x = x;
- caller.y = y;
- caller.width = width;
- caller.height = height;
-
- msg.set_arg0(x);
- msg.set_arg1(y);
- msg.set_arg2(width);
- msg.set_arg3(height);
-
- int * ret = MessageLoop(caller, msg, glesv2debugger::Message_Function_glViewport);
-}
-
-// FIXME: the following functions should be written by hand
-void Debug_glCompressedTexImage2D(GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLsizei imageSize, const GLvoid* data);
-void Debug_glCompressedTexSubImage2D(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, const GLvoid* data);
-void Debug_glGetActiveAttrib(GLuint program, GLuint index, GLsizei bufsize, GLsizei* length, GLint* size, GLenum* type, GLchar* name);
-void Debug_glGetActiveUniform(GLuint program, GLuint index, GLsizei bufsize, GLsizei* length, GLint* size, GLenum* type, GLchar* name);
-void Debug_glGetAttachedShaders(GLuint program, GLsizei maxcount, GLsizei* count, GLuint* shaders);
-void Debug_glGetBooleanv(GLenum pname, GLboolean* params);
-void Debug_glGetBufferParameteriv(GLenum target, GLenum pname, GLint* params);
-void Debug_glGetFloatv(GLenum pname, GLfloat* params);
-void Debug_glGetFramebufferAttachmentParameteriv(GLenum target, GLenum attachment, GLenum pname, GLint* params);
-void Debug_glGetIntegerv(GLenum pname, GLint* params);
-void Debug_glGetProgramInfoLog(GLuint program, GLsizei bufsize, GLsizei* length, GLchar* infolog);
-void Debug_glGetRenderbufferParameteriv(GLenum target, GLenum pname, GLint* params);
-void Debug_glGetShaderInfoLog(GLuint shader, GLsizei bufsize, GLsizei* length, GLchar* infolog);
-void Debug_glGetShaderPrecisionFormat(GLenum shadertype, GLenum precisiontype, GLint* range, GLint* precision);
-void Debug_glGetShaderSource(GLuint shader, GLsizei bufsize, GLsizei* length, GLchar* source);
-const GLubyte* Debug_glGetString(GLenum name);
-void Debug_glGetTexParameterfv(GLenum target, GLenum pname, GLfloat* params);
-void Debug_glGetTexParameteriv(GLenum target, GLenum pname, GLint* params);
-void Debug_glGetUniformfv(GLuint program, GLint location, GLfloat* params);
-void Debug_glGetUniformiv(GLuint program, GLint location, GLint* params);
-void Debug_glGetVertexAttribfv(GLuint index, GLenum pname, GLfloat* params);
-void Debug_glGetVertexAttribiv(GLuint index, GLenum pname, GLint* params);
-void Debug_glGetVertexAttribPointerv(GLuint index, GLenum pname, GLvoid** pointer);
-void Debug_glShaderBinary(GLsizei n, const GLuint* shaders, GLenum binaryformat, const GLvoid* binary, GLsizei length);
-void Debug_glTexParameterfv(GLenum target, GLenum pname, const GLfloat* params);
-void Debug_glTexParameteriv(GLenum target, GLenum pname, const GLint* params);
-void Debug_glVertexAttribPointer(GLuint indx, GLint size, GLenum type, GLboolean normalized, GLsizei stride, const GLvoid* ptr);
diff --git a/opengl/libs/GLES2_dbg/src/api.h b/opengl/libs/GLES2_dbg/src/api.h
deleted file mode 100644
index 0b227bc..0000000
--- a/opengl/libs/GLES2_dbg/src/api.h
+++ /dev/null
@@ -1,58 +0,0 @@
-/*
- ** Copyright 2011, The Android Open Source Project
- **
- ** Licensed under the Apache License, Version 2.0 (the "License");
- ** you may not use this file except in compliance with the License.
- ** You may obtain a copy of the License at
- **
- ** http://www.apache.org/licenses/LICENSE-2.0
- **
- ** Unless required by applicable law or agreed to in writing, software
- ** distributed under the License is distributed on an "AS IS" BASIS,
- ** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- ** See the License for the specific language governing permissions and
- ** limitations under the License.
- */
-
-#define EXTEND_Debug_glCopyTexImage2D \
- DbgContext * const dbg = getDbgContextThreadSpecific(); \
- void * readData = dbg->GetReadPixelsBuffer(4 * width * height); \
- /* pick easy format for client to convert */ \
- dbg->hooks->gl.glReadPixels(x, y, width, height, GL_RGBA, GL_UNSIGNED_BYTE, readData); \
- dbg->CompressReadPixelBuffer(msg.mutable_data()); \
- msg.set_data_type(msg.ReferencedImage); \
- msg.set_pixel_format(GL_RGBA); \
- msg.set_pixel_type(GL_UNSIGNED_BYTE);
-
-#define EXTEND_Debug_glCopyTexSubImage2D EXTEND_Debug_glCopyTexImage2D
-
-#define EXTEND_AFTER_CALL_Debug_glReadPixels \
- { \
- DbgContext * const dbg = getDbgContextThreadSpecific(); \
- if (dbg->IsReadPixelBuffer(pixels)) { \
- dbg->CompressReadPixelBuffer(msg.mutable_data()); \
- msg.set_data_type(msg.ReferencedImage); \
- } else { \
- const unsigned int size = width * height * GetBytesPerPixel(format, type); \
- dbg->Compress(pixels, size, msg.mutable_data()); \
- msg.set_data_type(msg.NonreferencedImage); \
- } \
- }
-
-#define EXTEND_Debug_glShaderSource \
- std::string * const data = msg.mutable_data(); \
- for (unsigned i = 0; i < count; i++) \
- if (!length || length[i] < 0) \
- data->append(string[i]); \
- else \
- data->append(string[i], length[i]);
-
-#define EXTEND_Debug_glTexImage2D \
- if (pixels) { \
- DbgContext * const dbg = getDbgContextThreadSpecific(); \
- const unsigned size = GetBytesPerPixel(format, type) * width * height; \
- assert(0 < size); \
- dbg->Compress(pixels, size, msg.mutable_data()); \
- }
-
-#define EXTEND_Debug_glTexSubImage2D EXTEND_Debug_glTexImage2D
diff --git a/opengl/libs/GLES2_dbg/src/caller.cpp b/opengl/libs/GLES2_dbg/src/caller.cpp
deleted file mode 100644
index 70d23d6..0000000
--- a/opengl/libs/GLES2_dbg/src/caller.cpp
+++ /dev/null
@@ -1,778 +0,0 @@
-/*
- ** Copyright 2011, The Android Open Source Project
- **
- ** Licensed under the Apache License, Version 2.0 (the "License");
- ** you may not use this file except in compliance with the License.
- ** You may obtain a copy of the License at
- **
- ** http://www.apache.org/licenses/LICENSE-2.0
- **
- ** Unless required by applicable law or agreed to in writing, software
- ** distributed under the License is distributed on an "AS IS" BASIS,
- ** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- ** See the License for the specific language governing permissions and
- ** limitations under the License.
- */
-
-// auto generated by generate_caller_cpp.py
-// implement declarations in caller.h
-
-#include "header.h"
-
-namespace android {
-
-static const int * GenerateCall_glCompressedTexImage2D(DbgContext * const dbg,
- const glesv2debugger::Message & cmd, glesv2debugger::Message & msg, const int * const prevRet);
-static const int * GenerateCall_glCompressedTexSubImage2D(DbgContext * const dbg,
- const glesv2debugger::Message & cmd, glesv2debugger::Message & msg, const int * const prevRet);
-static const int * GenerateCall_glDrawElements(DbgContext * const dbg,
- const glesv2debugger::Message & cmd, glesv2debugger::Message & msg, const int * const prevRet);
-static const int * GenerateCall_glGenBuffers(DbgContext * const dbg,
- const glesv2debugger::Message & cmd, glesv2debugger::Message & msg, const int * const prevRet);
-static const int * GenerateCall_glGenFramebuffers(DbgContext * const dbg,
- const glesv2debugger::Message & cmd, glesv2debugger::Message & msg, const int * const prevRet);
-static const int * GenerateCall_glGenRenderbuffers(DbgContext * const dbg,
- const glesv2debugger::Message & cmd, glesv2debugger::Message & msg, const int * const prevRet);
-static const int * GenerateCall_glGenTextures(DbgContext * const dbg,
- const glesv2debugger::Message & cmd, glesv2debugger::Message & msg, const int * const prevRet);
-static const int * GenerateCall_glGetActiveAttrib(DbgContext * const dbg,
- const glesv2debugger::Message & cmd, glesv2debugger::Message & msg, const int * const prevRet);
-static const int * GenerateCall_glGetActiveUniform(DbgContext * const dbg,
- const glesv2debugger::Message & cmd, glesv2debugger::Message & msg, const int * const prevRet);
-static const int * GenerateCall_glGetAttachedShaders(DbgContext * const dbg,
- const glesv2debugger::Message & cmd, glesv2debugger::Message & msg, const int * const prevRet);
-static const int * GenerateCall_glGetBooleanv(DbgContext * const dbg,
- const glesv2debugger::Message & cmd, glesv2debugger::Message & msg, const int * const prevRet);
-static const int * GenerateCall_glGetBufferParameteriv(DbgContext * const dbg,
- const glesv2debugger::Message & cmd, glesv2debugger::Message & msg, const int * const prevRet);
-static const int * GenerateCall_glGetFloatv(DbgContext * const dbg,
- const glesv2debugger::Message & cmd, glesv2debugger::Message & msg, const int * const prevRet);
-static const int * GenerateCall_glGetFramebufferAttachmentParameteriv(DbgContext * const dbg,
- const glesv2debugger::Message & cmd, glesv2debugger::Message & msg, const int * const prevRet);
-static const int * GenerateCall_glGetIntegerv(DbgContext * const dbg,
- const glesv2debugger::Message & cmd, glesv2debugger::Message & msg, const int * const prevRet);
-static const int * GenerateCall_glGetProgramiv(DbgContext * const dbg,
- const glesv2debugger::Message & cmd, glesv2debugger::Message & msg, const int * const prevRet);
-static const int * GenerateCall_glGetProgramInfoLog(DbgContext * const dbg,
- const glesv2debugger::Message & cmd, glesv2debugger::Message & msg, const int * const prevRet);
-static const int * GenerateCall_glGetRenderbufferParameteriv(DbgContext * const dbg,
- const glesv2debugger::Message & cmd, glesv2debugger::Message & msg, const int * const prevRet);
-static const int * GenerateCall_glGetShaderiv(DbgContext * const dbg,
- const glesv2debugger::Message & cmd, glesv2debugger::Message & msg, const int * const prevRet);
-static const int * GenerateCall_glGetShaderInfoLog(DbgContext * const dbg,
- const glesv2debugger::Message & cmd, glesv2debugger::Message & msg, const int * const prevRet);
-static const int * GenerateCall_glGetShaderPrecisionFormat(DbgContext * const dbg,
- const glesv2debugger::Message & cmd, glesv2debugger::Message & msg, const int * const prevRet);
-static const int * GenerateCall_glGetShaderSource(DbgContext * const dbg,
- const glesv2debugger::Message & cmd, glesv2debugger::Message & msg, const int * const prevRet);
-static const int * GenerateCall_glGetString(DbgContext * const dbg,
- const glesv2debugger::Message & cmd, glesv2debugger::Message & msg, const int * const prevRet);
-static const int * GenerateCall_glGetTexParameterfv(DbgContext * const dbg,
- const glesv2debugger::Message & cmd, glesv2debugger::Message & msg, const int * const prevRet);
-static const int * GenerateCall_glGetTexParameteriv(DbgContext * const dbg,
- const glesv2debugger::Message & cmd, glesv2debugger::Message & msg, const int * const prevRet);
-static const int * GenerateCall_glGetUniformfv(DbgContext * const dbg,
- const glesv2debugger::Message & cmd, glesv2debugger::Message & msg, const int * const prevRet);
-static const int * GenerateCall_glGetUniformiv(DbgContext * const dbg,
- const glesv2debugger::Message & cmd, glesv2debugger::Message & msg, const int * const prevRet);
-static const int * GenerateCall_glGetVertexAttribfv(DbgContext * const dbg,
- const glesv2debugger::Message & cmd, glesv2debugger::Message & msg, const int * const prevRet);
-static const int * GenerateCall_glGetVertexAttribiv(DbgContext * const dbg,
- const glesv2debugger::Message & cmd, glesv2debugger::Message & msg, const int * const prevRet);
-static const int * GenerateCall_glGetVertexAttribPointerv(DbgContext * const dbg,
- const glesv2debugger::Message & cmd, glesv2debugger::Message & msg, const int * const prevRet);
-static const int * GenerateCall_glReadPixels(DbgContext * const dbg,
- const glesv2debugger::Message & cmd, glesv2debugger::Message & msg, const int * const prevRet);
-static const int * GenerateCall_glShaderBinary(DbgContext * const dbg,
- const glesv2debugger::Message & cmd, glesv2debugger::Message & msg, const int * const prevRet);
-static const int * GenerateCall_glShaderSource(DbgContext * const dbg,
- const glesv2debugger::Message & cmd, glesv2debugger::Message & msg, const int * const prevRet);
-static const int * GenerateCall_glTexImage2D(DbgContext * const dbg,
- const glesv2debugger::Message & cmd, glesv2debugger::Message & msg, const int * const prevRet);
-static const int * GenerateCall_glTexParameterfv(DbgContext * const dbg,
- const glesv2debugger::Message & cmd, glesv2debugger::Message & msg, const int * const prevRet);
-static const int * GenerateCall_glTexParameteriv(DbgContext * const dbg,
- const glesv2debugger::Message & cmd, glesv2debugger::Message & msg, const int * const prevRet);
-static const int * GenerateCall_glTexSubImage2D(DbgContext * const dbg,
- const glesv2debugger::Message & cmd, glesv2debugger::Message & msg, const int * const prevRet);
-static const int * GenerateCall_glVertexAttribPointer(DbgContext * const dbg,
- const glesv2debugger::Message & cmd, glesv2debugger::Message & msg, const int * const prevRet);
-
-#include "caller.h"
-
-const int * GenerateCall(DbgContext * const dbg, const glesv2debugger::Message & cmd,
- glesv2debugger::Message & msg, const int * const prevRet)
-{
- ALOGD("GenerateCall function=%u", cmd.function());
- const int * ret = prevRet; // only some functions have return value
- nsecs_t c0 = systemTime(timeMode);
- switch (cmd.function()) { case glesv2debugger::Message_Function_glActiveTexture:
- dbg->hooks->gl.glActiveTexture(
- static_cast<GLenum>(cmd.arg0()));
- break;
- case glesv2debugger::Message_Function_glAttachShader:
- dbg->hooks->gl.glAttachShader(
- static_cast<GLuint>(cmd.arg0()), static_cast<GLuint>(cmd.arg1())
- );
- break;
- case glesv2debugger::Message_Function_glBindAttribLocation:
- dbg->hooks->gl.glBindAttribLocation(
- static_cast<GLuint>(cmd.arg0()), static_cast<GLuint>(cmd.arg1()),
- reinterpret_cast<GLchar*>(const_cast<char *>(cmd.data().data()))
- );
- break;
- case glesv2debugger::Message_Function_glBindBuffer:
- dbg->hooks->gl.glBindBuffer(
- static_cast<GLenum>(cmd.arg0()), static_cast<GLuint>(cmd.arg1())
- );
- break;
- case glesv2debugger::Message_Function_glBindFramebuffer:
- dbg->hooks->gl.glBindFramebuffer(
- static_cast<GLenum>(cmd.arg0()), static_cast<GLuint>(cmd.arg1())
- );
- break;
- case glesv2debugger::Message_Function_glBindRenderbuffer:
- dbg->hooks->gl.glBindRenderbuffer(
- static_cast<GLenum>(cmd.arg0()), static_cast<GLuint>(cmd.arg1())
- );
- break;
- case glesv2debugger::Message_Function_glBindTexture:
- dbg->hooks->gl.glBindTexture(
- static_cast<GLenum>(cmd.arg0()), static_cast<GLuint>(cmd.arg1())
- );
- break;
- case glesv2debugger::Message_Function_glBlendColor:
- dbg->hooks->gl.glBlendColor(
- static_cast<GLclampf>(cmd.arg0()), static_cast<GLclampf>(cmd.arg1()),
- static_cast<GLclampf>(cmd.arg2()), static_cast<GLclampf>(cmd.arg3())
- );
- break;
- case glesv2debugger::Message_Function_glBlendEquation:
- dbg->hooks->gl.glBlendEquation(
- static_cast<GLenum>(cmd.arg0()));
- break;
- case glesv2debugger::Message_Function_glBlendEquationSeparate:
- dbg->hooks->gl.glBlendEquationSeparate(
- static_cast<GLenum>(cmd.arg0()), static_cast<GLenum>(cmd.arg1())
- );
- break;
- case glesv2debugger::Message_Function_glBlendFunc:
- dbg->hooks->gl.glBlendFunc(
- static_cast<GLenum>(cmd.arg0()), static_cast<GLenum>(cmd.arg1())
- );
- break;
- case glesv2debugger::Message_Function_glBlendFuncSeparate:
- dbg->hooks->gl.glBlendFuncSeparate(
- static_cast<GLenum>(cmd.arg0()), static_cast<GLenum>(cmd.arg1()),
- static_cast<GLenum>(cmd.arg2()), static_cast<GLenum>(cmd.arg3())
- );
- break;
- case glesv2debugger::Message_Function_glBufferData:
- dbg->hooks->gl.glBufferData(
- static_cast<GLenum>(cmd.arg0()), static_cast<GLsizeiptr>(cmd.arg1()),
- reinterpret_cast<GLvoid*>(const_cast<char *>(cmd.data().data())),
- static_cast<GLenum>(cmd.arg3()));
- break;
- case glesv2debugger::Message_Function_glBufferSubData:
- dbg->hooks->gl.glBufferSubData(
- static_cast<GLenum>(cmd.arg0()), static_cast<GLintptr>(cmd.arg1()),
- static_cast<GLsizeiptr>(cmd.arg2()), reinterpret_cast<GLvoid*>(const_cast<char *>(cmd.data().data()))
- );
- break;
- case glesv2debugger::Message_Function_glCheckFramebufferStatus:
- msg.set_ret(static_cast<int>(dbg->hooks->gl.glCheckFramebufferStatus(
- static_cast<GLenum>(cmd.arg0()))));
- if (cmd.has_ret())
- ret = reinterpret_cast<int *>(msg.ret());
- break;
- case glesv2debugger::Message_Function_glClear:
- dbg->hooks->gl.glClear(
- static_cast<GLbitfield>(cmd.arg0()));
- break;
- case glesv2debugger::Message_Function_glClearColor:
- dbg->hooks->gl.glClearColor(
- static_cast<GLclampf>(cmd.arg0()), static_cast<GLclampf>(cmd.arg1()),
- static_cast<GLclampf>(cmd.arg2()), static_cast<GLclampf>(cmd.arg3())
- );
- break;
- case glesv2debugger::Message_Function_glClearDepthf:
- dbg->hooks->gl.glClearDepthf(
- static_cast<GLclampf>(cmd.arg0()));
- break;
- case glesv2debugger::Message_Function_glClearStencil:
- dbg->hooks->gl.glClearStencil(
- static_cast<GLint>(cmd.arg0()));
- break;
- case glesv2debugger::Message_Function_glColorMask:
- dbg->hooks->gl.glColorMask(
- GLboolean(cmd.arg0()), GLboolean(cmd.arg1()), GLboolean(cmd.arg2()),
- GLboolean(cmd.arg3()));
- break;
- case glesv2debugger::Message_Function_glCompileShader:
- dbg->hooks->gl.glCompileShader(
- static_cast<GLuint>(cmd.arg0()));
- break;
- case glesv2debugger::Message_Function_glCompressedTexImage2D:
- ret = GenerateCall_glCompressedTexImage2D(dbg, cmd, msg, prevRet);
- break;
- case glesv2debugger::Message_Function_glCompressedTexSubImage2D:
- ret = GenerateCall_glCompressedTexSubImage2D(dbg, cmd, msg, prevRet);
- break;
- case glesv2debugger::Message_Function_glCopyTexImage2D:
- dbg->hooks->gl.glCopyTexImage2D(
- static_cast<GLenum>(cmd.arg0()), static_cast<GLint>(cmd.arg1()),
- static_cast<GLenum>(cmd.arg2()), static_cast<GLint>(cmd.arg3()),
- static_cast<GLint>(cmd.arg4()), static_cast<GLsizei>(cmd.arg5()),
- static_cast<GLsizei>(cmd.arg6()), static_cast<GLint>(cmd.arg7())
- );
- break;
- case glesv2debugger::Message_Function_glCopyTexSubImage2D:
- dbg->hooks->gl.glCopyTexSubImage2D(
- static_cast<GLenum>(cmd.arg0()), static_cast<GLint>(cmd.arg1()),
- static_cast<GLint>(cmd.arg2()), static_cast<GLint>(cmd.arg3()),
- static_cast<GLint>(cmd.arg4()), static_cast<GLint>(cmd.arg5()),
- static_cast<GLsizei>(cmd.arg6()), static_cast<GLsizei>(cmd.arg7())
- );
- break;
- case glesv2debugger::Message_Function_glCreateProgram:
- msg.set_ret(static_cast<int>(dbg->hooks->gl.glCreateProgram(
- )));
- if (cmd.has_ret())
- ret = reinterpret_cast<int *>(msg.ret());
- break;
- case glesv2debugger::Message_Function_glCreateShader:
- msg.set_ret(static_cast<int>(dbg->hooks->gl.glCreateShader(
- static_cast<GLenum>(cmd.arg0()))));
- if (cmd.has_ret())
- ret = reinterpret_cast<int *>(msg.ret());
- break;
- case glesv2debugger::Message_Function_glCullFace:
- dbg->hooks->gl.glCullFace(
- static_cast<GLenum>(cmd.arg0()));
- break;
- case glesv2debugger::Message_Function_glDeleteBuffers:
- dbg->hooks->gl.glDeleteBuffers(
- static_cast<GLsizei>(cmd.arg0()), reinterpret_cast<GLuint*>(const_cast<char *>(cmd.data().data()))
- );
- break;
- case glesv2debugger::Message_Function_glDeleteFramebuffers:
- dbg->hooks->gl.glDeleteFramebuffers(
- static_cast<GLsizei>(cmd.arg0()), reinterpret_cast<GLuint*>(const_cast<char *>(cmd.data().data()))
- );
- break;
- case glesv2debugger::Message_Function_glDeleteProgram:
- dbg->hooks->gl.glDeleteProgram(
- static_cast<GLuint>(cmd.arg0()));
- break;
- case glesv2debugger::Message_Function_glDeleteRenderbuffers:
- dbg->hooks->gl.glDeleteRenderbuffers(
- static_cast<GLsizei>(cmd.arg0()), reinterpret_cast<GLuint*>(const_cast<char *>(cmd.data().data()))
- );
- break;
- case glesv2debugger::Message_Function_glDeleteShader:
- dbg->hooks->gl.glDeleteShader(
- static_cast<GLuint>(cmd.arg0()));
- break;
- case glesv2debugger::Message_Function_glDeleteTextures:
- dbg->hooks->gl.glDeleteTextures(
- static_cast<GLsizei>(cmd.arg0()), reinterpret_cast<GLuint*>(const_cast<char *>(cmd.data().data()))
- );
- break;
- case glesv2debugger::Message_Function_glDepthFunc:
- dbg->hooks->gl.glDepthFunc(
- static_cast<GLenum>(cmd.arg0()));
- break;
- case glesv2debugger::Message_Function_glDepthMask:
- dbg->hooks->gl.glDepthMask(
- GLboolean(cmd.arg0()));
- break;
- case glesv2debugger::Message_Function_glDepthRangef:
- dbg->hooks->gl.glDepthRangef(
- static_cast<GLclampf>(cmd.arg0()), static_cast<GLclampf>(cmd.arg1())
- );
- break;
- case glesv2debugger::Message_Function_glDetachShader:
- dbg->hooks->gl.glDetachShader(
- static_cast<GLuint>(cmd.arg0()), static_cast<GLuint>(cmd.arg1())
- );
- break;
- case glesv2debugger::Message_Function_glDisable:
- dbg->hooks->gl.glDisable(
- static_cast<GLenum>(cmd.arg0()));
- break;
- case glesv2debugger::Message_Function_glDisableVertexAttribArray:
- dbg->hooks->gl.glDisableVertexAttribArray(
- static_cast<GLuint>(cmd.arg0()));
- break;
- case glesv2debugger::Message_Function_glDrawArrays:
- dbg->hooks->gl.glDrawArrays(
- static_cast<GLenum>(cmd.arg0()), static_cast<GLint>(cmd.arg1()),
- static_cast<GLsizei>(cmd.arg2()));
- break;
- case glesv2debugger::Message_Function_glDrawElements:
- ret = GenerateCall_glDrawElements(dbg, cmd, msg, prevRet);
- break;
- case glesv2debugger::Message_Function_glEnable:
- dbg->hooks->gl.glEnable(
- static_cast<GLenum>(cmd.arg0()));
- break;
- case glesv2debugger::Message_Function_glEnableVertexAttribArray:
- dbg->hooks->gl.glEnableVertexAttribArray(
- static_cast<GLuint>(cmd.arg0()));
- break;
- case glesv2debugger::Message_Function_glFinish:
- dbg->hooks->gl.glFinish(
- );
- break;
- case glesv2debugger::Message_Function_glFlush:
- dbg->hooks->gl.glFlush(
- );
- break;
- case glesv2debugger::Message_Function_glFramebufferRenderbuffer:
- dbg->hooks->gl.glFramebufferRenderbuffer(
- static_cast<GLenum>(cmd.arg0()), static_cast<GLenum>(cmd.arg1()),
- static_cast<GLenum>(cmd.arg2()), static_cast<GLuint>(cmd.arg3())
- );
- break;
- case glesv2debugger::Message_Function_glFramebufferTexture2D:
- dbg->hooks->gl.glFramebufferTexture2D(
- static_cast<GLenum>(cmd.arg0()), static_cast<GLenum>(cmd.arg1()),
- static_cast<GLenum>(cmd.arg2()), static_cast<GLuint>(cmd.arg3()),
- static_cast<GLint>(cmd.arg4()));
- break;
- case glesv2debugger::Message_Function_glFrontFace:
- dbg->hooks->gl.glFrontFace(
- static_cast<GLenum>(cmd.arg0()));
- break;
- case glesv2debugger::Message_Function_glGenBuffers:
- ret = GenerateCall_glGenBuffers(dbg, cmd, msg, prevRet);
- break; // annotated output pointers
- case glesv2debugger::Message_Function_glGenerateMipmap:
- dbg->hooks->gl.glGenerateMipmap(
- static_cast<GLenum>(cmd.arg0()));
- break;
- case glesv2debugger::Message_Function_glGenFramebuffers:
- ret = GenerateCall_glGenFramebuffers(dbg, cmd, msg, prevRet);
- break; // annotated output pointers
- case glesv2debugger::Message_Function_glGenRenderbuffers:
- ret = GenerateCall_glGenRenderbuffers(dbg, cmd, msg, prevRet);
- break; // annotated output pointers
- case glesv2debugger::Message_Function_glGenTextures:
- ret = GenerateCall_glGenTextures(dbg, cmd, msg, prevRet);
- break; // annotated output pointers
- case glesv2debugger::Message_Function_glGetActiveAttrib:
- ret = GenerateCall_glGetActiveAttrib(dbg, cmd, msg, prevRet);
- break;
- case glesv2debugger::Message_Function_glGetActiveUniform:
- ret = GenerateCall_glGetActiveUniform(dbg, cmd, msg, prevRet);
- break;
- case glesv2debugger::Message_Function_glGetAttachedShaders:
- ret = GenerateCall_glGetAttachedShaders(dbg, cmd, msg, prevRet);
- break;
- case glesv2debugger::Message_Function_glGetAttribLocation:
- msg.set_ret(static_cast<int>(dbg->hooks->gl.glGetAttribLocation(
- static_cast<GLuint>(cmd.arg0()), reinterpret_cast<GLchar*>(const_cast<char *>(cmd.data().data()))
- )));
- if (cmd.has_ret())
- ret = reinterpret_cast<int *>(msg.ret());
- break;
- case glesv2debugger::Message_Function_glGetBooleanv:
- ret = GenerateCall_glGetBooleanv(dbg, cmd, msg, prevRet);
- break;
- case glesv2debugger::Message_Function_glGetBufferParameteriv:
- ret = GenerateCall_glGetBufferParameteriv(dbg, cmd, msg, prevRet);
- break;
- case glesv2debugger::Message_Function_glGetError:
- msg.set_ret(static_cast<int>(dbg->hooks->gl.glGetError(
- )));
- if (cmd.has_ret())
- ret = reinterpret_cast<int *>(msg.ret());
- break;
- case glesv2debugger::Message_Function_glGetFloatv:
- ret = GenerateCall_glGetFloatv(dbg, cmd, msg, prevRet);
- break;
- case glesv2debugger::Message_Function_glGetFramebufferAttachmentParameteriv:
- ret = GenerateCall_glGetFramebufferAttachmentParameteriv(dbg, cmd, msg, prevRet);
- break;
- case glesv2debugger::Message_Function_glGetIntegerv:
- ret = GenerateCall_glGetIntegerv(dbg, cmd, msg, prevRet);
- break;
- case glesv2debugger::Message_Function_glGetProgramiv:
- ret = GenerateCall_glGetProgramiv(dbg, cmd, msg, prevRet);
- break; // annotated output pointers
- case glesv2debugger::Message_Function_glGetProgramInfoLog:
- ret = GenerateCall_glGetProgramInfoLog(dbg, cmd, msg, prevRet);
- break;
- case glesv2debugger::Message_Function_glGetRenderbufferParameteriv:
- ret = GenerateCall_glGetRenderbufferParameteriv(dbg, cmd, msg, prevRet);
- break;
- case glesv2debugger::Message_Function_glGetShaderiv:
- ret = GenerateCall_glGetShaderiv(dbg, cmd, msg, prevRet);
- break; // annotated output pointers
- case glesv2debugger::Message_Function_glGetShaderInfoLog:
- ret = GenerateCall_glGetShaderInfoLog(dbg, cmd, msg, prevRet);
- break;
- case glesv2debugger::Message_Function_glGetShaderPrecisionFormat:
- ret = GenerateCall_glGetShaderPrecisionFormat(dbg, cmd, msg, prevRet);
- break;
- case glesv2debugger::Message_Function_glGetShaderSource:
- ret = GenerateCall_glGetShaderSource(dbg, cmd, msg, prevRet);
- break;
- case glesv2debugger::Message_Function_glGetString:
- ret = GenerateCall_glGetString(dbg, cmd, msg, prevRet);
- break;
- case glesv2debugger::Message_Function_glGetTexParameterfv:
- ret = GenerateCall_glGetTexParameterfv(dbg, cmd, msg, prevRet);
- break;
- case glesv2debugger::Message_Function_glGetTexParameteriv:
- ret = GenerateCall_glGetTexParameteriv(dbg, cmd, msg, prevRet);
- break;
- case glesv2debugger::Message_Function_glGetUniformfv:
- ret = GenerateCall_glGetUniformfv(dbg, cmd, msg, prevRet);
- break;
- case glesv2debugger::Message_Function_glGetUniformiv:
- ret = GenerateCall_glGetUniformiv(dbg, cmd, msg, prevRet);
- break;
- case glesv2debugger::Message_Function_glGetUniformLocation:
- msg.set_ret(static_cast<int>(dbg->hooks->gl.glGetUniformLocation(
- static_cast<GLuint>(cmd.arg0()), reinterpret_cast<GLchar*>(const_cast<char *>(cmd.data().data()))
- )));
- if (cmd.has_ret())
- ret = reinterpret_cast<int *>(msg.ret());
- break;
- case glesv2debugger::Message_Function_glGetVertexAttribfv:
- ret = GenerateCall_glGetVertexAttribfv(dbg, cmd, msg, prevRet);
- break;
- case glesv2debugger::Message_Function_glGetVertexAttribiv:
- ret = GenerateCall_glGetVertexAttribiv(dbg, cmd, msg, prevRet);
- break;
- case glesv2debugger::Message_Function_glGetVertexAttribPointerv:
- ret = GenerateCall_glGetVertexAttribPointerv(dbg, cmd, msg, prevRet);
- break;
- case glesv2debugger::Message_Function_glHint:
- dbg->hooks->gl.glHint(
- static_cast<GLenum>(cmd.arg0()), static_cast<GLenum>(cmd.arg1())
- );
- break;
- case glesv2debugger::Message_Function_glIsBuffer:
- msg.set_ret(static_cast<int>(dbg->hooks->gl.glIsBuffer(
- static_cast<GLuint>(cmd.arg0()))));
- if (cmd.has_ret())
- ret = reinterpret_cast<int *>(msg.ret());
- break;
- case glesv2debugger::Message_Function_glIsEnabled:
- msg.set_ret(static_cast<int>(dbg->hooks->gl.glIsEnabled(
- static_cast<GLenum>(cmd.arg0()))));
- if (cmd.has_ret())
- ret = reinterpret_cast<int *>(msg.ret());
- break;
- case glesv2debugger::Message_Function_glIsFramebuffer:
- msg.set_ret(static_cast<int>(dbg->hooks->gl.glIsFramebuffer(
- static_cast<GLuint>(cmd.arg0()))));
- if (cmd.has_ret())
- ret = reinterpret_cast<int *>(msg.ret());
- break;
- case glesv2debugger::Message_Function_glIsProgram:
- msg.set_ret(static_cast<int>(dbg->hooks->gl.glIsProgram(
- static_cast<GLuint>(cmd.arg0()))));
- if (cmd.has_ret())
- ret = reinterpret_cast<int *>(msg.ret());
- break;
- case glesv2debugger::Message_Function_glIsRenderbuffer:
- msg.set_ret(static_cast<int>(dbg->hooks->gl.glIsRenderbuffer(
- static_cast<GLuint>(cmd.arg0()))));
- if (cmd.has_ret())
- ret = reinterpret_cast<int *>(msg.ret());
- break;
- case glesv2debugger::Message_Function_glIsShader:
- msg.set_ret(static_cast<int>(dbg->hooks->gl.glIsShader(
- static_cast<GLuint>(cmd.arg0()))));
- if (cmd.has_ret())
- ret = reinterpret_cast<int *>(msg.ret());
- break;
- case glesv2debugger::Message_Function_glIsTexture:
- msg.set_ret(static_cast<int>(dbg->hooks->gl.glIsTexture(
- static_cast<GLuint>(cmd.arg0()))));
- if (cmd.has_ret())
- ret = reinterpret_cast<int *>(msg.ret());
- break;
- case glesv2debugger::Message_Function_glLineWidth:
- dbg->hooks->gl.glLineWidth(
- static_cast<GLfloat>(cmd.arg0()));
- break;
- case glesv2debugger::Message_Function_glLinkProgram:
- dbg->hooks->gl.glLinkProgram(
- static_cast<GLuint>(cmd.arg0()));
- break;
- case glesv2debugger::Message_Function_glPixelStorei:
- dbg->hooks->gl.glPixelStorei(
- static_cast<GLenum>(cmd.arg0()), static_cast<GLint>(cmd.arg1())
- );
- break;
- case glesv2debugger::Message_Function_glPolygonOffset:
- dbg->hooks->gl.glPolygonOffset(
- static_cast<GLfloat>(cmd.arg0()), static_cast<GLfloat>(cmd.arg1())
- );
- break;
- case glesv2debugger::Message_Function_glReadPixels:
- ret = GenerateCall_glReadPixels(dbg, cmd, msg, prevRet);
- break;
- case glesv2debugger::Message_Function_glReleaseShaderCompiler:
- dbg->hooks->gl.glReleaseShaderCompiler(
- );
- break;
- case glesv2debugger::Message_Function_glRenderbufferStorage:
- dbg->hooks->gl.glRenderbufferStorage(
- static_cast<GLenum>(cmd.arg0()), static_cast<GLenum>(cmd.arg1()),
- static_cast<GLsizei>(cmd.arg2()), static_cast<GLsizei>(cmd.arg3())
- );
- break;
- case glesv2debugger::Message_Function_glSampleCoverage:
- dbg->hooks->gl.glSampleCoverage(
- static_cast<GLclampf>(cmd.arg0()), GLboolean(cmd.arg1()));
- break;
- case glesv2debugger::Message_Function_glScissor:
- dbg->hooks->gl.glScissor(
- static_cast<GLint>(cmd.arg0()), static_cast<GLint>(cmd.arg1()),
- static_cast<GLsizei>(cmd.arg2()), static_cast<GLsizei>(cmd.arg3())
- );
- break;
- case glesv2debugger::Message_Function_glShaderBinary:
- ret = GenerateCall_glShaderBinary(dbg, cmd, msg, prevRet);
- break;
- case glesv2debugger::Message_Function_glShaderSource:
- ret = GenerateCall_glShaderSource(dbg, cmd, msg, prevRet);
- break;
- case glesv2debugger::Message_Function_glStencilFunc:
- dbg->hooks->gl.glStencilFunc(
- static_cast<GLenum>(cmd.arg0()), static_cast<GLint>(cmd.arg1()),
- static_cast<GLuint>(cmd.arg2()));
- break;
- case glesv2debugger::Message_Function_glStencilFuncSeparate:
- dbg->hooks->gl.glStencilFuncSeparate(
- static_cast<GLenum>(cmd.arg0()), static_cast<GLenum>(cmd.arg1()),
- static_cast<GLint>(cmd.arg2()), static_cast<GLuint>(cmd.arg3())
- );
- break;
- case glesv2debugger::Message_Function_glStencilMask:
- dbg->hooks->gl.glStencilMask(
- static_cast<GLuint>(cmd.arg0()));
- break;
- case glesv2debugger::Message_Function_glStencilMaskSeparate:
- dbg->hooks->gl.glStencilMaskSeparate(
- static_cast<GLenum>(cmd.arg0()), static_cast<GLuint>(cmd.arg1())
- );
- break;
- case glesv2debugger::Message_Function_glStencilOp:
- dbg->hooks->gl.glStencilOp(
- static_cast<GLenum>(cmd.arg0()), static_cast<GLenum>(cmd.arg1()),
- static_cast<GLenum>(cmd.arg2()));
- break;
- case glesv2debugger::Message_Function_glStencilOpSeparate:
- dbg->hooks->gl.glStencilOpSeparate(
- static_cast<GLenum>(cmd.arg0()), static_cast<GLenum>(cmd.arg1()),
- static_cast<GLenum>(cmd.arg2()), static_cast<GLenum>(cmd.arg3())
- );
- break;
- case glesv2debugger::Message_Function_glTexImage2D:
- ret = GenerateCall_glTexImage2D(dbg, cmd, msg, prevRet);
- break;
- case glesv2debugger::Message_Function_glTexParameterf:
- dbg->hooks->gl.glTexParameterf(
- static_cast<GLenum>(cmd.arg0()), static_cast<GLenum>(cmd.arg1()),
- static_cast<GLfloat>(cmd.arg2()));
- break;
- case glesv2debugger::Message_Function_glTexParameterfv:
- ret = GenerateCall_glTexParameterfv(dbg, cmd, msg, prevRet);
- break;
- case glesv2debugger::Message_Function_glTexParameteri:
- dbg->hooks->gl.glTexParameteri(
- static_cast<GLenum>(cmd.arg0()), static_cast<GLenum>(cmd.arg1()),
- static_cast<GLint>(cmd.arg2()));
- break;
- case glesv2debugger::Message_Function_glTexParameteriv:
- ret = GenerateCall_glTexParameteriv(dbg, cmd, msg, prevRet);
- break;
- case glesv2debugger::Message_Function_glTexSubImage2D:
- ret = GenerateCall_glTexSubImage2D(dbg, cmd, msg, prevRet);
- break;
- case glesv2debugger::Message_Function_glUniform1f:
- dbg->hooks->gl.glUniform1f(
- static_cast<GLint>(cmd.arg0()), static_cast<GLfloat>(cmd.arg1())
- );
- break;
- case glesv2debugger::Message_Function_glUniform1fv:
- dbg->hooks->gl.glUniform1fv(
- static_cast<GLint>(cmd.arg0()), static_cast<GLsizei>(cmd.arg1()),
- reinterpret_cast<GLfloat*>(const_cast<char *>(cmd.data().data()))
- );
- break;
- case glesv2debugger::Message_Function_glUniform1i:
- dbg->hooks->gl.glUniform1i(
- static_cast<GLint>(cmd.arg0()), static_cast<GLint>(cmd.arg1())
- );
- break;
- case glesv2debugger::Message_Function_glUniform1iv:
- dbg->hooks->gl.glUniform1iv(
- static_cast<GLint>(cmd.arg0()), static_cast<GLsizei>(cmd.arg1()),
- reinterpret_cast<GLint*>(const_cast<char *>(cmd.data().data()))
- );
- break;
- case glesv2debugger::Message_Function_glUniform2f:
- dbg->hooks->gl.glUniform2f(
- static_cast<GLint>(cmd.arg0()), static_cast<GLfloat>(cmd.arg1()),
- static_cast<GLfloat>(cmd.arg2()));
- break;
- case glesv2debugger::Message_Function_glUniform2fv:
- dbg->hooks->gl.glUniform2fv(
- static_cast<GLint>(cmd.arg0()), static_cast<GLsizei>(cmd.arg1()),
- reinterpret_cast<GLfloat*>(const_cast<char *>(cmd.data().data()))
- );
- break;
- case glesv2debugger::Message_Function_glUniform2i:
- dbg->hooks->gl.glUniform2i(
- static_cast<GLint>(cmd.arg0()), static_cast<GLint>(cmd.arg1()),
- static_cast<GLint>(cmd.arg2()));
- break;
- case glesv2debugger::Message_Function_glUniform2iv:
- dbg->hooks->gl.glUniform2iv(
- static_cast<GLint>(cmd.arg0()), static_cast<GLsizei>(cmd.arg1()),
- reinterpret_cast<GLint*>(const_cast<char *>(cmd.data().data()))
- );
- break;
- case glesv2debugger::Message_Function_glUniform3f:
- dbg->hooks->gl.glUniform3f(
- static_cast<GLint>(cmd.arg0()), static_cast<GLfloat>(cmd.arg1()),
- static_cast<GLfloat>(cmd.arg2()), static_cast<GLfloat>(cmd.arg3())
- );
- break;
- case glesv2debugger::Message_Function_glUniform3fv:
- dbg->hooks->gl.glUniform3fv(
- static_cast<GLint>(cmd.arg0()), static_cast<GLsizei>(cmd.arg1()),
- reinterpret_cast<GLfloat*>(const_cast<char *>(cmd.data().data()))
- );
- break;
- case glesv2debugger::Message_Function_glUniform3i:
- dbg->hooks->gl.glUniform3i(
- static_cast<GLint>(cmd.arg0()), static_cast<GLint>(cmd.arg1()),
- static_cast<GLint>(cmd.arg2()), static_cast<GLint>(cmd.arg3())
- );
- break;
- case glesv2debugger::Message_Function_glUniform3iv:
- dbg->hooks->gl.glUniform3iv(
- static_cast<GLint>(cmd.arg0()), static_cast<GLsizei>(cmd.arg1()),
- reinterpret_cast<GLint*>(const_cast<char *>(cmd.data().data()))
- );
- break;
- case glesv2debugger::Message_Function_glUniform4f:
- dbg->hooks->gl.glUniform4f(
- static_cast<GLint>(cmd.arg0()), static_cast<GLfloat>(cmd.arg1()),
- static_cast<GLfloat>(cmd.arg2()), static_cast<GLfloat>(cmd.arg3()),
- static_cast<GLfloat>(cmd.arg4()));
- break;
- case glesv2debugger::Message_Function_glUniform4fv:
- dbg->hooks->gl.glUniform4fv(
- static_cast<GLint>(cmd.arg0()), static_cast<GLsizei>(cmd.arg1()),
- reinterpret_cast<GLfloat*>(const_cast<char *>(cmd.data().data()))
- );
- break;
- case glesv2debugger::Message_Function_glUniform4i:
- dbg->hooks->gl.glUniform4i(
- static_cast<GLint>(cmd.arg0()), static_cast<GLint>(cmd.arg1()),
- static_cast<GLint>(cmd.arg2()), static_cast<GLint>(cmd.arg3()),
- static_cast<GLint>(cmd.arg4()));
- break;
- case glesv2debugger::Message_Function_glUniform4iv:
- dbg->hooks->gl.glUniform4iv(
- static_cast<GLint>(cmd.arg0()), static_cast<GLsizei>(cmd.arg1()),
- reinterpret_cast<GLint*>(const_cast<char *>(cmd.data().data()))
- );
- break;
- case glesv2debugger::Message_Function_glUniformMatrix2fv:
- dbg->hooks->gl.glUniformMatrix2fv(
- static_cast<GLint>(cmd.arg0()), static_cast<GLsizei>(cmd.arg1()),
- GLboolean(cmd.arg2()), reinterpret_cast<GLfloat*>(const_cast<char *>(cmd.data().data()))
- );
- break;
- case glesv2debugger::Message_Function_glUniformMatrix3fv:
- dbg->hooks->gl.glUniformMatrix3fv(
- static_cast<GLint>(cmd.arg0()), static_cast<GLsizei>(cmd.arg1()),
- GLboolean(cmd.arg2()), reinterpret_cast<GLfloat*>(const_cast<char *>(cmd.data().data()))
- );
- break;
- case glesv2debugger::Message_Function_glUniformMatrix4fv:
- dbg->hooks->gl.glUniformMatrix4fv(
- static_cast<GLint>(cmd.arg0()), static_cast<GLsizei>(cmd.arg1()),
- GLboolean(cmd.arg2()), reinterpret_cast<GLfloat*>(const_cast<char *>(cmd.data().data()))
- );
- break;
- case glesv2debugger::Message_Function_glUseProgram:
- dbg->hooks->gl.glUseProgram(
- static_cast<GLuint>(cmd.arg0()));
- break;
- case glesv2debugger::Message_Function_glValidateProgram:
- dbg->hooks->gl.glValidateProgram(
- static_cast<GLuint>(cmd.arg0()));
- break;
- case glesv2debugger::Message_Function_glVertexAttrib1f:
- dbg->hooks->gl.glVertexAttrib1f(
- static_cast<GLuint>(cmd.arg0()), static_cast<GLfloat>(cmd.arg1())
- );
- break;
- case glesv2debugger::Message_Function_glVertexAttrib1fv:
- dbg->hooks->gl.glVertexAttrib1fv(
- static_cast<GLuint>(cmd.arg0()), reinterpret_cast<GLfloat*>(const_cast<char *>(cmd.data().data()))
- );
- break;
- case glesv2debugger::Message_Function_glVertexAttrib2f:
- dbg->hooks->gl.glVertexAttrib2f(
- static_cast<GLuint>(cmd.arg0()), static_cast<GLfloat>(cmd.arg1()),
- static_cast<GLfloat>(cmd.arg2()));
- break;
- case glesv2debugger::Message_Function_glVertexAttrib2fv:
- dbg->hooks->gl.glVertexAttrib2fv(
- static_cast<GLuint>(cmd.arg0()), reinterpret_cast<GLfloat*>(const_cast<char *>(cmd.data().data()))
- );
- break;
- case glesv2debugger::Message_Function_glVertexAttrib3f:
- dbg->hooks->gl.glVertexAttrib3f(
- static_cast<GLuint>(cmd.arg0()), static_cast<GLfloat>(cmd.arg1()),
- static_cast<GLfloat>(cmd.arg2()), static_cast<GLfloat>(cmd.arg3())
- );
- break;
- case glesv2debugger::Message_Function_glVertexAttrib3fv:
- dbg->hooks->gl.glVertexAttrib3fv(
- static_cast<GLuint>(cmd.arg0()), reinterpret_cast<GLfloat*>(const_cast<char *>(cmd.data().data()))
- );
- break;
- case glesv2debugger::Message_Function_glVertexAttrib4f:
- dbg->hooks->gl.glVertexAttrib4f(
- static_cast<GLuint>(cmd.arg0()), static_cast<GLfloat>(cmd.arg1()),
- static_cast<GLfloat>(cmd.arg2()), static_cast<GLfloat>(cmd.arg3()),
- static_cast<GLfloat>(cmd.arg4()));
- break;
- case glesv2debugger::Message_Function_glVertexAttrib4fv:
- dbg->hooks->gl.glVertexAttrib4fv(
- static_cast<GLuint>(cmd.arg0()), reinterpret_cast<GLfloat*>(const_cast<char *>(cmd.data().data()))
- );
- break;
- case glesv2debugger::Message_Function_glVertexAttribPointer:
- ret = GenerateCall_glVertexAttribPointer(dbg, cmd, msg, prevRet);
- break;
- case glesv2debugger::Message_Function_glViewport:
- dbg->hooks->gl.glViewport(
- static_cast<GLint>(cmd.arg0()), static_cast<GLint>(cmd.arg1()),
- static_cast<GLsizei>(cmd.arg2()), static_cast<GLsizei>(cmd.arg3())
- );
- break;
- default:
- assert(0);
- }
- msg.set_time((systemTime(timeMode) - c0) * 1e-6f);
- msg.set_context_id(reinterpret_cast<int>(dbg));
- msg.set_function(cmd.function());
- msg.set_type(glesv2debugger::Message_Type_AfterGeneratedCall);
- return ret;
-}
-
-}; // name space android {
diff --git a/opengl/libs/GLES2_dbg/src/caller.h b/opengl/libs/GLES2_dbg/src/caller.h
deleted file mode 100644
index e8111b3..0000000
--- a/opengl/libs/GLES2_dbg/src/caller.h
+++ /dev/null
@@ -1,330 +0,0 @@
-/*
- ** Copyright 2011, The Android Open Source Project
- **
- ** Licensed under the Apache License, Version 2.0 (the "License")
- ** you may not use this file except in compliance with the License.
- ** You may obtain a copy of the License at
- **
- ** http://www.apache.org/licenses/LICENSE-2.0
- **
- ** Unless required by applicable law or agreed to in writing, software
- ** distributed under the License is distributed on an "AS IS" BASIS,
- ** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- ** See the License for the specific language governing permissions and
- ** limitations under the License.
- */
-
-static const int * GenerateCall_glCompressedTexImage2D(DbgContext * const dbg,
- const glesv2debugger::Message & cmd,
- glesv2debugger::Message & msg, const int * const prevRet)
-{
- assert(0);
- return prevRet;
-}
-
-static const int * GenerateCall_glCompressedTexSubImage2D(DbgContext * const dbg,
- const glesv2debugger::Message & cmd,
- glesv2debugger::Message & msg, const int * const prevRet)
-{
- assert(0);
- return prevRet;
-}
-
-static const int * GenerateCall_glDrawElements(DbgContext * const dbg,
- const glesv2debugger::Message & cmd,
- glesv2debugger::Message & msg, const int * const prevRet)
-{
- assert(0);
- return prevRet;
-}
-
-static const int * GenerateCall_glGenBuffers(DbgContext * const dbg,
- const glesv2debugger::Message & cmd,
- glesv2debugger::Message & msg, const int * const prevRet)
-{
- assert(0);
- return prevRet;
-}
-
-static const int * GenerateCall_glGenFramebuffers(DbgContext * const dbg,
- const glesv2debugger::Message & cmd,
- glesv2debugger::Message & msg, const int * const prevRet)
-{
- assert(0);
- return prevRet;
-}
-
-static const int * GenerateCall_glGenRenderbuffers(DbgContext * const dbg,
- const glesv2debugger::Message & cmd,
- glesv2debugger::Message & msg, const int * const prevRet)
-{
- assert(0);
- return prevRet;
-}
-
-static const int * GenerateCall_glGenTextures(DbgContext * const dbg,
- const glesv2debugger::Message & cmd,
- glesv2debugger::Message & msg, const int * const prevRet)
-{
- assert(0);
- return prevRet;
-}
-
-static const int * GenerateCall_glGetActiveAttrib(DbgContext * const dbg,
- const glesv2debugger::Message & cmd,
- glesv2debugger::Message & msg, const int * const prevRet)
-{
- assert(0);
- return prevRet;
-}
-
-static const int * GenerateCall_glGetActiveUniform(DbgContext * const dbg,
- const glesv2debugger::Message & cmd,
- glesv2debugger::Message & msg, const int * const prevRet)
-{
- assert(0);
- return prevRet;
-}
-
-static const int * GenerateCall_glGetAttachedShaders(DbgContext * const dbg,
- const glesv2debugger::Message & cmd,
- glesv2debugger::Message & msg, const int * const prevRet)
-{
- assert(0);
- return prevRet;
-}
-
-static const int * GenerateCall_glGetBooleanv(DbgContext * const dbg,
- const glesv2debugger::Message & cmd,
- glesv2debugger::Message & msg, const int * const prevRet)
-{
- assert(0);
- return prevRet;
-}
-
-static const int * GenerateCall_glGetBufferParameteriv(DbgContext * const dbg,
- const glesv2debugger::Message & cmd,
- glesv2debugger::Message & msg, const int * const prevRet)
-{
- assert(0);
- return prevRet;
-}
-
-static const int * GenerateCall_glGetFloatv(DbgContext * const dbg,
- const glesv2debugger::Message & cmd,
- glesv2debugger::Message & msg, const int * const prevRet)
-{
- assert(0);
- return prevRet;
-}
-
-static const int * GenerateCall_glGetFramebufferAttachmentParameteriv(DbgContext * const dbg,
- const glesv2debugger::Message & cmd,
- glesv2debugger::Message & msg, const int * const prevRet)
-{
- assert(0);
- return prevRet;
-}
-
-static const int * GenerateCall_glGetIntegerv(DbgContext * const dbg,
- const glesv2debugger::Message & cmd,
- glesv2debugger::Message & msg, const int * const prevRet)
-{
- assert(0);
- return prevRet;
-}
-
-static const int * GenerateCall_glGetProgramiv(DbgContext * const dbg,
- const glesv2debugger::Message & cmd,
- glesv2debugger::Message & msg, const int * const prevRet)
-{
- GLint params = -1;
- dbg->hooks->gl.glGetProgramiv(cmd.arg0(), cmd.arg1(), &params);
- msg.mutable_data()->append(reinterpret_cast<char *>(&params), sizeof(params));
- return prevRet;
-}
-
-static const int * GenerateCall_glGetProgramInfoLog(DbgContext * const dbg,
- const glesv2debugger::Message & cmd,
- glesv2debugger::Message & msg, const int * const prevRet)
-{
- const GLsizei bufSize = static_cast<GLsizei>(dbg->GetBufferSize());
- GLsizei length = -1;
- dbg->hooks->gl.glGetProgramInfoLog(cmd.arg0(), bufSize, &length, dbg->GetBuffer());
- msg.mutable_data()->append(dbg->GetBuffer(), length);
- return prevRet;
-}
-
-static const int * GenerateCall_glGetRenderbufferParameteriv(DbgContext * const dbg,
- const glesv2debugger::Message & cmd,
- glesv2debugger::Message & msg, const int * const prevRet)
-{
- assert(0);
- return prevRet;
-}
-
-static const int * GenerateCall_glGetShaderiv(DbgContext * const dbg,
- const glesv2debugger::Message & cmd,
- glesv2debugger::Message & msg, const int * const prevRet)
-{
- GLint params = -1;
- dbg->hooks->gl.glGetShaderiv(cmd.arg0(), cmd.arg1(), &params);
- msg.mutable_data()->append(reinterpret_cast<char *>(&params), sizeof(params));
- return prevRet;
-}
-
-static const int * GenerateCall_glGetShaderInfoLog(DbgContext * const dbg,
- const glesv2debugger::Message & cmd,
- glesv2debugger::Message & msg, const int * const prevRet)
-{
- const GLsizei bufSize = static_cast<GLsizei>(dbg->GetBufferSize());
- GLsizei length = -1;
- dbg->hooks->gl.glGetShaderInfoLog(cmd.arg0(), bufSize, &length, dbg->GetBuffer());
- msg.mutable_data()->append(dbg->GetBuffer(), length);
- return prevRet;
-}
-
-static const int * GenerateCall_glGetShaderPrecisionFormat(DbgContext * const dbg,
- const glesv2debugger::Message & cmd,
- glesv2debugger::Message & msg, const int * const prevRet)
-{
- assert(0);
- return prevRet;
-}
-
-static const int * GenerateCall_glGetShaderSource(DbgContext * const dbg,
- const glesv2debugger::Message & cmd,
- glesv2debugger::Message & msg, const int * const prevRet)
-{
- assert(0);
- return prevRet;
-}
-
-static const int * GenerateCall_glGetString(DbgContext * const dbg,
- const glesv2debugger::Message & cmd,
- glesv2debugger::Message & msg, const int * const prevRet)
-{
- assert(0);
- return prevRet;
-}
-
-static const int * GenerateCall_glGetTexParameterfv(DbgContext * const dbg,
- const glesv2debugger::Message & cmd,
- glesv2debugger::Message & msg, const int * const prevRet)
-{
- assert(0);
- return prevRet;
-}
-
-static const int * GenerateCall_glGetTexParameteriv(DbgContext * const dbg,
- const glesv2debugger::Message & cmd,
- glesv2debugger::Message & msg, const int * const prevRet)
-{
- assert(0);
- return prevRet;
-}
-
-static const int * GenerateCall_glGetUniformfv(DbgContext * const dbg,
- const glesv2debugger::Message & cmd,
- glesv2debugger::Message & msg, const int * const prevRet)
-{
- assert(0);
- return prevRet;
-}
-
-static const int * GenerateCall_glGetUniformiv(DbgContext * const dbg,
- const glesv2debugger::Message & cmd,
- glesv2debugger::Message & msg, const int * const prevRet)
-{
- assert(0);
- return prevRet;
-}
-
-static const int * GenerateCall_glGetVertexAttribfv(DbgContext * const dbg,
- const glesv2debugger::Message & cmd,
- glesv2debugger::Message & msg, const int * const prevRet)
-{
- assert(0);
- return prevRet;
-}
-
-static const int * GenerateCall_glGetVertexAttribiv(DbgContext * const dbg,
- const glesv2debugger::Message & cmd,
- glesv2debugger::Message & msg, const int * const prevRet)
-{
- assert(0);
- return prevRet;
-}
-
-static const int * GenerateCall_glGetVertexAttribPointerv(DbgContext * const dbg,
- const glesv2debugger::Message & cmd,
- glesv2debugger::Message & msg, const int * const prevRet)
-{
- assert(0);
- return prevRet;
-}
-
-static const int * GenerateCall_glReadPixels(DbgContext * const dbg,
- const glesv2debugger::Message & cmd,
- glesv2debugger::Message & msg, const int * const prevRet)
-{
- assert(0);
- return prevRet;
-}
-
-static const int * GenerateCall_glShaderBinary(DbgContext * const dbg,
- const glesv2debugger::Message & cmd,
- glesv2debugger::Message & msg, const int * const prevRet)
-{
- assert(0);
- return prevRet;
-}
-
-static const int * GenerateCall_glShaderSource(DbgContext * const dbg,
- const glesv2debugger::Message & cmd,
- glesv2debugger::Message & msg, const int * const prevRet)
-{
- const char * string = cmd.data().data();
- dbg->hooks->gl.glShaderSource(cmd.arg0(), 1, &string, NULL);
- return prevRet;
-}
-
-static const int * GenerateCall_glTexImage2D(DbgContext * const dbg,
- const glesv2debugger::Message & cmd,
- glesv2debugger::Message & msg, const int * const prevRet)
-{
- assert(0);
- return prevRet;
-}
-
-static const int * GenerateCall_glTexParameterfv(DbgContext * const dbg,
- const glesv2debugger::Message & cmd,
- glesv2debugger::Message & msg, const int * const prevRet)
-{
- assert(0);
- return prevRet;
-}
-
-static const int * GenerateCall_glTexParameteriv(DbgContext * const dbg,
- const glesv2debugger::Message & cmd,
- glesv2debugger::Message & msg, const int * const prevRet)
-{
- assert(0);
- return prevRet;
-}
-
-static const int * GenerateCall_glTexSubImage2D(DbgContext * const dbg,
- const glesv2debugger::Message & cmd,
- glesv2debugger::Message & msg, const int * const prevRet)
-{
- assert(0);
- return prevRet;
-}
-
-static const int * GenerateCall_glVertexAttribPointer(DbgContext * const dbg,
- const glesv2debugger::Message & cmd,
- glesv2debugger::Message & msg, const int * const prevRet)
-{
- assert(0);
- return prevRet;
-}
diff --git a/opengl/libs/GLES2_dbg/src/dbgcontext.cpp b/opengl/libs/GLES2_dbg/src/dbgcontext.cpp
deleted file mode 100644
index 7bbaa18..0000000
--- a/opengl/libs/GLES2_dbg/src/dbgcontext.cpp
+++ /dev/null
@@ -1,427 +0,0 @@
-/*
- ** Copyright 2011, The Android Open Source Project
- **
- ** Licensed under the Apache License, Version 2.0 (the "License");
- ** you may not use this file except in compliance with the License.
- ** You may obtain a copy of the License at
- **
- ** http://www.apache.org/licenses/LICENSE-2.0
- **
- ** Unless required by applicable law or agreed to in writing, software
- ** distributed under the License is distributed on an "AS IS" BASIS,
- ** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- ** See the License for the specific language governing permissions and
- ** limitations under the License.
- */
-
-#include "header.h"
-
-extern "C" {
-#include "liblzf/lzf.h"
-}
-
-namespace android {
-
-static pthread_key_t dbgEGLThreadLocalStorageKey = -1;
-static pthread_mutex_t gThreadLocalStorageKeyMutex = PTHREAD_MUTEX_INITIALIZER;
-
-DbgContext * getDbgContextThreadSpecific() {
- return (DbgContext*)pthread_getspecific(dbgEGLThreadLocalStorageKey);
-}
-
-DbgContext::DbgContext(const unsigned version, const gl_hooks_t * const hooks,
- const unsigned MAX_VERTEX_ATTRIBS)
- : lzf_buf(NULL), lzf_readIndex(0), lzf_refSize(0), lzf_refBufSize(0)
- , version(version), hooks(hooks)
- , MAX_VERTEX_ATTRIBS(MAX_VERTEX_ATTRIBS)
- , readBytesPerPixel(4)
- , captureSwap(0), captureDraw(0)
- , vertexAttribs(new VertexAttrib[MAX_VERTEX_ATTRIBS])
- , hasNonVBOAttribs(false), indexBuffers(NULL), indexBuffer(NULL)
- , program(0), maxAttrib(0)
-{
- lzf_ref[0] = lzf_ref[1] = NULL;
- for (unsigned i = 0; i < MAX_VERTEX_ATTRIBS; i++)
- vertexAttribs[i] = VertexAttrib();
- memset(&expectResponse, 0, sizeof(expectResponse));
-}
-
-DbgContext::~DbgContext()
-{
- delete vertexAttribs;
- free(lzf_buf);
- free(lzf_ref[0]);
- free(lzf_ref[1]);
-}
-
-DbgContext* CreateDbgContext(const unsigned version, const gl_hooks_t * const hooks)
-{
- pthread_mutex_lock(&gThreadLocalStorageKeyMutex);
- if (dbgEGLThreadLocalStorageKey == -1)
- pthread_key_create(&dbgEGLThreadLocalStorageKey, NULL);
- pthread_mutex_unlock(&gThreadLocalStorageKeyMutex);
-
- assert(version < 2);
- assert(GL_NO_ERROR == hooks->gl.glGetError());
- GLint MAX_VERTEX_ATTRIBS = 0;
- hooks->gl.glGetIntegerv(GL_MAX_VERTEX_ATTRIBS, &MAX_VERTEX_ATTRIBS);
- DbgContext* dbg = new DbgContext(version, hooks, MAX_VERTEX_ATTRIBS);
- glesv2debugger::Message msg, cmd;
- msg.set_context_id(reinterpret_cast<int>(dbg));
- msg.set_expect_response(false);
- msg.set_type(msg.Response);
- msg.set_function(msg.SETPROP);
- msg.set_prop(msg.GLConstant);
- msg.set_arg0(GL_MAX_VERTEX_ATTRIBS);
- msg.set_arg1(MAX_VERTEX_ATTRIBS);
- Send(msg, cmd);
-
- GLint MAX_COMBINED_TEXTURE_IMAGE_UNITS = 0;
- hooks->gl.glGetIntegerv(GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS, &MAX_COMBINED_TEXTURE_IMAGE_UNITS);
- msg.set_arg0(GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS);
- msg.set_arg1(MAX_COMBINED_TEXTURE_IMAGE_UNITS);
- Send(msg, cmd);
-
- pthread_setspecific(dbgEGLThreadLocalStorageKey, dbg);
- return dbg;
-}
-
-void dbgReleaseThread() {
- delete getDbgContextThreadSpecific();
-}
-
-unsigned GetBytesPerPixel(const GLenum format, const GLenum type)
-{
- switch (type) {
- case GL_UNSIGNED_SHORT_5_6_5:
- case GL_UNSIGNED_SHORT_4_4_4_4:
- case GL_UNSIGNED_SHORT_5_5_5_1:
- return 2;
- case GL_UNSIGNED_BYTE:
- break;
- default:
- ALOGE("GetBytesPerPixel: unknown type %x", type);
- }
-
- switch (format) {
- case GL_ALPHA:
- case GL_LUMINANCE:
- return 1;
- case GL_LUMINANCE_ALPHA:
- return 2;
- case GL_RGB:
- return 3;
- case GL_RGBA:
- case 0x80E1: // GL_BGRA_EXT
- return 4;
- default:
- ALOGE("GetBytesPerPixel: unknown format %x", format);
- }
-
- return 1; // in doubt...
-}
-
-void DbgContext::Fetch(const unsigned index, std::string * const data) const
-{
- // VBO data is already on client, just send user pointer data
- for (unsigned i = 0; i < maxAttrib; i++) {
- if (!vertexAttribs[i].enabled)
- continue;
- if (vertexAttribs[i].buffer > 0)
- continue;
- const char * ptr = (const char *)vertexAttribs[i].ptr;
- ptr += index * vertexAttribs[i].stride;
- data->append(ptr, vertexAttribs[i].elemSize);
- }
-}
-
-void DbgContext::Compress(const void * in_data, unsigned int in_len,
- std::string * const outStr)
-{
- if (!lzf_buf)
- lzf_buf = (char *)malloc(LZF_CHUNK_SIZE);
- assert(lzf_buf);
- const uint32_t totalDecompSize = in_len;
- outStr->append((const char *)&totalDecompSize, sizeof(totalDecompSize));
- for (unsigned int i = 0; i < in_len; i += LZF_CHUNK_SIZE) {
- uint32_t chunkSize = LZF_CHUNK_SIZE;
- if (i + LZF_CHUNK_SIZE > in_len)
- chunkSize = in_len - i;
- const uint32_t compSize = lzf_compress((const char *)in_data + i, chunkSize,
- lzf_buf, LZF_CHUNK_SIZE);
- outStr->append((const char *)&chunkSize, sizeof(chunkSize));
- outStr->append((const char *)&compSize, sizeof(compSize));
- if (compSize > 0)
- outStr->append(lzf_buf, compSize);
- else // compressed chunk bigger than LZF_CHUNK_SIZE (and uncompressed)
- outStr->append((const char *)in_data + i, chunkSize);
- }
-}
-
-unsigned char * DbgContext::Decompress(const void * in, const unsigned int inLen,
- unsigned int * const outLen)
-{
- assert(inLen > 4 * 3);
- if (inLen < 4 * 3)
- return NULL;
- *outLen = *(uint32_t *)in;
- unsigned char * const out = (unsigned char *)malloc(*outLen);
- unsigned int outPos = 0;
- const unsigned char * const end = (const unsigned char *)in + inLen;
- for (const unsigned char * inData = (const unsigned char *)in + 4; inData < end; ) {
- const uint32_t chunkOut = *(uint32_t *)inData;
- inData += 4;
- const uint32_t chunkIn = *(uint32_t *)inData;
- inData += 4;
- if (chunkIn > 0) {
- assert(inData + chunkIn <= end);
- assert(outPos + chunkOut <= *outLen);
- outPos += lzf_decompress(inData, chunkIn, out + outPos, chunkOut);
- inData += chunkIn;
- } else {
- assert(inData + chunkOut <= end);
- assert(outPos + chunkOut <= *outLen);
- memcpy(out + outPos, inData, chunkOut);
- inData += chunkOut;
- outPos += chunkOut;
- }
- }
- return out;
-}
-
-void * DbgContext::GetReadPixelsBuffer(const unsigned size)
-{
- if (lzf_refBufSize < size + 8) {
- lzf_refBufSize = size + 8;
- lzf_ref[0] = (unsigned *)realloc(lzf_ref[0], lzf_refBufSize);
- assert(lzf_ref[0]);
- memset(lzf_ref[0], 0, lzf_refBufSize);
- lzf_ref[1] = (unsigned *)realloc(lzf_ref[1], lzf_refBufSize);
- assert(lzf_ref[1]);
- memset(lzf_ref[1], 0, lzf_refBufSize);
- }
- if (lzf_refSize != size) // need to clear unused ref to maintain consistency
- { // since ref and src are swapped each time
- memset((char *)lzf_ref[0] + lzf_refSize, 0, lzf_refBufSize - lzf_refSize);
- memset((char *)lzf_ref[1] + lzf_refSize, 0, lzf_refBufSize - lzf_refSize);
- }
- lzf_refSize = size;
- lzf_readIndex ^= 1;
- return lzf_ref[lzf_readIndex];
-}
-
-void DbgContext::CompressReadPixelBuffer(std::string * const outStr)
-{
- assert(lzf_ref[0] && lzf_ref[1]);
- unsigned * const ref = lzf_ref[lzf_readIndex ^ 1];
- unsigned * const src = lzf_ref[lzf_readIndex];
- for (unsigned i = 0; i < lzf_refSize / sizeof(*ref) + 1; i++)
- ref[i] ^= src[i];
- Compress(ref, lzf_refSize, outStr);
-}
-
-char * DbgContext::GetBuffer()
-{
- if (!lzf_buf)
- lzf_buf = (char *)malloc(LZF_CHUNK_SIZE);
- assert(lzf_buf);
- return lzf_buf;
-}
-
-unsigned int DbgContext::GetBufferSize()
-{
- if (!lzf_buf)
- lzf_buf = (char *)malloc(LZF_CHUNK_SIZE);
- assert(lzf_buf);
- if (lzf_buf)
- return LZF_CHUNK_SIZE;
- else
- return 0;
-}
-
-void DbgContext::glUseProgram(GLuint program)
-{
- while (GLenum error = hooks->gl.glGetError())
- ALOGD("DbgContext::glUseProgram(%u): before glGetError() = 0x%.4X",
- program, error);
- this->program = program;
- maxAttrib = 0;
- if (program == 0)
- return;
- GLint activeAttributes = 0;
- hooks->gl.glGetProgramiv(program, GL_ACTIVE_ATTRIBUTES, &activeAttributes);
- maxAttrib = 0;
- GLint maxNameLen = -1;
- hooks->gl.glGetProgramiv(program, GL_ACTIVE_ATTRIBUTE_MAX_LENGTH, &maxNameLen);
- char * name = new char [maxNameLen + 1];
- name[maxNameLen] = 0;
- // find total number of attribute slots used
- for (unsigned i = 0; i < activeAttributes; i++) {
- GLint size = -1;
- GLenum type = -1;
- hooks->gl.glGetActiveAttrib(program, i, maxNameLen + 1, NULL, &size, &type, name);
- GLint slot = hooks->gl.glGetAttribLocation(program, name);
- assert(slot >= 0);
- switch (type) {
- case GL_FLOAT:
- case GL_FLOAT_VEC2:
- case GL_FLOAT_VEC3:
- case GL_FLOAT_VEC4:
- slot += size;
- break;
- case GL_FLOAT_MAT2:
- slot += size * 2;
- break;
- case GL_FLOAT_MAT3:
- slot += size * 3;
- break;
- case GL_FLOAT_MAT4:
- slot += size * 4;
- break;
- default:
- assert(0);
- }
- if (slot > maxAttrib)
- maxAttrib = slot;
- }
- delete name;
- while (GLenum error = hooks->gl.glGetError())
- ALOGD("DbgContext::glUseProgram(%u): after glGetError() = 0x%.4X",
- program, error);
-}
-
-static bool HasNonVBOAttribs(const DbgContext * const ctx)
-{
- bool need = false;
- for (unsigned i = 0; !need && i < ctx->maxAttrib; i++)
- if (ctx->vertexAttribs[i].enabled && ctx->vertexAttribs[i].buffer == 0)
- need = true;
- return need;
-}
-
-void DbgContext::glVertexAttribPointer(GLuint indx, GLint size, GLenum type,
- GLboolean normalized, GLsizei stride, const GLvoid* ptr)
-{
- assert(GL_NO_ERROR == hooks->gl.glGetError());
- assert(indx < MAX_VERTEX_ATTRIBS);
- vertexAttribs[indx].size = size;
- vertexAttribs[indx].type = type;
- vertexAttribs[indx].normalized = normalized;
- switch (type) {
- case GL_FLOAT:
- vertexAttribs[indx].elemSize = sizeof(GLfloat) * size;
- break;
- case GL_INT:
- case GL_UNSIGNED_INT:
- vertexAttribs[indx].elemSize = sizeof(GLint) * size;
- break;
- case GL_SHORT:
- case GL_UNSIGNED_SHORT:
- vertexAttribs[indx].elemSize = sizeof(GLshort) * size;
- break;
- case GL_BYTE:
- case GL_UNSIGNED_BYTE:
- vertexAttribs[indx].elemSize = sizeof(GLbyte) * size;
- break;
- default:
- assert(0);
- }
- if (0 == stride)
- stride = vertexAttribs[indx].elemSize;
- vertexAttribs[indx].stride = stride;
- vertexAttribs[indx].ptr = ptr;
- hooks->gl.glGetVertexAttribiv(indx, GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING,
- (GLint *)&vertexAttribs[indx].buffer);
- hasNonVBOAttribs = HasNonVBOAttribs(this);
-}
-
-void DbgContext::glEnableVertexAttribArray(GLuint index)
-{
- if (index >= MAX_VERTEX_ATTRIBS)
- return;
- vertexAttribs[index].enabled = true;
- hasNonVBOAttribs = HasNonVBOAttribs(this);
-}
-
-void DbgContext::glDisableVertexAttribArray(GLuint index)
-{
- if (index >= MAX_VERTEX_ATTRIBS)
- return;
- vertexAttribs[index].enabled = false;
- hasNonVBOAttribs = HasNonVBOAttribs(this);
-}
-
-void DbgContext::glBindBuffer(GLenum target, GLuint buffer)
-{
- if (GL_ELEMENT_ARRAY_BUFFER != target)
- return;
- if (0 == buffer) {
- indexBuffer = NULL;
- return;
- }
- VBO * b = indexBuffers;
- indexBuffer = NULL;
- while (b) {
- if (b->name == buffer) {
- assert(GL_ELEMENT_ARRAY_BUFFER == b->target);
- indexBuffer = b;
- break;
- }
- b = b->next;
- }
- if (!indexBuffer)
- indexBuffer = indexBuffers = new VBO(buffer, target, indexBuffers);
-}
-
-void DbgContext::glBufferData(GLenum target, GLsizeiptr size, const GLvoid* data, GLenum usage)
-{
- if (GL_ELEMENT_ARRAY_BUFFER != target)
- return;
- assert(indexBuffer);
- assert(size >= 0);
- indexBuffer->size = size;
- indexBuffer->data = realloc(indexBuffer->data, size);
- memcpy(indexBuffer->data, data, size);
-}
-
-void DbgContext::glBufferSubData(GLenum target, GLintptr offset, GLsizeiptr size, const GLvoid* data)
-{
- if (GL_ELEMENT_ARRAY_BUFFER != target)
- return;
- assert(indexBuffer);
- assert(size >= 0);
- assert(offset >= 0);
- assert(offset + size <= indexBuffer->size);
- memcpy((char *)indexBuffer->data + offset, data, size);
-}
-
-void DbgContext::glDeleteBuffers(GLsizei n, const GLuint *buffers)
-{
- for (unsigned i = 0; i < n; i++) {
- for (unsigned j = 0; j < MAX_VERTEX_ATTRIBS; j++)
- if (buffers[i] == vertexAttribs[j].buffer) {
- vertexAttribs[j].buffer = 0;
- vertexAttribs[j].enabled = false;
- }
- VBO * b = indexBuffers, * previous = NULL;
- while (b) {
- if (b->name == buffers[i]) {
- assert(GL_ELEMENT_ARRAY_BUFFER == b->target);
- if (indexBuffer == b)
- indexBuffer = NULL;
- if (previous)
- previous->next = b->next;
- else
- indexBuffers = b->next;
- free(b->data);
- delete b;
- break;
- }
- previous = b;
- b = b->next;
- }
- }
- hasNonVBOAttribs = HasNonVBOAttribs(this);
-}
-
-}; // namespace android
diff --git a/opengl/libs/GLES2_dbg/src/debugger_message.pb.cpp b/opengl/libs/GLES2_dbg/src/debugger_message.pb.cpp
deleted file mode 100644
index 50f70f7..0000000
--- a/opengl/libs/GLES2_dbg/src/debugger_message.pb.cpp
+++ /dev/null
@@ -1,1455 +0,0 @@
-// Generated by the protocol buffer compiler. DO NOT EDIT!
-
-#define INTERNAL_SUPPRESS_PROTOBUF_FIELD_DEPRECATION
-#include "debugger_message.pb.h"
-#include <google/protobuf/stubs/once.h>
-#include <google/protobuf/io/coded_stream.h>
-#include <google/protobuf/wire_format_lite_inl.h>
-// @@protoc_insertion_point(includes)
-
-namespace com {
-namespace android {
-namespace glesv2debugger {
-
-void protobuf_ShutdownFile_debugger_5fmessage_2eproto() {
- delete Message::default_instance_;
-}
-
-void protobuf_AddDesc_debugger_5fmessage_2eproto() {
- static bool already_here = false;
- if (already_here) return;
- already_here = true;
- GOOGLE_PROTOBUF_VERIFY_VERSION;
-
- Message::default_instance_ = new Message();
- Message::default_instance_->InitAsDefaultInstance();
- ::google::protobuf::internal::OnShutdown(&protobuf_ShutdownFile_debugger_5fmessage_2eproto);
-}
-
-// Force AddDescriptors() to be called at static initialization time.
-struct StaticDescriptorInitializer_debugger_5fmessage_2eproto {
- StaticDescriptorInitializer_debugger_5fmessage_2eproto() {
- protobuf_AddDesc_debugger_5fmessage_2eproto();
- }
-} static_descriptor_initializer_debugger_5fmessage_2eproto_;
-
-
-// ===================================================================
-
-bool Message_Function_IsValid(int value) {
- switch(value) {
- case 0:
- case 1:
- case 2:
- case 3:
- case 4:
- case 5:
- case 6:
- case 7:
- case 8:
- case 9:
- case 10:
- case 11:
- case 12:
- case 13:
- case 14:
- case 15:
- case 16:
- case 17:
- case 18:
- case 19:
- case 20:
- case 21:
- case 22:
- case 23:
- case 24:
- case 25:
- case 26:
- case 27:
- case 28:
- case 29:
- case 30:
- case 31:
- case 32:
- case 33:
- case 34:
- case 35:
- case 36:
- case 37:
- case 38:
- case 39:
- case 40:
- case 41:
- case 42:
- case 43:
- case 44:
- case 45:
- case 46:
- case 47:
- case 48:
- case 49:
- case 50:
- case 51:
- case 52:
- case 53:
- case 54:
- case 55:
- case 56:
- case 57:
- case 58:
- case 59:
- case 60:
- case 61:
- case 62:
- case 63:
- case 64:
- case 65:
- case 66:
- case 67:
- case 68:
- case 69:
- case 70:
- case 71:
- case 72:
- case 73:
- case 74:
- case 75:
- case 76:
- case 77:
- case 78:
- case 79:
- case 80:
- case 81:
- case 82:
- case 83:
- case 84:
- case 85:
- case 86:
- case 87:
- case 88:
- case 89:
- case 90:
- case 91:
- case 92:
- case 93:
- case 94:
- case 95:
- case 96:
- case 97:
- case 98:
- case 99:
- case 100:
- case 101:
- case 102:
- case 103:
- case 104:
- case 105:
- case 106:
- case 107:
- case 108:
- case 109:
- case 110:
- case 111:
- case 112:
- case 113:
- case 114:
- case 115:
- case 116:
- case 117:
- case 118:
- case 119:
- case 120:
- case 121:
- case 122:
- case 123:
- case 124:
- case 125:
- case 126:
- case 127:
- case 128:
- case 129:
- case 130:
- case 131:
- case 132:
- case 133:
- case 134:
- case 135:
- case 136:
- case 137:
- case 138:
- case 139:
- case 140:
- case 141:
- case 142:
- case 143:
- case 144:
- case 145:
- case 146:
- case 147:
- case 148:
- case 149:
- case 150:
- case 151:
- case 152:
- case 153:
- case 154:
- case 155:
- case 156:
- case 157:
- case 158:
- case 159:
- case 160:
- case 161:
- case 162:
- case 163:
- case 164:
- case 165:
- case 166:
- case 167:
- case 168:
- case 169:
- case 170:
- case 171:
- case 172:
- case 173:
- case 174:
- case 175:
- case 176:
- case 177:
- case 178:
- case 179:
- case 180:
- case 181:
- case 182:
- case 183:
- case 184:
- case 185:
- case 186:
- case 187:
- case 188:
- case 189:
- case 190:
- return true;
- default:
- return false;
- }
-}
-
-#ifndef _MSC_VER
-const Message_Function Message::glActiveTexture;
-const Message_Function Message::glAttachShader;
-const Message_Function Message::glBindAttribLocation;
-const Message_Function Message::glBindBuffer;
-const Message_Function Message::glBindFramebuffer;
-const Message_Function Message::glBindRenderbuffer;
-const Message_Function Message::glBindTexture;
-const Message_Function Message::glBlendColor;
-const Message_Function Message::glBlendEquation;
-const Message_Function Message::glBlendEquationSeparate;
-const Message_Function Message::glBlendFunc;
-const Message_Function Message::glBlendFuncSeparate;
-const Message_Function Message::glBufferData;
-const Message_Function Message::glBufferSubData;
-const Message_Function Message::glCheckFramebufferStatus;
-const Message_Function Message::glClear;
-const Message_Function Message::glClearColor;
-const Message_Function Message::glClearDepthf;
-const Message_Function Message::glClearStencil;
-const Message_Function Message::glColorMask;
-const Message_Function Message::glCompileShader;
-const Message_Function Message::glCompressedTexImage2D;
-const Message_Function Message::glCompressedTexSubImage2D;
-const Message_Function Message::glCopyTexImage2D;
-const Message_Function Message::glCopyTexSubImage2D;
-const Message_Function Message::glCreateProgram;
-const Message_Function Message::glCreateShader;
-const Message_Function Message::glCullFace;
-const Message_Function Message::glDeleteBuffers;
-const Message_Function Message::glDeleteFramebuffers;
-const Message_Function Message::glDeleteProgram;
-const Message_Function Message::glDeleteRenderbuffers;
-const Message_Function Message::glDeleteShader;
-const Message_Function Message::glDeleteTextures;
-const Message_Function Message::glDepthFunc;
-const Message_Function Message::glDepthMask;
-const Message_Function Message::glDepthRangef;
-const Message_Function Message::glDetachShader;
-const Message_Function Message::glDisable;
-const Message_Function Message::glDisableVertexAttribArray;
-const Message_Function Message::glDrawArrays;
-const Message_Function Message::glDrawElements;
-const Message_Function Message::glEnable;
-const Message_Function Message::glEnableVertexAttribArray;
-const Message_Function Message::glFinish;
-const Message_Function Message::glFlush;
-const Message_Function Message::glFramebufferRenderbuffer;
-const Message_Function Message::glFramebufferTexture2D;
-const Message_Function Message::glFrontFace;
-const Message_Function Message::glGenBuffers;
-const Message_Function Message::glGenerateMipmap;
-const Message_Function Message::glGenFramebuffers;
-const Message_Function Message::glGenRenderbuffers;
-const Message_Function Message::glGenTextures;
-const Message_Function Message::glGetActiveAttrib;
-const Message_Function Message::glGetActiveUniform;
-const Message_Function Message::glGetAttachedShaders;
-const Message_Function Message::glGetAttribLocation;
-const Message_Function Message::glGetBooleanv;
-const Message_Function Message::glGetBufferParameteriv;
-const Message_Function Message::glGetError;
-const Message_Function Message::glGetFloatv;
-const Message_Function Message::glGetFramebufferAttachmentParameteriv;
-const Message_Function Message::glGetIntegerv;
-const Message_Function Message::glGetProgramiv;
-const Message_Function Message::glGetProgramInfoLog;
-const Message_Function Message::glGetRenderbufferParameteriv;
-const Message_Function Message::glGetShaderiv;
-const Message_Function Message::glGetShaderInfoLog;
-const Message_Function Message::glGetShaderPrecisionFormat;
-const Message_Function Message::glGetShaderSource;
-const Message_Function Message::glGetString;
-const Message_Function Message::glGetTexParameterfv;
-const Message_Function Message::glGetTexParameteriv;
-const Message_Function Message::glGetUniformfv;
-const Message_Function Message::glGetUniformiv;
-const Message_Function Message::glGetUniformLocation;
-const Message_Function Message::glGetVertexAttribfv;
-const Message_Function Message::glGetVertexAttribiv;
-const Message_Function Message::glGetVertexAttribPointerv;
-const Message_Function Message::glHint;
-const Message_Function Message::glIsBuffer;
-const Message_Function Message::glIsEnabled;
-const Message_Function Message::glIsFramebuffer;
-const Message_Function Message::glIsProgram;
-const Message_Function Message::glIsRenderbuffer;
-const Message_Function Message::glIsShader;
-const Message_Function Message::glIsTexture;
-const Message_Function Message::glLineWidth;
-const Message_Function Message::glLinkProgram;
-const Message_Function Message::glPixelStorei;
-const Message_Function Message::glPolygonOffset;
-const Message_Function Message::glReadPixels;
-const Message_Function Message::glReleaseShaderCompiler;
-const Message_Function Message::glRenderbufferStorage;
-const Message_Function Message::glSampleCoverage;
-const Message_Function Message::glScissor;
-const Message_Function Message::glShaderBinary;
-const Message_Function Message::glShaderSource;
-const Message_Function Message::glStencilFunc;
-const Message_Function Message::glStencilFuncSeparate;
-const Message_Function Message::glStencilMask;
-const Message_Function Message::glStencilMaskSeparate;
-const Message_Function Message::glStencilOp;
-const Message_Function Message::glStencilOpSeparate;
-const Message_Function Message::glTexImage2D;
-const Message_Function Message::glTexParameterf;
-const Message_Function Message::glTexParameterfv;
-const Message_Function Message::glTexParameteri;
-const Message_Function Message::glTexParameteriv;
-const Message_Function Message::glTexSubImage2D;
-const Message_Function Message::glUniform1f;
-const Message_Function Message::glUniform1fv;
-const Message_Function Message::glUniform1i;
-const Message_Function Message::glUniform1iv;
-const Message_Function Message::glUniform2f;
-const Message_Function Message::glUniform2fv;
-const Message_Function Message::glUniform2i;
-const Message_Function Message::glUniform2iv;
-const Message_Function Message::glUniform3f;
-const Message_Function Message::glUniform3fv;
-const Message_Function Message::glUniform3i;
-const Message_Function Message::glUniform3iv;
-const Message_Function Message::glUniform4f;
-const Message_Function Message::glUniform4fv;
-const Message_Function Message::glUniform4i;
-const Message_Function Message::glUniform4iv;
-const Message_Function Message::glUniformMatrix2fv;
-const Message_Function Message::glUniformMatrix3fv;
-const Message_Function Message::glUniformMatrix4fv;
-const Message_Function Message::glUseProgram;
-const Message_Function Message::glValidateProgram;
-const Message_Function Message::glVertexAttrib1f;
-const Message_Function Message::glVertexAttrib1fv;
-const Message_Function Message::glVertexAttrib2f;
-const Message_Function Message::glVertexAttrib2fv;
-const Message_Function Message::glVertexAttrib3f;
-const Message_Function Message::glVertexAttrib3fv;
-const Message_Function Message::glVertexAttrib4f;
-const Message_Function Message::glVertexAttrib4fv;
-const Message_Function Message::glVertexAttribPointer;
-const Message_Function Message::glViewport;
-const Message_Function Message::eglGetDisplay;
-const Message_Function Message::eglInitialize;
-const Message_Function Message::eglTerminate;
-const Message_Function Message::eglGetConfigs;
-const Message_Function Message::eglChooseConfig;
-const Message_Function Message::eglGetConfigAttrib;
-const Message_Function Message::eglCreateWindowSurface;
-const Message_Function Message::eglCreatePixmapSurface;
-const Message_Function Message::eglCreatePbufferSurface;
-const Message_Function Message::eglDestroySurface;
-const Message_Function Message::eglQuerySurface;
-const Message_Function Message::eglCreateContext;
-const Message_Function Message::eglDestroyContext;
-const Message_Function Message::eglMakeCurrent;
-const Message_Function Message::eglGetCurrentContext;
-const Message_Function Message::eglGetCurrentSurface;
-const Message_Function Message::eglGetCurrentDisplay;
-const Message_Function Message::eglQueryContext;
-const Message_Function Message::eglWaitGL;
-const Message_Function Message::eglWaitNative;
-const Message_Function Message::eglSwapBuffers;
-const Message_Function Message::eglCopyBuffers;
-const Message_Function Message::eglGetError;
-const Message_Function Message::eglQueryString;
-const Message_Function Message::eglGetProcAddress;
-const Message_Function Message::eglSurfaceAttrib;
-const Message_Function Message::eglBindTexImage;
-const Message_Function Message::eglReleaseTexImage;
-const Message_Function Message::eglSwapInterval;
-const Message_Function Message::eglBindAPI;
-const Message_Function Message::eglQueryAPI;
-const Message_Function Message::eglWaitClient;
-const Message_Function Message::eglReleaseThread;
-const Message_Function Message::eglCreatePbufferFromClientBuffer;
-const Message_Function Message::eglLockSurfaceKHR;
-const Message_Function Message::eglUnlockSurfaceKHR;
-const Message_Function Message::eglCreateImageKHR;
-const Message_Function Message::eglDestroyImageKHR;
-const Message_Function Message::eglCreateSyncKHR;
-const Message_Function Message::eglDestroySyncKHR;
-const Message_Function Message::eglClientWaitSyncKHR;
-const Message_Function Message::eglGetSyncAttribKHR;
-const Message_Function Message::eglSetSwapRectangleANDROID;
-const Message_Function Message::eglGetRenderBufferANDROID;
-const Message_Function Message::ACK;
-const Message_Function Message::NEG;
-const Message_Function Message::CONTINUE;
-const Message_Function Message::SKIP;
-const Message_Function Message::SETPROP;
-const Message_Function Message::Function_MIN;
-const Message_Function Message::Function_MAX;
-const int Message::Function_ARRAYSIZE;
-#endif // _MSC_VER
-bool Message_Type_IsValid(int value) {
- switch(value) {
- case 0:
- case 1:
- case 2:
- case 3:
- case 4:
- return true;
- default:
- return false;
- }
-}
-
-#ifndef _MSC_VER
-const Message_Type Message::BeforeCall;
-const Message_Type Message::AfterCall;
-const Message_Type Message::AfterGeneratedCall;
-const Message_Type Message::Response;
-const Message_Type Message::CompleteCall;
-const Message_Type Message::Type_MIN;
-const Message_Type Message::Type_MAX;
-const int Message::Type_ARRAYSIZE;
-#endif // _MSC_VER
-bool Message_DataType_IsValid(int value) {
- switch(value) {
- case 0:
- case 1:
- return true;
- default:
- return false;
- }
-}
-
-#ifndef _MSC_VER
-const Message_DataType Message::ReferencedImage;
-const Message_DataType Message::NonreferencedImage;
-const Message_DataType Message::DataType_MIN;
-const Message_DataType Message::DataType_MAX;
-const int Message::DataType_ARRAYSIZE;
-#endif // _MSC_VER
-bool Message_Prop_IsValid(int value) {
- switch(value) {
- case 0:
- case 1:
- case 2:
- case 3:
- case 4:
- return true;
- default:
- return false;
- }
-}
-
-#ifndef _MSC_VER
-const Message_Prop Message::CaptureDraw;
-const Message_Prop Message::TimeMode;
-const Message_Prop Message::ExpectResponse;
-const Message_Prop Message::CaptureSwap;
-const Message_Prop Message::GLConstant;
-const Message_Prop Message::Prop_MIN;
-const Message_Prop Message::Prop_MAX;
-const int Message::Prop_ARRAYSIZE;
-#endif // _MSC_VER
-const ::std::string Message::_default_data_;
-#ifndef _MSC_VER
-const int Message::kContextIdFieldNumber;
-const int Message::kFunctionFieldNumber;
-const int Message::kTypeFieldNumber;
-const int Message::kExpectResponseFieldNumber;
-const int Message::kRetFieldNumber;
-const int Message::kArg0FieldNumber;
-const int Message::kArg1FieldNumber;
-const int Message::kArg2FieldNumber;
-const int Message::kArg3FieldNumber;
-const int Message::kArg4FieldNumber;
-const int Message::kArg5FieldNumber;
-const int Message::kArg6FieldNumber;
-const int Message::kArg7FieldNumber;
-const int Message::kArg8FieldNumber;
-const int Message::kDataFieldNumber;
-const int Message::kDataTypeFieldNumber;
-const int Message::kPixelFormatFieldNumber;
-const int Message::kPixelTypeFieldNumber;
-const int Message::kImageWidthFieldNumber;
-const int Message::kImageHeightFieldNumber;
-const int Message::kTimeFieldNumber;
-const int Message::kPropFieldNumber;
-const int Message::kClockFieldNumber;
-#endif // !_MSC_VER
-
-Message::Message()
- : ::google::protobuf::MessageLite() {
- SharedCtor();
-}
-
-void Message::InitAsDefaultInstance() {
-}
-
-Message::Message(const Message& from)
- : ::google::protobuf::MessageLite() {
- SharedCtor();
- MergeFrom(from);
-}
-
-void Message::SharedCtor() {
- _cached_size_ = 0;
- context_id_ = 0;
- function_ = 187;
- type_ = 0;
- expect_response_ = false;
- ret_ = 0;
- arg0_ = 0;
- arg1_ = 0;
- arg2_ = 0;
- arg3_ = 0;
- arg4_ = 0;
- arg5_ = 0;
- arg6_ = 0;
- arg7_ = 0;
- arg8_ = 0;
- data_ = const_cast< ::std::string*>(&_default_data_);
- data_type_ = 0;
- pixel_format_ = 0;
- pixel_type_ = 0;
- image_width_ = 0;
- image_height_ = 0;
- time_ = 0;
- prop_ = 0;
- clock_ = 0;
- ::memset(_has_bits_, 0, sizeof(_has_bits_));
-}
-
-Message::~Message() {
- SharedDtor();
-}
-
-void Message::SharedDtor() {
- if (data_ != &_default_data_) {
- delete data_;
- }
- if (this != default_instance_) {
- }
-}
-
-void Message::SetCachedSize(int size) const {
- GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
- _cached_size_ = size;
- GOOGLE_SAFE_CONCURRENT_WRITES_END();
-}
-const Message& Message::default_instance() {
- if (default_instance_ == NULL) protobuf_AddDesc_debugger_5fmessage_2eproto(); return *default_instance_;
-}
-
-Message* Message::default_instance_ = NULL;
-
-Message* Message::New() const {
- return new Message;
-}
-
-void Message::Clear() {
- if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) {
- context_id_ = 0;
- function_ = 187;
- type_ = 0;
- expect_response_ = false;
- ret_ = 0;
- arg0_ = 0;
- arg1_ = 0;
- arg2_ = 0;
- }
- if (_has_bits_[8 / 32] & (0xffu << (8 % 32))) {
- arg3_ = 0;
- arg4_ = 0;
- arg5_ = 0;
- arg6_ = 0;
- arg7_ = 0;
- arg8_ = 0;
- if (_has_bit(14)) {
- if (data_ != &_default_data_) {
- data_->clear();
- }
- }
- data_type_ = 0;
- }
- if (_has_bits_[16 / 32] & (0xffu << (16 % 32))) {
- pixel_format_ = 0;
- pixel_type_ = 0;
- image_width_ = 0;
- image_height_ = 0;
- time_ = 0;
- prop_ = 0;
- clock_ = 0;
- }
- ::memset(_has_bits_, 0, sizeof(_has_bits_));
-}
-
-bool Message::MergePartialFromCodedStream(
- ::google::protobuf::io::CodedInputStream* input) {
-#define DO_(EXPRESSION) if (!(EXPRESSION)) return false
- ::google::protobuf::uint32 tag;
- while ((tag = input->ReadTag()) != 0) {
- switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
- // required int32 context_id = 1;
- case 1: {
- if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
- ::google::protobuf::internal::WireFormatLite::WIRETYPE_VARINT) {
- DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
- ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
- input, &context_id_)));
- _set_bit(0);
- } else {
- goto handle_uninterpreted;
- }
- if (input->ExpectTag(16)) goto parse_function;
- break;
- }
-
- // required .com.android.glesv2debugger.Message.Function function = 2 [default = NEG];
- case 2: {
- if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
- ::google::protobuf::internal::WireFormatLite::WIRETYPE_VARINT) {
- parse_function:
- int value;
- DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
- int, ::google::protobuf::internal::WireFormatLite::TYPE_ENUM>(
- input, &value)));
- if (::com::android::glesv2debugger::Message_Function_IsValid(value)) {
- set_function(static_cast< ::com::android::glesv2debugger::Message_Function >(value));
- }
- } else {
- goto handle_uninterpreted;
- }
- if (input->ExpectTag(24)) goto parse_type;
- break;
- }
-
- // required .com.android.glesv2debugger.Message.Type type = 3;
- case 3: {
- if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
- ::google::protobuf::internal::WireFormatLite::WIRETYPE_VARINT) {
- parse_type:
- int value;
- DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
- int, ::google::protobuf::internal::WireFormatLite::TYPE_ENUM>(
- input, &value)));
- if (::com::android::glesv2debugger::Message_Type_IsValid(value)) {
- set_type(static_cast< ::com::android::glesv2debugger::Message_Type >(value));
- }
- } else {
- goto handle_uninterpreted;
- }
- if (input->ExpectTag(32)) goto parse_expect_response;
- break;
- }
-
- // required bool expect_response = 4;
- case 4: {
- if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
- ::google::protobuf::internal::WireFormatLite::WIRETYPE_VARINT) {
- parse_expect_response:
- DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
- bool, ::google::protobuf::internal::WireFormatLite::TYPE_BOOL>(
- input, &expect_response_)));
- _set_bit(3);
- } else {
- goto handle_uninterpreted;
- }
- if (input->ExpectTag(40)) goto parse_ret;
- break;
- }
-
- // optional int32 ret = 5;
- case 5: {
- if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
- ::google::protobuf::internal::WireFormatLite::WIRETYPE_VARINT) {
- parse_ret:
- DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
- ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
- input, &ret_)));
- _set_bit(4);
- } else {
- goto handle_uninterpreted;
- }
- if (input->ExpectTag(48)) goto parse_arg0;
- break;
- }
-
- // optional int32 arg0 = 6;
- case 6: {
- if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
- ::google::protobuf::internal::WireFormatLite::WIRETYPE_VARINT) {
- parse_arg0:
- DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
- ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
- input, &arg0_)));
- _set_bit(5);
- } else {
- goto handle_uninterpreted;
- }
- if (input->ExpectTag(56)) goto parse_arg1;
- break;
- }
-
- // optional int32 arg1 = 7;
- case 7: {
- if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
- ::google::protobuf::internal::WireFormatLite::WIRETYPE_VARINT) {
- parse_arg1:
- DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
- ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
- input, &arg1_)));
- _set_bit(6);
- } else {
- goto handle_uninterpreted;
- }
- if (input->ExpectTag(64)) goto parse_arg2;
- break;
- }
-
- // optional int32 arg2 = 8;
- case 8: {
- if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
- ::google::protobuf::internal::WireFormatLite::WIRETYPE_VARINT) {
- parse_arg2:
- DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
- ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
- input, &arg2_)));
- _set_bit(7);
- } else {
- goto handle_uninterpreted;
- }
- if (input->ExpectTag(72)) goto parse_arg3;
- break;
- }
-
- // optional int32 arg3 = 9;
- case 9: {
- if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
- ::google::protobuf::internal::WireFormatLite::WIRETYPE_VARINT) {
- parse_arg3:
- DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
- ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
- input, &arg3_)));
- _set_bit(8);
- } else {
- goto handle_uninterpreted;
- }
- if (input->ExpectTag(82)) goto parse_data;
- break;
- }
-
- // optional bytes data = 10;
- case 10: {
- if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
- ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) {
- parse_data:
- DO_(::google::protobuf::internal::WireFormatLite::ReadBytes(
- input, this->mutable_data()));
- } else {
- goto handle_uninterpreted;
- }
- if (input->ExpectTag(93)) goto parse_time;
- break;
- }
-
- // optional float time = 11;
- case 11: {
- if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
- ::google::protobuf::internal::WireFormatLite::WIRETYPE_FIXED32) {
- parse_time:
- DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
- float, ::google::protobuf::internal::WireFormatLite::TYPE_FLOAT>(
- input, &time_)));
- _set_bit(20);
- } else {
- goto handle_uninterpreted;
- }
- if (input->ExpectTag(128)) goto parse_arg4;
- break;
- }
-
- // optional int32 arg4 = 16;
- case 16: {
- if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
- ::google::protobuf::internal::WireFormatLite::WIRETYPE_VARINT) {
- parse_arg4:
- DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
- ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
- input, &arg4_)));
- _set_bit(9);
- } else {
- goto handle_uninterpreted;
- }
- if (input->ExpectTag(136)) goto parse_arg5;
- break;
- }
-
- // optional int32 arg5 = 17;
- case 17: {
- if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
- ::google::protobuf::internal::WireFormatLite::WIRETYPE_VARINT) {
- parse_arg5:
- DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
- ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
- input, &arg5_)));
- _set_bit(10);
- } else {
- goto handle_uninterpreted;
- }
- if (input->ExpectTag(144)) goto parse_arg6;
- break;
- }
-
- // optional int32 arg6 = 18;
- case 18: {
- if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
- ::google::protobuf::internal::WireFormatLite::WIRETYPE_VARINT) {
- parse_arg6:
- DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
- ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
- input, &arg6_)));
- _set_bit(11);
- } else {
- goto handle_uninterpreted;
- }
- if (input->ExpectTag(152)) goto parse_arg7;
- break;
- }
-
- // optional int32 arg7 = 19;
- case 19: {
- if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
- ::google::protobuf::internal::WireFormatLite::WIRETYPE_VARINT) {
- parse_arg7:
- DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
- ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
- input, &arg7_)));
- _set_bit(12);
- } else {
- goto handle_uninterpreted;
- }
- if (input->ExpectTag(160)) goto parse_arg8;
- break;
- }
-
- // optional int32 arg8 = 20;
- case 20: {
- if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
- ::google::protobuf::internal::WireFormatLite::WIRETYPE_VARINT) {
- parse_arg8:
- DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
- ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
- input, &arg8_)));
- _set_bit(13);
- } else {
- goto handle_uninterpreted;
- }
- if (input->ExpectTag(168)) goto parse_prop;
- break;
- }
-
- // optional .com.android.glesv2debugger.Message.Prop prop = 21;
- case 21: {
- if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
- ::google::protobuf::internal::WireFormatLite::WIRETYPE_VARINT) {
- parse_prop:
- int value;
- DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
- int, ::google::protobuf::internal::WireFormatLite::TYPE_ENUM>(
- input, &value)));
- if (::com::android::glesv2debugger::Message_Prop_IsValid(value)) {
- set_prop(static_cast< ::com::android::glesv2debugger::Message_Prop >(value));
- }
- } else {
- goto handle_uninterpreted;
- }
- if (input->ExpectTag(181)) goto parse_clock;
- break;
- }
-
- // optional float clock = 22;
- case 22: {
- if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
- ::google::protobuf::internal::WireFormatLite::WIRETYPE_FIXED32) {
- parse_clock:
- DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
- float, ::google::protobuf::internal::WireFormatLite::TYPE_FLOAT>(
- input, &clock_)));
- _set_bit(22);
- } else {
- goto handle_uninterpreted;
- }
- if (input->ExpectTag(184)) goto parse_data_type;
- break;
- }
-
- // optional .com.android.glesv2debugger.Message.DataType data_type = 23;
- case 23: {
- if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
- ::google::protobuf::internal::WireFormatLite::WIRETYPE_VARINT) {
- parse_data_type:
- int value;
- DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
- int, ::google::protobuf::internal::WireFormatLite::TYPE_ENUM>(
- input, &value)));
- if (::com::android::glesv2debugger::Message_DataType_IsValid(value)) {
- set_data_type(static_cast< ::com::android::glesv2debugger::Message_DataType >(value));
- }
- } else {
- goto handle_uninterpreted;
- }
- if (input->ExpectTag(192)) goto parse_pixel_format;
- break;
- }
-
- // optional int32 pixel_format = 24;
- case 24: {
- if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
- ::google::protobuf::internal::WireFormatLite::WIRETYPE_VARINT) {
- parse_pixel_format:
- DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
- ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
- input, &pixel_format_)));
- _set_bit(16);
- } else {
- goto handle_uninterpreted;
- }
- if (input->ExpectTag(200)) goto parse_pixel_type;
- break;
- }
-
- // optional int32 pixel_type = 25;
- case 25: {
- if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
- ::google::protobuf::internal::WireFormatLite::WIRETYPE_VARINT) {
- parse_pixel_type:
- DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
- ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
- input, &pixel_type_)));
- _set_bit(17);
- } else {
- goto handle_uninterpreted;
- }
- if (input->ExpectTag(208)) goto parse_image_width;
- break;
- }
-
- // optional int32 image_width = 26;
- case 26: {
- if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
- ::google::protobuf::internal::WireFormatLite::WIRETYPE_VARINT) {
- parse_image_width:
- DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
- ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
- input, &image_width_)));
- _set_bit(18);
- } else {
- goto handle_uninterpreted;
- }
- if (input->ExpectTag(216)) goto parse_image_height;
- break;
- }
-
- // optional int32 image_height = 27;
- case 27: {
- if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
- ::google::protobuf::internal::WireFormatLite::WIRETYPE_VARINT) {
- parse_image_height:
- DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
- ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
- input, &image_height_)));
- _set_bit(19);
- } else {
- goto handle_uninterpreted;
- }
- if (input->ExpectAtEnd()) return true;
- break;
- }
-
- default: {
- handle_uninterpreted:
- if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
- ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) {
- return true;
- }
- DO_(::google::protobuf::internal::WireFormatLite::SkipField(input, tag));
- break;
- }
- }
- }
- return true;
-#undef DO_
-}
-
-void Message::SerializeWithCachedSizes(
- ::google::protobuf::io::CodedOutputStream* output) const {
- // required int32 context_id = 1;
- if (_has_bit(0)) {
- ::google::protobuf::internal::WireFormatLite::WriteInt32(1, this->context_id(), output);
- }
-
- // required .com.android.glesv2debugger.Message.Function function = 2 [default = NEG];
- if (_has_bit(1)) {
- ::google::protobuf::internal::WireFormatLite::WriteEnum(
- 2, this->function(), output);
- }
-
- // required .com.android.glesv2debugger.Message.Type type = 3;
- if (_has_bit(2)) {
- ::google::protobuf::internal::WireFormatLite::WriteEnum(
- 3, this->type(), output);
- }
-
- // required bool expect_response = 4;
- if (_has_bit(3)) {
- ::google::protobuf::internal::WireFormatLite::WriteBool(4, this->expect_response(), output);
- }
-
- // optional int32 ret = 5;
- if (_has_bit(4)) {
- ::google::protobuf::internal::WireFormatLite::WriteInt32(5, this->ret(), output);
- }
-
- // optional int32 arg0 = 6;
- if (_has_bit(5)) {
- ::google::protobuf::internal::WireFormatLite::WriteInt32(6, this->arg0(), output);
- }
-
- // optional int32 arg1 = 7;
- if (_has_bit(6)) {
- ::google::protobuf::internal::WireFormatLite::WriteInt32(7, this->arg1(), output);
- }
-
- // optional int32 arg2 = 8;
- if (_has_bit(7)) {
- ::google::protobuf::internal::WireFormatLite::WriteInt32(8, this->arg2(), output);
- }
-
- // optional int32 arg3 = 9;
- if (_has_bit(8)) {
- ::google::protobuf::internal::WireFormatLite::WriteInt32(9, this->arg3(), output);
- }
-
- // optional bytes data = 10;
- if (_has_bit(14)) {
- ::google::protobuf::internal::WireFormatLite::WriteBytes(
- 10, this->data(), output);
- }
-
- // optional float time = 11;
- if (_has_bit(20)) {
- ::google::protobuf::internal::WireFormatLite::WriteFloat(11, this->time(), output);
- }
-
- // optional int32 arg4 = 16;
- if (_has_bit(9)) {
- ::google::protobuf::internal::WireFormatLite::WriteInt32(16, this->arg4(), output);
- }
-
- // optional int32 arg5 = 17;
- if (_has_bit(10)) {
- ::google::protobuf::internal::WireFormatLite::WriteInt32(17, this->arg5(), output);
- }
-
- // optional int32 arg6 = 18;
- if (_has_bit(11)) {
- ::google::protobuf::internal::WireFormatLite::WriteInt32(18, this->arg6(), output);
- }
-
- // optional int32 arg7 = 19;
- if (_has_bit(12)) {
- ::google::protobuf::internal::WireFormatLite::WriteInt32(19, this->arg7(), output);
- }
-
- // optional int32 arg8 = 20;
- if (_has_bit(13)) {
- ::google::protobuf::internal::WireFormatLite::WriteInt32(20, this->arg8(), output);
- }
-
- // optional .com.android.glesv2debugger.Message.Prop prop = 21;
- if (_has_bit(21)) {
- ::google::protobuf::internal::WireFormatLite::WriteEnum(
- 21, this->prop(), output);
- }
-
- // optional float clock = 22;
- if (_has_bit(22)) {
- ::google::protobuf::internal::WireFormatLite::WriteFloat(22, this->clock(), output);
- }
-
- // optional .com.android.glesv2debugger.Message.DataType data_type = 23;
- if (_has_bit(15)) {
- ::google::protobuf::internal::WireFormatLite::WriteEnum(
- 23, this->data_type(), output);
- }
-
- // optional int32 pixel_format = 24;
- if (_has_bit(16)) {
- ::google::protobuf::internal::WireFormatLite::WriteInt32(24, this->pixel_format(), output);
- }
-
- // optional int32 pixel_type = 25;
- if (_has_bit(17)) {
- ::google::protobuf::internal::WireFormatLite::WriteInt32(25, this->pixel_type(), output);
- }
-
- // optional int32 image_width = 26;
- if (_has_bit(18)) {
- ::google::protobuf::internal::WireFormatLite::WriteInt32(26, this->image_width(), output);
- }
-
- // optional int32 image_height = 27;
- if (_has_bit(19)) {
- ::google::protobuf::internal::WireFormatLite::WriteInt32(27, this->image_height(), output);
- }
-
-}
-
-int Message::ByteSize() const {
- int total_size = 0;
-
- if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) {
- // required int32 context_id = 1;
- if (has_context_id()) {
- total_size += 1 +
- ::google::protobuf::internal::WireFormatLite::Int32Size(
- this->context_id());
- }
-
- // required .com.android.glesv2debugger.Message.Function function = 2 [default = NEG];
- if (has_function()) {
- total_size += 1 +
- ::google::protobuf::internal::WireFormatLite::EnumSize(this->function());
- }
-
- // required .com.android.glesv2debugger.Message.Type type = 3;
- if (has_type()) {
- total_size += 1 +
- ::google::protobuf::internal::WireFormatLite::EnumSize(this->type());
- }
-
- // required bool expect_response = 4;
- if (has_expect_response()) {
- total_size += 1 + 1;
- }
-
- // optional int32 ret = 5;
- if (has_ret()) {
- total_size += 1 +
- ::google::protobuf::internal::WireFormatLite::Int32Size(
- this->ret());
- }
-
- // optional int32 arg0 = 6;
- if (has_arg0()) {
- total_size += 1 +
- ::google::protobuf::internal::WireFormatLite::Int32Size(
- this->arg0());
- }
-
- // optional int32 arg1 = 7;
- if (has_arg1()) {
- total_size += 1 +
- ::google::protobuf::internal::WireFormatLite::Int32Size(
- this->arg1());
- }
-
- // optional int32 arg2 = 8;
- if (has_arg2()) {
- total_size += 1 +
- ::google::protobuf::internal::WireFormatLite::Int32Size(
- this->arg2());
- }
-
- }
- if (_has_bits_[8 / 32] & (0xffu << (8 % 32))) {
- // optional int32 arg3 = 9;
- if (has_arg3()) {
- total_size += 1 +
- ::google::protobuf::internal::WireFormatLite::Int32Size(
- this->arg3());
- }
-
- // optional int32 arg4 = 16;
- if (has_arg4()) {
- total_size += 2 +
- ::google::protobuf::internal::WireFormatLite::Int32Size(
- this->arg4());
- }
-
- // optional int32 arg5 = 17;
- if (has_arg5()) {
- total_size += 2 +
- ::google::protobuf::internal::WireFormatLite::Int32Size(
- this->arg5());
- }
-
- // optional int32 arg6 = 18;
- if (has_arg6()) {
- total_size += 2 +
- ::google::protobuf::internal::WireFormatLite::Int32Size(
- this->arg6());
- }
-
- // optional int32 arg7 = 19;
- if (has_arg7()) {
- total_size += 2 +
- ::google::protobuf::internal::WireFormatLite::Int32Size(
- this->arg7());
- }
-
- // optional int32 arg8 = 20;
- if (has_arg8()) {
- total_size += 2 +
- ::google::protobuf::internal::WireFormatLite::Int32Size(
- this->arg8());
- }
-
- // optional bytes data = 10;
- if (has_data()) {
- total_size += 1 +
- ::google::protobuf::internal::WireFormatLite::BytesSize(
- this->data());
- }
-
- // optional .com.android.glesv2debugger.Message.DataType data_type = 23;
- if (has_data_type()) {
- total_size += 2 +
- ::google::protobuf::internal::WireFormatLite::EnumSize(this->data_type());
- }
-
- }
- if (_has_bits_[16 / 32] & (0xffu << (16 % 32))) {
- // optional int32 pixel_format = 24;
- if (has_pixel_format()) {
- total_size += 2 +
- ::google::protobuf::internal::WireFormatLite::Int32Size(
- this->pixel_format());
- }
-
- // optional int32 pixel_type = 25;
- if (has_pixel_type()) {
- total_size += 2 +
- ::google::protobuf::internal::WireFormatLite::Int32Size(
- this->pixel_type());
- }
-
- // optional int32 image_width = 26;
- if (has_image_width()) {
- total_size += 2 +
- ::google::protobuf::internal::WireFormatLite::Int32Size(
- this->image_width());
- }
-
- // optional int32 image_height = 27;
- if (has_image_height()) {
- total_size += 2 +
- ::google::protobuf::internal::WireFormatLite::Int32Size(
- this->image_height());
- }
-
- // optional float time = 11;
- if (has_time()) {
- total_size += 1 + 4;
- }
-
- // optional .com.android.glesv2debugger.Message.Prop prop = 21;
- if (has_prop()) {
- total_size += 2 +
- ::google::protobuf::internal::WireFormatLite::EnumSize(this->prop());
- }
-
- // optional float clock = 22;
- if (has_clock()) {
- total_size += 2 + 4;
- }
-
- }
- GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
- _cached_size_ = total_size;
- GOOGLE_SAFE_CONCURRENT_WRITES_END();
- return total_size;
-}
-
-void Message::CheckTypeAndMergeFrom(
- const ::google::protobuf::MessageLite& from) {
- MergeFrom(*::google::protobuf::down_cast<const Message*>(&from));
-}
-
-void Message::MergeFrom(const Message& from) {
- GOOGLE_CHECK_NE(&from, this);
- if (from._has_bits_[0 / 32] & (0xffu << (0 % 32))) {
- if (from._has_bit(0)) {
- set_context_id(from.context_id());
- }
- if (from._has_bit(1)) {
- set_function(from.function());
- }
- if (from._has_bit(2)) {
- set_type(from.type());
- }
- if (from._has_bit(3)) {
- set_expect_response(from.expect_response());
- }
- if (from._has_bit(4)) {
- set_ret(from.ret());
- }
- if (from._has_bit(5)) {
- set_arg0(from.arg0());
- }
- if (from._has_bit(6)) {
- set_arg1(from.arg1());
- }
- if (from._has_bit(7)) {
- set_arg2(from.arg2());
- }
- }
- if (from._has_bits_[8 / 32] & (0xffu << (8 % 32))) {
- if (from._has_bit(8)) {
- set_arg3(from.arg3());
- }
- if (from._has_bit(9)) {
- set_arg4(from.arg4());
- }
- if (from._has_bit(10)) {
- set_arg5(from.arg5());
- }
- if (from._has_bit(11)) {
- set_arg6(from.arg6());
- }
- if (from._has_bit(12)) {
- set_arg7(from.arg7());
- }
- if (from._has_bit(13)) {
- set_arg8(from.arg8());
- }
- if (from._has_bit(14)) {
- set_data(from.data());
- }
- if (from._has_bit(15)) {
- set_data_type(from.data_type());
- }
- }
- if (from._has_bits_[16 / 32] & (0xffu << (16 % 32))) {
- if (from._has_bit(16)) {
- set_pixel_format(from.pixel_format());
- }
- if (from._has_bit(17)) {
- set_pixel_type(from.pixel_type());
- }
- if (from._has_bit(18)) {
- set_image_width(from.image_width());
- }
- if (from._has_bit(19)) {
- set_image_height(from.image_height());
- }
- if (from._has_bit(20)) {
- set_time(from.time());
- }
- if (from._has_bit(21)) {
- set_prop(from.prop());
- }
- if (from._has_bit(22)) {
- set_clock(from.clock());
- }
- }
-}
-
-void Message::CopyFrom(const Message& from) {
- if (&from == this) return;
- Clear();
- MergeFrom(from);
-}
-
-bool Message::IsInitialized() const {
- if ((_has_bits_[0] & 0x0000000f) != 0x0000000f) return false;
-
- return true;
-}
-
-void Message::Swap(Message* other) {
- if (other != this) {
- std::swap(context_id_, other->context_id_);
- std::swap(function_, other->function_);
- std::swap(type_, other->type_);
- std::swap(expect_response_, other->expect_response_);
- std::swap(ret_, other->ret_);
- std::swap(arg0_, other->arg0_);
- std::swap(arg1_, other->arg1_);
- std::swap(arg2_, other->arg2_);
- std::swap(arg3_, other->arg3_);
- std::swap(arg4_, other->arg4_);
- std::swap(arg5_, other->arg5_);
- std::swap(arg6_, other->arg6_);
- std::swap(arg7_, other->arg7_);
- std::swap(arg8_, other->arg8_);
- std::swap(data_, other->data_);
- std::swap(data_type_, other->data_type_);
- std::swap(pixel_format_, other->pixel_format_);
- std::swap(pixel_type_, other->pixel_type_);
- std::swap(image_width_, other->image_width_);
- std::swap(image_height_, other->image_height_);
- std::swap(time_, other->time_);
- std::swap(prop_, other->prop_);
- std::swap(clock_, other->clock_);
- std::swap(_has_bits_[0], other->_has_bits_[0]);
- std::swap(_cached_size_, other->_cached_size_);
- }
-}
-
-::std::string Message::GetTypeName() const {
- return "com.android.glesv2debugger.Message";
-}
-
-
-// @@protoc_insertion_point(namespace_scope)
-
-} // namespace glesv2debugger
-} // namespace android
-} // namespace com
-
-// @@protoc_insertion_point(global_scope)
diff --git a/opengl/libs/GLES2_dbg/src/debugger_message.pb.h b/opengl/libs/GLES2_dbg/src/debugger_message.pb.h
deleted file mode 100644
index 5c94664..0000000
--- a/opengl/libs/GLES2_dbg/src/debugger_message.pb.h
+++ /dev/null
@@ -1,1187 +0,0 @@
-// Generated by the protocol buffer compiler. DO NOT EDIT!
-// source: debugger_message.proto
-
-#ifndef PROTOBUF_debugger_5fmessage_2eproto__INCLUDED
-#define PROTOBUF_debugger_5fmessage_2eproto__INCLUDED
-
-#include <string>
-
-#include <google/protobuf/stubs/common.h>
-
-#if GOOGLE_PROTOBUF_VERSION < 2003000
-#error This file was generated by a newer version of protoc which is
-#error incompatible with your Protocol Buffer headers. Please update
-#error your headers.
-#endif
-#if 2003000 < GOOGLE_PROTOBUF_MIN_PROTOC_VERSION
-#error This file was generated by an older version of protoc which is
-#error incompatible with your Protocol Buffer headers. Please
-#error regenerate this file with a newer version of protoc.
-#endif
-
-#include <google/protobuf/generated_message_util.h>
-#include <google/protobuf/repeated_field.h>
-#include <google/protobuf/extension_set.h>
-// @@protoc_insertion_point(includes)
-
-namespace com {
-namespace android {
-namespace glesv2debugger {
-
-// Internal implementation detail -- do not call these.
-void protobuf_AddDesc_debugger_5fmessage_2eproto();
-void protobuf_AssignDesc_debugger_5fmessage_2eproto();
-void protobuf_ShutdownFile_debugger_5fmessage_2eproto();
-
-class Message;
-
-enum Message_Function {
- Message_Function_glActiveTexture = 0,
- Message_Function_glAttachShader = 1,
- Message_Function_glBindAttribLocation = 2,
- Message_Function_glBindBuffer = 3,
- Message_Function_glBindFramebuffer = 4,
- Message_Function_glBindRenderbuffer = 5,
- Message_Function_glBindTexture = 6,
- Message_Function_glBlendColor = 7,
- Message_Function_glBlendEquation = 8,
- Message_Function_glBlendEquationSeparate = 9,
- Message_Function_glBlendFunc = 10,
- Message_Function_glBlendFuncSeparate = 11,
- Message_Function_glBufferData = 12,
- Message_Function_glBufferSubData = 13,
- Message_Function_glCheckFramebufferStatus = 14,
- Message_Function_glClear = 15,
- Message_Function_glClearColor = 16,
- Message_Function_glClearDepthf = 17,
- Message_Function_glClearStencil = 18,
- Message_Function_glColorMask = 19,
- Message_Function_glCompileShader = 20,
- Message_Function_glCompressedTexImage2D = 21,
- Message_Function_glCompressedTexSubImage2D = 22,
- Message_Function_glCopyTexImage2D = 23,
- Message_Function_glCopyTexSubImage2D = 24,
- Message_Function_glCreateProgram = 25,
- Message_Function_glCreateShader = 26,
- Message_Function_glCullFace = 27,
- Message_Function_glDeleteBuffers = 28,
- Message_Function_glDeleteFramebuffers = 29,
- Message_Function_glDeleteProgram = 30,
- Message_Function_glDeleteRenderbuffers = 31,
- Message_Function_glDeleteShader = 32,
- Message_Function_glDeleteTextures = 33,
- Message_Function_glDepthFunc = 34,
- Message_Function_glDepthMask = 35,
- Message_Function_glDepthRangef = 36,
- Message_Function_glDetachShader = 37,
- Message_Function_glDisable = 38,
- Message_Function_glDisableVertexAttribArray = 39,
- Message_Function_glDrawArrays = 40,
- Message_Function_glDrawElements = 41,
- Message_Function_glEnable = 42,
- Message_Function_glEnableVertexAttribArray = 43,
- Message_Function_glFinish = 44,
- Message_Function_glFlush = 45,
- Message_Function_glFramebufferRenderbuffer = 46,
- Message_Function_glFramebufferTexture2D = 47,
- Message_Function_glFrontFace = 48,
- Message_Function_glGenBuffers = 49,
- Message_Function_glGenerateMipmap = 50,
- Message_Function_glGenFramebuffers = 51,
- Message_Function_glGenRenderbuffers = 52,
- Message_Function_glGenTextures = 53,
- Message_Function_glGetActiveAttrib = 54,
- Message_Function_glGetActiveUniform = 55,
- Message_Function_glGetAttachedShaders = 56,
- Message_Function_glGetAttribLocation = 57,
- Message_Function_glGetBooleanv = 58,
- Message_Function_glGetBufferParameteriv = 59,
- Message_Function_glGetError = 60,
- Message_Function_glGetFloatv = 61,
- Message_Function_glGetFramebufferAttachmentParameteriv = 62,
- Message_Function_glGetIntegerv = 63,
- Message_Function_glGetProgramiv = 64,
- Message_Function_glGetProgramInfoLog = 65,
- Message_Function_glGetRenderbufferParameteriv = 66,
- Message_Function_glGetShaderiv = 67,
- Message_Function_glGetShaderInfoLog = 68,
- Message_Function_glGetShaderPrecisionFormat = 69,
- Message_Function_glGetShaderSource = 70,
- Message_Function_glGetString = 71,
- Message_Function_glGetTexParameterfv = 72,
- Message_Function_glGetTexParameteriv = 73,
- Message_Function_glGetUniformfv = 74,
- Message_Function_glGetUniformiv = 75,
- Message_Function_glGetUniformLocation = 76,
- Message_Function_glGetVertexAttribfv = 77,
- Message_Function_glGetVertexAttribiv = 78,
- Message_Function_glGetVertexAttribPointerv = 79,
- Message_Function_glHint = 80,
- Message_Function_glIsBuffer = 81,
- Message_Function_glIsEnabled = 82,
- Message_Function_glIsFramebuffer = 83,
- Message_Function_glIsProgram = 84,
- Message_Function_glIsRenderbuffer = 85,
- Message_Function_glIsShader = 86,
- Message_Function_glIsTexture = 87,
- Message_Function_glLineWidth = 88,
- Message_Function_glLinkProgram = 89,
- Message_Function_glPixelStorei = 90,
- Message_Function_glPolygonOffset = 91,
- Message_Function_glReadPixels = 92,
- Message_Function_glReleaseShaderCompiler = 93,
- Message_Function_glRenderbufferStorage = 94,
- Message_Function_glSampleCoverage = 95,
- Message_Function_glScissor = 96,
- Message_Function_glShaderBinary = 97,
- Message_Function_glShaderSource = 98,
- Message_Function_glStencilFunc = 99,
- Message_Function_glStencilFuncSeparate = 100,
- Message_Function_glStencilMask = 101,
- Message_Function_glStencilMaskSeparate = 102,
- Message_Function_glStencilOp = 103,
- Message_Function_glStencilOpSeparate = 104,
- Message_Function_glTexImage2D = 105,
- Message_Function_glTexParameterf = 106,
- Message_Function_glTexParameterfv = 107,
- Message_Function_glTexParameteri = 108,
- Message_Function_glTexParameteriv = 109,
- Message_Function_glTexSubImage2D = 110,
- Message_Function_glUniform1f = 111,
- Message_Function_glUniform1fv = 112,
- Message_Function_glUniform1i = 113,
- Message_Function_glUniform1iv = 114,
- Message_Function_glUniform2f = 115,
- Message_Function_glUniform2fv = 116,
- Message_Function_glUniform2i = 117,
- Message_Function_glUniform2iv = 118,
- Message_Function_glUniform3f = 119,
- Message_Function_glUniform3fv = 120,
- Message_Function_glUniform3i = 121,
- Message_Function_glUniform3iv = 122,
- Message_Function_glUniform4f = 123,
- Message_Function_glUniform4fv = 124,
- Message_Function_glUniform4i = 125,
- Message_Function_glUniform4iv = 126,
- Message_Function_glUniformMatrix2fv = 127,
- Message_Function_glUniformMatrix3fv = 128,
- Message_Function_glUniformMatrix4fv = 129,
- Message_Function_glUseProgram = 130,
- Message_Function_glValidateProgram = 131,
- Message_Function_glVertexAttrib1f = 132,
- Message_Function_glVertexAttrib1fv = 133,
- Message_Function_glVertexAttrib2f = 134,
- Message_Function_glVertexAttrib2fv = 135,
- Message_Function_glVertexAttrib3f = 136,
- Message_Function_glVertexAttrib3fv = 137,
- Message_Function_glVertexAttrib4f = 138,
- Message_Function_glVertexAttrib4fv = 139,
- Message_Function_glVertexAttribPointer = 140,
- Message_Function_glViewport = 141,
- Message_Function_eglGetDisplay = 142,
- Message_Function_eglInitialize = 143,
- Message_Function_eglTerminate = 144,
- Message_Function_eglGetConfigs = 145,
- Message_Function_eglChooseConfig = 146,
- Message_Function_eglGetConfigAttrib = 147,
- Message_Function_eglCreateWindowSurface = 148,
- Message_Function_eglCreatePixmapSurface = 149,
- Message_Function_eglCreatePbufferSurface = 150,
- Message_Function_eglDestroySurface = 151,
- Message_Function_eglQuerySurface = 152,
- Message_Function_eglCreateContext = 153,
- Message_Function_eglDestroyContext = 154,
- Message_Function_eglMakeCurrent = 155,
- Message_Function_eglGetCurrentContext = 156,
- Message_Function_eglGetCurrentSurface = 157,
- Message_Function_eglGetCurrentDisplay = 158,
- Message_Function_eglQueryContext = 159,
- Message_Function_eglWaitGL = 160,
- Message_Function_eglWaitNative = 161,
- Message_Function_eglSwapBuffers = 162,
- Message_Function_eglCopyBuffers = 163,
- Message_Function_eglGetError = 164,
- Message_Function_eglQueryString = 165,
- Message_Function_eglGetProcAddress = 166,
- Message_Function_eglSurfaceAttrib = 167,
- Message_Function_eglBindTexImage = 168,
- Message_Function_eglReleaseTexImage = 169,
- Message_Function_eglSwapInterval = 170,
- Message_Function_eglBindAPI = 171,
- Message_Function_eglQueryAPI = 172,
- Message_Function_eglWaitClient = 173,
- Message_Function_eglReleaseThread = 174,
- Message_Function_eglCreatePbufferFromClientBuffer = 175,
- Message_Function_eglLockSurfaceKHR = 176,
- Message_Function_eglUnlockSurfaceKHR = 177,
- Message_Function_eglCreateImageKHR = 178,
- Message_Function_eglDestroyImageKHR = 179,
- Message_Function_eglCreateSyncKHR = 180,
- Message_Function_eglDestroySyncKHR = 181,
- Message_Function_eglClientWaitSyncKHR = 182,
- Message_Function_eglGetSyncAttribKHR = 183,
- Message_Function_eglSetSwapRectangleANDROID = 184,
- Message_Function_eglGetRenderBufferANDROID = 185,
- Message_Function_ACK = 186,
- Message_Function_NEG = 187,
- Message_Function_CONTINUE = 188,
- Message_Function_SKIP = 189,
- Message_Function_SETPROP = 190
-};
-bool Message_Function_IsValid(int value);
-const Message_Function Message_Function_Function_MIN = Message_Function_glActiveTexture;
-const Message_Function Message_Function_Function_MAX = Message_Function_SETPROP;
-const int Message_Function_Function_ARRAYSIZE = Message_Function_Function_MAX + 1;
-
-enum Message_Type {
- Message_Type_BeforeCall = 0,
- Message_Type_AfterCall = 1,
- Message_Type_AfterGeneratedCall = 2,
- Message_Type_Response = 3,
- Message_Type_CompleteCall = 4
-};
-bool Message_Type_IsValid(int value);
-const Message_Type Message_Type_Type_MIN = Message_Type_BeforeCall;
-const Message_Type Message_Type_Type_MAX = Message_Type_CompleteCall;
-const int Message_Type_Type_ARRAYSIZE = Message_Type_Type_MAX + 1;
-
-enum Message_DataType {
- Message_DataType_ReferencedImage = 0,
- Message_DataType_NonreferencedImage = 1
-};
-bool Message_DataType_IsValid(int value);
-const Message_DataType Message_DataType_DataType_MIN = Message_DataType_ReferencedImage;
-const Message_DataType Message_DataType_DataType_MAX = Message_DataType_NonreferencedImage;
-const int Message_DataType_DataType_ARRAYSIZE = Message_DataType_DataType_MAX + 1;
-
-enum Message_Prop {
- Message_Prop_CaptureDraw = 0,
- Message_Prop_TimeMode = 1,
- Message_Prop_ExpectResponse = 2,
- Message_Prop_CaptureSwap = 3,
- Message_Prop_GLConstant = 4
-};
-bool Message_Prop_IsValid(int value);
-const Message_Prop Message_Prop_Prop_MIN = Message_Prop_CaptureDraw;
-const Message_Prop Message_Prop_Prop_MAX = Message_Prop_GLConstant;
-const int Message_Prop_Prop_ARRAYSIZE = Message_Prop_Prop_MAX + 1;
-
-// ===================================================================
-
-class Message : public ::google::protobuf::MessageLite {
- public:
- Message();
- virtual ~Message();
-
- Message(const Message& from);
-
- inline Message& operator=(const Message& from) {
- CopyFrom(from);
- return *this;
- }
-
- static const Message& default_instance();
-
- void Swap(Message* other);
-
- // implements Message ----------------------------------------------
-
- Message* New() const;
- void CheckTypeAndMergeFrom(const ::google::protobuf::MessageLite& from);
- void CopyFrom(const Message& from);
- void MergeFrom(const Message& from);
- void Clear();
- bool IsInitialized() const;
-
- int ByteSize() const;
- bool MergePartialFromCodedStream(
- ::google::protobuf::io::CodedInputStream* input);
- void SerializeWithCachedSizes(
- ::google::protobuf::io::CodedOutputStream* output) const;
- int GetCachedSize() const { return _cached_size_; }
- private:
- void SharedCtor();
- void SharedDtor();
- void SetCachedSize(int size) const;
- public:
-
- ::std::string GetTypeName() const;
-
- // nested types ----------------------------------------------------
-
- typedef Message_Function Function;
- static const Function glActiveTexture = Message_Function_glActiveTexture;
- static const Function glAttachShader = Message_Function_glAttachShader;
- static const Function glBindAttribLocation = Message_Function_glBindAttribLocation;
- static const Function glBindBuffer = Message_Function_glBindBuffer;
- static const Function glBindFramebuffer = Message_Function_glBindFramebuffer;
- static const Function glBindRenderbuffer = Message_Function_glBindRenderbuffer;
- static const Function glBindTexture = Message_Function_glBindTexture;
- static const Function glBlendColor = Message_Function_glBlendColor;
- static const Function glBlendEquation = Message_Function_glBlendEquation;
- static const Function glBlendEquationSeparate = Message_Function_glBlendEquationSeparate;
- static const Function glBlendFunc = Message_Function_glBlendFunc;
- static const Function glBlendFuncSeparate = Message_Function_glBlendFuncSeparate;
- static const Function glBufferData = Message_Function_glBufferData;
- static const Function glBufferSubData = Message_Function_glBufferSubData;
- static const Function glCheckFramebufferStatus = Message_Function_glCheckFramebufferStatus;
- static const Function glClear = Message_Function_glClear;
- static const Function glClearColor = Message_Function_glClearColor;
- static const Function glClearDepthf = Message_Function_glClearDepthf;
- static const Function glClearStencil = Message_Function_glClearStencil;
- static const Function glColorMask = Message_Function_glColorMask;
- static const Function glCompileShader = Message_Function_glCompileShader;
- static const Function glCompressedTexImage2D = Message_Function_glCompressedTexImage2D;
- static const Function glCompressedTexSubImage2D = Message_Function_glCompressedTexSubImage2D;
- static const Function glCopyTexImage2D = Message_Function_glCopyTexImage2D;
- static const Function glCopyTexSubImage2D = Message_Function_glCopyTexSubImage2D;
- static const Function glCreateProgram = Message_Function_glCreateProgram;
- static const Function glCreateShader = Message_Function_glCreateShader;
- static const Function glCullFace = Message_Function_glCullFace;
- static const Function glDeleteBuffers = Message_Function_glDeleteBuffers;
- static const Function glDeleteFramebuffers = Message_Function_glDeleteFramebuffers;
- static const Function glDeleteProgram = Message_Function_glDeleteProgram;
- static const Function glDeleteRenderbuffers = Message_Function_glDeleteRenderbuffers;
- static const Function glDeleteShader = Message_Function_glDeleteShader;
- static const Function glDeleteTextures = Message_Function_glDeleteTextures;
- static const Function glDepthFunc = Message_Function_glDepthFunc;
- static const Function glDepthMask = Message_Function_glDepthMask;
- static const Function glDepthRangef = Message_Function_glDepthRangef;
- static const Function glDetachShader = Message_Function_glDetachShader;
- static const Function glDisable = Message_Function_glDisable;
- static const Function glDisableVertexAttribArray = Message_Function_glDisableVertexAttribArray;
- static const Function glDrawArrays = Message_Function_glDrawArrays;
- static const Function glDrawElements = Message_Function_glDrawElements;
- static const Function glEnable = Message_Function_glEnable;
- static const Function glEnableVertexAttribArray = Message_Function_glEnableVertexAttribArray;
- static const Function glFinish = Message_Function_glFinish;
- static const Function glFlush = Message_Function_glFlush;
- static const Function glFramebufferRenderbuffer = Message_Function_glFramebufferRenderbuffer;
- static const Function glFramebufferTexture2D = Message_Function_glFramebufferTexture2D;
- static const Function glFrontFace = Message_Function_glFrontFace;
- static const Function glGenBuffers = Message_Function_glGenBuffers;
- static const Function glGenerateMipmap = Message_Function_glGenerateMipmap;
- static const Function glGenFramebuffers = Message_Function_glGenFramebuffers;
- static const Function glGenRenderbuffers = Message_Function_glGenRenderbuffers;
- static const Function glGenTextures = Message_Function_glGenTextures;
- static const Function glGetActiveAttrib = Message_Function_glGetActiveAttrib;
- static const Function glGetActiveUniform = Message_Function_glGetActiveUniform;
- static const Function glGetAttachedShaders = Message_Function_glGetAttachedShaders;
- static const Function glGetAttribLocation = Message_Function_glGetAttribLocation;
- static const Function glGetBooleanv = Message_Function_glGetBooleanv;
- static const Function glGetBufferParameteriv = Message_Function_glGetBufferParameteriv;
- static const Function glGetError = Message_Function_glGetError;
- static const Function glGetFloatv = Message_Function_glGetFloatv;
- static const Function glGetFramebufferAttachmentParameteriv = Message_Function_glGetFramebufferAttachmentParameteriv;
- static const Function glGetIntegerv = Message_Function_glGetIntegerv;
- static const Function glGetProgramiv = Message_Function_glGetProgramiv;
- static const Function glGetProgramInfoLog = Message_Function_glGetProgramInfoLog;
- static const Function glGetRenderbufferParameteriv = Message_Function_glGetRenderbufferParameteriv;
- static const Function glGetShaderiv = Message_Function_glGetShaderiv;
- static const Function glGetShaderInfoLog = Message_Function_glGetShaderInfoLog;
- static const Function glGetShaderPrecisionFormat = Message_Function_glGetShaderPrecisionFormat;
- static const Function glGetShaderSource = Message_Function_glGetShaderSource;
- static const Function glGetString = Message_Function_glGetString;
- static const Function glGetTexParameterfv = Message_Function_glGetTexParameterfv;
- static const Function glGetTexParameteriv = Message_Function_glGetTexParameteriv;
- static const Function glGetUniformfv = Message_Function_glGetUniformfv;
- static const Function glGetUniformiv = Message_Function_glGetUniformiv;
- static const Function glGetUniformLocation = Message_Function_glGetUniformLocation;
- static const Function glGetVertexAttribfv = Message_Function_glGetVertexAttribfv;
- static const Function glGetVertexAttribiv = Message_Function_glGetVertexAttribiv;
- static const Function glGetVertexAttribPointerv = Message_Function_glGetVertexAttribPointerv;
- static const Function glHint = Message_Function_glHint;
- static const Function glIsBuffer = Message_Function_glIsBuffer;
- static const Function glIsEnabled = Message_Function_glIsEnabled;
- static const Function glIsFramebuffer = Message_Function_glIsFramebuffer;
- static const Function glIsProgram = Message_Function_glIsProgram;
- static const Function glIsRenderbuffer = Message_Function_glIsRenderbuffer;
- static const Function glIsShader = Message_Function_glIsShader;
- static const Function glIsTexture = Message_Function_glIsTexture;
- static const Function glLineWidth = Message_Function_glLineWidth;
- static const Function glLinkProgram = Message_Function_glLinkProgram;
- static const Function glPixelStorei = Message_Function_glPixelStorei;
- static const Function glPolygonOffset = Message_Function_glPolygonOffset;
- static const Function glReadPixels = Message_Function_glReadPixels;
- static const Function glReleaseShaderCompiler = Message_Function_glReleaseShaderCompiler;
- static const Function glRenderbufferStorage = Message_Function_glRenderbufferStorage;
- static const Function glSampleCoverage = Message_Function_glSampleCoverage;
- static const Function glScissor = Message_Function_glScissor;
- static const Function glShaderBinary = Message_Function_glShaderBinary;
- static const Function glShaderSource = Message_Function_glShaderSource;
- static const Function glStencilFunc = Message_Function_glStencilFunc;
- static const Function glStencilFuncSeparate = Message_Function_glStencilFuncSeparate;
- static const Function glStencilMask = Message_Function_glStencilMask;
- static const Function glStencilMaskSeparate = Message_Function_glStencilMaskSeparate;
- static const Function glStencilOp = Message_Function_glStencilOp;
- static const Function glStencilOpSeparate = Message_Function_glStencilOpSeparate;
- static const Function glTexImage2D = Message_Function_glTexImage2D;
- static const Function glTexParameterf = Message_Function_glTexParameterf;
- static const Function glTexParameterfv = Message_Function_glTexParameterfv;
- static const Function glTexParameteri = Message_Function_glTexParameteri;
- static const Function glTexParameteriv = Message_Function_glTexParameteriv;
- static const Function glTexSubImage2D = Message_Function_glTexSubImage2D;
- static const Function glUniform1f = Message_Function_glUniform1f;
- static const Function glUniform1fv = Message_Function_glUniform1fv;
- static const Function glUniform1i = Message_Function_glUniform1i;
- static const Function glUniform1iv = Message_Function_glUniform1iv;
- static const Function glUniform2f = Message_Function_glUniform2f;
- static const Function glUniform2fv = Message_Function_glUniform2fv;
- static const Function glUniform2i = Message_Function_glUniform2i;
- static const Function glUniform2iv = Message_Function_glUniform2iv;
- static const Function glUniform3f = Message_Function_glUniform3f;
- static const Function glUniform3fv = Message_Function_glUniform3fv;
- static const Function glUniform3i = Message_Function_glUniform3i;
- static const Function glUniform3iv = Message_Function_glUniform3iv;
- static const Function glUniform4f = Message_Function_glUniform4f;
- static const Function glUniform4fv = Message_Function_glUniform4fv;
- static const Function glUniform4i = Message_Function_glUniform4i;
- static const Function glUniform4iv = Message_Function_glUniform4iv;
- static const Function glUniformMatrix2fv = Message_Function_glUniformMatrix2fv;
- static const Function glUniformMatrix3fv = Message_Function_glUniformMatrix3fv;
- static const Function glUniformMatrix4fv = Message_Function_glUniformMatrix4fv;
- static const Function glUseProgram = Message_Function_glUseProgram;
- static const Function glValidateProgram = Message_Function_glValidateProgram;
- static const Function glVertexAttrib1f = Message_Function_glVertexAttrib1f;
- static const Function glVertexAttrib1fv = Message_Function_glVertexAttrib1fv;
- static const Function glVertexAttrib2f = Message_Function_glVertexAttrib2f;
- static const Function glVertexAttrib2fv = Message_Function_glVertexAttrib2fv;
- static const Function glVertexAttrib3f = Message_Function_glVertexAttrib3f;
- static const Function glVertexAttrib3fv = Message_Function_glVertexAttrib3fv;
- static const Function glVertexAttrib4f = Message_Function_glVertexAttrib4f;
- static const Function glVertexAttrib4fv = Message_Function_glVertexAttrib4fv;
- static const Function glVertexAttribPointer = Message_Function_glVertexAttribPointer;
- static const Function glViewport = Message_Function_glViewport;
- static const Function eglGetDisplay = Message_Function_eglGetDisplay;
- static const Function eglInitialize = Message_Function_eglInitialize;
- static const Function eglTerminate = Message_Function_eglTerminate;
- static const Function eglGetConfigs = Message_Function_eglGetConfigs;
- static const Function eglChooseConfig = Message_Function_eglChooseConfig;
- static const Function eglGetConfigAttrib = Message_Function_eglGetConfigAttrib;
- static const Function eglCreateWindowSurface = Message_Function_eglCreateWindowSurface;
- static const Function eglCreatePixmapSurface = Message_Function_eglCreatePixmapSurface;
- static const Function eglCreatePbufferSurface = Message_Function_eglCreatePbufferSurface;
- static const Function eglDestroySurface = Message_Function_eglDestroySurface;
- static const Function eglQuerySurface = Message_Function_eglQuerySurface;
- static const Function eglCreateContext = Message_Function_eglCreateContext;
- static const Function eglDestroyContext = Message_Function_eglDestroyContext;
- static const Function eglMakeCurrent = Message_Function_eglMakeCurrent;
- static const Function eglGetCurrentContext = Message_Function_eglGetCurrentContext;
- static const Function eglGetCurrentSurface = Message_Function_eglGetCurrentSurface;
- static const Function eglGetCurrentDisplay = Message_Function_eglGetCurrentDisplay;
- static const Function eglQueryContext = Message_Function_eglQueryContext;
- static const Function eglWaitGL = Message_Function_eglWaitGL;
- static const Function eglWaitNative = Message_Function_eglWaitNative;
- static const Function eglSwapBuffers = Message_Function_eglSwapBuffers;
- static const Function eglCopyBuffers = Message_Function_eglCopyBuffers;
- static const Function eglGetError = Message_Function_eglGetError;
- static const Function eglQueryString = Message_Function_eglQueryString;
- static const Function eglGetProcAddress = Message_Function_eglGetProcAddress;
- static const Function eglSurfaceAttrib = Message_Function_eglSurfaceAttrib;
- static const Function eglBindTexImage = Message_Function_eglBindTexImage;
- static const Function eglReleaseTexImage = Message_Function_eglReleaseTexImage;
- static const Function eglSwapInterval = Message_Function_eglSwapInterval;
- static const Function eglBindAPI = Message_Function_eglBindAPI;
- static const Function eglQueryAPI = Message_Function_eglQueryAPI;
- static const Function eglWaitClient = Message_Function_eglWaitClient;
- static const Function eglReleaseThread = Message_Function_eglReleaseThread;
- static const Function eglCreatePbufferFromClientBuffer = Message_Function_eglCreatePbufferFromClientBuffer;
- static const Function eglLockSurfaceKHR = Message_Function_eglLockSurfaceKHR;
- static const Function eglUnlockSurfaceKHR = Message_Function_eglUnlockSurfaceKHR;
- static const Function eglCreateImageKHR = Message_Function_eglCreateImageKHR;
- static const Function eglDestroyImageKHR = Message_Function_eglDestroyImageKHR;
- static const Function eglCreateSyncKHR = Message_Function_eglCreateSyncKHR;
- static const Function eglDestroySyncKHR = Message_Function_eglDestroySyncKHR;
- static const Function eglClientWaitSyncKHR = Message_Function_eglClientWaitSyncKHR;
- static const Function eglGetSyncAttribKHR = Message_Function_eglGetSyncAttribKHR;
- static const Function eglSetSwapRectangleANDROID = Message_Function_eglSetSwapRectangleANDROID;
- static const Function eglGetRenderBufferANDROID = Message_Function_eglGetRenderBufferANDROID;
- static const Function ACK = Message_Function_ACK;
- static const Function NEG = Message_Function_NEG;
- static const Function CONTINUE = Message_Function_CONTINUE;
- static const Function SKIP = Message_Function_SKIP;
- static const Function SETPROP = Message_Function_SETPROP;
- static inline bool Function_IsValid(int value) {
- return Message_Function_IsValid(value);
- }
- static const Function Function_MIN =
- Message_Function_Function_MIN;
- static const Function Function_MAX =
- Message_Function_Function_MAX;
- static const int Function_ARRAYSIZE =
- Message_Function_Function_ARRAYSIZE;
-
- typedef Message_Type Type;
- static const Type BeforeCall = Message_Type_BeforeCall;
- static const Type AfterCall = Message_Type_AfterCall;
- static const Type AfterGeneratedCall = Message_Type_AfterGeneratedCall;
- static const Type Response = Message_Type_Response;
- static const Type CompleteCall = Message_Type_CompleteCall;
- static inline bool Type_IsValid(int value) {
- return Message_Type_IsValid(value);
- }
- static const Type Type_MIN =
- Message_Type_Type_MIN;
- static const Type Type_MAX =
- Message_Type_Type_MAX;
- static const int Type_ARRAYSIZE =
- Message_Type_Type_ARRAYSIZE;
-
- typedef Message_DataType DataType;
- static const DataType ReferencedImage = Message_DataType_ReferencedImage;
- static const DataType NonreferencedImage = Message_DataType_NonreferencedImage;
- static inline bool DataType_IsValid(int value) {
- return Message_DataType_IsValid(value);
- }
- static const DataType DataType_MIN =
- Message_DataType_DataType_MIN;
- static const DataType DataType_MAX =
- Message_DataType_DataType_MAX;
- static const int DataType_ARRAYSIZE =
- Message_DataType_DataType_ARRAYSIZE;
-
- typedef Message_Prop Prop;
- static const Prop CaptureDraw = Message_Prop_CaptureDraw;
- static const Prop TimeMode = Message_Prop_TimeMode;
- static const Prop ExpectResponse = Message_Prop_ExpectResponse;
- static const Prop CaptureSwap = Message_Prop_CaptureSwap;
- static const Prop GLConstant = Message_Prop_GLConstant;
- static inline bool Prop_IsValid(int value) {
- return Message_Prop_IsValid(value);
- }
- static const Prop Prop_MIN =
- Message_Prop_Prop_MIN;
- static const Prop Prop_MAX =
- Message_Prop_Prop_MAX;
- static const int Prop_ARRAYSIZE =
- Message_Prop_Prop_ARRAYSIZE;
-
- // accessors -------------------------------------------------------
-
- // required int32 context_id = 1;
- inline bool has_context_id() const;
- inline void clear_context_id();
- static const int kContextIdFieldNumber = 1;
- inline ::google::protobuf::int32 context_id() const;
- inline void set_context_id(::google::protobuf::int32 value);
-
- // required .com.android.glesv2debugger.Message.Function function = 2 [default = NEG];
- inline bool has_function() const;
- inline void clear_function();
- static const int kFunctionFieldNumber = 2;
- inline ::com::android::glesv2debugger::Message_Function function() const;
- inline void set_function(::com::android::glesv2debugger::Message_Function value);
-
- // required .com.android.glesv2debugger.Message.Type type = 3;
- inline bool has_type() const;
- inline void clear_type();
- static const int kTypeFieldNumber = 3;
- inline ::com::android::glesv2debugger::Message_Type type() const;
- inline void set_type(::com::android::glesv2debugger::Message_Type value);
-
- // required bool expect_response = 4;
- inline bool has_expect_response() const;
- inline void clear_expect_response();
- static const int kExpectResponseFieldNumber = 4;
- inline bool expect_response() const;
- inline void set_expect_response(bool value);
-
- // optional int32 ret = 5;
- inline bool has_ret() const;
- inline void clear_ret();
- static const int kRetFieldNumber = 5;
- inline ::google::protobuf::int32 ret() const;
- inline void set_ret(::google::protobuf::int32 value);
-
- // optional int32 arg0 = 6;
- inline bool has_arg0() const;
- inline void clear_arg0();
- static const int kArg0FieldNumber = 6;
- inline ::google::protobuf::int32 arg0() const;
- inline void set_arg0(::google::protobuf::int32 value);
-
- // optional int32 arg1 = 7;
- inline bool has_arg1() const;
- inline void clear_arg1();
- static const int kArg1FieldNumber = 7;
- inline ::google::protobuf::int32 arg1() const;
- inline void set_arg1(::google::protobuf::int32 value);
-
- // optional int32 arg2 = 8;
- inline bool has_arg2() const;
- inline void clear_arg2();
- static const int kArg2FieldNumber = 8;
- inline ::google::protobuf::int32 arg2() const;
- inline void set_arg2(::google::protobuf::int32 value);
-
- // optional int32 arg3 = 9;
- inline bool has_arg3() const;
- inline void clear_arg3();
- static const int kArg3FieldNumber = 9;
- inline ::google::protobuf::int32 arg3() const;
- inline void set_arg3(::google::protobuf::int32 value);
-
- // optional int32 arg4 = 16;
- inline bool has_arg4() const;
- inline void clear_arg4();
- static const int kArg4FieldNumber = 16;
- inline ::google::protobuf::int32 arg4() const;
- inline void set_arg4(::google::protobuf::int32 value);
-
- // optional int32 arg5 = 17;
- inline bool has_arg5() const;
- inline void clear_arg5();
- static const int kArg5FieldNumber = 17;
- inline ::google::protobuf::int32 arg5() const;
- inline void set_arg5(::google::protobuf::int32 value);
-
- // optional int32 arg6 = 18;
- inline bool has_arg6() const;
- inline void clear_arg6();
- static const int kArg6FieldNumber = 18;
- inline ::google::protobuf::int32 arg6() const;
- inline void set_arg6(::google::protobuf::int32 value);
-
- // optional int32 arg7 = 19;
- inline bool has_arg7() const;
- inline void clear_arg7();
- static const int kArg7FieldNumber = 19;
- inline ::google::protobuf::int32 arg7() const;
- inline void set_arg7(::google::protobuf::int32 value);
-
- // optional int32 arg8 = 20;
- inline bool has_arg8() const;
- inline void clear_arg8();
- static const int kArg8FieldNumber = 20;
- inline ::google::protobuf::int32 arg8() const;
- inline void set_arg8(::google::protobuf::int32 value);
-
- // optional bytes data = 10;
- inline bool has_data() const;
- inline void clear_data();
- static const int kDataFieldNumber = 10;
- inline const ::std::string& data() const;
- inline void set_data(const ::std::string& value);
- inline void set_data(const char* value);
- inline void set_data(const void* value, size_t size);
- inline ::std::string* mutable_data();
-
- // optional .com.android.glesv2debugger.Message.DataType data_type = 23;
- inline bool has_data_type() const;
- inline void clear_data_type();
- static const int kDataTypeFieldNumber = 23;
- inline ::com::android::glesv2debugger::Message_DataType data_type() const;
- inline void set_data_type(::com::android::glesv2debugger::Message_DataType value);
-
- // optional int32 pixel_format = 24;
- inline bool has_pixel_format() const;
- inline void clear_pixel_format();
- static const int kPixelFormatFieldNumber = 24;
- inline ::google::protobuf::int32 pixel_format() const;
- inline void set_pixel_format(::google::protobuf::int32 value);
-
- // optional int32 pixel_type = 25;
- inline bool has_pixel_type() const;
- inline void clear_pixel_type();
- static const int kPixelTypeFieldNumber = 25;
- inline ::google::protobuf::int32 pixel_type() const;
- inline void set_pixel_type(::google::protobuf::int32 value);
-
- // optional int32 image_width = 26;
- inline bool has_image_width() const;
- inline void clear_image_width();
- static const int kImageWidthFieldNumber = 26;
- inline ::google::protobuf::int32 image_width() const;
- inline void set_image_width(::google::protobuf::int32 value);
-
- // optional int32 image_height = 27;
- inline bool has_image_height() const;
- inline void clear_image_height();
- static const int kImageHeightFieldNumber = 27;
- inline ::google::protobuf::int32 image_height() const;
- inline void set_image_height(::google::protobuf::int32 value);
-
- // optional float time = 11;
- inline bool has_time() const;
- inline void clear_time();
- static const int kTimeFieldNumber = 11;
- inline float time() const;
- inline void set_time(float value);
-
- // optional .com.android.glesv2debugger.Message.Prop prop = 21;
- inline bool has_prop() const;
- inline void clear_prop();
- static const int kPropFieldNumber = 21;
- inline ::com::android::glesv2debugger::Message_Prop prop() const;
- inline void set_prop(::com::android::glesv2debugger::Message_Prop value);
-
- // optional float clock = 22;
- inline bool has_clock() const;
- inline void clear_clock();
- static const int kClockFieldNumber = 22;
- inline float clock() const;
- inline void set_clock(float value);
-
- // @@protoc_insertion_point(class_scope:com.android.glesv2debugger.Message)
- private:
- mutable int _cached_size_;
-
- ::google::protobuf::int32 context_id_;
- int function_;
- int type_;
- bool expect_response_;
- ::google::protobuf::int32 ret_;
- ::google::protobuf::int32 arg0_;
- ::google::protobuf::int32 arg1_;
- ::google::protobuf::int32 arg2_;
- ::google::protobuf::int32 arg3_;
- ::google::protobuf::int32 arg4_;
- ::google::protobuf::int32 arg5_;
- ::google::protobuf::int32 arg6_;
- ::google::protobuf::int32 arg7_;
- ::google::protobuf::int32 arg8_;
- ::std::string* data_;
- static const ::std::string _default_data_;
- int data_type_;
- ::google::protobuf::int32 pixel_format_;
- ::google::protobuf::int32 pixel_type_;
- ::google::protobuf::int32 image_width_;
- ::google::protobuf::int32 image_height_;
- float time_;
- int prop_;
- float clock_;
- friend void protobuf_AddDesc_debugger_5fmessage_2eproto();
- friend void protobuf_AssignDesc_debugger_5fmessage_2eproto();
- friend void protobuf_ShutdownFile_debugger_5fmessage_2eproto();
-
- ::google::protobuf::uint32 _has_bits_[(23 + 31) / 32];
-
- // WHY DOES & HAVE LOWER PRECEDENCE THAN != !?
- inline bool _has_bit(int index) const {
- return (_has_bits_[index / 32] & (1u << (index % 32))) != 0;
- }
- inline void _set_bit(int index) {
- _has_bits_[index / 32] |= (1u << (index % 32));
- }
- inline void _clear_bit(int index) {
- _has_bits_[index / 32] &= ~(1u << (index % 32));
- }
-
- void InitAsDefaultInstance();
- static Message* default_instance_;
-};
-// ===================================================================
-
-
-// ===================================================================
-
-// Message
-
-// required int32 context_id = 1;
-inline bool Message::has_context_id() const {
- return _has_bit(0);
-}
-inline void Message::clear_context_id() {
- context_id_ = 0;
- _clear_bit(0);
-}
-inline ::google::protobuf::int32 Message::context_id() const {
- return context_id_;
-}
-inline void Message::set_context_id(::google::protobuf::int32 value) {
- _set_bit(0);
- context_id_ = value;
-}
-
-// required .com.android.glesv2debugger.Message.Function function = 2 [default = NEG];
-inline bool Message::has_function() const {
- return _has_bit(1);
-}
-inline void Message::clear_function() {
- function_ = 187;
- _clear_bit(1);
-}
-inline ::com::android::glesv2debugger::Message_Function Message::function() const {
- return static_cast< ::com::android::glesv2debugger::Message_Function >(function_);
-}
-inline void Message::set_function(::com::android::glesv2debugger::Message_Function value) {
- GOOGLE_DCHECK(::com::android::glesv2debugger::Message_Function_IsValid(value));
- _set_bit(1);
- function_ = value;
-}
-
-// required .com.android.glesv2debugger.Message.Type type = 3;
-inline bool Message::has_type() const {
- return _has_bit(2);
-}
-inline void Message::clear_type() {
- type_ = 0;
- _clear_bit(2);
-}
-inline ::com::android::glesv2debugger::Message_Type Message::type() const {
- return static_cast< ::com::android::glesv2debugger::Message_Type >(type_);
-}
-inline void Message::set_type(::com::android::glesv2debugger::Message_Type value) {
- GOOGLE_DCHECK(::com::android::glesv2debugger::Message_Type_IsValid(value));
- _set_bit(2);
- type_ = value;
-}
-
-// required bool expect_response = 4;
-inline bool Message::has_expect_response() const {
- return _has_bit(3);
-}
-inline void Message::clear_expect_response() {
- expect_response_ = false;
- _clear_bit(3);
-}
-inline bool Message::expect_response() const {
- return expect_response_;
-}
-inline void Message::set_expect_response(bool value) {
- _set_bit(3);
- expect_response_ = value;
-}
-
-// optional int32 ret = 5;
-inline bool Message::has_ret() const {
- return _has_bit(4);
-}
-inline void Message::clear_ret() {
- ret_ = 0;
- _clear_bit(4);
-}
-inline ::google::protobuf::int32 Message::ret() const {
- return ret_;
-}
-inline void Message::set_ret(::google::protobuf::int32 value) {
- _set_bit(4);
- ret_ = value;
-}
-
-// optional int32 arg0 = 6;
-inline bool Message::has_arg0() const {
- return _has_bit(5);
-}
-inline void Message::clear_arg0() {
- arg0_ = 0;
- _clear_bit(5);
-}
-inline ::google::protobuf::int32 Message::arg0() const {
- return arg0_;
-}
-inline void Message::set_arg0(::google::protobuf::int32 value) {
- _set_bit(5);
- arg0_ = value;
-}
-
-// optional int32 arg1 = 7;
-inline bool Message::has_arg1() const {
- return _has_bit(6);
-}
-inline void Message::clear_arg1() {
- arg1_ = 0;
- _clear_bit(6);
-}
-inline ::google::protobuf::int32 Message::arg1() const {
- return arg1_;
-}
-inline void Message::set_arg1(::google::protobuf::int32 value) {
- _set_bit(6);
- arg1_ = value;
-}
-
-// optional int32 arg2 = 8;
-inline bool Message::has_arg2() const {
- return _has_bit(7);
-}
-inline void Message::clear_arg2() {
- arg2_ = 0;
- _clear_bit(7);
-}
-inline ::google::protobuf::int32 Message::arg2() const {
- return arg2_;
-}
-inline void Message::set_arg2(::google::protobuf::int32 value) {
- _set_bit(7);
- arg2_ = value;
-}
-
-// optional int32 arg3 = 9;
-inline bool Message::has_arg3() const {
- return _has_bit(8);
-}
-inline void Message::clear_arg3() {
- arg3_ = 0;
- _clear_bit(8);
-}
-inline ::google::protobuf::int32 Message::arg3() const {
- return arg3_;
-}
-inline void Message::set_arg3(::google::protobuf::int32 value) {
- _set_bit(8);
- arg3_ = value;
-}
-
-// optional int32 arg4 = 16;
-inline bool Message::has_arg4() const {
- return _has_bit(9);
-}
-inline void Message::clear_arg4() {
- arg4_ = 0;
- _clear_bit(9);
-}
-inline ::google::protobuf::int32 Message::arg4() const {
- return arg4_;
-}
-inline void Message::set_arg4(::google::protobuf::int32 value) {
- _set_bit(9);
- arg4_ = value;
-}
-
-// optional int32 arg5 = 17;
-inline bool Message::has_arg5() const {
- return _has_bit(10);
-}
-inline void Message::clear_arg5() {
- arg5_ = 0;
- _clear_bit(10);
-}
-inline ::google::protobuf::int32 Message::arg5() const {
- return arg5_;
-}
-inline void Message::set_arg5(::google::protobuf::int32 value) {
- _set_bit(10);
- arg5_ = value;
-}
-
-// optional int32 arg6 = 18;
-inline bool Message::has_arg6() const {
- return _has_bit(11);
-}
-inline void Message::clear_arg6() {
- arg6_ = 0;
- _clear_bit(11);
-}
-inline ::google::protobuf::int32 Message::arg6() const {
- return arg6_;
-}
-inline void Message::set_arg6(::google::protobuf::int32 value) {
- _set_bit(11);
- arg6_ = value;
-}
-
-// optional int32 arg7 = 19;
-inline bool Message::has_arg7() const {
- return _has_bit(12);
-}
-inline void Message::clear_arg7() {
- arg7_ = 0;
- _clear_bit(12);
-}
-inline ::google::protobuf::int32 Message::arg7() const {
- return arg7_;
-}
-inline void Message::set_arg7(::google::protobuf::int32 value) {
- _set_bit(12);
- arg7_ = value;
-}
-
-// optional int32 arg8 = 20;
-inline bool Message::has_arg8() const {
- return _has_bit(13);
-}
-inline void Message::clear_arg8() {
- arg8_ = 0;
- _clear_bit(13);
-}
-inline ::google::protobuf::int32 Message::arg8() const {
- return arg8_;
-}
-inline void Message::set_arg8(::google::protobuf::int32 value) {
- _set_bit(13);
- arg8_ = value;
-}
-
-// optional bytes data = 10;
-inline bool Message::has_data() const {
- return _has_bit(14);
-}
-inline void Message::clear_data() {
- if (data_ != &_default_data_) {
- data_->clear();
- }
- _clear_bit(14);
-}
-inline const ::std::string& Message::data() const {
- return *data_;
-}
-inline void Message::set_data(const ::std::string& value) {
- _set_bit(14);
- if (data_ == &_default_data_) {
- data_ = new ::std::string;
- }
- data_->assign(value);
-}
-inline void Message::set_data(const char* value) {
- _set_bit(14);
- if (data_ == &_default_data_) {
- data_ = new ::std::string;
- }
- data_->assign(value);
-}
-inline void Message::set_data(const void* value, size_t size) {
- _set_bit(14);
- if (data_ == &_default_data_) {
- data_ = new ::std::string;
- }
- data_->assign(reinterpret_cast<const char*>(value), size);
-}
-inline ::std::string* Message::mutable_data() {
- _set_bit(14);
- if (data_ == &_default_data_) {
- data_ = new ::std::string;
- }
- return data_;
-}
-
-// optional .com.android.glesv2debugger.Message.DataType data_type = 23;
-inline bool Message::has_data_type() const {
- return _has_bit(15);
-}
-inline void Message::clear_data_type() {
- data_type_ = 0;
- _clear_bit(15);
-}
-inline ::com::android::glesv2debugger::Message_DataType Message::data_type() const {
- return static_cast< ::com::android::glesv2debugger::Message_DataType >(data_type_);
-}
-inline void Message::set_data_type(::com::android::glesv2debugger::Message_DataType value) {
- GOOGLE_DCHECK(::com::android::glesv2debugger::Message_DataType_IsValid(value));
- _set_bit(15);
- data_type_ = value;
-}
-
-// optional int32 pixel_format = 24;
-inline bool Message::has_pixel_format() const {
- return _has_bit(16);
-}
-inline void Message::clear_pixel_format() {
- pixel_format_ = 0;
- _clear_bit(16);
-}
-inline ::google::protobuf::int32 Message::pixel_format() const {
- return pixel_format_;
-}
-inline void Message::set_pixel_format(::google::protobuf::int32 value) {
- _set_bit(16);
- pixel_format_ = value;
-}
-
-// optional int32 pixel_type = 25;
-inline bool Message::has_pixel_type() const {
- return _has_bit(17);
-}
-inline void Message::clear_pixel_type() {
- pixel_type_ = 0;
- _clear_bit(17);
-}
-inline ::google::protobuf::int32 Message::pixel_type() const {
- return pixel_type_;
-}
-inline void Message::set_pixel_type(::google::protobuf::int32 value) {
- _set_bit(17);
- pixel_type_ = value;
-}
-
-// optional int32 image_width = 26;
-inline bool Message::has_image_width() const {
- return _has_bit(18);
-}
-inline void Message::clear_image_width() {
- image_width_ = 0;
- _clear_bit(18);
-}
-inline ::google::protobuf::int32 Message::image_width() const {
- return image_width_;
-}
-inline void Message::set_image_width(::google::protobuf::int32 value) {
- _set_bit(18);
- image_width_ = value;
-}
-
-// optional int32 image_height = 27;
-inline bool Message::has_image_height() const {
- return _has_bit(19);
-}
-inline void Message::clear_image_height() {
- image_height_ = 0;
- _clear_bit(19);
-}
-inline ::google::protobuf::int32 Message::image_height() const {
- return image_height_;
-}
-inline void Message::set_image_height(::google::protobuf::int32 value) {
- _set_bit(19);
- image_height_ = value;
-}
-
-// optional float time = 11;
-inline bool Message::has_time() const {
- return _has_bit(20);
-}
-inline void Message::clear_time() {
- time_ = 0;
- _clear_bit(20);
-}
-inline float Message::time() const {
- return time_;
-}
-inline void Message::set_time(float value) {
- _set_bit(20);
- time_ = value;
-}
-
-// optional .com.android.glesv2debugger.Message.Prop prop = 21;
-inline bool Message::has_prop() const {
- return _has_bit(21);
-}
-inline void Message::clear_prop() {
- prop_ = 0;
- _clear_bit(21);
-}
-inline ::com::android::glesv2debugger::Message_Prop Message::prop() const {
- return static_cast< ::com::android::glesv2debugger::Message_Prop >(prop_);
-}
-inline void Message::set_prop(::com::android::glesv2debugger::Message_Prop value) {
- GOOGLE_DCHECK(::com::android::glesv2debugger::Message_Prop_IsValid(value));
- _set_bit(21);
- prop_ = value;
-}
-
-// optional float clock = 22;
-inline bool Message::has_clock() const {
- return _has_bit(22);
-}
-inline void Message::clear_clock() {
- clock_ = 0;
- _clear_bit(22);
-}
-inline float Message::clock() const {
- return clock_;
-}
-inline void Message::set_clock(float value) {
- _set_bit(22);
- clock_ = value;
-}
-
-
-// @@protoc_insertion_point(namespace_scope)
-
-} // namespace glesv2debugger
-} // namespace android
-} // namespace com
-
-// @@protoc_insertion_point(global_scope)
-
-#endif // PROTOBUF_debugger_5fmessage_2eproto__INCLUDED
diff --git a/opengl/libs/GLES2_dbg/src/egl.cpp b/opengl/libs/GLES2_dbg/src/egl.cpp
deleted file mode 100644
index bbea3bd..0000000
--- a/opengl/libs/GLES2_dbg/src/egl.cpp
+++ /dev/null
@@ -1,54 +0,0 @@
-/*
- ** Copyright 2011, The Android Open Source Project
- **
- ** Licensed under the Apache License, Version 2.0 (the "License");
- ** you may not use this file except in compliance with the License.
- ** You may obtain a copy of the License at
- **
- ** http://www.apache.org/licenses/LICENSE-2.0
- **
- ** Unless required by applicable law or agreed to in writing, software
- ** distributed under the License is distributed on an "AS IS" BASIS,
- ** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- ** See the License for the specific language governing permissions and
- ** limitations under the License.
- */
-
-#include "header.h"
-
-EGLBoolean Debug_eglSwapBuffers(EGLDisplay dpy, EGLSurface draw)
-{
- DbgContext * const dbg = getDbgContextThreadSpecific();
- glesv2debugger::Message msg;
- struct : public FunctionCall {
- EGLDisplay dpy;
- EGLSurface draw;
-
- const int * operator()(gl_hooks_t::gl_t const * const _c, glesv2debugger::Message & msg) {
- msg.set_time(-1);
- return reinterpret_cast<const int *>(true);
- }
- } caller;
- caller.dpy = dpy;
- caller.draw = draw;
-
- msg.set_arg0(reinterpret_cast<int>(dpy));
- msg.set_arg1(reinterpret_cast<int>(draw));
- if (dbg->captureSwap > 0) {
- dbg->captureSwap--;
- int viewport[4] = {};
- dbg->hooks->gl.glGetIntegerv(GL_VIEWPORT, viewport);
- void * pixels = dbg->GetReadPixelsBuffer(viewport[2] * viewport[3] *
- dbg->readBytesPerPixel);
- dbg->hooks->gl.glReadPixels(viewport[0], viewport[1], viewport[2],
- viewport[3], GL_RGBA, GL_UNSIGNED_BYTE, pixels);
- dbg->CompressReadPixelBuffer(msg.mutable_data());
- msg.set_data_type(msg.ReferencedImage);
- msg.set_pixel_format(GL_RGBA);
- msg.set_pixel_type(GL_UNSIGNED_BYTE);
- msg.set_image_width(viewport[2]);
- msg.set_image_height(viewport[3]);
- }
- int * ret = MessageLoop(caller, msg, glesv2debugger::Message_Function_eglSwapBuffers);
- return static_cast<EGLBoolean>(reinterpret_cast<int>(ret));
-}
diff --git a/opengl/libs/GLES2_dbg/src/header.h b/opengl/libs/GLES2_dbg/src/header.h
deleted file mode 100644
index 0ab4890..0000000
--- a/opengl/libs/GLES2_dbg/src/header.h
+++ /dev/null
@@ -1,178 +0,0 @@
-/*
- ** Copyright 2011, The Android Open Source Project
- **
- ** Licensed under the Apache License, Version 2.0 (the "License");
- ** you may not use this file except in compliance with the License.
- ** You may obtain a copy of the License at
- **
- ** http://www.apache.org/licenses/LICENSE-2.0
- **
- ** Unless required by applicable law or agreed to in writing, software
- ** distributed under the License is distributed on an "AS IS" BASIS,
- ** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- ** See the License for the specific language governing permissions and
- ** limitations under the License.
- */
-
-#ifndef ANDROID_GLES2_DBG_HEADER_H
-#define ANDROID_GLES2_DBG_HEADER_H
-
-#include <stdlib.h>
-#include <ctype.h>
-#include <string.h>
-#include <errno.h>
-
-#include <GLES2/gl2.h>
-#include <GLES2/gl2ext.h>
-
-#include <cutils/log.h>
-#include <utils/Timers.h>
-
-#include "hooks.h"
-
-#include "glesv2dbg.h"
-
-#define GL_ENTRY(_r, _api, ...) _r Debug_##_api ( __VA_ARGS__ );
-#include "glesv2dbg_functions.h"
-
-#include "debugger_message.pb.h"
-
-using namespace android;
-using namespace com::android;
-
-#ifndef __location__
-#define __HIERALLOC_STRING_0__(s) #s
-#define __HIERALLOC_STRING_1__(s) __HIERALLOC_STRING_0__(s)
-#define __HIERALLOC_STRING_2__ __HIERALLOC_STRING_1__(__LINE__)
-#define __location__ __FILE__ ":" __HIERALLOC_STRING_2__
-#endif
-
-#undef assert
-#define assert(expr) if (!(expr)) { ALOGD("\n*\n*\n* assert: %s at %s \n*\n*", #expr, __location__); int * x = 0; *x = 5; }
-//#undef ALOGD
-//#define ALOGD(...)
-
-namespace android
-{
-
-struct GLFunctionBitfield {
- unsigned char field [24]; // 8 * 24 = 192
-
- void Bit(const glesv2debugger::Message_Function function, bool bit) {
- const unsigned byte = function / 8, mask = 1 << (function % 8);
- if (bit)
- field[byte] |= mask;
- else
- field[byte] &= ~mask;
- }
-
- bool Bit(const glesv2debugger::Message_Function function) const {
- const unsigned byte = function / 8, mask = 1 << (function % 8);
- return field[byte] & mask;
- }
-};
-
-struct DbgContext {
- static const unsigned int LZF_CHUNK_SIZE = 256 * 1024;
-
-private:
- char * lzf_buf; // malloc / free; for lzf chunk compression and other uses
-
- // used as buffer and reference frame for ReadPixels; malloc/free
- unsigned * lzf_ref [2];
- unsigned lzf_readIndex; // 0 or 1
- unsigned lzf_refSize, lzf_refBufSize; // bytes
-
-public:
- const unsigned int version; // 0 is GLES1, 1 is GLES2
- const gl_hooks_t * const hooks;
- const unsigned int MAX_VERTEX_ATTRIBS;
- const unsigned int readBytesPerPixel;
-
- unsigned int captureSwap; // number of eglSwapBuffers to glReadPixels
- unsigned int captureDraw; // number of glDrawArrays/Elements to glReadPixels
-
- GLFunctionBitfield expectResponse;
-
- struct VertexAttrib {
- GLenum type; // element data type
- unsigned size; // number of data per element
- unsigned stride; // calculated number of bytes between elements
- const void * ptr;
- unsigned elemSize; // calculated number of bytes per element
- GLuint buffer; // buffer name
- GLboolean normalized : 1;
- GLboolean enabled : 1;
- VertexAttrib() : type(0), size(0), stride(0), ptr(NULL), elemSize(0),
- buffer(0), normalized(0), enabled(0) {}
- } * vertexAttribs;
- bool hasNonVBOAttribs; // whether any enabled vertexAttrib is user pointer
-
- struct VBO {
- const GLuint name;
- const GLenum target;
- VBO * next;
- void * data; // malloc/free
- unsigned size; // in bytes
- VBO(const GLuint name, const GLenum target, VBO * head) : name(name),
- target(target), next(head), data(NULL), size(0) {}
- } * indexBuffers; // linked list of all index buffers
- VBO * indexBuffer; // currently bound index buffer
-
- GLuint program;
- unsigned maxAttrib; // number of slots used by program
-
- DbgContext(const unsigned version, const gl_hooks_t * const hooks,
- const unsigned MAX_VERTEX_ATTRIBS);
- ~DbgContext();
-
- void Fetch(const unsigned index, std::string * const data) const;
- void Compress(const void * in_data, unsigned in_len, std::string * const outStr);
- static unsigned char * Decompress(const void * in, const unsigned int inLen,
- unsigned int * const outLen); // malloc/free
- void * GetReadPixelsBuffer(const unsigned size);
- bool IsReadPixelBuffer(const void * const ptr) {
- return ptr == lzf_ref[lzf_readIndex];
- }
- void CompressReadPixelBuffer(std::string * const outStr);
- char * GetBuffer(); // allocates lzf_buf if NULL
- unsigned int GetBufferSize(); // allocates lzf_buf if NULL
-
- void glUseProgram(GLuint program);
- void glEnableVertexAttribArray(GLuint index);
- void glDisableVertexAttribArray(GLuint index);
- void glVertexAttribPointer(GLuint indx, GLint size, GLenum type,
- GLboolean normalized, GLsizei stride, const GLvoid* ptr);
- void glBindBuffer(GLenum target, GLuint buffer);
- void glBufferData(GLenum target, GLsizeiptr size, const GLvoid* data, GLenum usage);
- void glBufferSubData(GLenum target, GLintptr offset, GLsizeiptr size, const GLvoid* data);
- void glDeleteBuffers(GLsizei n, const GLuint *buffers);
-};
-
-DbgContext * getDbgContextThreadSpecific();
-
-struct FunctionCall {
- virtual const int * operator()(gl_hooks_t::gl_t const * const _c,
- glesv2debugger::Message & msg) = 0;
- virtual ~FunctionCall() {}
-};
-
-// move these into DbgContext as static
-extern int timeMode; // SYSTEM_TIME_
-
-extern int clientSock, serverSock;
-
-unsigned GetBytesPerPixel(const GLenum format, const GLenum type);
-
-// every Debug_gl* function calls this to send message to client and possibly receive commands
-int * MessageLoop(FunctionCall & functionCall, glesv2debugger::Message & msg,
- const glesv2debugger::Message_Function function);
-
-void Receive(glesv2debugger::Message & cmd);
-float Send(const glesv2debugger::Message & msg, glesv2debugger::Message & cmd);
-void SetProp(DbgContext * const dbg, const glesv2debugger::Message & cmd);
-const int * GenerateCall(DbgContext * const dbg, const glesv2debugger::Message & cmd,
- glesv2debugger::Message & msg, const int * const prevRet);
-}; // namespace android {
-
-#endif // #ifndef ANDROID_GLES2_DBG_HEADER_H
diff --git a/opengl/libs/GLES2_dbg/src/server.cpp b/opengl/libs/GLES2_dbg/src/server.cpp
deleted file mode 100644
index 3e93697..0000000
--- a/opengl/libs/GLES2_dbg/src/server.cpp
+++ /dev/null
@@ -1,312 +0,0 @@
-/*
- ** Copyright 2011, The Android Open Source Project
- **
- ** Licensed under the Apache License, Version 2.0 (the "License");
- ** you may not use this file except in compliance with the License.
- ** You may obtain a copy of the License at
- **
- ** http://www.apache.org/licenses/LICENSE-2.0
- **
- ** Unless required by applicable law or agreed to in writing, software
- ** distributed under the License is distributed on an "AS IS" BASIS,
- ** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- ** See the License for the specific language governing permissions and
- ** limitations under the License.
- */
-
-#include <sys/ioctl.h>
-#include <unistd.h>
-#include <sys/socket.h>
-#include <fcntl.h>
-#include <netinet/in.h>
-#include <arpa/inet.h>
-#include <pthread.h>
-
-#include "header.h"
-
-namespace android
-{
-
-int serverSock = -1, clientSock = -1;
-FILE * file = NULL;
-unsigned int MAX_FILE_SIZE = 0;
-int timeMode = SYSTEM_TIME_THREAD;
-
-static void Die(const char * msg)
-{
- ALOGD("\n*\n*\n* GLESv2_dbg: Die: %s \n*\n*", msg);
- StopDebugServer();
- exit(1);
-}
-
-void StartDebugServer(const unsigned short port, const bool forceUseFile,
- const unsigned int maxFileSize, const char * const filePath)
-{
- MAX_FILE_SIZE = maxFileSize;
-
- ALOGD("GLESv2_dbg: StartDebugServer");
- if (serverSock >= 0 || file)
- return;
-
- ALOGD("GLESv2_dbg: StartDebugServer create socket");
- struct sockaddr_in server = {}, client = {};
-
- /* Create the TCP socket */
- if (forceUseFile || (serverSock = socket(PF_INET, SOCK_STREAM, IPPROTO_TCP)) < 0) {
- file = fopen(filePath, "wb");
- if (!file)
- Die("Failed to create socket and file");
- else
- return;
- }
- /* Construct the server sockaddr_in structure */
- server.sin_family = AF_INET; /* Internet/IP */
- server.sin_addr.s_addr = htonl(INADDR_LOOPBACK); /* Incoming addr */
- server.sin_port = htons(port); /* server port */
-
- /* Bind the server socket */
- socklen_t sizeofSockaddr_in = sizeof(sockaddr_in);
- if (bind(serverSock, (struct sockaddr *) &server,
- sizeof(server)) < 0) {
- Die("Failed to bind the server socket");
- }
- /* Listen on the server socket */
- if (listen(serverSock, 1) < 0) {
- Die("Failed to listen on server socket");
- }
-
- ALOGD("server started on %d \n", server.sin_port);
-
-
- /* Wait for client connection */
- if ((clientSock =
- accept(serverSock, (struct sockaddr *) &client,
- &sizeofSockaddr_in)) < 0) {
- Die("Failed to accept client connection");
- }
-
- ALOGD("Client connected: %s\n", inet_ntoa(client.sin_addr));
-// fcntl(clientSock, F_SETFL, O_NONBLOCK);
-}
-
-void StopDebugServer()
-{
- ALOGD("GLESv2_dbg: StopDebugServer");
- if (clientSock > 0) {
- close(clientSock);
- clientSock = -1;
- }
- if (serverSock > 0) {
- close(serverSock);
- serverSock = -1;
- }
- if (file) {
- fclose(file);
- file = NULL;
- }
-}
-
-void Receive(glesv2debugger::Message & cmd)
-{
- if (clientSock < 0)
- return;
- unsigned len = 0;
- int received = recv(clientSock, &len, 4, MSG_WAITALL);
- if (received < 0)
- Die("Failed to receive response length");
- else if (4 != received) {
- ALOGD("received %dB: %.8X", received, len);
- Die("Received length mismatch, expected 4");
- }
- static void * buffer = NULL;
- static unsigned bufferSize = 0;
- if (bufferSize < len) {
- buffer = realloc(buffer, len);
- assert(buffer);
- bufferSize = len;
- }
- received = recv(clientSock, buffer, len, MSG_WAITALL);
- if (received < 0)
- Die("Failed to receive response");
- else if (len != received)
- Die("Received length mismatch");
- cmd.Clear();
- cmd.ParseFromArray(buffer, len);
-}
-
-bool TryReceive(glesv2debugger::Message & cmd)
-{
- if (clientSock < 0)
- return false;
- fd_set readSet;
- FD_ZERO(&readSet);
- FD_SET(clientSock, &readSet);
- timeval timeout;
- timeout.tv_sec = timeout.tv_usec = 0;
-
- int rc = select(clientSock + 1, &readSet, NULL, NULL, &timeout);
- if (rc < 0)
- Die("failed to select clientSock");
-
- bool received = false;
- if (FD_ISSET(clientSock, &readSet)) {
- ALOGD("TryReceive: avaiable for read");
- Receive(cmd);
- return true;
- }
- return false;
-}
-
-float Send(const glesv2debugger::Message & msg, glesv2debugger::Message & cmd)
-{
- // TODO: use per DbgContext send/receive buffer and async socket
- // instead of mutex and blocking io; watch out for large messages
- static pthread_mutex_t mutex = PTHREAD_MUTEX_INITIALIZER;
- struct Autolock {
- Autolock() {
- pthread_mutex_lock(&mutex);
- }
- ~Autolock() {
- pthread_mutex_unlock(&mutex);
- }
- } autolock;
-
- if (msg.function() != glesv2debugger::Message_Function_ACK)
- assert(msg.has_context_id() && msg.context_id() != 0);
- static std::string str;
- msg.SerializeToString(&str);
- const uint32_t len = str.length();
- if (clientSock < 0) {
- if (file) {
- fwrite(&len, sizeof(len), 1, file);
- fwrite(str.data(), len, 1, file);
- if (ftell(file) >= MAX_FILE_SIZE) {
- fclose(file);
- Die("MAX_FILE_SIZE reached");
- }
- }
- return 0;
- }
- int sent = -1;
- sent = send(clientSock, &len, sizeof(len), 0);
- if (sent != sizeof(len)) {
- ALOGD("actual sent=%d expected=%d clientSock=%d", sent, sizeof(len), clientSock);
- Die("Failed to send message length");
- }
- nsecs_t c0 = systemTime(timeMode);
- sent = send(clientSock, str.data(), str.length(), 0);
- float t = (float)ns2ms(systemTime(timeMode) - c0);
- if (sent != str.length()) {
- ALOGD("actual sent=%d expected=%d clientSock=%d", sent, str.length(), clientSock);
- Die("Failed to send message");
- }
- // TODO: factor Receive & TryReceive out and into MessageLoop, or add control argument.
- // mean while, if server is sending a SETPROP then don't try to receive,
- // because server will not be processing received command
- if (msg.function() == msg.SETPROP)
- return t;
- // try to receive commands even though not expecting response,
- // since client can send SETPROP and other commands anytime
- if (!msg.expect_response()) {
- if (TryReceive(cmd)) {
- if (glesv2debugger::Message_Function_SETPROP == cmd.function())
- ALOGD("Send: TryReceived SETPROP");
- else
- ALOGD("Send: TryReceived %u", cmd.function());
- }
- } else
- Receive(cmd);
- return t;
-}
-
-void SetProp(DbgContext * const dbg, const glesv2debugger::Message & cmd)
-{
- switch (cmd.prop()) {
- case glesv2debugger::Message_Prop_CaptureDraw:
- ALOGD("SetProp Message_Prop_CaptureDraw %d", cmd.arg0());
- dbg->captureDraw = cmd.arg0();
- break;
- case glesv2debugger::Message_Prop_TimeMode:
- ALOGD("SetProp Message_Prop_TimeMode %d", cmd.arg0());
- timeMode = cmd.arg0();
- break;
- case glesv2debugger::Message_Prop_ExpectResponse:
- ALOGD("SetProp Message_Prop_ExpectResponse %d=%d", cmd.arg0(), cmd.arg1());
- dbg->expectResponse.Bit((glesv2debugger::Message_Function)cmd.arg0(), cmd.arg1());
- break;
- case glesv2debugger::Message_Prop_CaptureSwap:
- ALOGD("SetProp CaptureSwap %d", cmd.arg0());
- dbg->captureSwap = cmd.arg0();
- break;
- default:
- assert(0);
- }
-}
-
-int * MessageLoop(FunctionCall & functionCall, glesv2debugger::Message & msg,
- const glesv2debugger::Message_Function function)
-{
- DbgContext * const dbg = getDbgContextThreadSpecific();
- const int * ret = 0;
- glesv2debugger::Message cmd;
- msg.set_context_id(reinterpret_cast<int>(dbg));
- msg.set_type(glesv2debugger::Message_Type_BeforeCall);
- bool expectResponse = dbg->expectResponse.Bit(function);
- msg.set_expect_response(expectResponse);
- msg.set_function(function);
-
- // when not exectResponse, set cmd to CONTINUE then SKIP
- // cmd will be overwritten by received command
- cmd.set_function(glesv2debugger::Message_Function_CONTINUE);
- cmd.set_expect_response(expectResponse);
- glesv2debugger::Message_Function oldCmd = cmd.function();
- Send(msg, cmd);
- expectResponse = cmd.expect_response();
- while (true) {
- msg.Clear();
- nsecs_t c0 = systemTime(timeMode);
- switch (cmd.function()) {
- case glesv2debugger::Message_Function_CONTINUE:
- ret = functionCall(&dbg->hooks->gl, msg);
- while (GLenum error = dbg->hooks->gl.glGetError())
- ALOGD("Function=%u glGetError() = 0x%.4X", function, error);
- if (!msg.has_time()) // some has output data copy, so time inside call
- msg.set_time((systemTime(timeMode) - c0) * 1e-6f);
- msg.set_context_id(reinterpret_cast<int>(dbg));
- msg.set_function(function);
- msg.set_type(glesv2debugger::Message_Type_AfterCall);
- msg.set_expect_response(expectResponse);
- if (!expectResponse) {
- cmd.set_function(glesv2debugger::Message_Function_SKIP);
- cmd.set_expect_response(false);
- }
- oldCmd = cmd.function();
- Send(msg, cmd);
- expectResponse = cmd.expect_response();
- break;
- case glesv2debugger::Message_Function_SKIP:
- return const_cast<int *>(ret);
- case glesv2debugger::Message_Function_SETPROP:
- SetProp(dbg, cmd);
- expectResponse = cmd.expect_response();
- if (!expectResponse) // SETPROP is "out of band"
- cmd.set_function(oldCmd);
- else
- Receive(cmd);
- break;
- default:
- ret = GenerateCall(dbg, cmd, msg, ret);
- msg.set_expect_response(expectResponse);
- if (!expectResponse) {
- cmd.set_function(cmd.SKIP);
- cmd.set_expect_response(expectResponse);
- }
- oldCmd = cmd.function();
- Send(msg, cmd);
- expectResponse = cmd.expect_response();
- break;
- }
- }
- return 0;
-}
-}; // namespace android {
diff --git a/opengl/libs/GLES2_dbg/src/vertex.cpp b/opengl/libs/GLES2_dbg/src/vertex.cpp
deleted file mode 100644
index 70c3433..0000000
--- a/opengl/libs/GLES2_dbg/src/vertex.cpp
+++ /dev/null
@@ -1,214 +0,0 @@
-/*
- ** Copyright 2011, The Android Open Source Project
- **
- ** Licensed under the Apache License, Version 2.0 (the "License");
- ** you may not use this file except in compliance with the License.
- ** You may obtain a copy of the License at
- **
- ** http://www.apache.org/licenses/LICENSE-2.0
- **
- ** Unless required by applicable law or agreed to in writing, software
- ** distributed under the License is distributed on an "AS IS" BASIS,
- ** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- ** See the License for the specific language governing permissions and
- ** limitations under the License.
- */
-
-#include "header.h"
-
-namespace android
-{
-bool capture; // capture after each glDraw*
-}
-
-void Debug_glDrawArrays(GLenum mode, GLint first, GLsizei count)
-{
- DbgContext * const dbg = getDbgContextThreadSpecific();
- glesv2debugger::Message msg, cmd;
- msg.set_context_id(reinterpret_cast<int>(dbg));
- msg.set_type(glesv2debugger::Message_Type_BeforeCall);
- bool expectResponse = dbg->expectResponse.Bit(glesv2debugger::Message_Function_glDrawArrays);
- msg.set_expect_response(expectResponse);
- msg.set_function(glesv2debugger::Message_Function_glDrawArrays);
- msg.set_arg0(mode);
- msg.set_arg1(first);
- msg.set_arg2(count);
-
- msg.set_arg7(dbg->maxAttrib); // indicate capturing vertex data
- if (dbg->hasNonVBOAttribs) {
- std::string * const data = msg.mutable_data();
- for (unsigned i = 0; i < count; i++)
- dbg->Fetch(i + first, data);
- }
-
- void * pixels = NULL;
- int viewport[4] = {};
- cmd.set_function(glesv2debugger::Message_Function_CONTINUE);
- cmd.set_expect_response(expectResponse);
- glesv2debugger::Message_Function oldCmd = cmd.function();
- Send(msg, cmd);
- expectResponse = cmd.expect_response();
- while (true) {
- msg.Clear();
- nsecs_t c0 = systemTime(timeMode);
- switch (cmd.function()) {
- case glesv2debugger::Message_Function_CONTINUE:
- dbg->hooks->gl.glDrawArrays(mode, first, count);
- msg.set_time((systemTime(timeMode) - c0) * 1e-6f);
- msg.set_context_id(reinterpret_cast<int>(dbg));
- msg.set_function(glesv2debugger::Message_Function_glDrawArrays);
- msg.set_type(glesv2debugger::Message_Type_AfterCall);
- msg.set_expect_response(expectResponse);
- if (!expectResponse) {
- cmd.set_function(glesv2debugger::Message_Function_SKIP);
- cmd.set_expect_response(false);
- }
- oldCmd = cmd.function();
- Send(msg, cmd);
- expectResponse = cmd.expect_response();
- // TODO: pack glReadPixels data with vertex data instead of
- // relying on sperate call for transport, this would allow
- // auto generated message loop using EXTEND_Debug macro
- if (dbg->captureDraw > 0) {
- dbg->captureDraw--;
- dbg->hooks->gl.glGetIntegerv(GL_VIEWPORT, viewport);
-// ALOGD("glDrawArrays CAPTURE: x=%d y=%d width=%d height=%d format=0x%.4X type=0x%.4X",
-// viewport[0], viewport[1], viewport[2], viewport[3], readFormat, readType);
- pixels = dbg->GetReadPixelsBuffer(viewport[2] * viewport[3] *
- dbg->readBytesPerPixel);
- Debug_glReadPixels(viewport[0], viewport[1], viewport[2], viewport[3],
- GL_RGBA, GL_UNSIGNED_BYTE, pixels);
- }
- break;
- case glesv2debugger::Message_Function_SKIP:
- return;
- case glesv2debugger::Message_Function_SETPROP:
- SetProp(dbg, cmd);
- expectResponse = cmd.expect_response();
- if (!expectResponse) // SETPROP is "out of band"
- cmd.set_function(oldCmd);
- else
- Receive(cmd);
- break;
- default:
- GenerateCall(dbg, cmd, msg, NULL);
- msg.set_expect_response(expectResponse);
- if (!expectResponse) {
- cmd.set_function(cmd.SKIP);
- cmd.set_expect_response(expectResponse);
- }
- oldCmd = cmd.function();
- Send(msg, cmd);
- expectResponse = cmd.expect_response();
- break;
- }
- }
-}
-
-template<typename T>
-static inline void FetchIndexed(const unsigned count, const T * indices,
- std::string * const data, const DbgContext * const ctx)
-{
- for (unsigned i = 0; i < count; i++) {
- if (!ctx->indexBuffer)
- data->append((const char *)(indices + i), sizeof(*indices));
- if (ctx->hasNonVBOAttribs)
- ctx->Fetch(indices[i], data);
- }
-}
-
-void Debug_glDrawElements(GLenum mode, GLsizei count, GLenum type, const GLvoid* indices)
-{
- DbgContext * const dbg = getDbgContextThreadSpecific();
- glesv2debugger::Message msg, cmd;
- msg.set_context_id(reinterpret_cast<int>(dbg));
- msg.set_type(glesv2debugger::Message_Type_BeforeCall);
- bool expectResponse = dbg->expectResponse.Bit(glesv2debugger::Message_Function_glDrawElements);
- msg.set_expect_response(expectResponse);
- msg.set_function(glesv2debugger::Message_Function_glDrawElements);
- msg.set_arg0(mode);
- msg.set_arg1(count);
- msg.set_arg2(type);
- msg.set_arg3(reinterpret_cast<int>(indices));
-
- msg.set_arg7(dbg->maxAttrib); // indicate capturing vertex data
- std::string * const data = msg.mutable_data();
- if (GL_UNSIGNED_BYTE == type) {
- if (dbg->indexBuffer) {
- FetchIndexed(count, (unsigned char *)dbg->indexBuffer->data +
- (unsigned long)indices, data, dbg);
- } else {
- FetchIndexed(count, (unsigned char *)indices, data, dbg);
- }
- } else if (GL_UNSIGNED_SHORT == type) {
- if (dbg->indexBuffer) {
- FetchIndexed(count, (unsigned short *)((char *)dbg->indexBuffer->data +
- (unsigned long)indices), data, dbg);
- } else {
- FetchIndexed(count, (unsigned short *)indices, data, dbg);
- }
- } else {
- assert(0);
- }
-
- void * pixels = NULL;
- int viewport[4] = {};
- cmd.set_function(glesv2debugger::Message_Function_CONTINUE);
- cmd.set_expect_response(expectResponse);
- glesv2debugger::Message_Function oldCmd = cmd.function();
- Send(msg, cmd);
- expectResponse = cmd.expect_response();
- while (true) {
- msg.Clear();
- nsecs_t c0 = systemTime(timeMode);
- switch (cmd.function()) {
- case glesv2debugger::Message_Function_CONTINUE:
- dbg->hooks->gl.glDrawElements(mode, count, type, indices);
- msg.set_time((systemTime(timeMode) - c0) * 1e-6f);
- msg.set_context_id(reinterpret_cast<int>(dbg));
- msg.set_function(glesv2debugger::Message_Function_glDrawElements);
- msg.set_type(glesv2debugger::Message_Type_AfterCall);
- msg.set_expect_response(expectResponse);
- if (!expectResponse) {
- cmd.set_function(glesv2debugger::Message_Function_SKIP);
- cmd.set_expect_response(false);
- }
- oldCmd = cmd.function();
- Send(msg, cmd);
- expectResponse = cmd.expect_response();
- // TODO: pack glReadPixels data with vertex data instead of
- // relying on separate call for transport, this would allow
- // auto generated message loop using EXTEND_Debug macro
- if (dbg->captureDraw > 0) {
- dbg->captureDraw--;
- dbg->hooks->gl.glGetIntegerv(GL_VIEWPORT, viewport);
- pixels = dbg->GetReadPixelsBuffer(viewport[2] * viewport[3] *
- dbg->readBytesPerPixel);
- Debug_glReadPixels(viewport[0], viewport[1], viewport[2], viewport[3],
- GL_RGBA, GL_UNSIGNED_BYTE, pixels);
- }
- break;
- case glesv2debugger::Message_Function_SKIP:
- return;
- case glesv2debugger::Message_Function_SETPROP:
- SetProp(dbg, cmd);
- expectResponse = cmd.expect_response();
- if (!expectResponse) // SETPROP is "out of band"
- cmd.set_function(oldCmd);
- else
- Receive(cmd);
- break;
- default:
- GenerateCall(dbg, cmd, msg, NULL);
- msg.set_expect_response(expectResponse);
- if (!expectResponse) {
- cmd.set_function(cmd.SKIP);
- cmd.set_expect_response(expectResponse);
- }
- oldCmd = cmd.function();
- Send(msg, cmd);
- expectResponse = cmd.expect_response();
- break;
- }
- }
-}
diff --git a/opengl/libs/GLES2_dbg/test/Android.mk b/opengl/libs/GLES2_dbg/test/Android.mk
deleted file mode 100644
index 8708d43..0000000
--- a/opengl/libs/GLES2_dbg/test/Android.mk
+++ /dev/null
@@ -1,37 +0,0 @@
-LOCAL_PATH:= $(call my-dir)
-
-include $(CLEAR_VARS)
-
-LOCAL_C_INCLUDES := \
- $(LOCAL_PATH) \
- $(LOCAL_PATH)/../src \
- $(LOCAL_PATH)/../../ \
- external/gtest/include \
- external/stlport/stlport \
- external/protobuf/src \
- bionic \
- external \
-#
-
-LOCAL_SRC_FILES:= \
- test_main.cpp \
- test_server.cpp \
- test_socket.cpp \
-#
-
-LOCAL_SHARED_LIBRARIES := libcutils libutils libGLESv2_dbg libstlport
-LOCAL_STATIC_LIBRARIES := libgtest libprotobuf-cpp-2.3.0-lite liblzf
-LOCAL_MODULE_TAGS := tests
-LOCAL_MODULE:= libGLESv2_dbg_test
-
-ifeq ($(ARCH_ARM_HAVE_TLS_REGISTER),true)
- LOCAL_CFLAGS += -DHAVE_ARM_TLS_REGISTER
-endif
-LOCAL_C_INCLUDES += bionic/libc/private
-
-LOCAL_CFLAGS += -DLOG_TAG=\"libEGL\"
-LOCAL_CFLAGS += -DGL_GLEXT_PROTOTYPES -DEGL_EGLEXT_PROTOTYPES
-LOCAL_CFLAGS += -fvisibility=hidden
-
-include $(BUILD_EXECUTABLE)
-
diff --git a/opengl/libs/GLES2_dbg/test/test_main.cpp b/opengl/libs/GLES2_dbg/test/test_main.cpp
deleted file mode 100644
index 183bf8e..0000000
--- a/opengl/libs/GLES2_dbg/test/test_main.cpp
+++ /dev/null
@@ -1,234 +0,0 @@
-/*
- ** Copyright 2011, The Android Open Source Project
- **
- ** Licensed under the Apache License, Version 2.0 (the "License");
- ** you may not use this file except in compliance with the License.
- ** You may obtain a copy of the License at
- **
- ** http://www.apache.org/licenses/LICENSE-2.0
- **
- ** Unless required by applicable law or agreed to in writing, software
- ** distributed under the License is distributed on an "AS IS" BASIS,
- ** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- ** See the License for the specific language governing permissions and
- ** limitations under the License.
- */
-
-#include "header.h"
-#include "gtest/gtest.h"
-#include "hooks.h"
-
-namespace
-{
-
-// The fixture for testing class Foo.
-class DbgContextTest : public ::testing::Test
-{
-protected:
- android::DbgContext dbg;
- gl_hooks_t hooks;
-
- DbgContextTest()
- : dbg(1, &hooks, 32) {
- // You can do set-up work for each test here.
- hooks.gl.glGetError = GetError;
- }
-
- static GLenum GetError() {
- return GL_NO_ERROR;
- }
-
- virtual ~DbgContextTest() {
- // You can do clean-up work that doesn't throw exceptions here.
- }
-
- // If the constructor and destructor are not enough for setting up
- // and cleaning up each test, you can define the following methods:
-
- virtual void SetUp() {
- // Code here will be called immediately after the constructor (right
- // before each test).
- }
-
- virtual void TearDown() {
- // Code here will be called immediately after each test (right
- // before the destructor).
- }
-};
-
-TEST_F(DbgContextTest, GetReadPixelBuffer)
-{
- const unsigned int bufferSize = 512;
- // test that it's allocating two buffers and swapping them
- void * const buffer0 = dbg.GetReadPixelsBuffer(bufferSize);
- ASSERT_NE((void *)NULL, buffer0);
- for (unsigned int i = 0; i < bufferSize / sizeof(unsigned int); i++) {
- EXPECT_EQ(0, ((unsigned int *)buffer0)[i])
- << "GetReadPixelsBuffer should allocate and zero";
- ((unsigned int *)buffer0)[i] = i * 13;
- }
-
- void * const buffer1 = dbg.GetReadPixelsBuffer(bufferSize);
- ASSERT_NE((void *)NULL, buffer1);
- EXPECT_NE(buffer0, buffer1);
- for (unsigned int i = 0; i < bufferSize / sizeof(unsigned int); i++) {
- EXPECT_EQ(0, ((unsigned int *)buffer1)[i])
- << "GetReadPixelsBuffer should allocate and zero";
- ((unsigned int *)buffer1)[i] = i * 17;
- }
-
- void * const buffer2 = dbg.GetReadPixelsBuffer(bufferSize);
- EXPECT_EQ(buffer2, buffer0);
- for (unsigned int i = 0; i < bufferSize / sizeof(unsigned int); i++)
- EXPECT_EQ(i * 13, ((unsigned int *)buffer2)[i])
- << "GetReadPixelsBuffer should swap buffers";
-
- void * const buffer3 = dbg.GetReadPixelsBuffer(bufferSize);
- EXPECT_EQ(buffer3, buffer1);
- for (unsigned int i = 0; i < bufferSize / sizeof(unsigned int); i++)
- EXPECT_EQ(i * 17, ((unsigned int *)buffer3)[i])
- << "GetReadPixelsBuffer should swap buffers";
-
- void * const buffer4 = dbg.GetReadPixelsBuffer(bufferSize);
- EXPECT_NE(buffer3, buffer4);
- EXPECT_EQ(buffer0, buffer2);
- EXPECT_EQ(buffer1, buffer3);
- EXPECT_EQ(buffer2, buffer4);
-
- // it reallocs as necessary; 0 size may result in NULL
- for (unsigned int i = 0; i < 42; i++) {
- void * const buffer = dbg.GetReadPixelsBuffer(((i & 7)) << 20);
- EXPECT_NE((void *)NULL, buffer)
- << "should be able to get a variety of reasonable sizes";
- EXPECT_TRUE(dbg.IsReadPixelBuffer(buffer));
- }
-}
-
-TEST_F(DbgContextTest, CompressReadPixelBuffer)
-{
- const unsigned int bufferSize = dbg.LZF_CHUNK_SIZE * 4 + 33;
- std::string out;
- unsigned char * buffer = (unsigned char *)dbg.GetReadPixelsBuffer(bufferSize);
- for (unsigned int i = 0; i < bufferSize; i++)
- buffer[i] = i * 13;
- dbg.CompressReadPixelBuffer(&out);
- uint32_t decompSize = 0;
- ASSERT_LT(12, out.length()); // at least written chunk header
- ASSERT_EQ(bufferSize, *(uint32_t *)out.data())
- << "total decompressed size should be as requested in GetReadPixelsBuffer";
- for (unsigned int i = 4; i < out.length();) {
- const uint32_t outSize = *(uint32_t *)(out.data() + i);
- i += 4;
- const uint32_t inSize = *(uint32_t *)(out.data() + i);
- i += 4;
- if (inSize == 0)
- i += outSize; // chunk not compressed
- else
- i += inSize; // skip the actual compressed chunk
- decompSize += outSize;
- }
- ASSERT_EQ(bufferSize, decompSize);
- decompSize = 0;
-
- unsigned char * decomp = dbg.Decompress(out.data(), out.length(), &decompSize);
- ASSERT_EQ(decompSize, bufferSize);
- for (unsigned int i = 0; i < bufferSize; i++)
- EXPECT_EQ((unsigned char)(i * 13), decomp[i]) << "xor with 0 ref is identity";
- free(decomp);
-
- buffer = (unsigned char *)dbg.GetReadPixelsBuffer(bufferSize);
- for (unsigned int i = 0; i < bufferSize; i++)
- buffer[i] = i * 13;
- out.clear();
- dbg.CompressReadPixelBuffer(&out);
- decompSize = 0;
- decomp = dbg.Decompress(out.data(), out.length(), &decompSize);
- ASSERT_EQ(decompSize, bufferSize);
- for (unsigned int i = 0; i < bufferSize; i++)
- EXPECT_EQ(0, decomp[i]) << "xor with same ref is 0";
- free(decomp);
-
- buffer = (unsigned char *)dbg.GetReadPixelsBuffer(bufferSize);
- for (unsigned int i = 0; i < bufferSize; i++)
- buffer[i] = i * 19;
- out.clear();
- dbg.CompressReadPixelBuffer(&out);
- decompSize = 0;
- decomp = dbg.Decompress(out.data(), out.length(), &decompSize);
- ASSERT_EQ(decompSize, bufferSize);
- for (unsigned int i = 0; i < bufferSize; i++)
- EXPECT_EQ((unsigned char)(i * 13) ^ (unsigned char)(i * 19), decomp[i])
- << "xor ref";
- free(decomp);
-}
-
-TEST_F(DbgContextTest, UseProgram)
-{
- static const GLuint _program = 74568;
- static const struct Attribute {
- const char * name;
- GLint location;
- GLint size;
- GLenum type;
- } _attributes [] = {
- {"aaa", 2, 2, GL_FLOAT_VEC2},
- {"bb", 6, 2, GL_FLOAT_MAT2},
- {"c", 1, 1, GL_FLOAT},
- };
- static const unsigned int _attributeCount = sizeof(_attributes) / sizeof(*_attributes);
- struct GL {
- static void GetProgramiv(GLuint program, GLenum pname, GLint* params) {
- EXPECT_EQ(_program, program);
- ASSERT_NE((GLint *)NULL, params);
- switch (pname) {
- case GL_ACTIVE_ATTRIBUTES:
- *params = _attributeCount;
- return;
- case GL_ACTIVE_ATTRIBUTE_MAX_LENGTH:
- *params = 4; // includes NULL terminator
- return;
- default:
- ADD_FAILURE() << "not handled pname: " << pname;
- }
- }
-
- static GLint GetAttribLocation(GLuint program, const GLchar* name) {
- EXPECT_EQ(_program, program);
- for (unsigned int i = 0; i < _attributeCount; i++)
- if (!strcmp(name, _attributes[i].name))
- return _attributes[i].location;
- ADD_FAILURE() << "unknown attribute name: " << name;
- return -1;
- }
-
- static void GetActiveAttrib(GLuint program, GLuint index, GLsizei bufsize,
- GLsizei* length, GLint* size, GLenum* type, GLchar* name) {
- EXPECT_EQ(_program, program);
- ASSERT_LT(index, _attributeCount);
- const Attribute & att = _attributes[index];
- ASSERT_GE(bufsize, strlen(att.name) + 1);
- ASSERT_NE((GLint *)NULL, size);
- ASSERT_NE((GLenum *)NULL, type);
- ASSERT_NE((GLchar *)NULL, name);
- strcpy(name, att.name);
- if (length)
- *length = strlen(name) + 1;
- *size = att.size;
- *type = att.type;
- }
- };
- hooks.gl.glGetProgramiv = GL::GetProgramiv;
- hooks.gl.glGetAttribLocation = GL::GetAttribLocation;
- hooks.gl.glGetActiveAttrib = GL::GetActiveAttrib;
- dbg.glUseProgram(_program);
- EXPECT_EQ(10, dbg.maxAttrib);
- dbg.glUseProgram(0);
- EXPECT_EQ(0, dbg.maxAttrib);
-}
-} // namespace
-
-int main(int argc, char **argv)
-{
- ::testing::InitGoogleTest(&argc, argv);
- return RUN_ALL_TESTS();
-}
diff --git a/opengl/libs/GLES2_dbg/test/test_server.cpp b/opengl/libs/GLES2_dbg/test/test_server.cpp
deleted file mode 100644
index 0ab87b0..0000000
--- a/opengl/libs/GLES2_dbg/test/test_server.cpp
+++ /dev/null
@@ -1,245 +0,0 @@
-/*
- ** Copyright 2011, The Android Open Source Project
- **
- ** Licensed under the Apache License, Version 2.0 (the "License");
- ** you may not use this file except in compliance with the License.
- ** You may obtain a copy of the License at
- **
- ** http://www.apache.org/licenses/LICENSE-2.0
- **
- ** Unless required by applicable law or agreed to in writing, software
- ** distributed under the License is distributed on an "AS IS" BASIS,
- ** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- ** See the License for the specific language governing permissions and
- ** limitations under the License.
- */
-
-#include "header.h"
-#include "gtest/gtest.h"
-#include "hooks.h"
-
-namespace android
-{
-extern FILE * file;
-extern unsigned int MAX_FILE_SIZE;
-};
-
-// tmpfile fails, so need to manually make a writable file first
-static const char * filePath = "/data/local/tmp/dump.gles2dbg";
-
-class ServerFileTest : public ::testing::Test
-{
-protected:
- ServerFileTest() { }
-
- virtual ~ServerFileTest() { }
-
- virtual void SetUp() {
- MAX_FILE_SIZE = 8 << 20;
- ASSERT_EQ((FILE *)NULL, file);
- file = fopen("/data/local/tmp/dump.gles2dbg", "wb+");
- ASSERT_NE((FILE *)NULL, file) << "make sure file is writable: "
- << filePath;
- }
-
- virtual void TearDown() {
- ASSERT_NE((FILE *)NULL, file);
- fclose(file);
- file = NULL;
- }
-
- void Read(glesv2debugger::Message & msg) const {
- msg.Clear();
- uint32_t len = 0;
- ASSERT_EQ(sizeof(len), fread(&len, 1, sizeof(len), file));
- ASSERT_GT(len, 0u);
- char * buffer = new char [len];
- ASSERT_EQ(len, fread(buffer, 1, len, file));
- msg.ParseFromArray(buffer, len);
- delete buffer;
- }
-
- void CheckNoAvailable() {
- const long pos = ftell(file);
- fseek(file, 0, SEEK_END);
- EXPECT_EQ(pos, ftell(file)) << "check no available";
- }
-};
-
-TEST_F(ServerFileTest, Send)
-{
- glesv2debugger::Message msg, cmd, read;
- msg.set_context_id(1);
- msg.set_function(msg.glFinish);
- msg.set_expect_response(false);
- msg.set_type(msg.BeforeCall);
- rewind(file);
- android::Send(msg, cmd);
- rewind(file);
- Read(read);
- EXPECT_EQ(msg.context_id(), read.context_id());
- EXPECT_EQ(msg.function(), read.function());
- EXPECT_EQ(msg.expect_response(), read.expect_response());
- EXPECT_EQ(msg.type(), read.type());
-}
-
-TEST_F(ServerFileTest, CreateDbgContext)
-{
- gl_hooks_t hooks;
- struct Constant {
- GLenum pname;
- GLint param;
- };
- static const Constant constants [] = {
- {GL_MAX_VERTEX_ATTRIBS, 16},
- {GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS, 32},
- {GL_IMPLEMENTATION_COLOR_READ_FORMAT, GL_RGBA},
- {GL_IMPLEMENTATION_COLOR_READ_TYPE, GL_UNSIGNED_BYTE},
- };
- struct HookMock {
- static void GetIntegerv(GLenum pname, GLint* params) {
- ASSERT_TRUE(params != NULL);
- for (unsigned int i = 0; i < sizeof(constants) / sizeof(*constants); i++)
- if (pname == constants[i].pname) {
- *params = constants[i].param;
- return;
- }
- FAIL() << "GetIntegerv unknown pname: " << pname;
- }
- static GLenum GetError() {
- return GL_NO_ERROR;
- }
- };
- hooks.gl.glGetError = HookMock::GetError;
- hooks.gl.glGetIntegerv = HookMock::GetIntegerv;
- DbgContext * const dbg = CreateDbgContext(1, &hooks);
- ASSERT_TRUE(dbg != NULL);
- EXPECT_TRUE(dbg->vertexAttribs != NULL);
-
- rewind(file);
- glesv2debugger::Message read;
- for (unsigned int i = 0; i < 2; i++) {
- Read(read);
- EXPECT_EQ(reinterpret_cast<int>(dbg), read.context_id());
- EXPECT_FALSE(read.expect_response());
- EXPECT_EQ(read.Response, read.type());
- EXPECT_EQ(read.SETPROP, read.function());
- EXPECT_EQ(read.GLConstant, read.prop());
- GLint expectedConstant = 0;
- HookMock::GetIntegerv(read.arg0(), &expectedConstant);
- EXPECT_EQ(expectedConstant, read.arg1());
- }
- CheckNoAvailable();
- dbgReleaseThread();
-}
-
-void * glNoop()
-{
- return 0;
-}
-
-class ServerFileContextTest : public ServerFileTest
-{
-protected:
- DbgContext* dbg;
- gl_hooks_t hooks;
-
- ServerFileContextTest() { }
-
- virtual ~ServerFileContextTest() { }
-
- virtual void SetUp() {
- ServerFileTest::SetUp();
-
- dbg = new DbgContext(1, &hooks, 32);
- ASSERT_NE((void *)NULL, dbg);
- for (unsigned int i = 0; i < sizeof(hooks) / sizeof(void *); i++)
- ((void **)&hooks)[i] = reinterpret_cast<void *>(glNoop);
- }
-
- virtual void TearDown() {
- ServerFileTest::TearDown();
- }
-};
-
-TEST_F(ServerFileContextTest, MessageLoop)
-{
- static const int arg0 = 45;
- static const float arg7 = -87.2331f;
- static const int arg8 = -3;
- static const int * ret = reinterpret_cast<int *>(870);
-
- struct Caller : public FunctionCall {
- const int * operator()(gl_hooks_t::gl_t const * const _c, glesv2debugger::Message & msg) {
- msg.set_arg0(arg0);
- msg.set_arg7((int &)arg7);
- msg.set_arg8(arg8);
- return ret;
- }
- } caller;
- const int contextId = reinterpret_cast<int>(dbg);
- glesv2debugger::Message msg, read;
-
- EXPECT_EQ(ret, MessageLoop(caller, msg, msg.glFinish));
-
- rewind(file);
- Read(read);
- EXPECT_EQ(contextId, read.context_id());
- EXPECT_EQ(read.glFinish, read.function());
- EXPECT_EQ(false, read.expect_response());
- EXPECT_EQ(read.BeforeCall, read.type());
-
- Read(read);
- EXPECT_EQ(contextId, read.context_id());
- EXPECT_EQ(read.glFinish, read.function());
- EXPECT_EQ(false, read.expect_response());
- EXPECT_EQ(read.AfterCall, read.type());
- EXPECT_TRUE(read.has_time());
- EXPECT_EQ(arg0, read.arg0());
- const int readArg7 = read.arg7();
- EXPECT_EQ(arg7, (float &)readArg7);
- EXPECT_EQ(arg8, read.arg8());
-
- const long pos = ftell(file);
- fseek(file, 0, SEEK_END);
- EXPECT_EQ(pos, ftell(file))
- << "should only write the BeforeCall and AfterCall messages";
-}
-
-TEST_F(ServerFileContextTest, DisableEnableVertexAttribArray)
-{
- Debug_glEnableVertexAttribArray(dbg->MAX_VERTEX_ATTRIBS + 2); // should just ignore invalid index
-
- glesv2debugger::Message read;
- rewind(file);
- Read(read);
- EXPECT_EQ(read.glEnableVertexAttribArray, read.function());
- EXPECT_EQ(dbg->MAX_VERTEX_ATTRIBS + 2, read.arg0());
- Read(read);
-
- rewind(file);
- Debug_glDisableVertexAttribArray(dbg->MAX_VERTEX_ATTRIBS + 4); // should just ignore invalid index
- rewind(file);
- Read(read);
- Read(read);
-
- for (unsigned int i = 0; i < dbg->MAX_VERTEX_ATTRIBS; i += 5) {
- rewind(file);
- Debug_glEnableVertexAttribArray(i);
- EXPECT_TRUE(dbg->vertexAttribs[i].enabled);
- rewind(file);
- Read(read);
- EXPECT_EQ(read.glEnableVertexAttribArray, read.function());
- EXPECT_EQ(i, read.arg0());
- Read(read);
-
- rewind(file);
- Debug_glDisableVertexAttribArray(i);
- EXPECT_FALSE(dbg->vertexAttribs[i].enabled);
- rewind(file);
- Read(read);
- EXPECT_EQ(read.glDisableVertexAttribArray, read.function());
- EXPECT_EQ(i, read.arg0());
- Read(read);
- }
-}
diff --git a/opengl/libs/GLES2_dbg/test/test_socket.cpp b/opengl/libs/GLES2_dbg/test/test_socket.cpp
deleted file mode 100644
index 9f815e2..0000000
--- a/opengl/libs/GLES2_dbg/test/test_socket.cpp
+++ /dev/null
@@ -1,468 +0,0 @@
-/*
- ** Copyright 2011, The Android Open Source Project
- **
- ** Licensed under the Apache License, Version 2.0 (the "License");
- ** you may not use this file except in compliance with the License.
- ** You may obtain a copy of the License at
- **
- ** http://www.apache.org/licenses/LICENSE-2.0
- **
- ** Unless required by applicable law or agreed to in writing, software
- ** distributed under the License is distributed on an "AS IS" BASIS,
- ** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- ** See the License for the specific language governing permissions and
- ** limitations under the License.
- */
-
-#include <sys/socket.h>
-#include <sys/ioctl.h>
-
-#include "header.h"
-#include "gtest/gtest.h"
-#include "hooks.h"
-
-namespace android
-{
-extern int serverSock, clientSock;
-};
-
-void * glNoop();
-
-class SocketContextTest : public ::testing::Test
-{
-protected:
- DbgContext* dbg;
- gl_hooks_t hooks;
- int sock;
- char * buffer;
- unsigned int bufferSize;
-
- SocketContextTest() : sock(-1) {
- }
-
- virtual ~SocketContextTest() {
- }
-
- virtual void SetUp() {
- dbg = new DbgContext(1, &hooks, 32);
- ASSERT_TRUE(dbg != NULL);
- for (unsigned int i = 0; i < sizeof(hooks) / sizeof(void *); i++)
- ((void **)&hooks)[i] = (void *)glNoop;
-
- int socks[2] = {-1, -1};
- ASSERT_EQ(0, socketpair(AF_UNIX, SOCK_STREAM, 0, socks));
- clientSock = socks[0];
- sock = socks[1];
-
- bufferSize = 128;
- buffer = new char [128];
- ASSERT_NE((char *)NULL, buffer);
- }
-
- virtual void TearDown() {
- close(sock);
- close(clientSock);
- clientSock = -1;
- delete buffer;
- }
-
- void Write(glesv2debugger::Message & msg) const {
- msg.set_context_id((int)dbg);
- msg.set_type(msg.Response);
- ASSERT_TRUE(msg.has_context_id());
- ASSERT_TRUE(msg.has_function());
- ASSERT_TRUE(msg.has_type());
- ASSERT_TRUE(msg.has_expect_response());
- static std::string str;
- msg.SerializeToString(&str);
- const uint32_t len = str.length();
- ASSERT_EQ(sizeof(len), send(sock, &len, sizeof(len), 0));
- ASSERT_EQ(str.length(), send(sock, str.data(), str.length(), 0));
- }
-
- void Read(glesv2debugger::Message & msg) {
- int available = 0;
- ASSERT_EQ(0, ioctl(sock, FIONREAD, &available));
- ASSERT_GT(available, 0);
- uint32_t len = 0;
- ASSERT_EQ(sizeof(len), recv(sock, &len, sizeof(len), 0));
- if (len > bufferSize) {
- bufferSize = len;
- buffer = new char[bufferSize];
- ASSERT_TRUE(buffer != NULL);
- }
- ASSERT_EQ(len, recv(sock, buffer, len, 0));
- msg.Clear();
- msg.ParseFromArray(buffer, len);
- ASSERT_TRUE(msg.has_context_id());
- ASSERT_TRUE(msg.has_function());
- ASSERT_TRUE(msg.has_type());
- ASSERT_TRUE(msg.has_expect_response());
- }
-
- void CheckNoAvailable() {
- int available = 0;
- ASSERT_EQ(0, ioctl(sock, FIONREAD, &available));
- ASSERT_EQ(available, 0);
- }
-};
-
-TEST_F(SocketContextTest, MessageLoopSkip)
-{
- static const int arg0 = 45;
- static const float arg7 = -87.2331f;
- static const int arg8 = -3;
- static const int * ret = (int *)870;
-
- struct Caller : public FunctionCall {
- const int * operator()(gl_hooks_t::gl_t const * const _c, glesv2debugger::Message & msg) {
- msg.set_arg0(arg0);
- msg.set_arg7((int &)arg7);
- msg.set_arg8(arg8);
- return ret;
- }
- } caller;
- glesv2debugger::Message msg, read, cmd;
- dbg->expectResponse.Bit(msg.glFinish, true);
-
- cmd.set_function(cmd.SKIP);
- cmd.set_expect_response(false);
- Write(cmd);
-
- EXPECT_NE(ret, MessageLoop(caller, msg, msg.glFinish));
-
- Read(read);
- EXPECT_EQ(read.glFinish, read.function());
- EXPECT_EQ(read.BeforeCall, read.type());
- EXPECT_NE(arg0, read.arg0());
- EXPECT_NE((int &)arg7, read.arg7());
- EXPECT_NE(arg8, read.arg8());
-
- CheckNoAvailable();
-}
-
-TEST_F(SocketContextTest, MessageLoopContinue)
-{
- static const int arg0 = GL_FRAGMENT_SHADER;
- static const int ret = -342;
- struct Caller : public FunctionCall {
- const int * operator()(gl_hooks_t::gl_t const * const _c, glesv2debugger::Message & msg) {
- msg.set_ret(ret);
- return (int *)ret;
- }
- } caller;
- glesv2debugger::Message msg, read, cmd;
- dbg->expectResponse.Bit(msg.glCreateShader, true);
-
- cmd.set_function(cmd.CONTINUE);
- cmd.set_expect_response(false); // MessageLoop should automatically skip after continue
- Write(cmd);
-
- msg.set_arg0(arg0);
- EXPECT_EQ((int *)ret, MessageLoop(caller, msg, msg.glCreateShader));
-
- Read(read);
- EXPECT_EQ(read.glCreateShader, read.function());
- EXPECT_EQ(read.BeforeCall, read.type());
- EXPECT_EQ(arg0, read.arg0());
-
- Read(read);
- EXPECT_EQ(read.glCreateShader, read.function());
- EXPECT_EQ(read.AfterCall, read.type());
- EXPECT_EQ(ret, read.ret());
-
- CheckNoAvailable();
-}
-
-TEST_F(SocketContextTest, MessageLoopGenerateCall)
-{
- static const int ret = -342;
- static unsigned int createShader, createProgram;
- createShader = 0;
- createProgram = 0;
- struct Caller : public FunctionCall {
- const int * operator()(gl_hooks_t::gl_t const * const _c, glesv2debugger::Message & msg) {
- const int r = (int)_c->glCreateProgram();
- msg.set_ret(r);
- return (int *)r;
- }
- static GLuint CreateShader(const GLenum type) {
- createShader++;
- return type;
- }
- static GLuint CreateProgram() {
- createProgram++;
- return ret;
- }
- } caller;
- glesv2debugger::Message msg, read, cmd;
- hooks.gl.glCreateShader = caller.CreateShader;
- hooks.gl.glCreateProgram = caller.CreateProgram;
- dbg->expectResponse.Bit(msg.glCreateProgram, true);
-
- cmd.set_function(cmd.glCreateShader);
- cmd.set_arg0(GL_FRAGMENT_SHADER);
- cmd.set_expect_response(true);
- Write(cmd);
-
- cmd.Clear();
- cmd.set_function(cmd.CONTINUE);
- cmd.set_expect_response(true);
- Write(cmd);
-
- cmd.set_function(cmd.glCreateShader);
- cmd.set_arg0(GL_VERTEX_SHADER);
- cmd.set_expect_response(false); // MessageLoop should automatically skip afterwards
- Write(cmd);
-
- EXPECT_EQ((int *)ret, MessageLoop(caller, msg, msg.glCreateProgram));
-
- Read(read);
- EXPECT_EQ(read.glCreateProgram, read.function());
- EXPECT_EQ(read.BeforeCall, read.type());
-
- Read(read);
- EXPECT_EQ(read.glCreateShader, read.function());
- EXPECT_EQ(read.AfterGeneratedCall, read.type());
- EXPECT_EQ(GL_FRAGMENT_SHADER, read.ret());
-
- Read(read);
- EXPECT_EQ(read.glCreateProgram, read.function());
- EXPECT_EQ(read.AfterCall, read.type());
- EXPECT_EQ(ret, read.ret());
-
- Read(read);
- EXPECT_EQ(read.glCreateShader, read.function());
- EXPECT_EQ(read.AfterGeneratedCall, read.type());
- EXPECT_EQ(GL_VERTEX_SHADER, read.ret());
-
- EXPECT_EQ(2, createShader);
- EXPECT_EQ(1, createProgram);
-
- CheckNoAvailable();
-}
-
-TEST_F(SocketContextTest, MessageLoopSetProp)
-{
- static const int ret = -342;
- static unsigned int createShader, createProgram;
- createShader = 0;
- createProgram = 0;
- struct Caller : public FunctionCall {
- const int * operator()(gl_hooks_t::gl_t const * const _c, glesv2debugger::Message & msg) {
- const int r = (int)_c->glCreateProgram();
- msg.set_ret(r);
- return (int *)r;
- }
- static GLuint CreateShader(const GLenum type) {
- createShader++;
- return type;
- }
- static GLuint CreateProgram() {
- createProgram++;
- return ret;
- }
- } caller;
- glesv2debugger::Message msg, read, cmd;
- hooks.gl.glCreateShader = caller.CreateShader;
- hooks.gl.glCreateProgram = caller.CreateProgram;
- dbg->expectResponse.Bit(msg.glCreateProgram, false);
-
- cmd.set_function(cmd.SETPROP);
- cmd.set_prop(cmd.ExpectResponse);
- cmd.set_arg0(cmd.glCreateProgram);
- cmd.set_arg1(true);
- cmd.set_expect_response(true);
- Write(cmd);
-
- cmd.Clear();
- cmd.set_function(cmd.glCreateShader);
- cmd.set_arg0(GL_FRAGMENT_SHADER);
- cmd.set_expect_response(true);
- Write(cmd);
-
- cmd.set_function(cmd.SETPROP);
- cmd.set_prop(cmd.CaptureDraw);
- cmd.set_arg0(819);
- cmd.set_expect_response(true);
- Write(cmd);
-
- cmd.Clear();
- cmd.set_function(cmd.CONTINUE);
- cmd.set_expect_response(true);
- Write(cmd);
-
- cmd.set_function(cmd.glCreateShader);
- cmd.set_arg0(GL_VERTEX_SHADER);
- cmd.set_expect_response(false); // MessageLoop should automatically skip afterwards
- Write(cmd);
-
- EXPECT_EQ((int *)ret, MessageLoop(caller, msg, msg.glCreateProgram));
-
- EXPECT_TRUE(dbg->expectResponse.Bit(msg.glCreateProgram));
- EXPECT_EQ(819, dbg->captureDraw);
-
- Read(read);
- EXPECT_EQ(read.glCreateProgram, read.function());
- EXPECT_EQ(read.BeforeCall, read.type());
-
- Read(read);
- EXPECT_EQ(read.glCreateShader, read.function());
- EXPECT_EQ(read.AfterGeneratedCall, read.type());
- EXPECT_EQ(GL_FRAGMENT_SHADER, read.ret());
-
- Read(read);
- EXPECT_EQ(read.glCreateProgram, read.function());
- EXPECT_EQ(read.AfterCall, read.type());
- EXPECT_EQ(ret, read.ret());
-
- Read(read);
- EXPECT_EQ(read.glCreateShader, read.function());
- EXPECT_EQ(read.AfterGeneratedCall, read.type());
- EXPECT_EQ(GL_VERTEX_SHADER, read.ret());
-
- EXPECT_EQ(2, createShader);
- EXPECT_EQ(1, createProgram);
-
- CheckNoAvailable();
-}
-
-TEST_F(SocketContextTest, TexImage2D)
-{
- static const GLenum _target = GL_TEXTURE_2D;
- static const GLint _level = 1, _internalformat = GL_RGBA;
- static const GLsizei _width = 2, _height = 2;
- static const GLint _border = 333;
- static const GLenum _format = GL_RGB, _type = GL_UNSIGNED_SHORT_5_6_5;
- static const short _pixels [_width * _height] = {11, 22, 33, 44};
- static unsigned int texImage2D;
- texImage2D = 0;
-
- struct Caller {
- static void TexImage2D(GLenum target, GLint level, GLint internalformat,
- GLsizei width, GLsizei height, GLint border,
- GLenum format, GLenum type, const GLvoid* pixels) {
- EXPECT_EQ(_target, target);
- EXPECT_EQ(_level, level);
- EXPECT_EQ(_internalformat, internalformat);
- EXPECT_EQ(_width, width);
- EXPECT_EQ(_height, height);
- EXPECT_EQ(_border, border);
- EXPECT_EQ(_format, format);
- EXPECT_EQ(_type, type);
- EXPECT_EQ(0, memcmp(_pixels, pixels, sizeof(_pixels)));
- texImage2D++;
- }
- } caller;
- glesv2debugger::Message msg, read, cmd;
- hooks.gl.glTexImage2D = caller.TexImage2D;
- dbg->expectResponse.Bit(msg.glTexImage2D, false);
-
- Debug_glTexImage2D(_target, _level, _internalformat, _width, _height, _border,
- _format, _type, _pixels);
- EXPECT_EQ(1, texImage2D);
-
- Read(read);
- EXPECT_EQ(read.glTexImage2D, read.function());
- EXPECT_EQ(read.BeforeCall, read.type());
- EXPECT_EQ(_target, read.arg0());
- EXPECT_EQ(_level, read.arg1());
- EXPECT_EQ(_internalformat, read.arg2());
- EXPECT_EQ(_width, read.arg3());
- EXPECT_EQ(_height, read.arg4());
- EXPECT_EQ(_border, read.arg5());
- EXPECT_EQ(_format, read.arg6());
- EXPECT_EQ(_type, read.arg7());
-
- EXPECT_TRUE(read.has_data());
- uint32_t dataLen = 0;
- const unsigned char * data = dbg->Decompress(read.data().data(),
- read.data().length(), &dataLen);
- EXPECT_EQ(sizeof(_pixels), dataLen);
- if (sizeof(_pixels) == dataLen)
- EXPECT_EQ(0, memcmp(_pixels, data, sizeof(_pixels)));
-
- Read(read);
- EXPECT_EQ(read.glTexImage2D, read.function());
- EXPECT_EQ(read.AfterCall, read.type());
-
- CheckNoAvailable();
-}
-
-TEST_F(SocketContextTest, CopyTexImage2D)
-{
- static const GLenum _target = GL_TEXTURE_2D;
- static const GLint _level = 1, _internalformat = GL_RGBA;
- static const GLint _x = 9, _y = 99;
- static const GLsizei _width = 2, _height = 3;
- static const GLint _border = 333;
- static const int _pixels [_width * _height] = {11, 22, 33, 44, 55, 66};
- static unsigned int copyTexImage2D, readPixels;
- copyTexImage2D = 0, readPixels = 0;
-
- struct Caller {
- static void CopyTexImage2D(GLenum target, GLint level, GLenum internalformat,
- GLint x, GLint y, GLsizei width, GLsizei height, GLint border) {
- EXPECT_EQ(_target, target);
- EXPECT_EQ(_level, level);
- EXPECT_EQ(_internalformat, internalformat);
- EXPECT_EQ(_x, x);
- EXPECT_EQ(_y, y);
- EXPECT_EQ(_width, width);
- EXPECT_EQ(_height, height);
- EXPECT_EQ(_border, border);
- copyTexImage2D++;
- }
- static void ReadPixels(GLint x, GLint y, GLsizei width, GLsizei height,
- GLenum format, GLenum type, GLvoid* pixels) {
- EXPECT_EQ(_x, x);
- EXPECT_EQ(_y, y);
- EXPECT_EQ(_width, width);
- EXPECT_EQ(_height, height);
- EXPECT_EQ(GL_RGBA, format);
- EXPECT_EQ(GL_UNSIGNED_BYTE, type);
- ASSERT_TRUE(pixels != NULL);
- memcpy(pixels, _pixels, sizeof(_pixels));
- readPixels++;
- }
- } caller;
- glesv2debugger::Message msg, read, cmd;
- hooks.gl.glCopyTexImage2D = caller.CopyTexImage2D;
- hooks.gl.glReadPixels = caller.ReadPixels;
- dbg->expectResponse.Bit(msg.glCopyTexImage2D, false);
-
- Debug_glCopyTexImage2D(_target, _level, _internalformat, _x, _y, _width, _height,
- _border);
- ASSERT_EQ(1, copyTexImage2D);
- ASSERT_EQ(1, readPixels);
-
- Read(read);
- EXPECT_EQ(read.glCopyTexImage2D, read.function());
- EXPECT_EQ(read.BeforeCall, read.type());
- EXPECT_EQ(_target, read.arg0());
- EXPECT_EQ(_level, read.arg1());
- EXPECT_EQ(_internalformat, read.arg2());
- EXPECT_EQ(_x, read.arg3());
- EXPECT_EQ(_y, read.arg4());
- EXPECT_EQ(_width, read.arg5());
- EXPECT_EQ(_height, read.arg6());
- EXPECT_EQ(_border, read.arg7());
-
- EXPECT_TRUE(read.has_data());
- EXPECT_EQ(read.ReferencedImage, read.data_type());
- EXPECT_EQ(GL_RGBA, read.pixel_format());
- EXPECT_EQ(GL_UNSIGNED_BYTE, read.pixel_type());
- uint32_t dataLen = 0;
- unsigned char * const data = dbg->Decompress(read.data().data(),
- read.data().length(), &dataLen);
- ASSERT_EQ(sizeof(_pixels), dataLen);
- for (unsigned i = 0; i < sizeof(_pixels) / sizeof(*_pixels); i++)
- EXPECT_EQ(_pixels[i], ((const int *)data)[i]) << "xor with 0 ref is identity";
- free(data);
-
- Read(read);
- EXPECT_EQ(read.glCopyTexImage2D, read.function());
- EXPECT_EQ(read.AfterCall, read.type());
-
- CheckNoAvailable();
-}
diff --git a/opengl/libs/GLES_CM/gl.cpp b/opengl/libs/GLES_CM/gl.cpp
index 2d31a35..adeaa5b 100644
--- a/opengl/libs/GLES_CM/gl.cpp
+++ b/opengl/libs/GLES_CM/gl.cpp
@@ -165,6 +165,20 @@ extern "C" {
#undef CALL_GL_API
#undef CALL_GL_API_RETURN
+/*
+ * glGetString() is special because we expose some extensions in the wrapper
+ */
+
+extern "C" const GLubyte * __glGetString(GLenum name);
+
+const GLubyte * glGetString(GLenum name)
+{
+ const GLubyte * ret = egl_get_string_for_current_context(name);
+ if (ret == NULL) {
+ ret = __glGetString(name);
+ }
+ return ret;
+}
/*
* These GL calls are special because they need to EGL to retrieve some
diff --git a/opengl/libs/GLES_CM/gl_api.in b/opengl/libs/GLES_CM/gl_api.in
index 7f20c4f..c8f6b0c 100644
--- a/opengl/libs/GLES_CM/gl_api.in
+++ b/opengl/libs/GLES_CM/gl_api.in
@@ -262,7 +262,7 @@ void API_ENTRY(glGetMaterialxv)(GLenum face, GLenum pname, GLfixed *params) {
void API_ENTRY(glGetPointerv)(GLenum pname, GLvoid **params) {
CALL_GL_API(glGetPointerv, pname, params);
}
-const GLubyte * API_ENTRY(glGetString)(GLenum name) {
+const GLubyte * API_ENTRY(__glGetString)(GLenum name) {
CALL_GL_API_RETURN(glGetString, name);
}
void API_ENTRY(glGetTexEnviv)(GLenum env, GLenum pname, GLint *params) {
diff --git a/opengl/libs/GLES_CM/glext_api.in b/opengl/libs/GLES_CM/glext_api.in
index 5393fa6..268a535 100644
--- a/opengl/libs/GLES_CM/glext_api.in
+++ b/opengl/libs/GLES_CM/glext_api.in
@@ -280,15 +280,57 @@ void API_ENTRY(glGenVertexArraysOES)(GLsizei n, GLuint *arrays) {
GLboolean API_ENTRY(glIsVertexArrayOES)(GLuint array) {
CALL_GL_API_RETURN(glIsVertexArrayOES, array);
}
+void API_ENTRY(glRenderbufferStorageMultisampleAPPLE)(GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height) {
+ CALL_GL_API(glRenderbufferStorageMultisampleAPPLE, target, samples, internalformat, width, height);
+}
+void API_ENTRY(glResolveMultisampleFramebufferAPPLE)(void) {
+ CALL_GL_API(glResolveMultisampleFramebufferAPPLE);
+}
void API_ENTRY(glDiscardFramebufferEXT)(GLenum target, GLsizei numAttachments, const GLenum *attachments) {
CALL_GL_API(glDiscardFramebufferEXT, target, numAttachments, attachments);
}
+void API_ENTRY(glRenderbufferStorageMultisampleEXT)(GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height) {
+ CALL_GL_API(glRenderbufferStorageMultisampleEXT, target, samples, internalformat, width, height);
+}
+void API_ENTRY(glFramebufferTexture2DMultisampleEXT)(GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level, GLsizei samples) {
+ CALL_GL_API(glFramebufferTexture2DMultisampleEXT, target, attachment, textarget, texture, level, samples);
+}
void API_ENTRY(glMultiDrawArraysEXT)(GLenum mode, GLint *first, GLsizei *count, GLsizei primcount) {
CALL_GL_API(glMultiDrawArraysEXT, mode, first, count, primcount);
}
void API_ENTRY(glMultiDrawElementsEXT)(GLenum mode, const GLsizei *count, GLenum type, const GLvoid* *indices, GLsizei primcount) {
CALL_GL_API(glMultiDrawElementsEXT, mode, count, type, indices, primcount);
}
+GLenum API_ENTRY(glGetGraphicsResetStatusEXT)(void) {
+ CALL_GL_API_RETURN(glGetGraphicsResetStatusEXT);
+}
+void API_ENTRY(glReadnPixelsEXT)(GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, GLsizei bufSize, void *data) {
+ CALL_GL_API(glReadnPixelsEXT, x, y, width, height, format, type, bufSize, data);
+}
+void API_ENTRY(glGetnUniformfvEXT)(GLuint program, GLint location, GLsizei bufSize, float *params) {
+ CALL_GL_API(glGetnUniformfvEXT, program, location, bufSize, params);
+}
+void API_ENTRY(glGetnUniformivEXT)(GLuint program, GLint location, GLsizei bufSize, GLint *params) {
+ CALL_GL_API(glGetnUniformivEXT, program, location, bufSize, params);
+}
+void API_ENTRY(glTexStorage1DEXT)(GLenum target, GLsizei levels, GLenum internalformat, GLsizei width) {
+ CALL_GL_API(glTexStorage1DEXT, target, levels, internalformat, width);
+}
+void API_ENTRY(glTexStorage2DEXT)(GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height) {
+ CALL_GL_API(glTexStorage2DEXT, target, levels, internalformat, width, height);
+}
+void API_ENTRY(glTexStorage3DEXT)(GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth) {
+ CALL_GL_API(glTexStorage3DEXT, target, levels, internalformat, width, height, depth);
+}
+void API_ENTRY(glTextureStorage1DEXT)(GLuint texture, GLenum target, GLsizei levels, GLenum internalformat, GLsizei width) {
+ CALL_GL_API(glTextureStorage1DEXT, texture, target, levels, internalformat, width);
+}
+void API_ENTRY(glTextureStorage2DEXT)(GLuint texture, GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height) {
+ CALL_GL_API(glTextureStorage2DEXT, texture, target, levels, internalformat, width, height);
+}
+void API_ENTRY(glTextureStorage3DEXT)(GLuint texture, GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth) {
+ CALL_GL_API(glTextureStorage3DEXT, texture, target, levels, internalformat, width, height, depth);
+}
void API_ENTRY(glClipPlanefIMG)(GLenum p, const GLfloat *eqn) {
CALL_GL_API(glClipPlanefIMG, p, eqn);
}
diff --git a/opengl/libs/GLES_trace/gltrace.proto b/opengl/libs/GLES_trace/gltrace.proto
index 7dde69f..11cf24f 100644
--- a/opengl/libs/GLES_trace/gltrace.proto
+++ b/opengl/libs/GLES_trace/gltrace.proto
@@ -400,6 +400,68 @@ message GLMessage {
glViewport = 374;
glWeightPointerOES = 375;
+ glActiveShaderProgramEXT = 502;
+ glAlphaFuncQCOM = 503;
+ glBeginQueryEXT = 504;
+ glBindProgramPipelineEXT = 505;
+ glBlitFramebufferANGLE = 506;
+ glCreateShaderProgramvEXT = 507;
+ glDeleteProgramPipelinesEXT = 508;
+ glDeleteQueriesEXT = 509;
+ glDrawBuffersNV = 510;
+ glEndQueryEXT = 511;
+ glFramebufferTexture2DMultisampleEXT = 512;
+ glGenProgramPipelinesEXT = 513;
+ glGenQueriesEXT = 514;
+ glGetGraphicsResetStatusEXT = 515;
+ glGetObjectLabelEXT = 516;
+ glGetProgramPipelineInfoLogEXT = 517;
+ glGetProgramPipelineivEXT = 518;
+ glGetQueryObjectuivEXT = 519;
+ glGetQueryivEXT = 520;
+ glGetnUniformfvEXT = 521;
+ glGetnUniformivEXT = 521;
+ glInsertEventMarkerEXT = 522;
+ glIsProgramPipelineEXT = 523;
+ glIsQueryEXT = 524;
+ glLabelObjectEXT = 525;
+ glPopGroupMarkerEXT = 526;
+ glProgramParameteriEXT = 527;
+ glProgramUniform1fEXT = 528;
+ glProgramUniform1fvEXT = 529;
+ glProgramUniform1iEXT = 530;
+ glProgramUniform1ivEXT = 531;
+ glProgramUniform2fEXT = 532;
+ glProgramUniform2fvEXT = 533;
+ glProgramUniform2iEXT = 534;
+ glProgramUniform2ivEXT = 535;
+ glProgramUniform3fEXT = 536;
+ glProgramUniform3fvEXT = 537;
+ glProgramUniform3iEXT = 538;
+ glProgramUniform3ivEXT = 539;
+ glProgramUniform4fEXT = 540;
+ glProgramUniform4fvEXT = 541;
+ glProgramUniform4iEXT = 542;
+ glProgramUniform4ivEXT = 543;
+ glProgramUniformMatrix2fvEXT = 544;
+ glProgramUniformMatrix3fvEXT = 545;
+ glProgramUniformMatrix4fvEXT = 546;
+ glPushGroupMarkerEXT = 547;
+ glReadBufferNV = 548;
+ glReadnPixelsEXT = 549;
+ glRenderbufferStorageMultisampleANGLE = 550;
+ glRenderbufferStorageMultisampleAPPLE = 551;
+ glRenderbufferStorageMultisampleEXT = 552;
+ glResolveMultisampleFramebufferAPPLE = 553;
+ glTexStorage1DEXT = 554;
+ glTexStorage2DEXT = 555;
+ glTexStorage3DEXT = 556;
+ glTextureStorage1DEXT = 557;
+ glTextureStorage2DEXT = 558;
+ glTextureStorage3DEXT = 559;
+ glUseProgramStagesEXT = 560;
+ glValidateProgramPipelineEXT = 561;
+
eglGetDisplay = 2000;
eglInitialize = 2001;
eglTerminate = 2002;
diff --git a/opengl/libs/GLES_trace/src/gltrace.pb.cpp b/opengl/libs/GLES_trace/src/gltrace.pb.cpp
index 9a90603..bb9d4a7 100644
--- a/opengl/libs/GLES_trace/src/gltrace.pb.cpp
+++ b/opengl/libs/GLES_trace/src/gltrace.pb.cpp
@@ -419,6 +419,66 @@ bool GLMessage_Function_IsValid(int value) {
case 373:
case 374:
case 375:
+ case 502:
+ case 503:
+ case 504:
+ case 505:
+ case 506:
+ case 507:
+ case 508:
+ case 509:
+ case 510:
+ case 511:
+ case 512:
+ case 513:
+ case 514:
+ case 515:
+ case 516:
+ case 517:
+ case 518:
+ case 519:
+ case 520:
+ case 521:
+ case 522:
+ case 523:
+ case 524:
+ case 525:
+ case 526:
+ case 527:
+ case 528:
+ case 529:
+ case 530:
+ case 531:
+ case 532:
+ case 533:
+ case 534:
+ case 535:
+ case 536:
+ case 537:
+ case 538:
+ case 539:
+ case 540:
+ case 541:
+ case 542:
+ case 543:
+ case 544:
+ case 545:
+ case 546:
+ case 547:
+ case 548:
+ case 549:
+ case 550:
+ case 551:
+ case 552:
+ case 553:
+ case 554:
+ case 555:
+ case 556:
+ case 557:
+ case 558:
+ case 559:
+ case 560:
+ case 561:
case 2000:
case 2001:
case 2002:
@@ -850,6 +910,67 @@ const GLMessage_Function GLMessage::glVertexAttribPointer;
const GLMessage_Function GLMessage::glVertexPointer;
const GLMessage_Function GLMessage::glViewport;
const GLMessage_Function GLMessage::glWeightPointerOES;
+const GLMessage_Function GLMessage::glActiveShaderProgramEXT;
+const GLMessage_Function GLMessage::glAlphaFuncQCOM;
+const GLMessage_Function GLMessage::glBeginQueryEXT;
+const GLMessage_Function GLMessage::glBindProgramPipelineEXT;
+const GLMessage_Function GLMessage::glBlitFramebufferANGLE;
+const GLMessage_Function GLMessage::glCreateShaderProgramvEXT;
+const GLMessage_Function GLMessage::glDeleteProgramPipelinesEXT;
+const GLMessage_Function GLMessage::glDeleteQueriesEXT;
+const GLMessage_Function GLMessage::glDrawBuffersNV;
+const GLMessage_Function GLMessage::glEndQueryEXT;
+const GLMessage_Function GLMessage::glFramebufferTexture2DMultisampleEXT;
+const GLMessage_Function GLMessage::glGenProgramPipelinesEXT;
+const GLMessage_Function GLMessage::glGenQueriesEXT;
+const GLMessage_Function GLMessage::glGetGraphicsResetStatusEXT;
+const GLMessage_Function GLMessage::glGetObjectLabelEXT;
+const GLMessage_Function GLMessage::glGetProgramPipelineInfoLogEXT;
+const GLMessage_Function GLMessage::glGetProgramPipelineivEXT;
+const GLMessage_Function GLMessage::glGetQueryObjectuivEXT;
+const GLMessage_Function GLMessage::glGetQueryivEXT;
+const GLMessage_Function GLMessage::glGetnUniformfvEXT;
+const GLMessage_Function GLMessage::glGetnUniformivEXT;
+const GLMessage_Function GLMessage::glInsertEventMarkerEXT;
+const GLMessage_Function GLMessage::glIsProgramPipelineEXT;
+const GLMessage_Function GLMessage::glIsQueryEXT;
+const GLMessage_Function GLMessage::glLabelObjectEXT;
+const GLMessage_Function GLMessage::glPopGroupMarkerEXT;
+const GLMessage_Function GLMessage::glProgramParameteriEXT;
+const GLMessage_Function GLMessage::glProgramUniform1fEXT;
+const GLMessage_Function GLMessage::glProgramUniform1fvEXT;
+const GLMessage_Function GLMessage::glProgramUniform1iEXT;
+const GLMessage_Function GLMessage::glProgramUniform1ivEXT;
+const GLMessage_Function GLMessage::glProgramUniform2fEXT;
+const GLMessage_Function GLMessage::glProgramUniform2fvEXT;
+const GLMessage_Function GLMessage::glProgramUniform2iEXT;
+const GLMessage_Function GLMessage::glProgramUniform2ivEXT;
+const GLMessage_Function GLMessage::glProgramUniform3fEXT;
+const GLMessage_Function GLMessage::glProgramUniform3fvEXT;
+const GLMessage_Function GLMessage::glProgramUniform3iEXT;
+const GLMessage_Function GLMessage::glProgramUniform3ivEXT;
+const GLMessage_Function GLMessage::glProgramUniform4fEXT;
+const GLMessage_Function GLMessage::glProgramUniform4fvEXT;
+const GLMessage_Function GLMessage::glProgramUniform4iEXT;
+const GLMessage_Function GLMessage::glProgramUniform4ivEXT;
+const GLMessage_Function GLMessage::glProgramUniformMatrix2fvEXT;
+const GLMessage_Function GLMessage::glProgramUniformMatrix3fvEXT;
+const GLMessage_Function GLMessage::glProgramUniformMatrix4fvEXT;
+const GLMessage_Function GLMessage::glPushGroupMarkerEXT;
+const GLMessage_Function GLMessage::glReadBufferNV;
+const GLMessage_Function GLMessage::glReadnPixelsEXT;
+const GLMessage_Function GLMessage::glRenderbufferStorageMultisampleANGLE;
+const GLMessage_Function GLMessage::glRenderbufferStorageMultisampleAPPLE;
+const GLMessage_Function GLMessage::glRenderbufferStorageMultisampleEXT;
+const GLMessage_Function GLMessage::glResolveMultisampleFramebufferAPPLE;
+const GLMessage_Function GLMessage::glTexStorage1DEXT;
+const GLMessage_Function GLMessage::glTexStorage2DEXT;
+const GLMessage_Function GLMessage::glTexStorage3DEXT;
+const GLMessage_Function GLMessage::glTextureStorage1DEXT;
+const GLMessage_Function GLMessage::glTextureStorage2DEXT;
+const GLMessage_Function GLMessage::glTextureStorage3DEXT;
+const GLMessage_Function GLMessage::glUseProgramStagesEXT;
+const GLMessage_Function GLMessage::glValidateProgramPipelineEXT;
const GLMessage_Function GLMessage::eglGetDisplay;
const GLMessage_Function GLMessage::eglInitialize;
const GLMessage_Function GLMessage::eglTerminate;
diff --git a/opengl/libs/GLES_trace/src/gltrace.pb.h b/opengl/libs/GLES_trace/src/gltrace.pb.h
index 5a7a16f..e3b8990 100644
--- a/opengl/libs/GLES_trace/src/gltrace.pb.h
+++ b/opengl/libs/GLES_trace/src/gltrace.pb.h
@@ -427,6 +427,67 @@ enum GLMessage_Function {
GLMessage_Function_glVertexPointer = 373,
GLMessage_Function_glViewport = 374,
GLMessage_Function_glWeightPointerOES = 375,
+ GLMessage_Function_glActiveShaderProgramEXT = 502,
+ GLMessage_Function_glAlphaFuncQCOM = 503,
+ GLMessage_Function_glBeginQueryEXT = 504,
+ GLMessage_Function_glBindProgramPipelineEXT = 505,
+ GLMessage_Function_glBlitFramebufferANGLE = 506,
+ GLMessage_Function_glCreateShaderProgramvEXT = 507,
+ GLMessage_Function_glDeleteProgramPipelinesEXT = 508,
+ GLMessage_Function_glDeleteQueriesEXT = 509,
+ GLMessage_Function_glDrawBuffersNV = 510,
+ GLMessage_Function_glEndQueryEXT = 511,
+ GLMessage_Function_glFramebufferTexture2DMultisampleEXT = 512,
+ GLMessage_Function_glGenProgramPipelinesEXT = 513,
+ GLMessage_Function_glGenQueriesEXT = 514,
+ GLMessage_Function_glGetGraphicsResetStatusEXT = 515,
+ GLMessage_Function_glGetObjectLabelEXT = 516,
+ GLMessage_Function_glGetProgramPipelineInfoLogEXT = 517,
+ GLMessage_Function_glGetProgramPipelineivEXT = 518,
+ GLMessage_Function_glGetQueryObjectuivEXT = 519,
+ GLMessage_Function_glGetQueryivEXT = 520,
+ GLMessage_Function_glGetnUniformfvEXT = 521,
+ GLMessage_Function_glGetnUniformivEXT = 521,
+ GLMessage_Function_glInsertEventMarkerEXT = 522,
+ GLMessage_Function_glIsProgramPipelineEXT = 523,
+ GLMessage_Function_glIsQueryEXT = 524,
+ GLMessage_Function_glLabelObjectEXT = 525,
+ GLMessage_Function_glPopGroupMarkerEXT = 526,
+ GLMessage_Function_glProgramParameteriEXT = 527,
+ GLMessage_Function_glProgramUniform1fEXT = 528,
+ GLMessage_Function_glProgramUniform1fvEXT = 529,
+ GLMessage_Function_glProgramUniform1iEXT = 530,
+ GLMessage_Function_glProgramUniform1ivEXT = 531,
+ GLMessage_Function_glProgramUniform2fEXT = 532,
+ GLMessage_Function_glProgramUniform2fvEXT = 533,
+ GLMessage_Function_glProgramUniform2iEXT = 534,
+ GLMessage_Function_glProgramUniform2ivEXT = 535,
+ GLMessage_Function_glProgramUniform3fEXT = 536,
+ GLMessage_Function_glProgramUniform3fvEXT = 537,
+ GLMessage_Function_glProgramUniform3iEXT = 538,
+ GLMessage_Function_glProgramUniform3ivEXT = 539,
+ GLMessage_Function_glProgramUniform4fEXT = 540,
+ GLMessage_Function_glProgramUniform4fvEXT = 541,
+ GLMessage_Function_glProgramUniform4iEXT = 542,
+ GLMessage_Function_glProgramUniform4ivEXT = 543,
+ GLMessage_Function_glProgramUniformMatrix2fvEXT = 544,
+ GLMessage_Function_glProgramUniformMatrix3fvEXT = 545,
+ GLMessage_Function_glProgramUniformMatrix4fvEXT = 546,
+ GLMessage_Function_glPushGroupMarkerEXT = 547,
+ GLMessage_Function_glReadBufferNV = 548,
+ GLMessage_Function_glReadnPixelsEXT = 549,
+ GLMessage_Function_glRenderbufferStorageMultisampleANGLE = 550,
+ GLMessage_Function_glRenderbufferStorageMultisampleAPPLE = 551,
+ GLMessage_Function_glRenderbufferStorageMultisampleEXT = 552,
+ GLMessage_Function_glResolveMultisampleFramebufferAPPLE = 553,
+ GLMessage_Function_glTexStorage1DEXT = 554,
+ GLMessage_Function_glTexStorage2DEXT = 555,
+ GLMessage_Function_glTexStorage3DEXT = 556,
+ GLMessage_Function_glTextureStorage1DEXT = 557,
+ GLMessage_Function_glTextureStorage2DEXT = 558,
+ GLMessage_Function_glTextureStorage3DEXT = 559,
+ GLMessage_Function_glUseProgramStagesEXT = 560,
+ GLMessage_Function_glValidateProgramPipelineEXT = 561,
GLMessage_Function_eglGetDisplay = 2000,
GLMessage_Function_eglInitialize = 2001,
GLMessage_Function_eglTerminate = 2002,
@@ -1182,6 +1243,67 @@ class GLMessage : public ::google::protobuf::MessageLite {
static const Function glVertexPointer = GLMessage_Function_glVertexPointer;
static const Function glViewport = GLMessage_Function_glViewport;
static const Function glWeightPointerOES = GLMessage_Function_glWeightPointerOES;
+ static const Function glActiveShaderProgramEXT = GLMessage_Function_glActiveShaderProgramEXT;
+ static const Function glAlphaFuncQCOM = GLMessage_Function_glAlphaFuncQCOM;
+ static const Function glBeginQueryEXT = GLMessage_Function_glBeginQueryEXT;
+ static const Function glBindProgramPipelineEXT = GLMessage_Function_glBindProgramPipelineEXT;
+ static const Function glBlitFramebufferANGLE = GLMessage_Function_glBlitFramebufferANGLE;
+ static const Function glCreateShaderProgramvEXT = GLMessage_Function_glCreateShaderProgramvEXT;
+ static const Function glDeleteProgramPipelinesEXT = GLMessage_Function_glDeleteProgramPipelinesEXT;
+ static const Function glDeleteQueriesEXT = GLMessage_Function_glDeleteQueriesEXT;
+ static const Function glDrawBuffersNV = GLMessage_Function_glDrawBuffersNV;
+ static const Function glEndQueryEXT = GLMessage_Function_glEndQueryEXT;
+ static const Function glFramebufferTexture2DMultisampleEXT = GLMessage_Function_glFramebufferTexture2DMultisampleEXT;
+ static const Function glGenProgramPipelinesEXT = GLMessage_Function_glGenProgramPipelinesEXT;
+ static const Function glGenQueriesEXT = GLMessage_Function_glGenQueriesEXT;
+ static const Function glGetGraphicsResetStatusEXT = GLMessage_Function_glGetGraphicsResetStatusEXT;
+ static const Function glGetObjectLabelEXT = GLMessage_Function_glGetObjectLabelEXT;
+ static const Function glGetProgramPipelineInfoLogEXT = GLMessage_Function_glGetProgramPipelineInfoLogEXT;
+ static const Function glGetProgramPipelineivEXT = GLMessage_Function_glGetProgramPipelineivEXT;
+ static const Function glGetQueryObjectuivEXT = GLMessage_Function_glGetQueryObjectuivEXT;
+ static const Function glGetQueryivEXT = GLMessage_Function_glGetQueryivEXT;
+ static const Function glGetnUniformfvEXT = GLMessage_Function_glGetnUniformfvEXT;
+ static const Function glGetnUniformivEXT = GLMessage_Function_glGetnUniformivEXT;
+ static const Function glInsertEventMarkerEXT = GLMessage_Function_glInsertEventMarkerEXT;
+ static const Function glIsProgramPipelineEXT = GLMessage_Function_glIsProgramPipelineEXT;
+ static const Function glIsQueryEXT = GLMessage_Function_glIsQueryEXT;
+ static const Function glLabelObjectEXT = GLMessage_Function_glLabelObjectEXT;
+ static const Function glPopGroupMarkerEXT = GLMessage_Function_glPopGroupMarkerEXT;
+ static const Function glProgramParameteriEXT = GLMessage_Function_glProgramParameteriEXT;
+ static const Function glProgramUniform1fEXT = GLMessage_Function_glProgramUniform1fEXT;
+ static const Function glProgramUniform1fvEXT = GLMessage_Function_glProgramUniform1fvEXT;
+ static const Function glProgramUniform1iEXT = GLMessage_Function_glProgramUniform1iEXT;
+ static const Function glProgramUniform1ivEXT = GLMessage_Function_glProgramUniform1ivEXT;
+ static const Function glProgramUniform2fEXT = GLMessage_Function_glProgramUniform2fEXT;
+ static const Function glProgramUniform2fvEXT = GLMessage_Function_glProgramUniform2fvEXT;
+ static const Function glProgramUniform2iEXT = GLMessage_Function_glProgramUniform2iEXT;
+ static const Function glProgramUniform2ivEXT = GLMessage_Function_glProgramUniform2ivEXT;
+ static const Function glProgramUniform3fEXT = GLMessage_Function_glProgramUniform3fEXT;
+ static const Function glProgramUniform3fvEXT = GLMessage_Function_glProgramUniform3fvEXT;
+ static const Function glProgramUniform3iEXT = GLMessage_Function_glProgramUniform3iEXT;
+ static const Function glProgramUniform3ivEXT = GLMessage_Function_glProgramUniform3ivEXT;
+ static const Function glProgramUniform4fEXT = GLMessage_Function_glProgramUniform4fEXT;
+ static const Function glProgramUniform4fvEXT = GLMessage_Function_glProgramUniform4fvEXT;
+ static const Function glProgramUniform4iEXT = GLMessage_Function_glProgramUniform4iEXT;
+ static const Function glProgramUniform4ivEXT = GLMessage_Function_glProgramUniform4ivEXT;
+ static const Function glProgramUniformMatrix2fvEXT = GLMessage_Function_glProgramUniformMatrix2fvEXT;
+ static const Function glProgramUniformMatrix3fvEXT = GLMessage_Function_glProgramUniformMatrix3fvEXT;
+ static const Function glProgramUniformMatrix4fvEXT = GLMessage_Function_glProgramUniformMatrix4fvEXT;
+ static const Function glPushGroupMarkerEXT = GLMessage_Function_glPushGroupMarkerEXT;
+ static const Function glReadBufferNV = GLMessage_Function_glReadBufferNV;
+ static const Function glReadnPixelsEXT = GLMessage_Function_glReadnPixelsEXT;
+ static const Function glRenderbufferStorageMultisampleANGLE = GLMessage_Function_glRenderbufferStorageMultisampleANGLE;
+ static const Function glRenderbufferStorageMultisampleAPPLE = GLMessage_Function_glRenderbufferStorageMultisampleAPPLE;
+ static const Function glRenderbufferStorageMultisampleEXT = GLMessage_Function_glRenderbufferStorageMultisampleEXT;
+ static const Function glResolveMultisampleFramebufferAPPLE = GLMessage_Function_glResolveMultisampleFramebufferAPPLE;
+ static const Function glTexStorage1DEXT = GLMessage_Function_glTexStorage1DEXT;
+ static const Function glTexStorage2DEXT = GLMessage_Function_glTexStorage2DEXT;
+ static const Function glTexStorage3DEXT = GLMessage_Function_glTexStorage3DEXT;
+ static const Function glTextureStorage1DEXT = GLMessage_Function_glTextureStorage1DEXT;
+ static const Function glTextureStorage2DEXT = GLMessage_Function_glTextureStorage2DEXT;
+ static const Function glTextureStorage3DEXT = GLMessage_Function_glTextureStorage3DEXT;
+ static const Function glUseProgramStagesEXT = GLMessage_Function_glUseProgramStagesEXT;
+ static const Function glValidateProgramPipelineEXT = GLMessage_Function_glValidateProgramPipelineEXT;
static const Function eglGetDisplay = GLMessage_Function_eglGetDisplay;
static const Function eglInitialize = GLMessage_Function_eglInitialize;
static const Function eglTerminate = GLMessage_Function_eglTerminate;
diff --git a/opengl/libs/GLES_trace/src/gltrace_api.cpp b/opengl/libs/GLES_trace/src/gltrace_api.cpp
index c8e820d..a2366ac 100644
--- a/opengl/libs/GLES_trace/src/gltrace_api.cpp
+++ b/opengl/libs/GLES_trace/src/gltrace_api.cpp
@@ -5809,6 +5809,339 @@ void GLTrace_glGetPerfMonitorCounterDataAMD(GLuint monitor, GLenum pname, GLsize
glContext->traceGLMessage(&glmsg);
}
+void GLTrace_glBlitFramebufferANGLE(GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1, GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1, GLbitfield mask, GLenum filter) {
+ GLMessage glmsg;
+ GLTraceContext *glContext = getGLTraceContext();
+
+ glmsg.set_function(GLMessage::glBlitFramebufferANGLE);
+
+ // copy argument srcX0
+ GLMessage_DataType *arg_srcX0 = glmsg.add_args();
+ arg_srcX0->set_isarray(false);
+ arg_srcX0->set_type(GLMessage::DataType::INT);
+ arg_srcX0->add_intvalue(srcX0);
+
+ // copy argument srcY0
+ GLMessage_DataType *arg_srcY0 = glmsg.add_args();
+ arg_srcY0->set_isarray(false);
+ arg_srcY0->set_type(GLMessage::DataType::INT);
+ arg_srcY0->add_intvalue(srcY0);
+
+ // copy argument srcX1
+ GLMessage_DataType *arg_srcX1 = glmsg.add_args();
+ arg_srcX1->set_isarray(false);
+ arg_srcX1->set_type(GLMessage::DataType::INT);
+ arg_srcX1->add_intvalue(srcX1);
+
+ // copy argument srcY1
+ GLMessage_DataType *arg_srcY1 = glmsg.add_args();
+ arg_srcY1->set_isarray(false);
+ arg_srcY1->set_type(GLMessage::DataType::INT);
+ arg_srcY1->add_intvalue(srcY1);
+
+ // copy argument dstX0
+ GLMessage_DataType *arg_dstX0 = glmsg.add_args();
+ arg_dstX0->set_isarray(false);
+ arg_dstX0->set_type(GLMessage::DataType::INT);
+ arg_dstX0->add_intvalue(dstX0);
+
+ // copy argument dstY0
+ GLMessage_DataType *arg_dstY0 = glmsg.add_args();
+ arg_dstY0->set_isarray(false);
+ arg_dstY0->set_type(GLMessage::DataType::INT);
+ arg_dstY0->add_intvalue(dstY0);
+
+ // copy argument dstX1
+ GLMessage_DataType *arg_dstX1 = glmsg.add_args();
+ arg_dstX1->set_isarray(false);
+ arg_dstX1->set_type(GLMessage::DataType::INT);
+ arg_dstX1->add_intvalue(dstX1);
+
+ // copy argument dstY1
+ GLMessage_DataType *arg_dstY1 = glmsg.add_args();
+ arg_dstY1->set_isarray(false);
+ arg_dstY1->set_type(GLMessage::DataType::INT);
+ arg_dstY1->add_intvalue(dstY1);
+
+ // copy argument mask
+ GLMessage_DataType *arg_mask = glmsg.add_args();
+ arg_mask->set_isarray(false);
+ arg_mask->set_type(GLMessage::DataType::INT);
+ arg_mask->add_intvalue(mask);
+
+ // copy argument filter
+ GLMessage_DataType *arg_filter = glmsg.add_args();
+ arg_filter->set_isarray(false);
+ arg_filter->set_type(GLMessage::DataType::ENUM);
+ arg_filter->add_intvalue((int)filter);
+
+ // call function
+ nsecs_t start_time = systemTime();
+ glContext->hooks->gl.glBlitFramebufferANGLE(srcX0, srcY0, srcX1, srcY1, dstX0, dstY0, dstX1, dstY1, mask, filter);
+ nsecs_t end_time = systemTime();
+
+ fixupGLMessage(glContext, start_time, end_time, &glmsg);
+ glContext->traceGLMessage(&glmsg);
+}
+
+void GLTrace_glRenderbufferStorageMultisampleANGLE(GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height) {
+ GLMessage glmsg;
+ GLTraceContext *glContext = getGLTraceContext();
+
+ glmsg.set_function(GLMessage::glRenderbufferStorageMultisampleANGLE);
+
+ // copy argument target
+ GLMessage_DataType *arg_target = glmsg.add_args();
+ arg_target->set_isarray(false);
+ arg_target->set_type(GLMessage::DataType::ENUM);
+ arg_target->add_intvalue((int)target);
+
+ // copy argument samples
+ GLMessage_DataType *arg_samples = glmsg.add_args();
+ arg_samples->set_isarray(false);
+ arg_samples->set_type(GLMessage::DataType::INT);
+ arg_samples->add_intvalue(samples);
+
+ // copy argument internalformat
+ GLMessage_DataType *arg_internalformat = glmsg.add_args();
+ arg_internalformat->set_isarray(false);
+ arg_internalformat->set_type(GLMessage::DataType::ENUM);
+ arg_internalformat->add_intvalue((int)internalformat);
+
+ // copy argument width
+ GLMessage_DataType *arg_width = glmsg.add_args();
+ arg_width->set_isarray(false);
+ arg_width->set_type(GLMessage::DataType::INT);
+ arg_width->add_intvalue(width);
+
+ // copy argument height
+ GLMessage_DataType *arg_height = glmsg.add_args();
+ arg_height->set_isarray(false);
+ arg_height->set_type(GLMessage::DataType::INT);
+ arg_height->add_intvalue(height);
+
+ // call function
+ nsecs_t start_time = systemTime();
+ glContext->hooks->gl.glRenderbufferStorageMultisampleANGLE(target, samples, internalformat, width, height);
+ nsecs_t end_time = systemTime();
+
+ fixupGLMessage(glContext, start_time, end_time, &glmsg);
+ glContext->traceGLMessage(&glmsg);
+}
+
+void GLTrace_glRenderbufferStorageMultisampleAPPLE(GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height) {
+ GLMessage glmsg;
+ GLTraceContext *glContext = getGLTraceContext();
+
+ glmsg.set_function(GLMessage::glRenderbufferStorageMultisampleAPPLE);
+
+ // copy argument target
+ GLMessage_DataType *arg_target = glmsg.add_args();
+ arg_target->set_isarray(false);
+ arg_target->set_type(GLMessage::DataType::ENUM);
+ arg_target->add_intvalue((int)target);
+
+ // copy argument samples
+ GLMessage_DataType *arg_samples = glmsg.add_args();
+ arg_samples->set_isarray(false);
+ arg_samples->set_type(GLMessage::DataType::INT);
+ arg_samples->add_intvalue(samples);
+
+ // copy argument internalformat
+ GLMessage_DataType *arg_internalformat = glmsg.add_args();
+ arg_internalformat->set_isarray(false);
+ arg_internalformat->set_type(GLMessage::DataType::ENUM);
+ arg_internalformat->add_intvalue((int)internalformat);
+
+ // copy argument width
+ GLMessage_DataType *arg_width = glmsg.add_args();
+ arg_width->set_isarray(false);
+ arg_width->set_type(GLMessage::DataType::INT);
+ arg_width->add_intvalue(width);
+
+ // copy argument height
+ GLMessage_DataType *arg_height = glmsg.add_args();
+ arg_height->set_isarray(false);
+ arg_height->set_type(GLMessage::DataType::INT);
+ arg_height->add_intvalue(height);
+
+ // call function
+ nsecs_t start_time = systemTime();
+ glContext->hooks->gl.glRenderbufferStorageMultisampleAPPLE(target, samples, internalformat, width, height);
+ nsecs_t end_time = systemTime();
+
+ fixupGLMessage(glContext, start_time, end_time, &glmsg);
+ glContext->traceGLMessage(&glmsg);
+}
+
+void GLTrace_glResolveMultisampleFramebufferAPPLE(void) {
+ GLMessage glmsg;
+ GLTraceContext *glContext = getGLTraceContext();
+
+ glmsg.set_function(GLMessage::glResolveMultisampleFramebufferAPPLE);
+
+ // call function
+ nsecs_t start_time = systemTime();
+ glContext->hooks->gl.glResolveMultisampleFramebufferAPPLE();
+ nsecs_t end_time = systemTime();
+
+ fixupGLMessage(glContext, start_time, end_time, &glmsg);
+ glContext->traceGLMessage(&glmsg);
+}
+
+void GLTrace_glLabelObjectEXT(GLenum type, GLuint object, GLsizei length, const GLchar *label) {
+ GLMessage glmsg;
+ GLTraceContext *glContext = getGLTraceContext();
+
+ glmsg.set_function(GLMessage::glLabelObjectEXT);
+
+ // copy argument type
+ GLMessage_DataType *arg_type = glmsg.add_args();
+ arg_type->set_isarray(false);
+ arg_type->set_type(GLMessage::DataType::ENUM);
+ arg_type->add_intvalue((int)type);
+
+ // copy argument object
+ GLMessage_DataType *arg_object = glmsg.add_args();
+ arg_object->set_isarray(false);
+ arg_object->set_type(GLMessage::DataType::INT);
+ arg_object->add_intvalue(object);
+
+ // copy argument length
+ GLMessage_DataType *arg_length = glmsg.add_args();
+ arg_length->set_isarray(false);
+ arg_length->set_type(GLMessage::DataType::INT);
+ arg_length->add_intvalue(length);
+
+ // copy argument label
+ GLMessage_DataType *arg_label = glmsg.add_args();
+ arg_label->set_isarray(false);
+ arg_label->set_type(GLMessage::DataType::INT);
+ arg_label->add_intvalue((int)label);
+
+ // call function
+ nsecs_t start_time = systemTime();
+ glContext->hooks->gl.glLabelObjectEXT(type, object, length, label);
+ nsecs_t end_time = systemTime();
+
+ fixupGLMessage(glContext, start_time, end_time, &glmsg);
+ glContext->traceGLMessage(&glmsg);
+}
+
+void GLTrace_glGetObjectLabelEXT(GLenum type, GLuint object, GLsizei bufSize, GLsizei *length, GLchar *label) {
+ GLMessage glmsg;
+ GLTraceContext *glContext = getGLTraceContext();
+
+ glmsg.set_function(GLMessage::glGetObjectLabelEXT);
+
+ // copy argument type
+ GLMessage_DataType *arg_type = glmsg.add_args();
+ arg_type->set_isarray(false);
+ arg_type->set_type(GLMessage::DataType::ENUM);
+ arg_type->add_intvalue((int)type);
+
+ // copy argument object
+ GLMessage_DataType *arg_object = glmsg.add_args();
+ arg_object->set_isarray(false);
+ arg_object->set_type(GLMessage::DataType::INT);
+ arg_object->add_intvalue(object);
+
+ // copy argument bufSize
+ GLMessage_DataType *arg_bufSize = glmsg.add_args();
+ arg_bufSize->set_isarray(false);
+ arg_bufSize->set_type(GLMessage::DataType::INT);
+ arg_bufSize->add_intvalue(bufSize);
+
+ // copy argument length
+ GLMessage_DataType *arg_length = glmsg.add_args();
+ arg_length->set_isarray(false);
+ arg_length->set_type(GLMessage::DataType::INT);
+ arg_length->add_intvalue((int)length);
+
+ // copy argument label
+ GLMessage_DataType *arg_label = glmsg.add_args();
+ arg_label->set_isarray(false);
+ arg_label->set_type(GLMessage::DataType::INT);
+ arg_label->add_intvalue((int)label);
+
+ // call function
+ nsecs_t start_time = systemTime();
+ glContext->hooks->gl.glGetObjectLabelEXT(type, object, bufSize, length, label);
+ nsecs_t end_time = systemTime();
+
+ fixupGLMessage(glContext, start_time, end_time, &glmsg);
+ glContext->traceGLMessage(&glmsg);
+}
+
+void GLTrace_glInsertEventMarkerEXT(GLsizei length, const GLchar *marker) {
+ GLMessage glmsg;
+ GLTraceContext *glContext = getGLTraceContext();
+
+ glmsg.set_function(GLMessage::glInsertEventMarkerEXT);
+
+ // copy argument length
+ GLMessage_DataType *arg_length = glmsg.add_args();
+ arg_length->set_isarray(false);
+ arg_length->set_type(GLMessage::DataType::INT);
+ arg_length->add_intvalue(length);
+
+ // copy argument marker
+ GLMessage_DataType *arg_marker = glmsg.add_args();
+ arg_marker->set_isarray(false);
+ arg_marker->set_type(GLMessage::DataType::INT);
+ arg_marker->add_intvalue((int)marker);
+
+ // call function
+ nsecs_t start_time = systemTime();
+ glContext->hooks->gl.glInsertEventMarkerEXT(length, marker);
+ nsecs_t end_time = systemTime();
+
+ fixupGLMessage(glContext, start_time, end_time, &glmsg);
+ glContext->traceGLMessage(&glmsg);
+}
+
+void GLTrace_glPushGroupMarkerEXT(GLsizei length, const GLchar *marker) {
+ GLMessage glmsg;
+ GLTraceContext *glContext = getGLTraceContext();
+
+ glmsg.set_function(GLMessage::glPushGroupMarkerEXT);
+
+ // copy argument length
+ GLMessage_DataType *arg_length = glmsg.add_args();
+ arg_length->set_isarray(false);
+ arg_length->set_type(GLMessage::DataType::INT);
+ arg_length->add_intvalue(length);
+
+ // copy argument marker
+ GLMessage_DataType *arg_marker = glmsg.add_args();
+ arg_marker->set_isarray(false);
+ arg_marker->set_type(GLMessage::DataType::INT);
+ arg_marker->add_intvalue((int)marker);
+
+ // call function
+ nsecs_t start_time = systemTime();
+ glContext->hooks->gl.glPushGroupMarkerEXT(length, marker);
+ nsecs_t end_time = systemTime();
+
+ fixupGLMessage(glContext, start_time, end_time, &glmsg);
+ glContext->traceGLMessage(&glmsg);
+}
+
+void GLTrace_glPopGroupMarkerEXT(void) {
+ GLMessage glmsg;
+ GLTraceContext *glContext = getGLTraceContext();
+
+ glmsg.set_function(GLMessage::glPopGroupMarkerEXT);
+
+ // call function
+ nsecs_t start_time = systemTime();
+ glContext->hooks->gl.glPopGroupMarkerEXT();
+ nsecs_t end_time = systemTime();
+
+ fixupGLMessage(glContext, start_time, end_time, &glmsg);
+ glContext->traceGLMessage(&glmsg);
+}
+
void GLTrace_glDiscardFramebufferEXT(GLenum target, GLsizei numAttachments, const GLenum *attachments) {
GLMessage glmsg;
GLTraceContext *glContext = getGLTraceContext();
@@ -5842,6 +6175,102 @@ void GLTrace_glDiscardFramebufferEXT(GLenum target, GLsizei numAttachments, cons
glContext->traceGLMessage(&glmsg);
}
+void GLTrace_glRenderbufferStorageMultisampleEXT(GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height) {
+ GLMessage glmsg;
+ GLTraceContext *glContext = getGLTraceContext();
+
+ glmsg.set_function(GLMessage::glRenderbufferStorageMultisampleEXT);
+
+ // copy argument target
+ GLMessage_DataType *arg_target = glmsg.add_args();
+ arg_target->set_isarray(false);
+ arg_target->set_type(GLMessage::DataType::ENUM);
+ arg_target->add_intvalue((int)target);
+
+ // copy argument samples
+ GLMessage_DataType *arg_samples = glmsg.add_args();
+ arg_samples->set_isarray(false);
+ arg_samples->set_type(GLMessage::DataType::INT);
+ arg_samples->add_intvalue(samples);
+
+ // copy argument internalformat
+ GLMessage_DataType *arg_internalformat = glmsg.add_args();
+ arg_internalformat->set_isarray(false);
+ arg_internalformat->set_type(GLMessage::DataType::ENUM);
+ arg_internalformat->add_intvalue((int)internalformat);
+
+ // copy argument width
+ GLMessage_DataType *arg_width = glmsg.add_args();
+ arg_width->set_isarray(false);
+ arg_width->set_type(GLMessage::DataType::INT);
+ arg_width->add_intvalue(width);
+
+ // copy argument height
+ GLMessage_DataType *arg_height = glmsg.add_args();
+ arg_height->set_isarray(false);
+ arg_height->set_type(GLMessage::DataType::INT);
+ arg_height->add_intvalue(height);
+
+ // call function
+ nsecs_t start_time = systemTime();
+ glContext->hooks->gl.glRenderbufferStorageMultisampleEXT(target, samples, internalformat, width, height);
+ nsecs_t end_time = systemTime();
+
+ fixupGLMessage(glContext, start_time, end_time, &glmsg);
+ glContext->traceGLMessage(&glmsg);
+}
+
+void GLTrace_glFramebufferTexture2DMultisampleEXT(GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level, GLsizei samples) {
+ GLMessage glmsg;
+ GLTraceContext *glContext = getGLTraceContext();
+
+ glmsg.set_function(GLMessage::glFramebufferTexture2DMultisampleEXT);
+
+ // copy argument target
+ GLMessage_DataType *arg_target = glmsg.add_args();
+ arg_target->set_isarray(false);
+ arg_target->set_type(GLMessage::DataType::ENUM);
+ arg_target->add_intvalue((int)target);
+
+ // copy argument attachment
+ GLMessage_DataType *arg_attachment = glmsg.add_args();
+ arg_attachment->set_isarray(false);
+ arg_attachment->set_type(GLMessage::DataType::ENUM);
+ arg_attachment->add_intvalue((int)attachment);
+
+ // copy argument textarget
+ GLMessage_DataType *arg_textarget = glmsg.add_args();
+ arg_textarget->set_isarray(false);
+ arg_textarget->set_type(GLMessage::DataType::ENUM);
+ arg_textarget->add_intvalue((int)textarget);
+
+ // copy argument texture
+ GLMessage_DataType *arg_texture = glmsg.add_args();
+ arg_texture->set_isarray(false);
+ arg_texture->set_type(GLMessage::DataType::INT);
+ arg_texture->add_intvalue(texture);
+
+ // copy argument level
+ GLMessage_DataType *arg_level = glmsg.add_args();
+ arg_level->set_isarray(false);
+ arg_level->set_type(GLMessage::DataType::INT);
+ arg_level->add_intvalue(level);
+
+ // copy argument samples
+ GLMessage_DataType *arg_samples = glmsg.add_args();
+ arg_samples->set_isarray(false);
+ arg_samples->set_type(GLMessage::DataType::INT);
+ arg_samples->add_intvalue(samples);
+
+ // call function
+ nsecs_t start_time = systemTime();
+ glContext->hooks->gl.glFramebufferTexture2DMultisampleEXT(target, attachment, textarget, texture, level, samples);
+ nsecs_t end_time = systemTime();
+
+ fixupGLMessage(glContext, start_time, end_time, &glmsg);
+ glContext->traceGLMessage(&glmsg);
+}
+
void GLTrace_glMultiDrawArraysEXT(GLenum mode, GLint *first, GLsizei *count, GLsizei primcount) {
GLMessage glmsg;
GLTraceContext *glContext = getGLTraceContext();
@@ -5926,6 +6355,1769 @@ void GLTrace_glMultiDrawElementsEXT(GLenum mode, const GLsizei *count, GLenum ty
glContext->traceGLMessage(&glmsg);
}
+void GLTrace_glGenQueriesEXT(GLsizei n, GLuint *ids) {
+ GLMessage glmsg;
+ GLTraceContext *glContext = getGLTraceContext();
+
+ glmsg.set_function(GLMessage::glGenQueriesEXT);
+
+ // copy argument n
+ GLMessage_DataType *arg_n = glmsg.add_args();
+ arg_n->set_isarray(false);
+ arg_n->set_type(GLMessage::DataType::INT);
+ arg_n->add_intvalue(n);
+
+ // copy argument ids
+ GLMessage_DataType *arg_ids = glmsg.add_args();
+ arg_ids->set_isarray(false);
+ arg_ids->set_type(GLMessage::DataType::INT);
+ arg_ids->add_intvalue((int)ids);
+
+ // call function
+ nsecs_t start_time = systemTime();
+ glContext->hooks->gl.glGenQueriesEXT(n, ids);
+ nsecs_t end_time = systemTime();
+
+ fixupGLMessage(glContext, start_time, end_time, &glmsg);
+ glContext->traceGLMessage(&glmsg);
+}
+
+void GLTrace_glDeleteQueriesEXT(GLsizei n, const GLuint *ids) {
+ GLMessage glmsg;
+ GLTraceContext *glContext = getGLTraceContext();
+
+ glmsg.set_function(GLMessage::glDeleteQueriesEXT);
+
+ // copy argument n
+ GLMessage_DataType *arg_n = glmsg.add_args();
+ arg_n->set_isarray(false);
+ arg_n->set_type(GLMessage::DataType::INT);
+ arg_n->add_intvalue(n);
+
+ // copy argument ids
+ GLMessage_DataType *arg_ids = glmsg.add_args();
+ arg_ids->set_isarray(false);
+ arg_ids->set_type(GLMessage::DataType::INT);
+ arg_ids->add_intvalue((int)ids);
+
+ // call function
+ nsecs_t start_time = systemTime();
+ glContext->hooks->gl.glDeleteQueriesEXT(n, ids);
+ nsecs_t end_time = systemTime();
+
+ fixupGLMessage(glContext, start_time, end_time, &glmsg);
+ glContext->traceGLMessage(&glmsg);
+}
+
+GLboolean GLTrace_glIsQueryEXT(GLuint id) {
+ GLMessage glmsg;
+ GLTraceContext *glContext = getGLTraceContext();
+
+ glmsg.set_function(GLMessage::glIsQueryEXT);
+
+ // copy argument id
+ GLMessage_DataType *arg_id = glmsg.add_args();
+ arg_id->set_isarray(false);
+ arg_id->set_type(GLMessage::DataType::INT);
+ arg_id->add_intvalue(id);
+
+ // call function
+ nsecs_t start_time = systemTime();
+ GLboolean retValue = glContext->hooks->gl.glIsQueryEXT(id);
+ nsecs_t end_time = systemTime();
+
+ // set return value
+ GLMessage_DataType *rt = glmsg.mutable_returnvalue();
+ rt->set_isarray(false);
+ rt->set_type(GLMessage::DataType::BOOL);
+ rt->add_boolvalue(retValue);
+
+ fixupGLMessage(glContext, start_time, end_time, &glmsg);
+ glContext->traceGLMessage(&glmsg);
+
+ return retValue;
+}
+
+void GLTrace_glBeginQueryEXT(GLenum target, GLuint id) {
+ GLMessage glmsg;
+ GLTraceContext *glContext = getGLTraceContext();
+
+ glmsg.set_function(GLMessage::glBeginQueryEXT);
+
+ // copy argument target
+ GLMessage_DataType *arg_target = glmsg.add_args();
+ arg_target->set_isarray(false);
+ arg_target->set_type(GLMessage::DataType::ENUM);
+ arg_target->add_intvalue((int)target);
+
+ // copy argument id
+ GLMessage_DataType *arg_id = glmsg.add_args();
+ arg_id->set_isarray(false);
+ arg_id->set_type(GLMessage::DataType::INT);
+ arg_id->add_intvalue(id);
+
+ // call function
+ nsecs_t start_time = systemTime();
+ glContext->hooks->gl.glBeginQueryEXT(target, id);
+ nsecs_t end_time = systemTime();
+
+ fixupGLMessage(glContext, start_time, end_time, &glmsg);
+ glContext->traceGLMessage(&glmsg);
+}
+
+void GLTrace_glEndQueryEXT(GLenum target) {
+ GLMessage glmsg;
+ GLTraceContext *glContext = getGLTraceContext();
+
+ glmsg.set_function(GLMessage::glEndQueryEXT);
+
+ // copy argument target
+ GLMessage_DataType *arg_target = glmsg.add_args();
+ arg_target->set_isarray(false);
+ arg_target->set_type(GLMessage::DataType::ENUM);
+ arg_target->add_intvalue((int)target);
+
+ // call function
+ nsecs_t start_time = systemTime();
+ glContext->hooks->gl.glEndQueryEXT(target);
+ nsecs_t end_time = systemTime();
+
+ fixupGLMessage(glContext, start_time, end_time, &glmsg);
+ glContext->traceGLMessage(&glmsg);
+}
+
+void GLTrace_glGetQueryivEXT(GLenum target, GLenum pname, GLint *params) {
+ GLMessage glmsg;
+ GLTraceContext *glContext = getGLTraceContext();
+
+ glmsg.set_function(GLMessage::glGetQueryivEXT);
+
+ // copy argument target
+ GLMessage_DataType *arg_target = glmsg.add_args();
+ arg_target->set_isarray(false);
+ arg_target->set_type(GLMessage::DataType::ENUM);
+ arg_target->add_intvalue((int)target);
+
+ // copy argument pname
+ GLMessage_DataType *arg_pname = glmsg.add_args();
+ arg_pname->set_isarray(false);
+ arg_pname->set_type(GLMessage::DataType::ENUM);
+ arg_pname->add_intvalue((int)pname);
+
+ // copy argument params
+ GLMessage_DataType *arg_params = glmsg.add_args();
+ arg_params->set_isarray(false);
+ arg_params->set_type(GLMessage::DataType::INT);
+ arg_params->add_intvalue((int)params);
+
+ // call function
+ nsecs_t start_time = systemTime();
+ glContext->hooks->gl.glGetQueryivEXT(target, pname, params);
+ nsecs_t end_time = systemTime();
+
+ fixupGLMessage(glContext, start_time, end_time, &glmsg);
+ glContext->traceGLMessage(&glmsg);
+}
+
+void GLTrace_glGetQueryObjectuivEXT(GLuint id, GLenum pname, GLuint *params) {
+ GLMessage glmsg;
+ GLTraceContext *glContext = getGLTraceContext();
+
+ glmsg.set_function(GLMessage::glGetQueryObjectuivEXT);
+
+ // copy argument id
+ GLMessage_DataType *arg_id = glmsg.add_args();
+ arg_id->set_isarray(false);
+ arg_id->set_type(GLMessage::DataType::INT);
+ arg_id->add_intvalue(id);
+
+ // copy argument pname
+ GLMessage_DataType *arg_pname = glmsg.add_args();
+ arg_pname->set_isarray(false);
+ arg_pname->set_type(GLMessage::DataType::ENUM);
+ arg_pname->add_intvalue((int)pname);
+
+ // copy argument params
+ GLMessage_DataType *arg_params = glmsg.add_args();
+ arg_params->set_isarray(false);
+ arg_params->set_type(GLMessage::DataType::INT);
+ arg_params->add_intvalue((int)params);
+
+ // call function
+ nsecs_t start_time = systemTime();
+ glContext->hooks->gl.glGetQueryObjectuivEXT(id, pname, params);
+ nsecs_t end_time = systemTime();
+
+ fixupGLMessage(glContext, start_time, end_time, &glmsg);
+ glContext->traceGLMessage(&glmsg);
+}
+
+GLenum GLTrace_glGetGraphicsResetStatusEXT(void) {
+ GLMessage glmsg;
+ GLTraceContext *glContext = getGLTraceContext();
+
+ glmsg.set_function(GLMessage::glGetGraphicsResetStatusEXT);
+
+ // call function
+ nsecs_t start_time = systemTime();
+ GLenum retValue = glContext->hooks->gl.glGetGraphicsResetStatusEXT();
+ nsecs_t end_time = systemTime();
+
+ // set return value
+ GLMessage_DataType *rt = glmsg.mutable_returnvalue();
+ rt->set_isarray(false);
+ rt->set_type(GLMessage::DataType::ENUM);
+ rt->add_intvalue((int)retValue);
+
+ fixupGLMessage(glContext, start_time, end_time, &glmsg);
+ glContext->traceGLMessage(&glmsg);
+
+ return retValue;
+}
+
+void GLTrace_glReadnPixelsEXT(GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, GLsizei bufSize, void *data) {
+ GLMessage glmsg;
+ GLTraceContext *glContext = getGLTraceContext();
+
+ glmsg.set_function(GLMessage::glReadnPixelsEXT);
+
+ // copy argument x
+ GLMessage_DataType *arg_x = glmsg.add_args();
+ arg_x->set_isarray(false);
+ arg_x->set_type(GLMessage::DataType::INT);
+ arg_x->add_intvalue(x);
+
+ // copy argument y
+ GLMessage_DataType *arg_y = glmsg.add_args();
+ arg_y->set_isarray(false);
+ arg_y->set_type(GLMessage::DataType::INT);
+ arg_y->add_intvalue(y);
+
+ // copy argument width
+ GLMessage_DataType *arg_width = glmsg.add_args();
+ arg_width->set_isarray(false);
+ arg_width->set_type(GLMessage::DataType::INT);
+ arg_width->add_intvalue(width);
+
+ // copy argument height
+ GLMessage_DataType *arg_height = glmsg.add_args();
+ arg_height->set_isarray(false);
+ arg_height->set_type(GLMessage::DataType::INT);
+ arg_height->add_intvalue(height);
+
+ // copy argument format
+ GLMessage_DataType *arg_format = glmsg.add_args();
+ arg_format->set_isarray(false);
+ arg_format->set_type(GLMessage::DataType::ENUM);
+ arg_format->add_intvalue((int)format);
+
+ // copy argument type
+ GLMessage_DataType *arg_type = glmsg.add_args();
+ arg_type->set_isarray(false);
+ arg_type->set_type(GLMessage::DataType::ENUM);
+ arg_type->add_intvalue((int)type);
+
+ // copy argument bufSize
+ GLMessage_DataType *arg_bufSize = glmsg.add_args();
+ arg_bufSize->set_isarray(false);
+ arg_bufSize->set_type(GLMessage::DataType::INT);
+ arg_bufSize->add_intvalue(bufSize);
+
+ // copy argument data
+ GLMessage_DataType *arg_data = glmsg.add_args();
+ arg_data->set_isarray(false);
+ arg_data->set_type(GLMessage::DataType::INT);
+ arg_data->add_intvalue((int)data);
+
+ // call function
+ nsecs_t start_time = systemTime();
+ glContext->hooks->gl.glReadnPixelsEXT(x, y, width, height, format, type, bufSize, data);
+ nsecs_t end_time = systemTime();
+
+ fixupGLMessage(glContext, start_time, end_time, &glmsg);
+ glContext->traceGLMessage(&glmsg);
+}
+
+void GLTrace_glGetnUniformfvEXT(GLuint program, GLint location, GLsizei bufSize, float *params) {
+ GLMessage glmsg;
+ GLTraceContext *glContext = getGLTraceContext();
+
+ glmsg.set_function(GLMessage::glGetnUniformfvEXT);
+
+ // copy argument program
+ GLMessage_DataType *arg_program = glmsg.add_args();
+ arg_program->set_isarray(false);
+ arg_program->set_type(GLMessage::DataType::INT);
+ arg_program->add_intvalue(program);
+
+ // copy argument location
+ GLMessage_DataType *arg_location = glmsg.add_args();
+ arg_location->set_isarray(false);
+ arg_location->set_type(GLMessage::DataType::INT);
+ arg_location->add_intvalue(location);
+
+ // copy argument bufSize
+ GLMessage_DataType *arg_bufSize = glmsg.add_args();
+ arg_bufSize->set_isarray(false);
+ arg_bufSize->set_type(GLMessage::DataType::INT);
+ arg_bufSize->add_intvalue(bufSize);
+
+ // copy argument params
+ GLMessage_DataType *arg_params = glmsg.add_args();
+ arg_params->set_isarray(false);
+ arg_params->set_type(GLMessage::DataType::INT);
+ arg_params->add_intvalue((int)params);
+
+ // call function
+ nsecs_t start_time = systemTime();
+ glContext->hooks->gl.glGetnUniformfvEXT(program, location, bufSize, params);
+ nsecs_t end_time = systemTime();
+
+ fixupGLMessage(glContext, start_time, end_time, &glmsg);
+ glContext->traceGLMessage(&glmsg);
+}
+
+void GLTrace_glGetnUniformivEXT(GLuint program, GLint location, GLsizei bufSize, GLint *params) {
+ GLMessage glmsg;
+ GLTraceContext *glContext = getGLTraceContext();
+
+ glmsg.set_function(GLMessage::glGetnUniformivEXT);
+
+ // copy argument program
+ GLMessage_DataType *arg_program = glmsg.add_args();
+ arg_program->set_isarray(false);
+ arg_program->set_type(GLMessage::DataType::INT);
+ arg_program->add_intvalue(program);
+
+ // copy argument location
+ GLMessage_DataType *arg_location = glmsg.add_args();
+ arg_location->set_isarray(false);
+ arg_location->set_type(GLMessage::DataType::INT);
+ arg_location->add_intvalue(location);
+
+ // copy argument bufSize
+ GLMessage_DataType *arg_bufSize = glmsg.add_args();
+ arg_bufSize->set_isarray(false);
+ arg_bufSize->set_type(GLMessage::DataType::INT);
+ arg_bufSize->add_intvalue(bufSize);
+
+ // copy argument params
+ GLMessage_DataType *arg_params = glmsg.add_args();
+ arg_params->set_isarray(false);
+ arg_params->set_type(GLMessage::DataType::INT);
+ arg_params->add_intvalue((int)params);
+
+ // call function
+ nsecs_t start_time = systemTime();
+ glContext->hooks->gl.glGetnUniformivEXT(program, location, bufSize, params);
+ nsecs_t end_time = systemTime();
+
+ fixupGLMessage(glContext, start_time, end_time, &glmsg);
+ glContext->traceGLMessage(&glmsg);
+}
+
+void GLTrace_glUseProgramStagesEXT(GLuint pipeline, GLbitfield stages, GLuint program) {
+ GLMessage glmsg;
+ GLTraceContext *glContext = getGLTraceContext();
+
+ glmsg.set_function(GLMessage::glUseProgramStagesEXT);
+
+ // copy argument pipeline
+ GLMessage_DataType *arg_pipeline = glmsg.add_args();
+ arg_pipeline->set_isarray(false);
+ arg_pipeline->set_type(GLMessage::DataType::INT);
+ arg_pipeline->add_intvalue(pipeline);
+
+ // copy argument stages
+ GLMessage_DataType *arg_stages = glmsg.add_args();
+ arg_stages->set_isarray(false);
+ arg_stages->set_type(GLMessage::DataType::INT);
+ arg_stages->add_intvalue(stages);
+
+ // copy argument program
+ GLMessage_DataType *arg_program = glmsg.add_args();
+ arg_program->set_isarray(false);
+ arg_program->set_type(GLMessage::DataType::INT);
+ arg_program->add_intvalue(program);
+
+ // call function
+ nsecs_t start_time = systemTime();
+ glContext->hooks->gl.glUseProgramStagesEXT(pipeline, stages, program);
+ nsecs_t end_time = systemTime();
+
+ fixupGLMessage(glContext, start_time, end_time, &glmsg);
+ glContext->traceGLMessage(&glmsg);
+}
+
+void GLTrace_glActiveShaderProgramEXT(GLuint pipeline, GLuint program) {
+ GLMessage glmsg;
+ GLTraceContext *glContext = getGLTraceContext();
+
+ glmsg.set_function(GLMessage::glActiveShaderProgramEXT);
+
+ // copy argument pipeline
+ GLMessage_DataType *arg_pipeline = glmsg.add_args();
+ arg_pipeline->set_isarray(false);
+ arg_pipeline->set_type(GLMessage::DataType::INT);
+ arg_pipeline->add_intvalue(pipeline);
+
+ // copy argument program
+ GLMessage_DataType *arg_program = glmsg.add_args();
+ arg_program->set_isarray(false);
+ arg_program->set_type(GLMessage::DataType::INT);
+ arg_program->add_intvalue(program);
+
+ // call function
+ nsecs_t start_time = systemTime();
+ glContext->hooks->gl.glActiveShaderProgramEXT(pipeline, program);
+ nsecs_t end_time = systemTime();
+
+ fixupGLMessage(glContext, start_time, end_time, &glmsg);
+ glContext->traceGLMessage(&glmsg);
+}
+
+GLuint GLTrace_glCreateShaderProgramvEXT(GLenum type, GLsizei count, const GLchar **strings) {
+ GLMessage glmsg;
+ GLTraceContext *glContext = getGLTraceContext();
+
+ glmsg.set_function(GLMessage::glCreateShaderProgramvEXT);
+
+ // copy argument type
+ GLMessage_DataType *arg_type = glmsg.add_args();
+ arg_type->set_isarray(false);
+ arg_type->set_type(GLMessage::DataType::ENUM);
+ arg_type->add_intvalue((int)type);
+
+ // copy argument count
+ GLMessage_DataType *arg_count = glmsg.add_args();
+ arg_count->set_isarray(false);
+ arg_count->set_type(GLMessage::DataType::INT);
+ arg_count->add_intvalue(count);
+
+ // copy argument strings
+ GLMessage_DataType *arg_strings = glmsg.add_args();
+ arg_strings->set_isarray(false);
+ arg_strings->set_type(GLMessage::DataType::INT);
+ arg_strings->add_intvalue((int)strings);
+
+ // call function
+ nsecs_t start_time = systemTime();
+ GLuint retValue = glContext->hooks->gl.glCreateShaderProgramvEXT(type, count, strings);
+ nsecs_t end_time = systemTime();
+
+ // set return value
+ GLMessage_DataType *rt = glmsg.mutable_returnvalue();
+ rt->set_isarray(false);
+ rt->set_type(GLMessage::DataType::INT);
+ rt->add_intvalue(retValue);
+
+ fixupGLMessage(glContext, start_time, end_time, &glmsg);
+ glContext->traceGLMessage(&glmsg);
+
+ return retValue;
+}
+
+void GLTrace_glBindProgramPipelineEXT(GLuint pipeline) {
+ GLMessage glmsg;
+ GLTraceContext *glContext = getGLTraceContext();
+
+ glmsg.set_function(GLMessage::glBindProgramPipelineEXT);
+
+ // copy argument pipeline
+ GLMessage_DataType *arg_pipeline = glmsg.add_args();
+ arg_pipeline->set_isarray(false);
+ arg_pipeline->set_type(GLMessage::DataType::INT);
+ arg_pipeline->add_intvalue(pipeline);
+
+ // call function
+ nsecs_t start_time = systemTime();
+ glContext->hooks->gl.glBindProgramPipelineEXT(pipeline);
+ nsecs_t end_time = systemTime();
+
+ fixupGLMessage(glContext, start_time, end_time, &glmsg);
+ glContext->traceGLMessage(&glmsg);
+}
+
+void GLTrace_glDeleteProgramPipelinesEXT(GLsizei n, const GLuint *pipelines) {
+ GLMessage glmsg;
+ GLTraceContext *glContext = getGLTraceContext();
+
+ glmsg.set_function(GLMessage::glDeleteProgramPipelinesEXT);
+
+ // copy argument n
+ GLMessage_DataType *arg_n = glmsg.add_args();
+ arg_n->set_isarray(false);
+ arg_n->set_type(GLMessage::DataType::INT);
+ arg_n->add_intvalue(n);
+
+ // copy argument pipelines
+ GLMessage_DataType *arg_pipelines = glmsg.add_args();
+ arg_pipelines->set_isarray(false);
+ arg_pipelines->set_type(GLMessage::DataType::INT);
+ arg_pipelines->add_intvalue((int)pipelines);
+
+ // call function
+ nsecs_t start_time = systemTime();
+ glContext->hooks->gl.glDeleteProgramPipelinesEXT(n, pipelines);
+ nsecs_t end_time = systemTime();
+
+ fixupGLMessage(glContext, start_time, end_time, &glmsg);
+ glContext->traceGLMessage(&glmsg);
+}
+
+void GLTrace_glGenProgramPipelinesEXT(GLsizei n, GLuint *pipelines) {
+ GLMessage glmsg;
+ GLTraceContext *glContext = getGLTraceContext();
+
+ glmsg.set_function(GLMessage::glGenProgramPipelinesEXT);
+
+ // copy argument n
+ GLMessage_DataType *arg_n = glmsg.add_args();
+ arg_n->set_isarray(false);
+ arg_n->set_type(GLMessage::DataType::INT);
+ arg_n->add_intvalue(n);
+
+ // copy argument pipelines
+ GLMessage_DataType *arg_pipelines = glmsg.add_args();
+ arg_pipelines->set_isarray(false);
+ arg_pipelines->set_type(GLMessage::DataType::INT);
+ arg_pipelines->add_intvalue((int)pipelines);
+
+ // call function
+ nsecs_t start_time = systemTime();
+ glContext->hooks->gl.glGenProgramPipelinesEXT(n, pipelines);
+ nsecs_t end_time = systemTime();
+
+ fixupGLMessage(glContext, start_time, end_time, &glmsg);
+ glContext->traceGLMessage(&glmsg);
+}
+
+GLboolean GLTrace_glIsProgramPipelineEXT(GLuint pipeline) {
+ GLMessage glmsg;
+ GLTraceContext *glContext = getGLTraceContext();
+
+ glmsg.set_function(GLMessage::glIsProgramPipelineEXT);
+
+ // copy argument pipeline
+ GLMessage_DataType *arg_pipeline = glmsg.add_args();
+ arg_pipeline->set_isarray(false);
+ arg_pipeline->set_type(GLMessage::DataType::INT);
+ arg_pipeline->add_intvalue(pipeline);
+
+ // call function
+ nsecs_t start_time = systemTime();
+ GLboolean retValue = glContext->hooks->gl.glIsProgramPipelineEXT(pipeline);
+ nsecs_t end_time = systemTime();
+
+ // set return value
+ GLMessage_DataType *rt = glmsg.mutable_returnvalue();
+ rt->set_isarray(false);
+ rt->set_type(GLMessage::DataType::BOOL);
+ rt->add_boolvalue(retValue);
+
+ fixupGLMessage(glContext, start_time, end_time, &glmsg);
+ glContext->traceGLMessage(&glmsg);
+
+ return retValue;
+}
+
+void GLTrace_glProgramParameteriEXT(GLuint program, GLenum pname, GLint value) {
+ GLMessage glmsg;
+ GLTraceContext *glContext = getGLTraceContext();
+
+ glmsg.set_function(GLMessage::glProgramParameteriEXT);
+
+ // copy argument program
+ GLMessage_DataType *arg_program = glmsg.add_args();
+ arg_program->set_isarray(false);
+ arg_program->set_type(GLMessage::DataType::INT);
+ arg_program->add_intvalue(program);
+
+ // copy argument pname
+ GLMessage_DataType *arg_pname = glmsg.add_args();
+ arg_pname->set_isarray(false);
+ arg_pname->set_type(GLMessage::DataType::ENUM);
+ arg_pname->add_intvalue((int)pname);
+
+ // copy argument value
+ GLMessage_DataType *arg_value = glmsg.add_args();
+ arg_value->set_isarray(false);
+ arg_value->set_type(GLMessage::DataType::INT);
+ arg_value->add_intvalue(value);
+
+ // call function
+ nsecs_t start_time = systemTime();
+ glContext->hooks->gl.glProgramParameteriEXT(program, pname, value);
+ nsecs_t end_time = systemTime();
+
+ fixupGLMessage(glContext, start_time, end_time, &glmsg);
+ glContext->traceGLMessage(&glmsg);
+}
+
+void GLTrace_glGetProgramPipelineivEXT(GLuint pipeline, GLenum pname, GLint *params) {
+ GLMessage glmsg;
+ GLTraceContext *glContext = getGLTraceContext();
+
+ glmsg.set_function(GLMessage::glGetProgramPipelineivEXT);
+
+ // copy argument pipeline
+ GLMessage_DataType *arg_pipeline = glmsg.add_args();
+ arg_pipeline->set_isarray(false);
+ arg_pipeline->set_type(GLMessage::DataType::INT);
+ arg_pipeline->add_intvalue(pipeline);
+
+ // copy argument pname
+ GLMessage_DataType *arg_pname = glmsg.add_args();
+ arg_pname->set_isarray(false);
+ arg_pname->set_type(GLMessage::DataType::ENUM);
+ arg_pname->add_intvalue((int)pname);
+
+ // copy argument params
+ GLMessage_DataType *arg_params = glmsg.add_args();
+ arg_params->set_isarray(false);
+ arg_params->set_type(GLMessage::DataType::INT);
+ arg_params->add_intvalue((int)params);
+
+ // call function
+ nsecs_t start_time = systemTime();
+ glContext->hooks->gl.glGetProgramPipelineivEXT(pipeline, pname, params);
+ nsecs_t end_time = systemTime();
+
+ fixupGLMessage(glContext, start_time, end_time, &glmsg);
+ glContext->traceGLMessage(&glmsg);
+}
+
+void GLTrace_glProgramUniform1iEXT(GLuint program, GLint location, GLint x) {
+ GLMessage glmsg;
+ GLTraceContext *glContext = getGLTraceContext();
+
+ glmsg.set_function(GLMessage::glProgramUniform1iEXT);
+
+ // copy argument program
+ GLMessage_DataType *arg_program = glmsg.add_args();
+ arg_program->set_isarray(false);
+ arg_program->set_type(GLMessage::DataType::INT);
+ arg_program->add_intvalue(program);
+
+ // copy argument location
+ GLMessage_DataType *arg_location = glmsg.add_args();
+ arg_location->set_isarray(false);
+ arg_location->set_type(GLMessage::DataType::INT);
+ arg_location->add_intvalue(location);
+
+ // copy argument x
+ GLMessage_DataType *arg_x = glmsg.add_args();
+ arg_x->set_isarray(false);
+ arg_x->set_type(GLMessage::DataType::INT);
+ arg_x->add_intvalue(x);
+
+ // call function
+ nsecs_t start_time = systemTime();
+ glContext->hooks->gl.glProgramUniform1iEXT(program, location, x);
+ nsecs_t end_time = systemTime();
+
+ fixupGLMessage(glContext, start_time, end_time, &glmsg);
+ glContext->traceGLMessage(&glmsg);
+}
+
+void GLTrace_glProgramUniform2iEXT(GLuint program, GLint location, GLint x, GLint y) {
+ GLMessage glmsg;
+ GLTraceContext *glContext = getGLTraceContext();
+
+ glmsg.set_function(GLMessage::glProgramUniform2iEXT);
+
+ // copy argument program
+ GLMessage_DataType *arg_program = glmsg.add_args();
+ arg_program->set_isarray(false);
+ arg_program->set_type(GLMessage::DataType::INT);
+ arg_program->add_intvalue(program);
+
+ // copy argument location
+ GLMessage_DataType *arg_location = glmsg.add_args();
+ arg_location->set_isarray(false);
+ arg_location->set_type(GLMessage::DataType::INT);
+ arg_location->add_intvalue(location);
+
+ // copy argument x
+ GLMessage_DataType *arg_x = glmsg.add_args();
+ arg_x->set_isarray(false);
+ arg_x->set_type(GLMessage::DataType::INT);
+ arg_x->add_intvalue(x);
+
+ // copy argument y
+ GLMessage_DataType *arg_y = glmsg.add_args();
+ arg_y->set_isarray(false);
+ arg_y->set_type(GLMessage::DataType::INT);
+ arg_y->add_intvalue(y);
+
+ // call function
+ nsecs_t start_time = systemTime();
+ glContext->hooks->gl.glProgramUniform2iEXT(program, location, x, y);
+ nsecs_t end_time = systemTime();
+
+ fixupGLMessage(glContext, start_time, end_time, &glmsg);
+ glContext->traceGLMessage(&glmsg);
+}
+
+void GLTrace_glProgramUniform3iEXT(GLuint program, GLint location, GLint x, GLint y, GLint z) {
+ GLMessage glmsg;
+ GLTraceContext *glContext = getGLTraceContext();
+
+ glmsg.set_function(GLMessage::glProgramUniform3iEXT);
+
+ // copy argument program
+ GLMessage_DataType *arg_program = glmsg.add_args();
+ arg_program->set_isarray(false);
+ arg_program->set_type(GLMessage::DataType::INT);
+ arg_program->add_intvalue(program);
+
+ // copy argument location
+ GLMessage_DataType *arg_location = glmsg.add_args();
+ arg_location->set_isarray(false);
+ arg_location->set_type(GLMessage::DataType::INT);
+ arg_location->add_intvalue(location);
+
+ // copy argument x
+ GLMessage_DataType *arg_x = glmsg.add_args();
+ arg_x->set_isarray(false);
+ arg_x->set_type(GLMessage::DataType::INT);
+ arg_x->add_intvalue(x);
+
+ // copy argument y
+ GLMessage_DataType *arg_y = glmsg.add_args();
+ arg_y->set_isarray(false);
+ arg_y->set_type(GLMessage::DataType::INT);
+ arg_y->add_intvalue(y);
+
+ // copy argument z
+ GLMessage_DataType *arg_z = glmsg.add_args();
+ arg_z->set_isarray(false);
+ arg_z->set_type(GLMessage::DataType::INT);
+ arg_z->add_intvalue(z);
+
+ // call function
+ nsecs_t start_time = systemTime();
+ glContext->hooks->gl.glProgramUniform3iEXT(program, location, x, y, z);
+ nsecs_t end_time = systemTime();
+
+ fixupGLMessage(glContext, start_time, end_time, &glmsg);
+ glContext->traceGLMessage(&glmsg);
+}
+
+void GLTrace_glProgramUniform4iEXT(GLuint program, GLint location, GLint x, GLint y, GLint z, GLint w) {
+ GLMessage glmsg;
+ GLTraceContext *glContext = getGLTraceContext();
+
+ glmsg.set_function(GLMessage::glProgramUniform4iEXT);
+
+ // copy argument program
+ GLMessage_DataType *arg_program = glmsg.add_args();
+ arg_program->set_isarray(false);
+ arg_program->set_type(GLMessage::DataType::INT);
+ arg_program->add_intvalue(program);
+
+ // copy argument location
+ GLMessage_DataType *arg_location = glmsg.add_args();
+ arg_location->set_isarray(false);
+ arg_location->set_type(GLMessage::DataType::INT);
+ arg_location->add_intvalue(location);
+
+ // copy argument x
+ GLMessage_DataType *arg_x = glmsg.add_args();
+ arg_x->set_isarray(false);
+ arg_x->set_type(GLMessage::DataType::INT);
+ arg_x->add_intvalue(x);
+
+ // copy argument y
+ GLMessage_DataType *arg_y = glmsg.add_args();
+ arg_y->set_isarray(false);
+ arg_y->set_type(GLMessage::DataType::INT);
+ arg_y->add_intvalue(y);
+
+ // copy argument z
+ GLMessage_DataType *arg_z = glmsg.add_args();
+ arg_z->set_isarray(false);
+ arg_z->set_type(GLMessage::DataType::INT);
+ arg_z->add_intvalue(z);
+
+ // copy argument w
+ GLMessage_DataType *arg_w = glmsg.add_args();
+ arg_w->set_isarray(false);
+ arg_w->set_type(GLMessage::DataType::INT);
+ arg_w->add_intvalue(w);
+
+ // call function
+ nsecs_t start_time = systemTime();
+ glContext->hooks->gl.glProgramUniform4iEXT(program, location, x, y, z, w);
+ nsecs_t end_time = systemTime();
+
+ fixupGLMessage(glContext, start_time, end_time, &glmsg);
+ glContext->traceGLMessage(&glmsg);
+}
+
+void GLTrace_glProgramUniform1fEXT(GLuint program, GLint location, GLfloat x) {
+ GLMessage glmsg;
+ GLTraceContext *glContext = getGLTraceContext();
+
+ glmsg.set_function(GLMessage::glProgramUniform1fEXT);
+
+ // copy argument program
+ GLMessage_DataType *arg_program = glmsg.add_args();
+ arg_program->set_isarray(false);
+ arg_program->set_type(GLMessage::DataType::INT);
+ arg_program->add_intvalue(program);
+
+ // copy argument location
+ GLMessage_DataType *arg_location = glmsg.add_args();
+ arg_location->set_isarray(false);
+ arg_location->set_type(GLMessage::DataType::INT);
+ arg_location->add_intvalue(location);
+
+ // copy argument x
+ GLMessage_DataType *arg_x = glmsg.add_args();
+ arg_x->set_isarray(false);
+ arg_x->set_type(GLMessage::DataType::FLOAT);
+ arg_x->add_floatvalue(x);
+
+ // call function
+ nsecs_t start_time = systemTime();
+ glContext->hooks->gl.glProgramUniform1fEXT(program, location, x);
+ nsecs_t end_time = systemTime();
+
+ fixupGLMessage(glContext, start_time, end_time, &glmsg);
+ glContext->traceGLMessage(&glmsg);
+}
+
+void GLTrace_glProgramUniform2fEXT(GLuint program, GLint location, GLfloat x, GLfloat y) {
+ GLMessage glmsg;
+ GLTraceContext *glContext = getGLTraceContext();
+
+ glmsg.set_function(GLMessage::glProgramUniform2fEXT);
+
+ // copy argument program
+ GLMessage_DataType *arg_program = glmsg.add_args();
+ arg_program->set_isarray(false);
+ arg_program->set_type(GLMessage::DataType::INT);
+ arg_program->add_intvalue(program);
+
+ // copy argument location
+ GLMessage_DataType *arg_location = glmsg.add_args();
+ arg_location->set_isarray(false);
+ arg_location->set_type(GLMessage::DataType::INT);
+ arg_location->add_intvalue(location);
+
+ // copy argument x
+ GLMessage_DataType *arg_x = glmsg.add_args();
+ arg_x->set_isarray(false);
+ arg_x->set_type(GLMessage::DataType::FLOAT);
+ arg_x->add_floatvalue(x);
+
+ // copy argument y
+ GLMessage_DataType *arg_y = glmsg.add_args();
+ arg_y->set_isarray(false);
+ arg_y->set_type(GLMessage::DataType::FLOAT);
+ arg_y->add_floatvalue(y);
+
+ // call function
+ nsecs_t start_time = systemTime();
+ glContext->hooks->gl.glProgramUniform2fEXT(program, location, x, y);
+ nsecs_t end_time = systemTime();
+
+ fixupGLMessage(glContext, start_time, end_time, &glmsg);
+ glContext->traceGLMessage(&glmsg);
+}
+
+void GLTrace_glProgramUniform3fEXT(GLuint program, GLint location, GLfloat x, GLfloat y, GLfloat z) {
+ GLMessage glmsg;
+ GLTraceContext *glContext = getGLTraceContext();
+
+ glmsg.set_function(GLMessage::glProgramUniform3fEXT);
+
+ // copy argument program
+ GLMessage_DataType *arg_program = glmsg.add_args();
+ arg_program->set_isarray(false);
+ arg_program->set_type(GLMessage::DataType::INT);
+ arg_program->add_intvalue(program);
+
+ // copy argument location
+ GLMessage_DataType *arg_location = glmsg.add_args();
+ arg_location->set_isarray(false);
+ arg_location->set_type(GLMessage::DataType::INT);
+ arg_location->add_intvalue(location);
+
+ // copy argument x
+ GLMessage_DataType *arg_x = glmsg.add_args();
+ arg_x->set_isarray(false);
+ arg_x->set_type(GLMessage::DataType::FLOAT);
+ arg_x->add_floatvalue(x);
+
+ // copy argument y
+ GLMessage_DataType *arg_y = glmsg.add_args();
+ arg_y->set_isarray(false);
+ arg_y->set_type(GLMessage::DataType::FLOAT);
+ arg_y->add_floatvalue(y);
+
+ // copy argument z
+ GLMessage_DataType *arg_z = glmsg.add_args();
+ arg_z->set_isarray(false);
+ arg_z->set_type(GLMessage::DataType::FLOAT);
+ arg_z->add_floatvalue(z);
+
+ // call function
+ nsecs_t start_time = systemTime();
+ glContext->hooks->gl.glProgramUniform3fEXT(program, location, x, y, z);
+ nsecs_t end_time = systemTime();
+
+ fixupGLMessage(glContext, start_time, end_time, &glmsg);
+ glContext->traceGLMessage(&glmsg);
+}
+
+void GLTrace_glProgramUniform4fEXT(GLuint program, GLint location, GLfloat x, GLfloat y, GLfloat z, GLfloat w) {
+ GLMessage glmsg;
+ GLTraceContext *glContext = getGLTraceContext();
+
+ glmsg.set_function(GLMessage::glProgramUniform4fEXT);
+
+ // copy argument program
+ GLMessage_DataType *arg_program = glmsg.add_args();
+ arg_program->set_isarray(false);
+ arg_program->set_type(GLMessage::DataType::INT);
+ arg_program->add_intvalue(program);
+
+ // copy argument location
+ GLMessage_DataType *arg_location = glmsg.add_args();
+ arg_location->set_isarray(false);
+ arg_location->set_type(GLMessage::DataType::INT);
+ arg_location->add_intvalue(location);
+
+ // copy argument x
+ GLMessage_DataType *arg_x = glmsg.add_args();
+ arg_x->set_isarray(false);
+ arg_x->set_type(GLMessage::DataType::FLOAT);
+ arg_x->add_floatvalue(x);
+
+ // copy argument y
+ GLMessage_DataType *arg_y = glmsg.add_args();
+ arg_y->set_isarray(false);
+ arg_y->set_type(GLMessage::DataType::FLOAT);
+ arg_y->add_floatvalue(y);
+
+ // copy argument z
+ GLMessage_DataType *arg_z = glmsg.add_args();
+ arg_z->set_isarray(false);
+ arg_z->set_type(GLMessage::DataType::FLOAT);
+ arg_z->add_floatvalue(z);
+
+ // copy argument w
+ GLMessage_DataType *arg_w = glmsg.add_args();
+ arg_w->set_isarray(false);
+ arg_w->set_type(GLMessage::DataType::FLOAT);
+ arg_w->add_floatvalue(w);
+
+ // call function
+ nsecs_t start_time = systemTime();
+ glContext->hooks->gl.glProgramUniform4fEXT(program, location, x, y, z, w);
+ nsecs_t end_time = systemTime();
+
+ fixupGLMessage(glContext, start_time, end_time, &glmsg);
+ glContext->traceGLMessage(&glmsg);
+}
+
+void GLTrace_glProgramUniform1ivEXT(GLuint program, GLint location, GLsizei count, const GLint *value) {
+ GLMessage glmsg;
+ GLTraceContext *glContext = getGLTraceContext();
+
+ glmsg.set_function(GLMessage::glProgramUniform1ivEXT);
+
+ // copy argument program
+ GLMessage_DataType *arg_program = glmsg.add_args();
+ arg_program->set_isarray(false);
+ arg_program->set_type(GLMessage::DataType::INT);
+ arg_program->add_intvalue(program);
+
+ // copy argument location
+ GLMessage_DataType *arg_location = glmsg.add_args();
+ arg_location->set_isarray(false);
+ arg_location->set_type(GLMessage::DataType::INT);
+ arg_location->add_intvalue(location);
+
+ // copy argument count
+ GLMessage_DataType *arg_count = glmsg.add_args();
+ arg_count->set_isarray(false);
+ arg_count->set_type(GLMessage::DataType::INT);
+ arg_count->add_intvalue(count);
+
+ // copy argument value
+ GLMessage_DataType *arg_value = glmsg.add_args();
+ arg_value->set_isarray(false);
+ arg_value->set_type(GLMessage::DataType::INT);
+ arg_value->add_intvalue((int)value);
+
+ // call function
+ nsecs_t start_time = systemTime();
+ glContext->hooks->gl.glProgramUniform1ivEXT(program, location, count, value);
+ nsecs_t end_time = systemTime();
+
+ fixupGLMessage(glContext, start_time, end_time, &glmsg);
+ glContext->traceGLMessage(&glmsg);
+}
+
+void GLTrace_glProgramUniform2ivEXT(GLuint program, GLint location, GLsizei count, const GLint *value) {
+ GLMessage glmsg;
+ GLTraceContext *glContext = getGLTraceContext();
+
+ glmsg.set_function(GLMessage::glProgramUniform2ivEXT);
+
+ // copy argument program
+ GLMessage_DataType *arg_program = glmsg.add_args();
+ arg_program->set_isarray(false);
+ arg_program->set_type(GLMessage::DataType::INT);
+ arg_program->add_intvalue(program);
+
+ // copy argument location
+ GLMessage_DataType *arg_location = glmsg.add_args();
+ arg_location->set_isarray(false);
+ arg_location->set_type(GLMessage::DataType::INT);
+ arg_location->add_intvalue(location);
+
+ // copy argument count
+ GLMessage_DataType *arg_count = glmsg.add_args();
+ arg_count->set_isarray(false);
+ arg_count->set_type(GLMessage::DataType::INT);
+ arg_count->add_intvalue(count);
+
+ // copy argument value
+ GLMessage_DataType *arg_value = glmsg.add_args();
+ arg_value->set_isarray(false);
+ arg_value->set_type(GLMessage::DataType::INT);
+ arg_value->add_intvalue((int)value);
+
+ // call function
+ nsecs_t start_time = systemTime();
+ glContext->hooks->gl.glProgramUniform2ivEXT(program, location, count, value);
+ nsecs_t end_time = systemTime();
+
+ fixupGLMessage(glContext, start_time, end_time, &glmsg);
+ glContext->traceGLMessage(&glmsg);
+}
+
+void GLTrace_glProgramUniform3ivEXT(GLuint program, GLint location, GLsizei count, const GLint *value) {
+ GLMessage glmsg;
+ GLTraceContext *glContext = getGLTraceContext();
+
+ glmsg.set_function(GLMessage::glProgramUniform3ivEXT);
+
+ // copy argument program
+ GLMessage_DataType *arg_program = glmsg.add_args();
+ arg_program->set_isarray(false);
+ arg_program->set_type(GLMessage::DataType::INT);
+ arg_program->add_intvalue(program);
+
+ // copy argument location
+ GLMessage_DataType *arg_location = glmsg.add_args();
+ arg_location->set_isarray(false);
+ arg_location->set_type(GLMessage::DataType::INT);
+ arg_location->add_intvalue(location);
+
+ // copy argument count
+ GLMessage_DataType *arg_count = glmsg.add_args();
+ arg_count->set_isarray(false);
+ arg_count->set_type(GLMessage::DataType::INT);
+ arg_count->add_intvalue(count);
+
+ // copy argument value
+ GLMessage_DataType *arg_value = glmsg.add_args();
+ arg_value->set_isarray(false);
+ arg_value->set_type(GLMessage::DataType::INT);
+ arg_value->add_intvalue((int)value);
+
+ // call function
+ nsecs_t start_time = systemTime();
+ glContext->hooks->gl.glProgramUniform3ivEXT(program, location, count, value);
+ nsecs_t end_time = systemTime();
+
+ fixupGLMessage(glContext, start_time, end_time, &glmsg);
+ glContext->traceGLMessage(&glmsg);
+}
+
+void GLTrace_glProgramUniform4ivEXT(GLuint program, GLint location, GLsizei count, const GLint *value) {
+ GLMessage glmsg;
+ GLTraceContext *glContext = getGLTraceContext();
+
+ glmsg.set_function(GLMessage::glProgramUniform4ivEXT);
+
+ // copy argument program
+ GLMessage_DataType *arg_program = glmsg.add_args();
+ arg_program->set_isarray(false);
+ arg_program->set_type(GLMessage::DataType::INT);
+ arg_program->add_intvalue(program);
+
+ // copy argument location
+ GLMessage_DataType *arg_location = glmsg.add_args();
+ arg_location->set_isarray(false);
+ arg_location->set_type(GLMessage::DataType::INT);
+ arg_location->add_intvalue(location);
+
+ // copy argument count
+ GLMessage_DataType *arg_count = glmsg.add_args();
+ arg_count->set_isarray(false);
+ arg_count->set_type(GLMessage::DataType::INT);
+ arg_count->add_intvalue(count);
+
+ // copy argument value
+ GLMessage_DataType *arg_value = glmsg.add_args();
+ arg_value->set_isarray(false);
+ arg_value->set_type(GLMessage::DataType::INT);
+ arg_value->add_intvalue((int)value);
+
+ // call function
+ nsecs_t start_time = systemTime();
+ glContext->hooks->gl.glProgramUniform4ivEXT(program, location, count, value);
+ nsecs_t end_time = systemTime();
+
+ fixupGLMessage(glContext, start_time, end_time, &glmsg);
+ glContext->traceGLMessage(&glmsg);
+}
+
+void GLTrace_glProgramUniform1fvEXT(GLuint program, GLint location, GLsizei count, const GLfloat *value) {
+ GLMessage glmsg;
+ GLTraceContext *glContext = getGLTraceContext();
+
+ glmsg.set_function(GLMessage::glProgramUniform1fvEXT);
+
+ // copy argument program
+ GLMessage_DataType *arg_program = glmsg.add_args();
+ arg_program->set_isarray(false);
+ arg_program->set_type(GLMessage::DataType::INT);
+ arg_program->add_intvalue(program);
+
+ // copy argument location
+ GLMessage_DataType *arg_location = glmsg.add_args();
+ arg_location->set_isarray(false);
+ arg_location->set_type(GLMessage::DataType::INT);
+ arg_location->add_intvalue(location);
+
+ // copy argument count
+ GLMessage_DataType *arg_count = glmsg.add_args();
+ arg_count->set_isarray(false);
+ arg_count->set_type(GLMessage::DataType::INT);
+ arg_count->add_intvalue(count);
+
+ // copy argument value
+ GLMessage_DataType *arg_value = glmsg.add_args();
+ arg_value->set_isarray(false);
+ arg_value->set_type(GLMessage::DataType::INT);
+ arg_value->add_intvalue((int)value);
+
+ // call function
+ nsecs_t start_time = systemTime();
+ glContext->hooks->gl.glProgramUniform1fvEXT(program, location, count, value);
+ nsecs_t end_time = systemTime();
+
+ fixupGLMessage(glContext, start_time, end_time, &glmsg);
+ glContext->traceGLMessage(&glmsg);
+}
+
+void GLTrace_glProgramUniform2fvEXT(GLuint program, GLint location, GLsizei count, const GLfloat *value) {
+ GLMessage glmsg;
+ GLTraceContext *glContext = getGLTraceContext();
+
+ glmsg.set_function(GLMessage::glProgramUniform2fvEXT);
+
+ // copy argument program
+ GLMessage_DataType *arg_program = glmsg.add_args();
+ arg_program->set_isarray(false);
+ arg_program->set_type(GLMessage::DataType::INT);
+ arg_program->add_intvalue(program);
+
+ // copy argument location
+ GLMessage_DataType *arg_location = glmsg.add_args();
+ arg_location->set_isarray(false);
+ arg_location->set_type(GLMessage::DataType::INT);
+ arg_location->add_intvalue(location);
+
+ // copy argument count
+ GLMessage_DataType *arg_count = glmsg.add_args();
+ arg_count->set_isarray(false);
+ arg_count->set_type(GLMessage::DataType::INT);
+ arg_count->add_intvalue(count);
+
+ // copy argument value
+ GLMessage_DataType *arg_value = glmsg.add_args();
+ arg_value->set_isarray(false);
+ arg_value->set_type(GLMessage::DataType::INT);
+ arg_value->add_intvalue((int)value);
+
+ // call function
+ nsecs_t start_time = systemTime();
+ glContext->hooks->gl.glProgramUniform2fvEXT(program, location, count, value);
+ nsecs_t end_time = systemTime();
+
+ fixupGLMessage(glContext, start_time, end_time, &glmsg);
+ glContext->traceGLMessage(&glmsg);
+}
+
+void GLTrace_glProgramUniform3fvEXT(GLuint program, GLint location, GLsizei count, const GLfloat *value) {
+ GLMessage glmsg;
+ GLTraceContext *glContext = getGLTraceContext();
+
+ glmsg.set_function(GLMessage::glProgramUniform3fvEXT);
+
+ // copy argument program
+ GLMessage_DataType *arg_program = glmsg.add_args();
+ arg_program->set_isarray(false);
+ arg_program->set_type(GLMessage::DataType::INT);
+ arg_program->add_intvalue(program);
+
+ // copy argument location
+ GLMessage_DataType *arg_location = glmsg.add_args();
+ arg_location->set_isarray(false);
+ arg_location->set_type(GLMessage::DataType::INT);
+ arg_location->add_intvalue(location);
+
+ // copy argument count
+ GLMessage_DataType *arg_count = glmsg.add_args();
+ arg_count->set_isarray(false);
+ arg_count->set_type(GLMessage::DataType::INT);
+ arg_count->add_intvalue(count);
+
+ // copy argument value
+ GLMessage_DataType *arg_value = glmsg.add_args();
+ arg_value->set_isarray(false);
+ arg_value->set_type(GLMessage::DataType::INT);
+ arg_value->add_intvalue((int)value);
+
+ // call function
+ nsecs_t start_time = systemTime();
+ glContext->hooks->gl.glProgramUniform3fvEXT(program, location, count, value);
+ nsecs_t end_time = systemTime();
+
+ fixupGLMessage(glContext, start_time, end_time, &glmsg);
+ glContext->traceGLMessage(&glmsg);
+}
+
+void GLTrace_glProgramUniform4fvEXT(GLuint program, GLint location, GLsizei count, const GLfloat *value) {
+ GLMessage glmsg;
+ GLTraceContext *glContext = getGLTraceContext();
+
+ glmsg.set_function(GLMessage::glProgramUniform4fvEXT);
+
+ // copy argument program
+ GLMessage_DataType *arg_program = glmsg.add_args();
+ arg_program->set_isarray(false);
+ arg_program->set_type(GLMessage::DataType::INT);
+ arg_program->add_intvalue(program);
+
+ // copy argument location
+ GLMessage_DataType *arg_location = glmsg.add_args();
+ arg_location->set_isarray(false);
+ arg_location->set_type(GLMessage::DataType::INT);
+ arg_location->add_intvalue(location);
+
+ // copy argument count
+ GLMessage_DataType *arg_count = glmsg.add_args();
+ arg_count->set_isarray(false);
+ arg_count->set_type(GLMessage::DataType::INT);
+ arg_count->add_intvalue(count);
+
+ // copy argument value
+ GLMessage_DataType *arg_value = glmsg.add_args();
+ arg_value->set_isarray(false);
+ arg_value->set_type(GLMessage::DataType::INT);
+ arg_value->add_intvalue((int)value);
+
+ // call function
+ nsecs_t start_time = systemTime();
+ glContext->hooks->gl.glProgramUniform4fvEXT(program, location, count, value);
+ nsecs_t end_time = systemTime();
+
+ fixupGLMessage(glContext, start_time, end_time, &glmsg);
+ glContext->traceGLMessage(&glmsg);
+}
+
+void GLTrace_glProgramUniformMatrix2fvEXT(GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value) {
+ GLMessage glmsg;
+ GLTraceContext *glContext = getGLTraceContext();
+
+ glmsg.set_function(GLMessage::glProgramUniformMatrix2fvEXT);
+
+ // copy argument program
+ GLMessage_DataType *arg_program = glmsg.add_args();
+ arg_program->set_isarray(false);
+ arg_program->set_type(GLMessage::DataType::INT);
+ arg_program->add_intvalue(program);
+
+ // copy argument location
+ GLMessage_DataType *arg_location = glmsg.add_args();
+ arg_location->set_isarray(false);
+ arg_location->set_type(GLMessage::DataType::INT);
+ arg_location->add_intvalue(location);
+
+ // copy argument count
+ GLMessage_DataType *arg_count = glmsg.add_args();
+ arg_count->set_isarray(false);
+ arg_count->set_type(GLMessage::DataType::INT);
+ arg_count->add_intvalue(count);
+
+ // copy argument transpose
+ GLMessage_DataType *arg_transpose = glmsg.add_args();
+ arg_transpose->set_isarray(false);
+ arg_transpose->set_type(GLMessage::DataType::BOOL);
+ arg_transpose->add_boolvalue(transpose);
+
+ // copy argument value
+ GLMessage_DataType *arg_value = glmsg.add_args();
+ arg_value->set_isarray(false);
+ arg_value->set_type(GLMessage::DataType::INT);
+ arg_value->add_intvalue((int)value);
+
+ // call function
+ nsecs_t start_time = systemTime();
+ glContext->hooks->gl.glProgramUniformMatrix2fvEXT(program, location, count, transpose, value);
+ nsecs_t end_time = systemTime();
+
+ fixupGLMessage(glContext, start_time, end_time, &glmsg);
+ glContext->traceGLMessage(&glmsg);
+}
+
+void GLTrace_glProgramUniformMatrix3fvEXT(GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value) {
+ GLMessage glmsg;
+ GLTraceContext *glContext = getGLTraceContext();
+
+ glmsg.set_function(GLMessage::glProgramUniformMatrix3fvEXT);
+
+ // copy argument program
+ GLMessage_DataType *arg_program = glmsg.add_args();
+ arg_program->set_isarray(false);
+ arg_program->set_type(GLMessage::DataType::INT);
+ arg_program->add_intvalue(program);
+
+ // copy argument location
+ GLMessage_DataType *arg_location = glmsg.add_args();
+ arg_location->set_isarray(false);
+ arg_location->set_type(GLMessage::DataType::INT);
+ arg_location->add_intvalue(location);
+
+ // copy argument count
+ GLMessage_DataType *arg_count = glmsg.add_args();
+ arg_count->set_isarray(false);
+ arg_count->set_type(GLMessage::DataType::INT);
+ arg_count->add_intvalue(count);
+
+ // copy argument transpose
+ GLMessage_DataType *arg_transpose = glmsg.add_args();
+ arg_transpose->set_isarray(false);
+ arg_transpose->set_type(GLMessage::DataType::BOOL);
+ arg_transpose->add_boolvalue(transpose);
+
+ // copy argument value
+ GLMessage_DataType *arg_value = glmsg.add_args();
+ arg_value->set_isarray(false);
+ arg_value->set_type(GLMessage::DataType::INT);
+ arg_value->add_intvalue((int)value);
+
+ // call function
+ nsecs_t start_time = systemTime();
+ glContext->hooks->gl.glProgramUniformMatrix3fvEXT(program, location, count, transpose, value);
+ nsecs_t end_time = systemTime();
+
+ fixupGLMessage(glContext, start_time, end_time, &glmsg);
+ glContext->traceGLMessage(&glmsg);
+}
+
+void GLTrace_glProgramUniformMatrix4fvEXT(GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value) {
+ GLMessage glmsg;
+ GLTraceContext *glContext = getGLTraceContext();
+
+ glmsg.set_function(GLMessage::glProgramUniformMatrix4fvEXT);
+
+ // copy argument program
+ GLMessage_DataType *arg_program = glmsg.add_args();
+ arg_program->set_isarray(false);
+ arg_program->set_type(GLMessage::DataType::INT);
+ arg_program->add_intvalue(program);
+
+ // copy argument location
+ GLMessage_DataType *arg_location = glmsg.add_args();
+ arg_location->set_isarray(false);
+ arg_location->set_type(GLMessage::DataType::INT);
+ arg_location->add_intvalue(location);
+
+ // copy argument count
+ GLMessage_DataType *arg_count = glmsg.add_args();
+ arg_count->set_isarray(false);
+ arg_count->set_type(GLMessage::DataType::INT);
+ arg_count->add_intvalue(count);
+
+ // copy argument transpose
+ GLMessage_DataType *arg_transpose = glmsg.add_args();
+ arg_transpose->set_isarray(false);
+ arg_transpose->set_type(GLMessage::DataType::BOOL);
+ arg_transpose->add_boolvalue(transpose);
+
+ // copy argument value
+ GLMessage_DataType *arg_value = glmsg.add_args();
+ arg_value->set_isarray(false);
+ arg_value->set_type(GLMessage::DataType::INT);
+ arg_value->add_intvalue((int)value);
+
+ // call function
+ nsecs_t start_time = systemTime();
+ glContext->hooks->gl.glProgramUniformMatrix4fvEXT(program, location, count, transpose, value);
+ nsecs_t end_time = systemTime();
+
+ fixupGLMessage(glContext, start_time, end_time, &glmsg);
+ glContext->traceGLMessage(&glmsg);
+}
+
+void GLTrace_glValidateProgramPipelineEXT(GLuint pipeline) {
+ GLMessage glmsg;
+ GLTraceContext *glContext = getGLTraceContext();
+
+ glmsg.set_function(GLMessage::glValidateProgramPipelineEXT);
+
+ // copy argument pipeline
+ GLMessage_DataType *arg_pipeline = glmsg.add_args();
+ arg_pipeline->set_isarray(false);
+ arg_pipeline->set_type(GLMessage::DataType::INT);
+ arg_pipeline->add_intvalue(pipeline);
+
+ // call function
+ nsecs_t start_time = systemTime();
+ glContext->hooks->gl.glValidateProgramPipelineEXT(pipeline);
+ nsecs_t end_time = systemTime();
+
+ fixupGLMessage(glContext, start_time, end_time, &glmsg);
+ glContext->traceGLMessage(&glmsg);
+}
+
+void GLTrace_glGetProgramPipelineInfoLogEXT(GLuint pipeline, GLsizei bufSize, GLsizei *length, GLchar *infoLog) {
+ GLMessage glmsg;
+ GLTraceContext *glContext = getGLTraceContext();
+
+ glmsg.set_function(GLMessage::glGetProgramPipelineInfoLogEXT);
+
+ // copy argument pipeline
+ GLMessage_DataType *arg_pipeline = glmsg.add_args();
+ arg_pipeline->set_isarray(false);
+ arg_pipeline->set_type(GLMessage::DataType::INT);
+ arg_pipeline->add_intvalue(pipeline);
+
+ // copy argument bufSize
+ GLMessage_DataType *arg_bufSize = glmsg.add_args();
+ arg_bufSize->set_isarray(false);
+ arg_bufSize->set_type(GLMessage::DataType::INT);
+ arg_bufSize->add_intvalue(bufSize);
+
+ // copy argument length
+ GLMessage_DataType *arg_length = glmsg.add_args();
+ arg_length->set_isarray(false);
+ arg_length->set_type(GLMessage::DataType::INT);
+ arg_length->add_intvalue((int)length);
+
+ // copy argument infoLog
+ GLMessage_DataType *arg_infoLog = glmsg.add_args();
+ arg_infoLog->set_isarray(false);
+ arg_infoLog->set_type(GLMessage::DataType::INT);
+ arg_infoLog->add_intvalue((int)infoLog);
+
+ // call function
+ nsecs_t start_time = systemTime();
+ glContext->hooks->gl.glGetProgramPipelineInfoLogEXT(pipeline, bufSize, length, infoLog);
+ nsecs_t end_time = systemTime();
+
+ fixupGLMessage(glContext, start_time, end_time, &glmsg);
+ glContext->traceGLMessage(&glmsg);
+}
+
+void GLTrace_glTexStorage1DEXT(GLenum target, GLsizei levels, GLenum internalformat, GLsizei width) {
+ GLMessage glmsg;
+ GLTraceContext *glContext = getGLTraceContext();
+
+ glmsg.set_function(GLMessage::glTexStorage1DEXT);
+
+ // copy argument target
+ GLMessage_DataType *arg_target = glmsg.add_args();
+ arg_target->set_isarray(false);
+ arg_target->set_type(GLMessage::DataType::ENUM);
+ arg_target->add_intvalue((int)target);
+
+ // copy argument levels
+ GLMessage_DataType *arg_levels = glmsg.add_args();
+ arg_levels->set_isarray(false);
+ arg_levels->set_type(GLMessage::DataType::INT);
+ arg_levels->add_intvalue(levels);
+
+ // copy argument internalformat
+ GLMessage_DataType *arg_internalformat = glmsg.add_args();
+ arg_internalformat->set_isarray(false);
+ arg_internalformat->set_type(GLMessage::DataType::ENUM);
+ arg_internalformat->add_intvalue((int)internalformat);
+
+ // copy argument width
+ GLMessage_DataType *arg_width = glmsg.add_args();
+ arg_width->set_isarray(false);
+ arg_width->set_type(GLMessage::DataType::INT);
+ arg_width->add_intvalue(width);
+
+ // call function
+ nsecs_t start_time = systemTime();
+ glContext->hooks->gl.glTexStorage1DEXT(target, levels, internalformat, width);
+ nsecs_t end_time = systemTime();
+
+ fixupGLMessage(glContext, start_time, end_time, &glmsg);
+ glContext->traceGLMessage(&glmsg);
+}
+
+void GLTrace_glTexStorage2DEXT(GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height) {
+ GLMessage glmsg;
+ GLTraceContext *glContext = getGLTraceContext();
+
+ glmsg.set_function(GLMessage::glTexStorage2DEXT);
+
+ // copy argument target
+ GLMessage_DataType *arg_target = glmsg.add_args();
+ arg_target->set_isarray(false);
+ arg_target->set_type(GLMessage::DataType::ENUM);
+ arg_target->add_intvalue((int)target);
+
+ // copy argument levels
+ GLMessage_DataType *arg_levels = glmsg.add_args();
+ arg_levels->set_isarray(false);
+ arg_levels->set_type(GLMessage::DataType::INT);
+ arg_levels->add_intvalue(levels);
+
+ // copy argument internalformat
+ GLMessage_DataType *arg_internalformat = glmsg.add_args();
+ arg_internalformat->set_isarray(false);
+ arg_internalformat->set_type(GLMessage::DataType::ENUM);
+ arg_internalformat->add_intvalue((int)internalformat);
+
+ // copy argument width
+ GLMessage_DataType *arg_width = glmsg.add_args();
+ arg_width->set_isarray(false);
+ arg_width->set_type(GLMessage::DataType::INT);
+ arg_width->add_intvalue(width);
+
+ // copy argument height
+ GLMessage_DataType *arg_height = glmsg.add_args();
+ arg_height->set_isarray(false);
+ arg_height->set_type(GLMessage::DataType::INT);
+ arg_height->add_intvalue(height);
+
+ // call function
+ nsecs_t start_time = systemTime();
+ glContext->hooks->gl.glTexStorage2DEXT(target, levels, internalformat, width, height);
+ nsecs_t end_time = systemTime();
+
+ fixupGLMessage(glContext, start_time, end_time, &glmsg);
+ glContext->traceGLMessage(&glmsg);
+}
+
+void GLTrace_glTexStorage3DEXT(GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth) {
+ GLMessage glmsg;
+ GLTraceContext *glContext = getGLTraceContext();
+
+ glmsg.set_function(GLMessage::glTexStorage3DEXT);
+
+ // copy argument target
+ GLMessage_DataType *arg_target = glmsg.add_args();
+ arg_target->set_isarray(false);
+ arg_target->set_type(GLMessage::DataType::ENUM);
+ arg_target->add_intvalue((int)target);
+
+ // copy argument levels
+ GLMessage_DataType *arg_levels = glmsg.add_args();
+ arg_levels->set_isarray(false);
+ arg_levels->set_type(GLMessage::DataType::INT);
+ arg_levels->add_intvalue(levels);
+
+ // copy argument internalformat
+ GLMessage_DataType *arg_internalformat = glmsg.add_args();
+ arg_internalformat->set_isarray(false);
+ arg_internalformat->set_type(GLMessage::DataType::ENUM);
+ arg_internalformat->add_intvalue((int)internalformat);
+
+ // copy argument width
+ GLMessage_DataType *arg_width = glmsg.add_args();
+ arg_width->set_isarray(false);
+ arg_width->set_type(GLMessage::DataType::INT);
+ arg_width->add_intvalue(width);
+
+ // copy argument height
+ GLMessage_DataType *arg_height = glmsg.add_args();
+ arg_height->set_isarray(false);
+ arg_height->set_type(GLMessage::DataType::INT);
+ arg_height->add_intvalue(height);
+
+ // copy argument depth
+ GLMessage_DataType *arg_depth = glmsg.add_args();
+ arg_depth->set_isarray(false);
+ arg_depth->set_type(GLMessage::DataType::INT);
+ arg_depth->add_intvalue(depth);
+
+ // call function
+ nsecs_t start_time = systemTime();
+ glContext->hooks->gl.glTexStorage3DEXT(target, levels, internalformat, width, height, depth);
+ nsecs_t end_time = systemTime();
+
+ fixupGLMessage(glContext, start_time, end_time, &glmsg);
+ glContext->traceGLMessage(&glmsg);
+}
+
+void GLTrace_glTextureStorage1DEXT(GLuint texture, GLenum target, GLsizei levels, GLenum internalformat, GLsizei width) {
+ GLMessage glmsg;
+ GLTraceContext *glContext = getGLTraceContext();
+
+ glmsg.set_function(GLMessage::glTextureStorage1DEXT);
+
+ // copy argument texture
+ GLMessage_DataType *arg_texture = glmsg.add_args();
+ arg_texture->set_isarray(false);
+ arg_texture->set_type(GLMessage::DataType::INT);
+ arg_texture->add_intvalue(texture);
+
+ // copy argument target
+ GLMessage_DataType *arg_target = glmsg.add_args();
+ arg_target->set_isarray(false);
+ arg_target->set_type(GLMessage::DataType::ENUM);
+ arg_target->add_intvalue((int)target);
+
+ // copy argument levels
+ GLMessage_DataType *arg_levels = glmsg.add_args();
+ arg_levels->set_isarray(false);
+ arg_levels->set_type(GLMessage::DataType::INT);
+ arg_levels->add_intvalue(levels);
+
+ // copy argument internalformat
+ GLMessage_DataType *arg_internalformat = glmsg.add_args();
+ arg_internalformat->set_isarray(false);
+ arg_internalformat->set_type(GLMessage::DataType::ENUM);
+ arg_internalformat->add_intvalue((int)internalformat);
+
+ // copy argument width
+ GLMessage_DataType *arg_width = glmsg.add_args();
+ arg_width->set_isarray(false);
+ arg_width->set_type(GLMessage::DataType::INT);
+ arg_width->add_intvalue(width);
+
+ // call function
+ nsecs_t start_time = systemTime();
+ glContext->hooks->gl.glTextureStorage1DEXT(texture, target, levels, internalformat, width);
+ nsecs_t end_time = systemTime();
+
+ fixupGLMessage(glContext, start_time, end_time, &glmsg);
+ glContext->traceGLMessage(&glmsg);
+}
+
+void GLTrace_glTextureStorage2DEXT(GLuint texture, GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height) {
+ GLMessage glmsg;
+ GLTraceContext *glContext = getGLTraceContext();
+
+ glmsg.set_function(GLMessage::glTextureStorage2DEXT);
+
+ // copy argument texture
+ GLMessage_DataType *arg_texture = glmsg.add_args();
+ arg_texture->set_isarray(false);
+ arg_texture->set_type(GLMessage::DataType::INT);
+ arg_texture->add_intvalue(texture);
+
+ // copy argument target
+ GLMessage_DataType *arg_target = glmsg.add_args();
+ arg_target->set_isarray(false);
+ arg_target->set_type(GLMessage::DataType::ENUM);
+ arg_target->add_intvalue((int)target);
+
+ // copy argument levels
+ GLMessage_DataType *arg_levels = glmsg.add_args();
+ arg_levels->set_isarray(false);
+ arg_levels->set_type(GLMessage::DataType::INT);
+ arg_levels->add_intvalue(levels);
+
+ // copy argument internalformat
+ GLMessage_DataType *arg_internalformat = glmsg.add_args();
+ arg_internalformat->set_isarray(false);
+ arg_internalformat->set_type(GLMessage::DataType::ENUM);
+ arg_internalformat->add_intvalue((int)internalformat);
+
+ // copy argument width
+ GLMessage_DataType *arg_width = glmsg.add_args();
+ arg_width->set_isarray(false);
+ arg_width->set_type(GLMessage::DataType::INT);
+ arg_width->add_intvalue(width);
+
+ // copy argument height
+ GLMessage_DataType *arg_height = glmsg.add_args();
+ arg_height->set_isarray(false);
+ arg_height->set_type(GLMessage::DataType::INT);
+ arg_height->add_intvalue(height);
+
+ // call function
+ nsecs_t start_time = systemTime();
+ glContext->hooks->gl.glTextureStorage2DEXT(texture, target, levels, internalformat, width, height);
+ nsecs_t end_time = systemTime();
+
+ fixupGLMessage(glContext, start_time, end_time, &glmsg);
+ glContext->traceGLMessage(&glmsg);
+}
+
+void GLTrace_glTextureStorage3DEXT(GLuint texture, GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth) {
+ GLMessage glmsg;
+ GLTraceContext *glContext = getGLTraceContext();
+
+ glmsg.set_function(GLMessage::glTextureStorage3DEXT);
+
+ // copy argument texture
+ GLMessage_DataType *arg_texture = glmsg.add_args();
+ arg_texture->set_isarray(false);
+ arg_texture->set_type(GLMessage::DataType::INT);
+ arg_texture->add_intvalue(texture);
+
+ // copy argument target
+ GLMessage_DataType *arg_target = glmsg.add_args();
+ arg_target->set_isarray(false);
+ arg_target->set_type(GLMessage::DataType::ENUM);
+ arg_target->add_intvalue((int)target);
+
+ // copy argument levels
+ GLMessage_DataType *arg_levels = glmsg.add_args();
+ arg_levels->set_isarray(false);
+ arg_levels->set_type(GLMessage::DataType::INT);
+ arg_levels->add_intvalue(levels);
+
+ // copy argument internalformat
+ GLMessage_DataType *arg_internalformat = glmsg.add_args();
+ arg_internalformat->set_isarray(false);
+ arg_internalformat->set_type(GLMessage::DataType::ENUM);
+ arg_internalformat->add_intvalue((int)internalformat);
+
+ // copy argument width
+ GLMessage_DataType *arg_width = glmsg.add_args();
+ arg_width->set_isarray(false);
+ arg_width->set_type(GLMessage::DataType::INT);
+ arg_width->add_intvalue(width);
+
+ // copy argument height
+ GLMessage_DataType *arg_height = glmsg.add_args();
+ arg_height->set_isarray(false);
+ arg_height->set_type(GLMessage::DataType::INT);
+ arg_height->add_intvalue(height);
+
+ // copy argument depth
+ GLMessage_DataType *arg_depth = glmsg.add_args();
+ arg_depth->set_isarray(false);
+ arg_depth->set_type(GLMessage::DataType::INT);
+ arg_depth->add_intvalue(depth);
+
+ // call function
+ nsecs_t start_time = systemTime();
+ glContext->hooks->gl.glTextureStorage3DEXT(texture, target, levels, internalformat, width, height, depth);
+ nsecs_t end_time = systemTime();
+
+ fixupGLMessage(glContext, start_time, end_time, &glmsg);
+ glContext->traceGLMessage(&glmsg);
+}
+
void GLTrace_glRenderbufferStorageMultisampleIMG(GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height) {
GLMessage glmsg;
GLTraceContext *glContext = getGLTraceContext();
@@ -6022,6 +8214,75 @@ void GLTrace_glFramebufferTexture2DMultisampleIMG(GLenum target, GLenum attachme
glContext->traceGLMessage(&glmsg);
}
+void GLTrace_glCoverageMaskNV(GLboolean mask) {
+ GLMessage glmsg;
+ GLTraceContext *glContext = getGLTraceContext();
+
+ glmsg.set_function(GLMessage::glCoverageMaskNV);
+
+ // copy argument mask
+ GLMessage_DataType *arg_mask = glmsg.add_args();
+ arg_mask->set_isarray(false);
+ arg_mask->set_type(GLMessage::DataType::BOOL);
+ arg_mask->add_boolvalue(mask);
+
+ // call function
+ nsecs_t start_time = systemTime();
+ glContext->hooks->gl.glCoverageMaskNV(mask);
+ nsecs_t end_time = systemTime();
+
+ fixupGLMessage(glContext, start_time, end_time, &glmsg);
+ glContext->traceGLMessage(&glmsg);
+}
+
+void GLTrace_glCoverageOperationNV(GLenum operation) {
+ GLMessage glmsg;
+ GLTraceContext *glContext = getGLTraceContext();
+
+ glmsg.set_function(GLMessage::glCoverageOperationNV);
+
+ // copy argument operation
+ GLMessage_DataType *arg_operation = glmsg.add_args();
+ arg_operation->set_isarray(false);
+ arg_operation->set_type(GLMessage::DataType::ENUM);
+ arg_operation->add_intvalue((int)operation);
+
+ // call function
+ nsecs_t start_time = systemTime();
+ glContext->hooks->gl.glCoverageOperationNV(operation);
+ nsecs_t end_time = systemTime();
+
+ fixupGLMessage(glContext, start_time, end_time, &glmsg);
+ glContext->traceGLMessage(&glmsg);
+}
+
+void GLTrace_glDrawBuffersNV(GLsizei n, const GLenum *bufs) {
+ GLMessage glmsg;
+ GLTraceContext *glContext = getGLTraceContext();
+
+ glmsg.set_function(GLMessage::glDrawBuffersNV);
+
+ // copy argument n
+ GLMessage_DataType *arg_n = glmsg.add_args();
+ arg_n->set_isarray(false);
+ arg_n->set_type(GLMessage::DataType::INT);
+ arg_n->add_intvalue(n);
+
+ // copy argument bufs
+ GLMessage_DataType *arg_bufs = glmsg.add_args();
+ arg_bufs->set_isarray(false);
+ arg_bufs->set_type(GLMessage::DataType::INT);
+ arg_bufs->add_intvalue((int)bufs);
+
+ // call function
+ nsecs_t start_time = systemTime();
+ glContext->hooks->gl.glDrawBuffersNV(n, bufs);
+ nsecs_t end_time = systemTime();
+
+ fixupGLMessage(glContext, start_time, end_time, &glmsg);
+ glContext->traceGLMessage(&glmsg);
+}
+
void GLTrace_glDeleteFencesNV(GLsizei n, const GLuint *fences) {
GLMessage glmsg;
GLTraceContext *glContext = getGLTraceContext();
@@ -6215,42 +8476,48 @@ void GLTrace_glSetFenceNV(GLuint fence, GLenum condition) {
glContext->traceGLMessage(&glmsg);
}
-void GLTrace_glCoverageMaskNV(GLboolean mask) {
+void GLTrace_glReadBufferNV(GLenum mode) {
GLMessage glmsg;
GLTraceContext *glContext = getGLTraceContext();
- glmsg.set_function(GLMessage::glCoverageMaskNV);
+ glmsg.set_function(GLMessage::glReadBufferNV);
- // copy argument mask
- GLMessage_DataType *arg_mask = glmsg.add_args();
- arg_mask->set_isarray(false);
- arg_mask->set_type(GLMessage::DataType::BOOL);
- arg_mask->add_boolvalue(mask);
+ // copy argument mode
+ GLMessage_DataType *arg_mode = glmsg.add_args();
+ arg_mode->set_isarray(false);
+ arg_mode->set_type(GLMessage::DataType::ENUM);
+ arg_mode->add_intvalue((int)mode);
// call function
nsecs_t start_time = systemTime();
- glContext->hooks->gl.glCoverageMaskNV(mask);
+ glContext->hooks->gl.glReadBufferNV(mode);
nsecs_t end_time = systemTime();
fixupGLMessage(glContext, start_time, end_time, &glmsg);
glContext->traceGLMessage(&glmsg);
}
-void GLTrace_glCoverageOperationNV(GLenum operation) {
+void GLTrace_glAlphaFuncQCOM(GLenum func, GLclampf ref) {
GLMessage glmsg;
GLTraceContext *glContext = getGLTraceContext();
- glmsg.set_function(GLMessage::glCoverageOperationNV);
+ glmsg.set_function(GLMessage::glAlphaFuncQCOM);
- // copy argument operation
- GLMessage_DataType *arg_operation = glmsg.add_args();
- arg_operation->set_isarray(false);
- arg_operation->set_type(GLMessage::DataType::ENUM);
- arg_operation->add_intvalue((int)operation);
+ // copy argument func
+ GLMessage_DataType *arg_func = glmsg.add_args();
+ arg_func->set_isarray(false);
+ arg_func->set_type(GLMessage::DataType::ENUM);
+ arg_func->add_intvalue((int)func);
+
+ // copy argument ref
+ GLMessage_DataType *arg_ref = glmsg.add_args();
+ arg_ref->set_isarray(false);
+ arg_ref->set_type(GLMessage::DataType::FLOAT);
+ arg_ref->add_floatvalue(ref);
// call function
nsecs_t start_time = systemTime();
- glContext->hooks->gl.glCoverageOperationNV(operation);
+ glContext->hooks->gl.glAlphaFuncQCOM(func, ref);
nsecs_t end_time = systemTime();
fixupGLMessage(glContext, start_time, end_time, &glmsg);
diff --git a/opengl/libs/GLES_trace/src/gltrace_api.h b/opengl/libs/GLES_trace/src/gltrace_api.h
index 71b5a58..debcac0 100644
--- a/opengl/libs/GLES_trace/src/gltrace_api.h
+++ b/opengl/libs/GLES_trace/src/gltrace_api.h
@@ -194,11 +194,72 @@ void GLTrace_glSelectPerfMonitorCountersAMD(GLuint monitor, GLboolean enable, GL
void GLTrace_glBeginPerfMonitorAMD(GLuint monitor);
void GLTrace_glEndPerfMonitorAMD(GLuint monitor);
void GLTrace_glGetPerfMonitorCounterDataAMD(GLuint monitor, GLenum pname, GLsizei dataSize, GLuint *data, GLint *bytesWritten);
+void GLTrace_glBlitFramebufferANGLE(GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1, GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1, GLbitfield mask, GLenum filter);
+void GLTrace_glRenderbufferStorageMultisampleANGLE(GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height);
+void GLTrace_glRenderbufferStorageMultisampleAPPLE(GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height);
+void GLTrace_glResolveMultisampleFramebufferAPPLE(void);
+void GLTrace_glLabelObjectEXT(GLenum type, GLuint object, GLsizei length, const GLchar *label);
+void GLTrace_glGetObjectLabelEXT(GLenum type, GLuint object, GLsizei bufSize, GLsizei *length, GLchar *label);
+void GLTrace_glInsertEventMarkerEXT(GLsizei length, const GLchar *marker);
+void GLTrace_glPushGroupMarkerEXT(GLsizei length, const GLchar *marker);
+void GLTrace_glPopGroupMarkerEXT(void);
void GLTrace_glDiscardFramebufferEXT(GLenum target, GLsizei numAttachments, const GLenum *attachments);
+void GLTrace_glRenderbufferStorageMultisampleEXT(GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height);
+void GLTrace_glFramebufferTexture2DMultisampleEXT(GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level, GLsizei samples);
void GLTrace_glMultiDrawArraysEXT(GLenum mode, GLint *first, GLsizei *count, GLsizei primcount);
void GLTrace_glMultiDrawElementsEXT(GLenum mode, const GLsizei *count, GLenum type, const GLvoid* *indices, GLsizei primcount);
+void GLTrace_glGenQueriesEXT(GLsizei n, GLuint *ids);
+void GLTrace_glDeleteQueriesEXT(GLsizei n, const GLuint *ids);
+GLboolean GLTrace_glIsQueryEXT(GLuint id);
+void GLTrace_glBeginQueryEXT(GLenum target, GLuint id);
+void GLTrace_glEndQueryEXT(GLenum target);
+void GLTrace_glGetQueryivEXT(GLenum target, GLenum pname, GLint *params);
+void GLTrace_glGetQueryObjectuivEXT(GLuint id, GLenum pname, GLuint *params);
+GLenum GLTrace_glGetGraphicsResetStatusEXT(void);
+void GLTrace_glReadnPixelsEXT(GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, GLsizei bufSize, void *data);
+void GLTrace_glGetnUniformfvEXT(GLuint program, GLint location, GLsizei bufSize, float *params);
+void GLTrace_glGetnUniformivEXT(GLuint program, GLint location, GLsizei bufSize, GLint *params);
+void GLTrace_glUseProgramStagesEXT(GLuint pipeline, GLbitfield stages, GLuint program);
+void GLTrace_glActiveShaderProgramEXT(GLuint pipeline, GLuint program);
+GLuint GLTrace_glCreateShaderProgramvEXT(GLenum type, GLsizei count, const GLchar **strings);
+void GLTrace_glBindProgramPipelineEXT(GLuint pipeline);
+void GLTrace_glDeleteProgramPipelinesEXT(GLsizei n, const GLuint *pipelines);
+void GLTrace_glGenProgramPipelinesEXT(GLsizei n, GLuint *pipelines);
+GLboolean GLTrace_glIsProgramPipelineEXT(GLuint pipeline);
+void GLTrace_glProgramParameteriEXT(GLuint program, GLenum pname, GLint value);
+void GLTrace_glGetProgramPipelineivEXT(GLuint pipeline, GLenum pname, GLint *params);
+void GLTrace_glProgramUniform1iEXT(GLuint program, GLint location, GLint x);
+void GLTrace_glProgramUniform2iEXT(GLuint program, GLint location, GLint x, GLint y);
+void GLTrace_glProgramUniform3iEXT(GLuint program, GLint location, GLint x, GLint y, GLint z);
+void GLTrace_glProgramUniform4iEXT(GLuint program, GLint location, GLint x, GLint y, GLint z, GLint w);
+void GLTrace_glProgramUniform1fEXT(GLuint program, GLint location, GLfloat x);
+void GLTrace_glProgramUniform2fEXT(GLuint program, GLint location, GLfloat x, GLfloat y);
+void GLTrace_glProgramUniform3fEXT(GLuint program, GLint location, GLfloat x, GLfloat y, GLfloat z);
+void GLTrace_glProgramUniform4fEXT(GLuint program, GLint location, GLfloat x, GLfloat y, GLfloat z, GLfloat w);
+void GLTrace_glProgramUniform1ivEXT(GLuint program, GLint location, GLsizei count, const GLint *value);
+void GLTrace_glProgramUniform2ivEXT(GLuint program, GLint location, GLsizei count, const GLint *value);
+void GLTrace_glProgramUniform3ivEXT(GLuint program, GLint location, GLsizei count, const GLint *value);
+void GLTrace_glProgramUniform4ivEXT(GLuint program, GLint location, GLsizei count, const GLint *value);
+void GLTrace_glProgramUniform1fvEXT(GLuint program, GLint location, GLsizei count, const GLfloat *value);
+void GLTrace_glProgramUniform2fvEXT(GLuint program, GLint location, GLsizei count, const GLfloat *value);
+void GLTrace_glProgramUniform3fvEXT(GLuint program, GLint location, GLsizei count, const GLfloat *value);
+void GLTrace_glProgramUniform4fvEXT(GLuint program, GLint location, GLsizei count, const GLfloat *value);
+void GLTrace_glProgramUniformMatrix2fvEXT(GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
+void GLTrace_glProgramUniformMatrix3fvEXT(GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
+void GLTrace_glProgramUniformMatrix4fvEXT(GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
+void GLTrace_glValidateProgramPipelineEXT(GLuint pipeline);
+void GLTrace_glGetProgramPipelineInfoLogEXT(GLuint pipeline, GLsizei bufSize, GLsizei *length, GLchar *infoLog);
+void GLTrace_glTexStorage1DEXT(GLenum target, GLsizei levels, GLenum internalformat, GLsizei width);
+void GLTrace_glTexStorage2DEXT(GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height);
+void GLTrace_glTexStorage3DEXT(GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth);
+void GLTrace_glTextureStorage1DEXT(GLuint texture, GLenum target, GLsizei levels, GLenum internalformat, GLsizei width);
+void GLTrace_glTextureStorage2DEXT(GLuint texture, GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height);
+void GLTrace_glTextureStorage3DEXT(GLuint texture, GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth);
void GLTrace_glRenderbufferStorageMultisampleIMG(GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height);
void GLTrace_glFramebufferTexture2DMultisampleIMG(GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level, GLsizei samples);
+void GLTrace_glCoverageMaskNV(GLboolean mask);
+void GLTrace_glCoverageOperationNV(GLenum operation);
+void GLTrace_glDrawBuffersNV(GLsizei n, const GLenum *bufs);
void GLTrace_glDeleteFencesNV(GLsizei n, const GLuint *fences);
void GLTrace_glGenFencesNV(GLsizei n, GLuint *fences);
GLboolean GLTrace_glIsFenceNV(GLuint fence);
@@ -206,8 +267,8 @@ GLboolean GLTrace_glTestFenceNV(GLuint fence);
void GLTrace_glGetFenceivNV(GLuint fence, GLenum pname, GLint *params);
void GLTrace_glFinishFenceNV(GLuint fence);
void GLTrace_glSetFenceNV(GLuint fence, GLenum condition);
-void GLTrace_glCoverageMaskNV(GLboolean mask);
-void GLTrace_glCoverageOperationNV(GLenum operation);
+void GLTrace_glReadBufferNV(GLenum mode);
+void GLTrace_glAlphaFuncQCOM(GLenum func, GLclampf ref);
void GLTrace_glGetDriverControlsQCOM(GLint *num, GLsizei size, GLuint *driverControls);
void GLTrace_glGetDriverControlStringQCOM(GLuint driverControl, GLsizei bufSize, GLsizei *length, GLchar *driverControlString);
void GLTrace_glEnableDriverControlQCOM(GLuint driverControl);
diff --git a/opengl/libs/GLES_trace/src/gltrace_eglapi.cpp b/opengl/libs/GLES_trace/src/gltrace_eglapi.cpp
index c237d75..c442153 100644
--- a/opengl/libs/GLES_trace/src/gltrace_eglapi.cpp
+++ b/opengl/libs/GLES_trace/src/gltrace_eglapi.cpp
@@ -77,12 +77,10 @@ static void *commandReceiveTask(void *arg) {
}
void GLTrace_start() {
- char value[PROPERTY_VALUE_MAX];
+ char udsName[PROPERTY_VALUE_MAX];
- property_get("debug.egl.debug_port", value, "5039");
- const unsigned short port = (unsigned short)atoi(value);
-
- int clientSocket = gltrace::acceptClientConnection(port);
+ property_get("debug.egl.debug_portname", udsName, "gltrace");
+ int clientSocket = gltrace::acceptClientConnection(udsName);
if (clientSocket < 0) {
ALOGE("Error creating GLTrace server socket. Quitting application.");
exit(-1);
diff --git a/opengl/libs/GLES_trace/src/gltrace_fixup.cpp b/opengl/libs/GLES_trace/src/gltrace_fixup.cpp
index 5220aa4..871b5dc 100644
--- a/opengl/libs/GLES_trace/src/gltrace_fixup.cpp
+++ b/opengl/libs/GLES_trace/src/gltrace_fixup.cpp
@@ -107,19 +107,11 @@ void fixup_addFBContents(GLTraceContext *context, GLMessage *glmsg, FBBinding fb
fb->add_contents(fbcontents, fbsize);
}
-void fixup_glTexImage2D(GLMessage *glmsg) {
- /* void glTexImage2D(GLenum target,
- GLint level,
- GLint internalformat,
- GLsizei width,
- GLsizei height,
- GLint border,
- GLenum format,
- GLenum type,
- const GLvoid *data);
- */
- GLMessage_DataType arg_width = glmsg->args(3);
- GLMessage_DataType arg_height = glmsg->args(4);
+/** Common fixup routing for glTexImage2D & glTexSubImage2D. */
+void fixup_glTexImage(int widthIndex, int heightIndex, GLMessage *glmsg) {
+ GLMessage_DataType arg_width = glmsg->args(widthIndex);
+ GLMessage_DataType arg_height = glmsg->args(heightIndex);
+
GLMessage_DataType arg_format = glmsg->args(6);
GLMessage_DataType arg_type = glmsg->args(7);
GLMessage_DataType *arg_data = glmsg->mutable_args(8);
@@ -133,21 +125,51 @@ void fixup_glTexImage2D(GLMessage *glmsg) {
int bytesPerTexel = getBytesPerTexel(format, type);
arg_data->set_type(GLMessage::DataType::BYTE);
- arg_data->set_isarray(true);
arg_data->clear_rawbytes();
if (data != NULL) {
+ arg_data->set_isarray(true);
arg_data->add_rawbytes(data, bytesPerTexel * width * height);
} else {
- ALOGE("fixup_glTexImage2D: image data is NULL.\n");
+ arg_data->set_isarray(false);
arg_data->set_type(GLMessage::DataType::VOID);
- // FIXME:
- // This will create the texture, but it will be uninitialized.
- // It can later be initialized with glTexSubImage2D or by
- // attaching an FBO to it and rendering into the FBO.
}
}
+
+void fixup_glTexImage2D(GLMessage *glmsg) {
+ /* void glTexImage2D(GLenum target,
+ GLint level,
+ GLint internalformat,
+ GLsizei width,
+ GLsizei height,
+ GLint border,
+ GLenum format,
+ GLenum type,
+ const GLvoid *data);
+ */
+ int widthIndex = 3;
+ int heightIndex = 4;
+ fixup_glTexImage(widthIndex, heightIndex, glmsg);
+}
+
+void fixup_glTexSubImage2D(GLMessage *glmsg) {
+ /*
+ void glTexSubImage2D(GLenum target,
+ GLint level,
+ GLint xoffset,
+ GLint yoffset,
+ GLsizei width,
+ GLsizei height,
+ GLenum format,
+ GLenum type,
+ const GLvoid * data);
+ */
+ int widthIndex = 4;
+ int heightIndex = 5;
+ fixup_glTexImage(widthIndex, heightIndex, glmsg);
+}
+
void fixup_glShaderSource(GLMessage *glmsg) {
/* void glShaderSource(GLuint shader, GLsizei count, const GLchar** string,
const GLint* length) */
@@ -218,6 +240,14 @@ void fixup_glGenGeneric(GLMessage *glmsg) {
fixup_GenericIntArray(1, n, glmsg);
}
+void fixup_glDeleteGeneric(GLMessage *glmsg) {
+ /* void glDelete*(GLsizei n, GLuint *buffers); */
+ GLMessage_DataType arg_n = glmsg->args(0);
+ GLsizei n = arg_n.intvalue(0);
+
+ fixup_GenericIntArray(1, n, glmsg);
+}
+
void fixup_glGetBooleanv(GLMessage *glmsg) {
/* void glGetBooleanv(GLenum pname, GLboolean *params); */
GLMessage_DataType *arg_params = glmsg->mutable_args(1);
@@ -250,10 +280,16 @@ void fixupGLMessage(GLTraceContext *context, nsecs_t start, nsecs_t end, GLMessa
// do any custom message dependent processing
switch (glmsg->function()) {
- case GLMessage::glGenBuffers: /* void glGenBuffers(GLsizei n, GLuint * buffers); */
- case GLMessage::glGenFramebuffers: /* void glGenFramebuffers(GLsizei n, GLuint * buffers); */
- case GLMessage::glGenRenderbuffers: /* void glGenFramebuffers(GLsizei n, GLuint * buffers); */
- case GLMessage::glGenTextures: /* void glGenTextures(GLsizei n, GLuint * buffers); */
+ case GLMessage::glDeleteBuffers: /* glDeleteBuffers(GLsizei n, GLuint *buffers); */
+ case GLMessage::glDeleteFramebuffers: /* glDeleteFramebuffers(GLsizei n, GLuint *buffers); */
+ case GLMessage::glDeleteRenderbuffers:/* glDeleteRenderbuffers(GLsizei n, GLuint *buffers); */
+ case GLMessage::glDeleteTextures: /* glDeleteTextures(GLsizei n, GLuint *textures); */
+ fixup_glDeleteGeneric(glmsg);
+ break;
+ case GLMessage::glGenBuffers: /* void glGenBuffers(GLsizei n, GLuint *buffers); */
+ case GLMessage::glGenFramebuffers: /* void glGenFramebuffers(GLsizei n, GLuint *buffers); */
+ case GLMessage::glGenRenderbuffers: /* void glGenFramebuffers(GLsizei n, GLuint *buffers); */
+ case GLMessage::glGenTextures: /* void glGenTextures(GLsizei n, GLuint *textures); */
fixup_glGenGeneric(glmsg);
break;
case GLMessage::glGetAttribLocation:
@@ -287,6 +323,11 @@ void fixupGLMessage(GLTraceContext *context, nsecs_t start, nsecs_t end, GLMessa
fixup_glTexImage2D(glmsg);
}
break;
+ case GLMessage::glTexSubImage2D:
+ if (context->getGlobalTraceState()->shouldCollectTextureDataOnGlTexImage()) {
+ fixup_glTexSubImage2D(glmsg);
+ }
+ break;
case GLMessage::glShaderSource:
fixup_glShaderSource(glmsg);
break;
@@ -317,6 +358,14 @@ void fixupGLMessage(GLTraceContext *context, nsecs_t start, nsecs_t end, GLMessa
fixup_addFBContents(context, glmsg, CURRENTLY_BOUND_FB);
}
break;
+ case GLMessage::glPushGroupMarkerEXT:
+ /* void PushGroupMarkerEXT(sizei length, const char *marker); */
+ fixup_CStringPtr(1, glmsg);
+ break;
+ case GLMessage::glInsertEventMarkerEXT:
+ /* void InsertEventMarkerEXT(sizei length, const char *marker); */
+ fixup_CStringPtr(1, glmsg);
+ break;
default:
break;
}
diff --git a/opengl/libs/GLES_trace/src/gltrace_transport.cpp b/opengl/libs/GLES_trace/src/gltrace_transport.cpp
index ce3fae5..5251b12 100644
--- a/opengl/libs/GLES_trace/src/gltrace_transport.cpp
+++ b/opengl/libs/GLES_trace/src/gltrace_transport.cpp
@@ -17,9 +17,10 @@
#include <stdlib.h>
#include <unistd.h>
+#include <unistd.h>
#include <sys/socket.h>
+#include <sys/un.h>
#include <netinet/in.h>
-#include <arpa/inet.h>
#include <cutils/log.h>
@@ -28,22 +29,24 @@
namespace android {
namespace gltrace {
-int acceptClientConnection(int serverPort) {
- int serverSocket = socket(PF_INET, SOCK_STREAM, IPPROTO_TCP);
+int acceptClientConnection(char *sockname) {
+ int serverSocket = socket(AF_LOCAL, SOCK_STREAM, 0);
if (serverSocket < 0) {
ALOGE("Error (%d) while creating socket. Check if app has network permissions.",
serverSocket);
return -1;
}
- struct sockaddr_in server, client;
+ struct sockaddr_un server, client;
- server.sin_family = AF_INET;
- server.sin_addr.s_addr = htonl(INADDR_ANY);
- server.sin_port = htons(serverPort);
+ memset(&server, 0, sizeof server);
+ server.sun_family = AF_UNIX;
+ // the first byte of sun_path should be '\0' for abstract namespace
+ strcpy(server.sun_path + 1, sockname);
- socklen_t sockaddr_len = sizeof(sockaddr_in);
- if (bind(serverSocket, (struct sockaddr *) &server, sizeof(server)) < 0) {
+ // note that sockaddr_len should be set to the exact size of the buffer that is used.
+ socklen_t sockaddr_len = sizeof(server.sun_family) + strlen(sockname) + 1;
+ if (bind(serverSocket, (struct sockaddr *) &server, sockaddr_len) < 0) {
close(serverSocket);
ALOGE("Failed to bind the server socket");
return -1;
@@ -55,7 +58,7 @@ int acceptClientConnection(int serverPort) {
return -1;
}
- ALOGD("gltrace::waitForClientConnection: server listening @ port %d", serverPort);
+ ALOGD("gltrace::waitForClientConnection: server listening @ path %s", sockname);
int clientSocket = accept(serverSocket, (struct sockaddr *)&client, &sockaddr_len);
if (clientSocket < 0) {
@@ -64,7 +67,7 @@ int acceptClientConnection(int serverPort) {
return -1;
}
- ALOGD("gltrace::waitForClientConnection: client connected: %s", inet_ntoa(client.sin_addr));
+ ALOGD("gltrace::waitForClientConnection: client connected.");
// do not accept any more incoming connections
close(serverSocket);
diff --git a/opengl/libs/GLES_trace/src/gltrace_transport.h b/opengl/libs/GLES_trace/src/gltrace_transport.h
index d31df7b..3665035 100644
--- a/opengl/libs/GLES_trace/src/gltrace_transport.h
+++ b/opengl/libs/GLES_trace/src/gltrace_transport.h
@@ -76,10 +76,11 @@ public:
};
/**
- * Utility method: start a server at @serverPort, and wait for a client
- * connection. Returns the connected client socket on success, or -1 on failure.
+ * Utility method: start a server listening at @sockName (unix domain socket,
+ * abstract namespace path), and wait for a client connection.
+ * Returns the connected client socket on success, or -1 on failure.
*/
-int acceptClientConnection(int serverPort);
+int acceptClientConnection(char *sockName);
};
};
diff --git a/opengl/libs/GLES_trace/tools/genapi.py b/opengl/libs/GLES_trace/tools/genapi.py
index 9b7a1cf..557e407 100755
--- a/opengl/libs/GLES_trace/tools/genapi.py
+++ b/opengl/libs/GLES_trace/tools/genapi.py
@@ -26,11 +26,11 @@
# module. The only reason to use pyratemp is that it is extremly
# simple to install:
# $ wget http://www.simple-is-better.org/template/pyratemp-current/pyratemp.py
-# Put the file in the GLES2_trace/tools folder, or update PYTHONPATH
+# Put the file in the GLES_trace/tools folder, or update PYTHONPATH
# to point to wherever it was downloaded.
#
# USAGE
-# $ cd GLES2_trace - run the program from GLES2_trace folder
+# $ cd GLES_trace - run the program from GLES2_trace folder
# $ ./tools/genapi.py - generates a .cpp and .h file
# $ mv *.cpp *.h src/ - move the generated files into the src folder
diff --git a/opengl/libs/GLES_trace/tools/testgenapi.py b/opengl/libs/GLES_trace/tools/testgenapi.py
index 58a12a8..fe14954 100644
--- a/opengl/libs/GLES_trace/tools/testgenapi.py
+++ b/opengl/libs/GLES_trace/tools/testgenapi.py
@@ -15,7 +15,7 @@
# limitations under the License.
#
# USAGE
-# $ cd GLES2_trace/tools
+# $ cd GLES_trace/tools
# $ python testgenapi.py
import unittest
@@ -45,9 +45,9 @@ class TestApiCall(unittest.TestCase):
glext_apis = getApis('../../GLES_CM/glext_api.in', 'GL1Ext')
self.assertEqual(len(gl2_apis), 142)
- self.assertEqual(len(gl2ext_apis), 60)
+ self.assertEqual(len(gl2ext_apis), 121)
self.assertEqual(len(gl_apis), 145)
- self.assertEqual(len(glext_apis), 126)
+ self.assertEqual(len(glext_apis), 140)
def test_parseArgs(self):
args = parseArgs("void")
diff --git a/opengl/libs/egl_impl.h b/opengl/libs/egl_impl.h
index a809316..8ff51ec 100644
--- a/opengl/libs/egl_impl.h
+++ b/opengl/libs/egl_impl.h
@@ -29,6 +29,7 @@
namespace android {
// ----------------------------------------------------------------------------
+EGLAPI const GLubyte * egl_get_string_for_current_context(GLenum name);
EGLAPI EGLImageKHR egl_get_image_for_current_context(EGLImageKHR image);
// ----------------------------------------------------------------------------
diff --git a/opengl/libs/entries.in b/opengl/libs/entries.in
index 61acb5f..6316d78 100644
--- a/opengl/libs/entries.in
+++ b/opengl/libs/entries.in
@@ -1,13 +1,17 @@
+GL_ENTRY(void, glActiveShaderProgramEXT, GLuint pipeline, GLuint program)
GL_ENTRY(void, glActiveTexture, GLenum texture)
GL_ENTRY(void, glAlphaFunc, GLenum func, GLclampf ref)
+GL_ENTRY(void, glAlphaFuncQCOM, GLenum func, GLclampf ref)
GL_ENTRY(void, glAlphaFuncx, GLenum func, GLclampx ref)
GL_ENTRY(void, glAlphaFuncxOES, GLenum func, GLclampx ref)
GL_ENTRY(void, glAttachShader, GLuint program, GLuint shader)
GL_ENTRY(void, glBeginPerfMonitorAMD, GLuint monitor)
+GL_ENTRY(void, glBeginQueryEXT, GLenum target, GLuint id)
GL_ENTRY(void, glBindAttribLocation, GLuint program, GLuint index, const GLchar* name)
GL_ENTRY(void, glBindBuffer, GLenum target, GLuint buffer)
GL_ENTRY(void, glBindFramebuffer, GLenum target, GLuint framebuffer)
GL_ENTRY(void, glBindFramebufferOES, GLenum target, GLuint framebuffer)
+GL_ENTRY(void, glBindProgramPipelineEXT, GLuint pipeline)
GL_ENTRY(void, glBindRenderbuffer, GLenum target, GLuint renderbuffer)
GL_ENTRY(void, glBindRenderbufferOES, GLenum target, GLuint renderbuffer)
GL_ENTRY(void, glBindTexture, GLenum target, GLuint texture)
@@ -20,6 +24,7 @@ GL_ENTRY(void, glBlendEquationSeparateOES, GLenum modeRGB, GLenum modeAlpha)
GL_ENTRY(void, glBlendFunc, GLenum sfactor, GLenum dfactor)
GL_ENTRY(void, glBlendFuncSeparate, GLenum srcRGB, GLenum dstRGB, GLenum srcAlpha, GLenum dstAlpha)
GL_ENTRY(void, glBlendFuncSeparateOES, GLenum srcRGB, GLenum dstRGB, GLenum srcAlpha, GLenum dstAlpha)
+GL_ENTRY(void, glBlitFramebufferANGLE, GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1, GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1, GLbitfield mask, GLenum filter)
GL_ENTRY(void, glBufferData, GLenum target, GLsizeiptr size, const GLvoid *data, GLenum usage)
GL_ENTRY(void, glBufferSubData, GLenum target, GLintptr offset, GLsizeiptr size, const GLvoid *data)
GL_ENTRY(GLenum, glCheckFramebufferStatus, GLenum target)
@@ -58,6 +63,7 @@ GL_ENTRY(void, glCoverageMaskNV, GLboolean mask)
GL_ENTRY(void, glCoverageOperationNV, GLenum operation)
GL_ENTRY(GLuint, glCreateProgram, void)
GL_ENTRY(GLuint, glCreateShader, GLenum type)
+GL_ENTRY(GLuint, glCreateShaderProgramvEXT, GLenum type, GLsizei count, const GLchar **strings)
GL_ENTRY(void, glCullFace, GLenum mode)
GL_ENTRY(void, glCurrentPaletteMatrixOES, GLuint matrixpaletteindex)
GL_ENTRY(void, glDeleteBuffers, GLsizei n, const GLuint *buffers)
@@ -66,6 +72,8 @@ GL_ENTRY(void, glDeleteFramebuffers, GLsizei n, const GLuint* framebuffers)
GL_ENTRY(void, glDeleteFramebuffersOES, GLsizei n, const GLuint* framebuffers)
GL_ENTRY(void, glDeletePerfMonitorsAMD, GLsizei n, GLuint *monitors)
GL_ENTRY(void, glDeleteProgram, GLuint program)
+GL_ENTRY(void, glDeleteProgramPipelinesEXT, GLsizei n, const GLuint *pipelines)
+GL_ENTRY(void, glDeleteQueriesEXT, GLsizei n, const GLuint *ids)
GL_ENTRY(void, glDeleteRenderbuffers, GLsizei n, const GLuint* renderbuffers)
GL_ENTRY(void, glDeleteRenderbuffersOES, GLsizei n, const GLuint* renderbuffers)
GL_ENTRY(void, glDeleteShader, GLuint shader)
@@ -84,6 +92,7 @@ GL_ENTRY(void, glDisableDriverControlQCOM, GLuint driverControl)
GL_ENTRY(void, glDisableVertexAttribArray, GLuint index)
GL_ENTRY(void, glDiscardFramebufferEXT, GLenum target, GLsizei numAttachments, const GLenum *attachments)
GL_ENTRY(void, glDrawArrays, GLenum mode, GLint first, GLsizei count)
+GL_ENTRY(void, glDrawBuffersNV, GLsizei n, const GLenum *bufs)
GL_ENTRY(void, glDrawElements, GLenum mode, GLsizei count, GLenum type, const GLvoid *indices)
GL_ENTRY(void, glDrawTexfOES, GLfloat x, GLfloat y, GLfloat z, GLfloat width, GLfloat height)
GL_ENTRY(void, glDrawTexfvOES, const GLfloat *coords)
@@ -100,6 +109,7 @@ GL_ENTRY(void, glEnableClientState, GLenum array)
GL_ENTRY(void, glEnableDriverControlQCOM, GLuint driverControl)
GL_ENTRY(void, glEnableVertexAttribArray, GLuint index)
GL_ENTRY(void, glEndPerfMonitorAMD, GLuint monitor)
+GL_ENTRY(void, glEndQueryEXT, GLenum target)
GL_ENTRY(void, glEndTilingQCOM, GLbitfield preserveMask)
GL_ENTRY(void, glExtGetBufferPointervQCOM, GLenum target, GLvoid **params)
GL_ENTRY(void, glExtGetBuffersQCOM, GLuint *buffers, GLint maxBuffers, GLint *numBuffers)
@@ -125,6 +135,7 @@ GL_ENTRY(void, glFogxvOES, GLenum pname, const GLfixed *params)
GL_ENTRY(void, glFramebufferRenderbuffer, GLenum target, GLenum attachment, GLenum renderbuffertarget, GLuint renderbuffer)
GL_ENTRY(void, glFramebufferRenderbufferOES, GLenum target, GLenum attachment, GLenum renderbuffertarget, GLuint renderbuffer)
GL_ENTRY(void, glFramebufferTexture2D, GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level)
+GL_ENTRY(void, glFramebufferTexture2DMultisampleEXT, GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level, GLsizei samples)
GL_ENTRY(void, glFramebufferTexture2DMultisampleIMG, GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level, GLsizei samples)
GL_ENTRY(void, glFramebufferTexture2DOES, GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level)
GL_ENTRY(void, glFramebufferTexture3DOES, GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level, GLint zoffset)
@@ -138,6 +149,8 @@ GL_ENTRY(void, glGenFencesNV, GLsizei n, GLuint *fences)
GL_ENTRY(void, glGenFramebuffers, GLsizei n, GLuint* framebuffers)
GL_ENTRY(void, glGenFramebuffersOES, GLsizei n, GLuint* framebuffers)
GL_ENTRY(void, glGenPerfMonitorsAMD, GLsizei n, GLuint *monitors)
+GL_ENTRY(void, glGenProgramPipelinesEXT, GLsizei n, GLuint *pipelines)
+GL_ENTRY(void, glGenQueriesEXT, GLsizei n, GLuint *ids)
GL_ENTRY(void, glGenRenderbuffers, GLsizei n, GLuint* renderbuffers)
GL_ENTRY(void, glGenRenderbuffersOES, GLsizei n, GLuint* renderbuffers)
GL_ENTRY(void, glGenTextures, GLsizei n, GLuint *textures)
@@ -164,6 +177,7 @@ GL_ENTRY(void, glGetFixedvOES, GLenum pname, GLfixed *params)
GL_ENTRY(void, glGetFloatv, GLenum pname, GLfloat *params)
GL_ENTRY(void, glGetFramebufferAttachmentParameteriv, GLenum target, GLenum attachment, GLenum pname, GLint* params)
GL_ENTRY(void, glGetFramebufferAttachmentParameterivOES, GLenum target, GLenum attachment, GLenum pname, GLint* params)
+GL_ENTRY(GLenum, glGetGraphicsResetStatusEXT, void)
GL_ENTRY(void, glGetIntegerv, GLenum pname, GLint *params)
GL_ENTRY(void, glGetLightfv, GLenum light, GLenum pname, GLfloat *params)
GL_ENTRY(void, glGetLightxv, GLenum light, GLenum pname, GLfixed *params)
@@ -171,6 +185,7 @@ GL_ENTRY(void, glGetLightxvOES, GLenum light, GLenum pname, GLfixed *params)
GL_ENTRY(void, glGetMaterialfv, GLenum face, GLenum pname, GLfloat *params)
GL_ENTRY(void, glGetMaterialxv, GLenum face, GLenum pname, GLfixed *params)
GL_ENTRY(void, glGetMaterialxvOES, GLenum face, GLenum pname, GLfixed *params)
+GL_ENTRY(void, glGetObjectLabelEXT, GLenum type, GLuint object, GLsizei bufSize, GLsizei *length, GLchar *label)
GL_ENTRY(void, glGetPerfMonitorCounterDataAMD, GLuint monitor, GLenum pname, GLsizei dataSize, GLuint *data, GLint *bytesWritten)
GL_ENTRY(void, glGetPerfMonitorCounterInfoAMD, GLuint group, GLuint counter, GLenum pname, GLvoid *data)
GL_ENTRY(void, glGetPerfMonitorCounterStringAMD, GLuint group, GLuint counter, GLsizei bufSize, GLsizei *length, GLchar *counterString)
@@ -180,7 +195,11 @@ GL_ENTRY(void, glGetPerfMonitorGroupsAMD, GLint *numGroups, GLsizei groupsSize,
GL_ENTRY(void, glGetPointerv, GLenum pname, GLvoid **params)
GL_ENTRY(void, glGetProgramBinaryOES, GLuint program, GLsizei bufSize, GLsizei *length, GLenum *binaryFormat, GLvoid *binary)
GL_ENTRY(void, glGetProgramInfoLog, GLuint program, GLsizei bufsize, GLsizei* length, GLchar* infolog)
+GL_ENTRY(void, glGetProgramPipelineInfoLogEXT, GLuint pipeline, GLsizei bufSize, GLsizei *length, GLchar *infoLog)
+GL_ENTRY(void, glGetProgramPipelineivEXT, GLuint pipeline, GLenum pname, GLint *params)
GL_ENTRY(void, glGetProgramiv, GLuint program, GLenum pname, GLint* params)
+GL_ENTRY(void, glGetQueryObjectuivEXT, GLuint id, GLenum pname, GLuint *params)
+GL_ENTRY(void, glGetQueryivEXT, GLenum target, GLenum pname, GLint *params)
GL_ENTRY(void, glGetRenderbufferParameteriv, GLenum target, GLenum pname, GLint* params)
GL_ENTRY(void, glGetRenderbufferParameterivOES, GLenum target, GLenum pname, GLint* params)
GL_ENTRY(void, glGetShaderInfoLog, GLuint shader, GLsizei bufsize, GLsizei* length, GLchar* infolog)
@@ -205,18 +224,24 @@ GL_ENTRY(void, glGetUniformiv, GLuint program, GLint location, GLint* params)
GL_ENTRY(void, glGetVertexAttribPointerv, GLuint index, GLenum pname, GLvoid** pointer)
GL_ENTRY(void, glGetVertexAttribfv, GLuint index, GLenum pname, GLfloat* params)
GL_ENTRY(void, glGetVertexAttribiv, GLuint index, GLenum pname, GLint* params)
+GL_ENTRY(void, glGetnUniformfvEXT, GLuint program, GLint location, GLsizei bufSize, float *params)
+GL_ENTRY(void, glGetnUniformivEXT, GLuint program, GLint location, GLsizei bufSize, GLint *params)
GL_ENTRY(void, glHint, GLenum target, GLenum mode)
+GL_ENTRY(void, glInsertEventMarkerEXT, GLsizei length, const GLchar *marker)
GL_ENTRY(GLboolean, glIsBuffer, GLuint buffer)
GL_ENTRY(GLboolean, glIsEnabled, GLenum cap)
GL_ENTRY(GLboolean, glIsFenceNV, GLuint fence)
GL_ENTRY(GLboolean, glIsFramebuffer, GLuint framebuffer)
GL_ENTRY(GLboolean, glIsFramebufferOES, GLuint framebuffer)
GL_ENTRY(GLboolean, glIsProgram, GLuint program)
+GL_ENTRY(GLboolean, glIsProgramPipelineEXT, GLuint pipeline)
+GL_ENTRY(GLboolean, glIsQueryEXT, GLuint id)
GL_ENTRY(GLboolean, glIsRenderbuffer, GLuint renderbuffer)
GL_ENTRY(GLboolean, glIsRenderbufferOES, GLuint renderbuffer)
GL_ENTRY(GLboolean, glIsShader, GLuint shader)
GL_ENTRY(GLboolean, glIsTexture, GLuint texture)
GL_ENTRY(GLboolean, glIsVertexArrayOES, GLuint array)
+GL_ENTRY(void, glLabelObjectEXT, GLenum type, GLuint object, GLsizei length, const GLchar *label)
GL_ENTRY(void, glLightModelf, GLenum pname, GLfloat param)
GL_ENTRY(void, glLightModelfv, GLenum pname, const GLfloat *params)
GL_ENTRY(void, glLightModelx, GLenum pname, GLfixed param)
@@ -278,15 +303,43 @@ GL_ENTRY(void, glPointSizexOES, GLfixed size)
GL_ENTRY(void, glPolygonOffset, GLfloat factor, GLfloat units)
GL_ENTRY(void, glPolygonOffsetx, GLfixed factor, GLfixed units)
GL_ENTRY(void, glPolygonOffsetxOES, GLfixed factor, GLfixed units)
+GL_ENTRY(void, glPopGroupMarkerEXT, void)
GL_ENTRY(void, glPopMatrix, void)
GL_ENTRY(void, glProgramBinaryOES, GLuint program, GLenum binaryFormat, const GLvoid *binary, GLint length)
+GL_ENTRY(void, glProgramParameteriEXT, GLuint program, GLenum pname, GLint value)
+GL_ENTRY(void, glProgramUniform1fEXT, GLuint program, GLint location, GLfloat x)
+GL_ENTRY(void, glProgramUniform1fvEXT, GLuint program, GLint location, GLsizei count, const GLfloat *value)
+GL_ENTRY(void, glProgramUniform1iEXT, GLuint program, GLint location, GLint x)
+GL_ENTRY(void, glProgramUniform1ivEXT, GLuint program, GLint location, GLsizei count, const GLint *value)
+GL_ENTRY(void, glProgramUniform2fEXT, GLuint program, GLint location, GLfloat x, GLfloat y)
+GL_ENTRY(void, glProgramUniform2fvEXT, GLuint program, GLint location, GLsizei count, const GLfloat *value)
+GL_ENTRY(void, glProgramUniform2iEXT, GLuint program, GLint location, GLint x, GLint y)
+GL_ENTRY(void, glProgramUniform2ivEXT, GLuint program, GLint location, GLsizei count, const GLint *value)
+GL_ENTRY(void, glProgramUniform3fEXT, GLuint program, GLint location, GLfloat x, GLfloat y, GLfloat z)
+GL_ENTRY(void, glProgramUniform3fvEXT, GLuint program, GLint location, GLsizei count, const GLfloat *value)
+GL_ENTRY(void, glProgramUniform3iEXT, GLuint program, GLint location, GLint x, GLint y, GLint z)
+GL_ENTRY(void, glProgramUniform3ivEXT, GLuint program, GLint location, GLsizei count, const GLint *value)
+GL_ENTRY(void, glProgramUniform4fEXT, GLuint program, GLint location, GLfloat x, GLfloat y, GLfloat z, GLfloat w)
+GL_ENTRY(void, glProgramUniform4fvEXT, GLuint program, GLint location, GLsizei count, const GLfloat *value)
+GL_ENTRY(void, glProgramUniform4iEXT, GLuint program, GLint location, GLint x, GLint y, GLint z, GLint w)
+GL_ENTRY(void, glProgramUniform4ivEXT, GLuint program, GLint location, GLsizei count, const GLint *value)
+GL_ENTRY(void, glProgramUniformMatrix2fvEXT, GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value)
+GL_ENTRY(void, glProgramUniformMatrix3fvEXT, GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value)
+GL_ENTRY(void, glProgramUniformMatrix4fvEXT, GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value)
+GL_ENTRY(void, glPushGroupMarkerEXT, GLsizei length, const GLchar *marker)
GL_ENTRY(void, glPushMatrix, void)
GL_ENTRY(GLbitfield, glQueryMatrixxOES, GLfixed mantissa[16], GLint exponent[16])
+GL_ENTRY(void, glReadBufferNV, GLenum mode)
GL_ENTRY(void, glReadPixels, GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, GLvoid *pixels)
+GL_ENTRY(void, glReadnPixelsEXT, GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, GLsizei bufSize, void *data)
GL_ENTRY(void, glReleaseShaderCompiler, void)
GL_ENTRY(void, glRenderbufferStorage, GLenum target, GLenum internalformat, GLsizei width, GLsizei height)
+GL_ENTRY(void, glRenderbufferStorageMultisampleANGLE, GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height)
+GL_ENTRY(void, glRenderbufferStorageMultisampleAPPLE, GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height)
+GL_ENTRY(void, glRenderbufferStorageMultisampleEXT, GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height)
GL_ENTRY(void, glRenderbufferStorageMultisampleIMG, GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height)
GL_ENTRY(void, glRenderbufferStorageOES, GLenum target, GLenum internalformat, GLsizei width, GLsizei height)
+GL_ENTRY(void, glResolveMultisampleFramebufferAPPLE, void)
GL_ENTRY(void, glRotatef, GLfloat angle, GLfloat x, GLfloat y, GLfloat z)
GL_ENTRY(void, glRotatex, GLfixed angle, GLfixed x, GLfixed y, GLfixed z)
GL_ENTRY(void, glRotatexOES, GLfixed angle, GLfixed x, GLfixed y, GLfixed z)
@@ -335,8 +388,14 @@ GL_ENTRY(void, glTexParameterx, GLenum target, GLenum pname, GLfixed param)
GL_ENTRY(void, glTexParameterxOES, GLenum target, GLenum pname, GLfixed param)
GL_ENTRY(void, glTexParameterxv, GLenum target, GLenum pname, const GLfixed *params)
GL_ENTRY(void, glTexParameterxvOES, GLenum target, GLenum pname, const GLfixed *params)
+GL_ENTRY(void, glTexStorage1DEXT, GLenum target, GLsizei levels, GLenum internalformat, GLsizei width)
+GL_ENTRY(void, glTexStorage2DEXT, GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height)
+GL_ENTRY(void, glTexStorage3DEXT, GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth)
GL_ENTRY(void, glTexSubImage2D, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid *pixels)
GL_ENTRY(void, glTexSubImage3DOES, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, const GLvoid* pixels)
+GL_ENTRY(void, glTextureStorage1DEXT, GLuint texture, GLenum target, GLsizei levels, GLenum internalformat, GLsizei width)
+GL_ENTRY(void, glTextureStorage2DEXT, GLuint texture, GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height)
+GL_ENTRY(void, glTextureStorage3DEXT, GLuint texture, GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth)
GL_ENTRY(void, glTranslatef, GLfloat x, GLfloat y, GLfloat z)
GL_ENTRY(void, glTranslatex, GLfixed x, GLfixed y, GLfixed z)
GL_ENTRY(void, glTranslatexOES, GLfixed x, GLfixed y, GLfixed z)
@@ -361,7 +420,9 @@ GL_ENTRY(void, glUniformMatrix3fv, GLint location, GLsizei count, GLboolean tran
GL_ENTRY(void, glUniformMatrix4fv, GLint location, GLsizei count, GLboolean transpose, const GLfloat* value)
GL_ENTRY(GLboolean, glUnmapBufferOES, GLenum target)
GL_ENTRY(void, glUseProgram, GLuint program)
+GL_ENTRY(void, glUseProgramStagesEXT, GLuint pipeline, GLbitfield stages, GLuint program)
GL_ENTRY(void, glValidateProgram, GLuint program)
+GL_ENTRY(void, glValidateProgramPipelineEXT, GLuint pipeline)
GL_ENTRY(void, glVertexAttrib1f, GLuint indx, GLfloat x)
GL_ENTRY(void, glVertexAttrib1fv, GLuint indx, const GLfloat* values)
GL_ENTRY(void, glVertexAttrib2f, GLuint indx, GLfloat x, GLfloat y)
diff --git a/opengl/libs/enums.in b/opengl/libs/enums.in
index f9752c2..bfbc866 100644
--- a/opengl/libs/enums.in
+++ b/opengl/libs/enums.in
@@ -1,4 +1,6 @@
GL_ENUM(0x0000,GL_POINTS)
+GL_ENUM(0x00000001,GL_VERTEX_SHADER_BIT_EXT)
+GL_ENUM(0x00000002,GL_FRAGMENT_SHADER_BIT_EXT)
GL_ENUM(0x0001,GL_LINES)
GL_ENUM(0x0002,GL_LINE_LOOP)
GL_ENUM(0x0003,GL_LINE_STRIP)
@@ -92,6 +94,7 @@ GL_ENUM(0x0BE1,GL_BLEND_SRC)
GL_ENUM(0x0BE2,GL_BLEND)
GL_ENUM(0x0BF0,GL_LOGIC_OP_MODE)
GL_ENUM(0x0BF2,GL_COLOR_LOGIC_OP)
+GL_ENUM(0x0C02,GL_READ_BUFFER_NV)
GL_ENUM(0x0C10,GL_SCISSOR_BOX)
GL_ENUM(0x0C11,GL_SCISSOR_TEST)
GL_ENUM(0x0C22,GL_COLOR_CLEAR_VALUE)
@@ -100,6 +103,9 @@ GL_ENUM(0x0C50,GL_PERSPECTIVE_CORRECTION_HINT)
GL_ENUM(0x0C51,GL_POINT_SMOOTH_HINT)
GL_ENUM(0x0C52,GL_LINE_SMOOTH_HINT)
GL_ENUM(0x0C54,GL_FOG_HINT)
+GL_ENUM(0x0CF2,GL_UNPACK_ROW_LENGTH)
+GL_ENUM(0x0CF3,GL_UNPACK_SKIP_ROWS)
+GL_ENUM(0x0CF4,GL_UNPACK_SKIP_PIXELS)
GL_ENUM(0x0CF5,GL_UNPACK_ALIGNMENT)
GL_ENUM(0x0D05,GL_PACK_ALIGNMENT)
GL_ENUM(0x0D1C,GL_ALPHA_SCALE)
@@ -166,6 +172,7 @@ GL_ENUM(0x1801,GL_DEPTH_EXT)
GL_ENUM(0x1802,GL_STENCIL_EXT)
GL_ENUM(0x1901,GL_STENCIL_INDEX)
GL_ENUM(0x1902,GL_DEPTH_COMPONENT)
+GL_ENUM(0x1903,GL_RED_EXT)
GL_ENUM(0x1906,GL_ALPHA)
GL_ENUM(0x1907,GL_RGB)
GL_ENUM(0x1908,GL_RGBA)
@@ -230,10 +237,15 @@ GL_ENUM(0x8034,GL_UNSIGNED_SHORT_5_5_5_1)
GL_ENUM(0x8037,GL_POLYGON_OFFSET_FILL)
GL_ENUM(0x8038,GL_POLYGON_OFFSET_FACTOR)
GL_ENUM(0x803A,GL_RESCALE_NORMAL)
+GL_ENUM(0x803C,GL_ALPHA8_EXT)
+GL_ENUM(0x8040,GL_LUMINANCE8_EXT)
+GL_ENUM(0x8045,GL_LUMINANCE8_ALPHA8_EXT)
GL_ENUM(0x8051,GL_RGB8_OES)
+GL_ENUM(0x8052,GL_RGB10_EXT)
GL_ENUM(0x8056,GL_RGBA4_OES)
GL_ENUM(0x8057,GL_RGB5_A1_OES)
GL_ENUM(0x8058,GL_RGBA8_OES)
+GL_ENUM(0x8059,GL_RGB10_A2_EXT)
GL_ENUM(0x8069,GL_TEXTURE_BINDING_2D)
GL_ENUM(0x806A,GL_TEXTURE_BINDING_3D_OES)
GL_ENUM(0x806F,GL_TEXTURE_3D_OES)
@@ -276,11 +288,28 @@ GL_ENUM(0x8127,GL_POINT_SIZE_MAX)
GL_ENUM(0x8128,GL_POINT_FADE_THRESHOLD_SIZE)
GL_ENUM(0x8129,GL_POINT_DISTANCE_ATTENUATION)
GL_ENUM(0x812F,GL_CLAMP_TO_EDGE)
+GL_ENUM(0x813D,GL_TEXTURE_MAX_LEVEL_APPLE)
GL_ENUM(0x8191,GL_GENERATE_MIPMAP)
GL_ENUM(0x8192,GL_GENERATE_MIPMAP_HINT)
GL_ENUM(0x81A5,GL_DEPTH_COMPONENT16_OES)
GL_ENUM(0x81A6,GL_DEPTH_COMPONENT24_OES)
GL_ENUM(0x81A7,GL_DEPTH_COMPONENT32_OES)
+GL_ENUM(0x8210,GL_FRAMEBUFFER_ATTACHMENT_COLOR_ENCODING_EXT)
+GL_ENUM(0x8211,GL_FRAMEBUFFER_ATTACHMENT_COMPONENT_TYPE_EXT)
+GL_ENUM(0x8227,GL_RG_EXT)
+GL_ENUM(0x8229,GL_R8_EXT)
+GL_ENUM(0x822B,GL_RG8_EXT)
+GL_ENUM(0x822D,GL_R16F_EXT)
+GL_ENUM(0x822F,GL_RG16F_EXT)
+GL_ENUM(0x8252,GL_LOSE_CONTEXT_ON_RESET_EXT)
+GL_ENUM(0x8253,GL_GUILTY_CONTEXT_RESET_EXT)
+GL_ENUM(0x8254,GL_INNOCENT_CONTEXT_RESET_EXT)
+GL_ENUM(0x8255,GL_UNKNOWN_CONTEXT_RESET_EXT)
+GL_ENUM(0x8256,GL_RESET_NOTIFICATION_STRATEGY_EXT)
+GL_ENUM(0x8258,GL_PROGRAM_SEPARABLE_EXT)
+GL_ENUM(0x8259,GL_ACTIVE_PROGRAM_EXT)
+GL_ENUM(0x825A,GL_PROGRAM_PIPELINE_BINDING_EXT)
+GL_ENUM(0x8261,GL_NO_RESET_NOTIFICATION_EXT)
GL_ENUM(0x8363,GL_UNSIGNED_SHORT_5_6_5)
GL_ENUM(0x8365,GL_UNSIGNED_SHORT_4_4_4_4_REV_EXT)
GL_ENUM(0x8366,GL_UNSIGNED_SHORT_1_5_5_5_REV_EXT)
@@ -372,6 +401,8 @@ GL_ENUM(0x8598,GL_OPERAND0_ALPHA)
GL_ENUM(0x8599,GL_OPERAND1_ALPHA)
GL_ENUM(0x859A,GL_OPERAND2_ALPHA)
GL_ENUM(0x85B5,GL_VERTEX_ARRAY_BINDING_OES)
+GL_ENUM(0x85BA,GL_UNSIGNED_SHORT_8_8_APPLE)
+GL_ENUM(0x85BB,GL_UNSIGNED_SHORT_8_8_REV_APPLE)
GL_ENUM(0x8622,GL_VERTEX_ATTRIB_ARRAY_ENABLED)
GL_ENUM(0x8623,GL_VERTEX_ATTRIB_ARRAY_SIZE)
GL_ENUM(0x8624,GL_VERTEX_ATTRIB_ARRAY_STRIDE)
@@ -401,7 +432,34 @@ GL_ENUM(0x8800,GL_STENCIL_BACK_FUNC)
GL_ENUM(0x8801,GL_STENCIL_BACK_FAIL)
GL_ENUM(0x8802,GL_STENCIL_BACK_PASS_DEPTH_FAIL)
GL_ENUM(0x8803,GL_STENCIL_BACK_PASS_DEPTH_PASS)
+GL_ENUM(0x8814,GL_RGBA32F_EXT)
+GL_ENUM(0x8815,GL_RGB32F_EXT)
+GL_ENUM(0x8816,GL_ALPHA32F_EXT)
+GL_ENUM(0x8818,GL_LUMINANCE32F_EXT)
+GL_ENUM(0x8819,GL_LUMINANCE_ALPHA32F_EXT)
+GL_ENUM(0x881A,GL_RGBA16F_EXT)
+GL_ENUM(0x881B,GL_RGB16F_EXT)
+GL_ENUM(0x881C,GL_ALPHA16F_EXT)
+GL_ENUM(0x881E,GL_LUMINANCE16F_EXT)
+GL_ENUM(0x881F,GL_LUMINANCE_ALPHA16F_EXT)
GL_ENUM(0x8823,GL_WRITEONLY_RENDERING_QCOM)
+GL_ENUM(0x8824,GL_MAX_DRAW_BUFFERS_NV)
+GL_ENUM(0x8825,GL_DRAW_BUFFER0_NV)
+GL_ENUM(0x8826,GL_DRAW_BUFFER1_NV)
+GL_ENUM(0x8827,GL_DRAW_BUFFER2_NV)
+GL_ENUM(0x8828,GL_DRAW_BUFFER3_NV)
+GL_ENUM(0x8829,GL_DRAW_BUFFER4_NV)
+GL_ENUM(0x882A,GL_DRAW_BUFFER5_NV)
+GL_ENUM(0x882B,GL_DRAW_BUFFER6_NV)
+GL_ENUM(0x882C,GL_DRAW_BUFFER7_NV)
+GL_ENUM(0x882D,GL_DRAW_BUFFER8_NV)
+GL_ENUM(0x882E,GL_DRAW_BUFFER9_NV)
+GL_ENUM(0x882F,GL_DRAW_BUFFER10_NV)
+GL_ENUM(0x8830,GL_DRAW_BUFFER11_NV)
+GL_ENUM(0x8831,GL_DRAW_BUFFER12_NV)
+GL_ENUM(0x8832,GL_DRAW_BUFFER13_NV)
+GL_ENUM(0x8833,GL_DRAW_BUFFER14_NV)
+GL_ENUM(0x8834,GL_DRAW_BUFFER15_NV)
GL_ENUM(0x883D,GL_BLEND_EQUATION_ALPHA_OES)
GL_ENUM(0x8840,GL_MATRIX_PALETTE_OES)
GL_ENUM(0x8842,GL_MAX_PALETTE_MATRICES_OES)
@@ -411,8 +469,14 @@ GL_ENUM(0x8846,GL_MATRIX_INDEX_ARRAY_SIZE_OES)
GL_ENUM(0x8847,GL_MATRIX_INDEX_ARRAY_TYPE_OES)
GL_ENUM(0x8848,GL_MATRIX_INDEX_ARRAY_STRIDE_OES)
GL_ENUM(0x8849,GL_MATRIX_INDEX_ARRAY_POINTER_OES)
+GL_ENUM(0x884C,GL_TEXTURE_COMPARE_MODE_EXT)
+GL_ENUM(0x884D,GL_TEXTURE_COMPARE_FUNC_EXT)
+GL_ENUM(0x884E,GL_COMPARE_REF_TO_TEXTURE_EXT)
GL_ENUM(0x8861,GL_POINT_SPRITE_OES)
GL_ENUM(0x8862,GL_COORD_REPLACE_OES)
+GL_ENUM(0x8865,GL_CURRENT_QUERY_EXT)
+GL_ENUM(0x8866,GL_QUERY_RESULT_EXT)
+GL_ENUM(0x8867,GL_QUERY_RESULT_AVAILABLE_EXT)
GL_ENUM(0x8869,GL_MAX_VERTEX_ATTRIBS)
GL_ENUM(0x886A,GL_VERTEX_ATTRIB_ARRAY_NORMALIZED)
GL_ENUM(0x8872,GL_MAX_TEXTURE_IMAGE_UNITS)
@@ -440,8 +504,12 @@ GL_ENUM(0x898C,GL_POINT_SIZE_ARRAY_POINTER_OES)
GL_ENUM(0x898D,GL_MODELVIEW_MATRIX_FLOAT_AS_INT_BITS_OES)
GL_ENUM(0x898E,GL_PROJECTION_MATRIX_FLOAT_AS_INT_BITS_OES)
GL_ENUM(0x898F,GL_TEXTURE_MATRIX_FLOAT_AS_INT_BITS_OES)
+GL_ENUM(0x8A1F,GL_RGB_422_APPLE)
+GL_ENUM(0x8A4F,GL_PROGRAM_PIPELINE_OBJECT_EXT)
GL_ENUM(0x8B30,GL_FRAGMENT_SHADER)
GL_ENUM(0x8B31,GL_VERTEX_SHADER)
+GL_ENUM(0x8B40,GL_PROGRAM_OBJECT_EXT)
+GL_ENUM(0x8B48,GL_SHADER_OBJECT_EXT)
GL_ENUM(0x8B4C,GL_MAX_VERTEX_TEXTURE_IMAGE_UNITS)
GL_ENUM(0x8B4D,GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS)
GL_ENUM(0x8B4F,GL_SHADER_TYPE)
@@ -461,6 +529,7 @@ GL_ENUM(0x8B5C,GL_FLOAT_MAT4)
GL_ENUM(0x8B5E,GL_SAMPLER_2D)
GL_ENUM(0x8B5F,GL_SAMPLER_3D_OES)
GL_ENUM(0x8B60,GL_SAMPLER_CUBE)
+GL_ENUM(0x8B62,GL_SAMPLER_2D_SHADOW_EXT)
GL_ENUM(0x8B80,GL_DELETE_STATUS)
GL_ENUM(0x8B81,GL_COMPILE_STATUS)
GL_ENUM(0x8B82,GL_LINK_STATUS)
@@ -520,6 +589,11 @@ GL_ENUM(0x8C07,GL_FACTOR_ALPHA_MODULATE_IMG)
GL_ENUM(0x8C08,GL_FRAGMENT_ALPHA_MODULATE_IMG)
GL_ENUM(0x8C09,GL_ADD_BLEND_IMG)
GL_ENUM(0x8C0A,GL_SGX_BINARY_IMG)
+GL_ENUM(0x8C17,GL_UNSIGNED_NORMALIZED_EXT)
+GL_ENUM(0x8C2F,GL_ANY_SAMPLES_PASSED_EXT)
+GL_ENUM(0x8C40,GL_SRGB_EXT)
+GL_ENUM(0x8C42,GL_SRGB_ALPHA_EXT)
+GL_ENUM(0x8C43,GL_SRGB8_ALPHA8_EXT)
GL_ENUM(0x8C92,GL_ATC_RGB_AMD)
GL_ENUM(0x8C93,GL_ATC_RGBA_EXPLICIT_ALPHA_AMD)
GL_ENUM(0x8CA3,GL_STENCIL_BACK_REF)
@@ -527,6 +601,10 @@ GL_ENUM(0x8CA4,GL_STENCIL_BACK_VALUE_MASK)
GL_ENUM(0x8CA5,GL_STENCIL_BACK_WRITEMASK)
GL_ENUM(0x8CA6,GL_FRAMEBUFFER_BINDING_OES)
GL_ENUM(0x8CA7,GL_RENDERBUFFER_BINDING_OES)
+GL_ENUM(0x8CA8,GL_READ_FRAMEBUFFER_APPLE)
+GL_ENUM(0x8CA9,GL_DRAW_FRAMEBUFFER_APPLE)
+GL_ENUM(0x8CAA,GL_READ_FRAMEBUFFER_BINDING_APPLE)
+GL_ENUM(0x8CAB,GL_RENDERBUFFER_SAMPLES_APPLE)
GL_ENUM(0x8CD0,GL_FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE_OES)
GL_ENUM(0x8CD1,GL_FRAMEBUFFER_ATTACHMENT_OBJECT_NAME_OES)
GL_ENUM(0x8CD2,GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL_OES)
@@ -538,7 +616,23 @@ GL_ENUM(0x8CD7,GL_FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT_OES)
GL_ENUM(0x8CD9,GL_FRAMEBUFFER_INCOMPLETE_DIMENSIONS_OES)
GL_ENUM(0x8CDA,GL_FRAMEBUFFER_INCOMPLETE_FORMATS_OES)
GL_ENUM(0x8CDD,GL_FRAMEBUFFER_UNSUPPORTED_OES)
+GL_ENUM(0x8CDF,GL_MAX_COLOR_ATTACHMENTS_NV)
GL_ENUM(0x8CE0,GL_COLOR_ATTACHMENT0_OES)
+GL_ENUM(0x8CE1,GL_COLOR_ATTACHMENT1_NV)
+GL_ENUM(0x8CE2,GL_COLOR_ATTACHMENT2_NV)
+GL_ENUM(0x8CE3,GL_COLOR_ATTACHMENT3_NV)
+GL_ENUM(0x8CE4,GL_COLOR_ATTACHMENT4_NV)
+GL_ENUM(0x8CE5,GL_COLOR_ATTACHMENT5_NV)
+GL_ENUM(0x8CE6,GL_COLOR_ATTACHMENT6_NV)
+GL_ENUM(0x8CE7,GL_COLOR_ATTACHMENT7_NV)
+GL_ENUM(0x8CE8,GL_COLOR_ATTACHMENT8_NV)
+GL_ENUM(0x8CE9,GL_COLOR_ATTACHMENT9_NV)
+GL_ENUM(0x8CEA,GL_COLOR_ATTACHMENT10_NV)
+GL_ENUM(0x8CEB,GL_COLOR_ATTACHMENT11_NV)
+GL_ENUM(0x8CEC,GL_COLOR_ATTACHMENT12_NV)
+GL_ENUM(0x8CED,GL_COLOR_ATTACHMENT13_NV)
+GL_ENUM(0x8CEE,GL_COLOR_ATTACHMENT14_NV)
+GL_ENUM(0x8CEF,GL_COLOR_ATTACHMENT15_NV)
GL_ENUM(0x8D00,GL_DEPTH_ATTACHMENT_OES)
GL_ENUM(0x8D20,GL_STENCIL_ATTACHMENT_OES)
GL_ENUM(0x8D40,GL_FRAMEBUFFER_OES)
@@ -555,6 +649,8 @@ GL_ENUM(0x8D52,GL_RENDERBUFFER_BLUE_SIZE_OES)
GL_ENUM(0x8D53,GL_RENDERBUFFER_ALPHA_SIZE_OES)
GL_ENUM(0x8D54,GL_RENDERBUFFER_DEPTH_SIZE_OES)
GL_ENUM(0x8D55,GL_RENDERBUFFER_STENCIL_SIZE_OES)
+GL_ENUM(0x8D56,GL_FRAMEBUFFER_INCOMPLETE_MULTISAMPLE_APPLE)
+GL_ENUM(0x8D57,GL_MAX_SAMPLES_APPLE)
GL_ENUM(0x8D60,GL_TEXTURE_GEN_STR_OES)
GL_ENUM(0x8D61,GL_HALF_FLOAT_OES)
GL_ENUM(0x8D62,GL_RGB565_OES)
@@ -563,6 +659,8 @@ GL_ENUM(0x8D65,GL_TEXTURE_EXTERNAL_OES)
GL_ENUM(0x8D66,GL_SAMPLER_EXTERNAL_OES)
GL_ENUM(0x8D67,GL_TEXTURE_BINDING_EXTERNAL_OES)
GL_ENUM(0x8D68,GL_REQUIRED_TEXTURE_IMAGE_UNITS_OES)
+GL_ENUM(0x8D6A,GL_ANY_SAMPLES_PASSED_CONSERVATIVE_EXT)
+GL_ENUM(0x8D6C,GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_SAMPLES_EXT)
GL_ENUM(0x8DF0,GL_LOW_FLOAT)
GL_ENUM(0x8DF1,GL_MEDIUM_FLOAT)
GL_ENUM(0x8DF2,GL_HIGH_FLOAT)
@@ -586,9 +684,19 @@ GL_ENUM(0x8ED4,GL_COVERAGE_SAMPLES_NV)
GL_ENUM(0x8ED5,GL_COVERAGE_ALL_FRAGMENTS_NV)
GL_ENUM(0x8ED6,GL_COVERAGE_EDGE_FRAGMENTS_NV)
GL_ENUM(0x8ED7,GL_COVERAGE_AUTOMATIC_NV)
+GL_ENUM(0x8F60,GL_MALI_SHADER_BINARY_ARM)
GL_ENUM(0x8FA0,GL_PERFMON_GLOBAL_MODE_QCOM)
+GL_ENUM(0x8FC4,GL_SHADER_BINARY_VIV)
+GL_ENUM(0x90F3,GL_CONTEXT_ROBUST_ACCESS_EXT)
+GL_ENUM(0x912F,GL_TEXTURE_IMMUTABLE_FORMAT_EXT)
GL_ENUM(0x9130,GL_SGX_PROGRAM_BINARY_IMG)
-GL_ENUM(0x9133,GL_RENDERBUFFER_SAMPLES_IMG)
-GL_ENUM(0x9134,GL_FRAMEBUFFER_INCOMPLETE_MULTISAMPLE_IMG)
-GL_ENUM(0x9135,GL_MAX_SAMPLES_IMG)
+GL_ENUM(0x9133,GL_RENDERBUFFER_SAMPLES_EXT)
+GL_ENUM(0x9134,GL_FRAMEBUFFER_INCOMPLETE_MULTISAMPLE_EXT)
+GL_ENUM(0x9135,GL_MAX_SAMPLES_EXT)
GL_ENUM(0x9136,GL_TEXTURE_SAMPLES_IMG)
+GL_ENUM(0x9151,GL_BUFFER_OBJECT_EXT)
+GL_ENUM(0x9153,GL_QUERY_OBJECT_EXT)
+GL_ENUM(0x9154,GL_VERTEX_ARRAY_OBJECT_EXT)
+GL_ENUM(0x9250,GL_SHADER_BINARY_DMP)
+GL_ENUM(0x93A1,GL_BGRA8_EXT)
+GL_ENUM(0xFFFFFFFF,GL_ALL_SHADER_BITS_EXT)
diff --git a/opengl/libs/hooks.h b/opengl/libs/hooks.h
index 7ac88cd..8b1b389 100644
--- a/opengl/libs/hooks.h
+++ b/opengl/libs/hooks.h
@@ -37,7 +37,12 @@
#endif
#undef NELEM
#define NELEM(x) (sizeof(x)/sizeof(*(x)))
-#define MAX_NUMBER_OF_GL_EXTENSIONS 64
+
+// maximum number of GL extensions that can be used simultaneously in
+// a given process. this limitation exists because we need to have
+// a static function for each extension and currently these static functions
+// are generated at compile time.
+#define MAX_NUMBER_OF_GL_EXTENSIONS 256
#if defined(HAVE_ANDROID_OS) && !USE_SLOW_BINDING && __OPTIMIZE__
diff --git a/opengl/libs/tools/glapigen b/opengl/libs/tools/glapigen
index bd8dda3..9be40cf 100755
--- a/opengl/libs/tools/glapigen
+++ b/opengl/libs/tools/glapigen
@@ -43,6 +43,9 @@ while (my $line = <>) {
if ($name eq "glEGLImageTargetRenderbufferStorageOES") {
$prefix = "__";
}
+ if ($name eq "glGetString") {
+ $prefix = "__";
+ }
printf("%s API_ENTRY(%s%s)(%s)", $type, $prefix, $name, $args);
diff --git a/opengl/libs/trace.in b/opengl/libs/trace.in
index 3d492af..a5c5c84 100644
--- a/opengl/libs/trace.in
+++ b/opengl/libs/trace.in
@@ -1,13 +1,17 @@
+TRACE_GL_VOID(glActiveShaderProgramEXT, (GLuint pipeline, GLuint program), (pipeline, program), 2, "GLuint", pipeline, "GLuint", program)
TRACE_GL_VOID(glActiveTexture, (GLenum texture), (texture), 1, "GLenum", texture)
TRACE_GL_VOID(glAlphaFunc, (GLenum func, GLclampf ref), (func, ref), 2, "GLenum", func, "GLclampf", ref)
+TRACE_GL_VOID(glAlphaFuncQCOM, (GLenum func, GLclampf ref), (func, ref), 2, "GLenum", func, "GLclampf", ref)
TRACE_GL_VOID(glAlphaFuncx, (GLenum func, GLclampx ref), (func, ref), 2, "GLenum", func, "GLclampx", ref)
TRACE_GL_VOID(glAlphaFuncxOES, (GLenum func, GLclampx ref), (func, ref), 2, "GLenum", func, "GLclampx", ref)
TRACE_GL_VOID(glAttachShader, (GLuint program, GLuint shader), (program, shader), 2, "GLuint", program, "GLuint", shader)
TRACE_GL_VOID(glBeginPerfMonitorAMD, (GLuint monitor), (monitor), 1, "GLuint", monitor)
+TRACE_GL_VOID(glBeginQueryEXT, (GLenum target, GLuint id), (target, id), 2, "GLenum", target, "GLuint", id)
TRACE_GL_VOID(glBindAttribLocation, (GLuint program, GLuint index, const GLchar* name), (program, index, name), 3, "GLuint", program, "GLuint", index, "const GLchar*", name)
TRACE_GL_VOID(glBindBuffer, (GLenum target, GLuint buffer), (target, buffer), 2, "GLenum", target, "GLuint", buffer)
TRACE_GL_VOID(glBindFramebuffer, (GLenum target, GLuint framebuffer), (target, framebuffer), 2, "GLenum", target, "GLuint", framebuffer)
TRACE_GL_VOID(glBindFramebufferOES, (GLenum target, GLuint framebuffer), (target, framebuffer), 2, "GLenum", target, "GLuint", framebuffer)
+TRACE_GL_VOID(glBindProgramPipelineEXT, (GLuint pipeline), (pipeline), 1, "GLuint", pipeline)
TRACE_GL_VOID(glBindRenderbuffer, (GLenum target, GLuint renderbuffer), (target, renderbuffer), 2, "GLenum", target, "GLuint", renderbuffer)
TRACE_GL_VOID(glBindRenderbufferOES, (GLenum target, GLuint renderbuffer), (target, renderbuffer), 2, "GLenum", target, "GLuint", renderbuffer)
TRACE_GL_VOID(glBindTexture, (GLenum target, GLuint texture), (target, texture), 2, "GLenum", target, "GLuint", texture)
@@ -20,6 +24,7 @@ TRACE_GL_VOID(glBlendEquationSeparateOES, (GLenum modeRGB, GLenum modeAlpha), (m
TRACE_GL_VOID(glBlendFunc, (GLenum sfactor, GLenum dfactor), (sfactor, dfactor), 2, "GLenum", sfactor, "GLenum", dfactor)
TRACE_GL_VOID(glBlendFuncSeparate, (GLenum srcRGB, GLenum dstRGB, GLenum srcAlpha, GLenum dstAlpha), (srcRGB, dstRGB, srcAlpha, dstAlpha), 4, "GLenum", srcRGB, "GLenum", dstRGB, "GLenum", srcAlpha, "GLenum", dstAlpha)
TRACE_GL_VOID(glBlendFuncSeparateOES, (GLenum srcRGB, GLenum dstRGB, GLenum srcAlpha, GLenum dstAlpha), (srcRGB, dstRGB, srcAlpha, dstAlpha), 4, "GLenum", srcRGB, "GLenum", dstRGB, "GLenum", srcAlpha, "GLenum", dstAlpha)
+TRACE_GL_VOID(glBlitFramebufferANGLE, (GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1, GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1, GLbitfield mask, GLenum filter), (srcX0, srcY0, srcX1, srcY1, dstX0, dstY0, dstX1, dstY1, mask, filter), 10, "GLint", srcX0, "GLint", srcY0, "GLint", srcX1, "GLint", srcY1, "GLint", dstX0, "GLint", dstY0, "GLint", dstX1, "GLint", dstY1, "GLbitfield", mask, "GLenum", filter)
TRACE_GL_VOID(glBufferData, (GLenum target, GLsizeiptr size, const GLvoid *data, GLenum usage), (target, size, data, usage), 4, "GLenum", target, "GLsizeiptr", size, "const GLvoid *", data, "GLenum", usage)
TRACE_GL_VOID(glBufferSubData, (GLenum target, GLintptr offset, GLsizeiptr size, const GLvoid *data), (target, offset, size, data), 4, "GLenum", target, "GLintptr", offset, "GLsizeiptr", size, "const GLvoid *", data)
TRACE_GL(GLenum, glCheckFramebufferStatus, (GLenum target), (target), 1, "GLenum", target)
@@ -58,6 +63,7 @@ TRACE_GL_VOID(glCoverageMaskNV, (GLboolean mask), (mask), 1, "GLboolean", mask)
TRACE_GL_VOID(glCoverageOperationNV, (GLenum operation), (operation), 1, "GLenum", operation)
TRACE_GL(GLuint, glCreateProgram, (void), (), 0)
TRACE_GL(GLuint, glCreateShader, (GLenum type), (type), 1, "GLenum", type)
+TRACE_GL(GLuint, glCreateShaderProgramvEXT, (GLenum type, GLsizei count, const GLchar **strings), (type, count, strings), 3, "GLenum", type, "GLsizei", count, "const GLchar **", strings)
TRACE_GL_VOID(glCullFace, (GLenum mode), (mode), 1, "GLenum", mode)
TRACE_GL_VOID(glCurrentPaletteMatrixOES, (GLuint matrixpaletteindex), (matrixpaletteindex), 1, "GLuint", matrixpaletteindex)
TRACE_GL_VOID(glDeleteBuffers, (GLsizei n, const GLuint *buffers), (n, buffers), 2, "GLsizei", n, "const GLuint *", buffers)
@@ -66,6 +72,8 @@ TRACE_GL_VOID(glDeleteFramebuffers, (GLsizei n, const GLuint* framebuffers), (n,
TRACE_GL_VOID(glDeleteFramebuffersOES, (GLsizei n, const GLuint* framebuffers), (n, framebuffers), 2, "GLsizei", n, "const GLuint*", framebuffers)
TRACE_GL_VOID(glDeletePerfMonitorsAMD, (GLsizei n, GLuint *monitors), (n, monitors), 2, "GLsizei", n, "GLuint *", monitors)
TRACE_GL_VOID(glDeleteProgram, (GLuint program), (program), 1, "GLuint", program)
+TRACE_GL_VOID(glDeleteProgramPipelinesEXT, (GLsizei n, const GLuint *pipelines), (n, pipelines), 2, "GLsizei", n, "const GLuint *", pipelines)
+TRACE_GL_VOID(glDeleteQueriesEXT, (GLsizei n, const GLuint *ids), (n, ids), 2, "GLsizei", n, "const GLuint *", ids)
TRACE_GL_VOID(glDeleteRenderbuffers, (GLsizei n, const GLuint* renderbuffers), (n, renderbuffers), 2, "GLsizei", n, "const GLuint*", renderbuffers)
TRACE_GL_VOID(glDeleteRenderbuffersOES, (GLsizei n, const GLuint* renderbuffers), (n, renderbuffers), 2, "GLsizei", n, "const GLuint*", renderbuffers)
TRACE_GL_VOID(glDeleteShader, (GLuint shader), (shader), 1, "GLuint", shader)
@@ -84,6 +92,7 @@ TRACE_GL_VOID(glDisableDriverControlQCOM, (GLuint driverControl), (driverControl
TRACE_GL_VOID(glDisableVertexAttribArray, (GLuint index), (index), 1, "GLuint", index)
TRACE_GL_VOID(glDiscardFramebufferEXT, (GLenum target, GLsizei numAttachments, const GLenum *attachments), (target, numAttachments, attachments), 3, "GLenum", target, "GLsizei", numAttachments, "const GLenum *", attachments)
TRACE_GL_VOID(glDrawArrays, (GLenum mode, GLint first, GLsizei count), (mode, first, count), 3, "GLenum", mode, "GLint", first, "GLsizei", count)
+TRACE_GL_VOID(glDrawBuffersNV, (GLsizei n, const GLenum *bufs), (n, bufs), 2, "GLsizei", n, "const GLenum *", bufs)
TRACE_GL_VOID(glDrawElements, (GLenum mode, GLsizei count, GLenum type, const GLvoid *indices), (mode, count, type, indices), 4, "GLenum", mode, "GLsizei", count, "GLenum", type, "const GLvoid *", indices)
TRACE_GL_VOID(glDrawTexfOES, (GLfloat x, GLfloat y, GLfloat z, GLfloat width, GLfloat height), (x, y, z, width, height), 5, "GLfloat", x, "GLfloat", y, "GLfloat", z, "GLfloat", width, "GLfloat", height)
TRACE_GL_VOID(glDrawTexfvOES, (const GLfloat *coords), (coords), 1, "const GLfloat *", coords)
@@ -100,6 +109,7 @@ TRACE_GL_VOID(glEnableClientState, (GLenum array), (array), 1, "GLenum", array)
TRACE_GL_VOID(glEnableDriverControlQCOM, (GLuint driverControl), (driverControl), 1, "GLuint", driverControl)
TRACE_GL_VOID(glEnableVertexAttribArray, (GLuint index), (index), 1, "GLuint", index)
TRACE_GL_VOID(glEndPerfMonitorAMD, (GLuint monitor), (monitor), 1, "GLuint", monitor)
+TRACE_GL_VOID(glEndQueryEXT, (GLenum target), (target), 1, "GLenum", target)
TRACE_GL_VOID(glEndTilingQCOM, (GLbitfield preserveMask), (preserveMask), 1, "GLbitfield", preserveMask)
TRACE_GL_VOID(glExtGetBufferPointervQCOM, (GLenum target, GLvoid **params), (target, params), 2, "GLenum", target, "GLvoid **", params)
TRACE_GL_VOID(glExtGetBuffersQCOM, (GLuint *buffers, GLint maxBuffers, GLint *numBuffers), (buffers, maxBuffers, numBuffers), 3, "GLuint *", buffers, "GLint", maxBuffers, "GLint *", numBuffers)
@@ -125,6 +135,7 @@ TRACE_GL_VOID(glFogxvOES, (GLenum pname, const GLfixed *params), (pname, params)
TRACE_GL_VOID(glFramebufferRenderbuffer, (GLenum target, GLenum attachment, GLenum renderbuffertarget, GLuint renderbuffer), (target, attachment, renderbuffertarget, renderbuffer), 4, "GLenum", target, "GLenum", attachment, "GLenum", renderbuffertarget, "GLuint", renderbuffer)
TRACE_GL_VOID(glFramebufferRenderbufferOES, (GLenum target, GLenum attachment, GLenum renderbuffertarget, GLuint renderbuffer), (target, attachment, renderbuffertarget, renderbuffer), 4, "GLenum", target, "GLenum", attachment, "GLenum", renderbuffertarget, "GLuint", renderbuffer)
TRACE_GL_VOID(glFramebufferTexture2D, (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level), (target, attachment, textarget, texture, level), 5, "GLenum", target, "GLenum", attachment, "GLenum", textarget, "GLuint", texture, "GLint", level)
+TRACE_GL_VOID(glFramebufferTexture2DMultisampleEXT, (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level, GLsizei samples), (target, attachment, textarget, texture, level, samples), 6, "GLenum", target, "GLenum", attachment, "GLenum", textarget, "GLuint", texture, "GLint", level, "GLsizei", samples)
TRACE_GL_VOID(glFramebufferTexture2DMultisampleIMG, (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level, GLsizei samples), (target, attachment, textarget, texture, level, samples), 6, "GLenum", target, "GLenum", attachment, "GLenum", textarget, "GLuint", texture, "GLint", level, "GLsizei", samples)
TRACE_GL_VOID(glFramebufferTexture2DOES, (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level), (target, attachment, textarget, texture, level), 5, "GLenum", target, "GLenum", attachment, "GLenum", textarget, "GLuint", texture, "GLint", level)
TRACE_GL_VOID(glFramebufferTexture3DOES, (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level, GLint zoffset), (target, attachment, textarget, texture, level, zoffset), 6, "GLenum", target, "GLenum", attachment, "GLenum", textarget, "GLuint", texture, "GLint", level, "GLint", zoffset)
@@ -138,6 +149,8 @@ TRACE_GL_VOID(glGenFencesNV, (GLsizei n, GLuint *fences), (n, fences), 2, "GLsiz
TRACE_GL_VOID(glGenFramebuffers, (GLsizei n, GLuint* framebuffers), (n, framebuffers), 2, "GLsizei", n, "GLuint*", framebuffers)
TRACE_GL_VOID(glGenFramebuffersOES, (GLsizei n, GLuint* framebuffers), (n, framebuffers), 2, "GLsizei", n, "GLuint*", framebuffers)
TRACE_GL_VOID(glGenPerfMonitorsAMD, (GLsizei n, GLuint *monitors), (n, monitors), 2, "GLsizei", n, "GLuint *", monitors)
+TRACE_GL_VOID(glGenProgramPipelinesEXT, (GLsizei n, GLuint *pipelines), (n, pipelines), 2, "GLsizei", n, "GLuint *", pipelines)
+TRACE_GL_VOID(glGenQueriesEXT, (GLsizei n, GLuint *ids), (n, ids), 2, "GLsizei", n, "GLuint *", ids)
TRACE_GL_VOID(glGenRenderbuffers, (GLsizei n, GLuint* renderbuffers), (n, renderbuffers), 2, "GLsizei", n, "GLuint*", renderbuffers)
TRACE_GL_VOID(glGenRenderbuffersOES, (GLsizei n, GLuint* renderbuffers), (n, renderbuffers), 2, "GLsizei", n, "GLuint*", renderbuffers)
TRACE_GL_VOID(glGenTextures, (GLsizei n, GLuint *textures), (n, textures), 2, "GLsizei", n, "GLuint *", textures)
@@ -164,6 +177,7 @@ TRACE_GL_VOID(glGetFixedvOES, (GLenum pname, GLfixed *params), (pname, params),
TRACE_GL_VOID(glGetFloatv, (GLenum pname, GLfloat *params), (pname, params), 2, "GLenum", pname, "GLfloat *", params)
TRACE_GL_VOID(glGetFramebufferAttachmentParameteriv, (GLenum target, GLenum attachment, GLenum pname, GLint* params), (target, attachment, pname, params), 4, "GLenum", target, "GLenum", attachment, "GLenum", pname, "GLint*", params)
TRACE_GL_VOID(glGetFramebufferAttachmentParameterivOES, (GLenum target, GLenum attachment, GLenum pname, GLint* params), (target, attachment, pname, params), 4, "GLenum", target, "GLenum", attachment, "GLenum", pname, "GLint*", params)
+TRACE_GL(GLenum, glGetGraphicsResetStatusEXT, (void), (), 0)
TRACE_GL_VOID(glGetIntegerv, (GLenum pname, GLint *params), (pname, params), 2, "GLenum", pname, "GLint *", params)
TRACE_GL_VOID(glGetLightfv, (GLenum light, GLenum pname, GLfloat *params), (light, pname, params), 3, "GLenum", light, "GLenum", pname, "GLfloat *", params)
TRACE_GL_VOID(glGetLightxv, (GLenum light, GLenum pname, GLfixed *params), (light, pname, params), 3, "GLenum", light, "GLenum", pname, "GLfixed *", params)
@@ -171,6 +185,7 @@ TRACE_GL_VOID(glGetLightxvOES, (GLenum light, GLenum pname, GLfixed *params), (l
TRACE_GL_VOID(glGetMaterialfv, (GLenum face, GLenum pname, GLfloat *params), (face, pname, params), 3, "GLenum", face, "GLenum", pname, "GLfloat *", params)
TRACE_GL_VOID(glGetMaterialxv, (GLenum face, GLenum pname, GLfixed *params), (face, pname, params), 3, "GLenum", face, "GLenum", pname, "GLfixed *", params)
TRACE_GL_VOID(glGetMaterialxvOES, (GLenum face, GLenum pname, GLfixed *params), (face, pname, params), 3, "GLenum", face, "GLenum", pname, "GLfixed *", params)
+TRACE_GL_VOID(glGetObjectLabelEXT, (GLenum type, GLuint object, GLsizei bufSize, GLsizei *length, GLchar *label), (type, object, bufSize, length, label), 5, "GLenum", type, "GLuint", object, "GLsizei", bufSize, "GLsizei *", length, "GLchar *", label)
TRACE_GL_VOID(glGetPerfMonitorCounterDataAMD, (GLuint monitor, GLenum pname, GLsizei dataSize, GLuint *data, GLint *bytesWritten), (monitor, pname, dataSize, data, bytesWritten), 5, "GLuint", monitor, "GLenum", pname, "GLsizei", dataSize, "GLuint *", data, "GLint *", bytesWritten)
TRACE_GL_VOID(glGetPerfMonitorCounterInfoAMD, (GLuint group, GLuint counter, GLenum pname, GLvoid *data), (group, counter, pname, data), 4, "GLuint", group, "GLuint", counter, "GLenum", pname, "GLvoid *", data)
TRACE_GL_VOID(glGetPerfMonitorCounterStringAMD, (GLuint group, GLuint counter, GLsizei bufSize, GLsizei *length, GLchar *counterString), (group, counter, bufSize, length, counterString), 5, "GLuint", group, "GLuint", counter, "GLsizei", bufSize, "GLsizei *", length, "GLchar *", counterString)
@@ -180,7 +195,11 @@ TRACE_GL_VOID(glGetPerfMonitorGroupsAMD, (GLint *numGroups, GLsizei groupsSize,
TRACE_GL_VOID(glGetPointerv, (GLenum pname, GLvoid **params), (pname, params), 2, "GLenum", pname, "GLvoid **", params)
TRACE_GL_VOID(glGetProgramBinaryOES, (GLuint program, GLsizei bufSize, GLsizei *length, GLenum *binaryFormat, GLvoid *binary), (program, bufSize, length, binaryFormat, binary), 5, "GLuint", program, "GLsizei", bufSize, "GLsizei *", length, "GLenum *", binaryFormat, "GLvoid *", binary)
TRACE_GL_VOID(glGetProgramInfoLog, (GLuint program, GLsizei bufsize, GLsizei* length, GLchar* infolog), (program, bufsize, length, infolog), 4, "GLuint", program, "GLsizei", bufsize, "GLsizei*", length, "GLchar*", infolog)
+TRACE_GL_VOID(glGetProgramPipelineInfoLogEXT, (GLuint pipeline, GLsizei bufSize, GLsizei *length, GLchar *infoLog), (pipeline, bufSize, length, infoLog), 4, "GLuint", pipeline, "GLsizei", bufSize, "GLsizei *", length, "GLchar *", infoLog)
+TRACE_GL_VOID(glGetProgramPipelineivEXT, (GLuint pipeline, GLenum pname, GLint *params), (pipeline, pname, params), 3, "GLuint", pipeline, "GLenum", pname, "GLint *", params)
TRACE_GL_VOID(glGetProgramiv, (GLuint program, GLenum pname, GLint* params), (program, pname, params), 3, "GLuint", program, "GLenum", pname, "GLint*", params)
+TRACE_GL_VOID(glGetQueryObjectuivEXT, (GLuint id, GLenum pname, GLuint *params), (id, pname, params), 3, "GLuint", id, "GLenum", pname, "GLuint *", params)
+TRACE_GL_VOID(glGetQueryivEXT, (GLenum target, GLenum pname, GLint *params), (target, pname, params), 3, "GLenum", target, "GLenum", pname, "GLint *", params)
TRACE_GL_VOID(glGetRenderbufferParameteriv, (GLenum target, GLenum pname, GLint* params), (target, pname, params), 3, "GLenum", target, "GLenum", pname, "GLint*", params)
TRACE_GL_VOID(glGetRenderbufferParameterivOES, (GLenum target, GLenum pname, GLint* params), (target, pname, params), 3, "GLenum", target, "GLenum", pname, "GLint*", params)
TRACE_GL_VOID(glGetShaderInfoLog, (GLuint shader, GLsizei bufsize, GLsizei* length, GLchar* infolog), (shader, bufsize, length, infolog), 4, "GLuint", shader, "GLsizei", bufsize, "GLsizei*", length, "GLchar*", infolog)
@@ -205,18 +224,24 @@ TRACE_GL_VOID(glGetUniformiv, (GLuint program, GLint location, GLint* params), (
TRACE_GL_VOID(glGetVertexAttribPointerv, (GLuint index, GLenum pname, GLvoid** pointer), (index, pname, pointer), 3, "GLuint", index, "GLenum", pname, "GLvoid**", pointer)
TRACE_GL_VOID(glGetVertexAttribfv, (GLuint index, GLenum pname, GLfloat* params), (index, pname, params), 3, "GLuint", index, "GLenum", pname, "GLfloat*", params)
TRACE_GL_VOID(glGetVertexAttribiv, (GLuint index, GLenum pname, GLint* params), (index, pname, params), 3, "GLuint", index, "GLenum", pname, "GLint*", params)
+TRACE_GL_VOID(glGetnUniformfvEXT, (GLuint program, GLint location, GLsizei bufSize, float *params), (program, location, bufSize, params), 4, "GLuint", program, "GLint", location, "GLsizei", bufSize, "float *", params)
+TRACE_GL_VOID(glGetnUniformivEXT, (GLuint program, GLint location, GLsizei bufSize, GLint *params), (program, location, bufSize, params), 4, "GLuint", program, "GLint", location, "GLsizei", bufSize, "GLint *", params)
TRACE_GL_VOID(glHint, (GLenum target, GLenum mode), (target, mode), 2, "GLenum", target, "GLenum", mode)
+TRACE_GL_VOID(glInsertEventMarkerEXT, (GLsizei length, const GLchar *marker), (length, marker), 2, "GLsizei", length, "const GLchar *", marker)
TRACE_GL(GLboolean, glIsBuffer, (GLuint buffer), (buffer), 1, "GLuint", buffer)
TRACE_GL(GLboolean, glIsEnabled, (GLenum cap), (cap), 1, "GLenum", cap)
TRACE_GL(GLboolean, glIsFenceNV, (GLuint fence), (fence), 1, "GLuint", fence)
TRACE_GL(GLboolean, glIsFramebuffer, (GLuint framebuffer), (framebuffer), 1, "GLuint", framebuffer)
TRACE_GL(GLboolean, glIsFramebufferOES, (GLuint framebuffer), (framebuffer), 1, "GLuint", framebuffer)
TRACE_GL(GLboolean, glIsProgram, (GLuint program), (program), 1, "GLuint", program)
+TRACE_GL(GLboolean, glIsProgramPipelineEXT, (GLuint pipeline), (pipeline), 1, "GLuint", pipeline)
+TRACE_GL(GLboolean, glIsQueryEXT, (GLuint id), (id), 1, "GLuint", id)
TRACE_GL(GLboolean, glIsRenderbuffer, (GLuint renderbuffer), (renderbuffer), 1, "GLuint", renderbuffer)
TRACE_GL(GLboolean, glIsRenderbufferOES, (GLuint renderbuffer), (renderbuffer), 1, "GLuint", renderbuffer)
TRACE_GL(GLboolean, glIsShader, (GLuint shader), (shader), 1, "GLuint", shader)
TRACE_GL(GLboolean, glIsTexture, (GLuint texture), (texture), 1, "GLuint", texture)
TRACE_GL(GLboolean, glIsVertexArrayOES, (GLuint array), (array), 1, "GLuint", array)
+TRACE_GL_VOID(glLabelObjectEXT, (GLenum type, GLuint object, GLsizei length, const GLchar *label), (type, object, length, label), 4, "GLenum", type, "GLuint", object, "GLsizei", length, "const GLchar *", label)
TRACE_GL_VOID(glLightModelf, (GLenum pname, GLfloat param), (pname, param), 2, "GLenum", pname, "GLfloat", param)
TRACE_GL_VOID(glLightModelfv, (GLenum pname, const GLfloat *params), (pname, params), 2, "GLenum", pname, "const GLfloat *", params)
TRACE_GL_VOID(glLightModelx, (GLenum pname, GLfixed param), (pname, param), 2, "GLenum", pname, "GLfixed", param)
@@ -278,15 +303,43 @@ TRACE_GL_VOID(glPointSizexOES, (GLfixed size), (size), 1, "GLfixed", size)
TRACE_GL_VOID(glPolygonOffset, (GLfloat factor, GLfloat units), (factor, units), 2, "GLfloat", factor, "GLfloat", units)
TRACE_GL_VOID(glPolygonOffsetx, (GLfixed factor, GLfixed units), (factor, units), 2, "GLfixed", factor, "GLfixed", units)
TRACE_GL_VOID(glPolygonOffsetxOES, (GLfixed factor, GLfixed units), (factor, units), 2, "GLfixed", factor, "GLfixed", units)
+TRACE_GL_VOID(glPopGroupMarkerEXT, (void), (), 0)
TRACE_GL_VOID(glPopMatrix, (void), (), 0)
TRACE_GL_VOID(glProgramBinaryOES, (GLuint program, GLenum binaryFormat, const GLvoid *binary, GLint length), (program, binaryFormat, binary, length), 4, "GLuint", program, "GLenum", binaryFormat, "const GLvoid *", binary, "GLint", length)
+TRACE_GL_VOID(glProgramParameteriEXT, (GLuint program, GLenum pname, GLint value), (program, pname, value), 3, "GLuint", program, "GLenum", pname, "GLint", value)
+TRACE_GL_VOID(glProgramUniform1fEXT, (GLuint program, GLint location, GLfloat x), (program, location, x), 3, "GLuint", program, "GLint", location, "GLfloat", x)
+TRACE_GL_VOID(glProgramUniform1fvEXT, (GLuint program, GLint location, GLsizei count, const GLfloat *value), (program, location, count, value), 4, "GLuint", program, "GLint", location, "GLsizei", count, "const GLfloat *", value)
+TRACE_GL_VOID(glProgramUniform1iEXT, (GLuint program, GLint location, GLint x), (program, location, x), 3, "GLuint", program, "GLint", location, "GLint", x)
+TRACE_GL_VOID(glProgramUniform1ivEXT, (GLuint program, GLint location, GLsizei count, const GLint *value), (program, location, count, value), 4, "GLuint", program, "GLint", location, "GLsizei", count, "const GLint *", value)
+TRACE_GL_VOID(glProgramUniform2fEXT, (GLuint program, GLint location, GLfloat x, GLfloat y), (program, location, x, y), 4, "GLuint", program, "GLint", location, "GLfloat", x, "GLfloat", y)
+TRACE_GL_VOID(glProgramUniform2fvEXT, (GLuint program, GLint location, GLsizei count, const GLfloat *value), (program, location, count, value), 4, "GLuint", program, "GLint", location, "GLsizei", count, "const GLfloat *", value)
+TRACE_GL_VOID(glProgramUniform2iEXT, (GLuint program, GLint location, GLint x, GLint y), (program, location, x, y), 4, "GLuint", program, "GLint", location, "GLint", x, "GLint", y)
+TRACE_GL_VOID(glProgramUniform2ivEXT, (GLuint program, GLint location, GLsizei count, const GLint *value), (program, location, count, value), 4, "GLuint", program, "GLint", location, "GLsizei", count, "const GLint *", value)
+TRACE_GL_VOID(glProgramUniform3fEXT, (GLuint program, GLint location, GLfloat x, GLfloat y, GLfloat z), (program, location, x, y, z), 5, "GLuint", program, "GLint", location, "GLfloat", x, "GLfloat", y, "GLfloat", z)
+TRACE_GL_VOID(glProgramUniform3fvEXT, (GLuint program, GLint location, GLsizei count, const GLfloat *value), (program, location, count, value), 4, "GLuint", program, "GLint", location, "GLsizei", count, "const GLfloat *", value)
+TRACE_GL_VOID(glProgramUniform3iEXT, (GLuint program, GLint location, GLint x, GLint y, GLint z), (program, location, x, y, z), 5, "GLuint", program, "GLint", location, "GLint", x, "GLint", y, "GLint", z)
+TRACE_GL_VOID(glProgramUniform3ivEXT, (GLuint program, GLint location, GLsizei count, const GLint *value), (program, location, count, value), 4, "GLuint", program, "GLint", location, "GLsizei", count, "const GLint *", value)
+TRACE_GL_VOID(glProgramUniform4fEXT, (GLuint program, GLint location, GLfloat x, GLfloat y, GLfloat z, GLfloat w), (program, location, x, y, z, w), 6, "GLuint", program, "GLint", location, "GLfloat", x, "GLfloat", y, "GLfloat", z, "GLfloat", w)
+TRACE_GL_VOID(glProgramUniform4fvEXT, (GLuint program, GLint location, GLsizei count, const GLfloat *value), (program, location, count, value), 4, "GLuint", program, "GLint", location, "GLsizei", count, "const GLfloat *", value)
+TRACE_GL_VOID(glProgramUniform4iEXT, (GLuint program, GLint location, GLint x, GLint y, GLint z, GLint w), (program, location, x, y, z, w), 6, "GLuint", program, "GLint", location, "GLint", x, "GLint", y, "GLint", z, "GLint", w)
+TRACE_GL_VOID(glProgramUniform4ivEXT, (GLuint program, GLint location, GLsizei count, const GLint *value), (program, location, count, value), 4, "GLuint", program, "GLint", location, "GLsizei", count, "const GLint *", value)
+TRACE_GL_VOID(glProgramUniformMatrix2fvEXT, (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value), (program, location, count, transpose, value), 5, "GLuint", program, "GLint", location, "GLsizei", count, "GLboolean", transpose, "const GLfloat *", value)
+TRACE_GL_VOID(glProgramUniformMatrix3fvEXT, (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value), (program, location, count, transpose, value), 5, "GLuint", program, "GLint", location, "GLsizei", count, "GLboolean", transpose, "const GLfloat *", value)
+TRACE_GL_VOID(glProgramUniformMatrix4fvEXT, (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value), (program, location, count, transpose, value), 5, "GLuint", program, "GLint", location, "GLsizei", count, "GLboolean", transpose, "const GLfloat *", value)
+TRACE_GL_VOID(glPushGroupMarkerEXT, (GLsizei length, const GLchar *marker), (length, marker), 2, "GLsizei", length, "const GLchar *", marker)
TRACE_GL_VOID(glPushMatrix, (void), (), 0)
TRACE_GL(GLbitfield, glQueryMatrixxOES, (GLfixed mantissa[16], GLint exponent[16]), (mantissa, exponent), 2, "GLfixed", mantissa, "GLint", exponent)
+TRACE_GL_VOID(glReadBufferNV, (GLenum mode), (mode), 1, "GLenum", mode)
TRACE_GL_VOID(glReadPixels, (GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, GLvoid *pixels), (x, y, width, height, format, type, pixels), 7, "GLint", x, "GLint", y, "GLsizei", width, "GLsizei", height, "GLenum", format, "GLenum", type, "GLvoid *", pixels)
+TRACE_GL_VOID(glReadnPixelsEXT, (GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, GLsizei bufSize, void *data), (x, y, width, height, format, type, bufSize, data), 8, "GLint", x, "GLint", y, "GLsizei", width, "GLsizei", height, "GLenum", format, "GLenum", type, "GLsizei", bufSize, "void *", data)
TRACE_GL_VOID(glReleaseShaderCompiler, (void), (), 0)
TRACE_GL_VOID(glRenderbufferStorage, (GLenum target, GLenum internalformat, GLsizei width, GLsizei height), (target, internalformat, width, height), 4, "GLenum", target, "GLenum", internalformat, "GLsizei", width, "GLsizei", height)
+TRACE_GL_VOID(glRenderbufferStorageMultisampleANGLE, (GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height), (target, samples, internalformat, width, height), 5, "GLenum", target, "GLsizei", samples, "GLenum", internalformat, "GLsizei", width, "GLsizei", height)
+TRACE_GL_VOID(glRenderbufferStorageMultisampleAPPLE, (GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height), (target, samples, internalformat, width, height), 5, "GLenum", target, "GLsizei", samples, "GLenum", internalformat, "GLsizei", width, "GLsizei", height)
+TRACE_GL_VOID(glRenderbufferStorageMultisampleEXT, (GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height), (target, samples, internalformat, width, height), 5, "GLenum", target, "GLsizei", samples, "GLenum", internalformat, "GLsizei", width, "GLsizei", height)
TRACE_GL_VOID(glRenderbufferStorageMultisampleIMG, (GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height), (target, samples, internalformat, width, height), 5, "GLenum", target, "GLsizei", samples, "GLenum", internalformat, "GLsizei", width, "GLsizei", height)
TRACE_GL_VOID(glRenderbufferStorageOES, (GLenum target, GLenum internalformat, GLsizei width, GLsizei height), (target, internalformat, width, height), 4, "GLenum", target, "GLenum", internalformat, "GLsizei", width, "GLsizei", height)
+TRACE_GL_VOID(glResolveMultisampleFramebufferAPPLE, (void), (), 0)
TRACE_GL_VOID(glRotatef, (GLfloat angle, GLfloat x, GLfloat y, GLfloat z), (angle, x, y, z), 4, "GLfloat", angle, "GLfloat", x, "GLfloat", y, "GLfloat", z)
TRACE_GL_VOID(glRotatex, (GLfixed angle, GLfixed x, GLfixed y, GLfixed z), (angle, x, y, z), 4, "GLfixed", angle, "GLfixed", x, "GLfixed", y, "GLfixed", z)
TRACE_GL_VOID(glRotatexOES, (GLfixed angle, GLfixed x, GLfixed y, GLfixed z), (angle, x, y, z), 4, "GLfixed", angle, "GLfixed", x, "GLfixed", y, "GLfixed", z)
@@ -335,8 +388,14 @@ TRACE_GL_VOID(glTexParameterx, (GLenum target, GLenum pname, GLfixed param), (ta
TRACE_GL_VOID(glTexParameterxOES, (GLenum target, GLenum pname, GLfixed param), (target, pname, param), 3, "GLenum", target, "GLenum", pname, "GLfixed", param)
TRACE_GL_VOID(glTexParameterxv, (GLenum target, GLenum pname, const GLfixed *params), (target, pname, params), 3, "GLenum", target, "GLenum", pname, "const GLfixed *", params)
TRACE_GL_VOID(glTexParameterxvOES, (GLenum target, GLenum pname, const GLfixed *params), (target, pname, params), 3, "GLenum", target, "GLenum", pname, "const GLfixed *", params)
+TRACE_GL_VOID(glTexStorage1DEXT, (GLenum target, GLsizei levels, GLenum internalformat, GLsizei width), (target, levels, internalformat, width), 4, "GLenum", target, "GLsizei", levels, "GLenum", internalformat, "GLsizei", width)
+TRACE_GL_VOID(glTexStorage2DEXT, (GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height), (target, levels, internalformat, width, height), 5, "GLenum", target, "GLsizei", levels, "GLenum", internalformat, "GLsizei", width, "GLsizei", height)
+TRACE_GL_VOID(glTexStorage3DEXT, (GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth), (target, levels, internalformat, width, height, depth), 6, "GLenum", target, "GLsizei", levels, "GLenum", internalformat, "GLsizei", width, "GLsizei", height, "GLsizei", depth)
TRACE_GL_VOID(glTexSubImage2D, (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid *pixels), (target, level, xoffset, yoffset, width, height, format, type, pixels), 9, "GLenum", target, "GLint", level, "GLint", xoffset, "GLint", yoffset, "GLsizei", width, "GLsizei", height, "GLenum", format, "GLenum", type, "const GLvoid *", pixels)
TRACE_GL_VOID(glTexSubImage3DOES, (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, const GLvoid* pixels), (target, level, xoffset, yoffset, zoffset, width, height, depth, format, type, pixels), 11, "GLenum", target, "GLint", level, "GLint", xoffset, "GLint", yoffset, "GLint", zoffset, "GLsizei", width, "GLsizei", height, "GLsizei", depth, "GLenum", format, "GLenum", type, "const GLvoid*", pixels)
+TRACE_GL_VOID(glTextureStorage1DEXT, (GLuint texture, GLenum target, GLsizei levels, GLenum internalformat, GLsizei width), (texture, target, levels, internalformat, width), 5, "GLuint", texture, "GLenum", target, "GLsizei", levels, "GLenum", internalformat, "GLsizei", width)
+TRACE_GL_VOID(glTextureStorage2DEXT, (GLuint texture, GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height), (texture, target, levels, internalformat, width, height), 6, "GLuint", texture, "GLenum", target, "GLsizei", levels, "GLenum", internalformat, "GLsizei", width, "GLsizei", height)
+TRACE_GL_VOID(glTextureStorage3DEXT, (GLuint texture, GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth), (texture, target, levels, internalformat, width, height, depth), 7, "GLuint", texture, "GLenum", target, "GLsizei", levels, "GLenum", internalformat, "GLsizei", width, "GLsizei", height, "GLsizei", depth)
TRACE_GL_VOID(glTranslatef, (GLfloat x, GLfloat y, GLfloat z), (x, y, z), 3, "GLfloat", x, "GLfloat", y, "GLfloat", z)
TRACE_GL_VOID(glTranslatex, (GLfixed x, GLfixed y, GLfixed z), (x, y, z), 3, "GLfixed", x, "GLfixed", y, "GLfixed", z)
TRACE_GL_VOID(glTranslatexOES, (GLfixed x, GLfixed y, GLfixed z), (x, y, z), 3, "GLfixed", x, "GLfixed", y, "GLfixed", z)
@@ -361,7 +420,9 @@ TRACE_GL_VOID(glUniformMatrix3fv, (GLint location, GLsizei count, GLboolean tran
TRACE_GL_VOID(glUniformMatrix4fv, (GLint location, GLsizei count, GLboolean transpose, const GLfloat* value), (location, count, transpose, value), 4, "GLint", location, "GLsizei", count, "GLboolean", transpose, "const GLfloat*", value)
TRACE_GL(GLboolean, glUnmapBufferOES, (GLenum target), (target), 1, "GLenum", target)
TRACE_GL_VOID(glUseProgram, (GLuint program), (program), 1, "GLuint", program)
+TRACE_GL_VOID(glUseProgramStagesEXT, (GLuint pipeline, GLbitfield stages, GLuint program), (pipeline, stages, program), 3, "GLuint", pipeline, "GLbitfield", stages, "GLuint", program)
TRACE_GL_VOID(glValidateProgram, (GLuint program), (program), 1, "GLuint", program)
+TRACE_GL_VOID(glValidateProgramPipelineEXT, (GLuint pipeline), (pipeline), 1, "GLuint", pipeline)
TRACE_GL_VOID(glVertexAttrib1f, (GLuint indx, GLfloat x), (indx, x), 2, "GLuint", indx, "GLfloat", x)
TRACE_GL_VOID(glVertexAttrib1fv, (GLuint indx, const GLfloat* values), (indx, values), 2, "GLuint", indx, "const GLfloat*", values)
TRACE_GL_VOID(glVertexAttrib2f, (GLuint indx, GLfloat x, GLfloat y), (indx, x, y), 3, "GLuint", indx, "GLfloat", x, "GLfloat", y)
diff --git a/services/surfaceflinger/Android.mk b/services/surfaceflinger/Android.mk
index 95d651a..fc211e5 100644
--- a/services/surfaceflinger/Android.mk
+++ b/services/surfaceflinger/Android.mk
@@ -23,18 +23,21 @@ LOCAL_SRC_FILES:= \
LOCAL_CFLAGS:= -DLOG_TAG=\"SurfaceFlinger\"
LOCAL_CFLAGS += -DGL_GLEXT_PROTOTYPES -DEGL_EGLEXT_PROTOTYPES
+ifeq ($(TARGET_HAS_WAITFORVSYNC), true)
+ LOCAL_CFLAGS += -DHAS_WAITFORVSYNC
+endif
+
ifeq ($(TARGET_BOARD_PLATFORM), omap3)
LOCAL_CFLAGS += -DNO_RGBX_8888
endif
ifeq ($(TARGET_BOARD_PLATFORM), omap4)
LOCAL_CFLAGS += -DHAS_CONTEXT_PRIORITY
+ LOCAL_CFLAGS += -DUSE_TRIPLE_BUFFERING=1
endif
ifeq ($(TARGET_BOARD_PLATFORM), s5pc110)
LOCAL_CFLAGS += -DHAS_CONTEXT_PRIORITY -DNEVER_DEFAULT_TO_ASYNC_MODE
- LOCAL_CFLAGS += -DREFRESH_RATE=56
endif
-
LOCAL_SHARED_LIBRARIES := \
libcutils \
libhardware \
diff --git a/services/surfaceflinger/DisplayHardware/DisplayHardware.cpp b/services/surfaceflinger/DisplayHardware/DisplayHardware.cpp
index 438a6da..986aec5 100644
--- a/services/surfaceflinger/DisplayHardware/DisplayHardware.cpp
+++ b/services/surfaceflinger/DisplayHardware/DisplayHardware.cpp
@@ -350,15 +350,28 @@ uint32_t DisplayHardware::getPageFlipCount() const {
}
// this needs to be thread safe
-nsecs_t DisplayHardware::waitForVSync() const {
+nsecs_t DisplayHardware::waitForRefresh() const {
nsecs_t timestamp;
if (mVSync.wait(&timestamp) < 0) {
// vsync not supported!
usleep( getDelayToNextVSyncUs(&timestamp) );
}
+ mLastHwVSync = timestamp; // FIXME: Not thread safe
return timestamp;
}
+nsecs_t DisplayHardware::getRefreshTimestamp() const {
+ // this returns the last refresh timestamp.
+ // if the last one is not available, we estimate it based on
+ // the refresh period and whatever closest timestamp we have.
+ nsecs_t now = systemTime();
+ return now - ((now - mLastHwVSync) % mRefreshPeriod);
+}
+
+nsecs_t DisplayHardware::getRefreshPeriod() const {
+ return mRefreshPeriod;
+}
+
int32_t DisplayHardware::getDelayToNextVSyncUs(nsecs_t* timestamp) const {
Mutex::Autolock _l(mFakeVSyncMutex);
const nsecs_t period = mRefreshPeriod;
diff --git a/services/surfaceflinger/DisplayHardware/DisplayHardware.h b/services/surfaceflinger/DisplayHardware/DisplayHardware.h
index 77da272..02be4dc 100644
--- a/services/surfaceflinger/DisplayHardware/DisplayHardware.h
+++ b/services/surfaceflinger/DisplayHardware/DisplayHardware.h
@@ -76,7 +76,9 @@ public:
uint32_t getMaxViewportDims() const;
// waits for the next vsync and returns the timestamp of when it happened
- nsecs_t waitForVSync() const;
+ nsecs_t waitForRefresh() const;
+ nsecs_t getRefreshPeriod() const;
+ nsecs_t getRefreshTimestamp() const;
uint32_t getPageFlipCount() const;
EGLDisplay getEGLDisplay() const { return mDisplay; }
@@ -119,6 +121,7 @@ private:
mutable Mutex mFakeVSyncMutex;
mutable nsecs_t mNextFakeVSync;
nsecs_t mRefreshPeriod;
+ mutable nsecs_t mLastHwVSync;
HWComposer* mHwc;
diff --git a/services/surfaceflinger/EventThread.cpp b/services/surfaceflinger/EventThread.cpp
index 80ab519..af0da0b 100644
--- a/services/surfaceflinger/EventThread.cpp
+++ b/services/surfaceflinger/EventThread.cpp
@@ -36,6 +36,7 @@ namespace android {
EventThread::EventThread(const sp<SurfaceFlinger>& flinger)
: mFlinger(flinger),
mHw(flinger->graphicPlane(0).displayHardware()),
+ mLastVSyncTimestamp(0),
mDeliveredEvents(0)
{
}
@@ -44,6 +45,20 @@ void EventThread::onFirstRef() {
run("EventThread", PRIORITY_URGENT_DISPLAY + PRIORITY_MORE_FAVORABLE);
}
+sp<DisplayEventConnection> EventThread::createEventConnection() const {
+ return new DisplayEventConnection(const_cast<EventThread*>(this));
+}
+
+nsecs_t EventThread::getLastVSyncTimestamp() const {
+ Mutex::Autolock _l(mLock);
+ return mLastVSyncTimestamp;
+}
+
+nsecs_t EventThread::getVSyncPeriod() const {
+ return mHw.getRefreshPeriod();
+
+}
+
status_t EventThread::registerDisplayEventConnection(
const sp<DisplayEventConnection>& connection) {
Mutex::Autolock _l(mLock);
@@ -80,8 +95,11 @@ void EventThread::setVsyncRate(uint32_t count,
Mutex::Autolock _l(mLock);
ConnectionInfo* info = getConnectionInfoLocked(connection);
if (info) {
- info->count = (count == 0) ? -1 : count;
- mCondition.signal();
+ const int32_t new_count = (count == 0) ? -1 : count;
+ if (info->count != new_count) {
+ info->count = new_count;
+ mCondition.signal();
+ }
}
}
}
@@ -90,10 +108,8 @@ void EventThread::requestNextVsync(
const wp<DisplayEventConnection>& connection) {
Mutex::Autolock _l(mLock);
ConnectionInfo* info = getConnectionInfoLocked(connection);
- if (info) {
- if (info->count < 0) {
- info->count = 0;
- }
+ if (info && info->count < 0) {
+ info->count = 0;
mCondition.signal();
}
}
@@ -129,14 +145,15 @@ bool EventThread::threadLoop() {
// at least one listener requested VSYNC
mLock.unlock();
- timestamp = mHw.waitForVSync();
+ timestamp = mHw.waitForRefresh();
mLock.lock();
mDeliveredEvents++;
+ mLastVSyncTimestamp = timestamp;
// now see if we still need to report this VSYNC event
- bool reportVsync = false;
- size_t count = mDisplayEventConnections.size();
+ const size_t count = mDisplayEventConnections.size();
for (size_t i=0 ; i<count ; i++) {
+ bool reportVsync = false;
const ConnectionInfo& info(
mDisplayEventConnections.valueAt(i));
if (info.count >= 1) {
@@ -157,11 +174,7 @@ bool EventThread::threadLoop() {
displayEventConnections.add(mDisplayEventConnections.keyAt(i));
}
}
-
- if (reportVsync) {
- break;
- }
- } while (true);
+ } while (!displayEventConnections.size());
// dispatch vsync events to listeners...
vsync.header.type = DisplayEventReceiver::DISPLAY_EVENT_VSYNC;
diff --git a/services/surfaceflinger/EventThread.h b/services/surfaceflinger/EventThread.h
index 35bd299..3a3071e 100644
--- a/services/surfaceflinger/EventThread.h
+++ b/services/surfaceflinger/EventThread.h
@@ -36,6 +36,7 @@ namespace android {
class SurfaceFlinger;
class DisplayHardware;
+class DisplayEventConnection;
// ---------------------------------------------------------------------------
@@ -45,6 +46,8 @@ class EventThread : public Thread {
public:
EventThread(const sp<SurfaceFlinger>& flinger);
+ sp<DisplayEventConnection> createEventConnection() const;
+
status_t registerDisplayEventConnection(
const sp<DisplayEventConnection>& connection);
@@ -56,6 +59,10 @@ public:
void requestNextVsync(const wp<DisplayEventConnection>& connection);
+ nsecs_t getLastVSyncTimestamp() const;
+
+ nsecs_t getVSyncPeriod() const;
+
void dump(String8& result, char* buffer, size_t SIZE) const;
private:
@@ -88,6 +95,7 @@ private:
// protected by mLock
KeyedVector< wp<DisplayEventConnection>, ConnectionInfo > mDisplayEventConnections;
+ nsecs_t mLastVSyncTimestamp;
// main thread only
size_t mDeliveredEvents;
diff --git a/services/surfaceflinger/Layer.cpp b/services/surfaceflinger/Layer.cpp
index d4c4b1f..9c04d59 100644
--- a/services/surfaceflinger/Layer.cpp
+++ b/services/surfaceflinger/Layer.cpp
@@ -38,6 +38,7 @@
#include "Layer.h"
#include "SurfaceFlinger.h"
#include "SurfaceTextureLayer.h"
+#include <math.h>
#define DEBUG_RESIZE 0
@@ -54,6 +55,8 @@ Layer::Layer(SurfaceFlinger* flinger,
mCurrentTransform(0),
mCurrentScalingMode(NATIVE_WINDOW_SCALING_MODE_FREEZE),
mCurrentOpacity(true),
+ mFrameLatencyNeeded(false),
+ mFrameLatencyOffset(0),
mFormat(PIXEL_FORMAT_NONE),
mGLExtensions(GLExtensions::getInstance()),
mOpaqueLayer(true),
@@ -65,6 +68,17 @@ Layer::Layer(SurfaceFlinger* flinger,
glGenTextures(1, &mTextureName);
}
+void Layer::onLayerDisplayed() {
+ if (mFrameLatencyNeeded) {
+ const DisplayHardware& hw(graphicPlane(0).displayHardware());
+ mFrameStats[mFrameLatencyOffset].timestamp = mSurfaceTexture->getTimestamp();
+ mFrameStats[mFrameLatencyOffset].set = systemTime();
+ mFrameStats[mFrameLatencyOffset].vsync = hw.getRefreshTimestamp();
+ mFrameLatencyOffset = (mFrameLatencyOffset + 1) % 128;
+ mFrameLatencyNeeded = false;
+ }
+}
+
void Layer::onFirstRef()
{
LayerBaseClient::onFirstRef();
@@ -83,7 +97,12 @@ void Layer::onFirstRef()
mSurfaceTexture = new SurfaceTextureLayer(mTextureName, this);
mSurfaceTexture->setFrameAvailableListener(new FrameQueuedListener(this));
mSurfaceTexture->setSynchronousMode(true);
+#ifdef USE_TRIPLE_BUFFERING
+#warning "using triple buffering"
+ mSurfaceTexture->setBufferCountServer(3);
+#else
mSurfaceTexture->setBufferCountServer(2);
+#endif
}
Layer::~Layer()
@@ -408,6 +427,7 @@ void Layer::lockPageFlip(bool& recomputeVisibleRegions)
// update the active buffer
mActiveBuffer = mSurfaceTexture->getCurrentBuffer();
+ mFrameLatencyNeeded = true;
const Rect crop(mSurfaceTexture->getCurrentCrop());
const uint32_t transform(mSurfaceTexture->getCurrentTransform());
@@ -543,6 +563,32 @@ void Layer::dump(String8& result, char* buffer, size_t SIZE) const
}
}
+void Layer::dumpStats(String8& result, char* buffer, size_t SIZE) const
+{
+ LayerBaseClient::dumpStats(result, buffer, SIZE);
+ const size_t o = mFrameLatencyOffset;
+ const DisplayHardware& hw(graphicPlane(0).displayHardware());
+ const nsecs_t period = hw.getRefreshPeriod();
+ result.appendFormat("%lld\n", period);
+ for (size_t i=0 ; i<128 ; i++) {
+ const size_t index = (o+i) % 128;
+ const nsecs_t time_app = mFrameStats[index].timestamp;
+ const nsecs_t time_set = mFrameStats[index].set;
+ const nsecs_t time_vsync = mFrameStats[index].vsync;
+ result.appendFormat("%lld\t%lld\t%lld\n",
+ time_app,
+ time_vsync,
+ time_set);
+ }
+ result.append("\n");
+}
+
+void Layer::clearStats()
+{
+ LayerBaseClient::clearStats();
+ memset(mFrameStats, 0, sizeof(mFrameStats));
+}
+
uint32_t Layer::getEffectiveUsage(uint32_t usage) const
{
// TODO: should we do something special if mSecure is set?
diff --git a/services/surfaceflinger/Layer.h b/services/surfaceflinger/Layer.h
index 2b9471b..2dd4da1 100644
--- a/services/surfaceflinger/Layer.h
+++ b/services/surfaceflinger/Layer.h
@@ -34,6 +34,7 @@
#include "LayerBase.h"
#include "SurfaceTextureLayer.h"
#include "Transform.h"
+#include <utils/Timers.h>
namespace android {
@@ -78,12 +79,16 @@ public:
// LayerBaseClient interface
virtual wp<IBinder> getSurfaceTextureBinder() const;
+ virtual void onLayerDisplayed();
+
// only for debugging
inline const sp<GraphicBuffer>& getActiveBuffer() const { return mActiveBuffer; }
protected:
virtual void onFirstRef();
virtual void dump(String8& result, char* scratch, size_t size) const;
+ virtual void dumpStats(String8& result, char* buffer, size_t SIZE) const;
+ virtual void clearStats();
private:
friend class SurfaceTextureLayer;
@@ -110,6 +115,16 @@ private:
uint32_t mCurrentTransform;
uint32_t mCurrentScalingMode;
bool mCurrentOpacity;
+ bool mFrameLatencyNeeded;
+ int mFrameLatencyOffset;
+ struct Statistics {
+ Statistics() : timestamp(0), set(0), vsync(0) { }
+ nsecs_t timestamp; // buffer timestamp
+ nsecs_t set; // buffer displayed timestamp
+ nsecs_t vsync; // vsync immediately before set
+ };
+ // protected by mLock
+ Statistics mFrameStats[128];
// constants
PixelFormat mFormat;
@@ -121,9 +136,6 @@ private:
bool mSecure; // no screenshots
bool mProtectedByApp; // application requires protected path to external sink
Region mPostedDirtyRegion;
-
- // binder thread, transaction thread
- mutable Mutex mLock;
};
// ---------------------------------------------------------------------------
diff --git a/services/surfaceflinger/LayerBase.cpp b/services/surfaceflinger/LayerBase.cpp
index 37879f1..d32fcdd 100644
--- a/services/surfaceflinger/LayerBase.cpp
+++ b/services/surfaceflinger/LayerBase.cpp
@@ -471,6 +471,9 @@ void LayerBase::drawWithOpenGL(const Region& clip) const
void LayerBase::dump(String8& result, char* buffer, size_t SIZE) const
{
const Layer::State& s(drawingState());
+ s.transparentRegion.dump(result, "transparentRegion");
+ transparentRegionScreen.dump(result, "transparentRegionScreen");
+ visibleRegionScreen.dump(result, "visibleRegionScreen");
snprintf(buffer, SIZE,
"+ %s %p (%s)\n"
" "
@@ -486,11 +489,15 @@ void LayerBase::dump(String8& result, char* buffer, size_t SIZE) const
result.append(buffer);
}
-void LayerBase::shortDump(String8& result, char* scratch, size_t size) const
-{
+void LayerBase::shortDump(String8& result, char* scratch, size_t size) const {
LayerBase::dump(result, scratch, size);
}
+void LayerBase::dumpStats(String8& result, char* scratch, size_t SIZE) const {
+}
+
+void LayerBase::clearStats() {
+}
// ---------------------------------------------------------------------------
diff --git a/services/surfaceflinger/LayerBase.h b/services/surfaceflinger/LayerBase.h
index 7f62145..6b62c9d 100644
--- a/services/surfaceflinger/LayerBase.h
+++ b/services/surfaceflinger/LayerBase.h
@@ -205,10 +205,14 @@ public:
/** called with the state lock when the surface is removed from the
* current list */
virtual void onRemoved() { };
-
+
+ virtual void onLayerDisplayed() { };
+
/** always call base class first */
virtual void dump(String8& result, char* scratch, size_t size) const;
virtual void shortDump(String8& result, char* scratch, size_t size) const;
+ virtual void dumpStats(String8& result, char* buffer, size_t SIZE) const;
+ virtual void clearStats();
enum { // flags for doTransaction()
diff --git a/services/surfaceflinger/MessageQueue.cpp b/services/surfaceflinger/MessageQueue.cpp
index cbd530c..70711e7 100644
--- a/services/surfaceflinger/MessageQueue.cpp
+++ b/services/surfaceflinger/MessageQueue.cpp
@@ -18,12 +18,17 @@
#include <errno.h>
#include <sys/types.h>
+#include <binder/IPCThreadState.h>
+
#include <utils/threads.h>
#include <utils/Timers.h>
#include <utils/Log.h>
-#include <binder/IPCThreadState.h>
+
+#include <gui/IDisplayEventConnection.h>
+#include <gui/BitTube.h>
#include "MessageQueue.h"
+#include "EventThread.h"
namespace android {
@@ -51,6 +56,15 @@ MessageQueue::MessageQueue()
MessageQueue::~MessageQueue() {
}
+void MessageQueue::setEventThread(const sp<EventThread>& eventThread)
+{
+ mEventThread = eventThread;
+ mEvents = eventThread->createEventConnection();
+ mEventTube = mEvents->getDataChannel();
+ mLooper->addFd(mEventTube->getFd(), 0, ALOOPER_EVENT_INPUT,
+ MessageQueue::cb_eventReceiver, this);
+}
+
void MessageQueue::waitMessage() {
do {
IPCThreadState::self()->flushCommands();
@@ -93,13 +107,54 @@ status_t MessageQueue::postMessage(
return NO_ERROR;
}
-status_t MessageQueue::invalidate() {
+void MessageQueue::scheduleWorkASAP() {
if (android_atomic_or(1, &mWorkPending) == 0) {
mLooper->wake();
- }
+ }
+}
+
+status_t MessageQueue::invalidate() {
+ mEvents->requestNextVsync();
return NO_ERROR;
}
+int MessageQueue::cb_eventReceiver(int fd, int events, void* data) {
+ MessageQueue* queue = reinterpret_cast<MessageQueue *>(data);
+ return queue->eventReceiver(fd, events);
+}
+
+int MessageQueue::eventReceiver(int fd, int events) {
+ ssize_t n;
+ DisplayEventReceiver::Event buffer[8];
+ while ((n = getEvents(buffer, 8)) > 0) {
+ for (int i=0 ; i<n ; i++) {
+ if (buffer[i].header.type == DisplayEventReceiver::DISPLAY_EVENT_VSYNC) {
+ scheduleWorkASAP();
+ break;
+ }
+ }
+ }
+ return 1;
+}
+
+ssize_t MessageQueue::getEvents(
+ DisplayEventReceiver::Event* events, size_t count)
+{
+ ssize_t size = mEventTube->read(events, sizeof(events[0])*count);
+ ALOGE_IF(size<0, "MessageQueue::getEvents error (%s)", strerror(-size));
+ if (size >= 0) {
+ // Note: if (size % sizeof(events[0])) != 0, we've got a
+ // partial read. This can happen if the queue filed up (ie: if we
+ // didn't pull from it fast enough).
+ // We discard the partial event and rely on the sender to
+ // re-send the event if appropriate (some events, like VSYNC
+ // can be lost forever).
+ // returns number of events read
+ size /= sizeof(events[0]);
+ }
+ return size;
+}
+
// ---------------------------------------------------------------------------
}; // namespace android
diff --git a/services/surfaceflinger/MessageQueue.h b/services/surfaceflinger/MessageQueue.h
index 2317d81..5ea197d 100644
--- a/services/surfaceflinger/MessageQueue.h
+++ b/services/surfaceflinger/MessageQueue.h
@@ -25,10 +25,15 @@
#include <utils/Timers.h>
#include <utils/Looper.h>
+#include <gui/DisplayEventReceiver.h>
+
#include "Barrier.h"
namespace android {
+class IDisplayEventConnection;
+class EventThread;
+
// ---------------------------------------------------------------------------
class MessageBase : public MessageHandler
@@ -55,11 +60,20 @@ private:
class MessageQueue {
sp<Looper> mLooper;
- volatile int32_t mWorkPending;
+ sp<EventThread> mEventThread;
+ sp<IDisplayEventConnection> mEvents;
+ sp<BitTube> mEventTube;
+ int32_t mWorkPending;
+
+ static int cb_eventReceiver(int fd, int events, void* data);
+ int eventReceiver(int fd, int events);
+ ssize_t getEvents(DisplayEventReceiver::Event* events, size_t count);
+ void scheduleWorkASAP();
public:
MessageQueue();
~MessageQueue();
+ void setEventThread(const sp<EventThread>& events);
void waitMessage();
status_t postMessage(const sp<MessageBase>& message, nsecs_t reltime=0);
diff --git a/services/surfaceflinger/SurfaceFlinger.cpp b/services/surfaceflinger/SurfaceFlinger.cpp
index af47402..ff70ec3 100644
--- a/services/surfaceflinger/SurfaceFlinger.cpp
+++ b/services/surfaceflinger/SurfaceFlinger.cpp
@@ -188,7 +188,8 @@ void SurfaceFlinger::binderDied(const wp<IBinder>& who)
// the window manager died on us. prepare its eulogy.
// reset screen orientation
- setOrientation(0, eOrientationDefault, 0);
+ Vector<ComposerState> state;
+ setTransactionState(state, eOrientationDefault, 0);
// restart the boot-animation
property_set("ctl.start", "bootanim");
@@ -295,6 +296,7 @@ status_t SurfaceFlinger::readyToRun()
// start the EventThread
mEventThread = new EventThread(this);
+ mEventQueue.setEventThread(mEventThread);
/*
* We're now ready to accept clients...
@@ -382,8 +384,7 @@ bool SurfaceFlinger::authenticateSurfaceTexture(
// ----------------------------------------------------------------------------
sp<IDisplayEventConnection> SurfaceFlinger::createDisplayEventConnection() {
- sp<DisplayEventConnection> result(new DisplayEventConnection(mEventThread));
- return result;
+ return mEventThread->createEventConnection();
}
// ----------------------------------------------------------------------------
@@ -431,7 +432,6 @@ bool SurfaceFlinger::threadLoop()
} else {
// pretend we did the post
hw.compositionComplete();
- hw.waitForVSync();
}
return true;
}
@@ -445,6 +445,12 @@ void SurfaceFlinger::postFramebuffer()
const nsecs_t now = systemTime();
mDebugInSwapBuffers = now;
hw.flip(mSwapRegion);
+
+ size_t numLayers = mVisibleLayersSortedByZ.size();
+ for (size_t i = 0; i < numLayers; i++) {
+ mVisibleLayersSortedByZ[i]->onLayerDisplayed();
+ }
+
mLastSwapBufferTime = systemTime() - now;
mDebugInSwapBuffers = 0;
mSwapRegion.clear();
@@ -1219,26 +1225,6 @@ void SurfaceFlinger::setTransactionState(const Vector<ComposerState>& state,
}
}
-int SurfaceFlinger::setOrientation(DisplayID dpy,
- int orientation, uint32_t flags)
-{
- if (CC_UNLIKELY(uint32_t(dpy) >= DISPLAY_COUNT))
- return BAD_VALUE;
-
- Mutex::Autolock _l(mStateLock);
- if (mCurrentState.orientation != orientation) {
- if (uint32_t(orientation)<=eOrientation270 || orientation==42) {
- mCurrentState.orientationFlags = flags;
- mCurrentState.orientation = orientation;
- setTransactionFlags(eTransactionNeeded);
- mTransactionCV.wait(mStateLock);
- } else {
- orientation = BAD_VALUE;
- }
- }
- return orientation;
-}
-
sp<ISurface> SurfaceFlinger::createSurface(
ISurfaceComposerClient::surface_data_t* params,
const String8& name,
@@ -1463,14 +1449,6 @@ status_t SurfaceFlinger::dump(int fd, const Vector<String16>& args)
IPCThreadState::self()->getCallingUid());
result.append(buffer);
} else {
-
- // figure out if we're stuck somewhere
- const nsecs_t now = systemTime();
- const nsecs_t inSwapBuffers(mDebugInSwapBuffers);
- const nsecs_t inTransaction(mDebugInTransaction);
- nsecs_t inSwapBuffersDuration = (inSwapBuffers) ? now-inSwapBuffers : 0;
- nsecs_t inTransactionDuration = (inTransaction) ? now-inTransaction : 0;
-
// Try to get the main lock, but don't insist if we can't
// (this would indicate SF is stuck, but we want to be able to
// print something in dumpsys).
@@ -1486,117 +1464,203 @@ status_t SurfaceFlinger::dump(int fd, const Vector<String16>& args)
result.append(buffer);
}
- /*
- * Dump the visible layer list
- */
- const LayerVector& currentLayers = mCurrentState.layersSortedByZ;
- const size_t count = currentLayers.size();
- snprintf(buffer, SIZE, "Visible layers (count = %d)\n", count);
- result.append(buffer);
- for (size_t i=0 ; i<count ; i++) {
- const sp<LayerBase>& layer(currentLayers[i]);
- layer->dump(result, buffer, SIZE);
- const Layer::State& s(layer->drawingState());
- s.transparentRegion.dump(result, "transparentRegion");
- layer->transparentRegionScreen.dump(result, "transparentRegionScreen");
- layer->visibleRegionScreen.dump(result, "visibleRegionScreen");
- }
+ bool dumpAll = true;
+ size_t index = 0;
+ size_t numArgs = args.size();
+ if (numArgs) {
+ dumpAll = false;
- /*
- * Dump the layers in the purgatory
- */
-
- const size_t purgatorySize = mLayerPurgatory.size();
- snprintf(buffer, SIZE, "Purgatory state (%d entries)\n", purgatorySize);
- result.append(buffer);
- for (size_t i=0 ; i<purgatorySize ; i++) {
- const sp<LayerBase>& layer(mLayerPurgatory.itemAt(i));
- layer->shortDump(result, buffer, SIZE);
- }
+ if ((index < numArgs) &&
+ (args[index] == String16("--list"))) {
+ index++;
+ listLayersLocked(args, index, result, buffer, SIZE);
+ }
- /*
- * Dump SurfaceFlinger global state
- */
+ if ((index < numArgs) &&
+ (args[index] == String16("--latency"))) {
+ index++;
+ dumpStatsLocked(args, index, result, buffer, SIZE);
+ }
- snprintf(buffer, SIZE, "SurfaceFlinger global state:\n");
- result.append(buffer);
+ if ((index < numArgs) &&
+ (args[index] == String16("--latency-clear"))) {
+ index++;
+ clearStatsLocked(args, index, result, buffer, SIZE);
+ }
+ }
- const GLExtensions& extensions(GLExtensions::getInstance());
- snprintf(buffer, SIZE, "GLES: %s, %s, %s\n",
- extensions.getVendor(),
- extensions.getRenderer(),
- extensions.getVersion());
- result.append(buffer);
+ if (dumpAll) {
+ dumpAllLocked(result, buffer, SIZE);
+ }
- snprintf(buffer, SIZE, "EGL : %s\n",
- eglQueryString(graphicPlane(0).getEGLDisplay(),
- EGL_VERSION_HW_ANDROID));
- result.append(buffer);
+ if (locked) {
+ mStateLock.unlock();
+ }
+ }
+ write(fd, result.string(), result.size());
+ return NO_ERROR;
+}
- snprintf(buffer, SIZE, "EXTS: %s\n", extensions.getExtension());
+void SurfaceFlinger::listLayersLocked(const Vector<String16>& args, size_t& index,
+ String8& result, char* buffer, size_t SIZE) const
+{
+ const LayerVector& currentLayers = mCurrentState.layersSortedByZ;
+ const size_t count = currentLayers.size();
+ for (size_t i=0 ; i<count ; i++) {
+ const sp<LayerBase>& layer(currentLayers[i]);
+ snprintf(buffer, SIZE, "%s\n", layer->getName().string());
result.append(buffer);
+ }
+}
- mWormholeRegion.dump(result, "WormholeRegion");
- const DisplayHardware& hw(graphicPlane(0).displayHardware());
- snprintf(buffer, SIZE,
- " orientation=%d, canDraw=%d\n",
- mCurrentState.orientation, hw.canDraw());
- result.append(buffer);
- snprintf(buffer, SIZE,
- " last eglSwapBuffers() time: %f us\n"
- " last transaction time : %f us\n"
- " refresh-rate : %f fps\n"
- " x-dpi : %f\n"
- " y-dpi : %f\n",
- mLastSwapBufferTime/1000.0,
- mLastTransactionTime/1000.0,
- hw.getRefreshRate(),
- hw.getDpiX(),
- hw.getDpiY());
- result.append(buffer);
+void SurfaceFlinger::dumpStatsLocked(const Vector<String16>& args, size_t& index,
+ String8& result, char* buffer, size_t SIZE) const
+{
+ String8 name;
+ if (index < args.size()) {
+ name = String8(args[index]);
+ index++;
+ }
- if (inSwapBuffersDuration || !locked) {
- snprintf(buffer, SIZE, " eglSwapBuffers time: %f us\n",
- inSwapBuffersDuration/1000.0);
+ const LayerVector& currentLayers = mCurrentState.layersSortedByZ;
+ const size_t count = currentLayers.size();
+ for (size_t i=0 ; i<count ; i++) {
+ const sp<LayerBase>& layer(currentLayers[i]);
+ if (name.isEmpty()) {
+ snprintf(buffer, SIZE, "%s\n", layer->getName().string());
result.append(buffer);
}
+ if (name.isEmpty() || (name == layer->getName())) {
+ layer->dumpStats(result, buffer, SIZE);
+ }
+ }
+}
- if (inTransactionDuration || !locked) {
- snprintf(buffer, SIZE, " transaction time: %f us\n",
- inTransactionDuration/1000.0);
- result.append(buffer);
+void SurfaceFlinger::clearStatsLocked(const Vector<String16>& args, size_t& index,
+ String8& result, char* buffer, size_t SIZE) const
+{
+ String8 name;
+ if (index < args.size()) {
+ name = String8(args[index]);
+ index++;
+ }
+
+ const LayerVector& currentLayers = mCurrentState.layersSortedByZ;
+ const size_t count = currentLayers.size();
+ for (size_t i=0 ; i<count ; i++) {
+ const sp<LayerBase>& layer(currentLayers[i]);
+ if (name.isEmpty() || (name == layer->getName())) {
+ layer->clearStats();
}
+ }
+}
- /*
- * VSYNC state
- */
- mEventThread->dump(result, buffer, SIZE);
+void SurfaceFlinger::dumpAllLocked(
+ String8& result, char* buffer, size_t SIZE) const
+{
+ // figure out if we're stuck somewhere
+ const nsecs_t now = systemTime();
+ const nsecs_t inSwapBuffers(mDebugInSwapBuffers);
+ const nsecs_t inTransaction(mDebugInTransaction);
+ nsecs_t inSwapBuffersDuration = (inSwapBuffers) ? now-inSwapBuffers : 0;
+ nsecs_t inTransactionDuration = (inTransaction) ? now-inTransaction : 0;
- /*
- * Dump HWComposer state
- */
- HWComposer& hwc(hw.getHwComposer());
- snprintf(buffer, SIZE, "h/w composer state:\n");
- result.append(buffer);
- snprintf(buffer, SIZE, " h/w composer %s and %s\n",
- hwc.initCheck()==NO_ERROR ? "present" : "not present",
- (mDebugDisableHWC || mDebugRegion) ? "disabled" : "enabled");
- result.append(buffer);
- hwc.dump(result, buffer, SIZE, mVisibleLayersSortedByZ);
+ /*
+ * Dump the visible layer list
+ */
+ const LayerVector& currentLayers = mCurrentState.layersSortedByZ;
+ const size_t count = currentLayers.size();
+ snprintf(buffer, SIZE, "Visible layers (count = %d)\n", count);
+ result.append(buffer);
+ for (size_t i=0 ; i<count ; i++) {
+ const sp<LayerBase>& layer(currentLayers[i]);
+ layer->dump(result, buffer, SIZE);
+ }
- /*
- * Dump gralloc state
- */
- const GraphicBufferAllocator& alloc(GraphicBufferAllocator::get());
- alloc.dump(result);
- hw.dump(result);
+ /*
+ * Dump the layers in the purgatory
+ */
- if (locked) {
- mStateLock.unlock();
- }
+ const size_t purgatorySize = mLayerPurgatory.size();
+ snprintf(buffer, SIZE, "Purgatory state (%d entries)\n", purgatorySize);
+ result.append(buffer);
+ for (size_t i=0 ; i<purgatorySize ; i++) {
+ const sp<LayerBase>& layer(mLayerPurgatory.itemAt(i));
+ layer->shortDump(result, buffer, SIZE);
}
- write(fd, result.string(), result.size());
- return NO_ERROR;
+
+ /*
+ * Dump SurfaceFlinger global state
+ */
+
+ snprintf(buffer, SIZE, "SurfaceFlinger global state:\n");
+ result.append(buffer);
+
+ const GLExtensions& extensions(GLExtensions::getInstance());
+ snprintf(buffer, SIZE, "GLES: %s, %s, %s\n",
+ extensions.getVendor(),
+ extensions.getRenderer(),
+ extensions.getVersion());
+ result.append(buffer);
+
+ snprintf(buffer, SIZE, "EGL : %s\n",
+ eglQueryString(graphicPlane(0).getEGLDisplay(),
+ EGL_VERSION_HW_ANDROID));
+ result.append(buffer);
+
+ snprintf(buffer, SIZE, "EXTS: %s\n", extensions.getExtension());
+ result.append(buffer);
+
+ mWormholeRegion.dump(result, "WormholeRegion");
+ const DisplayHardware& hw(graphicPlane(0).displayHardware());
+ snprintf(buffer, SIZE,
+ " orientation=%d, canDraw=%d\n",
+ mCurrentState.orientation, hw.canDraw());
+ result.append(buffer);
+ snprintf(buffer, SIZE,
+ " last eglSwapBuffers() time: %f us\n"
+ " last transaction time : %f us\n"
+ " refresh-rate : %f fps\n"
+ " x-dpi : %f\n"
+ " y-dpi : %f\n",
+ mLastSwapBufferTime/1000.0,
+ mLastTransactionTime/1000.0,
+ hw.getRefreshRate(),
+ hw.getDpiX(),
+ hw.getDpiY());
+ result.append(buffer);
+
+ snprintf(buffer, SIZE, " eglSwapBuffers time: %f us\n",
+ inSwapBuffersDuration/1000.0);
+ result.append(buffer);
+
+ snprintf(buffer, SIZE, " transaction time: %f us\n",
+ inTransactionDuration/1000.0);
+ result.append(buffer);
+
+ /*
+ * VSYNC state
+ */
+ mEventThread->dump(result, buffer, SIZE);
+
+ /*
+ * Dump HWComposer state
+ */
+ HWComposer& hwc(hw.getHwComposer());
+ snprintf(buffer, SIZE, "h/w composer state:\n");
+ result.append(buffer);
+ snprintf(buffer, SIZE, " h/w composer %s and %s\n",
+ hwc.initCheck()==NO_ERROR ? "present" : "not present",
+ (mDebugDisableHWC || mDebugRegion) ? "disabled" : "enabled");
+ result.append(buffer);
+ hwc.dump(result, buffer, SIZE, mVisibleLayersSortedByZ);
+
+ /*
+ * Dump gralloc state
+ */
+ const GraphicBufferAllocator& alloc(GraphicBufferAllocator::get());
+ alloc.dump(result);
+ hw.dump(result);
}
status_t SurfaceFlinger::onTransact(
diff --git a/services/surfaceflinger/SurfaceFlinger.h b/services/surfaceflinger/SurfaceFlinger.h
index 7f6c90c..c24a9de 100644
--- a/services/surfaceflinger/SurfaceFlinger.h
+++ b/services/surfaceflinger/SurfaceFlinger.h
@@ -170,7 +170,6 @@ public:
virtual void bootFinished();
virtual void setTransactionState(const Vector<ComposerState>& state,
int orientation, uint32_t flags);
- virtual int setOrientation(DisplayID dpy, int orientation, uint32_t flags);
virtual bool authenticateSurfaceTexture(const sp<ISurfaceTexture>& surface) const;
virtual sp<IDisplayEventConnection> createDisplayEventConnection();
@@ -337,6 +336,13 @@ private:
void debugFlashRegions();
void drawWormhole() const;
+ void listLayersLocked(const Vector<String16>& args, size_t& index,
+ String8& result, char* buffer, size_t SIZE) const;
+ void dumpStatsLocked(const Vector<String16>& args, size_t& index,
+ String8& result, char* buffer, size_t SIZE) const;
+ void clearStatsLocked(const Vector<String16>& args, size_t& index,
+ String8& result, char* buffer, size_t SIZE) const;
+ void dumpAllLocked(String8& result, char* buffer, size_t SIZE) const;
mutable MessageQueue mEventQueue;
diff --git a/services/surfaceflinger/SurfaceTextureLayer.cpp b/services/surfaceflinger/SurfaceTextureLayer.cpp
index 259b937..49e8e63 100644
--- a/services/surfaceflinger/SurfaceTextureLayer.cpp
+++ b/services/surfaceflinger/SurfaceTextureLayer.cpp
@@ -94,6 +94,10 @@ status_t SurfaceTextureLayer::connect(int api,
*outTransform = orientation;
}
switch(api) {
+ case NATIVE_WINDOW_API_CPU:
+ // SurfaceTextureClient supports only 2 buffers for CPU connections
+ this->setBufferCountServer(2);
+ break;
case NATIVE_WINDOW_API_MEDIA:
case NATIVE_WINDOW_API_CAMERA:
// Camera preview and videos are rate-limited on the producer
diff --git a/services/surfaceflinger/tests/vsync/vsync.cpp b/services/surfaceflinger/tests/vsync/vsync.cpp
index 4f79080..b0d54c4 100644
--- a/services/surfaceflinger/tests/vsync/vsync.cpp
+++ b/services/surfaceflinger/tests/vsync/vsync.cpp
@@ -55,6 +55,8 @@ int main(int argc, char** argv)
loop->addFd(myDisplayEvent.getFd(), 0, ALOOPER_EVENT_INPUT, receiver,
&myDisplayEvent);
+ myDisplayEvent.setVsyncRate(1);
+
do {
//printf("about to poll...\n");
int32_t ret = loop->pollOnce(-1);