GPU: Add GPU frame capture support. #105717

Merged
Jeroen Bakker merged 4 commits from Jason-Fielder/blender:GPU_frame_capture_support_2 into main 2023-03-16 08:54:18 +01:00
Member

Adds two modes of GPU frame capture support for
enhanced debugging. GPU frame capture begin/end
allow instantaneous frame capture of all GPU commands
within the capture boundary.

GPU frame capture scopes allow several user-defined capture
regions which can wrap key parts of code. These scopes are
exposed to connected GPU tools allowing the user to manually
trigger a capture of a known scope at the desired time.

This is currently integrated with the Metal backend for
support with Xcode.

Related to #105591

Adds two modes of GPU frame capture support for enhanced debugging. GPU frame capture begin/end allow instantaneous frame capture of all GPU commands within the capture boundary. GPU frame capture scopes allow several user-defined capture regions which can wrap key parts of code. These scopes are exposed to connected GPU tools allowing the user to manually trigger a capture of a known scope at the desired time. This is currently integrated with the Metal backend for support with Xcode. Related to #105591
Jason Fielder added 1 commit 2023-03-13 13:37:32 +01:00
d870d7092b GPU: Add GPU frame capture support.
Adds two modes of GPU frame capture support for
enhanced debugging. GPU frame capture begin/end
allow instantaneous frame capture of all GPU commands
within the capture boundary.

GPU frame capture scopes allow several user-defined capture
regions which can wrap key parts of code. These scopes are
exposed to connected GPU tools allowing the user to manually
trigger a capture of a known scope at the desired time.

This is currently integrated with the Metal backend for
support with Xcode.

Related to #105591
Jason Fielder requested review from Jeroen Bakker 2023-03-13 13:37:50 +01:00
Jeroen Bakker requested changes 2023-03-14 09:11:27 +01:00
Jeroen Bakker left a comment
Member

I haven't tried if it works yet. Code seems fine, comments need some work (spelling and code style).

I haven't tried if it works yet. Code seems fine, comments need some work (spelling and code style).
@ -29,6 +29,56 @@ void GPU_debug_get_groups_names(int name_buf_len, char *r_name_buf);
*/
bool GPU_debug_group_match(const char *ref);
/** GPU Frame capture support.
Member

API docs although not really specified in https://wiki.blender.org/wiki/Style_Guide/C_Cpp we normally
open and close the comment on its own line eg:

/**
 * GPU Frame capture support.
 *
 * Allows instantaneous Frame capture of GPU calls between begin/end.
 */

In this case, we should use Comment sections and add API docs per function.

API docs although not really specified in https://wiki.blender.org/wiki/Style_Guide/C_Cpp we normally open and close the comment on its own line eg: ``` /** * GPU Frame capture support. * * Allows instantaneous Frame capture of GPU calls between begin/end. */ ``` In this case, we should use Comment sections and add API docs per function.
@ -32,0 +34,4 @@
void GPU_debug_capture_begin(void);
void GPU_debug_capture_end(void);
/** GPU debug frae capture scopes.
Member

Spelling: frame

Spelling: frame
@ -32,0 +49,4 @@
bool GPU_debug_capture_scope_begin(void *scope);
void GPU_debug_capture_scope_end(void *scope);
/** GPU Debug Capture Usage Example
Member

This should be added to the comment section header.

This should be added to the comment section header.
Jason Fielder added 1 commit 2023-03-14 21:14:28 +01:00
Michael Parkin-White added 1 commit 2023-03-14 21:14:55 +01:00
First-time contributor

Thanks for the feedback, hopefully have addressed the issues highlighted, but happy to iterate more if needed!

Thanks for the feedback, hopefully have addressed the issues highlighted, but happy to iterate more if needed!
Jason Fielder added 1 commit 2023-03-15 15:13:44 +01:00
Jeroen Bakker added this to the 3.6 LTS milestone 2023-03-16 08:31:00 +01:00
Jeroen Bakker added this to the EEVEE & Viewport project 2023-03-16 08:31:05 +01:00
Jeroen Bakker approved these changes 2023-03-16 08:53:10 +01:00
@ -32,0 +66,4 @@
/**
* GPU Frame capture support.
*
* Allows instananeous frame capture of GPU calls between begin/end.
Member

instantaneous

instan**t**aneous
Jeroen Bakker merged commit 3d9d67594c into main 2023-03-16 08:54:18 +01:00
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 Assignees
3 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#105717
No description provided.