History log of /external/swiftshader/src/OpenGL/libGLESv2/Shader.cpp
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
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/libGLESv2/Shader.cpp
2e4c069ab3d6f2175d217b3327ea094920fb7f03 15-Jan-2018 Alexis Hetu <sugoi@google.com> Maximum call stack depth increase

dEQP requires a stack depth of at least 33 for all tests to
pass. Since the stack depth in swiftshader is arbitrary and
doesn't actually depend on hardware, the maximum stack depth
was increased from 16 to 64.

Also added a bit of log info to make debugging easier.

Fixes 2 dEQP tests:
dEQP-GLES3.performance.compiler.optimization.function_inlining.32_nested_*

Change-Id: I95ae335977d4eb3b21a54296b7fc5e6019595e66
Reviewed-on: https://swiftshader-review.googlesource.com/16328
Tested-by: Alexis Hétu <sugoi@google.com>
Reviewed-by: Nicolas Capens <nicolascapens@google.com>
/external/swiftshader/src/OpenGL/libGLESv2/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/OpenGL/libGLESv2/Shader.cpp
23f54d74e1e613a0e90e79056e96cb8a339373a8 05-Dec-2017 Alexis Hetu <sugoi@google.com> Fix attribute location binding

- Attribute location aliasing was allowed prior to shader
version 300, so location aliasing is now possible.
- Attribute binding refers to the linked location of attributes,
so locations set using glBindAttribLocation() will only be
returned by glGetAttribLocation() after the program is linked.
Before that, it will return the location allocated during the
previous glLinkProgram() call.

In order to do that, an extra map was added.
"linkedAttributeLocation" represents the attributes' location,
as a result of linking a program.
"attributeBinding" represents the attributes' future location,
when the next program linking occurs.

On top of that, the shader's version was not being passed down
from TranslatorASM to es2::Shader, or from es2::Shader to Program,
so this information also needed to be properly transferred.

Fixes all failures in:
dEQP-GLES3.functional.attribute_location*

Change-Id: I4ba7dc7c2f6d444e805cadeb5445f5ff371c3d95
Reviewed-on: https://swiftshader-review.googlesource.com/14568
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/libGLESv2/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/OpenGL/libGLESv2/Shader.cpp
b28c662c82c7ac74962cb12a5d9f5bde2e650032 05-Jan-2017 Nicolas Capens <capn@google.com> Fix clamping viewport dimensions on specification.

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

Bug b/34078120

Change-Id: Ifeec0d6b601ce8a3825796fa551eea1f46150002
Reviewed-on: https://swiftshader-review.googlesource.com/8371
Reviewed-by: Alexis Hétu <sugoi@google.com>
Reviewed-by: Nicolas Capens <capn@google.com>
Tested-by: Nicolas Capens <capn@google.com>
/external/swiftshader/src/OpenGL/libGLESv2/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/OpenGL/libGLESv2/Shader.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/libGLESv2/Shader.cpp
c66f0e3629984a8f41f6ee4441047c9fe8584454 18-Apr-2016 Nicolas Capens <capn@google.com> Implement GL_EXT_draw_buffers.

Bug 19353282

Change-Id: I4a1782c2f1e9ae52b731ef447e97c353cc41044e
Reviewed-on: https://swiftshader-review.googlesource.com/5123
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/libGLESv2/Shader.cpp
175d634f0c82c1b7647219344cc8244222d75f89 24-Nov-2015 Alexis Hetu <sugoi@google.com> Minor bug fixes and cleanup

- Removed unused variables
- Fixed member initialization order in a few classes
- Fixed Surface::setSwapBehavior()
- Removed unused mPixelPackingStateDirty members
- Fixed initialization of "size" member in LinkedVarying class
- Fixed constness of a string
- Removed unused static functions
- Added parenthesis to fix && / || order ambiguity

