1. 19 Aug, 2015 1 commit
    • Add full support for line continuation in the preprocessor · 26e355b8
      Olli Etuaho authored
      Re-landing earlier change with constant signedness fixed (was causing
      build issues on Linux).
      
      Line continuation in ESSL 3.00 needs to be processed before tokenization,
      since tokens can span the line continuation. On the other hand, ANGLE's
      tokenizer keeps track of line numbers, and whenever a line continuation
      appears the line number still needs to be incremented by one, just like
      on a regular newline.
      
      That's why line continuation is now implemented as follows: when the
      shader strings are concatenated in Input, they are also checked for line
      continuation. Whenever line continuation is encountered, the string
      is cut before that point. When the tokenizer asks for more input, the
      string starting from the character after line continuation is passed
      to it, and the line number is incremented from Input. This way the
      tokenizer can parse tokens that span multiple lines - it never sees the
      line continuation - but still keeps track of the line number correctly.
      
      Relevant spec is in ESSL 3.00 section 3.2 "Source strings".
      
      Support for line continuation also applies to ESSL 1.00. ESSL 3.00
      spec section 1.5 says that line continuation support is mandated when
      an ESSL 1.00 shader is used with the OpenGL ES 3.0 API, and is optional
      when ESSL 1.00 is used with the OpenGL ES 2.0 API.
      
      TEST=dEQP-GLES3.functional.shaders.preprocessor.line_continuation.*
           (all pass),
           angle_unittests
      BUG=angleproject:1125
      
      Change-Id: Ic086aacac53cd75bf93c0fda782416501d2f842b
      Reviewed-on: https://chromium-review.googlesource.com/294200Reviewed-by: 's avatarJamie Madill <jmadill@chromium.org>
      Tested-by: 's avatarOlli Etuaho <oetuaho@nvidia.com>
  2. 18 Aug, 2015 16 commits
  3. 17 Aug, 2015 8 commits
  4. 14 Aug, 2015 7 commits
  5. 13 Aug, 2015 8 commits