src/compiler/intermediate.h


Log

Author Commit Date CI Message
daniel@transgaming.com b3077d08 2013-01-11T04:12:09 Upstream various build fixes from WebKit to ANGLE to make updating ANGLE in WebKit easier. a) http://trac.webkit.org/changeset/127747 b) http://trac.webkit.org/changeset/128539 c) http://trac.webkit.org/changeset/122870 - Specifically, items #3 and #4 in this changeset's commit message. Review URL: https://codereview.appspot.com/7040045 Author: maxvujovic@gmail.com ------ Upodate preprocessor.vcxproj to reflect changes in r1640. Review URL: https://codereview.appspot.com/7061044 git-svn-id: https://angleproject.googlecode.com/svn/branches/dx11proto@1703 736b8ea6-26fd-11df-bfd4-992fa37f6226
daniel@transgaming.com 4167cc91 2013-01-11T04:11:53 Incorporated BSD-licensed changes implementing array bounds clamping. BUG=none TEST=ran associated WebKit layout tests in Chromium Review URL: https://codereview.appspot.com/6999052 git-svn-id: https://angleproject.googlecode.com/svn/branches/dx11proto@1701 736b8ea6-26fd-11df-bfd4-992fa37f6226
daniel@transgaming.com 3ca980a3 2012-12-20T21:11:52 Add utility methods for determining register count. TRAC #22293 Signed-off-by: Daniel Koch Signed-off-by: Shannon Woods Author: Nicolas Capens git-svn-id: https://angleproject.googlecode.com/svn/branches/dx11proto@1621 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
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 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
maxvujovic@gmail.com 66ebd014 2012-05-30T22:18:11 Add the SH_TIMING_RESTRICTIONS compile flag and dependency graph implementation. Description of the algorithm: http://code.google.com/p/mvujovic/wiki/ShaderControlFlowAnalysis This flag is one potential solution to timing attacks on textures containing cross-domain content or user agent data. This kind of analysis could be useful for both WebGL and CSS Shaders. The SH_TIMING_RESTRICTIONS flag will reject a shader if it uses texture dependent data to affect control flow. Other ways of affecting shader timing such as using NaNs in basic arithmetic operations or using built-in functions (e.g. atan) with different inputs are still under investigation. Issue=329 Review URL: http://codereview.appspot.com/6195062/ git-svn-id: https://angleproject.googlecode.com/svn/trunk@1101 736b8ea6-26fd-11df-bfd4-992fa37f6226
zmo@google.com f420c424 2011-09-12T18:27:59 Add/remove more functions to use shims. Remove normalize and add cos instead to avoid a crash in Mac with ATI cards (angle bug 193, 202). Also add atan and mod as it's also buggy on Mac/Win with NVIDIA cards. Also, trying to minimize emulated functions by adding masks for fragment/vertex shaders. ANGLEBUG=196 Review URL: http://codereview.appspot.com/4992047 git-svn-id: https://angleproject.googlecode.com/svn/trunk@748 736b8ea6-26fd-11df-bfd4-992fa37f6226
zmo@google.com e4eb9911 2011-08-29T21:13:12 Fix a bug introduced in r738. ANGLEBUG=201 TEST=chrome gpu bots green, no complaint from Firefox/Benoit Review URL: http://codereview.appspot.com/4956050 git-svn-id: https://angleproject.googlecode.com/svn/trunk@740 736b8ea6-26fd-11df-bfd4-992fa37f6226
zmo@google.com 32e97315 2011-08-24T01:03:11 Emulate certain buil-in functions to work around driver bugs. This is implemented by adding a new compile option SH_EMULATE_BUILT_IN_FUNCTIONS. The emulated functions are names as webgl_originalName_emu so there will never be naming conflicts. At the moment only three functions are emulated: normalize, abs, sign. Also, the compile option will emulate all three. However, the mechanism to emulate only a selected subset is also imeplemented. It can be turned on easily. ANGLEBUG=196 TEST=with this option, the failed test with abs.frag passes. Review URL: http://codereview.appspot.com/4916043 git-svn-id: https://angleproject.googlecode.com/svn/trunk@738 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
zmo@google.com 0b8d4eb2 2011-04-04T19:17:11 Unroll for-loop if sampler array uses loop index as its index. If inside a for-loop, sampler array index is the loop index, Mac cg compiler will crash. This CL unroll the loop in such situation. The behavior is: 1) If the for-loop index is a float, we reject the shader. 2) If it is an integer, we unroll the for-loop. Things that should be done in the future are: 1) Add line number macros. 2) Add a limit to unroll iteration count. anglebug=94 Review URL: http://codereview.appspot.com/4331048 git-svn-id: https://angleproject.googlecode.com/svn/trunk@606 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 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 b19403a1 2010-09-08T17:56:26 Removed unnecessary member variables from TIntermAggregate. Replaced operator overloading with a proper function in TFunction. Review URL: http://codereview.appspot.com/2137043 git-svn-id: https://angleproject.googlecode.com/svn/trunk@414 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 06098890 2010-08-26T19:36:42 Allow derivative functions if derivative extension is enabled. I still need to add validation for "#extension GL_OES_standard_derivatives : enable". BUG=25 Review URL: http://codereview.appspot.com/1965045 git-svn-id: https://angleproject.googlecode.com/svn/trunk@403 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 d88b7736 2010-05-26T15:13:14 Do not write extraneous semi-colons - some glsl compilers are do not like that even though it is so easy to ignore. Review URL: http://codereview.appspot.com/1301041 git-svn-id: https://angleproject.googlecode.com/svn/trunk@317 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 d91cfe7e 2010-04-13T03:26:17 Implemented struct equality TRAC #11727 Signed-off-by: Shannon Woods Signed-off-by: Daniel Koch Author: Nicolas Capens git-svn-id: https://angleproject.googlecode.com/svn/trunk@127 736b8ea6-26fd-11df-bfd4-992fa37f6226
daniel@transgaming.com d1acd1ed 2010-04-13T03:25:57 Implemented function prototyping and in/out parameters TRAC #11725 Signed-off-by: Shannon Woods Signed-off-by: Daniel Koch Author: Nicolas Capens git-svn-id: https://angleproject.googlecode.com/svn/trunk@120 736b8ea6-26fd-11df-bfd4-992fa37f6226
daniel@transgaming.com 4a35ef2d 2010-04-08T03:51:06 Break up loops with over 255 iterations. TRAC# 11724 fixes acos/asin conformance Signed-off-by: Shannon Woods Signed-off-by: Daniel Koch Author: Nicolas Capens git-svn-id: https://angleproject.googlecode.com/svn/trunk@105 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
alokp@chromium.org 60fe407c 2010-03-29T20:58:29 Added TIntermSelection::usesTernaryOperator() to distinguish between selection nodes using ternary operator and if-else. Used in both OutputGLSL and OutputHLSL. Review URL: http://codereview.appspot.com/830042 git-svn-id: https://angleproject.googlecode.com/svn/trunk@82 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