Change-Id: Ia9ad8eaca335c60871fdc58037e441aa2010a641
Reviewed-on: https://swiftshader-review.googlesource.com/4301
Tested-by: Alexis Hétu <sugoi@google.com>
Reviewed-by: Nicolas Capens <capn@google.com>
/external/swiftshader/src/OpenGL/libGLESv2/Shader.cpp
42c00882580f7ef00ffc82528769c827d468fa1f 26-Jun-2015 Nicolas Capens <capn@google.com> Remove an unused method.

Change-Id: Id212644a19443434ca14f78555e3d159ac4266e8
Reviewed-on: https://swiftshader-review.googlesource.com/3570
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/libGLESv2/Shader.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/libGLESv2/Shader.cpp
d1746741f238615dfa8e1e23e770061d076c6d45 30-Apr-2015 Alexis Hetu <sugoi@google.com> Uniform Blocks API

Implemented API level functionality for
Uniform Blocks all the way down to the
Program, without actually linking the
uniforms, which will require more work
in shaders to interpret these properly.

Change-Id: I503a9bca63adb5160be7ff7597d3996d356fc1e3
Reviewed-on: https://swiftshader-review.googlesource.com/3015
Tested-by: Alexis Hétu <sugoi@google.com>
Reviewed-by: Nicolas Capens <capn@google.com>
/external/swiftshader/src/OpenGL/libGLESv2/Shader.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/libGLESv2/Shader.cpp
a6fb2e0d111f60d3704f77afb6e3a60a6a8c81ec 23-Mar-2015 Nicolas Capens <capn@google.com> Enable the use of samplerExternalOES.

Change-Id: Iabafc06d073c99f9cc5b2c62ed83eff4862bc2cc
Reviewed-on: https://swiftshader-review.googlesource.com/2684
Reviewed-by: Nicolas Capens <capn@google.com>
Tested-by: Nicolas Capens <capn@google.com>
/external/swiftshader/src/OpenGL/libGLESv2/Shader.cpp
db04c0645e0757854962acc45bfcb32aea70ad3a 20-Mar-2015 Ping-Hao Wu <pinghao@google.com> Use a string format for safer printing.

The string was directly used as the string format, which would have caused
printf to expect additional arguments when it contains formatting elements.

Bug 18720257

Change-Id: Ie4391097e58d4cab2793a05eda2b03acd02d7f22
Reviewed-on: https://swiftshader-review.googlesource.com/2656
Reviewed-by: Greg Hartman <ghartman@google.com>
Tested-by: Greg Hartman <ghartman@google.com>
Reviewed-by: Nicolas Capens <capn@google.com>
/external/swiftshader/src/OpenGL/libGLESv2/Shader.cpp
996314b427f1682926aad8652af18b081afcc363 13-Feb-2015 Nicolas Capens <capn@google.com> Reject GLSL ES 3.00 shaders for OpenGL ES 2.0 contexts.

Bug 19331817

Change-Id: I72128c6b3cb672d4b74578086814fde2c2c6db99
Reviewed-on: https://swiftshader-review.googlesource.com/2292
Reviewed-by: Nicolas Capens <capn@google.com>
Tested-by: Nicolas Capens <capn@google.com>
/external/swiftshader/src/OpenGL/libGLESv2/Shader.cpp
a68b6112a8bc192645ae8a1991b3e614bc878b27 13-Feb-2015 Nicolas Capens <capn@google.com> Use an STL string for the shader info log.

Bug 19331817

Change-Id: I9ea2f823fafa54e598e79181aa39c3626d9dc4e8
Reviewed-on: https://swiftshader-review.googlesource.com/2291
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/libGLESv2/Shader.cpp
20b06c3c72ffddb2a67a8b52b63a3984040dc5b3 13-Feb-2015 Nicolas Capens <capn@google.com> Centralize shader compilation.

Bug 19331817

