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>2022-07-21 17:41:41 +0300
committerClément Foucault <foucault.clem@gmail.com>2022-07-21 17:41:51 +0300
commitef5b435e8fa3e244a5f68bdde999dea8e6b8bc92 (patch)
tree51e3ed5ce4c35b6bfebb78b93d54924f10f10724 /source/blender/draw
parentd431b1416b6eefa96d343a4d49c2871720393c7c (diff)
DRW: Volume: Fix crash in command line render caused by null textures
This was caused by the world volume shader needing placeholder textures that were not available until cache populate begins. Adding a check and creating on the fly fixes the issue.
Diffstat (limited to 'source/blender/draw')
-rw-r--r--source/blender/draw/intern/draw_volume.cc4
1 files changed, 4 insertions, 0 deletions
diff --git a/source/blender/draw/intern/draw_volume.cc b/source/blender/draw/intern/draw_volume.cc
index c4e58ab24cb..8f4383a98d8 100644
--- a/source/blender/draw/intern/draw_volume.cc
+++ b/source/blender/draw/intern/draw_volume.cc
@@ -89,6 +89,10 @@ void DRW_volume_free(void)
static GPUTexture *grid_default_texture(eGPUDefaultValue default_value)
{
+ if (g_data.dummy_one == nullptr) {
+ drw_volume_globals_init();
+ }
+
switch (default_value) {
case GPU_DEFAULT_0:
return g_data.dummy_zero;