docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Class ComputeShaderSingleton

    Represents the compute kernel cache for backends that use GPU compute.

    Inheritance
    object
    ComputeShaderSingleton
    Inherited Members
    object.Equals(object)
    object.Equals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    object.ReferenceEquals(object, object)
    object.ToString()
    Namespace: Unity.Sentis
    Assembly: Unity.Sentis.dll
    Syntax
    public class ComputeShaderSingleton

    Fields

    EnableDebug

    Whether kernel usage tracking is enabled.

    Declaration
    public bool EnableDebug
    Field Value
    Type Description
    bool

    Properties

    Instance

    Initializes or returns the instance of ComputeShaderSingleton.

    Declaration
    public static ComputeShaderSingleton Instance { get; }
    Property Value
    Type Description
    ComputeShaderSingleton

    supported

    Whether the GPU supports compute.

    Declaration
    public bool supported { get; }
    Property Value
    Type Description
    bool

    Methods

    GetUsedKernels()

    Returns used compute kernels as a list.

    Declaration
    public List<string> GetUsedKernels()
    Returns
    Type Description
    List<string>

    List of used kernels.

    WarmupKernels(List<string>)

    Loads and compiles given compute kernels without running them.

    Declaration
    public IEnumerator WarmupKernels(List<string> kernels)
    Parameters
    Type Name Description
    List<string> kernels

    List of kernel names to load and compile.

    Returns
    Type Description
    IEnumerator

    Enumerator to iterate.

    In This Article
    Back to top
    Copyright © 2024 Unity Technologies — Trademarks and terms of use
    • Legal
    • Privacy Policy
    • Cookie Policy
    • Do Not Sell or Share My Personal Information
    • Your Privacy Choices (Cookie Settings)