@@ -710,7 +710,7 @@ intelInitContext(struct intel_context *intel,
intel->driFd = sPriv->fd;
intel->has_xrgb_textures = GL_TRUE;
- intel->gen = intelScreen->gen;
+ intel->gen = intelScreen->chipset.gen;
if (IS_GEN7(intel->intelScreen->deviceID)) {
intel->needs_ff_sync = GL_TRUE;
intel->has_luminance_srgb = GL_TRUE;
@@ -433,10 +433,6 @@ intelDestroyBuffer(__DRIdrawable * driDrawPriv)
* functions.
*/
-struct intel_chipset {
- int gen;
-};
-
#define CHIPSET(id, name, info) { id, &intel_chipset_##info },
@@ -523,7 +519,7 @@ intelCreateContext(gl_api api,
__DRIscreen *sPriv = driContextPriv->driScreenPriv;
struct intel_screen *intelScreen = sPriv->private;
- if (intelScreen->gen == 3) {
+ if (intelScreen->chipset.gen == 3) {
return i915CreateContext(api, mesaVis, driContextPriv,
sharedContextPrivate);
} else {
@@ -621,8 +617,8 @@ __DRIconfig **intelInitScreen2(__DRIscreen *psp)
for (i = 0; i < Elements(chipset_map); i++)
if (chipset_map[i].device_id == intelScreen->deviceID)
- intelScreen->gen = chipset_map[i].chipset->gen;
- if (intelScreen->gen == 0) {
+ intelScreen->chipset = *chipset_map[i].chipset;
+ if (intelScreen->chipset.gen == 0) {
fprintf(stderr, "\nERROR! Unrecognized chipset:: 0x%04x\n",
intelScreen->deviceID);
return GL_FALSE;
@@ -636,7 +632,7 @@ __DRIconfig **intelInitScreen2(__DRIscreen *psp)
api_mask |= (1 << __DRI_API_GLES2);
#endif
- if (intelScreen->gen >= 3)
+ if (intelScreen->chipset.gen >= 3)
psp->api_mask = api_mask;
if (!intel_init_bufmgr(intelScreen))
@@ -749,7 +745,7 @@ intelAllocateBuffer(__DRIscreen *screen,
if ((attachment == __DRI_BUFFER_DEPTH ||
attachment == __DRI_BUFFER_STENCIL ||
attachment == __DRI_BUFFER_DEPTH_STENCIL) &&
- intelScreen->gen >= 4)
+ intelScreen->chipset.gen >= 4)
tiling = I915_TILING_Y;
else
tiling = I915_TILING_X;
@@ -34,10 +34,14 @@
#include "i915_drm.h"
#include "xmlconfig.h"
+struct intel_chipset {
+ int gen;
+};
+
struct intel_screen
{
int deviceID;
- int gen;
+ struct intel_chipset chipset;
int logTextureGranularity;