History log of /external/swiftshader/src/Shader/VertexProgram.cpp
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
283d5669b893a5690ca6b7cd4c3dffda6cf69f21 25-May-2016 Meng-Lin Wu <marleymoo@google.com> texgrad implementation

Related deqp tests: texturegrad, textureprojgrad

Change-Id: I17529ed426c29bc1dec48fb7ac939c29caeeaf07
Reviewed-on: https://swiftshader-review.googlesource.com/5420
Tested-by: Meng-Lin Wu <marleymoo@google.com>
Reviewed-by: Nicolas Capens <capn@google.com>
/external/swiftshader/src/Shader/VertexProgram.cpp
579dc4f88eb1891b1d5c19556394df34abf6ff57 18-May-2016 Nicolas Capens <capn@google.com> Make the number of vertex outputs configurable.

Change-Id: I17ae53e5274232e9e3b482daac56d507788e822c
Reviewed-on: https://swiftshader-review.googlesource.com/5383
Reviewed-by: Alexis Hétu <sugoi@google.com>
Reviewed-by: Nicolas Capens <capn@google.com>
Tested-by: Nicolas Capens <capn@google.com>
/external/swiftshader/src/Shader/VertexProgram.cpp
bcd9e6a22e2ae3a9b6225d87a5e49e6b594575f3 17-May-2016 Nicolas Capens <capn@google.com> Rename color output semantic.

Change-Id: Iaa6cf9367f291a4bc3bde899484ca323ff54a0d4
Reviewed-on: https://swiftshader-review.googlesource.com/5381
Tested-by: Nicolas Capens <capn@google.com>
Reviewed-by: Alexis Hétu <sugoi@google.com>
Reviewed-by: Nicolas Capens <capn@google.com>
/external/swiftshader/src/Shader/VertexProgram.cpp
478dd9a470bc45758a9400af6b2896c2f3d4abf6 02-May-2016 Alexis Hetu <sugoi@google.com> Switch implementation

Implemented switch/case for glsl in OpenGL ES 3.0.
For simplicity, it is implemented as a loop without a condition,
so break statements work properly like so:

begin switch
if(...) // 1st case
...
else if(...) // other cases
...
else // default case
...
end switch // Anchor point for break statements

All related dEQP tests pass, except 7 tests where vertex shaders
contain a switch or a loop within another switch. These 7 failures
have only about 5% of bad pixel and seem to be related to an issue
with int(floor(...)), since the equivalent tests inside the fragment
shader pass.

KNOWN ISSUE: If a switch is within a loop and one of the cases
contains a "continue" statement, this will not be
handled correctly at the moment. There are no dEQP
tests for this at the moment, AFAIK.

Change-Id: I3ba34ab06a759d07e8520f6a87d75036a5cdaef5
Reviewed-on: https://swiftshader-review.googlesource.com/5272
Tested-by: Alexis Hétu <sugoi@google.com>
Reviewed-by: Nicolas Capens <capn@google.com>
/external/swiftshader/src/Shader/VertexProgram.cpp
d999309b36cb3dceadd38217b322f0e96a06b202 07-May-2016 Nicolas Capens <capn@google.com> Apply the Apache 2.0 license.

Change-Id: I4a7aeefedcd2d891093520d5a10ebefadcddb5be
Reviewed-on: https://swiftshader-review.googlesource.com/5320
Reviewed-by: Nicolas Capens <capn@google.com>
Tested-by: Nicolas Capens <capn@google.com>
/external/swiftshader/src/Shader/VertexProgram.cpp
f2f6dee49705eadc5d4e5bf8c91c7d50ded8a8f6 28-Apr-2016 Nicolas Capens <capn@google.com> Don't continue looping when having returned from shader function.

Previously we would mask instruction execution after hitting a LEAVE,
but still jump back on every loop iteration (even if infinite). This
change applies the enableLeave mask to the loop test condition so we
break out of the loop when all strands have hit LEAVE.

Change-Id: Ia331a91fb363d20743d5b87a468c3cfcaa7b481e
Reviewed-on: https://swiftshader-review.googlesource.com/5250
Tested-by: Nicolas Capens <capn@google.com>
Reviewed-by: Alexis Hétu <sugoi@google.com>
Reviewed-by: Nicolas Capens <capn@google.com>
/external/swiftshader/src/Shader/VertexProgram.cpp
ab9ca270b61f8d5c1960145095f1a010eaa5382d 07-Apr-2016 Alexis Hetu <sugoi@google.com> Half float packing and unpacking intrinsic functions

Implementation for packHalf2x16, unpackHalf2x16 intrinsic functions.

