osu-framework icon indicating copy to clipboard operation
osu-framework copied to clipboard

Introduce abstraction of `VeldridDevice` and pipelines

Open smoogipoo opened this issue 1 year ago • 1 comments

Prereqs:

  • [ ] https://github.com/ppy/osu-framework/pull/6186

The goal is to move out most of the low-level device-oriented implementation of Veldrid into a new class called VeldridDevice and associated BasicPipeline/GraphicsPipeline classes.
This will all be used for other implementations, such as my upcoming deferred renderer, which need support for everything here minus the very VeldridRenderer-specific implementations of multiple command lists/etc.


One thing I'll also mention, is that in the process of implementing the deferred renderer a while ago I got increasingly annoyed at the difference in code style between blocked methods, lambdas with generics, lambdas without generics, and properties:

public void Method()
{
    /**/;
}

public void LambdaWithGenerics<T>()
    where T : X
    => /**/;

public void LambdaWithoutGenerics() => /**/;

public X Property => /**/;

When scrolling through code, I found it much easier to read the latter two if the expression was placed on a new line like the former two.

I'm not enforcing this, and I don't mean this to change our code style going forward, but it's something that I've applied to this PR and I hope it's agreeable, for my own sanity.

smoogipoo avatar Feb 19 '24 02:02 smoogipoo

This has merge conflicts around the DeleteFramebufferImplementation() method added during review of https://github.com/ppy/osu-framework/pull/6186. Unsure of resolution and impact on the rest of the series, so I'm not attempting to fix.

bdach avatar Feb 26 '24 08:02 bdach

I think it's still fine to implement DeleteFrameBufferImplementation locally (both here and the upcoming DeferredRenderer. I've fixed the conflicts.

smoogipoo avatar Feb 27 '24 14:02 smoogipoo

Platform testing looks fine, so after clarifications re: above I imagine this'll be good to go.

bdach avatar Mar 05 '24 11:03 bdach