src/compiler/ShaderLang.cpp


Log

Author Commit Date CI Message
daniel@transgaming.com 043da138 2012-12-20T21:12:22 Provide an API for accessing the uniform array. 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@1625 736b8ea6-26fd-11df-bfd4-992fa37f6226
daniel@transgaming.com c23f4611 2012-11-28T19:42:57 Interface design for user-defined name hashing. 1) We use BuiltInResources to pass the hash function to ANGLE, deciding whether we applies hash function or not. 2) We use 64 bits hashing function, because 64 bits is 16 bytes using hex representation, plus the "webgl_" prefix, we can keep the names under 128 (WebGL allows 5 levels of nesting in structures). If chooseing 128 bits, we will go beyond 128 characters, and some drivers can't handle that safely. ANGLEBUG=315 Review URL: https://codereview.appspot.com/6822077 git-svn-id: https://angleproject.googlecode.com/svn/branches/dx11proto@1466 736b8ea6-26fd-11df-bfd4-992fa37f6226
jacob.benoit.1@gmail.com b45306b7 2012-05-07T02:12:34 Ensure that strings produced by getVariableInfo are always null-terminated Issue 326 git-svn-id: https://angleproject.googlecode.com/svn/trunk@1070 736b8ea6-26fd-11df-bfd4-992fa37f6226
kbr@chromium.org 205fef33 2011-11-22T20:50:02 Added support for GL_ARB_texture_rectangle to shader validator. Parser was regenerated with the flex/bison shipped with Ubuntu 10.04. BUG=251 TEST=tested with new Core Animation plugin rendering path on Mac OS X Review URL: http://codereview.appspot.com/5432044 git-svn-id: https://angleproject.googlecode.com/svn/trunk@888 736b8ea6-26fd-11df-bfd4-992fa37f6226
kbr@chromium.org 22152117 2011-10-26T01:18:28 Limit copied uniform and vertex attribute names to the implicit size of the buffers passed in. Increase the size of the buffer the client will allocate for mapped names to be equal to the maximum token length. BUG=http://code.google.com/p/angleproject/issues/detail?id=234 TEST=WebGL conformance test to be checked in soon Review URL: http://codereview.appspot.com/5306063 git-svn-id: https://angleproject.googlecode.com/svn/trunk@804 736b8ea6-26fd-11df-bfd4-992fa37f6226
zmo@google.com 09c323a4 2011-08-12T18:22:25 Add an option to support for GL_OES_EGL_image_external. Comes with this extension is the new sampler type samplerExternalOES. ANGLEBUG=175 TEST=compile the attached shader file Review URL: http://codereview.appspot.com/4809076 git-svn-id: https://angleproject.googlecode.com/svn/trunk@728 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
zmo@google.com fd747b86 2011-04-23T01:30:07 Implement shader identifier name mapping. The name mapping happens when an identifier is longer than 32 characters. The name mapping is behind a flag, so it won't happen by default. Also, functions to query the mapped names are added. The purpose of this CL is for the drivers that can't handle long names. For example, linux NVIDIA driver can't handle 256 character name, whereas WebGL spec requires that. This CL also fixes the issue that some of the TIntermSymbols' ids are 0s. ANGLEBUG=144 TEST=test manually with shaders with long identifier names. Review URL: http://codereview.appspot.com/4428058 git-svn-id: https://angleproject.googlecode.com/svn/trunk@619 736b8ea6-26fd-11df-bfd4-992fa37f6226
daniel@transgaming.com 83921386 2011-01-08T05:46:00 rewrite buffers implementation to support static buffers more efficiently Bug=89 Trac #13565 Signed-off-by: Daniel Koch Author: Nicolas Capens git-svn-id: https://angleproject.googlecode.com/svn/trunk@526 736b8ea6-26fd-11df-bfd4-992fa37f6226
alokp@chromium.org bafcbaa3 2010-11-23T19:07:43 Moved the global-pool-allocator to TCompiler so that all memory allocated by the compiler can be de-allocated. Earlier the global-pool-allocator kept accumulating memory from all compilers (symbol-table in particular). The memory was only de-allocated when gpu-process exited or ShFinalize() was called. This was a problem for Chromium which keeps the GPU process around for the browser session. Now the memory is de-allocated as soon as the compiler is deleted, which happens when a tab is closed. BUG=58808 (crbug.com) Review URL: http://codereview.appspot.com/3280041 git-svn-id: https://angleproject.googlecode.com/svn/trunk@489 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 ee76f6af 2010-09-27T19:28:55 Implemented functionality to collect and return info for attributes and uniforms. BUG=26 Review URL: http://codereview.appspot.com/2206046 git-svn-id: https://angleproject.googlecode.com/svn/trunk@440 736b8ea6-26fd-11df-bfd4-992fa37f6226
alokp@chromium.org 07620a58 2010-09-23T17:53:56 - Moved the implementation for ShCompile to the compiler class so that internal details about compiler can be encapsulated. Now we do not need to expose built-in symbol table. - Fixed a few const violations. - Added CollectAttribsUniforms class. BUG=26 Review URL: http://codereview.appspot.com/2263041 git-svn-id: https://angleproject.googlecode.com/svn/trunk@437 736b8ea6-26fd-11df-bfd4-992fa37f6226
daniel@transgaming.com ecd7cf35 2010-09-22T17:13:50 Define vertex texture sampling intrinsics only when supported TRAC #12245 This ensures that the shader will fail to compile when using VTF when it's not supported. Previously an error was generated only at link time and it was not very descriptive. Signed-off-by: Daniel Koch Author: Nicolas Capens git-svn-id: https://angleproject.googlecode.com/svn/trunk@433 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 ad771eb2 2010-09-07T17:36:23 Added mechanism to predefine associated macros for extensions. Also refactored the way extension behavior is initialized and updated. Please note that I still need to add validation that appropriate extensions are enabled before using an extension function. BUG=25 Review URL: http://codereview.appspot.com/2139042 git-svn-id: https://angleproject.googlecode.com/svn/trunk@413 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
alokp@chromium.org 34b99cdf 2010-07-27T18:37:55 De-allocate memory in ShFinalize(). There still seems to be a bug here if the translator is used in a multi-threaded environment. It seems memory local to only one thread is being deallocated - the thread from which ShFinalize() is called. I will look into it closely in the next CL. Review URL: http://codereview.appspot.com/1878044 git-svn-id: https://angleproject.googlecode.com/svn/trunk@353 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 774d7063 2010-07-21T18:55:45 Cleaned up translator API. Deleted unsupported dead code. BUG=9 Review URL: http://codereview.appspot.com/1665050 git-svn-id: https://angleproject.googlecode.com/svn/trunk@348 736b8ea6-26fd-11df-bfd4-992fa37f6226
alokp@chromium.org 613ef31a 2010-07-21T18:54:22 Added checks for webgl_ and _webgl_ reserved identifiers. This currently only checks variable and function names. Struct names and field names will be added in the another CL. BUG=11 Review URL: http://codereview.appspot.com/1674050 git-svn-id: https://angleproject.googlecode.com/svn/trunk@346 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 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 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 bb2e9636 2010-04-13T19:53:50 Fail compilation on empty source string TRAC #11814 Signed-off-by: Shannon Woods Signed-off-by: Daniel Koch Author: Nicolas Capens git-svn-id: https://angleproject.googlecode.com/svn/trunk@145 736b8ea6-26fd-11df-bfd4-992fa37f6226
alokp@chromium.org 76b82085 2010-03-24T17:59:39 Added GLSL backend for ESSL translator. Review URL: http://codereview.appspot.com/698041 git-svn-id: https://angleproject.googlecode.com/svn/trunk@69 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 acc51130 2010-03-17T13:12:17 mv Compiler/* -> src/compiler/* Trac #11406 Signed-off-by: Nicolas Capens git-svn-id: https://angleproject.googlecode.com/svn/trunk@37 736b8ea6-26fd-11df-bfd4-992fa37f6226