X Tutup
Skip to content

Use flip model for D3D11 swapchains#484

Open
smoogipoo wants to merge 3 commits intoveldrid:masterfrom
smoogipoo:d3d-flip-mode
Open

Use flip model for D3D11 swapchains#484
smoogipoo wants to merge 3 commits intoveldrid:masterfrom
smoogipoo:d3d-flip-mode

Conversation

@smoogipoo
Copy link
Contributor

As documented here, here and here, the flip model has performance advantages compared to the blt model.

Comment on lines +9 to +16
/// <summary>
/// Returns the given parent of a <see cref="IDXGIObject"/>, or null if no such object exists.
/// </summary>
public static T GetParentOrNull<T>(this IDXGIObject dxgiObject) where T : ComObject
{
// Importantly, this uses the overload with an out value, which itself returns the object.
return dxgiObject.GetParent(out T obj).Success ? obj : null;
}
Copy link
Contributor

Choose a reason for hiding this comment

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

For what it's worth, on iOS, this method results in the AOT toolchain to crash at compilation time. Inlining to usages fixes that.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Ah yes, thanks for the reminder. Totally forgot about that.

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

X Tutup