OSDN Git Service

android-x86/external-swiftshader.git
8 years agoAdd ./ to the test app's rpath.
Nicolas Capens [Sat, 9 Jan 2016 18:01:08 +0000 (13:01 -0500)]
Add ./ to the test app's rpath.

Change-Id: If93cfd390846e26348a6f30a85d340d4df57e891
Reviewed-on: https://swiftshader-review.googlesource.com/4532
Reviewed-by: Nicolas Capens <capn@google.com>
Tested-by: Nicolas Capens <capn@google.com>
8 years agoFix memory leaks.
Nicolas Capens [Sat, 9 Jan 2016 04:33:22 +0000 (23:33 -0500)]
Fix memory leaks.

Change-Id: I668c4295fd13d028fa53f6aa75ac6c6d4c6de44f
Reviewed-on: https://swiftshader-review.googlesource.com/4531
Reviewed-by: Nicolas Capens <capn@google.com>
Tested-by: Nicolas Capens <capn@google.com>
8 years agoAdd suggested braces for subobject initialization.
Nicolas Capens [Sat, 2 Jan 2016 05:00:35 +0000 (00:00 -0500)]
Add suggested braces for subobject initialization.

Bug 15387371

Change-Id: I771b6e9f30669aade18eba8b3749fcb71ae8ef97
Reviewed-on: https://swiftshader-review.googlesource.com/4501
Reviewed-by: Alexis Hétu <sugoi@google.com>
Reviewed-by: Nicolas Capens <capn@google.com>
Tested-by: Nicolas Capens <capn@google.com>
8 years agoFix tautological expressions.
Nicolas Capens [Fri, 8 Jan 2016 06:30:48 +0000 (01:30 -0500)]
Fix tautological expressions.

Bug 15387371

Change-Id: I01bf5327f205bf646c51c1bb06560448a09f6c4a
Reviewed-on: https://swiftshader-review.googlesource.com/4526
Reviewed-by: Alexis Hétu <sugoi@google.com>
Reviewed-by: Nicolas Capens <capn@google.com>
Tested-by: Nicolas Capens <capn@google.com>
8 years agoFix LLVM code warnings.
Nicolas Capens [Sat, 2 Jan 2016 04:31:19 +0000 (23:31 -0500)]
Fix LLVM code warnings.

Bug 15387371

Change-Id: Ic5374735e6ca386e871848c34890272c1259c273
Reviewed-on: https://swiftshader-review.googlesource.com/4496
Reviewed-by: Alexis Hétu <sugoi@google.com>
Reviewed-by: Nicolas Capens <capn@google.com>
Tested-by: Nicolas Capens <capn@google.com>
8 years agoFix operator precedence warnings.
Nicolas Capens [Sat, 2 Jan 2016 05:23:53 +0000 (00:23 -0500)]
Fix operator precedence warnings.

Bug 15387371

Change-Id: I665ee641932d34abb28f150ba036bbbed9fa1431
Reviewed-on: https://swiftshader-review.googlesource.com/4503
Reviewed-by: Alexis Hétu <sugoi@google.com>
Reviewed-by: Nicolas Capens <capn@google.com>
Tested-by: Nicolas Capens <capn@google.com>
8 years agoAdd default switch cases.
Nicolas Capens [Sat, 2 Jan 2016 05:06:41 +0000 (00:06 -0500)]
Add default switch cases.

Bug 15387371

Change-Id: I97644bfd9dbdc1109630199bc897f8b2572d5e83
Reviewed-on: https://swiftshader-review.googlesource.com/4502
Reviewed-by: Alexis Hétu <sugoi@google.com>
Reviewed-by: Nicolas Capens <capn@google.com>
Tested-by: Nicolas Capens <capn@google.com>
8 years agoFix potentially uninitialized variables.
Nicolas Capens [Sat, 2 Jan 2016 04:47:52 +0000 (23:47 -0500)]
Fix potentially uninitialized variables.

Bug 15387371

Change-Id: Ie0486feeebc6e4bceba148bea69f2d1ee1d1ffd8
Reviewed-on: https://swiftshader-review.googlesource.com/4499
Reviewed-by: Alexis Hétu <sugoi@google.com>
Reviewed-by: Nicolas Capens <capn@google.com>
Tested-by: Nicolas Capens <capn@google.com>
8 years agoFix macro redefinition warning.
Nicolas Capens [Sat, 2 Jan 2016 04:24:01 +0000 (23:24 -0500)]
Fix macro redefinition warning.

Bug 15387371

Change-Id: I1d9524b15a62a561508a5cc2b76ba0b1e8d37fdc
Reviewed-on: https://swiftshader-review.googlesource.com/4495
Reviewed-by: Alexis Hétu <sugoi@google.com>
Reviewed-by: Nicolas Capens <capn@google.com>
Tested-by: Nicolas Capens <capn@google.com>
8 years agoFix initialization order warnings.
Nicolas Capens [Sat, 2 Jan 2016 04:17:42 +0000 (23:17 -0500)]
Fix initialization order warnings.

Bug 15387371

Change-Id: I01da3db7d6bb795c46153dbc12fd41478f4b6416
Reviewed-on: https://swiftshader-review.googlesource.com/4493
Reviewed-by: Alexis Hétu <sugoi@google.com>
Reviewed-by: Nicolas Capens <capn@google.com>
Tested-by: Nicolas Capens <capn@google.com>
8 years agoFix string format specifiers.
Nicolas Capens [Sat, 2 Jan 2016 03:47:44 +0000 (22:47 -0500)]
Fix string format specifiers.

Bug 15387371

Change-Id: I0f86d5ddcef0c2b6fc45164c730eb55f44c5c490
Reviewed-on: https://swiftshader-review.googlesource.com/4492
Reviewed-by: Alexis Hétu <sugoi@google.com>
Reviewed-by: Nicolas Capens <capn@google.com>
Tested-by: Nicolas Capens <capn@google.com>
8 years agoUse empty initializer lists for zeroing structs.
Nicolas Capens [Fri, 1 Jan 2016 06:21:18 +0000 (01:21 -0500)]
Use empty initializer lists for zeroing structs.

This works around an incorrect Clang warning:
https://llvm.org/bugs/show_bug.cgi?id=21689

Bug 15387371

Change-Id: I2460a4f6dd414f518789be1fcc8ce8b205c6a066
Reviewed-on: https://swiftshader-review.googlesource.com/4491
Reviewed-by: Alexis Hétu <sugoi@google.com>
Reviewed-by: Nicolas Capens <capn@google.com>
Tested-by: Nicolas Capens <capn@google.com>
8 years agoStatically allocate one EGL display.
Nicolas Capens [Wed, 6 Jan 2016 22:34:03 +0000 (17:34 -0500)]
Statically allocate one EGL display.

This reduces support to EGL_DEFAULT_DISPLAY or assumes the
native display handle corresponds with the default display.

Bug 24600445

Change-Id: Ieb5d08beceff1cc46557483e1bed159dd9ab1bee
Reviewed-on: https://swiftshader-review.googlesource.com/4520
Tested-by: Nicolas Capens <capn@google.com>
Reviewed-by: Alexis Hétu <sugoi@google.com>
Reviewed-by: Nicolas Capens <capn@google.com>
8 years agoFixed matrix4x2 and matrix4x3 uniform arrays
Alexis Hetu [Thu, 7 Jan 2016 21:44:01 +0000 (16:44 -0500)]
Fixed matrix4x2 and matrix4x3 uniform arrays

