diff options
author | Clément Foucault <foucault.clem@gmail.com> | 2022-01-25 17:08:11 +0300 |
---|---|---|
committer | Clément Foucault <foucault.clem@gmail.com> | 2022-01-25 17:08:11 +0300 |
commit | 33ba298b5db24b002d936e135c3c84aa2300e6db (patch) | |
tree | 37665ba08e12d47d5498d42553146f750c019783 /source/blender/gpu/intern/gpu_shader_create_info.hh | |
parent | 948211679f2a0681421160be0d3b90f507bc0be7 (diff) |
GPUShader: Add optionnal single shader stage interface for in and out
This makes optionnal the use of a different interface for the geometry
shader stage output. When the vertex and geometry interface instance name
matches, a `_in` and `_out` suffix is added to the end of the instance name.
This makes it easier to have optional geometry shader stages.
# Conflicts:
# source/blender/gpu/intern/gpu_shader_create_info.hh
Diffstat (limited to 'source/blender/gpu/intern/gpu_shader_create_info.hh')
-rw-r--r-- | source/blender/gpu/intern/gpu_shader_create_info.hh | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/source/blender/gpu/intern/gpu_shader_create_info.hh b/source/blender/gpu/intern/gpu_shader_create_info.hh index 02c303fb8fa..6fe6d7676fb 100644 --- a/source/blender/gpu/intern/gpu_shader_create_info.hh +++ b/source/blender/gpu/intern/gpu_shader_create_info.hh @@ -380,7 +380,12 @@ struct ShaderCreateInfo { return *(Self *)this; } - /* Only needed if geometry shader is enabled. */ + /** + * Only needed if geometry shader is enabled. + * IMPORTANT: Input and output instance name will have respectively "_in" and "_out" suffix + * appended in the geometry shader IF AND ONLY IF the vertex_out interface instance name matches + * the geometry_out interface instance name. + */ Self &geometry_out(StageInterfaceInfo &interface) { geometry_out_interfaces_.append(&interface); |