OSDN Git Service

android-x86/external-swiftshader.git
7 years agoFix CMake sample include directory and libraries.
Nicolas Capens [Wed, 26 Oct 2016 20:57:35 +0000 (16:57 -0400)]
Fix CMake sample include directory and libraries.

Change-Id: Ib1339f5a40523007ca5832ed1bc7b7d096e6c1f2
Reviewed-on: https://swiftshader-review.googlesource.com/8374
Tested-by: Nicolas Capens <capn@google.com>
Reviewed-by: Alexis Hétu <sugoi@google.com>
Reviewed-by: Nicolas Capens <capn@google.com>
7 years agoOnly add non-conformant configs on Android.
Nicolas Capens [Fri, 6 Jan 2017 14:41:21 +0000 (09:41 -0500)]
Only add non-conformant configs on Android.

This silences a benign assert in the config sorting operator which
checks for unique configs. On platforms other than Android, all of the
configs are marked as conformant.

Bug b/34029810

Change-Id: I600d67747ba24f153a0316609e5a783991093ebd
Reviewed-on: https://swiftshader-review.googlesource.com/8388
Tested-by: Nicolas Capens <capn@google.com>
Reviewed-by: Alexis Hétu <sugoi@google.com>
7 years agoFix clamping viewport dimensions on specification.
Nicolas Capens [Thu, 5 Jan 2017 19:37:22 +0000 (14:37 -0500)]
Fix clamping viewport dimensions on specification.

The spec states that glViewport() silently clamps the viewport
width and height to GL_MAX_VIEWPORT_DIMS[0] and
GL_MAX_VIEWPORT_DIMS[1], respectively.

Bug b/34078120

Change-Id: Ifeec0d6b601ce8a3825796fa551eea1f46150002
Reviewed-on: https://swiftshader-review.googlesource.com/8371
Reviewed-by: Alexis Hétu <sugoi@google.com>
Reviewed-by: Nicolas Capens <capn@google.com>
Tested-by: Nicolas Capens <capn@google.com>
7 years agoFix integer overflow in rasterization.
Nicolas Capens [Thu, 5 Jan 2017 18:18:39 +0000 (13:18 -0500)]
Fix integer overflow in rasterization.

Rasterization of very large triangles was causing signed 32-bit
integer overflow due to multiplying two unsigned 12.4 fixed-point
coordinates. The equations have been reworked to only require
multiplication of 12.4 by 0.4 fixed-point.

Bug b/34078120

Change-Id: I227b81254559af04baf50fbfec6a7f123bd230e3
Reviewed-on: https://swiftshader-review.googlesource.com/8370
Tested-by: Nicolas Capens <capn@google.com>
Reviewed-by: Alexis Hétu <sugoi@google.com>
Reviewed-by: Nicolas Capens <capn@google.com>
7 years agoOptimize flat triangle edge rasterization.
Nicolas Capens [Thu, 5 Jan 2017 15:11:01 +0000 (10:11 -0500)]
Optimize flat triangle edge rasterization.

Change-Id: Ibfd483ce3cba6ec036327b32cba1460d68f8c9e8
Reviewed-on: https://swiftshader-review.googlesource.com/3542
Tested-by: Nicolas Capens <capn@google.com>
Reviewed-by: Alexis Hétu <sugoi@google.com>
7 years agoFix the type used for structure field write masks.
Nicolas Capens [Wed, 4 Jan 2017 16:30:45 +0000 (11:30 -0500)]
Fix the type used for structure field write masks.

The index used to index into a structure (a scalar) used to have the
vector size of the resulting type. This changed recently to always be
1, so the field type size needs to be determined from the fields
themselves, which is also the type of the indexing result.

Change-Id: I2dc373d8d31b02c0f69879cb0a3feacd83d6e473
Reviewed-on: https://swiftshader-review.googlesource.com/8368
Tested-by: Nicolas Capens <capn@google.com>
Reviewed-by: Alexis Hétu <sugoi@google.com>
7 years ago[emulator] Delete VAOs starting from highest
Lingfeng Yang [Fri, 23 Dec 2016 02:00:35 +0000 (18:00 -0800)]
[emulator] Delete VAOs starting from highest

If VAOs are deleted starting from 0, then the
following happens when an app's context has
genned two VAO's that are both != 0,
and the first of the two nonzero VAOs
is the current one:

VAO 0
VAO 1 <- current
VAO 2

in context dtor loop over vao map:
delete vao 0 (done)
delete vao 1:
is current, so bind 0:
in bind 0, we create a new map entry since 0 was deleted
next loop iter deletes vao 0 again (done)
*** at this point, vao 0 pointer refers to freed memory ***
next loop iter wants to delete vao 2,
but the current vao is 0 and refers to freed memory.
then, in Context::deleteVertexArray:
if (getCurrentVertexArray()->name...) <- Segmentation fault (core dumped)

This CL deletes VAO 0 last.

Change-Id: Ifa606ad7517cd213f21606577d3bdd8d810b640d
Reviewed-on: https://swiftshader-review.googlesource.com/8350
Reviewed-by: Nicolas Capens <capn@google.com>
Tested-by: Lingfeng Yang <lfy@google.com>
7 years agoEnable OpenGL ES 3.0 context creation from non-conformant configs.
Nicolas Capens [Mon, 2 Jan 2017 21:21:39 +0000 (16:21 -0500)]
Enable OpenGL ES 3.0 context creation from non-conformant configs.

Allow experimental access to OpenGL ES 3.0 for Android, when the
application explicitly sets the EGL_CONFIG_CAVEAT config attribute
to EGL_NON_CONFORMANT_CONFIG or EGL_DONT_CARE.

Bug b/34029810

Change-Id: I942a6d4812d89446f7045f020df974489c4c0ab3
Reviewed-on: https://swiftshader-review.googlesource.com/8352
Reviewed-by: Alexis Hétu <sugoi@google.com>
Reviewed-by: Nicolas Capens <capn@google.com>
Tested-by: Nicolas Capens <capn@google.com>
7 years agoFixed attribute location
Alexis Hetu [Fri, 16 Dec 2016 16:42:38 +0000 (11:42 -0500)]
Fixed attribute location

Attribute location wasn't working properly.
This faulty constructor explains why.

Change-Id: I7701ad316df0684ad02ed405bd2905d56a848bd6
Reviewed-on: https://swiftshader-review.googlesource.com/8328
Tested-by: Alexis Hétu <sugoi@google.com>
Reviewed-by: Nicolas Capens <capn@google.com>
7 years agoFixed using GL_SAMPLE_ALPHA_TO_COVERAGE
Alexis Hetu [Tue, 13 Dec 2016 21:48:01 +0000 (16:48 -0500)]
Fixed using GL_SAMPLE_ALPHA_TO_COVERAGE

A few things were failing when trying to use
GL_SAMPLE_ALPHA_TO_COVERAGE:
- The alpha test should not be skipped when
  GL_SAMPLE_ALPHA_TO_COVERAGE is set, otherwise
  no computation is performed.
- The alpha reference value was wrong
  (the alpha-to-coverage ramp is centered around it)

Change-Id: Ib9849868d267ca49fb3f0112192af8f207d34307
Reviewed-on: https://swiftshader-review.googlesource.com/8308
Reviewed-by: Alexis Hétu <sugoi@google.com>
Reviewed-by: Nicolas Capens <capn@google.com>
Tested-by: Alexis Hétu <sugoi@google.com>
7 years agoConsistently treat non-existant components as unsigned.
Nicolas Capens [Wed, 14 Dec 2016 15:32:36 +0000 (10:32 -0500)]
Consistently treat non-existant components as unsigned.

Change-Id: I6554202f899559903062155833d49fe43456149b
Reviewed-on: https://swiftshader-review.googlesource.com/8310
Reviewed-by: Alexis Hétu <sugoi@google.com>
Tested-by: Nicolas Capens <capn@google.com>
7 years agoEliminate dead code.
Nicolas Capens [Mon, 12 Dec 2016 20:07:39 +0000 (15:07 -0500)]
Eliminate dead code.

Bug swiftshader:23

Change-Id: Ifb2862e8358141f67a7974d3fa0a11e6fe41b904
Reviewed-on: https://swiftshader-review.googlesource.com/8290
Tested-by: Nicolas Capens <capn@google.com>
Reviewed-by: Alexis Hétu <sugoi@google.com>
Reviewed-by: Nicolas Capens <capn@google.com>
7 years agoOptimize stores in a single basic block.
Nicolas Capens [Wed, 30 Nov 2016 21:15:28 +0000 (16:15 -0500)]
Optimize stores in a single basic block.

Bug swiftshader:27

Change-Id: Ia5f7da431902c3e87aab47b1dd388e05ced74cd3
Reviewed-on: https://swiftshader-review.googlesource.com/8274
Tested-by: Nicolas Capens <capn@google.com>
Reviewed-by: Alexis Hétu <sugoi@google.com>
Reviewed-by: Nicolas Capens <capn@google.com>
7 years agoEliminate loads following a single store.
Nicolas Capens [Wed, 30 Nov 2016 20:14:28 +0000 (15:14 -0500)]
Eliminate loads following a single store.

Bug swiftshader:27

Change-Id: I11238decf114381126a7465c462d918a3f16b0d8
Reviewed-on: https://swiftshader-review.googlesource.com/8273
Tested-by: Nicolas Capens <capn@google.com>
Reviewed-by: Alexis Hétu <sugoi@google.com>
Reviewed-by: Nicolas Capens <capn@google.com>
7 years agoEliminate loading of uninitialized variables.
Nicolas Capens [Mon, 12 Dec 2016 18:08:06 +0000 (13:08 -0500)]
Eliminate loading of uninitialized variables.

Bug swiftshader:27

Change-Id: I58259e00204550a397522fc26578c9f4d847f502
Reviewed-on: https://swiftshader-review.googlesource.com/8272
Tested-by: Nicolas Capens <capn@google.com>
Reviewed-by: Alexis Hétu <sugoi@google.com>
Reviewed-by: Nicolas Capens <capn@google.com>
7 years agoEliminate unused allocas.
Nicolas Capens [Thu, 24 Nov 2016 19:43:05 +0000 (14:43 -0500)]
Eliminate unused allocas.

Bug swiftshader:27

Change-Id: If085323dc6cc4325c6ff55c1021e98db94a75302
Reviewed-on: https://swiftshader-review.googlesource.com/8228
Tested-by: Nicolas Capens <capn@google.com>
Reviewed-by: Alexis Hétu <sugoi@google.com>
Reviewed-by: Nicolas Capens <capn@google.com>
7 years agoFixed using default attributes
Alexis Hetu [Tue, 13 Dec 2016 16:18:54 +0000 (11:18 -0500)]
Fixed using default attributes

2 issues affected default attributes:
1) The stream type did not match the attributes' internal
   representation
2) The normalized flag was left uninitialized, meaning it was
   using whatever had been set in the previous draw call.

Change-Id: I25b425944e6f59206bf3ef4db35b56d26ef83168
Reviewed-on: https://swiftshader-review.googlesource.com/8292
Tested-by: Alexis Hétu <sugoi@google.com>
Reviewed-by: Nicolas Capens <capn@google.com>
7 years agoFix missing switch cases for blitting B32G32R32F.
Nicolas Capens [Tue, 13 Dec 2016 15:19:33 +0000 (10:19 -0500)]
Fix missing switch cases for blitting B32G32R32F.

Change-Id: I09e3615399db4db256d94ba83d44a7b6b17ee2ec
Reviewed-on: https://swiftshader-review.googlesource.com/8291
Reviewed-by: Alexis Hétu <sugoi@google.com>
Tested-by: Nicolas Capens <capn@google.com>
7 years agoImported a few ES3 fixes from Angle
Alexis Hetu [Fri, 9 Dec 2016 21:01:29 +0000 (16:01 -0500)]
Imported a few ES3 fixes from Angle

Imported some of the more trivial bug fixes:
- Added a few missing interface block cases
- Added checks for varying structs
- Added checks for unsized arrays
- Added first-class array check for pre ES3 compilation
- Added check that ES3 functions do not use builtin names (ES3 only)
- Added more binary operator checks

Change-Id: I3d75453f17e1123478ef7da0998e869970a7fb7d
Reviewed-on: https://swiftshader-review.googlesource.com/8289
Tested-by: Alexis Hétu <sugoi@google.com>
Reviewed-by: Nicolas Capens <capn@google.com>
7 years agoEliminate assign operations for constants.
Nicolas Capens [Tue, 6 Dec 2016 03:17:19 +0000 (22:17 -0500)]
Eliminate assign operations for constants.

We were using Ice::Variable as the implementation type for Reactor's
abstract Value class only because shuffle operations required them.

Bug swiftshader:24

Change-Id: If87ab5f0b0bca5fbffe2df250ed03b7a1b1490c6
Reviewed-on: https://swiftshader-review.googlesource.com/8258
Reviewed-by: Nicolas Capens <capn@google.com>
Tested-by: Nicolas Capens <capn@google.com>
7 years agoFix transpose2x4().
Nicolas Capens [Fri, 9 Dec 2016 19:07:50 +0000 (14:07 -0500)]
Fix transpose2x4().

Change-Id: I079991d257be4aa00a0aef938ccf0110cd005bcd
Reviewed-on: https://swiftshader-review.googlesource.com/8288
Tested-by: Nicolas Capens <capn@google.com>
Reviewed-by: Nicolas Capens <capn@google.com>
7 years agoFix rvalue types.
Nicolas Capens [Thu, 8 Dec 2016 19:34:00 +0000 (14:34 -0500)]
Fix rvalue types.

Change-Id: I98853d4858136553be730b07b02db95d1800035c
Reviewed-on: https://swiftshader-review.googlesource.com/8275
Tested-by: Nicolas Capens <capn@google.com>
Reviewed-by: Alexis Hétu <sugoi@google.com>
Reviewed-by: Nicolas Capens <capn@google.com>
7 years agoMatch sub-vector load/store operand order to regular load/store.
Nicolas Capens [Thu, 24 Nov 2016 19:45:06 +0000 (14:45 -0500)]
Match sub-vector load/store operand order to regular load/store.

Bug swiftshader:27

Change-Id: Ic116a804fed80222ad9a41f219c937f28104f225
Reviewed-on: https://swiftshader-review.googlesource.com/8271
Tested-by: Nicolas Capens <capn@google.com>
Reviewed-by: Alexis Hétu <sugoi@google.com>
Reviewed-by: Nicolas Capens <capn@google.com>
7 years agoDeprecate support for constant pointers.
Nicolas Capens [Tue, 6 Dec 2016 02:38:09 +0000 (21:38 -0500)]
Deprecate support for constant pointers.

The use of constant pointers produces code that cannot be relocated.
They also cause issues in Subzero when offsetting them due to not having
constant folding support. We only used them for Direct3D cursor
rendering, which can just pass in the data as an argument instead.

Bug swiftshader:14

Change-Id: Id7f16c3fcaeed3fe64b569af6a49c32f6baec483
Reviewed-on: https://swiftshader-review.googlesource.com/8257
Reviewed-by: Nicolas Capens <capn@google.com>
Reviewed-by: Alexis Hétu <sugoi@google.com>
Tested-by: Nicolas Capens <capn@google.com>
7 years agoFix doc formatting.
Nicolas Capens [Thu, 8 Dec 2016 15:57:43 +0000 (10:57 -0500)]
Fix doc formatting.

