Skip to content

Commit

Permalink
Add intergration test for gles undefined framebuffer patterns
Browse files Browse the repository at this point in the history
  • Loading branch information
ben-clayton committed May 3, 2018
1 parent 0f4d294 commit c5dfded
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions test/integration/replay/gles/gles_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -693,6 +693,22 @@ func TestResizeRenderer(t *testing.T) {
maybeExportCapture(ctx, "resize_renderer", capture)
}

// TestNewContextUndefined checks that a new context is filled with the
// undefined framebuffer pattern.
func TestNewContextUndefined(t *testing.T) {
ctx, f := newFixture(log.Testing(t))

cmds, _, _ := f.initContext(ctx, 64, 64, true)
makeCurrent := api.CmdID(len(cmds) - 1)

intent := replay.Intent{
Capture: f.storeCapture(ctx, cmds),
Device: path.NewDevice(f.device.Instance().Id.ID()),
}

checkColorBuffer(ctx, intent, f.mgr, 64, 64, 0.0, "undef-fb", makeCurrent, nil)
}

// TestPreserveBuffersOnSwap checks that when the preserveBuffersOnSwap flag is
// set, the backbuffer is preserved between calls to eglSwapBuffers().
func TestPreserveBuffersOnSwap(t *testing.T) {
Expand Down
Binary file added test/integration/replay/gles/reference/undef-fb.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit c5dfded

Please sign in to comment.