Commit Graph

10923 Commits

Author SHA1 Message Date
Eric Anholt aa13306974 glamor: Start adding render acceleration support.
This brings in idr's glu3 code.  We'll probably want to move to linking to
it as a library, once an ABI-stable release is out.
2011-09-26 16:46:31 +08:00
Eric Anholt 4a51cc0440 glamor: Add clipping to setspans. 2011-09-26 16:46:31 +08:00
Eric Anholt 5fadea5d9c glamor: Fix some screen_xy offsets to be the right way around. 2011-09-26 16:46:31 +08:00
Eric Anholt 44e4599b83 glamor: Move planemask to a function in case I decide to fill it in. 2011-09-26 16:46:31 +08:00
Eric Anholt 882411bef1 glamor: add alu support to setspans. 2011-09-26 16:46:31 +08:00
Eric Anholt c70ce72fd7 glamor: Give setspans the same format support as getspans. 2011-09-26 16:46:31 +08:00
Eric Anholt d9eef95c74 glamor: Fix bad fallthrough in getspans (accessing invalid memory). 2011-09-26 16:46:31 +08:00
Eric Anholt 0360ba361a glamor: Fix memory leak in getspans. 2011-09-26 16:46:31 +08:00
Eric Anholt cdb1fe6d96 glamor: Move setspans to a separate file. 2011-09-26 16:46:31 +08:00
Eric Anholt cfb8dea815 glamor: Hook up miGetImage to fix some invalid accesses. 2011-09-26 16:46:31 +08:00
Eric Anholt e3c02c09c1 glamor: Add ALU support to solid, tile, and putimage. 2011-09-26 16:46:31 +08:00
Eric Anholt 2b657d91d8 glamor: Add untested putimage support. 2011-09-26 16:46:31 +08:00
Eric Anholt f66e5c4145 glamor: Add 8bpp to get/setspans. 2011-09-26 16:46:31 +08:00
Eric Anholt 93ad091442 glamor: Add trapezoids code.
This fixes segfaults on starting gnome-terminal.
2011-09-26 16:46:31 +08:00
Eric Anholt 60ca0260f2 glamor: Add more solid_fail_regions for software fallbacks. 2011-09-26 16:46:31 +08:00
Eric Anholt 7500ee2b02 glamor: Fill in 1 and 24-bit getspans. 2011-09-26 16:46:31 +08:00
Eric Anholt f6cffbb2ba glamor: Add stub Composite support. 2011-09-26 16:46:31 +08:00
Eric Anholt 2fa26c4958 glamor: Free resources when destroying pixmaps. 2011-09-26 16:46:31 +08:00
Eric Anholt 16c3b929dd glamor: Add untested support for tile filling. 2011-09-26 16:46:31 +08:00
Eric Anholt 8016135ec7 glamor: Fill out glamor_get_color_4f_from_pixel() a bit. 2011-09-26 16:46:31 +08:00
Eric Anholt 519103565c glamor: Create FBOs for pixmaps. 2011-09-26 16:46:31 +08:00
Eric Anholt f92d1478e9 glamor: Maybe fix up the format/type for setspans. 2011-09-26 16:46:30 +08:00
Eric Anholt 4f139db92f glamor: Add getspans implementation. 2011-09-26 16:46:30 +08:00
Eric Anholt f1dbed5456 glamor: Move to using shader objects. 2011-09-26 16:46:30 +08:00
Eric Anholt fbbdd788cb glamor: Fix up DrawPixels arguments to bear some relation to reality. 2011-09-26 16:46:30 +08:00
Eric Anholt 74f262bcdb glamor: remove gratuitous flush. 2011-09-26 16:46:30 +08:00
Eric Anholt 399e006989 glamor: Fix up block/wakeup handler.
Prototypes are fixed, and we don't need to flush on wakeup.
2011-09-26 16:46:30 +08:00
Eric Anholt 2e35ceca65 ephyr: Use GLEW.
This will hide all sorts of extension stuff from us.
2011-09-26 16:46:30 +08:00
Eric Anholt 370df817ac ephyr: Make sure a glamor-using window is created with a glx visual. 2011-09-26 16:46:30 +08:00
Eric Anholt 08097434ec add fill files, merge with first real attempt at rendering. 2011-09-26 16:46:30 +08:00
Eric Anholt e32efb02e5 ephyr: merge the host glamor bits into hostx. 2011-09-26 16:46:30 +08:00
Eric Anholt df083fab84 glamor: first real attempt at rendering. 2011-09-26 16:46:30 +08:00
Eric Anholt 1b151f2e6a glamor: glFlush from the blockhandler so rendering happens. 2011-09-26 16:46:30 +08:00
Eric Anholt b530cdea4a glamor: Use a nicer struct initializer for gcops. 2011-09-26 16:46:30 +08:00
Eric Anholt 4d52ae7f2d glamor: Start trying to hook up the rendering bits 2011-09-26 16:46:30 +08:00
Eric Anholt 41e3e580de glamor: Use -lgl for Xephyr if GLX is unset.
I'm experimenting with that because of conflicts with GL dispatch tables.
2011-09-26 16:46:30 +08:00
Eric Anholt 8885b3b1ff Add exa/glamor to _DEPENDENCIES so the bin gets rebuilt with the libs. 2011-09-26 16:46:30 +08:00
Eric Anholt da6e0ffad2 More ephyr/glamor glue. 2011-09-26 16:46:30 +08:00
Eric Anholt 0ec823ce5b Add build infrastructure for glamor. 2011-09-26 16:37:50 +08:00
Keith Packard 7fb4bef039 Merge remote-tracking branch 'mattst88/for-keith' 2011-09-21 14:34:27 -07:00
Keith Packard 98f4940093 Merge remote-tracking branch 'alanc/master' 2011-09-21 14:30:19 -07:00
Keith Packard b018b81533 Merge remote-tracking branch 'jamey/reviewed' 2011-09-21 14:17:14 -07:00
Peter Harris c90903b4f7 xkb: add missing swaps for xkbGetDeviceInfoReply
Caught during review of e095369bf.

Signed-off-by: Peter Harris <pharris@opentext.com>
Reviewed-by-by: Matt Turner <mattst88@gmail.com>
Signed-off-by: Matt Turner <mattst88@gmail.com>
2011-09-21 17:14:45 -04:00
Matt Turner d206d52f65 Use __builtin_constant_p to determine if we can use lswapl
If the address of the swapped memory location is known at compile time,
we can check its alignment at no runtime cost and use lswapl instead.

           text   data    bss      dec     hex  filename
before: 1872820  52136  78040  2002996  1e9034  hw/xfree86/Xorg
after:  1864396  52136  78040  1994572  1e6f4c  hw/xfree86/Xorg

bswap instructions: 131 ->  308 (used in lswapl)
rol instructions:   943 -> 1174 (used in lswaps)

Reviewed-by: Peter Harris <pharris@opentext.com>
Signed-off-by: Matt Turner <mattst88@gmail.com>
2011-09-21 17:14:44 -04:00
Matt Turner 889b700e77 Use lswap{l,s} in cpswap{l,s}
Should be safe since cpswap isn't used on pointers.

           text   data    bss      dec     hex  filename
before: 1875588  52136  78040  2005764  1e9b04  hw/xfree86/Xorg
after:  1872820  52136  78040  2002996  1e9034  hw/xfree86/Xorg

bswap instructions:   5 -> 131 (used in lswapl)
rol instructions:   811 -> 943 (used in lswaps)

Reviewed-by: Peter Harris <pharris@opentext.com>
Signed-off-by: Matt Turner <mattst88@gmail.com>
2011-09-21 17:14:44 -04:00
Matt Turner a2f0ff5f73 Make lswap{l,s} inline functions
text   data    bss      dec     hex  filename
before: 1875668  52136  78040  2005844  1e9b54  hw/xfree86/Xorg
after:  1875588  52136  78040  2005764  1e9b04  hw/xfree86/Xorg

Reviewed-by: Peter Harris <pharris@opentext.com>
Signed-off-by: Matt Turner <mattst88@gmail.com>
2011-09-21 17:14:44 -04:00
Matt Turner e8ff555b95 Add type checking to swap macros
The original macros are retained (instead of replacing them with inline
functions) because of implicit type promotion. That is, an int16 passed
to an inline function taking int32 would be implicitly promoted to int32
without a warning.

Reviewed-by: Peter Harris <pharris@opentext.com>
Signed-off-by: Matt Turner <mattst88@gmail.com>
2011-09-21 17:14:44 -04:00
Matt Turner 893e86a49e Introduce swap_uint{16,32} functions, used in swap{l,s}
Reviewed-by: Peter Harris <pharris@opentext.com>
Signed-off-by: Matt Turner <mattst88@gmail.com>
2011-09-21 17:14:44 -04:00
Matt Turner 54770c980c Cast char* buffers to swap functions
Reviewed-by: Peter Harris <pharris@opentext.com>
Signed-off-by: Matt Turner <mattst88@gmail.com>
2011-09-21 17:14:44 -04:00
Matt Turner 9edcae78c4 Use correct swap{l,s} (or none at all for CARD8)
Swapping the wrong size was never caught because swap{l,s} are macros.

It's clear in the case of Xext/xres.c, that the author believed
client_major/minor to be CARD16 from looking at the code in the first
hunk.

v2: dmx.c fixes from Keith.

Reviewed-by: Peter Harris <pharris@opentext.com>
Signed-off-by: Matt Turner <mattst88@gmail.com>
2011-09-21 17:14:16 -04:00