docs.unity3d.com
    Show / Hide Table of Contents

    Struct ComputeBufferDesc

    Descriptor used to create compute buffer resources

    Namespace: UnityEngine.Experimental.Rendering.RenderGraphModule
    Syntax
    public struct ComputeBufferDesc

    Constructors

    ComputeBufferDesc(Int32, Int32)

    ComputeBufferDesc constructor.

    Declaration
    public ComputeBufferDesc(int count, int stride)
    Parameters
    Type Name Description
    Int32 count

    Number of elements in the buffer.

    Int32 stride

    Size of one element in the buffer.

    ComputeBufferDesc(Int32, Int32, ComputeBufferType)

    ComputeBufferDesc constructor.

    Declaration
    public ComputeBufferDesc(int count, int stride, ComputeBufferType type)
    Parameters
    Type Name Description
    Int32 count

    Number of elements in the buffer.

    Int32 stride

    Size of one element in the buffer.

    ComputeBufferType type

    Type of the buffer.

    Fields

    count

    Number of elements in the buffer..

    Declaration
    public int count
    Field Value
    Type Description
    Int32

    name

    Compute Buffer name.

    Declaration
    public string name
    Field Value
    Type Description
    String

    stride

    Size of one element in the buffer. Has to match size of buffer type in the shader.

    Declaration
    public int stride
    Field Value
    Type Description
    Int32

    type

    Type of the buffer, default is ComputeBufferType.Default (structured buffer).

    Declaration
    public ComputeBufferType type
    Field Value
    Type Description
    ComputeBufferType

    Methods

    GetHashCode()

    Hash function

    Declaration
    public override int GetHashCode()
    Returns
    Type Description
    Int32

    The texture descriptor hash.

    Overrides
    ValueType.GetHashCode()

    Extension Methods

    ReflectionUtils.Invoke(Object, String, Object[])
    ReflectionUtils.SetField(Object, String, Object)
    ReflectionUtils.GetField(Object, String)
    ReflectionUtils.GetFields(Object)
    Back to top
    Terms of use
    Copyright © 2023 Unity Technologies — Terms of use
    • Legal
    • Privacy Policy
    • Cookies
    • Do Not Sell or Share My Personal Information
    • Your Privacy Choices (Cookie Settings)
    "Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
    Generated by DocFX on 18 October 2023