diff options
Diffstat (limited to 'service/README.md')
-rw-r--r-- | service/README.md | 482 |
1 files changed, 420 insertions, 62 deletions
diff --git a/service/README.md b/service/README.md index f864358b7..b0da5e7b5 100644 --- a/service/README.md +++ b/service/README.md @@ -44,7 +44,7 @@ func (h ApiId) Valid() bool type ApiIdArray []ApiId ``` -Array ApiIdArray +Array ApiIdˢ #### func (ApiIdArray) Format @@ -97,7 +97,7 @@ func (c *ApiSchema) GetState() StructInfo type ApiSchemaArray []ApiSchema ``` -Array ApiSchemaArray +Array ApiSchemaˢ #### func (ApiSchemaArray) Format @@ -219,7 +219,7 @@ Unpack unpacks the RPC-friendly AtomGroup structure into the atom Group o. type AtomGroupArray []AtomGroup ``` -Array AtomGroupArray +Array AtomGroupˢ #### func (AtomGroupArray) Format @@ -320,7 +320,7 @@ func (c *AtomInfo) GetType() uint16 type AtomInfoArray []AtomInfo ``` -Array AtomInfoArray +Array AtomInfoˢ #### func (AtomInfoArray) Format @@ -434,7 +434,7 @@ func (c *AtomRangeTimer) GetToAtomId() uint64 type AtomRangeTimerArray []AtomRangeTimer ``` -Array AtomRangeTimerArray +Array AtomRangeTimerˢ #### func (AtomRangeTimerArray) Format @@ -468,6 +468,14 @@ func NewAtomStream(list atom.List) (AtomStream, error) ``` NewAtomStream creates a fully-encoded AtomStream from the atom list. +#### func ResolveAtomStream + +```go +func ResolveAtomStream(id AtomStreamId, d database.Database, l log.Logger) (*AtomStream, error) +``` +ResolveAtomStream loads and returns the AtomStream stored in the database d, +using id. + #### func (*AtomStream) Class ```go @@ -498,6 +506,13 @@ type AtomStreamId struct { Handle AtomStreamId +#### func StoreAtomStream + +```go +func StoreAtomStream(v *AtomStream, d database.Database, l log.Logger) (AtomStreamId, error) +``` +StoreAtomStream stores v into the database d, returning the AtomStreamId. + #### func (*AtomStreamId) Class ```go @@ -555,7 +570,7 @@ func (c *AtomTimer) GetNanoseconds() uint64 type AtomTimerArray []AtomTimer ``` -Array AtomTimerArray +Array AtomTimerˢ #### func (AtomTimerArray) Format @@ -582,6 +597,13 @@ func CreateBinary( ) *Binary ``` +#### func ResolveBinary + +```go +func ResolveBinary(id BinaryId, d database.Database, l log.Logger) (*Binary, error) +``` +ResolveBinary loads and returns the Binary stored in the database d, using id. + #### func (*Binary) Class ```go @@ -605,6 +627,13 @@ type BinaryId struct { Handle BinaryId +#### func StoreBinary + +```go +func StoreBinary(v *Binary, d database.Database, l log.Logger) (BinaryId, error) +``` +StoreBinary stores v into the database d, returning the BinaryId. + #### func (*BinaryId) Class ```go @@ -642,6 +671,13 @@ func CreateCapture( ) *Capture ``` +#### func ResolveCapture + +```go +func ResolveCapture(id CaptureId, d database.Database, l log.Logger) (*Capture, error) +``` +ResolveCapture loads and returns the Capture stored in the database d, using id. + #### func (*Capture) Class ```go @@ -683,6 +719,13 @@ type CaptureId struct { Handle CaptureId +#### func StoreCapture + +```go +func StoreCapture(v *Capture, d database.Database, l log.Logger) (CaptureId, error) +``` +StoreCapture stores v into the database d, returning the CaptureId. + #### func (*CaptureId) Class ```go @@ -701,7 +744,7 @@ func (h CaptureId) Valid() bool type CaptureIdArray []CaptureId ``` -Array CaptureIdArray +Array CaptureIdˢ #### func (CaptureIdArray) Format @@ -709,6 +752,20 @@ Array CaptureIdArray func (a CaptureIdArray) Format(f fmt.State, c rune) ``` +#### type ClassArray + +```go +type ClassArray []schema.Class +``` + +Array Classˢ + +#### func (ClassArray) Format + +```go +func (a ClassArray) Format(f fmt.State, c rune) +``` + #### type ClassInfo ```go @@ -716,8 +773,8 @@ type ClassInfo struct { binary.Generate Name string Kind TypeKind - Fields FieldInfoArray - Extends ClassInfoArray + Fields FieldInfoPtrArray + Extends ClassInfoPtrArray } ``` @@ -729,8 +786,8 @@ Class ClassInfo func CreateClassInfo( Name string, Kind TypeKind, - Fields FieldInfoArray, - Extends ClassInfoArray, + Fields FieldInfoPtrArray, + Extends ClassInfoPtrArray, ) *ClassInfo ``` @@ -743,13 +800,13 @@ func (*ClassInfo) Class() binary.Class #### func (*ClassInfo) GetExtends ```go -func (c *ClassInfo) GetExtends() ClassInfoArray +func (c *ClassInfo) GetExtends() ClassInfoPtrArray ``` #### func (*ClassInfo) GetFields ```go -func (c *ClassInfo) GetFields() FieldInfoArray +func (c *ClassInfo) GetFields() FieldInfoPtrArray ``` #### func (*ClassInfo) GetKind @@ -767,10 +824,10 @@ func (c *ClassInfo) GetName() string #### type ClassInfoArray ```go -type ClassInfoArray []*ClassInfo +type ClassInfoArray []ClassInfo ``` -Array ClassInfoRefArray +Array ClassInfoˢ #### func (ClassInfoArray) Format @@ -778,18 +835,49 @@ Array ClassInfoRefArray func (a ClassInfoArray) Format(f fmt.State, c rune) ``` +#### type ClassInfoPtrArray + +```go +type ClassInfoPtrArray []*ClassInfo +``` + +Array ClassInfoᵖˢ + +#### func (ClassInfoPtrArray) Format + +```go +func (a ClassInfoPtrArray) Format(f fmt.State, c rune) +``` + +#### type ClassPtrArray + +```go +type ClassPtrArray []*schema.Class +``` + +Array Classᵖˢ + +#### func (ClassPtrArray) Format + +```go +func (a ClassPtrArray) Format(f fmt.State, c rune) +``` + #### type Device ```go type Device struct { binary.Generate - Name string - Model string - OS string - PointerSize uint8 - PointerAlignment uint8 - MaxMemorySize uint64 - RequiresShaderPatching bool + Name string + Model string + OS string + PointerSize uint8 + PointerAlignment uint8 + MaxMemorySize uint64 + Extensions string + Renderer string + Vendor string + Version string } ``` @@ -805,16 +893,39 @@ func CreateDevice( PointerSize uint8, PointerAlignment uint8, MaxMemorySize uint64, - RequiresShaderPatching bool, + Extensions string, + Renderer string, + Vendor string, + Version string, ) *Device ``` +#### func ResolveDevice + +```go +func ResolveDevice(id DeviceId, d database.Database, l log.Logger) (*Device, error) +``` +ResolveDevice loads and returns the Device stored in the database d, using id. + +#### func (Device) Architecture + +```go +func (d Device) Architecture() device.Architecture +``` +Architecture return's the device's architecture. + #### func (*Device) Class ```go func (*Device) Class() binary.Class ``` +#### func (*Device) GetExtensions + +```go +func (c *Device) GetExtensions() string +``` + #### func (*Device) GetMaxMemorySize ```go @@ -851,10 +962,28 @@ func (c *Device) GetPointerAlignment() uint8 func (c *Device) GetPointerSize() uint8 ``` -#### func (*Device) GetRequiresShaderPatching +#### func (*Device) GetRenderer + +```go +func (c *Device) GetRenderer() string +``` + +#### func (*Device) GetVendor + +```go +func (c *Device) GetVendor() string +``` + +#### func (*Device) GetVersion ```go -func (c *Device) GetRequiresShaderPatching() bool +func (c *Device) GetVersion() string +``` + +#### func (Device) HasExtension + +```go +func (d Device) HasExtension(extension string) bool ``` #### type DeviceId @@ -868,6 +997,13 @@ type DeviceId struct { Handle DeviceId +#### func StoreDevice + +```go +func StoreDevice(v *Device, d database.Database, l log.Logger) (DeviceId, error) +``` +StoreDevice stores v into the database d, returning the DeviceId. + #### func (*DeviceId) Class ```go @@ -886,7 +1022,7 @@ func (h DeviceId) Valid() bool type DeviceIdArray []DeviceId ``` -Array DeviceIdArray +Array DeviceIdˢ #### func (DeviceIdArray) Format @@ -933,13 +1069,19 @@ func (c *EnumEntry) GetName() string func (c *EnumEntry) GetValue() uint32 ``` +#### func (EnumEntry) String + +```go +func (e EnumEntry) String() string +``` + #### type EnumEntryArray ```go type EnumEntryArray []EnumEntry ``` -Array EnumEntryArray +Array EnumEntryˢ #### func (EnumEntryArray) Format @@ -955,7 +1097,7 @@ type EnumInfo struct { Name string Kind TypeKind Entries EnumEntryArray - Extends EnumInfoArray + Extends EnumInfoPtrArray } ``` @@ -968,7 +1110,7 @@ func CreateEnumInfo( Name string, Kind TypeKind, Entries EnumEntryArray, - Extends EnumInfoArray, + Extends EnumInfoPtrArray, ) *EnumInfo ``` @@ -987,7 +1129,7 @@ func (c *EnumInfo) GetEntries() EnumEntryArray #### func (*EnumInfo) GetExtends ```go -func (c *EnumInfo) GetExtends() EnumInfoArray +func (c *EnumInfo) GetExtends() EnumInfoPtrArray ``` #### func (*EnumInfo) GetKind @@ -1005,10 +1147,10 @@ func (c *EnumInfo) GetName() string #### type EnumInfoArray ```go -type EnumInfoArray []*EnumInfo +type EnumInfoArray []EnumInfo ``` -Array EnumInfoRefArray +Array EnumInfoˢ #### func (EnumInfoArray) Format @@ -1016,6 +1158,20 @@ Array EnumInfoRefArray func (a EnumInfoArray) Format(f fmt.State, c rune) ``` +#### type EnumInfoPtrArray + +```go +type EnumInfoPtrArray []*EnumInfo +``` + +Array EnumInfoᵖˢ + +#### func (EnumInfoPtrArray) Format + +```go +func (a EnumInfoPtrArray) Format(f fmt.State, c rune) +``` + #### type FieldInfo ```go @@ -1058,10 +1214,10 @@ func (c *FieldInfo) GetType() TypeInfo #### type FieldInfoArray ```go -type FieldInfoArray []*FieldInfo +type FieldInfoArray []FieldInfo ``` -Array FieldInfoRefArray +Array FieldInfoˢ #### func (FieldInfoArray) Format @@ -1069,6 +1225,20 @@ Array FieldInfoRefArray func (a FieldInfoArray) Format(f fmt.State, c rune) ``` +#### type FieldInfoPtrArray + +```go +type FieldInfoPtrArray []*FieldInfo +``` + +Array FieldInfoᵖˢ + +#### func (FieldInfoPtrArray) Format + +```go +func (a FieldInfoPtrArray) Format(f fmt.State, c rune) +``` + #### type Hierarchy ```go @@ -1088,6 +1258,14 @@ func CreateHierarchy( ) *Hierarchy ``` +#### func ResolveHierarchy + +```go +func ResolveHierarchy(id HierarchyId, d database.Database, l log.Logger) (*Hierarchy, error) +``` +ResolveHierarchy loads and returns the Hierarchy stored in the database d, using +id. + #### func (*Hierarchy) Class ```go @@ -1111,6 +1289,13 @@ type HierarchyId struct { Handle HierarchyId +#### func StoreHierarchy + +```go +func StoreHierarchy(v *Hierarchy, d database.Database, l log.Logger) (HierarchyId, error) +``` +StoreHierarchy stores v into the database d, returning the HierarchyId. + #### func (*HierarchyId) Class ```go @@ -1150,10 +1335,16 @@ func (i ImageFormat) IsFloat32() bool func (i ImageFormat) IsRGBA8() bool ``` +#### func (*ImageFormat) Parse + +```go +func (v *ImageFormat) Parse(s string) error +``` + #### func (ImageFormat) String ```go -func (i ImageFormat) String() string +func (v ImageFormat) String() string ``` #### type ImageInfo @@ -1181,6 +1372,14 @@ func CreateImageInfo( ) *ImageInfo ``` +#### func ResolveImageInfo + +```go +func ResolveImageInfo(id ImageInfoId, d database.Database, l log.Logger) (*ImageInfo, error) +``` +ResolveImageInfo loads and returns the ImageInfo stored in the database d, using +id. + #### func (*ImageInfo) Class ```go @@ -1222,6 +1421,13 @@ type ImageInfoId struct { Handle ImageInfoId +#### func StoreImageInfo + +```go +func StoreImageInfo(v *ImageInfo, d database.Database, l log.Logger) (ImageInfoId, error) +``` +StoreImageInfo stores v into the database d, returning the ImageInfoId. + #### func (*ImageInfoId) Class ```go @@ -1314,6 +1520,14 @@ func CreateMemoryInfo( ) *MemoryInfo ``` +#### func ResolveMemoryInfo + +```go +func ResolveMemoryInfo(id MemoryInfoId, d database.Database, l log.Logger) (*MemoryInfo, error) +``` +ResolveMemoryInfo loads and returns the MemoryInfo stored in the database d, +using id. + #### func (*MemoryInfo) Class ```go @@ -1355,6 +1569,13 @@ type MemoryInfoId struct { Handle MemoryInfoId +#### func StoreMemoryInfo + +```go +func StoreMemoryInfo(v *MemoryInfo, d database.Database, l log.Logger) (MemoryInfoId, error) +``` +StoreMemoryInfo stores v into the database d, returning the MemoryInfoId. + #### func (*MemoryInfoId) Class ```go @@ -1426,7 +1647,7 @@ Unpack unpacks the RPC-friendly MemoryRange structure into the memory Range o. type MemoryRangeArray []MemoryRange ``` -Array MemoryRangeArray +Array MemoryRangeˢ #### func (MemoryRangeArray) Format @@ -1503,7 +1724,7 @@ func (c *ParameterInfo) GetType() TypeInfo type ParameterInfoArray []ParameterInfo ``` -Array ParameterInfoArray +Array ParameterInfoˢ #### func (ParameterInfoArray) Format @@ -1515,26 +1736,27 @@ func (a ParameterInfoArray) Format(f fmt.State, c rune) ```go type RPC interface { - Import(l log.Logger, name string, Data U8Array) (CaptureId, error) + GetSchema(l log.Logger) (ClassPtrArray, error) + Import(name string, Data U8Array, l log.Logger) (CaptureId, error) GetCaptures(l log.Logger) (CaptureIdArray, error) GetDevices(l log.Logger) (DeviceIdArray, error) - GetState(l log.Logger, capture CaptureId, after uint64) (BinaryId, error) - GetHierarchy(l log.Logger, capture CaptureId) (HierarchyId, error) - GetMemoryInfo(l log.Logger, capture CaptureId, after uint64, rng MemoryRange) (MemoryInfoId, error) - GetFramebufferColor(l log.Logger, device DeviceId, capture CaptureId, api ApiId, after uint64, settings RenderSettings) (ImageInfoId, error) - GetFramebufferDepth(l log.Logger, device DeviceId, capture CaptureId, api ApiId, after uint64) (ImageInfoId, error) - GetTimingInfo(l log.Logger, device DeviceId, capture CaptureId, mask TimingMask) (TimingInfoId, error) - PrerenderFramebuffers(l log.Logger, device DeviceId, capture CaptureId, api ApiId, width uint32, height uint32, atomIds U64Array) (BinaryId, error) - ReplaceAtom(l log.Logger, capture CaptureId, atomId uint64, atomType uint16, data Binary) (CaptureId, error) - ResolveAtomStream(l log.Logger, id AtomStreamId) (AtomStream, error) - ResolveBinary(l log.Logger, id BinaryId) (Binary, error) - ResolveCapture(l log.Logger, id CaptureId) (Capture, error) - ResolveDevice(l log.Logger, id DeviceId) (Device, error) - ResolveHierarchy(l log.Logger, id HierarchyId) (Hierarchy, error) - ResolveImageInfo(l log.Logger, id ImageInfoId) (ImageInfo, error) - ResolveMemoryInfo(l log.Logger, id MemoryInfoId) (MemoryInfo, error) - ResolveSchema(l log.Logger, id SchemaId) (Schema, error) - ResolveTimingInfo(l log.Logger, id TimingInfoId) (TimingInfo, error) + GetState(capture CaptureId, after uint64, l log.Logger) (BinaryId, error) + GetHierarchy(capture CaptureId, l log.Logger) (HierarchyId, error) + GetMemoryInfo(capture CaptureId, after uint64, rng MemoryRange, l log.Logger) (MemoryInfoId, error) + GetFramebufferColor(device DeviceId, capture CaptureId, api ApiId, after uint64, settings RenderSettings, l log.Logger) (ImageInfoId, error) + GetFramebufferDepth(device DeviceId, capture CaptureId, api ApiId, after uint64, l log.Logger) (ImageInfoId, error) + GetTimingInfo(device DeviceId, capture CaptureId, mask TimingMask, l log.Logger) (TimingInfoId, error) + PrerenderFramebuffers(device DeviceId, capture CaptureId, api ApiId, width uint32, height uint32, atomIds U64Array, l log.Logger) (BinaryId, error) + ReplaceAtom(capture CaptureId, atomId uint64, atomType uint16, data Binary, l log.Logger) (CaptureId, error) + ResolveAtomStream(id AtomStreamId, l log.Logger) (AtomStream, error) + ResolveBinary(id BinaryId, l log.Logger) (Binary, error) + ResolveCapture(id CaptureId, l log.Logger) (Capture, error) + ResolveDevice(id DeviceId, l log.Logger) (Device, error) + ResolveHierarchy(id HierarchyId, l log.Logger) (Hierarchy, error) + ResolveImageInfo(id ImageInfoId, l log.Logger) (ImageInfo, error) + ResolveMemoryInfo(id MemoryInfoId, l log.Logger) (MemoryInfo, error) + ResolveSchema(id SchemaId, l log.Logger) (Schema, error) + ResolveTimingInfo(id TimingInfoId, l log.Logger) (TimingInfo, error) } ``` @@ -1592,6 +1814,87 @@ func (c *RenderSettings) GetMaxWidth() uint32 func (c *RenderSettings) GetWireframe() bool ``` +#### type Resolver + +```go +type Resolver struct { + Database database.Database +} +``` + + +#### func (Resolver) ResolveAtomStream + +```go +func (r Resolver) ResolveAtomStream(id AtomStreamId, l log.Logger) (AtomStream, error) +``` +ResolveAtomStream loads and returns the AtomStream stored in the resolver's +database, using id. + +#### func (Resolver) ResolveBinary + +```go +func (r Resolver) ResolveBinary(id BinaryId, l log.Logger) (Binary, error) +``` +ResolveBinary loads and returns the Binary stored in the resolver's database, +using id. + +#### func (Resolver) ResolveCapture + +```go +func (r Resolver) ResolveCapture(id CaptureId, l log.Logger) (Capture, error) +``` +ResolveCapture loads and returns the Capture stored in the resolver's database, +using id. + +#### func (Resolver) ResolveDevice + +```go +func (r Resolver) ResolveDevice(id DeviceId, l log.Logger) (Device, error) +``` +ResolveDevice loads and returns the Device stored in the resolver's database, +using id. + +#### func (Resolver) ResolveHierarchy + +```go +func (r Resolver) ResolveHierarchy(id HierarchyId, l log.Logger) (Hierarchy, error) +``` +ResolveHierarchy loads and returns the Hierarchy stored in the resolver's +database, using id. + +#### func (Resolver) ResolveImageInfo + +```go +func (r Resolver) ResolveImageInfo(id ImageInfoId, l log.Logger) (ImageInfo, error) +``` +ResolveImageInfo loads and returns the ImageInfo stored in the resolver's +database, using id. + +#### func (Resolver) ResolveMemoryInfo + +```go +func (r Resolver) ResolveMemoryInfo(id MemoryInfoId, l log.Logger) (MemoryInfo, error) +``` +ResolveMemoryInfo loads and returns the MemoryInfo stored in the resolver's +database, using id. + +#### func (Resolver) ResolveSchema + +```go +func (r Resolver) ResolveSchema(id SchemaId, l log.Logger) (Schema, error) +``` +ResolveSchema loads and returns the Schema stored in the resolver's database, +using id. + +#### func (Resolver) ResolveTimingInfo + +```go +func (r Resolver) ResolveTimingInfo(id TimingInfoId, l log.Logger) (TimingInfo, error) +``` +ResolveTimingInfo loads and returns the TimingInfo stored in the resolver's +database, using id. + #### type Schema ```go @@ -1613,6 +1916,13 @@ func CreateSchema( ) *Schema ``` +#### func ResolveSchema + +```go +func ResolveSchema(id SchemaId, d database.Database, l log.Logger) (*Schema, error) +``` +ResolveSchema loads and returns the Schema stored in the database d, using id. + #### func (*Schema) Class ```go @@ -1642,6 +1952,13 @@ type SchemaId struct { Handle SchemaId +#### func StoreSchema + +```go +func StoreSchema(v *Schema, d database.Database, l log.Logger) (SchemaId, error) +``` +StoreSchema stores v into the database d, returning the SchemaId. + #### func (*SchemaId) Class ```go @@ -1755,7 +2072,7 @@ type StructInfo struct { binary.Generate Name string Kind TypeKind - Fields FieldInfoArray + Fields FieldInfoPtrArray } ``` @@ -1767,7 +2084,7 @@ Class StructInfo func CreateStructInfo( Name string, Kind TypeKind, - Fields FieldInfoArray, + Fields FieldInfoPtrArray, ) *StructInfo ``` @@ -1780,7 +2097,7 @@ func (*StructInfo) Class() binary.Class #### func (*StructInfo) GetFields ```go -func (c *StructInfo) GetFields() FieldInfoArray +func (c *StructInfo) GetFields() FieldInfoPtrArray ``` #### func (*StructInfo) GetKind @@ -1818,6 +2135,14 @@ func CreateTimingInfo( ) *TimingInfo ``` +#### func ResolveTimingInfo + +```go +func ResolveTimingInfo(id TimingInfoId, d database.Database, l log.Logger) (*TimingInfo, error) +``` +ResolveTimingInfo loads and returns the TimingInfo stored in the database d, +using id. + #### func (*TimingInfo) Class ```go @@ -1853,6 +2178,13 @@ type TimingInfoId struct { Handle TimingInfoId +#### func StoreTimingInfo + +```go +func StoreTimingInfo(v *TimingInfo, d database.Database, l log.Logger) (TimingInfoId, error) +``` +StoreTimingInfo stores v into the database d, returning the TimingInfoId. + #### func (*TimingInfoId) Class ```go @@ -1899,10 +2231,16 @@ func (i TimingMask) IsTimingPerDrawCall() bool func (i TimingMask) IsTimingPerFrame() bool ``` +#### func (*TimingMask) Parse + +```go +func (v *TimingMask) Parse(s string) error +``` + #### func (TimingMask) String ```go -func (i TimingMask) String() string +func (v TimingMask) String() string ``` #### type TypeInfo @@ -1917,6 +2255,20 @@ type TypeInfo interface { Interface TypeInfo +#### type TypeInfoArray + +```go +type TypeInfoArray []TypeInfo +``` + +Array TypeInfoˢ + +#### func (TypeInfoArray) Format + +```go +func (a TypeInfoArray) Format(f fmt.State, c rune) +``` + #### type TypeKind ```go @@ -2084,10 +2436,16 @@ func (i TypeKind) IsU64() bool func (i TypeKind) IsU8() bool ``` +#### func (*TypeKind) Parse + +```go +func (v *TypeKind) Parse(s string) error +``` + #### func (TypeKind) String ```go -func (i TypeKind) String() string +func (v TypeKind) String() string ``` #### type U64Array @@ -2096,7 +2454,7 @@ func (i TypeKind) String() string type U64Array []uint64 ``` -Array U64Array +Array U64ˢ #### func (U64Array) Format @@ -2110,7 +2468,7 @@ func (a U64Array) Format(f fmt.State, c rune) type U8Array []uint8 ``` -Array U8Array +Array U8ˢ #### func (U8Array) Format |