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:
authorClément Foucault <foucault.clem@gmail.com>2020-06-02 19:14:28 +0300
committerClément Foucault <foucault.clem@gmail.com>2020-06-03 00:44:22 +0300
commita1f9eebc0b5f0e9a5683ecfcb0e79bac74d1ca14 (patch)
treedfb054a33d1cbedec75c8264b265c6f980b46af8 /source/blender/gpu/GPU_shader.h
parent47eccac21c173440ab3e26954babe2e9a6165f57 (diff)
DRW: Remove automatic bind locations and use hardcoded locations for textures
This cleanup use the recent changes in shader interface to allow querying the binding location a texture should use. This should aleviate all issue we have with texture state change recompiling the shaders at drawtime. All binds are now treated like persistent binds and will stick until a new shading group bind a different shader. The only difference is that you can still change it with a new subgroup or same shader shgroup. Since unbinding can be heavy we only do it when using `--debug-gpu`.
Diffstat (limited to 'source/blender/gpu/GPU_shader.h')
-rw-r--r--source/blender/gpu/GPU_shader.h6
1 files changed, 4 insertions, 2 deletions
diff --git a/source/blender/gpu/GPU_shader.h b/source/blender/gpu/GPU_shader.h
index baf3fb99974..40bae88f46d 100644
--- a/source/blender/gpu/GPU_shader.h
+++ b/source/blender/gpu/GPU_shader.h
@@ -94,13 +94,15 @@ void GPU_shader_set_srgb_uniform(const struct GPUShaderInterface *interface);
int GPU_shader_get_uniform(GPUShader *shader, const char *name);
int GPU_shader_get_builtin_uniform(GPUShader *shader, int builtin);
int GPU_shader_get_uniform_block(GPUShader *shader, const char *name);
+
+int GPU_shader_get_uniform_block_binding(GPUShader *shader, const char *name);
+int GPU_shader_get_texture_binding(GPUShader *shader, const char *name);
+
void GPU_shader_uniform_vector(
GPUShader *shader, int location, int length, int arraysize, const float *value);
void GPU_shader_uniform_vector_int(
GPUShader *shader, int location, int length, int arraysize, const int *value);
-void GPU_shader_uniform_buffer(GPUShader *shader, int location, struct GPUUniformBuffer *ubo);
-void GPU_shader_uniform_texture(GPUShader *shader, int location, struct GPUTexture *tex);
void GPU_shader_uniform_float(GPUShader *shader, int location, float value);
void GPU_shader_uniform_int(GPUShader *shader, int location, int value);