Commit graph

120 commits

Author SHA1 Message Date
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