WIP: Draw: Split point cloud position and radius vertex buffers #113958

Closed
Hans Goudey wants to merge 16 commits from HooglyBoogly:implicit-sharing-gpu-vertbuf into main

When changing the target branch, be careful to rebase the branch in your fork to match. See documentation.
Member

Previously positions and radii were merged into a single vertex
buffer. This reduces the number of textures needed by the GPU
but it precludes some important future optimizations like using
implicit sharing for VBOs and skipping uploading the radius when
it's a single value.

Split the attributes into two VBOs, one a float3 buffer, which wasn't
possible before OpenGL 4.0, and the other a float buffer.

Previously positions and radii were merged into a single vertex buffer. This reduces the number of textures needed by the GPU but it precludes some important future optimizations like using implicit sharing for VBOs and skipping uploading the radius when it's a single value. Split the attributes into two VBOs, one a float3 buffer, which wasn't possible before OpenGL 4.0, and the other a float buffer.
Hans Goudey added 16 commits 2023-10-20 00:01:54 +02:00
ed151b09c9 WIP: Attributes: Integrate implicit sharing with the attribute API
Add the ability to retrieve implicit sharing info directly from the
C++ attribute API, which simplifies memory usage and performance
optimizations making use of it. This commit uses the additions to
the API to avoid copies in a few places:
- The "rest_position" attribute in the mesh modifier stack
- Instance on Points node
- Instances to points node
- Mesh to points node
- Points to vertices node

Many files are affected because in order to include the new information
in the API's returned data, I had to switch a bunch of types from
`VArray` to `AttributeReader`. This generally makes sense anyway, since
it allows retrieving the domain, which wasn't possible before in some
cases. I overloaded the `*` deference operator for some syntactic sugar
to avoid the (very ugly) `.varray` that would be necessary otherwise.

TODO:
- [ ] Fix tests
    - [ ] cycles_pointcloud_cpu (Failed)
    - [ ] geo_node_attributes_test_attribute_curve_map (Failed)
    - [ ] geo_node_attributes_test_attribute_map_range (Failed)
    - [ ] geo_node_attributes_test_attribute_proximity (Failed)
    - [ ] geo_node_curves_test_handle_type_selection (Failed)
    - [ ] geo_node_curves_test_spline_parameter (Failed)
    - [ ] geo_node_geometry_test_delete_geometry (SEGFAULT)
    - [ ] geo_node_geometry_test_realize_instances_materials (Subprocess aborted)
    - [ ] geo_node_instance_test_instance_on_points (Subprocess aborted)
    - [ ] geo_node_instance_test_instance_to_points (Subprocess aborted)
    - [ ] geo_node_instance_test_instance_transforms (Subprocess aborted)
    - [ ] geo_node_mesh_test_set_position_normals_update (Subprocess aborted)
    - [ ] geo_node_points_test_point_instance (Subprocess aborted)
    - [ ] geo_node_utilities_test_accumulate_field_column_grid (Subprocess aborted)
    - [ ] geo_node_vector_test_vector_map_range (Subprocess aborted)
Hans Goudey added the
Module
EEVEE & Viewport
label 2023-10-20 00:02:12 +02:00
Author
Member

It turns out that GPUs don't support float3 textures on any of our GPU backends. Instead we need to move away from using textures here, before splitting these attributes. So it's not really worth keeping this PR open.

It turns out that GPUs don't support `float3` textures on any of our GPU backends. Instead we need to move away from using textures here, before splitting these attributes. So it's not really worth keeping this PR open.
Hans Goudey closed this pull request 2023-11-13 12:54:44 +01:00

Pull request closed

Sign in to join this conversation.
No reviewers
No Label
Interest
Alembic
Interest
Animation & Rigging
Interest
Asset Browser
Interest
Asset Browser Project Overview
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
EEVEE & Viewport
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
Virtual Reality
Interest
Vulkan
Interest
Wayland
Interest
Workbench
Interest: X11
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
EEVEE & Viewport
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
Platform
FreeBSD
Platform
Linux
Platform
macOS
Platform
Windows
Priority
High
Priority
Low
Priority
Normal
Priority
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
1 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: blender/blender#113958
No description provided.