-
Notifications
You must be signed in to change notification settings - Fork 566
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
iOS metal seems to require compile-time constant sampler for sample_compare #533
Comments
If iOS truly requires this, MoltenVK would need to add emulation support here because SPIRV-Cross would need another interface which lets you set constant sampler state ahead of time. I don't think there is much I can do right now. Please file a bug on MoltenVK if you're using that. |
Can you add a new interface while remain backward compatibility? We can not do PCF shadow mapping without this feature in our in house engine, which has nothing to do with MoltenVK. |
If you're using the API only, I could add something like:
However, I don't know how this works in MSL, so please paste some example shaders how you'd like the resulting MSL code to look. |
The sampler remapped could be declared at the beginning of the entry point function, and passed to those functions that use this sampler. Just like:
|
Ok, that seems reasonable enough. |
Got something WIP that should solve your problem. Please check out the PR and give feedback if this fixes your issue. |
We will test it ASAP |
This seems to resolve the issue we had. Thanks very much! @HansKristian-ARM |
Hi, I've raised an issue #529 several days ago. You said "no constexpr samplers are needed" because you tested on OSX, it seems that only iOS metal requires this. I upgraded my iOS system and Xcode to the latest version, but the issue still remains. Is there any way to deal with this problem? Otherwise, maybe I have to use sample instead of sample_compare on iOS.
The text was updated successfully, but these errors were encountered: