History log of /external/swiftshader/src/OpenGL/compiler/OutputASM.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/OpenGL/compiler/OutputASM.cpp
3c1d6cf226aa633df7d3388d6f7a26f5bb68ac64 06-Feb-2018 Alexis Hetu <sugoi@google.com> Fragment output fix

Allow not specifying a fragment output location.

Change-Id: I76c6e6efdff3161586f5d5422e97731969b9396c
Reviewed-on: https://swiftshader-review.googlesource.com/17028
Tested-by: Alexis Hétu <sugoi@google.com>
Reviewed-by: Nicolas Capens <nicolascapens@google.com>
/external/swiftshader/src/OpenGL/compiler/OutputASM.cpp
bb2bcae3b81f456ea9479d5af36e6d1784f0b1e0 05-Feb-2018 Nicolas Capens <capn@google.com> In-class initialize all TType members.

Also remove default constructors and unused members.

Bug chromium:801648

Change-Id: I822ca1e1569708ca661796ee9252bae68a0a284a
Reviewed-on: https://swiftshader-review.googlesource.com/16948
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/OpenGL/compiler/OutputASM.cpp
17e2e2f2c76c9681bf877c48d234e95888bd6041 05-Feb-2018 Alexis Hetu <sugoi@google.com> Fragment output location fix

The previous fix wasn't handling the case where the same fragment
output variable would go through declareFragmentOutput() multiple
times, so this cl fixes it.

Fixes all dEQP-GLES3.functional.shaders.random failures.
Still fixes original WebGL2 conformance tests failures in:
all/deqp/functional/gles3/fragmentoutput

Change-Id: Ia9c4f5ed5c444ab0c020cac8be511fcaad23c55d
Reviewed-on: https://swiftshader-review.googlesource.com/16928
Tested-by: Alexis Hétu <sugoi@google.com>
Reviewed-by: Nicolas Capens <nicolascapens@google.com>
/external/swiftshader/src/OpenGL/compiler/OutputASM.cpp
a02f8b1e0a78e4ac75caa96bf2125fdd798908f1 01-Feb-2018 Alexis Hetu <sugoi@google.com> Fixed warnings treated as errors

Change-Id: I19de1f5e4e8a690afed2ac7fb2050659a90fa670
Reviewed-on: https://swiftshader-review.googlesource.com/16848
Reviewed-by: Alexis Hétu <sugoi@google.com>
Tested-by: Alexis Hétu <sugoi@google.com>
/external/swiftshader/src/OpenGL/compiler/OutputASM.cpp
3833861c3a164ab566450b6068996bf70f77b2f7 18-Jan-2018 Alexis Hetu <sugoi@google.com> Construct non matrices from matrix in GLSL

GLSL supports constructing vectors from matrices. In the case
of vec3(mat2), vec4(mat2) or vec4(mat3), a second instruction
is required to copy the remaining matrix elements from the
2nd row of the matrix into the rest of the vector.

Fixes 6 webgl conformance tests:
conformance/glsl/constructors/glsl-construct-vec3.html
conformance/glsl/constructors/glsl-construct-vec4.html
conformance/glsl/constructors/glsl-construct-ivec3.html
conformance/glsl/constructors/glsl-construct-ivec4.html
conformance/glsl/constructors/glsl-construct-bvec3.html
conformance/glsl/constructors/glsl-construct-bvec4.html

Change-Id: I85ffd3b60623d0dce2bd7c0027748e1829a27dbc
Reviewed-on: https://swiftshader-review.googlesource.com/16469
Tested-by: Alexis Hétu <sugoi@google.com>
Reviewed-by: Nicolas Capens <nicolascapens@google.com>
Reviewed-by: Alexis Hétu <sugoi@google.com>
/external/swiftshader/src/OpenGL/compiler/OutputASM.cpp
d274253263f29e8c30af5685350cecc7051a3747 23-Jan-2018 Alexis Hetu <sugoi@google.com> Row major matrix packing fix

Row major matrix packing wasn't properly detected when the layout
qualifier was on the block member rather than on the block itself
or when a nested structure had a matrix packing qualifier.

Fixes all failing tests in:
deqp/functional/gles3/uniformbuffers*

No regressions in:
dEQP-GLES3.functional.ubo*

Change-Id: I1549a70c4286a8a84b695bc876d71d9cf636b306
Reviewed-on: https://swiftshader-review.googlesource.com/16588
Tested-by: Alexis Hétu <sugoi@google.com>
Reviewed-by: Nicolas Capens <nicolascapens@google.com>
/external/swiftshader/src/OpenGL/compiler/OutputASM.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/OpenGL/compiler/OutputASM.cpp
930df97594b2da86a42ef12374afedf0832dc087 30-Jan-2018 Alexis Hetu <sugoi@google.com> Support for fragment output location

Fragment output layout qualifiers may contain location,
which was currently ignored by SwiftShader. Pre-declared
fragment outputs that have a valid location at the correct
location within the fragmentOutputs array to solve this.

