layout

package
v0.9.6 Latest Latest
Warning

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

Go to latest
Published: Dec 9, 2017 License: Apache-2.0 Imports: 7 Imported by: 69

Documentation

Overview

Package layout is used to find parts of the application package to load or run. It can use the running executable directory, or other supplied locations, and find files targeted to a specific abi.

Index

Constants

View Source
const (
	ErrCannotFindPackageFiles = fault.Const("Cannot find package files")
	ErrUnknownABI             = fault.Const("Unknown device ABI: %+v")
)

Variables

This section is empty.

Functions

func DirToBinABI added in v0.5.0

func DirToBinABI(dir string) string

DirToBinABI returns the ABI name that corresponds to the given binLayout Directory

func GapidApk

func GapidApk(ctx context.Context, abi *device.ABI) (file.Path, error)

GapidApk returns the path to the gapid.apk corresponding to the given abi.

func Gapir

func Gapir(ctx context.Context) (file.Path, error)

Gapir returns the path to the gapir binary.

func Gapis

func Gapis(ctx context.Context) (file.Path, error)

Gapis returns the path to the gapis binary.

func Gapit

func Gapit(ctx context.Context) (file.Path, error)

Gapit returns the path to the gapir binary.

func Json

func Json(ctx context.Context, lib LibraryType) (file.Path, error)

Json returns the path to the Vulkan layer JSON definition for the given library.

func Library

func Library(ctx context.Context, lib LibraryType) (file.Path, error)

Library returns the path to the requested library.

func Strings

func Strings(ctx context.Context) (file.Path, error)

Strings returns the path to the binary string table.

Types

type FileLayout

type FileLayout interface {
	// Strings returns the path to the binary string table.
	Strings(ctx context.Context) (file.Path, error)
	// Gapit returns the path to the gapit binary in this layout.
	Gapit(ctx context.Context) (file.Path, error)
	// Gapis returns the path to the gapis binary in this layout.
	Gapis(ctx context.Context) (file.Path, error)
	// Gapir returns the path to the gapir binary in this layout.
	Gapir(ctx context.Context) (file.Path, error)
	// GapidApk returns the path to gapid.apk in this layout.
	GapidApk(ctx context.Context, abi *device.ABI) (file.Path, error)
	// Library returns the path to the requested library.
	Library(ctx context.Context, lib LibraryType) (file.Path, error)
	// Json returns the path to the Vulkan layer JSON definition for the given library.
	Json(ctx context.Context, lib LibraryType) (file.Path, error)
}

FileLayout provides a unified way of accessing various Gapid binaries.

func BinLayout

func BinLayout(root file.Path) FileLayout

BinLayout returns a binLayout implementation of FileLayout rooted in the given directory.

type LibraryType

type LibraryType int

LibraryType enumerates the possible GAPID dynamic libraries.

const (
	LibGraphicsSpy LibraryType = iota
	LibVirtualSwapChain
)

Jump to

Keyboard shortcuts

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