RHI
Render Hardware Interface (RHI) module provides uniform API to use platform's graphcis hardware (GPU) to accelerate rendering and parallel computing tasks.
Topics
Types
-
Represents a physical graphics device installed on the platform.
-
Describes one IBuffer object.
-
Represents one buffer resource that can be used to contain arbitrary binary data.
-
Describes one texture barrier.
-
Describes one buffer barrier.
-
Describes one viewport used by ICommandBuffer::set_viewport and ICommandBuffer::set_viewports.
-
Describes one color attachment when beginning a render pass.
-
Luna::RHI::DepthStencilAttachment
Describes one depth stencil attachment when beginning a render pass.
-
Describes one resolve attachment when beginning a render pass.
-
Describes one render pass.
-
Describes one compute pass.
-
Describes one copy pass.
-
Describes one vertex buffer view when binding one vertex buffer to the render pipeline.
-
Describes one index buffer view when binding one index buffer to the render pipeline.
-
Used to allocate memory for commands, record commands, submitting commands to GPU and tracks the state of the submitted commands.
-
Describes one buffer view in descriptor set.
-
Describes one texture view in descriptor set.
-
Describes one sampler in descriptor set.
-
Describes one descriptor set.
-
Describes one descriptor set write operation. Every descriptor set write operation may update one continuous range of descriptors in the same binding slot.
-
Describes which views and samples are bound to the pipeline. This can be set at any time before the draw call or dispatch call is submitted.
-
Luna::RHI::DescriptorSetLayoutBinding
Describes one binding in one descriptor set.
-
Luna::RHI::DescriptorSetLayoutDesc
Specifies one descriptor set layout.
-
Luna::RHI::IDescriptorSetLayout
Represents one descriptor set layout that can be used to create descriptor sets and pipeline layouts.
-
Represents the device feature check result.
-
Describes one command queue.
-
Represents one logical graphic device on the platform.
-
Represents one object that is created by IDevice and is only available in the device context.
-
Represents one allocated device memory.
-
Represents a synchronization object that can be used to synchronize commands executed in different command queues.
-
Describes one pipeline layout.
-
Describes how shader parameters are accessed by every shader in the pipeline.
-
Specify one shader data.
-
Luna::RHI::ComputePipelineStateDesc
Describes pipeline configurations of one compute pipeline.
-
Describes one attribute in the input layout.
-
Describes one input buffer binding.
-
Describes the vertex input layout for the graphics pipeline.
-
Luna::RHI::AttachmentBlendDesc
Describes the blending configurations for one attachment.
-
Describes blending configurations for one graphics pipeline.
-
Describes rasterizer configurations for one graphics pipeline.
-
Describes the depth stencil operation.
-
Describes depth stencil stage configurations of one graphics pipeline.
-
Luna::RHI::GraphicsPipelineStateDesc
Describes pipeline configurations of one compute pipeline.
-
Represents one pipeline state object that stores pipeline configurations that can be applied to one pipeline in one call.
-
Specifies one query in pipeline statistics query heap.
-
Describes one query heap.
-
Contains one array of query elements that can be used to query pipeline execution information, such as pixel occlusion, execution time and pipeline statistics.
-
Specifies the index pair of one subresource in one texture resource.
-
Represents a memory region that can be accessed by GPU.
-
Describes one swap chain.
-
Represents one swap chain used for presenting images to the screen.
-
Describes one texture resource.
-
Describes one pair of depth and stencil values used for clearing depth stencil attachments.
-
Describes one clear value used to specify optimized clear value for texture resources.
-
Represents one texture resource that can be used to contain pixel data of certain format.
-
Specifies one resource data copy operation.
Enumerations
-
Specifies possible usages for one IBuffer object.
-
Luna::RHI::ResourceBarrierFlag
Specifies additional flags for one buffer or texture barrier.
-
Specifies buffer resource states before and after one barrier.
-
Specifies texture resource states before and after one barrier.
-
The operation to perform when the attachment is loaded to GPU.
-
The operation to perform when the render texture is written back to resource memory.
-
Specifies the occlusion query working mode.
-
Specifies the filtering mode for samplers.
-
Specifies the texture address mode for samplers when the sample position does not fall in range [0, 1].
-
Specifies the border color to use if texture address mode is TextureAddressMode::border.
-
Specifies the type of descriptors that can be placed in a descriptor set.
-
Specifies the texture view type, which is how render pipeline interprets texture data.
-
Luna::RHI::ShaderVisibilityFlag
Specifies which shader can access descriptors in the specified binding.
-
Luna::RHI::DescriptorSetLayoutFlag
Specifies additional flags for one descriptor set layout.
-
Specifies device features that can be queried at run time.
-
Specifies command queue types.
-
Specifies additional flags for command queues.
-
Specify the memory type. See remarks for details.
-
Describes attributes of one pipeline layout object.
-
Specify shader data format.
-
The input rate for one input attribute (per vertex or per instance).
-
Specifies the blend factor used for blending.
-
Specifies the blend operation.
-
Identifies which components of each pixel of a attachment are writable during blending.
-
Describes triangle fill mode of the rasterizer.
-
Describes cull mode of the rasterizer.
-
Specifies the stencil operation to perform when stencil test passed or failed.
-
Specifies the compare function used for comparison.
-
Luna::RHI::IndexBufferStripCutValue
The value used to finish an existing line or triangle strip and start a new one when GraphicsPipelineStateDesc::primitive_topology is set to PrimitiveTopology::line_strip or PrimitiveTopology::triangle_strip.
-
Specifies the primitive type for the graphics pipeline to draw.
-
Specifies query type.
-
Specifies additional flags for one resource.
-
Lists supported RHI backends (implementation APIs).
-
Describes data formats for vertices and pixels in RHI.
-
Specifies the texture type.
-
Specifies possible usages of one texture resource.
-
Specifies the clear value type used.
-
Specifies the type of one resource data copy operation.
Constants
-
constexpr SubresourceIndex TEXTURE_BARRIER_ALL_SUBRESOURCES
A special number that selects all subresources of one resource for one barrier operation.
-
A special number that identifies the query operation is disabled.
Functions
-
Vector< Ref< IAdapter > > get_adapters()
Gets a list of adapters installed on the platform.
-
R< Ref< IDevice > > new_device(IAdapter *adapter)
Creates one device using the specified adapter.
-
Gets the main device of the platform.
-
BackendType get_backend_type()
Gets the backend type.
-
ShaderCompiler::TargetFormat get_current_platform_shader_target_format()
Gets the desired shader compile target format that can be used for the current graphics API.
-
Gets one ShaderData structure that referrs the specified compile result.
-
Fills
cs
,metal_numthreads_x
,metal_numthreads_y
andmetal_numthreads_z
properties of ComputePipelineStateDesc using shader compile results. -
usize bits_per_pixel(Format format)
Gets the size of one pixel in the specified format, in bits.
-
RV copy_resource_data(ICommandBuffer *command_buffer, Span< const CopyResourceData > copies)
Copies data between host memory and resource memory.