glsl: use ralloc_str_append() rather than ralloc_asprintf_rewrite_tail()
authorTimothy Arceri <tarceri@itsqueeze.com>
Wed, 9 Aug 2017 03:34:09 +0000 (13:34 +1000)
committerTimothy Arceri <tarceri@itsqueeze.com>
Fri, 11 Aug 2017 00:43:34 +0000 (10:43 +1000)
commitd4f79e995f180239c5d14e8493de9aac5a9e6833
tree39946f7f2d9ccfe6fa8e50681e23551804b9e568
parent26f4657c3f075045527c4568e8cbbaaa5d0b08e4
glsl: use ralloc_str_append() rather than ralloc_asprintf_rewrite_tail()

The Deus Ex: Mankind Divided shaders go from spending ~20 seconds
in the GLSL IR compilers front-end down to ~18.5 seconds on a
Ryzen 1800X.

Tested by compiling once with shader-db then deleting the index file
from the shader cache and compiling again.

v2:
 - fix rebasing issue in v1

Reviewed-by: Thomas Helland <thomashelland90@gmail.com>
src/compiler/glsl/glcpp/glcpp-parse.y