matrix4x2 and matrix4x3 uniform arrays were broken because
the structure allocated to contain them was of the wrong
dimension, causing subsequent array elements to overwrite
a portion of the previous element.

Change-Id: I8129c7352f5470146994a0a89052a75fcfc4e54f
Reviewed-on: https://swiftshader-review.googlesource.com/4524
Tested-by: Alexis Hétu <sugoi@google.com>
Reviewed-by: Nicolas Capens <capn@google.com>
8 years agoFix a few missing EGL error resets.
Nicolas Capens [Thu, 7 Jan 2016 16:02:49 +0000 (11:02 -0500)]
Fix a few missing EGL error resets.

Change-Id: I0f28b08b865f85f212beaa74fa75f3b3620d9836
Reviewed-on: https://swiftshader-review.googlesource.com/4522
Tested-by: Nicolas Capens <capn@google.com>
Reviewed-by: Alexis Hétu <sugoi@google.com>
Reviewed-by: Nicolas Capens <capn@google.com>
8 years agoImplement glDrawTexfOES.
Nicolas Capens [Thu, 7 Jan 2016 16:31:31 +0000 (11:31 -0500)]
Implement glDrawTexfOES.

Bug 26424655

Change-Id: I24f9b17f5768d457b64fc510bf88f392f02759bc
Reviewed-on: https://swiftshader-review.googlesource.com/4523
Tested-by: Nicolas Capens <capn@google.com>
Reviewed-by: Alexis Hétu <sugoi@google.com>
Reviewed-by: Nicolas Capens <capn@google.com>
8 years agoReturn EGL_BAD_ATTRIBUTE for unsupported HAL formats.
Nicolas Capens [Wed, 6 Jan 2016 03:42:34 +0000 (22:42 -0500)]
Return EGL_BAD_ATTRIBUTE for unsupported HAL formats.

As prescribed by the EGL_ANDROID_image_native_buffer extension spec.

Change-Id: Id4213e245d055971bd687f484dbc5efa7958adda
Reviewed-on: https://swiftshader-review.googlesource.com/4518
Tested-by: Nicolas Capens <capn@google.com>
Reviewed-by: Greg Hartman <ghartman@google.com>
Reviewed-by: Nicolas Capens <capn@google.com>
8 years agoFix aligned access regression.
Nicolas Capens [Wed, 6 Jan 2016 18:44:09 +0000 (13:44 -0500)]
Fix aligned access regression.

This fixes commit cd0ea23407fb36528388cd6705f0150c0972963e.

Change-Id: I51c82049fa809f303401b6623dbaa947a50d6d62
Reviewed-on: https://swiftshader-review.googlesource.com/4519
Tested-by: Nicolas Capens <capn@google.com>
Reviewed-by: Alexis Hétu <sugoi@google.com>
Reviewed-by: Nicolas Capens <capn@google.com>
8 years agoEliminate duplicate window size query code.
Nicolas Capens [Wed, 30 Dec 2015 16:42:43 +0000 (11:42 -0500)]
Eliminate duplicate window size query code.

Change-Id: Ibe95427c6b626c308dff41996f636a7dc88f792c
Reviewed-on: https://swiftshader-review.googlesource.com/4444
Tested-by: Nicolas Capens <capn@google.com>
Reviewed-by: Alexis Hétu <sugoi@google.com>
Reviewed-by: Nicolas Capens <capn@google.com>
8 years agoFix using floating-point exp2()
Nicolas Capens [Thu, 24 Dec 2015 06:39:43 +0000 (01:39 -0500)]
Fix using floating-point exp2()

Change-Id: I2dc3942032458093bb132d7b86c34f05e1bb8137
Reviewed-on: https://swiftshader-review.googlesource.com/4443
Tested-by: Nicolas Capens <capn@google.com>
Reviewed-by: Alexis Hétu <sugoi@google.com>
Reviewed-by: Nicolas Capens <capn@google.com>
8 years agoRegenerate parsers using flex 2.6 & bison 3.0.4.
Nicolas Capens [Tue, 5 Jan 2016 16:29:13 +0000 (11:29 -0500)]
Regenerate parsers using flex 2.6 & bison 3.0.4.

This removes uses of the "register" keyword,
which is deprecated from C++11.

Change-Id: If302563117f7d978b6f65312fc08e447905e0cde
Reviewed-on: https://swiftshader-review.googlesource.com/4513
Tested-by: Nicolas Capens <capn@google.com>
Reviewed-by: Alexis Hétu <sugoi@google.com>
Reviewed-by: Nicolas Capens <capn@google.com>
8 years agoFix XRGB surface to RGB texture binding.
Nicolas Capens [Tue, 5 Jan 2016 19:06:13 +0000 (14:06 -0500)]
Fix XRGB surface to RGB texture binding.

Change-Id: I6a1dd24d997c64596dc096893338b7f471e64896
Reviewed-on: https://swiftshader-review.googlesource.com/4516
Tested-by: Nicolas Capens <capn@google.com>
Reviewed-by: Alexis Hétu <sugoi@google.com>
Reviewed-by: Nicolas Capens <capn@google.com>
8 years agoFix basing aligned access on stride instead of width.
Nicolas Capens [Tue, 5 Jan 2016 18:53:42 +0000 (13:53 -0500)]
Fix basing aligned access on stride instead of width.

Change-Id: I8c3600e9bce3e647ccbeb5590744530d43769ea2
Reviewed-on: https://swiftshader-review.googlesource.com/4515
Tested-by: Nicolas Capens <capn@google.com>
Reviewed-by: Alexis Hétu <sugoi@google.com>
Reviewed-by: Nicolas Capens <capn@google.com>
8 years agoLog use of RGB_888, which is currently not supported natively.
Nicolas Capens [Tue, 5 Jan 2016 21:26:21 +0000 (16:26 -0500)]
Log use of RGB_888, which is currently not supported natively.

Change-Id: Ia1c7bf07e296c4f12334061f1a8b6ba695fea937
Reviewed-on: https://swiftshader-review.googlesource.com/4035
Reviewed-by: Nicolas Capens <capn@google.com>
Tested-by: Nicolas Capens <capn@google.com>
8 years agoOptimize Int2 construction.
Nicolas Capens [Tue, 5 Jan 2016 05:08:45 +0000 (00:08 -0500)]
Optimize Int2 construction.

Change-Id: Ibab854164a45c998976e65b8bfec80a8a688461b
Reviewed-on: https://swiftshader-review.googlesource.com/4511
Reviewed-by: Alexis Hétu <sugoi@google.com>
Reviewed-by: Nicolas Capens <capn@google.com>
Tested-by: Nicolas Capens <capn@google.com>
8 years agoReplace Concatenate with vector constructors.
Nicolas Capens [Tue, 5 Jan 2016 17:03:47 +0000 (12:03 -0500)]
Replace Concatenate with vector constructors.

Change-Id: Ic397b07800c423cfa2648b082ad8606c09223398
Reviewed-on: https://swiftshader-review.googlesource.com/4514
Tested-by: Nicolas Capens <capn@google.com>
Reviewed-by: Alexis Hétu <sugoi@google.com>
Reviewed-by: Nicolas Capens <capn@google.com>
8 years agoImplement support for MMX movd instruction generation.
Nicolas Capens [Tue, 5 Jan 2016 04:03:59 +0000 (23:03 -0500)]
Implement support for MMX movd instruction generation.

