[Piglit] [PATCH 04/14] egl_khr_fence_sync: remove initial expected STATUS check

Marek Olšák maraeo at gmail.com
Mon Apr 13 11:28:04 PDT 2015


From: Daniel Kurtz <djkurtz at chromium.org>

Per EGL_KHR_fence_sync spec [0], sync objects are initially unsignaled.
<Fence sync objects> are created in association with a <fence command> in
a client API.  When the client API executes the fence command, an event is
generated which signals the corresponding fence sync object.

However, it is up to the client API to decide when to execute the
<fence command>.  Some client APIs may execute the command immediately,
following (or during) eglCreateSyncKHR().  If there are no prior client
API commands, then the fence object will immediately transition to
signaled.

Thus, testing the initial fence object status with
eglGetSyncAttribKHR(EGL_SYNC_STATUS_KHR) is racy and/or testing
un-specified behavior.  Testing that it is still possible to read
EGL_SYNC_STATUS_KHR still makes some sense though, so I left that part.

[0] https://www.khronos.org/registry/egl/extensions/KHR/EGL_KHR_fence_sync.txt

Signed-off-by: Daniel Kurtz <djkurtz at chromium.org>
Reviewed-by: Marek Olšák <marek.olsak at amd.com>
---
 tests/egl/spec/egl_khr_fence_sync/egl_khr_fence_sync.c | 6 ------
 1 file changed, 6 deletions(-)

diff --git a/tests/egl/spec/egl_khr_fence_sync/egl_khr_fence_sync.c b/tests/egl/spec/egl_khr_fence_sync/egl_khr_fence_sync.c
index c9e8e3a..b7bb4dd 100644
--- a/tests/egl/spec/egl_khr_fence_sync/egl_khr_fence_sync.c
+++ b/tests/egl/spec/egl_khr_fence_sync/egl_khr_fence_sync.c
@@ -378,12 +378,6 @@ test_eglCreateSyncKHR_default_attributes(void *test_data)
 			  "an error");
 		result = PIGLIT_FAIL;
 	}
-	if (sync_status != EGL_UNSIGNALED_KHR) {
-		piglit_loge("eglGetSyncAttribKHR(EGL_SYNC_STATUS_KHR) returned "
-			  "0x%x but expected EGL_UNSIGNALED_KHR(0x%x)",
-			  sync_status, EGL_UNSIGNALED_KHR);
-		result = PIGLIT_FAIL;
-	}
 
 	ok = peglGetSyncAttribKHR(g_dpy, sync, EGL_SYNC_CONDITION_KHR, &sync_condition);
 	if (!ok) {
-- 
2.1.0



More information about the Piglit mailing list