Change-Id: I55212f8bc2ecd30e0108858d74117c3cf60733ed
Reviewed-on: https://swiftshader-review.googlesource.com/5056
Tested-by: Alexis Hétu <sugoi@google.com>
Reviewed-by: Nicolas Capens <capn@google.com>
/external/swiftshader/src/Shader/VertexProgram.cpp
043372ea307f54eccd6b7290907dc557b381b637 06-Apr-2016 Alexis Hetu <sugoi@google.com> Signed and unsigned integer packing and unpacking intrinsic functions

Implementation for packSnorm2x16, unpackSnorm2x16, packUnorm2x16 and
unpackUnorm2x16 intrinsic functions.

Change-Id: I6b9e2584c1aaad8011f026c217d8ad3f72e9ba45
Reviewed-on: https://swiftshader-review.googlesource.com/5053
Tested-by: Alexis Hétu <sugoi@google.com>
Reviewed-by: Nicolas Capens <capn@google.com>
/external/swiftshader/src/Shader/VertexProgram.cpp
9d86a36eb381ffce11fc116490abf74b21f49ca5 04-Apr-2016 Nicolas Capens <capn@google.com> Refactor sampler LOD calculation method into an enum.

Change-Id: I0beed96cd68608ce07aec0b11f14d6f61e67e53d
Reviewed-on: https://swiftshader-review.googlesource.com/5034
Tested-by: Nicolas Capens <capn@google.com>
Reviewed-by: Alexis Hétu <sugoi@google.com>
Reviewed-by: Nicolas Capens <capn@google.com>
/external/swiftshader/src/Shader/VertexProgram.cpp
64361f575c2b856c1cbbd89f6891b4b6637b992e 18-Mar-2016 Alexis Hetu <sugoi@google.com> Fixed some unary operators

There were a few issues in unary operators:
- Many were not compiling because the promote function had not
been adjusted to take the new builtin functions into account
- abs and sign had not been implemented for int
- For the integer abs version, used pabsd. Removed the extra
argument, which seemed unnecessary (abs should have 1 input,
1 output, AFAIK).

Change-Id: If02c5040438e8c45c99fc7b3c55107448c85cf58
Reviewed-on: https://swiftshader-review.googlesource.com/4970
Tested-by: Alexis Hétu <sugoi@google.com>
Reviewed-by: Nicolas Capens <capn@google.com>
/external/swiftshader/src/Shader/VertexProgram.cpp
968ee8abb435009a12ae31a97c06ea905466e2df 10-Feb-2016 Alexis Hetu <sugoi@google.com> Removed some unnecessary instructions from programs

Removed a few unnecessary/bad instructions from PixelProgram and
VertexProgram. Also added the proper implementation for printing out
a shader instruction that includes indexing an array with a uniform.

Change-Id: Icd37dd4f70419874bb65c54438409b8b9c3ee836
Reviewed-on: https://swiftshader-review.googlesource.com/4753
Tested-by: Alexis Hétu <sugoi@google.com>
Reviewed-by: Nicolas Capens <capn@google.com>
/external/swiftshader/src/Shader/VertexProgram.cpp
08a111aa53596b17f2b405ee28fafe0aad4e6027 27-Oct-2015 Alexis Hetu <sugoi@google.com> Passing uniform buffers to the vertex/pixel programs

This cl contains the necessary changes to make uniform buffers
usable in shaders. A few things to note:
- Uniform buffers can be set, but nothing will attempt to access
them in this cl.
- While the 'index' of uniforms is expressed in terms of registers,
uniform buffer 'index' is expressed in bytes in both PixelProgram
and VertexProgram. This is necessary because of packing which can
potentially put some variables in the middle of registers.
Technically, std140 always packs variables in multiples of byte4,
but other future layouts may not, so using bytes as the unit is
more future proof.
- The above mentioned 'index' will have to be computed in OutputASM
and extra operations will need to be added (to fetch a row from a
row major matrix, for example).

Change-Id: I636cc4bdc6fe90d6f5697e735f4288f48d18a75b
Reviewed-on: https://swiftshader-review.googlesource.com/4151
Tested-by: Alexis Hétu <sugoi@google.com>
Reviewed-by: Nicolas Capens <capn@google.com>
/external/swiftshader/src/Shader/VertexProgram.cpp
9687fb4c17a78334039f14600d83834835f76316 20-Jan-2016 Nicolas Capens <capn@google.com> Make vertex registers members of routine classes.

Bug 22652760

Change-Id: I698ce910ee4302178d7235fa316aaa2b268e71a8
Reviewed-on: https://swiftshader-review.googlesource.com/4560
Tested-by: Nicolas Capens <capn@google.com>
Reviewed-by: Nicolas Capens <capn@google.com>
/external/swiftshader/src/Shader/VertexProgram.cpp
7b501f346a2cad55eb7dca0b86ec36a8ccef40ec 20-Jan-2016 Nicolas Capens <capn@google.com> Move loop register usage to relative addressing.

Bug 22652760

Change-Id: I50c6935bac91f586953b0dd2abd0d2a859468ee1
Reviewed-on: https://swiftshader-review.googlesource.com/4579
Tested-by: Nicolas Capens <capn@google.com>
Reviewed-by: Alexis Hétu <sugoi@google.com>
Reviewed-by: Nicolas Capens <capn@google.com>
/external/swiftshader/src/Shader/VertexProgram.cpp
7272382b03d86d2dd94df945ea89ef0bace028c1 15-Jan-2016 Nicolas Capens <capn@google.com> Eliminate redundant register set argument passing.

Bug 22652760

Change-Id: If6bf124c3218847ecc4af0ae16102452a6b344d9
Reviewed-on: https://swiftshader-review.googlesource.com/4558
Tested-by: Nicolas Capens <capn@google.com>
Reviewed-by: Alexis Hétu <sugoi@google.com>
Reviewed-by: Nicolas Capens <capn@google.com>
/external/swiftshader/src/Shader/VertexProgram.cpp
95c9e5e790e94ab8696c20c956c6002b5e761e8e 15-Oct-2015 Nicolas Capens <capn@google.com> Remove redundant shader instructions.

Bool to int and int to bool also work for unsigned int.

Change-Id: I31669d8754a718096381609d13c2e9668599efe5
Reviewed-on: https://swiftshader-review.googlesource.com/4070
Reviewed-by: Alexis Hétu <sugoi@google.com>
Reviewed-by: Nicolas Capens <capn@google.com>
Tested-by: Nicolas Capens <capn@google.com>
/external/swiftshader/src/Shader/VertexProgram.cpp
5f5188c85fdd497e140fea4f66a6f09930f39849 13-Jan-2016 Alexis Hetu <sugoi@google.com> Added some uses of FRAGMENT_UNIFORM_VECTORS and VERTEX_UNIFORM_VECTORS

Replaced a few instances of 224 and 256 that were actually used to
represent FRAGMENT_UNIFORM_VECTORS and VERTEX_UNIFORM_VECTORS.

This cl should not change any behavior.

Change-Id: I4b82341f32223fcee559aaf70df2ee83c9936d11
Reviewed-on: https://swiftshader-review.googlesource.com/4547
Tested-by: Alexis Hétu <sugoi@google.com>
Reviewed-by: Nicolas Capens <capn@google.com>
/external/swiftshader/src/Shader/VertexProgram.cpp
5767eabd0b3c275c7221f1fceac9ef11ea5ec4e5 02-Jan-2016 Nicolas Capens <capn@google.com> Fix signed/unsigned comparison warnings.

Bug 15387371

Change-Id: Id4c9b54c5c0b4115479b6710c4d8c91d34e5c002
Reviewed-on: https://swiftshader-review.googlesource.com/4494
Tested-by: Nicolas Capens <capn@google.com>
Reviewed-by: Alexis Hétu <sugoi@google.com>
Reviewed-by: Nicolas Capens <capn@google.com>
/external/swiftshader/src/Shader/VertexProgram.cpp
0dc11abbe43cec2e453b968cd8562482d4e8c6d1 22-Oct-2015 Alexis Hetu <sugoi@google.com> 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>
/external/swiftshader/src/Shader/VertexProgram.cpp
9bcb31da0cf95258949da1bb697f3981a70c476b 22-Jul-2015 Alexis Hetu <sugoi@google.com> TextureSize implementation

Initial TextureSize parsing and implementation

Change-Id: I8b9b1808366b1013a5001e2dfa15a26d8471ab6a
Reviewed-on: https://swiftshader-review.googlesource.com/3753
Tested-by: Alexis Hétu <sugoi@google.com>
Reviewed-by: Nicolas Capens <capn@google.com>
/external/swiftshader/src/Shader/VertexProgram.cpp
c3d95f36258143af6cca041ede521995d8f890ea 23-Sep-2015 Alexis Hetu <sugoi@google.com> Matrix determinant and inverse implementation

Implementation for determinant has been done directly in
ShaderCore in order to avoid having to allocate temporaries
manually in OutputASM.