Change-Id: Ib5df377bf8f715e008f9d4e5efd0e97c6e2f2570
Reviewed-on: https://swiftshader-review.googlesource.com/2290
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/libGLESv2/Shader.cpp
08ca3c6e18275ed9db5515e470692e700e1a3e12 13-Feb-2015 Nicolas Capens <capn@google.com> Eliminate compiling for the WebGL spec.

Bug 19331817

Change-Id: I85cbfd61a267e39832b951121422a676f5af4a54
Reviewed-on: https://swiftshader-review.googlesource.com/2289
Reviewed-by: Nicolas Capens <capn@google.com>
Tested-by: Nicolas Capens <capn@google.com>
/external/swiftshader/src/OpenGL/libGLESv2/Shader.cpp
6407fe82e29ab16920742bd47b93e14bc5f0e119 10-Feb-2015 Nicolas Capens <capn@google.com> Eliminate the ShaderLang interface.

Bug 19331817

Change-Id: I6f5e0c1130974a16cec9575f0fefdd81707b648b
Reviewed-on: https://swiftshader-review.googlesource.com/2153
Reviewed-by: Nicolas Capens <capn@google.com>
Tested-by: Nicolas Capens <capn@google.com>
/external/swiftshader/src/OpenGL/libGLESv2/Shader.cpp
21c51c7d13fef8ee67fd7f182e1dad61b368d0b1 10-Feb-2015 Nicolas Capens <capn@google.com> Eliminate the abstract shader compiler interface.

Bug 19331817

Change-Id: I13bc44264ac8727aa246f25960e054ab2875ecec
Reviewed-on: https://swiftshader-review.googlesource.com/2152
Reviewed-by: Nicolas Capens <capn@google.com>
Tested-by: Nicolas Capens <capn@google.com>
/external/swiftshader/src/OpenGL/libGLESv2/Shader.cpp
7cc75e1c3d1e60847e47e19cfbe71051b95e7f9d 29-Jan-2015 Nicolas Capens <capn@google.com> Make the Object class independent of the GL version.

Bug 18962347

Change-Id: Ica99629bf58e799d6552d4a92ce3ae3eff57da27
Reviewed-on: https://swiftshader-review.googlesource.com/1880
Reviewed-by: Nicolas Capens <capn@google.com>
Tested-by: Nicolas Capens <capn@google.com>
/external/swiftshader/src/OpenGL/libGLESv2/Shader.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/libGLESv2/Shader.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/libGLESv2/Shader.cpp
3914bb4a6701cdd724dfcce485db6e19dccb80ae 01-Dec-2014 Nicolas Capens <capn@google.com> Clear the list of uniforms before recompiling.

Bug 18525426

Change-Id: I10c613b5c989467423f3bc84ed3c7039fa35abea
Reviewed-on: https://swiftshader-review.googlesource.com/1504
Reviewed-by: Alexis Hétu <sugoi@google.com>
Reviewed-by: Nicolas Capens <nicolascapens@google.com>
Tested-by: Nicolas Capens <nicolascapens@google.com>
/external/swiftshader/src/OpenGL/libGLESv2/Shader.cpp
978ddc5964f4eeaecb9c04fc5a95b2d582bb7afd 11-Nov-2014 Nicolas Capens <capn@google.com> Fixed memory leak associated with TLS.

We used to allocate thread-local memory on each compile.
If the compile did not happen on the same thread as ShInitialize,
we leaked the thread-local memory.

It turns out that there is no need to allocate any thread-local
memory. This patch cleans up all the unnecessary junk around TLS.

BUG=chromium:181691

Change-Id: I4b67ab23dc856d93424ae51ebf8aaf8966b732e4
Reviewed-on: https://swiftshader-review.googlesource.com/1361
Reviewed-by: Nicolas Capens <nicolascapens@google.com>
Tested-by: Nicolas Capens <nicolascapens@google.com>
/external/swiftshader/src/OpenGL/libGLESv2/Shader.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/libGLESv2/Shader.cpp