Skip to content

LiteFX::Rendering::IShaderProgram::reflectPipelineLayout

Uses shader reflection to extract the pipeline layout of a shader. May not be available in all backends.

Synopsis

Declared in <litefx/rendering_api.hpp>

[[dllimport, dllexport]] SharedPtr<IPipelineLayout> reflectPipelineLayout(Enumerable<PipelineBindingHint> hints = {}) const;

Description

Note that shader reflection may not yield different results than you would expect, especially when using DirectX 12. For more information on how to use shader reflection and how to write portable shaders, refer to the shader development guide in the wiki.

In particular, shader reflection is not able to restore:

  • Input attachments in DirectX. Instead, input attachments are treated as DescriptorType::Texture. This is usually not a problem, since DirectX does not have a concept of render pass outputs/inputs anyway. However, keep this in mind, if you want to filter descriptors based on their type, for example.

Return Value

The pipeline layout extracted from shader reflection.

Parameters

NameDescription
hintsA series of individual binding hints to use to deduce explicit binding information.

See Also

PipelineBindingHint

https://github.com/crud89/LiteFX/wiki/Shader-Development