39 for (const int i : range) {
40 const BMVert *vert = BM_vert_at_index(&const_cast<BMesh &>(bm), i);
41 vert_data[i] = gpu::convert_normal<int1010102_norm>(bm_vert_no_get(mr, vert));
45 mr.loose_edges.foreach_index(
46 [&](
const int i,
const int pos) {
53 mr.loose_verts.foreach_index(
54 [&](
const int i,
const int pos) { loose_vert_data[pos] = vert_data[i]; },
61 gpu::VertAttrType::SNORM_10_10_10_2);
#define BM_elem_index_get(ele)
Span< T > as_span() const
constexpr IndexRange()=default
constexpr MutableSpan< NewT > cast() const
constexpr MutableSpan take_back(const int64_t n) const
constexpr Span< T > as_span() const
constexpr MutableSpan take_front(const int64_t n) const
void gather(const GVArray &src, const IndexMask &indices, GMutableSpan dst, exec_mode::Mode mode=exec_mode::parallel)
void extract_mesh_loose_edge_data(const Span< T > vert_data, const Span< int2 > edges, const IndexMask &loose_edges, MutableSpan< T > gpu_data)
static void extract_vert_normals_mesh(const MeshRenderData &mr, MutableSpan< GPUType > vert_data)
static void extract_vert_normals_bm(const MeshRenderData &mr, MutableSpan< GPUType > vert_data)
void gather_vert_to_corner_gpu(const MeshRenderData &mr, MeshBufferCache &cache, gpu::VertBuf &src, gpu::VertBuf &dst)
gpu::VertBufPtr extract_vert_normals(const MeshRenderData &mr, MeshBufferCache &cache)
void loose_data_upload(const MeshRenderData &mr, const Span< T > loose_data, gpu::VertBuf &dst)
constexpr ParallelGrainSize grain_size(int grain_size)
void convert_normals(Span< float3 > src, MutableSpan< GPUType > dst)
std::unique_ptr< gpu::VertBuf, gpu::VertBufDeleter > VertBufPtr
void parallel_for(const IndexRange range, const int64_t grain_size, const Function &function, const TaskSizeHints &size_hints=detail::TaskSizeHints_Static(1))
BLI_INLINE BMEdge * BM_edge_at_index(BMesh *bm, const int index)
NormalizedIntVecBase< int32_t, 4, 10, 10, 10, 2 > int1010102_norm
gpu::VertBuf * GPU_vertbuf_create_on_device(const GPUVertFormat &format, uint v_len)
GPUVertFormat GPU_vertformat_from_attribute(StringRef name, gpu::VertAttrType type)
void GPU_vertbuf_data_alloc(gpu::VertBuf &verts, uint v_len)
MeshExtractType extract_type