KhronosGroup / KhronosGroup/SPIRV-Tools

spirv-val: not validating matching RelaxedPrecision in passing arguments to formal parameters

Open
#3,473 3 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

From https://github.com/KhronosGroup/glslang/issues/2293.

Glslang is fixed (theoretically) now for this, such that a mismatch requires going an extra layer of copying. From the PR:

> There are 3 dimensions here: precision setting on the calling argument, precision setting on the formal parameter, and pass-by-value versus pass-by-address.

I'm not sure what if any checks the validator is applying, but it seems like it should be invalid to pass a either by value or by address a mismatch in RelaxedPrecision.

Contributor guide

Open the contributing guide

Research direction

Start with the validation behavior described in this issue and compare it with the context from glslang issue 2293, including the three dimensions of precision and argument passing. The work is done when spirv-val consistently rejects invalid RelaxedPrecision mismatches for both by-value and by-address parameter passing, with the expected behavior verified.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
compilers
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.