[Migrated] Shaders should not implicitly enable VulkanMemoryModel
まだ誰も着手していません。
- 主要言語
- Rust
- スター
- 3.4k
- フォーク
- 126
- PR マージ指標
- 30日以内にマージされた PR はありません
説明
Issue automatically imported from old repo: https://github.com/EmbarkStudios/rust-gpu/issues/1090
Old labels: t: bug
Originally creatd by Firestar99 on 2023-08-10T11:29:34Z
Expected Behaviour
rust-gpu compiling for any spirv-unknown-vulkan1.X target should not implicitly emit OpCapability VulkanMemoryModel in the resulting spv, instead one would need to call SpirvBuilder.capability(Capability::VulkanMemoryModel) to enable the VulkanMemoryModel explicitly.
This implicit enabling of that Capability can get in the way of 1:1 porting of glsl shaders to rust-gpu, as it also requires changes to the CPU code to enable the VulkanMemoryModel device feature. Switching to target spirv-unknown-spv1.X does remove the implicit capability from the shader, but it is disencouraged as it also "disables a bunch of rules in spirv-val".
Example & Steps To Reproduce
git clonehttps://github.com/Firestar99/rust-gpu-vulkano-example.git- In
example/build.rschangeTARGETfromspirv-unknown-spv1.3tospirv-unknown-vulkan1.2(or any other vulkan version) cargo runto see it fail when changes of 2. are applied
System Info
- Rust: nightly-2023-05-27
- OS: Ubuntu 23.04
- GPU: RADV REMBRANDT
- SPIR-V: SPIRV-Tools v2023.3 unknown hash, 2023-05-25T20:33:54
コントリビューションガイド
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
調査の方向性
まず、レポートで説明されている SpirvBuilder 周辺の target の処理と example/build.rs の TARGET 値から始めます。spirv-unknown-vulkan1.2 で再現し、結果として得られる SPIR-V capability を調べ、spirv-unknown-spv1.3 と比較します。Vulkan target が VulkanMemoryModel を暗黙的に出力しなくなり、明示的な SpirvBuilder.capability(Capability::VulkanMemoryModel) では引き続き有効化できれば完了です。
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- rust
- 領域
- compilers, computer-graphics
- issue の種類
- バグ
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 活発さ
- 停滞
- 明瞭さ
- おおむね明確
- 初心者へのやさしさ
- 45/100