Skip to content

Expose graphics debugger capture functions in wgpu.h#550

Open
ShadelessFox wants to merge 2 commits intogfx-rs:trunkfrom
ShadelessFox:expose-graphics-debugger-capture-functions
Open

Expose graphics debugger capture functions in wgpu.h#550
ShadelessFox wants to merge 2 commits intogfx-rs:trunkfrom
ShadelessFox:expose-graphics-debugger-capture-functions

Conversation

@ShadelessFox
Copy link
Copy Markdown

Quite useful when rendering to an off-screen buffer.

I would also like to extend the wgpu API to report whether a graphics debugger capture is available (and, if not, return a string indicating the reason, similar to RenderDoc::NotAvailable) and whether it's currently active, as it's currently up to the library's consumer to track; both RenderDoc and Metal expose such APIs, so it should be pretty straightforward to implement. Please let me know what you think.

(device.id, &device.context)
};

// FIXME: wgpu-hal's start_graphics_debugger_capture returns a bool, but wgpu's doesn't
Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I made this function return a boolean regardless, so when wgpu's implementation is updated to return a bool, it can be updated here as well without breaking the ABI.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sounds good.

Copy link
Copy Markdown
Member

@cwfitzgerald cwfitzgerald left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks groovy to me!

(device.id, &device.context)
};

// FIXME: wgpu-hal's start_graphics_debugger_capture returns a bool, but wgpu's doesn't
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sounds good.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants