GPUVertexFormat: Reduce size of structs

With this patch, the size of GPUVertFormat goes from 1240 to 388.
This commit is contained in:
2019-05-13 23:31:43 +02:00
parent 72a5e3f61a
commit 016fc7f0c2
6 changed files with 63 additions and 104 deletions

View File

@@ -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;