diff options
Diffstat (limited to 'source/blender/gpu')
-rw-r--r-- | source/blender/gpu/intern/gpu_codegen.c | 8 | ||||
-rw-r--r-- | source/blender/gpu/intern/gpu_material.c | 4 |
2 files changed, 5 insertions, 7 deletions
diff --git a/source/blender/gpu/intern/gpu_codegen.c b/source/blender/gpu/intern/gpu_codegen.c index a7dd34a5f96..3f7a5962efc 100644 --- a/source/blender/gpu/intern/gpu_codegen.c +++ b/source/blender/gpu/intern/gpu_codegen.c @@ -38,6 +38,8 @@ #include "BLI_ghash.h" #include "BLI_threads.h" +#include "BKE_material.h" + #include "PIL_time.h" #include "GPU_extensions.h" @@ -384,11 +386,7 @@ void gpu_codegen_init(void) void gpu_codegen_exit(void) { - extern Material defmaterial; /* render module abuse... */ - - if (defmaterial.gpumaterial.first) { - GPU_material_free(&defmaterial.gpumaterial); - } + BKE_material_defaults_free_gpu(); if (FUNCTION_HASH) { BLI_ghash_free(FUNCTION_HASH, NULL, MEM_freeN); diff --git a/source/blender/gpu/intern/gpu_material.c b/source/blender/gpu/intern/gpu_material.c index 2e3a0a8df27..2f52aea2c91 100644 --- a/source/blender/gpu/intern/gpu_material.c +++ b/source/blender/gpu/intern/gpu_material.c @@ -40,6 +40,7 @@ #include "BLI_ghash.h" #include "BKE_main.h" +#include "BKE_material.h" #include "BKE_node.h" #include "BKE_scene.h" @@ -778,7 +779,6 @@ void GPU_materials_free(Main *bmain) { Material *ma; World *wo; - extern Material defmaterial; for (ma = bmain->materials.first; ma; ma = ma->id.next) { GPU_material_free(&ma->gpumaterial); @@ -788,5 +788,5 @@ void GPU_materials_free(Main *bmain) GPU_material_free(&wo->gpumaterial); } - GPU_material_free(&defmaterial.gpumaterial); + BKE_material_defaults_free_gpu(); } |