Based on http://lists.llvm.org/pipermail/llvm-commits/Week-of-Mon-20150202/257325.html
and http://lists.llvm.org/pipermail/llvm-commits/Week-of-Mon-20121029/154639.html

Change-Id: I098654245c06a975b8b0bc66e0feb5acea0e9c89
Reviewed-on: https://swiftshader-review.googlesource.com/4510
Tested-by: Nicolas Capens <capn@google.com>
Reviewed-by: Alexis Hétu <sugoi@google.com>
Reviewed-by: Nicolas Capens <capn@google.com>
8 years agoFix format/type conversion for readPixels.
Nicolas Capens [Thu, 31 Dec 2015 16:30:40 +0000 (11:30 -0500)]
Fix format/type conversion for readPixels.

Change-Id: I5d9d8247fc847e987cbe7d62f7e8641ac4225f50
Reviewed-on: https://swiftshader-review.googlesource.com/4448
Tested-by: Nicolas Capens <capn@google.com>
Reviewed-by: Alexis Hétu <sugoi@google.com>
Reviewed-by: Nicolas Capens <capn@google.com>
8 years agoFix checking for invalid query enums.
Nicolas Capens [Mon, 4 Jan 2016 18:13:47 +0000 (13:13 -0500)]
Fix checking for invalid query enums.

Change-Id: I4cca0f1cf0cc2cd95502769d9653939d6999b8e1
Reviewed-on: https://swiftshader-review.googlesource.com/4507
Tested-by: Nicolas Capens <capn@google.com>
Reviewed-by: Alexis Hétu <sugoi@google.com>
Reviewed-by: Nicolas Capens <capn@google.com>
8 years agoEliminate AndroidCommon header and source.
Nicolas Capens [Thu, 31 Dec 2015 19:38:46 +0000 (14:38 -0500)]
Eliminate AndroidCommon header and source.

Change-Id: I3983513f09f70b36ab506b3c405aa347df2f36b9
Reviewed-on: https://swiftshader-review.googlesource.com/4490
Reviewed-by: Nicolas Capens <capn@google.com>
Tested-by: Nicolas Capens <capn@google.com>
8 years agoClean up GL header includes.
Nicolas Capens [Thu, 31 Dec 2015 19:10:55 +0000 (14:10 -0500)]
Clean up GL header includes.

Change-Id: I6dcaac900eaae54d2ec0265d656fdc9c38371b8a
Reviewed-on: https://swiftshader-review.googlesource.com/4449
Reviewed-by: Nicolas Capens <capn@google.com>
Tested-by: Nicolas Capens <capn@google.com>
8 years agoPass the gralloc buffer stride to sw::Surface.
Nicolas Capens [Tue, 24 Nov 2015 20:33:31 +0000 (15:33 -0500)]
Pass the gralloc buffer stride to sw::Surface.

Bug 19979104

Change-Id: If9dd668b4b6a1d82b38d1840648cb578e80495bf
Reviewed-on: https://swiftshader-review.googlesource.com/4302
Reviewed-by: Nicolas Capens <capn@google.com>
Tested-by: Nicolas Capens <capn@google.com>
8 years agoUse the given YV12 texture stride instead of computing it from width.
Nicolas Capens [Fri, 20 Nov 2015 03:58:29 +0000 (22:58 -0500)]
Use the given YV12 texture stride instead of computing it from width.

Bug 25690690

Change-Id: If25a8868effb1e55908c4041555e553b52ee789a
Reviewed-on: https://swiftshader-review.googlesource.com/4292
Reviewed-by: Keun Soo Yim <yim@google.com>
Reviewed-by: Nicolas Capens <capn@google.com>
Tested-by: Nicolas Capens <capn@google.com>
8 years agoRename translator libraries.
Nicolas Capens [Wed, 23 Dec 2015 20:12:45 +0000 (15:12 -0500)]
Rename translator libraries.

Change-Id: I9acb04151fa5230f59304b357438fadd914a68ce
Reviewed-on: https://swiftshader-review.googlesource.com/4450
Reviewed-by: Nicolas Capens <capn@google.com>
Tested-by: Nicolas Capens <capn@google.com>
8 years agoOptimize for size.
Nicolas Capens [Wed, 23 Dec 2015 17:02:01 +0000 (12:02 -0500)]
Optimize for size.

Change-Id: I7013a57ab7d6bc1916d0a87b72ae826409a34ee9
Reviewed-on: https://swiftshader-review.googlesource.com/4442
Reviewed-by: Nicolas Capens <capn@google.com>
Tested-by: Nicolas Capens <capn@google.com>
8 years agoStatically link LLVM on OSX.
Nicolas Capens [Wed, 23 Dec 2015 03:04:28 +0000 (22:04 -0500)]
Statically link LLVM on OSX.

Change-Id: Idbde45f1817ad9c9b3a4b526de78ecdf03e64d1f
Reviewed-on: https://swiftshader-review.googlesource.com/4440
Reviewed-by: Nicolas Capens <capn@google.com>
Tested-by: Nicolas Capens <capn@google.com>
8 years agoFix OSX retina display support.
Nicolas Capens [Sat, 19 Dec 2015 06:48:43 +0000 (01:48 -0500)]
Fix OSX retina display support.

Change-Id: I712b089c36e9c696c44a8d99a3d21819798a6142
Reviewed-on: https://swiftshader-review.googlesource.com/4430
Reviewed-by: Nicolas Capens <capn@google.com>
Tested-by: Nicolas Capens <capn@google.com>
8 years agoPort to OSX.
Corentin Wallez [Thu, 10 Dec 2015 20:59:28 +0000 (15:59 -0500)]
Port to OSX.

Change-Id: I31fdb6a1e403831feb6040ea756f2c144ac79a5b
Reviewed-on: https://swiftshader-review.googlesource.com/4383
Reviewed-by: Nicolas Capens <capn@google.com>
Tested-by: Nicolas Capens <capn@google.com>
8 years agoAdd OSX version of OGLES2HelloAPI sample.
Corentin Wallez [Thu, 10 Dec 2015 20:59:28 +0000 (15:59 -0500)]
Add OSX version of OGLES2HelloAPI sample.

Change-Id: I2f8511486ca3b040b257c2a763abb1bd0647d0e6
Reviewed-on: https://swiftshader-review.googlesource.com/4441
Reviewed-by: Nicolas Capens <capn@google.com>
Tested-by: Nicolas Capens <capn@google.com>
8 years agoMake SwiftShader compile on Mac (with unimplemented functions)
Corentin Wallez [Wed, 9 Dec 2015 20:22:08 +0000 (15:22 -0500)]
Make SwiftShader compile on Mac (with unimplemented functions)

Change-Id: Iaef054314fb27632513397412ca9dc22b67a70ce
Reviewed-on: https://swiftshader-review.googlesource.com/4380
Reviewed-by: Nicolas Capens <capn@google.com>
Tested-by: Nicolas Capens <capn@google.com>
8 years agoAdd LLVM config headers for OSX.
Corentin Wallez [Wed, 9 Dec 2015 19:42:19 +0000 (14:42 -0500)]
Add LLVM config headers for OSX.

