From: Daniel Kurtz <[email protected]>

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 <[email protected]>
Reviewed-by: Marek Olšák <[email protected]>
---
 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

_______________________________________________
Piglit mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/piglit

Reply via email to