From patchwork Tue Aug 17 16:05:02 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Matthias Hopf X-Patchwork-Id: 119964 Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by demeter.kernel.org (8.14.4/8.14.3) with ESMTP id o7HG5YQi029313 for ; Tue, 17 Aug 2010 16:06:10 GMT Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 28F7C9E7B2 for ; Tue, 17 Aug 2010 09:05:34 -0700 (PDT) X-Original-To: intel-gfx@lists.freedesktop.org Delivered-To: intel-gfx@lists.freedesktop.org Received: from mx2.suse.de (cantor2.suse.de [195.135.220.15]) by gabe.freedesktop.org (Postfix) with ESMTP id 39E0C9E7A6 for ; Tue, 17 Aug 2010 09:05:04 -0700 (PDT) Received: from relay2.suse.de (charybdis-ext.suse.de [195.135.221.2]) by mx2.suse.de (Postfix) with ESMTP id CB30589471 for ; Tue, 17 Aug 2010 18:05:02 +0200 (CEST) From: Matthias Hopf To: intel-gfx@lists.freedesktop.org Date: Tue, 17 Aug 2010 18:05:02 +0200 Message-Id: <1282061102-572-1-git-send-email-mhopf@suse.de> X-Mailer: git-send-email 1.6.0.2 Subject: [Intel-gfx] [PATCH] Make driver compile for 1.6 Xserver series again. X-BeenThere: intel-gfx@lists.freedesktop.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: Intel graphics driver community testing & development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: intel-gfx-bounces+patchwork-intel-gfx=patchwork.kernel.org@lists.freedesktop.org Errors-To: intel-gfx-bounces+patchwork-intel-gfx=patchwork.kernel.org@lists.freedesktop.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.3 (demeter.kernel.org [140.211.167.41]); Tue, 17 Aug 2010 16:06:10 +0000 (UTC) diff --git a/src/i915_render.c b/src/i915_render.c index f50b5c9..fafdac5 100644 --- a/src/i915_render.c +++ b/src/i915_render.c @@ -82,8 +82,10 @@ static struct formatinfo i915_tex_formats[] = { {PICT_x8r8g8b8, MAPSURF_32BIT | MT_32BIT_XRGB8888}, {PICT_a8b8g8r8, MAPSURF_32BIT | MT_32BIT_ABGR8888}, {PICT_x8b8g8r8, MAPSURF_32BIT | MT_32BIT_XBGR8888}, +#if XORG_VERSION_CURRENT >= 10699900 {PICT_a2r10g10b10, MAPSURF_32BIT | MT_32BIT_ARGB2101010}, {PICT_a2b10g10r10, MAPSURF_32BIT | MT_32BIT_ABGR2101010}, +#endif {PICT_r5g6b5, MAPSURF_16BIT | MT_16BIT_RGB565}, {PICT_a1r5g5b5, MAPSURF_16BIT | MT_16BIT_ARGB1555}, {PICT_a4r4g4b4, MAPSURF_16BIT | MT_16BIT_ARGB4444}, @@ -156,10 +158,12 @@ static Bool i915_get_dest_format(PicturePtr dest_picture, uint32_t * dst_format) case PICT_x1r5g5b5: *dst_format = COLR_BUF_ARGB1555; break; +#if XORG_VERSION_CURRENT >= 10699900 case PICT_a2r10g10b10: case PICT_x2r10g10b10: *dst_format = COLR_BUF_ARGB2AAA; break; +#endif case PICT_a8: *dst_format = COLR_BUF_8BIT; break; diff --git a/src/i965_render.c b/src/i965_render.c index 37a7ab7..15fbe49 100644 --- a/src/i965_render.c +++ b/src/i965_render.c @@ -117,10 +117,12 @@ static struct formatinfo i965_tex_formats[] = { {PICT_r8g8b8, BRW_SURFACEFORMAT_R8G8B8_UNORM}, {PICT_r5g6b5, BRW_SURFACEFORMAT_B5G6R5_UNORM}, {PICT_a1r5g5b5, BRW_SURFACEFORMAT_B5G5R5A1_UNORM}, +#if XORG_VERSION_CURRENT >= 10699900 {PICT_a2r10g10b10, BRW_SURFACEFORMAT_B10G10R10A2_UNORM}, {PICT_x2r10g10b10, BRW_SURFACEFORMAT_B10G10R10X2_UNORM}, {PICT_a2b10g10r10, BRW_SURFACEFORMAT_R10G10B10A2_UNORM}, {PICT_x2r10g10b10, BRW_SURFACEFORMAT_B10G10R10X2_UNORM}, +#endif {PICT_a4r4g4b4, BRW_SURFACEFORMAT_B4G4R4A4_UNORM}, }; @@ -169,10 +171,12 @@ static Bool i965_get_dest_format(PicturePtr dest_picture, uint32_t * dst_format) case PICT_x8b8g8r8: *dst_format = BRW_SURFACEFORMAT_R8G8B8A8_UNORM; break; +#if XORG_VERSION_CURRENT >= 10699900 case PICT_a2r10g10b10: case PICT_x2r10g10b10: *dst_format = BRW_SURFACEFORMAT_B10G10R10A2_UNORM; break; +#endif case PICT_r5g6b5: *dst_format = BRW_SURFACEFORMAT_B5G6R5_UNORM; break; diff --git a/uxa/uxa-accel.c b/uxa/uxa-accel.c index a2ad651..a5066c8 100644 --- a/uxa/uxa-accel.c +++ b/uxa/uxa-accel.c @@ -47,7 +47,9 @@ format_for_depth(int depth) case 16: return PICT_r5g6b5; default: case 24: return PICT_x8r8g8b8; +#if XORG_VERSION_CURRENT >= 10699900 case 30: return PICT_x2r10g10b10; +#endif case 32: return PICT_a8r8g8b8; } } diff --git a/uxa/uxa-render.c b/uxa/uxa-render.c index 3194d23..fd8eb93 100644 --- a/uxa/uxa-render.c +++ b/uxa/uxa-render.c @@ -108,6 +108,7 @@ op_to_string(CARD8 op) /* * Operators only available in version 0.2 */ +#if RENDER_MAJOR >= 1 || RENDER_MINOR >= 2 C(DisjointClear); C(DisjointSrc); C(DisjointDst); @@ -133,10 +134,12 @@ op_to_string(CARD8 op) C(ConjointAtop); C(ConjointAtopReverse); C(ConjointXor); +#endif /* * Operators only available in version 0.11 */ +#if RENDER_MAJOR >= 1 || RENDER_MINOR >= 11 C(Multiply); C(Screen); C(Overlay); @@ -152,6 +155,7 @@ op_to_string(CARD8 op) C(HSLSaturation); C(HSLColor); C(HSLLuminosity); +#endif default: return "garbage"; #undef C } @@ -237,11 +241,13 @@ uxa_get_pixel_from_rgba(CARD32 * pixel, gshift = rbits; bshift = gshift + gbits; ashift = bshift + bbits; +#if XORG_VERSION_CURRENT >= 10699900 } else if (PICT_FORMAT_TYPE(format) == PICT_TYPE_BGRA) { ashift = 0; rshift = abits; gshift = rshift + rbits; bshift = gshift + gbits; +#endif } else { return FALSE; } @@ -283,6 +289,7 @@ uxa_get_rgba_from_pixel(CARD32 pixel, gshift = rbits; bshift = gshift + gbits; ashift = bshift + bbits; +#if XORG_VERSION_CURRENT >= 10699900 } else if (PICT_FORMAT_TYPE(format) == PICT_TYPE_BGRA) { ashift = 0; rshift = abits; @@ -290,6 +297,7 @@ uxa_get_rgba_from_pixel(CARD32 pixel, rshift = PICT_FORMAT_BPP(format) - (rbits+gbits+bbits); gshift = rshift + rbits; bshift = gshift + gbits; +#endif } else { return FALSE; }