Implement Specialization Constants

* Added support to our local copy of SpirV Reflect (which does not support it).
* Pass them on render or compute pipeline creation.
* Not implemented in our shaders yet.
This commit is contained in:
reduz 2021-07-09 16:48:28 -03:00 committed by Rémi Verschelde
parent fb3961b2ef
commit b2f6db7aa8
No known key found for this signature in database
GPG key ID: C3336907360768E1
12 changed files with 789 additions and 16 deletions

View file

@ -140,6 +140,8 @@
</return>
<argument index="0" name="shader" type="RID">
</argument>
<argument index="1" name="specialization_constants" type="RDPipelineSpecializationConstant[]" default="[]">
</argument>
<description>
</description>
</method>
@ -580,6 +582,8 @@
</argument>
<argument index="9" name="for_render_pass" type="int" default="0">
</argument>
<argument index="10" name="specialization_constants" type="RDPipelineSpecializationConstant[]" default="[]">
</argument>
<description>
</description>
</method>
@ -1709,6 +1713,12 @@
</constant>
<constant name="SHADER_LANGUAGE_HLSL" value="1" enum="ShaderLanguage">
</constant>
<constant name="PIPELINE_SPECIALIZATION_CONSTANT_TYPE_BOOL" value="0" enum="PipelineSpecializationConstantType">
</constant>
<constant name="PIPELINE_SPECIALIZATION_CONSTANT_TYPE_INT" value="1" enum="PipelineSpecializationConstantType">
</constant>
<constant name="PIPELINE_SPECIALIZATION_CONSTANT_TYPE_FLOAT" value="2" enum="PipelineSpecializationConstantType">
</constant>
<constant name="LIMIT_MAX_BOUND_UNIFORM_SETS" value="0" enum="Limit">
</constant>
<constant name="LIMIT_MAX_FRAMEBUFFER_COLOR_ATTACHMENTS" value="1" enum="Limit">