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.
This commit is contained in:
Kévin Dietrich 2022-05-26 15:12:30 +02:00
parent 55e3930b25
commit bf53956914
Notes: blender-bot 2023-02-14 06:17:17 +01:00
Referenced by issue #98385, EEVEE: Color attributes not working with GPU subdivision
1 changed files with 1 additions and 3 deletions

View File

@ -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;