LiteFX 0.5.1.2025
Computer Graphics Engine
Loading...
Searching...
No Matches
LiteFX::Rendering::GraphicsDeviceFeatures Struct Reference

Describes optional features that can be supported by a device. More...

#include <rendering_api.hpp>

Public Attributes

bool MeshShaders { false }
 Enables or disables mesh shader support.
 
bool RayTracing { false }
 Enables or disables ray-tracing support.
 
bool RayQueries { false }
 Enables or disables ray query and inline ray-tracing support.
 
bool DrawIndirect { false }
 Enables or disables support for indirect draw.
 
bool DynamicDescriptors { false }
 Enables or disables support for dynamic descriptor types (SM 6.6 dynamic resources and VK_EXT_mutable_descriptor_type).
 
bool DepthBoundsTest { false }
 Enables support for enabling depth bounds test on IRenderPipeline creation.
 
bool ConservativeRasterization { false }
 Enables support for conservative rasterization.
 
bool ViewInstancing { false }
 Enables support for view instancing/multi-view.
 

Detailed Description

Describes optional features that can be supported by a device.

Device features are evaluated when creating a IGraphicsDevice. If a feature is not supported by the device, an exception is raised.

Note that feature support is not strictly enforced by the engine. For example, if you are calling any feature-related API, the call may succeed even if the feature is not enabled, if the GPU supports it. Graphics API validation may warn about it and the same program may fail on GPUs that do not support this feature. Enabling a feature through the settings in this structure makes the device check for support creation, resulting in a clear fail path, if a required extension is not supported by the system hardware.

Member Data Documentation

◆ ConservativeRasterization

bool LiteFX::Rendering::GraphicsDeviceFeatures::ConservativeRasterization { false }

Enables support for conservative rasterization.

◆ DepthBoundsTest

bool LiteFX::Rendering::GraphicsDeviceFeatures::DepthBoundsTest { false }

Enables support for enabling depth bounds test on IRenderPipeline creation.

◆ DrawIndirect

bool LiteFX::Rendering::GraphicsDeviceFeatures::DrawIndirect { false }

Enables or disables support for indirect draw.

◆ DynamicDescriptors

bool LiteFX::Rendering::GraphicsDeviceFeatures::DynamicDescriptors { false }

Enables or disables support for dynamic descriptor types (SM 6.6 dynamic resources and VK_EXT_mutable_descriptor_type).

Note that support for this feature is limited in the engine. It's purpose is to bind resources of different DescriptorTypes within a single descriptor array. However, you still have to allocate a IDescriptorSet to be able to bind resources and retrieve resource indices by calling IDescriptorSet::bindToHeap.

If you are only using the DirectX 12 backend, you can generally index any bound resource this way. However, in the Vulkan backend, only resources within the descriptor set can be indexed. Descriptor sets that contain descriptors of DescriptorType::ResourceDescriptorHeap or DescriptorType::SamplerDescriptorHeap can be used to bind those descriptors. Such descriptor sets are called proxy sets, because they do not actually occur in the shader. Instead they are directly accessed using the ResourceDescriptorHeap or SamplerDescriptorHeap syntax. In order to acquire a resource from those heaps, you need to provide the index, that can be retrieved as described above.

Be aware that dynamic descriptors (aka mutable descriptors) are considered inefficient in Vulkan. You should not use them, if you could instead use multiple descriptor sets containing unbounded descriptor arrays. They can, however, be more efficient if you can replace multiple pipeline layouts with a single one that relies on mutable type descriptors.

◆ MeshShaders

bool LiteFX::Rendering::GraphicsDeviceFeatures::MeshShaders { false }

Enables or disables mesh shader support.

◆ RayQueries

bool LiteFX::Rendering::GraphicsDeviceFeatures::RayQueries { false }

Enables or disables ray query and inline ray-tracing support.

◆ RayTracing

bool LiteFX::Rendering::GraphicsDeviceFeatures::RayTracing { false }

Enables or disables ray-tracing support.

◆ ViewInstancing

bool LiteFX::Rendering::GraphicsDeviceFeatures::ViewInstancing { false }

Enables support for view instancing/multi-view.