From c5dfded1719626f9eb2b812065f990ae53047b4c Mon Sep 17 00:00:00 2001 From: Ben Clayton Date: Thu, 3 May 2018 12:42:14 -0700 Subject: [PATCH] Add intergration test for gles undefined framebuffer patterns --- test/integration/replay/gles/gles_test.go | 16 ++++++++++++++++ .../replay/gles/reference/undef-fb.png | Bin 0 -> 290 bytes 2 files changed, 16 insertions(+) create mode 100644 test/integration/replay/gles/reference/undef-fb.png diff --git a/test/integration/replay/gles/gles_test.go b/test/integration/replay/gles/gles_test.go index 5991d8dd93..c4fea61912 100644 --- a/test/integration/replay/gles/gles_test.go +++ b/test/integration/replay/gles/gles_test.go @@ -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) { diff --git a/test/integration/replay/gles/reference/undef-fb.png b/test/integration/replay/gles/reference/undef-fb.png new file mode 100644 index 0000000000000000000000000000000000000000..1e6d1b3c2ee0d0e32e210324a134dcba8335279f GIT binary patch literal 290 zcmeAS@N?(olHy`uVBq!ia0vp^4j|0I1SD0tpLGJMm!2+;Ar*7p+}z09Y#`8@s2#jy z>lD@rGt{&VoXk2jG7!{V`-)A@gzYmdKlRu|Z{JJN6ddm+B*x!q4o zY$T6mSnj>&FMfJu$Jy5@mPe28?fAR3Zo)NjN!z`v`{io;e|_#=vvm7e`<^-X?skCq zwo6vaACp+}b!uM5%h=j4FRHK1uYb1X%hPZVzxPQmE`DEezrW<`XDims+NIJ_RpIis zzvRBYVb{B6Zt~Q%f8O7QCHod?>Q{Yv!>$50LVDJxMegV89D?p&m?Cal^^JMbFE8^g lUwC~hFUBwX&&t5?|NpujG8#T_Zh}IC!PC{xWt~$(695RPg<}8! literal 0 HcmV?d00001