glsl: use remap location when serialising uniform program resource data
authorTimothy Arceri <tarceri@itsqueeze.com>
Mon, 28 Jan 2019 06:15:34 +0000 (17:15 +1100)
committerTimothy Arceri <tarceri@itsqueeze.com>
Mon, 28 Jan 2019 22:39:54 +0000 (09:39 +1100)
commitfb78a6cb72270de271f75d6f6c9b5ebadba7a898
treec238bbbacae7da7309e269ee9bc64ef60866e180
parentbe5b271ea76d81d32e3dc490ef5b32a61c3fb965
glsl: use remap location when serialising uniform program resource data

This allows us to avoid expensive string compares since we already have
a map to the pointers.

These compares were taking ~30 seconds for a single shader compile
in Godot due to it using 64,000+ uniforms.

Fixes: c4cff5f40254 ("glsl: add basic support for resource list to shader cache")
Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=109229
src/compiler/glsl/serialize.cpp