namespace Ryujinx.Graphics.Gpu.Shader
{
///
/// Represents a GPU state and memory accessor.
///
class GpuAccessorBase
{
private readonly GpuContext _context;
///
/// Creates a new instance of the GPU state accessor.
///
/// GPU context
public GpuAccessorBase(GpuContext context)
{
_context = context;
}
///
/// Queries host about the presence of the FrontFacing built-in variable bug.
///
/// True if the bug is present on the host device used, false otherwise
public bool QueryHostHasFrontFacingBug() => _context.Capabilities.HasFrontFacingBug;
///
/// Queries host about the presence of the vector indexing bug.
///
/// True if the bug is present on the host device used, false otherwise
public bool QueryHostHasVectorIndexingBug() => _context.Capabilities.HasVectorIndexingBug;
///
/// Queries host storage buffer alignment required.
///
/// Host storage buffer alignment in bytes
public int QueryHostStorageBufferOffsetAlignment() => _context.Capabilities.StorageBufferOffsetAlignment;
///
/// Queries host support for readable images without a explicit format declaration on the shader.
///
/// True if formatted image load is supported, false otherwise
public bool QueryHostSupportsImageLoadFormatted() => _context.Capabilities.SupportsImageLoadFormatted;
///
/// Queries host GPU non-constant texture offset support.
///
/// True if the GPU and driver supports non-constant texture offsets, false otherwise
public bool QueryHostSupportsNonConstantTextureOffset() => _context.Capabilities.SupportsNonConstantTextureOffset;
///
/// Queries host GPU texture shadow LOD support.
///
/// True if the GPU and driver supports texture shadow LOD, false otherwise
public bool QueryHostSupportsTextureShadowLod() => _context.Capabilities.SupportsTextureShadowLod;
}
}