Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorClément Foucault <foucault.clem@gmail.com>2020-08-05 20:27:44 +0300
committerJeroen Bakker <jeroen@blender.org>2020-08-12 10:19:26 +0300
commitc15352dd67f551f559c40d7d5e0402dc6ec2e913 (patch)
tree125a776505419404dbb6790c338d24071eaa4e6e
parent0122615d36d505eff4be548dbc15c25d184514ab (diff)
Fix T79509 Workbench: Object color mode broken if more than 4096 objects
This was due to the new DRWShadingGroup not being saved and reused for the next objects.
-rw-r--r--source/blender/draw/engines/workbench/workbench_materials.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/source/blender/draw/engines/workbench/workbench_materials.c b/source/blender/draw/engines/workbench/workbench_materials.c
index 00638aa9f61..9d54d4c7e75 100644
--- a/source/blender/draw/engines/workbench/workbench_materials.c
+++ b/source/blender/draw/engines/workbench/workbench_materials.c
@@ -228,15 +228,15 @@ DRWShadingGroup *workbench_material_setup_ex(WORKBENCH_PrivateData *wpd,
workbench_material_ubo_data(wpd, ob, NULL, &wpd->material_ubo_data_curr[mat_id], color_type);
const bool transp = wpd->shading.xray_alpha < 1.0f || ob->color[3] < 1.0f;
- DRWShadingGroup *grp = wpd->prepass[transp][infront][hair].common_shgrp;
+ DRWShadingGroup **grp = &wpd->prepass[transp][infront][hair].common_shgrp;
if (resource_changed) {
- grp = DRW_shgroup_create_sub(grp);
- DRW_shgroup_uniform_block(grp, "material_block", wpd->material_ubo_curr);
+ *grp = DRW_shgroup_create_sub(*grp);
+ DRW_shgroup_uniform_block(*grp, "material_block", wpd->material_ubo_curr);
}
if (r_transp && transp) {
*r_transp = true;
}
- return grp;
+ return *grp;
}
}
}