Migrate to new SPIR-V reader flow
- Dominant language
- CMake
- Stars
- 20
- Forks
- 6
- PR merge metrics
- No merged PRs in 30d
Description
Tint has a new SPIR-V frontend that has been completely rewritten to make use of its new intermediate representation. We are planning to remove the old path in the not-too-distant future, so we recommend migrating over to the new path to make sure that everything works for your use cases.
The new flow can be accessed like this:
```
tint::wgsl::writer::ProgramOptions wgslOptions = {};
wgslOptions.allow_non_uniform_derivatives = disableUniformityAnalysis;
auto result = tint::SpirvToWgsl(spirv, wgslOptions);
if (result != tint::Success) {
std::cerr << result.Failure().reason << std::endl;
return;
}
return_string(result->wgsl.data(), result->wgsl.size());
```
Let us know if you hit any issues.
Contributor guide
No contributing guide indexed for this repository
Research direction
Locate the existing SPIR-V reader call sites and compare them with the new tint::SpirvToWgsl flow shown in the issue, including its ProgramOptions handling and failure result. Migrate the relevant use cases to the new path and verify that SPIR-V input still produces the expected WGSL or reports failures correctly.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp
- Domain
- compilers
- Issue type
- Refactor
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100