Mesa (master): mesa: glProgramBinary add resource_hash

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Mon Dec 28 12:40:45 UTC 2020


Module: Mesa
Branch: master
Commit: a7be48bdae90d7087df4d2e4d5261c37767395c9
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=a7be48bdae90d7087df4d2e4d5261c37767395c9

Author: cheyang <cheyang at bytedance.com>
Date:   Fri Dec 25 16:20:43 2020 +0800

mesa: glProgramBinary add resource_hash

reduce search time(E.g glGetUniformLocation) when use glProgramBinary

Signed-off-by: cheyang <cheyang at bytedance.com>
Reviewed-by: Tapani Pälli <tapani.palli at intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8238>

---

 src/mesa/main/program_binary.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/src/mesa/main/program_binary.c b/src/mesa/main/program_binary.c
index 8c2db255246..536201694c3 100644
--- a/src/mesa/main/program_binary.c
+++ b/src/mesa/main/program_binary.c
@@ -301,6 +301,8 @@ _mesa_program_binary(struct gl_context *ctx, struct gl_shader_program *sh_prog,
       return;
    }
 
+   _mesa_create_program_resource_hash(sh_prog);
+
    /* From section 7.3 (Program Objects) of the OpenGL 4.5 spec:
     *
     *    "If LinkProgram or ProgramBinary successfully re-links a program



More information about the mesa-commit mailing list