diff options
author | Siva Velusamy <vsiva@google.com> | 2012-08-16 14:37:49 -0700 |
---|---|---|
committer | Siva Velusamy <vsiva@google.com> | 2012-08-16 14:37:49 -0700 |
commit | e14fceb160e402fbc781b332fe949409a033ebee (patch) | |
tree | c015859775c9cbaa6109267a83d487a7f7b84a5f /eclipse/plugins/com.android.ide.eclipse.gldebugger | |
parent | b8a2851136c91b6c4ff795ac5b0227dbb3b78e58 (diff) | |
download | sdk-e14fceb160e402fbc781b332fe949409a033ebee.zip sdk-e14fceb160e402fbc781b332fe949409a033ebee.tar.gz sdk-e14fceb160e402fbc781b332fe949409a033ebee.tar.bz2 |
gltrace: Support OES_EGL_image_external GL extension
The OES_EGL_image_external extension adds an additional state,
TEXTURE_EXTERNAL, to each texture unit.
Change-Id: I78c4cc1b1344a393183fd9004b5d85e1837da5bc
Diffstat (limited to 'eclipse/plugins/com.android.ide.eclipse.gldebugger')
4 files changed, 10 insertions, 4 deletions
diff --git a/eclipse/plugins/com.android.ide.eclipse.gldebugger/src/com/android/ide/eclipse/gltrace/editors/StateViewPage.java b/eclipse/plugins/com.android.ide.eclipse.gldebugger/src/com/android/ide/eclipse/gltrace/editors/StateViewPage.java index 7c71d91..64a200b 100644 --- a/eclipse/plugins/com.android.ide.eclipse.gldebugger/src/com/android/ide/eclipse/gltrace/editors/StateViewPage.java +++ b/eclipse/plugins/com.android.ide.eclipse.gldebugger/src/com/android/ide/eclipse/gltrace/editors/StateViewPage.java @@ -235,7 +235,7 @@ public class StateViewPage extends Page implements ISelectionListener, ISelectio } catch (Exception e) { GlTracePlugin.getDefault().logMessage("Error applying transformations for " + call); - GlTracePlugin.getDefault().logMessage(e.getMessage()); + GlTracePlugin.getDefault().logMessage(e.toString()); } } } diff --git a/eclipse/plugins/com.android.ide.eclipse.gldebugger/src/com/android/ide/eclipse/gltrace/state/GLState.java b/eclipse/plugins/com.android.ide.eclipse.gldebugger/src/com/android/ide/eclipse/gltrace/state/GLState.java index aac5ad3..6433095 100644 --- a/eclipse/plugins/com.android.ide.eclipse.gldebugger/src/com/android/ide/eclipse/gltrace/state/GLState.java +++ b/eclipse/plugins/com.android.ide.eclipse.gldebugger/src/com/android/ide/eclipse/gltrace/state/GLState.java @@ -23,7 +23,7 @@ import java.util.Collections; public class GLState { /** # of texture units modelled in the GL State. */ - public static final int TEXTURE_UNIT_COUNT = 8; + public static final int TEXTURE_UNIT_COUNT = 16; /** # of vertex attributes */ private static final int MAX_VERTEX_ATTRIBS = 8; @@ -253,8 +253,10 @@ public class GLState { Integer.valueOf(0)); IGLProperty bindingCubeMap = new GLIntegerProperty(GLStateType.TEXTURE_BINDING_CUBE_MAP, Integer.valueOf(0)); + IGLProperty bindingExternal = new GLIntegerProperty(GLStateType.TEXTURE_BINDING_EXTERNAL, + Integer.valueOf(0)); IGLProperty perTextureUnitState = new GLCompositeProperty( - GLStateType.PER_TEXTURE_UNIT_STATE, binding2D, bindingCubeMap); + GLStateType.PER_TEXTURE_UNIT_STATE, binding2D, bindingCubeMap, bindingExternal); IGLProperty textureUnitState = new GLListProperty(GLStateType.TEXTURE_UNITS, perTextureUnitState, TEXTURE_UNIT_COUNT); diff --git a/eclipse/plugins/com.android.ide.eclipse.gldebugger/src/com/android/ide/eclipse/gltrace/state/GLStateType.java b/eclipse/plugins/com.android.ide.eclipse.gldebugger/src/com/android/ide/eclipse/gltrace/state/GLStateType.java index f0e30f4..330e4f5 100644 --- a/eclipse/plugins/com.android.ide.eclipse.gldebugger/src/com/android/ide/eclipse/gltrace/state/GLStateType.java +++ b/eclipse/plugins/com.android.ide.eclipse.gldebugger/src/com/android/ide/eclipse/gltrace/state/GLStateType.java @@ -116,6 +116,7 @@ public enum GLStateType { PER_TEXTURE_UNIT_STATE("Texture Unit Properties"), TEXTURE_BINDING_2D("TEXTURE_2D Binding"), TEXTURE_BINDING_CUBE_MAP("TEXTURE_CUBE_MAP Binding"), + TEXTURE_BINDING_EXTERNAL("TEXTURE_EXTERNAL Binding"), TEXTURES("Textures"), PER_TEXTURE_STATE("Per Texture State"), TEXTURE_MIN_FILTER("Minification Function"), diff --git a/eclipse/plugins/com.android.ide.eclipse.gldebugger/src/com/android/ide/eclipse/gltrace/state/transforms/StateTransformFactory.java b/eclipse/plugins/com.android.ide.eclipse.gldebugger/src/com/android/ide/eclipse/gltrace/state/transforms/StateTransformFactory.java index f5aa164..f69f28d 100644 --- a/eclipse/plugins/com.android.ide.eclipse.gldebugger/src/com/android/ide/eclipse/gltrace/state/transforms/StateTransformFactory.java +++ b/eclipse/plugins/com.android.ide.eclipse.gldebugger/src/com/android/ide/eclipse/gltrace/state/transforms/StateTransformFactory.java @@ -947,8 +947,11 @@ public class StateTransformFactory { } private static GLStateType getTextureUnitTargetName(GLEnum target) { - if (target == GLEnum.GL_TEXTURE_BINDING_CUBE_MAP) { + if (target == GLEnum.GL_TEXTURE_CUBE_MAP) { return GLStateType.TEXTURE_BINDING_CUBE_MAP; + } else if (target == GLEnum.GL_TEXTURE_EXTERNAL) { + // added by OES_EGL_image_external + return GLStateType.TEXTURE_BINDING_EXTERNAL; } else { return GLStateType.TEXTURE_BINDING_2D; } |