diff options
author | Clément Foucault <foucault.clem@gmail.com> | 2022-02-01 15:53:11 +0300 |
---|---|---|
committer | Clément Foucault <foucault.clem@gmail.com> | 2022-02-01 21:05:22 +0300 |
commit | 9e42b9827aca935214d5cc60453b78acac53da17 (patch) | |
tree | 92c4b2a797897f962160924eee841e0b898d1155 /source/blender/gpu/opengl/gl_context.hh | |
parent | 9bbfade772152032985e7492393dffce2500f676 (diff) |
GPUShader: Add support for vertex shader gl_Layer and fallback
This adds the possibility to use the `gpu_Layer` builtin to
support layered rendering without geometry shader.
The `BuiltinBits::LAYER` builtin needs to be manually added
to the `GPUShaderCreateInfo` in order to use this feature.
Note: This is only available for shaders using `GPUShaderCreateInfo`.
A geometry shader fallback is generated if the extension
`AMD_shader_explicit_vertex_parameter` is not available.
Diffstat (limited to 'source/blender/gpu/opengl/gl_context.hh')
-rw-r--r-- | source/blender/gpu/opengl/gl_context.hh | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/source/blender/gpu/opengl/gl_context.hh b/source/blender/gpu/opengl/gl_context.hh index dd22418972b..20a7417b358 100644 --- a/source/blender/gpu/opengl/gl_context.hh +++ b/source/blender/gpu/opengl/gl_context.hh @@ -72,6 +72,7 @@ class GLContext : public Context { static bool explicit_location_support; static bool geometry_shader_invocations; static bool fixed_restart_index_support; + static bool layered_rendering_support; static bool multi_bind_support; static bool multi_draw_indirect_support; static bool shader_draw_parameters_support; |