src/compiler/Intermediate.cpp


Log

Author Commit Date CI Message
daniel@transgaming.com 6c1203f8 2013-01-11T04:12:43 In generated shaders, output +INF and -INF as largest single precision floating point number. C++ streams seem to use the representation 1.$ for INF and that isn't valid syntax in GLSL or HLSL. Also preserve the sign of INF in constant expressions that divide by zero. I can't figure out what to do about 0/0 because the shader models we are using do not support NaN. Treating it as +INF as before. Review URL: https://codereview.appspot.com/7057046 git-svn-id: https://angleproject.googlecode.com/svn/branches/dx11proto@1706 736b8ea6-26fd-11df-bfd4-992fa37f6226
daniel@transgaming.com 0aa3b5a2 2012-11-28T19:43:24 Implement user-defined name hashing. ANGLEBUG=315 Review URL: https://codereview.appspot.com/6818109 git-svn-id: https://angleproject.googlecode.com/svn/branches/dx11proto@1469 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
daniel@transgaming.com 978702d8 2012-04-04T15:05:58 Return a sequence when optimizing constant conditions so that brackets will be added to the HLSL output. TRAC #20052 ISSUE=252 Signed-off-by: Daniel Koch Author: Nicolas Capens git-svn-id: https://angleproject.googlecode.com/svn/trunk@1016 736b8ea6-26fd-11df-bfd4-992fa37f6226
daniel@transgaming.com 43affc5e 2012-03-28T14:55:39 Selection nodes are temporaries. Issue=156 TRAC #16816 Signed-off-by: Daniel Koch Author: Nicolas Capens git-svn-id: https://angleproject.googlecode.com/svn/trunk@1010 736b8ea6-26fd-11df-bfd4-992fa37f6226
apatrick@chromium.org a1d8059d 2012-01-25T21:52:10 Increase MSVC warning level to 4. There are some exceptions, a subset of the exceptions used by Chromium. They didn't seem to be useful warnings. In code which we don't change much, like the preprocessor, I just suppressed the warnings in the specific files rather than changing the code. There should be no functional changes in this patch. Review URL: https://codereview.appspot.com/5570066 git-svn-id: https://angleproject.googlecode.com/svn/trunk@964 736b8ea6-26fd-11df-bfd4-992fa37f6226
daniel@transgaming.com ea993576 2011-03-15T18:23:55 Fix clang warnings: Intermediate.cpp: warning: '&&' within '||' Issue=126 Signed-off-by: Nicolas Capens Signed-off-by: Daniel Koch Part 3 of 5: <http://webkit.org/b/56337> Enable -Werror on ANGLE Upstream bug: <http://code.google.com/p/angleproject/issues/detail?id=126> Fixes the following static analyzer warnings: src/compiler/Intermediate.cpp:1008:55:{1008:17-1008:54}: warning: '&&' within '||' [-Wlogical-op-parentheses,2] if (left->isMatrix() && right->isVector() || ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^ src/compiler/Intermediate.cpp:1008:55: note: place parentheses around the '&&' expression to silence this warning [2] if (left->isMatrix() && right->isVector() || ^ ( ) fix-it:"src/compiler/Intermediate.cpp":{1008:17-1008:17}:"(" fix-it:"src/compiler/Intermediate.cpp":{1008:54-1008:54}:")" src/compiler/Intermediate.cpp:1008:55:{1009:17-1009:54}: warning: '&&' within '||' [-Wlogical-op-parentheses,2] if (left->isMatrix() && right->isVector() || ^ src/compiler/Intermediate.cpp:1008:55: note: place parentheses around the '&&' expression to silence this warning [2] if (left->isMatrix() && right->isVector() || ^ fix-it:"src/compiler/Intermediate.cpp":{1009:17-1009:17}:"(" fix-it:"src/compiler/Intermediate.cpp":{1009:54-1009:54}:")" src/compiler/Intermediate.cpp:1020:55:{1020:17-1020:54}: warning: '&&' within '||' [-Wlogical-op-parentheses,2] if (left->isMatrix() && right->isVector() || ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^ src/compiler/Intermediate.cpp:1020:55: note: place parentheses around the '&&' expression to silence this warning [2] if (left->isMatrix() && right->isVector() || ^ ( ) fix-it:"src/compiler/Intermediate.cpp":{1020:17-1020:17}:"(" fix-it:"src/compiler/Intermediate.cpp":{1020:54-1020:54}:")" src/compiler/Intermediate.cpp:1020:55:{1021:17-1021:54}: warning: '&&' within '||' [-Wlogical-op-parentheses,2] if (left->isMatrix() && right->isVector() || ^ src/compiler/Intermediate.cpp:1020:55: note: place parentheses around the '&&' expression to silence this warning [2] if (left->isMatrix() && right->isVector() || ^ fix-it:"src/compiler/Intermediate.cpp":{1021:17-1021:17}:"(" fix-it:"src/compiler/Intermediate.cpp":{1021:54-1021:54}:")" * src/compiler/Intermediate.cpp: (TIntermBinary::promote): Added parnetheses. Author: David Kilzer <ddkilzer@apple.com> git-svn-id: https://angleproject.googlecode.com/svn/trunk@574 736b8ea6-26fd-11df-bfd4-992fa37f6226
alokp@chromium.org b59a778c 2010-11-24T18:38:33 Implemented validation for loop and indexing limitations specified by GLSL ES spec 1.0 Appendix A Section 4 and 5. A couple of things to note: - This CL only validates the "form" of loop and indexing. It does not detect number-of-iterations or out-of-bound access. This will require more involved analysis/heuristics. - I haved combined SH_VALIDATE_CONTROL_FLOW and SH_VALIDATE_INDEXING into one flag - SH_VALIDATE_LOOP_INDEXING. Validating both together is much easier. BUG=48 Review URL: http://codereview.appspot.com/3225041 git-svn-id: https://angleproject.googlecode.com/svn/trunk@491 736b8ea6-26fd-11df-bfd4-992fa37f6226
alokp@chromium.org 52813558 2010-11-16T18:36:09 Replaced TIntermLoop::testFirst with TIntermLoop::loopType to clearly indicate which type of loop it is. In some cases it is not possble to differentiate between a for-loop and while-loop. BUG=48 Review URL: http://codereview.appspot.com/3123041 git-svn-id: https://angleproject.googlecode.com/svn/trunk@482 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 8f0f24a0 2010-09-01T21:06:24 Removed support for unused/deprecated extension - GL_3DL_array_object. TEST=conformance tests. Review URL: http://codereview.appspot.com/2043043 git-svn-id: https://angleproject.googlecode.com/svn/trunk@412 736b8ea6-26fd-11df-bfd4-992fa37f6226
alokp@chromium.org 58e54298 2010-08-24T21:40:03 Cleanup TType and related classes: 1. Removed unused functions 2. Removed unnecessary virtuality of functions 3. Grouped related functions together TEST=conformance tests Review URL: http://codereview.appspot.com/1984047 git-svn-id: https://angleproject.googlecode.com/svn/trunk@400 736b8ea6-26fd-11df-bfd4-992fa37f6226
alokp@chromium.org 32cfaf4b 2010-08-23T21:01:13 TIntermBinary::promote() was incorrectly marking the type of result as const in some cases. The result can only be const if both operands are const. Also cleaned up the function to remove redundant/repeated checks. BUG=24 TEST=OpenGL ES 2.0 Conformance tests Review URL: http://codereview.appspot.com/1938047 git-svn-id: https://angleproject.googlecode.com/svn/trunk@385 736b8ea6-26fd-11df-bfd4-992fa37f6226
daniel@transgaming.com 9abe956e 2010-06-24T13:02:21 Removed the precision check creating spurious error messages TRAC #12641 The precision of compiler temporaries doesn't require checking, and would be hard to determine at parse time. We only require correct precisions for declarations, which is checked separately. So we can safely remove the check for binary operations. Signed-off-by: Daniel Koch Author: Nicolas Capens git-svn-id: https://angleproject.googlecode.com/svn/trunk@342 736b8ea6-26fd-11df-bfd4-992fa37f6226
alokp@chromium.org 1bcc3fd5 2010-05-19T17:08:44 Patching changes from thestig@chromium.org for fixing ANGLE build with gcc 4.4 on Karmic. The original CL is here: http://codereview.appspot.com/1255042/show The only changes I have maded is moved the inclusion of stdint.h from PoolAlloc.h to PoolAlloc.cpp with #ifndef _MSC_VER guard. Review URL: http://codereview.appspot.com/1220044 git-svn-id: https://angleproject.googlecode.com/svn/trunk@304 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
alokp@chromium.org 6ff56fd4 2010-05-05T16:37:50 Renamed constUnion class to ConstantUnion. Review URL: http://codereview.appspot.com/1106042 git-svn-id: https://angleproject.googlecode.com/svn/trunk@227 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 fe565159 2010-04-10T05:29:07 Implemented support for user-defined structures TRAC #11730 Signed-off-by: Andrew Lewycky Signed-off-by: Daniel Koch Author: Nicolas Capens git-svn-id: https://angleproject.googlecode.com/svn/trunk@116 736b8ea6-26fd-11df-bfd4-992fa37f6226
alokp@chromium.org 2cf1771f 2010-03-30T20:33:18 Removed tabs. Fixed formatting. Only white-space changes. Review URL: http://codereview.appspot.com/849043 git-svn-id: https://angleproject.googlecode.com/svn/trunk@89 736b8ea6-26fd-11df-bfd4-992fa37f6226
alokp@chromium.org dd037b2a 2010-03-30T18:47:20 Added support for user-defined structs. And fixed a bug in function return type. Review URL: http://codereview.appspot.com/849042 git-svn-id: https://angleproject.googlecode.com/svn/trunk@88 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