Search Results for

    Show / Hide Table of Contents

    Class ProfilerGPU

    Provides GPU performance measuring methods.

    Inheritance
    ProfilerGPU
    Assembly: FlaxEngine.dll
    File: Engine/Profiler/ProfilerGPU.h
    Syntax
    public class ProfilerGPU

    Fields

    Buffers

    The event buffers (one per frame).

    Declaration
    public static EventBuffer Buffers[PROFILER_GPU_EVENTS_FRAMES]
    Field Value
    EventBuffer

    CurrentBuffer

    The current frame buffer to collect events.

    Declaration
    public static int32 CurrentBuffer
    Field Value
    int32

    Enabled

    True if GPU profiling is enabled, otherwise false to disable events collecting and GPU timer queries usage. Can be changed during rendering.

    Declaration
    public static bool Enabled
    Field Value
    bool

    EventsEnabled

    True if GPU events are enabled (see GPUContext::EventBegin), otherwise false. Cannot be changed during rendering.

    Declaration
    public static bool EventsEnabled
    Field Value
    bool

    Methods

    BeginEvent(const Char* name)

    Begins the event. Call EndEvent with index parameter equal to the returned value by BeginEvent function.

    Declaration
    public static int32 BeginEvent(const Char* name)
    Parameters
    Char name

    The event name.

    Returns
    int32

    The event token index

    EndEvent(int32 index)

    Ends the active event.

    Declaration
    public static void EndEvent(int32 index)
    Parameters
    int32 index

    The event token index returned by the BeginEvent method.

    GetLastFrameData(float& drawTimeMs, float& presentTimeMs, RenderStatsData& statsData)

    Tries to get the rendering stats from the last frame drawing (that has been resolved and has valid data).

    Declaration
    public static bool GetLastFrameData(float& drawTimeMs, float& presentTimeMs, RenderStatsData& statsData)
    Parameters
    float drawTimeMs

    The draw execution time on a GPU (in milliseconds).

    float presentTimeMs

    The final frame present time on a CPU (in milliseconds). Time game waited for vsync or GPU to finish previous frame rendering.

    RenderStatsData statsData

    The rendering stats data.

    Returns
    bool

    True if got the data, otherwise false.

    • Improve this Doc
    • View Source
    In This Article
    Back to top Copyright © 2012-2024 Wojciech Figat