Change-Id: I08d5d852322a75c8b3a0d6932f229da7022a82f1
Reviewed-on: https://swiftshader-review.googlesource.com/4379
Reviewed-by: Nicolas Capens <capn@google.com>
Tested-by: Nicolas Capens <capn@google.com>
8 years agoAdd a CMakelists.txt to compile on Linux and Mac
Corentin Wallez [Wed, 9 Dec 2015 18:49:40 +0000 (13:49 -0500)]
Add a CMakelists.txt to compile on Linux and Mac

Windows support is still WIP

Change-Id: I5fd5bcda4fad754c0ce73698eddbe73e538f56df
Reviewed-on: https://swiftshader-review.googlesource.com/4370
Reviewed-by: Nicolas Capens <capn@google.com>
Tested-by: Nicolas Capens <capn@google.com>
8 years agoStore the native display as an opaque pointer.
Nicolas Capens [Fri, 11 Dec 2015 22:24:40 +0000 (17:24 -0500)]
Store the native display as an opaque pointer.

Bug 18314459

Change-Id: I63e56d626bd1838803d1de71b417b7e40242c5e9
Reviewed-on: https://swiftshader-review.googlesource.com/4390
Reviewed-by: Nicolas Capens <capn@google.com>
Tested-by: Nicolas Capens <capn@google.com>
8 years agoFix missing abs() declaration.
Nicolas Capens [Mon, 21 Dec 2015 20:48:31 +0000 (15:48 -0500)]
Fix missing abs() declaration.

Change-Id: I7e4ceea2a45e8767881094de8b69b4d3aadab158
Reviewed-on: https://swiftshader-review.googlesource.com/4354
Reviewed-by: Nicolas Capens <capn@google.com>
Tested-by: Nicolas Capens <capn@google.com>
8 years agoRemove unnecessary header includes.
Nicolas Capens [Mon, 14 Dec 2015 18:18:11 +0000 (13:18 -0500)]
Remove unnecessary header includes.

Change-Id: If1a8a581a63e801ec3855c554f10dabd67e8a4fd
Reviewed-on: https://swiftshader-review.googlesource.com/4400
Reviewed-by: Nicolas Capens <capn@google.com>
Tested-by: Nicolas Capens <capn@google.com>
8 years agoImplemented support for RGB10_A2 in blitter
Alexis Hetu [Thu, 17 Dec 2015 16:09:36 +0000 (11:09 -0500)]
Implemented support for RGB10_A2 in blitter

Added RGB10_A2 implementation in the Blitter and cases in
related Surface utility functions.

Change-Id: I2b1a9cdc1acc605085fb0f853741cc2f75bf1c9b
Reviewed-on: https://swiftshader-review.googlesource.com/4420
Tested-by: Alexis Hétu <sugoi@google.com>
Reviewed-by: Nicolas Capens <capn@google.com>
8 years agoSending magnification filter info to the sampler
Alexis Hetu [Thu, 10 Dec 2015 13:42:02 +0000 (08:42 -0500)]
Sending magnification filter info to the sampler

Currently, the magnification filter information is ignored
by SwiftShader. In order to fix it, the 1st step is simply
to make the sampler aware of this information. After this,
a subsequent cl using the duvdxy computed in computeLod
will choose which filter to use (if they are different).

Change-Id: Idc8636c3d981c944815094f23e443725bed4cf27
Reviewed-on: https://swiftshader-review.googlesource.com/4382
Tested-by: Alexis Hétu <sugoi@google.com>
Reviewed-by: Nicolas Capens <capn@google.com>
8 years agoFixed format validations
Alexis Hetu [Thu, 15 Oct 2015 21:22:57 +0000 (17:22 -0400)]
Fixed format validations

Format validations were failing if the exact same format
wasn't used between different texture related calls to the
same texture, even when the formats were equivalent, so I
added a GetSizedInternalFormat function based on a format
map (courtesy of Angle). The validation checks were also
unified in utilities.cpp and used wherever texture formats
were used, to make sure Image objects used in Texture
objects always use the sized format, so that format
comparisons work properly.

Change-Id: I72fc8fb1b0f135ac679c274866e5b8e223541e7f
Reviewed-on: https://swiftshader-review.googlesource.com/4082
Tested-by: Alexis Hétu <sugoi@google.com>
Reviewed-by: Nicolas Capens <capn@google.com>
8 years agoBlitter int to int copy fix
Alexis Hetu [Wed, 16 Dec 2015 21:54:32 +0000 (16:54 -0500)]
Blitter int to int copy fix

Integer to integer types copy operations were failing due
to a missing assignment when calling the Insert function
and bad offsets on 16 and 32 bit component types.

Change-Id: I2db55e9b6a284f8349e8fef0451255ee33be5837
Reviewed-on: https://swiftshader-review.googlesource.com/4410
Tested-by: Alexis Hétu <sugoi@google.com>
Reviewed-by: Nicolas Capens <capn@google.com>
8 years agoFixed stencil clear
Alexis Hetu [Thu, 3 Dec 2015 19:23:10 +0000 (14:23 -0500)]
Fixed stencil clear

Fixed a few mistakes in the stencil clearing code to fix both
masking and scissoring. Also added a few variable in both the
depth clearing code and stencil clearing code to make them
more readable.

Bug 25971463

Change-Id: If33e2b0685fd35ef2edd31c56aea088cfbf2b430
Reviewed-on: https://swiftshader-review.googlesource.com/4335
Tested-by: Alexis Hétu <sugoi@google.com>
Reviewed-by: Nicolas Capens <capn@google.com>
8 years agoFixed blitter operation from alphaless types
Alexis Hetu [Mon, 14 Dec 2015 22:33:04 +0000 (17:33 -0500)]
Fixed blitter operation from alphaless types

Some types without alpha were not correctly setting the
alpha value, so copying to a type with alpha was causing
the image to not appear (due to it being almost completely
transparent).

Change-Id: Ib12c291bd5c51628e0579285731033372656f6a0
Reviewed-on: https://swiftshader-review.googlesource.com/4391
Reviewed-by: Nicolas Capens <capn@google.com>
Tested-by: Alexis Hétu <sugoi@google.com>
8 years agoAdded new extensions
Alexis Hetu [Fri, 4 Dec 2015 16:16:35 +0000 (11:16 -0500)]
Added new extensions

The new extensions are:
- GL_OES_framebuffer_object (with extra exports)
- GL_OES_depth24
- GL_OES_depth32
- GL_EXT_color_buffer_half_float

These were mostly supported already with the GLES3 related changes,
so only a few minor changes were required.

Change-Id: Iab6e94043cfdabb8ad74e526f44f7bd9d57c267f
Reviewed-on: https://swiftshader-review.googlesource.com/4342
Reviewed-by: Nicolas Capens <capn@google.com>
Tested-by: Alexis Hétu <sugoi@google.com>
8 years agoUpdate eglplatform.h to latest Khronos version.
Nicolas Capens [Wed, 9 Dec 2015 21:17:25 +0000 (16:17 -0500)]
Update eglplatform.h to latest Khronos version.

We need this to define the native EGL types for Apple.

Change-Id: Iba492ea863fffd3649c8f7a3b7ca7453e12c3772
Reviewed-on: https://swiftshader-review.googlesource.com/4381
Tested-by: Nicolas Capens <capn@google.com>
Reviewed-by: Corentin Wallez <cwallez@google.com>
Reviewed-by: Nicolas Capens <capn@google.com>
8 years agoEnabled 2D array textures
Alexis Hetu [Tue, 1 Dec 2015 20:13:23 +0000 (15:13 -0500)]
Enabled 2D array textures

- Implemented mipmap generation and completeness checks for
  Texture2DArray.
- Fixed texture parameters setters and getters along with
  mipmap generation functions to use the proper 2D array
  texture instead of the 3D texture for 2D array textures.
- Enabled the same path as 3D texture for 2D array textures
  in the sampler.
- Added an address function for the w component, which
  simply clamps the rounded value for 2D array textures and
  adapted SamplerCore::computeIndices to this new behavior.

Change-Id: Ida0659afac75330bfd9af4052cfd2625c729f9ef
Reviewed-on: https://swiftshader-review.googlesource.com/4310
Tested-by: Alexis Hétu <sugoi@google.com>
Reviewed-by: Nicolas Capens <capn@google.com>
8 years agoUse stlport prior to Marshmallow.
Nicolas Capens [Tue, 8 Dec 2015 01:58:40 +0000 (20:58 -0500)]
Use stlport prior to Marshmallow.

Change-Id: I83294568a5725e95fcf2d7490336bead35517bdf
Reviewed-on: https://swiftshader-review.googlesource.com/4362
Tested-by: Nicolas Capens <capn@google.com>
Reviewed-by: Greg Hartman <ghartman@google.com>
Reviewed-by: Nicolas Capens <capn@google.com>
8 years agoFramebuffer completeness multisample fix
Alexis Hetu [Tue, 8 Dec 2015 16:24:21 +0000 (11:24 -0500)]
Framebuffer completeness multisample fix

Framebuffer completeness, usually verified through
glCheckFramebufferStatus, should return
GL_FRAMEBUFFER_INCOMPLETE_MULTISAMPLE when the number of
samples is not the same for all attached renderbuffers.

Change-Id: I8d29895c6d4ded26847ce47fbd2581bbf06ed1bf
Reviewed-on: https://swiftshader-review.googlesource.com/4363
Tested-by: Alexis Hétu <sugoi@google.com>
Reviewed-by: Nicolas Capens <capn@google.com>
8 years agoFramebufferTextureLayer fix
Alexis Hetu [Fri, 4 Dec 2015 22:12:35 +0000 (17:12 -0500)]
FramebufferTextureLayer fix

Fixed a few things related to FramebufferTextureLayer:
- Added layer validation to make sure it does not exceed
  the size of the 3D texture's or 2D array's depth.
- Fixed frambuffer target / texture target confusion.
- Removed bad validation.
- Fixed last 2 arguments of set[insert type]Buffer calls
  (layer and level) which were inverted.

Change-Id: Ie1f2cb595d8b9abfee27bcf834c535f7e023e3ee
Reviewed-on: https://swiftshader-review.googlesource.com/4343
Tested-by: Alexis Hétu <sugoi@google.com>
Reviewed-by: Nicolas Capens <capn@google.com>
8 years agoRemove unused header.
Nicolas Capens [Sat, 5 Dec 2015 04:42:19 +0000 (23:42 -0500)]
Remove unused header.

Change-Id: I2bd7c62b0923c855327fdb105eb22ef4655ea8ac
Reviewed-on: https://swiftshader-review.googlesource.com/4344
Reviewed-by: Nicolas Capens <capn@google.com>
Tested-by: Nicolas Capens <capn@google.com>
8 years agoFixes for JBMR0 compile (API 16)
Greg Hartman [Wed, 2 Dec 2015 04:07:21 +0000 (20:07 -0800)]
Fixes for JBMR0 compile (API 16)

Change-Id: Ibb2ebd66116f3dfd0008217153006bd6c7a49b9e
Reviewed-on: https://swiftshader-review.googlesource.com/4322
Reviewed-by: Greg Hartman <ghartman@google.com>
Reviewed-by: Nicolas Capens <capn@google.com>
Tested-by: Nicolas Capens <capn@google.com>
8 years agoRemove legacy build script.
Nicolas Capens [Fri, 4 Dec 2015 05:18:48 +0000 (00:18 -0500)]
Remove legacy build script.

Change-Id: If348bb5dd92c1160e57f1db15929a2e02d1f253d
Reviewed-on: https://swiftshader-review.googlesource.com/4350
Reviewed-by: Greg Hartman <ghartman@google.com>
Reviewed-by: Nicolas Capens <capn@google.com>
Tested-by: Nicolas Capens <capn@google.com>
8 years agoEnable x86-64 builds for Android.
Nicolas Capens [Fri, 4 Dec 2015 17:09:28 +0000 (12:09 -0500)]
Enable x86-64 builds for Android.

Change-Id: Ief54422c0c0d82c773f96f4491bfebb7ee717ba8
Reviewed-on: https://swiftshader-review.googlesource.com/4351
Reviewed-by: Greg Hartman <ghartman@google.com>
Tested-by: Nicolas Capens <capn@google.com>
Reviewed-on: https://swiftshader-review.googlesource.com/4353
Reviewed-by: Nicolas Capens <capn@google.com>
8 years agoOnly build for x86 Android architectures.
Nicolas Capens [Fri, 4 Dec 2015 02:59:36 +0000 (21:59 -0500)]
Only build for x86 Android architectures.

Change-Id: I06da8a8e48f202d6625c6d6eb8569be3867da13c
Reviewed-on: https://swiftshader-review.googlesource.com/4341
Reviewed-by: Nicolas Capens <capn@google.com>
Tested-by: Nicolas Capens <capn@google.com>
Reviewed-on: https://swiftshader-review.googlesource.com/4352

8 years agoFixed BindRenderbuffer
Alexis Hetu [Thu, 3 Dec 2015 16:29:56 +0000 (11:29 -0500)]
Fixed BindRenderbuffer

BindRenderbuffer doesn't require anything except a non-zero
renderbuffer to create a new Renderbuffer object (it is not
required to use GenRenderbuffers before using BindRenderbuffer).
This had been fixed for GLES 3.0, but the same also applies
to GLES 2.0, which has been fixed here. Note that the Context
already handles the case where renderbuffer is zero properly.

Bug 25983901

Change-Id: I75f706fc56df28871bf60b5645f1c0db039fccb8
Reviewed-on: https://swiftshader-review.googlesource.com/4334
Tested-by: Alexis Hétu <sugoi@google.com>
Reviewed-by: Nicolas Capens <capn@google.com>
8 years agoMinor bug fixes and cleanup
Alexis Hetu [Tue, 24 Nov 2015 20:23:58 +0000 (15:23 -0500)]
Minor bug fixes and cleanup

- Removed unused variables
- Fixed member initialization order in a few classes
- Fixed Surface::setSwapBehavior()
- Removed unused mPixelPackingStateDirty members
- Fixed initialization of "size" member in LinkedVarying class
- Fixed constness of a string
- Removed unused static functions
- Added parenthesis to fix && / || order ambiguity

Change-Id: Ia9ad8eaca335c60871fdc58037e441aa2010a641
Reviewed-on: https://swiftshader-review.googlesource.com/4301
Tested-by: Alexis Hétu <sugoi@google.com>
Reviewed-by: Nicolas Capens <capn@google.com>
8 years agoFixed fbo related validations
Alexis Hetu [Wed, 2 Dec 2015 20:29:43 +0000 (15:29 -0500)]
Fixed fbo related validations

A few minor fixes:
- In FramebufferRenderbuffer, if renderbuffer isn't 0,
  it must be a valid object.
- In FramebufferTexture2D, I moved the isCompressed check AFTER
  the textarget validation, to avoid using an invalid textarget.
