KhronosGroup / KhronosGroup/SPIRV-Tools

[spirv-val] The atomic 'storage class forbidden by universal validation rules' error should print out the forbidden storage class.

Open Beginner friendly
#4,634 0 comments 0 reactions 0 assignees View on GitHub
component:validation
Dominant language
C++
Stars
1.4k
Forks
709
Avg merge
1d 22h
Merged PRs (30d)
28

Description

I'm getting
```
AtomicExchange: storage class forbidden by universal validation rules.
```
when running `spirv-val` on a file. This error is very vague as it prints out the opcode that's doing something illegal, but not the forbidden storage class.

Ideally we want something like

```
Opcode AtomicExchange: storage class 'Output' forbidden by universal validation rules.
```

This should be any easy issue for anyone to pick up. The code in question is here: https://github.com/KhronosGroup/SPIRV-Tools/blob/4b092d2ab81854e61632bdd1e658907f0071c37e/source/val/validate_atomics.cpp#L194-L199.

Contributor guide

Open the contributing guide

Research direction

Inspect source/val/validate_atomics.cpp at lines 194-199, where the atomic validation diagnostic is assembled. Update the message so it includes the forbidden storage class, then run spirv-val on the reported input and verify that the output names the storage class as shown.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
compilers
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
65/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.