Commit graph

136 commits

Author SHA1 Message Date
Jean-Baptiste Queru
5dfd90e5c7 Merge "pixelflinger: Fix function naming typo: gglBitBlti" 2010-08-16 09:33:04 -07:00
Jean-Baptiste Queru
4ea1a52b1b Merge "libpixelflinger: ARMv6 specific objects are not used. Remove." 2010-08-16 09:25:13 -07:00
Jim Huang
6e1a9430e8 pixelflinger: Fix function naming typo: gglBitBlti
From the functionality, the function gglBitBlti() implemented bit-block
(image) transfer operation in which several bitmaps are combined into
one using a raster operator.  Renaming to gglBitBlit() should be
explicit.

Change-Id: I23886623b5421131cf7c7bfb8ec67c3809566c93
2010-08-10 02:56:47 +08:00
Jim Huang
9fcaff4621 libpixelflinger: ARMv6 specific objects are not used. Remove.
This patch attempts to remove the generation of libpixelflinger_armv6,
which contains the ARMv6 specific object - rotate90CW_4x4_16v6.o.  But,
libpixelflinger_armv6 is not actually used by other projects.

Change-Id: I0e26fa2cf8b4dacfd208dd4279539c3e5b07580e
2010-08-10 02:18:53 +08:00
Jim Huang
6090dacd18 libpixelflinger: Move codeflinger test function to test-opengl-codegen
There is no need to include codeflinger test function in
libpixelflinger.  Instead, it should exist in test-opengl-codegen.

Change-Id: Ic5b0bd1f754b2ac678d4e16565568c70ceb8d325
2010-08-10 02:07:38 +08:00
The Android Open Source Project
67e6fcd195 merge from froyo-plus-aosp
Change-Id: Ie231effb4d9dfd63aa98ec08b269c31ce32aa1c0
2010-06-21 11:50:42 -07:00
The Android Open Source Project
f0d644fa23 merge from open-source master
Change-Id: I1ec0e1e702687697eccd3bf6c4f115cac85e382c
2010-06-15 11:23:52 -07:00
Jean-Baptiste Queru
62f4d86b7c Fix build - cpu-features is ARM-specific
Change-Id: I66521f279545a249e3dcb645914f7b66f23cef21
2010-06-15 08:19:56 -07:00
Martyn Capewell
4dc1fa8e8d Adds support for UBFX to JIT and Disassembler
This introduces UBFX instruction generation abilities to the Pixelflinger JIT,
and also modifies the component extraction function to generate the
instruction.

The extract function contains defines to prevent generation of UBFX on pre-v7
cores. The JIT itself retains the ability to produce the instruction even on
v5/6.

This patch only generates UBFX when MOV, AND or BIC can't be used. Based on
the TRM, this appears to be faster on A9 than using UBFX in all cases.

On startup, Pixelflinger JITs three chunks of code. UBFX improves these as
follows:

 00000077:03515104_00000000_00000000
 (Blends a single colour into an RGB565 buffer.)
  Before: 27 inst/pixel, After: 24 inst/pixel, Improvement: 12.5%
 00000077:03545404_00000A01_00000000
 (Blends RGBA8888 texture into an RGB565 buffer using alpha.)
  Before: 30 inst/pixel, After: 27 inst/pixel, Improvement: 11.1%
 00000077:03545404_00000A04_00000000
 (Blends RGB565 texture into an RGB565 buffer using alpha.)
  Before: 29 inst/pixel, After: 27 inst/pixel, Improvement: 7.4%
2010-05-28 17:04:36 +01:00
Nick Kralevich
beeeee705b Allow pixelflinger to work when NX (No Execute) is enabled.
Instead of allocating memory from the (non executable) heap,
allocate memory using mspace and ensure that we use mprotect
to mark it as PROT_EXEC.  This allows pixelflinger to
continue to work even when NX protections are enabled.

Testing: Using the ApiDemos market app, verify that
Apidemos -> Graphics -> OpenGL ES -> GLSurfaceView
works when "adb shell setprop debug.egl.hw 0" is set.

Change-Id: Ib569cd2543c6fa25688ee76325a712bc2347450b
2010-05-07 16:35:52 -07:00
The Android Open Source Project
44bce0fb57 merge from open-source master
Change-Id: Ic4cfffc3c8d465224b062cef7bcfe5827441057c
2010-05-05 16:03:52 -07:00
Bruce Beare
2bef93cc20 cpu-features.h is only available for ARM
Change-Id: I1e8001a1875bfd9cebfe18dfd757556b55c8213c
2010-05-04 15:35:09 -07:00
The Android Open Source Project
e57d89186d merge from open-source master
Change-Id: Ibc1c58aa757910f2b00acf6883127dd027f01d73
2010-05-03 16:32:46 -07:00
Jean-Baptiste Queru
9b6c850d24 fix sim build
Change-Id: Ide300eafbcbbc6dfae25fe86188302c6676c4a3b
2010-05-03 12:31:13 -07:00
Martyn Capewell
f42d2fac2b Fix LDM addressing mode disassembly
The Pixelflinger disassembler does not handle LDM addressing modes correctly,
assuming that the P and U bits in the instruction mean the same in both LDM and
STM. This results in the disassembler producing sequences like:

  stmfd r13!, {r4-r11, r14}
  ...
  ...
  ...
  ldmea r13!, {r4-r11, r14}

This small patch fixes it by EORing the P and U bits with the Load/Store bit.

