diff options
author | Clément Foucault <foucault.clem@gmail.com> | 2019-01-16 06:41:27 +0300 |
---|---|---|
committer | Clément Foucault <foucault.clem@gmail.com> | 2019-01-17 21:44:01 +0300 |
commit | 4c9589909807f346e23966379f240dd57d057a1d (patch) | |
tree | 40bad4807d5b5cdd5e632f00562477bf7bb7754c /source/blender/gpu/GPU_shader_interface.h | |
parent | 938b08b33654f6bc3419519fc364021115d19dba (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/gpu/GPU_shader_interface.h')
-rw-r--r-- | source/blender/gpu/GPU_shader_interface.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/source/blender/gpu/GPU_shader_interface.h b/source/blender/gpu/GPU_shader_interface.h index af89e487cf8..0559a72e52c 100644 --- a/source/blender/gpu/GPU_shader_interface.h +++ b/source/blender/gpu/GPU_shader_interface.h @@ -94,6 +94,7 @@ GPUShaderInterface *GPU_shaderinterface_create(int32_t program_id); void GPU_shaderinterface_discard(GPUShaderInterface *); const GPUShaderInput *GPU_shaderinterface_uniform(const GPUShaderInterface *, const char *name); +const GPUShaderInput *GPU_shaderinterface_uniform_ensure(const GPUShaderInterface *, const char *name); const GPUShaderInput *GPU_shaderinterface_uniform_builtin(const GPUShaderInterface *, GPUUniformBuiltin); const GPUShaderInput *GPU_shaderinterface_ubo(const GPUShaderInterface *, const char *name); const GPUShaderInput *GPU_shaderinterface_attr(const GPUShaderInterface *, const char *name); |