aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJesse Barker <jesse.barker@linaro.org>2012-12-05 14:19:12 -0800
committerJesse Barker <jesse.barker@linaro.org>2012-12-05 14:19:12 -0800
commit413f587b3c01afd3e1dbe636ecc4bc4910d563b1 (patch)
treed5d718a639b727c30351f9270d82494f6e36d700
parenta9041c49c67f0abb48abd54bde24dbe4bd48fa29 (diff)
downloadglmark2-413f587b3c01afd3e1dbe636ecc4bc4910d563b1.tar.gz
EGLState: Add remaining config attributes from table 3.1 of the EGL spec. These
are unused at the moment but may be useful for debugging.
-rw-r--r--src/egl-state.cpp57
-rw-r--r--src/egl-state.h21
2 files changed, 74 insertions, 4 deletions
diff --git a/src/egl-state.cpp b/src/egl-state.cpp
index 40cb837..e0f7ca5 100644
--- a/src/egl-state.cpp
+++ b/src/egl-state.cpp
@@ -38,10 +38,19 @@ EglConfig::EglConfig(EGLDisplay dpy, EGLConfig config) :
luminanceSize_(0),
alphaSize_(0),
alphaMaskSize_(0),
+ bindTexRGB_(false),
+ bindTexRGBA_(false),
bufferType_(EGL_RGB_BUFFER),
caveat_(0),
configID_(0),
+ conformant_(0),
depthSize_(0),
+ level_(0),
+ pbufferWidth_(0),
+ pbufferHeight_(0),
+ pbufferPixels_(0),
+ minSwapInterval_(0),
+ maxSwapInterval_(0),
nativeID_(0),
nativeType_(0),
nativeRenderable_(false),
@@ -63,6 +72,10 @@ EglConfig::EglConfig(EGLDisplay dpy, EGLConfig config) :
{
badAttribVec.push_back("EGL_CONFIG_CAVEAT");
}
+ if (!eglGetConfigAttrib(dpy, handle_, EGL_CONFORMANT, &conformant_))
+ {
+ badAttribVec.push_back("EGL_CONFORMANT");
+ }
if (!eglGetConfigAttrib(dpy, handle_, EGL_COLOR_BUFFER_TYPE, &bufferType_))
{
badAttribVec.push_back("EGL_COLOR_BUFFER_TYPE");
@@ -98,6 +111,10 @@ EglConfig::EglConfig(EGLDisplay dpy, EGLConfig config) :
{
badAttribVec.push_back("EGL_ALPHA_SIZE");
}
+ if (!eglGetConfigAttrib(dpy, handle_, EGL_ALPHA_MASK_SIZE, &alphaMaskSize_))
+ {
+ badAttribVec.push_back("EGL_ALPHA_MASK_SIZE");
+ }
if (!eglGetConfigAttrib(dpy, handle_, EGL_DEPTH_SIZE, &depthSize_))
{
badAttribVec.push_back("EGL_DEPTH_SIZE");
@@ -106,15 +123,47 @@ EglConfig::EglConfig(EGLDisplay dpy, EGLConfig config) :
{
badAttribVec.push_back("EGL_STENCIL_SIZE");
}
+ EGLint doBind(EGL_FALSE);
+ if (!eglGetConfigAttrib(dpy, handle_, EGL_BIND_TO_TEXTURE_RGB, &doBind))
+ {
+ badAttribVec.push_back("EGL_BIND_TO_TEXTURE_RGB");
+ }
+ bindTexRGB_ = (doBind == EGL_TRUE);
+ if (!eglGetConfigAttrib(dpy, handle_, EGL_BIND_TO_TEXTURE_RGBA, &doBind))
+ {
+ badAttribVec.push_back("EGL_BIND_TO_TEXTURE_RGBA");
+ }
+ bindTexRGBA_ = (doBind == EGL_TRUE);
+ if (!eglGetConfigAttrib(dpy, handle_, EGL_LEVEL, &level_))
+ {
+ badAttribVec.push_back("EGL_LEVEL");
+ }
+ if (!eglGetConfigAttrib(dpy, handle_, EGL_MAX_PBUFFER_WIDTH, &pbufferWidth_))
+ {
+ badAttribVec.push_back("EGL_MAX_PBUFFER_WIDTH");
+ }
+ if (!eglGetConfigAttrib(dpy, handle_, EGL_MAX_PBUFFER_HEIGHT, &pbufferHeight_))
+ {
+ badAttribVec.push_back("EGL_MAX_PBUFFER_HEIGHT");
+ }
+ if (!eglGetConfigAttrib(dpy, handle_, EGL_MAX_PBUFFER_PIXELS, &pbufferPixels_))
+ {
+ badAttribVec.push_back("EGL_MAX_PBUFFER_PIXELS");
+ }
+ if (!eglGetConfigAttrib(dpy, handle_, EGL_MIN_SWAP_INTERVAL, &minSwapInterval_))
+ {
+ badAttribVec.push_back("EGL_MIN_SWAP_INTERVAL");
+ }
+ if (!eglGetConfigAttrib(dpy, handle_, EGL_MAX_SWAP_INTERVAL, &maxSwapInterval_))
+ {
+ badAttribVec.push_back("EGL_MAX_SWAP_INTERVAL");
+ }
EGLint doNative(EGL_FALSE);
if (!eglGetConfigAttrib(dpy, handle_, EGL_NATIVE_RENDERABLE, &doNative))
{
badAttribVec.push_back("EGL_NATIVE_RENDERABLE");
}
- if (doNative == EGL_TRUE)
- {
- nativeRenderable_ = true;
- }
+ nativeRenderable_ = (doNative == EGL_TRUE);
if (!eglGetConfigAttrib(dpy, handle_, EGL_NATIVE_VISUAL_TYPE, &nativeType_))
{
badAttribVec.push_back("EGL_NATIVE_VISUAL_TYPE");
diff --git a/src/egl-state.h b/src/egl-state.h
index bd21e8d..2eaeba3 100644
--- a/src/egl-state.h
+++ b/src/egl-state.h
@@ -37,12 +37,24 @@ class EglConfig
EGLint luminanceSize_;
EGLint alphaSize_;
EGLint alphaMaskSize_;
+ bool bindTexRGB_;
+ bool bindTexRGBA_;
EGLint bufferType_;
// Base config attributes
EGLint caveat_;
EGLint configID_;
+ EGLint conformant_;
// Depth buffer
EGLint depthSize_;
+ // Framebuffer level
+ EGLint level_;
+ // Pbuffers
+ EGLint pbufferWidth_;
+ EGLint pbufferHeight_;
+ EGLint pbufferPixels_;
+ // Swap interval
+ EGLint minSwapInterval_;
+ EGLint maxSwapInterval_;
// Native window system attributes.
EGLint nativeID_;
EGLint nativeType_;
@@ -69,10 +81,19 @@ public:
luminanceSize_(0),
alphaSize_(0),
alphaMaskSize_(0),
+ bindTexRGB_(false),
+ bindTexRGBA_(false),
bufferType_(EGL_RGB_BUFFER),
caveat_(0),
configID_(0),
+ conformant_(0),
depthSize_(0),
+ level_(0),
+ pbufferWidth_(0),
+ pbufferHeight_(0),
+ pbufferPixels_(0),
+ minSwapInterval_(0),
+ maxSwapInterval_(0),
nativeID_(0),
nativeType_(0),
nativeRenderable_(false),