src/compiler/ParseHelper.h


Log

Author Commit Date CI Message
daniel@transgaming.com b401a92b 2012-10-26T18:58:24 Move the new preprocessor out of the 'new' directory. TRAC #21966 Signed-off-by: Daniel Koch Author: Nicolas Capens git-svn-id: https://angleproject.googlecode.com/svn/trunk@1326 736b8ea6-26fd-11df-bfd4-992fa37f6226
daniel@transgaming.com 8abd0b79 2012-09-27T17:46:07 Generate a more descriptive error when trying to initialize a const array. TRAC #21589 Issue=359 Signed-off-by: Daniel Koch Signed-off-by: Shannon Woods Author: Nicolas Capens git-svn-id: https://angleproject.googlecode.com/svn/trunk@1286 736b8ea6-26fd-11df-bfd4-992fa37f6226
alokp@chromium.org 6b495719 2012-06-29T00:06:58 Moved error-counting to Diagnostics so that errors generated during preprocessing is included in the count. Enabled logging of preprocessor diagnostics into info-log. Review URL: https://codereview.appspot.com/6354047 git-svn-id: https://angleproject.googlecode.com/svn/trunk@1177 736b8ea6-26fd-11df-bfd4-992fa37f6226
maxvujovic@gmail.com c6b3b3c7 2012-06-27T22:49:39 Fix the compiler warnings on WebKit ports when updating ANGLE in WebKit. Remove the varargs used for extra info formatting in the error() and warning() methods of ParseHelper. Use std::stringstream for formatting instead. Review URL: http://codereview.appspot.com/6310067/ git-svn-id: https://angleproject.googlecode.com/svn/trunk@1170 736b8ea6-26fd-11df-bfd4-992fa37f6226
alokp@chromium.org 73bc298e 2012-06-19T18:48:05 Hooked up the new preprocessor behind a compile-time flag ANGLE_USE_NEW_PREPROCESSOR. Review URL: https://codereview.appspot.com/6304095 git-svn-id: https://angleproject.googlecode.com/svn/trunk@1158 736b8ea6-26fd-11df-bfd4-992fa37f6226
alokp@chromium.org 646ea1ec 2012-06-15T17:36:31 Fixed compile error for translator_hlsl. git-svn-id: https://angleproject.googlecode.com/svn/trunk@1153 736b8ea6-26fd-11df-bfd4-992fa37f6226
alokp@chromium.org 8b851c6d 2012-06-15T16:25:11 Preparation of hooking up the new preprocessor. - Added custom Diagnostics class. Routed all info-log messages via this new class. - Added custom DirectiveHandler class. Moved directive-handling code to this class and routed the old path. - Deleted lexer_glue because it is not needed anymore. The new preprocessor is almost ready! - Killed a bunch of dead code related to PragmaTable. Review URL: https://codereview.appspot.com/6308074 git-svn-id: https://angleproject.googlecode.com/svn/trunk@1150 736b8ea6-26fd-11df-bfd4-992fa37f6226
kbr@chromium.org 476541f6 2011-10-27T21:14:51 Implemented new restrictions on nesting of structs in WebGL shaders. Added previously missing check for embedded structs; even though these attempts would be caught by an underlying GLSL compiler, the shader validator should not let them through. BUG=http://code.google.com/p/angleproject/issues/detail?id=235 TEST=WebGL conformance tests Review URL: http://codereview.appspot.com/5327046 git-svn-id: https://angleproject.googlecode.com/svn/trunk@809 736b8ea6-26fd-11df-bfd4-992fa37f6226
alokp@chromium.org 75fe6b76 2011-08-14T05:31:22 General cleanup of compiler directory and ParseHelper. Review URL: http://codereview.appspot.com/4801084 git-svn-id: https://angleproject.googlecode.com/svn/trunk@730 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 dc4b4f85 2011-06-17T00:42:53 Always emit precision in shader variable declarations. After the shader compile (and before code output), the precision scopes are already lost. In order to correctly output precisions, we need to emit precision in each variable declaration, therefore, each variable should have its precision set. This CL fixes the bugs that the precisions are lost for variables using default precsions and struct fields. Also, this CL fixes a bug in the grammar: constructors are not type_specifier and they shouldn't have precisions. BUG=168 TEST=webgl conformance tests, gles2 conformance tests. Review URL: http://codereview.appspot.com/4617041 git-svn-id: https://angleproject.googlecode.com/svn/trunk@695 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
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
alokp@chromium.org 044a5cf8 2010-11-12T15:42:16 Refactored glslang grammar files to make: - lexer and parser reentrant - line number handling automatic Caveats: - The preprocessor is still not thread-safe and full of bugs. I have another not-yet-ready patch to replace the preprocessor. - The grammar files use options that are not supported by the old versions of flex and bison checked into compiler/tools. So I need to check-in the generated lexer-parser along with a shell script to generate them. Review URL: http://codereview.appspot.com/2992041 git-svn-id: https://angleproject.googlecode.com/svn/trunk@475 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 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
alokp@chromium.org 8815d7f2 2010-09-09T17:30:03 Added support for associating functions with extensions and performing validation when those functions are used in a shader. BUG=25 Review URL: http://codereview.appspot.com/2141046 git-svn-id: https://angleproject.googlecode.com/svn/trunk@415 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 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 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
daniel@transgaming.com a5d7623d 2010-05-17T09:58:47 Enforce fragment precision qualifier requirement TRAC #12156 The fragment shader has no default precision qualifier for floating-point types, so compilation should fail when it's not set explicitly globally or per declaration. Signed-off-by: Shannon Woods Signed-off-by: Daniel Koch Author: Nicolas Capens git-svn-id: https://angleproject.googlecode.com/svn/trunk@293 736b8ea6-26fd-11df-bfd4-992fa37f6226
daniel@transgaming.com 0578f81c 2010-05-17T09:58:39 Untabify compiler code TRAC #12156 Signed-off-by: Shannon Woods Signed-off-by: Daniel Koch Author: Nicolas Capens git-svn-id: https://angleproject.googlecode.com/svn/trunk@292 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 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