From: Mikko Rasa Date: Thu, 17 Mar 2022 19:56:40 +0000 (+0200) Subject: Sort shader program input attributes by name X-Git-Url: http://git.tdb.fi/?a=commitdiff_plain;h=0d94309bc07629feea62bd03837b6e21ccc15b6f;p=libs%2Fgl.git Sort shader program input attributes by name The lookup requires this. It seems to have gotten broken in 2576b61, but since the only user is InstanceArray, it wasn't noticed until now. --- diff --git a/source/backends/opengl/program_backend.cpp b/source/backends/opengl/program_backend.cpp index e83a9484..ce865cf3 100644 --- a/source/backends/opengl/program_backend.cpp +++ b/source/backends/opengl/program_backend.cpp @@ -444,6 +444,8 @@ void OpenGLProgram::query_attributes() info.type = from_gl_type(type); } } + + sort_member(reflect_data.attributes, &ReflectData::AttributeInfo::name); } void OpenGLProgram::finalize_uniforms() diff --git a/source/core/program.cpp b/source/core/program.cpp index f8c35ec5..a82ac1d2 100644 --- a/source/core/program.cpp +++ b/source/core/program.cpp @@ -193,6 +193,8 @@ void Program::collect_attributes(const SpirVModule &mod) info.type = v->type; } } + + sort_member(reflect_data.attributes, &ReflectData::AttributeInfo::name); } void Program::collect_builtins(const SpirVModule &mod)