History log of /external/swiftshader/src/Shader/VertexProgram.cpp
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
c0632c9470e2812d3f12e6462d07af4760f3d078 02-Mar-2018 Alexis Hetu <sugoi@google.com> Added support for sampler2DRect in ESSL3

Being able to sample from sampler2DRect using the "texture" function is required for Chromium on Mac.

Change-Id: Iea8970aaec29734a251bcfc19a03223d0ebfbc7e
Reviewed-on: https://swiftshader-review.googlesource.com/17572
Reviewed-by: Alexis Hétu <sugoi@google.com>
Tested-by: Alexis Hétu <sugoi@google.com>
/external/swiftshader/src/Shader/VertexProgram.cpp
4676862e987be2c05ca2825783f2f54cf2f29eb7 17-Jan-2018 Alexis Hetu <sugoi@google.com> Texture Rectangle implementation

This adds support for GL_ARB_texture_rectangle, as it is used in Chromium.
This is required in order to use EGL/GLES on MacOS using IOSurface,
in order to be able to run Chromium on top of SwiftShader on MacOS.

Change-Id: I3c0b6a137892583bbfbc68149874d5bec3026b4a
Reviewed-on: https://swiftshader-review.googlesource.com/16368
Tested-by: Alexis Hétu <sugoi@google.com>
Reviewed-by: Nicolas Capens <nicolascapens@google.com>
/external/swiftshader/src/Shader/VertexProgram.cpp
c62fad3b19a06381ee9b82d84775698832cc4ea3 26-Jan-2018 Nicolas Capens <capn@google.com> Remove unnecessary pointer checks.

VertexProgram and PixelProgram always have a shader.

Bug chromium:805881

Change-Id: I0a27b4e7a0bc0ae591d89eb295e215bd421416fb
Reviewed-on: https://swiftshader-review.googlesource.com/16749
Tested-by: Nicolas Capens <nicolascapens@google.com>
Reviewed-by: Alexis Hétu <sugoi@google.com>
Reviewed-by: Nicolas Capens <nicolascapens@google.com>
/external/swiftshader/src/Shader/VertexProgram.cpp
6d12331ad5a27e85429abf33d54d6576546fff60 08-Jan-2018 Nicolas Capens <capn@google.com> Fix break statement.

The break 'depth' was used to indicate the number of if/else execution
enable mask's stack levels we need to discard when jumping from a break
statement to its enclosing switch or loop. However, each switch and
loop resets this depth at the end, which isn't correct for nested loops
and/or switches (note that switches contain if/else statements, and
loops use the same 'enable' masks as if/else).

This can be fixed either by using a stack to keep track of the break
depths of nested switch/loop statements, or by simply not jumping
directly from the break statement to the end of it's enclosing switch
or loop. The latter fix was chosen for this change, which assumes that
that it's uncommon for all vector lanes to become disabled at the break
statement and skip many instructions. An important exception to this is
breaking out of an infinite or long-running loop, but this is handled
by checking the break enable mask as part of the loop condition.

Change-Id: I57d2e03941e855faefd997442931ff8619eca73f
Reviewed-on: https://swiftshader-review.googlesource.com/15968
Tested-by: Nicolas Capens <nicolascapens@google.com>
Reviewed-by: Alexis Hétu <sugoi@google.com>
Reviewed-by: Nicolas Capens <nicolascapens@google.com>
/external/swiftshader/src/Shader/VertexProgram.cpp
d6bcc11172ba569e22147c09e650b840eb7ab76d 08-Jan-2018 Nicolas Capens <capn@google.com> Fix restoring the break execution enable mask.

Switch statements and loops should not reset the execution enable mask
to all lanes at the end, because they can be nested. Instead we can
just restore them to the mask value before the switch/loop.

Change-Id: I4089cbf637c28f39a536de1e68e2e513ead1ec7f
Reviewed-on: https://swiftshader-review.googlesource.com/15908
Tested-by: Nicolas Capens <nicolascapens@google.com>
Reviewed-by: Alexis Hétu <sugoi@google.com>
Reviewed-by: Nicolas Capens <nicolascapens@google.com>
/external/swiftshader/src/Shader/VertexProgram.cpp
ac6d50501fc0b54dcfb995e466cb1fe5fc86991e 05-Jan-2018 Nicolas Capens <capn@google.com> Fix switch statements in loops.

