diff options
author | reduz <reduzio@gmail.com> | 2021-07-09 16:48:28 -0300 |
---|---|---|
committer | RĂ©mi Verschelde <rverschelde@gmail.com> | 2021-07-11 23:16:09 +0200 |
commit | b2f6db7aa817159bd57d88bff8af017a89759aab (patch) | |
tree | 26b3401a34ee165adb9c41bdf63c6f6fc90cb0d6 /doc/classes | |
parent | fb3961b2ef9ed03501f98a8aa621f78679cc2be9 (diff) |
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.
Diffstat (limited to 'doc/classes')
-rw-r--r-- | doc/classes/RDPipelineSpecializationConstant.xml | 19 | ||||
-rw-r--r-- | doc/classes/RenderingDevice.xml | 10 |
2 files changed, 29 insertions, 0 deletions
diff --git a/doc/classes/RDPipelineSpecializationConstant.xml b/doc/classes/RDPipelineSpecializationConstant.xml new file mode 100644 index 0000000000..4d9481b846 --- /dev/null +++ b/doc/classes/RDPipelineSpecializationConstant.xml @@ -0,0 +1,19 @@ +<?xml version="1.0" encoding="UTF-8" ?> +<class name="RDPipelineSpecializationConstant" inherits="RefCounted" version="4.0"> + <brief_description> + </brief_description> + <description> + </description> + <tutorials> + </tutorials> + <methods> + </methods> + <members> + <member name="constant_id" type="int" setter="set_constant_id" getter="get_constant_id" default="0"> + </member> + <member name="value" type="Variant" setter="set_value" getter="get_value"> + </member> + </members> + <constants> + </constants> +</class> diff --git a/doc/classes/RenderingDevice.xml b/doc/classes/RenderingDevice.xml index f2b22af8c6..901a985961 100644 --- a/doc/classes/RenderingDevice.xml +++ b/doc/classes/RenderingDevice.xml @@ -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"> |