- In GetFramebufferAttachmentParameteriv, not using GL_BACK,
  GL_DEPTH or GL_STENCIL for the default framebuffer should
  produce GL_INVALID_ENUM instead of GL_INVALID_OPERATION.
- In GetFramebufferAttachmentParameteriv, when
  attachmentObjectType is GL_NONE, in ES3, the query for
  GL_FRAMEBUFFER_ATTACHMENT_OBJECT_NAME should return 0.

Change-Id: I913cadd5961fa473b54ddfe174772bb7270dfdc5
Reviewed-on: https://swiftshader-review.googlesource.com/4333
Tested-by: Alexis Hétu <sugoi@google.com>
Reviewed-by: Nicolas Capens <capn@google.com>
8 years agoIncreased the number of color attachments enums supported
Alexis Hetu [Wed, 2 Dec 2015 17:53:42 +0000 (12:53 -0500)]
Increased the number of color attachments enums supported

Since the new headers have been committed, a larger amount of
color attachments enums can be supported. Added the new enums
where appropriate.

Change-Id: Idd7210fbeaeb7828ca6c094bed115addd90b497c
Reviewed-on: https://swiftshader-review.googlesource.com/4332
Tested-by: Alexis Hétu <sugoi@google.com>
Reviewed-by: Nicolas Capens <capn@google.com>
8 years agoAdded integer type texture support to SamplerCore code
Alexis Hetu [Mon, 26 Oct 2015 20:40:26 +0000 (16:40 -0400)]
Added integer type texture support to SamplerCore code

This cl doesn't entirely enable integer texture sampling, but
it adds the required cases in SamplerCore. To fully enable
these types, only a few small selection functions will be
required so that the proper types use the proper sampling code.

Change-Id: Ie101d782dd9b43c96d8e0198c49fe9ec6855b007
Reviewed-on: https://swiftshader-review.googlesource.com/4150
Tested-by: Alexis Hétu <sugoi@google.com>
Reviewed-by: Nicolas Capens <capn@google.com>
8 years agoFixed stencil masking
Alexis Hetu [Wed, 25 Nov 2015 18:57:28 +0000 (13:57 -0500)]
Fixed stencil masking

This is odd, but stencil masking was simply disabled, so
clearing the stencil buffer would only work if the mask
was 0xFF, or it would simply skip the clearing entirely.
I removed this condition to fix the issue. Also removed
some dead code and added an early exit if the mask is 0.

Change-Id: I359b10ed3382b75cb9d078470f237e68f1a6e7b9
Reviewed-on: https://swiftshader-review.googlesource.com/4303
Tested-by: Alexis Hétu <sugoi@google.com>
Reviewed-by: Nicolas Capens <capn@google.com>
8 years agoTexture function refactoring
Alexis Hetu [Thu, 22 Oct 2015 17:58:32 +0000 (13:58 -0400)]
Texture function refactoring

To make it easier to branch on the different texture
fetching options, a new TextureFunction class is
introduced here, which performs the string comparisons
and identifies the different options.

I also had to add a 5th argument for textureGradOffset
and textureProjGradOffset.

I added function stubs (with the UNIMPLEMENTED markers)
for all new texture functions.

Change-Id: I58cde91a2bacb0012bdc34ec85b0befa19a85326
Reviewed-on: https://swiftshader-review.googlesource.com/4116
Tested-by: Alexis Hétu <sugoi@google.com>
Reviewed-by: Nicolas Capens <capn@google.com>
8 years agoRenderbuffer allocation fix for GLES3
Alexis Hetu [Wed, 2 Dec 2015 16:49:37 +0000 (11:49 -0500)]
Renderbuffer allocation fix for GLES3

According to the ES3 spec, there's no requirement for a
renderbuffer to be allocated until it is bound and any
non-zero renderbuffer bound must be allocated.

Change-Id: Id47083c7ec6e3b3698e176d6feff31121983e446
Reviewed-on: https://swiftshader-review.googlesource.com/4331
Tested-by: Alexis Hétu <sugoi@google.com>
Reviewed-by: Nicolas Capens <capn@google.com>
8 years agoFix GL and D3D9 compilation.
Nicolas Capens [Tue, 1 Dec 2015 20:15:53 +0000 (15:15 -0500)]
Fix GL and D3D9 compilation.

Change-Id: I12fdf25465176ed9b0c2e95ef398b8b469419b6e
Reviewed-on: https://swiftshader-review.googlesource.com/4311
Reviewed-by: Alexis Hétu <sugoi@google.com>
Reviewed-by: Nicolas Capens <capn@google.com>
Tested-by: Nicolas Capens <capn@google.com>
8 years agoBuild SwiftShader for sdk_google targets.
Nicolas Capens [Wed, 25 Nov 2015 20:33:07 +0000 (15:33 -0500)]
Build SwiftShader for sdk_google targets.

Change-Id: I9cff8a31cac858e14c2364a79f61c028996e91dd
Reviewed-on: https://swiftshader-review.googlesource.com/4304
Tested-by: Nicolas Capens <capn@google.com>
Reviewed-by: Greg Hartman <ghartman@google.com>
Reviewed-by: Keun Soo Yim <yim@google.com>
Reviewed-by: Nicolas Capens <capn@google.com>
8 years agoUse original PowerVR ColourGrading ES 3.0 sample.
Nicolas Capens [Mon, 26 Oct 2015 19:13:22 +0000 (15:13 -0400)]
Use original PowerVR ColourGrading ES 3.0 sample.

Change-Id: Ifff92974ea41be61244ae1c09e2d54e299c10eeb
Reviewed-on: https://swiftshader-review.googlesource.com/4160
Reviewed-by: Nicolas Capens <capn@google.com>
Tested-by: Nicolas Capens <capn@google.com>
8 years agoUpdate OpenGL ES header files.
Nicolas Capens [Mon, 30 Nov 2015 22:02:07 +0000 (17:02 -0500)]
Update OpenGL ES header files.

Change-Id: I401c06e523d945d6e629c3326bb7cbb2054c48f1
Reviewed-on: https://swiftshader-review.googlesource.com/4307
Reviewed-by: Alexis Hétu <sugoi@google.com>
Reviewed-by: Nicolas Capens <capn@google.com>
Tested-by: Nicolas Capens <capn@google.com>
8 years agoImplement trivial glInvalidate[Sub]Framebuffer.
Nicolas Capens [Mon, 30 Nov 2015 21:53:44 +0000 (16:53 -0500)]
Implement trivial glInvalidate[Sub]Framebuffer.

Change-Id: I0790163f89116469f73ad9ff15c71dc7366a6f65
Reviewed-on: https://swiftshader-review.googlesource.com/4306
Reviewed-by: Alexis Hétu <sugoi@google.com>
Reviewed-by: Nicolas Capens <capn@google.com>
Tested-by: Nicolas Capens <capn@google.com>
8 years agoUse explicit stride for framebuffer blit.
Nicolas Capens [Mon, 30 Nov 2015 18:24:24 +0000 (13:24 -0500)]
Use explicit stride for framebuffer blit.

Change-Id: I68685932934caba4d9fab7b45014d24316ce45a8
Reviewed-on: https://swiftshader-review.googlesource.com/4293
Reviewed-by: Alexis Hétu <sugoi@google.com>
Reviewed-by: Nicolas Capens <capn@google.com>
Tested-by: Nicolas Capens <capn@google.com>
8 years agoAdding RGB support to the blitter
Alexis Hetu [Tue, 24 Nov 2015 19:09:34 +0000 (14:09 -0500)]
Adding RGB support to the blitter