Change-Id: I1387cd9c1666bbb736f75d84679672f1b6964f48
Reviewed-on: https://swiftshader-review.googlesource.com/8270
Reviewed-by: Nicolas Capens <capn@google.com>
Tested-by: Nicolas Capens <capn@google.com>
7 years agoFix rounding to nearest integer.
Nicolas Capens [Thu, 8 Dec 2016 13:58:54 +0000 (08:58 -0500)]
Fix rounding to nearest integer.

Change-Id: I2fbd6524f1975f2c76ae0b5e544f323e7c7e4537
Reviewed-on: https://swiftshader-review.googlesource.com/8269
Tested-by: Nicolas Capens <capn@google.com>
Reviewed-by: Alexis Hétu <sugoi@google.com>
Reviewed-by: Nicolas Capens <capn@google.com>
7 years agoBuild fix
Alexis Hetu [Tue, 6 Dec 2016 21:56:04 +0000 (16:56 -0500)]
Build fix

A few things needed to be fixed:
- Removed unused local variables in Sampler.cpp
- Local tests showed that newly added files for ubsan build fix
  broke Mac and Windows builds. Moved files to Linux non debug
  only to fix the issue on all platforms.

Change-Id: I4d6d0d162603fdf36c581e84e177e6d042bf2d6e
Reviewed-on: https://swiftshader-review.googlesource.com/8268
Tested-by: Alexis Hétu <sugoi@google.com>
Reviewed-by: Alexis Hétu <sugoi@google.com>
7 years agoRenamed libEGL/Surface.* to libEGL/EGLSurface.*
Alexis Hetu [Mon, 5 Dec 2016 17:43:27 +0000 (12:43 -0500)]
Renamed libEGL/Surface.* to libEGL/EGLSurface.*

In order to build libEGL without explicitly setting a dependency
on the Renderer and Reactor projects, the Renderer's Surface class
must be linked with libEGL. That was causing an issue where the 2
Surface.so objects were colliding on Linux. In order to solve the
issue, libEGL/Surface.* was renamed to libEGL/EGLSurface.*

Change-Id: I2e230dd770be56fd29f7aecd5133183a7d2f20b5
Reviewed-on: https://swiftshader-review.googlesource.com/8254
Tested-by: Alexis Hétu <sugoi@google.com>
Reviewed-by: Nicolas Capens <capn@google.com>
7 years agoRemoving Code::Blocks build files
Alexis Hetu [Mon, 5 Dec 2016 22:03:53 +0000 (17:03 -0500)]
Removing Code::Blocks build files

We no longer support Code::Blocks, so removing the build files for it.
CMake can be used for Linux builds instead.

Change-Id: I1af29904078270898a3c07915cf32ca4ee4da25a
Reviewed-on: https://swiftshader-review.googlesource.com/8255
Reviewed-by: Alexis Hétu <sugoi@google.com>
Reviewed-by: Nicolas Capens <capn@google.com>
Tested-by: Alexis Hétu <sugoi@google.com>
7 years agoGLSL const arrays are allowed in OpenGL ES 3.0
Alexis Hetu [Thu, 1 Dec 2016 22:02:33 +0000 (17:02 -0500)]
GLSL const arrays are allowed in OpenGL ES 3.0

Change-Id: I54161aaeaa29fe26c246c61f2e27ccda5ef4a5f1
Reviewed-on: https://swiftshader-review.googlesource.com/8234
Tested-by: Alexis Hétu <sugoi@google.com>
Reviewed-by: Nicolas Capens <capn@google.com>
7 years agoImplement missing vector operations.
Nicolas Capens [Sat, 3 Dec 2016 05:16:14 +0000 (00:16 -0500)]
Implement missing vector operations.

Bug swiftshader:15

Change-Id: I2116fa6ad368c801e921becd89259b02b4ca68ce
Reviewed-on: https://swiftshader-review.googlesource.com/8251
Reviewed-by: Nicolas Capens <capn@google.com>
Reviewed-by: Alexis Hétu <sugoi@google.com>
Tested-by: Nicolas Capens <capn@google.com>
7 years agoDeprecate the Long1 type.
Nicolas Capens [Fri, 2 Dec 2016 20:30:56 +0000 (15:30 -0500)]
Deprecate the Long1 type.

It corresponds to a scalar MMX type, used mainly for vector shifts.
We no longer need these shifts, and they would have been non-trivial
to emulate with SSE2.

Change-Id: I77a94ff5a62e043b991d4d6fa9ddd436d450181d
Reviewed-on: https://swiftshader-review.googlesource.com/8249
Reviewed-by: Nicolas Capens <capn@google.com>
Reviewed-by: Alexis Hétu <sugoi@google.com>
Tested-by: Nicolas Capens <capn@google.com>
7 years agoDeprecate handling power-of-two texture sampling separately.
Nicolas Capens [Fri, 2 Dec 2016 19:22:32 +0000 (14:22 -0500)]
Deprecate handling power-of-two texture sampling separately.

NPOT texture sampling is slightly slower, but with OpenGL we were
already treating every mipmapped texture as NPOT due to requiring
padding at the 1x1 level for renderability. Seamless cube maps are
also NPOT due to the border. Furthermore, the vector shifts by scalar
required for POT texel address calculation would require 128-bit
values when we deprecate MMX.

Change-Id: Ie2e68f632bea7c6f3e599015c14be50392ea7e9a
Reviewed-on: https://swiftshader-review.googlesource.com/8248
Reviewed-by: Nicolas Capens <capn@google.com>
Reviewed-by: Alexis Hétu <sugoi@google.com>
Tested-by: Nicolas Capens <capn@google.com>
7 years agoFixed sys/time.h vs time.h issue on Linux
Alexis Hetu [Mon, 5 Dec 2016 16:25:24 +0000 (11:25 -0500)]
Fixed sys/time.h vs time.h issue on Linux

There was a compilation issue on some bots on Linux related to
time functions which was fixable with a simple config setting.

Change-Id: I8bc71f4298d662e48dd12a4c8963ed5ef3211949
Reviewed-on: https://swiftshader-review.googlesource.com/8252
Tested-by: Alexis Hétu <sugoi@google.com>
Reviewed-by: Nicolas Capens <capn@google.com>
7 years agoSupport integer rvalues as return value.
Nicolas Capens [Fri, 18 Nov 2016 19:40:40 +0000 (14:40 -0500)]
Support integer rvalues as return value.

Change-Id: I23e9b8de20dae93e7aa5ea7f5ff90abeba672b2b
Reviewed-on: https://swiftshader-review.googlesource.com/8091
Reviewed-by: Nicolas Capens <capn@google.com>
Tested-by: Nicolas Capens <capn@google.com>
Reviewed-on: https://swiftshader-review.googlesource.com/8233
Reviewed-by: Alexis Hétu <sugoi@google.com>
7 years agoMake Reactor destination variables non-const.
Nicolas Capens [Fri, 18 Nov 2016 19:22:38 +0000 (14:22 -0500)]
Make Reactor destination variables non-const.

Bug swiftshader:27

Change-Id: I53e2e4858b10d810f649907fda98dc7863752551
Reviewed-on: https://swiftshader-review.googlesource.com/8090
Reviewed-by: Nicolas Capens <capn@google.com>
Tested-by: Nicolas Capens <capn@google.com>
Reviewed-on: https://swiftshader-review.googlesource.com/8232
Reviewed-by: Alexis Hétu <sugoi@google.com>
7 years agoHold LValue address in a non-template Variable class.
Nicolas Capens [Fri, 18 Nov 2016 17:52:17 +0000 (12:52 -0500)]
Hold LValue address in a non-template Variable class.

Variable<> was redundant after LValue became a template class. We can
recycle it as a container for Values.

Bug swiftshader:27

Change-Id: Ic5ed6f3f7e26579fd38f0e809f8bada1e3639d00
Reviewed-on: https://swiftshader-review.googlesource.com/8071
Reviewed-by: Nicolas Capens <capn@google.com>
Tested-by: Nicolas Capens <capn@google.com>
Reviewed-on: https://swiftshader-review.googlesource.com/8231
Reviewed-by: Alexis Hétu <sugoi@google.com>
7 years agoEliminate "false" basic block when no Else clause.
Nicolas Capens [Wed, 16 Nov 2016 22:40:48 +0000 (17:40 -0500)]
Eliminate "false" basic block when no Else clause.

