Cleanup: rename 'MeshBufferCache' to 'MeshBufferList'
`MeshBufferList` is more specific and can avoid confusion with `MeshBufferExtractionCache`.
This commit is contained in:
parent
ebdae75736
commit
6e51ef9531
|
@ -101,7 +101,7 @@ BLI_INLINE int mesh_render_mat_len_get(const Mesh *me)
|
|||
return MAX2(1, me->totcol);
|
||||
}
|
||||
|
||||
typedef struct MeshBufferCache {
|
||||
typedef struct MeshBufferList {
|
||||
/* Every VBO below contains at least enough
|
||||
* data for every loops in the mesh (except fdots and skin roots).
|
||||
* For some VBOs, it extends to (in this exact order) :
|
||||
|
@ -152,7 +152,7 @@ typedef struct MeshBufferCache {
|
|||
GPUIndexBuf *edituv_points;
|
||||
GPUIndexBuf *edituv_fdots;
|
||||
} ibo;
|
||||
} MeshBufferCache;
|
||||
} MeshBufferList;
|
||||
|
||||
/**
|
||||
* Data that are kept around between extractions to reduce rebuilding time.
|
||||
|
@ -174,15 +174,16 @@ typedef struct MeshBufferExtractionCache {
|
|||
} poly_sorted;
|
||||
} MeshBufferExtractionCache;
|
||||
|
||||
#define FOREACH_MESH_BUFFER_CACHE(batch_cache, mbc) \
|
||||
for (MeshBufferCache *mbc = &batch_cache->final; \
|
||||
mbc == &batch_cache->final || mbc == &batch_cache->cage || mbc == &batch_cache->uv_cage; \
|
||||
mbc = (mbc == &batch_cache->final) ? \
|
||||
&batch_cache->cage : \
|
||||
((mbc == &batch_cache->cage) ? &batch_cache->uv_cage : NULL))
|
||||
#define FOREACH_MESH_BUFFER_CACHE(batch_cache, mbuflist) \
|
||||
for (MeshBufferList *mbuflist = &batch_cache->final; \
|
||||
mbuflist == &batch_cache->final || mbuflist == &batch_cache->cage || \
|
||||
mbuflist == &batch_cache->uv_cage; \
|
||||
mbuflist = (mbuflist == &batch_cache->final) ? \
|
||||
&batch_cache->cage : \
|
||||
((mbuflist == &batch_cache->cage) ? &batch_cache->uv_cage : NULL))
|
||||
|
||||
typedef struct MeshBatchCache {
|
||||
MeshBufferCache final, cage, uv_cage;
|
||||
MeshBufferList final, cage, uv_cage;
|
||||
|
||||
MeshBufferExtractionCache final_extraction_cache;
|
||||
MeshBufferExtractionCache cage_extraction_cache;
|
||||
|
@ -261,8 +262,8 @@ typedef struct MeshBatchCache {
|
|||
} MeshBatchCache;
|
||||
|
||||
#define MBC_BATCH_LEN (sizeof(((MeshBatchCache){0}).batch) / sizeof(void *))
|
||||
#define MBC_VBO_LEN (sizeof(((MeshBufferCache){0}).vbo) / sizeof(void *))
|
||||
#define MBC_IBO_LEN (sizeof(((MeshBufferCache){0}).ibo) / sizeof(void *))
|
||||
#define MBC_VBO_LEN (sizeof(((MeshBufferList){0}).vbo) / sizeof(void *))
|
||||
#define MBC_IBO_LEN (sizeof(((MeshBufferList){0}).ibo) / sizeof(void *))
|
||||
|
||||
#define MBC_BATCH_INDEX(batch_name) \
|
||||
((offsetof(MeshBatchCache, batch_name) - offsetof(MeshBatchCache, batch)) / sizeof(void *))
|
||||
|
@ -307,7 +308,7 @@ BLI_STATIC_ASSERT(MBC_BATCH_INDEX(surface_per_mat) < 32,
|
|||
|
||||
void mesh_buffer_cache_create_requested(struct TaskGraph *task_graph,
|
||||
MeshBatchCache *cache,
|
||||
MeshBufferCache *mbc,
|
||||
MeshBufferList *mbuflist,
|
||||
MeshBufferExtractionCache *extraction_cache,
|
||||
Mesh *me,
|
||||
const bool is_editmode,
|
||||
|
|
|
@ -162,7 +162,7 @@ struct ExtractTaskData {
|
|||
const MeshRenderData *mr = nullptr;
|
||||
MeshBatchCache *cache = nullptr;
|
||||
ExtractorRunDatas *extractors = nullptr;
|
||||
MeshBufferCache *mbc = nullptr;
|
||||
MeshBufferList *mbuflist = nullptr;
|
||||
|
||||
eMRIterType iter_type;
|
||||
bool use_threading = false;
|
||||
|
@ -170,9 +170,13 @@ struct ExtractTaskData {
|
|||
ExtractTaskData(const MeshRenderData *mr,
|
||||
struct MeshBatchCache *cache,
|
||||
ExtractorRunDatas *extractors,
|
||||
MeshBufferCache *mbc,
|
||||
MeshBufferList *mbuflist,
|
||||
const bool use_threading)
|
||||
: mr(mr), cache(cache), extractors(extractors), mbc(mbc), use_threading(use_threading)
|
||||
: mr(mr),
|
||||
cache(cache),
|
||||
extractors(extractors),
|
||||
mbuflist(mbuflist),
|
||||
use_threading(use_threading)
|
||||
{
|
||||
iter_type = extractors->iter_types();
|
||||
};
|
||||
|
@ -204,13 +208,13 @@ static void extract_task_data_free(void *data)
|
|||
BLI_INLINE void extract_init(const MeshRenderData *mr,
|
||||
struct MeshBatchCache *cache,
|
||||
ExtractorRunDatas &extractors,
|
||||
MeshBufferCache *mbc,
|
||||
MeshBufferList *mbuflist,
|
||||
void *data_stack)
|
||||
{
|
||||
uint32_t data_offset = 0;
|
||||
for (ExtractorRunData &run_data : extractors) {
|
||||
const MeshExtract *extractor = run_data.extractor;
|
||||
run_data.buffer = mesh_extract_buffer_get(extractor, mbc);
|
||||
run_data.buffer = mesh_extract_buffer_get(extractor, mbuflist);
|
||||
run_data.data_offset = data_offset;
|
||||
extractor->init(mr, cache, run_data.buffer, POINTER_OFFSET(data_stack, data_offset));
|
||||
data_offset += (uint32_t)extractor->data_size;
|
||||
|
@ -445,7 +449,7 @@ static void extract_task_range_run(void *__restrict taskdata)
|
|||
settings.func_reduce = extract_task_reduce;
|
||||
settings.min_iter_per_thread = MIN_RANGE_LEN;
|
||||
|
||||
extract_init(data->mr, data->cache, *data->extractors, data->mbc, userdata_chunk);
|
||||
extract_init(data->mr, data->cache, *data->extractors, data->mbuflist, userdata_chunk);
|
||||
|
||||
if (iter_type & MR_ITER_LOOPTRI) {
|
||||
extract_task_range_run_iter(data->mr, data->extractors, MR_ITER_LOOPTRI, is_mesh, &settings);
|
||||
|
@ -474,10 +478,10 @@ static struct TaskNode *extract_task_node_create(struct TaskGraph *task_graph,
|
|||
const MeshRenderData *mr,
|
||||
MeshBatchCache *cache,
|
||||
ExtractorRunDatas *extractors,
|
||||
MeshBufferCache *mbc,
|
||||
MeshBufferList *mbuflist,
|
||||
const bool use_threading)
|
||||
{
|
||||
ExtractTaskData *taskdata = new ExtractTaskData(mr, cache, extractors, mbc, use_threading);
|
||||
ExtractTaskData *taskdata = new ExtractTaskData(mr, cache, extractors, mbuflist, use_threading);
|
||||
struct TaskNode *task_node = BLI_task_graph_node_create(
|
||||
task_graph,
|
||||
extract_task_range_run,
|
||||
|
@ -561,7 +565,7 @@ static struct TaskNode *mesh_extract_render_data_node_create(struct TaskGraph *t
|
|||
|
||||
static void mesh_buffer_cache_create_requested(struct TaskGraph *task_graph,
|
||||
MeshBatchCache *cache,
|
||||
MeshBufferCache *mbc,
|
||||
MeshBufferList *mbuflist,
|
||||
MeshBufferExtractionCache *extraction_cache,
|
||||
Mesh *me,
|
||||
|
||||
|
@ -615,7 +619,7 @@ static void mesh_buffer_cache_create_requested(struct TaskGraph *task_graph,
|
|||
|
||||
#define EXTRACT_ADD_REQUESTED(type, name) \
|
||||
do { \
|
||||
if (DRW_##type##_requested(mbc->type.name)) { \
|
||||
if (DRW_##type##_requested(mbuflist->type.name)) { \
|
||||
const MeshExtract *extractor = mesh_extract_override_get( \
|
||||
&extract_##name, do_hq_normals, override_single_mat); \
|
||||
extractors.append(extractor); \
|
||||
|
@ -647,19 +651,19 @@ static void mesh_buffer_cache_create_requested(struct TaskGraph *task_graph,
|
|||
EXTRACT_ADD_REQUESTED(vbo, skin_roots);
|
||||
|
||||
EXTRACT_ADD_REQUESTED(ibo, tris);
|
||||
if (DRW_ibo_requested(mbc->ibo.lines_loose)) {
|
||||
if (DRW_ibo_requested(mbuflist->ibo.lines_loose)) {
|
||||
/* `ibo.lines_loose` require the `ibo.lines` buffer. */
|
||||
if (mbc->ibo.lines == nullptr) {
|
||||
DRW_ibo_request(nullptr, &mbc->ibo.lines);
|
||||
if (mbuflist->ibo.lines == nullptr) {
|
||||
DRW_ibo_request(nullptr, &mbuflist->ibo.lines);
|
||||
}
|
||||
const MeshExtract *extractor = DRW_ibo_requested(mbc->ibo.lines) ?
|
||||
const MeshExtract *extractor = DRW_ibo_requested(mbuflist->ibo.lines) ?
|
||||
&extract_lines_with_lines_loose :
|
||||
&extract_lines_loose_only;
|
||||
extractors.append(extractor);
|
||||
}
|
||||
else if (DRW_ibo_requested(mbc->ibo.lines)) {
|
||||
else if (DRW_ibo_requested(mbuflist->ibo.lines)) {
|
||||
const MeshExtract *extractor;
|
||||
if (mbc->ibo.lines_loose != nullptr) {
|
||||
if (mbuflist->ibo.lines_loose != nullptr) {
|
||||
/* Update `ibo.lines_loose` as it depends on `ibo.lines`. */
|
||||
extractor = &extract_lines_with_lines_loose;
|
||||
}
|
||||
|
@ -714,7 +718,7 @@ static void mesh_buffer_cache_create_requested(struct TaskGraph *task_graph,
|
|||
ExtractorRunDatas *single_threaded_extractors = new ExtractorRunDatas();
|
||||
single_threaded_extractors->append(extractor);
|
||||
struct TaskNode *task_node = extract_task_node_create(
|
||||
task_graph, mr, cache, single_threaded_extractors, mbc, false);
|
||||
task_graph, mr, cache, single_threaded_extractors, mbuflist, false);
|
||||
|
||||
BLI_task_graph_edge_create(task_node_mesh_render_data, task_node);
|
||||
}
|
||||
|
@ -725,7 +729,7 @@ static void mesh_buffer_cache_create_requested(struct TaskGraph *task_graph,
|
|||
extractors.filter_threaded_extractors_into(*multi_threaded_extractors);
|
||||
if (!multi_threaded_extractors->is_empty()) {
|
||||
struct TaskNode *task_node = extract_task_node_create(
|
||||
task_graph, mr, cache, multi_threaded_extractors, mbc, true);
|
||||
task_graph, mr, cache, multi_threaded_extractors, mbuflist, true);
|
||||
|
||||
BLI_task_graph_edge_create(task_node_mesh_render_data, task_node);
|
||||
}
|
||||
|
@ -738,7 +742,7 @@ static void mesh_buffer_cache_create_requested(struct TaskGraph *task_graph,
|
|||
/* Run all requests on the same thread. */
|
||||
ExtractorRunDatas *extractors_copy = new ExtractorRunDatas(extractors);
|
||||
struct TaskNode *task_node = extract_task_node_create(
|
||||
task_graph, mr, cache, extractors_copy, mbc, false);
|
||||
task_graph, mr, cache, extractors_copy, mbuflist, false);
|
||||
|
||||
BLI_task_graph_edge_create(task_node_mesh_render_data, task_node);
|
||||
}
|
||||
|
@ -775,7 +779,7 @@ static void mesh_buffer_cache_create_requested(struct TaskGraph *task_graph,
|
|||
extern "C" {
|
||||
void mesh_buffer_cache_create_requested(struct TaskGraph *task_graph,
|
||||
MeshBatchCache *cache,
|
||||
MeshBufferCache *mbc,
|
||||
MeshBufferList *mbuflist,
|
||||
MeshBufferExtractionCache *extraction_cache,
|
||||
Mesh *me,
|
||||
|
||||
|
@ -792,7 +796,7 @@ void mesh_buffer_cache_create_requested(struct TaskGraph *task_graph,
|
|||
{
|
||||
blender::draw::mesh_buffer_cache_create_requested(task_graph,
|
||||
cache,
|
||||
mbc,
|
||||
mbuflist,
|
||||
extraction_cache,
|
||||
me,
|
||||
is_editmode,
|
||||
|
|
|
@ -79,8 +79,8 @@
|
|||
|
||||
/* clang-format off */
|
||||
|
||||
#define BUFFER_INDEX(buff_name) ((offsetof(MeshBufferCache, buff_name) - offsetof(MeshBufferCache, vbo)) / sizeof(void *))
|
||||
#define BUFFER_LEN (sizeof(MeshBufferCache) / sizeof(void *))
|
||||
#define BUFFER_INDEX(buff_name) ((offsetof(MeshBufferList, buff_name) - offsetof(MeshBufferList, vbo)) / sizeof(void *))
|
||||
#define BUFFER_LEN (sizeof(MeshBufferList) / sizeof(void *))
|
||||
|
||||
#define _BATCH_FLAG1(b) (1u << MBC_BATCH_INDEX(b))
|
||||
#define _BATCH_FLAG2(b1, b2) _BATCH_FLAG1(b1) | _BATCH_FLAG1(b2)
|
||||
|
@ -844,14 +844,14 @@ void DRW_mesh_batch_cache_dirty_tag(Mesh *me, eMeshBatchDirtyMode mode)
|
|||
}
|
||||
}
|
||||
|
||||
static void mesh_buffer_cache_clear(MeshBufferCache *mbufcache)
|
||||
static void mesh_buffer_list_clear(MeshBufferList *mbuflist)
|
||||
{
|
||||
GPUVertBuf **vbos = (GPUVertBuf **)&mbufcache->vbo;
|
||||
GPUIndexBuf **ibos = (GPUIndexBuf **)&mbufcache->ibo;
|
||||
for (int i = 0; i < sizeof(mbufcache->vbo) / sizeof(void *); i++) {
|
||||
GPUVertBuf **vbos = (GPUVertBuf **)&mbuflist->vbo;
|
||||
GPUIndexBuf **ibos = (GPUIndexBuf **)&mbuflist->ibo;
|
||||
for (int i = 0; i < sizeof(mbuflist->vbo) / sizeof(void *); i++) {
|
||||
GPU_VERTBUF_DISCARD_SAFE(vbos[i]);
|
||||
}
|
||||
for (int i = 0; i < sizeof(mbufcache->ibo) / sizeof(void *); i++) {
|
||||
for (int i = 0; i < sizeof(mbuflist->ibo) / sizeof(void *); i++) {
|
||||
GPU_INDEXBUF_DISCARD_SAFE(ibos[i]);
|
||||
}
|
||||
}
|
||||
|
@ -874,8 +874,8 @@ static void mesh_batch_cache_clear(Mesh *me)
|
|||
if (!cache) {
|
||||
return;
|
||||
}
|
||||
FOREACH_MESH_BUFFER_CACHE (cache, mbufcache) {
|
||||
mesh_buffer_cache_clear(mbufcache);
|
||||
FOREACH_MESH_BUFFER_CACHE (cache, mbuflist) {
|
||||
mesh_buffer_list_clear(mbuflist);
|
||||
}
|
||||
|
||||
mesh_buffer_extraction_cache_clear(&cache->final_extraction_cache);
|
||||
|
@ -1508,7 +1508,7 @@ void DRW_mesh_batch_cache_create_requested(struct TaskGraph *task_graph,
|
|||
|
||||
const bool do_uvcage = is_editmode && !me->edit_mesh->mesh_eval_final->runtime.is_original;
|
||||
|
||||
MeshBufferCache *mbufcache = &cache->final;
|
||||
MeshBufferList *mbufcache = &cache->final;
|
||||
|
||||
/* Initialize batches and request VBO's & IBO's. */
|
||||
MDEPS_ASSERT(batch.surface, ibo.tris, vbo.lnor, vbo.pos_nor, vbo.uv, vbo.vcol);
|
||||
|
|
|
@ -33,11 +33,11 @@
|
|||
|
||||
#include "draw_cache_impl.h"
|
||||
|
||||
void *mesh_extract_buffer_get(const MeshExtract *extractor, MeshBufferCache *mbc)
|
||||
void *mesh_extract_buffer_get(const MeshExtract *extractor, MeshBufferList *mbuflist)
|
||||
{
|
||||
/* NOTE: POINTER_OFFSET on windows platforms casts internally to `void *`, but on GCC/CLANG to
|
||||
* `MeshBufferCache *`. What shows a different usage versus intent. */
|
||||
void **buffer_ptr = (void **)POINTER_OFFSET(mbc, extractor->mesh_buffer_offset);
|
||||
* `MeshBufferList *`. What shows a different usage versus intent. */
|
||||
void **buffer_ptr = (void **)POINTER_OFFSET(mbuflist, extractor->mesh_buffer_offset);
|
||||
void *buffer = *buffer_ptr;
|
||||
BLI_assert(buffer);
|
||||
return buffer;
|
||||
|
|
|
@ -232,7 +232,7 @@ typedef struct MeshExtract {
|
|||
/** Used to know if the element callbacks are thread-safe and can be parallelized. */
|
||||
bool use_threading;
|
||||
/**
|
||||
* Offset in bytes of the buffer inside a MeshBufferCache instance. Points to a vertex or index
|
||||
* Offset in bytes of the buffer inside a MeshBufferList instance. Points to a vertex or index
|
||||
* buffer.
|
||||
*/
|
||||
size_t mesh_buffer_offset;
|
||||
|
@ -270,7 +270,7 @@ typedef struct EditLoopData {
|
|||
uchar bweight;
|
||||
} EditLoopData;
|
||||
|
||||
void *mesh_extract_buffer_get(const MeshExtract *extractor, MeshBufferCache *mbc);
|
||||
void *mesh_extract_buffer_get(const MeshExtract *extractor, MeshBufferList *mbuflist);
|
||||
eMRIterType mesh_extract_iter_type(const MeshExtract *ext);
|
||||
const MeshExtract *mesh_extract_override_get(const MeshExtract *extractor,
|
||||
const bool do_hq_normals,
|
||||
|
|
|
@ -104,7 +104,7 @@ constexpr MeshExtract create_extractor_edituv_tris()
|
|||
extractor.data_type = MR_DATA_NONE;
|
||||
extractor.data_size = sizeof(MeshExtract_EditUvElem_Data);
|
||||
extractor.use_threading = false;
|
||||
extractor.mesh_buffer_offset = offsetof(MeshBufferCache, ibo.edituv_tris);
|
||||
extractor.mesh_buffer_offset = offsetof(MeshBufferList, ibo.edituv_tris);
|
||||
return extractor;
|
||||
}
|
||||
|
||||
|
@ -194,7 +194,7 @@ constexpr MeshExtract create_extractor_edituv_lines()
|
|||
extractor.data_type = MR_DATA_NONE;
|
||||
extractor.data_size = sizeof(MeshExtract_EditUvElem_Data);
|
||||
extractor.use_threading = false;
|
||||
extractor.mesh_buffer_offset = offsetof(MeshBufferCache, ibo.edituv_lines);
|
||||
extractor.mesh_buffer_offset = offsetof(MeshBufferList, ibo.edituv_lines);
|
||||
return extractor;
|
||||
}
|
||||
|
||||
|
@ -278,7 +278,7 @@ constexpr MeshExtract create_extractor_edituv_points()
|
|||
extractor.data_type = MR_DATA_NONE;
|
||||
extractor.data_size = sizeof(MeshExtract_EditUvElem_Data);
|
||||
extractor.use_threading = false;
|
||||
extractor.mesh_buffer_offset = offsetof(MeshBufferCache, ibo.edituv_points);
|
||||
extractor.mesh_buffer_offset = offsetof(MeshBufferList, ibo.edituv_points);
|
||||
return extractor;
|
||||
}
|
||||
|
||||
|
@ -374,7 +374,7 @@ constexpr MeshExtract create_extractor_edituv_fdots()
|
|||
extractor.data_type = MR_DATA_NONE;
|
||||
extractor.data_size = sizeof(MeshExtract_EditUvElem_Data);
|
||||
extractor.use_threading = false;
|
||||
extractor.mesh_buffer_offset = offsetof(MeshBufferCache, ibo.edituv_fdots);
|
||||
extractor.mesh_buffer_offset = offsetof(MeshBufferList, ibo.edituv_fdots);
|
||||
return extractor;
|
||||
}
|
||||
|
||||
|
|
|
@ -105,7 +105,7 @@ constexpr MeshExtract create_extractor_fdots()
|
|||
extractor.data_type = MR_DATA_NONE;
|
||||
extractor.data_size = sizeof(GPUIndexBufBuilder);
|
||||
extractor.use_threading = false;
|
||||
extractor.mesh_buffer_offset = offsetof(MeshBufferCache, ibo.fdots);
|
||||
extractor.mesh_buffer_offset = offsetof(MeshBufferList, ibo.fdots);
|
||||
return extractor;
|
||||
}
|
||||
|
||||
|
|
|
@ -168,7 +168,7 @@ constexpr MeshExtract create_extractor_lines()
|
|||
extractor.data_type = MR_DATA_NONE;
|
||||
extractor.data_size = sizeof(GPUIndexBufBuilder);
|
||||
extractor.use_threading = true;
|
||||
extractor.mesh_buffer_offset = offsetof(MeshBufferCache, ibo.lines);
|
||||
extractor.mesh_buffer_offset = offsetof(MeshBufferList, ibo.lines);
|
||||
return extractor;
|
||||
}
|
||||
|
||||
|
@ -213,7 +213,7 @@ constexpr MeshExtract create_extractor_lines_with_lines_loose()
|
|||
extractor.data_type = MR_DATA_NONE;
|
||||
extractor.data_size = sizeof(GPUIndexBufBuilder);
|
||||
extractor.use_threading = true;
|
||||
extractor.mesh_buffer_offset = offsetof(MeshBufferCache, ibo.lines);
|
||||
extractor.mesh_buffer_offset = offsetof(MeshBufferList, ibo.lines);
|
||||
return extractor;
|
||||
}
|
||||
|
||||
|
@ -240,7 +240,7 @@ constexpr MeshExtract create_extractor_lines_loose_only()
|
|||
extractor.data_type = MR_DATA_LOOSE_GEOM;
|
||||
extractor.data_size = 0;
|
||||
extractor.use_threading = false;
|
||||
extractor.mesh_buffer_offset = offsetof(MeshBufferCache, ibo.lines_loose);
|
||||
extractor.mesh_buffer_offset = offsetof(MeshBufferList, ibo.lines_loose);
|
||||
return extractor;
|
||||
}
|
||||
|
||||
|
|
|
@ -185,7 +185,7 @@ constexpr MeshExtract create_extractor_lines_adjacency()
|
|||
extractor.data_type = MR_DATA_NONE;
|
||||
extractor.data_size = sizeof(MeshExtract_LineAdjacency_Data);
|
||||
extractor.use_threading = false;
|
||||
extractor.mesh_buffer_offset = offsetof(MeshBufferCache, ibo.lines_adjacency);
|
||||
extractor.mesh_buffer_offset = offsetof(MeshBufferList, ibo.lines_adjacency);
|
||||
return extractor;
|
||||
}
|
||||
|
||||
|
|
|
@ -114,7 +114,7 @@ constexpr MeshExtract create_extractor_lines_paint_mask()
|
|||
extractor.data_type = MR_DATA_NONE;
|
||||
extractor.data_size = sizeof(MeshExtract_LinePaintMask_Data);
|
||||
extractor.use_threading = false;
|
||||
extractor.mesh_buffer_offset = offsetof(MeshBufferCache, ibo.lines_paint_mask);
|
||||
extractor.mesh_buffer_offset = offsetof(MeshBufferList, ibo.lines_paint_mask);
|
||||
return extractor;
|
||||
}
|
||||
|
||||
|
|
|
@ -169,7 +169,7 @@ constexpr MeshExtract create_extractor_points()
|
|||
extractor.use_threading = true;
|
||||
extractor.data_type = MR_DATA_NONE;
|
||||
extractor.data_size = sizeof(GPUIndexBufBuilder);
|
||||
extractor.mesh_buffer_offset = offsetof(MeshBufferCache, ibo.points);
|
||||
extractor.mesh_buffer_offset = offsetof(MeshBufferList, ibo.points);
|
||||
return extractor;
|
||||
}
|
||||
|
||||
|
|
|
@ -134,7 +134,7 @@ constexpr MeshExtract create_extractor_tris()
|
|||
extractor.data_type = MR_DATA_LOOPTRI | MR_DATA_POLYS_SORTED;
|
||||
extractor.data_size = sizeof(GPUIndexBufBuilder);
|
||||
extractor.use_threading = true;
|
||||
extractor.mesh_buffer_offset = offsetof(MeshBufferCache, ibo.tris);
|
||||
extractor.mesh_buffer_offset = offsetof(MeshBufferList, ibo.tris);
|
||||
return extractor;
|
||||
}
|
||||
|
||||
|
@ -221,7 +221,7 @@ constexpr MeshExtract create_extractor_tris_single_mat()
|
|||
extractor.data_type = MR_DATA_NONE;
|
||||
extractor.data_size = sizeof(GPUIndexBufBuilder);
|
||||
extractor.use_threading = true;
|
||||
extractor.mesh_buffer_offset = offsetof(MeshBufferCache, ibo.tris);
|
||||
extractor.mesh_buffer_offset = offsetof(MeshBufferList, ibo.tris);
|
||||
return extractor;
|
||||
}
|
||||
|
||||
|
|
|
@ -228,7 +228,7 @@ constexpr MeshExtract create_extractor_edge_fac()
|
|||
extractor.data_type = MR_DATA_POLY_NOR;
|
||||
extractor.data_size = sizeof(MeshExtract_EdgeFac_Data);
|
||||
extractor.use_threading = false;
|
||||
extractor.mesh_buffer_offset = offsetof(MeshBufferCache, vbo.edge_fac);
|
||||
extractor.mesh_buffer_offset = offsetof(MeshBufferList, vbo.edge_fac);
|
||||
return extractor;
|
||||
}
|
||||
|
||||
|
|
|
@ -253,7 +253,7 @@ constexpr MeshExtract create_extractor_edit_data()
|
|||
extractor.data_type = MR_DATA_NONE;
|
||||
extractor.data_size = sizeof(EditLoopData *);
|
||||
extractor.use_threading = true;
|
||||
extractor.mesh_buffer_offset = offsetof(MeshBufferCache, vbo.edit_data);
|
||||
extractor.mesh_buffer_offset = offsetof(MeshBufferList, vbo.edit_data);
|
||||
return extractor;
|
||||
}
|
||||
|
||||
|
|
|
@ -128,7 +128,7 @@ constexpr MeshExtract create_extractor_edituv_data()
|
|||
extractor.data_type = MR_DATA_NONE;
|
||||
extractor.data_size = sizeof(MeshExtract_EditUVData_Data);
|
||||
extractor.use_threading = true;
|
||||
extractor.mesh_buffer_offset = offsetof(MeshBufferCache, vbo.edituv_data);
|
||||
extractor.mesh_buffer_offset = offsetof(MeshBufferList, vbo.edituv_data);
|
||||
return extractor;
|
||||
}
|
||||
|
||||
|
|
|
@ -222,7 +222,7 @@ constexpr MeshExtract create_extractor_edituv_edituv_stretch_angle()
|
|||
extractor.data_type = MR_DATA_NONE;
|
||||
extractor.data_size = sizeof(MeshExtract_StretchAngle_Data);
|
||||
extractor.use_threading = false;
|
||||
extractor.mesh_buffer_offset = offsetof(MeshBufferCache, vbo.edituv_stretch_angle);
|
||||
extractor.mesh_buffer_offset = offsetof(MeshBufferList, vbo.edituv_stretch_angle);
|
||||
return extractor;
|
||||
}
|
||||
|
||||
|
|
|
@ -143,7 +143,7 @@ constexpr MeshExtract create_extractor_edituv_stretch_area()
|
|||
extractor.data_type = MR_DATA_NONE;
|
||||
extractor.data_size = 0;
|
||||
extractor.use_threading = false;
|
||||
extractor.mesh_buffer_offset = offsetof(MeshBufferCache, vbo.edituv_stretch_area);
|
||||
extractor.mesh_buffer_offset = offsetof(MeshBufferList, vbo.edituv_stretch_area);
|
||||
return extractor;
|
||||
}
|
||||
|
||||
|
|
|
@ -89,7 +89,7 @@ constexpr MeshExtract create_extractor_fdots_edituv_data()
|
|||
extractor.data_type = MR_DATA_NONE;
|
||||
extractor.data_size = sizeof(MeshExtract_EditUVFdotData_Data);
|
||||
extractor.use_threading = true;
|
||||
extractor.mesh_buffer_offset = offsetof(MeshBufferCache, vbo.fdots_edituv_data);
|
||||
extractor.mesh_buffer_offset = offsetof(MeshBufferList, vbo.fdots_edituv_data);
|
||||
return extractor;
|
||||
}
|
||||
|
||||
|
|
|
@ -105,7 +105,7 @@ constexpr MeshExtract create_extractor_fdots_nor()
|
|||
extractor.data_type = MR_DATA_LOOP_NOR;
|
||||
extractor.data_size = 0;
|
||||
extractor.use_threading = false;
|
||||
extractor.mesh_buffer_offset = offsetof(MeshBufferCache, vbo.fdots_nor);
|
||||
extractor.mesh_buffer_offset = offsetof(MeshBufferList, vbo.fdots_nor);
|
||||
return extractor;
|
||||
}
|
||||
|
||||
|
@ -186,7 +186,7 @@ constexpr MeshExtract create_extractor_fdots_nor_hq()
|
|||
extractor.data_type = MR_DATA_LOOP_NOR;
|
||||
extractor.data_size = 0;
|
||||
extractor.use_threading = false;
|
||||
extractor.mesh_buffer_offset = offsetof(MeshBufferCache, vbo.fdots_nor);
|
||||
extractor.mesh_buffer_offset = offsetof(MeshBufferList, vbo.fdots_nor);
|
||||
return extractor;
|
||||
}
|
||||
|
||||
|
|
|
@ -106,7 +106,7 @@ constexpr MeshExtract create_extractor_fdots_pos()
|
|||
extractor.data_type = MR_DATA_NONE;
|
||||
extractor.data_size = sizeof(float(*)[3]);
|
||||
extractor.use_threading = true;
|
||||
extractor.mesh_buffer_offset = offsetof(MeshBufferCache, vbo.fdots_pos);
|
||||
extractor.mesh_buffer_offset = offsetof(MeshBufferList, vbo.fdots_pos);
|
||||
return extractor;
|
||||
}
|
||||
|
||||
|
|
|
@ -114,7 +114,7 @@ constexpr MeshExtract create_extractor_fdots_uv()
|
|||
extractor.data_type = MR_DATA_NONE;
|
||||
extractor.data_size = sizeof(MeshExtract_FdotUV_Data);
|
||||
extractor.use_threading = true;
|
||||
extractor.mesh_buffer_offset = offsetof(MeshBufferCache, vbo.fdots_uv);
|
||||
extractor.mesh_buffer_offset = offsetof(MeshBufferList, vbo.fdots_uv);
|
||||
return extractor;
|
||||
}
|
||||
|
||||
|
|
|
@ -116,7 +116,7 @@ constexpr MeshExtract create_extractor_lnor()
|
|||
extractor.data_type = MR_DATA_LOOP_NOR;
|
||||
extractor.data_size = sizeof(GPUPackedNormal *);
|
||||
extractor.use_threading = true;
|
||||
extractor.mesh_buffer_offset = offsetof(MeshBufferCache, vbo.lnor);
|
||||
extractor.mesh_buffer_offset = offsetof(MeshBufferList, vbo.lnor);
|
||||
return extractor;
|
||||
}
|
||||
|
||||
|
@ -214,7 +214,7 @@ constexpr MeshExtract create_extractor_lnor_hq()
|
|||
extractor.data_type = MR_DATA_LOOP_NOR;
|
||||
extractor.data_size = sizeof(gpuHQNor *);
|
||||
extractor.use_threading = true;
|
||||
extractor.mesh_buffer_offset = offsetof(MeshBufferCache, vbo.lnor);
|
||||
extractor.mesh_buffer_offset = offsetof(MeshBufferList, vbo.lnor);
|
||||
return extractor;
|
||||
}
|
||||
|
||||
|
|
|
@ -641,7 +641,7 @@ constexpr MeshExtract create_extractor_mesh_analysis()
|
|||
extractor.data_type = MR_DATA_POLY_NOR | MR_DATA_LOOPTRI;
|
||||
extractor.data_size = 0;
|
||||
extractor.use_threading = false;
|
||||
extractor.mesh_buffer_offset = offsetof(MeshBufferCache, vbo.mesh_analysis);
|
||||
extractor.mesh_buffer_offset = offsetof(MeshBufferList, vbo.mesh_analysis);
|
||||
return extractor;
|
||||
}
|
||||
|
||||
|
|
|
@ -102,7 +102,7 @@ constexpr MeshExtract create_extractor_orco()
|
|||
extractor.data_type = MR_DATA_NONE;
|
||||
extractor.data_size = sizeof(MeshExtract_Orco_Data);
|
||||
extractor.use_threading = true;
|
||||
extractor.mesh_buffer_offset = offsetof(MeshBufferCache, vbo.orco);
|
||||
extractor.mesh_buffer_offset = offsetof(MeshBufferList, vbo.orco);
|
||||
return extractor;
|
||||
}
|
||||
|
||||
|
|
|
@ -208,7 +208,7 @@ constexpr MeshExtract create_extractor_pos_nor()
|
|||
extractor.data_type = MR_DATA_NONE;
|
||||
extractor.data_size = sizeof(MeshExtract_PosNor_Data);
|
||||
extractor.use_threading = true;
|
||||
extractor.mesh_buffer_offset = offsetof(MeshBufferCache, vbo.pos_nor);
|
||||
extractor.mesh_buffer_offset = offsetof(MeshBufferList, vbo.pos_nor);
|
||||
return extractor;
|
||||
}
|
||||
|
||||
|
@ -401,7 +401,7 @@ constexpr MeshExtract create_extractor_pos_nor_hq()
|
|||
extractor.data_type = MR_DATA_NONE;
|
||||
extractor.data_size = sizeof(MeshExtract_PosNorHQ_Data);
|
||||
extractor.use_threading = true;
|
||||
extractor.mesh_buffer_offset = offsetof(MeshBufferCache, vbo.pos_nor);
|
||||
extractor.mesh_buffer_offset = offsetof(MeshBufferList, vbo.pos_nor);
|
||||
return extractor;
|
||||
}
|
||||
|
||||
|
|
|
@ -128,7 +128,7 @@ constexpr MeshExtract create_extractor_sculpt_data()
|
|||
extractor.data_type = MR_DATA_NONE;
|
||||
extractor.data_size = 0;
|
||||
extractor.use_threading = false;
|
||||
extractor.mesh_buffer_offset = offsetof(MeshBufferCache, vbo.sculpt_data);
|
||||
extractor.mesh_buffer_offset = offsetof(MeshBufferList, vbo.sculpt_data);
|
||||
return extractor;
|
||||
}
|
||||
|
||||
|
|
|
@ -205,7 +205,7 @@ constexpr MeshExtract create_extractor_poly_idx()
|
|||
extractor.data_type = MR_DATA_NONE;
|
||||
extractor.data_size = sizeof(uint32_t *);
|
||||
extractor.use_threading = true;
|
||||
extractor.mesh_buffer_offset = offsetof(MeshBufferCache, vbo.poly_idx);
|
||||
extractor.mesh_buffer_offset = offsetof(MeshBufferList, vbo.poly_idx);
|
||||
return extractor;
|
||||
}
|
||||
|
||||
|
@ -220,7 +220,7 @@ constexpr MeshExtract create_extractor_edge_idx()
|
|||
extractor.data_type = MR_DATA_NONE;
|
||||
extractor.data_size = sizeof(uint32_t *);
|
||||
extractor.use_threading = true;
|
||||
extractor.mesh_buffer_offset = offsetof(MeshBufferCache, vbo.edge_idx);
|
||||
extractor.mesh_buffer_offset = offsetof(MeshBufferList, vbo.edge_idx);
|
||||
return extractor;
|
||||
}
|
||||
|
||||
|
@ -237,7 +237,7 @@ constexpr MeshExtract create_extractor_vert_idx()
|
|||
extractor.data_type = MR_DATA_NONE;
|
||||
extractor.data_size = sizeof(uint32_t *);
|
||||
extractor.use_threading = true;
|
||||
extractor.mesh_buffer_offset = offsetof(MeshBufferCache, vbo.vert_idx);
|
||||
extractor.mesh_buffer_offset = offsetof(MeshBufferList, vbo.vert_idx);
|
||||
return extractor;
|
||||
}
|
||||
|
||||
|
@ -279,7 +279,7 @@ constexpr MeshExtract create_extractor_fdot_idx()
|
|||
extractor.data_type = MR_DATA_NONE;
|
||||
extractor.data_size = sizeof(uint32_t *);
|
||||
extractor.use_threading = true;
|
||||
extractor.mesh_buffer_offset = offsetof(MeshBufferCache, vbo.fdot_idx);
|
||||
extractor.mesh_buffer_offset = offsetof(MeshBufferList, vbo.fdot_idx);
|
||||
return extractor;
|
||||
}
|
||||
|
||||
|
|
|
@ -80,7 +80,7 @@ constexpr MeshExtract create_extractor_skin_roots()
|
|||
extractor.data_type = MR_DATA_NONE;
|
||||
extractor.data_size = 0;
|
||||
extractor.use_threading = false;
|
||||
extractor.mesh_buffer_offset = offsetof(MeshBufferCache, vbo.skin_roots);
|
||||
extractor.mesh_buffer_offset = offsetof(MeshBufferList, vbo.skin_roots);
|
||||
return extractor;
|
||||
}
|
||||
|
||||
|
|
|
@ -226,7 +226,7 @@ constexpr MeshExtract create_extractor_tan()
|
|||
extractor.data_type = MR_DATA_POLY_NOR | MR_DATA_TAN_LOOP_NOR | MR_DATA_LOOPTRI;
|
||||
extractor.data_size = 0;
|
||||
extractor.use_threading = false;
|
||||
extractor.mesh_buffer_offset = offsetof(MeshBufferCache, vbo.tan);
|
||||
extractor.mesh_buffer_offset = offsetof(MeshBufferList, vbo.tan);
|
||||
return extractor;
|
||||
}
|
||||
|
||||
|
@ -252,7 +252,7 @@ constexpr MeshExtract create_extractor_tan_hq()
|
|||
extractor.data_type = MR_DATA_POLY_NOR | MR_DATA_TAN_LOOP_NOR | MR_DATA_LOOPTRI;
|
||||
extractor.data_size = 0;
|
||||
extractor.use_threading = false;
|
||||
extractor.mesh_buffer_offset = offsetof(MeshBufferCache, vbo.tan);
|
||||
extractor.mesh_buffer_offset = offsetof(MeshBufferList, vbo.tan);
|
||||
return extractor;
|
||||
}
|
||||
|
||||
|
|
|
@ -123,7 +123,7 @@ constexpr MeshExtract create_extractor_uv()
|
|||
extractor.data_type = MR_DATA_NONE;
|
||||
extractor.data_size = 0;
|
||||
extractor.use_threading = false;
|
||||
extractor.mesh_buffer_offset = offsetof(MeshBufferCache, vbo.uv);
|
||||
extractor.mesh_buffer_offset = offsetof(MeshBufferList, vbo.uv);
|
||||
return extractor;
|
||||
}
|
||||
|
||||
|
|
|
@ -178,7 +178,7 @@ constexpr MeshExtract create_extractor_vcol()
|
|||
extractor.data_type = MR_DATA_NONE;
|
||||
extractor.data_size = 0;
|
||||
extractor.use_threading = false;
|
||||
extractor.mesh_buffer_offset = offsetof(MeshBufferCache, vbo.vcol);
|
||||
extractor.mesh_buffer_offset = offsetof(MeshBufferList, vbo.vcol);
|
||||
return extractor;
|
||||
}
|
||||
|
||||
|
|
|
@ -176,7 +176,7 @@ constexpr MeshExtract create_extractor_weights()
|
|||
extractor.data_type = MR_DATA_NONE;
|
||||
extractor.data_size = sizeof(MeshExtract_Weight_Data);
|
||||
extractor.use_threading = true;
|
||||
extractor.mesh_buffer_offset = offsetof(MeshBufferCache, vbo.weights);
|
||||
extractor.mesh_buffer_offset = offsetof(MeshBufferList, vbo.weights);
|
||||
return extractor;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue