OSDN Git Service

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)
committerEmil Velikov <emil.l.velikov@gmail.com>
Tue, 29 Jan 2019 17:44:27 +0000 (17:44 +0000)
commit3b9e9e4723106dc0e8f3fb049026f3ef66f4f6c0
tree2a1e20000319a0926030da55d1a4a23dd4063cba
parent12586d58462aabce553dc09070c95cc6b51e1ce7
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
(cherry picked from commit fb78a6cb72270de271f75d6f6c9b5ebadba7a898)
src/compiler/glsl/serialize.cpp