For now, the implementation for the inverse matrix is very
simple, i.e., it doesn't attempt to re-use results from the
cofactor matrix computation to compute the determinant or
do any other kind of optimization, but it works.

Change-Id: I0fc70133809ae2752dc567bf58b60d7af7a88009
Reviewed-on: https://swiftshader-review.googlesource.com/4000
Tested-by: Alexis Hétu <sugoi@google.com>
Reviewed-by: Alexis Hétu <sugoi@google.com>
/external/swiftshader/src/Shader/VertexProgram.cpp
02a2bb807c1e947bc99d68ba7dd4984289278be0 20-Aug-2015 Alexis Hetu <sugoi@google.com> Enable glsl integer code

This cl enables true integer support in glsl shaders.
It still uses floating point registers to store all
registers, regardless of the type, so integer and
unsigned integer variables are simply reinterpreted
as integers or unsigned integers and used as such by
the appropriate instructions.

Change-Id: If62213c917b4b0c907e58db9cd36944dd198beaa
Reviewed-on: https://swiftshader-review.googlesource.com/3910
Tested-by: Alexis Hétu <sugoi@google.com>
Reviewed-by: Nicolas Capens <capn@google.com>
/external/swiftshader/src/Shader/VertexProgram.cpp
8d78cf77ce7c6bc4ba320fefb2cd2b74cc408b1a 28-Aug-2015 Alexis Hetu <sugoi@google.com> Handling new opcodes in PixelProgram and VertexProgram

The new opcodes related to true int and uint support in
glsl shader are now handled properly in PixelProgram and
VertexProgram.

Change-Id: I62565844f24708b4bd89dd99bbf971b55495c5da
Reviewed-on: https://swiftshader-review.googlesource.com/3932
Tested-by: Alexis Hétu <sugoi@google.com>
Reviewed-by: Nicolas Capens <capn@google.com>
/external/swiftshader/src/Shader/VertexProgram.cpp
c4f2c2970f43bfe8a89289a3300fd68e01ff0976 18-Aug-2015 Alexis Hetu <sugoi@google.com> New integer related core functions

- Removed float <-> int bit conversion functions, as these
will not be needed if everything is stored as float.
- Added ineg for the minus (-) sign in from of a value.
- Added f2i/i2f/f2u/u2f for float <-> int conversions
- Added b2i/i2b/b2u/u2b for bool <-> int conversions
- Added iadd, isub, imul, imad, [iu]div, [iu]mod, [iu]min,
[iu]max for these basic operations as integer operations.
- Added left and right shifts
- Added ucmp to compare unsigned values
- Modified or/xor/and to support vectors instead of only
scalars.
- Added vector equality comparison functions

Change-Id: I0f138e3707242ec0fffc1c12b95064ddc98f0087
Reviewed-on: https://swiftshader-review.googlesource.com/3888
Tested-by: Alexis Hétu <sugoi@google.com>
Reviewed-by: Nicolas Capens <capn@google.com>
/external/swiftshader/src/Shader/VertexProgram.cpp
0085c440fbbd143181322771c980e49e9c8b99b3 12-Jun-2015 Alexis Hetu <sugoi@google.com> Fixed some warnings

- Changing "char*" to "const char*" when a
function can receive string literals
- Removed some unused variables and members
- Fixed some signed vs unsigned comparisons
- Added braces for safety on code like:
if(...) if(...) ... else ...
to make it:
if(...) { if(...) ... else ... }
otherwise the else is ambiguous
- Reordered some member initializations to
fit the declaration order in the class
- OutDir must end with a backslash in VS

Change-Id: I903bd7afac882090841da0c0f4ebb30db0a5dd37
Reviewed-on: https://swiftshader-review.googlesource.com/3501
Tested-by: Alexis Hétu <sugoi@google.com>
Reviewed-by: Nicolas Capens <capn@google.com>
/external/swiftshader/src/Shader/VertexProgram.cpp
dd8df68e64365aafe91893b11bf7cc4b67599ed4 05-Jun-2015 Alexis Hetu <sugoi@google.com> glInstanceID implementation

Implementation attempt for glInstanceID.
Related dEQP tests pass.

Change-Id: I6391699a127cc7c159a2a64e3ffeaa528b611f97
Reviewed-on: https://swiftshader-review.googlesource.com/3412
Tested-by: Alexis Hétu <sugoi@google.com>
Reviewed-by: Nicolas Capens <capn@google.com>
/external/swiftshader/src/Shader/VertexProgram.cpp
8e851c1a0b9e923ceb77751b7ae7221d22833bcb 04-Jun-2015 Alexis Hetu <sugoi@google.com> RoundEven implementation