Fixes all failures in WebGL 2 tests:
all/deqp/functional/gles3/fragmentoutput/*

Change-Id: I30e004449fb90713984b3481abb24c5d0cd6e867
Reviewed-on: https://swiftshader-review.googlesource.com/16788
Tested-by: Alexis Hétu <sugoi@google.com>
Reviewed-by: Nicolas Capens <nicolascapens@google.com>
/external/swiftshader/src/OpenGL/compiler/OutputASM.cpp
c4711fa59234ca83c2c46c4c7e4467302088d395 12-Jan-2018 Alexis Hetu <sugoi@google.com> GLSL mix implementation

Added mix implementation with a bvec as a 3rd argument,
which is basically a select.

Fixes 18 failures in dEQP-GLES3.

Change-Id: Ifaf4a27e1a25fbaad979a7d26ad4a424631acd08
Reviewed-on: https://swiftshader-review.googlesource.com/16288
Tested-by: Alexis Hétu <sugoi@google.com>
Reviewed-by: Nicolas Capens <nicolascapens@google.com>
/external/swiftshader/src/OpenGL/compiler/OutputASM.cpp
6896e35cdb634d1b6a19f40d8830d4c196140839 10-Jan-2018 Nicolas Capens <capn@google.com> Fix validation of statically referenced varyings.

Varyings and in/out variables that are passed between shader pipeline
stages are verified to have matching types at link-time, even when only
statically referenced (this includes trivially optimized out branches)
or even just declared.

GLSL ES 3.00 - 4.3.10 Linking of Vertex Outputs and Fragment Inputs

Change-Id: I122b1cdcc4630c86a8ebfb4d4e37f3a7a335afbe
Reviewed-on: https://swiftshader-review.googlesource.com/16070
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/OpenGL/compiler/OutputASM.cpp
924513cdde1271f47353b7945480ad2fb8100bb4 05-Jan-2018 Alexis Hetu <sugoi@google.com> Structure field type validation

Uniforms and varyings structures were simply validating
that both versions in fragment and vertex shaders were
structures, without validating that the fields actually
matched.

All the structures and data required to perform the
validation at link time was added.

Fixes:
dEQP-GLES3.functional.shaders.linkage.uniform.struct.type_conflict_1

Change-Id: Icbf888bbebf4ccf7d27f48cb98d4cd7ea5b42ca3
Reviewed-on: https://swiftshader-review.googlesource.com/15848
Tested-by: Alexis Hétu <sugoi@google.com>
Reviewed-by: Nicolas Capens <nicolascapens@google.com>
/external/swiftshader/src/OpenGL/compiler/OutputASM.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/OpenGL/compiler/OutputASM.cpp
bc648b9e4c6f39491dd1a04631bf2306177b3aaa 04-Jan-2018 Alexis Hetu <sugoi@google.com> Error messages for uniform block validation

Many error messages related to uniform block validation were missing,
so there was no output message when linking failed.
Also, the rowMajor validation was missing and was also not set properly
when individual block members were overriding this layout qualifier.

Fixes:
dEQP-GLES3.functional.shaders.linkage.uniform.block.layout_qualifier_mismatch_5

Change-Id: I97309c3ead6e541d6cd9054ecfd29d08206de7da
Reviewed-on: https://swiftshader-review.googlesource.com/15808
Tested-by: Alexis Hétu <sugoi@google.com>
Reviewed-by: Nicolas Capens <nicolascapens@google.com>
/external/swiftshader/src/OpenGL/compiler/OutputASM.cpp
743913c145618f8aa377bf0623beb5080961aba0 04-Jan-2018 Alexis Hetu <sugoi@google.com> Varying interpolation qualifier check

Made sure varyings had the same interpolation qualifier in fragment
shader and vertex shader (either both flat or both smooth ).

Fixes:
dEQP-GLES3.functional.shaders.linkage.varying.rules.interpolation_mismatch_1

Change-Id: I7f68490dc19a3365e492b666acda6f5db91d10ab
Reviewed-on: https://swiftshader-review.googlesource.com/15768
Tested-by: Alexis Hétu <sugoi@google.com>
Reviewed-by: Nicolas Capens <nicolascapens@google.com>
/external/swiftshader/src/OpenGL/compiler/OutputASM.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/OpenGL/compiler/OutputASM.cpp
7cbb1de26de993b59381f9752c04cd55951fc645 22-Dec-2017 Nicolas Capens <capn@google.com> Implement support for arrays of constants.

Arrays of constants can be dynamically indexed, so they can't be
propagated by value and handled as literals like other constants.
Instead we store them in the constant register file.

Change-Id: Idcee033d694b20d047c70e2d13974e5a6dce127b
Reviewed-on: https://swiftshader-review.googlesource.com/15488
Tested-by: Nicolas Capens <nicolascapens@google.com>
Reviewed-by: Alexis Hétu <sugoi@google.com>
/external/swiftshader/src/OpenGL/compiler/OutputASM.cpp
d469de2d10e7d0035b93cf976ecd59dca66d9ef8 16-Nov-2017 Nicolas Capens <capn@google.com> Reduce temporaries used during rvalue evaluation.

This optimizes evaluation of chained indexing operations by first
looking for an lvalue 'root' node and copying from it directly into the
topmost rvalue, instead of creating potentially many temporaries.

Change-Id: I47cf9b0230bd305695e7b2a44ddc44bc1320b764
Reviewed-on: https://swiftshader-review.googlesource.com/13908
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/OpenGL/compiler/OutputASM.cpp
3ae571eda128f994413c1d1e780ca8937e93699c 16-Nov-2017 Nicolas Capens <capn@google.com> Fix taking the index into account for write mask.

Change-Id: I25251e94680624c8c85698e96a053f518bb2c367
Reviewed-on: https://swiftshader-review.googlesource.com/13968
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/OpenGL/compiler/OutputASM.cpp
6986b28f1859fc5b54ed49a9369b18ebf23fb248 16-Nov-2017 Nicolas Capens <capn@google.com> Reduce lifetime of address temporary.

After traversing the lvalue node tree we're fully done computing the
relative address and emitting any pointer arithmetic that might have
been needed. So the temporary that would have been used for that is no
longer needed.

Change-Id: I0a10bff979128f03544d0f8aa860c29f8867973a
Reviewed-on: https://swiftshader-review.googlesource.com/13948
Tested-by: Nicolas Capens <nicolascapens@google.com>
Reviewed-by: Alexis Hétu <sugoi@google.com>
/external/swiftshader/src/OpenGL/compiler/OutputASM.cpp
0530b456e024f8bd0358ba9cbaf0b2c8ce5f778a 15-Nov-2017 Nicolas Capens <capn@google.com> Refactor lvalue() to return the root node.

This will enable reusing it to determine the root node of rvalues as
well. The only functional change is that struct indexing no longer
overrides the register type. This is of no effect here since lvalue
intermediates already inherited their type from the root node, but for
rvalues the intermediates are considered temporary registers, while
instead the root's type should be used.

Change-Id: I2dbd1b0f8886c3f111a2ed3ef7fe4e9a5b480085
Reviewed-on: https://swiftshader-review.googlesource.com/13930
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/OpenGL/compiler/OutputASM.cpp
84249fde93e6c45e7e31ca2d641b3ac09d3e6c5c 09-Nov-2017 Nicolas Capens <capn@google.com> Don't needlessly traverse the left hand side of assignments.

Previously we processed assignments in PostVisit, i.e. after both the
left and right side had been traversed. This produces temporaries for
the left hand side, which we don't use since we want to assign to the
lvalue. So instead we can explicitly traverse the right hand side, and
for the left hand side only traverse indirect indexing expressions.

Change-Id: I9ec0596a9c256921b65a9f70428d950959f66aa0
Reviewed-on: https://swiftshader-review.googlesource.com/13630
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/OpenGL/compiler/OutputASM.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/OpenGL/compiler/OutputASM.cpp
929c6b00b1a732dca359cf1c8c92670f58b599ef 07-Nov-2017 Alexis Hetu <sugoi@google.com> High precision implementation for sin/cos/tan

This implementation allows all dEQP precision test to pass
for sin, cos and tan function tests.

Change-Id: I33a24497dea68ab2de2e65931f50f2dd4298523c
Reviewed-on: https://swiftshader-review.googlesource.com/13555
Reviewed-by: Nicolas Capens <nicolascapens@google.com>
Tested-by: Alexis Hétu <sugoi@google.com>
/external/swiftshader/src/OpenGL/compiler/OutputASM.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/OpenGL/compiler/OutputASM.cpp
49351233859f99cdf4819a6fd1a67bec63709905 02-Nov-2017 Alexis Hetu <sugoi@google.com> Struct varyings implementation

Varying variables can be structure in OpenGL ES3.
This cl adds support for structure varyings.

Change-Id: I4d1d80c6afed0a86a23b0a467d4764a4e08f133d
Reviewed-on: https://swiftshader-review.googlesource.com/13529
Tested-by: Alexis Hétu <sugoi@google.com>
Reviewed-by: Nicolas Capens <nicolascapens@google.com>
/external/swiftshader/src/OpenGL/compiler/OutputASM.cpp
18e2a972fe701d4903bd74d96765f507872ac590 28-Jul-2017 Alexis Hetu <sugoi@google.com> GLSL bitwise NOT implementation

The bitwise NOT operation is supported for integer types in GLSL.
All the plumbing was already there, only the actual call was missing.

In dEQP, all shaders.operator.unary_operator.bitwise_not tests pass.

Change-Id: I938104b860441f6b2df6c807d578f651e5cd2516
Reviewed-on: https://swiftshader-review.googlesource.com/11108
Tested-by: Alexis Hétu <sugoi@google.com>
Reviewed-by: Nicolas Capens <nicolascapens@google.com>
/external/swiftshader/src/OpenGL/compiler/OutputASM.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/OpenGL/compiler/OutputASM.cpp
e3f0555026461583dd514b095cd30341844126be 24-May-2017 Nicolas Capens <capn@google.com> Implement unrolling of loops using > or >=.

Bug swiftshader:53

Change-Id: I20500e567e58ed29caa0a0ad9ad7884e66e96cb9
Reviewed-on: https://swiftshader-review.googlesource.com/9811
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/OpenGL/compiler/OutputASM.cpp
d0bfd91562ad116319fbc0b896d7e01f326aa9de 24-May-2017 Nicolas Capens <capn@google.com> Fix null dereference on uninitialized loop variable.

Bug swiftshader:52

Change-Id: I972c769551acf19898f10579685f45f3192612c4
Reviewed-on: https://swiftshader-review.googlesource.com/9810
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/OpenGL/compiler/OutputASM.cpp
fcb70fd8137dfeb24b44565a3fb7f136b6da5747 17-May-2017 Nicolas Capens <capn@google.com> Fix assert on using GLSL sampler function arguments.

Bug b/31651425

Change-Id: Ic6c1f16b1ec3ef039e15e72e70a1daee711fba2f
Reviewed-on: https://swiftshader-review.googlesource.com/9748
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/OpenGL/compiler/OutputASM.cpp
930b700acf0a59bee69364b3588100ea7aaaac95 06-Jan-2017 Nicolas Capens <capn@google.com> Fix determining the loop iteration count.

Bug b/34128224

Change-Id: I4aebcda840baa8ceef2ae99c98a80a83e32b89b3
Reviewed-on: https://swiftshader-review.googlesource.com/8376
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/OpenGL/compiler/OutputASM.cpp
8157d5ceaba0b537496a6cdf8b7bd4ad751c69af 04-Jan-2017 Nicolas Capens <capn@google.com> 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>
/external/swiftshader/src/OpenGL/compiler/OutputASM.cpp
e97a31e2ecef119a235e3ef474cc8d9e1395a532 14-Nov-2016 Alexis Hetu <sugoi@google.com> 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>
/external/swiftshader/src/OpenGL/compiler/OutputASM.cpp
2a19855f31c09354a149646da2a38e10ad95f7cb 28-Sep-2016 Alexis Hetu <sugoi@google.com> Fixed array constructors

Fixed first class array constructors by allowing basic type
arrays and structure arrays to be handled properly for the
EOpConstruct* operations.

This fixes all dEQP.functional.shaders.arrays.* tests.

Change-Id: I4fe99ec5256abf6483d3595890ba9c426abc97f8
Reviewed-on: https://swiftshader-review.googlesource.com/7351
Tested-by: Alexis Hétu <sugoi@google.com>
Reviewed-by: Nicolas Capens <capn@google.com>
/external/swiftshader/src/OpenGL/compiler/OutputASM.cpp
b7508b8e161a28789d54567020dcc46b97b5b2fc 22-Sep-2016 Alexis Hetu <sugoi@google.com> Fix for the remaining vertex array issues

Fixes all failures in dEQP.functional.vertex_arrays.*

In OpenGL ES 3.0, vertex attributes streams can be of a
different type from the vertex attribute in the shader.
For this reason, some conversion may be required. This
cl solves this issue by:
1) Sending the information about the vertex attribute's
type in the shader to the vertex routine.
2) Handling this information by adding conversion where
appropriate.

Change-Id: I04a5a34aea12684209e584aa5f15a3edfd57f956
Reviewed-on: https://swiftshader-review.googlesource.com/7254
Tested-by: Alexis Hétu <sugoi@google.com>
Reviewed-by: Nicolas Capens <capn@google.com>
/external/swiftshader/src/OpenGL/compiler/OutputASM.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/OpenGL/compiler/OutputASM.cpp
0484c799e713845e139ecc18dbd7d9134d9f361d 14-Jun-2016 Nicolas Capens <capn@google.com> Perform texture coordinate projection early.

Change-Id: Ia907ff073bf00114b2a3e72c495bf96c5a57154e
Reviewed-on: https://swiftshader-review.googlesource.com/5592
Tested-by: Nicolas Capens <capn@google.com>
Reviewed-by: Meng-Lin Wu <marleymoo@google.com>
Reviewed-by: Nicolas Capens <capn@google.com>
/external/swiftshader/src/OpenGL/compiler/OutputASM.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/OpenGL/compiler/OutputASM.cpp
5da2d3fcdf0941bc9c672a1947159f30037c0fb9 11-Jun-2016 Nicolas Capens <capn@google.com> Fix lvalue output parameter assignment.

Output parameters can be any kind of lvalue, such as struct members or
array elements.

Change-Id: I4dce9dddfa95f58275fe3f6a4acf55532330a8f7
Reviewed-on: https://swiftshader-review.googlesource.com/5570
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/OpenGL/compiler/OutputASM.cpp
7208e932c933a3b52c014e558c7f3f1d03dc80b2 02-Jun-2016 Alexis Hetu <sugoi@google.com> Moved or removed unused variables

Some variables were either unused or only used in certain contexts,
like debug or tracing, so these were either removed (when unused)
or moved to the right scope (when used conditionally).
Also fixed a string format warning and a missing case warning.

Change-Id: I2d130faa992b5dc06fb332d7404a8aebc7c121ef
Reviewed-on: https://swiftshader-review.googlesource.com/5462
Tested-by: Alexis Hétu <sugoi@google.com>
Reviewed-by: Nicolas Capens <capn@google.com>
/external/swiftshader/src/OpenGL/compiler/OutputASM.cpp
12b00506852b8f8dd472645198117456774e6e5a 20-May-2016 Alexis Hetu <sugoi@google.com> Implement flat interpolation qualifier support.

By default vertex shader outputs/fragment shader inputs are
smoothly interpolated. The 'flat' keyword can be used to change
the interpolation to "flat", which basically means that no
interpolation is performed. "flat" is the only interpolation
qualifier accepted for integer types.

This change fixes all shaders/precision dEQP tests as well as a
few fragment output integer format types related tests.

Change-Id: Ic64b0ec40c705d885c255b3b671cf7460965dfee
Reviewed-on: https://swiftshader-review.googlesource.com/5390
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/OpenGL/compiler/OutputASM.cpp
7be70cf98f4f7f0159a73f6b9c3b3e74739b2774 11-May-2016 Alexis Hetu <sugoi@google.com> Loop count crash fixed

The loopCount function was expecting the left side of a binary op
to always be a symbol, which isn't necessarily the case, so a null
pointer check was added to prevent the crash.

Change-Id: I1fe6626bf52ecbb05664d1d2fa18f7ed830a7ee6
Reviewed-on: https://swiftshader-review.googlesource.com/5344
Tested-by: Alexis Hétu <sugoi@google.com>
Reviewed-by: Nicolas Capens <capn@google.com>
/external/swiftshader/src/OpenGL/compiler/OutputASM.cpp
f0aef1a4e9c5c517dc1b2b37abd25bc45c93df6f 18-May-2016 Nicolas Capens <capn@google.com> Make the number of vertex inputs configurable.

Change-Id: Ic078acae24dd2b2361a32498b49238b98e0ac0d1
Reviewed-on: https://swiftshader-review.googlesource.com/5386
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/OpenGL/compiler/OutputASM.cpp
3b4c93fea93733b5ab29902ce2b3c864e40d156c 18-May-2016 Nicolas Capens <capn@google.com> Make the number of fragment inputs configurable.

Change-Id: I2c618c03d00718951907e81fcd600155751aac89
Reviewed-on: https://swiftshader-review.googlesource.com/5385
Reviewed-by: Nicolas Capens <capn@google.com>
Tested-by: Nicolas Capens <capn@google.com>
/external/swiftshader/src/OpenGL/compiler/OutputASM.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/OpenGL/compiler/OutputASM.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/OpenGL/compiler/OutputASM.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/OpenGL/compiler/OutputASM.cpp
7d6b34d25534f6d65d3ae5340d8692bf10cfe767 03-May-2016 Alexis Hetu <sugoi@google.com> modf implementation

Implemented modf as trunc + sub
Passes all related dEQP tests

Change-Id: I43656c51a670d235153e5fac390a8db311b14f8d
Reviewed-on: https://swiftshader-review.googlesource.com/5280
Tested-by: Alexis Hétu <sugoi@google.com>
Reviewed-by: Nicolas Capens <capn@google.com>
/external/swiftshader/src/OpenGL/compiler/OutputASM.cpp
c431041d283c7c3fad218c02999db266bcd6d58b 29-Apr-2016 Nicolas Capens <capn@google.com> Fix sampler-array-using-loop-index.html regression.

Change-Id: I1d1a716bd9bd5b636c5b263a7094ff13ac9aa549
Reviewed-on: https://swiftshader-review.googlesource.com/5260
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/OpenGL/compiler/OutputASM.cpp
5c26c290d8aea3fdad52dc93299f5ddc89d5bc47 26-Apr-2016 Nicolas Capens <capn@google.com> Fix indexing of samplers in structures.

Change-Id: I0bde678865902d549d4260bf8f6c1a368a46f4d4
Reviewed-on: https://swiftshader-review.googlesource.com/5191
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/OpenGL/compiler/OutputASM.cpp
de16ffd08c1f851cab41db47d6429f5532d9c1fe 27-Apr-2016 Alexis Hetu <sugoi@google.com> Texture projection constant folding

Whenever texture projection is used with a constant texture
coordinate, folding allows to use the full precision reciprocal
and not generate the lower precision reciprocal operation.

Change-Id: I6cab6567d63ecd9abe1cedbd7e46e1fd9099a3d3
Reviewed-on: https://swiftshader-review.googlesource.com/5210
Tested-by: Alexis Hétu <sugoi@google.com>
Reviewed-by: Nicolas Capens <capn@google.com>
/external/swiftshader/src/OpenGL/compiler/OutputASM.cpp
cce6c4e16fa044c3cf02a7f61660d252ce251ed9 22-Apr-2016 Nicolas Capens <capn@google.com> Fix unrolling loops with return statements.

Change-Id: I8974a6bb4137d1dfad9f5dd3a92cc9306c38294c
Reviewed-on: https://swiftshader-review.googlesource.com/5184
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/OpenGL/compiler/OutputASM.cpp
ab752790e2502e966713359f97b76571253f7aaf 21-Apr-2016 Alexis Hetu <sugoi@google.com> Making proper use of size_t

In a lot of cases, int was being used instead of size_to represent
sizes. That led to some warnings about inconsistencies between int
and size_t usage. While this cl doesn't solve all warnings, it tries
to use size_t and int where it should be appropriate to use them.

Change-Id: Id760df1360f65b2bba60f4075cdf4954fc6bbaf3
Reviewed-on: https://swiftshader-review.googlesource.com/5177
Reviewed-by: Alexis Hétu <sugoi@google.com>
Reviewed-by: Nicolas Capens <capn@google.com>
Tested-by: Alexis Hétu <sugoi@google.com>
/external/swiftshader/src/OpenGL/compiler/OutputASM.cpp
8b124c10248597cfecd21f7bf385900152467dad 18-Apr-2016 Nicolas Capens <capn@google.com> Implement broadcasting of gl_FragColor.

Bug 19353282

Change-Id: I4319ad1836de36cc4b91b04ed226f925f82013ee
Reviewed-on: https://swiftshader-review.googlesource.com/5145
Reviewed-by: Alexis Hétu <sugoi@google.com>
Tested-by: Nicolas Capens <capn@google.com>
Reviewed-by: Nicolas Capens <capn@google.com>
/external/swiftshader/src/OpenGL/compiler/OutputASM.cpp
6edaa888332143b77d02793834b911bd7914d978 18-Apr-2016 Alexis Hetu <sugoi@google.com> Fixed bad assert

UInt <-> Int conversions are noop (bitwise), so it's allowed
to simply perform a move operation in that case.

Change-Id: I2078b2cf2933f5ced25b8ea81933e543a017faaf
Reviewed-on: https://swiftshader-review.googlesource.com/5143
Tested-by: Alexis Hétu <sugoi@google.com>
Reviewed-by: Nicolas Capens <capn@google.com>
/external/swiftshader/src/OpenGL/compiler/OutputASM.cpp
0863f0df08c859d5966e809073046e9dab1cde6e 10-Apr-2016 Nicolas Capens <capn@google.com> Handle constant expressions that have not been constant folded.

Change-Id: I7dd1e6db9a4cee64cb10fb27373d77038b2af63e
Reviewed-on: https://swiftshader-review.googlesource.com/5078
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/OpenGL/compiler/OutputASM.cpp
3a7b29cebace5ff9f077ef5087685bbdb1014664 07-Apr-2016 Alexis Hetu <sugoi@google.com> Uniform block register allocation

Uniform blocks members, when unnamed blocks are used, are
used in glsl only with the member's name, without any
reference to the block itself. When this happens, we still
need the whole block to be allocated as one contiguous
structure in the registers. To do that, whenever a member
of an unnamed block is first used, the whole block is
allocated. Also, whenever any member of an unnamed block
attempts to allocate a register, it first verifies if the
parent block has already been allocated. So this means that
both allocation and lookup must be done through the parent
block when dealing with unnamed block members.

Change-Id: Ib11eaa1ee052d32252f32997eb5f650a9765533d
Reviewed-on: https://swiftshader-review.googlesource.com/5059
Tested-by: Alexis Hétu <sugoi@google.com>
Reviewed-by: Nicolas Capens <capn@google.com>
/external/swiftshader/src/OpenGL/compiler/OutputASM.cpp
b9a781daacc6916098b4574a90425857670f041d 04-Apr-2016 Alexis Hetu <sugoi@google.com> Uniform buffer uniform unpacking utility function

When data is packed into uniform blocks, some data isn't formatted in
a way that fits how data is usually represented, which is the case
for booleans and row major matrices. In these 2 cases, the variables
are unpacked into temporaries before being used. Booleans can be any
integer value and any non-zero value represents "true", so the value
in the uniform buffer has to go through an int to bool conversion
before being used. For row major matrices, a given register of that
matrix has to be transposed into a temporary before being used.

Change-Id: I0e001ceff2ce9be9a3570171e184586afc48c02d
Reviewed-on: https://swiftshader-review.googlesource.com/5040
Tested-by: Alexis Hétu <sugoi@google.com>
Reviewed-by: Nicolas Capens <capn@google.com>
/external/swiftshader/src/OpenGL/compiler/OutputASM.cpp
53463f7519641697019bf0e36cfe25b314e85bb5 04-Apr-2016 Nicolas Capens <capn@google.com> Perform texture coordinate projection at shader assembly level.

Change-Id: Ia94eb950d8d3ec4562f9f2e57d8d7ba27a41d16c
Reviewed-on: https://swiftshader-review.googlesource.com/5044
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/OpenGL/compiler/OutputASM.cpp
0538d1152ded16decc427aa17f245149bc48ddb7 04-Feb-2016 Alexis Hetu <sugoi@google.com> New uniform block related utility functions

This cl adds 2 new utility function and adds one use of
these in the argument() function.
- getBlockId() finds a block by name and returns its ID
- getTypedMemberInfo() finds which block member matches
a certain register index and returns the block member's
packing information and type. If the register falls
within a block member (as a sub-register of a matrix or
an array), the base offset of the block member is
returned, along with the register index, which will then
be used within the argument() function to compute the
final parameter index.

Change-Id: Ic0edcb3e6772cdb854301e3d0b400775e7ee72c0
Reviewed-on: https://swiftshader-review.googlesource.com/4682
Tested-by: Alexis Hétu <sugoi@google.com>
Reviewed-by: Nicolas Capens <capn@google.com>
Tested-by: Nicolas Capens <capn@google.com>
/external/swiftshader/src/OpenGL/compiler/OutputASM.cpp
2ee8585b0e8896724a916c62ab0b0b091bbf37a6 01-Apr-2016 Nicolas Capens <capn@google.com> Fix performing dynamic component writes on vectors only.

Change-Id: Ia204b708239ae51022f163053e4d054e617695b9
Reviewed-on: https://swiftshader-review.googlesource.com/5031
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/OpenGL/compiler/OutputASM.cpp
60859e3e673dcb89ae9b8510f50b8bfbb512c7a2 01-Apr-2016 Nicolas Capens <capn@google.com> Fix scalar times matrix.

Change-Id: I9b46031f57b0cf49428e295b06702099ffef7f01
Reviewed-on: https://swiftshader-review.googlesource.com/5030
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/OpenGL/compiler/OutputASM.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/OpenGL/compiler/OutputASM.cpp
c0ebd09cdf936f8931c813ea32406368b9beea07 07-Mar-2016 Daniel Kenji Toyama <kenjitoyama@google.com> Add missing operation.

Bug 27227050

Change-Id: Id8b6357f25888801dec9bbedc5855faa58def62d
Reviewed-on: https://swiftshader-review.googlesource.com/4920
Reviewed-by: Nicolas Capens <capn@google.com>
Tested-by: Daniel Toyama <kenjitoyama@google.com>
/external/swiftshader/src/OpenGL/compiler/OutputASM.cpp
555f7e1a576057cb7612d3b4df9a61dfc7df506e 25-Feb-2016 Nicolas Capens <capn@google.com> Fix evaluating empty loop condition to true.

Bug 27351438

Change-Id: If15f0f91931f34af6e78ad773036b91ff5d57d01
Reviewed-on: https://swiftshader-review.googlesource.com/4902
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/OpenGL/compiler/OutputASM.cpp
150f597ae6113ed0c5639376a459abaeebecf58b 01-Feb-2016 Alexis Hetu <sugoi@google.com> Uniform block declaration

A few aspects of block declaration are improved upon here:
- Block definitions are computed and stored for later use.
The data stored are the block member types and a map to
convert from register offsets, based on the internal
memory layout, to the std140 layout.
- Declaration of block members is possible. When a block
member is declared prior to the entire block being
declared, OutputASM::declareUniform() will first declare
the whole block and return the index of the block member.
If the block member is part of an already defined block,
the function declares no new variables and returns the
block member's register index.

Change-Id: If1368bc8de20a0f86169361d76858c3f3e34bb07
Reviewed-on: https://swiftshader-review.googlesource.com/4632
Tested-by: Alexis Hétu <sugoi@google.com>
Reviewed-by: Nicolas Capens <capn@google.com>
/external/swiftshader/src/OpenGL/compiler/OutputASM.cpp
325cf49cf65cbcadad3e867d5d0adf44f791826a 20-Jan-2016 Alexis Hetu <sugoi@google.com> Removed double argument() calls

Some calls to the argument() function were made twice
because the emit() function didn't know what index to
use for each individual input. I added the function
arguments to the emit() function in order to solve that.

WebGL conformance tests pass.

Change-Id: I548b72cadf7247afd103b6be2ddfeaf39a995025
Reviewed-on: https://swiftshader-review.googlesource.com/4575
Tested-by: Alexis Hétu <sugoi@google.com>
Reviewed-by: Nicolas Capens <capn@google.com>
/external/swiftshader/src/OpenGL/compiler/OutputASM.cpp
576aea5c0d993e5109445e921a418493dce5fa19 01-Feb-2016 Alexis Hetu <sugoi@google.com> Uniform block related fixes

- The rowMajor qualifier should only be set for matrices
- Shared and std140 layouts are always considered active
- Fixed registerSize() for uniform blocks

Change-Id: Id0ccd4f1f1c3342915643d87e166234e61b83f4f
Reviewed-on: https://swiftshader-review.googlesource.com/4631
Tested-by: Alexis Hétu <sugoi@google.com>
Reviewed-by: Nicolas Capens <capn@google.com>
/external/swiftshader/src/OpenGL/compiler/OutputASM.cpp
6abe1cbc78e0c9fdf3bb8f713f2d0ebc8cf9bbdd 16-Jan-2016 Nicolas Capens <capn@google.com> Detect all texture sampling shader instructions.

Change-Id: If557db7db89659e6c2b043b21e5712fb34eafd8d
Reviewed-on: https://swiftshader-review.googlesource.com/4561
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/OpenGL/compiler/OutputASM.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/OpenGL/compiler/OutputASM.cpp
520acc671fda4990c93eaf90870749b8066c5155 14-Jan-2016 Nicolas Capens <capn@google.com> Fix Clang errors on Linux.

Change-Id: I8bc812cd6c25a60dc73abc2177e8eb4a3841af21
Reviewed-on: https://swiftshader-review.googlesource.com/4551
Tested-by: Nicolas Capens <capn@google.com>
Reviewed-by: Nicolas Capens <capn@google.com>
/external/swiftshader/src/OpenGL/compiler/OutputASM.cpp
8757dead5934e5f7423640d3f002cac23e390969 07-Jan-2016 Alexis Hetu <sugoi@google.com> Ported Angle's std140 encoder to SwiftShader

Added Angle's std140 encoder to properly compute sizes and
offsets of uniform blocks for the std140 standard. All
layouts currently use std140 ('packed' and 'shared' are
implementation dependent, so we can choose to have them be
the same as std140).

All uniform blocks made of simple types or arrays of simple
types are properly interpreted by this code.

Structs are still TBD.

Change-Id: I191d7f313db5d409715b1101ea70903a7b958726
Reviewed-on: https://swiftshader-review.googlesource.com/4525
Tested-by: Alexis Hétu <sugoi@google.com>
Reviewed-by: Nicolas Capens <capn@google.com>
/external/swiftshader/src/OpenGL/compiler/OutputASM.cpp
bdda9daca0cf43f35e7c5ef08807808814a96af0 12-Jan-2016 Alexis Hetu <sugoi@google.com> Fixed uniform block lookup

Blocks are also symbols, so when we have a block,
we have to look for blocks instead of symbols.

Change-Id: I683e646c2c63754a0b27b299dfdbc1d87017fb99
Reviewed-on: https://swiftshader-review.googlesource.com/4542
Tested-by: Alexis Hétu <sugoi@google.com>
Reviewed-by: Nicolas Capens <capn@google.com>
/external/swiftshader/src/OpenGL/compiler/OutputASM.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/OpenGL/compiler/OutputASM.cpp
485f92cdef2f8ddc7a17e7d897341efe331069ec 02-Jan-2016 Nicolas Capens <capn@google.com> Fix initialization order warnings.

Bug 15387371

Change-Id: I01da3db7d6bb795c46153dbc12fd41478f4b6416
Reviewed-on: https://swiftshader-review.googlesource.com/4493
Reviewed-by: Alexis Hétu <sugoi@google.com>
Reviewed-by: Nicolas Capens <capn@google.com>
Tested-by: Nicolas Capens <capn@google.com>
/external/swiftshader/src/OpenGL/compiler/OutputASM.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/OpenGL/compiler/OutputASM.cpp
f14891d79359e3bc3a36bdae60c6b735d23a9eaa 20-Nov-2015 Alexis Hetu <sugoi@google.com> Fragment output fix

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

Change-Id: Id9be21f60cc23528bf1af078a8b3ca2df28e7ee4
Reviewed-on: https://swiftshader-review.googlesource.com/4295
Tested-by: Alexis Hétu <sugoi@google.com>
Reviewed-by: Nicolas Capens <capn@google.com>
/external/swiftshader/src/OpenGL/compiler/OutputASM.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/OpenGL/compiler/OutputASM.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/OpenGL/compiler/OutputASM.cpp
9b3388ed58549f055ef483751c29fb6e08815a0f 11-Sep-2015 Alexis Hetu <sugoi@google.com> Fixed non square matrix multiplication

A few cases of matrix multiplication weren't working properly
due to using the wrong matrix dimension. For example, if we
have the following matrix operation (using matColRow):
mat32 = mat22 * mat32
This results in 3 multiplication of 2 element vectors for each
row of the result and the current code (before this cl) would
only perform 2 multiplications and produce the wrong result.

This cl should fix all uses of the * operator and of the
matrixCompMult function when using non square matrices.

Change-Id: Id0dbfd9d65c20102220049c34435c37e3db7f9da
Reviewed-on: https://swiftshader-review.googlesource.com/3966
Tested-by: Alexis Hétu <sugoi@google.com>
Reviewed-by: Nicolas Capens <capn@google.com>
/external/swiftshader/src/OpenGL/compiler/OutputASM.cpp
c557bf9926e2e955df7df29105442792045eef62 25-Sep-2015 Alexis Hetu <sugoi@google.com> Fixed Temporary issues

Some issues, like failures using the do-while command, were caused
by the assembler being unable to assign registers consistently for
a single temporary variable. For example, in the do-while case, the
"iterate" Temporary object was not being assigned to the same
register between it's initial declaration and it's usage inside the
loop condition later on, causing the do-while to behave weirdly.
Other instances where multiple Temporary objects ended up being used
simultaneously of where a single object was references in multiple
parts of the code could have failed because of this.

The fix is simply to assign Temporary objects a unique ID.

Change-Id: Ie48c596b4c6570853702cab71497b3e00a40c2a0
Reviewed-on: https://swiftshader-review.googlesource.com/4015
Tested-by: Alexis Hétu <sugoi@google.com>
Reviewed-by: Nicolas Capens <capn@google.com>
/external/swiftshader/src/OpenGL/compiler/OutputASM.cpp
fe30f67732fe460e5f579f35418b22d6b89abb03 21-Sep-2015 Alexis Hetu <sugoi@google.com> Added gl_FragDepth

Change-Id: I9e70cd5e230a86ef3e4bed1884ede14a128c2d67
Reviewed-on: https://swiftshader-review.googlesource.com/3992
Reviewed-by: Nicolas Capens <capn@google.com>
Tested-by: Alexis Hétu <sugoi@google.com>
/external/swiftshader/src/OpenGL/compiler/OutputASM.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/OpenGL/compiler/OutputASM.cpp
5228d3c7bfd26f2779d5be8a2e44efba020690b2 22-Jul-2015 Alexis Hetu <sugoi@google.com> Uniform buffer related fixes

- Added an actual offset, in registers, to the Uniform structure to
take into account that types can have different register sizes.
- Fixed the array check in OutputASM::declareUniform() so that it
doesn't make an array of blocks when declaring a member as an
array in the default uniform block.
- Fixed arrayStride and matrixStride in the BlockInfo constructor.
- Fixed memberUniformIndexes to use uniform index instead of
register index.

Change-Id: Id8ba23b5fef71c772bb45a45bb897ca5e2fae385
Reviewed-on: https://swiftshader-review.googlesource.com/3750
Tested-by: Alexis Hétu <sugoi@google.com>
Reviewed-by: Nicolas Capens <capn@google.com>
/external/swiftshader/src/OpenGL/compiler/OutputASM.cpp
e04b5cfb431150a7722baeb9256de468a4891e49 22-Jul-2015 Alexis Hetu <sugoi@google.com> Support for new texture function names

There are explicit checks for texture function names in OutputASM,
which fail in ES3 because new function names are available, so some
of the new function names have been added to the checks.

Change-Id: I7ec8302a31c02500514ede4e36610dca1dafd235
Reviewed-on: https://swiftshader-review.googlesource.com/3752
Tested-by: Alexis Hétu <sugoi@google.com>
Reviewed-by: Nicolas Capens <capn@google.com>
/external/swiftshader/src/OpenGL/compiler/OutputASM.cpp
b938c3ce2e6f24f71cf4ff52ec862bc85a91c0f0 06-Jul-2015 Alexis Hetu <sugoi@google.com> Uniform blocks implementation

- Added support for uniform blocks in OutputASM::declareUniform
- Added basic implementation of Program::applyUniformBuffers()
to be completed later on when uniform buffers are implemented

Change-Id: I919b59d4557bb10bb302e6b6bd0ada79553ca8bb
Reviewed-on: https://swiftshader-review.googlesource.com/3651
Tested-by: Alexis Hétu <sugoi@google.com>
Reviewed-by: Nicolas Capens <capn@google.com>
/external/swiftshader/src/OpenGL/compiler/OutputASM.cpp
910b6b6efd06b572d2a8f54eca6c482ecb030c7b 16-Jul-2015 Alexis Hetu <sugoi@google.com> Added location to Attribute

Program now uses Attribute location.

Change-Id: I005d64509e4b1e2dd977db38b6b2c41d6ba7ddef
Reviewed-on: https://swiftshader-review.googlesource.com/3722
Tested-by: Alexis Hétu <sugoi@google.com>
Reviewed-by: Nicolas Capens <capn@google.com>
/external/swiftshader/src/OpenGL/compiler/OutputASM.cpp
909b8bc1d03c5df9392eebe904727291f9f444a1 15-Jul-2015 Alexis Hetu <sugoi@google.com> Non square matrices related fixes

- Implemented proper VariableRegisterCount (we were using row
count instead of column count to get the number of registers)
and VariableRegisterSize.
- Matrix to matrix copies now clear the correct rows of the
destination matrix when needed
- Added registerSize helper function to type to help clarify
this for matrices.
- Added missing member initializations in TType constructor

Change-Id: Ic880815515c7d12ad12e44f1392aa6892caa953f
Reviewed-on: https://swiftshader-review.googlesource.com/3718
Tested-by: Alexis Hétu <sugoi@google.com>
Reviewed-by: Nicolas Capens <capn@google.com>
/external/swiftshader/src/OpenGL/compiler/OutputASM.cpp
8eada888a95dc02d743b6babc391d25fc9ab9fab 30-Jun-2015 Alexis Hetu <sugoi@google.com> Handling proper sampler types

Some int/uint/array types weren't properly handled by
the Program class yet, so the missing types were added.

Change-Id: I487bbbdcbf798c7430535745386139632346013f
Reviewed-on: https://swiftshader-review.googlesource.com/3610
Tested-by: Alexis Hétu <sugoi@google.com>
Reviewed-by: Nicolas Capens <capn@google.com>
/external/swiftshader/src/OpenGL/compiler/OutputASM.cpp
ad52775476d367199a4cd3b3b47ff8959e63bd59 07-Jul-2015 Alexis Hetu <sugoi@google.com> Invariant keyword support

Added support for the invariant keyword in the parser.
Also made sure all in/out types were handled properly
in OutputASM.cpp.

Change-Id: I40f0bc9caf5bccc691aa60dfaa90bed5d1d7d238
Reviewed-on: https://swiftshader-review.googlesource.com/3663
Tested-by: Alexis Hétu <sugoi@google.com>
Reviewed-by: Nicolas Capens <capn@google.com>
/external/swiftshader/src/OpenGL/compiler/OutputASM.cpp
36427ff2f4cc9ac121f1fb4318b0ba6f45001154 29-Jun-2015 Alexis Hetu <sugoi@google.com> Proper handling of Interface Block indexing

This is a first step in handling interface blocks
properly by allowing indexing of blocks to be handled
properly. This does not include any interaction with
the Program, which will come in a following step.

No WebGL tests were injured in the making of this cl.

Change-Id: I575b08502f7f4dd63ca7b57f2ca0630367adf0de
Reviewed-on: https://swiftshader-review.googlesource.com/3589
Tested-by: Alexis Hétu <sugoi@google.com>
Reviewed-by: Nicolas Capens <capn@google.com>
/external/swiftshader/src/OpenGL/compiler/OutputASM.cpp
0a65584a1529450c476c026f3254d78efc200645 22-Jun-2015 Alexis Hetu <sugoi@google.com> Better encapsulation for TParseContext

Changed 15 public members of TParseContext
so that they are now private and added the
appropriate setters/getters, along with the
required code changes in the parser.

Change-Id: I0a3ea67540d165e9837a3fe8e64fda4843a3cf96
Reviewed-on: https://swiftshader-review.googlesource.com/3543
Tested-by: Alexis Hétu <sugoi@google.com>
Reviewed-by: Nicolas Capens <capn@google.com>
/external/swiftshader/src/OpenGL/compiler/OutputASM.cpp
528628241ca686845401c150f22a56e8f9f5b014 22-Jun-2015 Alexis Hetu <sugoi@google.com> Moving format conversion functions from aggregate to unary

Change-Id: Icd05628204b831ddeefffaec2274fa6661624740
Reviewed-on: https://swiftshader-review.googlesource.com/3540
Tested-by: Alexis Hétu <sugoi@google.com>
Reviewed-by: Nicolas Capens <capn@google.com>
/external/swiftshader/src/OpenGL/compiler/OutputASM.cpp
41827c389051cda8d8b5c8f0dae990108df0b126 23-Jun-2015 Alexis Hetu <sugoi@google.com> Fixed infinite loop crash

Writing for(;;) in a shader was crashing because
a NULL condition was dereferenced. Added the
NULL pointer check to fix the crash.

Change-Id: I2be7a4594029c928ff83221f65503636bc28f4a9
Reviewed-on: https://swiftshader-review.googlesource.com/3553
Tested-by: Alexis Hétu <sugoi@google.com>
Reviewed-by: Nicolas Capens <capn@google.com>
/external/swiftshader/src/OpenGL/compiler/OutputASM.cpp
3713cd4b12696bcabaabe98562320e8fa1796b33 22-Jun-2015 Nicolas Capens <capn@google.com> Log the switch value when reaching an UNREACHABLE().

Bug 20025568

Change-Id: I37d2c7171e0704b4064e56e8ca8799f930038d87
Reviewed-on: https://swiftshader-review.googlesource.com/3481
Reviewed-by: Nicolas Capens <capn@google.com>
Tested-by: Nicolas Capens <capn@google.com>
/external/swiftshader/src/OpenGL/compiler/OutputASM.cpp
a8b364b735624da31500d0fe93ae75f8b36a59d1 10-Jun-2015 Alexis Hetu <sugoi@google.com> Adding Struct related types

Added TField, TFieldListCollection, TStructure
and TInterfaceBlock for structures and uniform
blocks.

In the TType class, changed structure's type
from TTypeList to TStructure and made related
changes in other files to reflect this change.

Change-Id: Ided4c535651a566952c3314c8c4f31c2d0ccdcca
Reviewed-on: https://swiftshader-review.googlesource.com/3451
Tested-by: Alexis Hétu <sugoi@google.com>
Reviewed-by: Nicolas Capens <capn@google.com>
/external/swiftshader/src/OpenGL/compiler/OutputASM.cpp
42ff6b15714827bb44869e5f1c41918b461bf4c8 03-Jun-2015 Alexis Hetu <sugoi@google.com> Add proper in/out shader types

Fragment and Vertex inputs and outputs were treated as OpenGL ES2.0
attributes and varyings, but OpenGL ES3.0 inputs and outputs have
different limitations and must be treated differently. This cl simply
introduces the new types, without modifying the ES2.0 behavior and
only modifying ES3.0 to allow integer varyings when they are flat.

Change-Id: I965cb576bab3f505602af9e055438bcc7c18cdfd
Reviewed-on: https://swiftshader-review.googlesource.com/3371
Tested-by: Alexis Hétu <sugoi@google.com>
Reviewed-by: Nicolas Capens <capn@google.com>
/external/swiftshader/src/OpenGL/compiler/OutputASM.cpp
6743bbf11fe876e0ce063802174c416f5fa05ad4 21-Apr-2015 Alexis Hetu <sugoi@google.com> gl_InstanceID implementation

I need some help connecting the dots here.
I can see a few ways of doing it, but it
isn't trivial for me to see which one
would be right. Could you tell me how the
value should go from the VertexProcessor to
being assigned a value in the actual shader.

Change-Id: Ie0bc2024f51a904ab8144c435b623cfefe8e6704
Reviewed-on: https://swiftshader-review.googlesource.com/2920
Tested-by: Alexis Hétu <sugoi@google.com>
Reviewed-by: Nicolas Capens <capn@google.com>
/external/swiftshader/src/OpenGL/compiler/OutputASM.cpp
fb96f4ed62eadcdb976023d3f0fb4f2cd66171a3 27-May-2015 Alexis Hetu <sugoi@google.com> outerProduct implementation

outerProduct is now implemented for dynamic
variables. All outerProduct dEQP tests pass.

Change-Id: I81e29640347844bd9548030aa69ffbb2eb060fdf
Reviewed-on: https://swiftshader-review.googlesource.com/3283
Reviewed-by: Nicolas Capens <capn@google.com>
Tested-by: Alexis Hétu <sugoi@google.com>
/external/swiftshader/src/OpenGL/compiler/OutputASM.cpp
f86ecd461f929f537cb88cf13c4f69d7528dc1de 27-May-2015 Alexis Hetu <sugoi@google.com> transpose implementation

transpose is now implemented for dynamic
variables. All NxN transpose dEQP tests pass.
There's still an issue with some NxM matrices,
but it seems to be unrelated to this code.

Change-Id: Ie422706d0085c85fa6fc9a95dc21bb441dcddfe8
Reviewed-on: https://swiftshader-review.googlesource.com/3284
Reviewed-by: Nicolas Capens <capn@google.com>
Tested-by: Alexis Hétu <sugoi@google.com>
/external/swiftshader/src/OpenGL/compiler/OutputASM.cpp
00106d497d1ae19de9d2a4dba7f58bca322cdcb9 23-Apr-2015 Alexis Hetu <sugoi@google.com> Fixed NxM matrix construction and minor issues

Fixed NxM matrix construction by
properly checking for these types in
TIntermOperator::isConstructor. Also
fixed a few areas of the code where
the secondary size wasn't properly
taken into account.

Change-Id: I646a41e37460255316f5712f1d744c3a06d8a64d
Reviewed-on: https://swiftshader-review.googlesource.com/3195
Tested-by: Alexis Hétu <sugoi@google.com>
Reviewed-by: Nicolas Capens <capn@google.com>
/external/swiftshader/src/OpenGL/compiler/OutputASM.cpp
4de7e2e85d891739e3c09731b82ca68b18789218 21-May-2015 Alexis Hetu <sugoi@google.com> Implemented matrix transpose

Implemented matrix transpose for
uniform matrices. Also found and
fixed a minor issue in OutputASM
which was causing a bad GL error.

Change-Id: I2d6c603770548c60e56d417b240ca276ec33ba45
Reviewed-on: https://swiftshader-review.googlesource.com/3191
Tested-by: Alexis Hétu <sugoi@google.com>
Reviewed-by: Nicolas Capens <capn@google.com>
/external/swiftshader/src/OpenGL/compiler/OutputASM.cpp
7ca4db3c9af79b74061e6cbffad9b80aca4174d6 04-May-2015 Alexis Hetu <sugoi@google.com> Added handling of a few more types of variable

Added a few missing types:
- Unsigned ints and vectors
- Signed and unsigned int samplers
- 2D Array samplers

Change-Id: I052f7da3b2cb24c5cd2bdd1cf1e3b3a2b0ee0a50
Reviewed-on: https://swiftshader-review.googlesource.com/3042
Tested-by: Alexis Hétu <sugoi@google.com>
Reviewed-by: Nicolas Capens <capn@google.com>
/external/swiftshader/src/OpenGL/compiler/OutputASM.cpp
b7c46afa969792dd607f4d3229fc94b28c39da9e 12-May-2015 Alexis Hetu <sugoi@google.com> Adding unsigned int types to parser

Added unsigned in and unsigned vectors
to parser.

Change-Id: Ic904f723c5db33d2d2bf432344d8abc3db966c1f
Reviewed-on: https://swiftshader-review.googlesource.com/3103
Tested-by: Alexis Hétu <sugoi@google.com>
Reviewed-by: Nicolas Capens <capn@google.com>
/external/swiftshader/src/OpenGL/compiler/OutputASM.cpp
0273322c0bc5c89b5f006334ab7db6a62c922970 29-Apr-2015 Nicolas Capens <capn@google.com> Predefine (E)GL export macros.

Bug 18752589

Change-Id: I2a4fad80b433e62131d66f12bab2f73c6b16a9a0
Reviewed-on: https://swiftshader-review.googlesource.com/2962
Reviewed-by: Nicolas Capens <capn@google.com>
Tested-by: Nicolas Capens <capn@google.com>
/external/swiftshader/src/OpenGL/compiler/OutputASM.cpp
f1f00304b9dabd421da9ab1d56f9bed43cf38acf 16-Apr-2015 Alexis Hetu <sugoi@google.com> Assembly output for NxM matrices

Made a few minor changes to adjust for
NxM matrices in assembly output.

Change-Id: I3dde37e0f4bd2623232eebf0dc06182d8071d751
Reviewed-on: https://swiftshader-review.googlesource.com/2863
Tested-by: Alexis Hétu <sugoi@google.com>
Reviewed-by: Nicolas Capens <capn@google.com>
/external/swiftshader/src/OpenGL/compiler/OutputASM.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/OpenGL/compiler/OutputASM.cpp
b14178b68ccb44a1fca9ba4e7db7770c6b6b6fa9 13-Apr-2015 Alexis Hetu <sugoi@google.com> Completing GLES 3.0 language parser

Added new matrix and sampler types in
glslang parsed files, along with related
code and new types in the C++ code.

Change-Id: Id70c73fac04d000d508236bc9bf1b39a46beda6f
Reviewed-on: https://swiftshader-review.googlesource.com/2826
Tested-by: Alexis Hétu <sugoi@google.com>
Reviewed-by: Nicolas Capens <capn@google.com>
/external/swiftshader/src/OpenGL/compiler/OutputASM.cpp
31ad2aa7f12e804d6628fb70d6e945c419cb2c7d 26-Feb-2015 Nicolas Capens <capn@google.com> Rename EvqConst to EvqConstExpr

In GLSL ES a variable declared const is a compile-time constant, and
thus a constant expression. Parameters declared const are read-only but
not compile-time constant.

Bug 19511934

Change-Id: I6d02062ca62c4185a3384b31a4d3ce8dfcc86b35
Reviewed-on: https://swiftshader-review.googlesource.com/2441
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/OpenGL/compiler/OutputASM.cpp
82cd6d82a079fcad71e686cc075e36186f2a8e66 18-Feb-2015 Nicolas Capens <capn@google.com> Implement basic GLSL ES 3.0 texture sampling.

Bug 19331817

Change-Id: Ieb4581c62525112e0b76e94bcbbb8f9608c782ea
Reviewed-on: https://swiftshader-review.googlesource.com/2371
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/OpenGL/compiler/OutputASM.cpp
cdd2924eadf5696e5cc0adc80480d4422894acac 12-Feb-2015 Nicolas Capens <capn@google.com> Fix supporting samplers in structs passed down as function arguments.

Bug 19354873

Change-Id: Ic21a36eefcdef4d9fcce1952fa15425da8858200
Reviewed-on: https://swiftshader-review.googlesource.com/2260
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/OpenGL/compiler/OutputASM.cpp
198529d7136fe8b16fe6009c5c2134b6642c588e 10-Feb-2015 Nicolas Capens <capn@google.com> Provide safer and more convenient constant union accessors.

Bug 19331817

Change-Id: Ia2dccfbc983750fc484a578013c90a1dd501eb6d
Reviewed-on: https://swiftshader-review.googlesource.com/2110
Reviewed-by: Nicolas Capens <capn@google.com>
Tested-by: Nicolas Capens <capn@google.com>
/external/swiftshader/src/OpenGL/compiler/OutputASM.cpp
b027aa91f4b20c5062fbc781d0ff693bf294cbcc 19-Jan-2015 Alexis Hetu <sugoi@google.com> Adding Texture3D support.

Bug 19126833

Added Texture3D argument verifications.
Added the basic API and functions. A few are still unimplemented:
- Image::loadCompressedData() (for depth other than 1)
- Texture3D::copyImage()
- Texture3D::generateMipmaps()
Added colour grading test for 3D texture

Change-Id: I9e52afa7213999f94c5916c2f301fc6fa4b42c0d
Reviewed-on: https://swiftshader-review.googlesource.com/1730
Tested-by: Alexis Hétu <sugoi@google.com>
Reviewed-by: Alexis Hétu <sugoi@google.com>
Reviewed-by: Nicolas Capens <capn@google.com>
/external/swiftshader/src/OpenGL/compiler/OutputASM.cpp
5597eef8fe02d8f0d3cd451db5867a293167d82b 22-Jan-2015 Nicolas Capens <capn@google.com> Rename the GLSL shader compiler namespace to glsl.

Bug 18962347

Change-Id: I28d001045cf43eed2d92cb0007330dffa620025b
Reviewed-on: https://swiftshader-review.googlesource.com/1760
Reviewed-by: Nicolas Capens <capn@google.com>
Tested-by: Nicolas Capens <capn@google.com>
/external/swiftshader/src/OpenGL/compiler/OutputASM.cpp
68754bf1c1b64da46a729de6b34ab1b8130baaff 22-Jan-2015 Nicolas Capens <capn@google.com> Make the GLSL compiler independent of the API shader class.

Bug 18962347

Change-Id: I1a45c5572a45a16ae04ab77e7029ab31905ac702
Reviewed-on: https://swiftshader-review.googlesource.com/1750
Reviewed-by: Nicolas Capens <capn@google.com>
Tested-by: Nicolas Capens <capn@google.com>
/external/swiftshader/src/OpenGL/compiler/OutputASM.cpp
cc863da574ed5079b055574127fe5788a9a0fc33 21-Jan-2015 Nicolas Capens <capn@google.com> Remove the Radiance compiler copy and use OpenGL's instead.

Bug 18591036

Change-Id: I17158acfa126490e28076052e5937d1deafd96c1
Reviewed-on: https://swiftshader-review.googlesource.com/1691
Reviewed-by: Nicolas Capens <capn@google.com>
Tested-by: Nicolas Capens <capn@google.com>
/external/swiftshader/src/OpenGL/compiler/OutputASM.cpp
54b721dd6dedd902afa208533ae885033526ccdd 12-Dec-2014 Nicolas Capens <capn@google.com> Fix allowing fragment shader invariant declarations.

Bug 18732025

Change-Id: I8a3024327533c3e6db72248caafc5e618808edf5
Reviewed-on: https://swiftshader-review.googlesource.com/1630
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/OpenGL/compiler/OutputASM.cpp
5b5d562c239b516373c730f079ab52e230a158ac 24-Nov-2014 Alexis Hetu <sugoi@google.com> Fixed uniform-default-values.html

Added the isSamplerRegister() function to bring back the previous
validation whose removal was causing uniform-default-values.html
to fail, but I added a comment to explain why this validation was
necessary in the first place.

BUG=18029434

Change-Id: I9dbbfdd31c45adffd5e14433b2ace3a1f79a1ff0
Reviewed-on: https://swiftshader-review.googlesource.com/1471
Tested-by: Alexis Hétu <sugoi@google.com>
Reviewed-by: Nicolas Capens <nicolascapens@google.com>
/external/swiftshader/src/OpenGL/compiler/OutputASM.cpp
a82b58e0517f23e3450775ead7132033b0124056 13-Nov-2014 Alexis Hetu <sugoi@google.com> Fixed a WebGL conformance test

It is illegal to use both glFragData and glFragColor in the same
shader according to the OpenGL spec, so a check was added to
verify that this doesn't happen, and returns an error if it does.

BUG=18029434

Change-Id: Ifee14dd539cacc7cd16a2c2634d3e021dbf7ff8e
Reviewed-on: https://swiftshader-review.googlesource.com/1430
Tested-by: Alexis Hétu <sugoi@google.com>
Reviewed-by: Nicolas Capens <nicolascapens@google.com>
/external/swiftshader/src/OpenGL/compiler/OutputASM.cpp
1763eeba7d358fa4b85f1b2b87d6aae48a311747 20-Nov-2014 Alexis Hetu <sugoi@google.com> Fixed the compound-assignment-type-combination.html test

The fix is in 2 parts:
1) Multiplying a matrix by a float was failing due to attempting
to use the matrix's index on the float, thus going out of bounds.
2) Multiplying a vector or matrix by vectors or matrices of a
different size was not causing a failure, but now it does.

BUG=18450319

Change-Id: Ie01a77eb32d7d52fcd0a803f3e5efc24c625dbfd
Reviewed-on: https://swiftshader-review.googlesource.com/1450
Tested-by: Alexis Hétu <sugoi@google.com>
Reviewed-by: Nicolas Capens <nicolascapens@google.com>
/external/swiftshader/src/OpenGL/compiler/OutputASM.cpp
ba0716cce03b09b805b679af77880eaad23ce773 21-Nov-2014 Nicolas Capens <capn@google.com> Fixed shader-varying-packing-restrictions.html

Return an error instead of asserting when exceeding
the number of available varying variables.

Change-Id: Ia4d76897b4b214a5b3bdd37cd420c0437faa216a
Reviewed-on: https://swiftshader-review.googlesource.com/1451
Tested-by: Alexis Hétu <sugoi@google.com>
Reviewed-by: Nicolas Capens <nicolascapens@google.com>
/external/swiftshader/src/OpenGL/compiler/OutputASM.cpp
e8321394237fa04e1a3f066d5b96025f48c36dfc 03-Nov-2014 Nicolas Capens <capn@google.com> Rename the GLES2 folder to OpenGL.

BUG=18218488

Change-Id: I162a3a80a8e098a2a52b02ea56d746074dfb938d
Reviewed-on: https://swiftshader-review.googlesource.com/1320
Reviewed-by: Nicolas Capens <nicolascapens@google.com>
Tested-by: Nicolas Capens <nicolascapens@google.com>
/external/swiftshader/src/OpenGL/compiler/OutputASM.cpp