Bug swiftshader:13

Change-Id: I5dd2ce4ddf1eaf0ec2fc732d022ccad2331e6b6b
Reviewed-on: https://swiftshader-review.googlesource.com/8070
Reviewed-by: Nicolas Capens <capn@google.com>
Tested-by: Nicolas Capens <capn@google.com>
Reviewed-on: https://swiftshader-review.googlesource.com/8230
Reviewed-by: Alexis Hétu <sugoi@google.com>
7 years agoRefactor If/Else to use encapsulated data.
Nicolas Capens [Wed, 16 Nov 2016 20:03:18 +0000 (15:03 -0500)]
Refactor If/Else to use encapsulated data.

Bug swiftshader:13

Change-Id: Ife259311bf6123629ae8505b4164fa82f02e5629
Reviewed-on: https://swiftshader-review.googlesource.com/8033
Reviewed-by: Nicolas Capens <capn@google.com>
Tested-by: Nicolas Capens <capn@google.com>
Reviewed-on: https://swiftshader-review.googlesource.com/8229
Reviewed-by: Alexis Hétu <sugoi@google.com>
7 years agoImplement vector casts.
Nicolas Capens [Wed, 9 Nov 2016 19:24:25 +0000 (14:24 -0500)]
Implement vector casts.

Bug swiftshader:15

Change-Id: Ie20d881be8710d2c8e8e996ae670f7f40481f13c
Reviewed-on: https://swiftshader-review.googlesource.com/7990
Reviewed-by: Nicolas Capens <capn@google.com>
Tested-by: Nicolas Capens <capn@google.com>
Reviewed-on: https://swiftshader-review.googlesource.com/8167
Reviewed-by: Alexis Hétu <sugoi@google.com>
7 years agoImplement vector absolute value.
Nicolas Capens [Wed, 9 Nov 2016 18:31:06 +0000 (13:31 -0500)]
Implement vector absolute value.

Bug swiftshader:15

Change-Id: Ib22831ce669c68a790664839d18ea05668e90992
Reviewed-on: https://swiftshader-review.googlesource.com/7971
Reviewed-by: Nicolas Capens <capn@google.com>
Tested-by: Nicolas Capens <capn@google.com>
Reviewed-on: https://swiftshader-review.googlesource.com/8166
Reviewed-by: Alexis Hétu <sugoi@google.com>
7 years agoImplement switch constructs.
Nicolas Capens [Wed, 9 Nov 2016 17:24:06 +0000 (12:24 -0500)]
Implement switch constructs.

Bug swiftshader:6

Change-Id: Ifd28cab11e814dd09515ad8721f8d3d86123f19c
Reviewed-on: https://swiftshader-review.googlesource.com/7970
Reviewed-by: Nicolas Capens <capn@google.com>
Tested-by: Nicolas Capens <capn@google.com>
Reviewed-on: https://swiftshader-review.googlesource.com/8165
Reviewed-by: Alexis Hétu <sugoi@google.com>
7 years agoImplement vector masking.
Nicolas Capens [Tue, 8 Nov 2016 20:43:17 +0000 (15:43 -0500)]
Implement vector masking.

Bug swiftshader:15

Change-Id: I6975f7a61ee232630b82e7844b8bc65088564827
Reviewed-on: https://swiftshader-review.googlesource.com/7959
Reviewed-by: Nicolas Capens <capn@google.com>
Tested-by: Nicolas Capens <capn@google.com>
Reviewed-on: https://swiftshader-review.googlesource.com/8164
Reviewed-by: Alexis Hétu <sugoi@google.com>
7 years agoImplement remaining vector extract/insert operations.
Nicolas Capens [Tue, 8 Nov 2016 20:15:31 +0000 (15:15 -0500)]
Implement remaining vector extract/insert operations.

Bug swiftshader:15

Change-Id: I9ed683b6d122183c4313d2bf609fd7c14bf5e387
Reviewed-on: https://swiftshader-review.googlesource.com/7958
Reviewed-by: Nicolas Capens <capn@google.com>
Tested-by: Nicolas Capens <capn@google.com>
Reviewed-on: https://swiftshader-review.googlesource.com/8163
Reviewed-by: Alexis Hétu <sugoi@google.com>
7 years agoImplement remaining vector compare operations.
Nicolas Capens [Tue, 8 Nov 2016 19:28:59 +0000 (14:28 -0500)]
Implement remaining vector compare operations.

Bug swiftshader:15

Change-Id: I69184dcb70f4a4082a25420a0dade7bc87a8027e
Reviewed-on: https://swiftshader-review.googlesource.com/7957
Reviewed-by: Nicolas Capens <capn@google.com>
Tested-by: Nicolas Capens <capn@google.com>
Reviewed-on: https://swiftshader-review.googlesource.com/8162
Reviewed-by: Alexis Hétu <sugoi@google.com>
7 years agoImplement negation and inversion.
Nicolas Capens [Tue, 8 Nov 2016 16:37:01 +0000 (11:37 -0500)]
Implement negation and inversion.

Bug swiftshader:6

Change-Id: I1eaef2745f6e1aa3defb39f408df36e654f97b4d
Reviewed-on: https://swiftshader-review.googlesource.com/7956
Reviewed-by: Nicolas Capens <capn@google.com>
Tested-by: Nicolas Capens <capn@google.com>
Reviewed-on: https://swiftshader-review.googlesource.com/8161
Reviewed-by: Alexis Hétu <sugoi@google.com>
7 years agoImplement vector intrinsics.
Nicolas Capens [Tue, 8 Nov 2016 03:25:14 +0000 (22:25 -0500)]
Implement vector intrinsics.

Bug swiftshader:15

Change-Id: I1391f656bce9b5cb09c4034df977ae4757e58843
Reviewed-on: https://swiftshader-review.googlesource.com/7955
Reviewed-by: Nicolas Capens <capn@google.com>
Tested-by: Nicolas Capens <capn@google.com>
Reviewed-on: https://swiftshader-review.googlesource.com/8160
Reviewed-by: Alexis Hétu <sugoi@google.com>
7 years agoImplement floating-point rounding intrinsics.
Nicolas Capens [Mon, 7 Nov 2016 22:32:17 +0000 (17:32 -0500)]
Implement floating-point rounding intrinsics.

Bug swiftshader:15

Change-Id: I27fe7bd2f0deaf19fab2f4565574ad084c49cddb
Reviewed-on: https://swiftshader-review.googlesource.com/7954
Reviewed-by: Nicolas Capens <capn@google.com>
Tested-by: Nicolas Capens <capn@google.com>
Reviewed-on: https://swiftshader-review.googlesource.com/8159
Reviewed-by: Alexis Hétu <sugoi@google.com>
7 years agoImplement increment/decrement operators.
Nicolas Capens [Mon, 7 Nov 2016 21:05:22 +0000 (16:05 -0500)]
Implement increment/decrement operators.

Bug swiftshader:6

Change-Id: Ie59ca6e16eb82b84b01d9f47e5168fce7614084e
Reviewed-on: https://swiftshader-review.googlesource.com/7953
Reviewed-by: Nicolas Capens <capn@google.com>
Tested-by: Nicolas Capens <capn@google.com>
Reviewed-on: https://swiftshader-review.googlesource.com/8158
Reviewed-by: Alexis Hétu <sugoi@google.com>
7 years agoRemove unused createIntCast() method.
Nicolas Capens [Mon, 7 Nov 2016 20:32:52 +0000 (15:32 -0500)]
Remove unused createIntCast() method.

Bug swiftshader:6

