diff options
author | Jose Fonseca <jfonseca@vmware.com> | 2016-04-04 23:24:32 +0100 |
---|---|---|
committer | Jose Fonseca <jfonseca@vmware.com> | 2016-04-05 16:44:22 +0100 |
commit | 0a676c559cdc006f2ecf935dbc925a94aa8a0052 (patch) | |
tree | c66126810727157ab8a3a8e790ecde2d8f41a6f4 /helpers | |
parent | bfed7cefc1319c32476069e19573ef794657f5f9 (diff) |
gltrace,glretrace: Handle GL_ARB_query_buffer_object correctly.
More specifically, treat pointers as offsets when GL_QUERY_BUFFER is
bound to a buffer.
Code changes follow closely the similar logic used for PBOs.
https://github.com/apitrace/apitrace/issues/442
Diffstat (limited to 'helpers')
-rw-r--r-- | helpers/glfeatures.cpp | 8 | ||||
-rw-r--r-- | helpers/glfeatures.hpp | 3 |
2 files changed, 10 insertions, 1 deletions
diff --git a/helpers/glfeatures.cpp b/helpers/glfeatures.cpp index 39531e71..e862b89e 100644 --- a/helpers/glfeatures.cpp +++ b/helpers/glfeatures.cpp @@ -356,6 +356,14 @@ Features::load(const Profile & profile, const Extensions & ext) ext.has("GL_ARB_pixel_buffer_object") || ext.has("GL_EXT_pixel_buffer_object"); } + + if (profile.desktop()) { + query_buffer_object = profile.versionGreaterOrEqual(4, 4) || + ext.has("GL_ARB_query_buffer_object") || + ext.has("GL_AMD_query_buffer_object"); + } else { + query_buffer_object = 0; + } } diff --git a/helpers/glfeatures.hpp b/helpers/glfeatures.hpp index 916004c8..3ac176d3 100644 --- a/helpers/glfeatures.hpp +++ b/helpers/glfeatures.hpp @@ -69,7 +69,7 @@ struct Profile { } inline bool - desktop(void) { + desktop(void) const { return api == API_GL; } @@ -156,6 +156,7 @@ struct Features unsigned ARB_program_interface_query:1; unsigned pixel_buffer_object:1; + unsigned query_buffer_object:1; Features(void); |