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>2019-01-16 06:41:27 +0300
committerClément Foucault <foucault.clem@gmail.com>2019-01-17 21:44:01 +0300
commit4c9589909807f346e23966379f240dd57d057a1d (patch)
tree40bad4807d5b5cdd5e632f00562477bf7bb7754c /source/blender/python/gpu
parent938b08b33654f6bc3419519fc364021115d19dba (diff)
GPU: Rename GPU_shader_get_uniform to GPU_shader_get_uniform_ensure
This is in order to make the API more multithread friendly inside the draw manager. GPU_shader_get_uniform will only serve to query the shader interface and not do any GL call, making it threadsafe. For now it only print a warning if the uniform was not queried before.
Diffstat (limited to 'source/blender/python/gpu')
-rw-r--r--source/blender/python/gpu/gpu_py_shader.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/source/blender/python/gpu/gpu_py_shader.c b/source/blender/python/gpu/gpu_py_shader.c
index 52fe6f2d912..31e1ccf6f8c 100644
--- a/source/blender/python/gpu/gpu_py_shader.c
+++ b/source/blender/python/gpu/gpu_py_shader.c
@@ -86,7 +86,7 @@ success:
static int bpygpu_uniform_location_get(GPUShader *shader, const char *name, const char *error_prefix)
{
- int uniform = GPU_shader_get_uniform(shader, name);
+ int uniform = GPU_shader_get_uniform_ensure(shader, name);
if (uniform == -1) {
PyErr_Format(PyExc_ValueError, "%s: uniform %.32s %.32s not found", error_prefix, name);