Pulp 1.88.0
Cross-platform audio plugin framework
Loading...
Searching...
No Matches
pulp::render::GpuSurface::Config Struct Reference

#include <gpu_surface.hpp>

Public Attributes

uint32_t width = 800
uint32_t height = 600
bool vsync = true
bool enable_gpu_timing = false
 Request Dawn's timestamp-query feature for GPU render timing.
bool force_fallback_adapter = false
AdapterBackendPreference backend_preference
void * native_surface_handle = nullptr
 Opaque platform-specific handle for on-screen rendering.

Member Data Documentation

◆ backend_preference

AdapterBackendPreference pulp::render::GpuSurface::Config::backend_preference

◆ enable_gpu_timing

bool pulp::render::GpuSurface::Config::enable_gpu_timing = false

Request Dawn's timestamp-query feature for GPU render timing.

OFF by default, and deliberately NOT inferred from adapter support. Dawn gates writeTimestamp behind the allow_unsafe_apis toggle on every backend, so requesting timestamps forces that toggle on — which relaxes the device's validation posture for ORDINARY RENDERING, not just for the diagnostic. Previously this was enabled whenever the adapter advertised the feature, meaning normal rendering silently ran with weaker validation on most machines.

Turning it on is the caller's decision (see PluginViewHost::Options::enable_gpu_timing). With it off, SkiaSurface::gpu_render_timing_available() reports false and the inspector shows an honest "GPU timing unavailable".

◆ force_fallback_adapter

bool pulp::render::GpuSurface::Config::force_fallback_adapter = false

◆ height

uint32_t pulp::render::GpuSurface::Config::height = 600

◆ native_surface_handle

void* pulp::render::GpuSurface::Config::native_surface_handle = nullptr

Opaque platform-specific handle for on-screen rendering.

On macOS/iOS: CAMetalLayer* On Windows: HWND On Linux: a pointer to an X11NativeHandle (see below). A bare X11 Window id is NOT enough — Dawn's Xlib surface source needs both the Display* and the Window. Wayland (wl_display*‍/wl_surface*) is not wired yet. nullptr = offscreen-only mode (no presentation)

◆ vsync

bool pulp::render::GpuSurface::Config::vsync = true

◆ width

uint32_t pulp::render::GpuSurface::Config::width = 800

The documentation for this struct was generated from the following file:
  • /home/runner/work/pulp/pulp/core/render/include/pulp/render/gpu_surface.hpp