src/libGLESv2/Shader.cpp


Log

Author Commit Date CI Message
shannon.woods%transgaming.com@gtempaccount.com 331192d6 2013-04-13T03:27:57 Enabled FRAGMENT_PRECISION_HIGH unconditionally for ANGLE. Review URL: https://codereview.appspot.com/7460048 Conflicts: src/libGLESv2/Shader.cpp git-svn-id: https://angleproject.googlecode.com/svn/branches/es3proto@2059 736b8ea6-26fd-11df-bfd4-992fa37f6226
shannon.woods@transgaming.com d64b3dab 2013-02-28T23:19:26 Fixed 64-bit integer truncation issues in shader translator. This is an incompatible API change, but one which is necessary in order to improve correctness of the code. The API version in ShaderLang.h is updated and, unfortunately, the define renamed to something less ambiguous due to conflicts on some Android buildbots. Temporary patches in Chromium and WebKit will be landed separately to support this upgrade. BUG=403,404,405,406,407,408,409 Review URL: https://codereview.appspot.com/7300058 Conflicts: include/GLSLANG/ShaderLang.h git-svn-id: https://angleproject.googlecode.com/svn/branches/dx11proto@1960 736b8ea6-26fd-11df-bfd4-992fa37f6226
shannon.woods@transgaming.com bdf2d80f 2013-02-28T23:16:20 Add precompiled header support for the libGLESv2 project. TRAC #22518 Signed-off-by: Geoff Lang Signed-off-by: Shannon Woods Author: Jamie Madill git-svn-id: https://angleproject.googlecode.com/svn/branches/dx11proto@1938 736b8ea6-26fd-11df-bfd4-992fa37f6226
shannon.woods@transgaming.com 486d9e9b 2013-02-28T23:15:41 Remove a lot of unnecessary include files and break include chains. This should speed up incremental compile times when modifying headers, by reducing the number of dependencies. TRAC #22518 Signed-off-by: Geoff Lang Signed-off-by: Shannon Woods Author: Jamie Madill git-svn-id: https://angleproject.googlecode.com/svn/branches/dx11proto@1937 736b8ea6-26fd-11df-bfd4-992fa37f6226
shannon.woods@transgaming.com 5bcf7dfb 2013-01-25T21:55:33 Move the call to packVaryings outside of linkVaryings. TRAC #22412 Signed-off-by: Nicolas Capens Signed-off-by: Shannon Woods Author: Jamie Madill git-svn-id: https://angleproject.googlecode.com/svn/branches/dx11proto@1784 736b8ea6-26fd-11df-bfd4-992fa37f6226
shannon.woods@transgaming.com 76cd88c5 2013-01-25T21:54:36 Avoid calling getContext() for resource limits. TRAC #22243 Signed-off-by: Jamie Madill Signed-off-by: Daniel Koch Author: Nicolas Capens git-svn-id: https://angleproject.googlecode.com/svn/branches/dx11proto@1776 736b8ea6-26fd-11df-bfd4-992fa37f6226
shannon.woods@transgaming.com 4e48204a 2013-01-25T21:54:18 Increase DX11 uniform count to 1024. TRAC #22243 Signed-off-by: Jamie Madill Signed-off-by: Daniel Koch Author: Nicolas Capens git-svn-id: https://angleproject.googlecode.com/svn/branches/dx11proto@1774 736b8ea6-26fd-11df-bfd4-992fa37f6226
shannon.woods@transgaming.com 254317da 2013-01-25T21:54:09 Retrieve the maximum uniform register count from the renderer. TRAC #22243 Signed-off-by: Jamie Madill Signed-off-by: Daniel Koch Author: Nicolas Capens git-svn-id: https://angleproject.googlecode.com/svn/branches/dx11proto@1773 736b8ea6-26fd-11df-bfd4-992fa37f6226
shannon.woods@transgaming.com 233fe954 2013-01-25T21:51:57 Added support for vertex texure fetch in DX11 mode. Trac #22354 Signed-off-by: Geoff Lang Signed-off-by: Shannon Woods Author: Jamie Madill git-svn-id: https://angleproject.googlecode.com/svn/branches/dx11proto@1757 736b8ea6-26fd-11df-bfd4-992fa37f6226
shannon.woods@transgaming.com b73964e3 2013-01-25T21:49:14 Pass the desired HLSL version down to the HLSL generator. TRAC #22330 Signed-off-by: Geoff Lang Signed-off-by: Daniel Koch Author: Nicolas Capens git-svn-id: https://angleproject.googlecode.com/svn/branches/dx11proto@1738 736b8ea6-26fd-11df-bfd4-992fa37f6226
daniel@transgaming.com 7629bb6c 2013-01-11T04:12:28 Disable GL_OES_standard_derivatives when ps_2_x or later is not available. BUG=392 Review URL: https://codereview.appspot.com/7027051 Author: bsalomon@google.com (manual merge from master by daniel@transgaming.com) git-svn-id: https://angleproject.googlecode.com/svn/branches/dx11proto@1704 736b8ea6-26fd-11df-bfd4-992fa37f6226
daniel@transgaming.com c5c9e3c5 2012-12-20T21:12:32 Retrieve active uniforms. TRAC #22239 Signed-off-by: Daniel Koch Signed-off-by: Shannon Woods Author: Nicolas Capens git-svn-id: https://angleproject.googlecode.com/svn/branches/dx11proto@1626 736b8ea6-26fd-11df-bfd4-992fa37f6226
daniel@transgaming.com e3e826d4 2012-11-28T19:42:35 Fixed some warnings on GCC Mozilla has recently made using NULL as integer an error (via -Werror=conversion-null GCC flag), which caused ANGLE to no longer compile on mingw in Mozilla tree. The ones that may not be obvious are removal of some <0 checks. They are not needed because they were done on unsigned types. Author: Jacek Caban http://codereview.appspot.com/6679049 (With changes to apply to dx11proto branch) git-svn-id: https://angleproject.googlecode.com/svn/branches/dx11proto@1464 736b8ea6-26fd-11df-bfd4-992fa37f6226
daniel@transgaming.com 7cb796e7 2012-10-31T18:46:44 Eliminated isD3d9ExDevice(). TRAC #21963 Signed-off-by: Daniel Koch Author: Nicolas Capens git-svn-id: https://angleproject.googlecode.com/svn/branches/dx11proto@1357 736b8ea6-26fd-11df-bfd4-992fa37f6226
daniel@transgaming.com 29ab9525 2012-08-27T16:25:37 Minor GCC fixes - Added missing typename keyword - Use proper filenames includes (this matters when cross compiling on case sensitive OSes) - Added <string> include where GCC requires it - Avoid collision between enum variables and template params Issue=358 Signed-off-by: Daniel Koch git-svn-id: https://angleproject.googlecode.com/svn/trunk@1261 736b8ea6-26fd-11df-bfd4-992fa37f6226
daniel@transgaming.com 807d8c33 2012-04-04T15:06:04 Fixed info log regressions. TRAC #20443 Signed-off-by: Daniel Koch Author: Nicolas Capens git-svn-id: https://angleproject.googlecode.com/svn/trunk@1017 736b8ea6-26fd-11df-bfd4-992fa37f6226
jbauman@chromium.org 51b2685b 2012-02-21T23:53:23 Don't use strlen inside of loop This could hurt performance quite a bit. BUG=296 TEST= Review URL: https://codereview.appspot.com/5675086 git-svn-id: https://angleproject.googlecode.com/svn/trunk@993 736b8ea6-26fd-11df-bfd4-992fa37f6226
daniel@transgaming.com 0725e7df 2012-02-17T18:02:20 Support reloading the shader compiler Trac #19900 Issue=291 - Move compiler initialization to a separate function - all this function to ensure the compiler is loaded when a compile is attempted (previously if the compiler was released, you'd have to create a new shader object to get it reloaded). Signed-off-by: Shannon Woods Signed-off-by: Nicolas Capens git-svn-id: https://angleproject.googlecode.com/svn/trunk@992 736b8ea6-26fd-11df-bfd4-992fa37f6226
daniel@transgaming.com 938009cf 2012-02-17T18:02:15 Add ability to recompile shader source Trac# 19900 Issue=291 - add an 'uncompile' function to clear all results from any previous compile attempts - allow compiling to be done multiple times on the same shader - allow a shader to be compiled with no source specified (to produce an appropriate error). Signed-off-by: Shannon Woods Signed-off-by: Nicolas Capens git-svn-id: https://angleproject.googlecode.com/svn/trunk@991 736b8ea6-26fd-11df-bfd4-992fa37f6226
daniel@transgaming.com cde6a610 2012-02-17T18:01:10 Rename the Shader 'varyings' member to 'mVaryings' to follow coding standard Trac #19900 Issue=291 Signed-off-by: Shannon Woods Signed-off-by: Nicolas Capens git-svn-id: https://angleproject.googlecode.com/svn/trunk@990 736b8ea6-26fd-11df-bfd4-992fa37f6226
daniel@transgaming.com 2cdf833c 2012-02-17T18:00:50 Provide better encapsulation for Shader member variables Trac 19900 Issue=291 Moved a bunch of member variables from 'protected' to 'private' Signed-off-by: Shannon Woods Signed-off-by: Nicolas Capens git-svn-id: https://angleproject.googlecode.com/svn/trunk@989 736b8ea6-26fd-11df-bfd4-992fa37f6226
apatrick@chromium.org 6575602e 2012-01-17T21:45:38 Finished off the GLSL compiler's support for parsing shaders using OES_EGL_image_external. The GLSL to HLSL translator work is not done yet so the extension is disabled in Shader.cpp. Review URL: https://codereview.appspot.com/5530081 git-svn-id: https://angleproject.googlecode.com/svn/trunk@946 736b8ea6-26fd-11df-bfd4-992fa37f6226
zmo@google.com a574f78f 2011-10-03T21:45:23 Add an extension for querying translated HLSL shader source. Review URL: http://codereview.appspot.com/5149046 git-svn-id: https://angleproject.googlecode.com/svn/trunk@780 736b8ea6-26fd-11df-bfd4-992fa37f6226
zmo@google.com 5601ea0d 2011-06-10T18:23:25 Implement ES2 backend for Angle translator. With this CL, we have the option to select a code output backend: GLSL, GLSL ES, or HLSL. Note that we always emit the highest supported float precision for fragment shader due to anglebug 168. Although this is a temporary solution, it's not against GLSL ES spec, because it's ok for implementation to upgrade precision. Tested with WebGL conformance test suite, GLES2 conformance test suite (only failed 2/1198), and a few webgl demos, including worlds of webgl, aquarium, etc. anglebug=81 test=translator emitting correct GLSL ES code when ES2 backend is selected. Review URL: http://codereview.appspot.com/4550129 git-svn-id: https://angleproject.googlecode.com/svn/trunk@687 736b8ea6-26fd-11df-bfd4-992fa37f6226
daniel@transgaming.com af29cac9 2011-05-11T15:36:31 Report the VTF texture unit limits. Issue=95 TRAC #16568 Signed-off-by: Daniel Koch Author: Nicolas Capens git-svn-id: https://angleproject.googlecode.com/svn/trunk@637 736b8ea6-26fd-11df-bfd4-992fa37f6226
apatrick@chromium.org 0f4cefe9 2011-01-26T19:30:57 Map D3D calls and HLSL shaders back to GLES2 calls and GLSL ES shaders in PIX. This makes debugging and profiling using PIX a lot more convenient. The top level of events are the GLES calls with their arguments. Those can be expanded to see the D3D calls that were issued for a particular GLES call. When PIX is attached, the shaders are saved out to temporary files and referenced from the translated HLSL shaders via #line directives. This enabled source level debugging of the original GLSL from PIX for pixel and vertex shaders. The HLSL is also saved to a temporary file so that intrinsic functions like texture2D can be stepped into. It also avoids creating a text file in the current working directory, which has continued to be an issue. I made the dependency on d3d9.dll static again so it can be accessed by GetModuleHandle witihin DllMain. I added an EVENT macro that issues D3DPERF_BeginEvent and D3DPERF_EndEvent around a C++ block. I replaced TRACE with EVENT for all the entry points. I removed the tracing of shader source since the source is visible in PIX. The means by which the filename of the temporary shader file is passed into the shader compiler is a little clunky. I did it that way to avoid changing the function signatures and breaking folks using the translator. I plan to make the compiler respect #pragma optimize so that optimization can be disabled for debugging purposes. For now it just disables shader optimization in debug builds of ANGLE. Review URL: http://codereview.appspot.com/3945043 git-svn-id: https://angleproject.googlecode.com/svn/trunk@541 736b8ea6-26fd-11df-bfd4-992fa37f6226
daniel@transgaming.com 7ea933f5 2010-12-12T08:52:42 Fix potential sscanf overflows in Shader.cpp Issue=76 Contributed by ddefrostt git-svn-id: https://angleproject.googlecode.com/svn/trunk@500 736b8ea6-26fd-11df-bfd4-992fa37f6226
daniel@transgaming.com 458da14d 2010-11-28T02:03:02 Increase the number of fragment uniform vectors. TRAC #14504 Signed-off-by: Daniel Koch Author: Nicolas Capens git-svn-id: https://angleproject.googlecode.com/svn/trunk@497 736b8ea6-26fd-11df-bfd4-992fa37f6226
daniel@transgaming.com 396c643d 2010-11-26T16:26:12 Increase the number of varying vectors to 10 on Shader Model 3.0 devices. TRAC #14503 Signed-off-by: Daniel Koch Author: Nicolas Capens git-svn-id: https://angleproject.googlecode.com/svn/trunk@492 736b8ea6-26fd-11df-bfd4-992fa37f6226
alokp@chromium.org 4888ceb6 2010-10-01T21:13:12 Made the API of shader translator library consistent. - We recently started using OpenGL-type enums. This CL makes all old enums consistent with the new scheme. - Renamed TBuiltInResource to ShBuiltInResources to have a consistent prefix BUG=46 Review URL: http://codereview.appspot.com/2328041 git-svn-id: https://angleproject.googlecode.com/svn/trunk@443 736b8ea6-26fd-11df-bfd4-992fa37f6226
alokp@chromium.org 7beea408 2010-09-15T21:18:34 Added API to query for active attribs and uniforms. These functions are modeled after glGetShaderiv, glGetProgramiv, glGetActiveAttrib, and glGetActiveUniform. The main difference between this and OpenGL API is that we do not have programs - just shaders. BUG=26 Review URL: http://codereview.appspot.com/2183041 git-svn-id: https://angleproject.googlecode.com/svn/trunk@425 736b8ea6-26fd-11df-bfd4-992fa37f6226
alokp@chromium.org d303ef9a 2010-09-09T17:30:15 ANGLE supports GL_OES_standard_derivatives now. BUG=25 Review URL: http://codereview.appspot.com/2122048 git-svn-id: https://angleproject.googlecode.com/svn/trunk@416 736b8ea6-26fd-11df-bfd4-992fa37f6226
alokp@chromium.org 94a86ad8 2010-08-25T20:02:11 Adding support for OES_standard_derivatives extension. This is not the complete implementation. Sending it to get feedback on the API. Is it OK to add extension support into TBuiltInResource? I could create a new struct for extensions but that would lead to API change. BUG=25 Review URL: http://codereview.appspot.com/1953047 git-svn-id: https://angleproject.googlecode.com/svn/trunk@402 736b8ea6-26fd-11df-bfd4-992fa37f6226
daniel@transgaming.com da13f3e9 2010-07-28T19:20:56 Adds resource manager class. TRAC #12493 The resource manager class is now in charge of allocation & management of objects which may be shared by multiple contexts. Signed-off-by: Andrew Lewycky Signed-off-by: Nicolas Capens Signed-off-by: Daniel Koch Author: Shannon Woods git-svn-id: https://angleproject.googlecode.com/svn/trunk@360 736b8ea6-26fd-11df-bfd4-992fa37f6226
daniel@transgaming.com be5a0867 2010-07-28T19:20:37 Implement gl_PointCoord on SM3 hardware TRAC #11594 Signed-off-by: Andrew Lewycky Signed-off-by: Daniel Koch Author: Nicolas Capens git-svn-id: https://angleproject.googlecode.com/svn/trunk@355 736b8ea6-26fd-11df-bfd4-992fa37f6226
alokp@chromium.org e4249f02 2010-07-26T18:13:52 Refactored the way symbol tables are initialized and stored. This was done in response to the addition of EShSpec. Symbol table entries depend on three things - language, spec (not now but may eventually), and built-in resources. We used to build two global symbol-tables - one for each language. During each compile, one of the symbol table was copied and resource-specific stuff was added. I have moved the symbol table to TCompiler that gets initilized when compiler is created and reused for each compile. This makes it much cleaner and extensible in case a spec requires special entries to be added to the symbol table. PS: Sorry for the long CL, but all of it needed to be done in one CL. I have verified that everything still compiles and passes all conformance tests. Review URL: http://codereview.appspot.com/1864044 git-svn-id: https://angleproject.googlecode.com/svn/trunk@351 736b8ea6-26fd-11df-bfd4-992fa37f6226
alokp@chromium.org c54bf507 2010-07-22T16:49:09 Further cleanup of ShaderLang.h. Removed redundant/unused macros and enum fields. Review URL: http://codereview.appspot.com/1842046 git-svn-id: https://angleproject.googlecode.com/svn/trunk@349 736b8ea6-26fd-11df-bfd4-992fa37f6226
alokp@chromium.org 29cd91af 2010-07-16T19:30:45 Added an option for specifying language specification in preparation for supporting WebGL in addition to GLES2. This CL just replaces unused debugOptions variable with EShSpec variable. BUG=11 Review URL: http://codereview.appspot.com/1692051 git-svn-id: https://angleproject.googlecode.com/svn/trunk@344 736b8ea6-26fd-11df-bfd4-992fa37f6226
alokp@chromium.org 91b72320 2010-06-02T15:50:56 Removed the dependency of compiler on common. This is done to make compiler self-sufficient so that it is easier to consume by external developers. I tried to replace all instances of assert by simply redefining assert(x) to ASSERT(x), but was getting a lot of compile errors. I still need to investigate that. Review URL: http://codereview.appspot.com/1461041 git-svn-id: https://angleproject.googlecode.com/svn/trunk@323 736b8ea6-26fd-11df-bfd4-992fa37f6226
alokp@chromium.org 90033b9e 2010-05-24T15:02:43 ShInitialize/ShFinalize is designed to be called once per process, or it would crash at random locations. I changed ShFinalize() to properly cleanup and reset global variables so that they can be called multiple times. I think that the compiler setup is much more complicated than it needs to be. It unnecessarily uses global variables. A custom pool allocator is overkill too. Review URL: http://codereview.appspot.com/1238045 git-svn-id: https://angleproject.googlecode.com/svn/trunk@316 736b8ea6-26fd-11df-bfd4-992fa37f6226
daniel@transgaming.com 4af7acca 2010-05-14T17:30:53 Implemented varying packing TRAC #11736 The OpenGL ES Shading Language 1.00 rev. 17 appendix A section 7 page 111, details how varyings should be packed into generic varying registers. To implement this the HLSL main() function is now generated and appended to the code during link time, where the packing and mapping can happen. Signed-off-by: Shannon Woods Signed-off-by: Daniel Koch Author: Nicolas Capens git-svn-id: https://angleproject.googlecode.com/svn/trunk@282 736b8ea6-26fd-11df-bfd4-992fa37f6226
daniel@transgaming.com 95124346 2010-04-29T03:38:58 Deleting program does not delete shaders that are marked TRAC #12012 Resolve the crash on context deletion. Signed-off-by: Nicolas Capens Signed-off-by: Daniel Koch Author: Andrew Lewycky git-svn-id: https://angleproject.googlecode.com/svn/trunk@213 736b8ea6-26fd-11df-bfd4-992fa37f6226
daniel@transgaming.com 71cd868d 2010-04-29T03:35:25 Deleting program does not delete shaders that are marked TRAC #12012 Also fixes failure to delete flagged program upon glUseProgram(0). Signed-off-by: Nicolas Capens Signed-off-by: Daniel Koch Author: Andrew Lewycky git-svn-id: https://angleproject.googlecode.com/svn/trunk@201 736b8ea6-26fd-11df-bfd4-992fa37f6226
daniel@transgaming.com 09fbfefa 2010-04-22T13:35:31 Implemented glGetActiveUniform TRAC #11929 Signed-off-by: Shannon Woods Signed-off-by: Daniel Koch Author: Nicolas Capens git-svn-id: https://angleproject.googlecode.com/svn/trunk@181 736b8ea6-26fd-11df-bfd4-992fa37f6226
daniel@transgaming.com 85423183 2010-04-22T13:35:27 Implemented glGetActiveAttrib TRAC #11929 Signed-off-by: Shannon Woods Signed-off-by: Daniel Koch Author: Nicolas Capens git-svn-id: https://angleproject.googlecode.com/svn/trunk@180 736b8ea6-26fd-11df-bfd4-992fa37f6226
daniel@transgaming.com b4ff1f8f 2010-04-22T13:35:18 Implemented aliased attributes support TRAC #11092 Signed-off-by: Shannon Woods Signed-off-by: Daniel Koch Author: Nicolas Capens git-svn-id: https://angleproject.googlecode.com/svn/trunk@177 736b8ea6-26fd-11df-bfd4-992fa37f6226
daniel@transgaming.com bbf56f75 2010-04-20T18:52:13 Use directory qualified #include files Trac #11408 Signed-off-by: Andrew Lewycky Signed-off-by: Nicolas Capens git-svn-id: https://angleproject.googlecode.com/svn/trunk@165 736b8ea6-26fd-11df-bfd4-992fa37f6226
daniel@transgaming.com 72d0b52e 2010-04-13T19:53:44 Decorate all GLSL user-defined names with an underscore to avoid name clashes TRAC #11314 Signed-off-by: Andrew Lewycky Signed-off-by: Daniel Koch Author: Nicolas Capens git-svn-id: https://angleproject.googlecode.com/svn/trunk@143 736b8ea6-26fd-11df-bfd4-992fa37f6226
daniel@transgaming.com 0e3358a6 2010-04-05T20:32:42 Compiler - implement proper varying linking TRAC #11716 Signed-off-by: Shannon Woods Signed-off-by: Daniel Koch Author: Nicolas Capens git-svn-id: https://angleproject.googlecode.com/svn/trunk@97 736b8ea6-26fd-11df-bfd4-992fa37f6226
daniel@transgaming.com 41187f1d 2010-04-01T13:39:29 Fix glGetShaderSource conformance TRAC #11718 Signed-off-by: Daniel Koch git-svn-id: https://angleproject.googlecode.com/svn/trunk@92 736b8ea6-26fd-11df-bfd4-992fa37f6226
daniel@transgaming.com 6c78521e 2010-03-30T03:36:17 Implement glGetAttachedShaders and glGetShaderPrecisionFormat. TRAC #11599 Signed-off-by: Andrew Lewycky Signed-off-by: Daniel Koch Author: Nicolas Capens git-svn-id: https://angleproject.googlecode.com/svn/trunk@85 736b8ea6-26fd-11df-bfd4-992fa37f6226
daniel@transgaming.com cba5057c 2010-03-28T19:36:09 Compiler - implement shader and program queries TRAC #11599 Signed-off-by: Shannon Woods Signed-off-by: Daniel Koch Author: Nicolas Capens git-svn-id: https://angleproject.googlecode.com/svn/trunk@76 736b8ea6-26fd-11df-bfd4-992fa37f6226
alokp@chromium.org ea0e1af4 2010-03-22T19:33:14 Minor reshuffling of directory structure in preparation of ESSL to GLSL compiler work. 1. Added include/GLSLANG which includes compiler API 2. Deleted src/include and moved the header files to the same directory as the corresponding source files 3. Modied include path to be relative to src/. I have only fixed paths for files I moved. We should fix it for all new files at least. It is much easier to see where an included file is coming from. I noticed that a few libGLESv2 source files include headers from libEGL project, which seems wrong. I think we should address this issue. Next step: move compiler source files to compiler/frontend and create two new projects compiler/glsl_backend and compiler/hlsl_backend. Review URL: http://codereview.appspot.com/662042 git-svn-id: https://angleproject.googlecode.com/svn/trunk@62 736b8ea6-26fd-11df-bfd4-992fa37f6226
daniel@transgaming.com 0599dc6d 2010-03-21T04:31:36 To output debug info use the TRACE macro instead of calling trace() Trac #11526 Signed-off-by: Shannon Woods Signed-off-by: Nicolas Capens git-svn-id: https://angleproject.googlecode.com/svn/trunk@61 736b8ea6-26fd-11df-bfd4-992fa37f6226
daniel@transgaming.com 7c46b9e6 2010-03-17T13:12:58 mv libGLESv2 -> src/libGLESv2 Trac #11406 Signed-off-by: Nicolas Capens git-svn-id: https://angleproject.googlecode.com/svn/trunk@40 736b8ea6-26fd-11df-bfd4-992fa37f6226