Hi; Here's the binary shader patch-set, I've fixed issues Paul found in the review earlier. There are lots of little changes but mainly:
- more validation done when reading, also a special validation structure is introduced to bail out early if things do not seem to match, reading checks that we are not attempting to read over the blob boundary - smaller blob size, now uniform storage is not serialized but gets generated as zero and constant initializer values are set if needed - each user glsl type is serialized only once (requested by Paul) - no more LinkShader call, now there is enough post-link information (this tested for Intel driver, others might require more) branch with changes: http://cgit.freedesktop.org/~tpalli/mesa/log/?h=oes_get_program_binary branch that automatically caches linked programs and loads them on link: http://cgit.freedesktop.org/~tpalli/mesa/log/?h=automatic_cache (experiment to validate the extension functionality with any app) I've been testing this set with a particular gles2 engine that supports binary caching. Also I've run automatic_cache on glbenchmark and some other random applications. I'm planning to make changes for Piglit shaderrunner to support cache so that Piglit could be used for the validation. I know that Paul is very busy ATM so I would appreciate if someone else has time to go through some of this, thanks! Tapani Pälli (10): glsl: memory_writer helper class for data serialization glsl: serialize methods for IR instructions glsl: memory_map helper class for data deserialization glsl: add MESA_SHADER_CACHE_MAGIC string for shader binary cache glsl: export populate_symbol_table function glsl: add MAX_NUM_STATE_SLOTS and check against builtin uniform variables glsl: ir_deserializer class for the binary shader cache mesa: iterate method for string_to_uint_map glsl: functions to serialize gl_shader and gl_shader_program mesa: OES_get_program_binary extension functionality src/glsl/Makefile.sources | 3 + src/glsl/builtin_variables.cpp | 3 + src/glsl/ir.h | 45 ++ src/glsl/ir_deserializer.cpp | 910 +++++++++++++++++++++++++++++++++++++++++ src/glsl/ir_deserializer.h | 133 ++++++ src/glsl/ir_serialize.cpp | 407 ++++++++++++++++++ src/glsl/ir_serialize.h | 36 ++ src/glsl/linker.cpp | 2 +- src/glsl/linker.h | 3 + src/glsl/memory_map.h | 171 ++++++++ src/glsl/memory_writer.h | 188 +++++++++ src/glsl/shader_cache.cpp | 734 +++++++++++++++++++++++++++++++++ src/glsl/shader_cache.h | 58 +++ src/glsl/shader_cache_magic.h | 36 ++ src/mesa/main/config.h | 4 + src/mesa/main/shaderapi.c | 47 ++- src/mesa/program/hash_table.h | 8 + 17 files changed, 2781 insertions(+), 7 deletions(-) create mode 100644 src/glsl/ir_deserializer.cpp create mode 100644 src/glsl/ir_deserializer.h create mode 100644 src/glsl/ir_serialize.cpp create mode 100644 src/glsl/ir_serialize.h create mode 100644 src/glsl/memory_map.h create mode 100644 src/glsl/memory_writer.h create mode 100644 src/glsl/shader_cache.cpp create mode 100644 src/glsl/shader_cache.h create mode 100644 src/glsl/shader_cache_magic.h -- 1.8.5.3 _______________________________________________ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev