From f67748038935e609aa85450b20d550b4813c9429 Mon Sep 17 00:00:00 2001 From: Eric Anholt Date: Wed, 16 Dec 2009 15:50:40 -0800 Subject: intel: Replace some gen3 IS_* checks with context structure usage. Shaves 400 bytes or so from i915_dri.so. --- src/mesa/drivers/dri/intel/intel_context.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'src/mesa/drivers/dri/intel/intel_context.c') diff --git a/src/mesa/drivers/dri/intel/intel_context.c b/src/mesa/drivers/dri/intel/intel_context.c index 6f567dc4d0..02e0cc7b33 100644 --- a/src/mesa/drivers/dri/intel/intel_context.c +++ b/src/mesa/drivers/dri/intel/intel_context.c @@ -613,12 +613,16 @@ intelInitContext(struct intel_context *intel, intel->sarea = intelScreen->sarea; intel->driContext = driContextPriv; - if (IS_965(intel->intelScreen->deviceID)) + if (IS_965(intel->intelScreen->deviceID)) { intel->gen = 4; - else if (IS_9XX(intel->intelScreen->deviceID)) + } else if (IS_9XX(intel->intelScreen->deviceID)) { intel->gen = 3; - else + if (IS_945(intel->intelScreen->deviceID)) { + intel->is_945 = GL_TRUE; + } + } else { intel->gen = 2; + } if (IS_IGDNG(intel->intelScreen->deviceID)) { intel->is_ironlake = GL_TRUE; -- cgit v1.2.3