docs
Loading...
Searching...
No Matches
GPUDeviceCaps

#include <Ultralight/platform/GPUDriver.h>

Overview

Optional capabilities reported by a GPUDriver.

The engine zero-initializes this structure and passes it to GPUDriver::GetDeviceCaps(), which fills in the capabilities the driver supports. Any field a driver leaves untouched reads back as zero (meaning "not supported"), so an unset capability always degrades safely.

Note
This structure may grow over time; new fields are appended. Because the engine owns and zero-initializes it, a driver compiled against an older definition simply leaves any newer fields at their default.

Public Attributes

uint32_t compressed_formats
 Bitmask of supported compressed-texture families (see GPUCompressedFormat).
uint32_t supports_msaa
 Nonzero if this driver can allocate multisampled (antialiased) render targets (see kGPUTextureFlag_Antialiased).
uint32_t max_texture_dimension
 The largest width or height, in pixels, of a texture or render target this driver can create.
uint32_t max_msaa_samples
 The sample count this driver uses for multisampled render targets (see supports_msaa), reported so the engine can account their memory.
uint32_t max_geometry_size
 The largest size, in bytes, of a single vertex or index buffer the engine will build for this driver.
uint32_t supports_partial_redraw
 Nonzero if redrawing part of a large render target (a View's render buffer) costs about what the drawn area costs on this device, so the library redraws only the region of the View that changed each frame.

Member Data Documentation

◆ compressed_formats

uint32_t compressed_formats

Bitmask of supported compressed-texture families (see GPUCompressedFormat).

Zero means no block-compressed formats are supported; such textures are decompressed before upload.

◆ max_geometry_size

uint32_t max_geometry_size

The largest size, in bytes, of a single vertex or index buffer the engine will build for this driver.

A path whose tessellated geometry would exceed this is dropped rather than uploaded, so the driver never receives an oversized CreateGeometry / UpdateGeometry.

Note
This is a limit, not a capability flag: zero (the default) means the driver does not report a limit, and the engine substitutes a conservative built-in default rather than treating it as "no geometry allowed".

◆ max_msaa_samples

uint32_t max_msaa_samples

The sample count this driver uses for multisampled render targets (see supports_msaa), reported so the engine can account their memory.

Note
This is a limit, not a capability flag: zero (the default) means the driver does not report a count, and the engine substitutes a conservative built-in default when supports_msaa is set. Ignored when supports_msaa is zero.

◆ max_texture_dimension

uint32_t max_texture_dimension

The largest width or height, in pixels, of a texture or render target this driver can create.

The engine will not ask you to create one whose width or height exceeds this value.

Note
This is a limit, not a capability flag: zero (the default) means the driver does not report a limit, and the engine substitutes a conservative built-in default rather than treating it as "no textures allowed".

◆ supports_msaa

uint32_t supports_msaa

Nonzero if this driver can allocate multisampled (antialiased) render targets (see kGPUTextureFlag_Antialiased).

Zero (the default) means it only creates single-sample targets.

◆ supports_partial_redraw

uint32_t supports_partial_redraw

Nonzero if redrawing part of a large render target (a View's render buffer) costs about what the drawn area costs on this device, so the library redraws only the region of the View that changed each frame.

Zero (the default) means the library clears and redraws the whole View target every composite, the right answer on tiled or bandwidth-bound hardware where loading the previous contents costs as much as a full redraw.

Note
This is a capability flag (like supports_msaa), not a limit: zero is the safe default. It only governs the View's render target. Small partial redraws of the library's tile render buffers happen on every driver regardless of this flag (the library requires load-and-store behavior on those targets), and sampling an existing render texture is always required.

The documentation for this struct was generated from the following file: