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>2022-09-01 14:35:04 +0300
committerClément Foucault <foucault.clem@gmail.com>2022-09-01 15:41:00 +0300
commitba1bf87bd8f13fa2c67c435eb4a31a0c898d65ac (patch)
tree09281e081767384b2b3f6ad0d3f72c38f8a96daa /source/blender/gpu/intern/gpu_material.c
parent06005b0870be9a0a3b73b4c388c26988f1f991d2 (diff)
GPUMaterial: Make uniform attrib precompute hash and attribute safe name
This avoids redundant operation at draw time. The per attrib hash is to be used with the future implementation.
Diffstat (limited to 'source/blender/gpu/intern/gpu_material.c')
-rw-r--r--source/blender/gpu/intern/gpu_material.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/source/blender/gpu/intern/gpu_material.c b/source/blender/gpu/intern/gpu_material.c
index d9045a041b6..d0297127ffc 100644
--- a/source/blender/gpu/intern/gpu_material.c
+++ b/source/blender/gpu/intern/gpu_material.c
@@ -225,7 +225,7 @@ ListBase GPU_material_textures(GPUMaterial *material)
return material->graph.textures;
}
-GPUUniformAttrList *GPU_material_uniform_attributes(GPUMaterial *material)
+GPUUniformAttrList *GPU_material_uniform_attributes(const GPUMaterial *material)
{
GPUUniformAttrList *attrs = &material->graph.uniform_attrs;
return attrs->count > 0 ? attrs : NULL;