Change-Id: Iba0a4904e99f7323c7e2044be03bb7dd950929d9
Reviewed-on: https://swiftshader-review.googlesource.com/7951
Reviewed-by: Nicolas Capens <capn@google.com>
Tested-by: Nicolas Capens <capn@google.com>
Reviewed-on: https://swiftshader-review.googlesource.com/8157
Reviewed-by: Alexis Hétu <sugoi@google.com>
7 years agoDon't use Long1 for stencil operations.
Nicolas Capens [Mon, 7 Nov 2016 20:30:33 +0000 (15:30 -0500)]
Don't use Long1 for stencil operations.

Bug swiftshader:15

Change-Id: I4fa5356109e35ac13f9f8d5a97e9059262901051
Reviewed-on: https://swiftshader-review.googlesource.com/7950
Reviewed-by: Nicolas Capens <capn@google.com>
Tested-by: Nicolas Capens <capn@google.com>
Reviewed-on: https://swiftshader-review.googlesource.com/8156
Reviewed-by: Alexis Hétu <sugoi@google.com>
7 years agoFix debug dump and error output.
Nicolas Capens [Mon, 7 Nov 2016 18:01:07 +0000 (13:01 -0500)]
Fix debug dump and error output.

Bug swiftshader:6

Change-Id: I170feba4050b750727fa57927545996577123e30
Reviewed-on: https://swiftshader-review.googlesource.com/7930
Reviewed-by: Nicolas Capens <capn@google.com>
Tested-by: Nicolas Capens <capn@google.com>
Reviewed-on: https://swiftshader-review.googlesource.com/8155
Reviewed-by: Alexis Hétu <sugoi@google.com>
7 years agoImplement square root and reciprocal.
Nicolas Capens [Tue, 1 Nov 2016 03:23:15 +0000 (23:23 -0400)]
Implement square root and reciprocal.

Bug swiftshader:15

Change-Id: If9336a87f90269a295fcd3b3bff2fd6899c773e4
Reviewed-on: https://swiftshader-review.googlesource.com/7910
Reviewed-by: Nicolas Capens <capn@google.com>
Tested-by: Nicolas Capens <capn@google.com>
Reviewed-on: https://swiftshader-review.googlesource.com/8154
Reviewed-by: Alexis Hétu <sugoi@google.com>
7 years agoSimplify abstract value bitcasting.
Nicolas Capens [Thu, 27 Oct 2016 14:20:28 +0000 (10:20 -0400)]
Simplify abstract value bitcasting.

Change-Id: I173d563cd3cd17cf90caf723f29a6c1da51103b5
Reviewed-on: https://swiftshader-review.googlesource.com/7872
Reviewed-by: Nicolas Capens <capn@google.com>
Tested-by: Nicolas Capens <capn@google.com>
Reviewed-on: https://swiftshader-review.googlesource.com/8153
Reviewed-by: Alexis Hétu <sugoi@google.com>
7 years agoFix packing of 64-bit vectors.
Nicolas Capens [Thu, 27 Oct 2016 03:38:41 +0000 (23:38 -0400)]
Fix packing of 64-bit vectors.

Bug swiftshader:15

Change-Id: I5177113ad50ff2e1aa99f772d9254f7894ce5a61
Reviewed-on: https://swiftshader-review.googlesource.com/7870
Reviewed-by: Nicolas Capens <capn@google.com>
Tested-by: Nicolas Capens <capn@google.com>
Reviewed-on: https://swiftshader-review.googlesource.com/8152
Reviewed-by: Alexis Hétu <sugoi@google.com>
7 years agoImplement min/max.
Nicolas Capens [Wed, 26 Oct 2016 04:23:12 +0000 (00:23 -0400)]
Implement min/max.

Bug swiftshader:15

Change-Id: I785e31724e802a3ed1bca75186e012ccc7cb336e
Reviewed-on: https://swiftshader-review.googlesource.com/7850
Reviewed-by: Nicolas Capens <capn@google.com>
Tested-by: Nicolas Capens <capn@google.com>
Reviewed-on: https://swiftshader-review.googlesource.com/8151
Reviewed-by: Alexis Hétu <sugoi@google.com>
7 years agoImplement vector packing.
Nicolas Capens [Tue, 25 Oct 2016 21:32:37 +0000 (17:32 -0400)]
Implement vector packing.

Bug swiftshader:15

Change-Id: I3b20ba10e71c7813c35b16ae6c7382bfe4e0ae00
Reviewed-on: https://swiftshader-review.googlesource.com/7851
Reviewed-by: Nicolas Capens <capn@google.com>
Tested-by: Nicolas Capens <capn@google.com>
Reviewed-on: https://swiftshader-review.googlesource.com/8150
Reviewed-by: Alexis Hétu <sugoi@google.com>
7 years agoImplement unpacking of high 64-bit vector halves.
Nicolas Capens [Tue, 25 Oct 2016 21:32:37 +0000 (17:32 -0400)]
Implement unpacking of high 64-bit vector halves.

Bug swiftshader:15

Change-Id: I59bfec356b04ebc2ff7d8507d39ec8f18c57e42a
Reviewed-on: https://swiftshader-review.googlesource.com/7830
Reviewed-by: Nicolas Capens <capn@google.com>
Tested-by: Nicolas Capens <capn@google.com>
Reviewed-on: https://swiftshader-review.googlesource.com/8149
Reviewed-by: Alexis Hétu <sugoi@google.com>
7 years agoImplement vector sign mask operations.
Nicolas Capens [Fri, 21 Oct 2016 21:26:13 +0000 (17:26 -0400)]
Implement vector sign mask operations.

Bug swiftshader:15

Change-Id: I0d9cb2daeea931994abeb63f0939879875d4e81f
Reviewed-on: https://swiftshader-review.googlesource.com/7791
Reviewed-by: Nicolas Capens <capn@google.com>
Tested-by: Nicolas Capens <capn@google.com>
Reviewed-on: https://swiftshader-review.googlesource.com/8148
Reviewed-by: Alexis Hétu <sugoi@google.com>
7 years agoImplement arithmetic and logical operations.
Nicolas Capens [Fri, 21 Oct 2016 19:30:29 +0000 (15:30 -0400)]
Implement arithmetic and logical operations.

Bug swiftshader:15

Change-Id: I27f7c2b9d87841a1eae0d9bc92fbe79b28c65982
Reviewed-on: https://swiftshader-review.googlesource.com/7773
Reviewed-by: Nicolas Capens <capn@google.com>
Tested-by: Nicolas Capens <capn@google.com>
Reviewed-on: https://swiftshader-review.googlesource.com/8146
Reviewed-by: Alexis Hétu <sugoi@google.com>
7 years agoEnable multiprocessor compilation.
Nicolas Capens [Fri, 21 Oct 2016 20:23:24 +0000 (16:23 -0400)]
Enable multiprocessor compilation.

Change-Id: Ie932ff6fa92bd026754a4339919df02093bdae95
Reviewed-on: https://swiftshader-review.googlesource.com/7775
Reviewed-by: Nicolas Capens <capn@google.com>
Tested-by: Nicolas Capens <capn@google.com>
Reviewed-on: https://swiftshader-review.googlesource.com/8147
Reviewed-by: Alexis Hétu <sugoi@google.com>
7 years agoImplement vector shift by constant.
Nicolas Capens [Fri, 21 Oct 2016 18:26:34 +0000 (14:26 -0400)]
Implement vector shift by constant.

Bug swiftshader:15

Change-Id: Ief486cf0fe140a5b345f9a40c19c6e293d5798a4
Reviewed-on: https://swiftshader-review.googlesource.com/7772
Reviewed-by: Nicolas Capens <capn@google.com>
Tested-by: Nicolas Capens <capn@google.com>
Reviewed-on: https://swiftshader-review.googlesource.com/8145
Reviewed-by: Alexis Hétu <sugoi@google.com>
7 years agoLimit loop init scope to till end of loop.
Nicolas Capens [Mon, 24 Oct 2016 21:49:13 +0000 (17:49 -0400)]
Limit loop init scope to till end of loop.

Bug swiftshader:13

Change-Id: I03cdbb3e5ea28643eb941e162125da68d183d1c6
Reviewed-on: https://swiftshader-review.googlesource.com/7810
Reviewed-by: Nicolas Capens <capn@google.com>
Tested-by: Nicolas Capens <capn@google.com>
Reviewed-on: https://swiftshader-review.googlesource.com/8144
Reviewed-by: Alexis Hétu <sugoi@google.com>
7 years agoImplement Else without using basic block predecessor.
Nicolas Capens [Mon, 24 Oct 2016 13:52:23 +0000 (09:52 -0400)]
Implement Else without using basic block predecessor.

Bug swiftshader:13

Change-Id: Idd49e64aa8415ceb5d1cfee7b65a7d67ea0ebd40
Reviewed-on: https://swiftshader-review.googlesource.com/7792
Reviewed-by: Nicolas Capens <capn@google.com>
Tested-by: Nicolas Capens <capn@google.com>
Reviewed-on: https://swiftshader-review.googlesource.com/8143
Reviewed-by: Alexis Hétu <sugoi@google.com>
7 years agoAdd additional Subzero assembler unit tests.
Nicolas Capens [Mon, 24 Oct 2016 15:32:53 +0000 (11:32 -0400)]
Add additional Subzero assembler unit tests.

Change-Id: I6ad39c934a605e190171c8fb427c75ad587f4a68
Reviewed-on: https://swiftshader-review.googlesource.com/7793
Reviewed-by: Nicolas Capens <capn@google.com>
Tested-by: Nicolas Capens <capn@google.com>
Reviewed-on: https://swiftshader-review.googlesource.com/8142
Reviewed-by: Alexis Hétu <sugoi@google.com>
7 years agoImplement several vector shuffle operations.
Nicolas Capens [Fri, 21 Oct 2016 19:08:56 +0000 (15:08 -0400)]
Implement several vector shuffle operations.

Bug swiftshader:15

Change-Id: I3f670be22415433a0582b3335fb48040e5a171c3
Reviewed-on: https://swiftshader-review.googlesource.com/7790
Reviewed-by: Nicolas Capens <capn@google.com>
Tested-by: Nicolas Capens <capn@google.com>
Reviewed-on: https://swiftshader-review.googlesource.com/8141
Reviewed-by: Alexis Hétu <sugoi@google.com>
7 years agoRemove build dependencies on (LLVM)Reactor.
Nicolas Capens [Thu, 20 Oct 2016 18:57:26 +0000 (14:57 -0400)]
Remove build dependencies on (LLVM)Reactor.

Change-Id: I8c22ec3291f93e2a5baac4067baea73415dfa218
Reviewed-on: https://swiftshader-review.googlesource.com/7758
Reviewed-by: Nicolas Capens <capn@google.com>
Tested-by: Nicolas Capens <capn@google.com>
Reviewed-on: https://swiftshader-review.googlesource.com/8140
Reviewed-by: Alexis Hétu <sugoi@google.com>
7 years agoAdd Float4 swizzle tests.
Nicolas Capens [Fri, 21 Oct 2016 17:19:34 +0000 (13:19 -0400)]
Add Float4 swizzle tests.

Bug swiftshader:15

Change-Id: Id270f2f965a5a7154fa4dc83bd1edcd72cf2ff15
Reviewed-on: https://swiftshader-review.googlesource.com/7770
Reviewed-by: Nicolas Capens <capn@google.com>
Tested-by: Nicolas Capens <capn@google.com>
Reviewed-on: https://swiftshader-review.googlesource.com/8139
Reviewed-by: Alexis Hétu <sugoi@google.com>
7 years agoImplement remaining constant creations.
Nicolas Capens [Thu, 20 Oct 2016 17:20:34 +0000 (13:20 -0400)]
Implement remaining constant creations.

Bug swiftshader:6

Change-Id: I3ab9023e2ac91a8435b403ebdd16e741197ecf6b
Reviewed-on: https://swiftshader-review.googlesource.com/7757
Reviewed-by: Nicolas Capens <capn@google.com>
Tested-by: Nicolas Capens <capn@google.com>
Reviewed-on: https://swiftshader-review.googlesource.com/8138
Reviewed-by: Alexis Hétu <sugoi@google.com>
7 years agoImplement Return() variants.
Nicolas Capens [Thu, 20 Oct 2016 15:31:36 +0000 (11:31 -0400)]
Implement Return() variants.

Bug swiftshader:6

Change-Id: I4a52eda6583a8731fd8e7a8bc15e716a772b8842
Reviewed-on: https://swiftshader-review.googlesource.com/7756
Reviewed-by: Nicolas Capens <capn@google.com>
Tested-by: Nicolas Capens <capn@google.com>
Reviewed-on: https://swiftshader-review.googlesource.com/8137
Reviewed-by: Alexis Hétu <sugoi@google.com>
7 years agoImplement support for arrays.
Nicolas Capens [Thu, 20 Oct 2016 15:25:55 +0000 (11:25 -0400)]
Implement support for arrays.

Bug swiftshader:6

Change-Id: I9ffcca588014466acb7f13a3df551a696ada8a91
Reviewed-on: https://swiftshader-review.googlesource.com/7755
Reviewed-by: Nicolas Capens <capn@google.com>
Tested-by: Nicolas Capens <capn@google.com>
Reviewed-on: https://swiftshader-review.googlesource.com/8136
Reviewed-by: Alexis Hétu <sugoi@google.com>
7 years agoFix floating-point constant vector initialization.
Nicolas Capens [Thu, 20 Oct 2016 05:29:33 +0000 (01:29 -0400)]
Fix floating-point constant vector initialization.

Bug swiftshader:17

Change-Id: Idc1ea72f71770eb1378afb850d16026430adef60
Reviewed-on: https://swiftshader-review.googlesource.com/7754
Reviewed-by: Nicolas Capens <capn@google.com>
Tested-by: Nicolas Capens <capn@google.com>
Reviewed-on: https://swiftshader-review.googlesource.com/8135
Reviewed-by: Alexis Hétu <sugoi@google.com>
7 years agoImplement additional types.
Nicolas Capens [Thu, 20 Oct 2016 05:00:19 +0000 (01:00 -0400)]
Implement additional types.

Bug swiftshader:6

Change-Id: I6443479e34b0819de45196c61a2e9fc0bf0e84d7
Reviewed-on: https://swiftshader-review.googlesource.com/7752
Reviewed-by: Nicolas Capens <capn@google.com>
Tested-by: Nicolas Capens <capn@google.com>
Reviewed-on: https://swiftshader-review.googlesource.com/8134
Reviewed-by: Alexis Hétu <sugoi@google.com>
7 years agoRemove the Long2 type.
Nicolas Capens [Thu, 20 Oct 2016 05:11:47 +0000 (01:11 -0400)]
Remove the Long2 type.

Bug swiftshader:6

Change-Id: Idb083bd1aecedb529f4e15deda3a1cfcf95a5bfa
Reviewed-on: https://swiftshader-review.googlesource.com/7753
Reviewed-by: Nicolas Capens <capn@google.com>
Tested-by: Nicolas Capens <capn@google.com>
Reviewed-on: https://swiftshader-review.googlesource.com/8133
Reviewed-by: Alexis Hétu <sugoi@google.com>
7 years agoImplement comparison operations.
Nicolas Capens [Thu, 20 Oct 2016 04:01:38 +0000 (00:01 -0400)]
Implement comparison operations.

Bug swiftshader:6

