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:
Diffstat (limited to 'source/blender/gpu/intern/gpu_codegen.c')
-rw-r--r--source/blender/gpu/intern/gpu_codegen.c8
1 files changed, 3 insertions, 5 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);