Switch statements were resetting the 'enable' execution mask stack to
all lanes, which caused us to execute the switch operations even for
lanes that were already done looping.

Change-Id: Ie5a525e8de8d5e61d4c61bcee81bd81fa862d917
Reviewed-on: https://swiftshader-review.googlesource.com/15828
Tested-by: Nicolas Capens <nicolascapens@google.com>
Reviewed-by: Alexis Hétu <sugoi@google.com>
Reviewed-by: Nicolas Capens <nicolascapens@google.com>
/external/swiftshader/src/Shader/VertexProgram.cpp
da163edbdc41cbccacfd526f51b2cd2a9b6267bf 03-Jan-2018 Alexis Hetu <sugoi@google.com> Sampler allocation fix

Because samplers can be stored within structures, register
allocation of entire structures within the samplers registers
was pushing sampler indices outside of the allowed limit.
In order to solve this, sampler registers now exclusively
contain samplers, and utility functions to compute sampler
only type size were added to make this possible.

Bug chromium:797264

Change-Id: Ic5a6f09665c39661944444cd736547bce4dff2ab
Reviewed-on: https://swiftshader-review.googlesource.com/15728
Tested-by: Alexis Hétu <sugoi@google.com>
Reviewed-by: Nicolas Capens <nicolascapens@google.com>
/external/swiftshader/src/Shader/VertexProgram.cpp
53ad4afcee973b4323f84eb54c26d8329c66e51c 06-Dec-2017 Alexis Hetu <sugoi@google.com> Rename version to shaderModel

In order to avoid creating confusion between shader model and
the actual shader's version, as specified by the #version
token in a glsl shader, version was renamed to shaderModel.

Change-Id: I481b6e3fc43168b504c2f2d9506422a697abc3a2
Reviewed-on: https://swiftshader-review.googlesource.com/14629
Tested-by: Alexis Hétu <sugoi@google.com>
Reviewed-by: Alexis Hétu <sugoi@google.com>
/external/swiftshader/src/Shader/VertexProgram.cpp
360a7741cc91981b9b4416ce4d1b133051b4fc5a 15-Nov-2017 Nicolas Capens <capn@google.com> Eliminate integer destination modifier.

The integer modifier was used to emulate integer arithmetic using
floating-point operations, as was allowed/typical for OpenGL ES 2.0
implementations. Now that we support native 32-bit integer types and
we have separate opcodes for integer operations, it is not longer
needed.

Change-Id: I89987534c150d2426ac9f9e1e49b66f9deaee560
Reviewed-on: https://swiftshader-review.googlesource.com/13889
Tested-by: Nicolas Capens <nicolascapens@google.com>
Reviewed-by: Alexis Hétu <sugoi@google.com>
Reviewed-by: Nicolas Capens <nicolascapens@google.com>
/external/swiftshader/src/Shader/VertexProgram.cpp
8ef6d1097d9fe71a2461a5040bddb1893bdbed6c 09-Nov-2017 Alexis Hetu <sugoi@google.com> isnan and isinf implementation

Added the missing implementation for isinf and isnan.

Change-Id: Ice603956a4ed8ef9515ae8f501b2876ce5fab584
Reviewed-on: https://swiftshader-review.googlesource.com/13608
Tested-by: Alexis Hétu <sugoi@google.com>
Reviewed-by: Nicolas Capens <nicolascapens@google.com>
/external/swiftshader/src/Shader/VertexProgram.cpp
a0b5783f31ffec2eef21548ce04cbc447d22148c 07-Nov-2017 Nicolas Capens <capn@google.com> Pass the sampling lod/bias as a separate parameter.

This is necessary for cube or 2D array shadow texture sampling
functions which need the fourth texture coordinate component for
depth comparison while also taking a lod or bias parameter.

