GPU subdivision: Bad performance with viewport statistics #96434

Closed
opened 2022-03-14 13:24:40 +01:00 by Arie Leo · 18 comments

System Information
Operating system: Windows-10-10.0.19044-SP0 64 Bits
Graphics card: NVIDIA GeForce GTX 1070/PCIe/SSE2 NVIDIA Corporation 4.5.0 NVIDIA 511.23

Blender Version
Broken: version: 3.2.0 Alpha, branch: master, commit date: 2022-03-14 00:08, hash: b959f603da.
Also broken in 3.1.0 Stable release.
Worked: None i can find.

I'm getting bad perfomance when using Modifier stacks and GPU Subdivision are enabled.
the video are recorded on 3.1 stable release, issue also occurred on 3.2 alpha.
Repro scene are attached.
ModifierStack_GPUSubdiv_BadPerformance.blend
blender_ksRjvVXVIX.mp4

Exact steps for others to reproduce the error

  1. Open the scene file and try to change the Bend Angle on Simple Deform modifier.
  2. Now Toggle the GPU Subdiv settings and repeat step one.
  3. There's should be a performance difference when GPU Subdiv are enabled.

or just watch the attached video of a flailing magazine

**System Information** Operating system: Windows-10-10.0.19044-SP0 64 Bits Graphics card: NVIDIA GeForce GTX 1070/PCIe/SSE2 NVIDIA Corporation 4.5.0 NVIDIA 511.23 **Blender Version** Broken: version: 3.2.0 Alpha, branch: master, commit date: 2022-03-14 00:08, hash: `b959f603da`. Also broken in 3.1.0 Stable release. Worked: None i can find. I'm getting bad perfomance when using Modifier stacks and GPU Subdivision are enabled. the video are recorded on 3.1 stable release, issue also occurred on 3.2 alpha. Repro scene are attached. [ModifierStack_GPUSubdiv_BadPerformance.blend](https://archive.blender.org/developer/F12926703/ModifierStack_GPUSubdiv_BadPerformance.blend) [blender_ksRjvVXVIX.mp4](https://archive.blender.org/developer/F12926702/blender_ksRjvVXVIX.mp4) **Exact steps for others to reproduce the error** 1. Open the scene file and try to change the Bend Angle on Simple Deform modifier. 2. Now Toggle the GPU Subdiv settings and repeat step one. 3. There's should be a performance difference when GPU Subdiv are enabled. or just watch the attached video of a flailing magazine
Author

Added subscriber: @reanimate

Added subscriber: @reanimate

#97182 was marked as duplicate of this issue

#97182 was marked as duplicate of this issue

Added subscribers: @kevindietrich, @mano-wii

Added subscribers: @kevindietrich, @mano-wii

Changed status from 'Needs Triage' to: 'Needs Developer To Reproduce'

Changed status from 'Needs Triage' to: 'Needs Developer To Reproduce'

I can confirm the delay in the example presented in the file.
The GPU subdivision update is 1/5 of the CPU subdivision performance.
@kevindietrich, any idea why this is happening?


Operating system: Windows-10-10.0.22000-SP0 64 Bits
Graphics card: Radeon (TM) RX 480 Graphics ATI Technologies Inc. 4.5.14802 Core Profile/Debug Context 22.2.3 30.0.14029.5006

I can confirm the delay in the example presented in the file. The GPU subdivision update is 1/5 of the CPU subdivision performance. @kevindietrich, any idea why this is happening? --- Operating system: Windows-10-10.0.22000-SP0 64 Bits Graphics card: Radeon (TM) RX 480 Graphics ATI Technologies Inc. 4.5.14802 Core Profile/Debug Context 22.2.3 30.0.14029.5006

This is because the viewport statistics require a the final mesh for the number of triangles/vertices/etc. so the subdivision is evaluated twice: on the CPU and on the GPU. I'm not sure yet how we can improve the situation, maybe by caching the stats when evaluating on the GPU.

This is because the viewport statistics require a the final mesh for the number of triangles/vertices/etc. so the subdivision is evaluated twice: on the CPU and on the GPU. I'm not sure yet how we can improve the situation, maybe by caching the stats when evaluating on the GPU.
Kévin Dietrich changed title from Modifier Stack causing bad performance on GPU Subdivision to Bad GPU Subdivision performance with viewport statistics 2022-03-21 07:43:36 +01:00

