History log of /external/swiftshader/src/Shader/Shader.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/Shader.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/Shader.cpp
6953d4a17d805a6dd1c0cd7acfbd95e703c3e315 06-Jan-2018 Nicolas Capens <capn@google.com> Fix loops with dynamic iteration count.

The 'enable' execution mask for if/else, which is also used by loops,
was not being applied to predicate the instructions within a loop.

Bug b/28710510

Change-Id: Ibd8e962ef60de76ec1c018ca064a791abf214c94
Reviewed-on: https://swiftshader-review.googlesource.com/15948
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/Shader.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/Shader.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/Shader.cpp
bf3fc254f96e60ff38e55496c27ba057787a8e9c 06-Dec-2017 Alexis Hetu <sugoi@google.com> Minor C++11 code cleanup

Used range-based for loop where it was trivial to do so.
This change should be noop in terms of functionality.

Change-Id: I3d692cc2706f35f5b710e7539fa084365cf28af1
Reviewed-on: https://swiftshader-review.googlesource.com/14628
Tested-by: Alexis Hétu <sugoi@google.com>
Reviewed-by: Nicolas Capens <nicolascapens@google.com>
/external/swiftshader/src/Shader/Shader.cpp
a4f0c8967216d1dfe3b48128f3b9733d9b25b754 15-Nov-2017 Nicolas Capens <capn@google.com> Print uniform buffer registers as cb#[index].

This matches Shader Model 4+ assembly syntax and helps debug shader
compilation issues.

Change-Id: Iff2a2991794e13476b99e11d6ac07fdf5d37570b
Reviewed-on: https://swiftshader-review.googlesource.com/13928
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/Shader.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/Shader.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/Shader.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/Shader.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/Shader.cpp
0f20653759521be0e9a87579104ce04834495305 04-May-2017 Nicolas Capens <capn@google.com> Fixed -1 to implicitly unsigned char narrowing error.

C++11 does not allow narrowing a constant expression value to a type
that can't fully represent it. So when char is considered unsigned,
we can't store -1 in it. Explicitly using signed char fixes it.

Change-Id: I5c0e9fe0025659e06291655a12220ab589d5f5bd
Reviewed-on: https://swiftshader-review.googlesource.com/9630
Reviewed-by: Corentin Wallez <cwallez@google.com>
Reviewed-by: Nicolas Capens <capn@google.com>
Tested-by: Nicolas Capens <capn@google.com>
/external/swiftshader/src/Shader/Shader.cpp
cd74a5a4d4e70cef01c6ae375757c3aaf78d8513 22-Apr-2016 Nicolas Capens <capn@google.com> Fix predicating instructions before return in loops.

Only the instructions following a return statement were being marked as
affected by it so predication would be applied. But in a loop the instructions
above the return statement are also affected by it.

Bug b/25220690

Change-Id: If2490a6e0b4e9cf8b6e28b33cbbbcec8b4ebfdaa
Reviewed-on: https://swiftshader-review.googlesource.com/5183
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/Shader.cpp
1d672448bff04f493a553eed4181ed5e97ab5891 23-Jun-2016 Alexis Hetu <sugoi@google.com> Fixed Windows warnings

- Removed unused variables
- Removed unreachable code
- Fixed size_t <-> int conversions
- Fixed uninitialized variables

Change-Id: Ifc3912e92b8f0710094e939bd0da4757148b559a
Reviewed-on: https://swiftshader-review.googlesource.com/5681
Tested-by: Alexis Hétu <sugoi@google.com>
Reviewed-by: Nicolas Capens <capn@google.com>
/external/swiftshader/src/Shader/Shader.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/Shader.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/Shader.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/Shader.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/Shader.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/Shader.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/Shader.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/Shader.cpp
b69aa273c4caf7460a81bd3205b2b92380b836b0 02-Jan-2016 Nicolas Capens <capn@google.com> Add default switch cases.

Bug 15387371

