mirror of
https://github.com/godotengine/godot.git
synced 2024-11-25 05:33:11 +00:00
cf3f404d31
* Added an extra stage before compiling shader, which is generating a binary blob. * On Vulkan, this allows caching the SPIRV reflection information, which is expensive to parse. * On other (future) RenderingDevices, it allows caching converted binary data, such as DXIL or MSL. This PR makes the shader cache include the reflection information, hence editor startup times are significantly improved. I tested this well and it appears to work, and I added a lot of consistency checks, but because it includes writing and reading binary information, rare bugs may pop up, so be aware. There was not much of a choice for storing the reflection information, given shaders can be a lot, take a lot of space and take time to parse.
72 lines
2.9 KiB
XML
72 lines
2.9 KiB
XML
<?xml version="1.0" encoding="UTF-8" ?>
|
|
<class name="RDShaderSPIRV" inherits="Resource" version="4.0">
|
|
<brief_description>
|
|
</brief_description>
|
|
<description>
|
|
</description>
|
|
<tutorials>
|
|
</tutorials>
|
|
<methods>
|
|
<method name="get_stage_bytecode" qualifiers="const">
|
|
<return type="PackedByteArray">
|
|
</return>
|
|
<argument index="0" name="stage" type="int" enum="RenderingDevice.ShaderStage">
|
|
</argument>
|
|
<description>
|
|
</description>
|
|
</method>
|
|
<method name="get_stage_compile_error" qualifiers="const">
|
|
<return type="String">
|
|
</return>
|
|
<argument index="0" name="stage" type="int" enum="RenderingDevice.ShaderStage">
|
|
</argument>
|
|
<description>
|
|
</description>
|
|
</method>
|
|
<method name="set_stage_bytecode">
|
|
<return type="void">
|
|
</return>
|
|
<argument index="0" name="stage" type="int" enum="RenderingDevice.ShaderStage">
|
|
</argument>
|
|
<argument index="1" name="bytecode" type="PackedByteArray">
|
|
</argument>
|
|
<description>
|
|
</description>
|
|
</method>
|
|
<method name="set_stage_compile_error">
|
|
<return type="void">
|
|
</return>
|
|
<argument index="0" name="stage" type="int" enum="RenderingDevice.ShaderStage">
|
|
</argument>
|
|
<argument index="1" name="compile_error" type="String">
|
|
</argument>
|
|
<description>
|
|
</description>
|
|
</method>
|
|
</methods>
|
|
<members>
|
|
<member name="bytecode_compute" type="PackedByteArray" setter="set_stage_bytecode" getter="get_stage_bytecode" default="PackedByteArray()">
|
|
</member>
|
|
<member name="bytecode_fragment" type="PackedByteArray" setter="set_stage_bytecode" getter="get_stage_bytecode" default="PackedByteArray()">
|
|
</member>
|
|
<member name="bytecode_tesselation_control" type="PackedByteArray" setter="set_stage_bytecode" getter="get_stage_bytecode" default="PackedByteArray()">
|
|
</member>
|
|
<member name="bytecode_tesselation_evaluation" type="PackedByteArray" setter="set_stage_bytecode" getter="get_stage_bytecode" default="PackedByteArray()">
|
|
</member>
|
|
<member name="bytecode_vertex" type="PackedByteArray" setter="set_stage_bytecode" getter="get_stage_bytecode" default="PackedByteArray()">
|
|
</member>
|
|
<member name="compile_error_compute" type="String" setter="set_stage_compile_error" getter="get_stage_compile_error" default="""">
|
|
</member>
|
|
<member name="compile_error_fragment" type="String" setter="set_stage_compile_error" getter="get_stage_compile_error" default="""">
|
|
</member>
|
|
<member name="compile_error_tesselation_control" type="String" setter="set_stage_compile_error" getter="get_stage_compile_error" default="""">
|
|
</member>
|
|
<member name="compile_error_tesselation_evaluation" type="String" setter="set_stage_compile_error" getter="get_stage_compile_error" default="""">
|
|
</member>
|
|
<member name="compile_error_vertex" type="String" setter="set_stage_compile_error" getter="get_stage_compile_error" default="""">
|
|
</member>
|
|
</members>
|
|
<constants>
|
|
</constants>
|
|
</class>
|