34 uv_layers |= (1 << layer);
38 r_uv_layers = uv_layers;
41 if (uv_layers & (1 << i)) {
47 BLI_snprintf(attr_name,
sizeof(attr_name),
"a%s", attr_safe_name);
66 if (
format->attr_len == 0) {
95 if (uv_layers & (1 << i)) {
105 memcpy(uv_data, luv->
uv,
sizeof(*uv_data));
107 }
while ((l_iter = l_iter->
next) != l_first);
113 for (
int ml_index = 0; ml_index < mr->
loop_len; ml_index++, uv_data++, layer_data++) {
114 memcpy(uv_data, layer_data->
uv,
sizeof(*uv_data));
127 Mesh *coarse_mesh = subdiv_cache->
mesh;
141 if (uv_layers == 0) {
146 int pack_layer_index = 0;
148 if (uv_layers & (1 << i)) {
typedef float(TangentPoint)[2]
const char * CustomData_get_layer_name(const struct CustomData *data, int type, int n)
int CustomData_get_active_layer(const struct CustomData *data, int type)
int CustomData_get_stencil_layer(const struct CustomData *data, int type)
void * CustomData_get_layer_n(const struct CustomData *data, int type, int n)
int CustomData_get_n_offset(const struct CustomData *data, int type, int n)
int CustomData_get_render_layer(const struct CustomData *data, int type)
size_t BLI_snprintf(char *__restrict dst, size_t maxncpy, const char *__restrict format,...) ATTR_NONNULL(1
struct GPUVertBuf GPUVertBuf
void GPU_vertbuf_data_alloc(GPUVertBuf *, uint v_len)
#define GPU_vertbuf_init_with_format(verts, format)
void * GPU_vertbuf_get_data(const GPUVertBuf *verts)
void GPU_vertbuf_init_build_on_device(GPUVertBuf *verts, GPUVertFormat *format, uint v_len)
#define BM_FACE_FIRST_LOOP(p)
#define BM_ELEM_CD_GET_VOID_P(ele, offset)
#define BM_ITER_MESH(ele, iter, bm, itype)
void draw_subdiv_extract_uvs(const DRWSubdivCache *cache, GPUVertBuf *uvs, const int face_varying_channel, const int dst_offset)
ccl_global float * buffer
ccl_gpu_kernel_postfix ccl_global float int int int int float bool int offset
static void extract_uv_init_subdiv(const DRWSubdivCache *subdiv_cache, const MeshRenderData *UNUSED(mr), MeshBatchCache *cache, void *buffer, void *UNUSED(data))
static bool mesh_extract_uv_format_init(GPUVertFormat *format, MeshBatchCache *cache, CustomData *cd_ldata, eMRExtractType extract_type, uint32_t &r_uv_layers)
constexpr MeshExtract create_extractor_uv()
static void extract_uv_init(const MeshRenderData *mr, MeshBatchCache *cache, void *buf, void *UNUSED(tls_data))
eMRExtractType extract_type