Implementation for the roundEven glsl intrinsic function.
All dEQP roundEven tests pass.

Change-Id: I8b6f3704f03eea32b08a6c2dc318ecb99a01957d
Reviewed-on: https://swiftshader-review.googlesource.com/3382
Tested-by: Alexis Hétu <sugoi@google.com>
Reviewed-by: Nicolas Capens <capn@google.com>
/external/swiftshader/src/Shader/VertexProgram.cpp
eafdb22c36f2077815eadf2a1db0fb6547bf0241 15-May-2015 Nicolas Capens <capn@google.com> Analyze the shader for define instructions.

This eliminates the need to specify if shaders can contain defined
constant values in the front-end using a global variable.

Change-Id: If7802a2743c0afa650a2631cd7945c8b3d7cf645
Reviewed-on: https://swiftshader-review.googlesource.com/3152
Reviewed-by: Greg Hartman <ghartman@google.com>
Tested-by: Greg Hartman <ghartman@google.com>
Reviewed-by: Nicolas Capens <capn@google.com>
Tested-by: Nicolas Capens <capn@google.com>
/external/swiftshader/src/Shader/VertexProgram.cpp
af1970ce7685ea66dd02ac462d6f2723d6f6e500 17-Apr-2015 Alexis Hetu <sugoi@google.com> Connecting the dots for some built-in functions

- Completed implementation of round
and hyperbolic trigonometry operations
- Added a few more cases in op to string
functions

Change-Id: Ic09d228de8e4446a66152b70edc6a6bba511288a
Reviewed-on: https://swiftshader-review.googlesource.com/2891
Tested-by: Alexis Hétu <sugoi@google.com>
Reviewed-by: Nicolas Capens <capn@google.com>
/external/swiftshader/src/Shader/VertexProgram.cpp
0b65c5e3903233839197fd689895ba57b7f61a5b 31-Mar-2015 Alexis Hetu <sugoi@google.com> Replacing numbers by constants

In order to be able to easily modify
values in between OpenGL ES versions,
some constants were added to replace
hardcoded numbers.

Change-Id: Ic35bf8e45341addf5315acaa9ffac01095b8907c
Reviewed-on: https://swiftshader-review.googlesource.com/2761
Reviewed-by: Nicolas Capens <capn@google.com>
Tested-by: Alexis Hétu <sugoi@google.com>
/external/swiftshader/src/Shader/VertexProgram.cpp
903e025f6cd8d978f013c741431b87b04ae01fd1 25-Nov-2014 Alexis Hetu <sugoi@google.com> Fixed signed/unsigned types comparison

BUG=18368388

Change-Id: I3f2927fd68e75a8fb5abde1b25e81416862076fc
Reviewed-on: https://swiftshader-review.googlesource.com/1474
Tested-by: Alexis Hétu <sugoi@google.com>
Reviewed-by: Nicolas Capens <nicolascapens@google.com>
/external/swiftshader/src/Shader/VertexProgram.cpp
c6e8ab13ecf20217229de8f4f19a14bbc18778f9 07-May-2014 Nicolas Capens <capn@google.com> Only apply the enable mask on instructions requiring predication.
/external/swiftshader/src/Shader/VertexProgram.cpp
4677a5f7a837e06dac90521eee0cf063cbfb9c9b 06-May-2014 Nicolas Capens <capn@google.com> Fixed initializing the 'leave' enable mask on every shader iteration.
/external/swiftshader/src/Shader/VertexProgram.cpp
d4ae863d01d5f448dbbba6be4ecc161971a2324f 06-May-2014 John Bauman <jbauman@google.com> Update to June 11 2013 code drop.

This should fix the hang bug we've been seeing.
/external/swiftshader/src/Shader/VertexProgram.cpp
66b8ab22586debccb1f787d4d52b7f042d4ddeb8 06-May-2014 John Bauman <jbauman@google.com> Add SwiftShader dump from Feb 6 2013
/external/swiftshader/src/Shader/VertexProgram.cpp
19bac1e08be200c31efd26f0f5fd144c9b3eefd3 06-May-2014 John Bauman <jbauman@google.com> Update SwiftShader to April code dump.

April code dump from Transgaming. Adds new shader compiler.
/external/swiftshader/src/Shader/VertexProgram.cpp
894018228b0e0bdbd7aa7e8f47d4a9458789ca82 06-May-2014 John Bauman <jbauman@google.com> Add SwiftShader source to repo

Oct 6 code drop from Transgaming
Review URL: https://chromereviews.googleplex.com/3846015
/external/swiftshader/src/Shader/VertexProgram.cpp