Rust-GPU / Rust-GPU/rust-gpu

`entry_point_name` should be decoupled from the output file name

Open
#572 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Rust
Stars
3.4k
Forks
125
PR merge metrics
No merged PRs in 30d

Description

When using something like this

#[spirv(fragment(entry_point_name = "main"))]
main_frag(){}

I expect output to be main_frag.spv with an OpEntryPoint of "main". Instead, I am seeing cargo gpu using entry_point_name for the output file name. This means I can't decouple them.

I need to decouple as I have a multishader, so I need to output unique file names to know which shader is which. I am running in a harness I don't control that expects "main" for all shader entry points.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by tracing cargo gpu's output filename handling for the entry_point_name attribute. Add a regression test covering a function such as main_frag with entry_point_name = "main"; done means the output file uses the function name while the SPIR-V OpEntryPoint retains "main".

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
compilers, tooling
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.