Shaves 400 bytes or so from i915_dri.so.
* the value of this bit, the pipeline needs to be MI_FLUSHed. And it
* can only be set when a depth buffer is already defined.
*/
- if (IS_945(intel->intelScreen->deviceID) && intel->use_early_z &&
+ if (intel->is_945 && intel->use_early_z &&
depth_region->tiling != I915_TILING_NONE)
value |= CLASSIC_EARLY_DEPTH;
intel->prim.count = 0;
offset = intel->prim.start_offset;
intel->prim.start_offset = intel->prim.current_offset;
- if (!IS_9XX(intel->intelScreen->deviceID))
+ if (!intel->gen >= 3)
intel->prim.start_offset = ALIGN(intel->prim.start_offset, 128);
intel->prim.flush = NULL;
intel->vertex_size * 4);
#endif
- if (IS_9XX(intel->intelScreen->deviceID)) {
+ if (intel->gen >= 3) {
BEGIN_BATCH(5, LOOP_CLIPRECTS);
OUT_BATCH(_3DSTATE_LOAD_STATE_IMMEDIATE_1 |
I1_LOAD_S(0) | I1_LOAD_S(1) | 1);
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;
GLboolean needs_ff_sync;
GLboolean is_ironlake;
GLboolean is_g4x;
+ GLboolean is_945;
GLboolean has_luminance_srgb;
int urb_size;
if (intel->gen >= 4)
driInitExtensions(ctx, brw_extensions, GL_FALSE);
- if (IS_915(intel->intelScreen->deviceID)
- || IS_945(intel->intelScreen->deviceID)) {
+ if (intel->gen == 3) {
driInitExtensions(ctx, i915_extensions, GL_FALSE);
if (driQueryOptionb(&intel->optionCache, "fragment_shader"))
mt->pitch = 0;
#ifdef I915
- if (IS_945(intel->intelScreen->deviceID))
+ if (intel->is_945)
ok = i945_miptree_layout(intel, mt, tiling);
else
ok = i915_miptree_layout(intel, mt, tiling);