Giter Site home page Giter Site logo

ppy / veldrid Goto Github PK

View Code? Open in Web Editor NEW

This project forked from veldrid/veldrid

12.0 6.0 5.0 87.01 MB

A low-level, portable graphics library for .NET.

Home Page: https://veldrid.dev/

License: MIT License

Shell 0.03% C# 99.75% Metal 0.03% Objective-C 0.19%

veldrid's Introduction

ppy.Veldrid

Veldrid is a cross-platform, graphics API-agnostic rendering and compute library for .NET. It provides a powerful, unified interface to a system's GPU and includes more advanced features than any other .NET library. Unlike other platform- or vendor-specific technologies, Veldrid can be used to create high-performance 3D applications that are truly portable.

As of April 2024, this repository no longer tracks and is incompatible with the upstream Veldrid repository. This decision has been made to allow for more agile development without concerns of breaking changes.

veldrid's People

Contributors

mellinoe avatar smoogipoo avatar frenzibyte avatar peppy avatar techpizzadev avatar feliwir avatar trolleyman avatar doom2fan avatar tgjones avatar amerkoleci avatar voldien avatar sa-exe avatar csinkers avatar zaafar avatar ilw8 avatar gleblebedev avatar phelioz avatar jjagg avatar swoolcock avatar bassill avatar drjaydenm avatar natelytle avatar barrybingo avatar tzachshabtay avatar supinepandora43 avatar seanspicer avatar ukoolabs avatar ncatlin avatar krakean avatar curiouserthing avatar

Stargazers

 avatar Sukuratchi avatar NebulaDev avatar YoungChief avatar tomat avatar  avatar Philipp avatar David Strachan avatar Ada avatar Ilya Nikitin avatar Burak Akdere avatar NeXySssss avatar

Watchers

 avatar  avatar Berkan Diler avatar Kenneth avatar  avatar  avatar

veldrid's Issues

Textures are not getting disposed correctly

In osu!framework, we delay disposal of all native resources by 3 frames to make sure that they're not still in-flight by the GPU driver. We may not need to do this anymore under the Veldrid backend, but we do it anyway, because that's what's been safe for us in the past.

Here we encounter an issue, and it starts with the following:

So... In our finalizer, we enqueue an action that happens 3 frames in the future. In that same frame, the Veldrid Texture gets finalised. Because IsReleaseOnFinalizerEnabled is false, the Texture doesn't get released, and instead the pointer is lost. Our enqueued action runs, tires to dispose the texture, but this is now a no-op.

Oh, and all of this happens in SharpGen, the binding generator used by Vortice.Windows, used by Veldrid`. It's two too many layers deep for us to fix this for our specific usage.


There are four solutions here:

Hack around it

We can just bypass the finaliser in this one specific case.

Difficulty: Easy

Check whether this is a problem that needs to be resolved in SharpGen itself.

It seems fundamentally broken to me that the pointers can just get lost like this. The difficulty here is that this is two levels of packages, and I'm not sure SharpGen is well supported anymore given it's gone 7 months without updates.

Difficulty: Medium

Check if osu!framework needs to schedule disposal under the Veldrid backend

This is going to require a lot of work and validation on every surface. Besides, this is technically not correct anyway as the D3D docs state that you should be waiting to dispose until calling ClearState() at the beginning of the next frame.

Difficulty: Hard

Use another library than Vortice.Windows (Silk.NET?)

I have made significant progress on this, but I have once again reaffirmed that the Silk.NET project is truly insane. To be blunt, if the library is bricking IDEs then I have no interest in using it.

Difficulty: Extreme

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.