Announcement

Collapse
No announcement yet.

Rust-GPU 0.4 Released To Provide "First Class" GPU Graphics & Compute Shaders With Rust

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

  • Rust-GPU 0.4 Released To Provide "First Class" GPU Graphics & Compute Shaders With Rust

    Phoronix: Rust-GPU 0.4 Released To Provide "First Class" GPU Graphics & Compute Shaders With Rust

    Embark Studios has released a new version of Rust-GPU that has a goal of making Rust a first-class programming language and ecosystem for GPU shader development...

    Phoronix, Linux Hardware Reviews, Linux hardware benchmarks, Linux server benchmarks, Linux benchmarking, Desktop Linux, Linux performance, Open Source graphics, Linux How To, Ubuntu benchmarks, Ubuntu hardware, Phoronix Test Suite

  • #2
    I really don't get it, why would you use rust as a shader language. The only benefit I could see is the trait-system, if you could export them as parameters on compile time.
    But you would not want to use any bigger data structures either way. All variables are either already memory management or are locally on the stack. Using anything big is heavily inefficient.
    GLSL and HLSL are very simple for a reason.
    If this would mean a easier usage of the GPU inside of rust, that would be awesome, but as a shader language, it just another toy.

    While I agree that languages like GLSL and HLSL need to change.
    SIMD has its own limitations and needs it's own solutions and not just a port of SISD/MIMD language.

    Edit: Thank you for all the answers, there are a lot of good points you made
    Last edited by davibu; 24 December 2022, 07:10 AM.

    Comment


    • #3
      This is really cool, not sure the greatest use of it, but I see that some games are already using it, so Neat!

      Comment


      • #4
        Originally posted by davibu View Post
        I really don't get it, why would you use rust as a shader language. The only benefit I could see is the trait-system, if you could export them as parameters on compile time.
        memory safety and no race conditions are nice as well, they want to build a game engine with this.

        Comment


        • #5
          Originally posted by davibu View Post
          I really don't get it, why would you use rust as a shader language. The only benefit I could see is the trait-system, if you could export them as parameters on compile time.
          But you would not want to use any bigger data structures either way. All variables are either already memory management or are locally on the stack. Using anything big is heavily inefficient.
          GLSL and HLSL are very simple for a reason.
          If this would mean a easier usage of the GPU inside of rust, that would be awesome, but as a shader language, it just another toy.

          While I agree that languages like GLSL and HLSL need to change.
          SIMD has its own limitations and needs it's own solutions and not just a port of SISD/MIMD language.
          While I do agree with you that there doesn't seem to be a great benefit in using Rust for writing shaders, I don't think that's the main reason. If we consider that Rust is just at least as good as GLSL for writing shaders, that would already be sufficient considering the other benefits:
          • Less programming languages to learn to work on a single project;
          • Can share a single implementation of functions between your CPU and GPU code.
          That second point alone already makes this almost necessary. Currently, C++ codebases already have this benefit to a certain degree when working with GLSL. This avoids duplication of work and greatly simplifies unit testing of your GPU code, increasing quality.

          Comment


          • #6
            Originally posted by davibu View Post
            I really don't get it, why would you use rust as a shader language. The only benefit I could see is the trait-system, if you could export them as parameters on compile time.
            But you would not want to use any bigger data structures either way. All variables are either already memory management or are locally on the stack. Using anything big is heavily inefficient.
            GLSL and HLSL are very simple for a reason.
            If this would mean a easier usage of the GPU inside of rust, that would be awesome, but as a shader language, it just another toy.

            While I agree that languages like GLSL and HLSL need to change.
            SIMD has its own limitations and needs it's own solutions and not just a port of SISD/MIMD language.
            I also don't really see a point in using Rust for shaders rather than some DSL (better than GLSL of course). But maybe having to deal with a single language with (hopefully) easy sharing of data structures could have an appeal.

            Comment


            • #7
              I have yet to read their github to understand how they relate to gfx-rs


              Update: they are different sutff, gfx-rs is to replace OpenGL/Vulkan so you can write 1 app and it would run everywher

              rust-gpu is to use rust instead of GLSL/HLSL and so on
              Last edited by andrei_me; 23 December 2022, 01:17 PM.

              Comment


              • #8
                Originally posted by davibu View Post
                I really don't get it, why would you use rust as a shader language. The only benefit I could see is the trait-system, if you could export them as parameters on compile time.
                But you would not want to use any bigger data structures either way. All variables are either already memory management or are locally on the stack. Using anything big is heavily inefficient.
                GLSL and HLSL are very simple for a reason.
                If this would mean a easier usage of the GPU inside of rust, that would be awesome, but as a shader language, it just another toy.

                While I agree that languages like GLSL and HLSL need to change.
                SIMD has its own limitations and needs it's own solutions and not just a port of SISD/MIMD language.
                Traits in shaders is a huge deal. You should see the amount of binding code that needs to be written for wgpu with WGSL.
                attribute structs with traits is a huge deal.

                Comment


                • #9
                  Originally posted by davibu View Post
                  I really don't get it, why would you use rust as a shader language.
                  Because Rust is a buzzword and/or some people are afraid of GLSL because they incorrectly think that anything with the letters "GL" in it is too old to be cool

                  Comment


                  • #10
                    Originally posted by kpedersen View Post

                    Because Rust is a buzzword and/or some people are afraid of GLSL because they incorrectly think that anything with the letters "GL" in it is too old to be cool
                    Yadi yadi,

                    or simply read their page:

                    We want to streamline our own internal development with a single great language, build an open source graphics ecosystem and community, facilitate code-sharing between GPU and CPU, and most importantly: to enable our (future) users, and fellow developers, to more rapidly build great looking and engaging experiences.

                    If we do this project right, one wouldn't necessarily need an entire team of rendering engineers to build a good looking game, instead one would simply use a few of the existing open-source crates that provide the graphical effects needed to create the experience you're after. Instead of sharing and copy'n'pasting snippets of TAA code on forum posts, one could simply find and use the right crates from crates.io.
                    And since compute shaders are on their agenda, they could be easily integrated with the growing rust numerics ecosystem.

                    Comment

                    Working...
                    X