Change-Id: I7910f6e9711f91cdee9425c2768dffb76b3ffe61
Reviewed-on: https://swiftshader-review.googlesource.com/7751
Reviewed-by: Nicolas Capens <capn@google.com>
Tested-by: Nicolas Capens <capn@google.com>
Reviewed-on: https://swiftshader-review.googlesource.com/8132
Reviewed-by: Alexis Hétu <sugoi@google.com>
7 years agoFix relocating the code just once.
Nicolas Capens [Thu, 20 Oct 2016 03:45:19 +0000 (23:45 -0400)]
Fix relocating the code just once.

Bug swiftshader:9

Change-Id: I5968426e6ffd53f65f0699017d35d07ff45bffab
Reviewed-on: https://swiftshader-review.googlesource.com/7750
Reviewed-by: Nicolas Capens <capn@google.com>
Tested-by: Nicolas Capens <capn@google.com>
Reviewed-on: https://swiftshader-review.googlesource.com/8131
Reviewed-by: Alexis Hétu <sugoi@google.com>
7 years agoAssert on Subzero translation errors.
Nicolas Capens [Wed, 19 Oct 2016 14:29:49 +0000 (10:29 -0400)]
Assert on Subzero translation errors.

Bug swiftshader:6

Change-Id: I7d32d12081f4a704f4731cfa29c0eadf75a43d49
Reviewed-on: https://swiftshader-review.googlesource.com/7738
Reviewed-by: Nicolas Capens <capn@google.com>
Tested-by: Nicolas Capens <capn@google.com>
Reviewed-on: https://swiftshader-review.googlesource.com/8130
Reviewed-by: Alexis Hétu <sugoi@google.com>
7 years agoImplement support for vector constants.
Nicolas Capens [Thu, 13 Oct 2016 21:44:51 +0000 (17:44 -0400)]
Implement support for vector constants.

Bug swiftshader:17

Change-Id: Ifde00443ab55a4cf68a038fac6356182518253fe
Reviewed-on: https://swiftshader-review.googlesource.com/7715
Reviewed-by: Nicolas Capens <capn@google.com>
Tested-by: Nicolas Capens <capn@google.com>
Reviewed-on: https://swiftshader-review.googlesource.com/7671
Reviewed-by: Alexis Hétu <sugoi@google.com>
7 years agoImplement support for ELF relocations.
Nicolas Capens [Thu, 13 Oct 2016 19:36:36 +0000 (15:36 -0400)]
Implement support for ELF relocations.

Bug swiftshader:17

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

7 years agoRefactor constant creation.
Nicolas Capens [Thu, 13 Oct 2016 18:52:12 +0000 (14:52 -0400)]
Refactor constant creation.

Distinguishing between Values and Constants complicates the creation
of constant vectors, and isn't necessary when using Subzero assign
operations to convert between them internally. Also, construct vector
constants from arrays of basic types.

Bug swiftshader:17

Change-Id: I9c03655ed18d5b4bd3797a252cd7f02793205254
Reviewed-on: https://swiftshader-review.googlesource.com/7713
Reviewed-by: Nicolas Capens <capn@google.com>
Tested-by: Nicolas Capens <capn@google.com>
Reviewed-on: https://swiftshader-review.googlesource.com/7650
Reviewed-by: Alexis Hétu <sugoi@google.com>
7 years agoEmulate vectors shorter than 128-bit.
Nicolas Capens [Fri, 30 Sep 2016 18:57:16 +0000 (14:57 -0400)]
Emulate vectors shorter than 128-bit.

Bug swiftshader:15

Change-Id: I065c52711719b12fe55cf0190e735240c008629e
Reviewed-on: https://swiftshader-review.googlesource.com/7712
Reviewed-by: Nicolas Capens <capn@google.com>
Tested-by: Nicolas Capens <capn@google.com>
Reviewed-on: https://swiftshader-review.googlesource.com/7390
Reviewed-by: Alexis Hétu <sugoi@google.com>
7 years agoAvoid ambiguous vector casts.
Nicolas Capens [Thu, 13 Oct 2016 17:39:01 +0000 (13:39 -0400)]
Avoid ambiguous vector casts.

Bug swiftshader:15

Change-Id: Ia42d21b4f2c9e19a839ffb414661f2dffa350692
Reviewed-on: https://swiftshader-review.googlesource.com/7711
Reviewed-by: Nicolas Capens <capn@google.com>
Tested-by: Nicolas Capens <capn@google.com>
Reviewed-on: https://swiftshader-review.googlesource.com/7630
Reviewed-by: Alexis Hétu <sugoi@google.com>
7 years agoMore blitFramebuffer fixes
Alexis Hetu [Wed, 30 Nov 2016 19:34:07 +0000 (14:34 -0500)]
More blitFramebuffer fixes

A few minor adjustments:
- The validity of blit operations with the same bounds on source
  and destination buffer also extends to color buffers
- Renderbuffers, whether GL_RENDERBUFFER or GL_FRAMEBUFFER_DEFAULT
  are considered of the same type for the purpose of blitting

Change-Id: I0de7c19aa8b07fa57ed33b98be4a4ab609e6e115
Reviewed-on: https://swiftshader-review.googlesource.com/8213
Tested-by: Alexis Hétu <sugoi@google.com>
Reviewed-by: Nicolas Capens <capn@google.com>
7 years agoFixed blitFramebuffer issue with Depth/Stencil
Alexis Hetu [Wed, 30 Nov 2016 16:25:28 +0000 (11:25 -0500)]
Fixed blitFramebuffer issue with Depth/Stencil

A condition was overly aggressive in producing an INVALID_OPERATION
when the read depth/stencil framebuffer is multisampled. When the
formats are the same and source and destination rectangles are the
same, performing a blitFramebuffer operation is allowed.

Change-Id: I29e52cb546ae1bf248ac0107492c97ea82406613
Reviewed-on: https://swiftshader-review.googlesource.com/8212
Tested-by: Alexis Hétu <sugoi@google.com>
Reviewed-by: Nicolas Capens <capn@google.com>
7 years agoFixed some quad layout computation related warnings
Alexis Hetu [Tue, 22 Nov 2016 19:13:01 +0000 (14:13 -0500)]
Fixed some quad layout computation related warnings

Linux was complaining about ambiguous conditional expressions.
Added some explicit casts to RValue<Int> to fix these warnings.

Change-Id: Ib8e01ee69bb1794ea60b7954f1520a15e383cefa
Reviewed-on: https://swiftshader-review.googlesource.com/8111
Tested-by: Alexis Hétu <sugoi@google.com>
Reviewed-by: Nicolas Capens <capn@google.com>
7 years agoFixed official chromium build on Linux
Alexis Hetu [Tue, 22 Nov 2016 18:47:04 +0000 (13:47 -0500)]
Fixed official chromium build on Linux

A warning treated as an error was causing the
official build to fail. Added -Wno-unused-result
to the LLVM build file to solve the issue.

Also ran 'git cl format' on the BUILD.gn files
to fix all formatting issues.

Change-Id: I235c7d9d3e60f788e1dc694a40991c214e6c77e3
Reviewed-on: https://swiftshader-review.googlesource.com/8110
Reviewed-by: Nicolas Capens <capn@google.com>
Tested-by: Alexis Hétu <sugoi@google.com>
7 years agoglBlitFramebuffer support for depth/stencil formats
Alexis Hetu [Thu, 6 Oct 2016 15:25:32 +0000 (11:25 -0400)]
glBlitFramebuffer support for depth/stencil formats

Added support for depth and stencil formats for glBlitFramebuffer:
- Blitter now supports quad layout and stencil
- Device::stretchRect() now supports specific buffers, so that a
  caller can specifically choose which buffer to copy

Change-Id: Iae0898df11e0a1d3c006113486ed15a3fd2f90a9
Reviewed-on: https://swiftshader-review.googlesource.com/7510
Tested-by: Alexis Hétu <sugoi@google.com>
Reviewed-by: Nicolas Capens <capn@google.com>
7 years agoAdded compilation test for SwiftShader
Alexis Hetu [Wed, 16 Nov 2016 18:53:57 +0000 (13:53 -0500)]
Added compilation test for SwiftShader

