Rust-GPU / Rust-GPU/rust-gpu

[Migrated] Shaders should not implicitly enable VulkanMemoryModel

Đang mở
#77 0 bình luận 0 reaction 0 người được giao Xem trên GitHub

Chưa có ai nhận issue này.

Ngôn ngữ chính
Rust
Star
3.4k
Fork
126
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

Mô tả

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
  1. git clone https://github.com/Firestar99/rust-gpu-vulkano-example.git
  2. In example/build.rs change TARGET from spirv-unknown-spv1.3 to spirv-unknown-vulkan1.2 (or any other vulkan version)
  3. cargo run to 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

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Hướng nghiên cứu

Bắt đầu với phần xử lý target xung quanh SpirvBuilder và giá trị TARGET trong example/build.rs được mô tả trong báo cáo. Tái hiện bằng spirv-unknown-vulkan1.2 và kiểm tra capability SPIR-V thu được, so sánh với spirv-unknown-spv1.3. Được xem là hoàn tất khi các target Vulkan không còn phát VulkanMemoryModel một cách ngầm định, trong khi SpirvBuilder.capability(Capability::VulkanMemoryModel) vẫn bật nó một cách tường minh.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Đánh giá

Công nghệ
rust
Lĩnh vực
compilers, computer-graphics
Loại issue
Lỗi
Độ khó
4/5
Thời gian dự kiến
3-5 ngày
Mức độ hoạt động
Đình trệ
Độ rõ ràng
Khá rõ ràng
Mức phù hợp với người mới
45/100

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.