aboutsummaryrefslogtreecommitdiff
path: root/replay
diff options
context:
space:
mode:
authorBen Clayton <bclayton@google.com>2015-08-03 13:20:36 +0100
committerBen Clayton <headlessclayton@gmail.com>2015-08-03 15:50:23 +0100
commit1e9bfff4b4791543e50b954aabaa4c43c8b8c545 (patch)
treec0b84055bbcaeb4873dcb8949a87dcbd4d95efb6 /replay
parente017e4e5018e6c958201e203599f384ddea345e6 (diff)
downloadgpu-1e9bfff4b4791543e50b954aabaa4c43c8b8c545.tar.gz
Add new wireframe overlay mode to highlight the selected draw call.
Change-Id: I0ab7382f11bf8022afb9ccc97d60fd102ed2d915
Diffstat (limited to 'replay')
-rw-r--r--replay/queries.go17
-rw-r--r--replay/replay_binary.go50
2 files changed, 66 insertions, 1 deletions
diff --git a/replay/queries.go b/replay/queries.go
index 10cfce4a5..b358878a5 100644
--- a/replay/queries.go
+++ b/replay/queries.go
@@ -19,10 +19,25 @@ import (
"android.googlesource.com/platform/tools/gpu/service"
)
+// WireframeMode is an enumerator of wireframe modes used by QueryColorBuffer.
+type WireframeMode int
+
+const (
+ // NoWireframe indicates that nothing should be drawn in wireframe.
+ NoWireframe = WireframeMode(iota)
+
+ // WireframeOverlay indicates that the single draw call should be overlayed
+ // with the wireframe of the mesh.
+ WireframeOverlay
+
+ // AllWireframe indicates that all draw calls should be displayed in wireframe.
+ AllWireframe
+)
+
// QueryColorBuffer is the interface implemented by types that can return the
// content of the color buffer at a particular point in a capture.
type QueryColorBuffer interface {
- QueryColorBuffer(ctx *Context, mgr *Manager, after atom.ID, width, height uint32, wireframe bool) <-chan Image
+ QueryColorBuffer(ctx *Context, mgr *Manager, after atom.ID, width, height uint32, wireframeMode WireframeMode) <-chan Image
}
// QueryDepthBufferer is the interface implemented by types that can return the
diff --git a/replay/replay_binary.go b/replay/replay_binary.go
new file mode 100644
index 000000000..24a67a0c8
--- /dev/null
+++ b/replay/replay_binary.go
@@ -0,0 +1,50 @@
+////////////////////////////////////////////////////////////////////////////////
+// Do not modify!
+// Generated by codergen
+////////////////////////////////////////////////////////////////////////////////
+
+package replay
+
+import (
+ "fmt"
+
+ "android.googlesource.com/platform/tools/gpu/binary/schema"
+)
+
+var ConstantValues schema.Constants
+
+const _WireframeMode_name = "NoWireframeWireframeOverlayAllWireframe"
+
+var _WireframeMode_map = map[WireframeMode]string{}
+
+func init() {
+ _WireframeMode_map[0] = _WireframeMode_name[0:11]
+ _WireframeMode_map[1] = _WireframeMode_name[11:27]
+ _WireframeMode_map[2] = _WireframeMode_name[27:39]
+
+ ConstantValues = append(ConstantValues, schema.ConstantSet{
+ Type: &schema.Primitive{Name: "WireframeMode", Method: schema.Int32},
+ Entries: []schema.Constant{
+ {Name: _WireframeMode_name[0:11], Value: int32(0)},
+ {Name: _WireframeMode_name[11:27], Value: int32(1)},
+ {Name: _WireframeMode_name[27:39], Value: int32(2)},
+ },
+ })
+}
+
+func (v WireframeMode) String() string {
+ if s, ok := _WireframeMode_map[v]; ok {
+ return s
+ }
+ return fmt.Sprintf("WireframeMode(%d)", v)
+}
+
+func (v *WireframeMode) Parse(s string) error {
+ for k, t := range _WireframeMode_map {
+ if s == t {
+ *v = k
+ return nil
+ }
+ }
+ return fmt.Errorf("%s not in WireframeMode", s)
+}