[Migrated] Image macro doesn't fully enforce valid use of non-sampled storage images
まだ誰も着手していません。
- 主要言語
- Rust
- スター
- 3.4k
- フォーク
- 126
- PR マージ指標
- 30日以内にマージされた PR はありません
説明
Issue automatically imported from old repo: https://github.com/EmbarkStudios/rust-gpu/issues/812
Old labels: t: bug,s: blocked
Originally creatd by fu5ha on 2021-11-29T20:17:40Z
Currently, if we create an image type with the image macro as such:
Image!(2D, type=f32, sampled=false),
the image will still be able to be .read/.fetched, and the spirv Image object won't be decorated as NonReadable. However, according to vulkan spec, "If shaderStorageImageReadWithoutFormat is not enabled, any variable created with a "Type" of OpTypeImage that has a "Sampled" operand of 2 and an "Image Format" operand of Unknown must be decorated with NonReadable."
This can be solved for now by just using an explicit format=blah in the Image macro instead of type, but I think we could also handle this/validate it in the macro automatically. I think the best way forward would be:
- Make a
readableflag in the macro which gets auto-disabled under the above conditions, and when disabled, decorates theOpTypeImagewithNonReadableand doesn't allow to do.read/.fetchon the Image. - However, if it is manually enabled, then we do the current behavior, allowing
readetc. (assumingshaderStorageImageReadWithoutFormatis enabled).
コントリビューションガイド
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
調査の方向性
Image マクロから始めて、type、sampled=false、.read/.fetch が生成される OpTypeImage にどのように影響するかを追跡します。NonReadable がどのように出力されるか、また読み取り操作がどのように許可されるかを確認します。無効な非サンプルド storage image が NonReadable としてマークされ、明示的に有効化されない限り読み取れず、その動作が issue に記載された Vulkan の規則に照らして確認されれば完了です。
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- rust
- 領域
- compilers
- issue の種類
- バグ
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 活発さ
- 停滞
- 明瞭さ
- おおむね明確
- 初心者へのやさしさ
- 35/100