diff options
author | Brecht Van Lommel <brechtvanlommel@gmail.com> | 2018-06-14 13:50:19 +0300 |
---|---|---|
committer | Brecht Van Lommel <brechtvanlommel@gmail.com> | 2018-06-14 16:46:43 +0300 |
commit | 14db989e733c71569cbc4240aef3b5909c3e0e18 (patch) | |
tree | 603ae5db08ae9ce3cbdd937aabe019ca8a57c8f4 /source/blender/gpu | |
parent | 39142103d96e198d78ebf1c21547ccfbd17ea3ce (diff) |
Cleanup: remove legacy GPU pass binding code.
Diffstat (limited to 'source/blender/gpu')
-rw-r--r-- | source/blender/gpu/intern/gpu_codegen.c | 71 | ||||
-rw-r--r-- | source/blender/gpu/intern/gpu_codegen.h | 4 |
2 files changed, 0 insertions, 75 deletions
diff --git a/source/blender/gpu/intern/gpu_codegen.c b/source/blender/gpu/intern/gpu_codegen.c index c1e1077e14c..436f43d9c1e 100644 --- a/source/blender/gpu/intern/gpu_codegen.c +++ b/source/blender/gpu/intern/gpu_codegen.c @@ -1194,77 +1194,6 @@ void GPU_nodes_extract_dynamic_inputs(GPUShader *shader, ListBase *inputs, ListB GPU_shader_unbind(); } -void GPU_pass_bind(GPUPass *pass, ListBase *inputs, double time, int mipmap) -{ - GPUInput *input; - GPUShader *shader = pass->shader; - - if (!shader) - return; - - GPU_shader_bind(shader); - - /* create the textures */ - for (input = inputs->first; input; input = input->next) { - if (input->ima) - input->tex = GPU_texture_from_blender(input->ima, input->iuser, input->textarget, input->image_isdata, time, mipmap); - else if (input->prv) - input->tex = GPU_texture_from_preview(input->prv, mipmap); - } - - /* bind the textures, in second loop so texture binding during - * create doesn't overwrite already bound textures */ - for (input = inputs->first; input; input = input->next) { - if (input->tex && input->bindtex) { - GPU_texture_bind(input->tex, input->texid); - GPU_shader_uniform_texture(shader, input->shaderloc, input->tex); - } - } -} - -void GPU_pass_update_uniforms(GPUPass *pass, ListBase *inputs) -{ - GPUInput *input; - GPUShader *shader = pass->shader; - - if (!shader) - return; - - /* pass dynamic inputs to opengl, others were removed */ - for (input = inputs->first; input; input = input->next) { - if (!(input->ima || input->tex || input->prv)) { - if (input->dynamictype == GPU_DYNAMIC_MAT_HARD) { - // The hardness is actually a short pointer, so we convert it here - float val = (float)(*(short *)input->dynamicvec); - GPU_shader_uniform_vector(shader, input->shaderloc, 1, 1, &val); - } - else { - GPU_shader_uniform_vector(shader, input->shaderloc, input->type, 1, - input->dynamicvec); - } - } - } -} - -void GPU_pass_unbind(GPUPass *pass, ListBase *inputs) -{ - GPUInput *input; - GPUShader *shader = pass->shader; - - if (!shader) - return; - - for (input = inputs->first; input; input = input->next) { - if (input->tex && input->bindtex) - GPU_texture_unbind(input->tex); - - if (input->ima || input->prv) - input->tex = NULL; - } - - GPU_shader_unbind(); -} - /* Node Link Functions */ static GPUNodeLink *GPU_node_link_create(void) diff --git a/source/blender/gpu/intern/gpu_codegen.h b/source/blender/gpu/intern/gpu_codegen.h index 04bee545a7e..a0f425e39d6 100644 --- a/source/blender/gpu/intern/gpu_codegen.h +++ b/source/blender/gpu/intern/gpu_codegen.h @@ -184,10 +184,6 @@ void GPU_nodes_extract_dynamic_inputs(struct GPUShader *shader, ListBase *inputs void GPU_nodes_get_vertex_attributes(ListBase *nodes, struct GPUVertexAttribs *attribs); void GPU_nodes_prune(ListBase *nodes, struct GPUNodeLink *outlink); -void GPU_pass_bind(GPUPass *pass, ListBase *inputs, double time, int mipmap); -void GPU_pass_update_uniforms(GPUPass *pass, ListBase *inputs); -void GPU_pass_unbind(GPUPass *pass, ListBase *inputs); - void GPU_pass_compile(GPUPass *pass); void GPU_pass_release(GPUPass *pass); void GPU_pass_free_nodes(ListBase *nodes); |