1. 25 Feb, 2015 4 commits
    • Hide gtest and gmock internal standalone targets. · 99a3a9b2
      Jamie Madill authored
      Don't expose these on the Chromium (non-standalone) build. This fixes
      some missing file warnings for the msvs-ninja build.
      
      BUG=angle:928
      BUG=459058
      
      Change-Id: I8932c31223347358070955b33995a3e973c359b7
      Reviewed-on: https://chromium-review.googlesource.com/253001Tested-by: 's avatarJamie Madill <jmadill@chromium.org>
      Reviewed-by: 's avatarbratell at Opera <bratell@opera.com>
      Reviewed-by: 's avatarKenneth Russell <kbr@chromium.org>
    • Disable the HLSL code in Angle if it is not being used. · 73941deb
      Daniel Bratell authored
      We're only using the HLSL code in Windows so
      it's not necessary to compile and distribute it on other platforms.
      
      This adds a defined ANGLE_ENABLE_HLSL that can be checked in files that
      are used by non-HLSL code as well. Mostly the HLSL code is just not
      include by the build system.
      
      Details of the space savings (heavily truncated)
      
      Total change: -165717 bytes
      ===========================
       -606 - Source: angle/src/common/utilities.cpp
       -627 - Source: angle/src/compiler/translator/FlagStd140Structs.cpp
       -695 - Source: /usr/include/c++/4.8/bits/stl_algo.h
       -710 - Source: angle/src/compiler/translator/TranslatorHLSL.cpp
       -713 - Source: angle/src/compiler/translator/IntermNode.h
       -863 - Source: /usr/include/c++/4.8/bits/stl_map.h
       -935 - Source: angle/src/compiler/translator/blocklayout.cpp
       -1515 - Source: angle/src/compiler/translator/BuiltInFunctionEmulator.cpp
       -1655 - Source: angle/src/compiler/translator/UnfoldShortCircuit.cpp
       -2375 - Source: /usr/include/c++/4.8/bits/vector.tcc
       -3135 - Source: angle/src/compiler/translator/RewriteElseBlocks.cpp
       -4656 - Source: angle/src/compiler/translator/UtilsHLSL.cpp
       -5265 - Source: angle/src/compiler/translator/BuiltInFunctionEmulatorHLSL.cpp
       -6505 - Source: /usr/include/c++/4.8/bits/stl_tree.h
       -11480 - Source: angle/src/compiler/translator/UniformHLSL.cpp
       -13580 - Source: angle/src/compiler/translator/StructureHLSL.cpp
       -18964 - Source: ??
          (constant strings and a few vtbls)
       -89332 - Source: angle/src/compiler/translator/OutputHLSL.cpp
      
      Change-Id: I23ccc98abd0a21f847dd34f9482800b3ba679d56
      Reviewed-on: https://chromium-review.googlesource.com/251528Tested-by: 's avatarbratell at Opera <bratell@opera.com>
      Reviewed-by: 's avatarJamie Madill <jmadill@chromium.org>
    • Add basic error checks for switch and case · 53f076fa
      Olli Etuaho authored
      Check that the case labels have constant scalar integers, and that switch
      statements are initialized with scalar integers. Also check that case and
      default labels do not exist outside switch statements. Allow break
      statements inside switch statements.
      
      Tested by manually disabling shading language version checks for switch
      in a Chromium build and checking that the expected errors are generated.
      
      BUG=angle:921
      
      Change-Id: Ibe83d0db52958c493ded5640d4babf670dc02d55
      Reviewed-on: https://chromium-review.googlesource.com/251523Reviewed-by: 's avatarZhenyao Mo <zmo@chromium.org>
      Reviewed-by: 's avatarJamie Madill <jmadill@chromium.org>
      Tested-by: 's avatarOlli Etuaho <oetuaho@nvidia.com>
    • Implement parsing switch statements · a3a36664
      Olli Etuaho authored
      Put in some groundwork for parsing switch statements and case labels in
      the parser, including definitions for IntermNode classes. Intermediate
      functions for adding the statements are stubbed to only generate errors
      for now.
      
      Tested by manually disabling shading language version checks for switch
      in a Chromium build and checking that the expected errors are generated.
      
      BUG=angle:921
      
      Change-Id: I064b3e0c4c1b724a083cf5bc78eebfdd3794eb1b
      Reviewed-on: https://chromium-review.googlesource.com/250380Reviewed-by: 's avatarOlli Etuaho <oetuaho@nvidia.com>
      Tested-by: 's avatarOlli Etuaho <oetuaho@nvidia.com>
  2. 24 Feb, 2015 3 commits
  3. 23 Feb, 2015 7 commits
  4. 20 Feb, 2015 4 commits
    • Disable warning 4251 for ShaderVars.h. · 4ebb82e5
      Jamie Madill authored
      Exporting STL classes from a DLL produces a warning on MSVS.
      This warning would only show up for component builds.
      
      Change-Id: I1bd9b820a45c04f92b0278d7018507d6a2bc7936
      Reviewed-on: https://chromium-review.googlesource.com/251704Reviewed-by: 's avatarJamie Madill <jmadill@chromium.org>
      Tested-by: 's avatarJamie Madill <jmadill@chromium.org>
    • Enable some more MSVS compiler warnings. · 0d300ca7
      Nico Weber authored
      Also add comments explaining why the one that are still around are still
      around.
      
      Change-Id: Id8ce1fa3fe2a3bc97a179018737cc8d027b1068a
      Reviewed-on: https://chromium-review.googlesource.com/250878Reviewed-by: 's avatarJamie Madill <jmadill@chromium.org>
      Tested-by: 's avatarNico Weber <thakis@chromium.org>
      Commit-Queue: Nico Weber <thakis@chromium.org>
    • Implement CompilerGL. · c415283b
      Geoff Lang authored
      BUG=angle:882
      
      Change-Id: I6fd426b19677b51f4df74d495acc9a6fde9822e8
      Reviewed-on: https://chromium-review.googlesource.com/251540Reviewed-by: 's avatarJamie Madill <jmadill@chromium.org>
      Reviewed-by: 's avatarBrandon Jones <bajones@chromium.org>
      Tested-by: 's avatarGeoff Lang <geofflang@chromium.org>
    • Make Angle code 40 KB smaller by using string literals directly. · 29190088
      Daniel Bratell authored
      The implicit conversion of hundreds of string literals
      to TString generated a lot of machine code. By keeping them
      as string literals all the way the code will be smaller and faster.
      
      This is the change with clang for x64 (note VisitUnary in particular):
      Total change: -41392 bytes
      ==========================
        2 added, totalling +469 bytes across 1 sources
        2 removed, totalling -472 bytes across 1 sources
        5 shrunk, for a net change of -41389 bytes (54126 bytes before, 12737 bytes after) across 1 sources
        279692 unchanged, totalling 51433327 bytes
      
      ------------------------------------------------------------------------------------------------------------------------------------
       -41392 - Source: /home/bratell/src/chromium/src/third_party/angle/src/compiler/translator/OutputHLSL.cpp - (gained 469, lost 41861)
      ------------------------------------------------------------------------------------------------------------------------------------
        New symbols:
             +328: sh::OutputHLSL::outputConstructor(Visit, TType const&, char const*, TVector<TIntermNode*> const*) type=t, size=328 bytes
             +141: sh::OutputHLSL::outputTriplet(Visit, char const*, char const*, char const*) type=t, size=141 bytes
        Removed symbols:
             -133: sh::OutputHLSL::outputTriplet(Visit, std::basic_string<char, std::char_traits<char>, pool_allocator<char> > const&, std::basic_string<char, std::char_traits<char>, pool_allocator<char> > const&, std::basic_string<char, std::char_traits<char>, pool_allocator<char> > const&) type=t, size=133 bytes
             -339: sh::OutputHLSL::outputConstructor(Visit, TType const&, std::basic_string<char, std::char_traits<char>, pool_allocator<char> > const&, TVector<TIntermNode*> const*) type=t, size=339 bytes
        Shrunk symbols:
             -388: sh::OutputHLSL::writeEmulatedFunctionTriplet(Visit, char const*) type=t, (was 628 bytes, now 240 bytes)
             -714: sh::OutputHLSL::visitBranch(Visit, TIntermBranch*) type=t, (was 1017 bytes, now 303 bytes)
            -9738: sh::OutputHLSL::visitAggregate(Visit, TIntermAggregate*) type=t, (was 17609 bytes, now 7871 bytes)
           -14132: sh::OutputHLSL::visitBinary(Visit, TIntermBinary*) type=t, (was 17627 bytes, now 3495 bytes)
           -16417: sh::OutputHLSL::visitUnary(Visit, TIntermUnary*) type=t, (was 17245 bytes, now 828 bytes)
      
      Change-Id: Id0f87d72f6d7f1ab7b543f0d28d5a8b7c7db9ec7
      Reviewed-on: https://chromium-review.googlesource.com/251090Reviewed-by: 's avatarGeoff Lang <geofflang@chromium.org>
      Tested-by: 's avatarbratell at Opera <bratell@opera.com>
  5. 19 Feb, 2015 8 commits
  6. 18 Feb, 2015 9 commits
  7. 17 Feb, 2015 5 commits