Hello community, here is the log from the commit of package xorg-x11-driver-video for openSUSE:Factory checked in at Wed Jul 22 11:03:41 CEST 2009. -------- --- xorg-x11-driver-video/xorg-x11-driver-video.changes 2009-07-18 11:55:22.000000000 +0200 +++ /mounts/work_src_done/STABLE/xorg-x11-driver-video/xorg-x11-driver-video.changes 2009-07-21 20:48:43.000000000 +0200 @@ -1,0 +2,11 @@ +Tue Jul 21 20:28:02 CEST 2009 - sndirsch@suse.de + +- xf86-video-intel 2.8.0 + * We are pleased to present this major release of the + xf86-video-intel driver. This release is very similar + to the 2.7.99.902 release candidate but includes a + couple of additional bug fixes, (for bugs #22760 and + @22483). +- obsoletes xf86-video-intel-commit-e386e7b.diff + +------------------------------------------------------------------- calling whatdependson for head-i586 Old: ---- xf86-video-intel-2.7.99.902.tar.bz2 xf86-video-intel-commit-e386e7b.diff New: ---- xf86-video-intel-2.8.0.tar.bz2 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ xorg-x11-driver-video.spec ++++++ --- /var/tmp/diff_new_pack.sqNnLf/_old 2009-07-22 11:02:40.000000000 +0200 +++ /var/tmp/diff_new_pack.sqNnLf/_new 2009-07-22 11:02:40.000000000 +0200 @@ -23,7 +23,7 @@ BuildRequires: Mesa-devel libdrm-devel pkgconfig xorg-x11-proto-devel xorg-x11-server-sdk Url: http://xorg.freedesktop.org/ Version: 7.4 -Release: 70 +Release: 71 License: MIT License (or similar) BuildRoot: %{_tmppath}/%{name}-%{version}-build Group: System/X11/Servers/XF86_4 @@ -68,7 +68,7 @@ Source42: xf86-video-voodoo-1.2.2.tar.bz2 Source43: xf86-video-impact-0.2.0.tar.bz2 Source44: HALlib-4.1.tar.gz -Source45: xf86-video-intel-2.7.99.902.tar.bz2 +Source45: xf86-video-intel-2.8.0.tar.bz2 Source46: xf86-video-ati-6.12.2.tar.bz2 Source48: xf86-video-mga-1.9.100.tar.bz2 Source50: xf86-video-xgi-1.5.0.tar.bz2 @@ -102,7 +102,6 @@ Patch111: biosdumper.patch Patch113: copy-fb.patch Patch115: xf86-video-intel-buildfix.diff -Patch116: xf86-video-intel-commit-e386e7b.diff %description This package contains X.Org video drivers. @@ -180,7 +179,6 @@ %patch113 -p1 %endif %patch115 -p0 -%patch116 -p1 popd %build ++++++ xf86-video-intel-2.7.99.902.tar.bz2 -> xf86-video-intel-2.8.0.tar.bz2 ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/xf86-video-intel-2.7.99.902/NEWS new/xf86-video-intel-2.8.0/NEWS --- old/xf86-video-intel-2.7.99.902/NEWS 2009-07-13 14:26:33.000000000 +0200 +++ new/xf86-video-intel-2.8.0/NEWS 2009-07-21 08:00:06.000000000 +0200 @@ -1,3 +1,51 @@ +Release 2.8.0 (2009-07-20) +========================== +We are pleased to present this major release of the xf86-video-intel +driver. This release is very similar to the 2.7.99.902 release +candidate but includes a couple of additional bug fixes, (for bugs +#22760 and @22483). + +Compared to the 2.7 releases this driver contains several new features +and many bug fixes. The driver now depends on X server 1.6 or later, +and eliminates several obsolete code paths, (XAA and EXA removed in +favor of UXA, DRI1 support eliminated). The driver certainly will work +best with an i915 module from a recent kernel (2.6.31) and with +kernel-modesetting (KMS, specified by loading i915 with the option +"modeset=1"). + +New features in 2.8.0 compared to 2.7 +------------------------------------- +* Remove XAA/EXA/DRI1 and NoAccel, and only support UXA/DRI2 now + (requiring xserver 1.6). + +* VLD support added into XvMC for Mpeg2, which decreases CPU usage + when playing video. + +Major fixes in 2.8.0 compared to 2.7 +------------------------------------ +* Fix broken front-buffer rendering + https://bugs.freedesktop.org/show_bug.cgi?id=19174 + +* Fix disabling of XvMC disabled + https://bugs.freedesktop.org/show_bug.cgi?id=20790 + +* Fix broken VT switch on some machines + https://bugs.freedesktop.org/show_bug.cgi?id=19578 + +* Improve performance of trapezoid rendering for UXA + https://bugs.freedesktop.org/show_bug.cgi?id=21376 + +* Vblank sync'd GL buffer swap (fixing video tearing under composite) + https://bugs.freedesktop.org/show_bug.cgi?id=20664 + +* Fix G41 DRM support + https://bugs.freedesktop.org/show_bug.cgi?id=21095 + +* Fix crash on some 8xx + https://bugs.freedesktop.org/show_bug.cgi?id=18974 + +Various fixes for GPU hangs, and more... + Snapshot 2.7.99.902 (2009-07-13) -------------------------------- This is the first release candidate in preparation for the upcoming diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/xf86-video-intel-2.7.99.902/configure new/xf86-video-intel-2.8.0/configure --- old/xf86-video-intel-2.7.99.902/configure 2009-07-13 14:29:56.000000000 +0200 +++ new/xf86-video-intel-2.8.0/configure 2009-07-21 08:00:25.000000000 +0200 @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.63 for xf86-video-intel 2.7.99.902. +# Generated by GNU Autoconf 2.63 for xf86-video-intel 2.8.0. # # Report bugs to https://bugs.freedesktop.org/enter_bug.cgi?product=xorg. # @@ -745,8 +745,8 @@ # Identity of this package. PACKAGE_NAME='xf86-video-intel' PACKAGE_TARNAME='xf86-video-intel' -PACKAGE_VERSION='2.7.99.902' -PACKAGE_STRING='xf86-video-intel 2.7.99.902' +PACKAGE_VERSION='2.8.0' +PACKAGE_STRING='xf86-video-intel 2.8.0' PACKAGE_BUGREPORT='https://bugs.freedesktop.org/enter_bug.cgi?product=xorg' ac_unique_file="Makefile.am" @@ -1542,7 +1542,7 @@ # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures xf86-video-intel 2.7.99.902 to adapt to many kinds of systems. +\`configure' configures xf86-video-intel 2.8.0 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1613,7 +1613,7 @@ if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of xf86-video-intel 2.7.99.902:";; + short | recursive ) echo "Configuration of xf86-video-intel 2.8.0:";; esac cat <<\_ACEOF @@ -1739,7 +1739,7 @@ test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -xf86-video-intel configure 2.7.99.902 +xf86-video-intel configure 2.8.0 generated by GNU Autoconf 2.63 Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, @@ -1753,7 +1753,7 @@ This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by xf86-video-intel $as_me 2.7.99.902, which was +It was created by xf86-video-intel $as_me 2.8.0, which was generated by GNU Autoconf 2.63. Invocation command line was $ $0 $@ @@ -2474,7 +2474,7 @@ # Define the identity of the package. PACKAGE='xf86-video-intel' - VERSION='2.7.99.902' + VERSION='2.8.0' cat >>confdefs.h <<_ACEOF @@ -14812,7 +14812,7 @@ # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by xf86-video-intel $as_me 2.7.99.902, which was +This file was extended by xf86-video-intel $as_me 2.8.0, which was generated by GNU Autoconf 2.63. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -14875,7 +14875,7 @@ _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_version="\\ -xf86-video-intel config.status 2.7.99.902 +xf86-video-intel config.status 2.8.0 configured by $0, generated by GNU Autoconf 2.63, with options \\"`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/xf86-video-intel-2.7.99.902/configure.ac new/xf86-video-intel-2.8.0/configure.ac --- old/xf86-video-intel-2.7.99.902/configure.ac 2009-07-13 14:29:29.000000000 +0200 +++ new/xf86-video-intel-2.8.0/configure.ac 2009-07-21 08:00:14.000000000 +0200 @@ -22,7 +22,7 @@ AC_PREREQ(2.57) AC_INIT([xf86-video-intel], - 2.7.99.902, + 2.8.0, [https://bugs.freedesktop.org/enter_bug.cgi?product=xorg], xf86-video-intel) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/xf86-video-intel-2.7.99.902/src/i830.h new/xf86-video-intel-2.8.0/src/i830.h --- old/xf86-video-intel-2.7.99.902/src/i830.h 2009-07-11 07:31:10.000000000 +0200 +++ new/xf86-video-intel-2.8.0/src/i830.h 2009-07-21 07:41:16.000000000 +0200 @@ -468,14 +468,20 @@ /** Transform pointers for src/mask, or NULL if identity */ PictTransform *transform[2]; float coord_adjust; + + /* i830 render accel state */ + PixmapPtr render_src, render_mask, render_dst; + PicturePtr render_src_picture, render_mask_picture, render_dst_picture; + uint32_t render_dst_format; + Bool needs_render_state_emit; + uint32_t cblend, ablend, s8_blendctl; + /* i915 render accel state */ uint32_t mapstate[6]; uint32_t samplerstate[6]; struct { int op; - PicturePtr pSrcPicture, pMaskPicture, pDstPicture; - PixmapPtr pSrc, pMask, pDst; uint32_t dst_format; Bool is_nearest; Bool needs_emit; @@ -780,6 +786,9 @@ void i830_composite(PixmapPtr pDst, int srcX, int srcY, int maskX, int maskY, int dstX, int dstY, int w, int h); +void i830_emit_composite_primitive(PixmapPtr pDst, int srcX, int srcY, + int maskX, int maskY, int dstX, int dstY, + int w, int h); void i830_done_composite(PixmapPtr pDst); /* i915_render.c */ Bool i915_check_composite(int op, PicturePtr pSrc, PicturePtr pMask, @@ -790,6 +799,7 @@ void i915_composite(PixmapPtr pDst, int srcX, int srcY, int maskX, int maskY, int dstX, int dstY, int w, int h); void i915_batch_flush_notify(ScrnInfoPtr pScrn); +void i830_batch_flush_notify(ScrnInfoPtr scrn); /* i965_render.c */ unsigned int gen4_render_state_size(ScrnInfoPtr pScrn); void gen4_render_state_init(ScrnInfoPtr pScrn); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/xf86-video-intel-2.7.99.902/src/i830_driver.c new/xf86-video-intel-2.8.0/src/i830_driver.c --- old/xf86-video-intel-2.7.99.902/src/i830_driver.c 2009-07-13 14:25:49.000000000 +0200 +++ new/xf86-video-intel-2.8.0/src/i830_driver.c 2009-07-21 07:41:16.000000000 +0200 @@ -2757,7 +2757,7 @@ else if (IS_I9XX(pI830)) pI830->batch_flush_notify = i915_batch_flush_notify; else - pI830->batch_flush_notify = NULL; + pI830->batch_flush_notify = i830_batch_flush_notify; miInitializeBackingStore(pScreen); xf86SetBackingStore(pScreen); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/xf86-video-intel-2.7.99.902/src/i830_memory.c new/xf86-video-intel-2.8.0/src/i830_memory.c --- old/xf86-video-intel-2.7.99.902/src/i830_memory.c 2009-07-11 07:31:10.000000000 +0200 +++ new/xf86-video-intel-2.8.0/src/i830_memory.c 2009-07-21 07:41:16.000000000 +0200 @@ -1581,6 +1581,9 @@ i830_update_cursor_offsets(pScrn); i830_set_max_gtt_map_size(pScrn); + if (pI830->front_buffer) + pScrn->fbOffset = pI830->front_buffer->offset; + return TRUE; } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/xf86-video-intel-2.7.99.902/src/i830_render.c new/xf86-video-intel-2.8.0/src/i830_render.c --- old/xf86-video-intel-2.7.99.902/src/i830_render.c 2009-06-26 18:30:59.000000000 +0200 +++ new/xf86-video-intel-2.8.0/src/i830_render.c 2009-07-21 07:41:16.000000000 +0200 @@ -255,7 +255,7 @@ FatalError("Unsupported format type %d\n", pPict->format); } -static Bool +static void i830_texture_setup(PicturePtr pPict, PixmapPtr pPix, int unit) { @@ -299,7 +299,7 @@ break; default: filter = 0; - I830FALLBACK("Bad filter 0x%x\n", pPict->filter); + FatalError("Bad filter 0x%x\n", pPict->filter); } filter |= (MIPFILTER_NONE << TM0S3_MIP_FILTER_SHIFT); @@ -344,10 +344,6 @@ TEX_STREAM_MAP_IDX(unit)); ADVANCE_BATCH(); } - - i830_debug_sync(pScrn); - - return TRUE; } Bool @@ -391,29 +387,27 @@ { ScrnInfoPtr pScrn = xf86Screens[pSrcPicture->pDrawable->pScreen->myNum]; I830Ptr pI830 = I830PTR(pScrn); - uint32_t dst_format, dst_pitch; Bool is_affine_src, is_affine_mask; Bool is_nearest = FALSE; + pI830->render_src_picture = pSrcPicture; + pI830->render_src = pSrc; + pI830->render_mask_picture = pMaskPicture; + pI830->render_mask = pMask; + pI830->render_dst_picture = pDstPicture; + pI830->render_dst = pDst; + i830_exa_check_pitch_3d(pSrc); if (pMask) i830_exa_check_pitch_3d(pMask); i830_exa_check_pitch_3d(pDst); - IntelEmitInvarientState(pScrn); - pI830->last_3d = LAST_3D_RENDER; - - if (!i830_get_dest_format(pDstPicture, &dst_format)) + if (!i830_get_dest_format(pDstPicture, &pI830->render_dst_format)) return FALSE; - dst_pitch = intel_get_pixmap_pitch(pDst); - if (!i830_texture_setup(pSrcPicture, pSrc, 0)) - I830FALLBACK("fail to setup src texture\n"); if (pSrcPicture->filter == PictFilterNearest) is_nearest = TRUE; if (pMask != NULL) { - if (!i830_texture_setup(pMaskPicture, pMask, 1)) - I830FALLBACK("fail to setup mask texture\n"); if (pMaskPicture->filter == PictFilterNearest) is_nearest = TRUE; } else { @@ -434,45 +428,7 @@ I830FALLBACK("non-affine transform unsupported on 8xx hardware\n"); { - uint32_t cblend, ablend, blendctl, vf2; - - BEGIN_BATCH(30); - - /* color buffer */ - OUT_BATCH(_3DSTATE_BUF_INFO_CMD); - OUT_BATCH(BUF_3D_ID_COLOR_BACK| BUF_3D_USE_FENCE | - BUF_3D_PITCH(dst_pitch)); - OUT_RELOC_PIXMAP(pDst, I915_GEM_DOMAIN_RENDER, I915_GEM_DOMAIN_RENDER, 0); - OUT_BATCH(MI_NOOP); - - OUT_BATCH(_3DSTATE_DST_BUF_VARS_CMD); - OUT_BATCH(dst_format); - - /* defaults */ - OUT_BATCH(_3DSTATE_DFLT_Z_CMD); - OUT_BATCH(0); - - OUT_BATCH(_3DSTATE_DFLT_DIFFUSE_CMD); - OUT_BATCH(0); - - OUT_BATCH(_3DSTATE_DFLT_SPEC_CMD); - OUT_BATCH(0); - - OUT_BATCH(_3DSTATE_DRAW_RECT_CMD); - OUT_BATCH(0); - OUT_BATCH(0); /* ymin, xmin */ - OUT_BATCH(DRAW_YMAX(pDst->drawable.height - 1) | - DRAW_XMAX(pDst->drawable.width - 1)); - OUT_BATCH(0); /* yorig, xorig */ - - OUT_BATCH(_3DSTATE_LOAD_STATE_IMMEDIATE_1 | I1_LOAD_S(2) | - I1_LOAD_S(3) | 1); - if (pMask) - vf2 = 2 << 12; /* 2 texture coord sets */ - else - vf2 = 1 << 12; - OUT_BATCH(vf2); /* TEXCOORDFMT_2D */ - OUT_BATCH(S3_CULLMODE_NONE | S3_VERTEXHAS_XY); + uint32_t cblend, ablend, blendctl; /* If component alpha is active in the mask and the blend operation * uses the source alpha, then we know we don't need the source @@ -541,48 +497,97 @@ ablend |= TB0A_ARG2_SEL_ONE; } - OUT_BATCH(_3DSTATE_LOAD_STATE_IMMEDIATE_2 | - LOAD_TEXTURE_BLEND_STAGE(0)|1); - OUT_BATCH(cblend); - OUT_BATCH(ablend); - OUT_BATCH(0); - blendctl = i830_get_blend_cntl(op, pMaskPicture, pDstPicture->format); - OUT_BATCH(_3DSTATE_INDPT_ALPHA_BLEND_CMD | DISABLE_INDPT_ALPHA_BLEND); - OUT_BATCH(MI_NOOP); - OUT_BATCH(_3DSTATE_LOAD_STATE_IMMEDIATE_1 | I1_LOAD_S(8) | 0); - OUT_BATCH(S8_ENABLE_COLOR_BLEND | S8_BLENDFUNC_ADD | blendctl | - S8_ENABLE_COLOR_BUFFER_WRITE); - - OUT_BATCH(_3DSTATE_ENABLES_1_CMD | DISABLE_LOGIC_OP | - DISABLE_STENCIL_TEST | DISABLE_DEPTH_BIAS | - DISABLE_SPEC_ADD | DISABLE_FOG | DISABLE_ALPHA_TEST | - ENABLE_COLOR_BLEND | DISABLE_DEPTH_TEST); - /* We have to explicitly say we don't want write disabled */ - OUT_BATCH(_3DSTATE_ENABLES_2_CMD | ENABLE_COLOR_MASK | - DISABLE_STENCIL_WRITE | ENABLE_TEX_CACHE | - DISABLE_DITHER | ENABLE_COLOR_WRITE | - DISABLE_DEPTH_WRITE); - ADVANCE_BATCH(); + + pI830->cblend = cblend; + pI830->ablend = ablend; + pI830->s8_blendctl = blendctl; } i830_debug_sync(pScrn); + pI830->needs_render_state_emit = TRUE; + return TRUE; } -/** - * Do a single rectangle composite operation. - * - * This function is shared between i830 and i915 generation code. - */ +static void +i830_emit_composite_state(ScrnInfoPtr pScrn) +{ + I830Ptr pI830 = I830PTR(pScrn); + uint32_t vf2; + + pI830->needs_render_state_emit = FALSE; + + IntelEmitInvarientState(pScrn); + pI830->last_3d = LAST_3D_RENDER; + + BEGIN_BATCH(24); + + OUT_BATCH(_3DSTATE_BUF_INFO_CMD); + OUT_BATCH(BUF_3D_ID_COLOR_BACK| BUF_3D_USE_FENCE | + BUF_3D_PITCH(intel_get_pixmap_pitch(pI830->render_dst))); + OUT_RELOC_PIXMAP(pI830->render_dst, + I915_GEM_DOMAIN_RENDER, I915_GEM_DOMAIN_RENDER, 0); + OUT_BATCH(MI_NOOP); + + OUT_BATCH(_3DSTATE_DST_BUF_VARS_CMD); + OUT_BATCH(pI830->render_dst_format); + + OUT_BATCH(_3DSTATE_DRAW_RECT_CMD); + OUT_BATCH(0); + OUT_BATCH(0); /* ymin, xmin */ + OUT_BATCH(DRAW_YMAX(pI830->render_dst->drawable.height - 1) | + DRAW_XMAX(pI830->render_dst->drawable.width - 1)); + OUT_BATCH(0); /* yorig, xorig */ + + OUT_BATCH(_3DSTATE_LOAD_STATE_IMMEDIATE_1 | + I1_LOAD_S(2) | + I1_LOAD_S(3) | 1); + if (pI830->render_mask) + vf2 = 2 << 12; /* 2 texture coord sets */ + else + vf2 = 1 << 12; + OUT_BATCH(vf2); /* TEXCOORDFMT_2D */ + OUT_BATCH(S3_CULLMODE_NONE | S3_VERTEXHAS_XY); + + OUT_BATCH(_3DSTATE_INDPT_ALPHA_BLEND_CMD | DISABLE_INDPT_ALPHA_BLEND); + OUT_BATCH(MI_NOOP); + OUT_BATCH(_3DSTATE_LOAD_STATE_IMMEDIATE_1 | I1_LOAD_S(8) | 0); + OUT_BATCH(S8_ENABLE_COLOR_BLEND | S8_BLENDFUNC_ADD | pI830->s8_blendctl | + S8_ENABLE_COLOR_BUFFER_WRITE); + + OUT_BATCH(_3DSTATE_LOAD_STATE_IMMEDIATE_2 | + LOAD_TEXTURE_BLEND_STAGE(0)|1); + OUT_BATCH(pI830->cblend); + OUT_BATCH(pI830->ablend); + OUT_BATCH(0); + + OUT_BATCH(_3DSTATE_ENABLES_1_CMD | DISABLE_LOGIC_OP | + DISABLE_STENCIL_TEST | DISABLE_DEPTH_BIAS | + DISABLE_SPEC_ADD | DISABLE_FOG | DISABLE_ALPHA_TEST | + ENABLE_COLOR_BLEND | DISABLE_DEPTH_TEST); + /* We have to explicitly say we don't want write disabled */ + OUT_BATCH(_3DSTATE_ENABLES_2_CMD | ENABLE_COLOR_MASK | + DISABLE_STENCIL_WRITE | ENABLE_TEX_CACHE | + DISABLE_DITHER | ENABLE_COLOR_WRITE | + DISABLE_DEPTH_WRITE); + ADVANCE_BATCH(); + + i830_texture_setup(pI830->render_src_picture, pI830->render_src, 0); + if (pI830->render_mask) { + i830_texture_setup(pI830->render_mask_picture, + pI830->render_mask, 1); + } +} + void -i830_composite(PixmapPtr pDst, int srcX, int srcY, int maskX, int maskY, - int dstX, int dstY, int w, int h) +i830_emit_composite_primitive(PixmapPtr pDst, int srcX, int srcY, + int maskX, int maskY, + int dstX, int dstY, int w, int h) { ScrnInfoPtr pScrn = xf86Screens[pDst->drawable.pScreen->myNum]; I830Ptr pI830 = I830PTR(pScrn); - Bool has_mask; Bool is_affine_src, is_affine_mask; int per_vertex, num_floats; float src_x[3], src_y[3], src_w[3], mask_x[3], mask_y[3], mask_w[3]; @@ -590,12 +595,6 @@ is_affine_src = i830_transform_is_affine (pI830->transform[0]); is_affine_mask = i830_transform_is_affine (pI830->transform[1]); - if (pI830->scale_units[1][0] == -1 || pI830->scale_units[1][1] == -1) { - has_mask = FALSE; - } else { - has_mask = TRUE; - } - per_vertex = 2; /* dest x/y */ if (is_affine_src) { @@ -630,7 +629,7 @@ return; per_vertex += 4; /* src x/y/z/w */ } - if (has_mask) { + if (pI830->render_mask) { if (is_affine_mask) { if (!i830_get_transformed_coordinates(maskX, maskY, pI830->transform[1], @@ -666,6 +665,7 @@ } num_floats = 3 * per_vertex; + BEGIN_BATCH(6 + num_floats); OUT_BATCH(MI_NOOP); @@ -683,7 +683,7 @@ OUT_BATCH_F(0.0); OUT_BATCH_F(src_w[2]); } - if (has_mask) { + if (pI830->render_mask) { OUT_BATCH_F(mask_x[2] / pI830->scale_units[1][0]); OUT_BATCH_F(mask_y[2] / pI830->scale_units[1][1]); if (!is_affine_mask) { @@ -700,7 +700,7 @@ OUT_BATCH_F(0.0); OUT_BATCH_F(src_w[1]); } - if (has_mask) { + if (pI830->render_mask) { OUT_BATCH_F(mask_x[1] / pI830->scale_units[1][0]); OUT_BATCH_F(mask_y[1] / pI830->scale_units[1][1]); if (!is_affine_mask) { @@ -717,7 +717,7 @@ OUT_BATCH_F(0.0); OUT_BATCH_F(src_w[0]); } - if (has_mask) { + if (pI830->render_mask) { OUT_BATCH_F(mask_x[0] / pI830->scale_units[1][0]); OUT_BATCH_F(mask_y[0] / pI830->scale_units[1][1]); if (!is_affine_mask) { @@ -728,3 +728,41 @@ ADVANCE_BATCH(); } + + +/** + * Do a single rectangle composite operation. + * + * This function is shared between i830 and i915 generation code. + */ +void +i830_composite(PixmapPtr pDst, int srcX, int srcY, int maskX, int maskY, + int dstX, int dstY, int w, int h) +{ + ScrnInfoPtr pScrn = xf86Screens[pDst->drawable.pScreen->myNum]; + I830Ptr pI830 = I830PTR(pScrn); + + intel_batch_start_atomic(pScrn, + 58 + /* invarient */ + 24 + /* setup */ + 20 + /* 2 * setup_texture */ + 6 + 30 /* verts */); + + if (pI830->needs_render_state_emit) + i830_emit_composite_state(pScrn); + + i830_emit_composite_primitive(pDst, srcX, srcY, maskX, maskY, dstX, dstY, + w, h); + + intel_batch_end_atomic(pScrn); + + i830_debug_sync(pScrn); +} + +void +i830_batch_flush_notify(ScrnInfoPtr scrn) +{ + I830Ptr i830 = I830PTR(scrn); + + i830->needs_render_state_emit = TRUE; +} diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/xf86-video-intel-2.7.99.902/src/i830_video.c new/xf86-video-intel-2.8.0/src/i830_video.c --- old/xf86-video-intel-2.7.99.902/src/i830_video.c 2009-07-11 07:31:10.000000000 +0200 +++ new/xf86-video-intel-2.8.0/src/i830_video.c 2009-07-21 07:41:16.000000000 +0200 @@ -2539,7 +2539,7 @@ if (sync) { BoxPtr box; - int y1, y2; + pixman_box16_t box_in_crtc_coordinates; int pipe = -1, event, load_scan_lines_pipe; if (pixmap_is_scanout(pPixmap)) @@ -2555,16 +2555,17 @@ } box = REGION_EXTENTS(unused, clipBoxes); - y1 = box->y1 - crtc->y; - y2 = box->y2 - crtc->y; + box_in_crtc_coordinates = *box; + if (crtc->transform_in_use) + pixman_f_transform_bounds (&crtc->f_framebuffer_to_crtc, &box_in_crtc_coordinates); BEGIN_BATCH(5); /* The documentation says that the LOAD_SCAN_LINES command * always comes in pairs. Don't ask me why. */ OUT_BATCH(MI_LOAD_SCAN_LINES_INCL | load_scan_lines_pipe); - OUT_BATCH((y1 << 16) | y2); + OUT_BATCH((box_in_crtc_coordinates.y1 << 16) | box_in_crtc_coordinates.y2); OUT_BATCH(MI_LOAD_SCAN_LINES_INCL | load_scan_lines_pipe); - OUT_BATCH((y1 << 16) | y2); + OUT_BATCH((box_in_crtc_coordinates.y1 << 16) | box_in_crtc_coordinates.y2); OUT_BATCH(MI_WAIT_FOR_EVENT | event); ADVANCE_BATCH(); } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/xf86-video-intel-2.7.99.902/src/i915_render.c new/xf86-video-intel-2.8.0/src/i915_render.c --- old/xf86-video-intel-2.7.99.902/src/i915_render.c 2009-06-13 02:05:25.000000000 +0200 +++ new/xf86-video-intel-2.8.0/src/i915_render.c 2009-07-21 07:41:16.000000000 +0200 @@ -322,6 +322,13 @@ i830_get_pixmap_bo(pDst), }; + pI830->render_src_picture = pSrcPicture; + pI830->render_src = pSrc; + pI830->render_mask_picture = pMaskPicture; + pI830->render_mask = pMask; + pI830->render_dst_picture = pDstPicture; + pI830->render_dst = pDst; + i830_exa_check_pitch_3d(pSrc); if (pMask) i830_exa_check_pitch_3d(pMask); @@ -351,12 +358,6 @@ } pI830->i915_render_state.op = op; - pI830->i915_render_state.pSrcPicture = pSrcPicture; - pI830->i915_render_state.pMaskPicture = pMaskPicture; - pI830->i915_render_state.pDstPicture = pDstPicture; - pI830->i915_render_state.pSrc = pSrc; - pI830->i915_render_state.pMask = pMask; - pI830->i915_render_state.pDst = pDst; pI830->i915_render_state.needs_emit = TRUE; return TRUE; @@ -367,12 +368,12 @@ { I830Ptr pI830 = I830PTR(pScrn); int op = pI830->i915_render_state.op; - PicturePtr pSrcPicture = pI830->i915_render_state.pSrcPicture; - PicturePtr pMaskPicture = pI830->i915_render_state.pMaskPicture; - PicturePtr pDstPicture = pI830->i915_render_state.pDstPicture; - PixmapPtr pSrc = pI830->i915_render_state.pSrc; - PixmapPtr pMask = pI830->i915_render_state.pMask; - PixmapPtr pDst = pI830->i915_render_state.pDst; + PicturePtr pSrcPicture = pI830->render_src_picture; + PicturePtr pMaskPicture = pI830->render_mask_picture; + PicturePtr pDstPicture = pI830->render_dst_picture; + PixmapPtr pSrc = pI830->render_src; + PixmapPtr pMask = pI830->render_mask; + PixmapPtr pDst = pI830->render_dst; uint32_t dst_format = pI830->i915_render_state.dst_format, dst_pitch; uint32_t blendctl; int out_reg = FS_OC; @@ -556,7 +557,8 @@ if (pI830->i915_render_state.needs_emit) i915_emit_composite_setup(pScrn); - i830_composite(pDst, srcX, srcY, maskX, maskY, dstX, dstY, w, h); + i830_emit_composite_primitive(pDst, srcX, srcY, maskX, maskY, dstX, dstY, + w, h); intel_batch_end_atomic(pScrn); } ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Remember to have fun... -- To unsubscribe, e-mail: opensuse-commit+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-commit+help@opensuse.org