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:
authorKévin Dietrich <kevin.dietrich@mailoo.org>2022-05-26 16:12:30 +0300
committerKévin Dietrich <kevin.dietrich@mailoo.org>2022-05-26 16:12:30 +0300
commitbf53956914732bfd3e25806867ebe63081f7486d (patch)
tree1157c8f1163461cc73dd0cf3ca23bed285efa00d
parent55e3930b253e4c6687ff94b474cc9973e0c00520 (diff)
Fix T98385: Color attributes not working with GPU subdivision
Contrary to coarse extraction, GPU extraction uses the same buffer for the coarse data, only the final GPU buffer needs to be offset.
-rw-r--r--source/blender/draw/intern/mesh_extractors/extract_mesh_vbo_vcol.cc4
1 files changed, 1 insertions, 3 deletions
diff --git a/source/blender/draw/intern/mesh_extractors/extract_mesh_vbo_vcol.cc b/source/blender/draw/intern/mesh_extractors/extract_mesh_vbo_vcol.cc
index e5dd025787d..fa5bf35198b 100644
--- a/source/blender/draw/intern/mesh_extractors/extract_mesh_vbo_vcol.cc
+++ b/source/blender/draw/intern/mesh_extractors/extract_mesh_vbo_vcol.cc
@@ -271,8 +271,6 @@ static void extract_vcol_init_subdiv(const DRWSubdivCache *subdiv_cache,
blender::Vector<VColRef> refs = get_vcol_refs(cd_vdata, cd_ldata, vcol_layers);
- gpuMeshVcol *vcol = mesh_vcol;
-
/* Index of the vertex color layer in the compact buffer. Used vertex color layers are stored in
* a single buffer. */
int pack_layer_index = 0;
@@ -287,10 +285,10 @@ static void extract_vcol_init_subdiv(const DRWSubdivCache *subdiv_cache,
if (layer_i == -1) {
printf("%s: missing color layer %s\n", __func__, ref.layer->name);
- vcol += coarse_mesh->totloop;
continue;
}
+ gpuMeshVcol *vcol = mesh_vcol;
MLoopCol *mcol = nullptr;
MPropCol *pcol = nullptr;