Changed status from 'Needs Developer To Reproduce' to: 'Confirmed'

Changed status from 'Needs Developer To Reproduce' to: 'Confirmed'
Author

In #96434#1326519, @kevindietrich wrote:
This is because the viewport statistics require a the final mesh for the number of triangles/vertices/etc. so the subdivision is evaluated twice: on the CPU and on the GPU. I'm not sure yet how we can improve the situation, maybe by caching the stats when evaluating on the GPU.

Oooh interesting, turning off statistics did bring back the performance.
Hmm how about delaying the update of the statistics? ie on mouse click up event?

> In #96434#1326519, @kevindietrich wrote: > This is because the viewport statistics require a the final mesh for the number of triangles/vertices/etc. so the subdivision is evaluated twice: on the CPU and on the GPU. I'm not sure yet how we can improve the situation, maybe by caching the stats when evaluating on the GPU. Oooh interesting, turning off statistics did bring back the performance. Hmm how about delaying the update of the statistics? ie on mouse click up event?

In #96434#1328333, @reanimate wrote:
Oooh interesting, turning off statistics did bring back the performance.
Hmm how about delaying the update of the statistics? ie on mouse click up event?

The statistics update is part of the 3D view draw code, they will be refreshed on each redraw event, it is not really possible to discriminate those events and know which one to delay statistics, and how the delay should be defined.

> In #96434#1328333, @reanimate wrote: > Oooh interesting, turning off statistics did bring back the performance. > Hmm how about delaying the update of the statistics? ie on mouse click up event? The statistics update is part of the 3D view draw code, they will be refreshed on each redraw event, it is not really possible to discriminate those events and know which one to delay statistics, and how the delay should be defined.
Author

In #96434#1328661, @kevindietrich wrote:

In #96434#1328333, @reanimate wrote:
Oooh interesting, turning off statistics did bring back the performance.
Hmm how about delaying the update of the statistics? ie on mouse click up event?

The statistics update is part of the 3D view draw code, they will be refreshed on each redraw event, it is not really possible to discriminate those events and know which one to delay statistics, and how the delay should be defined.

I see, this is kinda problematic. Thanks for the information

> In #96434#1328661, @kevindietrich wrote: >> In #96434#1328333, @reanimate wrote: >> Oooh interesting, turning off statistics did bring back the performance. >> Hmm how about delaying the update of the statistics? ie on mouse click up event? > > The statistics update is part of the 3D view draw code, they will be refreshed on each redraw event, it is not really possible to discriminate those events and know which one to delay statistics, and how the delay should be defined. I see, this is kinda problematic. Thanks for the information

Added subscriber: @Smjert

Added subscriber: @Smjert
Philipp Oeser changed title from Bad GPU Subdivision performance with viewport statistics to GPU subdivision: Bad performance with viewport statistics 2022-04-12 16:45:11 +02:00
Member

Added subscriber: @lichtwerk

Added subscriber: @lichtwerk
Member

Talked to @kevindietrich , setting to High prio (since it is a bug in a new feature according to the playbook

Talked to @kevindietrich , setting to High prio (since it is a bug in a new feature according to the [playbook ](https://wiki.blender.org/wiki/Process/Bug_Reports/Triaging_Playbook)

Added subscriber: @brecht

Added subscriber: @brecht

Could we compute the stats without actually performing the subdivision? Or even just provide a rough estimate? I don't think the exact number is even that important, some guess based on the subdivision level could be enough.

Could we compute the stats without actually performing the subdivision? Or even just provide a rough estimate? I don't think the exact number is even that important, some guess based on the subdivision level could be enough.

Actually we can just get the counters from the draw code's subdivision grid traversal, they are cached there anyway.

Actually we can just get the counters from the draw code's subdivision grid traversal, they are cached there anyway.

This issue was referenced by 163f6a17e4

This issue was referenced by 163f6a17e4fe60ce917715afc5bb5eae3d5ff07a

Changed status from 'Confirmed' to: 'Resolved'

Changed status from 'Confirmed' to: 'Resolved'
Kévin Dietrich self-assigned this 2022-04-27 15:30:48 +02:00
Sign in to join this conversation.
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
6 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#96434
No description provided.