Change-Id: I1e1399f134e22cecaff97a224df2c13c57ba3a40
Reviewed-on: https://swiftshader-review.googlesource.com/13551
Reviewed-by: Nicolas Capens <nicolascapens@google.com>
Reviewed-by: Alexis Hétu <sugoi@google.com>
Tested-by: Nicolas Capens <nicolascapens@google.com>
/external/swiftshader/src/Shader/VertexProgram.cpp
89a218b476e290a0e42e3fd23d913333ec0e5847 07-Nov-2017 Nicolas Capens <capn@google.com> Refactor sampling functions to use a return value.

Change-Id: Ib62f310abecbc4cdaf6e9300791600f25af0eaf3
Reviewed-on: https://swiftshader-review.googlesource.com/13550
Reviewed-by: Nicolas Capens <nicolascapens@google.com>
Reviewed-by: Alexis Hétu <sugoi@google.com>
Tested-by: Nicolas Capens <nicolascapens@google.com>
/external/swiftshader/src/Shader/VertexProgram.cpp
de9034496feb787ccf6680b83c56479b2eb2e4ce 07-Nov-2017 Nicolas Capens <capn@google.com> Create SamplerCore on demand.

Previously we dynamically allocated an array of SamplerCores. This
isn't necessary and we can just create one as a temporary object where
used. This has the added advantage that we could have Reactor variables
as class members and keep them short-lived.

Change-Id: Ifb2e6edbf275aa793bd7880bd35384e16000007d
Reviewed-on: https://swiftshader-review.googlesource.com/13548
Tested-by: Nicolas Capens <nicolascapens@google.com>
Reviewed-by: Alexis Hétu <sugoi@google.com>
/external/swiftshader/src/Shader/VertexProgram.cpp
f878d50b65d70c883dd8c882e5096b14e2a9ae53 06-Nov-2017 Nicolas Capens <capn@google.com> Pass down the texture compare state.

Depth format textures can have a comparison operation performed after
their texels have been sampled.

Change-Id: I49f6bb7fab9765265761144ee8b6b62439beb5a3
Reviewed-on: https://swiftshader-review.googlesource.com/5870
Tested-by: Nicolas Capens <nicolascapens@google.com>
Reviewed-by: Alexis Hétu <sugoi@google.com>
/external/swiftshader/src/Shader/VertexProgram.cpp
708c24b3cd03b68aa98b29a9099d6a9ce96eca16 26-Oct-2017 Nicolas Capens <capn@google.com> Use more explicit include paths.

This helps clarify dependencies and simplifies include paths.

Bug swiftshader:86

Change-Id: I564ee420bb9029fa6428e49b63a86d633301bec2
Reviewed-on: https://swiftshader-review.googlesource.com/13288
Tested-by: Nicolas Capens <nicolascapens@google.com>
Reviewed-by: Alexis Hétu <sugoi@google.com>
Reviewed-by: Nicolas Capens <nicolascapens@google.com>
/external/swiftshader/src/Shader/VertexProgram.cpp
877ddfc51400030afd2804a23b132ed87a2f8d2f 25-Jul-2017 Alexis Hetu <sugoi@google.com> gl_VertexID implementation

This cl implements support for gl_VertexID.

Passes the functional.shaders.builtin_variable.vertex_id test.

Change-Id: I5550e3ecba30e29f1e38ace608d730833a1e9598
Reviewed-on: https://swiftshader-review.googlesource.com/10958
Tested-by: Alexis Hétu <sugoi@google.com>
Reviewed-by: Nicolas Capens <nicolascapens@google.com>
/external/swiftshader/src/Shader/VertexProgram.cpp
b98fe5cd1eaa821083d816cf86a20eefe22f57c7 09-Nov-2016 Nicolas Capens <capn@google.com> 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>
/external/swiftshader/src/Shader/VertexProgram.cpp
1933654b62251805d4575b05b6829275b0fe6142 26-Sep-2016 Nicolas Capens <capn@google.com> Abstract llvm::Value usage.

Bug swiftshader:10

Change-Id: Ide80a6d97f67ae04d9118307984235f8f4c2e3ad
Reviewed-on: https://swiftshader-review.googlesource.com/7277
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
c8b67a48e64ca05fbecfcd9990d16e1cb68a9578 25-Sep-2016 Nicolas Capens <capn@google.com> Abstract llvm::BasicBlock usage.

