Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SLANG_hack_samplerForTexelFetch binding collides with user declared objects #96

Closed
nbentyNV opened this issue Jul 15, 2017 · 3 comments
Closed

Comments

@nbentyNV
Copy link
Collaborator

Is SLANG_hack_samplerForTexelFetch hardcoded to use set=0, binding=0?
It collides with other user declarations.

TextRenderer.fs.slang is one example

@nbentyNV nbentyNV changed the title SLANG_hack_samplerForTexelFetch binding collides with user declared objects SLANG_hack_samplerForTexelFetch binding collides with user declared objects Jul 15, 2017
@tangent-vector-personal

Hard-coded yes. Does it lead to compilation failures?
I can compute a non-colliding binding for it.

Have you found that if needs a sampler bound?

@nbentyNV
Copy link
Collaborator Author

No, is successfully compiles to SPIR-V.
I don't see anything in the Vulkan spec that forbids such behavior. vkUpdateDescriptorSets accepts the descriptor type, so perhaps a bind-location is defined by the index and the type, but I couldn't find it in the spec.

The problem is that the debug layer spits an error. Perhaps it's a bug in their code.

As for the other question - I don't see it in the reflection and I don't bind anything to that slot, so I guess it's not an issue

@tangent-vector-personal

We now generate a unique binding for this "hack" sampler, and report it through reflection.

I'm going to close this specific issue, but it is clear that long term we need to eliminate the need for this sampler altogether, which requires work inside glslang (see glslang issue 1003)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants