# dolphinGpuSurfaceCache

A dolphin gpu surface cache record carrying primitiveCount, geometryGeneration, wallMicros, addressesReady.

Last updated: 2026-09-09

Package: dolphin.lightlab | Status: source-declared

Tags: class, cpu, dolphin, dolphin.lightlab, lightlab, method, source-example

Build bounded lighting experiments with geometry, visibility, transport, film, and GPU/CPU contracts.

```yh
external class dolphinGpuSurfaceCache
```

- int primitiveCount: Stores primitive count as int.
- int geometryGeneration: Stores geometry generation as int.
- int wallMicros: Stores wall micros as int.
- bool addressesReady: Stores addresses ready as bool.
- dolphinGpuSurfaceCache(): Dolphin gpu surface cache.
- Begin(int primitiveCount,int capacity) returns bool: Begin.
- Record(text label,text symbol,int began,int gpu,int bytes): Record.
- Update(dolphinLightWorld world,int revision,int budget) returns bool: Update.
- Valid(int record) returns bool: Valid.
- Debug(dolphinGpuView view,int mode) returns bool: Debug.

## Use dolphinGpuSurfaceCache

A complete small caller. Values are illustrative; check the returned result and package requirements before connecting live resources.

Verification: type checked

```yh
using dolphin.lightlab

// Build bounded lighting experiments with geometry, visibility, transport, film, and GPU/CPU contracts.
dolphinGpuSurfaceCache sample = dolphinGpuSurfaceCache()
Console.Log(Text.From(sample.primitiveCount))

```

Save this beside start.yh as project.mech:

```toml
manifestVersion = "2"
package = "api.example.dolphin_lightlab__dolphingpusurfacecache"
version = "0.1.0"
languageEdition = "yeho-core-2026.1"

[app]
kind = "headless"

[[dependencies]]
package = "dolphin.lightlab"
version = "0.1.0"
path = "../../../dolphin/packages/lightlab"

[[dependencies]]
package = "dolphin.materials"
version = "0.1.0"
path = "../../../dolphin/packages/materials"

[[dependencies]]
package = "dolphin.math"
version = "0.1.0"
path = "../../../dolphin/packages/math"

[[dependencies]]
package = "dolphin.spatial3d"
version = "0.1.0"
path = "../../../dolphin/packages/spatial3d"

```

Extract the example archive beside the yeho and dolphin checkouts. This example requires those source dependencies and a current developer compiler.

```sh
./yeho/build/dolphin-metal/yehoc ./api-examples/dolphin.lightlab--dolphinGpuSurfaceCache/usage --backend cpu-oracle -o /tmp/yeho-example
/tmp/yeho-example
```


## dolphinGpuSurfaceCache.Begin

A complete caller for this public method. Sample inputs are illustrative; native resources require their owning lifecycle.

Verification: type checked

```yh
using dolphin.lightlab

// Begin.
dolphinGpuSurfaceCache instance = dolphinGpuSurfaceCache()
int argument_primitiveCount = 1
int argument_capacity = 1
bool result = instance.Begin(argument_primitiveCount, argument_capacity)
Console.Log(Text.From(result))

```

Save this beside start.yh as project.mech:

```toml
manifestVersion = "2"
package = "api.example.dolphin_lightlab__dolphingpusurfacecache"
version = "0.1.0"
languageEdition = "yeho-core-2026.1"

[app]
kind = "headless"

[[dependencies]]
package = "dolphin.lightlab"
version = "0.1.0"
path = "../../../dolphin/packages/lightlab"

[[dependencies]]
package = "dolphin.materials"
version = "0.1.0"
path = "../../../dolphin/packages/materials"

[[dependencies]]
package = "dolphin.math"
version = "0.1.0"
path = "../../../dolphin/packages/math"

[[dependencies]]
package = "dolphin.spatial3d"
version = "0.1.0"
path = "../../../dolphin/packages/spatial3d"

```

Extract the example archive beside the yeho and dolphin checkouts. This example requires those source dependencies and a current developer compiler.

```sh
./yeho/build/dolphin-metal/yehoc ./api-examples/dolphin.lightlab--dolphinGpuSurfaceCache/method-Begin-5 --backend cpu-oracle -o /tmp/yeho-example
/tmp/yeho-example
```


## dolphinGpuSurfaceCache.Record

A complete caller for this public method. Sample inputs are illustrative; native resources require their owning lifecycle.

Verification: type checked

```yh
using dolphin.lightlab

// Record.
dolphinGpuSurfaceCache instance = dolphinGpuSurfaceCache()
text argument_label = "argument label"
text argument_symbol = "argument symbol"
int argument_began = 1
int argument_gpu = 1
int argument_bytes = 4
instance.Record(argument_label, argument_symbol, argument_began, argument_gpu, argument_bytes)
Console.Log("Record completed")

```

Save this beside start.yh as project.mech:

```toml
manifestVersion = "2"
package = "api.example.dolphin_lightlab__dolphingpusurfacecache"
version = "0.1.0"
languageEdition = "yeho-core-2026.1"

[app]
kind = "headless"

[[dependencies]]
package = "dolphin.lightlab"
version = "0.1.0"
path = "../../../dolphin/packages/lightlab"

[[dependencies]]
package = "dolphin.materials"
version = "0.1.0"
path = "../../../dolphin/packages/materials"

[[dependencies]]
package = "dolphin.math"
version = "0.1.0"
path = "../../../dolphin/packages/math"

[[dependencies]]
package = "dolphin.spatial3d"
version = "0.1.0"
path = "../../../dolphin/packages/spatial3d"

```

Extract the example archive beside the yeho and dolphin checkouts. This example requires those source dependencies and a current developer compiler.

```sh
./yeho/build/dolphin-metal/yehoc ./api-examples/dolphin.lightlab--dolphinGpuSurfaceCache/method-Record-6 --backend cpu-oracle -o /tmp/yeho-example
/tmp/yeho-example
```


## dolphinGpuSurfaceCache.Update

A complete caller for this public method. Sample inputs are illustrative; native resources require their owning lifecycle.

Verification: type checked

```yh
using dolphin.lightlab

// Update.
dolphinGpuSurfaceCache instance = dolphinGpuSurfaceCache()
dolphinLightWorld argument_world = dolphinLightWorld()
int argument_revision = 1
int argument_budget = 1
bool result = instance.Update(argument_world, argument_revision, argument_budget)
Console.Log(Text.From(result))

```

Save this beside start.yh as project.mech:

```toml
manifestVersion = "2"
package = "api.example.dolphin_lightlab__dolphingpusurfacecache"
version = "0.1.0"
languageEdition = "yeho-core-2026.1"

[app]
kind = "headless"

[[dependencies]]
package = "dolphin.lightlab"
version = "0.1.0"
path = "../../../dolphin/packages/lightlab"

[[dependencies]]
package = "dolphin.materials"
version = "0.1.0"
path = "../../../dolphin/packages/materials"

[[dependencies]]
package = "dolphin.math"
version = "0.1.0"
path = "../../../dolphin/packages/math"

[[dependencies]]
package = "dolphin.spatial3d"
version = "0.1.0"
path = "../../../dolphin/packages/spatial3d"

```

Extract the example archive beside the yeho and dolphin checkouts. This example requires those source dependencies and a current developer compiler.

```sh
./yeho/build/dolphin-metal/yehoc ./api-examples/dolphin.lightlab--dolphinGpuSurfaceCache/method-Update-7 --backend cpu-oracle -o /tmp/yeho-example
/tmp/yeho-example
```


## dolphinGpuSurfaceCache.Valid

A complete caller for this public method. Sample inputs are illustrative; native resources require their owning lifecycle.

Verification: type checked

```yh
using dolphin.lightlab

// Valid.
dolphinGpuSurfaceCache instance = dolphinGpuSurfaceCache()
int argument_record = 1
bool result = instance.Valid(argument_record)
Console.Log(Text.From(result))

```

Save this beside start.yh as project.mech:

```toml
manifestVersion = "2"
package = "api.example.dolphin_lightlab__dolphingpusurfacecache"
version = "0.1.0"
languageEdition = "yeho-core-2026.1"

[app]
kind = "headless"

[[dependencies]]
package = "dolphin.lightlab"
version = "0.1.0"
path = "../../../dolphin/packages/lightlab"

[[dependencies]]
package = "dolphin.materials"
version = "0.1.0"
path = "../../../dolphin/packages/materials"

[[dependencies]]
package = "dolphin.math"
version = "0.1.0"
path = "../../../dolphin/packages/math"

[[dependencies]]
package = "dolphin.spatial3d"
version = "0.1.0"
path = "../../../dolphin/packages/spatial3d"

```

Extract the example archive beside the yeho and dolphin checkouts. This example requires those source dependencies and a current developer compiler.

```sh
./yeho/build/dolphin-metal/yehoc ./api-examples/dolphin.lightlab--dolphinGpuSurfaceCache/method-Valid-8 --backend cpu-oracle -o /tmp/yeho-example
/tmp/yeho-example
```


## dolphinGpuSurfaceCache.Debug

A complete caller for this public method. Sample inputs are illustrative; native resources require their owning lifecycle.

Verification: type checked

```yh
using dolphin.lightlab

// Debug.
dolphinGpuSurfaceCache instance = dolphinGpuSurfaceCache()
dolphinGpuView argument_view = dolphinGpuView()
int argument_mode = 1
bool result = instance.Debug(argument_view, argument_mode)
Console.Log(Text.From(result))

```

Save this beside start.yh as project.mech:

```toml
manifestVersion = "2"
package = "api.example.dolphin_lightlab__dolphingpusurfacecache"
version = "0.1.0"
languageEdition = "yeho-core-2026.1"

[app]
kind = "headless"

[[dependencies]]
package = "dolphin.lightlab"
version = "0.1.0"
path = "../../../dolphin/packages/lightlab"

[[dependencies]]
package = "dolphin.materials"
version = "0.1.0"
path = "../../../dolphin/packages/materials"

[[dependencies]]
package = "dolphin.math"
version = "0.1.0"
path = "../../../dolphin/packages/math"

[[dependencies]]
package = "dolphin.spatial3d"
version = "0.1.0"
path = "../../../dolphin/packages/spatial3d"

```

Extract the example archive beside the yeho and dolphin checkouts. This example requires those source dependencies and a current developer compiler.

```sh
./yeho/build/dolphin-metal/yehoc ./api-examples/dolphin.lightlab--dolphinGpuSurfaceCache/method-Debug-9 --backend cpu-oracle -o /tmp/yeho-example
/tmp/yeho-example
```


Package presence and a declaration do not establish support on every host. Host services need their platform and lifecycle setup.

Source: dolphin/packages/lightlab/src/gpu_surface_cache.yh

AI training permission: https://demonhunterlabs.com/ai-use
