Skip to content
This repository was archived by the owner on Feb 25, 2025. It is now read-only.

Commit 179c932

Browse files
author
Alistair Strachan
committed
Handle NULL 'value' to eglGetSyncAttribKHR()
The EGL spec does not specifically call out how to handle the case where 'value' passed to eglGetSyncAttribKHR is NULL, however many implementations will set the context error to EGL_BAD_PARAMETER and return without crashing. dEQP has a test which specifically checks for this behavior. Align SwiftShader's implementation with other EGL implementations. Bug: b/74572503 Test: dEQP-EQL GetSyncInvalidValueTest Change-Id: Ic893cd7073c12c463ded78042031df1bf85f6ce2 Reviewed-on: https://swiftshader-review.googlesource.com/c/SwiftShader/+/28028 Reviewed-by: Nicolas Capens <[email protected]> Tested-by: Alistair Strachan <[email protected]>
1 parent 4c9f4a9 commit 179c932

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/OpenGL/libEGL/libEGL.cpp

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1417,6 +1417,11 @@ EGLBoolean GetSyncAttrib(EGLDisplay dpy, EGLSyncKHR sync, EGLint attribute, EGLA
14171417
return error(EGL_BAD_PARAMETER, EGL_FALSE);
14181418
}
14191419

1420+
if(!value)
1421+
{
1422+
return error(EGL_BAD_PARAMETER, EGL_FALSE);
1423+
}
1424+
14201425
switch(attribute)
14211426
{
14221427
case EGL_SYNC_TYPE_KHR:

0 commit comments

Comments
 (0)