Added both RGB8 and BGR8 formats to the blitter and related
functions so that these formats may be used with glReadPixels.

Change-Id: I22ee13f837b66af5f2135abc77fe81cc2e995fec
Reviewed-on: https://swiftshader-review.googlesource.com/4294
Tested-by: Alexis Hétu <sugoi@google.com>
Reviewed-by: Nicolas Capens <capn@google.com>
8 years agoBlitter clear implementation
Alexis Hetu [Thu, 19 Nov 2015 22:40:15 +0000 (17:40 -0500)]
Blitter clear implementation

The "clear" operation can now be done through the blitter.
The few changes are:
- The blitter now supports RGBA masking
- The blitter now supports RGB565
- When in "clear" mode, the blitter does a one read/multiple writes

The old clearing code has been deleted from Surface.

Change-Id: I970c3a0323f63ee5c89f02d94a2705e4bcf83866
Reviewed-on: https://swiftshader-review.googlesource.com/4291
Tested-by: Nicolas Capens <capn@google.com>
Reviewed-by: Nicolas Capens <capn@google.com>
8 years agoFloating point renderbuffer support
Alexis Hetu [Thu, 12 Nov 2015 21:36:34 +0000 (16:36 -0500)]
Floating point renderbuffer support

It is now possible to use floating point renderbuffers and read
the data back from them. The changes include:
- Modified glReadPixels so that it always uses the blitter to
  copy the data to the external buffer.
- Added new types to both Framebuffer and some utility functions.
- Added the new ValidReadPixelsFormatType function to validate the
  glReadPixels format/type combo, which had a bit more
  possibilities than the RGBA/UNSIGNED BYTE combo previously used.

Change-Id: I1726ea57c4f7aa85bf0ffa7f323dc6a16abc34ff
Reviewed-on: https://swiftshader-review.googlesource.com/4260
Tested-by: Alexis Hétu <sugoi@google.com>
Reviewed-by: Nicolas Capens <capn@google.com>
8 years agoFragment output fix
Alexis Hetu [Fri, 20 Nov 2015 16:46:41 +0000 (11:46 -0500)]
Fragment output fix

Fragment outputs weren't given a proper index, so a
fragment output array has been added to fix this.

Change-Id: Id9be21f60cc23528bf1af078a8b3ca2df28e7ee4
Reviewed-on: https://swiftshader-review.googlesource.com/4295
Tested-by: Alexis Hétu <sugoi@google.com>
Reviewed-by: Nicolas Capens <capn@google.com>
8 years agoAdded some truncation constructors in Nucleus
Alexis Hetu [Mon, 23 Nov 2015 18:31:22 +0000 (13:31 -0500)]
Added some truncation constructors in Nucleus

Added some extra constructors that simply truncate from a type
which has a higher number of bits. The new constructors are:
- Byte from UInt
- Byte from UShort
- SByte from Int
- SByte from Short
- UShort from UInt

Also added an implementation of the RoundUInt function using the
UInt from Float constructor, which had to be fixed since it was
using createFPToSI instead of createFPToUI.

Change-Id: Ie7ee21ef20fbb8133b9f7c74afa1fec9e6c51957
Reviewed-on: https://swiftshader-review.googlesource.com/4300
Tested-by: Alexis Hétu <sugoi@google.com>
Reviewed-by: Nicolas Capens <capn@google.com>
8 years agoBlitter fix
Alexis Hetu [Thu, 19 Nov 2015 16:44:25 +0000 (11:44 -0500)]
Blitter fix

Conversion from a float format to a non float format was
broken in the blitter because the clamp operation, either
to the [0,1] range or the [-1,1] range, was happening
after the scaling operation, so non float types were
becoming either -1, 0 or 1, which was wrong.

Change-Id: I3e1290313043fc49030454916b6e4ea6666f8343
Reviewed-on: https://swiftshader-review.googlesource.com/4290
Tested-by: Alexis Hétu <sugoi@google.com>
Reviewed-by: Nicolas Capens <capn@google.com>
8 years agoMultiple draw buffers implementation
Alexis Hetu [Thu, 5 Nov 2015 16:12:41 +0000 (11:12 -0500)]
Multiple draw buffers implementation

Implemented the missing pieces for multiple draw buffers support:
- Fixed Context::getScissoredImage() to use the drawbuffer
  parameter properly
- Enabled setting multiple render targets
- Added dynamic indexing of gl_FragData using a new dynOut flag
  to figure out which channels are being written to.

Change-Id: Id3d95c46a980a698f71e99f7781cc6287e880e9d
Reviewed-on: https://swiftshader-review.googlesource.com/4220
Tested-by: Alexis Hétu <sugoi@google.com>
Reviewed-by: Nicolas Capens <capn@google.com>
8 years agoFix strict ordering of EGL configs.
Nicolas Capens [Fri, 13 Nov 2015 17:39:21 +0000 (12:39 -0500)]
Fix strict ordering of EGL configs.

Change-Id: I51c1774a35706639481c030b4365ee2e5d7ccd4d
Reviewed-on: https://swiftshader-review.googlesource.com/4255
Reviewed-by: Alexis Hétu <sugoi@google.com>
Reviewed-by: Nicolas Capens <capn@google.com>
Tested-by: Nicolas Capens <capn@google.com>
8 years agoDon't mark any EGL configs as slow.
Nicolas Capens [Fri, 13 Nov 2015 03:15:57 +0000 (22:15 -0500)]
Don't mark any EGL configs as slow.

RGB_565 is now as fast if not faster than 32-bit formats.

Change-Id: I6358e35557164541601ac76ae11028afba439084
Reviewed-on: https://swiftshader-review.googlesource.com/4253
Reviewed-by: Nicolas Capens <capn@google.com>
Tested-by: Nicolas Capens <capn@google.com>
8 years agoAdd "Google" to GL_RENDERER to be whitelisted by Chrome.
Nicolas Capens [Fri, 13 Nov 2015 03:47:30 +0000 (22:47 -0500)]
Add "Google" to GL_RENDERER to be whitelisted by Chrome.

crbug/546671

Change-Id: Ie43f8e34fa22bb0d23e4a123e789c429f2024ebb
Reviewed-on: https://swiftshader-review.googlesource.com/4254
Reviewed-by: Nicolas Capens <capn@google.com>
Tested-by: Nicolas Capens <capn@google.com>
8 years agoFix go/ab builds for jb-mr1
Greg Hartman [Fri, 13 Nov 2015 00:38:42 +0000 (16:38 -0800)]
Fix go/ab builds for jb-mr1

This forces clang to avoid use init_array for all initialization rather than
splitting the initialization between init_array and ctors.

Local builds do this anyway, but for some reason the builds on go/ab do not.
Setting this flag makes the builds consistent (and unbroken on JB-MR1).

I already checked this in on cloud-android-current-release because I wanted
to test it before submitting.

Bug 25597090

Change-Id: I5a7195ba53531835fb8333b698ed39d21ff847a6
(cherry picked from commit 95c7182f118cc686df27c3f49db7d3c7908e0e59)
Reviewed-on: https://swiftshader-review.googlesource.com/4271
Reviewed-by: Nicolas Capens <capn@google.com>
Tested-by: Greg Hartman <ghartman@google.com>
8 years agoDisplay the watermark on AOSP images
Nicolas Capens [Wed, 11 Nov 2015 15:49:08 +0000 (10:49 -0500)]
Display the watermark on AOSP images