Bug swiftshader:10

Change-Id: Ib45d459aa4f68e572b1deaa03e0aaf83002b7881
Reviewed-on: https://swiftshader-review.googlesource.com/7275
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
32980acb4092207c3fa5601002f89765941ece47 15-Aug-2016 Nicolas Capens <capn@google.com> Fix indexing with instance ID.

BUG=swiftshader:3

Change-Id: I070059f3b4e9e431c7667b98017912b72d9d66a4
Reviewed-on: https://swiftshader-review.googlesource.com/6952
Tested-by: Nicolas Capens <capn@google.com>
Reviewed-by: Nicolas Capens <capn@google.com>
/external/swiftshader/src/Shader/VertexProgram.cpp
24f454e25c47452bbeaeab4175865b706e9ab03a 31-Aug-2016 Alexis Hetu <sugoi@google.com> Renaming functions named after operator names

Windows clang has no option to do anything similar to
"-fno-operator-names", so it generates errors without
any way to silence them. Renaming these functions is
easy enough, so it was done here. Also removed the
now useless flag from the code blocks project files.

Change-Id: I9e25e25a72bf24567e3be928e07b187df87398bc
Reviewed-on: https://swiftshader-review.googlesource.com/7051
Tested-by: Alexis Hétu <sugoi@google.com>
Reviewed-by: Nicolas Capens <capn@google.com>
/external/swiftshader/src/Shader/VertexProgram.cpp
02ad0aa756ab6cbfb6ca00b98ac6793536ff9820 02-Aug-2016 Alexis Hetu <sugoi@google.com> Shader cleanup

A couple of class members from PixelShader and VertexShader
were still public. Fixed that in this cleanup.

Change-Id: I2dfaac7fd4cecdc791f1ef7236148e74c4b5b486
Reviewed-on: https://swiftshader-review.googlesource.com/5850
Tested-by: Alexis Hétu <sugoi@google.com>
Reviewed-by: Nicolas Capens <capn@google.com>
/external/swiftshader/src/Shader/VertexProgram.cpp
a3c16e400836236a8c6dacd0e504f3bbc0d6b886 15-Jun-2016 Nicolas Capens <capn@google.com> Combine sampler method and option into a structure.

Change-Id: Ie3caecf275ffb51fbd512560cb66fcf2a32b3bbe
Reviewed-on: https://swiftshader-review.googlesource.com/5595
Tested-by: Nicolas Capens <capn@google.com>
Reviewed-by: Meng-Lin Wu <marleymoo@google.com>
Tested-by: Meng-Lin Wu <marleymoo@google.com>
Reviewed-by: Nicolas Capens <capn@google.com>
/external/swiftshader/src/Shader/VertexProgram.cpp
9d62c486034d107ed778e061760be668ba47e026 14-Jun-2016 Meng-Lin Wu <marleymoo@google.com> Pack texelFetch LOD as sampling coordinate's w component.

One less argument is emitted.

Vertex/PixelProgram sampleTexture function signature simplified.

Change-Id: I7aef3eb100ccb51a8bd9d5fd600c73b4843d30d9
Reviewed-on: https://swiftshader-review.googlesource.com/5600
Tested-by: Meng-Lin Wu <marleymoo@google.com>
Reviewed-by: Alexis Hétu <sugoi@google.com>
Reviewed-by: Nicolas Capens <capn@google.com>
/external/swiftshader/src/Shader/VertexProgram.cpp
265fd864a5a1eb31095f5315a3e8498de69d7135 14-Jun-2016 Nicolas Capens <capn@google.com> Fix Clang compilation.

non-const lvalue reference cannot bind to a temporary.

Change-Id: I561cc8cfcedace6aab949e6e496203f39af77e2e
Reviewed-on: https://swiftshader-review.googlesource.com/5594
Reviewed-by: Nicolas Capens <capn@google.com>
Tested-by: Nicolas Capens <capn@google.com>
/external/swiftshader/src/Shader/VertexProgram.cpp
2fce5821757ec686a837035cf0decba9039fdfb0 07-Jun-2016 Meng-Lin Wu <marleymoo@google.com> texelFetch implementation

