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.
This commit is contained in:
@@ -428,9 +428,9 @@ void GPU_batch_program_use_end(GPUBatch *batch)
|
||||
}
|
||||
|
||||
#if TRUST_NO_ONE
|
||||
# define GET_UNIFORM const GPUShaderInput *uniform = GPU_shaderinterface_uniform(batch->interface, name); assert(uniform);
|
||||
# define GET_UNIFORM const GPUShaderInput *uniform = GPU_shaderinterface_uniform_ensure(batch->interface, name); assert(uniform);
|
||||
#else
|
||||
# define GET_UNIFORM const GPUShaderInput *uniform = GPU_shaderinterface_uniform(batch->interface, name);
|
||||
# define GET_UNIFORM const GPUShaderInput *uniform = GPU_shaderinterface_uniform_ensure(batch->interface, name);
|
||||
#endif
|
||||
|
||||
void GPU_batch_uniform_1ui(GPUBatch *batch, const char *name, int value)
|
||||
|
||||
Reference in New Issue
Block a user