summaryrefslogtreecommitdiff
path: root/cogl/cogl-context.c
diff options
context:
space:
mode:
authorNeil Roberts <neil@linux.intel.com>2012-03-27 14:43:04 +0100
committerNeil Roberts <neil@linux.intel.com>2012-05-24 13:46:54 +0100
commit9c921377109dc39538b9326f36df4413c4503529 (patch)
treee6c1136e195374e40244b142510af1c469c946ab /cogl/cogl-context.c
parent2f30f1f2bf6e2327d8c19ba9879980f0429040a7 (diff)
downloadcogl-9c921377109dc39538b9326f36df4413c4503529.tar.gz
Add a mechanism for determining GPU driver details
This adds a CoglGpuInfo struct to the CoglContext which contains some enums describing the GL driver in use. This currently includes the driver package (ie, is it Mesa) the version number of the package and the vendor of the GPU (ie, is it by Intel). There is also a bitmask which will contain the workarounds that we should do for that particular driver configuration. The struct is initialised on context creation by using a series of string comparisons on the strings returned from glGetString. Reviewed-by: Robert Bragg <robert@linux.intel.com> (cherry picked from commit 2037e0f4f1bb61a5731d38d4b49c49a781f4c4e5)
Diffstat (limited to 'cogl/cogl-context.c')
-rw-r--r--cogl/cogl-context.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/cogl/cogl-context.c b/cogl/cogl-context.c
index c68ff41b..09da40a4 100644
--- a/cogl/cogl-context.c
+++ b/cogl/cogl-context.c
@@ -47,6 +47,7 @@
#include "cogl2-path.h"
#include "cogl-attribute-private.h"
#include "cogl1-context.h"
+#include "cogl-gpu-info-private.h"
#include <string.h>
@@ -239,6 +240,8 @@ cogl_context_new (CoglDisplay *display,
g_assert_not_reached ();
}
+ _cogl_gpu_info_init (context, &context->gpu);
+
context->attribute_name_states_hash =
g_hash_table_new_full (g_str_hash, g_str_equal, g_free, g_free);
context->attribute_name_index_map = NULL;