diff options
author | Joseph Eagar <joeedh@gmail.com> | 2022-09-29 00:51:23 +0300 |
---|---|---|
committer | Jeroen Bakker <jeroen@blender.org> | 2022-10-03 15:59:16 +0300 |
commit | e13205e7198099451865a9520342416fe74d1f80 (patch) | |
tree | 16a9af6827e64ccc164585dc29b2b25e5e99424b /source/blender/blenlib | |
parent | 0a9fc05eb3575fcd2b11e0d83228ee9a8664d987 (diff) |
Sculpt: Rewrite PBVH draw
Rewrite PBVH draw to allocate attributes into individual VBOs.
The old system tried to create a single VBO that could feed
every open viewport. This required uploading every color and
UV attribute to the viewport whether needed or not, often exceeding
the VBO limit.
This new system creates one VBO per attribute. Each attribute layout is
given its own GPU batch which is cached inside the owning PBVH node.
Notes:
* This is a full C++ rewrite. The old code is still there; ripping it out
can happen later.
* PBVH nodes now have a collection of batches, PBVHBatches, that keeps
track of all the batches inside the node.
* Batches are built exclusively from a list of attributes.
* Each attribute has its own VBO.
* Overlays, workbench and EEVEE can all have different attribute
layouts, each of which will get its own batch.
Reviewed by: Clement Foucault
Differential Revision: https://developer.blender.org/D15428
Ref D15428
Diffstat (limited to 'source/blender/blenlib')
-rw-r--r-- | source/blender/blenlib/BLI_math_vec_types.hh | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/source/blender/blenlib/BLI_math_vec_types.hh b/source/blender/blenlib/BLI_math_vec_types.hh index c19317867a9..5916193894b 100644 --- a/source/blender/blenlib/BLI_math_vec_types.hh +++ b/source/blender/blenlib/BLI_math_vec_types.hh @@ -556,6 +556,11 @@ template<typename T, int Size> struct vec_base : public vec_struct_base<T, Size> } }; +using char3 = blender::vec_base<int8_t, 3>; + +using uchar3 = blender::vec_base<uint8_t, 3>; +using uchar4 = blender::vec_base<uint8_t, 4>; + using int2 = vec_base<int32_t, 2>; using int3 = vec_base<int32_t, 3>; using int4 = vec_base<int32_t, 4>; @@ -564,7 +569,11 @@ using uint2 = vec_base<uint32_t, 2>; using uint3 = vec_base<uint32_t, 3>; using uint4 = vec_base<uint32_t, 4>; +using short3 = blender::vec_base<int16_t, 3>; + using ushort2 = vec_base<uint16_t, 2>; +using ushort3 = blender::vec_base<uint16_t, 3>; +using ushort4 = blender::vec_base<uint16_t, 4>; using float2 = vec_base<float, 2>; using float3 = vec_base<float, 3>; |