Change-Id: Ic7a1556642c4e29415fc3697019f1239b6c26fc2
2010-04-29 09:13:48 -07:00
Jean-Baptiste Queru
86abd5fcab Merge "Adds UXTB16 support to Pixelflinger" 2010-04-29 09:11:37 -07:00
Mathias Agopian
fa36f2c3b7 fix [2448319] out of bounds array index in fog 2010-02-16 21:01:12 -08:00
Mathias Agopian
5dca849345 remove unused YUV constants 2010-02-16 16:54:53 -08:00
Martyn Capewell
f9e8ab03bd NEON shortcut for flat colour blending into 16-bit
This is a shortcut for the needs descriptor
00000077:03515104_00000000_00000000.  It requires blending a single 32-bit
colour value into a 16-bit framebuffer.
It's used when fading out the screen, eg. when a modal requester pops-up.

The PF JIT produces code for this using 24 instructions/pixel. The NEON
implementation requires 2.1 instructions/pixel. Performance hasn't been
benchmarked, but the improvement is quite visible.

This code has only been tested by inspection of the fading effect described
above, when press+holding a finger on the home screen to pop up the
Shortcuts/Widgets/Folders/Wallpaper requester.

Along with the NEON version, a fallback v5TE implementation is also provided.

This ARM version of col32cb16blend is not fully optimised, but is a reasonable
implementation, and better than the version produced by the JIT. It is here as
a fallback, if NEON is not available.
2009-12-07 15:00:19 +00:00
Martyn Capewell
96dbb4fc58 Adds UXTB16 support to Pixelflinger
* Add support for UXTB16 to the disassembler
 * Add encoding of the UXTB16 instruction to the Pixelflinger JIT.

Introducing the UXTB16 instruction allows removal of some masking code, and is
beneficial from a pipeline point of view - lots of UXTB16 followed by MUL
sequences.

Also, further rescheduling and use of SMULWB brings extra performance
improvements.

 * Use UXTB16 in bilinear filtered texturing

Uses UXTB16 to extract channels for SIMD operations, rather than creating and
ANDing with masks. Saves a register and is faster on A8, as UXTB16 result can
feed into first stage of multiply, unlike AND.

Also, used SMULWB rather than SMULBB, which allows removal of MOVs used to
rescale results.

Code has been scheduled for A8 pipeline, specifically aiming to allow
multiplies to issue in pipeline 0, for efficient dual issue operation.

Testing on SpriteMethodTest (http://code.google.com/p/apps-for-android/) gives
8% improvement (12.7 vs. 13.7 fps.)

SMULBB to SMULWB trick could be used in <v6 code path, but this hasn't been
implemented.
2009-12-07 13:59:59 +00:00
Jean-Baptiste Queru
4b29fe640a eclair snapshot 2009-11-12 18:46:23 -08:00
Mathias Agopian
9d88176417 fix part of [2017702] OpenGL bugs with alpha values of 1.0 in the source during blending into 8888 buffers
when ONE / ONE_MINUS_SRC_ALPHA blending mode was used, the code wasn't saturating the color component.
the reason was that this mode is used for premltiplied alpha blending, however, if used with a non
premultiplied source, the color component would wrap.

unfortunately, this costs 6 extra cycles per pixels, however... "correctness" prevails.

this should not impact the UI since it's using h/w acceleration most of the time it also doesn't
impact games which should be using h/w GL. This change will slow the emulator down a bit.
2009-08-18 14:34:51 -07:00
Mathias Agopian
665a2227e5 we actually have to saturate when doing premultilied blending with opengl 2009-08-07 13:01:46 -07:00
Android (Google) Code Review
f6243df747 am 8b48cf61: Merge change 2897 into donut
Merge commit '8b48cf61704bbd1cd6e672fe73d8491f8984b484'

* commit '8b48cf61704bbd1cd6e672fe73d8491f8984b484':
  fix 1650170 pixelflinger depends on KeyedVector.h, etc
2009-06-02 00:36:23 -07:00
Mathias Agopian
006ba85e98 fix 1650170 pixelflinger depends on KeyedVector.h, etc 2009-06-01 15:27:46 -07:00
Jean-Baptiste Queru
83b65486be Merge commit 'remotes/korg/cupcake' into merge
Conflicts:
	init/devices.c
	libpixelflinger/Android.mk
2009-03-18 09:29:29 -07:00
The Android Open Source Project
dd7bc3319d auto import from //depot/cupcake/@135843 2009-03-03 19:32:55 -08:00
The Android Open Source Project
e54eebbf1a auto import from //depot/cupcake/@135843 2009-03-03 18:29:04 -08:00
The Android Open Source Project
3e292b9716 auto import from //branches/cupcake/...@132569 2009-02-20 07:38:35 -08:00
The Android Open Source Project
261ed7551e auto import from //branches/cupcake/...@132276 2009-02-19 10:57:36 -08:00
The Android Open Source Project
13f797da7f auto import from //branches/cupcake/...@130745 2009-02-10 15:44:07 -08:00
android-build SharedAccount
439f6ca123 auto import from //branches/cupcake/...@126645 2009-01-15 16:22:10 -08:00
The Android Open Source Project
2eef60297a auto import from //branches/cupcake/...@126645 2009-01-15 16:12:14 -08:00
Brian Swetland
5a326952d7 fix TINY ANDROID build
A better fix would be to banish this qemu tracing stuff from libhardware
and also banish it from non-emulator builds, but this at least gets the
minimal build building again.
2008-12-23 22:29:27 -08:00
The Android Open Source Project
35237d1358 Code drop from //branches/cupcake/...@124589 2008-12-17 18:08:08 -08:00
The Android Open Source Project
4f6e8d7a00 Initial Contribution 2008-10-21 07:00:00 -07:00