Struct ComputeFunc | Barracuda | 1.1.2-preview
docs.unity.cn
    Show / Hide Table of Contents

    Struct ComputeFunc

    Inherited Members
    ValueType.Equals(Object)
    ValueType.GetHashCode()
    ValueType.ToString()
    Object.Equals(Object, Object)
    Object.ReferenceEquals(Object, Object)
    Object.GetType()
    Namespace: Unity.Barracuda
    Syntax
    public struct ComputeFunc

    Constructors

    ComputeFunc(ComputeShader, String)

    Declaration
    public ComputeFunc(ComputeShader cs, string kn)
    Parameters
    Type Name Description
    ComputeShader cs
    String kn

    ComputeFunc(ComputeShader, String[], Int32, Int32, Int32)

    Declaration
    public ComputeFunc(ComputeShader cs, string[] kns, int x, int y = 1, int z = 1)
    Parameters
    Type Name Description
    ComputeShader cs
    String[] kns
    Int32 x
    Int32 y
    Int32 z

    ComputeFunc(ComputeShader[], String)

    Declaration
    public ComputeFunc(ComputeShader[] cs, string kn)
    Parameters
    Type Name Description
    ComputeShader[] cs
    String kn

    ComputeFunc(ComputeShader[], String[], Int32, Int32, Int32)

    Declaration
    public ComputeFunc(ComputeShader[] cs, string[] kns, int x, int y = 1, int z = 1)
    Parameters
    Type Name Description
    ComputeShader[] cs
    String[] kns
    Int32 x
    Int32 y
    Int32 z

    Fields

    kernelIndex

    Declaration
    public readonly int kernelIndex
    Field Value
    Type Description
    Int32

    kernelName

    Declaration
    public readonly string kernelName
    Field Value
    Type Description
    String

    shader

    Declaration
    public readonly ComputeShader shader
    Field Value
    Type Description
    ComputeShader

    threadGroupSizeX

    Declaration
    public readonly uint threadGroupSizeX
    Field Value
    Type Description
    UInt32

    threadGroupSizeY

    Declaration
    public readonly uint threadGroupSizeY
    Field Value
    Type Description
    UInt32

    threadGroupSizeZ

    Declaration
    public readonly uint threadGroupSizeZ
    Field Value
    Type Description
    UInt32

    Properties

    depth

    Declaration
    public int depth { get; }
    Property Value
    Type Description
    Int32

    height

    Declaration
    public int height { get; }
    Property Value
    Type Description
    Int32

    threadGroupSize

    Declaration
    public uint threadGroupSize { get; }
    Property Value
    Type Description
    UInt32

    width

    Declaration
    public int width { get; }
    Property Value
    Type Description
    Int32

    Methods

    Dispatch(Int32, Int32, Int32)

    Declaration
    public void Dispatch(int workItemsX, int workItemsY, int workItemsZ)
    Parameters
    Type Name Description
    Int32 workItemsX
    Int32 workItemsY
    Int32 workItemsZ

    Dispatch(ValueTuple<Int32, Int32, Int32>)

    Declaration
    public void Dispatch(ValueTuple<int, int, int> workItems)
    Parameters
    Type Name Description
    ValueTuple<Int32, Int32, Int32> workItems

    FindBestKernelMatchingDimensions(ComputeShader[], String[], Int32, Int32, Int32)

    Declaration
    public static string FindBestKernelMatchingDimensions(ComputeShader[] cs, string[] kns, int x, int y = 1, int z = 1)
    Parameters
    Type Name Description
    ComputeShader[] cs
    String[] kns
    Int32 x
    Int32 y
    Int32 z
    Returns
    Type Description
    String

    GetTensorData(String)

    Declaration
    public static int GetTensorData(string name)
    Parameters
    Type Name Description
    String name
    Returns
    Type Description
    Int32

    GetTensorDecl(String)

    Declaration
    public static ComputeFunc.TensorDecl GetTensorDecl(string name)
    Parameters
    Type Name Description
    String name
    Returns
    Type Description
    ComputeFunc.TensorDecl

    IntDivCeil(Int32, Int32)

    Declaration
    public static int IntDivCeil(int v, int div)
    Parameters
    Type Name Description
    Int32 v
    Int32 div
    Returns
    Type Description
    Int32

    SetTensor(String, TensorShape, ComputeBuffer, Int64)

    Declaration
    public void SetTensor(string name, TensorShape shape, ComputeBuffer buffer, long dataOffset = 0L)
    Parameters
    Type Name Description
    String name
    TensorShape shape
    ComputeBuffer buffer
    Int64 dataOffset

    SetTensor(String, TensorShape, Texture, Int64)

    Declaration
    public void SetTensor(string name, TensorShape shape, Texture texture, long dataOffset = 0L)
    Parameters
    Type Name Description
    String name
    TensorShape shape
    Texture texture
    Int64 dataOffset

    SetTensor(ComputeFunc.TensorDecl, Int32, TensorShape, ComputeBuffer, Int64)

    Declaration
    public void SetTensor(ComputeFunc.TensorDecl tensorDecl, int dataPropId, TensorShape shape, ComputeBuffer buffer, long dataOffset = 0L)
    Parameters
    Type Name Description
    ComputeFunc.TensorDecl tensorDecl
    Int32 dataPropId
    TensorShape shape
    ComputeBuffer buffer
    Int64 dataOffset

    SetTensorBuffer(Int32, ComputeBuffer)

    Declaration
    public void SetTensorBuffer(int propId, ComputeBuffer buffer)
    Parameters
    Type Name Description
    Int32 propId
    ComputeBuffer buffer

    SetTensorBuffer(String, ComputeBuffer)

    Declaration
    public void SetTensorBuffer(string name, ComputeBuffer buffer)
    Parameters
    Type Name Description
    String name
    ComputeBuffer buffer

    SetTensorDecl(String, TensorShape, Int64)

    Declaration
    public void SetTensorDecl(string name, TensorShape shape, long dataOffset)
    Parameters
    Type Name Description
    String name
    TensorShape shape
    Int64 dataOffset

    SetTensorDecl(ComputeFunc.TensorDecl, TensorShape, Int64)

    Declaration
    public void SetTensorDecl(ComputeFunc.TensorDecl tensorDecl, TensorShape shape, long dataOffset)
    Parameters
    Type Name Description
    ComputeFunc.TensorDecl tensorDecl
    TensorShape shape
    Int64 dataOffset

    SetTexture(String, Texture)

    Declaration
    public void SetTexture(string name, Texture tex)
    Parameters
    Type Name Description
    String name
    Texture tex
    Back to top Copyright © 2020 Unity Technologies
    Generated by DocFX
    on 15 October 2020