Announcement

Collapse
No announcement yet.

Asahi Linux May Pursue Writing Apple Silicon GPU Driver In Rust

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • #31
    Originally posted by marios View Post
    Then someone will have to rewrite it in C, I guess...
    If that happens, that new author will be grateful for the documentation provided by the original author's work, regardless of the language it's written in. So the "will have to" which implies resentment, is the exact opposite of the feeling that individual will truly have.

    Comment


    • #32
      Originally posted by Dukenukemx View Post
      So does that mean OpenGL is working on the M1 on Linux?
      Yes. It currently runs at 2 frames per second (because it's written in python) but it works. A surprisingly-spec-complaint prototype openGL driver.

      Comment


      • #33
        Originally posted by Developer12 View Post

        Yes. It currently runs at 2 frames per second (because it's written in python) but it works. A surprisingly-spec-complaint prototype openGL driver.
        Pretty sure it's GLES, and it's definitely not advanced desktop opengl.

        But i also think it probably runs a lot faster than 2fps even in python, it's the fact that they are running it remotely over USB that slows it down. It has to copy the framebuffer over USB every frame. And most of the driver is in c (in mesa), where a lot of the expensive logic goes. The kernel driver side written in python doesn't really have to do that much comparatively.
        Last edited by smitty3268; 12 August 2022, 12:38 AM.

        Comment


        • #34
          Originally posted by marios View Post
          Then someone will have to rewrite it in C, I guess...
          Because??

          Comment


          • #35
            Originally posted by ferry View Post

            C language and GCC is a proven tool for device driver development. Rust is not a proven tool for device driver development, in fact there is no kernel code at all, except some very trivial example.

            Writing a driver for undocumented hardware is challenging, doing so with an experimental compiler is ... hobby-ism?
            I do not know what the Asahi team will eventually choose to do, but I think we all look forward to your M1 GPU driver written in C. When will you be submitting that upstream exactly? There is an old adage: Lead, follow, or get out of the way.
            Last edited by CommunityMember; 12 August 2022, 01:18 AM.

            Comment


            • #36
              seeing rust being considered for this is neat for sure, If I am remebering right, I think Mr. Overstreet's work on bcachefs has some rust in it too he would like to see get working.

              Comment


              • #37
                Originally posted by smitty3268 View Post

                Pretty sure it's GLES, and it's definitely not advanced desktop opengl.

                But i also think it probably runs a lot faster than 2fps even in python, it's the fact that they are running it remotely over USB that slows it down. It has to copy the framebuffer over USB every frame. And most of the driver is in c (in mesa), where a lot of the expensive logic goes. The kernel driver side written in python doesn't really have to do that much comparatively.
                This doesn't replace Mac OSX in the internal SSD? Is that a choice or Apple prevents you from doing this?

                Comment


                • #38
                  I wonder if people that are against writing drivers in Rust because "Such important thing as driver should be written only in C" would be against C years ago saying "Such important thing as driver should be written only in Assembler".

                  Comment


                  • #39
                    I don't really care how they write it, just kinda sitting on the edge of my seat to see how it'll perform when they finally do.

                    Comment


                    • #40
                      Prominent Asahi Linux contributor Asahi Lina
                      You mean Hector Martin?

                      Comment

                      Working...
                      X