pipelinecache

package
v0.34.5 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 7, 2026 License: MIT Imports: 6 Imported by: 0

Documentation

Overview

Package pipelinecache provides shared disk persistence helpers for GPU driver pipeline caches (Vulkan VkPipelineCache and DX12 cached PSO blobs).

This package is internal to wgpu. Backends own cache lifecycle; this package only handles adapter-scoped paths and atomic blob I/O.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DX12AdapterKey

func DX12AdapterKey(luidLow uint32, luidHigh int32, vendorID, deviceID, revision uint32) string

DX12AdapterKey identifies a DXGI adapter for cache scoping.

func DeleteBlob

func DeleteBlob(path string) error

DeleteBlob removes a cache blob. Missing files are ignored.

func HexKey

func HexKey(parts ...[]byte) string

HexKey returns a hex-encoded SHA-256 digest of the given byte slices.

func LoadBlob

func LoadBlob(path string) ([]byte, error)

LoadBlob reads a cache blob from disk. A missing file returns (nil, nil).

func SaveBlob

func SaveBlob(path string, data []byte) error

SaveBlob atomically writes a cache blob to disk (write temp + rename).

func UserCachePath

func UserCachePath(backend, adapterKey, fileName string) (string, error)

UserCachePath returns an adapter-scoped cache file path under os.UserCacheDir(). Example: ~/.cache/gogpu/vulkan/<adapterKey>/pipeline.cache

func VulkanAdapterKey

func VulkanAdapterKey(vendorID, deviceID, driverVersion uint32, uuid [16]byte) string

VulkanAdapterKey identifies a Vulkan physical device for cache scoping.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL