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>
This commit is contained in:
@ -48,6 +48,7 @@
|
||||
#include "cogl-texture-3d.h"
|
||||
#include "cogl-texture-rectangle.h"
|
||||
#include "cogl-sampler-cache-private.h"
|
||||
#include "cogl-gpu-info-private.h"
|
||||
|
||||
typedef struct
|
||||
{
|
||||
@ -64,6 +65,10 @@ struct _CoglContext
|
||||
|
||||
CoglDriver driver;
|
||||
|
||||
/* Information about the GPU and driver which we can use to
|
||||
determine certain workarounds */
|
||||
CoglGpuInfo gpu;
|
||||
|
||||
/* vtables for the driver functions */
|
||||
const CoglDriverVtable *driver_vtable;
|
||||
const CoglTextureDriver *texture_driver;
|
||||
|
Reference in New Issue
Block a user