KhronosGroup / KhronosGroup/SPIRV-Reflect
Associate samplers with images that are used together
- Dominant language
- C
- Stars
- 871
- Forks
- 188
- Avg merge
- 19m
- Merged PRs (30d)
- 1
Description
Is there a way to use SPIRV-Reflect to identify which samplers are used with which images?
I'm explicitly not interested in combined image-samplers, instead I need to gather all samplers that are used in conjunction with each individual image.
Consider the following fragment shader:
```glsl
uniform sampler LinearSampler, NearestSampler;
uniform texture2D Tex0, Tex1;
in vec2 TexCoord;
out vec4 OutColor;
void main*() {
OutColor = (
texture(sampler2D(Tex0, LinearSampler), TexCoord) +
texture(sampler2D(Tex0, NearestSampler), TexCoord) +
texture(sampler2D(Tex1, LinearSampler), TexCoord)
);
}
```
The information I need to find then would be the following:
```{text}
Tex0: LinearSampler, NearestSampler
Tex1: LinearSampler
```
Is SPIRV-Reflect able to deliver that kind of information?
Contributor guide
No contributing guide indexed for this repository
Research direction
Start by reviewing SPIRV-Reflect’s reflection API and how it represents separate images and samplers. Reproduce the shader example, then determine whether the API can expose each image-to-sampler association; done means obtaining the Tex0 and Tex1 mappings shown in the issue.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- c
- Domain
- compilers
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 30/100