You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Heya, I recently found the functions SetAutoBindUniforms() and SetBindingBase() and I must admit they have been very useful to me. However, I also need such functionality for dealing with specialization constants and there is not one implemented, which is why I decided to write this small issue.
What I propose is adding three more methods - SetAutoMapConstants(bool) (which will search for the following syntax: layout() const Type varName = someValue; and will automatically set the constant_id property for each field), SetConstantsBase(uint) (this one will set the starting constant_id, so, supposing we use SetConstantsBase(10), constant_ids will start from 10 and grow as more fields are present) and SetPreserveConstants(bool) (does the same thing as SetPreserveBindings() - will either remove all specified constant_ids, or not).
It is really just extending the logic of shaderc::CompileOptions to not only work with locations and bindings, but also provide support for specialization constants.
The text was updated successfully, but these errors were encountered:
Heya, I recently found the functions
SetAutoBindUniforms()
andSetBindingBase()
and I must admit they have been very useful to me. However, I also need such functionality for dealing with specialization constants and there is not one implemented, which is why I decided to write this small issue.What I propose is adding three more methods -
SetAutoMapConstants(bool)
(which will search for the following syntax:layout() const Type varName = someValue;
and will automatically set theconstant_id
property for each field),SetConstantsBase(uint)
(this one will set the startingconstant_id
, so, supposing we useSetConstantsBase(10)
,constant_id
s will start from 10 and grow as more fields are present) andSetPreserveConstants(bool)
(does the same thing asSetPreserveBindings()
- will either remove all specifiedconstant_id
s, or not).It is really just extending the logic of
shaderc::CompileOptions
to not only work with locations and bindings, but also provide support for specialization constants.The text was updated successfully, but these errors were encountered: