diff options
author | Clément Foucault <foucault.clem@gmail.com> | 2019-05-14 00:31:43 +0300 |
---|---|---|
committer | Clément Foucault <foucault.clem@gmail.com> | 2019-05-14 11:57:04 +0300 |
commit | 016fc7f0c238fae9904dd6f0e48bec3a06b691e6 (patch) | |
tree | d9d0e6a3c0216b0ce9feba8b9c693dc1770c03ef /source/blender/gpu/intern/gpu_batch.c | |
parent | 72a5e3f61a1478616a494d90bdcc565e20ee0858 (diff) |
GPUVertexFormat: Reduce size of structs
With this patch, the size of GPUVertFormat goes from 1240 to 388.
Diffstat (limited to 'source/blender/gpu/intern/gpu_batch.c')
-rw-r--r-- | source/blender/gpu/intern/gpu_batch.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/source/blender/gpu/intern/gpu_batch.c b/source/blender/gpu/intern/gpu_batch.c index 010f57bf5f8..45697befe50 100644 --- a/source/blender/gpu/intern/gpu_batch.c +++ b/source/blender/gpu/intern/gpu_batch.c @@ -370,7 +370,8 @@ static void create_bindings(GPUVertBuf *verts, const GLvoid *pointer = (const GLubyte *)0 + a->offset + v_first * stride; for (uint n_idx = 0; n_idx < a->name_len; ++n_idx) { - const GPUShaderInput *input = GPU_shaderinterface_attr(interface, a->name[n_idx]); + const char *name = GPU_vertformat_attr_name_get(format, a, n_idx); + const GPUShaderInput *input = GPU_shaderinterface_attr(interface, name); if (input == NULL) { continue; |