1. 10 Apr, 2018 4 commits
  2. 09 Apr, 2018 6 commits
  3. 07 Apr, 2018 3 commits
  4. 06 Apr, 2018 3 commits
  5. 05 Apr, 2018 8 commits
  6. 04 Apr, 2018 14 commits
  7. 03 Apr, 2018 2 commits
    • Fix potential bad access in LinkProgram. · 6bc264ae
      Jamie Madill authored
      This could happen when linking a program with missing attachments
      and shaders that have no compiled sources.
      
      Also re-enables the EGL program cache control tests, which were
      disabled due to a wrong extension name check.
      
      Bug: chromium:827158
      Change-Id: I181f878093c6e3a4acc51552ade8e7c084733a3d
      Reviewed-on: https://chromium-review.googlesource.com/989262Reviewed-by: 's avatarLuc Ferron <lucferron@chromium.org>
      Commit-Queue: Jamie Madill <jmadill@chromium.org>
    • Collect static use information during parsing · 94bbed1e
      Olli Etuaho authored
      We now collect metadata for variables in the symbol table. The
      metadata is stored in a map using the variable unique id as a key, so
      we can store the variables themselves as constexpr while still having
      dynamic metadata.
      
      For now we collect whether a variable is statically read or written.
      This can be used to more accurately determine whether a variable is
      statically used, but can also enable more optimizations in the future,
      such as pruning variables that are never read or folding variables
      that are never written after initialization. The collection is done
      during parsing, so that nothing is pruned from the AST before the
      static use is recorded.
      
      Static writes are flagged in ParseContext::checkCanBeLValue, as that
      function is already called for all variables that are written.
      
      Static reads are flagged whenever there's an operation that requires
      a variable to be read. This includes:
      * Unary and binary math ops
      * Comma ops
      * Ternary ops
      * Assignments
      * Returning the variable
      * Passing the variable as an in or inout argument to a function
      * Using the variable as a constructor argument
      * Using the variable as an if statement condition
      * Using the variable as a loop condition or expression
      * Using the variable as an index
      * Using the variable as a switch statement init expression
      
      In case there are statements that simply refer to a variable without
      doing operations on it, the variable is being treated as statically
      read. Examples of such statements:
      
      my_var;
      my_arr[2];
      
      These are a bit of a corner case, but it makes sense to treat them as
      static use for validation purposes.
      
      Collecting correct static use information costs us a bit of compiler
      performance, but the regression is on the order of just a few percent
      in the compiler perf tests.
      
      BUG=angleproject:2262
      TEST=angle_unittests, angle_end2end_tests
      
      Change-Id: Ib0d7add7e4a7d11bffeb2a4861eeea982c562234
      Reviewed-on: https://chromium-review.googlesource.com/977964Reviewed-by: 's avatarCorentin Wallez <cwallez@chromium.org>
      Commit-Queue: Olli Etuaho <oetuaho@nvidia.com>