diff options
author | Luca Rood <dev@lucarood.com> | 2017-05-23 19:11:50 +0300 |
---|---|---|
committer | Luca Rood <dev@lucarood.com> | 2017-05-23 19:39:22 +0300 |
commit | e1c4908771a6090ba2ba9d74d95965ee93779b11 (patch) | |
tree | ec0d33f607fb7935fc99e74741ddfecd60e6f684 /source/blender | |
parent | 9bc88b69d81fc1839733c0ffb7179fba22d9920c (diff) |
Temp fix for vertex format with batch instancing
This prevents memory alignment from being screwed up when attributes are
optimized out in shader.
Diffstat (limited to 'source/blender')
-rw-r--r-- | source/blender/draw/intern/draw_manager.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/source/blender/draw/intern/draw_manager.c b/source/blender/draw/intern/draw_manager.c index 5765a5a7292..f0f4564e8a4 100644 --- a/source/blender/draw/intern/draw_manager.c +++ b/source/blender/draw/intern/draw_manager.c @@ -642,6 +642,9 @@ static void DRW_interface_attrib(DRWShadingGroup *shgroup, const char *name, DRW attrib->type = type; attrib->size = size; +/* Adding attribute even if not found for now (to keep memory alignment). + * Should ideally take vertex format automatically from batch eventually */ +#if 0 if (attrib->location == -1 && !dummy) { if (G.debug & G_DEBUG) fprintf(stderr, "Attribute '%s' not found!\n", name); @@ -649,6 +652,7 @@ static void DRW_interface_attrib(DRWShadingGroup *shgroup, const char *name, DRW MEM_freeN(attrib); return; } +#endif BLI_assert(BLI_strnlen(name, 32) < 32); BLI_strncpy(attrib->name, name, 32); |