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/opengl/gl_shader_interface.cc')
-rw-r--r--source/blender/gpu/opengl/gl_shader_interface.cc9
1 files changed, 8 insertions, 1 deletions
diff --git a/source/blender/gpu/opengl/gl_shader_interface.cc b/source/blender/gpu/opengl/gl_shader_interface.cc
index 9cf072b2e8a..b2842020b25 100644
--- a/source/blender/gpu/opengl/gl_shader_interface.cc
+++ b/source/blender/gpu/opengl/gl_shader_interface.cc
@@ -145,7 +145,7 @@ static inline int ssbo_binding(int32_t program, uint32_t ssbo_index)
/** \name Creation / Destruction
* \{ */
-GLShaderInterface::GLShaderInterface(GLuint program)
+GLShaderInterface::GLShaderInterface(GLShaderPatcherContext &context, GLuint program)
{
/* Necessary to make #glUniform works. */
glUseProgram(program);
@@ -321,6 +321,13 @@ GLShaderInterface::GLShaderInterface(GLuint program)
// this->debug_print();
this->sort_inputs();
+
+ /* Push Constant Blocks */
+ /* Push constants are converted by GLShaderPatcher to regular uniform buffers. Here we retrieve
+ * the reference to its binding. */
+ if (context.push_constants.name) {
+ push_constant_input_ = ubo_get(context.push_constants.name->c_str());
+ }
}
GLShaderInterface::~GLShaderInterface()