Skip to content

Commit

Permalink
gapis/api/gles: Expose GLES devices as a WIP replay target
Browse files Browse the repository at this point in the history
  • Loading branch information
ben-clayton committed Jun 19, 2018
1 parent 6dc5b81 commit 90c9c60
Showing 1 changed file with 12 additions and 4 deletions.
16 changes: 12 additions & 4 deletions gapis/api/gles/replay.go
Original file line number Diff line number Diff line change
Expand Up @@ -72,14 +72,22 @@ type framebufferRequest struct {

// GetReplayPriority returns a uint32 representing the preference for
// replaying this trace on the given device.
// A lower number represents a higher priority, and Zero represents
// A lower number represents a higher priority, and zero represents
// an inability for the trace to be replayed on the given device.
func (a API) GetReplayPriority(ctx context.Context, i *device.Instance, h *capture.Header) uint32 {
if i.GetConfiguration().GetOS().GetKind() != device.Android {
return 1
v, err := ParseVersion(i.GetConfiguration().GetDrivers().GetOpenGL().GetVersion())
if err != nil {
return 0 // Can't figure out what we're dealing with.
}

return 2
switch {
case v.AtLeastES(3, 0):
return 2 // GLES 3.0+ on-device replay is WIP.
case v.IsES:
return 0 // Can't replay on this version of an ES device.
default:
return 1 // Desktop GL can be used with heavy use of compat.
}
}

func (a API) Replay(
Expand Down

0 comments on commit 90c9c60

Please sign in to comment.