[Feat] (MG_State/Program): retrieve/generate layout location from/for program, and retrieve generated ubo size and all the offsets of members

This commit is contained in:
2025-08-13 23:14:22 +08:00
parent b7d5de7ce0
commit df444655e3
8 changed files with 102 additions and 3 deletions
@@ -84,6 +84,7 @@ namespace MobileGL {
if (strcmp(list[i].name, GLOBAL_UBO_NAME) == 0) {
spvc_type type = spvc_compiler_get_type_handle(compiler, list[i].base_type_id);
spvc_compiler_get_declared_struct_size(compiler, type, &metadata.uboSize);
size_t num_members = spvc_type_get_num_member_types(type);
for (size_t j = 0; j < num_members; ++j) {
const char* memberName = spvc_compiler_get_member_name(compiler, list[i].base_type_id, j);