Expose more information on compiled entry points
Nadie ha tomado este issue todavía.
- Lenguaje dominante
- Rust
- Estrellas
- 3.4k
- Forks
- 126
- Métricas de merge de PR
- Sin PR fusionados en 30 d
Descripción
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.
Guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Línea de trabajo
Comienza en CompileResult.entry_points y revisa el EntryPoint propuesto en rustc_codegen_spirv_types junto con naga::ir::EntryPoint. Primero determina qué representación y metadatos debería exponer el proyecto; se considera terminado cuando CompileResult proporciona información acordada suficiente sobre los puntos de entrada para la generación de código sin conocimiento previo del shader.
Escrito por el modelo de indexación a partir del texto del issue.
Evaluación
- Stack tecnológico
- rust
- Área
- backend-api-design, compilers
- Tipo de issue
- Nueva funcionalidad
- Dificultad
- 5/5
- Tiempo estimado
- Más de una semana
- Estado de actividad
- Estancado
- Claridad
- Bastante claro
- Aptitud para principiantes
- 35/100