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_shader.cc')
-rw-r--r--source/blender/gpu/intern/gpu_shader.cc6
1 files changed, 5 insertions, 1 deletions
diff --git a/source/blender/gpu/intern/gpu_shader.cc b/source/blender/gpu/intern/gpu_shader.cc
index b71f46fb3fc..048f4582f43 100644
--- a/source/blender/gpu/intern/gpu_shader.cc
+++ b/source/blender/gpu/intern/gpu_shader.cc
@@ -59,6 +59,7 @@ Shader::Shader(const char *sh_name)
Shader::~Shader()
{
delete interface;
+ delete m_shader_struct;
}
static void standard_defines(Vector<const char *> &sources)
@@ -110,6 +111,9 @@ GPUShader *GPU_shader_create_ex(const char *vertcode,
(computecode != nullptr)));
Shader *shader = GPUBackend::get()->shader_alloc(shname);
+ if (uniform_struct_type != GPU_UNIFORM_STRUCT_NONE) {
+ shader->set_shader_struct(uniform_struct_type);
+ }
if (vertcode) {
Vector<const char *> sources;
@@ -211,7 +215,7 @@ void GPU_shader_free(GPUShader *shader)
/* -------------------------------------------------------------------- */
/** \name Creation utils
* \{ */
-
+
GPUShader *GPU_shader_create(const char *vertcode,
const char *fragcode,
const char *geomcode,