Hacktoberfest 2026: những issue maintainer đã đánh dấu cho tháng Mười, đang mở và phù hợp người mới. Xem issue Hacktoberfest

Expose more information on compiled entry points

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

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

Đánh giá

Độ khó
5/5
Thời gian dự kiến
Hơn một tuần
Mức phù hợp với người mới
35/100
Loại issue
Tính năng
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Đình trệ
Công nghệ
rust

Hướng nghiên cứu

Bắt đầu từ CompileResult.entry_points và xem xét EntryPoint được đề xuất trong rustc_codegen_spirv_types cùng với naga::ir::EntryPoint. Trước tiên, hãy xác định dự án nên cung cấp biểu diễn và siêu dữ liệu nào; công việc được xem là hoàn tất khi CompileResult cung cấp đủ thông tin entry point đã thống nhất cho việc sinh mã mà không cần biết trước về shader.

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

Mô tả

enhancement

Problem

Right now the entry_points in CompileResult contains names only. This limits limits our/the users ability to generate code.

Proposal

Exposing some additional information on them could help with generating code, without prior knowledge of how each entry point works (like having a dictionary of graphics and compute shaders).

Expose SpirV representation

Right now I am thinking of putting a version of the generated EntryPoint spirv lang struct into rustc_codegen_spirv_types because of how easy it is to implement.

pub struct EntryPoint {
    pub execution_model: spirv::ExecutionModel,
    pub entry_point: spirv::Word,
    pub name: String,
    pub interface: Vec<spirv::Word>,
}
Use naga

Another idea I had was using naga::ir::EntryPoint

pub struct EntryPoint {
    pub name: String,
    pub stage: ShaderStage,
    pub early_depth_test: Option<EarlyDepthTest>,
    pub workgroup_size: [u32; 3],
    pub workgroup_size_overrides: Option<[Option<Handle<Expression>>; 3]>,
    pub function: Function,
}

but this is a bit detached from the underlying spirv (harder to parse from spirv code + less shader stages etc)

Unique struct

The best version would probably be a combination of the 2.

Even if it doesn't end up getting merged, I'll do it for my own project. All insights are welcome.

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

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.

Issue khác của Rust-GPU/rust-gpu

Tất cả issue của Rust-GPU/rust-gpu

Issue tương tự

Thêm issue về Rust

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.