This is a new compilation only test which can be used
to trigger swiftshader compilation on test bots. More
unit tests can be added later.

Change-Id: I46e605b3e7a67438f8f36346e4fcd4e06a2b00ec
Reviewed-on: https://swiftshader-review.googlesource.com/8032
Tested-by: Alexis Hétu <sugoi@google.com>
Reviewed-by: Nicolas Capens <capn@google.com>
7 years agoFixed clang warnings and unmuted these warnings
Alexis Hetu [Mon, 14 Nov 2016 19:10:47 +0000 (14:10 -0500)]
Fixed clang warnings and unmuted these warnings

A few warnings were fixed:
- 2 sets of virtual flip/blit functions were colliding, so
  I added pure virtual function overrides so that both
  definitions appear within FrameBufferWin
- Moved a few variables within ASSERT inside the ASSERT
  statement in order to remove unused variable warnings
- Removed stack option from glslang.l and removed comments
  handling code, which is actually already done by the
  preprocessor (tested in dEQP)
- Removed unused yyscanner variable from glslang.l
- Ifdefed debug only code in main.cpp

Removed all related muted warnings from BUILD.gn files.

Change-Id: Idf9e7eed00431cc747b689b5d1931fd0c1e8d506
Reviewed-on: https://swiftshader-review.googlesource.com/8010
Tested-by: Alexis Hétu <sugoi@google.com>
Reviewed-by: Nico Weber <thakis@google.com>
Reviewed-by: Nicolas Capens <capn@google.com>
7 years agoFix Subzero release builds.
Nicolas Capens [Wed, 9 Nov 2016 21:47:47 +0000 (16:47 -0500)]
Fix Subzero release builds.

Bug swiftshader:6

Change-Id: I13f9c6d5702ff8debc562ab0c7dc593b4a4a9de5
Reviewed-on: https://swiftshader-review.googlesource.com/7991
Reviewed-by: Alexis Hétu <sugoi@google.com>
Tested-by: Nicolas Capens <capn@google.com>
7 years agoAdd Subzero vector arithmetic tests.
Nicolas Capens [Wed, 12 Oct 2016 19:46:31 +0000 (15:46 -0400)]
Add Subzero vector arithmetic tests.

Change-Id: I440c71fb57f439ab6461609810d32cfb74a892c7
Reviewed-on: https://swiftshader-review.googlesource.com/7590
Reviewed-by: Nicolas Capens <capn@google.com>
Tested-by: Nicolas Capens <capn@google.com>
7 years agoUse gtest for testing Subzero.
Nicolas Capens [Wed, 12 Oct 2016 19:27:04 +0000 (15:27 -0400)]
Use gtest for testing Subzero.

Change-Id: If2a5c51991bd60e1b6545799cd50f9520c85f21e
Reviewed-on: https://swiftshader-review.googlesource.com/7570
Reviewed-by: Nicolas Capens <capn@google.com>
Tested-by: Nicolas Capens <capn@google.com>
7 years agoAdd googletest as a submodule.
Nicolas Capens [Wed, 12 Oct 2016 16:34:02 +0000 (12:34 -0400)]
Add googletest as a submodule.

Change-Id: I8ebd26ce53930b60892bcf4e2378fb587df08da6
Reviewed-on: https://swiftshader-review.googlesource.com/7550
Reviewed-by: Nicolas Capens <capn@google.com>
Tested-by: Nicolas Capens <capn@google.com>
7 years agoRevert "Removed Subzero compilation from SwiftShader solution"
Nicolas Capens [Wed, 12 Oct 2016 17:17:24 +0000 (13:17 -0400)]
Revert "Removed Subzero compilation from SwiftShader solution"

It caused building Subzero individually to fail. Instead I've added
a header which will get included when the submodule is not present
and generates an error. The LLVM dependencies were split off into a
separate project to make this work.

This reverts commit d5d886eb1c5502c2b976388742b2bb50d4d0ce65.

Change-Id: Ie80a02e20ac67d6a4e0984e1fbab84b880a03469
Reviewed-on: https://swiftshader-review.googlesource.com/7611
Reviewed-by: Nicolas Capens <capn@google.com>
Tested-by: Nicolas Capens <capn@google.com>
7 years agoRemoved Subzero compilation from SwiftShader solution
Alexis Hetu [Wed, 5 Oct 2016 21:08:49 +0000 (17:08 -0400)]
Removed Subzero compilation from SwiftShader solution

Removed Visual Studio compilation of Subzero and related tests from
the SwiftShader solution so that building the Solution no longer
attempts to build Subzero, which currently doesn't build in Visual
Studio.

Change-Id: Icde9f9ceb90b46681ce8d6019c8151317f84ad17
Reviewed-on: https://swiftshader-review.googlesource.com/7491
Reviewed-by: Nicolas Capens <capn@google.com>
Tested-by: Alexis Hétu <sugoi@google.com>
7 years agoAdding functionality to stencils
Alexis Hetu [Wed, 5 Oct 2016 21:03:30 +0000 (17:03 -0400)]
Adding functionality to stencils

Two minor features are required for the blitFramebuffer
implementation in OpenGL ES 3:
- lockStencil with x,y coordinates
- getting the stencil format (new getStencilFormat function)

Change-Id: I83ccccefe70dbbedd05b5d82bc75d30f689c4abe
Reviewed-on: https://swiftshader-review.googlesource.com/7490
Tested-by: Alexis Hétu <sugoi@google.com>
Reviewed-by: Nicolas Capens <capn@google.com>
7 years agoImplement generic vector shuffle.
Nicolas Capens [Fri, 30 Sep 2016 18:46:24 +0000 (14:46 -0400)]
Implement generic vector shuffle.

Bug swiftshader:15

Change-Id: I6cfb3218a9962ca9fe271e9595ecf56aaca6375d
Reviewed-on: https://swiftshader-review.googlesource.com/7398
Tested-by: Nicolas Capens <capn@google.com>
Reviewed-by: Alexis Hétu <sugoi@google.com>
Reviewed-by: Nicolas Capens <capn@google.com>
7 years agoRefactor vector swizzle.
Nicolas Capens [Fri, 30 Sep 2016 18:23:47 +0000 (14:23 -0400)]
Refactor vector swizzle.

Bug swiftshader:15

Change-Id: Iaa626705220e4bd9b3c744c7623f8b204022b716
Reviewed-on: https://swiftshader-review.googlesource.com/7397
Tested-by: Nicolas Capens <capn@google.com>
Reviewed-by: Alexis Hétu <sugoi@google.com>
Reviewed-by: Nicolas Capens <capn@google.com>
7 years agoImplement vector extract, insert, and swizzle.
Nicolas Capens [Fri, 30 Sep 2016 15:44:14 +0000 (11:44 -0400)]
Implement vector extract, insert, and swizzle.

Bug swiftshader:15

Change-Id: I81f88999e183ce3617d923249335ff02d6a9f1b1
Reviewed-on: https://swiftshader-review.googlesource.com/7396
Tested-by: Nicolas Capens <capn@google.com>
Reviewed-by: Alexis Hétu <sugoi@google.com>
Reviewed-by: Nicolas Capens <capn@google.com>
7 years agoRefactor vector operations.
Nicolas Capens [Fri, 30 Sep 2016 15:37:28 +0000 (11:37 -0400)]
Refactor vector operations.

Subzero does not know the element types of vectors, so pass it as an
argument. Also deprecate createSwizzle() and createMask() from
Nucleus since we only need Float4 Swizzle().

Bug swiftshader:15

Change-Id: I38b630f48f8f43e1248338d564a7406d7c8cd5ef
Reviewed-on: https://swiftshader-review.googlesource.com/7395
Tested-by: Nicolas Capens <capn@google.com>
Reviewed-by: Alexis Hétu <sugoi@google.com>
Reviewed-by: Nicolas Capens <capn@google.com>