45

Rust to SPIR-V compiler

 5 years ago
source link: https://www.tuicool.com/articles/zMBRnmv
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
neoserver,ios ssh client

Rlsl - Rust Like Shading Language

The project is currently unusable

What is Rlsl?

Rlsl can compile a subset of Rust to SPIR-V . You can read more about the limitations here .

Rlsl targets the logical addressing model of SPIR-V.

The Logical addressing model means pointers are abstract, having no physical size or numeric value. In this mode, pointers can only be created from existing objects, and they cannot be stored into an object, unless additional capabilities, e.g., VariablePointers, are declared to add such functionality.

Features

  • Supports cargo
  • Multiple entry points can be defined in the same SPIR-V module
  • Currently supports Vertex, Fragment and Compute shaders
  • Shader code can run on the CPU because rlsl is a subset of Rust
  • Reflection TODO
  • Support library for interop between Rust and rlsl for uniforms (std140, std420) TODO

Installation

TODO

How?

RUSTC=rlsl cargo build

bUJVzmM.gif

Blog

  1. What is RLSL
  2. Milestone 1

Want to help?

Contribute

The project currently does not accept any contributions yet.

  • Rlsl can not be easily built by anyone
  • There is no documentation
  • Debugging tools are almost non existent
  • There is no infrastructure for testing
  • No guide level explanation for contributions

Rlsl will start to accept contributions after those issues are properly addressed.

Donate

73QFVr7.png!web

Community

Want to chat? Join us on gitter .

Feel free to open an issue at any time.


Recommend

  • 57
    • www.tuicool.com 6 years ago
    • Cache

    Implementing a JIT-compiler with Rust

    I am writing Dora , a simple JIT-compiler with Rust. Dora is both the name of the custom programming lan...

  • 40
    • www.tuicool.com 5 years ago
    • Cache

    Rust compiler added to Android tree

    The Rust Programming Language This is the main source code repository for Rust . It contains the compiler, standard library, and documentation. Quick Start

  • 12
    • kvark.github.io 3 years ago
    • Cache

    Horrors of SPIR-V

    History For WebGPU community group, the debate on whether or not we can adopt SPIR-V for the API needs was probably the most contentious of all, it was discussed for years. Me and a lot of other folks, especially from Google, were d...

  • 2

    In vkd3d-proton, we’re translating D3D12 to Vulkan, and the single biggest piece I’ve contributed so far is translating shader model 6 to Vulkan. We already had DXBC support, bu...

  • 7

    My personal hell of translating DXIL to SPIR-V – part 2 In the previous blog post, I began a long form exploratio...

  • 6

    My personal hell of translating DXIL to SPIR-V – part 3 It’s time we tackle one of the big problems of DXIL, the binding model. The D3D12 binding model is completely foreign to most people who know the Vulkan binding mode...

  • 9

    My personal hell of translating DXIL to SPIR-V – part 4 It has been quite a while since the last post where I discussed the binding model shenanigans of D3D12, and as promised, it’s time to look at AMD code-gen for variou...

  • 11

    Time for despair It has taken way too long to get to this point, but we must address the final challenge of translating DXIL, a claustrophobic mess that haunts me to this day, the most nightmarish set of poorly understood heuristics which...

  • 8

    My personal hell of translating DXIL to SPIR-V – finale It has been quite a while since the last post in this series, for good reason. Finding the energy to write this down simply does not happen overnight. It is...

  • 7

    Compilers and IRs: LLVM IR, SPIR-V, and MLIR Compilers are often critical components in various development toolchains that boosts developer productivity. A compiler is normally used as a monolithic...

About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK