diff options
author | Martijn Versteegh <Baardaap> | 2022-07-15 12:22:10 +0300 |
---|---|---|
committer | Clément Foucault <foucault.clem@gmail.com> | 2022-07-15 12:23:26 +0300 |
commit | 8e1323f6330937a964c3776431bab02c2cfb6e2f (patch) | |
tree | 7a5b56cf452beea0c1f54e5e600078e67d2599ed /source/blender/draw/engines/eevee | |
parent | f4d7ea2cf61ed30ac15adc7966a08f61846d6f46 (diff) |
Fix: Move DRW_shgroup_add_material_resources(grp, mat) to after the null-check for grp.
Reviewed By: fclem
Maniphest Tasks: T99646
Differential Revision: https://developer.blender.org/D15436
Diffstat (limited to 'source/blender/draw/engines/eevee')
-rw-r--r-- | source/blender/draw/engines/eevee/eevee_volumes.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/source/blender/draw/engines/eevee/eevee_volumes.c b/source/blender/draw/engines/eevee/eevee_volumes.c index 8223df22ee9..533e71b9b32 100644 --- a/source/blender/draw/engines/eevee/eevee_volumes.c +++ b/source/blender/draw/engines/eevee/eevee_volumes.c @@ -316,12 +316,13 @@ void EEVEE_volumes_cache_object_add(EEVEE_ViewLayerData *sldata, DRWShadingGroup *grp = DRW_shgroup_create(sh, vedata->psl->volumetric_objects_ps); grp = DRW_shgroup_volume_create_sub(scene, ob, grp, mat); - DRW_shgroup_add_material_resources(grp, mat); if (grp == NULL) { return; } + DRW_shgroup_add_material_resources(grp, mat); + /* TODO(fclem): remove those "unnecessary" UBOs */ DRW_shgroup_uniform_block(grp, "planar_block", sldata->planar_ubo); DRW_shgroup_uniform_block(grp, "probe_block", sldata->probe_ubo); |