Commit Graph

243 Commits

Author SHA1 Message Date
Søren Sandmann Pedersen
49ed31c0b3 Remove most of the fast-path MMX operations from fbmmx. fbCopyAreammx
and fbSolidFillmmx are still needed by other code.
2007-06-05 17:48:33 -04:00
Benjamin Herrenschmidt
e5ce982381 Include pixman.h from fb.h or compile of some files will fail
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
2007-06-03 09:40:37 +10:00
Soren Sandmann Pedersen
047bf3349b Delete trapezoid rendering code; replace with pixman calls 2007-05-23 16:56:05 -04:00
Soren Sandmann Pedersen
9d87ef4e0d - Make image_from_pict() non-static
- Delete fbedge.c and fbedgeimp.h
- Use pixman_rasterize_edges() in fbtrap.c
2007-05-23 15:50:25 -04:00
Soren Sandmann Pedersen
3ba3ede9bb Add missing offsets for window coordinates - reported by Colin Harrison 2007-05-23 12:56:04 -04:00
Eamon Walsh
2a4aa63a23 Merge branch 'master' into XACE-SELINUX
Conflicts:

	include/miscstruct.h
2007-05-22 14:50:26 -04:00
Soren Sandmann Pedersen
56fd927155 Remove fast path code from fbpict.c
Remove the various fast path functions from fbpict, and instead use
pixman_image_composite().
2007-05-21 20:00:25 -04:00
Soren Sandmann Pedersen
756acea23a Use pixman_image_set_indexed() to make 8 bit work 2007-05-18 14:06:21 -04:00
Soren Sandmann Pedersen
7916419a00 Comment out setup of general MMX code 2007-05-18 14:06:21 -04:00
Soren Sandmann Pedersen
998164bac6 Move fbCompositeGeneral() to fbpict.c and remove fbcompose.c 2007-05-18 14:06:21 -04:00
Soren Sandmann Pedersen
a2e3614eb8 Break image_from_pict() into a few subfunctions. 2007-05-18 14:06:21 -04:00
Soren Sandmann Pedersen
c5ef84c325 Make the general compositing code create a pixman image and call
pixman_image_composite(). Leave the general code commented out for now.
2007-05-18 14:06:21 -04:00
Soren Sandmann Pedersen
0375009a97 Remove excessive unrolling in fbCompositeSrc_x888x8x8888() and fix bug where
the source alpha was used instead of 0xff.
2007-05-17 12:59:24 -04:00
Soren Sandmann Pedersen
546465ee6a Make fbFetch_b8g8r8() actually write the read value to the buffer 2007-05-16 17:42:04 -04:00
Soren Sandmann Pedersen
3da842bf93 Revert various fast path functions to their pre-pixman-merge state
since they fail rendercheck. Remove their associated macros.

See bug 10903.
2007-05-15 14:57:14 -04:00
Soren Sandmann Pedersen
d2f813f7db New fbWalkCompositeRegion() function
This new function walks the composite region and calls a rectangle
compositing function on each compositing rectangle. Previously there
were buggy duplicates of this code in fbcompose.c and
miext/rootles/safealpha/safeAlphaPicture.c.
2007-05-03 12:17:24 -04:00
Soren Sandmann Pedersen
e0959adcd8 Add fbCompositeRect() as another special case in the switch of doom in fbpict.c
This is phase one of getting the two region walkers in fbcompose.c and
fbpict.c merged together.
2007-05-03 12:17:24 -04:00
Keith Packard
71fc5b3e93 Fix for a divide by zero that can be triggered by a malicious client.
Problem reported by Derek Abdine of rapid7.com. Thanks.
2007-05-02 11:41:11 +02:00
Michel Dänzer
5e4b3232da Fix fbCompositeTrans_0888xnx0888 build for wfb on big endian. 2007-04-29 23:38:22 +02:00
Michel Dänzer
2866e0bac9 Fix a couple of picture repeat fields incorrectly compared to RepeatNormal. 2007-04-29 23:38:13 +02:00
Soren Sandmann Pedersen
78a2045535 Pixman merging
More msvc++ porting
2007-04-27 15:20:24 -04:00
Soren Sandmann Pedersen
6c4f1826bf Bug fix in fbCompositeIn_nx8x8888
Make sure both halves of the dst word is set to zero when the masks
are both 0.
2007-04-27 08:13:45 -04:00
Soren Sandmann Pedersen
2208c6087d Change expand_alpha_rev to expand_alpha in mmxSaturateU 2007-04-26 14:40:30 -04:00
Soren Sandmann Pedersen
a300ef84ce Fix typo in previous commit 2007-04-26 14:37:53 -04:00
Soren Sandmann Pedersen
0ebe48be59 Pixman merge
- Changes to support MS Visual C++

