GPv3: Implement Wireframe batch #127147
No reviewers
Labels
No Label
Interest
Alembic
Interest
Animation & Rigging
Interest
Asset System
Interest
Audio
Interest
Automated Testing
Interest
Blender Asset Bundle
Interest
BlendFile
Interest
Collada
Interest
Compatibility
Interest
Compositing
Interest
Core
Interest
Cycles
Interest
Dependency Graph
Interest
Development Management
Interest
EEVEE
Interest
Freestyle
Interest
Geometry Nodes
Interest
Grease Pencil
Interest
ID Management
Interest
Images & Movies
Interest
Import Export
Interest
Line Art
Interest
Masking
Interest
Metal
Interest
Modeling
Interest
Modifiers
Interest
Motion Tracking
Interest
Nodes & Physics
Interest
OpenGL
Interest
Overlay
Interest
Overrides
Interest
Performance
Interest
Physics
Interest
Pipeline, Assets & IO
Interest
Platforms, Builds & Tests
Interest
Python API
Interest
Render & Cycles
Interest
Render Pipeline
Interest
Sculpt, Paint & Texture
Interest
Text Editor
Interest
Translations
Interest
Triaging
Interest
Undo
Interest
USD
Interest
User Interface
Interest
UV Editing
Interest
VFX & Video
Interest
Video Sequencer
Interest
Viewport & EEVEE
Interest
Virtual Reality
Interest
Vulkan
Interest
Wayland
Interest
Workbench
Interest: X11
Legacy
Asset Browser Project
Legacy
Blender 2.8 Project
Legacy
Milestone 1: Basic, Local Asset Browser
Legacy
OpenGL Error
Meta
Good First Issue
Meta
Papercut
Meta
Retrospective
Meta
Security
Module
Animation & Rigging
Module
Core
Module
Development Management
Module
Grease Pencil
Module
Modeling
Module
Nodes & Physics
Module
Pipeline, Assets & IO
Module
Platforms, Builds & Tests
Module
Python API
Module
Render & Cycles
Module
Sculpt, Paint & Texture
Module
Triaging
Module
User Interface
Module
VFX & Video
Module
Viewport & EEVEE
Platform
FreeBSD
Platform
Linux
Platform
macOS
Platform
Windows
Severity
High
Severity
Low
Severity
Normal
Severity
Unbreak Now!
Status
Archived
Status
Confirmed
Status
Duplicate
Status
Needs Info from Developers
Status
Needs Information from User
Status
Needs Triage
Status
Resolved
Type
Bug
Type
Design
Type
Known Issue
Type
Patch
Type
Report
Type
To Do
No Milestone
No project
No Assignees
3 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: blender/blender#127147
Loading…
Reference in New Issue
Block a user
No description provided.
Delete Branch "fclem/blender:grease-pencil-wireframe"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Started from a copy of
grease_pencil_weight_batch_ensure
and simplified it. Might be too complex for what it does.
Would appreciate if reviewer can check if we can simplify
this (or make it clearer).
Fix #120604
@ -1296,0 +1354,4 @@
drawing_start_offset += 1;
for (const int point_i : IndexRange(points.size())) {
GPU_indexbuf_add_generic_vert(&elb, point_i + drawing_start_offset);
Seems worth calculating the size first, then using
GPU_indexbuf_get_data
and filling the data in parallel. TheseGPU_indexbuf_add_generic_vert
calls really show up in profilesDo you have any container preference for storing the sizes?
I used
Vector
s for now, if there is a better practice let me know.TBH just writing the data directly and leaving parallelization later would be fine for now IMO. To parallelize it we'd need to store offsets per stroke since they can be hidden. Doesn't quite seem worth it right now.
Or that's fine too I suppose!
Though generally a better practice for storing a sequence of offsets is using integers and
OffsetIndices
Should be fine now I think.
@ -1296,0 +1330,4 @@
object, info.drawing, memory);
visible_strokes.foreach_index([&](const int curve_i) {
IndexRange points = points_by_curve[curve_i];
const IndexRange points
@ -1296,0 +1349,4 @@
blender::MutableSpan<uint32_t> indices = GPU_indexbuf_get_data(&elb);
threading::parallel_for(cyclic_per_curve.index_range(), 1024, [&](const IndexRange range) {
for (const int i_curve : range) {
i_curve
->curve
@ -1296,0 +1351,4 @@
threading::parallel_for(cyclic_per_curve.index_range(), 1024, [&](const IndexRange range) {
for (const int i_curve : range) {
/* Drop the trailing restart index. */
IndexRange offset_range = range_per_curve[i_curve].drop_back(1);
const IndexRange
@ -1296,0 +1355,4 @@
/* Shift the range by i_curve to account for the second padding vertices.
* The first one is already accounted for during counting (as primitive restart). */
IndexRange index_range = offset_range.shift(i_curve + 1);
for (const int i : IndexRange(offset_range.size())) {
offset_range.index_range()
This is weird semantically but ok.
Hummm seems to work 🤔
@blender-bot build