Change-Id: I97644bfd9dbdc1109630199bc897f8b2572d5e83
Reviewed-on: https://swiftshader-review.googlesource.com/4502
Reviewed-by: Alexis Hétu <sugoi@google.com>
Reviewed-by: Nicolas Capens <capn@google.com>
Tested-by: Nicolas Capens <capn@google.com>
/external/swiftshader/src/Shader/Shader.cpp
8833e016dca246e1aecf36e2ccdd4178849ddbb6 02-Jan-2016 Nicolas Capens <capn@google.com> Fix potentially uninitialized variables.

Bug 15387371

Change-Id: Ie0486feeebc6e4bceba148bea69f2d1ee1d1ffd8
Reviewed-on: https://swiftshader-review.googlesource.com/4499
Reviewed-by: Alexis Hétu <sugoi@google.com>
Reviewed-by: Nicolas Capens <capn@google.com>
Tested-by: Nicolas Capens <capn@google.com>
/external/swiftshader/src/Shader/Shader.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/Shader.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/Shader.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/Shader.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/Shader.cpp
c4b57f53c63ca6ffeff9224ec374cf90c4ade3eb 18-Aug-2015 Alexis Hetu <sugoi@google.com> New opcodes for integer operations

Opcodes for soon to be added integer operations such as:
- Conversions to/from float
- Negate
- Comparison
- Add, Sub, Mul, Div, Mod
- Left Shift, Right Shift
- Min, Max

Change-Id: I16af0423fdb210a558ad293e0e043176bde1c9ee
Reviewed-on: https://swiftshader-review.googlesource.com/3889
Tested-by: Alexis Hétu <sugoi@google.com>
Reviewed-by: Nicolas Capens <capn@google.com>
/external/swiftshader/src/Shader/Shader.cpp
399acb8954e634bfc6705293927deac82f36b974 23-Jun-2015 Alexis Hetu <sugoi@google.com> Fixed crash using uniforms as indices

Uniforms can now legally be used as indices in
OpenGL ES 3.0, so they now have to be handled
properly in the dynamic indexing analysis.

Change-Id: I971aa55edcbc73796c30e0acc99156b513a78b80
Reviewed-on: https://swiftshader-review.googlesource.com/3550
Tested-by: Alexis Hétu <sugoi@google.com>
Reviewed-by: Nicolas Capens <capn@google.com>
/external/swiftshader/src/Shader/Shader.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/Shader.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/Shader.cpp
4cb1124e6fe6c8378450104f1026cc1f86738f87 25-Nov-2014 Alexis Hetu <sugoi@google.com> Fixed Fractal shader

The issue was with continue and break, where a previous loop was
decrementing the breakDepth/continueDepth before we started
incrementing it.

BUG=18069149

Change-Id: I39fa9c07ea373cd9dab4997bfb8a9e621bf48b29
Reviewed-on: https://swiftshader-review.googlesource.com/1473
Tested-by: Alexis Hétu <sugoi@google.com>
Reviewed-by: Nicolas Capens <nicolascapens@google.com>
/external/swiftshader/src/Shader/Shader.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/Shader.cpp
8dcce86d28f3823401ab5137cf38a3a332860940 13-Nov-2014 Alexis Hetu <sugoi@google.com> More warnings fixed

Fixed warnings related to type conversions leading to potential loss of precision.

BUG=18368388

Change-Id: I71a7941df4bcf991f04818060780d4d395e335a9
Reviewed-on: https://swiftshader-review.googlesource.com/1393
Tested-by: Alexis Hétu <sugoi@google.com>
Reviewed-by: Nicolas Capens <nicolascapens@google.com>
/external/swiftshader/src/Shader/Shader.cpp
c6e8ab13ecf20217229de8f4f19a14bbc18778f9 07-May-2014 Nicolas Capens <capn@google.com> Only apply the enable mask on instructions requiring predication.
/external/swiftshader/src/Shader/Shader.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/Shader.cpp
66b8ab22586debccb1f787d4d52b7f042d4ddeb8 06-May-2014 John Bauman <jbauman@google.com> Add SwiftShader dump from Feb 6 2013
/external/swiftshader/src/Shader/Shader.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/Shader.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/Shader.cpp