- use inline instead of __inline__

- Fix rounding errors (Billy Biggs, from xserver via pixman)
2007-04-26 14:36:32 -04:00
Soren Sandmann Pedersen
0ff7c94fcf Pixman merge
Make use of fbCompositeSrcAdd_8888x8x8mmx
2007-04-26 10:56:02 -04:00
Soren Sandmann Pedersen
701ccb4a22 Pixman merge
- Remove stray default label

- Integrate new MMX ops SolidMaskSrc_nx8x8888mmx, In_8x8mmx, and
  In_nx8x8mmx

- Formatting changes to reduce diff noise
2007-04-26 10:49:06 -04:00
Soren Sandmann Pedersen
a54ef54db1 Pixman merge
Make sure fbCompositeSrc_x888x8x8888mmx and fbCompositeSrc_8888x8x8888mmx
are used when possible.
2007-04-26 10:24:25 -04:00
Soren Sandmann Pedersen
3571b8e65b More pixman merging
- Move some code around to minimize diff noise

- Add mmx ops from pixman that never made it into X

- Merge Jeff Muizelaar's bugfixes to fbCompositeSrc_8888x8x8888mmx and
  fbCompositeSrc_x888x8x8888mmx.
2007-04-26 10:06:47 -04:00
Soren Sandmann Pedersen
67347739b0 Don't treat convolution filters as transformations.
Some rearrangement of code to get it closer to pixman.
2007-04-25 22:22:22 -04:00
Soren Sandmann Pedersen
c056ce95d8 Port MSVC++ CPU detection code from pixman. (Vladimir Vukicevic). 2007-04-25 22:22:22 -04:00
Soren Sandmann Pedersen
c19ece1d8c Integrate optimization from xserver from David Reveman where repeats
get handled by fbFetchTransformed() rather than in the region walking
code.
2007-04-25 22:22:22 -04:00
Soren Sandmann Pedersen
48c73dfc36 Add function fbCompositeSrcAdd_8888x8x8(), and fix a bug where
srcRepeat = FALSE would be set in the wrong place.
2007-04-25 22:22:22 -04:00
Soren Sandmann Pedersen
66ba3d758a Various fixes from xserver via pixman (Billy Biggs) 2007-04-25 22:22:22 -04:00
Soren Sandmann Pedersen
0a2fe443d2 Use READ/WRITE macros for new functions introduced in previous commits. 2007-04-24 19:02:44 -04:00
Soren Sandmann Pedersen
7e16da7b78 Remove #if 0'ed blocks 2007-04-24 18:15:34 -04:00
Soren Sandmann Pedersen
2d9a7a7687 From pixman (Jeff Muizelaar)
Fix up the fast-path compositing operators; those are useful for
    sources without alpha, but can't be used for sources with
    alpha. Also, replaced fbCompositeSrcSrc_nxn with call to fbBlt as
    this function must handle 1, 4, 8, 16, 24, 32 bpp objects. Would
    be nice to optimize fbBlt for common cases involving 8, 16, 24 and
    32bpp.

    From Keith Packard.
2007-04-24 14:46:59 -04:00
Soren Sandmann Pedersen
fde4a5adf0 From xserver via pixman (Jeff Muizelaar)
Add some optimizations from jaymz. Also adds some compile
     warnings that will hopefully go awa y as we continue merging.
2007-04-24 13:30:43 -04:00
Soren Sandmann Pedersen
13e1d5ea55 Fix format vs formatCode in previous commit 2007-04-24 12:59:18 -04:00
Soren Sandmann Pedersen
077a5d4555 Add functions fbCompositeSrcSrc_nxn() and fbCompositeTrans_0565xnx0565
from xserver via pixman. Add READ/WRITE and fbFinishAccess as
appropriate.
2007-04-24 12:57:55 -04:00
Soren Sandmann Pedersen
84838268b3 Gradient fixes
* Port fix for bug 7685 from pixman. Patch by Carl Worth

* Add projective version of radial gradient code.

* Make sure that all Pict*Gradient types have PictGradient as prefix,
  since code in various places relies on that.
2007-04-23 13:19:54 -04:00
Aaron Plattner
ca784df84e Fix unbalanced fbGetDrawable added in commit 0a9239ec. 2007-04-22 16:26:01 -07:00
Soren Sandmann Pedersen
55bd8668e7 Remove #if 0'ed leftovers from merge 2007-04-21 17:10:54 -04:00
Soren Sandmann Pedersen
41dd7ab067 Fix gradient walker to not reset needlessly
Previously the gradient walker was doing excessive resets, (such
    as on every pixel in constant-colored regions or outside the
    gradient with CAIRO_EXTEND_NONE). Don't do that.

    Carl Worth, from pixman
2007-04-21 17:10:54 -04:00
Soren Sandmann Pedersen
c1b73f0f2a Fixing gradient repeat mode computations in previous patch. From David
Turner.
2007-04-21 17:10:54 -04:00
Soren Sandmann Pedersen
38f718799c Remove a few memory references in fbFetchTransformed 2007-04-21 17:10:54 -04:00
Soren Sandmann Pedersen
9c4b14d4f6 Integrate David Turner's gradient optimizations from pixman 2007-04-21 17:10:54 -04:00
Soren Sandmann Pedersen
3daa5c1a99 Fix pixman bug 5777, patch by David Reveman 2007-04-20 09:44:25 -04:00
Soren Sandmann Pedersen
0a9239ec25 Merge David Reveman's gradient optimization patch from pixman 2007-04-19 18:19:34 -04:00
Eamon Walsh
cf962a849d Merge branch 'master' into XACE-SELINUX
Conflicts:

	configure.ac
2007-04-05 14:41:39 -04:00
Eamon Walsh
5ad562565a devPrivates rework: properly free devPrivates on compatibility structures,
type pixmap.  Requires ddx'es to call the free function from DestroyPixmap.
2007-04-05 14:18:05 -04:00
Brian
0ee40c9357 s/intead/instead/ 2007-04-03 09:31:00 -06:00
Brian
a240c039c4 Split the xserver/fb/fbcmap.c file into two files.
Now, fbcmap_mi.c contains the fb functions which just wrap mi functions.
Previously, these were in fbcmap.c and compiled when XFree86Server was defined.
Now, clients of fbcmap should either use fbcmap.c or fbcmap_mi.c and not worry
about setting the XFree86Server symbol.
2007-04-03 09:28:21 -06:00
Eamon Walsh
a7cd53deb9 remove PIXPRIV checks as this flag is always set. 2007-03-06 17:05:03 -05:00
Soren Sandmann Pedersen
262b9b104a Use the new 8888x0565mmx function in fbpict.c 2007-02-06 17:30:22 -05:00
Soren Sandmann Pedersen
876b806ec0 Reapply patch to fix AMD CPU detection 2007-02-06 17:16:23 -05:00
Soren Sandmann Pedersen
13568d2aa4 Revert "Fix for AMD cpu detection. Bug 9614, Dan Williams."
This reverts commit b2cd3b1337 since
unrelated changes in fbpict.c broke the build.
2007-02-06 17:12:01 -05:00
Soren Sandmann Pedersen
5a33344103 Add new fbCompositeSrc_8888x0565mmx() function, based on patch by Dan
Williams. Bug 9682.
2007-02-06 17:11:01 -05:00
Soren Sandmann Pedersen
b2cd3b1337 Fix for AMD cpu detection. Bug 9614, Dan Williams.
Credit for the fixes in this patch goes to:

Marco Gritti <mpg at redhat dot com>
Jordan Crouse <jordan dot crouse at amd dot com>
2007-02-06 16:43:37 -05:00
Eric Anholt
2dc866252c Really fix optimized render cases being hit when they shouldn't.
I don't know how this define slipped in there.  Fixes
6fdfd9dad9.
2007-01-22 08:41:50 +08:00
Keith Packard
028bbdc041 Merge master back to randr-1.2 2006-11-04 17:46:26 -08:00
Keith Packard
2db62bce07 Define fbHasVisualTypes in fb.h as it is exported 2006-11-04 17:40:34 -08:00
Eric Anholt
6fdfd9dad9 Fix several cases where optimized paths were hit when they shouldn't be.
This fixes a number of rendercheck cases.
2006-11-01 14:41:12 -08:00
Alan Coopersmith
357b37b382 Use getisax() instead of asm code to determine available x86 ISA extensions on Solaris 2006-10-18 18:11:06 -07:00
Aaron Plattner
042d4a407d Bug #8459: Don't forget to include AM_CFLAGS in libfb_la_CFLAGS on non-MMX platforms.
Reported by Edgar Toernig.
2006-10-10 13:01:30 -07:00
Alan Coopersmith
df800d87e0 Add (void) casts to clear compiler errors about ?: results having type mismatch 2006-10-02 11:28:47 -07:00
Aaron Plattner
f9542e7495 Restore the global xx* symbols and add them to wfbrename.h.
I don't think they're ever used, but it's best to just leave them alone for ABI
compatibility.
2006-09-28 13:26:54 -07:00
Aaron Plattner
d16e83413e Hide or rename more global symbols to avoid clashes with libfb.
Rename composeFunctions, xxSetup, and xxPrintVisuals.  Hide the other xx*
symbols by making them static.
2006-09-20 12:47:17 -07:00
Aaron Plattner
f39fd42429 (unsigned long)(1 << 31) = bad news on x86_64.
(cherry picked from 410e5b1d73 commit)
2006-09-05 15:53:45 -07:00
Aaron Plattner
1c72290cdf Use DrawablePtrs instead of PixmapPtrs for Prepare/Finish access.
Also, define some wfb functions even if FB_ACCESS_WRAPPER is not defined.  This allows a client to use libfb and libwfb at the same time.
2006-08-07 09:57:58 -07:00
Aaron Plattner
ee02e64788 Wrap libwfb memory access.
Use the READ and WRITE macros to wrap memory accesses that could be in video
memory.  Add MEMCPY_WRAPPED and MEMSET_WRAPPED macros to wrap memcpy and
memset, respectively.
2006-08-01 13:45:43 -07:00
Aaron Plattner
a69335dc29 Make ReadMemoryProcPtr take a const pointer.
Fixes some warnings when using READ with a const pointer.
2006-07-31 14:15:55 -07:00
Aaron Plattner
e6ae1612be Add fbHasVisualTypes and fbSetVisualTypesAndMasks to wfbrename.h and include -DXFree86Server. 2006-07-27 18:24:59 -07:00
Aaron Plattner
377a581ddf Switch to using void* pointers.
Pass the size of the data pointed to by src or dst as an argument to
wfb{Read,Write}Memory.  This allows one set of macros to be used with any size
pointer.  Assumes that sizeof(FbBits) >= sizeof(FbStip).
2006-07-26 15:48:51 -07:00
Aaron Plattner
a4005c15fb Add framebuffer access wrapper infrastructure.
Create fbPrepareAccess macros to call into the driver to set up the
wfbReadMemory and wfbWriteWemory pointers.  Call these from fbGetDrawable and
fbGetStipDrawable.

Add the READ and WRITE macros, which expand to simple memory accesses for fb,
and calls through the function pointers for wfb.