Bug 25638876

Change-Id: If6d84c6e0778e0e45af27b74c92c861001669409
Reviewed-on: https://swiftshader-review.googlesource.com/4252
Tested-by: Nicolas Capens <capn@google.com>
Reviewed-by: Alexis Hétu <sugoi@google.com>
Reviewed-by: Greg Hartman <ghartman@google.com>
Reviewed-by: Nicolas Capens <capn@google.com>
8 years agoAdding libglesv3.cpp to code blocks.
Alexis Hetu [Tue, 10 Nov 2015 18:36:34 +0000 (13:36 -0500)]
Adding libglesv3.cpp to code blocks.

Also added the exports to allow enabling ES3 entirely on Linux.

Change-Id: Ia13d229b9ce1104a74a2bbd1f620296686cf18d4
Reviewed-on: https://swiftshader-review.googlesource.com/3064
Tested-by: Alexis Hétu <sugoi@google.com>
Reviewed-by: Nicolas Capens <capn@google.com>
Tested-by: Nicolas Capens <capn@google.com>
8 years agoProtect the displays global map
Greg Hartman [Tue, 10 Nov 2015 02:10:30 +0000 (18:10 -0800)]
Protect the displays global map

Bug 25597090

Change-Id: Ie6bc4f55b5105a3e75cdc1b636f3e5716c10cc61
Reviewed-on: https://swiftshader-review.googlesource.com/4240
Tested-by: Greg Hartman <ghartman@google.com>
Reviewed-by: Nicolas Capens <capn@google.com>
Tested-by: Nicolas Capens <capn@google.com>
8 years agoFix using YV12 as a format instead of type.
Nicolas Capens [Fri, 6 Nov 2015 21:01:11 +0000 (16:01 -0500)]
Fix using YV12 as a format instead of type.

Bug 25563277

Change-Id: I1721f060e313c135e713915ddd2dbdbca5239380
Reviewed-on: https://swiftshader-review.googlesource.com/4221
Reviewed-by: Keun Soo Yim <yim@google.com>
Reviewed-by: Nicolas Capens <capn@google.com>
Tested-by: Greg Hartman <ghartman@google.com>
Reviewed-by: Greg Hartman <ghartman@google.com>
Reviewed-by: Alexis Hétu <sugoi@google.com>
8 years agoWait on fence sync status query.
Nicolas Capens [Thu, 5 Nov 2015 06:48:31 +0000 (01:48 -0500)]
Wait on fence sync status query.

Bug 24300960

Change-Id: I10a97536bb6559ea7b302b475d0b6936a495b65a
Reviewed-on: https://swiftshader-review.googlesource.com/4210
Reviewed-by: Nicolas Capens <capn@google.com>
Tested-by: Nicolas Capens <capn@google.com>
8 years agoEnsure that make reaches deep enough in the tree.
Greg Hartman [Mon, 2 Nov 2015 21:08:12 +0000 (13:08 -0800)]
Ensure that make reaches deep enough in the tree.

Change-Id: I2940ff65144f001d811b069b3e017b0849f310d1
Reviewed-on: https://swiftshader-review.googlesource.com/4201
Reviewed-by: Nicolas Capens <capn@google.com>
Tested-by: Nicolas Capens <capn@google.com>
8 years agoSwap red and blue channel in the default Android config.
Greg Hartman [Tue, 3 Nov 2015 17:59:28 +0000 (09:59 -0800)]
Swap red and blue channel in the default Android config.

Bug 25432320

Change-Id: I3fd6d123cc1c15f04092a888a8e5c996d1bd4231
Reviewed-on: https://swiftshader-review.googlesource.com/4200
Reviewed-by: Nicolas Capens <capn@google.com>
Tested-by: Greg Hartman <ghartman@google.com>
8 years agoExplicitly load shared libraries with local visibility.
Nicolas Capens [Mon, 2 Nov 2015 15:11:49 +0000 (10:11 -0500)]
Explicitly load shared libraries with local visibility.

On some platforms the default is undefined if neither RTLD_GLOBAL
nor RTLD_LOCAL is specified.

Bug 25282950

Change-Id: I0aea6a9f604afa0412a8f6d9c614b18987fbf514
Reviewed-on: https://swiftshader-review.googlesource.com/4190
Reviewed-by: Nicolas Capens <capn@google.com>
Tested-by: Nicolas Capens <capn@google.com>
8 years agoSimplify Android window property queries.
Nicolas Capens [Thu, 22 Oct 2015 00:25:15 +0000 (20:25 -0400)]
Simplify Android window property queries.

Change-Id: Ic54eefe422f5d0478b7cdd8dfaa19ccb2e1a8a8e
Reviewed-on: https://swiftshader-review.googlesource.com/4131
Tested-by: Nicolas Capens <capn@google.com>
Reviewed-by: Nicolas Capens <capn@google.com>
8 years agoRefactor HAL to GL format conversions.
Nicolas Capens [Fri, 30 Oct 2015 18:06:54 +0000 (14:06 -0400)]
Refactor HAL to GL format conversions.

Bug 25390254

Change-Id: I434e6d319335be00204eff88f09c98b2dd4f2acc
Reviewed-on: https://swiftshader-review.googlesource.com/4188
Reviewed-by: Alexis Hétu <sugoi@google.com>
Tested-by: Nicolas Capens <capn@google.com>
Reviewed-by: Nicolas Capens <capn@google.com>
8 years agoSet the EGL_NATIVE_VISUAL_ID attribute for Android HAL formats.
Nicolas Capens [Fri, 30 Oct 2015 18:05:23 +0000 (14:05 -0400)]
Set the EGL_NATIVE_VISUAL_ID attribute for Android HAL formats.

Bug 25390254

Change-Id: I6ac37912435e2c73f5e905db7c78af7884f0c93c
Reviewed-on: https://swiftshader-review.googlesource.com/4187
Tested-by: Nicolas Capens <capn@google.com>
Reviewed-by: Nicolas Capens <capn@google.com>
8 years agoEnumerate RGB config formats.
Nicolas Capens [Fri, 30 Oct 2015 17:54:24 +0000 (13:54 -0400)]
Enumerate RGB config formats.

Bug 25390254

Change-Id: Ibd8fc3a957f9ecf5480490e9504fa7041c7c9fa2
Reviewed-on: https://swiftshader-review.googlesource.com/4186
Reviewed-by: Alexis Hétu <sugoi@google.com>
Tested-by: Nicolas Capens <capn@google.com>
Reviewed-by: Nicolas Capens <capn@google.com>
8 years agoSet EGL_FRAMEBUFFER_TARGET_ANDROID on configs matching the framebuffer.
Nicolas Capens [Fri, 30 Oct 2015 17:50:31 +0000 (13:50 -0400)]
Set EGL_FRAMEBUFFER_TARGET_ANDROID on configs matching the framebuffer.

Only configs with formats that match the system's framebuffer format should
advertised the EGL_FRAMEBUFFER_TARGET_ANDROID attribute.

Bug 25390254

Change-Id: I81e1a0365e151ed7082e3315399748e93c531ccc
Reviewed-on: https://swiftshader-review.googlesource.com/4185
Tested-by: Nicolas Capens <capn@google.com>
Reviewed-by: Nicolas Capens <capn@google.com>