glcpp: Skip unnecessary line continuations removal
authorVladislav Egorov <vegorov180@gmail.com>
Sun, 21 May 2017 20:49:17 +0000 (22:49 +0200)
committerTimothy Arceri <tarceri@itsqueeze.com>
Mon, 22 May 2017 02:34:28 +0000 (12:34 +1000)
commit4a47247523e678a3a9d3939e8a3c217188b99452
treeff701ebd659f0b3efb1f5c450ff72a3d28a023c3
parentb8e792ee25e01ce1e9e4f3ed444f8e1ade8c992e
glcpp: Skip unnecessary line continuations removal

Overwhelming majority of shaders don't use line continuations. In my
shader-db only shaders from the Talos Principle and Serious Sam used
them, less than 1% out of all shaders. Optimize for this case, don't
do any copying if no line continuation was found.

Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
src/compiler/glsl/glcpp/pp.c