Add fbFinishAccess macro to give the driver an opportunity to clean up.  Add
calls to this in the appropriate places.
2006-07-26 15:48:51 -07:00
Aaron Plattner
319efac445 Prefix all of the exported symbols in libwfb.so with "wfb".
For now, just #define all of the exported symbols in wfbrename.h.  Later,
we should add FBPREFIX() around the exported symbols and use -fvisiblity=hidden
to hide the rest.
2006-07-26 15:48:51 -07:00
Aaron Plattner
7608a63ff7 Build infrastructure for libwfb.so.
Builds fb/* twice, defining FB_ACCESS_WRAPPER for libwfb.la.  Define a macro,
FBPREFIX(X) which expands to fbX for libfb.la and wfbX for libwfb.la.  Use the
macro on [w]fbModuleData so the new module loads.
2006-07-26 15:48:50 -07:00
Adam Jackson
0aaac95b0d Remove RCS tags. Fix Xprint makefile braindamage. 2006-07-21 17:56:00 -04:00
Daniel Stone
84683f19b4 get rid of XFree86LOADER, XFree86Server, XFree86Module, and IN_MODULE
Get rid of almost all uses of these definitions.  They're still defined for
delinquent out-of-tree drivers, and also for the Mesa build.  As well as
for miinitext.c.  But largely gone.
2006-07-18 18:17:38 -04:00
Eric Anholt
12563db59d Revert "Optimize out computing a gradient pixel if the mask value is 0."
This reverts cf46242e33 commit.  It wasn't meant
to be pushed to master yet, and doesn't work.
2006-07-03 12:52:27 -07:00
Eric Anholt
cf46242e33 Optimize out computing a gradient pixel if the mask value is 0.
Obtained from:	kdrive CVS (DavidR XGL fb/ megapatch)
2006-07-03 20:00:50 +02:00
Eric Anholt
63c169e3b1 Fix MMX Saturate implementation.
The code was expanding the source blend factor from the wrong channel.  Fixes
cairo's clip-operator test.
2006-06-27 04:14:03 +02:00
Eric Anholt
c7ac485a59 Remove the default case from fbcompose.c switches which should cover all cases.
Instead, stick the NULL return default case afterwards, so that the compiler can
warn us when we've got unimplemented cases.  Removes some unimplemented and
unused 8bpp, depth 4 picture format names.
2006-06-23 13:56:20 -07:00
Kristian Høgsberg
ed18d776f0 Fix #2488 for fb too: sample pixel center when transforming. 2006-06-21 16:22:14 -04:00
Kristan Høgsberg
4365d16c86 Pull over convolution filter fixes from xgl-0-0-1 branch.
Cherry-picking patches:

	8a5ea68800 and
	4d755fe142
2006-06-19 22:21:49 -04:00
Eric Anholt
569c808a23 Fix crash when using PICT_x4a4 by supplying an appropriate fbFetchPixel_x4a4. 2006-06-19 16:42:09 -07:00
Eric Anholt
5542665041 Clean up gcc warnings from picture format CARD32 -> enum change. 2006-06-19 15:11:56 -07:00
Eric Anholt
e793f0eeee Correct component ordering when fetching [ax]4b4g4r4 pixels.
Noticed by:	rendercheck
2006-06-19 15:11:55 -07:00
Adam Jackson
7893dadb2f Bug #6827: Fix texel fetch in fbFetchTransformed to avoid crashes. Still
not 100% correct, but better than 7.0. (Radek Doulik, Matthias Hopf)
2006-05-18 14:39:59 +00:00
Matthias Hopf
9e239a0df7 Bug #5796: Wrong fastpath selection for repeating sources. 2006-05-11 11:23:43 +00:00
Adam Jackson
291e89d4f2 Remove NEED_LINEHELPER BC cruft for pre-R6 DDXes. 2006-04-30 19:16:14 +00:00
Keith Packard
b37c515320 Add support for x4a4 format (depth 4 at 8bpp). Bug #6325. 2006-04-19 21:56:13 +00:00
Keith Packard
5dacc82232 Coverity #333, #334 - eliminate unncessary test for always true condition
in fbEvenStipple.
2006-04-07 02:20:11 +00:00
Ian Romanick
383c2e1e9e Include fbmmx.h in fb/fbwindow.c when USE_MMX is defined. Fixes build
problem on x86-64 resulting from fbHaveMMX being a macro instead of a
    function on that platform.
2006-04-05 19:52:12 +00:00
Adam Jackson
d9b8bfbfaf Bug #5478: More use of fbSOlidFillmmx. (Jim Huang) 2006-04-03 21:16:30 +00:00
Adam Jackson
b0e6778265 Bug #6346: Build fix when using gcc -mno-sse. (Jonathan Adamczewski) 2006-04-03 19:50:15 +00:00
Søren Sandmann Pedersen
5449634e3c Wed Mar 22 16:28:46 2006 Søren Sandmann <sandmann@redhat.com>
Use inline assembly for copy area, since gcc doesn't generate movq
    instructions.
2006-03-22 21:37:49 +00:00
Søren Sandmann Pedersen
5b3084c64f Wed Mar 22 16:05:09 2006 Søren Sandmann <sandmann@redhat.com>
Use inline assembly for solid fills, since gcc doesn't use the movq
    instructions.
2006-03-22 21:13:08 +00:00
Benjamin Herrenschmidt
049dca0f43 Remove useless line of code that contained a bug and triggered a gcc
warning. This variable will be overriden before being used anyway.
    (Bugzilla #5595)
2006-02-14 08:11:41 +00:00
Alan Coopersmith
a2a5254675 Add <string.h>, <stdlib.h>, and <stdio.h> to clear undefined function
warnings after the removal of libcwrapper headers.
2006-02-11 19:16:51 +00:00