diff options
-rw-r--r-- | helpers/CMakeLists.txt | 2 | ||||
-rw-r--r-- | helpers/glfeatures.cpp (renamed from helpers/glprofile.cpp) | 6 | ||||
-rw-r--r-- | helpers/glfeatures.hpp (renamed from helpers/glprofile.hpp) | 6 | ||||
-rw-r--r-- | retrace/glretrace.hpp | 12 | ||||
-rw-r--r-- | retrace/glretrace_cgl.cpp | 16 | ||||
-rw-r--r-- | retrace/glretrace_egl.cpp | 18 | ||||
-rw-r--r-- | retrace/glretrace_glx.cpp | 2 | ||||
-rwxr-xr-x | retrace/glretrace_main.cpp | 12 | ||||
-rw-r--r-- | retrace/glretrace_wgl.cpp | 4 | ||||
-rw-r--r-- | retrace/glretrace_ws.cpp | 20 | ||||
-rw-r--r-- | retrace/glstate.cpp | 4 | ||||
-rw-r--r-- | retrace/glws.cpp | 8 | ||||
-rw-r--r-- | retrace/glws.hpp | 6 | ||||
-rw-r--r-- | retrace/glws_cocoa.mm | 2 | ||||
-rw-r--r-- | retrace/glws_egl_android.cpp | 14 | ||||
-rw-r--r-- | retrace/glws_egl_xlib.cpp | 14 | ||||
-rw-r--r-- | retrace/glws_glx.cpp | 6 | ||||
-rw-r--r-- | retrace/glws_waffle.cpp | 6 | ||||
-rw-r--r-- | retrace/glws_wgl.cpp | 6 | ||||
-rw-r--r-- | retrace/metric_backend_opengl.cpp | 6 | ||||
-rw-r--r-- | wrappers/egltrace.py | 4 | ||||
-rw-r--r-- | wrappers/glcaps.cpp | 4 | ||||
-rw-r--r-- | wrappers/gltrace.hpp | 6 | ||||
-rw-r--r-- | wrappers/gltrace.py | 4 | ||||
-rw-r--r-- | wrappers/gltrace_state.cpp | 2 |
25 files changed, 94 insertions, 96 deletions
diff --git a/helpers/CMakeLists.txt b/helpers/CMakeLists.txt index e2277d04..b4e96481 100644 --- a/helpers/CMakeLists.txt +++ b/helpers/CMakeLists.txt @@ -8,7 +8,7 @@ include_directories ( ) add_convenience_library (glhelpers - glprofile.cpp + glfeatures.cpp eglsize.cpp ) add_dependencies (glhelpers glproc) diff --git a/helpers/glprofile.cpp b/helpers/glfeatures.cpp index 5520c032..0a815a56 100644 --- a/helpers/glprofile.cpp +++ b/helpers/glfeatures.cpp @@ -24,7 +24,7 @@ **************************************************************************/ -#include "glprofile.hpp" +#include "glfeatures.hpp" #include <assert.h> @@ -34,7 +34,7 @@ #include "glproc.hpp" -namespace glprofile { +namespace glfeatures { bool @@ -322,4 +322,4 @@ Extensions::has(const char *string) const } -} /* namespace glprofile */ +} /* namespace glfeatures */ diff --git a/helpers/glprofile.hpp b/helpers/glfeatures.hpp index 397777dd..4eabc764 100644 --- a/helpers/glprofile.hpp +++ b/helpers/glfeatures.hpp @@ -37,7 +37,7 @@ #include <string> -namespace glprofile { +namespace glfeatures { enum Api { @@ -138,6 +138,4 @@ struct Extensions -} /* namespace glprofile */ - - +} /* namespace glfeatures */ diff --git a/retrace/glretrace.hpp b/retrace/glretrace.hpp index 6da4c480..0a0c2ddd 100644 --- a/retrace/glretrace.hpp +++ b/retrace/glretrace.hpp @@ -60,12 +60,12 @@ struct Context { bool KHR_debug; GLsizei maxDebugMessageLength = 0; - inline glprofile::Profile + inline glfeatures::Profile profile(void) const { return wsContext->profile; } - inline glprofile::Profile + inline glfeatures::Profile actualProfile(void) const { return wsContext->actualProfile; } @@ -84,7 +84,7 @@ extern std::vector<MetricBackend*> metricBackends; extern MetricBackend* curMetricBackend; extern MetricWriter profiler; -extern glprofile::Profile defaultProfile; +extern glfeatures::Profile defaultProfile; extern bool supportsARBShaderObjects; @@ -101,12 +101,12 @@ getCurrentContext(void) { int parseAttrib(const trace::Value *attribs, int param, int default_ = 0, int terminator = 0); -glprofile::Profile +glfeatures::Profile parseContextAttribList(const trace::Value *attribs); glws::Drawable * -createDrawable(glprofile::Profile profile); +createDrawable(glfeatures::Profile profile); glws::Drawable * createDrawable(void); @@ -115,7 +115,7 @@ glws::Drawable * createPbuffer(int width, int height, const glws::pbuffer_info *info); Context * -createContext(Context *shareContext, glprofile::Profile profile); +createContext(Context *shareContext, glfeatures::Profile profile); Context * createContext(Context *shareContext = 0); diff --git a/retrace/glretrace_cgl.cpp b/retrace/glretrace_cgl.cpp index 21c42ca9..7216581d 100644 --- a/retrace/glretrace_cgl.cpp +++ b/retrace/glretrace_cgl.cpp @@ -99,16 +99,16 @@ static Context *sharedContext = NULL; struct PixelFormat { - glprofile::Profile profile; + glfeatures::Profile profile; PixelFormat() : - profile(glprofile::API_GL, 1, 0) + profile(glfeatures::API_GL, 1, 0) {} }; static glws::Drawable * -getDrawable(unsigned long drawable_id, glprofile::Profile profile) { +getDrawable(unsigned long drawable_id, glfeatures::Profile profile) { if (drawable_id == 0) { return NULL; } @@ -235,13 +235,13 @@ static void retrace_CGLChoosePixelFormat(trace::Call &call) { case 0: break; case kCGLOGLPVersion_Legacy: - pixelFormat->profile = glprofile::Profile(glprofile::API_GL, 1, 0); + pixelFormat->profile = glfeatures::Profile(glfeatures::API_GL, 1, 0); break; case kCGLOGLPVersion_GL3_Core: - pixelFormat->profile = glprofile::Profile(glprofile::API_GL, 3, 2, true, true); + pixelFormat->profile = glfeatures::Profile(glfeatures::API_GL, 3, 2, true, true); break; case kCGLOGLPVersion_GL4_Core: - pixelFormat->profile = glprofile::Profile(glprofile::API_GL, 4, 1, true, true); + pixelFormat->profile = glfeatures::Profile(glfeatures::API_GL, 4, 1, true, true); break; default: retrace::warning(call) << "unexpected opengl profile " << std::hex << profile << std::dec << "\n"; @@ -276,7 +276,7 @@ static void retrace_CGLCreateContext(trace::Call &call) { trace::Value & pix = call.argByName("pix"); const PixelFormat *pixelFormat = retrace::asObjPointer<PixelFormat>(call, pix); - glprofile::Profile profile = pixelFormat ? pixelFormat->profile : glretrace::defaultProfile; + glfeatures::Profile profile = pixelFormat ? pixelFormat->profile : glretrace::defaultProfile; unsigned long long share = call.arg(1).toUIntPtr(); Context *sharedContext = getContext(share); @@ -354,7 +354,7 @@ static void retrace_CGLSetCurrentContext(trace::Call &call) { glws::Drawable *new_drawable = NULL; if (new_context) { if (!new_context->drawable) { - glprofile::Profile profile = new_context->profile(); + glfeatures::Profile profile = new_context->profile(); new_context->drawable = glretrace::createDrawable(profile); } new_drawable = new_context->drawable; diff --git a/retrace/glretrace_egl.cpp b/retrace/glretrace_egl.cpp index c6fabddc..e9038e74 100644 --- a/retrace/glretrace_egl.cpp +++ b/retrace/glretrace_egl.cpp @@ -47,7 +47,7 @@ using namespace glretrace; typedef std::map<unsigned long long, glws::Drawable *> DrawableMap; typedef std::map<unsigned long long, Context *> ContextMap; -typedef std::map<unsigned long long, glprofile::Profile> ProfileMap; +typedef std::map<unsigned long long, glfeatures::Profile> ProfileMap; static DrawableMap drawable_map; static ContextMap context_map; static ProfileMap profile_map; @@ -61,7 +61,7 @@ static unsigned int current_api = EGL_OPENGL_ES_API; * instead of guessing. For now, start with a guess of ES2 profile, which * should be the most common case for EGL. */ -static glprofile::Profile last_profile(glprofile::API_GLES, 2, 0); +static glfeatures::Profile last_profile(glfeatures::API_GLES, 2, 0); static glws::Drawable *null_drawable = NULL; @@ -103,7 +103,7 @@ getContext(unsigned long long context_ptr) { static void createDrawable(unsigned long long orig_config, unsigned long long orig_surface) { ProfileMap::iterator it = profile_map.find(orig_config); - glprofile::Profile profile; + glfeatures::Profile profile; // If the requested config is associated with a profile, use that // profile. Otherwise, assume that the last used profile is what @@ -130,13 +130,13 @@ static void retrace_eglChooseConfig(trace::Call &call) { return; } - glprofile::Profile profile; + glfeatures::Profile profile; unsigned renderableType = parseAttrib(attrib_array, EGL_RENDERABLE_TYPE, EGL_OPENGL_ES_BIT); std::cerr << "renderableType = " << renderableType << "\n"; if (renderableType & EGL_OPENGL_BIT) { - profile = glprofile::Profile(glprofile::API_GL, 1, 0); + profile = glfeatures::Profile(glfeatures::API_GL, 1, 0); } else { - profile.api = glprofile::API_GLES; + profile.api = glfeatures::API_GLES; if (renderableType & EGL_OPENGL_ES3_BIT) { profile.major = 3; } else if (renderableType & EGL_OPENGL_ES2_BIT) { @@ -195,11 +195,11 @@ static void retrace_eglCreateContext(trace::Call &call) { unsigned long long orig_config = call.arg(1).toUIntPtr(); Context *share_context = getContext(call.arg(2).toUIntPtr()); trace::Array *attrib_array = call.arg(3).toArray(); - glprofile::Profile profile; + glfeatures::Profile profile; switch (current_api) { case EGL_OPENGL_API: - profile.api = glprofile::API_GL; + profile.api = glfeatures::API_GL; profile.major = parseAttrib(attrib_array, EGL_CONTEXT_MAJOR_VERSION, 1); profile.minor = parseAttrib(attrib_array, EGL_CONTEXT_MINOR_VERSION, 0); if (profile.versionGreaterOrEqual(3,2)) { @@ -215,7 +215,7 @@ static void retrace_eglCreateContext(trace::Call &call) { break; case EGL_OPENGL_ES_API: default: - profile.api = glprofile::API_GLES; + profile.api = glfeatures::API_GLES; profile.major = parseAttrib(attrib_array, EGL_CONTEXT_MAJOR_VERSION, 1); profile.minor = parseAttrib(attrib_array, EGL_CONTEXT_MINOR_VERSION, 0); break; diff --git a/retrace/glretrace_glx.cpp b/retrace/glretrace_glx.cpp index 4cb631f7..944debcf 100644 --- a/retrace/glretrace_glx.cpp +++ b/retrace/glretrace_glx.cpp @@ -96,7 +96,7 @@ static void retrace_glXCreateContextAttribsARB(trace::Call &call) { Context *share_context = getContext(call.arg(2).toUIntPtr()); const trace::Value * attrib_list = &call.arg(4); - glprofile::Profile profile = parseContextAttribList(attrib_list); + glfeatures::Profile profile = parseContextAttribList(attrib_list); Context *context = glretrace::createContext(share_context, profile); context_map[orig_context] = context; diff --git a/retrace/glretrace_main.cpp b/retrace/glretrace_main.cpp index eac8c6a9..b53a818e 100755 --- a/retrace/glretrace_main.cpp +++ b/retrace/glretrace_main.cpp @@ -49,7 +49,7 @@ namespace glretrace { -glprofile::Profile defaultProfile(glprofile::API_GL, 1, 0); +glfeatures::Profile defaultProfile(glfeatures::API_GL, 1, 0); bool supportsARBShaderObjects = false; @@ -155,7 +155,7 @@ insertCallMarker(trace::Call &call, Context *currentContext) return; } - glprofile::Profile currentProfile = currentContext->actualProfile(); + glfeatures::Profile currentProfile = currentContext->actualProfile(); std::stringstream ss; trace::dump(call, ss, @@ -431,11 +431,11 @@ initContext() { assert(currentContext); /* Ensure we have adequate extension support */ - glprofile::Profile currentProfile = currentContext->actualProfile(); - supportsTimestamp = currentProfile.versionGreaterOrEqual(glprofile::API_GL, 3, 3) || + glfeatures::Profile currentProfile = currentContext->actualProfile(); + supportsTimestamp = currentProfile.versionGreaterOrEqual(glfeatures::API_GL, 3, 3) || currentContext->hasExtension("GL_ARB_timer_query"); supportsElapsed = currentContext->hasExtension("GL_EXT_timer_query") || supportsTimestamp; - supportsOcclusion = currentProfile.versionGreaterOrEqual(glprofile::API_GL, 1, 5); + supportsOcclusion = currentProfile.versionGreaterOrEqual(glfeatures::API_GL, 1, 5); supportsARBShaderObjects = currentContext->hasExtension("GL_ARB_shader_objects"); currentContext->KHR_debug = currentContext->hasExtension("GL_KHR_debug"); @@ -823,7 +823,7 @@ static GLDumper glDumper; void retrace::setFeatureLevel(const char *featureLevel) { - glretrace::defaultProfile = glprofile::Profile(glprofile::API_GL, 3, 2, true); + glretrace::defaultProfile = glfeatures::Profile(glfeatures::API_GL, 3, 2, true); } diff --git a/retrace/glretrace_wgl.cpp b/retrace/glretrace_wgl.cpp index 6c139791..6e889ba9 100644 --- a/retrace/glretrace_wgl.cpp +++ b/retrace/glretrace_wgl.cpp @@ -147,7 +147,7 @@ static void retrace_wglShareLists(trace::Call &call) { Context *share_context = getContext(hglrc1); Context *old_context = getContext(hglrc2); - glprofile::Profile profile = old_context->profile(); + glfeatures::Profile profile = old_context->profile(); Context *new_context = glretrace::createContext(share_context, profile); if (new_context) { glretrace::Context *currentContext = glretrace::getCurrentContext(); @@ -279,7 +279,7 @@ static void retrace_wglCreateContextAttribsARB(trace::Call &call) { Context *share_context = getContext(call.arg(1).toUIntPtr()); const trace::Value * attribList = &call.arg(2); - glprofile::Profile profile = parseContextAttribList(attribList); + glfeatures::Profile profile = parseContextAttribList(attribList); Context *context = glretrace::createContext(share_context, profile); context_map[orig_context] = context; diff --git a/retrace/glretrace_ws.cpp b/retrace/glretrace_ws.cpp index 6ab2f18b..e4e670be 100644 --- a/retrace/glretrace_ws.cpp +++ b/retrace/glretrace_ws.cpp @@ -44,13 +44,13 @@ namespace glretrace { -static std::map<glprofile::Profile, glws::Visual *> +static std::map<glfeatures::Profile, glws::Visual *> visuals; inline glws::Visual * -getVisual(glprofile::Profile profile) { - std::map<glprofile::Profile, glws::Visual *>::iterator it = visuals.find(profile); +getVisual(glfeatures::Profile profile) { + std::map<glfeatures::Profile, glws::Visual *>::iterator it = visuals.find(profile); if (it == visuals.end()) { glws::Visual *visual = NULL; unsigned samples = retrace::samples; @@ -76,7 +76,7 @@ getVisual(glprofile::Profile profile) { static glws::Drawable * -createDrawableHelper(glprofile::Profile profile, int width = 32, int height = 32, +createDrawableHelper(glfeatures::Profile profile, int width = 32, int height = 32, const glws::pbuffer_info *pbInfo = NULL) { glws::Visual *visual = getVisual(profile); glws::Drawable *draw = glws::createDrawable(visual, width, height, pbInfo); @@ -93,7 +93,7 @@ createDrawableHelper(glprofile::Profile profile, int width = 32, int height = 32 glws::Drawable * -createDrawable(glprofile::Profile profile) { +createDrawable(glfeatures::Profile profile) { return createDrawableHelper(profile); } @@ -116,7 +116,7 @@ createPbuffer(int width, int height, const glws::pbuffer_info *pbInfo) { Context * -createContext(Context *shareContext, glprofile::Profile profile) { +createContext(Context *shareContext, glfeatures::Profile profile) { glws::Visual *visual = getVisual(profile); glws::Context *shareWsContext = shareContext ? shareContext->wsContext : NULL; glws::Context *ctx = glws::createContext(visual, shareWsContext, retrace::debug); @@ -281,7 +281,7 @@ parseAttrib(const trace::Value *attribs, int param, int default_, int terminator /** * Parse GLX/WGL_ARB_create_context attribute list. */ -glprofile::Profile +glfeatures::Profile parseContextAttribList(const trace::Value *attribs) { // {GLX,WGL}_CONTEXT_MAJOR_VERSION_ARB @@ -308,11 +308,11 @@ parseContextAttribList(const trace::Value *attribs) // {GLX,WGL}_CONTEXT_ES_PROFILE_BIT_EXT bool es_profile = profile_mask & 0x0004; - glprofile::Profile profile; + glfeatures::Profile profile; if (es_profile) { - profile.api = glprofile::API_GLES; + profile.api = glfeatures::API_GLES; } else { - profile.api = glprofile::API_GL; + profile.api = glfeatures::API_GL; profile.core = core_profile; profile.forwardCompatible = forward_compatible; } diff --git a/retrace/glstate.cpp b/retrace/glstate.cpp index a3243740..81392f2d 100644 --- a/retrace/glstate.cpp +++ b/retrace/glstate.cpp @@ -44,8 +44,8 @@ namespace glstate { Context::Context(void) { memset(this, 0, sizeof *this); - glprofile::Profile profile = glprofile::getCurrentContextProfile(); - glprofile::Extensions ext; + glfeatures::Profile profile = glfeatures::getCurrentContextProfile(); + glfeatures::Extensions ext; ext.getCurrentContextExtensions(profile); diff --git a/retrace/glws.cpp b/retrace/glws.cpp index 4d036ca3..9c0df83b 100644 --- a/retrace/glws.cpp +++ b/retrace/glws.cpp @@ -79,7 +79,7 @@ Context::initialize(void) { assert(!initialized); - actualProfile = glprofile::getCurrentContextProfile(); + actualProfile = glfeatures::getCurrentContextProfile(); actualExtensions.getCurrentContextExtensions(actualProfile); /* Ensure we got a matching profile. @@ -88,10 +88,10 @@ Context::initialize(void) * * Also, see if OpenGL ES can be handled through ARB_ES*_compatibility. */ - glprofile::Profile expectedProfile = profile; + glfeatures::Profile expectedProfile = profile; if (!actualProfile.matches(expectedProfile)) { - if (expectedProfile.api == glprofile::API_GLES && - actualProfile.api == glprofile::API_GL && + if (expectedProfile.api == glfeatures::API_GLES && + actualProfile.api == glfeatures::API_GL && ((expectedProfile.major == 2 && actualExtensions.has("GL_ARB_ES2_compatibility")) || (expectedProfile.major == 3 && actualExtensions.has("GL_ARB_ES3_compatibility")))) { std::cerr << "warning: context mismatch:" diff --git a/retrace/glws.hpp b/retrace/glws.hpp index fd234c5a..d9fccd17 100644 --- a/retrace/glws.hpp +++ b/retrace/glws.hpp @@ -35,13 +35,13 @@ #include <vector> #include <string> -#include "glprofile.hpp" +#include "glfeatures.hpp" namespace glws { -using glprofile::Profile; +using glfeatures::Profile; class Drawable; @@ -164,7 +164,7 @@ public: // Created profile Profile actualProfile; - glprofile::Extensions actualExtensions; + glfeatures::Extensions actualExtensions; Context(const Visual *vis) : visual(vis), diff --git a/retrace/glws_cocoa.mm b/retrace/glws_cocoa.mm index f8b32926..080f5524 100644 --- a/retrace/glws_cocoa.mm +++ b/retrace/glws_cocoa.mm @@ -244,7 +244,7 @@ createVisual(bool doubleBuffer, unsigned samples, Profile profile) { attribs.add(NSOpenGLPFADepthSize, (NSOpenGLPixelFormatAttribute)1); attribs.add(NSOpenGLPFAStencilSize, (NSOpenGLPixelFormatAttribute)1); - if (profile.api != glprofile::API_GL) { + if (profile.api != glfeatures::API_GL) { return NULL; } diff --git a/retrace/glws_egl_android.cpp b/retrace/glws_egl_android.cpp index 377d91bf..88a0de9f 100644 --- a/retrace/glws_egl_android.cpp +++ b/retrace/glws_egl_android.cpp @@ -124,12 +124,12 @@ private: }; static EGLenum -translateAPI(glprofile::Profile profile) +translateAPI(glfeatures::Profile profile) { switch (profile.api) { - case glprofile::API_GL: + case glfeatures::API_GL: return EGL_OPENGL_API; - case glprofile::API_GLES: + case glfeatures::API_GLES: return EGL_OPENGL_ES_API; default: assert(0); @@ -348,12 +348,12 @@ cleanup(void) { Visual * createVisual(bool doubleBuffer, unsigned samples, Profile profile) { EGLint api_bits; - if (profile.api == glprofile::API_GL) { + if (profile.api == glfeatures::API_GL) { api_bits = EGL_OPENGL_BIT; if (profile.core && !has_EGL_KHR_create_context) { return NULL; } - } else if (profile.api == glprofile::API_GLES) { + } else if (profile.api == glfeatures::API_GLES) { switch (profile.major) { case 1: api_bits = EGL_OPENGL_ES_BIT; @@ -463,7 +463,7 @@ createContext(const Visual *_visual, Context *shareContext, bool debug) } int contextFlags = 0; - if (profile.api == glprofile::API_GL) { + if (profile.api == glfeatures::API_GL) { if (has_EGL_KHR_create_context) { attribs.add(EGL_CONTEXT_MAJOR_VERSION_KHR, profile.major); attribs.add(EGL_CONTEXT_MINOR_VERSION_KHR, profile.minor); @@ -476,7 +476,7 @@ createContext(const Visual *_visual, Context *shareContext, bool debug) std::cerr << "error: EGL_KHR_create_context not supported\n"; return NULL; } - } else if (profile.api == glprofile::API_GLES) { + } else if (profile.api == glfeatures::API_GLES) { if (has_EGL_KHR_create_context) { attribs.add(EGL_CONTEXT_MAJOR_VERSION_KHR, profile.major); attribs.add(EGL_CONTEXT_MINOR_VERSION_KHR, profile.minor); diff --git a/retrace/glws_egl_xlib.cpp b/retrace/glws_egl_xlib.cpp index f5921a9b..d1297375 100644 --- a/retrace/glws_egl_xlib.cpp +++ b/retrace/glws_egl_xlib.cpp @@ -47,12 +47,12 @@ static bool has_EGL_KHR_create_context = false; static EGLenum -translateAPI(glprofile::Profile profile) +translateAPI(glfeatures::Profile profile) { switch (profile.api) { - case glprofile::API_GL: + case glfeatures::API_GL: return EGL_OPENGL_API; - case glprofile::API_GLES: + case glfeatures::API_GLES: return EGL_OPENGL_ES_API; default: assert(0); @@ -294,12 +294,12 @@ cleanup(void) { Visual * createVisual(bool doubleBuffer, unsigned samples, Profile profile) { EGLint api_bits; - if (profile.api == glprofile::API_GL) { + if (profile.api == glfeatures::API_GL) { api_bits = EGL_OPENGL_BIT; if (profile.core && !has_EGL_KHR_create_context) { return NULL; } - } else if (profile.api == glprofile::API_GLES) { + } else if (profile.api == glfeatures::API_GLES) { switch (profile.major) { case 1: api_bits = EGL_OPENGL_ES_BIT; @@ -413,7 +413,7 @@ createContext(const Visual *_visual, Context *shareContext, bool debug) } int contextFlags = 0; - if (profile.api == glprofile::API_GL) { + if (profile.api == glfeatures::API_GL) { load("libGL.so.1"); if (has_EGL_KHR_create_context) { @@ -428,7 +428,7 @@ createContext(const Visual *_visual, Context *shareContext, bool debug) std::cerr << "error: EGL_KHR_create_context not supported\n"; return NULL; } - } else if (profile.api == glprofile::API_GLES) { + } else if (profile.api == glfeatures::API_GLES) { if (profile.major >= 2) { load("libGLESv2.so.2"); } else { diff --git a/retrace/glws_glx.cpp b/retrace/glws_glx.cpp index 5743e772..7577accb 100644 --- a/retrace/glws_glx.cpp +++ b/retrace/glws_glx.cpp @@ -291,7 +291,7 @@ createContext(const Visual *_visual, Context *shareContext, bool debug) Attributes<int> attribs; attribs.add(GLX_RENDER_TYPE, GLX_RGBA_TYPE); int contextFlags = 0; - if (profile.api == glprofile::API_GL) { + if (profile.api == glfeatures::API_GL) { attribs.add(GLX_CONTEXT_MAJOR_VERSION_ARB, profile.major); attribs.add(GLX_CONTEXT_MINOR_VERSION_ARB, profile.minor); if (profile.versionGreaterOrEqual(3, 2)) { @@ -305,7 +305,7 @@ createContext(const Visual *_visual, Context *shareContext, bool debug) contextFlags |= GLX_CONTEXT_FORWARD_COMPATIBLE_BIT_ARB; } } - } else if (profile.api == glprofile::API_GLES) { + } else if (profile.api == glfeatures::API_GLES) { if (has_GLX_EXT_create_context_es_profile) { attribs.add(GLX_CONTEXT_PROFILE_MASK_ARB, GLX_CONTEXT_ES_PROFILE_BIT_EXT); attribs.add(GLX_CONTEXT_MAJOR_VERSION_ARB, profile.major); @@ -343,7 +343,7 @@ createContext(const Visual *_visual, Context *shareContext, bool debug) return createContext(_visual, shareContext, false); } } else { - if (profile.api != glprofile::API_GL || + if (profile.api != glfeatures::API_GL || profile.core) { return NULL; } diff --git a/retrace/glws_waffle.cpp b/retrace/glws_waffle.cpp index 6b34eb04..7f7e5831 100644 --- a/retrace/glws_waffle.cpp +++ b/retrace/glws_waffle.cpp @@ -173,9 +173,9 @@ createVisual(bool doubleBuffer, unsigned samples, Profile profile) { struct waffle_config *cfg; int waffle_api; - if (profile.api == glprofile::API_GL) { + if (profile.api == glfeatures::API_GL) { waffle_api = WAFFLE_CONTEXT_OPENGL; - } else if (profile.api == glprofile::API_GLES) { + } else if (profile.api == glfeatures::API_GLES) { switch (profile.major) { case 1: waffle_api = WAFFLE_CONTEXT_OPENGL_ES1; @@ -204,7 +204,7 @@ createVisual(bool doubleBuffer, unsigned samples, Profile profile) { Attributes<int32_t> config_attrib_list; config_attrib_list.add(WAFFLE_CONTEXT_API, waffle_api); - if (profile.api == glprofile::API_GL) { + if (profile.api == glfeatures::API_GL) { config_attrib_list.add(WAFFLE_CONTEXT_MAJOR_VERSION, profile.major); config_attrib_list.add(WAFFLE_CONTEXT_MINOR_VERSION, profile.minor); if (profile.versionGreaterOrEqual(3, 2)) { diff --git a/retrace/glws_wgl.cpp b/retrace/glws_wgl.cpp index 2c5e2f7f..6658f39b 100644 --- a/retrace/glws_wgl.cpp +++ b/retrace/glws_wgl.cpp @@ -217,7 +217,7 @@ public: bool createARB(HDC hDC) { - bool required = profile.api != glprofile::API_GL || + bool required = profile.api != glfeatures::API_GL || profile.versionGreaterOrEqual(3, 1); // We need to create context through WGL_ARB_create_context. This @@ -293,7 +293,7 @@ public: Attributes<int> attribs; int contextFlags = 0; - if (profile.api == glprofile::API_GL) { + if (profile.api == glfeatures::API_GL) { attribs.add(WGL_CONTEXT_MAJOR_VERSION_ARB, profile.major); attribs.add(WGL_CONTEXT_MINOR_VERSION_ARB, profile.minor); if (profile.versionGreaterOrEqual(3, 2)) { @@ -308,7 +308,7 @@ public: contextFlags |= WGL_CONTEXT_FORWARD_COMPATIBLE_BIT_ARB; } } - } else if (profile.api == glprofile::API_GLES) { + } else if (profile.api == glfeatures::API_GLES) { if (checkExtension("WGL_EXT_create_context_es_profile", extensionsString)) { attribs.add(WGL_CONTEXT_PROFILE_MASK_ARB, WGL_CONTEXT_ES_PROFILE_BIT_EXT); attribs.add(WGL_CONTEXT_MAJOR_VERSION_ARB, profile.major); diff --git a/retrace/metric_backend_opengl.cpp b/retrace/metric_backend_opengl.cpp index 949c9222..9900a018 100644 --- a/retrace/metric_backend_opengl.cpp +++ b/retrace/metric_backend_opengl.cpp @@ -77,11 +77,11 @@ MetricBackend_opengl::MetricBackend_opengl(glretrace::Context* context, MmapAllocator<char> &alloc) : alloc(alloc) { - glprofile::Profile currentProfile = context->actualProfile(); - supportsTimestamp = currentProfile.versionGreaterOrEqual(glprofile::API_GL, 3, 3) || + glfeatures::Profile currentProfile = context->actualProfile(); + supportsTimestamp = currentProfile.versionGreaterOrEqual(glfeatures::API_GL, 3, 3) || context->hasExtension("GL_ARB_timer_query"); supportsElapsed = context->hasExtension("GL_EXT_timer_query") || supportsTimestamp; - supportsOcclusion = currentProfile.versionGreaterOrEqual(glprofile::API_GL, 1, 5); + supportsOcclusion = currentProfile.versionGreaterOrEqual(glfeatures::API_GL, 1, 5); #ifdef __APPLE__ // GL_TIMESTAMP doesn't work on Apple. GL_TIME_ELAPSED still does however. diff --git a/wrappers/egltrace.py b/wrappers/egltrace.py index abd3bfcc..333809b9 100644 --- a/wrappers/egltrace.py +++ b/wrappers/egltrace.py @@ -64,11 +64,11 @@ class EglTracer(GlTracer): print r' EGLint api = EGL_OPENGL_ES_API;' print r' _eglQueryContext(dpy, ctx, EGL_CONTEXT_CLIENT_TYPE, &api);' print r' if (api == EGL_OPENGL_API) {' - print r' assert(tr->profile.api == glprofile::API_GL);' + print r' assert(tr->profile.api == glfeatures::API_GL);' print r' } else if (api == EGL_OPENGL_ES_API) {' print r' EGLint client_version = 1;' print r' _eglQueryContext(dpy, ctx, EGL_CONTEXT_CLIENT_VERSION, &client_version);' - print r' if (tr->profile.api != glprofile::API_GLES ||' + print r' if (tr->profile.api != glfeatures::API_GLES ||' print r' tr->profile.major < client_version) {' print r' std::string version = tr->profile.str();' print r' os::log("apitrace: warning: eglMakeCurrent: expected OpenGL ES %i.x context, but got %s\n",' diff --git a/wrappers/glcaps.cpp b/wrappers/glcaps.cpp index 85a76a87..e680fdd9 100644 --- a/wrappers/glcaps.cpp +++ b/wrappers/glcaps.cpp @@ -101,9 +101,9 @@ const struct ExtensionsDesc * getExtraExtensions(const Context *ctx) { switch (ctx->profile.api) { - case glprofile::API_GL: + case glfeatures::API_GL: return &extraExtensionsFull; - case glprofile::API_GLES: + case glfeatures::API_GLES: return &extraExtensionsES; default: assert(0); diff --git a/wrappers/gltrace.hpp b/wrappers/gltrace.hpp index 5b4a4f44..7e05ad69 100644 --- a/wrappers/gltrace.hpp +++ b/wrappers/gltrace.hpp @@ -32,7 +32,7 @@ #include "glimports.hpp" -#include "glprofile.hpp" +#include "glfeatures.hpp" namespace gltrace { @@ -85,7 +85,7 @@ public: class Context { public: - glprofile::Profile profile; + glfeatures::Profile profile; bool user_arrays; bool user_arrays_nv; bool userArraysOnBegin; @@ -98,7 +98,7 @@ public: std::map <GLuint, Buffer> buffers; Context(void) : - profile(glprofile::API_GL, 1, 0), + profile(glfeatures::API_GL, 1, 0), user_arrays(false), user_arrays_nv(false), userArraysOnBegin(false), diff --git a/wrappers/gltrace.py b/wrappers/gltrace.py index 3695e977..fe1af817 100644 --- a/wrappers/gltrace.py +++ b/wrappers/gltrace.py @@ -153,7 +153,7 @@ class GlTracer(Tracer): print ' return false;' print ' }' print - print ' glprofile::Profile profile = ctx->profile;' + print ' glfeatures::Profile profile = ctx->profile;' print ' bool es1 = profile.es() && profile.major == 1;' print @@ -969,7 +969,7 @@ class GlTracer(Tracer): print '{' print ' gltrace::Context *ctx = gltrace::getContext();' print - print ' glprofile::Profile profile = ctx->profile;' + print ' glfeatures::Profile profile = ctx->profile;' print ' bool es1 = profile.es() && profile.major == 1;' print diff --git a/wrappers/gltrace_state.cpp b/wrappers/gltrace_state.cpp index 4ef095bd..be029fdd 100644 --- a/wrappers/gltrace_state.cpp +++ b/wrappers/gltrace_state.cpp @@ -141,7 +141,7 @@ void setContext(uintptr_t context_id) ts->current_context = ctx; if (!ctx->bound) { - ctx->profile = glprofile::getCurrentContextProfile(); + ctx->profile = glfeatures::getCurrentContextProfile(); /* * The default viewport and scissor state is set when a context is |