[Mesa-dev] [PATCH] _mesa_glsl_parse_state change

Tapani Pälli tapani.palli at intel.com
Wed Feb 12 03:58:13 PST 2014


Hi;

I've been modifying Piglit to use my shader cache under its hood and started 
to see issues to fix within cache. This patch fixes a problem that cache has 
with glsl extensions. During deserialization cache creates a 
 _mesa_glsl_parse_state that is used to find builtin glsl types. But without 
extension bits enabled any type introduced by extension does not exist and 
toggling them on one by one is painful. Patch moves enable bits in to a single 
struct that is easy to toggle. No functionality change, no Piglit regressions.

This patch is used in shader cache branch here:
http://cgit.freedesktop.org/~tpalli/mesa/log/?h=oes_get_program_binary_exp

With this branch and my Piglit changes I can run succesfully tests using types 
introduced by glsl extensions with cached binaries. For example copyteximage 
that utilizes GL_EXT_texture_array.


Tapani Pälli (1):
  glsl: pack extension enable bits in parse state to a struct

 src/glsl/ast_function.cpp            |  2 +-
 src/glsl/ast_to_hir.cpp              | 20 ++++-----
 src/glsl/builtin_functions.cpp       | 58 +++++++++++++-------------
 src/glsl/builtin_types.cpp           | 14 +++----
 src/glsl/builtin_variables.cpp       | 22 +++++-----
 src/glsl/glsl_lexer.ll               | 44 ++++++++++----------
 src/glsl/glsl_parser.yy              | 32 +++++++--------
 src/glsl/glsl_parser_extras.cpp      | 12 +++---
 src/glsl/glsl_parser_extras.h        | 80 ++++++++++++++++++++----------------
 src/glsl/hir_field_selection.cpp     |  6 +--
 src/mesa/main/ff_fragment_shader.cpp |  2 +-
 11 files changed, 151 insertions(+), 141 deletions(-)

-- 
1.8.3.1



More information about the mesa-dev mailing list