Passes all texelFetch and texelFetchOffset tests in dEQP.

Change-Id: Ic212d326d1c062f1947696e6963fef300b7737f1
Reviewed-on: https://swiftshader-review.googlesource.com/5512
Tested-by: Meng-Lin Wu <marleymoo@google.com>
Reviewed-by: Nicolas Capens <capn@google.com>
/external/swiftshader/src/Shader/VertexProgram.cpp
95ac1874dbdc4db63ff18279a1f8590d4b10b647 06-Jun-2016 Alexis Hetu <sugoi@google.com> LOD Base level and Max level to sampler state

Plumbing to send the LOD base level and max level from the Sampler
object in the Context to the Renderer's texture's state.

Change-Id: I5a9571f58a0cbaea8cedfb98da159672673eed94
Reviewed-on: https://swiftshader-review.googlesource.com/5501
Tested-by: Alexis Hétu <sugoi@google.com>
Reviewed-by: Nicolas Capens <capn@google.com>
/external/swiftshader/src/Shader/VertexProgram.cpp
9f7d5621a0e619df5780d1a29b6e751eb43e409b 02-Jun-2016 Alexis Hetu <sugoi@google.com> Texture size fix

I looked into the texture size issue and I removed the " + Int(1)"
used on the LOD and replaced it with "baseLevel", which I think makes
more sense. Without the "+1", some tests using baseLevel==1 fail, but
all tests pass when I use "+baseLevel". I'm not 100% sure why the
"+1" wasn't making tests that were using baseLevel==0 fail.

Note that, for now, the new Sampler::State "baseLevel" member will
always be 0, as the code to set it hasn't landed yet and will be in
another cl.

Change-Id: I8532bb7009abcc15e03416489f1d25027e336457
Reviewed-on: https://swiftshader-review.googlesource.com/5471
Tested-by: Alexis Hétu <sugoi@google.com>
Reviewed-by: Nicolas Capens <capn@google.com>
/external/swiftshader/src/Shader/VertexProgram.cpp
2337a192aa163b1076ba768e414c5fe27f1a9143 01-Jun-2016 Meng-Lin Wu <marleymoo@google.com> texoffset implementation

Related deqp tests:
textureoffset
textureprojoffset
texturelodoffset
textureprojlodoffset
texturegradoffset
textureprojgradoffset

Change-Id: Id83abe3f24ec789345a9ce7dcf6e146e2410da3b
Reviewed-on: https://swiftshader-review.googlesource.com/5451
Reviewed-by: Nicolas Capens <capn@google.com>
Tested-by: Nicolas Capens <capn@google.com>
/external/swiftshader/src/Shader/VertexProgram.cpp
234c9a9e3fb0f39c2eed8e5cf60de744417e8a09 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
ec0936c46c22cfaa1d496749dfcd7c235dca825c 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
995ddeae528ffa617a1f0bdc377f96c25a7e3887 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
9aa83a93a06e1cf09547716d92f3ca82010dcf43 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
0bac285a78df6a6d7a6b68784748b92805420ffb 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
2ff2948b730812543a6d0702377084c472e3404d 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
ffb35eb4ab1b99c9bb6583c39211386fa577ef02 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
9cde974d985eaa5c76ceb832e59fa54939050f5d 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
c2534f4bc37baf48d9910d3691352ff83e3bea49 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
0f4480780a2bfad69cece5fd9cabd1bf89f7393e 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
48be735fa7eb1e2684a631cc4270a4503c7d235a 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
2c2a7b29cd53cb7b06ef1b1e2177a8c90e6e0128 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
7551ac6868ec1dc3965a00ff0a2003adbb2018d5 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
907700d11aff5aebfbe7d003a236500109c73d49 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
b4fb367887d4f257b20be509b8abd3ccb3a23a5a 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
705890809161b90fda7743a0c374ba128edc5e8b 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
028f41ba4d7b96e4281d69183ded014b69ab7c2c 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
5d96188b9c35bf896c25755e4eb97d09dcf3bed7 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
25d47fc9eb8e8aaf864fab0d6aa7305d034d807b 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